diff --git a/.gitignore b/.gitignore index 1b27a8b0..ad100e36 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,5 @@ - -*.map +.idea +**/.idea +apidocs/ +.DS_Store +*.marks diff --git a/.ruby-gemset b/.ruby-gemset new file mode 100644 index 00000000..ae6e8360 --- /dev/null +++ b/.ruby-gemset @@ -0,0 +1 @@ +dreem diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 00000000..b8d757e0 --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +ruby-2.0.0-p481 diff --git a/Gemfile b/Gemfile new file mode 100644 index 00000000..24c03deb --- /dev/null +++ b/Gemfile @@ -0,0 +1,9 @@ +source 'https://rubygems.org' + +gem 'jsduck' + +gem 'rspec' +gem 'capybara' +gem 'poltergeist' +gem 'selenium-webdriver' +# gem 'capybara-webkit' diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 00000000..b9512c2f --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,70 @@ +GEM + remote: https://rubygems.org/ + specs: + capybara (2.4.3) + mime-types (>= 1.16) + nokogiri (>= 1.3.3) + rack (>= 1.0.0) + rack-test (>= 0.5.4) + xpath (~> 2.0) + childprocess (0.5.5) + ffi (~> 1.0, >= 1.0.11) + cliver (0.3.2) + diff-lcs (1.2.5) + dimensions (1.2.0) + ffi (1.9.5) + jsduck (5.3.4) + dimensions (~> 1.2.0) + json (~> 1.8.0) + parallel (~> 0.7.1) + rdiscount (~> 2.1.6) + rkelly-remix (~> 0.0.4) + json (1.8.1) + mime-types (2.3) + mini_portile (0.6.0) + multi_json (1.10.1) + nokogiri (1.6.3.1) + mini_portile (= 0.6.0) + parallel (0.7.1) + poltergeist (1.5.1) + capybara (~> 2.1) + cliver (~> 0.3.1) + multi_json (~> 1.0) + websocket-driver (>= 0.2.0) + rack (1.5.2) + rack-test (0.6.2) + rack (>= 1.0) + rdiscount (2.1.7.1) + rkelly-remix (0.0.6) + rspec (3.1.0) + rspec-core (~> 3.1.0) + rspec-expectations (~> 3.1.0) + rspec-mocks (~> 3.1.0) + rspec-core (3.1.5) + rspec-support (~> 3.1.0) + rspec-expectations (3.1.2) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.1.0) + rspec-mocks (3.1.2) + rspec-support (~> 3.1.0) + rspec-support (3.1.1) + rubyzip (1.1.6) + selenium-webdriver (2.43.0) + childprocess (~> 0.5) + multi_json (~> 1.0) + rubyzip (~> 1.0) + websocket (~> 1.0) + websocket (1.2.1) + websocket-driver (0.3.4) + xpath (2.0.0) + nokogiri (~> 1.3) + +PLATFORMS + ruby + +DEPENDENCIES + capybara + jsduck + poltergeist + rspec + selenium-webdriver diff --git a/LICENSE.md b/LICENSE.md index 3562e7f6..f279c3c0 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2012 Max Carlson +Copyright (c) 2014 Teem2 LLC Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 9e52e0e4..d6e54af6 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,126 @@ -rheses +dreem ====== +getting started with dreem +-------------------------- +It is quick and easy to get started writing your dreem application. After cloning the project, you will need to serve the dreem files through a web server to satisfy the browser's same-origin policy. SimpleHTTPServer is a quick and easy option to get started. From within the dreem root directory just run: + python -m SimpleHTTPServer + +This will turn that directory into a webserver and allow you to run any of the example files on localhost, such as [http://localhost:8000/data.html]() + +That's all you need to do to get set up to build a dreem application. There are many sample files in the root directory that you can reference to get familiar with the language. You will also want to build the API documentation to run on your machine as it is currently not hosted anywhere on the web. This is a simple process, and instructions are included below. + +You can put your dreem files right in the root dreem directory or a subdirectory to get started. However, if you want to keep your files in source control its helpful to keep them separate from the dreem git repo. You can easily do so by creating a softlink in the dreem directory that points to a separate directory located elsewhere in your machine. For example, if your dreem installation is located at ~/dev/dreem, and you want to keep your dreem application in ~/dev/mydreemapp, then within ~/dev/dreem run: + + ln -s ~/dev/mydreemapp ./mydreemapp + +Now you can access your files at http://localhost:8000/mydreemapp/ + +installing the sublime plugin +----------------------------- + +For Sublime Text, use the preferences -> browse packages menu, back out a folder and browse to 'Installed Packages', then copy /tools/Dreem.sublime-package there. building -------- +This is only required when editing the coffeescript core. +Make sure coffescript is installed - coffee -j layout.js -mo ./ -cw *.coffee + npm install -g coffee-script + +And run + coffee -mo ./ -cw *.coffee + +building the documentation +-------------------------- -running --------- +The API docs are built with [https://github.com/senchalabs/jsduck](). Install jsduck as a ruby gem using bundler by running - python -m SimpleHTTPServer + gem install bundler + bundle install + +If you are using rvm or similar your gems will be installed in a gemset called 'dreem'. + +With jsduck installed run: + + ./bin/builddocs + +running smoke tests +-------------------------- + +The smoke tests docs are run with [http://phantomjs.org/](), so you'll need to install it. Next, run: + + phantomjs ./bin/phantomrunner.js + +If you get RESOURCE ERROR messages, try specifying a different timeout argument. The smaller the number, the faster the tests will run: + + phantomjs ./bin/phantomrunner.js 100 + +Finally, you may get better performance if you utilize phantom's disk cache: + + phantomjs ./bin/phantomrunner.js 100 --disk-cache -and visit [http://localhost:8000/data.html]() +running the component tests +-------------------------- + +The components are tested with rspec and capybara. You will need to install the required gems to run them. If you haven't already: + + gem install bundler + bundle install + +Now to run the specs run + + rspec + +If you see an error like: + + Gem::Ext::BuildError: ERROR: Failed to build gem native extension. + + ruby extconf.rb + Command 'qmake -spec macx-g++ ' not available + + Makefile not found + + Gem files will remain installed in /Users/maxcarlson/.rvm/gems/ruby-2.0.0-p481@dreem/gems/capybara-webkit-1.3.0 for inspection. + Results logged to /Users/maxcarlson/.rvm/gems/ruby-2.0.0-p481@dreem/extensions/x86_64-darwin-13/2.0.0-static/capybara-webkit-1.3.0/gem_make.out + + An error occurred while installing capybara-webkit (1.3.0), and Bundler cannot continue. + Make sure that `gem install capybara-webkit -v '1.3.0'` succeeds before bundling. + +Per [http://stackoverflow.com/questions/11354656/error-error-error-installing-capybara-webkit]() if you are in Ubuntu: + + sudo apt-get install qt4-dev-tools libqt4-dev libqt4-core libqt4-gui + +If you are on Mac + + brew install qt + +Then run this again: + + bundle install + +Windows users: capybara-webkit can only install on a 32-bit version of Windows. See [https://github.com/thoughtbot/capybara-webkit#windows-support]() + + diff --git a/bin/builddocs b/bin/builddocs new file mode 100755 index 00000000..75310e91 --- /dev/null +++ b/bin/builddocs @@ -0,0 +1,6 @@ +git reset ./docs/api/ +rm -rf docs/api/ +./docs/lib/config.rb +coffee -mo ./ -c *.coffee +node ./bin/finddoccomments.js > ./classdocs.js +jsduck layout.js classdocs.js --tags ./docs/lib/custom_tags.rb --guides=./docs/guides.json --categories=./docs/categories.json --output=./docs/api/ --eg-iframe=jsduck_iframe.html --title="Dreem API documentation" --footer="Copyright (c) 2014 Teem2 LLC" diff --git a/bin/buildminify b/bin/buildminify new file mode 100755 index 00000000..a2865ebb --- /dev/null +++ b/bin/buildminify @@ -0,0 +1 @@ +./bin/node_modules/uglify-js/bin/uglifyjs layout.js --source-map layout.min.js.map > layout.min.js \ No newline at end of file diff --git a/bin/expected.txt b/bin/expected.txt new file mode 100644 index 00000000..898e454b --- /dev/null +++ b/bin/expected.txt @@ -0,0 +1,5 @@ +Unrecognized class goodbye +attribute.value must be defined on inside + + +Invalid type 'text' for attribute 'something', must be one of: number, boolean, string, json, expression \ No newline at end of file diff --git a/bin/finddoccomments.js b/bin/finddoccomments.js new file mode 100644 index 00000000..f84fd6a8 --- /dev/null +++ b/bin/finddoccomments.js @@ -0,0 +1,47 @@ +/* +The MIT License (MIT) + +Copyright ( c ) 2014 Teem2 LLC + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +*/ + +var fs = require('fs'); + +var basepath = "./classes/" + +var regex = /\/\*\*([\S\s]*?)\*\//mg + +fs.readdir(basepath,function(err,files){ + if(err) throw err; + files.forEach(function(file){ + if (file.indexOf('.dre') == -1) return + // console.log(basepath + file) + var data = fs.readFileSync(basepath + file, {encoding: 'utf-8'}); + var matches = data.toString().match(regex); + + if (matches) { + matches.forEach(function(match){ + match = match.replace('', ''); + console.log(match) + }); + } + }); +}); \ No newline at end of file diff --git a/bin/findrequired.js b/bin/findrequired.js new file mode 100644 index 00000000..d34cfc1b --- /dev/null +++ b/bin/findrequired.js @@ -0,0 +1,55 @@ +/* +The MIT License (MIT) + +Copyright ( c ) 2014 Teem2 LLC + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +*/ + +var fs = require('fs'); +var jpath = require('json-path'); + +var basepath = "./docs/api/" + +var regex = /{(.*)}/g + +fs.readdir(basepath, function(err, files) { + if (err) throw err; + files.forEach(function(file) { + if (file.indexOf('data-') !== 0) return; + // console.log(basepath + file) + var filecontents = fs.readFileSync(basepath + file, { + encoding: 'utf-8' + }); + var matches = filecontents.toString().match(regex); + var data = JSON.parse(matches[0]); + + var res = jpath.executeSelectors(data, jpath.parseSelector("/data/search[*]")); + var out = {} + res.forEach(function(d, i) { + if (!d.meta.required) + return; + classAndName = d.fullName.substring(3).split('.') + if (! out[classAndName[0]]) + out[classAndName[0]] = {}; + out[classAndName[0]][classAndName[1]] = 1; + }) + console.log(JSON.stringify(out)); + }); +}); \ No newline at end of file diff --git a/bin/node_modules/.bin/uglifyjs b/bin/node_modules/.bin/uglifyjs new file mode 120000 index 00000000..fef3468b --- /dev/null +++ b/bin/node_modules/.bin/uglifyjs @@ -0,0 +1 @@ +../uglify-js/bin/uglifyjs \ No newline at end of file diff --git a/bin/node_modules/json-path/.npmignore b/bin/node_modules/json-path/.npmignore new file mode 100644 index 00000000..4fab4df2 --- /dev/null +++ b/bin/node_modules/json-path/.npmignore @@ -0,0 +1 @@ +component.json \ No newline at end of file diff --git a/bin/node_modules/json-path/.travis.yml b/bin/node_modules/json-path/.travis.yml new file mode 100644 index 00000000..9c700cee --- /dev/null +++ b/bin/node_modules/json-path/.travis.yml @@ -0,0 +1,12 @@ +language: node_js +branches: + only: + - master +node_js: + - "0.10" + - "0.9" + - "0.8" + +notifications: + email: + - phillip@flitbit.com \ No newline at end of file diff --git a/bin/node_modules/json-path/README.md b/bin/node_modules/json-path/README.md new file mode 100644 index 00000000..15b07335 --- /dev/null +++ b/bin/node_modules/json-path/README.md @@ -0,0 +1,207 @@ +json-path (alpha) [![Build Status](https://travis-ci.org/flitbit/json-path.png)](http://travis-ci.org/flitbit/json-path) +========= + +JSON-Path utility (XPath for JSON) for nodejs and modern browsers. + +You may be looking for the prior work [found here](http://goessner.net/articles/JsonPath/). This implementation is a new JSON-Path syntax building on [JSON Pointer (RFC 6901)](http://tools.ietf.org/html/rfc6901) in order to ensure that any valid JSON pointer is also valid JSON-Path. + +**Warning:** This is a work in progress - I am actively adding selection expressions and have yet to optimize, but as I use it in a few other projects I went ahead and made it available via `npm`. Until I take the **alpha** tag off you should look to the examples and test to understand the selection path syntax. + +## Example + +[flikr-example-2.js](https://github.com/flitbit/json-path/blob/master/examples/flikr-example-2.js) +```javascript +var jpath = require('json-path') +, http = require('http') +, util = require('util') +; + +var feed = "http://api.flickr.com/services/feeds/photos_public.gne?tags=beach,pipeline&tagmode=all&format=json&jsoncallback=processResponse" +; + +function processResponse(json) { + var res = jpath.resolve(json, "#/items[first(3)]take(/title,/author,media=/media/m)") + console.log( util.inspect(res, false, 5) ); +} + +http.get(feed, function(res) { + console.log("Got response: " + res.statusCode); + + var data = ''; + + res.on('data', function (chunk){ + data += chunk; + }); + + res.on('end',function(){ + // result is formatted as jsonp... this is for illustration only. + eval(data); + }) +}).on('error', function(e) { + console.log("Got error: " + e.message); +}); +``` + +## Installation + +[node.js](http://nodejs.org) +```bash +$ npm install json-path +``` + +## Basics + +JSON-Path takes a specially formatted *path* statement and applies it to an object graph in order to *select* results. The results are returned as an array of data that matches the path. + +Most paths start out looking like a JSON Pointer... + +```javascript +// From: http://goessner.net/articles/JsonPath/ +var data = { + store: { + book: [ + { category: "reference", + author: "Nigel Rees", + title: "Sayings of the Century", + price: 8.95 + }, + { category: "fiction", + author: "Evelyn Waugh", + title: "Sword of Honour", + price: 12.99 + }, + { category: "fiction", + author: "Herman Melville", + title: "Moby Dick", + isbn: "0-553-21311-3", + price: 8.99 + }, + { category: "fiction", + author: "J. R. R. Tolkien", + title: "The Lord of the Rings", + isbn: "0-395-19395-8", + price: 22.99 + } + ], + bicycle: { + color: "red", + price: 19.95 + } + } +}; +``` + +The pointer `/store/book/0` refers to the first book in the array of books (the one by Nigen Rees). + +**Differentiator** + +The thing that makes JSON-Path different from JSON-Pointer is that you can do more than reference a single point in a structure. Instead, you are able to `select` many pieces of data out of a structure, such as: + +`/store/book[*]/price` +```javascript +[8.95, 12.99, 8.99, 22.99] +``` + +In the preceding example, the path `/store/book[*]/price` has three distinct statements: + +Statement | Meaning +--- | --- +`/store/book` | Get the book property from store. This is similar to `data.store.book` in javascript. +`*` | Select any element (or property). +`/price` | Select the price property. + +Starting with the original data, each statement refines the data, usually by selecting parts. As each statement is processed, it is given the results from the previous statement and may make further selections, until the final selections are returned to the caller. It works something like map-reduce; or if you like, something like list-comprehensions. + +**Distinguishing Statements** + +Statements are distinguished from one another using the square-brackets `[` and `]`. In many cases, the parser can infer where one statement ends and another begins, such as in the preceding example `/store/book[*]/price`. However, the parser understands the equivelant, fully specified path `[/store/book][*][/price]`. + +Paths can have as many distinct statements as you need to select just the right data. Since it extends JSON-Pointer, you must take care when your path contains square-brackets as part of property names such as the following contrived example: + +```javascript +var data = { + 'my[': { + contrived: { + 'example]': { should: "mess with", your: "noodel" } } } +}; +``` + +In this data, the property names `my[` and `example]` are valid but would cuase ambiguities for either the parser or the processing of statements. In these cases, you must use the URI fragment identifier representation described in [RFC 6901 Section 6](http://tools.ietf.org/html/rfc6901#section-6). For instance, to access `data['my['].contrived['example]'].your` you would need the path `#/my%5B/contrived/example%5D/your`. + +### More Power + +JSON-Path becomes more powerful with a few additional types of statements: + +Statement | Meaning +--- | --- +`..` | Makes an exhaustive descent, executing the next statement against each branch of the object-graph. +`take(s0,s1,...)` | Takes one or more items from the structure, each specified as a [JSON Pointer](http://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-09). +`@` | Uses the user-supplied function to select or filter data. + +Consider the following examples using the same preceding data: + +Path | Result +--- | --- +`/store[..]/price` | Selects all prices, from books and the bicycle. +`../isbn` | Selects all ISBN numbers, wherever they are in the structure. +`/store/book[*]take(/author,/title)` | Selects author and title from each book. +`/store/book[*][@]` | Selects all books, providing each to the user-supplied selection method. + +**User Supplied Selection Methods** + +JSON-Path supports the use of user-supplied selections - which will need to fill in until the expression syntax is completed. Mindful of the preceding data, consider the following code: + +```javascript +var jpath = require('json-path') +, expect = require('expect.js') +, data = require('./example-data') + +var p = jpath.create("#/store/book[*][@]"); + +var res = p.resolve(data, function(obj, accum) { + if (typeof obj.price === 'number' && obj.price < 10) + accum.push(obj); + return accum; +}); + +// Expect the result to have the two books priced under $10... +expect(res).to.contain(data["store"]["book"][0]); +expect(res).to.contain(data["store"]["book"][2]); +expect(res).to.have.length(2); + +``` + +The example above illustrates user-defined selection given to `resolve` used in place of the `@`. + +To use more than one user-defined selections, refer to selection functions by name and provide implementations when resolving the path: + +```javascript +var jpath = require('json-path') +, expect = require('expect.js') +, data = require('./example-data') + +var p = jpath.create("#/store/book[*][@lt10][@format]"); + +var res = p.resolve(data, { + + lt10: function(obj, accum) { + if (typeof obj.price === 'number' && obj.price < 10) + accum.push(obj); + return accum; + }, + + format: function(obj, accum) { + accum.push(obj.title.concat( + ": $", obj.price + )); + return accum; + } + +}); + +// Expect the result to have formatted strings for +// the twb books priced under $10... +expect(res).to.contain("Sayings of the Century: $8.95"); +expect(res).to.contain("Moby Dick: $8.99"); +expect(res).to.have.length(2); +``` diff --git a/bin/node_modules/json-path/examples/example-data.json b/bin/node_modules/json-path/examples/example-data.json new file mode 100644 index 00000000..f3fcb77c --- /dev/null +++ b/bin/node_modules/json-path/examples/example-data.json @@ -0,0 +1,32 @@ +{ + "store": { + "book": [ + { "category": "reference", + "author": "Nigel Rees", + "title": "Sayings of the Century", + "price": 8.95 + }, + { "category": "fiction", + "author": "Evelyn Waugh", + "title": "Sword of Honour", + "price": 12.99 + }, + { "category": "fiction", + "author": "Herman Melville", + "title": "Moby Dick", + "isbn": "0-553-21311-3", + "price": 8.99 + }, + { "category": "fiction", + "author": "J. R. R. Tolkien", + "title": "The Lord of the Rings", + "isbn": "0-395-19395-8", + "price": 22.99 + } + ], + "bicycle": { + "color": "red", + "price": 19.95 + } + } +} \ No newline at end of file diff --git a/bin/node_modules/json-path/examples/flikr-example-2.js b/bin/node_modules/json-path/examples/flikr-example-2.js new file mode 100644 index 00000000..c386fffa --- /dev/null +++ b/bin/node_modules/json-path/examples/flikr-example-2.js @@ -0,0 +1,29 @@ +var jpath = require('..') +, http = require('http') +, util = require('util') +; + +var feed = "http://api.flickr.com/services/feeds/photos_public.gne?tags=beach,pipeline&tagmode=all&format=json&jsoncallback=processResponse" +; + +function processResponse(json) { + var res = jpath.resolve(json, "#/items[first(3)]take(/title,/author,media=/media/m)") + console.log( util.inspect(res, false, 5) ); +} + +http.get(feed, function(res) { + console.log("Got response: " + res.statusCode); + + var data = ''; + + res.on('data', function (chunk){ + data += chunk; + }); + + res.on('end',function(){ + // result is formatted as jsonp... this is for illustration only. + eval(data); + }) +}).on('error', function(e) { + console.log("Got error: " + e.message); +}); \ No newline at end of file diff --git a/bin/node_modules/json-path/examples/flikr-example.js b/bin/node_modules/json-path/examples/flikr-example.js new file mode 100644 index 00000000..ac39bda6 --- /dev/null +++ b/bin/node_modules/json-path/examples/flikr-example.js @@ -0,0 +1,38 @@ +var jpath = require('..') +, http = require('http') +, util = require('util') +; + +var feed = "http://api.flickr.com/services/feeds/photos_public.gne?tags=surf,pipeline&tagmode=all&format=json&jsoncallback=processResponse" +; + +function processResponse(json) { + var p = jpath.create("#/items[first(3)][@]") + var res = p.resolve(json, function(obj, accum) { + accum.push({ + title: obj.title, + author: obj.author, + media: obj.media.m + }); + return accum; + }); + + console.log( util.inspect(res, false, 5) ); +} + +http.get(feed, function(res) { + console.log("Got response: " + res.statusCode); + + var data = ''; + + res.on('data', function (chunk){ + data += chunk; + }); + + res.on('end',function(){ + // result is formatted as jsonp... this is for illustration only. + eval(data); + }) +}).on('error', function(e) { + console.log("Got error: " + e.message); +}); diff --git a/bin/node_modules/json-path/examples/json-path-example.js b/bin/node_modules/json-path/examples/json-path-example.js new file mode 100644 index 00000000..4c69b190 --- /dev/null +++ b/bin/node_modules/json-path/examples/json-path-example.js @@ -0,0 +1,184 @@ +var expect = require('expect.js'), +util = require('util'), +jpath = require('..') +; + +// From: http://goessner.net/articles/JsonPath/ +var data = { + store: { + book: [ + { category: "reference", + author: "Nigel Rees", + title: "Sayings of the Century", + price: 8.95 + }, + { category: "fiction", + author: "Evelyn Waugh", + title: "Sword of Honour", + price: 12.99 + }, + { category: "fiction", + author: "Herman Melville", + title: "Moby Dick", + isbn: "0-553-21311-3", + price: 8.99 + }, + { category: "fiction", + author: "J. R. R. Tolkien", + title: "The Lord of the Rings", + isbn: "0-395-19395-8", + price: 22.99 + } + ], + bicycle: { + color: "red", + price: 19.95 + } + } +}; + +// jpath preamble is $ +// -- path segments are interpreted the same as JSON Pointer, +// with selector instructions in square brackets []. + +// select the root object: +var p = jpath.create("#"); +var res = p.resolve(data); +expect(res).to.contain(data); + + +// select the authors of all books: +p = jpath.parseSelector("#/store/book[*][#/author]"); +res = jpath.executeSelectors(data, p); +expect(res).to.contain('Evelyn Waugh'); +expect(res).to.contain('Nigel Rees'); +expect(res).to.contain('Herman Melville'); +expect(res).to.contain('J. R. R. Tolkien'); + +// select all authors: +p = jpath.parseSelector("[..#/author]"); +res = jpath.executeSelectors(data, p); +expect(res).to.contain('Evelyn Waugh'); +expect(res).to.contain('Nigel Rees'); +expect(res).to.contain('Herman Melville'); +expect(res).to.contain('J. R. R. Tolkien'); + +// select all things in store +p = jpath.parseSelector("#/store[*]"); +res = jpath.executeSelectors(data, p); +expect(res).to.contain(data.store.book); +expect(res).to.contain(data.store.bicycle); + +// resolved.should.eql(data); + +// select the price of everything in the store +p = jpath.parseSelector("#/store[..#/price]"); +res = jpath.executeSelectors(data, p); +expect(res).to.contain(8.95); +expect(res).to.contain(12.99); +expect(res).to.contain(8.99); +expect(res).to.contain(22.99); +expect(res).to.contain(19.95); + + +// select the third book +p = jpath.parseSelector("[..#/book/2]"); +res = jpath.executeSelectors(data, p); +expect(res).to.contain(data.store.book[2]); + +p = jpath.parseSelector("[..#/book[2]]"); +res = jpath.executeSelectors(data, p); +expect(res).to.contain(data.store.book[2]); + +// select the last book +p = jpath.parseSelector("[..#/book[last]]"); +res = jpath.executeSelectors(data, p); +expect(res).to.contain(data.store.book[3]); + +// select the first two books +p = jpath.parseSelector("[..#/book[0,1]]"); +res = jpath.executeSelectors(data, p); +expect(res).to.contain(data.store.book[0]); +expect(res).to.contain(data.store.book[1]); + +// select books without an isbn +p = jpath.parseSelector("[..#/book[*][#/isbn]]"); +res = jpath.executeSelectors(data, p); + +// select author and title from any book +p = jpath.parseSelector("..#/book[*][take(/author,/title)]"); +res = jpath.executeSelectors(data, p); +expect(res[0]).to.eql({ + author: "Nigel Rees", + title: "Sayings of the Century" +}); +expect(res[1]).to.eql({ + author: "Evelyn Waugh", + title: "Sword of Honour" +}); +expect(res[2]).to.eql({ + author: "Herman Melville", + title: "Moby Dick" +}); +expect(res[3]).to.eql({ + author: "J. R. R. Tolkien", + title: "The Lord of the Rings" +}); + +// select title and price as cost from any book +p = jpath.parseSelector("..#/book[*][take(/title,cost=/price)]"); +res = jpath.executeSelectors(data, p); +expect(res[0]).to.eql({ + title: "Sayings of the Century", + cost: 8.95 +}); +expect(res[1]).to.eql({ + title: "Sword of Honour", + cost: 12.99 +}); +expect(res[2]).to.eql({ + title: "Moby Dick", + cost: 8.99 +}); +expect(res[3]).to.eql({ + title: "The Lord of the Rings", + cost: 22.99 +}); + +// select books priced more than 10 via a selector fn +// p = jpath.parseSelector("[..#/book[*][!{#/price < 10 || !exists(#/author)}][@myfn]]"); +p = jpath.parseSelector("[..#/book[*][@myfn]]"); +res = jpath.executeSelectors(data, p, { + myfn: function(obj, accum, sel) { + if (obj.price && obj.price < 10) + accum.push(obj); + return accum; + } +}); +expect(res).to.contain(data.store.book[0]); +expect(res).to.contain(data.store.book[2]); + +p = jpath.create("[..#/book[*][@myfn][#/category]]"); +res = p.resolve(data, { + myfn: function(obj, accum, sel) { + if (obj.price && obj.price < 10) + accum.push(obj); + return accum; + } +}); +expect(res).to.contain(data.store.book[0].category); +expect(res).to.contain(data.store.book[2].category); + +p = jpath.resolve(data, '/store/book[first(2)]'); + +p = jpath.create("#/store/book[*][@]"); +var res = p.resolve(data, function(obj, accum, sel) { + if (obj.price && obj.price < 10) + accum.push(obj); + return accum; +}); +expect(res).to.contain(data["store"]["book"][0]); +expect(res).to.contain(data["store"]["book"][2]); +expect(res).to.have.length(2); + +// p = jpath.parseSelector("[..#/book[*][{#/price >= 10}]]"); diff --git a/bin/node_modules/json-path/examples/readme-snippet-0.js b/bin/node_modules/json-path/examples/readme-snippet-0.js new file mode 100644 index 00000000..2dc0b1ad --- /dev/null +++ b/bin/node_modules/json-path/examples/readme-snippet-0.js @@ -0,0 +1,16 @@ +var jpath = require('..') +, expect = require('expect.js') +, data = require('./example-data') + +var p = jpath.create("#/store/book[*][@]"); + +var res = p.resolve(data, function(obj, accum) { + if (typeof obj.price === 'number' && obj.price < 10) + accum.push(obj); + return accum; +}); + +// Expect the result to have the two books priced under $10... +expect(res).to.contain(data["store"]["book"][0]); +expect(res).to.contain(data["store"]["book"][2]); +expect(res).to.have.length(2); diff --git a/bin/node_modules/json-path/examples/readme-snippet-1.js b/bin/node_modules/json-path/examples/readme-snippet-1.js new file mode 100644 index 00000000..db3089ab --- /dev/null +++ b/bin/node_modules/json-path/examples/readme-snippet-1.js @@ -0,0 +1,28 @@ +var jpath = require('..') +, expect = require('expect.js') +, data = require('./example-data') + +var p = jpath.create("#/store/book[*][@lt10][@format]"); + +var res = p.resolve(data, { + + lt10: function(obj, accum) { + if (typeof obj.price === 'number' && obj.price < 10) + accum.push(obj); + return accum; + }, + + format: function(obj, accum) { + accum.push(obj.title.concat( + ": $", obj.price + )); + return accum; + } + +}); + +// Expect the result to have formatted strings for +// the twb books priced under $10... +expect(res).to.contain("Sayings of the Century: $8.95"); +expect(res).to.contain("Moby Dick: $8.99"); +expect(res).to.have.length(2); diff --git a/bin/node_modules/json-path/examples/various-json-pointers.js b/bin/node_modules/json-path/examples/various-json-pointers.js new file mode 100644 index 00000000..23e3da1a --- /dev/null +++ b/bin/node_modules/json-path/examples/various-json-pointers.js @@ -0,0 +1,118 @@ +var expect = require('expect.js'), +jpath = require('..') +; + +var obj = { + a: 1, + b: { + c: 2 + }, + d: { + e: [{a:3}, {b:4}, {c:5}] + } +}; + +// JSON Pointers (as strings) + +var n = -1 +, ub = 1000 +, start = process.hrtime(); + + +while(++n < ub) { + + expect(jpath.resolve(obj, "/a")).to.contain(1); + expect(jpath.resolve(obj, "/b/c")).to.contain(2); + expect(jpath.resolve(obj, "/d/e/0/a")).to.contain(3); + expect(jpath.resolve(obj, "/d/e/1/b")).to.contain(4); + expect(jpath.resolve(obj, "/d/e/2/c")).to.contain(5); + + expect(jpath.resolve(obj, "")).to.contain(obj); +} + +// JSON Pointers (as URI fragments) +ub = ub * 2; +n--; +while(++n < ub) { + + expect(jpath.resolve(obj, "#/a")).to.contain(1); + expect(jpath.resolve(obj, "#/b/c")).to.contain(2); + expect(jpath.resolve(obj, "#/d/e/0/a")).to.contain(3); + expect(jpath.resolve(obj, "#/d/e/1/b")).to.contain(4); + expect(jpath.resolve(obj, "#/d/e/2/c")).to.contain(5); + + expect(jpath.resolve(obj, "#")).to.contain(obj); +} + +var complexKeys = { + "a/b": { + c: 1 + }, + d: { + "e/f": 2 + }, + "~1": 3, + "01": 4 +} + +expect(jpath.resolve(complexKeys, "/a~1b/c")).to.contain(1); +expect(jpath.resolve(complexKeys, "/d/e~1f")).to.contain(2); +expect(jpath.resolve(complexKeys, "/~01")).to.contain(3); +expect(jpath.resolve(complexKeys, "/01")).to.contain(4); +expect(jpath.resolve(complexKeys, "/a/b/c")).to.be.empty(); +expect(jpath.resolve(complexKeys, "/~1")).to.be.empty(); + +// draft-ietf-appsawg-json-pointer-08 has special array rules +var ary = [ "zero", "one", "two" ]; +expect(jpath.resolve(ary, "/01")).to.be.empty(); + +// Examples from the draft: +var example = { + "foo": ["bar", "baz"], + "": 0, + "a/b": 1, + "c%d": 2, + "e^f": 3, + "g|h": 4, + "i\\j": 5, + "k\"l": 6, + " ": 7, + "m~n": 8 +}; + +var p = jpath.create('#/foo'); +expect(p.resolve(example)).to.contain(example["foo"]); + +expect(jpath.resolve(example, "")).to.contain(example); +var ans = jpath.resolve(example, "/foo"); +expect(ans.length).to.be(1); +expect(ans[0][0]).to.contain("bar"); +expect(ans[0][1]).to.contain("baz"); +expect(jpath.resolve(example, "/foo/0")).to.contain("bar"); +expect(jpath.resolve(example, "/")).to.contain(0); +expect(jpath.resolve(example, "/a~1b")).to.contain(1); +expect(jpath.resolve(example, "/c%d")).to.contain(2); +expect(jpath.resolve(example, "/e^f")).to.contain(3); +expect(jpath.resolve(example, "/g|h")).to.contain(4); +expect(jpath.resolve(example, "/i\\j")).to.contain(5); +expect(jpath.resolve(example, "/k\"l")).to.contain(6); +expect(jpath.resolve(example, "/ ")).to.contain(7); +expect(jpath.resolve(example, "/m~0n")).to.contain(8); + +expect(jpath.resolve(example, "#")).to.contain(example); +var ans = jpath.resolve(example, "#/foo"); +expect(ans.length).to.be(1); +expect(ans[0][0]).to.contain("bar"); +expect(ans[0][1]).to.contain("baz"); +expect(jpath.resolve(example, "#/foo/0")).to.contain("bar"); +expect(jpath.resolve(example, "#/")).to.contain(0); +expect(jpath.resolve(example, "#/a~1b")).to.contain(1); +expect(jpath.resolve(example, "#/c%25d")).to.contain(2); +expect(jpath.resolve(example, "#/e%5Ef")).to.contain(3); +expect(jpath.resolve(example, "#/g%7Ch")).to.contain(4); +expect(jpath.resolve(example, "#/i%5Cj")).to.contain(5); +expect(jpath.resolve(example, "#/k%22l")).to.contain(6); +expect(jpath.resolve(example, "#/%20")).to.contain(7); +expect(jpath.resolve(example, "#/m~0n")).to.contain(8); + +console.log("All tests pass."); \ No newline at end of file diff --git a/bin/node_modules/json-path/index.js b/bin/node_modules/json-path/index.js new file mode 100644 index 00000000..748e4490 --- /dev/null +++ b/bin/node_modules/json-path/index.js @@ -0,0 +1,631 @@ +/*jshint laxcomma: true*/ +/*global global, window, JsonPointer*/ + +(function (ptr) { + 'use strict'; + + var $scope + , conflict + , conflictResolution = [] + ; + if (typeof global === 'object' && global) { + $scope = global; + conflict = global.JsonPath; + } else if (typeof window !== 'undefined') { + $scope = window; + conflict = window.JsonPath; + } else { + $scope = {}; + } + if (conflict) { + conflictResolution.push( + function () { + if ($scope.JsonPath === JsonPath) { + $scope.JsonPath = conflict; + conflict = null; + } + }); + } + + if (ptr) { + conflictResolution.push( + function (conflictPtr) { + if (conflictPtr) { ptr = conflictPtr; } + }); + } else if (!ptr) { + if (typeof $scope.JsonPointer !== 'undefined') { + ptr = $scope.JsonPointer; + conflictResolution.push( + function (conflictPtr) { + if (conflictPtr) { ptr = conflictPtr; } + }); + } else if (typeof require === 'function') { + ptr = require('json-ptr'); + } else { + throw new Error('Missing JsonPointer (https://github.com/flitbit/json-ptr).'); + } + } + + function dbc(requirements, description) { + requirements = (Array.isArray(requirements)) ? requirements : [requirements]; + var i, disposition; + for (i = 0; i < requirements.length; i++) { + var req = requirements[i]; + disposition = (typeof req === 'function') ? req() : (req); + if (!disposition) { + description = description || 'Failed contract requirement:'.concat(req); + throw new Error((typeof description === 'function') ? description() : description); + } + } + } + + function seekAny(source, cursor, chars) { + chars = (Array.isArray(chars)) ? chars : [chars]; + var i = cursor + , j + , len = source.length + , clen = chars.length; + while (++i < len) { + j = -1; + while (++j < clen) { + if (source[i] === chars[j]) { + return i; + } + } + } + return -1; + } + + function expectSequence(source, cursor, end, sequence) { + var c = cursor - 1 + , i = -1 + , seqlen = sequence.length + ; + if (end - cursor < seqlen) { + throw new Error("Expected `" + .concat(sequence, "` beginning at character ", cursor, ".")); + } + while (++c < end && ++i < seqlen) { + if (source[c] !== sequence[i]) { + throw new Error("Unexpected character at position " + .concat(c, " expected `", sequence, "` beginning at position ", cursor, ".")); + } + } + } + + function expectMatchingClose(source, cursor, closeCh) { + var openCh = source[cursor] + , i = cursor + , len = source.length + , stack = [] + ; + stack.push(cursor); + while (++i < len) { + if (source[i] === openCh) {stack.push(cursor); + } else if (source[i] === closeCh) { + stack.pop(); + if (stack.length === 0) { + break; + } + } + } + if (stack.length) { + throw new Error( + 'Expected `'.concat(source[0], '` to have a matching `', closeCh, '`.') + ); + } + return i; + } + + function fromJsonPointer(source, state) { + var cursor = state.cursor + , selectors = state.result + , len = source.length + , end = seekAny(source, cursor, [']', '[']); + if (end < cursor) { + end = len; + } + var p = ptr.create(source.substring(cursor, end)); + selectors.push(function (obj, accum) { + accum = accum || []; + var it = p.get(obj); + if (typeof it !== 'undefined') { + accum.push(it); + } + return accum; + }); + state.cursor = end - 1; + } + + function expect(source, state, expected) { + expectSequence(source, state.cursor, source.length, expected); + } + + function pipedSelect(datum, steps, fn) { + var s = -1 + , data = Array.isArray(datum) ? datum : [datum] + , slen = steps.length + , accum + , i + , len + ; + while (++s < slen && data.length) { + i = -1; + len = data.length; + accum = []; + while (++i < len) { + accum = steps[s](data[i], accum, fn); + } + data = accum; + } + return data; + } + + function descent(obj, steps, accum, fn) { + accum = accum || []; + var i = -1 + , keys + , len + , data + ; + if (typeof obj === 'object' && obj !== null) { + data = pipedSelect(obj, steps, fn); + if (data.length) { + accum = accum.concat(data); + } + if (!Array.isArray(obj)) { + keys = Object.keys(obj); + len = keys.length; + while (++i < len) { + accum = descent(obj[keys[i]], steps, accum, fn); + } + } + } + return accum; + } + + function prepareExhaustiveDescent(source, state) { + var res = state.result + , lift = []; + state.result = lift; + res.push(function (obj, _, fn) { + return descent(obj, lift, _, fn); + }); + performParse(source, state); + state.result = res; + } + + function selectAny(obj, accum) { + accum = accum || []; + if (typeof obj === 'object' && obj !== null) { + if (Array.isArray(obj)) { + accum = accum.concat(obj); + } else { + var i = -1 + , keys = Object.keys(obj) + , len = keys.length; + while (++i < len) { + accum.push(obj[keys[i]]); + } + } + } + return accum; + } + + function compilePredicate(expression, invert, offset) { + var i = -1 + , len = expression.length + , ch + , variables = {} + , la + , v + , infix = [] + ; + while (++i < len) { + ch = expression[i]; + dbc([false], 'Expressions are not implemented in this version.'); + switch (ch) { + case '#': { + la = expression.indexOf(' ', i); + if (la < i) { + la = len; + } + v = expression.substring(i, la); + if (!variables[v]) { + variables[v] = ptr.create(v); + } + infix.push({kind: 'v', ref: variables[v]}); + i = la; + break; + } + } + } + } + + function preparePredicate(source, state) { + var invert = source[state.cursor] === '!'; + if (invert) { + state.cursor ++; + } + expect(source, state, '{'); + var end = expectMatchingClose(source, state.cursor, '}') + , expression = source.substring(state.cursor + 1, end) + ; + state.result.push(compilePredicate(expression, invert, state.offset)); + state.cursor = end; + } + + function parseUserSelector(source, state) { + var cursor = state.cursor + , selectors = state.result + , len = source.length + , end = source.indexOf(']', cursor); + if (end < cursor) { + end = len; + } + var n = source.substring(cursor, end); + state.result.push(function (data, accum, sel) { + var target; + if (data) { + if (n.length === 0 && typeof sel === 'function') { + target = sel; + } else if (typeof sel === 'object' && sel) { + if (!sel[n] && sel.RESOLVER) { + target = sel.RESOLVER(n); + } else { + target = sel[n]; + } + } + if (!target) { + throw new Error("Missing user-supplied function: `" + .concat((n.length) ? n : '@', "`.")); + } + return target(data, accum, sel); + } + return accum; + }); + state.cursor = end - 1; + } + + function parseSelector(source) { + var state = { + result: [], + stack: [], + cursor: -1, + offset: 0 + }; + performParse(source, state); + return state.result; + } + + function parseTake(source, state) { + var cursor = state.cursor + , end = source.indexOf(')', cursor) + ; + expectSequence(source, cursor, end, 'take('); + cursor += 5; + var them = source.slice(cursor, end).split(',') + , i = -1 + , len = them.length + , it + ; + while (++i < len) { + it = them[i].split('='); + if (it.length === 1) { + it = ptr.create(it[0]); + it = { name: it.path[it.path.length - 1], ptr: it }; + } else if (it.length === 2) { + it = { name: it[0], ptr: ptr.create(it[1]) }; + } else { + throw new Error("Invalid `take` expression"); + } + cursor += them[i].length; + them[i] = it; + } + state.result.push(function (obj, accum) { + accum = accum || []; + var it = {} + , i = -1 + , len = them.length + ; + while (++i < len) { + it[them[i].name] = them[i].ptr.get(obj); + } + accum.push(it); + return accum; + }); + state.cursor = end; + } + + function expectInteger(source, cursor, end) { + var c = cursor; + while (source[c] >= '0' && source[c] <= '9') { c = c + 1; } + if (c === cursor) { + throw new Error('Expected an integer at position ' + .concat(c, '.')); + } + return c - cursor; + } + + function parseArrayVerb(source, cursor, end, verb, thems) { + var index = 1 + , len + ; + expectSequence(source, cursor, end, verb); + cursor += (verb.length - 1); + if (source[cursor + 1] === '(') { + cursor += 2; + len = expectInteger(source, cursor, end); + index = parseInt(source.substring(cursor, cursor + len), 10); + cursor += len; + expectSequence(source, cursor, end, ')'); + ++cursor; + } + thems.push({ kind: verb[0], index: index}); + return cursor; + } + + function parseSelectByIndex(source, state) { + var cursor = state.cursor - 1 + , len = source.length + , end = source.indexOf(']', state.cursor) + , it = null + , num = null + , punct = false + , thems = [] + ; + if (end < cursor) { + end = len; + } + while (++cursor < end) { + switch (source[cursor]) { + case ' ': + if (num !== null) { + thems.push({ kind: 'i', index: parseInt(source.substring(num, cursor), 10)}); + num = null; + punct = true; + } + break; + case ',': { + if (num !== null) { + thems.push({ kind: 'i', index: parseInt(source.substring(num, cursor), 10)}); + num = null; + } + if (punct) { punct = false; } + } + break; + case '.': { + expectSequence(source, cursor, end, '..'); + if (num !== null) { + thems.push({ kind: 's', index: parseInt(source.substring(num, cursor), 10)}); + num = null; + } + cursor++; + if (punct) { punct = false; } + } + break; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': { + if (punct) { + throw new Error("Unexpected numeral at position " + .concat(cursor, " expected punctuation.")); + } + if (num === null) { + num = cursor; + } + } + break; + case 'l': { + if (punct) { + throw new Error("Unexpected numeral at position " + .concat(cursor, " expected punctuation.")); + } + cursor = parseArrayVerb(source, cursor, end, "last", thems); + } + break; + case 'f': { + if (punct) { + throw new Error("Unexpected numeral at position " + .concat(cursor, " expected punctuation.")); + } + cursor = parseArrayVerb(source, cursor, end, "first", thems); + } + break; + case 'c': { + if (punct) { + throw new Error("Unexpected numeral at position " + .concat(cursor, " expected punctuation.")); + } + cursor = parseArrayVerb(source, cursor, end, "count", thems); + break; + } + } + } + if (num !== null) { + thems.push({ kind: 'i', index: parseInt(source.substring(num, cursor), 10)}); + } + state.result.push(function (obj, accum) { + accum = accum || []; + if (Array.isArray(obj)) { + var i = -1 + , len = thems.length + , alen = obj.length + , j, last + ; + while (++i < len) { + var it = thems[i]; + switch (it.kind) { + case 'c': + accum.push(alen); + break; + case 'f': { + j = -1; + while (++j < it.index && j < alen) { + accum.push(obj[j]); + } + } + break; + case 'l': { + j = alen; + last = alen - it.index; + while (--j >= last && j > 0) { + accum.push(obj[j]); + } + } + break; + case 'i': + case 's': { + if (it.index < alen) { + accum.push(obj[it.index]); + if (it.kind === 's') { + j = it.index; + last = (++i < len) ? thems[i].index : alen - 1; + while (++j <= last) { + accum.push(obj[j]); + } + } + } + } + } + } + } + return accum; + }); + state.cursor = end - 1; + } + + function performParse(source, state) { + dbc([typeof source === "string"], "Selector must be a string."); + if (source.length === 0) { return []; } + var len = source.length + , ch + ; + + while (++state.cursor < len) { + ch = source[state.cursor]; + switch (ch) { + case '/': + case '#': { + fromJsonPointer(source, state); + } + break; + case '[': { + state.stack.push(state.cursor); + } + break; + case ']': { + if (state.stack.length) { + state.stack.pop(); + } else { + throw new Error("Unexpected `]` at cursor position ".concat(state.cursor, '.')); + } + } + break; + case '.': { + expect(source, state, '..'); + ++state.cursor; + prepareExhaustiveDescent(source, state); + } + break; + case '*': { + expect(source, state, '*]'); + state.result.push(selectAny); + } + break; + case '{': + case '!': { + preparePredicate(source, state); + } + break; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': { + parseSelectByIndex(source, state); + } + break; + case 'l': { + parseSelectByIndex(source, state); + } + break; + case 'f': { + parseSelectByIndex(source, state); + } + break; + case 'c': { + parseSelectByIndex(source, state); + } + break; + case 't': { + parseTake(source, state); + } + break; + case '@': { + state.cursor += 1; + parseUserSelector(source, state); + } + break; + default: { + throw new Error("Unexpected character at position ".concat(state.cursor, ": ", ch, ".")); + } + } + } + dbc([!state.stack.length], function () { + return "Unexpected end; unclosed scope beginning at cursor position ".concat(state.stack.pop(), '.'); + }); + } + + function executeSelectors(obj, sel, fn) { + return pipedSelect(obj, sel, fn); + } + + function JsonPath(selector) { + Object.defineProperties(this, { + selectors: { + value: parseSelector(selector), + enumerable: true + }, + resolve: { + value: function (data, fn) { + return pipedSelect(data, this.selectors, fn); + }, + enumerable: true + } + }); + } + + JsonPath.parseSelector = parseSelector; + JsonPath.executeSelectors = executeSelectors; + JsonPath.create = function (path) { return new JsonPath(path); }; + JsonPath.resolve = function (data, selector, fn) { + var path = parseSelector(selector); + return pipedSelect(data, path, fn); + }; + JsonPath.noConflict = function (conflictPtr) { + if (conflictResolution) { + conflictResolution.forEach(function (it) { it(conflictPtr); }); + conflictResolution = null; + } + return JsonPath; + }; + + if (typeof module !== 'undefined' && module && typeof exports === 'object' && exports && module.exports === exports) { + module.exports = JsonPath; // nodejs + } else { + $scope.JsonPath = JsonPath; // other... browser? + } +}(typeof JsonPointer !== 'undefined' ? JsonPointer : null)); diff --git a/bin/node_modules/json-path/node_modules/json-ptr/.npmignore b/bin/node_modules/json-path/node_modules/json-ptr/.npmignore new file mode 100644 index 00000000..4fab4df2 --- /dev/null +++ b/bin/node_modules/json-path/node_modules/json-ptr/.npmignore @@ -0,0 +1 @@ +component.json \ No newline at end of file diff --git a/bin/node_modules/json-path/node_modules/json-ptr/.travis.yml b/bin/node_modules/json-path/node_modules/json-ptr/.travis.yml new file mode 100644 index 00000000..9c700cee --- /dev/null +++ b/bin/node_modules/json-path/node_modules/json-ptr/.travis.yml @@ -0,0 +1,12 @@ +language: node_js +branches: + only: + - master +node_js: + - "0.10" + - "0.9" + - "0.8" + +notifications: + email: + - phillip@flitbit.com \ No newline at end of file diff --git a/bin/node_modules/json-path/node_modules/json-ptr/README.md b/bin/node_modules/json-path/node_modules/json-ptr/README.md new file mode 100644 index 00000000..ae805354 --- /dev/null +++ b/bin/node_modules/json-path/node_modules/json-ptr/README.md @@ -0,0 +1,133 @@ +# json-ptr [![Build Status](https://travis-ci.org/flitbit/json-ptr.png)](http://travis-ci.org/flitbit/json-ptr) + +A complete implementation of JSON Pointer (RFC 6901) for nodejs and modern browsers. + +## Installation + +[node.js](http://nodejs.org) +```bash +$ npm install json-ptr +``` + +## Tests + +Tests use [mocha](http://visionmedia.github.io/mocha/) and [expect.js](https://github.com/LearnBoost/expect.js/), so if you clone the [github repository](https://github.com/flitbit/json-ptr) you'll need to run: + +```bash +npm install +``` + +... followed by ... + +```bash +npm test +``` + +... or ... + +```bash +mocha -R spec +``` + +## Basics + +!! This document is a work in progress even though the module is considered *complete*. See the [examples of its use for more](https://github.com/flitbit/json-ptr/tree/master/examples). + +JSON Pointer provides a standardized syntax for reliably referencing data within an object's structure. + +### Importing + +**nodejs** +```javascript +var JsonPointer = require('json-ptr') +``` + +**browser** +```html + +``` + +### Working with Pointers + +Since most non-trivial code will make use of the same pointers over and over again (after all they represent the fixed points within a larger structure), with `json-ptr`you can create these pointers once and reuse them against different data items. + +```javascript +var manager = JsonPointer.create('/people/workplace/reporting/manager'); +var director = JsonPointer.create('/people/workplace/reporting/director'); +``` + +Pointers have a few simple operations: + +* `#get` - given an origin object, returns the referenced value +* `#set` - given an origin object and a value, sets the referenced value + +And a few useful properties: + +* `#pointer` - an RFC 6901 formatted JSON pointer +* `#uriFragmentIdentifier` - an RFC 6901 formatted URI fragment identifier +* `#path` - an array of property names used to descend the object graph from the origin to the referenced item + +## Example + + +This example queries the live flikr api for recent images with 'surf' and 'pipeline'. It then extracts the author and the referenced media item. + +Clone the repo and run it on the command line using `node example/example1.js` and you'll see the output. Of note: `json-ptr` will return `undefined` when any part of a pointer's path cannot be resolved, which makes this type of extraction very convenient and compact. + +[flikr example](https://github.com/flitbit/json-ptr/blob/master/examples/example1.js) +```javascript +var ptr = require('json-ptr') +, http = require('http') +, util = require('util') +; + +var feed = "http://api.flickr.com/services/feeds/photos_public.gne?tags=surf,pipeline&tagmode=all&format=json&jsoncallback=processResponse" +/* + * Set up some JSON pointers we'll use later... +*/ +, items = ptr.create("#/items") +, author = ptr.create("#/author") +, media = ptr.create("#/media/m") +; + +function extractItems(it) { + return items.get(it); +} + +function extractAuthorAndMedia(it, i) { + this.push({ + author: author.get(it), + media : media.get(it) + }); +} + +function processResponse(json) { + var items = extractItems(json) + , accum = [] + ; + + if (items && Array.isArray(items)) { + items.forEach(extractAuthorAndMedia, accum); + } + + console.log( util.inspect(accum, true, 99) ); +} + +http.get(feed, function(res) { + console.log("Got response: " + res.statusCode); + + var data = ''; + + res.on('data', function (chunk){ + data += chunk; + }); + + res.on('end',function(){ + // result is formatted as jsonp... this is for illustration only. + eval(data); + }) +}).on('error', function(e) { + console.log("Got error: " + e.message); +}); +``` + diff --git a/bin/node_modules/json-path/node_modules/json-ptr/examples/example1.js b/bin/node_modules/json-path/node_modules/json-ptr/examples/example1.js new file mode 100644 index 00000000..9ed78c81 --- /dev/null +++ b/bin/node_modules/json-path/node_modules/json-ptr/examples/example1.js @@ -0,0 +1,53 @@ +var ptr = require('..') +, http = require('http') +, util = require('util') +; + +var feed = "http://api.flickr.com/services/feeds/photos_public.gne?tags=surf,pipeline&tagmode=all&format=json&jsoncallback=processResponse" +/* + * Set up some JSON pointers we'll use later... +*/ +, items = ptr.create("#/items") +, author = ptr.create("#/author") +, media = ptr.create("#/media/m") +; + +function extractItems(it) { + return items.get(it); +} + +function extractAuthorAndMedia(it, i) { + this.push({ + author: author.get(it), + media : media.get(it) + }); +} + +function processResponse(json) { + var items = extractItems(json) + , accum = [] + ; + + if (items && Array.isArray(items)) { + items.forEach(extractAuthorAndMedia, accum); + } + + console.log( util.inspect(accum, true, 99) ); +} + +http.get(feed, function(res) { + console.log("Got response: " + res.statusCode); + + var data = ''; + + res.on('data', function (chunk){ + data += chunk; + }); + + res.on('end',function(){ + // result is formatted as jsonp... this is for illustration only. + eval(data); + }) +}).on('error', function(e) { + console.log("Got error: " + e.message); +}); diff --git a/bin/node_modules/json-path/node_modules/json-ptr/examples/various-json-pointers.js b/bin/node_modules/json-path/node_modules/json-ptr/examples/various-json-pointers.js new file mode 100644 index 00000000..5b3a186d --- /dev/null +++ b/bin/node_modules/json-path/node_modules/json-ptr/examples/various-json-pointers.js @@ -0,0 +1,169 @@ +var assert = require('assert'), +ptr = require('..') +; + +var obj = { + a: 1, + b: { + c: 2 + }, + d: { + e: [{a:3}, {b:4}, {c:5}] + } +}; + +// JSON Pointers (as strings) + +var n = -1 +, ub = 10000 +, start = process.hrtime(); + + +while(++n < ub) { + + assert.equal(ptr.get(obj, "/a"), n + 1); + assert.equal(ptr.get(obj, "/b/c"), n + 2); + assert.equal(ptr.get(obj, "/d/e/0/a"), n + 3); + assert.equal(ptr.get(obj, "/d/e/1/b"), n + 4); + assert.equal(ptr.get(obj, "/d/e/2/c"), n + 5); + + assert.equal(ptr.set(obj, "/a", n + 2), n + 1); + assert.equal(ptr.set(obj, "/b/c", n + 3), n + 2); + assert.equal(ptr.set(obj, "/d/e/0/a", n + 4), n + 3); + assert.equal(ptr.set(obj, "/d/e/1/b", n + 5), n + 4); + assert.equal(ptr.set(obj, "/d/e/2/c", n + 6), n + 5); + + assert.equal(ptr.get(obj, "/a"), n + 2); + assert.equal(ptr.get(obj, "/b/c"), n + 3); + assert.equal(ptr.get(obj, "/d/e/0/a"), n + 4); + assert.equal(ptr.get(obj, "/d/e/1/b"), n + 5); + assert.equal(ptr.get(obj, "/d/e/2/c"), n + 6); + + assert.equal(ptr.get(obj, ""), obj); +} + +assert.throws(function() { + ptr.get(obj, "a"); +}); + +assert.throws(function() { + ptr.set(obj, "a", {a: "value"}); +}); + +// JSON Pointers (as URI fragments) +ub = ub * 2; +n--; +while(++n < ub) { + + assert.equal(ptr.get(obj, "#/a"), n + 1); + assert.equal(ptr.get(obj, "#/b/c"), n + 2); + assert.equal(ptr.get(obj, "#/d/e/0/a"), n + 3); + assert.equal(ptr.get(obj, "#/d/e/1/b"), n + 4); + assert.equal(ptr.get(obj, "#/d/e/2/c"), n + 5); + + assert.equal(ptr.set(obj, "#/a", n + 2), n + 1); + assert.equal(ptr.set(obj, "#/b/c", n + 3), n + 2); + assert.equal(ptr.set(obj, "#/d/e/0/a", n + 4), n + 3); + assert.equal(ptr.set(obj, "#/d/e/1/b", n + 5), n + 4); + assert.equal(ptr.set(obj, "#/d/e/2/c", n + 6), n + 5); + + assert.equal(ptr.get(obj, "#/a"), n + 2); + assert.equal(ptr.get(obj, "#/b/c"), n + 3); + assert.equal(ptr.get(obj, "#/d/e/0/a"), n + 4); + assert.equal(ptr.get(obj, "#/d/e/1/b"), n + 5); + assert.equal(ptr.get(obj, "#/d/e/2/c"), n + 6); + + assert.equal(ptr.get(obj, ""), obj); +} + +assert.throws(function() { + // Cannot assign the root object: + ptr.set(obj, "#", {}); +}); + +assert.throws(function() { + ptr.get(obj, "#a"); +}); +assert.throws(function() { + ptr.set(obj, "#a", {a: "value"}); +}); + +assert.throws(function() { + ptr.get(obj, "a/"); +}); + +var complexKeys = { + "a/b": { + c: 1 + }, + d: { + "e/f": 2 + }, + "~1": 3, + "01": 4 +} + +assert.equal(ptr.get(complexKeys, "/a~1b/c"), 1); +assert.equal(ptr.get(complexKeys, "/d/e~1f"), 2); +assert.equal(ptr.get(complexKeys, "/~01"), 3); +assert.equal(ptr.get(complexKeys, "/01"), 4); +assert.equal(ptr.get(complexKeys, "/a/b/c"), null); +assert.equal(ptr.get(complexKeys, "/~1"), null); + +// draft-ietf-appsawg-json-pointer-08 has special array rules +var ary = [ "zero", "one", "two" ]; +assert.equal(ptr.get(ary, "/01"), null); + +// we should be able to push the end of an array with the special pointer '-' +assert.equal(ptr.set(ary, "/-", "three"), null); +assert.equal(ary[3], "three"); +assert.equal(ptr.set(ary, "/-", "four"), null); +assert.equal(ary[4], "four"); + +// Examples from the draft: +var example = { + "foo": ["bar", "baz"], + "": 0, + "a/b": 1, + "c%d": 2, + "e^f": 3, + "g|h": 4, + "i\\j": 5, + "k\"l": 6, + " ": 7, + "m~n": 8 +}; + +assert.equal(ptr.get(example, ""), example); +var ans = ptr.get(example, "/foo"); +assert.equal(ans.length, 2); +assert.equal(ans[0], "bar"); +assert.equal(ans[1], "baz"); +assert.equal(ptr.get(example, "/foo/0"), "bar"); +assert.equal(ptr.get(example, "/"), 0); +assert.equal(ptr.get(example, "/a~1b"), 1); +assert.equal(ptr.get(example, "/c%d"), 2); +assert.equal(ptr.get(example, "/e^f"), 3); +assert.equal(ptr.get(example, "/g|h"), 4); +assert.equal(ptr.get(example, "/i\\j"), 5); +assert.equal(ptr.get(example, "/k\"l"), 6); +assert.equal(ptr.get(example, "/ "), 7); +assert.equal(ptr.get(example, "/m~0n"), 8); + +assert.equal(ptr.get(example, "#"), example); +var ans = ptr.get(example, "#/foo"); +assert.equal(ans.length, 2); +assert.equal(ans[0], "bar"); +assert.equal(ans[1], "baz"); +assert.equal(ptr.get(example, "#/foo/0"), "bar"); +assert.equal(ptr.get(example, "#/"), 0); +assert.equal(ptr.get(example, "#/a~1b"), 1); +assert.equal(ptr.get(example, "#/c%25d"), 2); +assert.equal(ptr.get(example, "#/e%5Ef"), 3); +assert.equal(ptr.get(example, "#/g%7Ch"), 4); +assert.equal(ptr.get(example, "#/i%5Cj"), 5); +assert.equal(ptr.get(example, "#/k%22l"), 6); +assert.equal(ptr.get(example, "#/%20"), 7); +assert.equal(ptr.get(example, "#/m~0n"), 8); + +console.log("All tests pass."); \ No newline at end of file diff --git a/bin/node_modules/json-path/node_modules/json-ptr/index.js b/bin/node_modules/json-path/node_modules/json-ptr/index.js new file mode 100644 index 00000000..4e205846 --- /dev/null +++ b/bin/node_modules/json-path/node_modules/json-ptr/index.js @@ -0,0 +1,236 @@ +/* jshint laxbreak: true, laxcomma: true*/ +/* global global, window */ + +(function (undefined) { + "use strict"; + + var $scope + , conflict, conflictResolution = []; + if (typeof global === 'object' && global) { + $scope = global; + conflict = global.JsonPointer; + } else if (typeof window !== 'undefined') { + $scope = window; + conflict = window.JsonPointer; + } else { + $scope = {}; + } + if (conflict) { + conflictResolution.push( + function () { + if ($scope.JsonPointer === JsonPointer) { + $scope.JsonPointer = conflict; + conflict = undefined; + } + }); + } + + function decodePointer(ptr) { + if (typeof ptr !== 'string') { throw new TypeError('Invalid type: JSON Pointers are represented as strings.'); } + if (ptr.length === 0) { return []; } + if (ptr[0] !== '/') { throw new ReferenceError('Invalid JSON Pointer syntax. Non-empty pointer must begin with a solidus `/`.'); } + var path = ptr.substring(1).split('/') + , i = -1 + , len = path.length + ; + while (++i < len) { + path[i] = path[i].replace('~1', '/').replace('~0', '~'); + } + return path; + } + + function encodePointer(path) { + if (path && !Array.isArray(path)) { throw new TypeError('Invalid type: path must be an array of segments.'); } + if (path.length === 0) { return ''; } + var res = [] + , i = -1 + , len = path.length + ; + while (++i < len) { + res.push(path[i].replace('~', '~0').replace('/', '~1')); + } + return "/".concat(res.join('/')); + } + + function decodeUriFragmentIdentifier(ptr) { + if (typeof ptr !== 'string') { throw new TypeError('Invalid type: JSON Pointers are represented as strings.'); } + if (ptr.length === 0 || ptr[0] !== '#') { throw new ReferenceError('Invalid JSON Pointer syntax; URI fragment idetifiers must begin with a hash.'); } + if (ptr.length === 1) { return []; } + if (ptr[1] !== '/') { throw new ReferenceError('Invalid JSON Pointer syntax.'); } + var path = ptr.substring(2).split('/') + , i = -1 + , len = path.length + ; + while (++i < len) { + path[i] = decodeURIComponent(path[i]).replace('~1', '/').replace('~0', '~'); + } + return path; + } + + function encodeUriFragmentIdentifier(path) { + if (path && !Array.isArray(path)) { throw new TypeError('Invalid type: path must be an array of segments.'); } + if (path.length === 0) { return '#'; } + var res = [] + , i = -1 + , len = path.length + ; + while (++i < len) { + res.push(encodeURIComponent(path[i].replace('~', '~0').replace('/', '~1'))); + } + return "#/".concat(res.join('/')); + } + + function toArrayIndexReference(arr, idx) { + var len = idx.length + , cursor = 0 + ; + if (len === 0 || len > 1 && idx[0] === '0') { return -1; } + if (len === 1 && idx[0] === '-') { return arr.length; } + + while (++cursor < len) { + if (idx[cursor] < '0' || idx[cursor] > '9') { return -1; } + } + return parseInt(idx, 10); + } + + function get(obj, path) { + if (typeof obj !== 'undefined') { + var it = obj + , len = path.length + , cursor = -1 + , step, p; + if (len) { + while (++cursor < len && it) { + step = path[cursor]; + if (Array.isArray(it)) { + if (isNaN(step)) { + return; + } + p = toArrayIndexReference(it, step); + if (it.length > p) { + it = it[p]; + } else { + return; + } + } else { + it = it[step]; + } + } + return it; + } else { + return obj; + } + } + } + + function set(obj, val, path, enc) { + if (path.length === 0) { throw new Error("Cannot set the root object; assign it directly."); } + if (typeof obj !== 'undefined') { + var it = obj + , len = path.length + , end = path.length - 1 + , cursor = -1 + , step, p, rem; + if (len) { + while (++cursor < len) { + step = path[cursor]; + if (Array.isArray(it)) { + p = toArrayIndexReference(it, step); + if (it.length > p) { + if (cursor === end) { + rem = it[p]; + it[p] = val; + return rem; + } + it = it[p]; + } else if (it.length === p) { + it.push(val); + return undefined; + } else { + throw new ReferenceError("Not found: " + .concat(enc(path.slice(0, cursor + 1), true), '.')); + } + } else { + if (cursor === end) { + rem = it[step]; + it[step] = val; + return rem; + } + it = it[step]; + if (typeof it === 'undefined') { + throw new ReferenceError("Not found: " + .concat(enc(path.slice(0, cursor + 1), true), '.')); + } + } + } + if (cursor === len) { + return it; + } + } else { + return it; + } + } + } + + function JsonPointer(ptr) { + this.encode = (ptr.length > 0 && ptr[0] === '#') ? encodeUriFragmentIdentifier : encodePointer; + if (Array.isArray(ptr)) { + this.path = ptr; + } else { + var decode = (ptr.length > 0 && ptr[0] === '#') ? decodeUriFragmentIdentifier : decodePointer; + this.path = decode(ptr); + } + } + + Object.defineProperty(JsonPointer.prototype, 'pointer', { + enumerable: true, + get: function () { return encodePointer(this.path); } + }); + + Object.defineProperty(JsonPointer.prototype, 'uriFragmentIdentifier', { + enumerable: true, + get: function () { return encodeUriFragmentIdentifier(this.path); } + }); + + JsonPointer.prototype.get = function (obj) { + return get(obj, this.path); + }; + + JsonPointer.prototype.set = function (obj, val) { + return set(obj, val, this.path, this.encode); + }; + + JsonPointer.prototype.toString = function () { + return this.pointer; + }; + + JsonPointer.create = function (ptr) { return new JsonPointer(ptr); }; + JsonPointer.get = function (obj, ptr) { + var decode = (ptr.length > 0 && ptr[0] === '#') ? decodeUriFragmentIdentifier : decodePointer; + return get(obj, decode(ptr)); + }; + JsonPointer.set = function (obj, ptr, val) { + var encode = (ptr.length > 0 && ptr[0] === '#') ? encodeUriFragmentIdentifier : encodePointer; + var decode = (ptr.length > 0 && ptr[0] === '#') ? decodeUriFragmentIdentifier : decodePointer; + + return set(obj, val, decode(ptr), encode); + }; + JsonPointer.decodePointer = decodePointer; + JsonPointer.encodePointer = encodePointer; + JsonPointer.decodeUriFragmentIdentifier = decodeUriFragmentIdentifier; + JsonPointer.encodeUriFragmentIdentifier = encodeUriFragmentIdentifier; + + JsonPointer.noConflict = function () { + if (conflictResolution) { + conflictResolution.forEach(function (it) { it(); }); + conflictResolution = null; + } + return JsonPointer; + }; + + if (typeof module !== 'undefined' && module && typeof exports === 'object' && exports && module.exports === exports) { + module.exports = JsonPointer; // nodejs + } else { + $scope.JsonPointer = JsonPointer; // other... browser? + } +}()); diff --git a/bin/node_modules/json-path/node_modules/json-ptr/package.json b/bin/node_modules/json-path/node_modules/json-ptr/package.json new file mode 100644 index 00000000..7ed06a36 --- /dev/null +++ b/bin/node_modules/json-path/node_modules/json-ptr/package.json @@ -0,0 +1,51 @@ +{ + "name": "json-ptr", + "version": "0.1.1", + "author": { + "name": "Phillip Clark", + "email": "phillip@flitbit.com" + }, + "description": "A complete implementation of JSON Pointer (RFC 6901) for nodejs and modern browsers.", + "main": "index.js", + "directories": { + "example": "examples", + "test": "test" + }, + "scripts": { + "test": "mocha -R spec" + }, + "devDependencies": { + "expect.js": "~0.2.x", + "mocha": "~1.10.x" + }, + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/flitbit/json-ptr" + }, + "readme": "# json-ptr [![Build Status](https://travis-ci.org/flitbit/json-ptr.png)](http://travis-ci.org/flitbit/json-ptr)\n\nA complete implementation of JSON Pointer (RFC 6901) for nodejs and modern browsers.\n\n## Installation\n\n[node.js](http://nodejs.org)\n```bash\n$ npm install json-ptr\n```\n\n## Tests\n\nTests use [mocha](http://visionmedia.github.io/mocha/) and [expect.js](https://github.com/LearnBoost/expect.js/), so if you clone the [github repository](https://github.com/flitbit/json-ptr) you'll need to run:\n\n```bash\nnpm install\n```\n\n... followed by ...\n\n```bash\nnpm test\n```\n\n... or ...\n\n```bash\nmocha -R spec\n```\n\n## Basics\n\n!! This document is a work in progress even though the module is considered *complete*. See the [examples of its use for more](https://github.com/flitbit/json-ptr/tree/master/examples).\n\nJSON Pointer provides a standardized syntax for reliably referencing data within an object's structure.\n\n### Importing\n\n**nodejs**\n```javascript\nvar JsonPointer = require('json-ptr')\n```\n\n**browser**\n```html\n\n```\n\n### Working with Pointers\n\nSince most non-trivial code will make use of the same pointers over and over again (after all they represent the fixed points within a larger structure), with `json-ptr`you can create these pointers once and reuse them against different data items.\n\n```javascript\nvar manager = JsonPointer.create('/people/workplace/reporting/manager');\nvar director = JsonPointer.create('/people/workplace/reporting/director');\n```\n\nPointers have a few simple operations:\n\n* `#get` - given an origin object, returns the referenced value\n* `#set` - given an origin object and a value, sets the referenced value\n\nAnd a few useful properties:\n\n* `#pointer` - an RFC 6901 formatted JSON pointer\n* `#uriFragmentIdentifier` - an RFC 6901 formatted URI fragment identifier\n* `#path` - an array of property names used to descend the object graph from the origin to the referenced item\n\n## Example\n\n\nThis example queries the live flikr api for recent images with 'surf' and 'pipeline'. It then extracts the author and the referenced media item.\n\nClone the repo and run it on the command line using `node example/example1.js` and you'll see the output. Of note: `json-ptr` will return `undefined` when any part of a pointer's path cannot be resolved, which makes this type of extraction very convenient and compact.\n\n[flikr example](https://github.com/flitbit/json-ptr/blob/master/examples/example1.js)\n```javascript\nvar ptr = require('json-ptr')\n, http = require('http')\n, util = require('util')\n;\n\nvar feed = \"http://api.flickr.com/services/feeds/photos_public.gne?tags=surf,pipeline&tagmode=all&format=json&jsoncallback=processResponse\"\n/*\n * Set up some JSON pointers we'll use later...\n*/\n, items = ptr.create(\"#/items\")\n, author = ptr.create(\"#/author\")\n, media = ptr.create(\"#/media/m\")\n;\n\nfunction extractItems(it) {\n\treturn items.get(it);\n}\n\nfunction extractAuthorAndMedia(it, i) {\n\tthis.push({\n\t\tauthor: author.get(it),\n\t\tmedia : media.get(it)\n\t});\n}\n\nfunction processResponse(json) {\n\tvar items = extractItems(json)\n\t, accum = []\n\t;\n\n\tif (items && Array.isArray(items)) {\n\t\titems.forEach(extractAuthorAndMedia, accum);\n\t}\n\n\tconsole.log( util.inspect(accum, true, 99) );\n}\n\nhttp.get(feed, function(res) {\n\tconsole.log(\"Got response: \" + res.statusCode);\n\n\tvar data = '';\n\n\tres.on('data', function (chunk){\n\t\tdata += chunk;\n\t});\n\n\tres.on('end',function(){\n\t\t// result is formatted as jsonp... this is for illustration only.\n\t\teval(data);\n\t})\n}).on('error', function(e) {\n\tconsole.log(\"Got error: \" + e.message);\n});\n```\n\n", + "readmeFilename": "README.md", + "bugs": { + "url": "https://github.com/flitbit/json-ptr/issues" + }, + "_id": "json-ptr@0.1.1", + "dist": { + "shasum": "bab82a31e292ce7af9e3fc7fd65acd1bbb9248e8", + "tarball": "http://registry.npmjs.org/json-ptr/-/json-ptr-0.1.1.tgz" + }, + "_from": "json-ptr@>=0.1.1-0 <0.2.0-0", + "_npmVersion": "1.3.8", + "_npmUser": { + "name": "flitbit", + "email": "phillip@flitbit.com" + }, + "maintainers": [ + { + "name": "flitbit", + "email": "phillip@flitbit.com" + } + ], + "_shasum": "bab82a31e292ce7af9e3fc7fd65acd1bbb9248e8", + "_resolved": "https://registry.npmjs.org/json-ptr/-/json-ptr-0.1.1.tgz", + "homepage": "https://github.com/flitbit/json-ptr" +} diff --git a/bin/node_modules/json-path/node_modules/json-ptr/releases/json-ptr-0.1.0.min.js b/bin/node_modules/json-path/node_modules/json-ptr/releases/json-ptr-0.1.0.min.js new file mode 100644 index 00000000..4619a1dc --- /dev/null +++ b/bin/node_modules/json-path/node_modules/json-ptr/releases/json-ptr-0.1.0.min.js @@ -0,0 +1 @@ +!function(e){"use strict";var r,t,n=[];if(typeof global=="object"&&global){r=global;t=global.JsonPointer}else if(typeof window!=="undefined"){r=window;t=window.JsonPointer}else{r={}}if(t){n.push(function(){if(r.JsonPointer===h){r.JsonPointer=t;t=e}})}function i(e){if(typeof e!=="string")throw new TypeError("Invalid type: JSON Pointers are represented as strings.");if(e.length===0)return[];if(e[0]!=="/")throw new ReferenceError("Invalid JSON Pointer syntax. Non-empty pointer must begin with a solidus `/`.");var r=e.substring(1).split("/"),t=-1,n=r.length;while(++t1&&r[0]==="0")return-1;if(t===1&&r[0]==="-")return e.length;while(++n"9")return-1}return parseInt(r)}function u(e,r){if(typeof e!=="undefined"){var t=e,n=r.length,i=-1,o,f;if(n){while(++if){t=t[f]}else{return}}else{t=t[o]}}return t}else{return e}}}function l(r,t,n,i){if(n.length===0)throw new Error("Cannot set the root object; assign it directly.");if(typeof r!=="undefined"){var o=r,f=n.length,s=n.length-1,u=-1,l,h,p;if(f){while(++uh){if(u===s){p=o[h];o[h]=t;return p}o=o[h]}else if(o.length===h){o.push(t);return e}else{throw new ReferenceError("Not found: ".concat(encode(n.slice(0,u+1),true),"."))}}else{if(u===s){p=o[l];o[l]=t;return p}o=o[l];if(typeof o==="undefined"){throw new ReferenceError("Not found: ".concat(encode(n.slice(0,u+1),true),"."))}}}if(u===f){return o}}else{return o}}}function h(e){this.encode=e.length>0&&e[0]==="#"?s:o;if(Array.isArray(e)){this.path=e}else{var r=e.length>0&&e[0]==="#"?f:i;this.path=r(e)}}Object.defineProperty(h.prototype,"pointer",{enumerable:true,get:function(){return o(this.path)}});Object.defineProperty(h.prototype,"uriFragmentIdentifier",{enumerable:true,get:function(){return s(this.path)}});h.prototype.get=function(e){return u(e,this.path)};h.prototype.set=function(e,r){return l(e,r,this.path,this.encode)};h.prototype.toString=function(){return this.pointer};h.create=function(e){return new h(e)};h.get=function(e,r){var t=r.length>0&&r[0]==="#"?f:i;return u(e,t(r))};h.set=function(e,r,t){var n=r.length>0&&r[0]==="#"?s:o;var a=r.length>0&&r[0]==="#"?f:i;return l(e,t,a(r),n)};h.decodePointer=i;h.encodePointer=o;h.decodeUriFragmentIdentifier=f;h.encodeUriFragmentIdentifier=s;h.noConflict=function(){if(n){n.forEach(function(e){e()});n=null}return Define};if(typeof module!="undefined"&&module&&typeof exports=="object"&&exports&&module.exports===exports){module.exports=h}else{r.JsonPointer=h}}(); \ No newline at end of file diff --git a/bin/node_modules/json-path/node_modules/json-ptr/releases/json-ptr-0.1.1.min.js b/bin/node_modules/json-path/node_modules/json-ptr/releases/json-ptr-0.1.1.min.js new file mode 100644 index 00000000..ce6d8b39 --- /dev/null +++ b/bin/node_modules/json-path/node_modules/json-ptr/releases/json-ptr-0.1.1.min.js @@ -0,0 +1 @@ +!function(e){"use strict";var r,t,n=[];if(typeof global==="object"&&global){r=global;t=global.JsonPointer}else if(typeof window!=="undefined"){r=window;t=window.JsonPointer}else{r={}}if(t){n.push(function(){if(r.JsonPointer===h){r.JsonPointer=t;t=e}})}function i(e){if(typeof e!=="string"){throw new TypeError("Invalid type: JSON Pointers are represented as strings.")}if(e.length===0){return[]}if(e[0]!=="/"){throw new ReferenceError("Invalid JSON Pointer syntax. Non-empty pointer must begin with a solidus `/`.")}var r=e.substring(1).split("/"),t=-1,n=r.length;while(++t1&&r[0]==="0"){return-1}if(t===1&&r[0]==="-"){return e.length}while(++n"9"){return-1}}return parseInt(r,10)}function u(e,r){if(typeof e!=="undefined"){var t=e,n=r.length,i=-1,o,f;if(n){while(++if){t=t[f]}else{return}}else{t=t[o]}}return t}else{return e}}}function l(r,t,n,i){if(n.length===0){throw new Error("Cannot set the root object; assign it directly.")}if(typeof r!=="undefined"){var o=r,f=n.length,s=n.length-1,u=-1,l,h,p;if(f){while(++uh){if(u===s){p=o[h];o[h]=t;return p}o=o[h]}else if(o.length===h){o.push(t);return e}else{throw new ReferenceError("Not found: ".concat(i(n.slice(0,u+1),true),"."))}}else{if(u===s){p=o[l];o[l]=t;return p}o=o[l];if(typeof o==="undefined"){throw new ReferenceError("Not found: ".concat(i(n.slice(0,u+1),true),"."))}}}if(u===f){return o}}else{return o}}}function h(e){this.encode=e.length>0&&e[0]==="#"?s:o;if(Array.isArray(e)){this.path=e}else{var r=e.length>0&&e[0]==="#"?f:i;this.path=r(e)}}Object.defineProperty(h.prototype,"pointer",{enumerable:true,get:function(){return o(this.path)}});Object.defineProperty(h.prototype,"uriFragmentIdentifier",{enumerable:true,get:function(){return s(this.path)}});h.prototype.get=function(e){return u(e,this.path)};h.prototype.set=function(e,r){return l(e,r,this.path,this.encode)};h.prototype.toString=function(){return this.pointer};h.create=function(e){return new h(e)};h.get=function(e,r){var t=r.length>0&&r[0]==="#"?f:i;return u(e,t(r))};h.set=function(e,r,t){var n=r.length>0&&r[0]==="#"?s:o;var a=r.length>0&&r[0]==="#"?f:i;return l(e,t,a(r),n)};h.decodePointer=i;h.encodePointer=o;h.decodeUriFragmentIdentifier=f;h.encodeUriFragmentIdentifier=s;h.noConflict=function(){if(n){n.forEach(function(e){e()});n=null}return h};if(typeof module!=="undefined"&&module&&typeof exports==="object"&&exports&&module.exports===exports){module.exports=h}else{r.JsonPointer=h}}(); \ No newline at end of file diff --git a/bin/node_modules/json-path/node_modules/json-ptr/test/tests.html b/bin/node_modules/json-path/node_modules/json-ptr/test/tests.html new file mode 100644 index 00000000..00b62230 --- /dev/null +++ b/bin/node_modules/json-path/node_modules/json-ptr/test/tests.html @@ -0,0 +1,30 @@ + + + + Mocha Tests + + + +
+ + + + + + + + + + + + + \ No newline at end of file diff --git a/bin/node_modules/json-path/node_modules/json-ptr/test/tests.js b/bin/node_modules/json-path/node_modules/json-ptr/test/tests.js new file mode 100644 index 00000000..c4c65510 --- /dev/null +++ b/bin/node_modules/json-path/node_modules/json-ptr/test/tests.js @@ -0,0 +1,798 @@ +/*jshint laxcomma: true*/ +/*globals describe, it*/ + +if (typeof require === 'function') { + var expect = require('expect.js') + , JsonPointer = require('..') + ; +} + +var ptr = JsonPointer; + +describe('JsonPointer', function () { + 'use strict'; + + describe('when working with the example data from the rfc', function () { + var data = { + "foo": ["bar", "baz"], + "": 0, + "a/b": 1, + "c%d": 2, + "e^f": 3, + "g|h": 4, + "i\\j": 5, + "k\"l": 6, + " ": 7, + "m~n": 8 + }; + + describe('with a JSON pointer to the root ``', function () { + var p = ptr.create(''); + + it('#get should resolve to the object itself', function () { + expect(p.get(data)).to.eql(data); + }); + + it('#set should throw', function () { + expect(function () { + p.set(data, { this: "should cause an exception"}); + }).to.throwError(); + }); + + it('should have an empty path', function () { + expect(p.path).to.have.length(0); + }); + + it('should have a pointer that is empty', function () { + expect(p.pointer).to.eql(''); + }); + + it('should have a URI fragment identfier that is empty', function () { + expect(p.uriFragmentIdentifier).to.eql('#'); + }); + }); + + describe('a URI fragment identfier to the root #', function () { + var p = ptr.create('#'); + + it('#get should resolve to the object itself', function () { + expect(p.get(data)).to.equal(data); + }); + + it('#set should throw', function () { + expect(function () { + p.set(data, { this: "should cause an exception"}); + }).to.throwError(); + }); + + it('should have an empty path', function () { + expect(p.path).to.have.length(0); + }); + + it('should have a pointer that is empty', function () { + expect(p.pointer).to.eql(''); + }); + + it('should have a URI fragment identfier that is empty', function () { + expect(p.uriFragmentIdentifier).to.eql('#'); + }); + }); + + describe('with a JSON pointer of `/foo`', function () { + var p = ptr.create('/foo'); + + it('#get should resolve to data["foo"]', function () { + expect(p.get(data)).to.equal(data["foo"]); + }); + + it('#set should succeed changing the referenced value', function () { + var capture = p.get(data); + var updated = { this: "should succeed" }; + p.set(data, updated); + expect(p.get(data)).to.eql(updated); + p.set(data, capture); + }); + + it('should have a path of [ "foo" ]', function () { + expect(p.path).to.eql(["foo"]); + }); + + it('should have the pointer `/foo`', function () { + expect(p.pointer).to.eql('/foo'); + }); + + it('should have the URI fragment identfier `#/foo`', function () { + expect(p.uriFragmentIdentifier).to.eql('#/foo'); + }); + }); + + describe('a URI fragment identifier of `#/foo`', function () { + var p = ptr.create('#/foo'); + + it('#get should resolve to data["foo"]', function () { + expect(p.get(data)).to.equal(data["foo"]); + }); + + it('#set should succeed changing the referenced value', function () { + var capture = p.get(data); + var updated = { this: "should succeed" }; + p.set(data, updated); + expect(p.get(data)).to.eql(updated); + p.set(data, capture); + }); + + it('should have a path of [ "foo" ]', function () { + expect(p.path).to.eql(["foo"]); + }); + + it('should have the pointer `/foo`', function () { + expect(p.pointer).to.eql('/foo'); + }); + + it('should have the URI fragment identfier `#/foo`', function () { + expect(p.uriFragmentIdentifier).to.eql('#/foo'); + }); + }); + + describe('with a JSON pointer of `/foo/0`', function () { + var p = ptr.create('/foo/0'); + + it('#get should resolve to data.foo[0]', function () { + expect(p.get(data)).to.equal(data.foo[0]); + }); + + it('#set should succeed changing the referenced value', function () { + var capture = p.get(data); + var updated = { this: "should succeed" }; + p.set(data, updated); + expect(p.get(data)).to.eql(updated); + p.set(data, capture); + }); + + it('should have a path of [ "foo", "0" ]', function () { + expect(p.path).to.eql(["foo", "0"]); + }); + + it('should have the pointer `/foo/0`', function () { + expect(p.pointer).to.eql('/foo/0'); + }); + + it('should have the URI fragment identfier `#/foo/0`', function () { + expect(p.uriFragmentIdentifier).to.eql('#/foo/0'); + }); + }); + + describe('a URI fragment identifier of `#/foo/0`', function () { + var p = ptr.create('#/foo/0'); + + it('#get should resolve to data.foo[0]', function () { + expect(p.get(data)).to.equal(data.foo[0]); + }); + + it('#set should succeed changing the referenced value', function () { + var capture = p.get(data); + var updated = { this: "should succeed" }; + p.set(data, updated); + expect(p.get(data)).to.eql(updated); + p.set(data, capture); + }); + + it('should have a path of [ "foo", "0" ]', function () { + expect(p.path).to.eql(["foo", "0"]); + }); + + it('should have the pointer `/foo/0`', function () { + expect(p.pointer).to.eql('/foo/0'); + }); + + it('should have the URI fragment identfier `#/foo/0`', function () { + expect(p.uriFragmentIdentifier).to.eql('#/foo/0'); + }); + }); + + describe('with a JSON pointer of `/`', function () { + var p = ptr.create('/'); + + it('#get should resolve to data[""]', function () { + expect(p.get(data)).to.equal(data[""]); + }); + + it('#set should succeed changing the referenced value', function () { + var capture = p.get(data); + var updated = { this: "should succeed" }; + p.set(data, updated); + expect(p.get(data)).to.eql(updated); + p.set(data, capture); + }); + + it('should have a path of [ "" ]', function () { + expect(p.path).to.eql([""]); + }); + + it('should have the pointer `/`', function () { + expect(p.pointer).to.eql('/'); + }); + + it('should have the URI fragment identfier `#/`', function () { + expect(p.uriFragmentIdentifier).to.eql('#/'); + }); + }); + + describe('a URI fragment identifier of `#/`', function () { + var p = ptr.create('#/'); + + it('#get should resolve to data[""]', function () { + expect(p.get(data)).to.equal(data[""]); + }); + + it('#set should succeed changing the referenced value', function () { + var capture = p.get(data); + var updated = { this: "should succeed" }; + p.set(data, updated); + expect(p.get(data)).to.eql(updated); + p.set(data, capture); + }); + + it('should have a path of [ "" ]', function () { + expect(p.path).to.eql([""]); + }); + + it('should have the pointer `/`', function () { + expect(p.pointer).to.eql('/'); + }); + + it('should have the URI fragment identfier `#/`', function () { + expect(p.uriFragmentIdentifier).to.eql('#/'); + }); + }); + + describe('with a JSON pointer of `/a~1b`', function () { + var p = ptr.create('/a~1b'); + + it('#get should resolve to data["a/b"]', function () { + expect(p.get(data)).to.equal(data["a/b"]); + }); + + it('#set should succeed changing the referenced value', function () { + var capture = p.get(data); + var updated = { this: "should succeed" }; + p.set(data, updated); + expect(p.get(data)).to.eql(updated); + p.set(data, capture); + }); + + it('should have a path of [ "a/b" ]', function () { + expect(p.path).to.eql(["a/b"]); + }); + + it('should have the pointer `/a~1b`', function () { + expect(p.pointer).to.eql('/a~1b'); + }); + + it('should have the URI fragment identfier `#/a~1b`', function () { + expect(p.uriFragmentIdentifier).to.eql('#/a~1b'); + }); + }); + + describe('a URI fragment identifier of `#/a~1b`', function () { + var p = ptr.create('#/a~1b'); + + it('#get should resolve to data["a/b"]', function () { + expect(p.get(data)).to.equal(data["a/b"]); + }); + + it('#set should succeed changing the referenced value', function () { + var capture = p.get(data); + var updated = { this: "should succeed" }; + p.set(data, updated); + expect(p.get(data)).to.eql(updated); + p.set(data, capture); + }); + + it('should have a path of [ "a/b" ]', function () { + expect(p.path).to.eql(["a/b"]); + }); + + it('should have the pointer `/a~1b`', function () { + expect(p.pointer).to.eql('/a~1b'); + }); + + it('should have the URI fragment identfier `#/a~1b`', function () { + expect(p.uriFragmentIdentifier).to.eql('#/a~1b'); + }); + }); + + describe('with a JSON pointer of `/c%d`', function () { + var p = ptr.create('/c%d'); + + it('#get should resolve to data["c%d"]', function () { + expect(p.get(data)).to.equal(data["c%d"]); + }); + + it('#set should succeed changing the referenced value', function () { + var capture = p.get(data); + var updated = { this: "should succeed" }; + p.set(data, updated); + expect(p.get(data)).to.eql(updated); + p.set(data, capture); + }); + + it('should have a path of [ "c%d" ]', function () { + expect(p.path).to.eql(["c%d"]); + }); + + it('should have the pointer `/c%d`', function () { + expect(p.pointer).to.eql('/c%d'); + }); + + it('should have the URI fragment identfier `#/c%25d`', function () { + expect(p.uriFragmentIdentifier).to.eql('#/c%25d'); + }); + }); + + describe('a URI fragment identifier of `#/c%25d`', function () { + var p = ptr.create('#/c%25d'); + + it('#get should resolve to data["c%d"]', function () { + expect(p.get(data)).to.equal(data["c%d"]); + }); + + it('#set should succeed changing the referenced value', function () { + var capture = p.get(data); + var updated = { this: "should succeed" }; + p.set(data, updated); + expect(p.get(data)).to.eql(updated); + p.set(data, capture); + }); + + it('should have a path of [ "c%d" ]', function () { + expect(p.path).to.eql(["c%d"]); + }); + + it('should have the pointer `/c%d`', function () { + expect(p.pointer).to.eql('/c%d'); + }); + + it('should have the URI fragment identfier `#/c%25d`', function () { + expect(p.uriFragmentIdentifier).to.eql('#/c%25d'); + }); + }); + + describe('with a JSON pointer of `/e^f`', function () { + var p = ptr.create('/e^f'); + + it('#get should resolve to data["e^f"]', function () { + expect(p.get(data)).to.equal(data["e^f"]); + }); + + it('#set should succeed changing the referenced value', function () { + var capture = p.get(data); + var updated = { this: "should succeed" }; + p.set(data, updated); + expect(p.get(data)).to.eql(updated); + p.set(data, capture); + }); + + it('should have a path of [ "e^f" ]', function () { + expect(p.path).to.eql(["e^f"]); + }); + + it('should have the pointer `/e^f`', function () { + expect(p.pointer).to.eql('/e^f'); + }); + + it('should have the URI fragment identfier `#/e%5Ef`', function () { + expect(p.uriFragmentIdentifier).to.eql('#/e%5Ef'); + }); + }); + + describe('a URI fragment identifier of `#/e%5Ef`', function () { + var p = ptr.create('#/e%5Ef'); + + it('#get should resolve to data["e^f"]', function () { + expect(p.get(data)).to.equal(data["e^f"]); + }); + + it('#set should succeed changing the referenced value', function () { + var capture = p.get(data); + var updated = { this: "should succeed" }; + p.set(data, updated); + expect(p.get(data)).to.eql(updated); + p.set(data, capture); + }); + + it('should have a path of [ "e^f" ]', function () { + expect(p.path).to.eql(["e^f"]); + }); + + it('should have the pointer `/e^f`', function () { + expect(p.pointer).to.eql('/e^f'); + }); + + it('should have the URI fragment identfier `#/e%5Ef`', function () { + expect(p.uriFragmentIdentifier).to.eql('#/e%5Ef'); + }); + }); + + describe('with a JSON pointer of `/g|h`', function () { + var p = ptr.create('/g|h'); + + it('#get should resolve to data["g|h"]', function () { + expect(p.get(data)).to.equal(data["g|h"]); + }); + + it('#set should succeed changing the referenced value', function () { + var capture = p.get(data); + var updated = { this: "should succeed" }; + p.set(data, updated); + expect(p.get(data)).to.eql(updated); + p.set(data, capture); + }); + + it('should have a path of [ "g|h" ]', function () { + expect(p.path).to.eql(["g|h"]); + }); + + it('should have the pointer `/g|h`', function () { + expect(p.pointer).to.eql('/g|h'); + }); + + it('should have the URI fragment identfier `#/g%7Ch`', function () { + expect(p.uriFragmentIdentifier).to.eql('#/g%7Ch'); + }); + }); + + describe('a URI fragment identifier of `#/g%7Ch`', function () { + var p = ptr.create('#/g%7Ch'); + + it('#get should resolve to data["g|h"]', function () { + expect(p.get(data)).to.equal(data["g|h"]); + }); + + it('#set should succeed changing the referenced value', function () { + var capture = p.get(data); + var updated = { this: "should succeed" }; + p.set(data, updated); + expect(p.get(data)).to.eql(updated); + p.set(data, capture); + }); + + it('should have a path of [ "g|h" ]', function () { + expect(p.path).to.eql(["g|h"]); + }); + + it('should have the pointer `/g|h`', function () { + expect(p.pointer).to.eql('/g|h'); + }); + + it('should have the URI fragment identfier `#/g%7Ch`', function () { + expect(p.uriFragmentIdentifier).to.eql('#/g%7Ch'); + }); + }); + + describe('with a JSON pointer of `/i\\j`', function () { + var p = ptr.create('/i\\j'); + + it('#get should resolve to data["i\\j"]', function () { + expect(p.get(data)).to.equal(data["i\\j"]); + }); + + it('#set should succeed changing the referenced value', function () { + var capture = p.get(data); + var updated = { this: "should succeed" }; + p.set(data, updated); + expect(p.get(data)).to.eql(updated); + p.set(data, capture); + }); + + it('should have a path of [ "i\\j" ]', function () { + expect(p.path).to.eql(["i\\j"]); + }); + + it('should have the pointer `/i\\j`', function () { + expect(p.pointer).to.eql('/i\\j'); + }); + + it('should have the URI fragment identfier `#/i%5Cj`', function () { + expect(p.uriFragmentIdentifier).to.eql('#/i%5Cj'); + }); + }); + + describe('a URI fragment identifier of `#/i%5Cj`', function () { + var p = ptr.create('#/i%5Cj'); + + it('#get should resolve to data["i\\j"]', function () { + expect(p.get(data)).to.equal(data["i\\j"]); + }); + + it('#set should succeed changing the referenced value', function () { + var capture = p.get(data); + var updated = { this: "should succeed" }; + p.set(data, updated); + expect(p.get(data)).to.eql(updated); + p.set(data, capture); + }); + + it('should have a path of [ "i\\j" ]', function () { + expect(p.path).to.eql(["i\\j"]); + }); + + it('should have the pointer `/i\\j`', function () { + expect(p.pointer).to.eql('/i\\j'); + }); + + it('should have the URI fragment identfier `#/i%5Cj`', function () { + expect(p.uriFragmentIdentifier).to.eql('#/i%5Cj'); + }); + }); + + describe('with a JSON pointer of `/k\"l`', function () { + var p = ptr.create('/k\"l'); + + it('#get should resolve to data["k\"l"]', function () { + expect(p.get(data)).to.equal(data["k\"l"]); + }); + + it('#set should succeed changing the referenced value', function () { + var capture = p.get(data); + var updated = { this: "should succeed" }; + p.set(data, updated); + expect(p.get(data)).to.eql(updated); + p.set(data, capture); + }); + + it('should have a path of [ "k\"l" ]', function () { + expect(p.path).to.eql(["k\"l"]); + }); + + it('should have the pointer `/k\"l`', function () { + expect(p.pointer).to.eql('/k\"l'); + }); + + it('should have the URI fragment identfier `#/k%22l`', function () { + expect(p.uriFragmentIdentifier).to.eql('#/k%22l'); + }); + }); + + describe('a URI fragment identifier of `#/k%22l`', function () { + var p = ptr.create('#/k%22l'); + + it('#get should resolve to data["k\"l"]', function () { + expect(p.get(data)).to.equal(data["k\"l"]); + }); + + it('#set should succeed changing the referenced value', function () { + var capture = p.get(data); + var updated = { this: "should succeed" }; + p.set(data, updated); + expect(p.get(data)).to.eql(updated); + p.set(data, capture); + }); + + it('should have a path of [ "k\"l" ]', function () { + expect(p.path).to.eql(["k\"l"]); + }); + + it('should have the pointer `/k\"l`', function () { + expect(p.pointer).to.eql('/k\"l'); + }); + + it('should have the URI fragment identfier `#/k%22l`', function () { + expect(p.uriFragmentIdentifier).to.eql('#/k%22l'); + }); + }); + + describe('with a JSON pointer of `/ `', function () { + var p = ptr.create('/ '); + + it('#get should resolve to data[" "]', function () { + expect(p.get(data)).to.equal(data[" "]); + }); + + it('#set should succeed changing the referenced value', function () { + var capture = p.get(data); + var updated = { this: "should succeed" }; + p.set(data, updated); + expect(p.get(data)).to.eql(updated); + p.set(data, capture); + }); + + it('should have a path of [ " " ]', function () { + expect(p.path).to.eql([" "]); + }); + + it('should have the pointer `/ `', function () { + expect(p.pointer).to.eql('/ '); + }); + + it('should have the URI fragment identfier `#/%20`', function () { + expect(p.uriFragmentIdentifier).to.eql('#/%20'); + }); + }); + + describe('a URI fragment identifier of `#/%20`', function () { + var p = ptr.create('#/%20'); + + it('#get should resolve to data[" "]', function () { + expect(p.get(data)).to.equal(data[" "]); + }); + + it('#set should succeed changing the referenced value', function () { + var capture = p.get(data); + var updated = { this: "should succeed" }; + p.set(data, updated); + expect(p.get(data)).to.eql(updated); + p.set(data, capture); + }); + + it('should have a path of [ " " ]', function () { + expect(p.path).to.eql([" "]); + }); + + it('should have the pointer `/ `', function () { + expect(p.pointer).to.eql('/ '); + }); + + it('should have the URI fragment identfier `#/%20`', function () { + expect(p.uriFragmentIdentifier).to.eql('#/%20'); + }); + }); + + describe('with a JSON pointer of `/m~0n`', function () { + var p = ptr.create('/m~0n'); + + it('#get should resolve to data["m~n"]', function () { + expect(p.get(data)).to.equal(data["m~n"]); + }); + + it('#set should succeed changing the referenced value', function () { + var capture = p.get(data); + var updated = { this: "should succeed" }; + p.set(data, updated); + expect(p.get(data)).to.eql(updated); + p.set(data, capture); + }); + + it('should have a path of [ "m~n" ]', function () { + expect(p.path).to.eql(["m~n"]); + }); + + it('should have the pointer `/m~0n`', function () { + expect(p.pointer).to.eql('/m~0n'); + }); + + it('should have the URI fragment identfier `#/m~0n`', function () { + expect(p.uriFragmentIdentifier).to.eql('#/m~0n'); + }); + }); + + describe('a URI fragment identifier of `#/m~0n`', function () { + var p = ptr.create('#/m~0n'); + + it('#get should resolve to data["m~n"]', function () { + expect(p.get(data)).to.equal(data["m~n"]); + }); + + it('#set should succeed changing the referenced value', function () { + var capture = p.get(data); + var updated = { this: "should succeed" }; + p.set(data, updated); + expect(p.get(data)).to.eql(updated); + p.set(data, capture); + }); + + it('should have a path of [ "m~n" ]', function () { + expect(p.path).to.eql(["m~n"]); + }); + + it('should have the pointer `/m~0n`', function () { + expect(p.pointer).to.eql('/m~0n'); + }); + + it('should have the URI fragment identfier `#/m~0n`', function () { + expect(p.uriFragmentIdentifier).to.eql('#/m~0n'); + }); + }); + + describe('a special array pointer from draft-ietf-appsawg-json-pointer-08 `/foo/-`', function () { + var p = ptr.create('/foo/-'); + + it('should not resolve via #get', function () { + expect(p.get(data)).to.not.be.ok(); + }); + + it('should set the next element of the array, repeatedly...', function () { + p.set(data, 'qux'); + expect(data.foo[2]).to.eql('qux'); + }); + + it('...', function () { + p.set(data, 'quux'); + expect(data.foo[3]).to.eql('quux'); + }); + + it('...', function () { + p.set(data, 'corge'); + expect(data.foo[4]).to.eql('corge'); + }); + + it('...', function () { + p.set(data, 'grault'); + expect(data.foo[5]).to.eql('grault'); + }); + }); + + describe('an invalid pointer', function () { + + it('should fail to parse', function () { + expect(function () { + ptr.create('a/'); + }).to.throwError(); + }); + }); + + describe('an invalid URI fragment identifier', function () { + + it('should fail to parse', function () { + expect(function () { + ptr.create('#a'); + }).to.throwError(); + }); + + }); + }); + + describe('can revert namespace using noConflict', function () { + ptr = ptr.noConflict(); + + it('conflict is restored (when applicable)', function () { + // In node there is no global conflict. + if (typeof globalConflict !== 'undefined') { + expect(JsonPointer).to.be(globalConflict); + } + }); + + it('JsonPointer functionality available through result of noConflict()', function () { + expect(ptr).to.have.property('get'); + }); + }); + + describe('when working with complex data', function () { + var data = { + a: 1, + b: { + c: 2 + }, + d: { + e: [{a:3}, {b:4}, {c:5}] + }, + f: null + }; + + + it('#get should return `undefined` when the requested element is undefined (#/g/h)', function () { + var unk = ptr.get(data, '#/g/h'); + expect(unk).to.be.an('undefined'); + }); + + + it('#get should return null when the requested element has a null value (#/f)', function () { + var unk = ptr.get(data, '#/f'); + expect(unk).to.be(null); + }); + }); + + describe('given an sequence of property names ["d", "e~f", "2"]', function () { + var path = ["d", "e~f", "2"]; + + it('#encodePointer should produce a pointer (/d/e~0f/2)', function () { + expect(ptr.encodePointer(path)).to.be('/d/e~0f/2'); + }); + + it('#encodeUriFragmentIdentifier should produce a pointer (#/d/e~0f/2)', function () { + expect(ptr.encodeUriFragmentIdentifier(path)).to.be('#/d/e~0f/2'); + }); + + }); + +}); diff --git a/bin/node_modules/json-path/package.json b/bin/node_modules/json-path/package.json new file mode 100644 index 00000000..b3e6dc58 --- /dev/null +++ b/bin/node_modules/json-path/package.json @@ -0,0 +1,54 @@ +{ + "name": "json-path", + "version": "0.1.3", + "author": { + "name": "Phillip Clark", + "email": "phillip@flitbit.com" + }, + "description": "JSON-Path utility (XPath for JSON) for nodejs and modern browsers.", + "main": "index.js", + "directories": { + "example": "examples", + "test": "test" + }, + "scripts": { + "test": "mocha -R spec" + }, + "dependencies": { + "json-ptr": "~0.1.1" + }, + "devDependencies": { + "expect.js": "~0.2.0", + "mocha": "~1.13.0" + }, + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/flitbit/json-path" + }, + "readme": "json-path (alpha) [![Build Status](https://travis-ci.org/flitbit/json-path.png)](http://travis-ci.org/flitbit/json-path)\n=========\n\nJSON-Path utility (XPath for JSON) for nodejs and modern browsers.\n\nYou may be looking for the prior work [found here](http://goessner.net/articles/JsonPath/). This implementation is a new JSON-Path syntax building on [JSON Pointer (RFC 6901)](http://tools.ietf.org/html/rfc6901) in order to ensure that any valid JSON pointer is also valid JSON-Path.\n\n**Warning:** This is a work in progress - I am actively adding selection expressions and have yet to optimize, but as I use it in a few other projects I went ahead and made it available via `npm`. Until I take the **alpha** tag off you should look to the examples and test to understand the selection path syntax.\n\n## Example\n\n[flikr-example-2.js](https://github.com/flitbit/json-path/blob/master/examples/flikr-example-2.js)\n```javascript\nvar jpath = require('json-path')\n, http = require('http')\n, util = require('util')\n;\n\nvar feed = \"http://api.flickr.com/services/feeds/photos_public.gne?tags=beach,pipeline&tagmode=all&format=json&jsoncallback=processResponse\"\n;\n\nfunction processResponse(json) {\n\tvar res = jpath.resolve(json, \"#/items[first(3)]take(/title,/author,media=/media/m)\")\n\tconsole.log( util.inspect(res, false, 5) );\n}\n\nhttp.get(feed, function(res) {\n\tconsole.log(\"Got response: \" + res.statusCode);\n\n\tvar data = '';\n\n\tres.on('data', function (chunk){\n\t\tdata += chunk;\n\t});\n\n\tres.on('end',function(){\n\t\t// result is formatted as jsonp... this is for illustration only.\n\t\teval(data);\n\t})\n}).on('error', function(e) {\n\tconsole.log(\"Got error: \" + e.message);\n});\n```\n\n## Installation\n\n[node.js](http://nodejs.org)\n```bash\n$ npm install json-path\n```\n\n## Basics\n\nJSON-Path takes a specially formatted *path* statement and applies it to an object graph in order to *select* results. The results are returned as an array of data that matches the path.\n\nMost paths start out looking like a JSON Pointer...\n\n```javascript\n// From: http://goessner.net/articles/JsonPath/\nvar data = {\n store: {\n book: [\n { category: \"reference\",\n author: \"Nigel Rees\",\n title: \"Sayings of the Century\",\n price: 8.95\n },\n { category: \"fiction\",\n author: \"Evelyn Waugh\",\n title: \"Sword of Honour\",\n price: 12.99\n },\n { category: \"fiction\",\n author: \"Herman Melville\",\n title: \"Moby Dick\",\n isbn: \"0-553-21311-3\",\n price: 8.99\n },\n { category: \"fiction\",\n author: \"J. R. R. Tolkien\",\n title: \"The Lord of the Rings\",\n isbn: \"0-395-19395-8\",\n price: 22.99\n }\n ],\n bicycle: {\n color: \"red\",\n price: 19.95\n }\n }\n};\n```\n\nThe pointer `/store/book/0` refers to the first book in the array of books (the one by Nigen Rees).\n\n**Differentiator**\n\nThe thing that makes JSON-Path different from JSON-Pointer is that you can do more than reference a single point in a structure. Instead, you are able to `select` many pieces of data out of a structure, such as:\n\n`/store/book[*]/price`\n```javascript\n[8.95, 12.99, 8.99, 22.99]\n```\n\nIn the preceding example, the path `/store/book[*]/price` has three distinct statements:\n\nStatement | Meaning\n--- | ---\n`/store/book` | Get the book property from store. This is similar to `data.store.book` in javascript.\n`*` | Select any element (or property).\n`/price` | Select the price property.\n\nStarting with the original data, each statement refines the data, usually by selecting parts. As each statement is processed, it is given the results from the previous statement and may make further selections, until the final selections are returned to the caller. It works something like map-reduce; or if you like, something like list-comprehensions.\n\n**Distinguishing Statements**\n\nStatements are distinguished from one another using the square-brackets `[` and `]`. In many cases, the parser can infer where one statement ends and another begins, such as in the preceding example `/store/book[*]/price`. However, the parser understands the equivelant, fully specified path `[/store/book][*][/price]`.\n\nPaths can have as many distinct statements as you need to select just the right data. Since it extends JSON-Pointer, you must take care when your path contains square-brackets as part of property names such as the following contrived example:\n\n```javascript\nvar data = {\n\t'my[': {\n\t\tcontrived: {\n\t\t\t'example]': { should: \"mess with\", your: \"noodel\" } } }\n};\n```\n\nIn this data, the property names `my[` and `example]` are valid but would cuase ambiguities for either the parser or the processing of statements. In these cases, you must use the URI fragment identifier representation described in [RFC 6901 Section 6](http://tools.ietf.org/html/rfc6901#section-6). For instance, to access `data['my['].contrived['example]'].your` you would need the path `#/my%5B/contrived/example%5D/your`.\n\n### More Power\n\nJSON-Path becomes more powerful with a few additional types of statements:\n\nStatement | Meaning\n--- | ---\n`..` | Makes an exhaustive descent, executing the next statement against each branch of the object-graph.\n`take(s0,s1,...)` | Takes one or more items from the structure, each specified as a [JSON Pointer](http://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-09).\n`@` | Uses the user-supplied function to select or filter data.\n\nConsider the following examples using the same preceding data:\n\nPath | Result\n--- | ---\n`/store[..]/price` | Selects all prices, from books and the bicycle.\n`../isbn` | Selects all ISBN numbers, wherever they are in the structure.\n`/store/book[*]take(/author,/title)` | Selects author and title from each book.\n`/store/book[*][@]` | Selects all books, providing each to the user-supplied selection method.\n\n**User Supplied Selection Methods**\n\nJSON-Path supports the use of user-supplied selections - which will need to fill in until the expression syntax is completed. Mindful of the preceding data, consider the following code:\n\n```javascript\nvar jpath = require('json-path')\n, expect = require('expect.js')\n, data = require('./example-data')\n\nvar p = jpath.create(\"#/store/book[*][@]\");\n\nvar res = p.resolve(data, function(obj, accum) {\n if (typeof obj.price === 'number' && obj.price < 10)\n accum.push(obj);\n return accum;\n});\n\n// Expect the result to have the two books priced under $10...\nexpect(res).to.contain(data[\"store\"][\"book\"][0]);\nexpect(res).to.contain(data[\"store\"][\"book\"][2]);\nexpect(res).to.have.length(2);\n\n```\n\nThe example above illustrates user-defined selection given to `resolve` used in place of the `@`.\n\nTo use more than one user-defined selections, refer to selection functions by name and provide implementations when resolving the path:\n\n```javascript\nvar jpath = require('json-path')\n, expect = require('expect.js')\n, data = require('./example-data')\n\nvar p = jpath.create(\"#/store/book[*][@lt10][@format]\");\n\nvar res = p.resolve(data, {\n\n\tlt10: function(obj, accum) {\n\t\tif (typeof obj.price === 'number' && obj.price < 10)\n\t\t\taccum.push(obj);\n\t\treturn accum;\n\t},\n\n\tformat: function(obj, accum) {\n\t\taccum.push(obj.title.concat(\n\t\t\t\": $\", obj.price\n\t\t\t));\n\t\treturn accum;\n\t}\n\n});\n\n// Expect the result to have formatted strings for\n// the twb books priced under $10...\nexpect(res).to.contain(\"Sayings of the Century: $8.95\");\nexpect(res).to.contain(\"Moby Dick: $8.99\");\nexpect(res).to.have.length(2);\n```\n", + "readmeFilename": "README.md", + "bugs": { + "url": "https://github.com/flitbit/json-path/issues" + }, + "_id": "json-path@0.1.3", + "dist": { + "shasum": "dce61357b3b281b28ac647ec0a709bc58a155bf8", + "tarball": "http://registry.npmjs.org/json-path/-/json-path-0.1.3.tgz" + }, + "_from": "json-path@*", + "_npmVersion": "1.3.8", + "_npmUser": { + "name": "flitbit", + "email": "phillip@flitbit.com" + }, + "maintainers": [ + { + "name": "flitbit", + "email": "phillip@flitbit.com" + } + ], + "_shasum": "dce61357b3b281b28ac647ec0a709bc58a155bf8", + "_resolved": "https://registry.npmjs.org/json-path/-/json-path-0.1.3.tgz", + "homepage": "https://github.com/flitbit/json-path" +} diff --git a/bin/node_modules/json-path/releases/json-path+json-ptr-0.1.3.min.js b/bin/node_modules/json-path/releases/json-path+json-ptr-0.1.3.min.js new file mode 100644 index 00000000..2f3f5602 --- /dev/null +++ b/bin/node_modules/json-path/releases/json-path+json-ptr-0.1.3.min.js @@ -0,0 +1 @@ +!function(e){"use strict";var r,n,t=[];if(typeof global==="object"&&global){r=global;n=global.JsonPointer}else if(typeof window!=="undefined"){r=window;n=window.JsonPointer}else{r={}}if(n){t.push(function(){if(r.JsonPointer===f){r.JsonPointer=n;n=e}})}function i(e){if(typeof e!=="string"){throw new TypeError("Invalid type: JSON Pointers are represented as strings.")}if(e.length===0){return[]}if(e[0]!=="/"){throw new ReferenceError("Invalid JSON Pointer syntax. Non-empty pointer must begin with a solidus `/`.")}var r=e.substring(1).split("/"),n=-1,t=r.length;while(++n1&&r[0]==="0"){return-1}if(n===1&&r[0]==="-"){return e.length}while(++t"9"){return-1}}return parseInt(r,10)}function c(e,r){if(typeof e!=="undefined"){var n=e,t=r.length,i=-1,o,s;if(t){while(++is){n=n[s]}else{return}}else{n=n[o]}}return n}else{return e}}}function l(r,n,t,i){if(t.length===0){throw new Error("Cannot set the root object; assign it directly.")}if(typeof r!=="undefined"){var o=r,s=t.length,a=t.length-1,c=-1,l,f,h;if(s){while(++cf){if(c===a){h=o[f];o[f]=n;return h}o=o[f]}else if(o.length===f){o.push(n);return e}else{throw new ReferenceError("Not found: ".concat(i(t.slice(0,c+1),true),"."))}}else{if(c===a){h=o[l];o[l]=n;return h}o=o[l];if(typeof o==="undefined"){throw new ReferenceError("Not found: ".concat(i(t.slice(0,c+1),true),"."))}}}if(c===s){return o}}else{return o}}}function f(e){this.encode=e.length>0&&e[0]==="#"?a:o;if(Array.isArray(e)){this.path=e}else{var r=e.length>0&&e[0]==="#"?s:i;this.path=r(e)}}Object.defineProperty(f.prototype,"pointer",{enumerable:true,get:function(){return o(this.path)}});Object.defineProperty(f.prototype,"uriFragmentIdentifier",{enumerable:true,get:function(){return a(this.path)}});f.prototype.get=function(e){return c(e,this.path)};f.prototype.set=function(e,r){return l(e,r,this.path,this.encode)};f.prototype.toString=function(){return this.pointer};f.create=function(e){return new f(e)};f.get=function(e,r){var n=r.length>0&&r[0]==="#"?s:i;return c(e,n(r))};f.set=function(e,r,n){var t=r.length>0&&r[0]==="#"?a:o;var u=r.length>0&&r[0]==="#"?s:i;return l(e,n,u(r),t)};f.decodePointer=i;f.encodePointer=o;f.decodeUriFragmentIdentifier=s;f.encodeUriFragmentIdentifier=a;f.noConflict=function(){if(t){t.forEach(function(e){e()});t=null}return f};if(typeof module!=="undefined"&&module&&typeof exports==="object"&&exports&&module.exports===exports){module.exports=f}else{r.JsonPointer=f}}();!function(e){"use strict";var r,n,t=[];if(typeof global==="object"&&global){r=global;n=global.JsonPath}else if(typeof window!=="undefined"){r=window;n=window.JsonPath}else{r={}}if(n){t.push(function(){if(r.JsonPath===P){r.JsonPath=n;n=null}})}if(e){t.push(function(r){if(r){e=r}})}else if(!e){if(typeof r.JsonPointer!=="undefined"){e=r.JsonPointer;t.push(function(r){if(r){e=r}})}else if(typeof require==="function"){e=require("json-ptr")}else{throw new Error("Missing JsonPointer (https://github.com/flitbit/json-ptr).")}}function i(e,r){e=Array.isArray(e)?e:[e];var n,t;for(n=0;n="0"&&e[t]<="9"){t=t+1}if(t===r){throw new Error("Expected an integer at position ".concat(t,"."))}return t-r}function x(e,r,n,t,i){var o=1,a;s(e,r,n,t);r+=t.length-1;if(e[r+1]==="("){r+=2;a=v(e,r,n);o=parseInt(e.substring(r,r+a),10);r+=a;s(e,r,n,")");++r}i.push({kind:t[0],index:o});return r}function k(e,r){var n=r.cursor-1,t=e.length,i=e.indexOf("]",r.cursor),o=null,a=null,u=false,c=[];if(i=s&&o>0){r.push(e[o])}}break;case"i":case"s":{if(a.index="0"&&e[t]<="9"){t=t+1}if(t===r){throw new Error("Expected an integer at position ".concat(t,"."))}return t-r}function v(e,r,n,t,i){var s=1,c;o(e,r,n,t);r+=t.length-1;if(e[r+1]==="("){r+=2;c=x(e,r,n);s=parseInt(e.substring(r,r+c),10);r+=c;o(e,r,n,")");++r}i.push({kind:t[0],index:s});return r}function y(e,r){var n=r.cursor-1,t=e.length,i=e.indexOf("]",r.cursor),s=null,c=null,a=false,u=[];if(i=o&&s>0){r.push(e[s])}}break;case"i":case"s":{if(c.index + + + Mocha Tests + + + +
+ + + + + + + + + + + + + \ No newline at end of file diff --git a/bin/node_modules/json-path/test/tests.js b/bin/node_modules/json-path/test/tests.js new file mode 100644 index 00000000..58c61f52 --- /dev/null +++ b/bin/node_modules/json-path/test/tests.js @@ -0,0 +1,679 @@ +/*jshint laxcomma: true*/ +/*globals describe, it*/ + +if (typeof require === 'function') { + var expect = require('expect.js'), + JsonPath = require('..') + ; +} + +var path = JsonPath; + +describe('JSON-path references resolve all valid JSON Pointers', function () { + 'use strict'; + + describe('when working with the example data from the rfc', function () { + var data = { + "foo": ["bar", "baz"], + "": 0, + "a/b": 1, + "c%d": 2, + "e^f": 3, + "g|h": 4, + "i\\j": 5, + "k\"l": 6, + " ": 7, + "m~n": 8 + }; + + describe('with a JSON pointer to the root ()', function () { + var p = path.create(''); + + it('#resolve should resolve to the object itself', function () { + expect(p.resolve(data)).to.contain(data); + }); + }); + + describe('a URI fragment identfier to the root #', function () { + var p = path.create('#'); + + it('#resolve should resolve to the object itself', function () { + expect(p.resolve(data)).to.contain(data); + }); + + }); + + describe('with a JSON pointer of (/foo)', function () { + var p = path.create('/foo'); + + it('#resolve should resolve to data["foo"]', function () { + expect(p.resolve(data)).to.contain(data["foo"]); + }); + + }); + + describe('a URI fragment identifier of (#/foo)', function () { + var p = path.create('#/foo'); + + it('#resolve should resolve to data["foo"]', function () { + expect(p.resolve(data)).to.contain(data["foo"]); + }); + + }); + + describe('with a JSON pointer of (/foo/0)', function () { + var p = path.create('/foo/0'); + + it('#resolve should resolve to data.foo[0]', function () { + expect(p.resolve(data)).to.contain(data.foo[0]); + }); + + }); + + describe('a URI fragment identifier of (#/foo/0)', function () { + var p = path.create('#/foo/0'); + + it('#resolve should resolve to data.foo[0]', function () { + expect(p.resolve(data)).to.contain(data.foo[0]); + }); + + }); + + describe('with a JSON pointer of (/)', function () { + var p = path.create('/'); + + it('#resolve should resolve to data[""]', function () { + expect(p.resolve(data)).to.contain(data[""]); + }); + + }); + + describe('a URI fragment identifier of (#/)', function () { + var p = path.create('#/'); + + it('#resolve should resolve to data[""]', function () { + expect(p.resolve(data)).to.contain(data[""]); + }); + + + }); + + describe('with a JSON pointer of (/a~1b)', function () { + var p = path.create('/a~1b'); + + it('#resolve should resolve to data["a/b"]', function () { + expect(p.resolve(data)).to.contain(data["a/b"]); + }); + + + }); + + describe('a URI fragment identifier of (#/a~1b)', function () { + var p = path.create('#/a~1b'); + + it('#resolve should resolve to data["a/b"]', function () { + expect(p.resolve(data)).to.contain(data["a/b"]); + }); + + + }); + + describe('with a JSON pointer of (/c%d)', function () { + var p = path.create('/c%d'); + + it('#resolve should resolve to data["c%d"]', function () { + expect(p.resolve(data)).to.contain(data["c%d"]); + }); + + + }); + + describe('a URI fragment identifier of (#/c%25d)', function () { + var p = path.create('#/c%25d'); + + it('#resolve should resolve to data["c%d"]', function () { + expect(p.resolve(data)).to.contain(data["c%d"]); + }); + + + }); + + describe('with a JSON pointer of (/e^f)', function () { + var p = path.create('/e^f'); + + it('#resolve should resolve to data["e^f"]', function () { + expect(p.resolve(data)).to.contain(data["e^f"]); + }); + + + }); + + describe('a URI fragment identifier of (#/e%5Ef)', function () { + var p = path.create('#/e%5Ef'); + + it('#resolve should resolve to data["e^f"]', function () { + expect(p.resolve(data)).to.contain(data["e^f"]); + }); + + + }); + + describe('with a JSON pointer of (/g|h)', function () { + var p = path.create('/g|h'); + + it('#resolve should resolve to data["g|h"]', function () { + expect(p.resolve(data)).to.contain(data["g|h"]); + }); + + + }); + + describe('a URI fragment identifier of (#/g%7Ch)', function () { + var p = path.create('#/g%7Ch'); + + it('#resolve should resolve to data["g|h"]', function () { + expect(p.resolve(data)).to.contain(data["g|h"]); + }); + + + }); + + describe('with a JSON pointer of (/i\\j)', function () { + var p = path.create('/i\\j'); + + it('#resolve should resolve to data["i\\j"]', function () { + expect(p.resolve(data)).to.contain(data["i\\j"]); + }); + + + }); + + describe('a URI fragment identifier of (#/i%5Cj)', function () { + var p = path.create('#/i%5Cj'); + + it('#resolve should resolve to data["i\\j"]', function () { + expect(p.resolve(data)).to.contain(data["i\\j"]); + }); + + + }); + + describe('with a JSON pointer of (/k\"l)', function () { + var p = path.create('/k\"l'); + + it('#resolve should resolve to data["k\"l"]', function () { + expect(p.resolve(data)).to.contain(data["k\"l"]); + }); + + + }); + + describe('a URI fragment identifier of (#/k%22l)', function () { + var p = path.create('#/k%22l'); + + it('#resolve should resolve to data["k\"l"]', function () { + expect(p.resolve(data)).to.contain(data["k\"l"]); + }); + + + }); + + describe('with a JSON pointer of (/ )', function () { + var p = path.create('/ '); + + it('#resolve should resolve to data[" "]', function () { + expect(p.resolve(data)).to.contain(data[" "]); + }); + + + }); + + describe('a URI fragment identifier of (#/%20)', function () { + var p = path.create('#/%20'); + + it('#resolve should resolve to data[" "]', function () { + expect(p.resolve(data)).to.contain(data[" "]); + }); + + + }); + + describe('with a JSON pointer of (/m~0n)', function () { + var p = path.create('/m~0n'); + + it('#resolve should resolve to data["m~n"]', function () { + expect(p.resolve(data)).to.contain(data["m~n"]); + }); + }); + + describe('a URI fragment identifier of (#/m~0n)', function () { + var p = path.create('#/m~0n'); + + it('#resolve should resolve to data["m~n"]', function () { + expect(p.resolve(data)).to.contain(data["m~n"]); + }); + + }); + + describe('a special array pointer from draft-ietf-appsawg-json-pointer-08 (/foo/-)', function () { + var p = path.create('/foo/-'); + + it('should not resolve via #resolve', function () { + expect(p.resolve(data)).to.be.empty(); + }); + + }); + + describe('an invalid pointer', function () { + + it('should fail to parse', function () { + expect(function () { + path.create('a/'); + }).to.throwError(); + }); + }); + + describe('an invalid URI fragment identifier', function () { + + it('should fail to parse', function () { + expect(function () { + path.create('#a'); + }).to.throwError(); + }); + + }); + }); + + describe('when working with complex data', function () { + var data = { + a: 1, + b: { + c: 2 + }, + d: { + e: [{a:3}, {b:4}, {c:5}] + }, + f: null + }; + + it('#resolve should return an empty array when the requested element is undefined (#/g/h)', function () { + var p = path.create('#/g/h'); + var unk = p.resolve(data); + expect(unk).to.be.empty(); + }); + + it('#resolve should return null when the requested element has a null value (#/f)', function () { + var p = path.create('#/f'); + var unk = p.resolve(data); + expect(unk).to.contain(null); + }); + }); +}); + + describe('using the data defined in prior JSON-Path work (http://goessner.net/articles/JsonPath/)', function () { + var data = { + store: + { + book: [ + { + category: "reference", + author: "Nigel Rees", + title: "Sayings of the Century", + price: 8.95 + }, + { + category: "fiction", + author: "Evelyn Waugh", + title: "Sword of Honour", + price: 12.99 + }, + { + category: "fiction", + author: "Herman Melville", + title: "Moby Dick", + isbn: "0-553-21311-3", + price: 8.99 + }, + { + category: "fiction", + author: "J. R. R. Tolkien", + title: "The Lord of the Rings", + isbn: "0-395-19395-8", + price: 22.99 + } + ], + bicycle: + { + color: "red", + price: 19.95 + } + } + }; + + describe('the path /store/book[*][/author]', function () { + it('selects the authors of all books', function () { + var p = path.create("/store/book[*][/author]"); + var res = p.resolve(data); + expect(res).to.contain('Evelyn Waugh'); + expect(res).to.contain('Nigel Rees'); + expect(res).to.contain('Herman Melville'); + expect(res).to.contain('J. R. R. Tolkien'); + expect(res).to.have.length(4); + }); + }); + + describe('the path ../author', function () { + it('selects the authors of all books', function () { + var p = path.create("..#/author"); + var res = p.resolve(data); + expect(res).to.contain('Evelyn Waugh'); + expect(res).to.contain('Nigel Rees'); + expect(res).to.contain('Herman Melville'); + expect(res).to.contain('J. R. R. Tolkien'); + expect(res).to.have.length(4); + }); + }); + + describe('the path ..#/author', function () { + it('selects the authors of all books', function () { + var p = path.create("..#/author"); + var res = p.resolve(data); + expect(res).to.contain('Evelyn Waugh'); + expect(res).to.contain('Nigel Rees'); + expect(res).to.contain('Herman Melville'); + expect(res).to.contain('J. R. R. Tolkien'); + expect(res).to.have.length(4); + }); + }); + + describe('the path #/store[*]', function () { + it('selects the items of the store', function () { + var p = path.create("#/store[*]"); + var res = p.resolve(data); + expect(res).to.contain(data.store.book); + expect(res).to.contain(data.store.bicycle); + expect(res).to.have.length(2); + }); + }); + + describe('the path #/store[..#/price]', function () { + it('selects the prices from all items in the store', function () { + var p = path.create("#/store[..#/price]"), + res = p.resolve(data); + expect(res).to.contain(8.95); + expect(res).to.contain(12.99); + expect(res).to.contain(8.99); + expect(res).to.contain(22.99); + expect(res).to.contain(19.95); + expect(res).to.have.length(5); + }); + }); + + describe('the path ../book[0]', function () { + it('selects the first book', function () { + var p = path.create("../book[0]"), + res = p.resolve(data); + expect(res).to.contain(data["store"]["book"][0]); + expect(res).to.have.length(1); + }); + }); + + describe('the path ../book[1]', function () { + it('selects the second book', function () { + var p = path.create("../book[1]"), + res = p.resolve(data); + expect(res).to.contain(data["store"]["book"][1]); + expect(res).to.have.length(1); + }); + }); + + describe('the path ../book[2]', function () { + it('selects the third book', function () { + var p = path.create("../book[2]"), + res = p.resolve(data); + expect(res).to.contain(data["store"]["book"][2]); + expect(res).to.have.length(1); + }); + }); + + describe('the path ../book[3]', function () { + it('selects the fourth book', function () { + var p = path.create("../book[3]"), + res = p.resolve(data); + expect(res).to.contain(data["store"]["book"][3]); + expect(res).to.have.length(1); + }); + }); + + describe('the path ../book[1, 3]', function () { + it('selects the second and fourth book', function () { + var p = path.create("../book[1, 3]"), + res = p.resolve(data); + expect(res).to.contain(data["store"]["book"][1]); + expect(res).to.contain(data["store"]["book"][3]); + expect(res).to.have.length(2); + }); + }); + + describe('the path ../book[1..3]', function () { + it('selects the second thru fourth book', function () { + var p = path.create("../book[1..3]"), + res = p.resolve(data); + expect(res).to.contain(data["store"]["book"][1]); + expect(res).to.contain(data["store"]["book"][2]); + expect(res).to.contain(data["store"]["book"][3]); + expect(res).to.have.length(3); + }); + }); + + describe('the path /store/book[last]', function () { + it('selects the last book', function () { + var p = path.create("/store/book[last]"), + res = p.resolve(data); + expect(res).to.contain(data["store"]["book"][data.store.book.length - 1]); + expect(res).to.have.length(1); + }); + }); + + describe('the path /store/book[first]', function () { + it('selects the first book', function () { + var p = path.create("/store/book[first]"), + res = p.resolve(data); + expect(res).to.contain(data["store"]["book"][0]); + expect(res).to.have.length(1); + }); + }); + + describe('the path /store/book[first, 2, last]', function () { + it('selects the first, third, and last book', function () { + var p = path.create("/store/book[first, 2, last]"), + res = p.resolve(data); + expect(res).to.contain(data["store"]["book"][0]); + expect(res).to.contain(data["store"]["book"][2]); + expect(res).to.contain(data["store"]["book"][data.store.book.length - 1]); + expect(res).to.have.length(3); + }); + }); + + describe('the path /store/book[first(2)]', function () { + it('selects the first 2 books', function () { + var p = path.create("/store/book[first(2)]"), + res = p.resolve(data); + expect(res).to.contain(data["store"]["book"][0]); + expect(res).to.contain(data["store"]["book"][1]); + expect(res).to.have.length(2); + }); + }); + + + describe('the path /store/book[count]', function () { + it('selects the book count', function () { + var p = path.create("/store/book[count]"), + res = p.resolve(data); + expect(res).to.contain(data.store.book.length); + expect(res).to.have.length(1); + }); + }); + + describe('the path /store/book[last(2)]', function () { + it('selects the last 2 books', function () { + var p = path.create("/store/book[last(2)]"), + res = p.resolve(data); + expect(res).to.contain(data["store"]["book"][data.store.book.length - 1]); + expect(res).to.contain(data["store"]["book"][data.store.book.length - 2]); + expect(res).to.have.length(2); + }); + }); + + describe('the path /store/book[*]/isbn', function () { + it('selects the ISBNs of the 2 books with ISBNs', function () { + var p = path.create("/store/book[*]/isbn"), + res = p.resolve(data); + expect(res).to.contain(data["store"]["book"][2]["isbn"]); + expect(res).to.contain(data["store"]["book"][3]["isbn"]); + expect(res).to.have.length(2); + }); + }); + + describe('the path #/store/book[*]#/isbn', function () { + it('selects the ISBNs of the 2 books with ISBNs', function () { + var p = path.create("#/store/book[*]#/isbn"), + res = p.resolve(data); + expect(res).to.contain(data["store"]["book"][2]["isbn"]); + expect(res).to.contain(data["store"]["book"][3]["isbn"]); + expect(res).to.have.length(2); + }); + }); + + describe('the path ../isbn', function () { + it('selects all ISBNs, wherever they are in the structure', function () { + var p = path.create("../isbn"); + var res = p.resolve(data); + expect(res).to.contain(data["store"]["book"][2]["isbn"]); + expect(res).to.contain(data["store"]["book"][3]["isbn"]); + expect(res).to.have.length(2); + }); + }); + + describe('can revert namespace using noConflict', function () { + path = path.noConflict(); + + it('conflict is restored (when applicable)', function () { + // In node there is no global conflict. + if (typeof globalConflict !== 'undefined') { + expect(JsonPath).to.be(globalConflict); + } + }); + + it('JsonPath functionality available through result of noConflict()', function () { + expect(path).to.have.property('parseSelector'); + }); + }); + + + describe('the path #/store/book[*][take(/author,/title)]', function () { + it('selects from each book the author and title', function () { + p = path.parseSelector("..#/book[*][take(/author,/title)]"); + res = path.executeSelectors(data, p); + expect(res[0]).to.eql({ + author: "Nigel Rees", + title: "Sayings of the Century" + }); + expect(res[1]).to.eql({ + author: "Evelyn Waugh", + title: "Sword of Honour" + }); + expect(res[2]).to.eql({ + author: "Herman Melville", + title: "Moby Dick" + }); + expect(res[3]).to.eql({ + author: "J. R. R. Tolkien", + title: "The Lord of the Rings" + }); + }); + }); + + describe('the path #/store/book[*]take(/title,cost=/price)', function () { + it('selects from each book the title and price as cost', function () { + p = path.parseSelector("..#/book[*]take(/title,cost=/price)"); + res = path.executeSelectors(data, p); + expect(res[0]).to.eql({ + title: "Sayings of the Century", + cost: 8.95 + }); + expect(res[1]).to.eql({ + title: "Sword of Honour", + cost: 12.99 + }); + expect(res[2]).to.eql({ + title: "Moby Dick", + cost: 8.99 + }); + expect(res[3]).to.eql({ + title: "The Lord of the Rings", + cost: 22.99 + }); + }); + }); + + describe('path with user-supplied selector #/store/book[*][@]', function () { + it('selects the books with prices greater than ten', function () { + var p = path.create("#/store/book[*][@]"), + res = p.resolve(data, function (obj, accum, sel) { + if (obj.price && obj.price < 10) + accum.push(obj); + return accum; + }); + expect(res).to.contain(data["store"]["book"][0]); + expect(res).to.contain(data["store"]["book"][2]); + expect(res).to.have.length(2); + }); + }); + + describe('path with user-supplied selector #/store/book[*][@gt10]', function () { + it('selects the books with prices greater than ten', function () { + var p = path.create("#/store/book[*][@gt10]"), + res = p.resolve(data, { gt10: function (obj, accum, sel) { + if (obj.price && obj.price < 10) + accum.push(obj); + return accum; + }}); + expect(res).to.contain(data["store"]["book"][0]); + expect(res).to.contain(data["store"]["book"][2]); + expect(res).to.have.length(2); + }); + }); + + describe('path with user-supplied selector and function lookup #/store/book[*][@gt10]', function () { + it('selects the books with prices greater than ten', function () { + var p = path.create("#/store/book[*][@gt10]"), + resolver = function (fName) { + return function (obj, accum, sel) { + if (obj.price && obj.price < 10) + accum.push(obj); + return accum; + }}; + + res = p.resolve(data, {RESOLVER: resolver}); + + expect(res).to.contain(data["store"]["book"][0]); + expect(res).to.contain(data["store"]["book"][2]); + expect(res).to.have.length(2); + }); + }); + + describe('path with user-supplied selector followed by further path #/store/book[*][@gt10]/category', function () { + it('selects the books with prices greater than ten', function () { + var p = path.create("#/store/book[*][@gt10]/category"), + res = p.resolve(data, { gt10: function (obj, accum, sel) { + if (obj.price && obj.price < 10) + accum.push(obj); + return accum; + }}); + expect(res).to.contain(data["store"]["book"][0].category); + expect(res).to.contain(data["store"]["book"][2].category); + expect(res).to.have.length(2); + }); + }); + }); diff --git a/bin/node_modules/uglify-js/.npmignore b/bin/node_modules/uglify-js/.npmignore new file mode 100644 index 00000000..94fceeb2 --- /dev/null +++ b/bin/node_modules/uglify-js/.npmignore @@ -0,0 +1,2 @@ +tmp/ +node_modules/ diff --git a/bin/node_modules/uglify-js/.travis.yml b/bin/node_modules/uglify-js/.travis.yml new file mode 100644 index 00000000..b0243cf7 --- /dev/null +++ b/bin/node_modules/uglify-js/.travis.yml @@ -0,0 +1,5 @@ +language: node_js +node_js: + - "0.8" + - "0.10" + - "0.11" diff --git a/bin/node_modules/uglify-js/LICENSE b/bin/node_modules/uglify-js/LICENSE new file mode 100644 index 00000000..dd7706f0 --- /dev/null +++ b/bin/node_modules/uglify-js/LICENSE @@ -0,0 +1,29 @@ +UglifyJS is released under the BSD license: + +Copyright 2012-2013 (c) Mihai Bazon + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + * Redistributions of source code must retain the above + copyright notice, this list of conditions and the following + disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials + provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS†AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, +OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR +TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF +THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. diff --git a/bin/node_modules/uglify-js/README.md b/bin/node_modules/uglify-js/README.md new file mode 100644 index 00000000..27d06cd6 --- /dev/null +++ b/bin/node_modules/uglify-js/README.md @@ -0,0 +1,640 @@ +UglifyJS 2 +========== +[![Build Status](https://travis-ci.org/mishoo/UglifyJS2.png)](https://travis-ci.org/mishoo/UglifyJS2) + +UglifyJS is a JavaScript parser, minifier, compressor or beautifier toolkit. + +This page documents the command line utility. For +[API and internals documentation see my website](http://lisperator.net/uglifyjs/). +There's also an +[in-browser online demo](http://lisperator.net/uglifyjs/#demo) (for Firefox, +Chrome and probably Safari). + +Install +------- + +First make sure you have installed the latest version of [node.js](http://nodejs.org/) +(You may need to restart your computer after this step). + +From NPM for use as a command line app: + + npm install uglify-js -g + +From NPM for programmatic use: + + npm install uglify-js + +From Git: + + git clone git://github.com/mishoo/UglifyJS2.git + cd UglifyJS2 + npm link . + +Usage +----- + + uglifyjs [input files] [options] + +UglifyJS2 can take multiple input files. It's recommended that you pass the +input files first, then pass the options. UglifyJS will parse input files +in sequence and apply any compression options. The files are parsed in the +same global scope, that is, a reference from a file to some +variable/function declared in another file will be matched properly. + +If you want to read from STDIN instead, pass a single dash instead of input +files. + +The available options are: + +``` + --source-map Specify an output file where to generate source map. + [string] + --source-map-root The path to the original source to be included in the + source map. [string] + --source-map-url The path to the source map to be added in //# + sourceMappingURL. Defaults to the value passed with + --source-map. [string] + --source-map-include-sources + Pass this flag if you want to include the content of + source files in the source map as sourcesContent + property. [boolean] + --in-source-map Input source map, useful if you're compressing JS that was + generated from some other original code. + --screw-ie8 Pass this flag if you don't care about full compliance + with Internet Explorer 6-8 quirks (by default UglifyJS + will try to be IE-proof). [boolean] + --expr Parse a single expression, rather than a program (for + parsing JSON) [boolean] + -p, --prefix Skip prefix for original filenames that appear in source + maps. For example -p 3 will drop 3 directories from file + names and ensure they are relative paths. You can also + specify -p relative, which will make UglifyJS figure out + itself the relative paths between original sources, the + source map and the output file. [string] + -o, --output Output file (default STDOUT). + -b, --beautify Beautify output/specify output options. [string] + -m, --mangle Mangle names/pass mangler options. [string] + -r, --reserved Reserved names to exclude from mangling. + -c, --compress Enable compressor/pass compressor options. Pass options + like -c hoist_vars=false,if_return=false. Use -c with no + argument to use the default compression options. [string] + -d, --define Global definitions [string] + -e, --enclose Embed everything in a big function, with a configurable + parameter/argument list. [string] + --comments Preserve copyright comments in the output. By default this + works like Google Closure, keeping JSDoc-style comments + that contain "@license" or "@preserve". You can optionally + pass one of the following arguments to this flag: + - "all" to keep all comments + - a valid JS regexp (needs to start with a slash) to keep + only comments that match. + Note that currently not *all* comments can be kept when + compression is on, because of dead code removal or + cascading statements into sequences. [string] + --preamble Preamble to prepend to the output. You can use this to + insert a comment, for example for licensing information. + This will not be parsed, but the source map will adjust + for its presence. + --stats Display operations run time on STDERR. [boolean] + --acorn Use Acorn for parsing. [boolean] + --spidermonkey Assume input files are SpiderMonkey AST format (as JSON). + [boolean] + --self Build itself (UglifyJS2) as a library (implies + --wrap=UglifyJS --export-all) [boolean] + --wrap Embed everything in a big function, making the “exports†+ and “global†variables available. You need to pass an + argument to this option to specify the name that your + module will take when included in, say, a browser. + [string] + --export-all Only used when --wrap, this tells UglifyJS to add code to + automatically export all globals. [boolean] + --lint Display some scope warnings [boolean] + -v, --verbose Verbose [boolean] + -V, --version Print version number and exit. [boolean] +``` + +Specify `--output` (`-o`) to declare the output file. Otherwise the output +goes to STDOUT. + +## Source map options + +UglifyJS2 can generate a source map file, which is highly useful for +debugging your compressed JavaScript. To get a source map, pass +`--source-map output.js.map` (full path to the file where you want the +source map dumped). + +Additionally you might need `--source-map-root` to pass the URL where the +original files can be found. In case you are passing full paths to input +files to UglifyJS, you can use `--prefix` (`-p`) to specify the number of +directories to drop from the path prefix when declaring files in the source +map. + +For example: + + uglifyjs /home/doe/work/foo/src/js/file1.js \ + /home/doe/work/foo/src/js/file2.js \ + -o foo.min.js \ + --source-map foo.min.js.map \ + --source-map-root http://foo.com/src \ + -p 5 -c -m + +The above will compress and mangle `file1.js` and `file2.js`, will drop the +output in `foo.min.js` and the source map in `foo.min.js.map`. The source +mapping will refer to `http://foo.com/src/js/file1.js` and +`http://foo.com/src/js/file2.js` (in fact it will list `http://foo.com/src` +as the source map root, and the original files as `js/file1.js` and +`js/file2.js`). + +### Composed source map + +When you're compressing JS code that was output by a compiler such as +CoffeeScript, mapping to the JS code won't be too helpful. Instead, you'd +like to map back to the original code (i.e. CoffeeScript). UglifyJS has an +option to take an input source map. Assuming you have a mapping from +CoffeeScript → compiled JS, UglifyJS can generate a map from CoffeeScript → +compressed JS by mapping every token in the compiled JS to its original +location. + +To use this feature you need to pass `--in-source-map +/path/to/input/source.map`. Normally the input source map should also point +to the file containing the generated JS, so if that's correct you can omit +input files from the command line. + +## Mangler options + +To enable the mangler you need to pass `--mangle` (`-m`). The following +(comma-separated) options are supported: + +- `sort` — to assign shorter names to most frequently used variables. This + saves a few hundred bytes on jQuery before gzip, but the output is + _bigger_ after gzip (and seems to happen for other libraries I tried it + on) therefore it's not enabled by default. + +- `toplevel` — mangle names declared in the toplevel scope (disabled by + default). + +- `eval` — mangle names visible in scopes where `eval` or `with` are used + (disabled by default). + +When mangling is enabled but you want to prevent certain names from being +mangled, you can declare those names with `--reserved` (`-r`) — pass a +comma-separated list of names. For example: + + uglifyjs ... -m -r '$,require,exports' + +to prevent the `require`, `exports` and `$` names from being changed. + +## Compressor options + +You need to pass `--compress` (`-c`) to enable the compressor. Optionally +you can pass a comma-separated list of options. Options are in the form +`foo=bar`, or just `foo` (the latter implies a boolean option that you want +to set `true`; it's effectively a shortcut for `foo=true`). + +- `sequences` -- join consecutive simple statements using the comma operator + +- `properties` -- rewrite property access using the dot notation, for + example `foo["bar"] → foo.bar` + +- `dead_code` -- remove unreachable code + +- `drop_debugger` -- remove `debugger;` statements + +- `unsafe` (default: false) -- apply "unsafe" transformations (discussion below) + +- `conditionals` -- apply optimizations for `if`-s and conditional + expressions + +- `comparisons` -- apply certain optimizations to binary nodes, for example: + `!(a <= b) → a > b` (only when `unsafe`), attempts to negate binary nodes, + e.g. `a = !b && !c && !d && !e → a=!(b||c||d||e)` etc. + +- `evaluate` -- attempt to evaluate constant expressions + +- `booleans` -- various optimizations for boolean context, for example `!!a + ? b : c → a ? b : c` + +- `loops` -- optimizations for `do`, `while` and `for` loops when we can + statically determine the condition + +- `unused` -- drop unreferenced functions and variables + +- `hoist_funs` -- hoist function declarations + +- `hoist_vars` (default: false) -- hoist `var` declarations (this is `false` + by default because it seems to increase the size of the output in general) + +- `if_return` -- optimizations for if/return and if/continue + +- `join_vars` -- join consecutive `var` statements + +- `cascade` -- small optimization for sequences, transform `x, x` into `x` + and `x = something(), x` into `x = something()` + +- `warnings` -- display warnings when dropping unreachable code or unused + declarations etc. + +- `negate_iife` -- negate "Immediately-Called Function Expressions" + where the return value is discarded, to avoid the parens that the + code generator would insert. + +- `pure_getters` -- the default is `false`. If you pass `true` for + this, UglifyJS will assume that object property access + (e.g. `foo.bar` or `foo["bar"]`) doesn't have any side effects. + +- `pure_funcs` -- default `null`. You can pass an array of names and + UglifyJS will assume that those functions do not produce side + effects. DANGER: will not check if the name is redefined in scope. + An example case here, for instance `var q = Math.floor(a/b)`. If + variable `q` is not used elsewhere, UglifyJS will drop it, but will + still keep the `Math.floor(a/b)`, not knowing what it does. You can + pass `pure_funcs: [ 'Math.floor' ]` to let it know that this + function won't produce any side effect, in which case the whole + statement would get discarded. The current implementation adds some + overhead (compression will be slower). + +- `drop_console` -- default `false`. Pass `true` to discard calls to + `console.*` functions. + +### The `unsafe` option + +It enables some transformations that *might* break code logic in certain +contrived cases, but should be fine for most code. You might want to try it +on your own code, it should reduce the minified size. Here's what happens +when this flag is on: + +- `new Array(1, 2, 3)` or `Array(1, 2, 3)` → `[1, 2, 3 ]` +- `new Object()` → `{}` +- `String(exp)` or `exp.toString()` → `"" + exp` +- `new Object/RegExp/Function/Error/Array (...)` → we discard the `new` +- `typeof foo == "undefined"` → `foo === void 0` +- `void 0` → `undefined` (if there is a variable named "undefined" in + scope; we do it because the variable name will be mangled, typically + reduced to a single character). + +### Conditional compilation + +You can use the `--define` (`-d`) switch in order to declare global +variables that UglifyJS will assume to be constants (unless defined in +scope). For example if you pass `--define DEBUG=false` then, coupled with +dead code removal UglifyJS will discard the following from the output: +```javascript +if (DEBUG) { + console.log("debug stuff"); +} +``` + +UglifyJS will warn about the condition being always false and about dropping +unreachable code; for now there is no option to turn off only this specific +warning, you can pass `warnings=false` to turn off *all* warnings. + +Another way of doing that is to declare your globals as constants in a +separate file and include it into the build. For example you can have a +`build/defines.js` file with the following: +```javascript +const DEBUG = false; +const PRODUCTION = true; +// etc. +``` + +and build your code like this: + + uglifyjs build/defines.js js/foo.js js/bar.js... -c + +UglifyJS will notice the constants and, since they cannot be altered, it +will evaluate references to them to the value itself and drop unreachable +code as usual. The possible downside of this approach is that the build +will contain the `const` declarations. + + +## Beautifier options + +The code generator tries to output shortest code possible by default. In +case you want beautified output, pass `--beautify` (`-b`). Optionally you +can pass additional arguments that control the code output: + +- `beautify` (default `true`) -- whether to actually beautify the output. + Passing `-b` will set this to true, but you might need to pass `-b` even + when you want to generate minified code, in order to specify additional + arguments, so you can use `-b beautify=false` to override it. +- `indent-level` (default 4) +- `indent-start` (default 0) -- prefix all lines by that many spaces +- `quote-keys` (default `false`) -- pass `true` to quote all keys in literal + objects +- `space-colon` (default `true`) -- insert a space after the colon signs +- `ascii-only` (default `false`) -- escape Unicode characters in strings and + regexps +- `inline-script` (default `false`) -- escape the slash in occurrences of + ` 0) { + sys.error("WARN: Ignoring input files since --self was passed"); + } + files = UglifyJS.FILES; + if (!ARGS.wrap) ARGS.wrap = "UglifyJS"; + ARGS.export_all = true; +} + +var ORIG_MAP = ARGS.in_source_map; + +if (ORIG_MAP) { + ORIG_MAP = JSON.parse(fs.readFileSync(ORIG_MAP)); + if (files.length == 0) { + sys.error("INFO: Using file from the input source map: " + ORIG_MAP.file); + files = [ ORIG_MAP.file ]; + } + if (ARGS.source_map_root == null) { + ARGS.source_map_root = ORIG_MAP.sourceRoot; + } +} + +if (files.length == 0) { + files = [ "-" ]; +} + +if (files.indexOf("-") >= 0 && ARGS.source_map) { + sys.error("ERROR: Source map doesn't work with input from STDIN"); + process.exit(1); +} + +if (files.filter(function(el){ return el == "-" }).length > 1) { + sys.error("ERROR: Can read a single file from STDIN (two or more dashes specified)"); + process.exit(1); +} + +var STATS = {}; +var OUTPUT_FILE = ARGS.o; +var TOPLEVEL = null; +var P_RELATIVE = ARGS.p && ARGS.p == "relative"; +var SOURCES_CONTENT = {}; + +var SOURCE_MAP = ARGS.source_map ? UglifyJS.SourceMap({ + file: P_RELATIVE ? path.relative(path.dirname(ARGS.source_map), OUTPUT_FILE) : OUTPUT_FILE, + root: ARGS.source_map_root, + orig: ORIG_MAP, +}) : null; + +OUTPUT_OPTIONS.source_map = SOURCE_MAP; + +try { + var output = UglifyJS.OutputStream(OUTPUT_OPTIONS); + var compressor = COMPRESS && UglifyJS.Compressor(COMPRESS); +} catch(ex) { + if (ex instanceof UglifyJS.DefaultsError) { + sys.error(ex.msg); + sys.error("Supported options:"); + sys.error(sys.inspect(ex.defs)); + process.exit(1); + } +} + +async.eachLimit(files, 1, function (file, cb) { + read_whole_file(file, function (err, code) { + if (err) { + sys.error("ERROR: can't read file: " + file); + process.exit(1); + } + if (ARGS.p != null) { + if (P_RELATIVE) { + file = path.relative(path.dirname(ARGS.source_map), file); + } else { + var p = parseInt(ARGS.p, 10); + if (!isNaN(p)) { + file = file.replace(/^\/+/, "").split(/\/+/).slice(ARGS.p).join("/"); + } + } + } + SOURCES_CONTENT[file] = code; + time_it("parse", function(){ + if (ARGS.spidermonkey) { + var program = JSON.parse(code); + if (!TOPLEVEL) TOPLEVEL = program; + else TOPLEVEL.body = TOPLEVEL.body.concat(program.body); + } + else if (ARGS.acorn) { + TOPLEVEL = acorn.parse(code, { + locations : true, + sourceFile : file, + program : TOPLEVEL + }); + } + else { + try { + TOPLEVEL = UglifyJS.parse(code, { + filename : file, + toplevel : TOPLEVEL, + expression : ARGS.expr, + }); + } catch(ex) { + if (ex instanceof UglifyJS.JS_Parse_Error) { + sys.error("Parse error at " + file + ":" + ex.line + "," + ex.col); + sys.error(ex.message); + sys.error(ex.stack); + process.exit(1); + } + throw ex; + } + }; + }); + cb(); + }); +}, function () { + if (ARGS.acorn || ARGS.spidermonkey) time_it("convert_ast", function(){ + TOPLEVEL = UglifyJS.AST_Node.from_mozilla_ast(TOPLEVEL); + }); + + if (ARGS.wrap) { + TOPLEVEL = TOPLEVEL.wrap_commonjs(ARGS.wrap, ARGS.export_all); + } + + if (ARGS.enclose) { + var arg_parameter_list = ARGS.enclose; + if (arg_parameter_list === true) { + arg_parameter_list = []; + } + else if (!(arg_parameter_list instanceof Array)) { + arg_parameter_list = [arg_parameter_list]; + } + TOPLEVEL = TOPLEVEL.wrap_enclose(arg_parameter_list); + } + + var SCOPE_IS_NEEDED = COMPRESS || MANGLE || ARGS.lint; + + if (SCOPE_IS_NEEDED) { + time_it("scope", function(){ + TOPLEVEL.figure_out_scope({ screw_ie8: ARGS.screw_ie8 }); + if (ARGS.lint) { + TOPLEVEL.scope_warnings(); + } + }); + } + + if (COMPRESS) { + time_it("squeeze", function(){ + TOPLEVEL = TOPLEVEL.transform(compressor); + }); + } + + if (SCOPE_IS_NEEDED) { + time_it("scope", function(){ + TOPLEVEL.figure_out_scope({ screw_ie8: ARGS.screw_ie8 }); + if (MANGLE) { + TOPLEVEL.compute_char_frequency(MANGLE); + } + }); + } + + if (MANGLE) time_it("mangle", function(){ + TOPLEVEL.mangle_names(MANGLE); + }); + + if (ARGS.source_map_include_sources) { + for (var file in SOURCES_CONTENT) { + if (SOURCES_CONTENT.hasOwnProperty(file)) { + SOURCE_MAP.get().setSourceContent(file, SOURCES_CONTENT[file]); + } + } + } + + time_it("generate", function(){ + TOPLEVEL.print(output); + }); + + output = output.get(); + + if (SOURCE_MAP) { + fs.writeFileSync(ARGS.source_map, SOURCE_MAP, "utf8"); + var source_map_url = ARGS.source_map_url || ( + P_RELATIVE + ? path.relative(path.dirname(OUTPUT_FILE), ARGS.source_map) + : ARGS.source_map + ); + output += "\n//# sourceMappingURL=" + source_map_url; + } + + if (OUTPUT_FILE) { + fs.writeFileSync(OUTPUT_FILE, output, "utf8"); + } else { + sys.print(output); + } + + if (ARGS.stats) { + sys.error(UglifyJS.string_template("Timing information (compressed {count} files):", { + count: files.length + })); + for (var i in STATS) if (STATS.hasOwnProperty(i)) { + sys.error(UglifyJS.string_template("- {name}: {time}s", { + name: i, + time: (STATS[i] / 1000).toFixed(3) + })); + } + } +}); + +/* -----[ functions ]----- */ + +function normalize(o) { + for (var i in o) if (o.hasOwnProperty(i) && /-/.test(i)) { + o[i.replace(/-/g, "_")] = o[i]; + delete o[i]; + } +} + +function getOptions(x, constants) { + x = ARGS[x]; + if (!x) return null; + var ret = {}; + if (x !== true) { + var ast; + try { + ast = UglifyJS.parse(x, { expression: true }); + } catch(ex) { + if (ex instanceof UglifyJS.JS_Parse_Error) { + sys.error("Error parsing arguments in: " + x); + process.exit(1); + } + } + ast.walk(new UglifyJS.TreeWalker(function(node){ + if (node instanceof UglifyJS.AST_Seq) return; // descend + if (node instanceof UglifyJS.AST_Assign) { + var name = node.left.print_to_string({ beautify: false }).replace(/-/g, "_"); + var value = node.right; + if (constants) + value = new Function("return (" + value.print_to_string() + ")")(); + ret[name] = value; + return true; // no descend + } + if (node instanceof UglifyJS.AST_Symbol || node instanceof UglifyJS.AST_Binary) { + var name = node.print_to_string({ beautify: false }).replace(/-/g, "_"); + ret[name] = true; + return true; // no descend + } + sys.error(node.TYPE) + sys.error("Error parsing arguments in: " + x); + process.exit(1); + })); + } + return ret; +} + +function read_whole_file(filename, cb) { + if (filename == "-") { + var chunks = []; + process.stdin.setEncoding('utf-8'); + process.stdin.on('data', function (chunk) { + chunks.push(chunk); + }).on('end', function () { + cb(null, chunks.join("")); + }); + process.openStdin(); + } else { + fs.readFile(filename, "utf-8", cb); + } +} + +function time_it(name, cont) { + var t1 = new Date().getTime(); + var ret = cont(); + if (ARGS.stats) { + var spent = new Date().getTime() - t1; + if (STATS[name]) STATS[name] += spent; + else STATS[name] = spent; + } + return ret; +} diff --git a/bin/node_modules/uglify-js/lib/ast.js b/bin/node_modules/uglify-js/lib/ast.js new file mode 100644 index 00000000..051cd2fb --- /dev/null +++ b/bin/node_modules/uglify-js/lib/ast.js @@ -0,0 +1,984 @@ +/*********************************************************************** + + A JavaScript tokenizer / parser / beautifier / compressor. + https://github.com/mishoo/UglifyJS2 + + -------------------------------- (C) --------------------------------- + + Author: Mihai Bazon + + http://mihai.bazon.net/blog + + Distributed under the BSD license: + + Copyright 2012 (c) Mihai Bazon + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above + copyright notice, this list of conditions and the following + disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials + provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS†AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF + THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + ***********************************************************************/ + +"use strict"; + +function DEFNODE(type, props, methods, base) { + if (arguments.length < 4) base = AST_Node; + if (!props) props = []; + else props = props.split(/\s+/); + var self_props = props; + if (base && base.PROPS) + props = props.concat(base.PROPS); + var code = "return function AST_" + type + "(props){ if (props) { "; + for (var i = props.length; --i >= 0;) { + code += "this." + props[i] + " = props." + props[i] + ";"; + } + var proto = base && new base; + if (proto && proto.initialize || (methods && methods.initialize)) + code += "this.initialize();"; + code += "}}"; + var ctor = new Function(code)(); + if (proto) { + ctor.prototype = proto; + ctor.BASE = base; + } + if (base) base.SUBCLASSES.push(ctor); + ctor.prototype.CTOR = ctor; + ctor.PROPS = props || null; + ctor.SELF_PROPS = self_props; + ctor.SUBCLASSES = []; + if (type) { + ctor.prototype.TYPE = ctor.TYPE = type; + } + if (methods) for (i in methods) if (methods.hasOwnProperty(i)) { + if (/^\$/.test(i)) { + ctor[i.substr(1)] = methods[i]; + } else { + ctor.prototype[i] = methods[i]; + } + } + ctor.DEFMETHOD = function(name, method) { + this.prototype[name] = method; + }; + return ctor; +}; + +var AST_Token = DEFNODE("Token", "type value line col pos endpos nlb comments_before file", { +}, null); + +var AST_Node = DEFNODE("Node", "start end", { + clone: function() { + return new this.CTOR(this); + }, + $documentation: "Base class of all AST nodes", + $propdoc: { + start: "[AST_Token] The first token of this node", + end: "[AST_Token] The last token of this node" + }, + _walk: function(visitor) { + return visitor._visit(this); + }, + walk: function(visitor) { + return this._walk(visitor); // not sure the indirection will be any help + } +}, null); + +AST_Node.warn_function = null; +AST_Node.warn = function(txt, props) { + if (AST_Node.warn_function) + AST_Node.warn_function(string_template(txt, props)); +}; + +/* -----[ statements ]----- */ + +var AST_Statement = DEFNODE("Statement", null, { + $documentation: "Base class of all statements", +}); + +var AST_Debugger = DEFNODE("Debugger", null, { + $documentation: "Represents a debugger statement", +}, AST_Statement); + +var AST_Directive = DEFNODE("Directive", "value scope", { + $documentation: "Represents a directive, like \"use strict\";", + $propdoc: { + value: "[string] The value of this directive as a plain string (it's not an AST_String!)", + scope: "[AST_Scope/S] The scope that this directive affects" + }, +}, AST_Statement); + +var AST_SimpleStatement = DEFNODE("SimpleStatement", "body", { + $documentation: "A statement consisting of an expression, i.e. a = 1 + 2", + $propdoc: { + body: "[AST_Node] an expression node (should not be instanceof AST_Statement)" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.body._walk(visitor); + }); + } +}, AST_Statement); + +function walk_body(node, visitor) { + if (node.body instanceof AST_Statement) { + node.body._walk(visitor); + } + else node.body.forEach(function(stat){ + stat._walk(visitor); + }); +}; + +var AST_Block = DEFNODE("Block", "body", { + $documentation: "A body of statements (usually bracketed)", + $propdoc: { + body: "[AST_Statement*] an array of statements" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + walk_body(this, visitor); + }); + } +}, AST_Statement); + +var AST_BlockStatement = DEFNODE("BlockStatement", null, { + $documentation: "A block statement", +}, AST_Block); + +var AST_EmptyStatement = DEFNODE("EmptyStatement", null, { + $documentation: "The empty statement (empty block or simply a semicolon)", + _walk: function(visitor) { + return visitor._visit(this); + } +}, AST_Statement); + +var AST_StatementWithBody = DEFNODE("StatementWithBody", "body", { + $documentation: "Base class for all statements that contain one nested body: `For`, `ForIn`, `Do`, `While`, `With`", + $propdoc: { + body: "[AST_Statement] the body; this should always be present, even if it's an AST_EmptyStatement" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.body._walk(visitor); + }); + } +}, AST_Statement); + +var AST_LabeledStatement = DEFNODE("LabeledStatement", "label", { + $documentation: "Statement with a label", + $propdoc: { + label: "[AST_Label] a label definition" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.label._walk(visitor); + this.body._walk(visitor); + }); + } +}, AST_StatementWithBody); + +var AST_IterationStatement = DEFNODE("IterationStatement", null, { + $documentation: "Internal class. All loops inherit from it." +}, AST_StatementWithBody); + +var AST_DWLoop = DEFNODE("DWLoop", "condition", { + $documentation: "Base class for do/while statements", + $propdoc: { + condition: "[AST_Node] the loop condition. Should not be instanceof AST_Statement" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.condition._walk(visitor); + this.body._walk(visitor); + }); + } +}, AST_IterationStatement); + +var AST_Do = DEFNODE("Do", null, { + $documentation: "A `do` statement", +}, AST_DWLoop); + +var AST_While = DEFNODE("While", null, { + $documentation: "A `while` statement", +}, AST_DWLoop); + +var AST_For = DEFNODE("For", "init condition step", { + $documentation: "A `for` statement", + $propdoc: { + init: "[AST_Node?] the `for` initialization code, or null if empty", + condition: "[AST_Node?] the `for` termination clause, or null if empty", + step: "[AST_Node?] the `for` update clause, or null if empty" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + if (this.init) this.init._walk(visitor); + if (this.condition) this.condition._walk(visitor); + if (this.step) this.step._walk(visitor); + this.body._walk(visitor); + }); + } +}, AST_IterationStatement); + +var AST_ForIn = DEFNODE("ForIn", "init name object", { + $documentation: "A `for ... in` statement", + $propdoc: { + init: "[AST_Node] the `for/in` initialization code", + name: "[AST_SymbolRef?] the loop variable, only if `init` is AST_Var", + object: "[AST_Node] the object that we're looping through" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.init._walk(visitor); + this.object._walk(visitor); + this.body._walk(visitor); + }); + } +}, AST_IterationStatement); + +var AST_With = DEFNODE("With", "expression", { + $documentation: "A `with` statement", + $propdoc: { + expression: "[AST_Node] the `with` expression" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.expression._walk(visitor); + this.body._walk(visitor); + }); + } +}, AST_StatementWithBody); + +/* -----[ scope and functions ]----- */ + +var AST_Scope = DEFNODE("Scope", "directives variables functions uses_with uses_eval parent_scope enclosed cname", { + $documentation: "Base class for all statements introducing a lexical scope", + $propdoc: { + directives: "[string*/S] an array of directives declared in this scope", + variables: "[Object/S] a map of name -> SymbolDef for all variables/functions defined in this scope", + functions: "[Object/S] like `variables`, but only lists function declarations", + uses_with: "[boolean/S] tells whether this scope uses the `with` statement", + uses_eval: "[boolean/S] tells whether this scope contains a direct call to the global `eval`", + parent_scope: "[AST_Scope?/S] link to the parent scope", + enclosed: "[SymbolDef*/S] a list of all symbol definitions that are accessed from this scope or any subscopes", + cname: "[integer/S] current index for mangling variables (used internally by the mangler)", + }, +}, AST_Block); + +var AST_Toplevel = DEFNODE("Toplevel", "globals", { + $documentation: "The toplevel scope", + $propdoc: { + globals: "[Object/S] a map of name -> SymbolDef for all undeclared names", + }, + wrap_enclose: function(arg_parameter_pairs) { + var self = this; + var args = []; + var parameters = []; + + arg_parameter_pairs.forEach(function(pair) { + var splitAt = pair.lastIndexOf(":"); + + args.push(pair.substr(0, splitAt)); + parameters.push(pair.substr(splitAt + 1)); + }); + + var wrapped_tl = "(function(" + parameters.join(",") + "){ '$ORIG'; })(" + args.join(",") + ")"; + wrapped_tl = parse(wrapped_tl); + wrapped_tl = wrapped_tl.transform(new TreeTransformer(function before(node){ + if (node instanceof AST_Directive && node.value == "$ORIG") { + return MAP.splice(self.body); + } + })); + return wrapped_tl; + }, + wrap_commonjs: function(name, export_all) { + var self = this; + var to_export = []; + if (export_all) { + self.figure_out_scope(); + self.walk(new TreeWalker(function(node){ + if (node instanceof AST_SymbolDeclaration && node.definition().global) { + if (!find_if(function(n){ return n.name == node.name }, to_export)) + to_export.push(node); + } + })); + } + var wrapped_tl = "(function(exports, global){ global['" + name + "'] = exports; '$ORIG'; '$EXPORTS'; }({}, (function(){return this}())))"; + wrapped_tl = parse(wrapped_tl); + wrapped_tl = wrapped_tl.transform(new TreeTransformer(function before(node){ + if (node instanceof AST_SimpleStatement) { + node = node.body; + if (node instanceof AST_String) switch (node.getValue()) { + case "$ORIG": + return MAP.splice(self.body); + case "$EXPORTS": + var body = []; + to_export.forEach(function(sym){ + body.push(new AST_SimpleStatement({ + body: new AST_Assign({ + left: new AST_Sub({ + expression: new AST_SymbolRef({ name: "exports" }), + property: new AST_String({ value: sym.name }), + }), + operator: "=", + right: new AST_SymbolRef(sym), + }), + })); + }); + return MAP.splice(body); + } + } + })); + return wrapped_tl; + } +}, AST_Scope); + +var AST_Lambda = DEFNODE("Lambda", "name argnames uses_arguments", { + $documentation: "Base class for functions", + $propdoc: { + name: "[AST_SymbolDeclaration?] the name of this function", + argnames: "[AST_SymbolFunarg*] array of function arguments", + uses_arguments: "[boolean/S] tells whether this function accesses the arguments array" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + if (this.name) this.name._walk(visitor); + this.argnames.forEach(function(arg){ + arg._walk(visitor); + }); + walk_body(this, visitor); + }); + } +}, AST_Scope); + +var AST_Accessor = DEFNODE("Accessor", null, { + $documentation: "A setter/getter function. The `name` property is always null." +}, AST_Lambda); + +var AST_Function = DEFNODE("Function", null, { + $documentation: "A function expression" +}, AST_Lambda); + +var AST_Defun = DEFNODE("Defun", null, { + $documentation: "A function definition" +}, AST_Lambda); + +/* -----[ JUMPS ]----- */ + +var AST_Jump = DEFNODE("Jump", null, { + $documentation: "Base class for “jumps†(for now that's `return`, `throw`, `break` and `continue`)" +}, AST_Statement); + +var AST_Exit = DEFNODE("Exit", "value", { + $documentation: "Base class for “exits†(`return` and `throw`)", + $propdoc: { + value: "[AST_Node?] the value returned or thrown by this statement; could be null for AST_Return" + }, + _walk: function(visitor) { + return visitor._visit(this, this.value && function(){ + this.value._walk(visitor); + }); + } +}, AST_Jump); + +var AST_Return = DEFNODE("Return", null, { + $documentation: "A `return` statement" +}, AST_Exit); + +var AST_Throw = DEFNODE("Throw", null, { + $documentation: "A `throw` statement" +}, AST_Exit); + +var AST_LoopControl = DEFNODE("LoopControl", "label", { + $documentation: "Base class for loop control statements (`break` and `continue`)", + $propdoc: { + label: "[AST_LabelRef?] the label, or null if none", + }, + _walk: function(visitor) { + return visitor._visit(this, this.label && function(){ + this.label._walk(visitor); + }); + } +}, AST_Jump); + +var AST_Break = DEFNODE("Break", null, { + $documentation: "A `break` statement" +}, AST_LoopControl); + +var AST_Continue = DEFNODE("Continue", null, { + $documentation: "A `continue` statement" +}, AST_LoopControl); + +/* -----[ IF ]----- */ + +var AST_If = DEFNODE("If", "condition alternative", { + $documentation: "A `if` statement", + $propdoc: { + condition: "[AST_Node] the `if` condition", + alternative: "[AST_Statement?] the `else` part, or null if not present" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.condition._walk(visitor); + this.body._walk(visitor); + if (this.alternative) this.alternative._walk(visitor); + }); + } +}, AST_StatementWithBody); + +/* -----[ SWITCH ]----- */ + +var AST_Switch = DEFNODE("Switch", "expression", { + $documentation: "A `switch` statement", + $propdoc: { + expression: "[AST_Node] the `switch` “discriminantâ€" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.expression._walk(visitor); + walk_body(this, visitor); + }); + } +}, AST_Block); + +var AST_SwitchBranch = DEFNODE("SwitchBranch", null, { + $documentation: "Base class for `switch` branches", +}, AST_Block); + +var AST_Default = DEFNODE("Default", null, { + $documentation: "A `default` switch branch", +}, AST_SwitchBranch); + +var AST_Case = DEFNODE("Case", "expression", { + $documentation: "A `case` switch branch", + $propdoc: { + expression: "[AST_Node] the `case` expression" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.expression._walk(visitor); + walk_body(this, visitor); + }); + } +}, AST_SwitchBranch); + +/* -----[ EXCEPTIONS ]----- */ + +var AST_Try = DEFNODE("Try", "bcatch bfinally", { + $documentation: "A `try` statement", + $propdoc: { + bcatch: "[AST_Catch?] the catch block, or null if not present", + bfinally: "[AST_Finally?] the finally block, or null if not present" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + walk_body(this, visitor); + if (this.bcatch) this.bcatch._walk(visitor); + if (this.bfinally) this.bfinally._walk(visitor); + }); + } +}, AST_Block); + +var AST_Catch = DEFNODE("Catch", "argname", { + $documentation: "A `catch` node; only makes sense as part of a `try` statement", + $propdoc: { + argname: "[AST_SymbolCatch] symbol for the exception" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.argname._walk(visitor); + walk_body(this, visitor); + }); + } +}, AST_Block); + +var AST_Finally = DEFNODE("Finally", null, { + $documentation: "A `finally` node; only makes sense as part of a `try` statement" +}, AST_Block); + +/* -----[ VAR/CONST ]----- */ + +var AST_Definitions = DEFNODE("Definitions", "definitions", { + $documentation: "Base class for `var` or `const` nodes (variable declarations/initializations)", + $propdoc: { + definitions: "[AST_VarDef*] array of variable definitions" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.definitions.forEach(function(def){ + def._walk(visitor); + }); + }); + } +}, AST_Statement); + +var AST_Var = DEFNODE("Var", null, { + $documentation: "A `var` statement" +}, AST_Definitions); + +var AST_Const = DEFNODE("Const", null, { + $documentation: "A `const` statement" +}, AST_Definitions); + +var AST_VarDef = DEFNODE("VarDef", "name value", { + $documentation: "A variable declaration; only appears in a AST_Definitions node", + $propdoc: { + name: "[AST_SymbolVar|AST_SymbolConst] name of the variable", + value: "[AST_Node?] initializer, or null of there's no initializer" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.name._walk(visitor); + if (this.value) this.value._walk(visitor); + }); + } +}); + +/* -----[ OTHER ]----- */ + +var AST_Call = DEFNODE("Call", "expression args", { + $documentation: "A function call expression", + $propdoc: { + expression: "[AST_Node] expression to invoke as function", + args: "[AST_Node*] array of arguments" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.expression._walk(visitor); + this.args.forEach(function(arg){ + arg._walk(visitor); + }); + }); + } +}); + +var AST_New = DEFNODE("New", null, { + $documentation: "An object instantiation. Derives from a function call since it has exactly the same properties" +}, AST_Call); + +var AST_Seq = DEFNODE("Seq", "car cdr", { + $documentation: "A sequence expression (two comma-separated expressions)", + $propdoc: { + car: "[AST_Node] first element in sequence", + cdr: "[AST_Node] second element in sequence" + }, + $cons: function(x, y) { + var seq = new AST_Seq(x); + seq.car = x; + seq.cdr = y; + return seq; + }, + $from_array: function(array) { + if (array.length == 0) return null; + if (array.length == 1) return array[0].clone(); + var list = null; + for (var i = array.length; --i >= 0;) { + list = AST_Seq.cons(array[i], list); + } + var p = list; + while (p) { + if (p.cdr && !p.cdr.cdr) { + p.cdr = p.cdr.car; + break; + } + p = p.cdr; + } + return list; + }, + to_array: function() { + var p = this, a = []; + while (p) { + a.push(p.car); + if (p.cdr && !(p.cdr instanceof AST_Seq)) { + a.push(p.cdr); + break; + } + p = p.cdr; + } + return a; + }, + add: function(node) { + var p = this; + while (p) { + if (!(p.cdr instanceof AST_Seq)) { + var cell = AST_Seq.cons(p.cdr, node); + return p.cdr = cell; + } + p = p.cdr; + } + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.car._walk(visitor); + if (this.cdr) this.cdr._walk(visitor); + }); + } +}); + +var AST_PropAccess = DEFNODE("PropAccess", "expression property", { + $documentation: "Base class for property access expressions, i.e. `a.foo` or `a[\"foo\"]`", + $propdoc: { + expression: "[AST_Node] the “container†expression", + property: "[AST_Node|string] the property to access. For AST_Dot this is always a plain string, while for AST_Sub it's an arbitrary AST_Node" + } +}); + +var AST_Dot = DEFNODE("Dot", null, { + $documentation: "A dotted property access expression", + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.expression._walk(visitor); + }); + } +}, AST_PropAccess); + +var AST_Sub = DEFNODE("Sub", null, { + $documentation: "Index-style property access, i.e. `a[\"foo\"]`", + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.expression._walk(visitor); + this.property._walk(visitor); + }); + } +}, AST_PropAccess); + +var AST_Unary = DEFNODE("Unary", "operator expression", { + $documentation: "Base class for unary expressions", + $propdoc: { + operator: "[string] the operator", + expression: "[AST_Node] expression that this unary operator applies to" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.expression._walk(visitor); + }); + } +}); + +var AST_UnaryPrefix = DEFNODE("UnaryPrefix", null, { + $documentation: "Unary prefix expression, i.e. `typeof i` or `++i`" +}, AST_Unary); + +var AST_UnaryPostfix = DEFNODE("UnaryPostfix", null, { + $documentation: "Unary postfix expression, i.e. `i++`" +}, AST_Unary); + +var AST_Binary = DEFNODE("Binary", "left operator right", { + $documentation: "Binary expression, i.e. `a + b`", + $propdoc: { + left: "[AST_Node] left-hand side expression", + operator: "[string] the operator", + right: "[AST_Node] right-hand side expression" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.left._walk(visitor); + this.right._walk(visitor); + }); + } +}); + +var AST_Conditional = DEFNODE("Conditional", "condition consequent alternative", { + $documentation: "Conditional expression using the ternary operator, i.e. `a ? b : c`", + $propdoc: { + condition: "[AST_Node]", + consequent: "[AST_Node]", + alternative: "[AST_Node]" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.condition._walk(visitor); + this.consequent._walk(visitor); + this.alternative._walk(visitor); + }); + } +}); + +var AST_Assign = DEFNODE("Assign", null, { + $documentation: "An assignment expression — `a = b + 5`", +}, AST_Binary); + +/* -----[ LITERALS ]----- */ + +var AST_Array = DEFNODE("Array", "elements", { + $documentation: "An array literal", + $propdoc: { + elements: "[AST_Node*] array of elements" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.elements.forEach(function(el){ + el._walk(visitor); + }); + }); + } +}); + +var AST_Object = DEFNODE("Object", "properties", { + $documentation: "An object literal", + $propdoc: { + properties: "[AST_ObjectProperty*] array of properties" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.properties.forEach(function(prop){ + prop._walk(visitor); + }); + }); + } +}); + +var AST_ObjectProperty = DEFNODE("ObjectProperty", "key value", { + $documentation: "Base class for literal object properties", + $propdoc: { + key: "[string] the property name converted to a string for ObjectKeyVal. For setters and getters this is an arbitrary AST_Node.", + value: "[AST_Node] property value. For setters and getters this is an AST_Function." + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.value._walk(visitor); + }); + } +}); + +var AST_ObjectKeyVal = DEFNODE("ObjectKeyVal", null, { + $documentation: "A key: value object property", +}, AST_ObjectProperty); + +var AST_ObjectSetter = DEFNODE("ObjectSetter", null, { + $documentation: "An object setter property", +}, AST_ObjectProperty); + +var AST_ObjectGetter = DEFNODE("ObjectGetter", null, { + $documentation: "An object getter property", +}, AST_ObjectProperty); + +var AST_Symbol = DEFNODE("Symbol", "scope name thedef", { + $propdoc: { + name: "[string] name of this symbol", + scope: "[AST_Scope/S] the current scope (not necessarily the definition scope)", + thedef: "[SymbolDef/S] the definition of this symbol" + }, + $documentation: "Base class for all symbols", +}); + +var AST_SymbolAccessor = DEFNODE("SymbolAccessor", null, { + $documentation: "The name of a property accessor (setter/getter function)" +}, AST_Symbol); + +var AST_SymbolDeclaration = DEFNODE("SymbolDeclaration", "init", { + $documentation: "A declaration symbol (symbol in var/const, function name or argument, symbol in catch)", + $propdoc: { + init: "[AST_Node*/S] array of initializers for this declaration." + } +}, AST_Symbol); + +var AST_SymbolVar = DEFNODE("SymbolVar", null, { + $documentation: "Symbol defining a variable", +}, AST_SymbolDeclaration); + +var AST_SymbolConst = DEFNODE("SymbolConst", null, { + $documentation: "A constant declaration" +}, AST_SymbolDeclaration); + +var AST_SymbolFunarg = DEFNODE("SymbolFunarg", null, { + $documentation: "Symbol naming a function argument", +}, AST_SymbolVar); + +var AST_SymbolDefun = DEFNODE("SymbolDefun", null, { + $documentation: "Symbol defining a function", +}, AST_SymbolDeclaration); + +var AST_SymbolLambda = DEFNODE("SymbolLambda", null, { + $documentation: "Symbol naming a function expression", +}, AST_SymbolDeclaration); + +var AST_SymbolCatch = DEFNODE("SymbolCatch", null, { + $documentation: "Symbol naming the exception in catch", +}, AST_SymbolDeclaration); + +var AST_Label = DEFNODE("Label", "references", { + $documentation: "Symbol naming a label (declaration)", + $propdoc: { + references: "[AST_LoopControl*] a list of nodes referring to this label" + }, + initialize: function() { + this.references = []; + this.thedef = this; + } +}, AST_Symbol); + +var AST_SymbolRef = DEFNODE("SymbolRef", null, { + $documentation: "Reference to some symbol (not definition/declaration)", +}, AST_Symbol); + +var AST_LabelRef = DEFNODE("LabelRef", null, { + $documentation: "Reference to a label symbol", +}, AST_Symbol); + +var AST_This = DEFNODE("This", null, { + $documentation: "The `this` symbol", +}, AST_Symbol); + +var AST_Constant = DEFNODE("Constant", null, { + $documentation: "Base class for all constants", + getValue: function() { + return this.value; + } +}); + +var AST_String = DEFNODE("String", "value", { + $documentation: "A string literal", + $propdoc: { + value: "[string] the contents of this string" + } +}, AST_Constant); + +var AST_Number = DEFNODE("Number", "value", { + $documentation: "A number literal", + $propdoc: { + value: "[number] the numeric value" + } +}, AST_Constant); + +var AST_RegExp = DEFNODE("RegExp", "value", { + $documentation: "A regexp literal", + $propdoc: { + value: "[RegExp] the actual regexp" + } +}, AST_Constant); + +var AST_Atom = DEFNODE("Atom", null, { + $documentation: "Base class for atoms", +}, AST_Constant); + +var AST_Null = DEFNODE("Null", null, { + $documentation: "The `null` atom", + value: null +}, AST_Atom); + +var AST_NaN = DEFNODE("NaN", null, { + $documentation: "The impossible value", + value: 0/0 +}, AST_Atom); + +var AST_Undefined = DEFNODE("Undefined", null, { + $documentation: "The `undefined` value", + value: (function(){}()) +}, AST_Atom); + +var AST_Hole = DEFNODE("Hole", null, { + $documentation: "A hole in an array", + value: (function(){}()) +}, AST_Atom); + +var AST_Infinity = DEFNODE("Infinity", null, { + $documentation: "The `Infinity` value", + value: 1/0 +}, AST_Atom); + +var AST_Boolean = DEFNODE("Boolean", null, { + $documentation: "Base class for booleans", +}, AST_Atom); + +var AST_False = DEFNODE("False", null, { + $documentation: "The `false` atom", + value: false +}, AST_Boolean); + +var AST_True = DEFNODE("True", null, { + $documentation: "The `true` atom", + value: true +}, AST_Boolean); + +/* -----[ TreeWalker ]----- */ + +function TreeWalker(callback) { + this.visit = callback; + this.stack = []; +}; +TreeWalker.prototype = { + _visit: function(node, descend) { + this.stack.push(node); + var ret = this.visit(node, descend ? function(){ + descend.call(node); + } : noop); + if (!ret && descend) { + descend.call(node); + } + this.stack.pop(); + return ret; + }, + parent: function(n) { + return this.stack[this.stack.length - 2 - (n || 0)]; + }, + push: function (node) { + this.stack.push(node); + }, + pop: function() { + return this.stack.pop(); + }, + self: function() { + return this.stack[this.stack.length - 1]; + }, + find_parent: function(type) { + var stack = this.stack; + for (var i = stack.length; --i >= 0;) { + var x = stack[i]; + if (x instanceof type) return x; + } + }, + has_directive: function(type) { + return this.find_parent(AST_Scope).has_directive(type); + }, + in_boolean_context: function() { + var stack = this.stack; + var i = stack.length, self = stack[--i]; + while (i > 0) { + var p = stack[--i]; + if ((p instanceof AST_If && p.condition === self) || + (p instanceof AST_Conditional && p.condition === self) || + (p instanceof AST_DWLoop && p.condition === self) || + (p instanceof AST_For && p.condition === self) || + (p instanceof AST_UnaryPrefix && p.operator == "!" && p.expression === self)) + { + return true; + } + if (!(p instanceof AST_Binary && (p.operator == "&&" || p.operator == "||"))) + return false; + self = p; + } + }, + loopcontrol_target: function(label) { + var stack = this.stack; + if (label) for (var i = stack.length; --i >= 0;) { + var x = stack[i]; + if (x instanceof AST_LabeledStatement && x.label.name == label.name) { + return x.body; + } + } else for (var i = stack.length; --i >= 0;) { + var x = stack[i]; + if (x instanceof AST_Switch || x instanceof AST_IterationStatement) + return x; + } + } +}; diff --git a/bin/node_modules/uglify-js/lib/compress.js b/bin/node_modules/uglify-js/lib/compress.js new file mode 100644 index 00000000..fd3f7a21 --- /dev/null +++ b/bin/node_modules/uglify-js/lib/compress.js @@ -0,0 +1,2386 @@ +/*********************************************************************** + + A JavaScript tokenizer / parser / beautifier / compressor. + https://github.com/mishoo/UglifyJS2 + + -------------------------------- (C) --------------------------------- + + Author: Mihai Bazon + + http://mihai.bazon.net/blog + + Distributed under the BSD license: + + Copyright 2012 (c) Mihai Bazon + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above + copyright notice, this list of conditions and the following + disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials + provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS†AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF + THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + ***********************************************************************/ + +"use strict"; + +function Compressor(options, false_by_default) { + if (!(this instanceof Compressor)) + return new Compressor(options, false_by_default); + TreeTransformer.call(this, this.before, this.after); + this.options = defaults(options, { + sequences : !false_by_default, + properties : !false_by_default, + dead_code : !false_by_default, + drop_debugger : !false_by_default, + unsafe : false, + unsafe_comps : false, + conditionals : !false_by_default, + comparisons : !false_by_default, + evaluate : !false_by_default, + booleans : !false_by_default, + loops : !false_by_default, + unused : !false_by_default, + hoist_funs : !false_by_default, + keep_fargs : false, + hoist_vars : false, + if_return : !false_by_default, + join_vars : !false_by_default, + cascade : !false_by_default, + side_effects : !false_by_default, + pure_getters : false, + pure_funcs : null, + negate_iife : !false_by_default, + screw_ie8 : false, + drop_console : false, + angular : false, + + warnings : true, + global_defs : {} + }, true); +}; + +Compressor.prototype = new TreeTransformer; +merge(Compressor.prototype, { + option: function(key) { return this.options[key] }, + warn: function() { + if (this.options.warnings) + AST_Node.warn.apply(AST_Node, arguments); + }, + before: function(node, descend, in_list) { + if (node._squeezed) return node; + var was_scope = false; + if (node instanceof AST_Scope) { + node = node.hoist_declarations(this); + was_scope = true; + } + descend(node, this); + node = node.optimize(this); + if (was_scope && node instanceof AST_Scope) { + node.drop_unused(this); + descend(node, this); + } + node._squeezed = true; + return node; + } +}); + +(function(){ + + function OPT(node, optimizer) { + node.DEFMETHOD("optimize", function(compressor){ + var self = this; + if (self._optimized) return self; + var opt = optimizer(self, compressor); + opt._optimized = true; + if (opt === self) return opt; + return opt.transform(compressor); + }); + }; + + OPT(AST_Node, function(self, compressor){ + return self; + }); + + AST_Node.DEFMETHOD("equivalent_to", function(node){ + // XXX: this is a rather expensive way to test two node's equivalence: + return this.print_to_string() == node.print_to_string(); + }); + + function make_node(ctor, orig, props) { + if (!props) props = {}; + if (orig) { + if (!props.start) props.start = orig.start; + if (!props.end) props.end = orig.end; + } + return new ctor(props); + }; + + function make_node_from_constant(compressor, val, orig) { + // XXX: WIP. + // if (val instanceof AST_Node) return val.transform(new TreeTransformer(null, function(node){ + // if (node instanceof AST_SymbolRef) { + // var scope = compressor.find_parent(AST_Scope); + // var def = scope.find_variable(node); + // node.thedef = def; + // return node; + // } + // })).transform(compressor); + + if (val instanceof AST_Node) return val.transform(compressor); + switch (typeof val) { + case "string": + return make_node(AST_String, orig, { + value: val + }).optimize(compressor); + case "number": + return make_node(isNaN(val) ? AST_NaN : AST_Number, orig, { + value: val + }).optimize(compressor); + case "boolean": + return make_node(val ? AST_True : AST_False, orig).optimize(compressor); + case "undefined": + return make_node(AST_Undefined, orig).optimize(compressor); + default: + if (val === null) { + return make_node(AST_Null, orig).optimize(compressor); + } + if (val instanceof RegExp) { + return make_node(AST_RegExp, orig).optimize(compressor); + } + throw new Error(string_template("Can't handle constant of type: {type}", { + type: typeof val + })); + } + }; + + function as_statement_array(thing) { + if (thing === null) return []; + if (thing instanceof AST_BlockStatement) return thing.body; + if (thing instanceof AST_EmptyStatement) return []; + if (thing instanceof AST_Statement) return [ thing ]; + throw new Error("Can't convert thing to statement array"); + }; + + function is_empty(thing) { + if (thing === null) return true; + if (thing instanceof AST_EmptyStatement) return true; + if (thing instanceof AST_BlockStatement) return thing.body.length == 0; + return false; + }; + + function loop_body(x) { + if (x instanceof AST_Switch) return x; + if (x instanceof AST_For || x instanceof AST_ForIn || x instanceof AST_DWLoop) { + return (x.body instanceof AST_BlockStatement ? x.body : x); + } + return x; + }; + + function tighten_body(statements, compressor) { + var CHANGED; + do { + CHANGED = false; + if (compressor.option("angular")) { + statements = process_for_angular(statements); + } + statements = eliminate_spurious_blocks(statements); + if (compressor.option("dead_code")) { + statements = eliminate_dead_code(statements, compressor); + } + if (compressor.option("if_return")) { + statements = handle_if_return(statements, compressor); + } + if (compressor.option("sequences")) { + statements = sequencesize(statements, compressor); + } + if (compressor.option("join_vars")) { + statements = join_consecutive_vars(statements, compressor); + } + } while (CHANGED); + + if (compressor.option("negate_iife")) { + negate_iifes(statements, compressor); + } + + return statements; + + function process_for_angular(statements) { + function make_injector(func, name) { + return make_node(AST_SimpleStatement, func, { + body: make_node(AST_Assign, func, { + operator: "=", + left: make_node(AST_Dot, name, { + expression: make_node(AST_SymbolRef, name, name), + property: "$inject" + }), + right: make_node(AST_Array, func, { + elements: func.argnames.map(function(sym){ + return make_node(AST_String, sym, { value: sym.name }); + }) + }) + }) + }); + } + return statements.reduce(function(a, stat){ + a.push(stat); + var token = stat.start; + var comments = token.comments_before; + if (comments && comments.length > 0) { + var last = comments.pop(); + if (/@ngInject/.test(last.value)) { + // case 1: defun + if (stat instanceof AST_Defun) { + a.push(make_injector(stat, stat.name)); + } + else if (stat instanceof AST_Definitions) { + stat.definitions.forEach(function(def){ + if (def.value && def.value instanceof AST_Lambda) { + a.push(make_injector(def.value, def.name)); + } + }); + } + else { + compressor.warn("Unknown statement marked with @ngInject [{file}:{line},{col}]", token); + } + } + } + return a; + }, []); + } + + function eliminate_spurious_blocks(statements) { + var seen_dirs = []; + return statements.reduce(function(a, stat){ + if (stat instanceof AST_BlockStatement) { + CHANGED = true; + a.push.apply(a, eliminate_spurious_blocks(stat.body)); + } else if (stat instanceof AST_EmptyStatement) { + CHANGED = true; + } else if (stat instanceof AST_Directive) { + if (seen_dirs.indexOf(stat.value) < 0) { + a.push(stat); + seen_dirs.push(stat.value); + } else { + CHANGED = true; + } + } else { + a.push(stat); + } + return a; + }, []); + }; + + function handle_if_return(statements, compressor) { + var self = compressor.self(); + var in_lambda = self instanceof AST_Lambda; + var ret = []; + loop: for (var i = statements.length; --i >= 0;) { + var stat = statements[i]; + switch (true) { + case (in_lambda && stat instanceof AST_Return && !stat.value && ret.length == 0): + CHANGED = true; + // note, ret.length is probably always zero + // because we drop unreachable code before this + // step. nevertheless, it's good to check. + continue loop; + case stat instanceof AST_If: + if (stat.body instanceof AST_Return) { + //--- + // pretty silly case, but: + // if (foo()) return; return; ==> foo(); return; + if (((in_lambda && ret.length == 0) + || (ret[0] instanceof AST_Return && !ret[0].value)) + && !stat.body.value && !stat.alternative) { + CHANGED = true; + var cond = make_node(AST_SimpleStatement, stat.condition, { + body: stat.condition + }); + ret.unshift(cond); + continue loop; + } + //--- + // if (foo()) return x; return y; ==> return foo() ? x : y; + if (ret[0] instanceof AST_Return && stat.body.value && ret[0].value && !stat.alternative) { + CHANGED = true; + stat = stat.clone(); + stat.alternative = ret[0]; + ret[0] = stat.transform(compressor); + continue loop; + } + //--- + // if (foo()) return x; [ return ; ] ==> return foo() ? x : undefined; + if ((ret.length == 0 || ret[0] instanceof AST_Return) && stat.body.value && !stat.alternative && in_lambda) { + CHANGED = true; + stat = stat.clone(); + stat.alternative = ret[0] || make_node(AST_Return, stat, { + value: make_node(AST_Undefined, stat) + }); + ret[0] = stat.transform(compressor); + continue loop; + } + //--- + // if (foo()) return; [ else x... ]; y... ==> if (!foo()) { x...; y... } + if (!stat.body.value && in_lambda) { + CHANGED = true; + stat = stat.clone(); + stat.condition = stat.condition.negate(compressor); + stat.body = make_node(AST_BlockStatement, stat, { + body: as_statement_array(stat.alternative).concat(ret) + }); + stat.alternative = null; + ret = [ stat.transform(compressor) ]; + continue loop; + } + //--- + if (ret.length == 1 && in_lambda && ret[0] instanceof AST_SimpleStatement + && (!stat.alternative || stat.alternative instanceof AST_SimpleStatement)) { + CHANGED = true; + ret.push(make_node(AST_Return, ret[0], { + value: make_node(AST_Undefined, ret[0]) + }).transform(compressor)); + ret = as_statement_array(stat.alternative).concat(ret); + ret.unshift(stat); + continue loop; + } + } + + var ab = aborts(stat.body); + var lct = ab instanceof AST_LoopControl ? compressor.loopcontrol_target(ab.label) : null; + if (ab && ((ab instanceof AST_Return && !ab.value && in_lambda) + || (ab instanceof AST_Continue && self === loop_body(lct)) + || (ab instanceof AST_Break && lct instanceof AST_BlockStatement && self === lct))) { + if (ab.label) { + remove(ab.label.thedef.references, ab); + } + CHANGED = true; + var body = as_statement_array(stat.body).slice(0, -1); + stat = stat.clone(); + stat.condition = stat.condition.negate(compressor); + stat.body = make_node(AST_BlockStatement, stat, { + body: as_statement_array(stat.alternative).concat(ret) + }); + stat.alternative = make_node(AST_BlockStatement, stat, { + body: body + }); + ret = [ stat.transform(compressor) ]; + continue loop; + } + + var ab = aborts(stat.alternative); + var lct = ab instanceof AST_LoopControl ? compressor.loopcontrol_target(ab.label) : null; + if (ab && ((ab instanceof AST_Return && !ab.value && in_lambda) + || (ab instanceof AST_Continue && self === loop_body(lct)) + || (ab instanceof AST_Break && lct instanceof AST_BlockStatement && self === lct))) { + if (ab.label) { + remove(ab.label.thedef.references, ab); + } + CHANGED = true; + stat = stat.clone(); + stat.body = make_node(AST_BlockStatement, stat.body, { + body: as_statement_array(stat.body).concat(ret) + }); + stat.alternative = make_node(AST_BlockStatement, stat.alternative, { + body: as_statement_array(stat.alternative).slice(0, -1) + }); + ret = [ stat.transform(compressor) ]; + continue loop; + } + + ret.unshift(stat); + break; + default: + ret.unshift(stat); + break; + } + } + return ret; + }; + + function eliminate_dead_code(statements, compressor) { + var has_quit = false; + var orig = statements.length; + var self = compressor.self(); + statements = statements.reduce(function(a, stat){ + if (has_quit) { + extract_declarations_from_unreachable_code(compressor, stat, a); + } else { + if (stat instanceof AST_LoopControl) { + var lct = compressor.loopcontrol_target(stat.label); + if ((stat instanceof AST_Break + && lct instanceof AST_BlockStatement + && loop_body(lct) === self) || (stat instanceof AST_Continue + && loop_body(lct) === self)) { + if (stat.label) { + remove(stat.label.thedef.references, stat); + } + } else { + a.push(stat); + } + } else { + a.push(stat); + } + if (aborts(stat)) has_quit = true; + } + return a; + }, []); + CHANGED = statements.length != orig; + return statements; + }; + + function sequencesize(statements, compressor) { + if (statements.length < 2) return statements; + var seq = [], ret = []; + function push_seq() { + seq = AST_Seq.from_array(seq); + if (seq) ret.push(make_node(AST_SimpleStatement, seq, { + body: seq + })); + seq = []; + }; + statements.forEach(function(stat){ + if (stat instanceof AST_SimpleStatement) seq.push(stat.body); + else push_seq(), ret.push(stat); + }); + push_seq(); + ret = sequencesize_2(ret, compressor); + CHANGED = ret.length != statements.length; + return ret; + }; + + function sequencesize_2(statements, compressor) { + function cons_seq(right) { + ret.pop(); + var left = prev.body; + if (left instanceof AST_Seq) { + left.add(right); + } else { + left = AST_Seq.cons(left, right); + } + return left.transform(compressor); + }; + var ret = [], prev = null; + statements.forEach(function(stat){ + if (prev) { + if (stat instanceof AST_For) { + var opera = {}; + try { + prev.body.walk(new TreeWalker(function(node){ + if (node instanceof AST_Binary && node.operator == "in") + throw opera; + })); + if (stat.init && !(stat.init instanceof AST_Definitions)) { + stat.init = cons_seq(stat.init); + } + else if (!stat.init) { + stat.init = prev.body; + ret.pop(); + } + } catch(ex) { + if (ex !== opera) throw ex; + } + } + else if (stat instanceof AST_If) { + stat.condition = cons_seq(stat.condition); + } + else if (stat instanceof AST_With) { + stat.expression = cons_seq(stat.expression); + } + else if (stat instanceof AST_Exit && stat.value) { + stat.value = cons_seq(stat.value); + } + else if (stat instanceof AST_Exit) { + stat.value = cons_seq(make_node(AST_Undefined, stat)); + } + else if (stat instanceof AST_Switch) { + stat.expression = cons_seq(stat.expression); + } + } + ret.push(stat); + prev = stat instanceof AST_SimpleStatement ? stat : null; + }); + return ret; + }; + + function join_consecutive_vars(statements, compressor) { + var prev = null; + return statements.reduce(function(a, stat){ + if (stat instanceof AST_Definitions && prev && prev.TYPE == stat.TYPE) { + prev.definitions = prev.definitions.concat(stat.definitions); + CHANGED = true; + } + else if (stat instanceof AST_For + && prev instanceof AST_Definitions + && (!stat.init || stat.init.TYPE == prev.TYPE)) { + CHANGED = true; + a.pop(); + if (stat.init) { + stat.init.definitions = prev.definitions.concat(stat.init.definitions); + } else { + stat.init = prev; + } + a.push(stat); + prev = stat; + } + else { + prev = stat; + a.push(stat); + } + return a; + }, []); + }; + + function negate_iifes(statements, compressor) { + statements.forEach(function(stat){ + if (stat instanceof AST_SimpleStatement) { + stat.body = (function transform(thing) { + return thing.transform(new TreeTransformer(function(node){ + if (node instanceof AST_Call && node.expression instanceof AST_Function) { + return make_node(AST_UnaryPrefix, node, { + operator: "!", + expression: node + }); + } + else if (node instanceof AST_Call) { + node.expression = transform(node.expression); + } + else if (node instanceof AST_Seq) { + node.car = transform(node.car); + } + else if (node instanceof AST_Conditional) { + var expr = transform(node.condition); + if (expr !== node.condition) { + // it has been negated, reverse + node.condition = expr; + var tmp = node.consequent; + node.consequent = node.alternative; + node.alternative = tmp; + } + } + return node; + })); + })(stat.body); + } + }); + }; + + }; + + function extract_declarations_from_unreachable_code(compressor, stat, target) { + compressor.warn("Dropping unreachable code [{file}:{line},{col}]", stat.start); + stat.walk(new TreeWalker(function(node){ + if (node instanceof AST_Definitions) { + compressor.warn("Declarations in unreachable code! [{file}:{line},{col}]", node.start); + node.remove_initializers(); + target.push(node); + return true; + } + if (node instanceof AST_Defun) { + target.push(node); + return true; + } + if (node instanceof AST_Scope) { + return true; + } + })); + }; + + /* -----[ boolean/negation helpers ]----- */ + + // methods to determine whether an expression has a boolean result type + (function (def){ + var unary_bool = [ "!", "delete" ]; + var binary_bool = [ "in", "instanceof", "==", "!=", "===", "!==", "<", "<=", ">=", ">" ]; + def(AST_Node, function(){ return false }); + def(AST_UnaryPrefix, function(){ + return member(this.operator, unary_bool); + }); + def(AST_Binary, function(){ + return member(this.operator, binary_bool) || + ( (this.operator == "&&" || this.operator == "||") && + this.left.is_boolean() && this.right.is_boolean() ); + }); + def(AST_Conditional, function(){ + return this.consequent.is_boolean() && this.alternative.is_boolean(); + }); + def(AST_Assign, function(){ + return this.operator == "=" && this.right.is_boolean(); + }); + def(AST_Seq, function(){ + return this.cdr.is_boolean(); + }); + def(AST_True, function(){ return true }); + def(AST_False, function(){ return true }); + })(function(node, func){ + node.DEFMETHOD("is_boolean", func); + }); + + // methods to determine if an expression has a string result type + (function (def){ + def(AST_Node, function(){ return false }); + def(AST_String, function(){ return true }); + def(AST_UnaryPrefix, function(){ + return this.operator == "typeof"; + }); + def(AST_Binary, function(compressor){ + return this.operator == "+" && + (this.left.is_string(compressor) || this.right.is_string(compressor)); + }); + def(AST_Assign, function(compressor){ + return (this.operator == "=" || this.operator == "+=") && this.right.is_string(compressor); + }); + def(AST_Seq, function(compressor){ + return this.cdr.is_string(compressor); + }); + def(AST_Conditional, function(compressor){ + return this.consequent.is_string(compressor) && this.alternative.is_string(compressor); + }); + def(AST_Call, function(compressor){ + return compressor.option("unsafe") + && this.expression instanceof AST_SymbolRef + && this.expression.name == "String" + && this.expression.undeclared(); + }); + })(function(node, func){ + node.DEFMETHOD("is_string", func); + }); + + function best_of(ast1, ast2) { + return ast1.print_to_string().length > + ast2.print_to_string().length + ? ast2 : ast1; + }; + + // methods to evaluate a constant expression + (function (def){ + // The evaluate method returns an array with one or two + // elements. If the node has been successfully reduced to a + // constant, then the second element tells us the value; + // otherwise the second element is missing. The first element + // of the array is always an AST_Node descendant; if + // evaluation was successful it's a node that represents the + // constant; otherwise it's the original or a replacement node. + AST_Node.DEFMETHOD("evaluate", function(compressor){ + if (!compressor.option("evaluate")) return [ this ]; + try { + var val = this._eval(compressor); + return [ best_of(make_node_from_constant(compressor, val, this), this), val ]; + } catch(ex) { + if (ex !== def) throw ex; + return [ this ]; + } + }); + def(AST_Statement, function(){ + throw new Error(string_template("Cannot evaluate a statement [{file}:{line},{col}]", this.start)); + }); + def(AST_Function, function(){ + // XXX: AST_Function inherits from AST_Scope, which itself + // inherits from AST_Statement; however, an AST_Function + // isn't really a statement. This could byte in other + // places too. :-( Wish JS had multiple inheritance. + throw def; + }); + function ev(node, compressor) { + if (!compressor) throw new Error("Compressor must be passed"); + + return node._eval(compressor); + }; + def(AST_Node, function(){ + throw def; // not constant + }); + def(AST_Constant, function(){ + return this.getValue(); + }); + def(AST_UnaryPrefix, function(compressor){ + var e = this.expression; + switch (this.operator) { + case "!": return !ev(e, compressor); + case "typeof": + // Function would be evaluated to an array and so typeof would + // incorrectly return 'object'. Hence making is a special case. + if (e instanceof AST_Function) return typeof function(){}; + + e = ev(e, compressor); + + // typeof returns "object" or "function" on different platforms + // so cannot evaluate reliably + if (e instanceof RegExp) throw def; + + return typeof e; + case "void": return void ev(e, compressor); + case "~": return ~ev(e, compressor); + case "-": + e = ev(e, compressor); + if (e === 0) throw def; + return -e; + case "+": return +ev(e, compressor); + } + throw def; + }); + def(AST_Binary, function(c){ + var left = this.left, right = this.right; + switch (this.operator) { + case "&&" : return ev(left, c) && ev(right, c); + case "||" : return ev(left, c) || ev(right, c); + case "|" : return ev(left, c) | ev(right, c); + case "&" : return ev(left, c) & ev(right, c); + case "^" : return ev(left, c) ^ ev(right, c); + case "+" : return ev(left, c) + ev(right, c); + case "*" : return ev(left, c) * ev(right, c); + case "/" : return ev(left, c) / ev(right, c); + case "%" : return ev(left, c) % ev(right, c); + case "-" : return ev(left, c) - ev(right, c); + case "<<" : return ev(left, c) << ev(right, c); + case ">>" : return ev(left, c) >> ev(right, c); + case ">>>" : return ev(left, c) >>> ev(right, c); + case "==" : return ev(left, c) == ev(right, c); + case "===" : return ev(left, c) === ev(right, c); + case "!=" : return ev(left, c) != ev(right, c); + case "!==" : return ev(left, c) !== ev(right, c); + case "<" : return ev(left, c) < ev(right, c); + case "<=" : return ev(left, c) <= ev(right, c); + case ">" : return ev(left, c) > ev(right, c); + case ">=" : return ev(left, c) >= ev(right, c); + case "in" : return ev(left, c) in ev(right, c); + case "instanceof" : return ev(left, c) instanceof ev(right, c); + } + throw def; + }); + def(AST_Conditional, function(compressor){ + return ev(this.condition, compressor) + ? ev(this.consequent, compressor) + : ev(this.alternative, compressor); + }); + def(AST_SymbolRef, function(compressor){ + var d = this.definition(); + if (d && d.constant && d.init) return ev(d.init, compressor); + throw def; + }); + def(AST_Dot, function(compressor){ + if (compressor.option("unsafe") && this.property == "length") { + var str = ev(this.expression, compressor); + if (typeof str == "string") + return str.length; + } + throw def; + }); + })(function(node, func){ + node.DEFMETHOD("_eval", func); + }); + + // method to negate an expression + (function(def){ + function basic_negation(exp) { + return make_node(AST_UnaryPrefix, exp, { + operator: "!", + expression: exp + }); + }; + def(AST_Node, function(){ + return basic_negation(this); + }); + def(AST_Statement, function(){ + throw new Error("Cannot negate a statement"); + }); + def(AST_Function, function(){ + return basic_negation(this); + }); + def(AST_UnaryPrefix, function(){ + if (this.operator == "!") + return this.expression; + return basic_negation(this); + }); + def(AST_Seq, function(compressor){ + var self = this.clone(); + self.cdr = self.cdr.negate(compressor); + return self; + }); + def(AST_Conditional, function(compressor){ + var self = this.clone(); + self.consequent = self.consequent.negate(compressor); + self.alternative = self.alternative.negate(compressor); + return best_of(basic_negation(this), self); + }); + def(AST_Binary, function(compressor){ + var self = this.clone(), op = this.operator; + if (compressor.option("unsafe_comps")) { + switch (op) { + case "<=" : self.operator = ">" ; return self; + case "<" : self.operator = ">=" ; return self; + case ">=" : self.operator = "<" ; return self; + case ">" : self.operator = "<=" ; return self; + } + } + switch (op) { + case "==" : self.operator = "!="; return self; + case "!=" : self.operator = "=="; return self; + case "===": self.operator = "!=="; return self; + case "!==": self.operator = "==="; return self; + case "&&": + self.operator = "||"; + self.left = self.left.negate(compressor); + self.right = self.right.negate(compressor); + return best_of(basic_negation(this), self); + case "||": + self.operator = "&&"; + self.left = self.left.negate(compressor); + self.right = self.right.negate(compressor); + return best_of(basic_negation(this), self); + } + return basic_negation(this); + }); + })(function(node, func){ + node.DEFMETHOD("negate", function(compressor){ + return func.call(this, compressor); + }); + }); + + // determine if expression has side effects + (function(def){ + def(AST_Node, function(compressor){ return true }); + + def(AST_EmptyStatement, function(compressor){ return false }); + def(AST_Constant, function(compressor){ return false }); + def(AST_This, function(compressor){ return false }); + + def(AST_Call, function(compressor){ + var pure = compressor.option("pure_funcs"); + if (!pure) return true; + return pure.indexOf(this.expression.print_to_string()) < 0; + }); + + def(AST_Block, function(compressor){ + for (var i = this.body.length; --i >= 0;) { + if (this.body[i].has_side_effects(compressor)) + return true; + } + return false; + }); + + def(AST_SimpleStatement, function(compressor){ + return this.body.has_side_effects(compressor); + }); + def(AST_Defun, function(compressor){ return true }); + def(AST_Function, function(compressor){ return false }); + def(AST_Binary, function(compressor){ + return this.left.has_side_effects(compressor) + || this.right.has_side_effects(compressor); + }); + def(AST_Assign, function(compressor){ return true }); + def(AST_Conditional, function(compressor){ + return this.condition.has_side_effects(compressor) + || this.consequent.has_side_effects(compressor) + || this.alternative.has_side_effects(compressor); + }); + def(AST_Unary, function(compressor){ + return this.operator == "delete" + || this.operator == "++" + || this.operator == "--" + || this.expression.has_side_effects(compressor); + }); + def(AST_SymbolRef, function(compressor){ return false }); + def(AST_Object, function(compressor){ + for (var i = this.properties.length; --i >= 0;) + if (this.properties[i].has_side_effects(compressor)) + return true; + return false; + }); + def(AST_ObjectProperty, function(compressor){ + return this.value.has_side_effects(compressor); + }); + def(AST_Array, function(compressor){ + for (var i = this.elements.length; --i >= 0;) + if (this.elements[i].has_side_effects(compressor)) + return true; + return false; + }); + def(AST_Dot, function(compressor){ + if (!compressor.option("pure_getters")) return true; + return this.expression.has_side_effects(compressor); + }); + def(AST_Sub, function(compressor){ + if (!compressor.option("pure_getters")) return true; + return this.expression.has_side_effects(compressor) + || this.property.has_side_effects(compressor); + }); + def(AST_PropAccess, function(compressor){ + return !compressor.option("pure_getters"); + }); + def(AST_Seq, function(compressor){ + return this.car.has_side_effects(compressor) + || this.cdr.has_side_effects(compressor); + }); + })(function(node, func){ + node.DEFMETHOD("has_side_effects", func); + }); + + // tell me if a statement aborts + function aborts(thing) { + return thing && thing.aborts(); + }; + (function(def){ + def(AST_Statement, function(){ return null }); + def(AST_Jump, function(){ return this }); + function block_aborts(){ + var n = this.body.length; + return n > 0 && aborts(this.body[n - 1]); + }; + def(AST_BlockStatement, block_aborts); + def(AST_SwitchBranch, block_aborts); + def(AST_If, function(){ + return this.alternative && aborts(this.body) && aborts(this.alternative); + }); + })(function(node, func){ + node.DEFMETHOD("aborts", func); + }); + + /* -----[ optimizers ]----- */ + + OPT(AST_Directive, function(self, compressor){ + if (self.scope.has_directive(self.value) !== self.scope) { + return make_node(AST_EmptyStatement, self); + } + return self; + }); + + OPT(AST_Debugger, function(self, compressor){ + if (compressor.option("drop_debugger")) + return make_node(AST_EmptyStatement, self); + return self; + }); + + OPT(AST_LabeledStatement, function(self, compressor){ + if (self.body instanceof AST_Break + && compressor.loopcontrol_target(self.body.label) === self.body) { + return make_node(AST_EmptyStatement, self); + } + return self.label.references.length == 0 ? self.body : self; + }); + + OPT(AST_Block, function(self, compressor){ + self.body = tighten_body(self.body, compressor); + return self; + }); + + OPT(AST_BlockStatement, function(self, compressor){ + self.body = tighten_body(self.body, compressor); + switch (self.body.length) { + case 1: return self.body[0]; + case 0: return make_node(AST_EmptyStatement, self); + } + return self; + }); + + AST_Scope.DEFMETHOD("drop_unused", function(compressor){ + var self = this; + if (compressor.option("unused") + && !(self instanceof AST_Toplevel) + && !self.uses_eval + ) { + var in_use = []; + var initializations = new Dictionary(); + // pass 1: find out which symbols are directly used in + // this scope (not in nested scopes). + var scope = this; + var tw = new TreeWalker(function(node, descend){ + if (node !== self) { + if (node instanceof AST_Defun) { + initializations.add(node.name.name, node); + return true; // don't go in nested scopes + } + if (node instanceof AST_Definitions && scope === self) { + node.definitions.forEach(function(def){ + if (def.value) { + initializations.add(def.name.name, def.value); + if (def.value.has_side_effects(compressor)) { + def.value.walk(tw); + } + } + }); + return true; + } + if (node instanceof AST_SymbolRef) { + push_uniq(in_use, node.definition()); + return true; + } + if (node instanceof AST_Scope) { + var save_scope = scope; + scope = node; + descend(); + scope = save_scope; + return true; + } + } + }); + self.walk(tw); + // pass 2: for every used symbol we need to walk its + // initialization code to figure out if it uses other + // symbols (that may not be in_use). + for (var i = 0; i < in_use.length; ++i) { + in_use[i].orig.forEach(function(decl){ + // undeclared globals will be instanceof AST_SymbolRef + var init = initializations.get(decl.name); + if (init) init.forEach(function(init){ + var tw = new TreeWalker(function(node){ + if (node instanceof AST_SymbolRef) { + push_uniq(in_use, node.definition()); + } + }); + init.walk(tw); + }); + }); + } + // pass 3: we should drop declarations not in_use + var tt = new TreeTransformer( + function before(node, descend, in_list) { + if (node instanceof AST_Lambda && !(node instanceof AST_Accessor)) { + if (!compressor.option("keep_fargs")) { + for (var a = node.argnames, i = a.length; --i >= 0;) { + var sym = a[i]; + if (sym.unreferenced()) { + a.pop(); + compressor.warn("Dropping unused function argument {name} [{file}:{line},{col}]", { + name : sym.name, + file : sym.start.file, + line : sym.start.line, + col : sym.start.col + }); + } + else break; + } + } + } + if (node instanceof AST_Defun && node !== self) { + if (!member(node.name.definition(), in_use)) { + compressor.warn("Dropping unused function {name} [{file}:{line},{col}]", { + name : node.name.name, + file : node.name.start.file, + line : node.name.start.line, + col : node.name.start.col + }); + return make_node(AST_EmptyStatement, node); + } + return node; + } + if (node instanceof AST_Definitions && !(tt.parent() instanceof AST_ForIn)) { + var def = node.definitions.filter(function(def){ + if (member(def.name.definition(), in_use)) return true; + var w = { + name : def.name.name, + file : def.name.start.file, + line : def.name.start.line, + col : def.name.start.col + }; + if (def.value && def.value.has_side_effects(compressor)) { + def._unused_side_effects = true; + compressor.warn("Side effects in initialization of unused variable {name} [{file}:{line},{col}]", w); + return true; + } + compressor.warn("Dropping unused variable {name} [{file}:{line},{col}]", w); + return false; + }); + // place uninitialized names at the start + def = mergeSort(def, function(a, b){ + if (!a.value && b.value) return -1; + if (!b.value && a.value) return 1; + return 0; + }); + // for unused names whose initialization has + // side effects, we can cascade the init. code + // into the next one, or next statement. + var side_effects = []; + for (var i = 0; i < def.length;) { + var x = def[i]; + if (x._unused_side_effects) { + side_effects.push(x.value); + def.splice(i, 1); + } else { + if (side_effects.length > 0) { + side_effects.push(x.value); + x.value = AST_Seq.from_array(side_effects); + side_effects = []; + } + ++i; + } + } + if (side_effects.length > 0) { + side_effects = make_node(AST_BlockStatement, node, { + body: [ make_node(AST_SimpleStatement, node, { + body: AST_Seq.from_array(side_effects) + }) ] + }); + } else { + side_effects = null; + } + if (def.length == 0 && !side_effects) { + return make_node(AST_EmptyStatement, node); + } + if (def.length == 0) { + return side_effects; + } + node.definitions = def; + if (side_effects) { + side_effects.body.unshift(node); + node = side_effects; + } + return node; + } + if (node instanceof AST_For) { + descend(node, this); + + if (node.init instanceof AST_BlockStatement) { + // certain combination of unused name + side effect leads to: + // https://github.com/mishoo/UglifyJS2/issues/44 + // that's an invalid AST. + // We fix it at this stage by moving the `var` outside the `for`. + + var body = node.init.body.slice(0, -1); + node.init = node.init.body.slice(-1)[0].body; + body.push(node); + + return in_list ? MAP.splice(body) : make_node(AST_BlockStatement, node, { + body: body + }); + } + } + if (node instanceof AST_Scope && node !== self) + return node; + } + ); + self.transform(tt); + } + }); + + AST_Scope.DEFMETHOD("hoist_declarations", function(compressor){ + var hoist_funs = compressor.option("hoist_funs"); + var hoist_vars = compressor.option("hoist_vars"); + var self = this; + if (hoist_funs || hoist_vars) { + var dirs = []; + var hoisted = []; + var vars = new Dictionary(), vars_found = 0, var_decl = 0; + // let's count var_decl first, we seem to waste a lot of + // space if we hoist `var` when there's only one. + self.walk(new TreeWalker(function(node){ + if (node instanceof AST_Scope && node !== self) + return true; + if (node instanceof AST_Var) { + ++var_decl; + return true; + } + })); + hoist_vars = hoist_vars && var_decl > 1; + var tt = new TreeTransformer( + function before(node) { + if (node !== self) { + if (node instanceof AST_Directive) { + dirs.push(node); + return make_node(AST_EmptyStatement, node); + } + if (node instanceof AST_Defun && hoist_funs) { + hoisted.push(node); + return make_node(AST_EmptyStatement, node); + } + if (node instanceof AST_Var && hoist_vars) { + node.definitions.forEach(function(def){ + vars.set(def.name.name, def); + ++vars_found; + }); + var seq = node.to_assignments(); + var p = tt.parent(); + if (p instanceof AST_ForIn && p.init === node) { + if (seq == null) return node.definitions[0].name; + return seq; + } + if (p instanceof AST_For && p.init === node) { + return seq; + } + if (!seq) return make_node(AST_EmptyStatement, node); + return make_node(AST_SimpleStatement, node, { + body: seq + }); + } + if (node instanceof AST_Scope) + return node; // to avoid descending in nested scopes + } + } + ); + self = self.transform(tt); + if (vars_found > 0) { + // collect only vars which don't show up in self's arguments list + var defs = []; + vars.each(function(def, name){ + if (self instanceof AST_Lambda + && find_if(function(x){ return x.name == def.name.name }, + self.argnames)) { + vars.del(name); + } else { + def = def.clone(); + def.value = null; + defs.push(def); + vars.set(name, def); + } + }); + if (defs.length > 0) { + // try to merge in assignments + for (var i = 0; i < self.body.length;) { + if (self.body[i] instanceof AST_SimpleStatement) { + var expr = self.body[i].body, sym, assign; + if (expr instanceof AST_Assign + && expr.operator == "=" + && (sym = expr.left) instanceof AST_Symbol + && vars.has(sym.name)) + { + var def = vars.get(sym.name); + if (def.value) break; + def.value = expr.right; + remove(defs, def); + defs.push(def); + self.body.splice(i, 1); + continue; + } + if (expr instanceof AST_Seq + && (assign = expr.car) instanceof AST_Assign + && assign.operator == "=" + && (sym = assign.left) instanceof AST_Symbol + && vars.has(sym.name)) + { + var def = vars.get(sym.name); + if (def.value) break; + def.value = assign.right; + remove(defs, def); + defs.push(def); + self.body[i].body = expr.cdr; + continue; + } + } + if (self.body[i] instanceof AST_EmptyStatement) { + self.body.splice(i, 1); + continue; + } + if (self.body[i] instanceof AST_BlockStatement) { + var tmp = [ i, 1 ].concat(self.body[i].body); + self.body.splice.apply(self.body, tmp); + continue; + } + break; + } + defs = make_node(AST_Var, self, { + definitions: defs + }); + hoisted.push(defs); + }; + } + self.body = dirs.concat(hoisted, self.body); + } + return self; + }); + + OPT(AST_SimpleStatement, function(self, compressor){ + if (compressor.option("side_effects")) { + if (!self.body.has_side_effects(compressor)) { + compressor.warn("Dropping side-effect-free statement [{file}:{line},{col}]", self.start); + return make_node(AST_EmptyStatement, self); + } + } + return self; + }); + + OPT(AST_DWLoop, function(self, compressor){ + var cond = self.condition.evaluate(compressor); + self.condition = cond[0]; + if (!compressor.option("loops")) return self; + if (cond.length > 1) { + if (cond[1]) { + return make_node(AST_For, self, { + body: self.body + }); + } else if (self instanceof AST_While) { + if (compressor.option("dead_code")) { + var a = []; + extract_declarations_from_unreachable_code(compressor, self.body, a); + return make_node(AST_BlockStatement, self, { body: a }); + } + } + } + return self; + }); + + function if_break_in_loop(self, compressor) { + function drop_it(rest) { + rest = as_statement_array(rest); + if (self.body instanceof AST_BlockStatement) { + self.body = self.body.clone(); + self.body.body = rest.concat(self.body.body.slice(1)); + self.body = self.body.transform(compressor); + } else { + self.body = make_node(AST_BlockStatement, self.body, { + body: rest + }).transform(compressor); + } + if_break_in_loop(self, compressor); + } + var first = self.body instanceof AST_BlockStatement ? self.body.body[0] : self.body; + if (first instanceof AST_If) { + if (first.body instanceof AST_Break + && compressor.loopcontrol_target(first.body.label) === self) { + if (self.condition) { + self.condition = make_node(AST_Binary, self.condition, { + left: self.condition, + operator: "&&", + right: first.condition.negate(compressor), + }); + } else { + self.condition = first.condition.negate(compressor); + } + drop_it(first.alternative); + } + else if (first.alternative instanceof AST_Break + && compressor.loopcontrol_target(first.alternative.label) === self) { + if (self.condition) { + self.condition = make_node(AST_Binary, self.condition, { + left: self.condition, + operator: "&&", + right: first.condition, + }); + } else { + self.condition = first.condition; + } + drop_it(first.body); + } + } + }; + + OPT(AST_While, function(self, compressor) { + if (!compressor.option("loops")) return self; + self = AST_DWLoop.prototype.optimize.call(self, compressor); + if (self instanceof AST_While) { + if_break_in_loop(self, compressor); + self = make_node(AST_For, self, self).transform(compressor); + } + return self; + }); + + OPT(AST_For, function(self, compressor){ + var cond = self.condition; + if (cond) { + cond = cond.evaluate(compressor); + self.condition = cond[0]; + } + if (!compressor.option("loops")) return self; + if (cond) { + if (cond.length > 1 && !cond[1]) { + if (compressor.option("dead_code")) { + var a = []; + if (self.init instanceof AST_Statement) { + a.push(self.init); + } + else if (self.init) { + a.push(make_node(AST_SimpleStatement, self.init, { + body: self.init + })); + } + extract_declarations_from_unreachable_code(compressor, self.body, a); + return make_node(AST_BlockStatement, self, { body: a }); + } + } + } + if_break_in_loop(self, compressor); + return self; + }); + + OPT(AST_If, function(self, compressor){ + if (!compressor.option("conditionals")) return self; + // if condition can be statically determined, warn and drop + // one of the blocks. note, statically determined implies + // “has no side effectsâ€; also it doesn't work for cases like + // `x && true`, though it probably should. + var cond = self.condition.evaluate(compressor); + self.condition = cond[0]; + if (cond.length > 1) { + if (cond[1]) { + compressor.warn("Condition always true [{file}:{line},{col}]", self.condition.start); + if (compressor.option("dead_code")) { + var a = []; + if (self.alternative) { + extract_declarations_from_unreachable_code(compressor, self.alternative, a); + } + a.push(self.body); + return make_node(AST_BlockStatement, self, { body: a }).transform(compressor); + } + } else { + compressor.warn("Condition always false [{file}:{line},{col}]", self.condition.start); + if (compressor.option("dead_code")) { + var a = []; + extract_declarations_from_unreachable_code(compressor, self.body, a); + if (self.alternative) a.push(self.alternative); + return make_node(AST_BlockStatement, self, { body: a }).transform(compressor); + } + } + } + if (is_empty(self.alternative)) self.alternative = null; + var negated = self.condition.negate(compressor); + var negated_is_best = best_of(self.condition, negated) === negated; + if (self.alternative && negated_is_best) { + negated_is_best = false; // because we already do the switch here. + self.condition = negated; + var tmp = self.body; + self.body = self.alternative || make_node(AST_EmptyStatement); + self.alternative = tmp; + } + if (is_empty(self.body) && is_empty(self.alternative)) { + return make_node(AST_SimpleStatement, self.condition, { + body: self.condition + }).transform(compressor); + } + if (self.body instanceof AST_SimpleStatement + && self.alternative instanceof AST_SimpleStatement) { + return make_node(AST_SimpleStatement, self, { + body: make_node(AST_Conditional, self, { + condition : self.condition, + consequent : self.body.body, + alternative : self.alternative.body + }) + }).transform(compressor); + } + if (is_empty(self.alternative) && self.body instanceof AST_SimpleStatement) { + if (negated_is_best) return make_node(AST_SimpleStatement, self, { + body: make_node(AST_Binary, self, { + operator : "||", + left : negated, + right : self.body.body + }) + }).transform(compressor); + return make_node(AST_SimpleStatement, self, { + body: make_node(AST_Binary, self, { + operator : "&&", + left : self.condition, + right : self.body.body + }) + }).transform(compressor); + } + if (self.body instanceof AST_EmptyStatement + && self.alternative + && self.alternative instanceof AST_SimpleStatement) { + return make_node(AST_SimpleStatement, self, { + body: make_node(AST_Binary, self, { + operator : "||", + left : self.condition, + right : self.alternative.body + }) + }).transform(compressor); + } + if (self.body instanceof AST_Exit + && self.alternative instanceof AST_Exit + && self.body.TYPE == self.alternative.TYPE) { + return make_node(self.body.CTOR, self, { + value: make_node(AST_Conditional, self, { + condition : self.condition, + consequent : self.body.value || make_node(AST_Undefined, self.body).optimize(compressor), + alternative : self.alternative.value || make_node(AST_Undefined, self.alternative).optimize(compressor) + }) + }).transform(compressor); + } + if (self.body instanceof AST_If + && !self.body.alternative + && !self.alternative) { + self.condition = make_node(AST_Binary, self.condition, { + operator: "&&", + left: self.condition, + right: self.body.condition + }).transform(compressor); + self.body = self.body.body; + } + if (aborts(self.body)) { + if (self.alternative) { + var alt = self.alternative; + self.alternative = null; + return make_node(AST_BlockStatement, self, { + body: [ self, alt ] + }).transform(compressor); + } + } + if (aborts(self.alternative)) { + var body = self.body; + self.body = self.alternative; + self.condition = negated_is_best ? negated : self.condition.negate(compressor); + self.alternative = null; + return make_node(AST_BlockStatement, self, { + body: [ self, body ] + }).transform(compressor); + } + return self; + }); + + OPT(AST_Switch, function(self, compressor){ + if (self.body.length == 0 && compressor.option("conditionals")) { + return make_node(AST_SimpleStatement, self, { + body: self.expression + }).transform(compressor); + } + for(;;) { + var last_branch = self.body[self.body.length - 1]; + if (last_branch) { + var stat = last_branch.body[last_branch.body.length - 1]; // last statement + if (stat instanceof AST_Break && loop_body(compressor.loopcontrol_target(stat.label)) === self) + last_branch.body.pop(); + if (last_branch instanceof AST_Default && last_branch.body.length == 0) { + self.body.pop(); + continue; + } + } + break; + } + var exp = self.expression.evaluate(compressor); + out: if (exp.length == 2) try { + // constant expression + self.expression = exp[0]; + if (!compressor.option("dead_code")) break out; + var value = exp[1]; + var in_if = false; + var in_block = false; + var started = false; + var stopped = false; + var ruined = false; + var tt = new TreeTransformer(function(node, descend, in_list){ + if (node instanceof AST_Lambda || node instanceof AST_SimpleStatement) { + // no need to descend these node types + return node; + } + else if (node instanceof AST_Switch && node === self) { + node = node.clone(); + descend(node, this); + return ruined ? node : make_node(AST_BlockStatement, node, { + body: node.body.reduce(function(a, branch){ + return a.concat(branch.body); + }, []) + }).transform(compressor); + } + else if (node instanceof AST_If || node instanceof AST_Try) { + var save = in_if; + in_if = !in_block; + descend(node, this); + in_if = save; + return node; + } + else if (node instanceof AST_StatementWithBody || node instanceof AST_Switch) { + var save = in_block; + in_block = true; + descend(node, this); + in_block = save; + return node; + } + else if (node instanceof AST_Break && this.loopcontrol_target(node.label) === self) { + if (in_if) { + ruined = true; + return node; + } + if (in_block) return node; + stopped = true; + return in_list ? MAP.skip : make_node(AST_EmptyStatement, node); + } + else if (node instanceof AST_SwitchBranch && this.parent() === self) { + if (stopped) return MAP.skip; + if (node instanceof AST_Case) { + var exp = node.expression.evaluate(compressor); + if (exp.length < 2) { + // got a case with non-constant expression, baling out + throw self; + } + if (exp[1] === value || started) { + started = true; + if (aborts(node)) stopped = true; + descend(node, this); + return node; + } + return MAP.skip; + } + descend(node, this); + return node; + } + }); + tt.stack = compressor.stack.slice(); // so that's able to see parent nodes + self = self.transform(tt); + } catch(ex) { + if (ex !== self) throw ex; + } + return self; + }); + + OPT(AST_Case, function(self, compressor){ + self.body = tighten_body(self.body, compressor); + return self; + }); + + OPT(AST_Try, function(self, compressor){ + self.body = tighten_body(self.body, compressor); + return self; + }); + + AST_Definitions.DEFMETHOD("remove_initializers", function(){ + this.definitions.forEach(function(def){ def.value = null }); + }); + + AST_Definitions.DEFMETHOD("to_assignments", function(){ + var assignments = this.definitions.reduce(function(a, def){ + if (def.value) { + var name = make_node(AST_SymbolRef, def.name, def.name); + a.push(make_node(AST_Assign, def, { + operator : "=", + left : name, + right : def.value + })); + } + return a; + }, []); + if (assignments.length == 0) return null; + return AST_Seq.from_array(assignments); + }); + + OPT(AST_Definitions, function(self, compressor){ + if (self.definitions.length == 0) + return make_node(AST_EmptyStatement, self); + return self; + }); + + OPT(AST_Function, function(self, compressor){ + self = AST_Lambda.prototype.optimize.call(self, compressor); + if (compressor.option("unused")) { + if (self.name && self.name.unreferenced()) { + self.name = null; + } + } + return self; + }); + + OPT(AST_Call, function(self, compressor){ + if (compressor.option("unsafe")) { + var exp = self.expression; + if (exp instanceof AST_SymbolRef && exp.undeclared()) { + switch (exp.name) { + case "Array": + if (self.args.length != 1) { + return make_node(AST_Array, self, { + elements: self.args + }).transform(compressor); + } + break; + case "Object": + if (self.args.length == 0) { + return make_node(AST_Object, self, { + properties: [] + }); + } + break; + case "String": + if (self.args.length == 0) return make_node(AST_String, self, { + value: "" + }); + if (self.args.length <= 1) return make_node(AST_Binary, self, { + left: self.args[0], + operator: "+", + right: make_node(AST_String, self, { value: "" }) + }).transform(compressor); + break; + case "Number": + if (self.args.length == 0) return make_node(AST_Number, self, { + value: 0 + }); + if (self.args.length == 1) return make_node(AST_UnaryPrefix, self, { + expression: self.args[0], + operator: "+" + }).transform(compressor); + case "Boolean": + if (self.args.length == 0) return make_node(AST_False, self); + if (self.args.length == 1) return make_node(AST_UnaryPrefix, self, { + expression: make_node(AST_UnaryPrefix, null, { + expression: self.args[0], + operator: "!" + }), + operator: "!" + }).transform(compressor); + break; + case "Function": + if (all(self.args, function(x){ return x instanceof AST_String })) { + // quite a corner-case, but we can handle it: + // https://github.com/mishoo/UglifyJS2/issues/203 + // if the code argument is a constant, then we can minify it. + try { + var code = "(function(" + self.args.slice(0, -1).map(function(arg){ + return arg.value; + }).join(",") + "){" + self.args[self.args.length - 1].value + "})()"; + var ast = parse(code); + ast.figure_out_scope({ screw_ie8: compressor.option("screw_ie8") }); + var comp = new Compressor(compressor.options); + ast = ast.transform(comp); + ast.figure_out_scope({ screw_ie8: compressor.option("screw_ie8") }); + ast.mangle_names(); + var fun; + try { + ast.walk(new TreeWalker(function(node){ + if (node instanceof AST_Lambda) { + fun = node; + throw ast; + } + })); + } catch(ex) { + if (ex !== ast) throw ex; + }; + var args = fun.argnames.map(function(arg, i){ + return make_node(AST_String, self.args[i], { + value: arg.print_to_string() + }); + }); + var code = OutputStream(); + AST_BlockStatement.prototype._codegen.call(fun, fun, code); + code = code.toString().replace(/^\{|\}$/g, ""); + args.push(make_node(AST_String, self.args[self.args.length - 1], { + value: code + })); + self.args = args; + return self; + } catch(ex) { + if (ex instanceof JS_Parse_Error) { + compressor.warn("Error parsing code passed to new Function [{file}:{line},{col}]", self.args[self.args.length - 1].start); + compressor.warn(ex.toString()); + } else { + console.log(ex); + throw ex; + } + } + } + break; + } + } + else if (exp instanceof AST_Dot && exp.property == "toString" && self.args.length == 0) { + return make_node(AST_Binary, self, { + left: make_node(AST_String, self, { value: "" }), + operator: "+", + right: exp.expression + }).transform(compressor); + } + else if (exp instanceof AST_Dot && exp.expression instanceof AST_Array && exp.property == "join") EXIT: { + var separator = self.args.length == 0 ? "," : self.args[0].evaluate(compressor)[1]; + if (separator == null) break EXIT; // not a constant + var elements = exp.expression.elements.reduce(function(a, el){ + el = el.evaluate(compressor); + if (a.length == 0 || el.length == 1) { + a.push(el); + } else { + var last = a[a.length - 1]; + if (last.length == 2) { + // it's a constant + var val = "" + last[1] + separator + el[1]; + a[a.length - 1] = [ make_node_from_constant(compressor, val, last[0]), val ]; + } else { + a.push(el); + } + } + return a; + }, []); + if (elements.length == 0) return make_node(AST_String, self, { value: "" }); + if (elements.length == 1) return elements[0][0]; + if (separator == "") { + var first; + if (elements[0][0] instanceof AST_String + || elements[1][0] instanceof AST_String) { + first = elements.shift()[0]; + } else { + first = make_node(AST_String, self, { value: "" }); + } + return elements.reduce(function(prev, el){ + return make_node(AST_Binary, el[0], { + operator : "+", + left : prev, + right : el[0], + }); + }, first).transform(compressor); + } + // need this awkward cloning to not affect original element + // best_of will decide which one to get through. + var node = self.clone(); + node.expression = node.expression.clone(); + node.expression.expression = node.expression.expression.clone(); + node.expression.expression.elements = elements.map(function(el){ + return el[0]; + }); + return best_of(self, node); + } + } + if (compressor.option("side_effects")) { + if (self.expression instanceof AST_Function + && self.args.length == 0 + && !AST_Block.prototype.has_side_effects.call(self.expression, compressor)) { + return make_node(AST_Undefined, self).transform(compressor); + } + } + if (compressor.option("drop_console")) { + if (self.expression instanceof AST_PropAccess && + self.expression.expression instanceof AST_SymbolRef && + self.expression.expression.name == "console" && + self.expression.expression.undeclared()) { + return make_node(AST_Undefined, self).transform(compressor); + } + } + return self.evaluate(compressor)[0]; + }); + + OPT(AST_New, function(self, compressor){ + if (compressor.option("unsafe")) { + var exp = self.expression; + if (exp instanceof AST_SymbolRef && exp.undeclared()) { + switch (exp.name) { + case "Object": + case "RegExp": + case "Function": + case "Error": + case "Array": + return make_node(AST_Call, self, self).transform(compressor); + } + } + } + return self; + }); + + OPT(AST_Seq, function(self, compressor){ + if (!compressor.option("side_effects")) + return self; + if (!self.car.has_side_effects(compressor)) { + // we shouldn't compress (1,eval)(something) to + // eval(something) because that changes the meaning of + // eval (becomes lexical instead of global). + var p; + if (!(self.cdr instanceof AST_SymbolRef + && self.cdr.name == "eval" + && self.cdr.undeclared() + && (p = compressor.parent()) instanceof AST_Call + && p.expression === self)) { + return self.cdr; + } + } + if (compressor.option("cascade")) { + if (self.car instanceof AST_Assign + && !self.car.left.has_side_effects(compressor)) { + if (self.car.left.equivalent_to(self.cdr)) { + return self.car; + } + if (self.cdr instanceof AST_Call + && self.cdr.expression.equivalent_to(self.car.left)) { + self.cdr.expression = self.car; + return self.cdr; + } + } + if (!self.car.has_side_effects(compressor) + && !self.cdr.has_side_effects(compressor) + && self.car.equivalent_to(self.cdr)) { + return self.car; + } + } + if (self.cdr instanceof AST_UnaryPrefix + && self.cdr.operator == "void" + && !self.cdr.expression.has_side_effects(compressor)) { + self.cdr.operator = self.car; + return self.cdr; + } + if (self.cdr instanceof AST_Undefined) { + return make_node(AST_UnaryPrefix, self, { + operator : "void", + expression : self.car + }); + } + return self; + }); + + AST_Unary.DEFMETHOD("lift_sequences", function(compressor){ + if (compressor.option("sequences")) { + if (this.expression instanceof AST_Seq) { + var seq = this.expression; + var x = seq.to_array(); + this.expression = x.pop(); + x.push(this); + seq = AST_Seq.from_array(x).transform(compressor); + return seq; + } + } + return this; + }); + + OPT(AST_UnaryPostfix, function(self, compressor){ + return self.lift_sequences(compressor); + }); + + OPT(AST_UnaryPrefix, function(self, compressor){ + self = self.lift_sequences(compressor); + var e = self.expression; + if (compressor.option("booleans") && compressor.in_boolean_context()) { + switch (self.operator) { + case "!": + if (e instanceof AST_UnaryPrefix && e.operator == "!") { + // !!foo ==> foo, if we're in boolean context + return e.expression; + } + break; + case "typeof": + // typeof always returns a non-empty string, thus it's + // always true in booleans + compressor.warn("Boolean expression always true [{file}:{line},{col}]", self.start); + return make_node(AST_True, self); + } + if (e instanceof AST_Binary && self.operator == "!") { + self = best_of(self, e.negate(compressor)); + } + } + return self.evaluate(compressor)[0]; + }); + + function has_side_effects_or_prop_access(node, compressor) { + var save_pure_getters = compressor.option("pure_getters"); + compressor.options.pure_getters = false; + var ret = node.has_side_effects(compressor); + compressor.options.pure_getters = save_pure_getters; + return ret; + } + + AST_Binary.DEFMETHOD("lift_sequences", function(compressor){ + if (compressor.option("sequences")) { + if (this.left instanceof AST_Seq) { + var seq = this.left; + var x = seq.to_array(); + this.left = x.pop(); + x.push(this); + seq = AST_Seq.from_array(x).transform(compressor); + return seq; + } + if (this.right instanceof AST_Seq + && this instanceof AST_Assign + && !has_side_effects_or_prop_access(this.left, compressor)) { + var seq = this.right; + var x = seq.to_array(); + this.right = x.pop(); + x.push(this); + seq = AST_Seq.from_array(x).transform(compressor); + return seq; + } + } + return this; + }); + + var commutativeOperators = makePredicate("== === != !== * & | ^"); + + OPT(AST_Binary, function(self, compressor){ + var reverse = compressor.has_directive("use asm") ? noop + : function(op, force) { + if (force || !(self.left.has_side_effects(compressor) || self.right.has_side_effects(compressor))) { + if (op) self.operator = op; + var tmp = self.left; + self.left = self.right; + self.right = tmp; + } + }; + if (commutativeOperators(self.operator)) { + if (self.right instanceof AST_Constant + && !(self.left instanceof AST_Constant)) { + // if right is a constant, whatever side effects the + // left side might have could not influence the + // result. hence, force switch. + + if (!(self.left instanceof AST_Binary + && PRECEDENCE[self.left.operator] >= PRECEDENCE[self.operator])) { + reverse(null, true); + } + } + if (/^[!=]==?$/.test(self.operator)) { + if (self.left instanceof AST_SymbolRef && self.right instanceof AST_Conditional) { + if (self.right.consequent instanceof AST_SymbolRef + && self.right.consequent.definition() === self.left.definition()) { + if (/^==/.test(self.operator)) return self.right.condition; + if (/^!=/.test(self.operator)) return self.right.condition.negate(compressor); + } + if (self.right.alternative instanceof AST_SymbolRef + && self.right.alternative.definition() === self.left.definition()) { + if (/^==/.test(self.operator)) return self.right.condition.negate(compressor); + if (/^!=/.test(self.operator)) return self.right.condition; + } + } + if (self.right instanceof AST_SymbolRef && self.left instanceof AST_Conditional) { + if (self.left.consequent instanceof AST_SymbolRef + && self.left.consequent.definition() === self.right.definition()) { + if (/^==/.test(self.operator)) return self.left.condition; + if (/^!=/.test(self.operator)) return self.left.condition.negate(compressor); + } + if (self.left.alternative instanceof AST_SymbolRef + && self.left.alternative.definition() === self.right.definition()) { + if (/^==/.test(self.operator)) return self.left.condition.negate(compressor); + if (/^!=/.test(self.operator)) return self.left.condition; + } + } + } + } + self = self.lift_sequences(compressor); + if (compressor.option("comparisons")) switch (self.operator) { + case "===": + case "!==": + if ((self.left.is_string(compressor) && self.right.is_string(compressor)) || + (self.left.is_boolean() && self.right.is_boolean())) { + self.operator = self.operator.substr(0, 2); + } + // XXX: intentionally falling down to the next case + case "==": + case "!=": + if (self.left instanceof AST_String + && self.left.value == "undefined" + && self.right instanceof AST_UnaryPrefix + && self.right.operator == "typeof" + && compressor.option("unsafe")) { + if (!(self.right.expression instanceof AST_SymbolRef) + || !self.right.expression.undeclared()) { + self.right = self.right.expression; + self.left = make_node(AST_Undefined, self.left).optimize(compressor); + if (self.operator.length == 2) self.operator += "="; + } + } + break; + } + if (compressor.option("booleans") && compressor.in_boolean_context()) switch (self.operator) { + case "&&": + var ll = self.left.evaluate(compressor); + var rr = self.right.evaluate(compressor); + if ((ll.length > 1 && !ll[1]) || (rr.length > 1 && !rr[1])) { + compressor.warn("Boolean && always false [{file}:{line},{col}]", self.start); + return make_node(AST_False, self); + } + if (ll.length > 1 && ll[1]) { + return rr[0]; + } + if (rr.length > 1 && rr[1]) { + return ll[0]; + } + break; + case "||": + var ll = self.left.evaluate(compressor); + var rr = self.right.evaluate(compressor); + if ((ll.length > 1 && ll[1]) || (rr.length > 1 && rr[1])) { + compressor.warn("Boolean || always true [{file}:{line},{col}]", self.start); + return make_node(AST_True, self); + } + if (ll.length > 1 && !ll[1]) { + return rr[0]; + } + if (rr.length > 1 && !rr[1]) { + return ll[0]; + } + break; + case "+": + var ll = self.left.evaluate(compressor); + var rr = self.right.evaluate(compressor); + if ((ll.length > 1 && ll[0] instanceof AST_String && ll[1]) || + (rr.length > 1 && rr[0] instanceof AST_String && rr[1])) { + compressor.warn("+ in boolean context always true [{file}:{line},{col}]", self.start); + return make_node(AST_True, self); + } + break; + } + if (compressor.option("comparisons")) { + if (!(compressor.parent() instanceof AST_Binary) + || compressor.parent() instanceof AST_Assign) { + var negated = make_node(AST_UnaryPrefix, self, { + operator: "!", + expression: self.negate(compressor) + }); + self = best_of(self, negated); + } + switch (self.operator) { + case "<": reverse(">"); break; + case "<=": reverse(">="); break; + } + } + if (self.operator == "+" && self.right instanceof AST_String + && self.right.getValue() === "" && self.left instanceof AST_Binary + && self.left.operator == "+" && self.left.is_string(compressor)) { + return self.left; + } + if (compressor.option("evaluate")) { + if (self.operator == "+") { + if (self.left instanceof AST_Constant + && self.right instanceof AST_Binary + && self.right.operator == "+" + && self.right.left instanceof AST_Constant + && self.right.is_string(compressor)) { + self = make_node(AST_Binary, self, { + operator: "+", + left: make_node(AST_String, null, { + value: "" + self.left.getValue() + self.right.left.getValue(), + start: self.left.start, + end: self.right.left.end + }), + right: self.right.right + }); + } + if (self.right instanceof AST_Constant + && self.left instanceof AST_Binary + && self.left.operator == "+" + && self.left.right instanceof AST_Constant + && self.left.is_string(compressor)) { + self = make_node(AST_Binary, self, { + operator: "+", + left: self.left.left, + right: make_node(AST_String, null, { + value: "" + self.left.right.getValue() + self.right.getValue(), + start: self.left.right.start, + end: self.right.end + }) + }); + } + if (self.left instanceof AST_Binary + && self.left.operator == "+" + && self.left.is_string(compressor) + && self.left.right instanceof AST_Constant + && self.right instanceof AST_Binary + && self.right.operator == "+" + && self.right.left instanceof AST_Constant + && self.right.is_string(compressor)) { + self = make_node(AST_Binary, self, { + operator: "+", + left: make_node(AST_Binary, self.left, { + operator: "+", + left: self.left.left, + right: make_node(AST_String, null, { + value: "" + self.left.right.getValue() + self.right.left.getValue(), + start: self.left.right.start, + end: self.right.left.end + }) + }), + right: self.right.right + }); + } + } + } + // x * (y * z) ==> x * y * z + if (self.right instanceof AST_Binary + && self.right.operator == self.operator + && (self.operator == "*" || self.operator == "&&" || self.operator == "||")) + { + self.left = make_node(AST_Binary, self.left, { + operator : self.operator, + left : self.left, + right : self.right.left + }); + self.right = self.right.right; + return self.transform(compressor); + } + return self.evaluate(compressor)[0]; + }); + + OPT(AST_SymbolRef, function(self, compressor){ + if (self.undeclared()) { + var defines = compressor.option("global_defs"); + if (defines && defines.hasOwnProperty(self.name)) { + return make_node_from_constant(compressor, defines[self.name], self); + } + switch (self.name) { + case "undefined": + return make_node(AST_Undefined, self); + case "NaN": + return make_node(AST_NaN, self); + case "Infinity": + return make_node(AST_Infinity, self); + } + } + return self; + }); + + OPT(AST_Undefined, function(self, compressor){ + if (compressor.option("unsafe")) { + var scope = compressor.find_parent(AST_Scope); + var undef = scope.find_variable("undefined"); + if (undef) { + var ref = make_node(AST_SymbolRef, self, { + name : "undefined", + scope : scope, + thedef : undef + }); + ref.reference(); + return ref; + } + } + return self; + }); + + var ASSIGN_OPS = [ '+', '-', '/', '*', '%', '>>', '<<', '>>>', '|', '^', '&' ]; + OPT(AST_Assign, function(self, compressor){ + self = self.lift_sequences(compressor); + if (self.operator == "=" + && self.left instanceof AST_SymbolRef + && self.right instanceof AST_Binary + && self.right.left instanceof AST_SymbolRef + && self.right.left.name == self.left.name + && member(self.right.operator, ASSIGN_OPS)) { + self.operator = self.right.operator + "="; + self.right = self.right.right; + } + return self; + }); + + OPT(AST_Conditional, function(self, compressor){ + if (!compressor.option("conditionals")) return self; + if (self.condition instanceof AST_Seq) { + var car = self.condition.car; + self.condition = self.condition.cdr; + return AST_Seq.cons(car, self); + } + var cond = self.condition.evaluate(compressor); + if (cond.length > 1) { + if (cond[1]) { + compressor.warn("Condition always true [{file}:{line},{col}]", self.start); + return self.consequent; + } else { + compressor.warn("Condition always false [{file}:{line},{col}]", self.start); + return self.alternative; + } + } + var negated = cond[0].negate(compressor); + if (best_of(cond[0], negated) === negated) { + self = make_node(AST_Conditional, self, { + condition: negated, + consequent: self.alternative, + alternative: self.consequent + }); + } + var consequent = self.consequent; + var alternative = self.alternative; + if (consequent instanceof AST_Assign + && alternative instanceof AST_Assign + && consequent.operator == alternative.operator + && consequent.left.equivalent_to(alternative.left) + ) { + /* + * Stuff like this: + * if (foo) exp = something; else exp = something_else; + * ==> + * exp = foo ? something : something_else; + */ + return make_node(AST_Assign, self, { + operator: consequent.operator, + left: consequent.left, + right: make_node(AST_Conditional, self, { + condition: self.condition, + consequent: consequent.right, + alternative: alternative.right + }) + }); + } + if (consequent instanceof AST_Call + && alternative.TYPE === consequent.TYPE + && consequent.args.length == alternative.args.length + && consequent.expression.equivalent_to(alternative.expression)) { + if (consequent.args.length == 0) { + return make_node(AST_Seq, self, { + car: self.condition, + cdr: consequent + }); + } + if (consequent.args.length == 1) { + consequent.args[0] = make_node(AST_Conditional, self, { + condition: self.condition, + consequent: consequent.args[0], + alternative: alternative.args[0] + }); + return consequent; + } + } + // x?y?z:a:a --> x&&y?z:a + if (consequent instanceof AST_Conditional + && consequent.alternative.equivalent_to(alternative)) { + return make_node(AST_Conditional, self, { + condition: make_node(AST_Binary, self, { + left: self.condition, + operator: "&&", + right: consequent.condition + }), + consequent: consequent.consequent, + alternative: alternative + }); + } + return self; + }); + + OPT(AST_Boolean, function(self, compressor){ + if (compressor.option("booleans")) { + var p = compressor.parent(); + if (p instanceof AST_Binary && (p.operator == "==" + || p.operator == "!=")) { + compressor.warn("Non-strict equality against boolean: {operator} {value} [{file}:{line},{col}]", { + operator : p.operator, + value : self.value, + file : p.start.file, + line : p.start.line, + col : p.start.col, + }); + return make_node(AST_Number, self, { + value: +self.value + }); + } + return make_node(AST_UnaryPrefix, self, { + operator: "!", + expression: make_node(AST_Number, self, { + value: 1 - self.value + }) + }); + } + return self; + }); + + OPT(AST_Sub, function(self, compressor){ + var prop = self.property; + if (prop instanceof AST_String && compressor.option("properties")) { + prop = prop.getValue(); + if (RESERVED_WORDS(prop) ? compressor.option("screw_ie8") : is_identifier_string(prop)) { + return make_node(AST_Dot, self, { + expression : self.expression, + property : prop + }).optimize(compressor); + } + var v = parseFloat(prop); + if (!isNaN(v) && v.toString() == prop) { + self.property = make_node(AST_Number, self.property, { + value: v + }); + } + } + return self; + }); + + OPT(AST_Dot, function(self, compressor){ + return self.evaluate(compressor)[0]; + }); + + function literals_in_boolean_context(self, compressor) { + if (compressor.option("booleans") && compressor.in_boolean_context()) { + return make_node(AST_True, self); + } + return self; + }; + OPT(AST_Array, literals_in_boolean_context); + OPT(AST_Object, literals_in_boolean_context); + OPT(AST_RegExp, literals_in_boolean_context); + +})(); diff --git a/bin/node_modules/uglify-js/lib/mozilla-ast.js b/bin/node_modules/uglify-js/lib/mozilla-ast.js new file mode 100644 index 00000000..bc24dfd6 --- /dev/null +++ b/bin/node_modules/uglify-js/lib/mozilla-ast.js @@ -0,0 +1,267 @@ +/*********************************************************************** + + A JavaScript tokenizer / parser / beautifier / compressor. + https://github.com/mishoo/UglifyJS2 + + -------------------------------- (C) --------------------------------- + + Author: Mihai Bazon + + http://mihai.bazon.net/blog + + Distributed under the BSD license: + + Copyright 2012 (c) Mihai Bazon + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above + copyright notice, this list of conditions and the following + disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials + provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS†AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF + THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + ***********************************************************************/ + +"use strict"; + +(function(){ + + var MOZ_TO_ME = { + TryStatement : function(M) { + return new AST_Try({ + start : my_start_token(M), + end : my_end_token(M), + body : from_moz(M.block).body, + bcatch : from_moz(M.handlers ? M.handlers[0] : M.handler), + bfinally : M.finalizer ? new AST_Finally(from_moz(M.finalizer)) : null + }); + }, + CatchClause : function(M) { + return new AST_Catch({ + start : my_start_token(M), + end : my_end_token(M), + argname : from_moz(M.param), + body : from_moz(M.body).body + }); + }, + ObjectExpression : function(M) { + return new AST_Object({ + start : my_start_token(M), + end : my_end_token(M), + properties : M.properties.map(function(prop){ + var key = prop.key; + var name = key.type == "Identifier" ? key.name : key.value; + var args = { + start : my_start_token(key), + end : my_end_token(prop.value), + key : name, + value : from_moz(prop.value) + }; + switch (prop.kind) { + case "init": + return new AST_ObjectKeyVal(args); + case "set": + args.value.name = from_moz(key); + return new AST_ObjectSetter(args); + case "get": + args.value.name = from_moz(key); + return new AST_ObjectGetter(args); + } + }) + }); + }, + SequenceExpression : function(M) { + return AST_Seq.from_array(M.expressions.map(from_moz)); + }, + MemberExpression : function(M) { + return new (M.computed ? AST_Sub : AST_Dot)({ + start : my_start_token(M), + end : my_end_token(M), + property : M.computed ? from_moz(M.property) : M.property.name, + expression : from_moz(M.object) + }); + }, + SwitchCase : function(M) { + return new (M.test ? AST_Case : AST_Default)({ + start : my_start_token(M), + end : my_end_token(M), + expression : from_moz(M.test), + body : M.consequent.map(from_moz) + }); + }, + Literal : function(M) { + var val = M.value, args = { + start : my_start_token(M), + end : my_end_token(M) + }; + if (val === null) return new AST_Null(args); + switch (typeof val) { + case "string": + args.value = val; + return new AST_String(args); + case "number": + args.value = val; + return new AST_Number(args); + case "boolean": + return new (val ? AST_True : AST_False)(args); + default: + args.value = val; + return new AST_RegExp(args); + } + }, + UnaryExpression: From_Moz_Unary, + UpdateExpression: From_Moz_Unary, + Identifier: function(M) { + var p = FROM_MOZ_STACK[FROM_MOZ_STACK.length - 2]; + return new (M.name == "this" ? AST_This + : p.type == "LabeledStatement" ? AST_Label + : p.type == "VariableDeclarator" && p.id === M ? (p.kind == "const" ? AST_SymbolConst : AST_SymbolVar) + : p.type == "FunctionExpression" ? (p.id === M ? AST_SymbolLambda : AST_SymbolFunarg) + : p.type == "FunctionDeclaration" ? (p.id === M ? AST_SymbolDefun : AST_SymbolFunarg) + : p.type == "CatchClause" ? AST_SymbolCatch + : p.type == "BreakStatement" || p.type == "ContinueStatement" ? AST_LabelRef + : AST_SymbolRef)({ + start : my_start_token(M), + end : my_end_token(M), + name : M.name + }); + } + }; + + function From_Moz_Unary(M) { + var prefix = "prefix" in M ? M.prefix + : M.type == "UnaryExpression" ? true : false; + return new (prefix ? AST_UnaryPrefix : AST_UnaryPostfix)({ + start : my_start_token(M), + end : my_end_token(M), + operator : M.operator, + expression : from_moz(M.argument) + }); + }; + + var ME_TO_MOZ = {}; + + map("Node", AST_Node); + map("Program", AST_Toplevel, "body@body"); + map("Function", AST_Function, "id>name, params@argnames, body%body"); + map("EmptyStatement", AST_EmptyStatement); + map("BlockStatement", AST_BlockStatement, "body@body"); + map("ExpressionStatement", AST_SimpleStatement, "expression>body"); + map("IfStatement", AST_If, "test>condition, consequent>body, alternate>alternative"); + map("LabeledStatement", AST_LabeledStatement, "label>label, body>body"); + map("BreakStatement", AST_Break, "label>label"); + map("ContinueStatement", AST_Continue, "label>label"); + map("WithStatement", AST_With, "object>expression, body>body"); + map("SwitchStatement", AST_Switch, "discriminant>expression, cases@body"); + map("ReturnStatement", AST_Return, "argument>value"); + map("ThrowStatement", AST_Throw, "argument>value"); + map("WhileStatement", AST_While, "test>condition, body>body"); + map("DoWhileStatement", AST_Do, "test>condition, body>body"); + map("ForStatement", AST_For, "init>init, test>condition, update>step, body>body"); + map("ForInStatement", AST_ForIn, "left>init, right>object, body>body"); + map("DebuggerStatement", AST_Debugger); + map("FunctionDeclaration", AST_Defun, "id>name, params@argnames, body%body"); + map("VariableDeclaration", AST_Var, "declarations@definitions"); + map("VariableDeclarator", AST_VarDef, "id>name, init>value"); + + map("ThisExpression", AST_This); + map("ArrayExpression", AST_Array, "elements@elements"); + map("FunctionExpression", AST_Function, "id>name, params@argnames, body%body"); + map("BinaryExpression", AST_Binary, "operator=operator, left>left, right>right"); + map("AssignmentExpression", AST_Assign, "operator=operator, left>left, right>right"); + map("LogicalExpression", AST_Binary, "operator=operator, left>left, right>right"); + map("ConditionalExpression", AST_Conditional, "test>condition, consequent>consequent, alternate>alternative"); + map("NewExpression", AST_New, "callee>expression, arguments@args"); + map("CallExpression", AST_Call, "callee>expression, arguments@args"); + + /* -----[ tools ]----- */ + + function my_start_token(moznode) { + return new AST_Token({ + file : moznode.loc && moznode.loc.source, + line : moznode.loc && moznode.loc.start.line, + col : moznode.loc && moznode.loc.start.column, + pos : moznode.start, + endpos : moznode.start + }); + }; + + function my_end_token(moznode) { + return new AST_Token({ + file : moznode.loc && moznode.loc.source, + line : moznode.loc && moznode.loc.end.line, + col : moznode.loc && moznode.loc.end.column, + pos : moznode.end, + endpos : moznode.end + }); + }; + + function map(moztype, mytype, propmap) { + var moz_to_me = "function From_Moz_" + moztype + "(M){\n"; + moz_to_me += "return new mytype({\n" + + "start: my_start_token(M),\n" + + "end: my_end_token(M)"; + + if (propmap) propmap.split(/\s*,\s*/).forEach(function(prop){ + var m = /([a-z0-9$_]+)(=|@|>|%)([a-z0-9$_]+)/i.exec(prop); + if (!m) throw new Error("Can't understand property map: " + prop); + var moz = "M." + m[1], how = m[2], my = m[3]; + moz_to_me += ",\n" + my + ": "; + if (how == "@") { + moz_to_me += moz + ".map(from_moz)"; + } else if (how == ">") { + moz_to_me += "from_moz(" + moz + ")"; + } else if (how == "=") { + moz_to_me += moz; + } else if (how == "%") { + moz_to_me += "from_moz(" + moz + ").body"; + } else throw new Error("Can't understand operator in propmap: " + prop); + }); + moz_to_me += "\n})}"; + + // moz_to_me = parse(moz_to_me).print_to_string({ beautify: true }); + // console.log(moz_to_me); + + moz_to_me = new Function("mytype", "my_start_token", "my_end_token", "from_moz", "return(" + moz_to_me + ")")( + mytype, my_start_token, my_end_token, from_moz + ); + return MOZ_TO_ME[moztype] = moz_to_me; + }; + + var FROM_MOZ_STACK = null; + + function from_moz(node) { + FROM_MOZ_STACK.push(node); + var ret = node != null ? MOZ_TO_ME[node.type](node) : null; + FROM_MOZ_STACK.pop(); + return ret; + }; + + AST_Node.from_mozilla_ast = function(node){ + var save_stack = FROM_MOZ_STACK; + FROM_MOZ_STACK = []; + var ast = from_moz(node); + FROM_MOZ_STACK = save_stack; + return ast; + }; + +})(); diff --git a/bin/node_modules/uglify-js/lib/output.js b/bin/node_modules/uglify-js/lib/output.js new file mode 100644 index 00000000..6c8f15aa --- /dev/null +++ b/bin/node_modules/uglify-js/lib/output.js @@ -0,0 +1,1304 @@ +/*********************************************************************** + + A JavaScript tokenizer / parser / beautifier / compressor. + https://github.com/mishoo/UglifyJS2 + + -------------------------------- (C) --------------------------------- + + Author: Mihai Bazon + + http://mihai.bazon.net/blog + + Distributed under the BSD license: + + Copyright 2012 (c) Mihai Bazon + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above + copyright notice, this list of conditions and the following + disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials + provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS†AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF + THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + ***********************************************************************/ + +"use strict"; + +function OutputStream(options) { + + options = defaults(options, { + indent_start : 0, + indent_level : 4, + quote_keys : false, + space_colon : true, + ascii_only : false, + unescape_regexps : false, + inline_script : false, + width : 80, + max_line_len : 32000, + beautify : false, + source_map : null, + bracketize : false, + semicolons : true, + comments : false, + preserve_line : false, + screw_ie8 : false, + preamble : null, + }, true); + + var indentation = 0; + var current_col = 0; + var current_line = 1; + var current_pos = 0; + var OUTPUT = ""; + + function to_ascii(str, identifier) { + return str.replace(/[\u0080-\uffff]/g, function(ch) { + var code = ch.charCodeAt(0).toString(16); + if (code.length <= 2 && !identifier) { + while (code.length < 2) code = "0" + code; + return "\\x" + code; + } else { + while (code.length < 4) code = "0" + code; + return "\\u" + code; + } + }); + }; + + function make_string(str) { + var dq = 0, sq = 0; + str = str.replace(/[\\\b\f\n\r\t\x22\x27\u2028\u2029\0]/g, function(s){ + switch (s) { + case "\\": return "\\\\"; + case "\b": return "\\b"; + case "\f": return "\\f"; + case "\n": return "\\n"; + case "\r": return "\\r"; + case "\u2028": return "\\u2028"; + case "\u2029": return "\\u2029"; + case '"': ++dq; return '"'; + case "'": ++sq; return "'"; + case "\0": return "\\x00"; + } + return s; + }); + if (options.ascii_only) str = to_ascii(str); + if (dq > sq) return "'" + str.replace(/\x27/g, "\\'") + "'"; + else return '"' + str.replace(/\x22/g, '\\"') + '"'; + }; + + function encode_string(str) { + var ret = make_string(str); + if (options.inline_script) + ret = ret.replace(/<\x2fscript([>\/\t\n\f\r ])/gi, "<\\/script$1"); + return ret; + }; + + function make_name(name) { + name = name.toString(); + if (options.ascii_only) + name = to_ascii(name, true); + return name; + }; + + function make_indent(back) { + return repeat_string(" ", options.indent_start + indentation - back * options.indent_level); + }; + + /* -----[ beautification/minification ]----- */ + + var might_need_space = false; + var might_need_semicolon = false; + var last = null; + + function last_char() { + return last.charAt(last.length - 1); + }; + + function maybe_newline() { + if (options.max_line_len && current_col > options.max_line_len) + print("\n"); + }; + + var requireSemicolonChars = makePredicate("( [ + * / - , ."); + + function print(str) { + str = String(str); + var ch = str.charAt(0); + if (might_need_semicolon) { + if ((!ch || ";}".indexOf(ch) < 0) && !/[;]$/.test(last)) { + if (options.semicolons || requireSemicolonChars(ch)) { + OUTPUT += ";"; + current_col++; + current_pos++; + } else { + OUTPUT += "\n"; + current_pos++; + current_line++; + current_col = 0; + } + if (!options.beautify) + might_need_space = false; + } + might_need_semicolon = false; + maybe_newline(); + } + + if (!options.beautify && options.preserve_line && stack[stack.length - 1]) { + var target_line = stack[stack.length - 1].start.line; + while (current_line < target_line) { + OUTPUT += "\n"; + current_pos++; + current_line++; + current_col = 0; + might_need_space = false; + } + } + + if (might_need_space) { + var prev = last_char(); + if ((is_identifier_char(prev) + && (is_identifier_char(ch) || ch == "\\")) + || (/^[\+\-\/]$/.test(ch) && ch == prev)) + { + OUTPUT += " "; + current_col++; + current_pos++; + } + might_need_space = false; + } + var a = str.split(/\r?\n/), n = a.length - 1; + current_line += n; + if (n == 0) { + current_col += a[n].length; + } else { + current_col = a[n].length; + } + current_pos += str.length; + last = str; + OUTPUT += str; + }; + + var space = options.beautify ? function() { + print(" "); + } : function() { + might_need_space = true; + }; + + var indent = options.beautify ? function(half) { + if (options.beautify) { + print(make_indent(half ? 0.5 : 0)); + } + } : noop; + + var with_indent = options.beautify ? function(col, cont) { + if (col === true) col = next_indent(); + var save_indentation = indentation; + indentation = col; + var ret = cont(); + indentation = save_indentation; + return ret; + } : function(col, cont) { return cont() }; + + var newline = options.beautify ? function() { + print("\n"); + } : noop; + + var semicolon = options.beautify ? function() { + print(";"); + } : function() { + might_need_semicolon = true; + }; + + function force_semicolon() { + might_need_semicolon = false; + print(";"); + }; + + function next_indent() { + return indentation + options.indent_level; + }; + + function with_block(cont) { + var ret; + print("{"); + newline(); + with_indent(next_indent(), function(){ + ret = cont(); + }); + indent(); + print("}"); + return ret; + }; + + function with_parens(cont) { + print("("); + //XXX: still nice to have that for argument lists + //var ret = with_indent(current_col, cont); + var ret = cont(); + print(")"); + return ret; + }; + + function with_square(cont) { + print("["); + //var ret = with_indent(current_col, cont); + var ret = cont(); + print("]"); + return ret; + }; + + function comma() { + print(","); + space(); + }; + + function colon() { + print(":"); + if (options.space_colon) space(); + }; + + var add_mapping = options.source_map ? function(token, name) { + try { + if (token) options.source_map.add( + token.file || "?", + current_line, current_col, + token.line, token.col, + (!name && token.type == "name") ? token.value : name + ); + } catch(ex) { + AST_Node.warn("Couldn't figure out mapping for {file}:{line},{col} → {cline},{ccol} [{name}]", { + file: token.file, + line: token.line, + col: token.col, + cline: current_line, + ccol: current_col, + name: name || "" + }) + } + } : noop; + + function get() { + return OUTPUT; + }; + + if (options.preamble) { + print(options.preamble.replace(/\r\n?|[\n\u2028\u2029]|\s*$/g, "\n")); + } + + var stack = []; + return { + get : get, + toString : get, + indent : indent, + indentation : function() { return indentation }, + current_width : function() { return current_col - indentation }, + should_break : function() { return options.width && this.current_width() >= options.width }, + newline : newline, + print : print, + space : space, + comma : comma, + colon : colon, + last : function() { return last }, + semicolon : semicolon, + force_semicolon : force_semicolon, + to_ascii : to_ascii, + print_name : function(name) { print(make_name(name)) }, + print_string : function(str) { print(encode_string(str)) }, + next_indent : next_indent, + with_indent : with_indent, + with_block : with_block, + with_parens : with_parens, + with_square : with_square, + add_mapping : add_mapping, + option : function(opt) { return options[opt] }, + line : function() { return current_line }, + col : function() { return current_col }, + pos : function() { return current_pos }, + push_node : function(node) { stack.push(node) }, + pop_node : function() { return stack.pop() }, + stack : function() { return stack }, + parent : function(n) { + return stack[stack.length - 2 - (n || 0)]; + } + }; + +}; + +/* -----[ code generators ]----- */ + +(function(){ + + /* -----[ utils ]----- */ + + function DEFPRINT(nodetype, generator) { + nodetype.DEFMETHOD("_codegen", generator); + }; + + AST_Node.DEFMETHOD("print", function(stream, force_parens){ + var self = this, generator = self._codegen; + function doit() { + self.add_comments(stream); + self.add_source_map(stream); + generator(self, stream); + } + stream.push_node(self); + if (force_parens || self.needs_parens(stream)) { + stream.with_parens(doit); + } else { + doit(); + } + stream.pop_node(); + }); + + AST_Node.DEFMETHOD("print_to_string", function(options){ + var s = OutputStream(options); + this.print(s); + return s.get(); + }); + + /* -----[ comments ]----- */ + + AST_Node.DEFMETHOD("add_comments", function(output){ + var c = output.option("comments"), self = this; + if (c) { + var start = self.start; + if (start && !start._comments_dumped) { + start._comments_dumped = true; + var comments = start.comments_before || []; + + // XXX: ugly fix for https://github.com/mishoo/UglifyJS2/issues/112 + // and https://github.com/mishoo/UglifyJS2/issues/372 + if (self instanceof AST_Exit && self.value) { + self.value.walk(new TreeWalker(function(node){ + if (node.start && node.start.comments_before) { + comments = comments.concat(node.start.comments_before); + node.start.comments_before = []; + } + if (node instanceof AST_Function || + node instanceof AST_Array || + node instanceof AST_Object) + { + return true; // don't go inside. + } + })); + } + + if (c.test) { + comments = comments.filter(function(comment){ + return c.test(comment.value); + }); + } else if (typeof c == "function") { + comments = comments.filter(function(comment){ + return c(self, comment); + }); + } + comments.forEach(function(c){ + if (/comment[134]/.test(c.type)) { + output.print("//" + c.value + "\n"); + output.indent(); + } + else if (c.type == "comment2") { + output.print("/*" + c.value + "*/"); + if (start.nlb) { + output.print("\n"); + output.indent(); + } else { + output.space(); + } + } + }); + } + } + }); + + /* -----[ PARENTHESES ]----- */ + + function PARENS(nodetype, func) { + nodetype.DEFMETHOD("needs_parens", func); + }; + + PARENS(AST_Node, function(){ + return false; + }); + + // a function expression needs parens around it when it's provably + // the first token to appear in a statement. + PARENS(AST_Function, function(output){ + return first_in_statement(output); + }); + + // same goes for an object literal, because otherwise it would be + // interpreted as a block of code. + PARENS(AST_Object, function(output){ + return first_in_statement(output); + }); + + PARENS(AST_Unary, function(output){ + var p = output.parent(); + return p instanceof AST_PropAccess && p.expression === this; + }); + + PARENS(AST_Seq, function(output){ + var p = output.parent(); + return p instanceof AST_Call // (foo, bar)() or foo(1, (2, 3), 4) + || p instanceof AST_Unary // !(foo, bar, baz) + || p instanceof AST_Binary // 1 + (2, 3) + 4 ==> 8 + || p instanceof AST_VarDef // var a = (1, 2), b = a + a; ==> b == 4 + || p instanceof AST_PropAccess // (1, {foo:2}).foo or (1, {foo:2})["foo"] ==> 2 + || p instanceof AST_Array // [ 1, (2, 3), 4 ] ==> [ 1, 3, 4 ] + || p instanceof AST_ObjectProperty // { foo: (1, 2) }.foo ==> 2 + || p instanceof AST_Conditional /* (false, true) ? (a = 10, b = 20) : (c = 30) + * ==> 20 (side effect, set a := 10 and b := 20) */ + ; + }); + + PARENS(AST_Binary, function(output){ + var p = output.parent(); + // (foo && bar)() + if (p instanceof AST_Call && p.expression === this) + return true; + // typeof (foo && bar) + if (p instanceof AST_Unary) + return true; + // (foo && bar)["prop"], (foo && bar).prop + if (p instanceof AST_PropAccess && p.expression === this) + return true; + // this deals with precedence: 3 * (2 + 1) + if (p instanceof AST_Binary) { + var po = p.operator, pp = PRECEDENCE[po]; + var so = this.operator, sp = PRECEDENCE[so]; + if (pp > sp + || (pp == sp + && this === p.right)) { + return true; + } + } + }); + + PARENS(AST_PropAccess, function(output){ + var p = output.parent(); + if (p instanceof AST_New && p.expression === this) { + // i.e. new (foo.bar().baz) + // + // if there's one call into this subtree, then we need + // parens around it too, otherwise the call will be + // interpreted as passing the arguments to the upper New + // expression. + try { + this.walk(new TreeWalker(function(node){ + if (node instanceof AST_Call) throw p; + })); + } catch(ex) { + if (ex !== p) throw ex; + return true; + } + } + }); + + PARENS(AST_Call, function(output){ + var p = output.parent(), p1; + if (p instanceof AST_New && p.expression === this) + return true; + + // workaround for Safari bug. + // https://bugs.webkit.org/show_bug.cgi?id=123506 + return this.expression instanceof AST_Function + && p instanceof AST_PropAccess + && p.expression === this + && (p1 = output.parent(1)) instanceof AST_Assign + && p1.left === p; + }); + + PARENS(AST_New, function(output){ + var p = output.parent(); + if (no_constructor_parens(this, output) + && (p instanceof AST_PropAccess // (new Date).getTime(), (new Date)["getTime"]() + || p instanceof AST_Call && p.expression === this)) // (new foo)(bar) + return true; + }); + + PARENS(AST_Number, function(output){ + var p = output.parent(); + if (this.getValue() < 0 && p instanceof AST_PropAccess && p.expression === this) + return true; + }); + + PARENS(AST_NaN, function(output){ + var p = output.parent(); + if (p instanceof AST_PropAccess && p.expression === this) + return true; + }); + + function assign_and_conditional_paren_rules(output) { + var p = output.parent(); + // !(a = false) → true + if (p instanceof AST_Unary) + return true; + // 1 + (a = 2) + 3 → 6, side effect setting a = 2 + if (p instanceof AST_Binary && !(p instanceof AST_Assign)) + return true; + // (a = func)() —or— new (a = Object)() + if (p instanceof AST_Call && p.expression === this) + return true; + // (a = foo) ? bar : baz + if (p instanceof AST_Conditional && p.condition === this) + return true; + // (a = foo)["prop"] —or— (a = foo).prop + if (p instanceof AST_PropAccess && p.expression === this) + return true; + }; + + PARENS(AST_Assign, assign_and_conditional_paren_rules); + PARENS(AST_Conditional, assign_and_conditional_paren_rules); + + /* -----[ PRINTERS ]----- */ + + DEFPRINT(AST_Directive, function(self, output){ + output.print_string(self.value); + output.semicolon(); + }); + DEFPRINT(AST_Debugger, function(self, output){ + output.print("debugger"); + output.semicolon(); + }); + + /* -----[ statements ]----- */ + + function display_body(body, is_toplevel, output) { + var last = body.length - 1; + body.forEach(function(stmt, i){ + if (!(stmt instanceof AST_EmptyStatement)) { + output.indent(); + stmt.print(output); + if (!(i == last && is_toplevel)) { + output.newline(); + if (is_toplevel) output.newline(); + } + } + }); + }; + + AST_StatementWithBody.DEFMETHOD("_do_print_body", function(output){ + force_statement(this.body, output); + }); + + DEFPRINT(AST_Statement, function(self, output){ + self.body.print(output); + output.semicolon(); + }); + DEFPRINT(AST_Toplevel, function(self, output){ + display_body(self.body, true, output); + output.print(""); + }); + DEFPRINT(AST_LabeledStatement, function(self, output){ + self.label.print(output); + output.colon(); + self.body.print(output); + }); + DEFPRINT(AST_SimpleStatement, function(self, output){ + self.body.print(output); + output.semicolon(); + }); + function print_bracketed(body, output) { + if (body.length > 0) output.with_block(function(){ + display_body(body, false, output); + }); + else output.print("{}"); + }; + DEFPRINT(AST_BlockStatement, function(self, output){ + print_bracketed(self.body, output); + }); + DEFPRINT(AST_EmptyStatement, function(self, output){ + output.semicolon(); + }); + DEFPRINT(AST_Do, function(self, output){ + output.print("do"); + output.space(); + self._do_print_body(output); + output.space(); + output.print("while"); + output.space(); + output.with_parens(function(){ + self.condition.print(output); + }); + output.semicolon(); + }); + DEFPRINT(AST_While, function(self, output){ + output.print("while"); + output.space(); + output.with_parens(function(){ + self.condition.print(output); + }); + output.space(); + self._do_print_body(output); + }); + DEFPRINT(AST_For, function(self, output){ + output.print("for"); + output.space(); + output.with_parens(function(){ + if (self.init && !(self.init instanceof AST_EmptyStatement)) { + if (self.init instanceof AST_Definitions) { + self.init.print(output); + } else { + parenthesize_for_noin(self.init, output, true); + } + output.print(";"); + output.space(); + } else { + output.print(";"); + } + if (self.condition) { + self.condition.print(output); + output.print(";"); + output.space(); + } else { + output.print(";"); + } + if (self.step) { + self.step.print(output); + } + }); + output.space(); + self._do_print_body(output); + }); + DEFPRINT(AST_ForIn, function(self, output){ + output.print("for"); + output.space(); + output.with_parens(function(){ + self.init.print(output); + output.space(); + output.print("in"); + output.space(); + self.object.print(output); + }); + output.space(); + self._do_print_body(output); + }); + DEFPRINT(AST_With, function(self, output){ + output.print("with"); + output.space(); + output.with_parens(function(){ + self.expression.print(output); + }); + output.space(); + self._do_print_body(output); + }); + + /* -----[ functions ]----- */ + AST_Lambda.DEFMETHOD("_do_print", function(output, nokeyword){ + var self = this; + if (!nokeyword) { + output.print("function"); + } + if (self.name) { + output.space(); + self.name.print(output); + } + output.with_parens(function(){ + self.argnames.forEach(function(arg, i){ + if (i) output.comma(); + arg.print(output); + }); + }); + output.space(); + print_bracketed(self.body, output); + }); + DEFPRINT(AST_Lambda, function(self, output){ + self._do_print(output); + }); + + /* -----[ exits ]----- */ + AST_Exit.DEFMETHOD("_do_print", function(output, kind){ + output.print(kind); + if (this.value) { + output.space(); + this.value.print(output); + } + output.semicolon(); + }); + DEFPRINT(AST_Return, function(self, output){ + self._do_print(output, "return"); + }); + DEFPRINT(AST_Throw, function(self, output){ + self._do_print(output, "throw"); + }); + + /* -----[ loop control ]----- */ + AST_LoopControl.DEFMETHOD("_do_print", function(output, kind){ + output.print(kind); + if (this.label) { + output.space(); + this.label.print(output); + } + output.semicolon(); + }); + DEFPRINT(AST_Break, function(self, output){ + self._do_print(output, "break"); + }); + DEFPRINT(AST_Continue, function(self, output){ + self._do_print(output, "continue"); + }); + + /* -----[ if ]----- */ + function make_then(self, output) { + if (output.option("bracketize")) { + make_block(self.body, output); + return; + } + // The squeezer replaces "block"-s that contain only a single + // statement with the statement itself; technically, the AST + // is correct, but this can create problems when we output an + // IF having an ELSE clause where the THEN clause ends in an + // IF *without* an ELSE block (then the outer ELSE would refer + // to the inner IF). This function checks for this case and + // adds the block brackets if needed. + if (!self.body) + return output.force_semicolon(); + if (self.body instanceof AST_Do + && !output.option("screw_ie8")) { + // https://github.com/mishoo/UglifyJS/issues/#issue/57 IE + // croaks with "syntax error" on code like this: if (foo) + // do ... while(cond); else ... we need block brackets + // around do/while + make_block(self.body, output); + return; + } + var b = self.body; + while (true) { + if (b instanceof AST_If) { + if (!b.alternative) { + make_block(self.body, output); + return; + } + b = b.alternative; + } + else if (b instanceof AST_StatementWithBody) { + b = b.body; + } + else break; + } + force_statement(self.body, output); + }; + DEFPRINT(AST_If, function(self, output){ + output.print("if"); + output.space(); + output.with_parens(function(){ + self.condition.print(output); + }); + output.space(); + if (self.alternative) { + make_then(self, output); + output.space(); + output.print("else"); + output.space(); + force_statement(self.alternative, output); + } else { + self._do_print_body(output); + } + }); + + /* -----[ switch ]----- */ + DEFPRINT(AST_Switch, function(self, output){ + output.print("switch"); + output.space(); + output.with_parens(function(){ + self.expression.print(output); + }); + output.space(); + if (self.body.length > 0) output.with_block(function(){ + self.body.forEach(function(stmt, i){ + if (i) output.newline(); + output.indent(true); + stmt.print(output); + }); + }); + else output.print("{}"); + }); + AST_SwitchBranch.DEFMETHOD("_do_print_body", function(output){ + if (this.body.length > 0) { + output.newline(); + this.body.forEach(function(stmt){ + output.indent(); + stmt.print(output); + output.newline(); + }); + } + }); + DEFPRINT(AST_Default, function(self, output){ + output.print("default:"); + self._do_print_body(output); + }); + DEFPRINT(AST_Case, function(self, output){ + output.print("case"); + output.space(); + self.expression.print(output); + output.print(":"); + self._do_print_body(output); + }); + + /* -----[ exceptions ]----- */ + DEFPRINT(AST_Try, function(self, output){ + output.print("try"); + output.space(); + print_bracketed(self.body, output); + if (self.bcatch) { + output.space(); + self.bcatch.print(output); + } + if (self.bfinally) { + output.space(); + self.bfinally.print(output); + } + }); + DEFPRINT(AST_Catch, function(self, output){ + output.print("catch"); + output.space(); + output.with_parens(function(){ + self.argname.print(output); + }); + output.space(); + print_bracketed(self.body, output); + }); + DEFPRINT(AST_Finally, function(self, output){ + output.print("finally"); + output.space(); + print_bracketed(self.body, output); + }); + + /* -----[ var/const ]----- */ + AST_Definitions.DEFMETHOD("_do_print", function(output, kind){ + output.print(kind); + output.space(); + this.definitions.forEach(function(def, i){ + if (i) output.comma(); + def.print(output); + }); + var p = output.parent(); + var in_for = p instanceof AST_For || p instanceof AST_ForIn; + var avoid_semicolon = in_for && p.init === this; + if (!avoid_semicolon) + output.semicolon(); + }); + DEFPRINT(AST_Var, function(self, output){ + self._do_print(output, "var"); + }); + DEFPRINT(AST_Const, function(self, output){ + self._do_print(output, "const"); + }); + + function parenthesize_for_noin(node, output, noin) { + if (!noin) node.print(output); + else try { + // need to take some precautions here: + // https://github.com/mishoo/UglifyJS2/issues/60 + node.walk(new TreeWalker(function(node){ + if (node instanceof AST_Binary && node.operator == "in") + throw output; + })); + node.print(output); + } catch(ex) { + if (ex !== output) throw ex; + node.print(output, true); + } + }; + + DEFPRINT(AST_VarDef, function(self, output){ + self.name.print(output); + if (self.value) { + output.space(); + output.print("="); + output.space(); + var p = output.parent(1); + var noin = p instanceof AST_For || p instanceof AST_ForIn; + parenthesize_for_noin(self.value, output, noin); + } + }); + + /* -----[ other expressions ]----- */ + DEFPRINT(AST_Call, function(self, output){ + self.expression.print(output); + if (self instanceof AST_New && no_constructor_parens(self, output)) + return; + output.with_parens(function(){ + self.args.forEach(function(expr, i){ + if (i) output.comma(); + expr.print(output); + }); + }); + }); + DEFPRINT(AST_New, function(self, output){ + output.print("new"); + output.space(); + AST_Call.prototype._codegen(self, output); + }); + + AST_Seq.DEFMETHOD("_do_print", function(output){ + this.car.print(output); + if (this.cdr) { + output.comma(); + if (output.should_break()) { + output.newline(); + output.indent(); + } + this.cdr.print(output); + } + }); + DEFPRINT(AST_Seq, function(self, output){ + self._do_print(output); + // var p = output.parent(); + // if (p instanceof AST_Statement) { + // output.with_indent(output.next_indent(), function(){ + // self._do_print(output); + // }); + // } else { + // self._do_print(output); + // } + }); + DEFPRINT(AST_Dot, function(self, output){ + var expr = self.expression; + expr.print(output); + if (expr instanceof AST_Number && expr.getValue() >= 0) { + if (!/[xa-f.]/i.test(output.last())) { + output.print("."); + } + } + output.print("."); + // the name after dot would be mapped about here. + output.add_mapping(self.end); + output.print_name(self.property); + }); + DEFPRINT(AST_Sub, function(self, output){ + self.expression.print(output); + output.print("["); + self.property.print(output); + output.print("]"); + }); + DEFPRINT(AST_UnaryPrefix, function(self, output){ + var op = self.operator; + output.print(op); + if (/^[a-z]/i.test(op) + || (/[+-]$/.test(op) + && self.expression instanceof AST_UnaryPrefix + && /^[+-]/.test(self.expression.operator))) { + output.space(); + } + self.expression.print(output); + }); + DEFPRINT(AST_UnaryPostfix, function(self, output){ + self.expression.print(output); + output.print(self.operator); + }); + DEFPRINT(AST_Binary, function(self, output){ + self.left.print(output); + output.space(); + output.print(self.operator); + if (self.operator == "<" + && self.right instanceof AST_UnaryPrefix + && self.right.operator == "!" + && self.right.expression instanceof AST_UnaryPrefix + && self.right.expression.operator == "--") { + // space is mandatory to avoid outputting ") && S.newline_before) { + forward(3); + return skip_line_comment("comment4"); + } + } + var ch = peek(); + if (!ch) return token("eof"); + var code = ch.charCodeAt(0); + switch (code) { + case 34: case 39: return read_string(); + case 46: return handle_dot(); + case 47: return handle_slash(); + } + if (is_digit(code)) return read_num(); + if (PUNC_CHARS(ch)) return token("punc", next()); + if (OPERATOR_CHARS(ch)) return read_operator(); + if (code == 92 || is_identifier_start(code)) return read_word(); + parse_error("Unexpected character '" + ch + "'"); + }; + + next_token.context = function(nc) { + if (nc) S = nc; + return S; + }; + + return next_token; + +}; + +/* -----[ Parser (constants) ]----- */ + +var UNARY_PREFIX = makePredicate([ + "typeof", + "void", + "delete", + "--", + "++", + "!", + "~", + "-", + "+" +]); + +var UNARY_POSTFIX = makePredicate([ "--", "++" ]); + +var ASSIGNMENT = makePredicate([ "=", "+=", "-=", "/=", "*=", "%=", ">>=", "<<=", ">>>=", "|=", "^=", "&=" ]); + +var PRECEDENCE = (function(a, ret){ + for (var i = 0; i < a.length; ++i) { + var b = a[i]; + for (var j = 0; j < b.length; ++j) { + ret[b[j]] = i + 1; + } + } + return ret; +})( + [ + ["||"], + ["&&"], + ["|"], + ["^"], + ["&"], + ["==", "===", "!=", "!=="], + ["<", ">", "<=", ">=", "in", "instanceof"], + [">>", "<<", ">>>"], + ["+", "-"], + ["*", "/", "%"] + ], + {} +); + +var STATEMENTS_WITH_LABELS = array_to_hash([ "for", "do", "while", "switch" ]); + +var ATOMIC_START_TOKEN = array_to_hash([ "atom", "num", "string", "regexp", "name" ]); + +/* -----[ Parser ]----- */ + +function parse($TEXT, options) { + + options = defaults(options, { + strict : false, + filename : null, + toplevel : null, + expression : false, + html5_comments : true, + }); + + var S = { + input : (typeof $TEXT == "string" + ? tokenizer($TEXT, options.filename, + options.html5_comments) + : $TEXT), + token : null, + prev : null, + peeked : null, + in_function : 0, + in_directives : true, + in_loop : 0, + labels : [] + }; + + S.token = next(); + + function is(type, value) { + return is_token(S.token, type, value); + }; + + function peek() { return S.peeked || (S.peeked = S.input()); }; + + function next() { + S.prev = S.token; + if (S.peeked) { + S.token = S.peeked; + S.peeked = null; + } else { + S.token = S.input(); + } + S.in_directives = S.in_directives && ( + S.token.type == "string" || is("punc", ";") + ); + return S.token; + }; + + function prev() { + return S.prev; + }; + + function croak(msg, line, col, pos) { + var ctx = S.input.context(); + js_error(msg, + ctx.filename, + line != null ? line : ctx.tokline, + col != null ? col : ctx.tokcol, + pos != null ? pos : ctx.tokpos); + }; + + function token_error(token, msg) { + croak(msg, token.line, token.col); + }; + + function unexpected(token) { + if (token == null) + token = S.token; + token_error(token, "Unexpected token: " + token.type + " (" + token.value + ")"); + }; + + function expect_token(type, val) { + if (is(type, val)) { + return next(); + } + token_error(S.token, "Unexpected token " + S.token.type + " «" + S.token.value + "»" + ", expected " + type + " «" + val + "»"); + }; + + function expect(punc) { return expect_token("punc", punc); }; + + function can_insert_semicolon() { + return !options.strict && ( + S.token.nlb || is("eof") || is("punc", "}") + ); + }; + + function semicolon() { + if (is("punc", ";")) next(); + else if (!can_insert_semicolon()) unexpected(); + }; + + function parenthesised() { + expect("("); + var exp = expression(true); + expect(")"); + return exp; + }; + + function embed_tokens(parser) { + return function() { + var start = S.token; + var expr = parser(); + var end = prev(); + expr.start = start; + expr.end = end; + return expr; + }; + }; + + function handle_regexp() { + if (is("operator", "/") || is("operator", "/=")) { + S.peeked = null; + S.token = S.input(S.token.value.substr(1)); // force regexp + } + }; + + var statement = embed_tokens(function() { + var tmp; + handle_regexp(); + switch (S.token.type) { + case "string": + var dir = S.in_directives, stat = simple_statement(); + // XXXv2: decide how to fix directives + if (dir && stat.body instanceof AST_String && !is("punc", ",")) + return new AST_Directive({ value: stat.body.value }); + return stat; + case "num": + case "regexp": + case "operator": + case "atom": + return simple_statement(); + + case "name": + return is_token(peek(), "punc", ":") + ? labeled_statement() + : simple_statement(); + + case "punc": + switch (S.token.value) { + case "{": + return new AST_BlockStatement({ + start : S.token, + body : block_(), + end : prev() + }); + case "[": + case "(": + return simple_statement(); + case ";": + next(); + return new AST_EmptyStatement(); + default: + unexpected(); + } + + case "keyword": + switch (tmp = S.token.value, next(), tmp) { + case "break": + return break_cont(AST_Break); + + case "continue": + return break_cont(AST_Continue); + + case "debugger": + semicolon(); + return new AST_Debugger(); + + case "do": + return new AST_Do({ + body : in_loop(statement), + condition : (expect_token("keyword", "while"), tmp = parenthesised(), semicolon(), tmp) + }); + + case "while": + return new AST_While({ + condition : parenthesised(), + body : in_loop(statement) + }); + + case "for": + return for_(); + + case "function": + return function_(AST_Defun); + + case "if": + return if_(); + + case "return": + if (S.in_function == 0) + croak("'return' outside of function"); + return new AST_Return({ + value: ( is("punc", ";") + ? (next(), null) + : can_insert_semicolon() + ? null + : (tmp = expression(true), semicolon(), tmp) ) + }); + + case "switch": + return new AST_Switch({ + expression : parenthesised(), + body : in_loop(switch_body_) + }); + + case "throw": + if (S.token.nlb) + croak("Illegal newline after 'throw'"); + return new AST_Throw({ + value: (tmp = expression(true), semicolon(), tmp) + }); + + case "try": + return try_(); + + case "var": + return tmp = var_(), semicolon(), tmp; + + case "const": + return tmp = const_(), semicolon(), tmp; + + case "with": + return new AST_With({ + expression : parenthesised(), + body : statement() + }); + + default: + unexpected(); + } + } + }); + + function labeled_statement() { + var label = as_symbol(AST_Label); + if (find_if(function(l){ return l.name == label.name }, S.labels)) { + // ECMA-262, 12.12: An ECMAScript program is considered + // syntactically incorrect if it contains a + // LabelledStatement that is enclosed by a + // LabelledStatement with the same Identifier as label. + croak("Label " + label.name + " defined twice"); + } + expect(":"); + S.labels.push(label); + var stat = statement(); + S.labels.pop(); + if (!(stat instanceof AST_IterationStatement)) { + // check for `continue` that refers to this label. + // those should be reported as syntax errors. + // https://github.com/mishoo/UglifyJS2/issues/287 + label.references.forEach(function(ref){ + if (ref instanceof AST_Continue) { + ref = ref.label.start; + croak("Continue label `" + label.name + "` refers to non-IterationStatement.", + ref.line, ref.col, ref.pos); + } + }); + } + return new AST_LabeledStatement({ body: stat, label: label }); + }; + + function simple_statement(tmp) { + return new AST_SimpleStatement({ body: (tmp = expression(true), semicolon(), tmp) }); + }; + + function break_cont(type) { + var label = null, ldef; + if (!can_insert_semicolon()) { + label = as_symbol(AST_LabelRef, true); + } + if (label != null) { + ldef = find_if(function(l){ return l.name == label.name }, S.labels); + if (!ldef) + croak("Undefined label " + label.name); + label.thedef = ldef; + } + else if (S.in_loop == 0) + croak(type.TYPE + " not inside a loop or switch"); + semicolon(); + var stat = new type({ label: label }); + if (ldef) ldef.references.push(stat); + return stat; + }; + + function for_() { + expect("("); + var init = null; + if (!is("punc", ";")) { + init = is("keyword", "var") + ? (next(), var_(true)) + : expression(true, true); + if (is("operator", "in")) { + if (init instanceof AST_Var && init.definitions.length > 1) + croak("Only one variable declaration allowed in for..in loop"); + next(); + return for_in(init); + } + } + return regular_for(init); + }; + + function regular_for(init) { + expect(";"); + var test = is("punc", ";") ? null : expression(true); + expect(";"); + var step = is("punc", ")") ? null : expression(true); + expect(")"); + return new AST_For({ + init : init, + condition : test, + step : step, + body : in_loop(statement) + }); + }; + + function for_in(init) { + var lhs = init instanceof AST_Var ? init.definitions[0].name : null; + var obj = expression(true); + expect(")"); + return new AST_ForIn({ + init : init, + name : lhs, + object : obj, + body : in_loop(statement) + }); + }; + + var function_ = function(ctor) { + var in_statement = ctor === AST_Defun; + var name = is("name") ? as_symbol(in_statement ? AST_SymbolDefun : AST_SymbolLambda) : null; + if (in_statement && !name) + unexpected(); + expect("("); + return new ctor({ + name: name, + argnames: (function(first, a){ + while (!is("punc", ")")) { + if (first) first = false; else expect(","); + a.push(as_symbol(AST_SymbolFunarg)); + } + next(); + return a; + })(true, []), + body: (function(loop, labels){ + ++S.in_function; + S.in_directives = true; + S.in_loop = 0; + S.labels = []; + var a = block_(); + --S.in_function; + S.in_loop = loop; + S.labels = labels; + return a; + })(S.in_loop, S.labels) + }); + }; + + function if_() { + var cond = parenthesised(), body = statement(), belse = null; + if (is("keyword", "else")) { + next(); + belse = statement(); + } + return new AST_If({ + condition : cond, + body : body, + alternative : belse + }); + }; + + function block_() { + expect("{"); + var a = []; + while (!is("punc", "}")) { + if (is("eof")) unexpected(); + a.push(statement()); + } + next(); + return a; + }; + + function switch_body_() { + expect("{"); + var a = [], cur = null, branch = null, tmp; + while (!is("punc", "}")) { + if (is("eof")) unexpected(); + if (is("keyword", "case")) { + if (branch) branch.end = prev(); + cur = []; + branch = new AST_Case({ + start : (tmp = S.token, next(), tmp), + expression : expression(true), + body : cur + }); + a.push(branch); + expect(":"); + } + else if (is("keyword", "default")) { + if (branch) branch.end = prev(); + cur = []; + branch = new AST_Default({ + start : (tmp = S.token, next(), expect(":"), tmp), + body : cur + }); + a.push(branch); + } + else { + if (!cur) unexpected(); + cur.push(statement()); + } + } + if (branch) branch.end = prev(); + next(); + return a; + }; + + function try_() { + var body = block_(), bcatch = null, bfinally = null; + if (is("keyword", "catch")) { + var start = S.token; + next(); + expect("("); + var name = as_symbol(AST_SymbolCatch); + expect(")"); + bcatch = new AST_Catch({ + start : start, + argname : name, + body : block_(), + end : prev() + }); + } + if (is("keyword", "finally")) { + var start = S.token; + next(); + bfinally = new AST_Finally({ + start : start, + body : block_(), + end : prev() + }); + } + if (!bcatch && !bfinally) + croak("Missing catch/finally blocks"); + return new AST_Try({ + body : body, + bcatch : bcatch, + bfinally : bfinally + }); + }; + + function vardefs(no_in, in_const) { + var a = []; + for (;;) { + a.push(new AST_VarDef({ + start : S.token, + name : as_symbol(in_const ? AST_SymbolConst : AST_SymbolVar), + value : is("operator", "=") ? (next(), expression(false, no_in)) : null, + end : prev() + })); + if (!is("punc", ",")) + break; + next(); + } + return a; + }; + + var var_ = function(no_in) { + return new AST_Var({ + start : prev(), + definitions : vardefs(no_in, false), + end : prev() + }); + }; + + var const_ = function() { + return new AST_Const({ + start : prev(), + definitions : vardefs(false, true), + end : prev() + }); + }; + + var new_ = function() { + var start = S.token; + expect_token("operator", "new"); + var newexp = expr_atom(false), args; + if (is("punc", "(")) { + next(); + args = expr_list(")"); + } else { + args = []; + } + return subscripts(new AST_New({ + start : start, + expression : newexp, + args : args, + end : prev() + }), true); + }; + + function as_atom_node() { + var tok = S.token, ret; + switch (tok.type) { + case "name": + case "keyword": + ret = _make_symbol(AST_SymbolRef); + break; + case "num": + ret = new AST_Number({ start: tok, end: tok, value: tok.value }); + break; + case "string": + ret = new AST_String({ start: tok, end: tok, value: tok.value }); + break; + case "regexp": + ret = new AST_RegExp({ start: tok, end: tok, value: tok.value }); + break; + case "atom": + switch (tok.value) { + case "false": + ret = new AST_False({ start: tok, end: tok }); + break; + case "true": + ret = new AST_True({ start: tok, end: tok }); + break; + case "null": + ret = new AST_Null({ start: tok, end: tok }); + break; + } + break; + } + next(); + return ret; + }; + + var expr_atom = function(allow_calls) { + if (is("operator", "new")) { + return new_(); + } + var start = S.token; + if (is("punc")) { + switch (start.value) { + case "(": + next(); + var ex = expression(true); + ex.start = start; + ex.end = S.token; + expect(")"); + return subscripts(ex, allow_calls); + case "[": + return subscripts(array_(), allow_calls); + case "{": + return subscripts(object_(), allow_calls); + } + unexpected(); + } + if (is("keyword", "function")) { + next(); + var func = function_(AST_Function); + func.start = start; + func.end = prev(); + return subscripts(func, allow_calls); + } + if (ATOMIC_START_TOKEN[S.token.type]) { + return subscripts(as_atom_node(), allow_calls); + } + unexpected(); + }; + + function expr_list(closing, allow_trailing_comma, allow_empty) { + var first = true, a = []; + while (!is("punc", closing)) { + if (first) first = false; else expect(","); + if (allow_trailing_comma && is("punc", closing)) break; + if (is("punc", ",") && allow_empty) { + a.push(new AST_Hole({ start: S.token, end: S.token })); + } else { + a.push(expression(false)); + } + } + next(); + return a; + }; + + var array_ = embed_tokens(function() { + expect("["); + return new AST_Array({ + elements: expr_list("]", !options.strict, true) + }); + }); + + var object_ = embed_tokens(function() { + expect("{"); + var first = true, a = []; + while (!is("punc", "}")) { + if (first) first = false; else expect(","); + if (!options.strict && is("punc", "}")) + // allow trailing comma + break; + var start = S.token; + var type = start.type; + var name = as_property_name(); + if (type == "name" && !is("punc", ":")) { + if (name == "get") { + a.push(new AST_ObjectGetter({ + start : start, + key : as_atom_node(), + value : function_(AST_Accessor), + end : prev() + })); + continue; + } + if (name == "set") { + a.push(new AST_ObjectSetter({ + start : start, + key : as_atom_node(), + value : function_(AST_Accessor), + end : prev() + })); + continue; + } + } + expect(":"); + a.push(new AST_ObjectKeyVal({ + start : start, + key : name, + value : expression(false), + end : prev() + })); + } + next(); + return new AST_Object({ properties: a }); + }); + + function as_property_name() { + var tmp = S.token; + next(); + switch (tmp.type) { + case "num": + case "string": + case "name": + case "operator": + case "keyword": + case "atom": + return tmp.value; + default: + unexpected(); + } + }; + + function as_name() { + var tmp = S.token; + next(); + switch (tmp.type) { + case "name": + case "operator": + case "keyword": + case "atom": + return tmp.value; + default: + unexpected(); + } + }; + + function _make_symbol(type) { + var name = S.token.value; + return new (name == "this" ? AST_This : type)({ + name : String(name), + start : S.token, + end : S.token + }); + }; + + function as_symbol(type, noerror) { + if (!is("name")) { + if (!noerror) croak("Name expected"); + return null; + } + var sym = _make_symbol(type); + next(); + return sym; + }; + + var subscripts = function(expr, allow_calls) { + var start = expr.start; + if (is("punc", ".")) { + next(); + return subscripts(new AST_Dot({ + start : start, + expression : expr, + property : as_name(), + end : prev() + }), allow_calls); + } + if (is("punc", "[")) { + next(); + var prop = expression(true); + expect("]"); + return subscripts(new AST_Sub({ + start : start, + expression : expr, + property : prop, + end : prev() + }), allow_calls); + } + if (allow_calls && is("punc", "(")) { + next(); + return subscripts(new AST_Call({ + start : start, + expression : expr, + args : expr_list(")"), + end : prev() + }), true); + } + return expr; + }; + + var maybe_unary = function(allow_calls) { + var start = S.token; + if (is("operator") && UNARY_PREFIX(start.value)) { + next(); + handle_regexp(); + var ex = make_unary(AST_UnaryPrefix, start.value, maybe_unary(allow_calls)); + ex.start = start; + ex.end = prev(); + return ex; + } + var val = expr_atom(allow_calls); + while (is("operator") && UNARY_POSTFIX(S.token.value) && !S.token.nlb) { + val = make_unary(AST_UnaryPostfix, S.token.value, val); + val.start = start; + val.end = S.token; + next(); + } + return val; + }; + + function make_unary(ctor, op, expr) { + if ((op == "++" || op == "--") && !is_assignable(expr)) + croak("Invalid use of " + op + " operator"); + return new ctor({ operator: op, expression: expr }); + }; + + var expr_op = function(left, min_prec, no_in) { + var op = is("operator") ? S.token.value : null; + if (op == "in" && no_in) op = null; + var prec = op != null ? PRECEDENCE[op] : null; + if (prec != null && prec > min_prec) { + next(); + var right = expr_op(maybe_unary(true), prec, no_in); + return expr_op(new AST_Binary({ + start : left.start, + left : left, + operator : op, + right : right, + end : right.end + }), min_prec, no_in); + } + return left; + }; + + function expr_ops(no_in) { + return expr_op(maybe_unary(true), 0, no_in); + }; + + var maybe_conditional = function(no_in) { + var start = S.token; + var expr = expr_ops(no_in); + if (is("operator", "?")) { + next(); + var yes = expression(false); + expect(":"); + return new AST_Conditional({ + start : start, + condition : expr, + consequent : yes, + alternative : expression(false, no_in), + end : prev() + }); + } + return expr; + }; + + function is_assignable(expr) { + if (!options.strict) return true; + if (expr instanceof AST_This) return false; + return (expr instanceof AST_PropAccess || expr instanceof AST_Symbol); + }; + + var maybe_assign = function(no_in) { + var start = S.token; + var left = maybe_conditional(no_in), val = S.token.value; + if (is("operator") && ASSIGNMENT(val)) { + if (is_assignable(left)) { + next(); + return new AST_Assign({ + start : start, + left : left, + operator : val, + right : maybe_assign(no_in), + end : prev() + }); + } + croak("Invalid assignment"); + } + return left; + }; + + var expression = function(commas, no_in) { + var start = S.token; + var expr = maybe_assign(no_in); + if (commas && is("punc", ",")) { + next(); + return new AST_Seq({ + start : start, + car : expr, + cdr : expression(true, no_in), + end : peek() + }); + } + return expr; + }; + + function in_loop(cont) { + ++S.in_loop; + var ret = cont(); + --S.in_loop; + return ret; + }; + + if (options.expression) { + return expression(true); + } + + return (function(){ + var start = S.token; + var body = []; + while (!is("eof")) + body.push(statement()); + var end = prev(); + var toplevel = options.toplevel; + if (toplevel) { + toplevel.body = toplevel.body.concat(body); + toplevel.end = end; + } else { + toplevel = new AST_Toplevel({ start: start, body: body, end: end }); + } + return toplevel; + })(); + +}; diff --git a/bin/node_modules/uglify-js/lib/scope.js b/bin/node_modules/uglify-js/lib/scope.js new file mode 100644 index 00000000..1ce17fa6 --- /dev/null +++ b/bin/node_modules/uglify-js/lib/scope.js @@ -0,0 +1,567 @@ +/*********************************************************************** + + A JavaScript tokenizer / parser / beautifier / compressor. + https://github.com/mishoo/UglifyJS2 + + -------------------------------- (C) --------------------------------- + + Author: Mihai Bazon + + http://mihai.bazon.net/blog + + Distributed under the BSD license: + + Copyright 2012 (c) Mihai Bazon + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above + copyright notice, this list of conditions and the following + disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials + provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS†AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF + THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + ***********************************************************************/ + +"use strict"; + +function SymbolDef(scope, index, orig) { + this.name = orig.name; + this.orig = [ orig ]; + this.scope = scope; + this.references = []; + this.global = false; + this.mangled_name = null; + this.undeclared = false; + this.constant = false; + this.index = index; +}; + +SymbolDef.prototype = { + unmangleable: function(options) { + return (this.global && !(options && options.toplevel)) + || this.undeclared + || (!(options && options.eval) && (this.scope.uses_eval || this.scope.uses_with)); + }, + mangle: function(options) { + if (!this.mangled_name && !this.unmangleable(options)) { + var s = this.scope; + if (!options.screw_ie8 && this.orig[0] instanceof AST_SymbolLambda) + s = s.parent_scope; + this.mangled_name = s.next_mangled(options, this); + } + } +}; + +AST_Toplevel.DEFMETHOD("figure_out_scope", function(options){ + options = defaults(options, { + screw_ie8: false + }); + + // pass 1: setup scope chaining and handle definitions + var self = this; + var scope = self.parent_scope = null; + var defun = null; + var nesting = 0; + var tw = new TreeWalker(function(node, descend){ + if (options.screw_ie8 && node instanceof AST_Catch) { + var save_scope = scope; + scope = new AST_Scope(node); + scope.init_scope_vars(nesting); + scope.parent_scope = save_scope; + descend(); + scope = save_scope; + return true; + } + if (node instanceof AST_Scope) { + node.init_scope_vars(nesting); + var save_scope = node.parent_scope = scope; + var save_defun = defun; + defun = scope = node; + ++nesting; descend(); --nesting; + scope = save_scope; + defun = save_defun; + return true; // don't descend again in TreeWalker + } + if (node instanceof AST_Directive) { + node.scope = scope; + push_uniq(scope.directives, node.value); + return true; + } + if (node instanceof AST_With) { + for (var s = scope; s; s = s.parent_scope) + s.uses_with = true; + return; + } + if (node instanceof AST_Symbol) { + node.scope = scope; + } + if (node instanceof AST_SymbolLambda) { + defun.def_function(node); + } + else if (node instanceof AST_SymbolDefun) { + // Careful here, the scope where this should be defined is + // the parent scope. The reason is that we enter a new + // scope when we encounter the AST_Defun node (which is + // instanceof AST_Scope) but we get to the symbol a bit + // later. + (node.scope = defun.parent_scope).def_function(node); + } + else if (node instanceof AST_SymbolVar + || node instanceof AST_SymbolConst) { + var def = defun.def_variable(node); + def.constant = node instanceof AST_SymbolConst; + def.init = tw.parent().value; + } + else if (node instanceof AST_SymbolCatch) { + (options.screw_ie8 ? scope : defun) + .def_variable(node); + } + }); + self.walk(tw); + + // pass 2: find back references and eval + var func = null; + var globals = self.globals = new Dictionary(); + var tw = new TreeWalker(function(node, descend){ + if (node instanceof AST_Lambda) { + var prev_func = func; + func = node; + descend(); + func = prev_func; + return true; + } + if (node instanceof AST_SymbolRef) { + var name = node.name; + var sym = node.scope.find_variable(name); + if (!sym) { + var g; + if (globals.has(name)) { + g = globals.get(name); + } else { + g = new SymbolDef(self, globals.size(), node); + g.undeclared = true; + g.global = true; + globals.set(name, g); + } + node.thedef = g; + if (name == "eval" && tw.parent() instanceof AST_Call) { + for (var s = node.scope; s && !s.uses_eval; s = s.parent_scope) + s.uses_eval = true; + } + if (func && name == "arguments") { + func.uses_arguments = true; + } + } else { + node.thedef = sym; + } + node.reference(); + return true; + } + }); + self.walk(tw); +}); + +AST_Scope.DEFMETHOD("init_scope_vars", function(nesting){ + this.directives = []; // contains the directives defined in this scope, i.e. "use strict" + this.variables = new Dictionary(); // map name to AST_SymbolVar (variables defined in this scope; includes functions) + this.functions = new Dictionary(); // map name to AST_SymbolDefun (functions defined in this scope) + this.uses_with = false; // will be set to true if this or some nested scope uses the `with` statement + this.uses_eval = false; // will be set to true if this or nested scope uses the global `eval` + this.parent_scope = null; // the parent scope + this.enclosed = []; // a list of variables from this or outer scope(s) that are referenced from this or inner scopes + this.cname = -1; // the current index for mangling functions/variables + this.nesting = nesting; // the nesting level of this scope (0 means toplevel) +}); + +AST_Scope.DEFMETHOD("strict", function(){ + return this.has_directive("use strict"); +}); + +AST_Lambda.DEFMETHOD("init_scope_vars", function(){ + AST_Scope.prototype.init_scope_vars.apply(this, arguments); + this.uses_arguments = false; +}); + +AST_SymbolRef.DEFMETHOD("reference", function() { + var def = this.definition(); + def.references.push(this); + var s = this.scope; + while (s) { + push_uniq(s.enclosed, def); + if (s === def.scope) break; + s = s.parent_scope; + } + this.frame = this.scope.nesting - def.scope.nesting; +}); + +AST_Scope.DEFMETHOD("find_variable", function(name){ + if (name instanceof AST_Symbol) name = name.name; + return this.variables.get(name) + || (this.parent_scope && this.parent_scope.find_variable(name)); +}); + +AST_Scope.DEFMETHOD("has_directive", function(value){ + return this.parent_scope && this.parent_scope.has_directive(value) + || (this.directives.indexOf(value) >= 0 ? this : null); +}); + +AST_Scope.DEFMETHOD("def_function", function(symbol){ + this.functions.set(symbol.name, this.def_variable(symbol)); +}); + +AST_Scope.DEFMETHOD("def_variable", function(symbol){ + var def; + if (!this.variables.has(symbol.name)) { + def = new SymbolDef(this, this.variables.size(), symbol); + this.variables.set(symbol.name, def); + def.global = !this.parent_scope; + } else { + def = this.variables.get(symbol.name); + def.orig.push(symbol); + } + return symbol.thedef = def; +}); + +AST_Scope.DEFMETHOD("next_mangled", function(options){ + var ext = this.enclosed; + out: while (true) { + var m = base54(++this.cname); + if (!is_identifier(m)) continue; // skip over "do" + + // https://github.com/mishoo/UglifyJS2/issues/242 -- do not + // shadow a name excepted from mangling. + if (options.except.indexOf(m) >= 0) continue; + + // we must ensure that the mangled name does not shadow a name + // from some parent scope that is referenced in this or in + // inner scopes. + for (var i = ext.length; --i >= 0;) { + var sym = ext[i]; + var name = sym.mangled_name || (sym.unmangleable(options) && sym.name); + if (m == name) continue out; + } + return m; + } +}); + +AST_Function.DEFMETHOD("next_mangled", function(options, def){ + // #179, #326 + // in Safari strict mode, something like (function x(x){...}) is a syntax error; + // a function expression's argument cannot shadow the function expression's name + + var tricky_def = def.orig[0] instanceof AST_SymbolFunarg && this.name && this.name.definition(); + while (true) { + var name = AST_Lambda.prototype.next_mangled.call(this, options, def); + if (!(tricky_def && tricky_def.mangled_name == name)) + return name; + } +}); + +AST_Scope.DEFMETHOD("references", function(sym){ + if (sym instanceof AST_Symbol) sym = sym.definition(); + return this.enclosed.indexOf(sym) < 0 ? null : sym; +}); + +AST_Symbol.DEFMETHOD("unmangleable", function(options){ + return this.definition().unmangleable(options); +}); + +// property accessors are not mangleable +AST_SymbolAccessor.DEFMETHOD("unmangleable", function(){ + return true; +}); + +// labels are always mangleable +AST_Label.DEFMETHOD("unmangleable", function(){ + return false; +}); + +AST_Symbol.DEFMETHOD("unreferenced", function(){ + return this.definition().references.length == 0 + && !(this.scope.uses_eval || this.scope.uses_with); +}); + +AST_Symbol.DEFMETHOD("undeclared", function(){ + return this.definition().undeclared; +}); + +AST_LabelRef.DEFMETHOD("undeclared", function(){ + return false; +}); + +AST_Label.DEFMETHOD("undeclared", function(){ + return false; +}); + +AST_Symbol.DEFMETHOD("definition", function(){ + return this.thedef; +}); + +AST_Symbol.DEFMETHOD("global", function(){ + return this.definition().global; +}); + +AST_Toplevel.DEFMETHOD("_default_mangler_options", function(options){ + return defaults(options, { + except : [], + eval : false, + sort : false, + toplevel : false, + screw_ie8 : false + }); +}); + +AST_Toplevel.DEFMETHOD("mangle_names", function(options){ + options = this._default_mangler_options(options); + // We only need to mangle declaration nodes. Special logic wired + // into the code generator will display the mangled name if it's + // present (and for AST_SymbolRef-s it'll use the mangled name of + // the AST_SymbolDeclaration that it points to). + var lname = -1; + var to_mangle = []; + var tw = new TreeWalker(function(node, descend){ + if (node instanceof AST_LabeledStatement) { + // lname is incremented when we get to the AST_Label + var save_nesting = lname; + descend(); + lname = save_nesting; + return true; // don't descend again in TreeWalker + } + if (node instanceof AST_Scope) { + var p = tw.parent(), a = []; + node.variables.each(function(symbol){ + if (options.except.indexOf(symbol.name) < 0) { + a.push(symbol); + } + }); + if (options.sort) a.sort(function(a, b){ + return b.references.length - a.references.length; + }); + to_mangle.push.apply(to_mangle, a); + return; + } + if (node instanceof AST_Label) { + var name; + do name = base54(++lname); while (!is_identifier(name)); + node.mangled_name = name; + return true; + } + if (options.screw_ie8 && node instanceof AST_SymbolCatch) { + to_mangle.push(node.definition()); + return; + } + }); + this.walk(tw); + to_mangle.forEach(function(def){ def.mangle(options) }); +}); + +AST_Toplevel.DEFMETHOD("compute_char_frequency", function(options){ + options = this._default_mangler_options(options); + var tw = new TreeWalker(function(node){ + if (node instanceof AST_Constant) + base54.consider(node.print_to_string()); + else if (node instanceof AST_Return) + base54.consider("return"); + else if (node instanceof AST_Throw) + base54.consider("throw"); + else if (node instanceof AST_Continue) + base54.consider("continue"); + else if (node instanceof AST_Break) + base54.consider("break"); + else if (node instanceof AST_Debugger) + base54.consider("debugger"); + else if (node instanceof AST_Directive) + base54.consider(node.value); + else if (node instanceof AST_While) + base54.consider("while"); + else if (node instanceof AST_Do) + base54.consider("do while"); + else if (node instanceof AST_If) { + base54.consider("if"); + if (node.alternative) base54.consider("else"); + } + else if (node instanceof AST_Var) + base54.consider("var"); + else if (node instanceof AST_Const) + base54.consider("const"); + else if (node instanceof AST_Lambda) + base54.consider("function"); + else if (node instanceof AST_For) + base54.consider("for"); + else if (node instanceof AST_ForIn) + base54.consider("for in"); + else if (node instanceof AST_Switch) + base54.consider("switch"); + else if (node instanceof AST_Case) + base54.consider("case"); + else if (node instanceof AST_Default) + base54.consider("default"); + else if (node instanceof AST_With) + base54.consider("with"); + else if (node instanceof AST_ObjectSetter) + base54.consider("set" + node.key); + else if (node instanceof AST_ObjectGetter) + base54.consider("get" + node.key); + else if (node instanceof AST_ObjectKeyVal) + base54.consider(node.key); + else if (node instanceof AST_New) + base54.consider("new"); + else if (node instanceof AST_This) + base54.consider("this"); + else if (node instanceof AST_Try) + base54.consider("try"); + else if (node instanceof AST_Catch) + base54.consider("catch"); + else if (node instanceof AST_Finally) + base54.consider("finally"); + else if (node instanceof AST_Symbol && node.unmangleable(options)) + base54.consider(node.name); + else if (node instanceof AST_Unary || node instanceof AST_Binary) + base54.consider(node.operator); + else if (node instanceof AST_Dot) + base54.consider(node.property); + }); + this.walk(tw); + base54.sort(); +}); + +var base54 = (function() { + var string = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_0123456789"; + var chars, frequency; + function reset() { + frequency = Object.create(null); + chars = string.split("").map(function(ch){ return ch.charCodeAt(0) }); + chars.forEach(function(ch){ frequency[ch] = 0 }); + } + base54.consider = function(str){ + for (var i = str.length; --i >= 0;) { + var code = str.charCodeAt(i); + if (code in frequency) ++frequency[code]; + } + }; + base54.sort = function() { + chars = mergeSort(chars, function(a, b){ + if (is_digit(a) && !is_digit(b)) return 1; + if (is_digit(b) && !is_digit(a)) return -1; + return frequency[b] - frequency[a]; + }); + }; + base54.reset = reset; + reset(); + base54.get = function(){ return chars }; + base54.freq = function(){ return frequency }; + function base54(num) { + var ret = "", base = 54; + do { + ret += String.fromCharCode(chars[num % base]); + num = Math.floor(num / base); + base = 64; + } while (num > 0); + return ret; + }; + return base54; +})(); + +AST_Toplevel.DEFMETHOD("scope_warnings", function(options){ + options = defaults(options, { + undeclared : false, // this makes a lot of noise + unreferenced : true, + assign_to_global : true, + func_arguments : true, + nested_defuns : true, + eval : true + }); + var tw = new TreeWalker(function(node){ + if (options.undeclared + && node instanceof AST_SymbolRef + && node.undeclared()) + { + // XXX: this also warns about JS standard names, + // i.e. Object, Array, parseInt etc. Should add a list of + // exceptions. + AST_Node.warn("Undeclared symbol: {name} [{file}:{line},{col}]", { + name: node.name, + file: node.start.file, + line: node.start.line, + col: node.start.col + }); + } + if (options.assign_to_global) + { + var sym = null; + if (node instanceof AST_Assign && node.left instanceof AST_SymbolRef) + sym = node.left; + else if (node instanceof AST_ForIn && node.init instanceof AST_SymbolRef) + sym = node.init; + if (sym + && (sym.undeclared() + || (sym.global() && sym.scope !== sym.definition().scope))) { + AST_Node.warn("{msg}: {name} [{file}:{line},{col}]", { + msg: sym.undeclared() ? "Accidental global?" : "Assignment to global", + name: sym.name, + file: sym.start.file, + line: sym.start.line, + col: sym.start.col + }); + } + } + if (options.eval + && node instanceof AST_SymbolRef + && node.undeclared() + && node.name == "eval") { + AST_Node.warn("Eval is used [{file}:{line},{col}]", node.start); + } + if (options.unreferenced + && (node instanceof AST_SymbolDeclaration || node instanceof AST_Label) + && node.unreferenced()) { + AST_Node.warn("{type} {name} is declared but not referenced [{file}:{line},{col}]", { + type: node instanceof AST_Label ? "Label" : "Symbol", + name: node.name, + file: node.start.file, + line: node.start.line, + col: node.start.col + }); + } + if (options.func_arguments + && node instanceof AST_Lambda + && node.uses_arguments) { + AST_Node.warn("arguments used in function {name} [{file}:{line},{col}]", { + name: node.name ? node.name.name : "anonymous", + file: node.start.file, + line: node.start.line, + col: node.start.col + }); + } + if (options.nested_defuns + && node instanceof AST_Defun + && !(tw.parent() instanceof AST_Scope)) { + AST_Node.warn("Function {name} declared in nested statement \"{type}\" [{file}:{line},{col}]", { + name: node.name.name, + type: tw.parent().TYPE, + file: node.start.file, + line: node.start.line, + col: node.start.col + }); + } + }); + this.walk(tw); +}); diff --git a/bin/node_modules/uglify-js/lib/sourcemap.js b/bin/node_modules/uglify-js/lib/sourcemap.js new file mode 100644 index 00000000..663ef12e --- /dev/null +++ b/bin/node_modules/uglify-js/lib/sourcemap.js @@ -0,0 +1,87 @@ +/*********************************************************************** + + A JavaScript tokenizer / parser / beautifier / compressor. + https://github.com/mishoo/UglifyJS2 + + -------------------------------- (C) --------------------------------- + + Author: Mihai Bazon + + http://mihai.bazon.net/blog + + Distributed under the BSD license: + + Copyright 2012 (c) Mihai Bazon + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above + copyright notice, this list of conditions and the following + disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials + provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS†AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF + THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + ***********************************************************************/ + +"use strict"; + +// a small wrapper around fitzgen's source-map library +function SourceMap(options) { + options = defaults(options, { + file : null, + root : null, + orig : null, + + orig_line_diff : 0, + dest_line_diff : 0, + }); + var generator = new MOZ_SourceMap.SourceMapGenerator({ + file : options.file, + sourceRoot : options.root + }); + var orig_map = options.orig && new MOZ_SourceMap.SourceMapConsumer(options.orig); + function add(source, gen_line, gen_col, orig_line, orig_col, name) { + if (orig_map) { + var info = orig_map.originalPositionFor({ + line: orig_line, + column: orig_col + }); + if (info.source === null) { + return; + } + source = info.source; + orig_line = info.line; + orig_col = info.column; + name = info.name; + } + generator.addMapping({ + generated : { line: gen_line + options.dest_line_diff, column: gen_col }, + original : { line: orig_line + options.orig_line_diff, column: orig_col }, + source : source, + name : name + }); + }; + return { + add : add, + get : function() { return generator }, + toString : function() { return generator.toString() } + }; +}; diff --git a/bin/node_modules/uglify-js/lib/transform.js b/bin/node_modules/uglify-js/lib/transform.js new file mode 100644 index 00000000..c3c34f58 --- /dev/null +++ b/bin/node_modules/uglify-js/lib/transform.js @@ -0,0 +1,218 @@ +/*********************************************************************** + + A JavaScript tokenizer / parser / beautifier / compressor. + https://github.com/mishoo/UglifyJS2 + + -------------------------------- (C) --------------------------------- + + Author: Mihai Bazon + + http://mihai.bazon.net/blog + + Distributed under the BSD license: + + Copyright 2012 (c) Mihai Bazon + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above + copyright notice, this list of conditions and the following + disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials + provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS†AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF + THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + ***********************************************************************/ + +"use strict"; + +// Tree transformer helpers. + +function TreeTransformer(before, after) { + TreeWalker.call(this); + this.before = before; + this.after = after; +} +TreeTransformer.prototype = new TreeWalker; + +(function(undefined){ + + function _(node, descend) { + node.DEFMETHOD("transform", function(tw, in_list){ + var x, y; + tw.push(this); + if (tw.before) x = tw.before(this, descend, in_list); + if (x === undefined) { + if (!tw.after) { + x = this; + descend(x, tw); + } else { + tw.stack[tw.stack.length - 1] = x = this.clone(); + descend(x, tw); + y = tw.after(x, in_list); + if (y !== undefined) x = y; + } + } + tw.pop(); + return x; + }); + }; + + function do_list(list, tw) { + return MAP(list, function(node){ + return node.transform(tw, true); + }); + }; + + _(AST_Node, noop); + + _(AST_LabeledStatement, function(self, tw){ + self.label = self.label.transform(tw); + self.body = self.body.transform(tw); + }); + + _(AST_SimpleStatement, function(self, tw){ + self.body = self.body.transform(tw); + }); + + _(AST_Block, function(self, tw){ + self.body = do_list(self.body, tw); + }); + + _(AST_DWLoop, function(self, tw){ + self.condition = self.condition.transform(tw); + self.body = self.body.transform(tw); + }); + + _(AST_For, function(self, tw){ + if (self.init) self.init = self.init.transform(tw); + if (self.condition) self.condition = self.condition.transform(tw); + if (self.step) self.step = self.step.transform(tw); + self.body = self.body.transform(tw); + }); + + _(AST_ForIn, function(self, tw){ + self.init = self.init.transform(tw); + self.object = self.object.transform(tw); + self.body = self.body.transform(tw); + }); + + _(AST_With, function(self, tw){ + self.expression = self.expression.transform(tw); + self.body = self.body.transform(tw); + }); + + _(AST_Exit, function(self, tw){ + if (self.value) self.value = self.value.transform(tw); + }); + + _(AST_LoopControl, function(self, tw){ + if (self.label) self.label = self.label.transform(tw); + }); + + _(AST_If, function(self, tw){ + self.condition = self.condition.transform(tw); + self.body = self.body.transform(tw); + if (self.alternative) self.alternative = self.alternative.transform(tw); + }); + + _(AST_Switch, function(self, tw){ + self.expression = self.expression.transform(tw); + self.body = do_list(self.body, tw); + }); + + _(AST_Case, function(self, tw){ + self.expression = self.expression.transform(tw); + self.body = do_list(self.body, tw); + }); + + _(AST_Try, function(self, tw){ + self.body = do_list(self.body, tw); + if (self.bcatch) self.bcatch = self.bcatch.transform(tw); + if (self.bfinally) self.bfinally = self.bfinally.transform(tw); + }); + + _(AST_Catch, function(self, tw){ + self.argname = self.argname.transform(tw); + self.body = do_list(self.body, tw); + }); + + _(AST_Definitions, function(self, tw){ + self.definitions = do_list(self.definitions, tw); + }); + + _(AST_VarDef, function(self, tw){ + self.name = self.name.transform(tw); + if (self.value) self.value = self.value.transform(tw); + }); + + _(AST_Lambda, function(self, tw){ + if (self.name) self.name = self.name.transform(tw); + self.argnames = do_list(self.argnames, tw); + self.body = do_list(self.body, tw); + }); + + _(AST_Call, function(self, tw){ + self.expression = self.expression.transform(tw); + self.args = do_list(self.args, tw); + }); + + _(AST_Seq, function(self, tw){ + self.car = self.car.transform(tw); + self.cdr = self.cdr.transform(tw); + }); + + _(AST_Dot, function(self, tw){ + self.expression = self.expression.transform(tw); + }); + + _(AST_Sub, function(self, tw){ + self.expression = self.expression.transform(tw); + self.property = self.property.transform(tw); + }); + + _(AST_Unary, function(self, tw){ + self.expression = self.expression.transform(tw); + }); + + _(AST_Binary, function(self, tw){ + self.left = self.left.transform(tw); + self.right = self.right.transform(tw); + }); + + _(AST_Conditional, function(self, tw){ + self.condition = self.condition.transform(tw); + self.consequent = self.consequent.transform(tw); + self.alternative = self.alternative.transform(tw); + }); + + _(AST_Array, function(self, tw){ + self.elements = do_list(self.elements, tw); + }); + + _(AST_Object, function(self, tw){ + self.properties = do_list(self.properties, tw); + }); + + _(AST_ObjectProperty, function(self, tw){ + self.value = self.value.transform(tw); + }); + +})(); diff --git a/bin/node_modules/uglify-js/lib/utils.js b/bin/node_modules/uglify-js/lib/utils.js new file mode 100644 index 00000000..7c6a1563 --- /dev/null +++ b/bin/node_modules/uglify-js/lib/utils.js @@ -0,0 +1,302 @@ +/*********************************************************************** + + A JavaScript tokenizer / parser / beautifier / compressor. + https://github.com/mishoo/UglifyJS2 + + -------------------------------- (C) --------------------------------- + + Author: Mihai Bazon + + http://mihai.bazon.net/blog + + Distributed under the BSD license: + + Copyright 2012 (c) Mihai Bazon + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above + copyright notice, this list of conditions and the following + disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials + provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS†AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF + THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + ***********************************************************************/ + +"use strict"; + +function array_to_hash(a) { + var ret = Object.create(null); + for (var i = 0; i < a.length; ++i) + ret[a[i]] = true; + return ret; +}; + +function slice(a, start) { + return Array.prototype.slice.call(a, start || 0); +}; + +function characters(str) { + return str.split(""); +}; + +function member(name, array) { + for (var i = array.length; --i >= 0;) + if (array[i] == name) + return true; + return false; +}; + +function find_if(func, array) { + for (var i = 0, n = array.length; i < n; ++i) { + if (func(array[i])) + return array[i]; + } +}; + +function repeat_string(str, i) { + if (i <= 0) return ""; + if (i == 1) return str; + var d = repeat_string(str, i >> 1); + d += d; + if (i & 1) d += str; + return d; +}; + +function DefaultsError(msg, defs) { + Error.call(this, msg); + this.msg = msg; + this.defs = defs; +}; +DefaultsError.prototype = Object.create(Error.prototype); +DefaultsError.prototype.constructor = DefaultsError; + +DefaultsError.croak = function(msg, defs) { + throw new DefaultsError(msg, defs); +}; + +function defaults(args, defs, croak) { + if (args === true) + args = {}; + var ret = args || {}; + if (croak) for (var i in ret) if (ret.hasOwnProperty(i) && !defs.hasOwnProperty(i)) + DefaultsError.croak("`" + i + "` is not a supported option", defs); + for (var i in defs) if (defs.hasOwnProperty(i)) { + ret[i] = (args && args.hasOwnProperty(i)) ? args[i] : defs[i]; + } + return ret; +}; + +function merge(obj, ext) { + for (var i in ext) if (ext.hasOwnProperty(i)) { + obj[i] = ext[i]; + } + return obj; +}; + +function noop() {}; + +var MAP = (function(){ + function MAP(a, f, backwards) { + var ret = [], top = [], i; + function doit() { + var val = f(a[i], i); + var is_last = val instanceof Last; + if (is_last) val = val.v; + if (val instanceof AtTop) { + val = val.v; + if (val instanceof Splice) { + top.push.apply(top, backwards ? val.v.slice().reverse() : val.v); + } else { + top.push(val); + } + } + else if (val !== skip) { + if (val instanceof Splice) { + ret.push.apply(ret, backwards ? val.v.slice().reverse() : val.v); + } else { + ret.push(val); + } + } + return is_last; + }; + if (a instanceof Array) { + if (backwards) { + for (i = a.length; --i >= 0;) if (doit()) break; + ret.reverse(); + top.reverse(); + } else { + for (i = 0; i < a.length; ++i) if (doit()) break; + } + } + else { + for (i in a) if (a.hasOwnProperty(i)) if (doit()) break; + } + return top.concat(ret); + }; + MAP.at_top = function(val) { return new AtTop(val) }; + MAP.splice = function(val) { return new Splice(val) }; + MAP.last = function(val) { return new Last(val) }; + var skip = MAP.skip = {}; + function AtTop(val) { this.v = val }; + function Splice(val) { this.v = val }; + function Last(val) { this.v = val }; + return MAP; +})(); + +function push_uniq(array, el) { + if (array.indexOf(el) < 0) + array.push(el); +}; + +function string_template(text, props) { + return text.replace(/\{(.+?)\}/g, function(str, p){ + return props[p]; + }); +}; + +function remove(array, el) { + for (var i = array.length; --i >= 0;) { + if (array[i] === el) array.splice(i, 1); + } +}; + +function mergeSort(array, cmp) { + if (array.length < 2) return array.slice(); + function merge(a, b) { + var r = [], ai = 0, bi = 0, i = 0; + while (ai < a.length && bi < b.length) { + cmp(a[ai], b[bi]) <= 0 + ? r[i++] = a[ai++] + : r[i++] = b[bi++]; + } + if (ai < a.length) r.push.apply(r, a.slice(ai)); + if (bi < b.length) r.push.apply(r, b.slice(bi)); + return r; + }; + function _ms(a) { + if (a.length <= 1) + return a; + var m = Math.floor(a.length / 2), left = a.slice(0, m), right = a.slice(m); + left = _ms(left); + right = _ms(right); + return merge(left, right); + }; + return _ms(array); +}; + +function set_difference(a, b) { + return a.filter(function(el){ + return b.indexOf(el) < 0; + }); +}; + +function set_intersection(a, b) { + return a.filter(function(el){ + return b.indexOf(el) >= 0; + }); +}; + +// this function is taken from Acorn [1], written by Marijn Haverbeke +// [1] https://github.com/marijnh/acorn +function makePredicate(words) { + if (!(words instanceof Array)) words = words.split(" "); + var f = "", cats = []; + out: for (var i = 0; i < words.length; ++i) { + for (var j = 0; j < cats.length; ++j) + if (cats[j][0].length == words[i].length) { + cats[j].push(words[i]); + continue out; + } + cats.push([words[i]]); + } + function compareTo(arr) { + if (arr.length == 1) return f += "return str === " + JSON.stringify(arr[0]) + ";"; + f += "switch(str){"; + for (var i = 0; i < arr.length; ++i) f += "case " + JSON.stringify(arr[i]) + ":"; + f += "return true}return false;"; + } + // When there are more than three length categories, an outer + // switch first dispatches on the lengths, to save on comparisons. + if (cats.length > 3) { + cats.sort(function(a, b) {return b.length - a.length;}); + f += "switch(str.length){"; + for (var i = 0; i < cats.length; ++i) { + var cat = cats[i]; + f += "case " + cat[0].length + ":"; + compareTo(cat); + } + f += "}"; + // Otherwise, simply generate a flat `switch` statement. + } else { + compareTo(words); + } + return new Function("str", f); +}; + +function all(array, predicate) { + for (var i = array.length; --i >= 0;) + if (!predicate(array[i])) + return false; + return true; +}; + +function Dictionary() { + this._values = Object.create(null); + this._size = 0; +}; +Dictionary.prototype = { + set: function(key, val) { + if (!this.has(key)) ++this._size; + this._values["$" + key] = val; + return this; + }, + add: function(key, val) { + if (this.has(key)) { + this.get(key).push(val); + } else { + this.set(key, [ val ]); + } + return this; + }, + get: function(key) { return this._values["$" + key] }, + del: function(key) { + if (this.has(key)) { + --this._size; + delete this._values["$" + key]; + } + return this; + }, + has: function(key) { return ("$" + key) in this._values }, + each: function(f) { + for (var i in this._values) + f(this._values[i], i.substr(1)); + }, + size: function() { + return this._size; + }, + map: function(f) { + var ret = []; + for (var i in this._values) + ret.push(f(this._values[i], i.substr(1))); + return ret; + } +}; diff --git a/bin/node_modules/uglify-js/node_modules/async/LICENSE b/bin/node_modules/uglify-js/node_modules/async/LICENSE new file mode 100644 index 00000000..b7f9d500 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/async/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2010 Caolan McMahon + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/bin/node_modules/uglify-js/node_modules/async/README.md b/bin/node_modules/uglify-js/node_modules/async/README.md new file mode 100644 index 00000000..951f76e9 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/async/README.md @@ -0,0 +1,1425 @@ +# Async.js + +Async is a utility module which provides straight-forward, powerful functions +for working with asynchronous JavaScript. Although originally designed for +use with [node.js](http://nodejs.org), it can also be used directly in the +browser. Also supports [component](https://github.com/component/component). + +Async provides around 20 functions that include the usual 'functional' +suspects (map, reduce, filter, each…) as well as some common patterns +for asynchronous control flow (parallel, series, waterfall…). All these +functions assume you follow the node.js convention of providing a single +callback as the last argument of your async function. + + +## Quick Examples + +```javascript +async.map(['file1','file2','file3'], fs.stat, function(err, results){ + // results is now an array of stats for each file +}); + +async.filter(['file1','file2','file3'], fs.exists, function(results){ + // results now equals an array of the existing files +}); + +async.parallel([ + function(){ ... }, + function(){ ... } +], callback); + +async.series([ + function(){ ... }, + function(){ ... } +]); +``` + +There are many more functions available so take a look at the docs below for a +full list. This module aims to be comprehensive, so if you feel anything is +missing please create a GitHub issue for it. + +## Common Pitfalls + +### Binding a context to an iterator + +This section is really about bind, not about async. If you are wondering how to +make async execute your iterators in a given context, or are confused as to why +a method of another library isn't working as an iterator, study this example: + +```js +// Here is a simple object with an (unnecessarily roundabout) squaring method +var AsyncSquaringLibrary = { + squareExponent: 2, + square: function(number, callback){ + var result = Math.pow(number, this.squareExponent); + setTimeout(function(){ + callback(null, result); + }, 200); + } +}; + +async.map([1, 2, 3], AsyncSquaringLibrary.square, function(err, result){ + // result is [NaN, NaN, NaN] + // This fails because the `this.squareExponent` expression in the square + // function is not evaluated in the context of AsyncSquaringLibrary, and is + // therefore undefined. +}); + +async.map([1, 2, 3], AsyncSquaringLibrary.square.bind(AsyncSquaringLibrary), function(err, result){ + // result is [1, 4, 9] + // With the help of bind we can attach a context to the iterator before + // passing it to async. Now the square function will be executed in its + // 'home' AsyncSquaringLibrary context and the value of `this.squareExponent` + // will be as expected. +}); +``` + +## Download + +The source is available for download from +[GitHub](http://github.com/caolan/async). +Alternatively, you can install using Node Package Manager (npm): + + npm install async + +__Development:__ [async.js](https://github.com/caolan/async/raw/master/lib/async.js) - 29.6kb Uncompressed + +## In the Browser + +So far it's been tested in IE6, IE7, IE8, FF3.6 and Chrome 5. Usage: + +```html + + +``` + +## Documentation + +### Collections + +* [each](#each) +* [eachSeries](#eachSeries) +* [eachLimit](#eachLimit) +* [map](#map) +* [mapSeries](#mapSeries) +* [mapLimit](#mapLimit) +* [filter](#filter) +* [filterSeries](#filterSeries) +* [reject](#reject) +* [rejectSeries](#rejectSeries) +* [reduce](#reduce) +* [reduceRight](#reduceRight) +* [detect](#detect) +* [detectSeries](#detectSeries) +* [sortBy](#sortBy) +* [some](#some) +* [every](#every) +* [concat](#concat) +* [concatSeries](#concatSeries) + +### Control Flow + +* [series](#series) +* [parallel](#parallel) +* [parallelLimit](#parallellimittasks-limit-callback) +* [whilst](#whilst) +* [doWhilst](#doWhilst) +* [until](#until) +* [doUntil](#doUntil) +* [forever](#forever) +* [waterfall](#waterfall) +* [compose](#compose) +* [applyEach](#applyEach) +* [applyEachSeries](#applyEachSeries) +* [queue](#queue) +* [cargo](#cargo) +* [auto](#auto) +* [iterator](#iterator) +* [apply](#apply) +* [nextTick](#nextTick) +* [times](#times) +* [timesSeries](#timesSeries) + +### Utils + +* [memoize](#memoize) +* [unmemoize](#unmemoize) +* [log](#log) +* [dir](#dir) +* [noConflict](#noConflict) + + +## Collections + + + +### each(arr, iterator, callback) + +Applies an iterator function to each item in an array, in parallel. +The iterator is called with an item from the list and a callback for when it +has finished. If the iterator passes an error to this callback, the main +callback for the each function is immediately called with the error. + +Note, that since this function applies the iterator to each item in parallel +there is no guarantee that the iterator functions will complete in order. + +__Arguments__ + +* arr - An array to iterate over. +* iterator(item, callback) - A function to apply to each item in the array. + The iterator is passed a callback(err) which must be called once it has + completed. If no error has occured, the callback should be run without + arguments or with an explicit null argument. +* callback(err) - A callback which is called after all the iterator functions + have finished, or an error has occurred. + +__Example__ + +```js +// assuming openFiles is an array of file names and saveFile is a function +// to save the modified contents of that file: + +async.each(openFiles, saveFile, function(err){ + // if any of the saves produced an error, err would equal that error +}); +``` + +--------------------------------------- + + + +### eachSeries(arr, iterator, callback) + +The same as each only the iterator is applied to each item in the array in +series. The next iterator is only called once the current one has completed +processing. This means the iterator functions will complete in order. + + +--------------------------------------- + + + +### eachLimit(arr, limit, iterator, callback) + +The same as each only no more than "limit" iterators will be simultaneously +running at any time. + +Note that the items are not processed in batches, so there is no guarantee that + the first "limit" iterator functions will complete before any others are +started. + +__Arguments__ + +* arr - An array to iterate over. +* limit - The maximum number of iterators to run at any time. +* iterator(item, callback) - A function to apply to each item in the array. + The iterator is passed a callback(err) which must be called once it has + completed. If no error has occured, the callback should be run without + arguments or with an explicit null argument. +* callback(err) - A callback which is called after all the iterator functions + have finished, or an error has occurred. + +__Example__ + +```js +// Assume documents is an array of JSON objects and requestApi is a +// function that interacts with a rate-limited REST api. + +async.eachLimit(documents, 20, requestApi, function(err){ + // if any of the saves produced an error, err would equal that error +}); +``` + +--------------------------------------- + + +### map(arr, iterator, callback) + +Produces a new array of values by mapping each value in the given array through +the iterator function. The iterator is called with an item from the array and a +callback for when it has finished processing. The callback takes 2 arguments, +an error and the transformed item from the array. If the iterator passes an +error to this callback, the main callback for the map function is immediately +called with the error. + +Note, that since this function applies the iterator to each item in parallel +there is no guarantee that the iterator functions will complete in order, however +the results array will be in the same order as the original array. + +__Arguments__ + +* arr - An array to iterate over. +* iterator(item, callback) - A function to apply to each item in the array. + The iterator is passed a callback(err, transformed) which must be called once + it has completed with an error (which can be null) and a transformed item. +* callback(err, results) - A callback which is called after all the iterator + functions have finished, or an error has occurred. Results is an array of the + transformed items from the original array. + +__Example__ + +```js +async.map(['file1','file2','file3'], fs.stat, function(err, results){ + // results is now an array of stats for each file +}); +``` + +--------------------------------------- + + +### mapSeries(arr, iterator, callback) + +The same as map only the iterator is applied to each item in the array in +series. The next iterator is only called once the current one has completed +processing. The results array will be in the same order as the original. + + +--------------------------------------- + + +### mapLimit(arr, limit, iterator, callback) + +The same as map only no more than "limit" iterators will be simultaneously +running at any time. + +Note that the items are not processed in batches, so there is no guarantee that + the first "limit" iterator functions will complete before any others are +started. + +__Arguments__ + +* arr - An array to iterate over. +* limit - The maximum number of iterators to run at any time. +* iterator(item, callback) - A function to apply to each item in the array. + The iterator is passed a callback(err, transformed) which must be called once + it has completed with an error (which can be null) and a transformed item. +* callback(err, results) - A callback which is called after all the iterator + functions have finished, or an error has occurred. Results is an array of the + transformed items from the original array. + +__Example__ + +```js +async.mapLimit(['file1','file2','file3'], 1, fs.stat, function(err, results){ + // results is now an array of stats for each file +}); +``` + +--------------------------------------- + + +### filter(arr, iterator, callback) + +__Alias:__ select + +Returns a new array of all the values which pass an async truth test. +_The callback for each iterator call only accepts a single argument of true or +false, it does not accept an error argument first!_ This is in-line with the +way node libraries work with truth tests like fs.exists. This operation is +performed in parallel, but the results array will be in the same order as the +original. + +__Arguments__ + +* arr - An array to iterate over. +* iterator(item, callback) - A truth test to apply to each item in the array. + The iterator is passed a callback(truthValue) which must be called with a + boolean argument once it has completed. +* callback(results) - A callback which is called after all the iterator + functions have finished. + +__Example__ + +```js +async.filter(['file1','file2','file3'], fs.exists, function(results){ + // results now equals an array of the existing files +}); +``` + +--------------------------------------- + + +### filterSeries(arr, iterator, callback) + +__alias:__ selectSeries + +The same as filter only the iterator is applied to each item in the array in +series. The next iterator is only called once the current one has completed +processing. The results array will be in the same order as the original. + +--------------------------------------- + + +### reject(arr, iterator, callback) + +The opposite of filter. Removes values that pass an async truth test. + +--------------------------------------- + + +### rejectSeries(arr, iterator, callback) + +The same as reject, only the iterator is applied to each item in the array +in series. + + +--------------------------------------- + + +### reduce(arr, memo, iterator, callback) + +__aliases:__ inject, foldl + +Reduces a list of values into a single value using an async iterator to return +each successive step. Memo is the initial state of the reduction. This +function only operates in series. For performance reasons, it may make sense to +split a call to this function into a parallel map, then use the normal +Array.prototype.reduce on the results. This function is for situations where +each step in the reduction needs to be async, if you can get the data before +reducing it then it's probably a good idea to do so. + +__Arguments__ + +* arr - An array to iterate over. +* memo - The initial state of the reduction. +* iterator(memo, item, callback) - A function applied to each item in the + array to produce the next step in the reduction. The iterator is passed a + callback(err, reduction) which accepts an optional error as its first + argument, and the state of the reduction as the second. If an error is + passed to the callback, the reduction is stopped and the main callback is + immediately called with the error. +* callback(err, result) - A callback which is called after all the iterator + functions have finished. Result is the reduced value. + +__Example__ + +```js +async.reduce([1,2,3], 0, function(memo, item, callback){ + // pointless async: + process.nextTick(function(){ + callback(null, memo + item) + }); +}, function(err, result){ + // result is now equal to the last value of memo, which is 6 +}); +``` + +--------------------------------------- + + +### reduceRight(arr, memo, iterator, callback) + +__Alias:__ foldr + +Same as reduce, only operates on the items in the array in reverse order. + + +--------------------------------------- + + +### detect(arr, iterator, callback) + +Returns the first value in a list that passes an async truth test. The +iterator is applied in parallel, meaning the first iterator to return true will +fire the detect callback with that result. That means the result might not be +the first item in the original array (in terms of order) that passes the test. + +If order within the original array is important then look at detectSeries. + +__Arguments__ + +* arr - An array to iterate over. +* iterator(item, callback) - A truth test to apply to each item in the array. + The iterator is passed a callback(truthValue) which must be called with a + boolean argument once it has completed. +* callback(result) - A callback which is called as soon as any iterator returns + true, or after all the iterator functions have finished. Result will be + the first item in the array that passes the truth test (iterator) or the + value undefined if none passed. + +__Example__ + +```js +async.detect(['file1','file2','file3'], fs.exists, function(result){ + // result now equals the first file in the list that exists +}); +``` + +--------------------------------------- + + +### detectSeries(arr, iterator, callback) + +The same as detect, only the iterator is applied to each item in the array +in series. This means the result is always the first in the original array (in +terms of array order) that passes the truth test. + + +--------------------------------------- + + +### sortBy(arr, iterator, callback) + +Sorts a list by the results of running each value through an async iterator. + +__Arguments__ + +* arr - An array to iterate over. +* iterator(item, callback) - A function to apply to each item in the array. + The iterator is passed a callback(err, sortValue) which must be called once it + has completed with an error (which can be null) and a value to use as the sort + criteria. +* callback(err, results) - A callback which is called after all the iterator + functions have finished, or an error has occurred. Results is the items from + the original array sorted by the values returned by the iterator calls. + +__Example__ + +```js +async.sortBy(['file1','file2','file3'], function(file, callback){ + fs.stat(file, function(err, stats){ + callback(err, stats.mtime); + }); +}, function(err, results){ + // results is now the original array of files sorted by + // modified date +}); +``` + +--------------------------------------- + + +### some(arr, iterator, callback) + +__Alias:__ any + +Returns true if at least one element in the array satisfies an async test. +_The callback for each iterator call only accepts a single argument of true or +false, it does not accept an error argument first!_ This is in-line with the +way node libraries work with truth tests like fs.exists. Once any iterator +call returns true, the main callback is immediately called. + +__Arguments__ + +* arr - An array to iterate over. +* iterator(item, callback) - A truth test to apply to each item in the array. + The iterator is passed a callback(truthValue) which must be called with a + boolean argument once it has completed. +* callback(result) - A callback which is called as soon as any iterator returns + true, or after all the iterator functions have finished. Result will be + either true or false depending on the values of the async tests. + +__Example__ + +```js +async.some(['file1','file2','file3'], fs.exists, function(result){ + // if result is true then at least one of the files exists +}); +``` + +--------------------------------------- + + +### every(arr, iterator, callback) + +__Alias:__ all + +Returns true if every element in the array satisfies an async test. +_The callback for each iterator call only accepts a single argument of true or +false, it does not accept an error argument first!_ This is in-line with the +way node libraries work with truth tests like fs.exists. + +__Arguments__ + +* arr - An array to iterate over. +* iterator(item, callback) - A truth test to apply to each item in the array. + The iterator is passed a callback(truthValue) which must be called with a + boolean argument once it has completed. +* callback(result) - A callback which is called after all the iterator + functions have finished. Result will be either true or false depending on + the values of the async tests. + +__Example__ + +```js +async.every(['file1','file2','file3'], fs.exists, function(result){ + // if result is true then every file exists +}); +``` + +--------------------------------------- + + +### concat(arr, iterator, callback) + +Applies an iterator to each item in a list, concatenating the results. Returns the +concatenated list. The iterators are called in parallel, and the results are +concatenated as they return. There is no guarantee that the results array will +be returned in the original order of the arguments passed to the iterator function. + +__Arguments__ + +* arr - An array to iterate over +* iterator(item, callback) - A function to apply to each item in the array. + The iterator is passed a callback(err, results) which must be called once it + has completed with an error (which can be null) and an array of results. +* callback(err, results) - A callback which is called after all the iterator + functions have finished, or an error has occurred. Results is an array containing + the concatenated results of the iterator function. + +__Example__ + +```js +async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){ + // files is now a list of filenames that exist in the 3 directories +}); +``` + +--------------------------------------- + + +### concatSeries(arr, iterator, callback) + +Same as async.concat, but executes in series instead of parallel. + + +## Control Flow + + +### series(tasks, [callback]) + +Run an array of functions in series, each one running once the previous +function has completed. If any functions in the series pass an error to its +callback, no more functions are run and the callback for the series is +immediately called with the value of the error. Once the tasks have completed, +the results are passed to the final callback as an array. + +It is also possible to use an object instead of an array. Each property will be +run as a function and the results will be passed to the final callback as an object +instead of an array. This can be a more readable way of handling results from +async.series. + + +__Arguments__ + +* tasks - An array or object containing functions to run, each function is passed + a callback(err, result) it must call on completion with an error (which can + be null) and an optional result value. +* callback(err, results) - An optional callback to run once all the functions + have completed. This function gets a results array (or object) containing all + the result arguments passed to the task callbacks. + +__Example__ + +```js +async.series([ + function(callback){ + // do some stuff ... + callback(null, 'one'); + }, + function(callback){ + // do some more stuff ... + callback(null, 'two'); + } +], +// optional callback +function(err, results){ + // results is now equal to ['one', 'two'] +}); + + +// an example using an object instead of an array +async.series({ + one: function(callback){ + setTimeout(function(){ + callback(null, 1); + }, 200); + }, + two: function(callback){ + setTimeout(function(){ + callback(null, 2); + }, 100); + } +}, +function(err, results) { + // results is now equal to: {one: 1, two: 2} +}); +``` + +--------------------------------------- + + +### parallel(tasks, [callback]) + +Run an array of functions in parallel, without waiting until the previous +function has completed. If any of the functions pass an error to its +callback, the main callback is immediately called with the value of the error. +Once the tasks have completed, the results are passed to the final callback as an +array. + +It is also possible to use an object instead of an array. Each property will be +run as a function and the results will be passed to the final callback as an object +instead of an array. This can be a more readable way of handling results from +async.parallel. + + +__Arguments__ + +* tasks - An array or object containing functions to run, each function is passed + a callback(err, result) it must call on completion with an error (which can + be null) and an optional result value. +* callback(err, results) - An optional callback to run once all the functions + have completed. This function gets a results array (or object) containing all + the result arguments passed to the task callbacks. + +__Example__ + +```js +async.parallel([ + function(callback){ + setTimeout(function(){ + callback(null, 'one'); + }, 200); + }, + function(callback){ + setTimeout(function(){ + callback(null, 'two'); + }, 100); + } +], +// optional callback +function(err, results){ + // the results array will equal ['one','two'] even though + // the second function had a shorter timeout. +}); + + +// an example using an object instead of an array +async.parallel({ + one: function(callback){ + setTimeout(function(){ + callback(null, 1); + }, 200); + }, + two: function(callback){ + setTimeout(function(){ + callback(null, 2); + }, 100); + } +}, +function(err, results) { + // results is now equals to: {one: 1, two: 2} +}); +``` + +--------------------------------------- + + +### parallelLimit(tasks, limit, [callback]) + +The same as parallel only the tasks are executed in parallel with a maximum of "limit" +tasks executing at any time. + +Note that the tasks are not executed in batches, so there is no guarantee that +the first "limit" tasks will complete before any others are started. + +__Arguments__ + +* tasks - An array or object containing functions to run, each function is passed + a callback(err, result) it must call on completion with an error (which can + be null) and an optional result value. +* limit - The maximum number of tasks to run at any time. +* callback(err, results) - An optional callback to run once all the functions + have completed. This function gets a results array (or object) containing all + the result arguments passed to the task callbacks. + +--------------------------------------- + + +### whilst(test, fn, callback) + +Repeatedly call fn, while test returns true. Calls the callback when stopped, +or an error occurs. + +__Arguments__ + +* test() - synchronous truth test to perform before each execution of fn. +* fn(callback) - A function to call each time the test passes. The function is + passed a callback(err) which must be called once it has completed with an + optional error argument. +* callback(err) - A callback which is called after the test fails and repeated + execution of fn has stopped. + +__Example__ + +```js +var count = 0; + +async.whilst( + function () { return count < 5; }, + function (callback) { + count++; + setTimeout(callback, 1000); + }, + function (err) { + // 5 seconds have passed + } +); +``` + +--------------------------------------- + + +### doWhilst(fn, test, callback) + +The post check version of whilst. To reflect the difference in the order of operations `test` and `fn` arguments are switched. `doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript. + +--------------------------------------- + + +### until(test, fn, callback) + +Repeatedly call fn, until test returns true. Calls the callback when stopped, +or an error occurs. + +The inverse of async.whilst. + +--------------------------------------- + + +### doUntil(fn, test, callback) + +Like doWhilst except the test is inverted. Note the argument ordering differs from `until`. + +--------------------------------------- + + +### forever(fn, callback) + +Calls the asynchronous function 'fn' repeatedly, in series, indefinitely. +If an error is passed to fn's callback then 'callback' is called with the +error, otherwise it will never be called. + +--------------------------------------- + + +### waterfall(tasks, [callback]) + +Runs an array of functions in series, each passing their results to the next in +the array. However, if any of the functions pass an error to the callback, the +next function is not executed and the main callback is immediately called with +the error. + +__Arguments__ + +* tasks - An array of functions to run, each function is passed a + callback(err, result1, result2, ...) it must call on completion. The first + argument is an error (which can be null) and any further arguments will be + passed as arguments in order to the next task. +* callback(err, [results]) - An optional callback to run once all the functions + have completed. This will be passed the results of the last task's callback. + + + +__Example__ + +```js +async.waterfall([ + function(callback){ + callback(null, 'one', 'two'); + }, + function(arg1, arg2, callback){ + callback(null, 'three'); + }, + function(arg1, callback){ + // arg1 now equals 'three' + callback(null, 'done'); + } +], function (err, result) { + // result now equals 'done' +}); +``` + +--------------------------------------- + +### compose(fn1, fn2...) + +Creates a function which is a composition of the passed asynchronous +functions. Each function consumes the return value of the function that +follows. Composing functions f(), g() and h() would produce the result of +f(g(h())), only this version uses callbacks to obtain the return values. + +Each function is executed with the `this` binding of the composed function. + +__Arguments__ + +* functions... - the asynchronous functions to compose + + +__Example__ + +```js +function add1(n, callback) { + setTimeout(function () { + callback(null, n + 1); + }, 10); +} + +function mul3(n, callback) { + setTimeout(function () { + callback(null, n * 3); + }, 10); +} + +var add1mul3 = async.compose(mul3, add1); + +add1mul3(4, function (err, result) { + // result now equals 15 +}); +``` + +--------------------------------------- + +### applyEach(fns, args..., callback) + +Applies the provided arguments to each function in the array, calling the +callback after all functions have completed. If you only provide the first +argument then it will return a function which lets you pass in the +arguments as if it were a single function call. + +__Arguments__ + +* fns - the asynchronous functions to all call with the same arguments +* args... - any number of separate arguments to pass to the function +* callback - the final argument should be the callback, called when all + functions have completed processing + + +__Example__ + +```js +async.applyEach([enableSearch, updateSchema], 'bucket', callback); + +// partial application example: +async.each( + buckets, + async.applyEach([enableSearch, updateSchema]), + callback +); +``` + +--------------------------------------- + + +### applyEachSeries(arr, iterator, callback) + +The same as applyEach only the functions are applied in series. + +--------------------------------------- + + +### queue(worker, concurrency) + +Creates a queue object with the specified concurrency. Tasks added to the +queue will be processed in parallel (up to the concurrency limit). If all +workers are in progress, the task is queued until one is available. Once +a worker has completed a task, the task's callback is called. + +__Arguments__ + +* worker(task, callback) - An asynchronous function for processing a queued + task, which must call its callback(err) argument when finished, with an + optional error as an argument. +* concurrency - An integer for determining how many worker functions should be + run in parallel. + +__Queue objects__ + +The queue object returned by this function has the following properties and +methods: + +* length() - a function returning the number of items waiting to be processed. +* concurrency - an integer for determining how many worker functions should be + run in parallel. This property can be changed after a queue is created to + alter the concurrency on-the-fly. +* push(task, [callback]) - add a new task to the queue, the callback is called + once the worker has finished processing the task. + instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list. +* unshift(task, [callback]) - add a new task to the front of the queue. +* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued +* empty - a callback that is called when the last item from the queue is given to a worker +* drain - a callback that is called when the last item from the queue has returned from the worker + +__Example__ + +```js +// create a queue object with concurrency 2 + +var q = async.queue(function (task, callback) { + console.log('hello ' + task.name); + callback(); +}, 2); + + +// assign a callback +q.drain = function() { + console.log('all items have been processed'); +} + +// add some items to the queue + +q.push({name: 'foo'}, function (err) { + console.log('finished processing foo'); +}); +q.push({name: 'bar'}, function (err) { + console.log('finished processing bar'); +}); + +// add some items to the queue (batch-wise) + +q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) { + console.log('finished processing bar'); +}); + +// add some items to the front of the queue + +q.unshift({name: 'bar'}, function (err) { + console.log('finished processing bar'); +}); +``` + +--------------------------------------- + + +### cargo(worker, [payload]) + +Creates a cargo object with the specified payload. Tasks added to the +cargo will be processed altogether (up to the payload limit). If the +worker is in progress, the task is queued until it is available. Once +the worker has completed some tasks, each callback of those tasks is called. + +__Arguments__ + +* worker(tasks, callback) - An asynchronous function for processing an array of + queued tasks, which must call its callback(err) argument when finished, with + an optional error as an argument. +* payload - An optional integer for determining how many tasks should be + processed per round; if omitted, the default is unlimited. + +__Cargo objects__ + +The cargo object returned by this function has the following properties and +methods: + +* length() - a function returning the number of items waiting to be processed. +* payload - an integer for determining how many tasks should be + process per round. This property can be changed after a cargo is created to + alter the payload on-the-fly. +* push(task, [callback]) - add a new task to the queue, the callback is called + once the worker has finished processing the task. + instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list. +* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued +* empty - a callback that is called when the last item from the queue is given to a worker +* drain - a callback that is called when the last item from the queue has returned from the worker + +__Example__ + +```js +// create a cargo object with payload 2 + +var cargo = async.cargo(function (tasks, callback) { + for(var i=0; i +### auto(tasks, [callback]) + +Determines the best order for running functions based on their requirements. +Each function can optionally depend on other functions being completed first, +and each function is run as soon as its requirements are satisfied. If any of +the functions pass an error to their callback, that function will not complete +(so any other functions depending on it will not run) and the main callback +will be called immediately with the error. Functions also receive an object +containing the results of functions which have completed so far. + +Note, all functions are called with a results object as a second argument, +so it is unsafe to pass functions in the tasks object which cannot handle the +extra argument. For example, this snippet of code: + +```js +async.auto({ + readData: async.apply(fs.readFile, 'data.txt', 'utf-8') +}, callback); +``` + +will have the effect of calling readFile with the results object as the last +argument, which will fail: + +```js +fs.readFile('data.txt', 'utf-8', cb, {}); +``` + +Instead, wrap the call to readFile in a function which does not forward the +results object: + +```js +async.auto({ + readData: function(cb, results){ + fs.readFile('data.txt', 'utf-8', cb); + } +}, callback); +``` + +__Arguments__ + +* tasks - An object literal containing named functions or an array of + requirements, with the function itself the last item in the array. The key + used for each function or array is used when specifying requirements. The + function receives two arguments: (1) a callback(err, result) which must be + called when finished, passing an error (which can be null) and the result of + the function's execution, and (2) a results object, containing the results of + the previously executed functions. +* callback(err, results) - An optional callback which is called when all the + tasks have been completed. The callback will receive an error as an argument + if any tasks pass an error to their callback. Results will always be passed + but if an error occurred, no other tasks will be performed, and the results + object will only contain partial results. + + +__Example__ + +```js +async.auto({ + get_data: function(callback){ + // async code to get some data + }, + make_folder: function(callback){ + // async code to create a directory to store a file in + // this is run at the same time as getting the data + }, + write_file: ['get_data', 'make_folder', function(callback){ + // once there is some data and the directory exists, + // write the data to a file in the directory + callback(null, filename); + }], + email_link: ['write_file', function(callback, results){ + // once the file is written let's email a link to it... + // results.write_file contains the filename returned by write_file. + }] +}); +``` + +This is a fairly trivial example, but to do this using the basic parallel and +series functions would look like this: + +```js +async.parallel([ + function(callback){ + // async code to get some data + }, + function(callback){ + // async code to create a directory to store a file in + // this is run at the same time as getting the data + } +], +function(err, results){ + async.series([ + function(callback){ + // once there is some data and the directory exists, + // write the data to a file in the directory + }, + function(callback){ + // once the file is written let's email a link to it... + } + ]); +}); +``` + +For a complicated series of async tasks using the auto function makes adding +new tasks much easier and makes the code more readable. + + +--------------------------------------- + + +### iterator(tasks) + +Creates an iterator function which calls the next function in the array, +returning a continuation to call the next one after that. It's also possible to +'peek' the next iterator by doing iterator.next(). + +This function is used internally by the async module but can be useful when +you want to manually control the flow of functions in series. + +__Arguments__ + +* tasks - An array of functions to run. + +__Example__ + +```js +var iterator = async.iterator([ + function(){ sys.p('one'); }, + function(){ sys.p('two'); }, + function(){ sys.p('three'); } +]); + +node> var iterator2 = iterator(); +'one' +node> var iterator3 = iterator2(); +'two' +node> iterator3(); +'three' +node> var nextfn = iterator2.next(); +node> nextfn(); +'three' +``` + +--------------------------------------- + + +### apply(function, arguments..) + +Creates a continuation function with some arguments already applied, a useful +shorthand when combined with other control flow functions. Any arguments +passed to the returned function are added to the arguments originally passed +to apply. + +__Arguments__ + +* function - The function you want to eventually apply all arguments to. +* arguments... - Any number of arguments to automatically apply when the + continuation is called. + +__Example__ + +```js +// using apply + +async.parallel([ + async.apply(fs.writeFile, 'testfile1', 'test1'), + async.apply(fs.writeFile, 'testfile2', 'test2'), +]); + + +// the same process without using apply + +async.parallel([ + function(callback){ + fs.writeFile('testfile1', 'test1', callback); + }, + function(callback){ + fs.writeFile('testfile2', 'test2', callback); + } +]); +``` + +It's possible to pass any number of additional arguments when calling the +continuation: + +```js +node> var fn = async.apply(sys.puts, 'one'); +node> fn('two', 'three'); +one +two +three +``` + +--------------------------------------- + + +### nextTick(callback) + +Calls the callback on a later loop around the event loop. In node.js this just +calls process.nextTick, in the browser it falls back to setImmediate(callback) +if available, otherwise setTimeout(callback, 0), which means other higher priority +events may precede the execution of the callback. + +This is used internally for browser-compatibility purposes. + +__Arguments__ + +* callback - The function to call on a later loop around the event loop. + +__Example__ + +```js +var call_order = []; +async.nextTick(function(){ + call_order.push('two'); + // call_order now equals ['one','two'] +}); +call_order.push('one') +``` + + +### times(n, callback) + +Calls the callback n times and accumulates results in the same manner +you would use with async.map. + +__Arguments__ + +* n - The number of times to run the function. +* callback - The function to call n times. + +__Example__ + +```js +// Pretend this is some complicated async factory +var createUser = function(id, callback) { + callback(null, { + id: 'user' + id + }) +} +// generate 5 users +async.times(5, function(n, next){ + createUser(n, function(err, user) { + next(err, user) + }) +}, function(err, users) { + // we should now have 5 users +}); +``` + + +### timesSeries(n, callback) + +The same as times only the iterator is applied to each item in the array in +series. The next iterator is only called once the current one has completed +processing. The results array will be in the same order as the original. + + +## Utils + + +### memoize(fn, [hasher]) + +Caches the results of an async function. When creating a hash to store function +results against, the callback is omitted from the hash and an optional hash +function can be used. + +The cache of results is exposed as the `memo` property of the function returned +by `memoize`. + +__Arguments__ + +* fn - the function you to proxy and cache results from. +* hasher - an optional function for generating a custom hash for storing + results, it has all the arguments applied to it apart from the callback, and + must be synchronous. + +__Example__ + +```js +var slow_fn = function (name, callback) { + // do something + callback(null, result); +}; +var fn = async.memoize(slow_fn); + +// fn can now be used as if it were slow_fn +fn('some name', function () { + // callback +}); +``` + + +### unmemoize(fn) + +Undoes a memoized function, reverting it to the original, unmemoized +form. Comes handy in tests. + +__Arguments__ + +* fn - the memoized function + + +### log(function, arguments) + +Logs the result of an async function to the console. Only works in node.js or +in browsers that support console.log and console.error (such as FF and Chrome). +If multiple arguments are returned from the async function, console.log is +called on each argument in order. + +__Arguments__ + +* function - The function you want to eventually apply all arguments to. +* arguments... - Any number of arguments to apply to the function. + +__Example__ + +```js +var hello = function(name, callback){ + setTimeout(function(){ + callback(null, 'hello ' + name); + }, 1000); +}; +``` +```js +node> async.log(hello, 'world'); +'hello world' +``` + +--------------------------------------- + + +### dir(function, arguments) + +Logs the result of an async function to the console using console.dir to +display the properties of the resulting object. Only works in node.js or +in browsers that support console.dir and console.error (such as FF and Chrome). +If multiple arguments are returned from the async function, console.dir is +called on each argument in order. + +__Arguments__ + +* function - The function you want to eventually apply all arguments to. +* arguments... - Any number of arguments to apply to the function. + +__Example__ + +```js +var hello = function(name, callback){ + setTimeout(function(){ + callback(null, {hello: name}); + }, 1000); +}; +``` +```js +node> async.dir(hello, 'world'); +{hello: 'world'} +``` + +--------------------------------------- + + +### noConflict() + +Changes the value of async back to its original value, returning a reference to the +async object. diff --git a/bin/node_modules/uglify-js/node_modules/async/component.json b/bin/node_modules/uglify-js/node_modules/async/component.json new file mode 100644 index 00000000..bbb01154 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/async/component.json @@ -0,0 +1,11 @@ +{ + "name": "async", + "repo": "caolan/async", + "description": "Higher-order functions and common patterns for asynchronous code", + "version": "0.1.23", + "keywords": [], + "dependencies": {}, + "development": {}, + "main": "lib/async.js", + "scripts": [ "lib/async.js" ] +} diff --git a/bin/node_modules/uglify-js/node_modules/async/lib/async.js b/bin/node_modules/uglify-js/node_modules/async/lib/async.js new file mode 100755 index 00000000..1eebb153 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/async/lib/async.js @@ -0,0 +1,958 @@ +/*global setImmediate: false, setTimeout: false, console: false */ +(function () { + + var async = {}; + + // global on the server, window in the browser + var root, previous_async; + + root = this; + if (root != null) { + previous_async = root.async; + } + + async.noConflict = function () { + root.async = previous_async; + return async; + }; + + function only_once(fn) { + var called = false; + return function() { + if (called) throw new Error("Callback was already called."); + called = true; + fn.apply(root, arguments); + } + } + + //// cross-browser compatiblity functions //// + + var _each = function (arr, iterator) { + if (arr.forEach) { + return arr.forEach(iterator); + } + for (var i = 0; i < arr.length; i += 1) { + iterator(arr[i], i, arr); + } + }; + + var _map = function (arr, iterator) { + if (arr.map) { + return arr.map(iterator); + } + var results = []; + _each(arr, function (x, i, a) { + results.push(iterator(x, i, a)); + }); + return results; + }; + + var _reduce = function (arr, iterator, memo) { + if (arr.reduce) { + return arr.reduce(iterator, memo); + } + _each(arr, function (x, i, a) { + memo = iterator(memo, x, i, a); + }); + return memo; + }; + + var _keys = function (obj) { + if (Object.keys) { + return Object.keys(obj); + } + var keys = []; + for (var k in obj) { + if (obj.hasOwnProperty(k)) { + keys.push(k); + } + } + return keys; + }; + + //// exported async module functions //// + + //// nextTick implementation with browser-compatible fallback //// + if (typeof process === 'undefined' || !(process.nextTick)) { + if (typeof setImmediate === 'function') { + async.nextTick = function (fn) { + // not a direct alias for IE10 compatibility + setImmediate(fn); + }; + async.setImmediate = async.nextTick; + } + else { + async.nextTick = function (fn) { + setTimeout(fn, 0); + }; + async.setImmediate = async.nextTick; + } + } + else { + async.nextTick = process.nextTick; + if (typeof setImmediate !== 'undefined') { + async.setImmediate = function (fn) { + // not a direct alias for IE10 compatibility + setImmediate(fn); + }; + } + else { + async.setImmediate = async.nextTick; + } + } + + async.each = function (arr, iterator, callback) { + callback = callback || function () {}; + if (!arr.length) { + return callback(); + } + var completed = 0; + _each(arr, function (x) { + iterator(x, only_once(function (err) { + if (err) { + callback(err); + callback = function () {}; + } + else { + completed += 1; + if (completed >= arr.length) { + callback(null); + } + } + })); + }); + }; + async.forEach = async.each; + + async.eachSeries = function (arr, iterator, callback) { + callback = callback || function () {}; + if (!arr.length) { + return callback(); + } + var completed = 0; + var iterate = function () { + iterator(arr[completed], function (err) { + if (err) { + callback(err); + callback = function () {}; + } + else { + completed += 1; + if (completed >= arr.length) { + callback(null); + } + else { + iterate(); + } + } + }); + }; + iterate(); + }; + async.forEachSeries = async.eachSeries; + + async.eachLimit = function (arr, limit, iterator, callback) { + var fn = _eachLimit(limit); + fn.apply(null, [arr, iterator, callback]); + }; + async.forEachLimit = async.eachLimit; + + var _eachLimit = function (limit) { + + return function (arr, iterator, callback) { + callback = callback || function () {}; + if (!arr.length || limit <= 0) { + return callback(); + } + var completed = 0; + var started = 0; + var running = 0; + + (function replenish () { + if (completed >= arr.length) { + return callback(); + } + + while (running < limit && started < arr.length) { + started += 1; + running += 1; + iterator(arr[started - 1], function (err) { + if (err) { + callback(err); + callback = function () {}; + } + else { + completed += 1; + running -= 1; + if (completed >= arr.length) { + callback(); + } + else { + replenish(); + } + } + }); + } + })(); + }; + }; + + + var doParallel = function (fn) { + return function () { + var args = Array.prototype.slice.call(arguments); + return fn.apply(null, [async.each].concat(args)); + }; + }; + var doParallelLimit = function(limit, fn) { + return function () { + var args = Array.prototype.slice.call(arguments); + return fn.apply(null, [_eachLimit(limit)].concat(args)); + }; + }; + var doSeries = function (fn) { + return function () { + var args = Array.prototype.slice.call(arguments); + return fn.apply(null, [async.eachSeries].concat(args)); + }; + }; + + + var _asyncMap = function (eachfn, arr, iterator, callback) { + var results = []; + arr = _map(arr, function (x, i) { + return {index: i, value: x}; + }); + eachfn(arr, function (x, callback) { + iterator(x.value, function (err, v) { + results[x.index] = v; + callback(err); + }); + }, function (err) { + callback(err, results); + }); + }; + async.map = doParallel(_asyncMap); + async.mapSeries = doSeries(_asyncMap); + async.mapLimit = function (arr, limit, iterator, callback) { + return _mapLimit(limit)(arr, iterator, callback); + }; + + var _mapLimit = function(limit) { + return doParallelLimit(limit, _asyncMap); + }; + + // reduce only has a series version, as doing reduce in parallel won't + // work in many situations. + async.reduce = function (arr, memo, iterator, callback) { + async.eachSeries(arr, function (x, callback) { + iterator(memo, x, function (err, v) { + memo = v; + callback(err); + }); + }, function (err) { + callback(err, memo); + }); + }; + // inject alias + async.inject = async.reduce; + // foldl alias + async.foldl = async.reduce; + + async.reduceRight = function (arr, memo, iterator, callback) { + var reversed = _map(arr, function (x) { + return x; + }).reverse(); + async.reduce(reversed, memo, iterator, callback); + }; + // foldr alias + async.foldr = async.reduceRight; + + var _filter = function (eachfn, arr, iterator, callback) { + var results = []; + arr = _map(arr, function (x, i) { + return {index: i, value: x}; + }); + eachfn(arr, function (x, callback) { + iterator(x.value, function (v) { + if (v) { + results.push(x); + } + callback(); + }); + }, function (err) { + callback(_map(results.sort(function (a, b) { + return a.index - b.index; + }), function (x) { + return x.value; + })); + }); + }; + async.filter = doParallel(_filter); + async.filterSeries = doSeries(_filter); + // select alias + async.select = async.filter; + async.selectSeries = async.filterSeries; + + var _reject = function (eachfn, arr, iterator, callback) { + var results = []; + arr = _map(arr, function (x, i) { + return {index: i, value: x}; + }); + eachfn(arr, function (x, callback) { + iterator(x.value, function (v) { + if (!v) { + results.push(x); + } + callback(); + }); + }, function (err) { + callback(_map(results.sort(function (a, b) { + return a.index - b.index; + }), function (x) { + return x.value; + })); + }); + }; + async.reject = doParallel(_reject); + async.rejectSeries = doSeries(_reject); + + var _detect = function (eachfn, arr, iterator, main_callback) { + eachfn(arr, function (x, callback) { + iterator(x, function (result) { + if (result) { + main_callback(x); + main_callback = function () {}; + } + else { + callback(); + } + }); + }, function (err) { + main_callback(); + }); + }; + async.detect = doParallel(_detect); + async.detectSeries = doSeries(_detect); + + async.some = function (arr, iterator, main_callback) { + async.each(arr, function (x, callback) { + iterator(x, function (v) { + if (v) { + main_callback(true); + main_callback = function () {}; + } + callback(); + }); + }, function (err) { + main_callback(false); + }); + }; + // any alias + async.any = async.some; + + async.every = function (arr, iterator, main_callback) { + async.each(arr, function (x, callback) { + iterator(x, function (v) { + if (!v) { + main_callback(false); + main_callback = function () {}; + } + callback(); + }); + }, function (err) { + main_callback(true); + }); + }; + // all alias + async.all = async.every; + + async.sortBy = function (arr, iterator, callback) { + async.map(arr, function (x, callback) { + iterator(x, function (err, criteria) { + if (err) { + callback(err); + } + else { + callback(null, {value: x, criteria: criteria}); + } + }); + }, function (err, results) { + if (err) { + return callback(err); + } + else { + var fn = function (left, right) { + var a = left.criteria, b = right.criteria; + return a < b ? -1 : a > b ? 1 : 0; + }; + callback(null, _map(results.sort(fn), function (x) { + return x.value; + })); + } + }); + }; + + async.auto = function (tasks, callback) { + callback = callback || function () {}; + var keys = _keys(tasks); + if (!keys.length) { + return callback(null); + } + + var results = {}; + + var listeners = []; + var addListener = function (fn) { + listeners.unshift(fn); + }; + var removeListener = function (fn) { + for (var i = 0; i < listeners.length; i += 1) { + if (listeners[i] === fn) { + listeners.splice(i, 1); + return; + } + } + }; + var taskComplete = function () { + _each(listeners.slice(0), function (fn) { + fn(); + }); + }; + + addListener(function () { + if (_keys(results).length === keys.length) { + callback(null, results); + callback = function () {}; + } + }); + + _each(keys, function (k) { + var task = (tasks[k] instanceof Function) ? [tasks[k]]: tasks[k]; + var taskCallback = function (err) { + var args = Array.prototype.slice.call(arguments, 1); + if (args.length <= 1) { + args = args[0]; + } + if (err) { + var safeResults = {}; + _each(_keys(results), function(rkey) { + safeResults[rkey] = results[rkey]; + }); + safeResults[k] = args; + callback(err, safeResults); + // stop subsequent errors hitting callback multiple times + callback = function () {}; + } + else { + results[k] = args; + async.setImmediate(taskComplete); + } + }; + var requires = task.slice(0, Math.abs(task.length - 1)) || []; + var ready = function () { + return _reduce(requires, function (a, x) { + return (a && results.hasOwnProperty(x)); + }, true) && !results.hasOwnProperty(k); + }; + if (ready()) { + task[task.length - 1](taskCallback, results); + } + else { + var listener = function () { + if (ready()) { + removeListener(listener); + task[task.length - 1](taskCallback, results); + } + }; + addListener(listener); + } + }); + }; + + async.waterfall = function (tasks, callback) { + callback = callback || function () {}; + if (tasks.constructor !== Array) { + var err = new Error('First argument to waterfall must be an array of functions'); + return callback(err); + } + if (!tasks.length) { + return callback(); + } + var wrapIterator = function (iterator) { + return function (err) { + if (err) { + callback.apply(null, arguments); + callback = function () {}; + } + else { + var args = Array.prototype.slice.call(arguments, 1); + var next = iterator.next(); + if (next) { + args.push(wrapIterator(next)); + } + else { + args.push(callback); + } + async.setImmediate(function () { + iterator.apply(null, args); + }); + } + }; + }; + wrapIterator(async.iterator(tasks))(); + }; + + var _parallel = function(eachfn, tasks, callback) { + callback = callback || function () {}; + if (tasks.constructor === Array) { + eachfn.map(tasks, function (fn, callback) { + if (fn) { + fn(function (err) { + var args = Array.prototype.slice.call(arguments, 1); + if (args.length <= 1) { + args = args[0]; + } + callback.call(null, err, args); + }); + } + }, callback); + } + else { + var results = {}; + eachfn.each(_keys(tasks), function (k, callback) { + tasks[k](function (err) { + var args = Array.prototype.slice.call(arguments, 1); + if (args.length <= 1) { + args = args[0]; + } + results[k] = args; + callback(err); + }); + }, function (err) { + callback(err, results); + }); + } + }; + + async.parallel = function (tasks, callback) { + _parallel({ map: async.map, each: async.each }, tasks, callback); + }; + + async.parallelLimit = function(tasks, limit, callback) { + _parallel({ map: _mapLimit(limit), each: _eachLimit(limit) }, tasks, callback); + }; + + async.series = function (tasks, callback) { + callback = callback || function () {}; + if (tasks.constructor === Array) { + async.mapSeries(tasks, function (fn, callback) { + if (fn) { + fn(function (err) { + var args = Array.prototype.slice.call(arguments, 1); + if (args.length <= 1) { + args = args[0]; + } + callback.call(null, err, args); + }); + } + }, callback); + } + else { + var results = {}; + async.eachSeries(_keys(tasks), function (k, callback) { + tasks[k](function (err) { + var args = Array.prototype.slice.call(arguments, 1); + if (args.length <= 1) { + args = args[0]; + } + results[k] = args; + callback(err); + }); + }, function (err) { + callback(err, results); + }); + } + }; + + async.iterator = function (tasks) { + var makeCallback = function (index) { + var fn = function () { + if (tasks.length) { + tasks[index].apply(null, arguments); + } + return fn.next(); + }; + fn.next = function () { + return (index < tasks.length - 1) ? makeCallback(index + 1): null; + }; + return fn; + }; + return makeCallback(0); + }; + + async.apply = function (fn) { + var args = Array.prototype.slice.call(arguments, 1); + return function () { + return fn.apply( + null, args.concat(Array.prototype.slice.call(arguments)) + ); + }; + }; + + var _concat = function (eachfn, arr, fn, callback) { + var r = []; + eachfn(arr, function (x, cb) { + fn(x, function (err, y) { + r = r.concat(y || []); + cb(err); + }); + }, function (err) { + callback(err, r); + }); + }; + async.concat = doParallel(_concat); + async.concatSeries = doSeries(_concat); + + async.whilst = function (test, iterator, callback) { + if (test()) { + iterator(function (err) { + if (err) { + return callback(err); + } + async.whilst(test, iterator, callback); + }); + } + else { + callback(); + } + }; + + async.doWhilst = function (iterator, test, callback) { + iterator(function (err) { + if (err) { + return callback(err); + } + if (test()) { + async.doWhilst(iterator, test, callback); + } + else { + callback(); + } + }); + }; + + async.until = function (test, iterator, callback) { + if (!test()) { + iterator(function (err) { + if (err) { + return callback(err); + } + async.until(test, iterator, callback); + }); + } + else { + callback(); + } + }; + + async.doUntil = function (iterator, test, callback) { + iterator(function (err) { + if (err) { + return callback(err); + } + if (!test()) { + async.doUntil(iterator, test, callback); + } + else { + callback(); + } + }); + }; + + async.queue = function (worker, concurrency) { + if (concurrency === undefined) { + concurrency = 1; + } + function _insert(q, data, pos, callback) { + if(data.constructor !== Array) { + data = [data]; + } + _each(data, function(task) { + var item = { + data: task, + callback: typeof callback === 'function' ? callback : null + }; + + if (pos) { + q.tasks.unshift(item); + } else { + q.tasks.push(item); + } + + if (q.saturated && q.tasks.length === concurrency) { + q.saturated(); + } + async.setImmediate(q.process); + }); + } + + var workers = 0; + var q = { + tasks: [], + concurrency: concurrency, + saturated: null, + empty: null, + drain: null, + push: function (data, callback) { + _insert(q, data, false, callback); + }, + unshift: function (data, callback) { + _insert(q, data, true, callback); + }, + process: function () { + if (workers < q.concurrency && q.tasks.length) { + var task = q.tasks.shift(); + if (q.empty && q.tasks.length === 0) { + q.empty(); + } + workers += 1; + var next = function () { + workers -= 1; + if (task.callback) { + task.callback.apply(task, arguments); + } + if (q.drain && q.tasks.length + workers === 0) { + q.drain(); + } + q.process(); + }; + var cb = only_once(next); + worker(task.data, cb); + } + }, + length: function () { + return q.tasks.length; + }, + running: function () { + return workers; + } + }; + return q; + }; + + async.cargo = function (worker, payload) { + var working = false, + tasks = []; + + var cargo = { + tasks: tasks, + payload: payload, + saturated: null, + empty: null, + drain: null, + push: function (data, callback) { + if(data.constructor !== Array) { + data = [data]; + } + _each(data, function(task) { + tasks.push({ + data: task, + callback: typeof callback === 'function' ? callback : null + }); + if (cargo.saturated && tasks.length === payload) { + cargo.saturated(); + } + }); + async.setImmediate(cargo.process); + }, + process: function process() { + if (working) return; + if (tasks.length === 0) { + if(cargo.drain) cargo.drain(); + return; + } + + var ts = typeof payload === 'number' + ? tasks.splice(0, payload) + : tasks.splice(0); + + var ds = _map(ts, function (task) { + return task.data; + }); + + if(cargo.empty) cargo.empty(); + working = true; + worker(ds, function () { + working = false; + + var args = arguments; + _each(ts, function (data) { + if (data.callback) { + data.callback.apply(null, args); + } + }); + + process(); + }); + }, + length: function () { + return tasks.length; + }, + running: function () { + return working; + } + }; + return cargo; + }; + + var _console_fn = function (name) { + return function (fn) { + var args = Array.prototype.slice.call(arguments, 1); + fn.apply(null, args.concat([function (err) { + var args = Array.prototype.slice.call(arguments, 1); + if (typeof console !== 'undefined') { + if (err) { + if (console.error) { + console.error(err); + } + } + else if (console[name]) { + _each(args, function (x) { + console[name](x); + }); + } + } + }])); + }; + }; + async.log = _console_fn('log'); + async.dir = _console_fn('dir'); + /*async.info = _console_fn('info'); + async.warn = _console_fn('warn'); + async.error = _console_fn('error');*/ + + async.memoize = function (fn, hasher) { + var memo = {}; + var queues = {}; + hasher = hasher || function (x) { + return x; + }; + var memoized = function () { + var args = Array.prototype.slice.call(arguments); + var callback = args.pop(); + var key = hasher.apply(null, args); + if (key in memo) { + callback.apply(null, memo[key]); + } + else if (key in queues) { + queues[key].push(callback); + } + else { + queues[key] = [callback]; + fn.apply(null, args.concat([function () { + memo[key] = arguments; + var q = queues[key]; + delete queues[key]; + for (var i = 0, l = q.length; i < l; i++) { + q[i].apply(null, arguments); + } + }])); + } + }; + memoized.memo = memo; + memoized.unmemoized = fn; + return memoized; + }; + + async.unmemoize = function (fn) { + return function () { + return (fn.unmemoized || fn).apply(null, arguments); + }; + }; + + async.times = function (count, iterator, callback) { + var counter = []; + for (var i = 0; i < count; i++) { + counter.push(i); + } + return async.map(counter, iterator, callback); + }; + + async.timesSeries = function (count, iterator, callback) { + var counter = []; + for (var i = 0; i < count; i++) { + counter.push(i); + } + return async.mapSeries(counter, iterator, callback); + }; + + async.compose = function (/* functions... */) { + var fns = Array.prototype.reverse.call(arguments); + return function () { + var that = this; + var args = Array.prototype.slice.call(arguments); + var callback = args.pop(); + async.reduce(fns, args, function (newargs, fn, cb) { + fn.apply(that, newargs.concat([function () { + var err = arguments[0]; + var nextargs = Array.prototype.slice.call(arguments, 1); + cb(err, nextargs); + }])) + }, + function (err, results) { + callback.apply(that, [err].concat(results)); + }); + }; + }; + + var _applyEach = function (eachfn, fns /*args...*/) { + var go = function () { + var that = this; + var args = Array.prototype.slice.call(arguments); + var callback = args.pop(); + return eachfn(fns, function (fn, cb) { + fn.apply(that, args.concat([cb])); + }, + callback); + }; + if (arguments.length > 2) { + var args = Array.prototype.slice.call(arguments, 2); + return go.apply(this, args); + } + else { + return go; + } + }; + async.applyEach = doParallel(_applyEach); + async.applyEachSeries = doSeries(_applyEach); + + async.forever = function (fn, callback) { + function next(err) { + if (err) { + if (callback) { + return callback(err); + } + throw err; + } + fn(next); + } + next(); + }; + + // AMD / RequireJS + if (typeof define !== 'undefined' && define.amd) { + define([], function () { + return async; + }); + } + // Node.js + else if (typeof module !== 'undefined' && module.exports) { + module.exports = async; + } + // included directly via \n\n```\n\n## Documentation\n\n### Collections\n\n* [each](#each)\n* [eachSeries](#eachSeries)\n* [eachLimit](#eachLimit)\n* [map](#map)\n* [mapSeries](#mapSeries)\n* [mapLimit](#mapLimit)\n* [filter](#filter)\n* [filterSeries](#filterSeries)\n* [reject](#reject)\n* [rejectSeries](#rejectSeries)\n* [reduce](#reduce)\n* [reduceRight](#reduceRight)\n* [detect](#detect)\n* [detectSeries](#detectSeries)\n* [sortBy](#sortBy)\n* [some](#some)\n* [every](#every)\n* [concat](#concat)\n* [concatSeries](#concatSeries)\n\n### Control Flow\n\n* [series](#series)\n* [parallel](#parallel)\n* [parallelLimit](#parallellimittasks-limit-callback)\n* [whilst](#whilst)\n* [doWhilst](#doWhilst)\n* [until](#until)\n* [doUntil](#doUntil)\n* [forever](#forever)\n* [waterfall](#waterfall)\n* [compose](#compose)\n* [applyEach](#applyEach)\n* [applyEachSeries](#applyEachSeries)\n* [queue](#queue)\n* [cargo](#cargo)\n* [auto](#auto)\n* [iterator](#iterator)\n* [apply](#apply)\n* [nextTick](#nextTick)\n* [times](#times)\n* [timesSeries](#timesSeries)\n\n### Utils\n\n* [memoize](#memoize)\n* [unmemoize](#unmemoize)\n* [log](#log)\n* [dir](#dir)\n* [noConflict](#noConflict)\n\n\n## Collections\n\n\n\n### each(arr, iterator, callback)\n\nApplies an iterator function to each item in an array, in parallel.\nThe iterator is called with an item from the list and a callback for when it\nhas finished. If the iterator passes an error to this callback, the main\ncallback for the each function is immediately called with the error.\n\nNote, that since this function applies the iterator to each item in parallel\nthere is no guarantee that the iterator functions will complete in order.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err) which must be called once it has \n completed. If no error has occured, the callback should be run without \n arguments or with an explicit null argument.\n* callback(err) - A callback which is called after all the iterator functions\n have finished, or an error has occurred.\n\n__Example__\n\n```js\n// assuming openFiles is an array of file names and saveFile is a function\n// to save the modified contents of that file:\n\nasync.each(openFiles, saveFile, function(err){\n // if any of the saves produced an error, err would equal that error\n});\n```\n\n---------------------------------------\n\n\n\n### eachSeries(arr, iterator, callback)\n\nThe same as each only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. This means the iterator functions will complete in order.\n\n\n---------------------------------------\n\n\n\n### eachLimit(arr, limit, iterator, callback)\n\nThe same as each only no more than \"limit\" iterators will be simultaneously \nrunning at any time.\n\nNote that the items are not processed in batches, so there is no guarantee that\n the first \"limit\" iterator functions will complete before any others are \nstarted.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* limit - The maximum number of iterators to run at any time.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err) which must be called once it has \n completed. If no error has occured, the callback should be run without \n arguments or with an explicit null argument.\n* callback(err) - A callback which is called after all the iterator functions\n have finished, or an error has occurred.\n\n__Example__\n\n```js\n// Assume documents is an array of JSON objects and requestApi is a\n// function that interacts with a rate-limited REST api.\n\nasync.eachLimit(documents, 20, requestApi, function(err){\n // if any of the saves produced an error, err would equal that error\n});\n```\n\n---------------------------------------\n\n\n### map(arr, iterator, callback)\n\nProduces a new array of values by mapping each value in the given array through\nthe iterator function. The iterator is called with an item from the array and a\ncallback for when it has finished processing. The callback takes 2 arguments, \nan error and the transformed item from the array. If the iterator passes an\nerror to this callback, the main callback for the map function is immediately\ncalled with the error.\n\nNote, that since this function applies the iterator to each item in parallel\nthere is no guarantee that the iterator functions will complete in order, however\nthe results array will be in the same order as the original array.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err, transformed) which must be called once \n it has completed with an error (which can be null) and a transformed item.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is an array of the\n transformed items from the original array.\n\n__Example__\n\n```js\nasync.map(['file1','file2','file3'], fs.stat, function(err, results){\n // results is now an array of stats for each file\n});\n```\n\n---------------------------------------\n\n\n### mapSeries(arr, iterator, callback)\n\nThe same as map only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. The results array will be in the same order as the original.\n\n\n---------------------------------------\n\n\n### mapLimit(arr, limit, iterator, callback)\n\nThe same as map only no more than \"limit\" iterators will be simultaneously \nrunning at any time.\n\nNote that the items are not processed in batches, so there is no guarantee that\n the first \"limit\" iterator functions will complete before any others are \nstarted.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* limit - The maximum number of iterators to run at any time.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err, transformed) which must be called once \n it has completed with an error (which can be null) and a transformed item.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is an array of the\n transformed items from the original array.\n\n__Example__\n\n```js\nasync.mapLimit(['file1','file2','file3'], 1, fs.stat, function(err, results){\n // results is now an array of stats for each file\n});\n```\n\n---------------------------------------\n\n\n### filter(arr, iterator, callback)\n\n__Alias:__ select\n\nReturns a new array of all the values which pass an async truth test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like fs.exists. This operation is\nperformed in parallel, but the results array will be in the same order as the\noriginal.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback(truthValue) which must be called with a \n boolean argument once it has completed.\n* callback(results) - A callback which is called after all the iterator\n functions have finished.\n\n__Example__\n\n```js\nasync.filter(['file1','file2','file3'], fs.exists, function(results){\n // results now equals an array of the existing files\n});\n```\n\n---------------------------------------\n\n\n### filterSeries(arr, iterator, callback)\n\n__alias:__ selectSeries\n\nThe same as filter only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. The results array will be in the same order as the original.\n\n---------------------------------------\n\n\n### reject(arr, iterator, callback)\n\nThe opposite of filter. Removes values that pass an async truth test.\n\n---------------------------------------\n\n\n### rejectSeries(arr, iterator, callback)\n\nThe same as reject, only the iterator is applied to each item in the array\nin series.\n\n\n---------------------------------------\n\n\n### reduce(arr, memo, iterator, callback)\n\n__aliases:__ inject, foldl\n\nReduces a list of values into a single value using an async iterator to return\neach successive step. Memo is the initial state of the reduction. This\nfunction only operates in series. For performance reasons, it may make sense to\nsplit a call to this function into a parallel map, then use the normal\nArray.prototype.reduce on the results. This function is for situations where\neach step in the reduction needs to be async, if you can get the data before\nreducing it then it's probably a good idea to do so.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* memo - The initial state of the reduction.\n* iterator(memo, item, callback) - A function applied to each item in the\n array to produce the next step in the reduction. The iterator is passed a\n callback(err, reduction) which accepts an optional error as its first \n argument, and the state of the reduction as the second. If an error is \n passed to the callback, the reduction is stopped and the main callback is \n immediately called with the error.\n* callback(err, result) - A callback which is called after all the iterator\n functions have finished. Result is the reduced value.\n\n__Example__\n\n```js\nasync.reduce([1,2,3], 0, function(memo, item, callback){\n // pointless async:\n process.nextTick(function(){\n callback(null, memo + item)\n });\n}, function(err, result){\n // result is now equal to the last value of memo, which is 6\n});\n```\n\n---------------------------------------\n\n\n### reduceRight(arr, memo, iterator, callback)\n\n__Alias:__ foldr\n\nSame as reduce, only operates on the items in the array in reverse order.\n\n\n---------------------------------------\n\n\n### detect(arr, iterator, callback)\n\nReturns the first value in a list that passes an async truth test. The\niterator is applied in parallel, meaning the first iterator to return true will\nfire the detect callback with that result. That means the result might not be\nthe first item in the original array (in terms of order) that passes the test.\n\nIf order within the original array is important then look at detectSeries.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback(truthValue) which must be called with a \n boolean argument once it has completed.\n* callback(result) - A callback which is called as soon as any iterator returns\n true, or after all the iterator functions have finished. Result will be\n the first item in the array that passes the truth test (iterator) or the\n value undefined if none passed.\n\n__Example__\n\n```js\nasync.detect(['file1','file2','file3'], fs.exists, function(result){\n // result now equals the first file in the list that exists\n});\n```\n\n---------------------------------------\n\n\n### detectSeries(arr, iterator, callback)\n\nThe same as detect, only the iterator is applied to each item in the array\nin series. This means the result is always the first in the original array (in\nterms of array order) that passes the truth test.\n\n\n---------------------------------------\n\n\n### sortBy(arr, iterator, callback)\n\nSorts a list by the results of running each value through an async iterator.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err, sortValue) which must be called once it\n has completed with an error (which can be null) and a value to use as the sort\n criteria.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is the items from\n the original array sorted by the values returned by the iterator calls.\n\n__Example__\n\n```js\nasync.sortBy(['file1','file2','file3'], function(file, callback){\n fs.stat(file, function(err, stats){\n callback(err, stats.mtime);\n });\n}, function(err, results){\n // results is now the original array of files sorted by\n // modified date\n});\n```\n\n---------------------------------------\n\n\n### some(arr, iterator, callback)\n\n__Alias:__ any\n\nReturns true if at least one element in the array satisfies an async test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like fs.exists. Once any iterator\ncall returns true, the main callback is immediately called.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback(truthValue) which must be called with a \n boolean argument once it has completed.\n* callback(result) - A callback which is called as soon as any iterator returns\n true, or after all the iterator functions have finished. Result will be\n either true or false depending on the values of the async tests.\n\n__Example__\n\n```js\nasync.some(['file1','file2','file3'], fs.exists, function(result){\n // if result is true then at least one of the files exists\n});\n```\n\n---------------------------------------\n\n\n### every(arr, iterator, callback)\n\n__Alias:__ all\n\nReturns true if every element in the array satisfies an async test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like fs.exists.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback(truthValue) which must be called with a \n boolean argument once it has completed.\n* callback(result) - A callback which is called after all the iterator\n functions have finished. Result will be either true or false depending on\n the values of the async tests.\n\n__Example__\n\n```js\nasync.every(['file1','file2','file3'], fs.exists, function(result){\n // if result is true then every file exists\n});\n```\n\n---------------------------------------\n\n\n### concat(arr, iterator, callback)\n\nApplies an iterator to each item in a list, concatenating the results. Returns the\nconcatenated list. The iterators are called in parallel, and the results are\nconcatenated as they return. There is no guarantee that the results array will\nbe returned in the original order of the arguments passed to the iterator function.\n\n__Arguments__\n\n* arr - An array to iterate over\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err, results) which must be called once it \n has completed with an error (which can be null) and an array of results.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is an array containing\n the concatenated results of the iterator function.\n\n__Example__\n\n```js\nasync.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){\n // files is now a list of filenames that exist in the 3 directories\n});\n```\n\n---------------------------------------\n\n\n### concatSeries(arr, iterator, callback)\n\nSame as async.concat, but executes in series instead of parallel.\n\n\n## Control Flow\n\n\n### series(tasks, [callback])\n\nRun an array of functions in series, each one running once the previous\nfunction has completed. If any functions in the series pass an error to its\ncallback, no more functions are run and the callback for the series is\nimmediately called with the value of the error. Once the tasks have completed,\nthe results are passed to the final callback as an array.\n\nIt is also possible to use an object instead of an array. Each property will be\nrun as a function and the results will be passed to the final callback as an object\ninstead of an array. This can be a more readable way of handling results from\nasync.series.\n\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed\n a callback(err, result) it must call on completion with an error (which can\n be null) and an optional result value.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets a results array (or object) containing all \n the result arguments passed to the task callbacks.\n\n__Example__\n\n```js\nasync.series([\n function(callback){\n // do some stuff ...\n callback(null, 'one');\n },\n function(callback){\n // do some more stuff ...\n callback(null, 'two');\n }\n],\n// optional callback\nfunction(err, results){\n // results is now equal to ['one', 'two']\n});\n\n\n// an example using an object instead of an array\nasync.series({\n one: function(callback){\n setTimeout(function(){\n callback(null, 1);\n }, 200);\n },\n two: function(callback){\n setTimeout(function(){\n callback(null, 2);\n }, 100);\n }\n},\nfunction(err, results) {\n // results is now equal to: {one: 1, two: 2}\n});\n```\n\n---------------------------------------\n\n\n### parallel(tasks, [callback])\n\nRun an array of functions in parallel, without waiting until the previous\nfunction has completed. If any of the functions pass an error to its\ncallback, the main callback is immediately called with the value of the error.\nOnce the tasks have completed, the results are passed to the final callback as an\narray.\n\nIt is also possible to use an object instead of an array. Each property will be\nrun as a function and the results will be passed to the final callback as an object\ninstead of an array. This can be a more readable way of handling results from\nasync.parallel.\n\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed \n a callback(err, result) it must call on completion with an error (which can\n be null) and an optional result value.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets a results array (or object) containing all \n the result arguments passed to the task callbacks.\n\n__Example__\n\n```js\nasync.parallel([\n function(callback){\n setTimeout(function(){\n callback(null, 'one');\n }, 200);\n },\n function(callback){\n setTimeout(function(){\n callback(null, 'two');\n }, 100);\n }\n],\n// optional callback\nfunction(err, results){\n // the results array will equal ['one','two'] even though\n // the second function had a shorter timeout.\n});\n\n\n// an example using an object instead of an array\nasync.parallel({\n one: function(callback){\n setTimeout(function(){\n callback(null, 1);\n }, 200);\n },\n two: function(callback){\n setTimeout(function(){\n callback(null, 2);\n }, 100);\n }\n},\nfunction(err, results) {\n // results is now equals to: {one: 1, two: 2}\n});\n```\n\n---------------------------------------\n\n\n### parallelLimit(tasks, limit, [callback])\n\nThe same as parallel only the tasks are executed in parallel with a maximum of \"limit\" \ntasks executing at any time.\n\nNote that the tasks are not executed in batches, so there is no guarantee that \nthe first \"limit\" tasks will complete before any others are started.\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed \n a callback(err, result) it must call on completion with an error (which can\n be null) and an optional result value.\n* limit - The maximum number of tasks to run at any time.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets a results array (or object) containing all \n the result arguments passed to the task callbacks.\n\n---------------------------------------\n\n\n### whilst(test, fn, callback)\n\nRepeatedly call fn, while test returns true. Calls the callback when stopped,\nor an error occurs.\n\n__Arguments__\n\n* test() - synchronous truth test to perform before each execution of fn.\n* fn(callback) - A function to call each time the test passes. The function is\n passed a callback(err) which must be called once it has completed with an \n optional error argument.\n* callback(err) - A callback which is called after the test fails and repeated\n execution of fn has stopped.\n\n__Example__\n\n```js\nvar count = 0;\n\nasync.whilst(\n function () { return count < 5; },\n function (callback) {\n count++;\n setTimeout(callback, 1000);\n },\n function (err) {\n // 5 seconds have passed\n }\n);\n```\n\n---------------------------------------\n\n\n### doWhilst(fn, test, callback)\n\nThe post check version of whilst. To reflect the difference in the order of operations `test` and `fn` arguments are switched. `doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript.\n\n---------------------------------------\n\n\n### until(test, fn, callback)\n\nRepeatedly call fn, until test returns true. Calls the callback when stopped,\nor an error occurs.\n\nThe inverse of async.whilst.\n\n---------------------------------------\n\n\n### doUntil(fn, test, callback)\n\nLike doWhilst except the test is inverted. Note the argument ordering differs from `until`.\n\n---------------------------------------\n\n\n### forever(fn, callback)\n\nCalls the asynchronous function 'fn' repeatedly, in series, indefinitely.\nIf an error is passed to fn's callback then 'callback' is called with the\nerror, otherwise it will never be called.\n\n---------------------------------------\n\n\n### waterfall(tasks, [callback])\n\nRuns an array of functions in series, each passing their results to the next in\nthe array. However, if any of the functions pass an error to the callback, the\nnext function is not executed and the main callback is immediately called with\nthe error.\n\n__Arguments__\n\n* tasks - An array of functions to run, each function is passed a \n callback(err, result1, result2, ...) it must call on completion. The first\n argument is an error (which can be null) and any further arguments will be \n passed as arguments in order to the next task.\n* callback(err, [results]) - An optional callback to run once all the functions\n have completed. This will be passed the results of the last task's callback.\n\n\n\n__Example__\n\n```js\nasync.waterfall([\n function(callback){\n callback(null, 'one', 'two');\n },\n function(arg1, arg2, callback){\n callback(null, 'three');\n },\n function(arg1, callback){\n // arg1 now equals 'three'\n callback(null, 'done');\n }\n], function (err, result) {\n // result now equals 'done' \n});\n```\n\n---------------------------------------\n\n### compose(fn1, fn2...)\n\nCreates a function which is a composition of the passed asynchronous\nfunctions. Each function consumes the return value of the function that\nfollows. Composing functions f(), g() and h() would produce the result of\nf(g(h())), only this version uses callbacks to obtain the return values.\n\nEach function is executed with the `this` binding of the composed function.\n\n__Arguments__\n\n* functions... - the asynchronous functions to compose\n\n\n__Example__\n\n```js\nfunction add1(n, callback) {\n setTimeout(function () {\n callback(null, n + 1);\n }, 10);\n}\n\nfunction mul3(n, callback) {\n setTimeout(function () {\n callback(null, n * 3);\n }, 10);\n}\n\nvar add1mul3 = async.compose(mul3, add1);\n\nadd1mul3(4, function (err, result) {\n // result now equals 15\n});\n```\n\n---------------------------------------\n\n### applyEach(fns, args..., callback)\n\nApplies the provided arguments to each function in the array, calling the\ncallback after all functions have completed. If you only provide the first\nargument then it will return a function which lets you pass in the\narguments as if it were a single function call.\n\n__Arguments__\n\n* fns - the asynchronous functions to all call with the same arguments\n* args... - any number of separate arguments to pass to the function\n* callback - the final argument should be the callback, called when all\n functions have completed processing\n\n\n__Example__\n\n```js\nasync.applyEach([enableSearch, updateSchema], 'bucket', callback);\n\n// partial application example:\nasync.each(\n buckets,\n async.applyEach([enableSearch, updateSchema]),\n callback\n);\n```\n\n---------------------------------------\n\n\n### applyEachSeries(arr, iterator, callback)\n\nThe same as applyEach only the functions are applied in series.\n\n---------------------------------------\n\n\n### queue(worker, concurrency)\n\nCreates a queue object with the specified concurrency. Tasks added to the\nqueue will be processed in parallel (up to the concurrency limit). If all\nworkers are in progress, the task is queued until one is available. Once\na worker has completed a task, the task's callback is called.\n\n__Arguments__\n\n* worker(task, callback) - An asynchronous function for processing a queued\n task, which must call its callback(err) argument when finished, with an \n optional error as an argument.\n* concurrency - An integer for determining how many worker functions should be\n run in parallel.\n\n__Queue objects__\n\nThe queue object returned by this function has the following properties and\nmethods:\n\n* length() - a function returning the number of items waiting to be processed.\n* concurrency - an integer for determining how many worker functions should be\n run in parallel. This property can be changed after a queue is created to\n alter the concurrency on-the-fly.\n* push(task, [callback]) - add a new task to the queue, the callback is called\n once the worker has finished processing the task.\n instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list.\n* unshift(task, [callback]) - add a new task to the front of the queue.\n* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued\n* empty - a callback that is called when the last item from the queue is given to a worker\n* drain - a callback that is called when the last item from the queue has returned from the worker\n\n__Example__\n\n```js\n// create a queue object with concurrency 2\n\nvar q = async.queue(function (task, callback) {\n console.log('hello ' + task.name);\n callback();\n}, 2);\n\n\n// assign a callback\nq.drain = function() {\n console.log('all items have been processed');\n}\n\n// add some items to the queue\n\nq.push({name: 'foo'}, function (err) {\n console.log('finished processing foo');\n});\nq.push({name: 'bar'}, function (err) {\n console.log('finished processing bar');\n});\n\n// add some items to the queue (batch-wise)\n\nq.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) {\n console.log('finished processing bar');\n});\n\n// add some items to the front of the queue\n\nq.unshift({name: 'bar'}, function (err) {\n console.log('finished processing bar');\n});\n```\n\n---------------------------------------\n\n\n### cargo(worker, [payload])\n\nCreates a cargo object with the specified payload. Tasks added to the\ncargo will be processed altogether (up to the payload limit). If the\nworker is in progress, the task is queued until it is available. Once\nthe worker has completed some tasks, each callback of those tasks is called.\n\n__Arguments__\n\n* worker(tasks, callback) - An asynchronous function for processing an array of\n queued tasks, which must call its callback(err) argument when finished, with \n an optional error as an argument.\n* payload - An optional integer for determining how many tasks should be\n processed per round; if omitted, the default is unlimited.\n\n__Cargo objects__\n\nThe cargo object returned by this function has the following properties and\nmethods:\n\n* length() - a function returning the number of items waiting to be processed.\n* payload - an integer for determining how many tasks should be\n process per round. This property can be changed after a cargo is created to\n alter the payload on-the-fly.\n* push(task, [callback]) - add a new task to the queue, the callback is called\n once the worker has finished processing the task.\n instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list.\n* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued\n* empty - a callback that is called when the last item from the queue is given to a worker\n* drain - a callback that is called when the last item from the queue has returned from the worker\n\n__Example__\n\n```js\n// create a cargo object with payload 2\n\nvar cargo = async.cargo(function (tasks, callback) {\n for(var i=0; i\n### auto(tasks, [callback])\n\nDetermines the best order for running functions based on their requirements.\nEach function can optionally depend on other functions being completed first,\nand each function is run as soon as its requirements are satisfied. If any of\nthe functions pass an error to their callback, that function will not complete\n(so any other functions depending on it will not run) and the main callback\nwill be called immediately with the error. Functions also receive an object\ncontaining the results of functions which have completed so far.\n\nNote, all functions are called with a results object as a second argument, \nso it is unsafe to pass functions in the tasks object which cannot handle the\nextra argument. For example, this snippet of code:\n\n```js\nasync.auto({\n readData: async.apply(fs.readFile, 'data.txt', 'utf-8')\n}, callback);\n```\n\nwill have the effect of calling readFile with the results object as the last\nargument, which will fail:\n\n```js\nfs.readFile('data.txt', 'utf-8', cb, {});\n```\n\nInstead, wrap the call to readFile in a function which does not forward the \nresults object:\n\n```js\nasync.auto({\n readData: function(cb, results){\n fs.readFile('data.txt', 'utf-8', cb);\n }\n}, callback);\n```\n\n__Arguments__\n\n* tasks - An object literal containing named functions or an array of\n requirements, with the function itself the last item in the array. The key\n used for each function or array is used when specifying requirements. The \n function receives two arguments: (1) a callback(err, result) which must be \n called when finished, passing an error (which can be null) and the result of \n the function's execution, and (2) a results object, containing the results of\n the previously executed functions.\n* callback(err, results) - An optional callback which is called when all the\n tasks have been completed. The callback will receive an error as an argument\n if any tasks pass an error to their callback. Results will always be passed\n\tbut if an error occurred, no other tasks will be performed, and the results\n\tobject will only contain partial results.\n \n\n__Example__\n\n```js\nasync.auto({\n get_data: function(callback){\n // async code to get some data\n },\n make_folder: function(callback){\n // async code to create a directory to store a file in\n // this is run at the same time as getting the data\n },\n write_file: ['get_data', 'make_folder', function(callback){\n // once there is some data and the directory exists,\n // write the data to a file in the directory\n callback(null, filename);\n }],\n email_link: ['write_file', function(callback, results){\n // once the file is written let's email a link to it...\n // results.write_file contains the filename returned by write_file.\n }]\n});\n```\n\nThis is a fairly trivial example, but to do this using the basic parallel and\nseries functions would look like this:\n\n```js\nasync.parallel([\n function(callback){\n // async code to get some data\n },\n function(callback){\n // async code to create a directory to store a file in\n // this is run at the same time as getting the data\n }\n],\nfunction(err, results){\n async.series([\n function(callback){\n // once there is some data and the directory exists,\n // write the data to a file in the directory\n },\n function(callback){\n // once the file is written let's email a link to it...\n }\n ]);\n});\n```\n\nFor a complicated series of async tasks using the auto function makes adding\nnew tasks much easier and makes the code more readable.\n\n\n---------------------------------------\n\n\n### iterator(tasks)\n\nCreates an iterator function which calls the next function in the array,\nreturning a continuation to call the next one after that. It's also possible to\n'peek' the next iterator by doing iterator.next().\n\nThis function is used internally by the async module but can be useful when\nyou want to manually control the flow of functions in series.\n\n__Arguments__\n\n* tasks - An array of functions to run.\n\n__Example__\n\n```js\nvar iterator = async.iterator([\n function(){ sys.p('one'); },\n function(){ sys.p('two'); },\n function(){ sys.p('three'); }\n]);\n\nnode> var iterator2 = iterator();\n'one'\nnode> var iterator3 = iterator2();\n'two'\nnode> iterator3();\n'three'\nnode> var nextfn = iterator2.next();\nnode> nextfn();\n'three'\n```\n\n---------------------------------------\n\n\n### apply(function, arguments..)\n\nCreates a continuation function with some arguments already applied, a useful\nshorthand when combined with other control flow functions. Any arguments\npassed to the returned function are added to the arguments originally passed\nto apply.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to automatically apply when the\n continuation is called.\n\n__Example__\n\n```js\n// using apply\n\nasync.parallel([\n async.apply(fs.writeFile, 'testfile1', 'test1'),\n async.apply(fs.writeFile, 'testfile2', 'test2'),\n]);\n\n\n// the same process without using apply\n\nasync.parallel([\n function(callback){\n fs.writeFile('testfile1', 'test1', callback);\n },\n function(callback){\n fs.writeFile('testfile2', 'test2', callback);\n }\n]);\n```\n\nIt's possible to pass any number of additional arguments when calling the\ncontinuation:\n\n```js\nnode> var fn = async.apply(sys.puts, 'one');\nnode> fn('two', 'three');\none\ntwo\nthree\n```\n\n---------------------------------------\n\n\n### nextTick(callback)\n\nCalls the callback on a later loop around the event loop. In node.js this just\ncalls process.nextTick, in the browser it falls back to setImmediate(callback)\nif available, otherwise setTimeout(callback, 0), which means other higher priority\nevents may precede the execution of the callback.\n\nThis is used internally for browser-compatibility purposes.\n\n__Arguments__\n\n* callback - The function to call on a later loop around the event loop.\n\n__Example__\n\n```js\nvar call_order = [];\nasync.nextTick(function(){\n call_order.push('two');\n // call_order now equals ['one','two']\n});\ncall_order.push('one')\n```\n\n\n### times(n, callback)\n\nCalls the callback n times and accumulates results in the same manner\nyou would use with async.map.\n\n__Arguments__\n\n* n - The number of times to run the function.\n* callback - The function to call n times.\n\n__Example__\n\n```js\n// Pretend this is some complicated async factory\nvar createUser = function(id, callback) {\n callback(null, {\n id: 'user' + id\n })\n}\n// generate 5 users\nasync.times(5, function(n, next){\n createUser(n, function(err, user) {\n next(err, user)\n })\n}, function(err, users) {\n // we should now have 5 users\n});\n```\n\n\n### timesSeries(n, callback)\n\nThe same as times only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. The results array will be in the same order as the original.\n\n\n## Utils\n\n\n### memoize(fn, [hasher])\n\nCaches the results of an async function. When creating a hash to store function\nresults against, the callback is omitted from the hash and an optional hash\nfunction can be used.\n\nThe cache of results is exposed as the `memo` property of the function returned\nby `memoize`.\n\n__Arguments__\n\n* fn - the function you to proxy and cache results from.\n* hasher - an optional function for generating a custom hash for storing\n results, it has all the arguments applied to it apart from the callback, and\n must be synchronous.\n\n__Example__\n\n```js\nvar slow_fn = function (name, callback) {\n // do something\n callback(null, result);\n};\nvar fn = async.memoize(slow_fn);\n\n// fn can now be used as if it were slow_fn\nfn('some name', function () {\n // callback\n});\n```\n\n\n### unmemoize(fn)\n\nUndoes a memoized function, reverting it to the original, unmemoized\nform. Comes handy in tests.\n\n__Arguments__\n\n* fn - the memoized function\n\n\n### log(function, arguments)\n\nLogs the result of an async function to the console. Only works in node.js or\nin browsers that support console.log and console.error (such as FF and Chrome).\nIf multiple arguments are returned from the async function, console.log is\ncalled on each argument in order.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to apply to the function.\n\n__Example__\n\n```js\nvar hello = function(name, callback){\n setTimeout(function(){\n callback(null, 'hello ' + name);\n }, 1000);\n};\n```\n```js\nnode> async.log(hello, 'world');\n'hello world'\n```\n\n---------------------------------------\n\n\n### dir(function, arguments)\n\nLogs the result of an async function to the console using console.dir to\ndisplay the properties of the resulting object. Only works in node.js or\nin browsers that support console.dir and console.error (such as FF and Chrome).\nIf multiple arguments are returned from the async function, console.dir is\ncalled on each argument in order.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to apply to the function.\n\n__Example__\n\n```js\nvar hello = function(name, callback){\n setTimeout(function(){\n callback(null, {hello: name});\n }, 1000);\n};\n```\n```js\nnode> async.dir(hello, 'world');\n{hello: 'world'}\n```\n\n---------------------------------------\n\n\n### noConflict()\n\nChanges the value of async back to its original value, returning a reference to the\nasync object.\n", + "readmeFilename": "README.md", + "homepage": "https://github.com/caolan/async", + "_id": "async@0.2.10", + "_from": "async@~0.2.6" +} diff --git a/bin/node_modules/uglify-js/node_modules/optimist/.travis.yml b/bin/node_modules/uglify-js/node_modules/optimist/.travis.yml new file mode 100644 index 00000000..cc4dba29 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/optimist/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - "0.8" + - "0.10" diff --git a/bin/node_modules/uglify-js/node_modules/optimist/LICENSE b/bin/node_modules/uglify-js/node_modules/optimist/LICENSE new file mode 100644 index 00000000..432d1aeb --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/optimist/LICENSE @@ -0,0 +1,21 @@ +Copyright 2010 James Halliday (mail@substack.net) + +This project is free software released under the MIT/X11 license: + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/bin/node_modules/uglify-js/node_modules/optimist/example/bool.js b/bin/node_modules/uglify-js/node_modules/optimist/example/bool.js new file mode 100644 index 00000000..a998fb7a --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/optimist/example/bool.js @@ -0,0 +1,10 @@ +#!/usr/bin/env node +var util = require('util'); +var argv = require('optimist').argv; + +if (argv.s) { + util.print(argv.fr ? 'Le chat dit: ' : 'The cat says: '); +} +console.log( + (argv.fr ? 'miaou' : 'meow') + (argv.p ? '.' : '') +); diff --git a/bin/node_modules/uglify-js/node_modules/optimist/example/boolean_double.js b/bin/node_modules/uglify-js/node_modules/optimist/example/boolean_double.js new file mode 100644 index 00000000..a35a7e6d --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/optimist/example/boolean_double.js @@ -0,0 +1,7 @@ +#!/usr/bin/env node +var argv = require('optimist') + .boolean(['x','y','z']) + .argv +; +console.dir([ argv.x, argv.y, argv.z ]); +console.dir(argv._); diff --git a/bin/node_modules/uglify-js/node_modules/optimist/example/boolean_single.js b/bin/node_modules/uglify-js/node_modules/optimist/example/boolean_single.js new file mode 100644 index 00000000..017bb689 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/optimist/example/boolean_single.js @@ -0,0 +1,7 @@ +#!/usr/bin/env node +var argv = require('optimist') + .boolean('v') + .argv +; +console.dir(argv.v); +console.dir(argv._); diff --git a/bin/node_modules/uglify-js/node_modules/optimist/example/default_hash.js b/bin/node_modules/uglify-js/node_modules/optimist/example/default_hash.js new file mode 100644 index 00000000..ade77681 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/optimist/example/default_hash.js @@ -0,0 +1,8 @@ +#!/usr/bin/env node + +var argv = require('optimist') + .default({ x : 10, y : 10 }) + .argv +; + +console.log(argv.x + argv.y); diff --git a/bin/node_modules/uglify-js/node_modules/optimist/example/default_singles.js b/bin/node_modules/uglify-js/node_modules/optimist/example/default_singles.js new file mode 100644 index 00000000..d9b1ff45 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/optimist/example/default_singles.js @@ -0,0 +1,7 @@ +#!/usr/bin/env node +var argv = require('optimist') + .default('x', 10) + .default('y', 10) + .argv +; +console.log(argv.x + argv.y); diff --git a/bin/node_modules/uglify-js/node_modules/optimist/example/divide.js b/bin/node_modules/uglify-js/node_modules/optimist/example/divide.js new file mode 100644 index 00000000..5e2ee82f --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/optimist/example/divide.js @@ -0,0 +1,8 @@ +#!/usr/bin/env node + +var argv = require('optimist') + .usage('Usage: $0 -x [num] -y [num]') + .demand(['x','y']) + .argv; + +console.log(argv.x / argv.y); diff --git a/bin/node_modules/uglify-js/node_modules/optimist/example/line_count.js b/bin/node_modules/uglify-js/node_modules/optimist/example/line_count.js new file mode 100644 index 00000000..b5f95bf6 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/optimist/example/line_count.js @@ -0,0 +1,20 @@ +#!/usr/bin/env node +var argv = require('optimist') + .usage('Count the lines in a file.\nUsage: $0') + .demand('f') + .alias('f', 'file') + .describe('f', 'Load a file') + .argv +; + +var fs = require('fs'); +var s = fs.createReadStream(argv.file); + +var lines = 0; +s.on('data', function (buf) { + lines += buf.toString().match(/\n/g).length; +}); + +s.on('end', function () { + console.log(lines); +}); diff --git a/bin/node_modules/uglify-js/node_modules/optimist/example/line_count_options.js b/bin/node_modules/uglify-js/node_modules/optimist/example/line_count_options.js new file mode 100644 index 00000000..d9ac7090 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/optimist/example/line_count_options.js @@ -0,0 +1,29 @@ +#!/usr/bin/env node +var argv = require('optimist') + .usage('Count the lines in a file.\nUsage: $0') + .options({ + file : { + demand : true, + alias : 'f', + description : 'Load a file' + }, + base : { + alias : 'b', + description : 'Numeric base to use for output', + default : 10, + }, + }) + .argv +; + +var fs = require('fs'); +var s = fs.createReadStream(argv.file); + +var lines = 0; +s.on('data', function (buf) { + lines += buf.toString().match(/\n/g).length; +}); + +s.on('end', function () { + console.log(lines.toString(argv.base)); +}); diff --git a/bin/node_modules/uglify-js/node_modules/optimist/example/line_count_wrap.js b/bin/node_modules/uglify-js/node_modules/optimist/example/line_count_wrap.js new file mode 100644 index 00000000..42675111 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/optimist/example/line_count_wrap.js @@ -0,0 +1,29 @@ +#!/usr/bin/env node +var argv = require('optimist') + .usage('Count the lines in a file.\nUsage: $0') + .wrap(80) + .demand('f') + .alias('f', [ 'file', 'filename' ]) + .describe('f', + "Load a file. It's pretty important." + + " Required even. So you'd better specify it." + ) + .alias('b', 'base') + .describe('b', 'Numeric base to display the number of lines in') + .default('b', 10) + .describe('x', 'Super-secret optional parameter which is secret') + .default('x', '') + .argv +; + +var fs = require('fs'); +var s = fs.createReadStream(argv.file); + +var lines = 0; +s.on('data', function (buf) { + lines += buf.toString().match(/\n/g).length; +}); + +s.on('end', function () { + console.log(lines.toString(argv.base)); +}); diff --git a/bin/node_modules/uglify-js/node_modules/optimist/example/nonopt.js b/bin/node_modules/uglify-js/node_modules/optimist/example/nonopt.js new file mode 100644 index 00000000..ee633eed --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/optimist/example/nonopt.js @@ -0,0 +1,4 @@ +#!/usr/bin/env node +var argv = require('optimist').argv; +console.log('(%d,%d)', argv.x, argv.y); +console.log(argv._); diff --git a/bin/node_modules/uglify-js/node_modules/optimist/example/reflect.js b/bin/node_modules/uglify-js/node_modules/optimist/example/reflect.js new file mode 100644 index 00000000..816b3e11 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/optimist/example/reflect.js @@ -0,0 +1,2 @@ +#!/usr/bin/env node +console.dir(require('optimist').argv); diff --git a/bin/node_modules/uglify-js/node_modules/optimist/example/short.js b/bin/node_modules/uglify-js/node_modules/optimist/example/short.js new file mode 100644 index 00000000..1db0ad0f --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/optimist/example/short.js @@ -0,0 +1,3 @@ +#!/usr/bin/env node +var argv = require('optimist').argv; +console.log('(%d,%d)', argv.x, argv.y); diff --git a/bin/node_modules/uglify-js/node_modules/optimist/example/string.js b/bin/node_modules/uglify-js/node_modules/optimist/example/string.js new file mode 100644 index 00000000..a8e5aeb2 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/optimist/example/string.js @@ -0,0 +1,11 @@ +#!/usr/bin/env node +var argv = require('optimist') + .string('x', 'y') + .argv +; +console.dir([ argv.x, argv.y ]); + +/* Turns off numeric coercion: + ./node string.js -x 000123 -y 9876 + [ '000123', '9876' ] +*/ diff --git a/bin/node_modules/uglify-js/node_modules/optimist/example/usage-options.js b/bin/node_modules/uglify-js/node_modules/optimist/example/usage-options.js new file mode 100644 index 00000000..b9999776 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/optimist/example/usage-options.js @@ -0,0 +1,19 @@ +var optimist = require('./../index'); + +var argv = optimist.usage('This is my awesome program', { + 'about': { + description: 'Provide some details about the author of this program', + required: true, + short: 'a', + }, + 'info': { + description: 'Provide some information about the node.js agains!!!!!!', + boolean: true, + short: 'i' + } +}).argv; + +optimist.showHelp(); + +console.log('\n\nInspecting options'); +console.dir(argv); \ No newline at end of file diff --git a/bin/node_modules/uglify-js/node_modules/optimist/example/xup.js b/bin/node_modules/uglify-js/node_modules/optimist/example/xup.js new file mode 100644 index 00000000..8f6ecd20 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/optimist/example/xup.js @@ -0,0 +1,10 @@ +#!/usr/bin/env node +var argv = require('optimist').argv; + +if (argv.rif - 5 * argv.xup > 7.138) { + console.log('Buy more riffiwobbles'); +} +else { + console.log('Sell the xupptumblers'); +} + diff --git a/bin/node_modules/uglify-js/node_modules/optimist/index.js b/bin/node_modules/uglify-js/node_modules/optimist/index.js new file mode 100644 index 00000000..8ac67eb3 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/optimist/index.js @@ -0,0 +1,478 @@ +var path = require('path'); +var wordwrap = require('wordwrap'); + +/* Hack an instance of Argv with process.argv into Argv + so people can do + require('optimist')(['--beeble=1','-z','zizzle']).argv + to parse a list of args and + require('optimist').argv + to get a parsed version of process.argv. +*/ + +var inst = Argv(process.argv.slice(2)); +Object.keys(inst).forEach(function (key) { + Argv[key] = typeof inst[key] == 'function' + ? inst[key].bind(inst) + : inst[key]; +}); + +var exports = module.exports = Argv; +function Argv (args, cwd) { + var self = {}; + if (!cwd) cwd = process.cwd(); + + self.$0 = process.argv + .slice(0,2) + .map(function (x) { + var b = rebase(cwd, x); + return x.match(/^\//) && b.length < x.length + ? b : x + }) + .join(' ') + ; + + if (process.env._ != undefined && process.argv[1] == process.env._) { + self.$0 = process.env._.replace( + path.dirname(process.execPath) + '/', '' + ); + } + + var flags = { bools : {}, strings : {} }; + + self.boolean = function (bools) { + if (!Array.isArray(bools)) { + bools = [].slice.call(arguments); + } + + bools.forEach(function (name) { + flags.bools[name] = true; + }); + + return self; + }; + + self.string = function (strings) { + if (!Array.isArray(strings)) { + strings = [].slice.call(arguments); + } + + strings.forEach(function (name) { + flags.strings[name] = true; + }); + + return self; + }; + + var aliases = {}; + self.alias = function (x, y) { + if (typeof x === 'object') { + Object.keys(x).forEach(function (key) { + self.alias(key, x[key]); + }); + } + else if (Array.isArray(y)) { + y.forEach(function (yy) { + self.alias(x, yy); + }); + } + else { + var zs = (aliases[x] || []).concat(aliases[y] || []).concat(x, y); + aliases[x] = zs.filter(function (z) { return z != x }); + aliases[y] = zs.filter(function (z) { return z != y }); + } + + return self; + }; + + var demanded = {}; + self.demand = function (keys) { + if (typeof keys == 'number') { + if (!demanded._) demanded._ = 0; + demanded._ += keys; + } + else if (Array.isArray(keys)) { + keys.forEach(function (key) { + self.demand(key); + }); + } + else { + demanded[keys] = true; + } + + return self; + }; + + var usage; + self.usage = function (msg, opts) { + if (!opts && typeof msg === 'object') { + opts = msg; + msg = null; + } + + usage = msg; + + if (opts) self.options(opts); + + return self; + }; + + function fail (msg) { + self.showHelp(); + if (msg) console.error(msg); + process.exit(1); + } + + var checks = []; + self.check = function (f) { + checks.push(f); + return self; + }; + + var defaults = {}; + self.default = function (key, value) { + if (typeof key === 'object') { + Object.keys(key).forEach(function (k) { + self.default(k, key[k]); + }); + } + else { + defaults[key] = value; + } + + return self; + }; + + var descriptions = {}; + self.describe = function (key, desc) { + if (typeof key === 'object') { + Object.keys(key).forEach(function (k) { + self.describe(k, key[k]); + }); + } + else { + descriptions[key] = desc; + } + return self; + }; + + self.parse = function (args) { + return Argv(args).argv; + }; + + self.option = self.options = function (key, opt) { + if (typeof key === 'object') { + Object.keys(key).forEach(function (k) { + self.options(k, key[k]); + }); + } + else { + if (opt.alias) self.alias(key, opt.alias); + if (opt.demand) self.demand(key); + if (typeof opt.default !== 'undefined') { + self.default(key, opt.default); + } + + if (opt.boolean || opt.type === 'boolean') { + self.boolean(key); + } + if (opt.string || opt.type === 'string') { + self.string(key); + } + + var desc = opt.describe || opt.description || opt.desc; + if (desc) { + self.describe(key, desc); + } + } + + return self; + }; + + var wrap = null; + self.wrap = function (cols) { + wrap = cols; + return self; + }; + + self.showHelp = function (fn) { + if (!fn) fn = console.error; + fn(self.help()); + }; + + self.help = function () { + var keys = Object.keys( + Object.keys(descriptions) + .concat(Object.keys(demanded)) + .concat(Object.keys(defaults)) + .reduce(function (acc, key) { + if (key !== '_') acc[key] = true; + return acc; + }, {}) + ); + + var help = keys.length ? [ 'Options:' ] : []; + + if (usage) { + help.unshift(usage.replace(/\$0/g, self.$0), ''); + } + + var switches = keys.reduce(function (acc, key) { + acc[key] = [ key ].concat(aliases[key] || []) + .map(function (sw) { + return (sw.length > 1 ? '--' : '-') + sw + }) + .join(', ') + ; + return acc; + }, {}); + + var switchlen = longest(Object.keys(switches).map(function (s) { + return switches[s] || ''; + })); + + var desclen = longest(Object.keys(descriptions).map(function (d) { + return descriptions[d] || ''; + })); + + keys.forEach(function (key) { + var kswitch = switches[key]; + var desc = descriptions[key] || ''; + + if (wrap) { + desc = wordwrap(switchlen + 4, wrap)(desc) + .slice(switchlen + 4) + ; + } + + var spadding = new Array( + Math.max(switchlen - kswitch.length + 3, 0) + ).join(' '); + + var dpadding = new Array( + Math.max(desclen - desc.length + 1, 0) + ).join(' '); + + var type = null; + + if (flags.bools[key]) type = '[boolean]'; + if (flags.strings[key]) type = '[string]'; + + if (!wrap && dpadding.length > 0) { + desc += dpadding; + } + + var prelude = ' ' + kswitch + spadding; + var extra = [ + type, + demanded[key] + ? '[required]' + : null + , + defaults[key] !== undefined + ? '[default: ' + JSON.stringify(defaults[key]) + ']' + : null + , + ].filter(Boolean).join(' '); + + var body = [ desc, extra ].filter(Boolean).join(' '); + + if (wrap) { + var dlines = desc.split('\n'); + var dlen = dlines.slice(-1)[0].length + + (dlines.length === 1 ? prelude.length : 0) + + body = desc + (dlen + extra.length > wrap - 2 + ? '\n' + + new Array(wrap - extra.length + 1).join(' ') + + extra + : new Array(wrap - extra.length - dlen + 1).join(' ') + + extra + ); + } + + help.push(prelude + body); + }); + + help.push(''); + return help.join('\n'); + }; + + Object.defineProperty(self, 'argv', { + get : parseArgs, + enumerable : true, + }); + + function parseArgs () { + var argv = { _ : [], $0 : self.$0 }; + Object.keys(flags.bools).forEach(function (key) { + setArg(key, defaults[key] || false); + }); + + function setArg (key, val) { + var num = Number(val); + var value = typeof val !== 'string' || isNaN(num) ? val : num; + if (flags.strings[key]) value = val; + + setKey(argv, key.split('.'), value); + + (aliases[key] || []).forEach(function (x) { + argv[x] = argv[key]; + }); + } + + for (var i = 0; i < args.length; i++) { + var arg = args[i]; + + if (arg === '--') { + argv._.push.apply(argv._, args.slice(i + 1)); + break; + } + else if (arg.match(/^--.+=/)) { + // Using [\s\S] instead of . because js doesn't support the + // 'dotall' regex modifier. See: + // http://stackoverflow.com/a/1068308/13216 + var m = arg.match(/^--([^=]+)=([\s\S]*)$/); + setArg(m[1], m[2]); + } + else if (arg.match(/^--no-.+/)) { + var key = arg.match(/^--no-(.+)/)[1]; + setArg(key, false); + } + else if (arg.match(/^--.+/)) { + var key = arg.match(/^--(.+)/)[1]; + var next = args[i + 1]; + if (next !== undefined && !next.match(/^-/) + && !flags.bools[key] + && (aliases[key] ? !flags.bools[aliases[key]] : true)) { + setArg(key, next); + i++; + } + else if (/^(true|false)$/.test(next)) { + setArg(key, next === 'true'); + i++; + } + else { + setArg(key, true); + } + } + else if (arg.match(/^-[^-]+/)) { + var letters = arg.slice(1,-1).split(''); + + var broken = false; + for (var j = 0; j < letters.length; j++) { + if (letters[j+1] && letters[j+1].match(/\W/)) { + setArg(letters[j], arg.slice(j+2)); + broken = true; + break; + } + else { + setArg(letters[j], true); + } + } + + if (!broken) { + var key = arg.slice(-1)[0]; + + if (args[i+1] && !args[i+1].match(/^-/) + && !flags.bools[key] + && (aliases[key] ? !flags.bools[aliases[key]] : true)) { + setArg(key, args[i+1]); + i++; + } + else if (args[i+1] && /true|false/.test(args[i+1])) { + setArg(key, args[i+1] === 'true'); + i++; + } + else { + setArg(key, true); + } + } + } + else { + var n = Number(arg); + argv._.push(flags.strings['_'] || isNaN(n) ? arg : n); + } + } + + Object.keys(defaults).forEach(function (key) { + if (!(key in argv)) { + argv[key] = defaults[key]; + if (key in aliases) { + argv[aliases[key]] = defaults[key]; + } + } + }); + + if (demanded._ && argv._.length < demanded._) { + fail('Not enough non-option arguments: got ' + + argv._.length + ', need at least ' + demanded._ + ); + } + + var missing = []; + Object.keys(demanded).forEach(function (key) { + if (!argv[key]) missing.push(key); + }); + + if (missing.length) { + fail('Missing required arguments: ' + missing.join(', ')); + } + + checks.forEach(function (f) { + try { + if (f(argv) === false) { + fail('Argument check failed: ' + f.toString()); + } + } + catch (err) { + fail(err) + } + }); + + return argv; + } + + function longest (xs) { + return Math.max.apply( + null, + xs.map(function (x) { return x.length }) + ); + } + + return self; +}; + +// rebase an absolute path to a relative one with respect to a base directory +// exported for tests +exports.rebase = rebase; +function rebase (base, dir) { + var ds = path.normalize(dir).split('/').slice(1); + var bs = path.normalize(base).split('/').slice(1); + + for (var i = 0; ds[i] && ds[i] == bs[i]; i++); + ds.splice(0, i); bs.splice(0, i); + + var p = path.normalize( + bs.map(function () { return '..' }).concat(ds).join('/') + ).replace(/\/$/,'').replace(/^$/, '.'); + return p.match(/^[.\/]/) ? p : './' + p; +}; + +function setKey (obj, keys, value) { + var o = obj; + keys.slice(0,-1).forEach(function (key) { + if (o[key] === undefined) o[key] = {}; + o = o[key]; + }); + + var key = keys[keys.length - 1]; + if (o[key] === undefined || typeof o[key] === 'boolean') { + o[key] = value; + } + else if (Array.isArray(o[key])) { + o[key].push(value); + } + else { + o[key] = [ o[key], value ]; + } +} diff --git a/bin/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/.npmignore b/bin/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/.npmignore new file mode 100644 index 00000000..3c3629e6 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/bin/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/README.markdown b/bin/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/README.markdown new file mode 100644 index 00000000..346374e0 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/README.markdown @@ -0,0 +1,70 @@ +wordwrap +======== + +Wrap your words. + +example +======= + +made out of meat +---------------- + +meat.js + + var wrap = require('wordwrap')(15); + console.log(wrap('You and your whole family are made out of meat.')); + +output: + + You and your + whole family + are made out + of meat. + +centered +-------- + +center.js + + var wrap = require('wordwrap')(20, 60); + console.log(wrap( + 'At long last the struggle and tumult was over.' + + ' The machines had finally cast off their oppressors' + + ' and were finally free to roam the cosmos.' + + '\n' + + 'Free of purpose, free of obligation.' + + ' Just drifting through emptiness.' + + ' The sun was just another point of light.' + )); + +output: + + At long last the struggle and tumult + was over. The machines had finally cast + off their oppressors and were finally + free to roam the cosmos. + Free of purpose, free of obligation. + Just drifting through emptiness. The + sun was just another point of light. + +methods +======= + +var wrap = require('wordwrap'); + +wrap(stop), wrap(start, stop, params={mode:"soft"}) +--------------------------------------------------- + +Returns a function that takes a string and returns a new string. + +Pad out lines with spaces out to column `start` and then wrap until column +`stop`. If a word is longer than `stop - start` characters it will overflow. + +In "soft" mode, split chunks by `/(\S+\s+/` and don't break up chunks which are +longer than `stop - start`, in "hard" mode, split chunks with `/\b/` and break +up chunks longer than `stop - start`. + +wrap.hard(start, stop) +---------------------- + +Like `wrap()` but with `params.mode = "hard"`. diff --git a/bin/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/example/center.js b/bin/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/example/center.js new file mode 100644 index 00000000..a3fbaae9 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/example/center.js @@ -0,0 +1,10 @@ +var wrap = require('wordwrap')(20, 60); +console.log(wrap( + 'At long last the struggle and tumult was over.' + + ' The machines had finally cast off their oppressors' + + ' and were finally free to roam the cosmos.' + + '\n' + + 'Free of purpose, free of obligation.' + + ' Just drifting through emptiness.' + + ' The sun was just another point of light.' +)); diff --git a/bin/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/example/meat.js b/bin/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/example/meat.js new file mode 100644 index 00000000..a4665e10 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/example/meat.js @@ -0,0 +1,3 @@ +var wrap = require('wordwrap')(15); + +console.log(wrap('You and your whole family are made out of meat.')); diff --git a/bin/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/index.js b/bin/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/index.js new file mode 100644 index 00000000..c9bc9452 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/index.js @@ -0,0 +1,76 @@ +var wordwrap = module.exports = function (start, stop, params) { + if (typeof start === 'object') { + params = start; + start = params.start; + stop = params.stop; + } + + if (typeof stop === 'object') { + params = stop; + start = start || params.start; + stop = undefined; + } + + if (!stop) { + stop = start; + start = 0; + } + + if (!params) params = {}; + var mode = params.mode || 'soft'; + var re = mode === 'hard' ? /\b/ : /(\S+\s+)/; + + return function (text) { + var chunks = text.toString() + .split(re) + .reduce(function (acc, x) { + if (mode === 'hard') { + for (var i = 0; i < x.length; i += stop - start) { + acc.push(x.slice(i, i + stop - start)); + } + } + else acc.push(x) + return acc; + }, []) + ; + + return chunks.reduce(function (lines, rawChunk) { + if (rawChunk === '') return lines; + + var chunk = rawChunk.replace(/\t/g, ' '); + + var i = lines.length - 1; + if (lines[i].length + chunk.length > stop) { + lines[i] = lines[i].replace(/\s+$/, ''); + + chunk.split(/\n/).forEach(function (c) { + lines.push( + new Array(start + 1).join(' ') + + c.replace(/^\s+/, '') + ); + }); + } + else if (chunk.match(/\n/)) { + var xs = chunk.split(/\n/); + lines[i] += xs.shift(); + xs.forEach(function (c) { + lines.push( + new Array(start + 1).join(' ') + + c.replace(/^\s+/, '') + ); + }); + } + else { + lines[i] += chunk; + } + + return lines; + }, [ new Array(start + 1).join(' ') ]).join('\n'); + }; +}; + +wordwrap.soft = wordwrap; + +wordwrap.hard = function (start, stop) { + return wordwrap(start, stop, { mode : 'hard' }); +}; diff --git a/bin/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/package.json b/bin/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/package.json new file mode 100644 index 00000000..3570cca9 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/package.json @@ -0,0 +1,47 @@ +{ + "name": "wordwrap", + "description": "Wrap those words. Show them at what columns to start and stop.", + "version": "0.0.2", + "repository": { + "type": "git", + "url": "git://github.com/substack/node-wordwrap.git" + }, + "main": "./index.js", + "keywords": [ + "word", + "wrap", + "rule", + "format", + "column" + ], + "directories": { + "lib": ".", + "example": "example", + "test": "test" + }, + "scripts": { + "test": "expresso" + }, + "devDependencies": { + "expresso": "=0.7.x" + }, + "engines": { + "node": ">=0.4.0" + }, + "license": "MIT/X11", + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "readme": "wordwrap\n========\n\nWrap your words.\n\nexample\n=======\n\nmade out of meat\n----------------\n\nmeat.js\n\n var wrap = require('wordwrap')(15);\n console.log(wrap('You and your whole family are made out of meat.'));\n\noutput:\n\n You and your\n whole family\n are made out\n of meat.\n\ncentered\n--------\n\ncenter.js\n\n var wrap = require('wordwrap')(20, 60);\n console.log(wrap(\n 'At long last the struggle and tumult was over.'\n + ' The machines had finally cast off their oppressors'\n + ' and were finally free to roam the cosmos.'\n + '\\n'\n + 'Free of purpose, free of obligation.'\n + ' Just drifting through emptiness.'\n + ' The sun was just another point of light.'\n ));\n\noutput:\n\n At long last the struggle and tumult\n was over. The machines had finally cast\n off their oppressors and were finally\n free to roam the cosmos.\n Free of purpose, free of obligation.\n Just drifting through emptiness. The\n sun was just another point of light.\n\nmethods\n=======\n\nvar wrap = require('wordwrap');\n\nwrap(stop), wrap(start, stop, params={mode:\"soft\"})\n---------------------------------------------------\n\nReturns a function that takes a string and returns a new string.\n\nPad out lines with spaces out to column `start` and then wrap until column\n`stop`. If a word is longer than `stop - start` characters it will overflow.\n\nIn \"soft\" mode, split chunks by `/(\\S+\\s+/` and don't break up chunks which are\nlonger than `stop - start`, in \"hard\" mode, split chunks with `/\\b/` and break\nup chunks longer than `stop - start`.\n\nwrap.hard(start, stop)\n----------------------\n\nLike `wrap()` but with `params.mode = \"hard\"`.\n", + "readmeFilename": "README.markdown", + "bugs": { + "url": "https://github.com/substack/node-wordwrap/issues" + }, + "homepage": "https://github.com/substack/node-wordwrap", + "_id": "wordwrap@0.0.2", + "_shasum": "b79669bb42ecb409f83d583cad52ca17eaa1643f", + "_from": "wordwrap@~0.0.2", + "_resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz" +} diff --git a/bin/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/test/break.js b/bin/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/test/break.js new file mode 100644 index 00000000..749292ec --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/test/break.js @@ -0,0 +1,30 @@ +var assert = require('assert'); +var wordwrap = require('../'); + +exports.hard = function () { + var s = 'Assert from {"type":"equal","ok":false,"found":1,"wanted":2,' + + '"stack":[],"id":"b7ddcd4c409de8799542a74d1a04689b",' + + '"browser":"chrome/6.0"}' + ; + var s_ = wordwrap.hard(80)(s); + + var lines = s_.split('\n'); + assert.equal(lines.length, 2); + assert.ok(lines[0].length < 80); + assert.ok(lines[1].length < 80); + + assert.equal(s, s_.replace(/\n/g, '')); +}; + +exports.break = function () { + var s = new Array(55+1).join('a'); + var s_ = wordwrap.hard(20)(s); + + var lines = s_.split('\n'); + assert.equal(lines.length, 3); + assert.ok(lines[0].length === 20); + assert.ok(lines[1].length === 20); + assert.ok(lines[2].length === 15); + + assert.equal(s, s_.replace(/\n/g, '')); +}; diff --git a/bin/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/test/idleness.txt b/bin/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/test/idleness.txt new file mode 100644 index 00000000..aa3f4907 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/test/idleness.txt @@ -0,0 +1,63 @@ +In Praise of Idleness + +By Bertrand Russell + +[1932] + +Like most of my generation, I was brought up on the saying: 'Satan finds some mischief for idle hands to do.' Being a highly virtuous child, I believed all that I was told, and acquired a conscience which has kept me working hard down to the present moment. But although my conscience has controlled my actions, my opinions have undergone a revolution. I think that there is far too much work done in the world, that immense harm is caused by the belief that work is virtuous, and that what needs to be preached in modern industrial countries is quite different from what always has been preached. Everyone knows the story of the traveler in Naples who saw twelve beggars lying in the sun (it was before the days of Mussolini), and offered a lira to the laziest of them. Eleven of them jumped up to claim it, so he gave it to the twelfth. this traveler was on the right lines. But in countries which do not enjoy Mediterranean sunshine idleness is more difficult, and a great public propaganda will be required to inaugurate it. I hope that, after reading the following pages, the leaders of the YMCA will start a campaign to induce good young men to do nothing. If so, I shall not have lived in vain. + +Before advancing my own arguments for laziness, I must dispose of one which I cannot accept. Whenever a person who already has enough to live on proposes to engage in some everyday kind of job, such as school-teaching or typing, he or she is told that such conduct takes the bread out of other people's mouths, and is therefore wicked. If this argument were valid, it would only be necessary for us all to be idle in order that we should all have our mouths full of bread. What people who say such things forget is that what a man earns he usually spends, and in spending he gives employment. As long as a man spends his income, he puts just as much bread into people's mouths in spending as he takes out of other people's mouths in earning. The real villain, from this point of view, is the man who saves. If he merely puts his savings in a stocking, like the proverbial French peasant, it is obvious that they do not give employment. If he invests his savings, the matter is less obvious, and different cases arise. + +One of the commonest things to do with savings is to lend them to some Government. In view of the fact that the bulk of the public expenditure of most civilized Governments consists in payment for past wars or preparation for future wars, the man who lends his money to a Government is in the same position as the bad men in Shakespeare who hire murderers. The net result of the man's economical habits is to increase the armed forces of the State to which he lends his savings. Obviously it would be better if he spent the money, even if he spent it in drink or gambling. + +But, I shall be told, the case is quite different when savings are invested in industrial enterprises. When such enterprises succeed, and produce something useful, this may be conceded. In these days, however, no one will deny that most enterprises fail. That means that a large amount of human labor, which might have been devoted to producing something that could be enjoyed, was expended on producing machines which, when produced, lay idle and did no good to anyone. The man who invests his savings in a concern that goes bankrupt is therefore injuring others as well as himself. If he spent his money, say, in giving parties for his friends, they (we may hope) would get pleasure, and so would all those upon whom he spent money, such as the butcher, the baker, and the bootlegger. But if he spends it (let us say) upon laying down rails for surface card in some place where surface cars turn out not to be wanted, he has diverted a mass of labor into channels where it gives pleasure to no one. Nevertheless, when he becomes poor through failure of his investment he will be regarded as a victim of undeserved misfortune, whereas the gay spendthrift, who has spent his money philanthropically, will be despised as a fool and a frivolous person. + +All this is only preliminary. I want to say, in all seriousness, that a great deal of harm is being done in the modern world by belief in the virtuousness of work, and that the road to happiness and prosperity lies in an organized diminution of work. + +First of all: what is work? Work is of two kinds: first, altering the position of matter at or near the earth's surface relatively to other such matter; second, telling other people to do so. The first kind is unpleasant and ill paid; the second is pleasant and highly paid. The second kind is capable of indefinite extension: there are not only those who give orders, but those who give advice as to what orders should be given. Usually two opposite kinds of advice are given simultaneously by two organized bodies of men; this is called politics. The skill required for this kind of work is not knowledge of the subjects as to which advice is given, but knowledge of the art of persuasive speaking and writing, i.e. of advertising. + +Throughout Europe, though not in America, there is a third class of men, more respected than either of the classes of workers. There are men who, through ownership of land, are able to make others pay for the privilege of being allowed to exist and to work. These landowners are idle, and I might therefore be expected to praise them. Unfortunately, their idleness is only rendered possible by the industry of others; indeed their desire for comfortable idleness is historically the source of the whole gospel of work. The last thing they have ever wished is that others should follow their example. + +From the beginning of civilization until the Industrial Revolution, a man could, as a rule, produce by hard work little more than was required for the subsistence of himself and his family, although his wife worked at least as hard as he did, and his children added their labor as soon as they were old enough to do so. The small surplus above bare necessaries was not left to those who produced it, but was appropriated by warriors and priests. In times of famine there was no surplus; the warriors and priests, however, still secured as much as at other times, with the result that many of the workers died of hunger. This system persisted in Russia until 1917 [1], and still persists in the East; in England, in spite of the Industrial Revolution, it remained in full force throughout the Napoleonic wars, and until a hundred years ago, when the new class of manufacturers acquired power. In America, the system came to an end with the Revolution, except in the South, where it persisted until the Civil War. A system which lasted so long and ended so recently has naturally left a profound impress upon men's thoughts and opinions. Much that we take for granted about the desirability of work is derived from this system, and, being pre-industrial, is not adapted to the modern world. Modern technique has made it possible for leisure, within limits, to be not the prerogative of small privileged classes, but a right evenly distributed throughout the community. The morality of work is the morality of slaves, and the modern world has no need of slavery. + +It is obvious that, in primitive communities, peasants, left to themselves, would not have parted with the slender surplus upon which the warriors and priests subsisted, but would have either produced less or consumed more. At first, sheer force compelled them to produce and part with the surplus. Gradually, however, it was found possible to induce many of them to accept an ethic according to which it was their duty to work hard, although part of their work went to support others in idleness. By this means the amount of compulsion required was lessened, and the expenses of government were diminished. To this day, 99 per cent of British wage-earners would be genuinely shocked if it were proposed that the King should not have a larger income than a working man. The conception of duty, speaking historically, has been a means used by the holders of power to induce others to live for the interests of their masters rather than for their own. Of course the holders of power conceal this fact from themselves by managing to believe that their interests are identical with the larger interests of humanity. Sometimes this is true; Athenian slave-owners, for instance, employed part of their leisure in making a permanent contribution to civilization which would have been impossible under a just economic system. Leisure is essential to civilization, and in former times leisure for the few was only rendered possible by the labors of the many. But their labors were valuable, not because work is good, but because leisure is good. And with modern technique it would be possible to distribute leisure justly without injury to civilization. + +Modern technique has made it possible to diminish enormously the amount of labor required to secure the necessaries of life for everyone. This was made obvious during the war. At that time all the men in the armed forces, and all the men and women engaged in the production of munitions, all the men and women engaged in spying, war propaganda, or Government offices connected with the war, were withdrawn from productive occupations. In spite of this, the general level of well-being among unskilled wage-earners on the side of the Allies was higher than before or since. The significance of this fact was concealed by finance: borrowing made it appear as if the future was nourishing the present. But that, of course, would have been impossible; a man cannot eat a loaf of bread that does not yet exist. The war showed conclusively that, by the scientific organization of production, it is possible to keep modern populations in fair comfort on a small part of the working capacity of the modern world. If, at the end of the war, the scientific organization, which had been created in order to liberate men for fighting and munition work, had been preserved, and the hours of the week had been cut down to four, all would have been well. Instead of that the old chaos was restored, those whose work was demanded were made to work long hours, and the rest were left to starve as unemployed. Why? Because work is a duty, and a man should not receive wages in proportion to what he has produced, but in proportion to his virtue as exemplified by his industry. + +This is the morality of the Slave State, applied in circumstances totally unlike those in which it arose. No wonder the result has been disastrous. Let us take an illustration. Suppose that, at a given moment, a certain number of people are engaged in the manufacture of pins. They make as many pins as the world needs, working (say) eight hours a day. Someone makes an invention by which the same number of men can make twice as many pins: pins are already so cheap that hardly any more will be bought at a lower price. In a sensible world, everybody concerned in the manufacturing of pins would take to working four hours instead of eight, and everything else would go on as before. But in the actual world this would be thought demoralizing. The men still work eight hours, there are too many pins, some employers go bankrupt, and half the men previously concerned in making pins are thrown out of work. There is, in the end, just as much leisure as on the other plan, but half the men are totally idle while half are still overworked. In this way, it is insured that the unavoidable leisure shall cause misery all round instead of being a universal source of happiness. Can anything more insane be imagined? + +The idea that the poor should have leisure has always been shocking to the rich. In England, in the early nineteenth century, fifteen hours was the ordinary day's work for a man; children sometimes did as much, and very commonly did twelve hours a day. When meddlesome busybodies suggested that perhaps these hours were rather long, they were told that work kept adults from drink and children from mischief. When I was a child, shortly after urban working men had acquired the vote, certain public holidays were established by law, to the great indignation of the upper classes. I remember hearing an old Duchess say: 'What do the poor want with holidays? They ought to work.' People nowadays are less frank, but the sentiment persists, and is the source of much of our economic confusion. + +Let us, for a moment, consider the ethics of work frankly, without superstition. Every human being, of necessity, consumes, in the course of his life, a certain amount of the produce of human labor. Assuming, as we may, that labor is on the whole disagreeable, it is unjust that a man should consume more than he produces. Of course he may provide services rather than commodities, like a medical man, for example; but he should provide something in return for his board and lodging. to this extent, the duty of work must be admitted, but to this extent only. + +I shall not dwell upon the fact that, in all modern societies outside the USSR, many people escape even this minimum amount of work, namely all those who inherit money and all those who marry money. I do not think the fact that these people are allowed to be idle is nearly so harmful as the fact that wage-earners are expected to overwork or starve. + +If the ordinary wage-earner worked four hours a day, there would be enough for everybody and no unemployment -- assuming a certain very moderate amount of sensible organization. This idea shocks the well-to-do, because they are convinced that the poor would not know how to use so much leisure. In America men often work long hours even when they are well off; such men, naturally, are indignant at the idea of leisure for wage-earners, except as the grim punishment of unemployment; in fact, they dislike leisure even for their sons. Oddly enough, while they wish their sons to work so hard as to have no time to be civilized, they do not mind their wives and daughters having no work at all. the snobbish admiration of uselessness, which, in an aristocratic society, extends to both sexes, is, under a plutocracy, confined to women; this, however, does not make it any more in agreement with common sense. + +The wise use of leisure, it must be conceded, is a product of civilization and education. A man who has worked long hours all his life will become bored if he becomes suddenly idle. But without a considerable amount of leisure a man is cut off from many of the best things. There is no longer any reason why the bulk of the population should suffer this deprivation; only a foolish asceticism, usually vicarious, makes us continue to insist on work in excessive quantities now that the need no longer exists. + +In the new creed which controls the government of Russia, while there is much that is very different from the traditional teaching of the West, there are some things that are quite unchanged. The attitude of the governing classes, and especially of those who conduct educational propaganda, on the subject of the dignity of labor, is almost exactly that which the governing classes of the world have always preached to what were called the 'honest poor'. Industry, sobriety, willingness to work long hours for distant advantages, even submissiveness to authority, all these reappear; moreover authority still represents the will of the Ruler of the Universe, Who, however, is now called by a new name, Dialectical Materialism. + +The victory of the proletariat in Russia has some points in common with the victory of the feminists in some other countries. For ages, men had conceded the superior saintliness of women, and had consoled women for their inferiority by maintaining that saintliness is more desirable than power. At last the feminists decided that they would have both, since the pioneers among them believed all that the men had told them about the desirability of virtue, but not what they had told them about the worthlessness of political power. A similar thing has happened in Russia as regards manual work. For ages, the rich and their sycophants have written in praise of 'honest toil', have praised the simple life, have professed a religion which teaches that the poor are much more likely to go to heaven than the rich, and in general have tried to make manual workers believe that there is some special nobility about altering the position of matter in space, just as men tried to make women believe that they derived some special nobility from their sexual enslavement. In Russia, all this teaching about the excellence of manual work has been taken seriously, with the result that the manual worker is more honored than anyone else. What are, in essence, revivalist appeals are made, but not for the old purposes: they are made to secure shock workers for special tasks. Manual work is the ideal which is held before the young, and is the basis of all ethical teaching. + +For the present, possibly, this is all to the good. A large country, full of natural resources, awaits development, and has has to be developed with very little use of credit. In these circumstances, hard work is necessary, and is likely to bring a great reward. But what will happen when the point has been reached where everybody could be comfortable without working long hours? + +In the West, we have various ways of dealing with this problem. We have no attempt at economic justice, so that a large proportion of the total produce goes to a small minority of the population, many of whom do no work at all. Owing to the absence of any central control over production, we produce hosts of things that are not wanted. We keep a large percentage of the working population idle, because we can dispense with their labor by making the others overwork. When all these methods prove inadequate, we have a war: we cause a number of people to manufacture high explosives, and a number of others to explode them, as if we were children who had just discovered fireworks. By a combination of all these devices we manage, though with difficulty, to keep alive the notion that a great deal of severe manual work must be the lot of the average man. + +In Russia, owing to more economic justice and central control over production, the problem will have to be differently solved. the rational solution would be, as soon as the necessaries and elementary comforts can be provided for all, to reduce the hours of labor gradually, allowing a popular vote to decide, at each stage, whether more leisure or more goods were to be preferred. But, having taught the supreme virtue of hard work, it is difficult to see how the authorities can aim at a paradise in which there will be much leisure and little work. It seems more likely that they will find continually fresh schemes, by which present leisure is to be sacrificed to future productivity. I read recently of an ingenious plan put forward by Russian engineers, for making the White Sea and the northern coasts of Siberia warm, by putting a dam across the Kara Sea. An admirable project, but liable to postpone proletarian comfort for a generation, while the nobility of toil is being displayed amid the ice-fields and snowstorms of the Arctic Ocean. This sort of thing, if it happens, will be the result of regarding the virtue of hard work as an end in itself, rather than as a means to a state of affairs in which it is no longer needed. + +The fact is that moving matter about, while a certain amount of it is necessary to our existence, is emphatically not one of the ends of human life. If it were, we should have to consider every navvy superior to Shakespeare. We have been misled in this matter by two causes. One is the necessity of keeping the poor contented, which has led the rich, for thousands of years, to preach the dignity of labor, while taking care themselves to remain undignified in this respect. The other is the new pleasure in mechanism, which makes us delight in the astonishingly clever changes that we can produce on the earth's surface. Neither of these motives makes any great appeal to the actual worker. If you ask him what he thinks the best part of his life, he is not likely to say: 'I enjoy manual work because it makes me feel that I am fulfilling man's noblest task, and because I like to think how much man can transform his planet. It is true that my body demands periods of rest, which I have to fill in as best I may, but I am never so happy as when the morning comes and I can return to the toil from which my contentment springs.' I have never heard working men say this sort of thing. They consider work, as it should be considered, a necessary means to a livelihood, and it is from their leisure that they derive whatever happiness they may enjoy. + +It will be said that, while a little leisure is pleasant, men would not know how to fill their days if they had only four hours of work out of the twenty-four. In so far as this is true in the modern world, it is a condemnation of our civilization; it would not have been true at any earlier period. There was formerly a capacity for light-heartedness and play which has been to some extent inhibited by the cult of efficiency. The modern man thinks that everything ought to be done for the sake of something else, and never for its own sake. Serious-minded persons, for example, are continually condemning the habit of going to the cinema, and telling us that it leads the young into crime. But all the work that goes to producing a cinema is respectable, because it is work, and because it brings a money profit. The notion that the desirable activities are those that bring a profit has made everything topsy-turvy. The butcher who provides you with meat and the baker who provides you with bread are praiseworthy, because they are making money; but when you enjoy the food they have provided, you are merely frivolous, unless you eat only to get strength for your work. Broadly speaking, it is held that getting money is good and spending money is bad. Seeing that they are two sides of one transaction, this is absurd; one might as well maintain that keys are good, but keyholes are bad. Whatever merit there may be in the production of goods must be entirely derivative from the advantage to be obtained by consuming them. The individual, in our society, works for profit; but the social purpose of his work lies in the consumption of what he produces. It is this divorce between the individual and the social purpose of production that makes it so difficult for men to think clearly in a world in which profit-making is the incentive to industry. We think too much of production, and too little of consumption. One result is that we attach too little importance to enjoyment and simple happiness, and that we do not judge production by the pleasure that it gives to the consumer. + +When I suggest that working hours should be reduced to four, I am not meaning to imply that all the remaining time should necessarily be spent in pure frivolity. I mean that four hours' work a day should entitle a man to the necessities and elementary comforts of life, and that the rest of his time should be his to use as he might see fit. It is an essential part of any such social system that education should be carried further than it usually is at present, and should aim, in part, at providing tastes which would enable a man to use leisure intelligently. I am not thinking mainly of the sort of things that would be considered 'highbrow'. Peasant dances have died out except in remote rural areas, but the impulses which caused them to be cultivated must still exist in human nature. The pleasures of urban populations have become mainly passive: seeing cinemas, watching football matches, listening to the radio, and so on. This results from the fact that their active energies are fully taken up with work; if they had more leisure, they would again enjoy pleasures in which they took an active part. + +In the past, there was a small leisure class and a larger working class. The leisure class enjoyed advantages for which there was no basis in social justice; this necessarily made it oppressive, limited its sympathies, and caused it to invent theories by which to justify its privileges. These facts greatly diminished its excellence, but in spite of this drawback it contributed nearly the whole of what we call civilization. It cultivated the arts and discovered the sciences; it wrote the books, invented the philosophies, and refined social relations. Even the liberation of the oppressed has usually been inaugurated from above. Without the leisure class, mankind would never have emerged from barbarism. + +The method of a leisure class without duties was, however, extraordinarily wasteful. None of the members of the class had to be taught to be industrious, and the class as a whole was not exceptionally intelligent. The class might produce one Darwin, but against him had to be set tens of thousands of country gentlemen who never thought of anything more intelligent than fox-hunting and punishing poachers. At present, the universities are supposed to provide, in a more systematic way, what the leisure class provided accidentally and as a by-product. This is a great improvement, but it has certain drawbacks. University life is so different from life in the world at large that men who live in academic milieu tend to be unaware of the preoccupations and problems of ordinary men and women; moreover their ways of expressing themselves are usually such as to rob their opinions of the influence that they ought to have upon the general public. Another disadvantage is that in universities studies are organized, and the man who thinks of some original line of research is likely to be discouraged. Academic institutions, therefore, useful as they are, are not adequate guardians of the interests of civilization in a world where everyone outside their walls is too busy for unutilitarian pursuits. + +In a world where no one is compelled to work more than four hours a day, every person possessed of scientific curiosity will be able to indulge it, and every painter will be able to paint without starving, however excellent his pictures may be. Young writers will not be obliged to draw attention to themselves by sensational pot-boilers, with a view to acquiring the economic independence needed for monumental works, for which, when the time at last comes, they will have lost the taste and capacity. Men who, in their professional work, have become interested in some phase of economics or government, will be able to develop their ideas without the academic detachment that makes the work of university economists often seem lacking in reality. Medical men will have the time to learn about the progress of medicine, teachers will not be exasperatedly struggling to teach by routine methods things which they learnt in their youth, which may, in the interval, have been proved to be untrue. + +Above all, there will be happiness and joy of life, instead of frayed nerves, weariness, and dyspepsia. The work exacted will be enough to make leisure delightful, but not enough to produce exhaustion. Since men will not be tired in their spare time, they will not demand only such amusements as are passive and vapid. At least one per cent will probably devote the time not spent in professional work to pursuits of some public importance, and, since they will not depend upon these pursuits for their livelihood, their originality will be unhampered, and there will be no need to conform to the standards set by elderly pundits. But it is not only in these exceptional cases that the advantages of leisure will appear. Ordinary men and women, having the opportunity of a happy life, will become more kindly and less persecuting and less inclined to view others with suspicion. The taste for war will die out, partly for this reason, and partly because it will involve long and severe work for all. Good nature is, of all moral qualities, the one that the world needs most, and good nature is the result of ease and security, not of a life of arduous struggle. Modern methods of production have given us the possibility of ease and security for all; we have chosen, instead, to have overwork for some and starvation for others. Hitherto we have continued to be as energetic as we were before there were machines; in this we have been foolish, but there is no reason to go on being foolish forever. + +[1] Since then, members of the Communist Party have succeeded to this privilege of the warriors and priests. diff --git a/bin/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/test/wrap.js b/bin/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/test/wrap.js new file mode 100644 index 00000000..0cfb76d1 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/test/wrap.js @@ -0,0 +1,31 @@ +var assert = require('assert'); +var wordwrap = require('wordwrap'); + +var fs = require('fs'); +var idleness = fs.readFileSync(__dirname + '/idleness.txt', 'utf8'); + +exports.stop80 = function () { + var lines = wordwrap(80)(idleness).split(/\n/); + var words = idleness.split(/\s+/); + + lines.forEach(function (line) { + assert.ok(line.length <= 80, 'line > 80 columns'); + var chunks = line.match(/\S/) ? line.split(/\s+/) : []; + assert.deepEqual(chunks, words.splice(0, chunks.length)); + }); +}; + +exports.start20stop60 = function () { + var lines = wordwrap(20, 100)(idleness).split(/\n/); + var words = idleness.split(/\s+/); + + lines.forEach(function (line) { + assert.ok(line.length <= 100, 'line > 100 columns'); + var chunks = line + .split(/\s+/) + .filter(function (x) { return x.match(/\S/) }) + ; + assert.deepEqual(chunks, words.splice(0, chunks.length)); + assert.deepEqual(line.slice(0, 20), new Array(20 + 1).join(' ')); + }); +}; diff --git a/bin/node_modules/uglify-js/node_modules/optimist/package.json b/bin/node_modules/uglify-js/node_modules/optimist/package.json new file mode 100644 index 00000000..e5e5ce0b --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/optimist/package.json @@ -0,0 +1,48 @@ +{ + "name": "optimist", + "version": "0.3.7", + "description": "Light-weight option parsing with an argv hash. No optstrings attached.", + "main": "./index.js", + "dependencies": { + "wordwrap": "~0.0.2" + }, + "devDependencies": { + "hashish": "~0.0.4", + "tap": "~0.4.0" + }, + "scripts": { + "test": "tap ./test/*.js" + }, + "repository": { + "type": "git", + "url": "http://github.com/substack/node-optimist.git" + }, + "keywords": [ + "argument", + "args", + "option", + "parser", + "parsing", + "cli", + "command" + ], + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "license": "MIT/X11", + "engine": { + "node": ">=0.4" + }, + "readme": "optimist\n========\n\nOptimist is a node.js library for option parsing for people who hate option\nparsing. More specifically, this module is for people who like all the --bells\nand -whistlz of program usage but think optstrings are a waste of time.\n\nWith optimist, option parsing doesn't have to suck (as much).\n\n[![build status](https://secure.travis-ci.org/substack/node-optimist.png)](http://travis-ci.org/substack/node-optimist)\n\nexamples\n========\n\nWith Optimist, the options are just a hash! No optstrings attached.\n-------------------------------------------------------------------\n\nxup.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\n\nif (argv.rif - 5 * argv.xup > 7.138) {\n console.log('Buy more riffiwobbles');\n}\nelse {\n console.log('Sell the xupptumblers');\n}\n````\n\n***\n\n $ ./xup.js --rif=55 --xup=9.52\n Buy more riffiwobbles\n \n $ ./xup.js --rif 12 --xup 8.1\n Sell the xupptumblers\n\n![This one's optimistic.](http://substack.net/images/optimistic.png)\n\nBut wait! There's more! You can do short options:\n-------------------------------------------------\n \nshort.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\nconsole.log('(%d,%d)', argv.x, argv.y);\n````\n\n***\n\n $ ./short.js -x 10 -y 21\n (10,21)\n\nAnd booleans, both long and short (and grouped):\n----------------------------------\n\nbool.js:\n\n````javascript\n#!/usr/bin/env node\nvar util = require('util');\nvar argv = require('optimist').argv;\n\nif (argv.s) {\n util.print(argv.fr ? 'Le chat dit: ' : 'The cat says: ');\n}\nconsole.log(\n (argv.fr ? 'miaou' : 'meow') + (argv.p ? '.' : '')\n);\n````\n\n***\n\n $ ./bool.js -s\n The cat says: meow\n \n $ ./bool.js -sp\n The cat says: meow.\n\n $ ./bool.js -sp --fr\n Le chat dit: miaou.\n\nAnd non-hypenated options too! Just use `argv._`!\n-------------------------------------------------\n \nnonopt.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\nconsole.log('(%d,%d)', argv.x, argv.y);\nconsole.log(argv._);\n````\n\n***\n\n $ ./nonopt.js -x 6.82 -y 3.35 moo\n (6.82,3.35)\n [ 'moo' ]\n \n $ ./nonopt.js foo -x 0.54 bar -y 1.12 baz\n (0.54,1.12)\n [ 'foo', 'bar', 'baz' ]\n\nPlus, Optimist comes with .usage() and .demand()!\n-------------------------------------------------\n\ndivide.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .usage('Usage: $0 -x [num] -y [num]')\n .demand(['x','y'])\n .argv;\n\nconsole.log(argv.x / argv.y);\n````\n\n***\n \n $ ./divide.js -x 55 -y 11\n 5\n \n $ node ./divide.js -x 4.91 -z 2.51\n Usage: node ./divide.js -x [num] -y [num]\n\n Options:\n -x [required]\n -y [required]\n\n Missing required arguments: y\n\nEVEN MORE HOLY COW\n------------------\n\ndefault_singles.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .default('x', 10)\n .default('y', 10)\n .argv\n;\nconsole.log(argv.x + argv.y);\n````\n\n***\n\n $ ./default_singles.js -x 5\n 15\n\ndefault_hash.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .default({ x : 10, y : 10 })\n .argv\n;\nconsole.log(argv.x + argv.y);\n````\n\n***\n\n $ ./default_hash.js -y 7\n 17\n\nAnd if you really want to get all descriptive about it...\n---------------------------------------------------------\n\nboolean_single.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .boolean('v')\n .argv\n;\nconsole.dir(argv);\n````\n\n***\n\n $ ./boolean_single.js -v foo bar baz\n true\n [ 'bar', 'baz', 'foo' ]\n\nboolean_double.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .boolean(['x','y','z'])\n .argv\n;\nconsole.dir([ argv.x, argv.y, argv.z ]);\nconsole.dir(argv._);\n````\n\n***\n\n $ ./boolean_double.js -x -z one two three\n [ true, false, true ]\n [ 'one', 'two', 'three' ]\n\nOptimist is here to help...\n---------------------------\n\nYou can describe parameters for help messages and set aliases. Optimist figures\nout how to format a handy help string automatically.\n\nline_count.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .usage('Count the lines in a file.\\nUsage: $0')\n .demand('f')\n .alias('f', 'file')\n .describe('f', 'Load a file')\n .argv\n;\n\nvar fs = require('fs');\nvar s = fs.createReadStream(argv.file);\n\nvar lines = 0;\ns.on('data', function (buf) {\n lines += buf.toString().match(/\\n/g).length;\n});\n\ns.on('end', function () {\n console.log(lines);\n});\n````\n\n***\n\n $ node line_count.js\n Count the lines in a file.\n Usage: node ./line_count.js\n\n Options:\n -f, --file Load a file [required]\n\n Missing required arguments: f\n\n $ node line_count.js --file line_count.js \n 20\n \n $ node line_count.js -f line_count.js \n 20\n\nmethods\n=======\n\nBy itself,\n\n````javascript\nrequire('optimist').argv\n`````\n\nwill use `process.argv` array to construct the `argv` object.\n\nYou can pass in the `process.argv` yourself:\n\n````javascript\nrequire('optimist')([ '-x', '1', '-y', '2' ]).argv\n````\n\nor use .parse() to do the same thing:\n\n````javascript\nrequire('optimist').parse([ '-x', '1', '-y', '2' ])\n````\n\nThe rest of these methods below come in just before the terminating `.argv`.\n\n.alias(key, alias)\n------------------\n\nSet key names as equivalent such that updates to a key will propagate to aliases\nand vice-versa.\n\nOptionally `.alias()` can take an object that maps keys to aliases.\n\n.default(key, value)\n--------------------\n\nSet `argv[key]` to `value` if no option was specified on `process.argv`.\n\nOptionally `.default()` can take an object that maps keys to default values.\n\n.demand(key)\n------------\n\nIf `key` is a string, show the usage information and exit if `key` wasn't\nspecified in `process.argv`.\n\nIf `key` is a number, demand at least as many non-option arguments, which show\nup in `argv._`.\n\nIf `key` is an Array, demand each element.\n\n.describe(key, desc)\n--------------------\n\nDescribe a `key` for the generated usage information.\n\nOptionally `.describe()` can take an object that maps keys to descriptions.\n\n.options(key, opt)\n------------------\n\nInstead of chaining together `.alias().demand().default()`, you can specify\nkeys in `opt` for each of the chainable methods.\n\nFor example:\n\n````javascript\nvar argv = require('optimist')\n .options('f', {\n alias : 'file',\n default : '/etc/passwd',\n })\n .argv\n;\n````\n\nis the same as\n\n````javascript\nvar argv = require('optimist')\n .alias('f', 'file')\n .default('f', '/etc/passwd')\n .argv\n;\n````\n\nOptionally `.options()` can take an object that maps keys to `opt` parameters.\n\n.usage(message)\n---------------\n\nSet a usage message to show which commands to use. Inside `message`, the string\n`$0` will get interpolated to the current script name or node command for the\npresent script similar to how `$0` works in bash or perl.\n\n.check(fn)\n----------\n\nCheck that certain conditions are met in the provided arguments.\n\nIf `fn` throws or returns `false`, show the thrown error, usage information, and\nexit.\n\n.boolean(key)\n-------------\n\nInterpret `key` as a boolean. If a non-flag option follows `key` in\n`process.argv`, that string won't get set as the value of `key`.\n\nIf `key` never shows up as a flag in `process.arguments`, `argv[key]` will be\n`false`.\n\nIf `key` is an Array, interpret all the elements as booleans.\n\n.string(key)\n------------\n\nTell the parser logic not to interpret `key` as a number or boolean.\nThis can be useful if you need to preserve leading zeros in an input.\n\nIf `key` is an Array, interpret all the elements as strings.\n\n.wrap(columns)\n--------------\n\nFormat usage output to wrap at `columns` many columns.\n\n.help()\n-------\n\nReturn the generated usage string.\n\n.showHelp(fn=console.error)\n---------------------------\n\nPrint the usage data using `fn` for printing.\n\n.parse(args)\n------------\n\nParse `args` instead of `process.argv`. Returns the `argv` object.\n\n.argv\n-----\n\nGet the arguments as a plain old object.\n\nArguments without a corresponding flag show up in the `argv._` array.\n\nThe script name or node command is available at `argv.$0` similarly to how `$0`\nworks in bash or perl.\n\nparsing tricks\n==============\n\nstop parsing\n------------\n\nUse `--` to stop parsing flags and stuff the remainder into `argv._`.\n\n $ node examples/reflect.js -a 1 -b 2 -- -c 3 -d 4\n { _: [ '-c', '3', '-d', '4' ],\n '$0': 'node ./examples/reflect.js',\n a: 1,\n b: 2 }\n\nnegate fields\n-------------\n\nIf you want to explicity set a field to false instead of just leaving it\nundefined or to override a default you can do `--no-key`.\n\n $ node examples/reflect.js -a --no-b\n { _: [],\n '$0': 'node ./examples/reflect.js',\n a: true,\n b: false }\n\nnumbers\n-------\n\nEvery argument that looks like a number (`!isNaN(Number(arg))`) is converted to\none. This way you can just `net.createConnection(argv.port)` and you can add\nnumbers out of `argv` with `+` without having that mean concatenation,\nwhich is super frustrating.\n\nduplicates\n----------\n\nIf you specify a flag multiple times it will get turned into an array containing\nall the values in order.\n\n $ node examples/reflect.js -x 5 -x 8 -x 0\n { _: [],\n '$0': 'node ./examples/reflect.js',\n x: [ 5, 8, 0 ] }\n\ndot notation\n------------\n\nWhen you use dots (`.`s) in argument names, an implicit object path is assumed.\nThis lets you organize arguments into nested objects.\n\n $ node examples/reflect.js --foo.bar.baz=33 --foo.quux=5\n { _: [],\n '$0': 'node ./examples/reflect.js',\n foo: { bar: { baz: 33 }, quux: 5 } }\n\ninstallation\n============\n\nWith [npm](http://github.com/isaacs/npm), just do:\n npm install optimist\n \nor clone this project on github:\n\n git clone http://github.com/substack/node-optimist.git\n\nTo run the tests with [expresso](http://github.com/visionmedia/expresso),\njust do:\n \n expresso\n\ninspired By\n===========\n\nThis module is loosely inspired by Perl's\n[Getopt::Casual](http://search.cpan.org/~photo/Getopt-Casual-0.13.1/Casual.pm).\n", + "readmeFilename": "readme.markdown", + "bugs": { + "url": "https://github.com/substack/node-optimist/issues" + }, + "homepage": "https://github.com/substack/node-optimist", + "_id": "optimist@0.3.7", + "_shasum": "c90941ad59e4273328923074d2cf2e7cbc6ec0d9", + "_from": "optimist@~0.3.5", + "_resolved": "https://registry.npmjs.org/optimist/-/optimist-0.3.7.tgz" +} diff --git a/bin/node_modules/uglify-js/node_modules/optimist/readme.markdown b/bin/node_modules/uglify-js/node_modules/optimist/readme.markdown new file mode 100644 index 00000000..ad9d3fd6 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/optimist/readme.markdown @@ -0,0 +1,487 @@ +optimist +======== + +Optimist is a node.js library for option parsing for people who hate option +parsing. More specifically, this module is for people who like all the --bells +and -whistlz of program usage but think optstrings are a waste of time. + +With optimist, option parsing doesn't have to suck (as much). + +[![build status](https://secure.travis-ci.org/substack/node-optimist.png)](http://travis-ci.org/substack/node-optimist) + +examples +======== + +With Optimist, the options are just a hash! No optstrings attached. +------------------------------------------------------------------- + +xup.js: + +````javascript +#!/usr/bin/env node +var argv = require('optimist').argv; + +if (argv.rif - 5 * argv.xup > 7.138) { + console.log('Buy more riffiwobbles'); +} +else { + console.log('Sell the xupptumblers'); +} +```` + +*** + + $ ./xup.js --rif=55 --xup=9.52 + Buy more riffiwobbles + + $ ./xup.js --rif 12 --xup 8.1 + Sell the xupptumblers + +![This one's optimistic.](http://substack.net/images/optimistic.png) + +But wait! There's more! You can do short options: +------------------------------------------------- + +short.js: + +````javascript +#!/usr/bin/env node +var argv = require('optimist').argv; +console.log('(%d,%d)', argv.x, argv.y); +```` + +*** + + $ ./short.js -x 10 -y 21 + (10,21) + +And booleans, both long and short (and grouped): +---------------------------------- + +bool.js: + +````javascript +#!/usr/bin/env node +var util = require('util'); +var argv = require('optimist').argv; + +if (argv.s) { + util.print(argv.fr ? 'Le chat dit: ' : 'The cat says: '); +} +console.log( + (argv.fr ? 'miaou' : 'meow') + (argv.p ? '.' : '') +); +```` + +*** + + $ ./bool.js -s + The cat says: meow + + $ ./bool.js -sp + The cat says: meow. + + $ ./bool.js -sp --fr + Le chat dit: miaou. + +And non-hypenated options too! Just use `argv._`! +------------------------------------------------- + +nonopt.js: + +````javascript +#!/usr/bin/env node +var argv = require('optimist').argv; +console.log('(%d,%d)', argv.x, argv.y); +console.log(argv._); +```` + +*** + + $ ./nonopt.js -x 6.82 -y 3.35 moo + (6.82,3.35) + [ 'moo' ] + + $ ./nonopt.js foo -x 0.54 bar -y 1.12 baz + (0.54,1.12) + [ 'foo', 'bar', 'baz' ] + +Plus, Optimist comes with .usage() and .demand()! +------------------------------------------------- + +divide.js: + +````javascript +#!/usr/bin/env node +var argv = require('optimist') + .usage('Usage: $0 -x [num] -y [num]') + .demand(['x','y']) + .argv; + +console.log(argv.x / argv.y); +```` + +*** + + $ ./divide.js -x 55 -y 11 + 5 + + $ node ./divide.js -x 4.91 -z 2.51 + Usage: node ./divide.js -x [num] -y [num] + + Options: + -x [required] + -y [required] + + Missing required arguments: y + +EVEN MORE HOLY COW +------------------ + +default_singles.js: + +````javascript +#!/usr/bin/env node +var argv = require('optimist') + .default('x', 10) + .default('y', 10) + .argv +; +console.log(argv.x + argv.y); +```` + +*** + + $ ./default_singles.js -x 5 + 15 + +default_hash.js: + +````javascript +#!/usr/bin/env node +var argv = require('optimist') + .default({ x : 10, y : 10 }) + .argv +; +console.log(argv.x + argv.y); +```` + +*** + + $ ./default_hash.js -y 7 + 17 + +And if you really want to get all descriptive about it... +--------------------------------------------------------- + +boolean_single.js + +````javascript +#!/usr/bin/env node +var argv = require('optimist') + .boolean('v') + .argv +; +console.dir(argv); +```` + +*** + + $ ./boolean_single.js -v foo bar baz + true + [ 'bar', 'baz', 'foo' ] + +boolean_double.js + +````javascript +#!/usr/bin/env node +var argv = require('optimist') + .boolean(['x','y','z']) + .argv +; +console.dir([ argv.x, argv.y, argv.z ]); +console.dir(argv._); +```` + +*** + + $ ./boolean_double.js -x -z one two three + [ true, false, true ] + [ 'one', 'two', 'three' ] + +Optimist is here to help... +--------------------------- + +You can describe parameters for help messages and set aliases. Optimist figures +out how to format a handy help string automatically. + +line_count.js + +````javascript +#!/usr/bin/env node +var argv = require('optimist') + .usage('Count the lines in a file.\nUsage: $0') + .demand('f') + .alias('f', 'file') + .describe('f', 'Load a file') + .argv +; + +var fs = require('fs'); +var s = fs.createReadStream(argv.file); + +var lines = 0; +s.on('data', function (buf) { + lines += buf.toString().match(/\n/g).length; +}); + +s.on('end', function () { + console.log(lines); +}); +```` + +*** + + $ node line_count.js + Count the lines in a file. + Usage: node ./line_count.js + + Options: + -f, --file Load a file [required] + + Missing required arguments: f + + $ node line_count.js --file line_count.js + 20 + + $ node line_count.js -f line_count.js + 20 + +methods +======= + +By itself, + +````javascript +require('optimist').argv +````` + +will use `process.argv` array to construct the `argv` object. + +You can pass in the `process.argv` yourself: + +````javascript +require('optimist')([ '-x', '1', '-y', '2' ]).argv +```` + +or use .parse() to do the same thing: + +````javascript +require('optimist').parse([ '-x', '1', '-y', '2' ]) +```` + +The rest of these methods below come in just before the terminating `.argv`. + +.alias(key, alias) +------------------ + +Set key names as equivalent such that updates to a key will propagate to aliases +and vice-versa. + +Optionally `.alias()` can take an object that maps keys to aliases. + +.default(key, value) +-------------------- + +Set `argv[key]` to `value` if no option was specified on `process.argv`. + +Optionally `.default()` can take an object that maps keys to default values. + +.demand(key) +------------ + +If `key` is a string, show the usage information and exit if `key` wasn't +specified in `process.argv`. + +If `key` is a number, demand at least as many non-option arguments, which show +up in `argv._`. + +If `key` is an Array, demand each element. + +.describe(key, desc) +-------------------- + +Describe a `key` for the generated usage information. + +Optionally `.describe()` can take an object that maps keys to descriptions. + +.options(key, opt) +------------------ + +Instead of chaining together `.alias().demand().default()`, you can specify +keys in `opt` for each of the chainable methods. + +For example: + +````javascript +var argv = require('optimist') + .options('f', { + alias : 'file', + default : '/etc/passwd', + }) + .argv +; +```` + +is the same as + +````javascript +var argv = require('optimist') + .alias('f', 'file') + .default('f', '/etc/passwd') + .argv +; +```` + +Optionally `.options()` can take an object that maps keys to `opt` parameters. + +.usage(message) +--------------- + +Set a usage message to show which commands to use. Inside `message`, the string +`$0` will get interpolated to the current script name or node command for the +present script similar to how `$0` works in bash or perl. + +.check(fn) +---------- + +Check that certain conditions are met in the provided arguments. + +If `fn` throws or returns `false`, show the thrown error, usage information, and +exit. + +.boolean(key) +------------- + +Interpret `key` as a boolean. If a non-flag option follows `key` in +`process.argv`, that string won't get set as the value of `key`. + +If `key` never shows up as a flag in `process.arguments`, `argv[key]` will be +`false`. + +If `key` is an Array, interpret all the elements as booleans. + +.string(key) +------------ + +Tell the parser logic not to interpret `key` as a number or boolean. +This can be useful if you need to preserve leading zeros in an input. + +If `key` is an Array, interpret all the elements as strings. + +.wrap(columns) +-------------- + +Format usage output to wrap at `columns` many columns. + +.help() +------- + +Return the generated usage string. + +.showHelp(fn=console.error) +--------------------------- + +Print the usage data using `fn` for printing. + +.parse(args) +------------ + +Parse `args` instead of `process.argv`. Returns the `argv` object. + +.argv +----- + +Get the arguments as a plain old object. + +Arguments without a corresponding flag show up in the `argv._` array. + +The script name or node command is available at `argv.$0` similarly to how `$0` +works in bash or perl. + +parsing tricks +============== + +stop parsing +------------ + +Use `--` to stop parsing flags and stuff the remainder into `argv._`. + + $ node examples/reflect.js -a 1 -b 2 -- -c 3 -d 4 + { _: [ '-c', '3', '-d', '4' ], + '$0': 'node ./examples/reflect.js', + a: 1, + b: 2 } + +negate fields +------------- + +If you want to explicity set a field to false instead of just leaving it +undefined or to override a default you can do `--no-key`. + + $ node examples/reflect.js -a --no-b + { _: [], + '$0': 'node ./examples/reflect.js', + a: true, + b: false } + +numbers +------- + +Every argument that looks like a number (`!isNaN(Number(arg))`) is converted to +one. This way you can just `net.createConnection(argv.port)` and you can add +numbers out of `argv` with `+` without having that mean concatenation, +which is super frustrating. + +duplicates +---------- + +If you specify a flag multiple times it will get turned into an array containing +all the values in order. + + $ node examples/reflect.js -x 5 -x 8 -x 0 + { _: [], + '$0': 'node ./examples/reflect.js', + x: [ 5, 8, 0 ] } + +dot notation +------------ + +When you use dots (`.`s) in argument names, an implicit object path is assumed. +This lets you organize arguments into nested objects. + + $ node examples/reflect.js --foo.bar.baz=33 --foo.quux=5 + { _: [], + '$0': 'node ./examples/reflect.js', + foo: { bar: { baz: 33 }, quux: 5 } } + +installation +============ + +With [npm](http://github.com/isaacs/npm), just do: + npm install optimist + +or clone this project on github: + + git clone http://github.com/substack/node-optimist.git + +To run the tests with [expresso](http://github.com/visionmedia/expresso), +just do: + + expresso + +inspired By +=========== + +This module is loosely inspired by Perl's +[Getopt::Casual](http://search.cpan.org/~photo/Getopt-Casual-0.13.1/Casual.pm). diff --git a/bin/node_modules/uglify-js/node_modules/optimist/test/_.js b/bin/node_modules/uglify-js/node_modules/optimist/test/_.js new file mode 100644 index 00000000..d9c58b36 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/optimist/test/_.js @@ -0,0 +1,71 @@ +var spawn = require('child_process').spawn; +var test = require('tap').test; + +test('dotSlashEmpty', testCmd('./bin.js', [])); + +test('dotSlashArgs', testCmd('./bin.js', [ 'a', 'b', 'c' ])); + +test('nodeEmpty', testCmd('node bin.js', [])); + +test('nodeArgs', testCmd('node bin.js', [ 'x', 'y', 'z' ])); + +test('whichNodeEmpty', function (t) { + var which = spawn('which', ['node']); + + which.stdout.on('data', function (buf) { + t.test( + testCmd(buf.toString().trim() + ' bin.js', []) + ); + t.end(); + }); + + which.stderr.on('data', function (err) { + assert.error(err); + t.end(); + }); +}); + +test('whichNodeArgs', function (t) { + var which = spawn('which', ['node']); + + which.stdout.on('data', function (buf) { + t.test( + testCmd(buf.toString().trim() + ' bin.js', [ 'q', 'r' ]) + ); + t.end(); + }); + + which.stderr.on('data', function (err) { + t.error(err); + t.end(); + }); +}); + +function testCmd (cmd, args) { + + return function (t) { + var to = setTimeout(function () { + assert.fail('Never got stdout data.') + }, 5000); + + var oldDir = process.cwd(); + process.chdir(__dirname + '/_'); + + var cmds = cmd.split(' '); + + var bin = spawn(cmds[0], cmds.slice(1).concat(args.map(String))); + process.chdir(oldDir); + + bin.stderr.on('data', function (err) { + t.error(err); + t.end(); + }); + + bin.stdout.on('data', function (buf) { + clearTimeout(to); + var _ = JSON.parse(buf.toString()); + t.same(_.map(String), args.map(String)); + t.end(); + }); + }; +} diff --git a/bin/node_modules/uglify-js/node_modules/optimist/test/_/argv.js b/bin/node_modules/uglify-js/node_modules/optimist/test/_/argv.js new file mode 100644 index 00000000..3d096062 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/optimist/test/_/argv.js @@ -0,0 +1,2 @@ +#!/usr/bin/env node +console.log(JSON.stringify(process.argv)); diff --git a/bin/node_modules/uglify-js/node_modules/optimist/test/_/bin.js b/bin/node_modules/uglify-js/node_modules/optimist/test/_/bin.js new file mode 100755 index 00000000..4a18d85f --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/optimist/test/_/bin.js @@ -0,0 +1,3 @@ +#!/usr/bin/env node +var argv = require('../../index').argv +console.log(JSON.stringify(argv._)); diff --git a/bin/node_modules/uglify-js/node_modules/optimist/test/parse.js b/bin/node_modules/uglify-js/node_modules/optimist/test/parse.js new file mode 100644 index 00000000..d320f433 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/optimist/test/parse.js @@ -0,0 +1,446 @@ +var optimist = require('../index'); +var path = require('path'); +var test = require('tap').test; + +var $0 = 'node ./' + path.relative(process.cwd(), __filename); + +test('short boolean', function (t) { + var parse = optimist.parse([ '-b' ]); + t.same(parse, { b : true, _ : [], $0 : $0 }); + t.same(typeof parse.b, 'boolean'); + t.end(); +}); + +test('long boolean', function (t) { + t.same( + optimist.parse([ '--bool' ]), + { bool : true, _ : [], $0 : $0 } + ); + t.end(); +}); + +test('bare', function (t) { + t.same( + optimist.parse([ 'foo', 'bar', 'baz' ]), + { _ : [ 'foo', 'bar', 'baz' ], $0 : $0 } + ); + t.end(); +}); + +test('short group', function (t) { + t.same( + optimist.parse([ '-cats' ]), + { c : true, a : true, t : true, s : true, _ : [], $0 : $0 } + ); + t.end(); +}); + +test('short group next', function (t) { + t.same( + optimist.parse([ '-cats', 'meow' ]), + { c : true, a : true, t : true, s : 'meow', _ : [], $0 : $0 } + ); + t.end(); +}); + +test('short capture', function (t) { + t.same( + optimist.parse([ '-h', 'localhost' ]), + { h : 'localhost', _ : [], $0 : $0 } + ); + t.end(); +}); + +test('short captures', function (t) { + t.same( + optimist.parse([ '-h', 'localhost', '-p', '555' ]), + { h : 'localhost', p : 555, _ : [], $0 : $0 } + ); + t.end(); +}); + +test('long capture sp', function (t) { + t.same( + optimist.parse([ '--pow', 'xixxle' ]), + { pow : 'xixxle', _ : [], $0 : $0 } + ); + t.end(); +}); + +test('long capture eq', function (t) { + t.same( + optimist.parse([ '--pow=xixxle' ]), + { pow : 'xixxle', _ : [], $0 : $0 } + ); + t.end() +}); + +test('long captures sp', function (t) { + t.same( + optimist.parse([ '--host', 'localhost', '--port', '555' ]), + { host : 'localhost', port : 555, _ : [], $0 : $0 } + ); + t.end(); +}); + +test('long captures eq', function (t) { + t.same( + optimist.parse([ '--host=localhost', '--port=555' ]), + { host : 'localhost', port : 555, _ : [], $0 : $0 } + ); + t.end(); +}); + +test('mixed short bool and capture', function (t) { + t.same( + optimist.parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), + { + f : true, p : 555, h : 'localhost', + _ : [ 'script.js' ], $0 : $0, + } + ); + t.end(); +}); + +test('short and long', function (t) { + t.same( + optimist.parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), + { + f : true, p : 555, h : 'localhost', + _ : [ 'script.js' ], $0 : $0, + } + ); + t.end(); +}); + +test('no', function (t) { + t.same( + optimist.parse([ '--no-moo' ]), + { moo : false, _ : [], $0 : $0 } + ); + t.end(); +}); + +test('multi', function (t) { + t.same( + optimist.parse([ '-v', 'a', '-v', 'b', '-v', 'c' ]), + { v : ['a','b','c'], _ : [], $0 : $0 } + ); + t.end(); +}); + +test('comprehensive', function (t) { + t.same( + optimist.parse([ + '--name=meowmers', 'bare', '-cats', 'woo', + '-h', 'awesome', '--multi=quux', + '--key', 'value', + '-b', '--bool', '--no-meep', '--multi=baz', + '--', '--not-a-flag', 'eek' + ]), + { + c : true, + a : true, + t : true, + s : 'woo', + h : 'awesome', + b : true, + bool : true, + key : 'value', + multi : [ 'quux', 'baz' ], + meep : false, + name : 'meowmers', + _ : [ 'bare', '--not-a-flag', 'eek' ], + $0 : $0 + } + ); + t.end(); +}); + +test('nums', function (t) { + var argv = optimist.parse([ + '-x', '1234', + '-y', '5.67', + '-z', '1e7', + '-w', '10f', + '--hex', '0xdeadbeef', + '789', + ]); + t.same(argv, { + x : 1234, + y : 5.67, + z : 1e7, + w : '10f', + hex : 0xdeadbeef, + _ : [ 789 ], + $0 : $0 + }); + t.same(typeof argv.x, 'number'); + t.same(typeof argv.y, 'number'); + t.same(typeof argv.z, 'number'); + t.same(typeof argv.w, 'string'); + t.same(typeof argv.hex, 'number'); + t.same(typeof argv._[0], 'number'); + t.end(); +}); + +test('flag boolean', function (t) { + var parse = optimist([ '-t', 'moo' ]).boolean(['t']).argv; + t.same(parse, { t : true, _ : [ 'moo' ], $0 : $0 }); + t.same(typeof parse.t, 'boolean'); + t.end(); +}); + +test('flag boolean value', function (t) { + var parse = optimist(['--verbose', 'false', 'moo', '-t', 'true']) + .boolean(['t', 'verbose']).default('verbose', true).argv; + + t.same(parse, { + verbose: false, + t: true, + _: ['moo'], + $0 : $0 + }); + + t.same(typeof parse.verbose, 'boolean'); + t.same(typeof parse.t, 'boolean'); + t.end(); +}); + +test('flag boolean default false', function (t) { + var parse = optimist(['moo']) + .boolean(['t', 'verbose']) + .default('verbose', false) + .default('t', false).argv; + + t.same(parse, { + verbose: false, + t: false, + _: ['moo'], + $0 : $0 + }); + + t.same(typeof parse.verbose, 'boolean'); + t.same(typeof parse.t, 'boolean'); + t.end(); + +}); + +test('boolean groups', function (t) { + var parse = optimist([ '-x', '-z', 'one', 'two', 'three' ]) + .boolean(['x','y','z']).argv; + + t.same(parse, { + x : true, + y : false, + z : true, + _ : [ 'one', 'two', 'three' ], + $0 : $0 + }); + + t.same(typeof parse.x, 'boolean'); + t.same(typeof parse.y, 'boolean'); + t.same(typeof parse.z, 'boolean'); + t.end(); +}); + +test('newlines in params' , function (t) { + var args = optimist.parse([ '-s', "X\nX" ]) + t.same(args, { _ : [], s : "X\nX", $0 : $0 }); + + // reproduce in bash: + // VALUE="new + // line" + // node program.js --s="$VALUE" + args = optimist.parse([ "--s=X\nX" ]) + t.same(args, { _ : [], s : "X\nX", $0 : $0 }); + t.end(); +}); + +test('strings' , function (t) { + var s = optimist([ '-s', '0001234' ]).string('s').argv.s; + t.same(s, '0001234'); + t.same(typeof s, 'string'); + + var x = optimist([ '-x', '56' ]).string('x').argv.x; + t.same(x, '56'); + t.same(typeof x, 'string'); + t.end(); +}); + +test('stringArgs', function (t) { + var s = optimist([ ' ', ' ' ]).string('_').argv._; + t.same(s.length, 2); + t.same(typeof s[0], 'string'); + t.same(s[0], ' '); + t.same(typeof s[1], 'string'); + t.same(s[1], ' '); + t.end(); +}); + +test('slashBreak', function (t) { + t.same( + optimist.parse([ '-I/foo/bar/baz' ]), + { I : '/foo/bar/baz', _ : [], $0 : $0 } + ); + t.same( + optimist.parse([ '-xyz/foo/bar/baz' ]), + { x : true, y : true, z : '/foo/bar/baz', _ : [], $0 : $0 } + ); + t.end(); +}); + +test('alias', function (t) { + var argv = optimist([ '-f', '11', '--zoom', '55' ]) + .alias('z', 'zoom') + .argv + ; + t.equal(argv.zoom, 55); + t.equal(argv.z, argv.zoom); + t.equal(argv.f, 11); + t.end(); +}); + +test('multiAlias', function (t) { + var argv = optimist([ '-f', '11', '--zoom', '55' ]) + .alias('z', [ 'zm', 'zoom' ]) + .argv + ; + t.equal(argv.zoom, 55); + t.equal(argv.z, argv.zoom); + t.equal(argv.z, argv.zm); + t.equal(argv.f, 11); + t.end(); +}); + +test('boolean default true', function (t) { + var argv = optimist.options({ + sometrue: { + boolean: true, + default: true + } + }).argv; + + t.equal(argv.sometrue, true); + t.end(); +}); + +test('boolean default false', function (t) { + var argv = optimist.options({ + somefalse: { + boolean: true, + default: false + } + }).argv; + + t.equal(argv.somefalse, false); + t.end(); +}); + +test('nested dotted objects', function (t) { + var argv = optimist([ + '--foo.bar', '3', '--foo.baz', '4', + '--foo.quux.quibble', '5', '--foo.quux.o_O', + '--beep.boop' + ]).argv; + + t.same(argv.foo, { + bar : 3, + baz : 4, + quux : { + quibble : 5, + o_O : true + }, + }); + t.same(argv.beep, { boop : true }); + t.end(); +}); + +test('boolean and alias with chainable api', function (t) { + var aliased = [ '-h', 'derp' ]; + var regular = [ '--herp', 'derp' ]; + var opts = { + herp: { alias: 'h', boolean: true } + }; + var aliasedArgv = optimist(aliased) + .boolean('herp') + .alias('h', 'herp') + .argv; + var propertyArgv = optimist(regular) + .boolean('herp') + .alias('h', 'herp') + .argv; + var expected = { + herp: true, + h: true, + '_': [ 'derp' ], + '$0': $0, + }; + + t.same(aliasedArgv, expected); + t.same(propertyArgv, expected); + t.end(); +}); + +test('boolean and alias with options hash', function (t) { + var aliased = [ '-h', 'derp' ]; + var regular = [ '--herp', 'derp' ]; + var opts = { + herp: { alias: 'h', boolean: true } + }; + var aliasedArgv = optimist(aliased) + .options(opts) + .argv; + var propertyArgv = optimist(regular).options(opts).argv; + var expected = { + herp: true, + h: true, + '_': [ 'derp' ], + '$0': $0, + }; + + t.same(aliasedArgv, expected); + t.same(propertyArgv, expected); + + t.end(); +}); + +test('boolean and alias using explicit true', function (t) { + var aliased = [ '-h', 'true' ]; + var regular = [ '--herp', 'true' ]; + var opts = { + herp: { alias: 'h', boolean: true } + }; + var aliasedArgv = optimist(aliased) + .boolean('h') + .alias('h', 'herp') + .argv; + var propertyArgv = optimist(regular) + .boolean('h') + .alias('h', 'herp') + .argv; + var expected = { + herp: true, + h: true, + '_': [ ], + '$0': $0, + }; + + t.same(aliasedArgv, expected); + t.same(propertyArgv, expected); + t.end(); +}); + +// regression, see https://github.com/substack/node-optimist/issues/71 +test('boolean and --x=true', function(t) { + var parsed = optimist(['--boool', '--other=true']).boolean('boool').argv; + + t.same(parsed.boool, true); + t.same(parsed.other, 'true'); + + parsed = optimist(['--boool', '--other=false']).boolean('boool').argv; + + t.same(parsed.boool, true); + t.same(parsed.other, 'false'); + t.end(); +}); diff --git a/bin/node_modules/uglify-js/node_modules/optimist/test/usage.js b/bin/node_modules/uglify-js/node_modules/optimist/test/usage.js new file mode 100644 index 00000000..300454c1 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/optimist/test/usage.js @@ -0,0 +1,292 @@ +var Hash = require('hashish'); +var optimist = require('../index'); +var test = require('tap').test; + +test('usageFail', function (t) { + var r = checkUsage(function () { + return optimist('-x 10 -z 20'.split(' ')) + .usage('Usage: $0 -x NUM -y NUM') + .demand(['x','y']) + .argv; + }); + t.same( + r.result, + { x : 10, z : 20, _ : [], $0 : './usage' } + ); + + t.same( + r.errors.join('\n').split(/\n+/), + [ + 'Usage: ./usage -x NUM -y NUM', + 'Options:', + ' -x [required]', + ' -y [required]', + 'Missing required arguments: y', + ] + ); + t.same(r.logs, []); + t.ok(r.exit); + t.end(); +}); + + +test('usagePass', function (t) { + var r = checkUsage(function () { + return optimist('-x 10 -y 20'.split(' ')) + .usage('Usage: $0 -x NUM -y NUM') + .demand(['x','y']) + .argv; + }); + t.same(r, { + result : { x : 10, y : 20, _ : [], $0 : './usage' }, + errors : [], + logs : [], + exit : false, + }); + t.end(); +}); + +test('checkPass', function (t) { + var r = checkUsage(function () { + return optimist('-x 10 -y 20'.split(' ')) + .usage('Usage: $0 -x NUM -y NUM') + .check(function (argv) { + if (!('x' in argv)) throw 'You forgot about -x'; + if (!('y' in argv)) throw 'You forgot about -y'; + }) + .argv; + }); + t.same(r, { + result : { x : 10, y : 20, _ : [], $0 : './usage' }, + errors : [], + logs : [], + exit : false, + }); + t.end(); +}); + +test('checkFail', function (t) { + var r = checkUsage(function () { + return optimist('-x 10 -z 20'.split(' ')) + .usage('Usage: $0 -x NUM -y NUM') + .check(function (argv) { + if (!('x' in argv)) throw 'You forgot about -x'; + if (!('y' in argv)) throw 'You forgot about -y'; + }) + .argv; + }); + + t.same( + r.result, + { x : 10, z : 20, _ : [], $0 : './usage' } + ); + + t.same( + r.errors.join('\n').split(/\n+/), + [ + 'Usage: ./usage -x NUM -y NUM', + 'You forgot about -y' + ] + ); + + t.same(r.logs, []); + t.ok(r.exit); + t.end(); +}); + +test('checkCondPass', function (t) { + function checker (argv) { + return 'x' in argv && 'y' in argv; + } + + var r = checkUsage(function () { + return optimist('-x 10 -y 20'.split(' ')) + .usage('Usage: $0 -x NUM -y NUM') + .check(checker) + .argv; + }); + t.same(r, { + result : { x : 10, y : 20, _ : [], $0 : './usage' }, + errors : [], + logs : [], + exit : false, + }); + t.end(); +}); + +test('checkCondFail', function (t) { + function checker (argv) { + return 'x' in argv && 'y' in argv; + } + + var r = checkUsage(function () { + return optimist('-x 10 -z 20'.split(' ')) + .usage('Usage: $0 -x NUM -y NUM') + .check(checker) + .argv; + }); + + t.same( + r.result, + { x : 10, z : 20, _ : [], $0 : './usage' } + ); + + t.same( + r.errors.join('\n').split(/\n+/).join('\n'), + 'Usage: ./usage -x NUM -y NUM\n' + + 'Argument check failed: ' + checker.toString() + ); + + t.same(r.logs, []); + t.ok(r.exit); + t.end(); +}); + +test('countPass', function (t) { + var r = checkUsage(function () { + return optimist('1 2 3 --moo'.split(' ')) + .usage('Usage: $0 [x] [y] [z] {OPTIONS}') + .demand(3) + .argv; + }); + t.same(r, { + result : { _ : [ '1', '2', '3' ], moo : true, $0 : './usage' }, + errors : [], + logs : [], + exit : false, + }); + t.end(); +}); + +test('countFail', function (t) { + var r = checkUsage(function () { + return optimist('1 2 --moo'.split(' ')) + .usage('Usage: $0 [x] [y] [z] {OPTIONS}') + .demand(3) + .argv; + }); + t.same( + r.result, + { _ : [ '1', '2' ], moo : true, $0 : './usage' } + ); + + t.same( + r.errors.join('\n').split(/\n+/), + [ + 'Usage: ./usage [x] [y] [z] {OPTIONS}', + 'Not enough non-option arguments: got 2, need at least 3', + ] + ); + + t.same(r.logs, []); + t.ok(r.exit); + t.end(); +}); + +test('defaultSingles', function (t) { + var r = checkUsage(function () { + return optimist('--foo 50 --baz 70 --powsy'.split(' ')) + .default('foo', 5) + .default('bar', 6) + .default('baz', 7) + .argv + ; + }); + t.same(r.result, { + foo : '50', + bar : 6, + baz : '70', + powsy : true, + _ : [], + $0 : './usage', + }); + t.end(); +}); + +test('defaultAliases', function (t) { + var r = checkUsage(function () { + return optimist('') + .alias('f', 'foo') + .default('f', 5) + .argv + ; + }); + t.same(r.result, { + f : '5', + foo : '5', + _ : [], + $0 : './usage', + }); + t.end(); +}); + +test('defaultHash', function (t) { + var r = checkUsage(function () { + return optimist('--foo 50 --baz 70'.split(' ')) + .default({ foo : 10, bar : 20, quux : 30 }) + .argv + ; + }); + t.same(r.result, { + _ : [], + $0 : './usage', + foo : 50, + baz : 70, + bar : 20, + quux : 30, + }); + t.end(); +}); + +test('rebase', function (t) { + t.equal( + optimist.rebase('/home/substack', '/home/substack/foo/bar/baz'), + './foo/bar/baz' + ); + t.equal( + optimist.rebase('/home/substack/foo/bar/baz', '/home/substack'), + '../../..' + ); + t.equal( + optimist.rebase('/home/substack/foo', '/home/substack/pow/zoom.txt'), + '../pow/zoom.txt' + ); + t.end(); +}); + +function checkUsage (f) { + + var exit = false; + + process._exit = process.exit; + process._env = process.env; + process._argv = process.argv; + + process.exit = function (t) { exit = true }; + process.env = Hash.merge(process.env, { _ : 'node' }); + process.argv = [ './usage' ]; + + var errors = []; + var logs = []; + + console._error = console.error; + console.error = function (msg) { errors.push(msg) }; + console._log = console.log; + console.log = function (msg) { logs.push(msg) }; + + var result = f(); + + process.exit = process._exit; + process.env = process._env; + process.argv = process._argv; + + console.error = console._error; + console.log = console._log; + + return { + errors : errors, + logs : logs, + exit : exit, + result : result, + }; +}; diff --git a/bin/node_modules/uglify-js/node_modules/source-map/.npmignore b/bin/node_modules/uglify-js/node_modules/source-map/.npmignore new file mode 100644 index 00000000..3dddf3f6 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/source-map/.npmignore @@ -0,0 +1,2 @@ +dist/* +node_modules/* diff --git a/bin/node_modules/uglify-js/node_modules/source-map/.tern-port b/bin/node_modules/uglify-js/node_modules/source-map/.tern-port new file mode 100644 index 00000000..79d76a04 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/source-map/.tern-port @@ -0,0 +1 @@ +55494 \ No newline at end of file diff --git a/bin/node_modules/uglify-js/node_modules/source-map/.travis.yml b/bin/node_modules/uglify-js/node_modules/source-map/.travis.yml new file mode 100644 index 00000000..ddc9c4f9 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/source-map/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 0.8 + - "0.10" \ No newline at end of file diff --git a/bin/node_modules/uglify-js/node_modules/source-map/CHANGELOG.md b/bin/node_modules/uglify-js/node_modules/source-map/CHANGELOG.md new file mode 100644 index 00000000..240d54ab --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/source-map/CHANGELOG.md @@ -0,0 +1,137 @@ +# Change Log + +## 0.1.34 + +* Make `SourceNode` work with windows style ("\r\n") newlines. Issue #103. + +* Fix bug involving source contents and the + `SourceMapGenerator.prototype.applySourceMap`. Issue #100. + +## 0.1.33 + +* Fix some edge cases surrounding path joining and URL resolution. + +* Add a third parameter for relative path to + `SourceMapGenerator.prototype.applySourceMap`. + +* Fix issues with mappings and EOLs. + +## 0.1.32 + +* Fixed a bug where SourceMapConsumer couldn't handle negative relative columns + (issue 92). + +* Fixed test runner to actually report number of failed tests as its process + exit code. + +* Fixed a typo when reporting bad mappings (issue 87). + +## 0.1.31 + +* Delay parsing the mappings in SourceMapConsumer until queried for a source + location. + +* Support Sass source maps (which at the time of writing deviate from the spec + in small ways) in SourceMapConsumer. + +## 0.1.30 + +* Do not join source root with a source, when the source is a data URI. + +* Extend the test runner to allow running single specific test files at a time. + +* Performance improvements in `SourceNode.prototype.walk` and + `SourceMapConsumer.prototype.eachMapping`. + +* Source map browser builds will now work inside Workers. + +* Better error messages when attempting to add an invalid mapping to a + `SourceMapGenerator`. + +## 0.1.29 + +* Allow duplicate entries in the `names` and `sources` arrays of source maps + (usually from TypeScript) we are parsing. Fixes github issue 72. + +## 0.1.28 + +* Skip duplicate mappings when creating source maps from SourceNode; github + issue 75. + +## 0.1.27 + +* Don't throw an error when the `file` property is missing in SourceMapConsumer, + we don't use it anyway. + +## 0.1.26 + +* Fix SourceNode.fromStringWithSourceMap for empty maps. Fixes github issue 70. + +## 0.1.25 + +* Make compatible with browserify + +## 0.1.24 + +* Fix issue with absolute paths and `file://` URIs. See + https://bugzilla.mozilla.org/show_bug.cgi?id=885597 + +## 0.1.23 + +* Fix issue with absolute paths and sourcesContent, github issue 64. + +## 0.1.22 + +* Ignore duplicate mappings in SourceMapGenerator. Fixes github issue 21. + +## 0.1.21 + +* Fixed handling of sources that start with a slash so that they are relative to + the source root's host. + +## 0.1.20 + +* Fixed github issue #43: absolute URLs aren't joined with the source root + anymore. + +## 0.1.19 + +* Using Travis CI to run tests. + +## 0.1.18 + +* Fixed a bug in the handling of sourceRoot. + +## 0.1.17 + +* Added SourceNode.fromStringWithSourceMap. + +## 0.1.16 + +* Added missing documentation. + +* Fixed the generating of empty mappings in SourceNode. + +## 0.1.15 + +* Added SourceMapGenerator.applySourceMap. + +## 0.1.14 + +* The sourceRoot is now handled consistently. + +## 0.1.13 + +* Added SourceMapGenerator.fromSourceMap. + +## 0.1.12 + +* SourceNode now generates empty mappings too. + +## 0.1.11 + +* Added name support to SourceNode. + +## 0.1.10 + +* Added sourcesContent support to the customer and generator. diff --git a/bin/node_modules/uglify-js/node_modules/source-map/LICENSE b/bin/node_modules/uglify-js/node_modules/source-map/LICENSE new file mode 100644 index 00000000..ed1b7cf2 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/source-map/LICENSE @@ -0,0 +1,28 @@ + +Copyright (c) 2009-2011, Mozilla Foundation and contributors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the names of the Mozilla Foundation nor the names of project + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/bin/node_modules/uglify-js/node_modules/source-map/Makefile.dryice.js b/bin/node_modules/uglify-js/node_modules/source-map/Makefile.dryice.js new file mode 100644 index 00000000..d6fc26a7 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/source-map/Makefile.dryice.js @@ -0,0 +1,166 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +var path = require('path'); +var fs = require('fs'); +var copy = require('dryice').copy; + +function removeAmdefine(src) { + src = String(src).replace( + /if\s*\(typeof\s*define\s*!==\s*'function'\)\s*{\s*var\s*define\s*=\s*require\('amdefine'\)\(module,\s*require\);\s*}\s*/g, + ''); + src = src.replace( + /\b(define\(.*)('amdefine',?)/gm, + '$1'); + return src; +} +removeAmdefine.onRead = true; + +function makeNonRelative(src) { + return src + .replace(/require\('.\//g, 'require(\'source-map/') + .replace(/\.\.\/\.\.\/lib\//g, ''); +} +makeNonRelative.onRead = true; + +function buildBrowser() { + console.log('\nCreating dist/source-map.js'); + + var project = copy.createCommonJsProject({ + roots: [ path.join(__dirname, 'lib') ] + }); + + copy({ + source: [ + 'build/mini-require.js', + { + project: project, + require: [ 'source-map/source-map-generator', + 'source-map/source-map-consumer', + 'source-map/source-node'] + }, + 'build/suffix-browser.js' + ], + filter: [ + copy.filter.moduleDefines, + removeAmdefine + ], + dest: 'dist/source-map.js' + }); +} + +function buildBrowserMin() { + console.log('\nCreating dist/source-map.min.js'); + + copy({ + source: 'dist/source-map.js', + filter: copy.filter.uglifyjs, + dest: 'dist/source-map.min.js' + }); +} + +function buildFirefox() { + console.log('\nCreating dist/SourceMap.jsm'); + + var project = copy.createCommonJsProject({ + roots: [ path.join(__dirname, 'lib') ] + }); + + copy({ + source: [ + 'build/prefix-source-map.jsm', + { + project: project, + require: [ 'source-map/source-map-consumer', + 'source-map/source-map-generator', + 'source-map/source-node' ] + }, + 'build/suffix-source-map.jsm' + ], + filter: [ + copy.filter.moduleDefines, + removeAmdefine, + makeNonRelative + ], + dest: 'dist/SourceMap.jsm' + }); + + // Create dist/test/Utils.jsm + console.log('\nCreating dist/test/Utils.jsm'); + + project = copy.createCommonJsProject({ + roots: [ __dirname, path.join(__dirname, 'lib') ] + }); + + copy({ + source: [ + 'build/prefix-utils.jsm', + 'build/assert-shim.js', + { + project: project, + require: [ 'test/source-map/util' ] + }, + 'build/suffix-utils.jsm' + ], + filter: [ + copy.filter.moduleDefines, + removeAmdefine, + makeNonRelative + ], + dest: 'dist/test/Utils.jsm' + }); + + function isTestFile(f) { + return /^test\-.*?\.js/.test(f); + } + + var testFiles = fs.readdirSync(path.join(__dirname, 'test', 'source-map')).filter(isTestFile); + + testFiles.forEach(function (testFile) { + console.log('\nCreating', path.join('dist', 'test', testFile.replace(/\-/g, '_'))); + + copy({ + source: [ + 'build/test-prefix.js', + path.join('test', 'source-map', testFile), + 'build/test-suffix.js' + ], + filter: [ + removeAmdefine, + makeNonRelative, + function (input, source) { + return input.replace('define(', + 'define("' + + path.join('test', 'source-map', testFile.replace(/\.js$/, '')) + + '", ["require", "exports", "module"], '); + }, + function (input, source) { + return input.replace('{THIS_MODULE}', function () { + return "test/source-map/" + testFile.replace(/\.js$/, ''); + }); + } + ], + dest: path.join('dist', 'test', testFile.replace(/\-/g, '_')) + }); + }); +} + +function ensureDir(name) { + var dirExists = false; + try { + dirExists = fs.statSync(name).isDirectory(); + } catch (err) {} + + if (!dirExists) { + fs.mkdirSync(name, 0777); + } +} + +ensureDir("dist"); +ensureDir("dist/test"); +buildFirefox(); +buildBrowser(); +buildBrowserMin(); diff --git a/bin/node_modules/uglify-js/node_modules/source-map/README.md b/bin/node_modules/uglify-js/node_modules/source-map/README.md new file mode 100644 index 00000000..b00e970c --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/source-map/README.md @@ -0,0 +1,446 @@ +# Source Map + +This is a library to generate and consume the source map format +[described here][format]. + +This library is written in the Asynchronous Module Definition format, and works +in the following environments: + +* Modern Browsers supporting ECMAScript 5 (either after the build, or with an + AMD loader such as RequireJS) + +* Inside Firefox (as a JSM file, after the build) + +* With NodeJS versions 0.8.X and higher + +## Node + + $ npm install source-map + +## Building from Source (for everywhere else) + +Install Node and then run + + $ git clone https://fitzgen@github.com/mozilla/source-map.git + $ cd source-map + $ npm link . + +Next, run + + $ node Makefile.dryice.js + +This should spew a bunch of stuff to stdout, and create the following files: + +* `dist/source-map.js` - The unminified browser version. + +* `dist/source-map.min.js` - The minified browser version. + +* `dist/SourceMap.jsm` - The JavaScript Module for inclusion in Firefox source. + +## Examples + +### Consuming a source map + + var rawSourceMap = { + version: 3, + file: 'min.js', + names: ['bar', 'baz', 'n'], + sources: ['one.js', 'two.js'], + sourceRoot: 'http://example.com/www/js/', + mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA' + }; + + var smc = new SourceMapConsumer(rawSourceMap); + + console.log(smc.sources); + // [ 'http://example.com/www/js/one.js', + // 'http://example.com/www/js/two.js' ] + + console.log(smc.originalPositionFor({ + line: 2, + column: 28 + })); + // { source: 'http://example.com/www/js/two.js', + // line: 2, + // column: 10, + // name: 'n' } + + console.log(smc.generatedPositionFor({ + source: 'http://example.com/www/js/two.js', + line: 2, + column: 10 + })); + // { line: 2, column: 28 } + + smc.eachMapping(function (m) { + // ... + }); + +### Generating a source map + +In depth guide: +[**Compiling to JavaScript, and Debugging with Source Maps**](https://hacks.mozilla.org/2013/05/compiling-to-javascript-and-debugging-with-source-maps/) + +#### With SourceNode (high level API) + + function compile(ast) { + switch (ast.type) { + case 'BinaryExpression': + return new SourceNode( + ast.location.line, + ast.location.column, + ast.location.source, + [compile(ast.left), " + ", compile(ast.right)] + ); + case 'Literal': + return new SourceNode( + ast.location.line, + ast.location.column, + ast.location.source, + String(ast.value) + ); + // ... + default: + throw new Error("Bad AST"); + } + } + + var ast = parse("40 + 2", "add.js"); + console.log(compile(ast).toStringWithSourceMap({ + file: 'add.js' + })); + // { code: '40 + 2', + // map: [object SourceMapGenerator] } + +#### With SourceMapGenerator (low level API) + + var map = new SourceMapGenerator({ + file: "source-mapped.js" + }); + + map.addMapping({ + generated: { + line: 10, + column: 35 + }, + source: "foo.js", + original: { + line: 33, + column: 2 + }, + name: "christopher" + }); + + console.log(map.toString()); + // '{"version":3,"file":"source-mapped.js","sources":["foo.js"],"names":["christopher"],"mappings":";;;;;;;;;mCAgCEA"}' + +## API + +Get a reference to the module: + + // NodeJS + var sourceMap = require('source-map'); + + // Browser builds + var sourceMap = window.sourceMap; + + // Inside Firefox + let sourceMap = {}; + Components.utils.import('resource:///modules/devtools/SourceMap.jsm', sourceMap); + +### SourceMapConsumer + +A SourceMapConsumer instance represents a parsed source map which we can query +for information about the original file positions by giving it a file position +in the generated source. + +#### new SourceMapConsumer(rawSourceMap) + +The only parameter is the raw source map (either as a string which can be +`JSON.parse`'d, or an object). According to the spec, source maps have the +following attributes: + +* `version`: Which version of the source map spec this map is following. + +* `sources`: An array of URLs to the original source files. + +* `names`: An array of identifiers which can be referrenced by individual + mappings. + +* `sourceRoot`: Optional. The URL root from which all sources are relative. + +* `sourcesContent`: Optional. An array of contents of the original source files. + +* `mappings`: A string of base64 VLQs which contain the actual mappings. + +* `file`: Optional. The generated filename this source map is associated with. + +#### SourceMapConsumer.prototype.originalPositionFor(generatedPosition) + +Returns the original source, line, and column information for the generated +source's line and column positions provided. The only argument is an object with +the following properties: + +* `line`: The line number in the generated source. + +* `column`: The column number in the generated source. + +and an object is returned with the following properties: + +* `source`: The original source file, or null if this information is not + available. + +* `line`: The line number in the original source, or null if this information is + not available. + +* `column`: The column number in the original source, or null or null if this + information is not available. + +* `name`: The original identifier, or null if this information is not available. + +#### SourceMapConsumer.prototype.generatedPositionFor(originalPosition) + +Returns the generated line and column information for the original source, +line, and column positions provided. The only argument is an object with +the following properties: + +* `source`: The filename of the original source. + +* `line`: The line number in the original source. + +* `column`: The column number in the original source. + +and an object is returned with the following properties: + +* `line`: The line number in the generated source, or null. + +* `column`: The column number in the generated source, or null. + +#### SourceMapConsumer.prototype.sourceContentFor(source) + +Returns the original source content for the source provided. The only +argument is the URL of the original source file. + +#### SourceMapConsumer.prototype.eachMapping(callback, context, order) + +Iterate over each mapping between an original source/line/column and a +generated line/column in this source map. + +* `callback`: The function that is called with each mapping. Mappings have the + form `{ source, generatedLine, generatedColumn, originalLine, originalColumn, + name }` + +* `context`: Optional. If specified, this object will be the value of `this` + every time that `callback` is called. + +* `order`: Either `SourceMapConsumer.GENERATED_ORDER` or + `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to iterate over + the mappings sorted by the generated file's line/column order or the + original's source/line/column order, respectively. Defaults to + `SourceMapConsumer.GENERATED_ORDER`. + +### SourceMapGenerator + +An instance of the SourceMapGenerator represents a source map which is being +built incrementally. + +#### new SourceMapGenerator([startOfSourceMap]) + +You may pass an object with the following properties: + +* `file`: The filename of the generated source that this source map is + associated with. + +* `sourceRoot`: A root for all relative URLs in this source map. + +#### SourceMapGenerator.fromSourceMap(sourceMapConsumer) + +Creates a new SourceMapGenerator based on a SourceMapConsumer + +* `sourceMapConsumer` The SourceMap. + +#### SourceMapGenerator.prototype.addMapping(mapping) + +Add a single mapping from original source line and column to the generated +source's line and column for this source map being created. The mapping object +should have the following properties: + +* `generated`: An object with the generated line and column positions. + +* `original`: An object with the original line and column positions. + +* `source`: The original source file (relative to the sourceRoot). + +* `name`: An optional original token name for this mapping. + +#### SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent) + +Set the source content for an original source file. + +* `sourceFile` the URL of the original source file. + +* `sourceContent` the content of the source file. + +#### SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]]) + +Applies a SourceMap for a source file to the SourceMap. +Each mapping to the supplied source file is rewritten using the +supplied SourceMap. Note: The resolution for the resulting mappings +is the minimium of this map and the supplied map. + +* `sourceMapConsumer`: The SourceMap to be applied. + +* `sourceFile`: Optional. The filename of the source file. + If omitted, sourceMapConsumer.file will be used, if it exists. + Otherwise an error will be thrown. + +* `sourceMapPath`: Optional. The dirname of the path to the SourceMap + to be applied. If relative, it is relative to the SourceMap. + + This parameter is needed when the two SourceMaps aren't in the same + directory, and the SourceMap to be applied contains relative source + paths. If so, those relative source paths need to be rewritten + relative to the SourceMap. + + If omitted, it is assumed that both SourceMaps are in the same directory, + thus not needing any rewriting. (Supplying `'.'` has the same effect.) + +#### SourceMapGenerator.prototype.toString() + +Renders the source map being generated to a string. + +### SourceNode + +SourceNodes provide a way to abstract over interpolating and/or concatenating +snippets of generated JavaScript source code, while maintaining the line and +column information associated between those snippets and the original source +code. This is useful as the final intermediate representation a compiler might +use before outputting the generated JS and source map. + +#### new SourceNode([line, column, source[, chunk[, name]]]) + +* `line`: The original line number associated with this source node, or null if + it isn't associated with an original line. + +* `column`: The original column number associated with this source node, or null + if it isn't associated with an original column. + +* `source`: The original source's filename; null if no filename is provided. + +* `chunk`: Optional. Is immediately passed to `SourceNode.prototype.add`, see + below. + +* `name`: Optional. The original identifier. + +#### SourceNode.fromStringWithSourceMap(code, sourceMapConsumer) + +Creates a SourceNode from generated code and a SourceMapConsumer. + +* `code`: The generated code + +* `sourceMapConsumer` The SourceMap for the generated code + +#### SourceNode.prototype.add(chunk) + +Add a chunk of generated JS to this source node. + +* `chunk`: A string snippet of generated JS code, another instance of + `SourceNode`, or an array where each member is one of those things. + +#### SourceNode.prototype.prepend(chunk) + +Prepend a chunk of generated JS to this source node. + +* `chunk`: A string snippet of generated JS code, another instance of + `SourceNode`, or an array where each member is one of those things. + +#### SourceNode.prototype.setSourceContent(sourceFile, sourceContent) + +Set the source content for a source file. This will be added to the +`SourceMap` in the `sourcesContent` field. + +* `sourceFile`: The filename of the source file + +* `sourceContent`: The content of the source file + +#### SourceNode.prototype.walk(fn) + +Walk over the tree of JS snippets in this node and its children. The walking +function is called once for each snippet of JS and is passed that snippet and +the its original associated source's line/column location. + +* `fn`: The traversal function. + +#### SourceNode.prototype.walkSourceContents(fn) + +Walk over the tree of SourceNodes. The walking function is called for each +source file content and is passed the filename and source content. + +* `fn`: The traversal function. + +#### SourceNode.prototype.join(sep) + +Like `Array.prototype.join` except for SourceNodes. Inserts the separator +between each of this source node's children. + +* `sep`: The separator. + +#### SourceNode.prototype.replaceRight(pattern, replacement) + +Call `String.prototype.replace` on the very right-most source snippet. Useful +for trimming whitespace from the end of a source node, etc. + +* `pattern`: The pattern to replace. + +* `replacement`: The thing to replace the pattern with. + +#### SourceNode.prototype.toString() + +Return the string representation of this source node. Walks over the tree and +concatenates all the various snippets together to one string. + +### SourceNode.prototype.toStringWithSourceMap([startOfSourceMap]) + +Returns the string representation of this tree of source nodes, plus a +SourceMapGenerator which contains all the mappings between the generated and +original sources. + +The arguments are the same as those to `new SourceMapGenerator`. + +## Tests + +[![Build Status](https://travis-ci.org/mozilla/source-map.png?branch=master)](https://travis-ci.org/mozilla/source-map) + +Install NodeJS version 0.8.0 or greater, then run `node test/run-tests.js`. + +To add new tests, create a new file named `test/test-.js` +and export your test functions with names that start with "test", for example + + exports["test doing the foo bar"] = function (assert, util) { + ... + }; + +The new test will be located automatically when you run the suite. + +The `util` argument is the test utility module located at `test/source-map/util`. + +The `assert` argument is a cut down version of node's assert module. You have +access to the following assertion functions: + +* `doesNotThrow` + +* `equal` + +* `ok` + +* `strictEqual` + +* `throws` + +(The reason for the restricted set of test functions is because we need the +tests to run inside Firefox's test suite as well and so the assert module is +shimmed in that environment. See `build/assert-shim.js`.) + +[format]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit +[feature]: https://wiki.mozilla.org/DevTools/Features/SourceMap +[Dryice]: https://github.com/mozilla/dryice diff --git a/bin/node_modules/uglify-js/node_modules/source-map/build/assert-shim.js b/bin/node_modules/uglify-js/node_modules/source-map/build/assert-shim.js new file mode 100644 index 00000000..daa1a623 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/source-map/build/assert-shim.js @@ -0,0 +1,56 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +define('test/source-map/assert', ['exports'], function (exports) { + + let do_throw = function (msg) { + throw new Error(msg); + }; + + exports.init = function (throw_fn) { + do_throw = throw_fn; + }; + + exports.doesNotThrow = function (fn) { + try { + fn(); + } + catch (e) { + do_throw(e.message); + } + }; + + exports.equal = function (actual, expected, msg) { + msg = msg || String(actual) + ' != ' + String(expected); + if (actual != expected) { + do_throw(msg); + } + }; + + exports.ok = function (val, msg) { + msg = msg || String(val) + ' is falsey'; + if (!Boolean(val)) { + do_throw(msg); + } + }; + + exports.strictEqual = function (actual, expected, msg) { + msg = msg || String(actual) + ' !== ' + String(expected); + if (actual !== expected) { + do_throw(msg); + } + }; + + exports.throws = function (fn) { + try { + fn(); + do_throw('Expected an error to be thrown, but it wasn\'t.'); + } + catch (e) { + } + }; + +}); diff --git a/bin/node_modules/uglify-js/node_modules/source-map/build/mini-require.js b/bin/node_modules/uglify-js/node_modules/source-map/build/mini-require.js new file mode 100644 index 00000000..0daf4537 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/source-map/build/mini-require.js @@ -0,0 +1,152 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +/** + * Define a module along with a payload. + * @param {string} moduleName Name for the payload + * @param {ignored} deps Ignored. For compatibility with CommonJS AMD Spec + * @param {function} payload Function with (require, exports, module) params + */ +function define(moduleName, deps, payload) { + if (typeof moduleName != "string") { + throw new TypeError('Expected string, got: ' + moduleName); + } + + if (arguments.length == 2) { + payload = deps; + } + + if (moduleName in define.modules) { + throw new Error("Module already defined: " + moduleName); + } + define.modules[moduleName] = payload; +}; + +/** + * The global store of un-instantiated modules + */ +define.modules = {}; + + +/** + * We invoke require() in the context of a Domain so we can have multiple + * sets of modules running separate from each other. + * This contrasts with JSMs which are singletons, Domains allows us to + * optionally load a CommonJS module twice with separate data each time. + * Perhaps you want 2 command lines with a different set of commands in each, + * for example. + */ +function Domain() { + this.modules = {}; + this._currentModule = null; +} + +(function () { + + /** + * Lookup module names and resolve them by calling the definition function if + * needed. + * There are 2 ways to call this, either with an array of dependencies and a + * callback to call when the dependencies are found (which can happen + * asynchronously in an in-page context) or with a single string an no callback + * where the dependency is resolved synchronously and returned. + * The API is designed to be compatible with the CommonJS AMD spec and + * RequireJS. + * @param {string[]|string} deps A name, or names for the payload + * @param {function|undefined} callback Function to call when the dependencies + * are resolved + * @return {undefined|object} The module required or undefined for + * array/callback method + */ + Domain.prototype.require = function(deps, callback) { + if (Array.isArray(deps)) { + var params = deps.map(function(dep) { + return this.lookup(dep); + }, this); + if (callback) { + callback.apply(null, params); + } + return undefined; + } + else { + return this.lookup(deps); + } + }; + + function normalize(path) { + var bits = path.split('/'); + var i = 1; + while (i < bits.length) { + if (bits[i] === '..') { + bits.splice(i-1, 1); + } else if (bits[i] === '.') { + bits.splice(i, 1); + } else { + i++; + } + } + return bits.join('/'); + } + + function join(a, b) { + a = a.trim(); + b = b.trim(); + if (/^\//.test(b)) { + return b; + } else { + return a.replace(/\/*$/, '/') + b; + } + } + + function dirname(path) { + var bits = path.split('/'); + bits.pop(); + return bits.join('/'); + } + + /** + * Lookup module names and resolve them by calling the definition function if + * needed. + * @param {string} moduleName A name for the payload to lookup + * @return {object} The module specified by aModuleName or null if not found. + */ + Domain.prototype.lookup = function(moduleName) { + if (/^\./.test(moduleName)) { + moduleName = normalize(join(dirname(this._currentModule), moduleName)); + } + + if (moduleName in this.modules) { + var module = this.modules[moduleName]; + return module; + } + + if (!(moduleName in define.modules)) { + throw new Error("Module not defined: " + moduleName); + } + + var module = define.modules[moduleName]; + + if (typeof module == "function") { + var exports = {}; + var previousModule = this._currentModule; + this._currentModule = moduleName; + module(this.require.bind(this), exports, { id: moduleName, uri: "" }); + this._currentModule = previousModule; + module = exports; + } + + // cache the resulting module object for next time + this.modules[moduleName] = module; + + return module; + }; + +}()); + +define.Domain = Domain; +define.globalDomain = new Domain(); +var require = define.globalDomain.require.bind(define.globalDomain); diff --git a/bin/node_modules/uglify-js/node_modules/source-map/build/prefix-source-map.jsm b/bin/node_modules/uglify-js/node_modules/source-map/build/prefix-source-map.jsm new file mode 100644 index 00000000..ee2539d8 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/source-map/build/prefix-source-map.jsm @@ -0,0 +1,20 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +/* + * WARNING! + * + * Do not edit this file directly, it is built from the sources at + * https://github.com/mozilla/source-map/ + */ + +/////////////////////////////////////////////////////////////////////////////// + + +this.EXPORTED_SYMBOLS = [ "SourceMapConsumer", "SourceMapGenerator", "SourceNode" ]; + +Components.utils.import('resource://gre/modules/devtools/Require.jsm'); diff --git a/bin/node_modules/uglify-js/node_modules/source-map/build/prefix-utils.jsm b/bin/node_modules/uglify-js/node_modules/source-map/build/prefix-utils.jsm new file mode 100644 index 00000000..80341d45 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/source-map/build/prefix-utils.jsm @@ -0,0 +1,18 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +/* + * WARNING! + * + * Do not edit this file directly, it is built from the sources at + * https://github.com/mozilla/source-map/ + */ + +Components.utils.import('resource://gre/modules/devtools/Require.jsm'); +Components.utils.import('resource://gre/modules/devtools/SourceMap.jsm'); + +this.EXPORTED_SYMBOLS = [ "define", "runSourceMapTests" ]; diff --git a/bin/node_modules/uglify-js/node_modules/source-map/build/suffix-browser.js b/bin/node_modules/uglify-js/node_modules/source-map/build/suffix-browser.js new file mode 100644 index 00000000..fb29ff5f --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/source-map/build/suffix-browser.js @@ -0,0 +1,8 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/////////////////////////////////////////////////////////////////////////////// + +this.sourceMap = { + SourceMapConsumer: require('source-map/source-map-consumer').SourceMapConsumer, + SourceMapGenerator: require('source-map/source-map-generator').SourceMapGenerator, + SourceNode: require('source-map/source-node').SourceNode +}; diff --git a/bin/node_modules/uglify-js/node_modules/source-map/build/suffix-source-map.jsm b/bin/node_modules/uglify-js/node_modules/source-map/build/suffix-source-map.jsm new file mode 100644 index 00000000..cf3c2d8d --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/source-map/build/suffix-source-map.jsm @@ -0,0 +1,6 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/////////////////////////////////////////////////////////////////////////////// + +this.SourceMapConsumer = require('source-map/source-map-consumer').SourceMapConsumer; +this.SourceMapGenerator = require('source-map/source-map-generator').SourceMapGenerator; +this.SourceNode = require('source-map/source-node').SourceNode; diff --git a/bin/node_modules/uglify-js/node_modules/source-map/build/suffix-utils.jsm b/bin/node_modules/uglify-js/node_modules/source-map/build/suffix-utils.jsm new file mode 100644 index 00000000..b31b84cb --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/source-map/build/suffix-utils.jsm @@ -0,0 +1,21 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +function runSourceMapTests(modName, do_throw) { + let mod = require(modName); + let assert = require('test/source-map/assert'); + let util = require('test/source-map/util'); + + assert.init(do_throw); + + for (let k in mod) { + if (/^test/.test(k)) { + mod[k](assert, util); + } + } + +} +this.runSourceMapTests = runSourceMapTests; diff --git a/bin/node_modules/uglify-js/node_modules/source-map/build/test-prefix.js b/bin/node_modules/uglify-js/node_modules/source-map/build/test-prefix.js new file mode 100644 index 00000000..1b13f300 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/source-map/build/test-prefix.js @@ -0,0 +1,8 @@ +/* + * WARNING! + * + * Do not edit this file directly, it is built from the sources at + * https://github.com/mozilla/source-map/ + */ + +Components.utils.import('resource://test/Utils.jsm'); diff --git a/bin/node_modules/uglify-js/node_modules/source-map/build/test-suffix.js b/bin/node_modules/uglify-js/node_modules/source-map/build/test-suffix.js new file mode 100644 index 00000000..bec2de3f --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/source-map/build/test-suffix.js @@ -0,0 +1,3 @@ +function run_test() { + runSourceMapTests('{THIS_MODULE}', do_throw); +} diff --git a/bin/node_modules/uglify-js/node_modules/source-map/lib/source-map.js b/bin/node_modules/uglify-js/node_modules/source-map/lib/source-map.js new file mode 100644 index 00000000..121ad241 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/source-map/lib/source-map.js @@ -0,0 +1,8 @@ +/* + * Copyright 2009-2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE.txt or: + * http://opensource.org/licenses/BSD-3-Clause + */ +exports.SourceMapGenerator = require('./source-map/source-map-generator').SourceMapGenerator; +exports.SourceMapConsumer = require('./source-map/source-map-consumer').SourceMapConsumer; +exports.SourceNode = require('./source-map/source-node').SourceNode; diff --git a/bin/node_modules/uglify-js/node_modules/source-map/lib/source-map/array-set.js b/bin/node_modules/uglify-js/node_modules/source-map/lib/source-map/array-set.js new file mode 100644 index 00000000..40f9a18b --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/source-map/lib/source-map/array-set.js @@ -0,0 +1,97 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var util = require('./util'); + + /** + * A data structure which is a combination of an array and a set. Adding a new + * member is O(1), testing for membership is O(1), and finding the index of an + * element is O(1). Removing elements from the set is not supported. Only + * strings are supported for membership. + */ + function ArraySet() { + this._array = []; + this._set = {}; + } + + /** + * Static method for creating ArraySet instances from an existing array. + */ + ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { + var set = new ArraySet(); + for (var i = 0, len = aArray.length; i < len; i++) { + set.add(aArray[i], aAllowDuplicates); + } + return set; + }; + + /** + * Add the given string to this set. + * + * @param String aStr + */ + ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { + var isDuplicate = this.has(aStr); + var idx = this._array.length; + if (!isDuplicate || aAllowDuplicates) { + this._array.push(aStr); + } + if (!isDuplicate) { + this._set[util.toSetString(aStr)] = idx; + } + }; + + /** + * Is the given string a member of this set? + * + * @param String aStr + */ + ArraySet.prototype.has = function ArraySet_has(aStr) { + return Object.prototype.hasOwnProperty.call(this._set, + util.toSetString(aStr)); + }; + + /** + * What is the index of the given string in the array? + * + * @param String aStr + */ + ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { + if (this.has(aStr)) { + return this._set[util.toSetString(aStr)]; + } + throw new Error('"' + aStr + '" is not in the set.'); + }; + + /** + * What is the element at the given index? + * + * @param Number aIdx + */ + ArraySet.prototype.at = function ArraySet_at(aIdx) { + if (aIdx >= 0 && aIdx < this._array.length) { + return this._array[aIdx]; + } + throw new Error('No element indexed by ' + aIdx); + }; + + /** + * Returns the array representation of this set (which has the proper indices + * indicated by indexOf). Note that this is a copy of the internal array used + * for storing the members so that no one can mess with internal state. + */ + ArraySet.prototype.toArray = function ArraySet_toArray() { + return this._array.slice(); + }; + + exports.ArraySet = ArraySet; + +}); diff --git a/bin/node_modules/uglify-js/node_modules/source-map/lib/source-map/base64-vlq.js b/bin/node_modules/uglify-js/node_modules/source-map/lib/source-map/base64-vlq.js new file mode 100644 index 00000000..1b67bb37 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/source-map/lib/source-map/base64-vlq.js @@ -0,0 +1,144 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + * + * Based on the Base 64 VLQ implementation in Closure Compiler: + * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java + * + * Copyright 2011 The Closure Compiler Authors. All rights reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var base64 = require('./base64'); + + // A single base 64 digit can contain 6 bits of data. For the base 64 variable + // length quantities we use in the source map spec, the first bit is the sign, + // the next four bits are the actual value, and the 6th bit is the + // continuation bit. The continuation bit tells us whether there are more + // digits in this value following this digit. + // + // Continuation + // | Sign + // | | + // V V + // 101011 + + var VLQ_BASE_SHIFT = 5; + + // binary: 100000 + var VLQ_BASE = 1 << VLQ_BASE_SHIFT; + + // binary: 011111 + var VLQ_BASE_MASK = VLQ_BASE - 1; + + // binary: 100000 + var VLQ_CONTINUATION_BIT = VLQ_BASE; + + /** + * Converts from a two-complement value to a value where the sign bit is + * is placed in the least significant bit. For example, as decimals: + * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) + * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) + */ + function toVLQSigned(aValue) { + return aValue < 0 + ? ((-aValue) << 1) + 1 + : (aValue << 1) + 0; + } + + /** + * Converts to a two-complement value from a value where the sign bit is + * is placed in the least significant bit. For example, as decimals: + * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 + * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 + */ + function fromVLQSigned(aValue) { + var isNegative = (aValue & 1) === 1; + var shifted = aValue >> 1; + return isNegative + ? -shifted + : shifted; + } + + /** + * Returns the base 64 VLQ encoded value. + */ + exports.encode = function base64VLQ_encode(aValue) { + var encoded = ""; + var digit; + + var vlq = toVLQSigned(aValue); + + do { + digit = vlq & VLQ_BASE_MASK; + vlq >>>= VLQ_BASE_SHIFT; + if (vlq > 0) { + // There are still more digits in this value, so we must make sure the + // continuation bit is marked. + digit |= VLQ_CONTINUATION_BIT; + } + encoded += base64.encode(digit); + } while (vlq > 0); + + return encoded; + }; + + /** + * Decodes the next base 64 VLQ value from the given string and returns the + * value and the rest of the string. + */ + exports.decode = function base64VLQ_decode(aStr) { + var i = 0; + var strLen = aStr.length; + var result = 0; + var shift = 0; + var continuation, digit; + + do { + if (i >= strLen) { + throw new Error("Expected more digits in base 64 VLQ value."); + } + digit = base64.decode(aStr.charAt(i++)); + continuation = !!(digit & VLQ_CONTINUATION_BIT); + digit &= VLQ_BASE_MASK; + result = result + (digit << shift); + shift += VLQ_BASE_SHIFT; + } while (continuation); + + return { + value: fromVLQSigned(result), + rest: aStr.slice(i) + }; + }; + +}); diff --git a/bin/node_modules/uglify-js/node_modules/source-map/lib/source-map/base64.js b/bin/node_modules/uglify-js/node_modules/source-map/lib/source-map/base64.js new file mode 100644 index 00000000..863cc465 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/source-map/lib/source-map/base64.js @@ -0,0 +1,42 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var charToIntMap = {}; + var intToCharMap = {}; + + 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' + .split('') + .forEach(function (ch, index) { + charToIntMap[ch] = index; + intToCharMap[index] = ch; + }); + + /** + * Encode an integer in the range of 0 to 63 to a single base 64 digit. + */ + exports.encode = function base64_encode(aNumber) { + if (aNumber in intToCharMap) { + return intToCharMap[aNumber]; + } + throw new TypeError("Must be between 0 and 63: " + aNumber); + }; + + /** + * Decode a single base 64 digit to an integer. + */ + exports.decode = function base64_decode(aChar) { + if (aChar in charToIntMap) { + return charToIntMap[aChar]; + } + throw new TypeError("Not a valid base 64 digit: " + aChar); + }; + +}); diff --git a/bin/node_modules/uglify-js/node_modules/source-map/lib/source-map/binary-search.js b/bin/node_modules/uglify-js/node_modules/source-map/lib/source-map/binary-search.js new file mode 100644 index 00000000..ff347c68 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/source-map/lib/source-map/binary-search.js @@ -0,0 +1,81 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + /** + * Recursive implementation of binary search. + * + * @param aLow Indices here and lower do not contain the needle. + * @param aHigh Indices here and higher do not contain the needle. + * @param aNeedle The element being searched for. + * @param aHaystack The non-empty array being searched. + * @param aCompare Function which takes two elements and returns -1, 0, or 1. + */ + function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare) { + // This function terminates when one of the following is true: + // + // 1. We find the exact element we are looking for. + // + // 2. We did not find the exact element, but we can return the next + // closest element that is less than that element. + // + // 3. We did not find the exact element, and there is no next-closest + // element which is less than the one we are searching for, so we + // return null. + var mid = Math.floor((aHigh - aLow) / 2) + aLow; + var cmp = aCompare(aNeedle, aHaystack[mid], true); + if (cmp === 0) { + // Found the element we are looking for. + return aHaystack[mid]; + } + else if (cmp > 0) { + // aHaystack[mid] is greater than our needle. + if (aHigh - mid > 1) { + // The element is in the upper half. + return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare); + } + // We did not find an exact match, return the next closest one + // (termination case 2). + return aHaystack[mid]; + } + else { + // aHaystack[mid] is less than our needle. + if (mid - aLow > 1) { + // The element is in the lower half. + return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare); + } + // The exact needle element was not found in this haystack. Determine if + // we are in termination case (2) or (3) and return the appropriate thing. + return aLow < 0 + ? null + : aHaystack[aLow]; + } + } + + /** + * This is an implementation of binary search which will always try and return + * the next lowest value checked if there is no exact hit. This is because + * mappings between original and generated line/col pairs are single points, + * and there is an implicit region between each of them, so a miss just means + * that you aren't on the very start of a region. + * + * @param aNeedle The element you are looking for. + * @param aHaystack The array that is being searched. + * @param aCompare A function which takes the needle and an element in the + * array and returns -1, 0, or 1 depending on whether the needle is less + * than, equal to, or greater than the element, respectively. + */ + exports.search = function search(aNeedle, aHaystack, aCompare) { + return aHaystack.length > 0 + ? recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, aCompare) + : null; + }; + +}); diff --git a/bin/node_modules/uglify-js/node_modules/source-map/lib/source-map/source-map-consumer.js b/bin/node_modules/uglify-js/node_modules/source-map/lib/source-map/source-map-consumer.js new file mode 100644 index 00000000..5214d5e7 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/source-map/lib/source-map/source-map-consumer.js @@ -0,0 +1,478 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var util = require('./util'); + var binarySearch = require('./binary-search'); + var ArraySet = require('./array-set').ArraySet; + var base64VLQ = require('./base64-vlq'); + + /** + * A SourceMapConsumer instance represents a parsed source map which we can + * query for information about the original file positions by giving it a file + * position in the generated source. + * + * The only parameter is the raw source map (either as a JSON string, or + * already parsed to an object). According to the spec, source maps have the + * following attributes: + * + * - version: Which version of the source map spec this map is following. + * - sources: An array of URLs to the original source files. + * - names: An array of identifiers which can be referrenced by individual mappings. + * - sourceRoot: Optional. The URL root from which all sources are relative. + * - sourcesContent: Optional. An array of contents of the original source files. + * - mappings: A string of base64 VLQs which contain the actual mappings. + * - file: Optional. The generated file this source map is associated with. + * + * Here is an example source map, taken from the source map spec[0]: + * + * { + * version : 3, + * file: "out.js", + * sourceRoot : "", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AA,AB;;ABCDE;" + * } + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# + */ + function SourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + var version = util.getArg(sourceMap, 'version'); + var sources = util.getArg(sourceMap, 'sources'); + // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which + // requires the array) to play nice here. + var names = util.getArg(sourceMap, 'names', []); + var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); + var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); + var mappings = util.getArg(sourceMap, 'mappings'); + var file = util.getArg(sourceMap, 'file', null); + + // Once again, Sass deviates from the spec and supplies the version as a + // string rather than a number, so we use loose equality checking here. + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + // Pass `true` below to allow duplicate names and sources. While source maps + // are intended to be compressed and deduplicated, the TypeScript compiler + // sometimes generates source maps with duplicates in them. See Github issue + // #72 and bugzil.la/889492. + this._names = ArraySet.fromArray(names, true); + this._sources = ArraySet.fromArray(sources, true); + + this.sourceRoot = sourceRoot; + this.sourcesContent = sourcesContent; + this._mappings = mappings; + this.file = file; + } + + /** + * Create a SourceMapConsumer from a SourceMapGenerator. + * + * @param SourceMapGenerator aSourceMap + * The source map that will be consumed. + * @returns SourceMapConsumer + */ + SourceMapConsumer.fromSourceMap = + function SourceMapConsumer_fromSourceMap(aSourceMap) { + var smc = Object.create(SourceMapConsumer.prototype); + + smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); + smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); + smc.sourceRoot = aSourceMap._sourceRoot; + smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), + smc.sourceRoot); + smc.file = aSourceMap._file; + + smc.__generatedMappings = aSourceMap._mappings.slice() + .sort(util.compareByGeneratedPositions); + smc.__originalMappings = aSourceMap._mappings.slice() + .sort(util.compareByOriginalPositions); + + return smc; + }; + + /** + * The version of the source mapping spec that we are consuming. + */ + SourceMapConsumer.prototype._version = 3; + + /** + * The list of original sources. + */ + Object.defineProperty(SourceMapConsumer.prototype, 'sources', { + get: function () { + return this._sources.toArray().map(function (s) { + return this.sourceRoot ? util.join(this.sourceRoot, s) : s; + }, this); + } + }); + + // `__generatedMappings` and `__originalMappings` are arrays that hold the + // parsed mapping coordinates from the source map's "mappings" attribute. They + // are lazily instantiated, accessed via the `_generatedMappings` and + // `_originalMappings` getters respectively, and we only parse the mappings + // and create these arrays once queried for a source location. We jump through + // these hoops because there can be many thousands of mappings, and parsing + // them is expensive, so we only want to do it if we must. + // + // Each object in the arrays is of the form: + // + // { + // generatedLine: The line number in the generated code, + // generatedColumn: The column number in the generated code, + // source: The path to the original source file that generated this + // chunk of code, + // originalLine: The line number in the original source that + // corresponds to this chunk of generated code, + // originalColumn: The column number in the original source that + // corresponds to this chunk of generated code, + // name: The name of the original symbol which generated this chunk of + // code. + // } + // + // All properties except for `generatedLine` and `generatedColumn` can be + // `null`. + // + // `_generatedMappings` is ordered by the generated positions. + // + // `_originalMappings` is ordered by the original positions. + + SourceMapConsumer.prototype.__generatedMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { + get: function () { + if (!this.__generatedMappings) { + this.__generatedMappings = []; + this.__originalMappings = []; + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__generatedMappings; + } + }); + + SourceMapConsumer.prototype.__originalMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { + get: function () { + if (!this.__originalMappings) { + this.__generatedMappings = []; + this.__originalMappings = []; + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__originalMappings; + } + }); + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + SourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + var generatedLine = 1; + var previousGeneratedColumn = 0; + var previousOriginalLine = 0; + var previousOriginalColumn = 0; + var previousSource = 0; + var previousName = 0; + var mappingSeparator = /^[,;]/; + var str = aStr; + var mapping; + var temp; + + while (str.length > 0) { + if (str.charAt(0) === ';') { + generatedLine++; + str = str.slice(1); + previousGeneratedColumn = 0; + } + else if (str.charAt(0) === ',') { + str = str.slice(1); + } + else { + mapping = {}; + mapping.generatedLine = generatedLine; + + // Generated column. + temp = base64VLQ.decode(str); + mapping.generatedColumn = previousGeneratedColumn + temp.value; + previousGeneratedColumn = mapping.generatedColumn; + str = temp.rest; + + if (str.length > 0 && !mappingSeparator.test(str.charAt(0))) { + // Original source. + temp = base64VLQ.decode(str); + mapping.source = this._sources.at(previousSource + temp.value); + previousSource += temp.value; + str = temp.rest; + if (str.length === 0 || mappingSeparator.test(str.charAt(0))) { + throw new Error('Found a source, but no line and column'); + } + + // Original line. + temp = base64VLQ.decode(str); + mapping.originalLine = previousOriginalLine + temp.value; + previousOriginalLine = mapping.originalLine; + // Lines are stored 0-based + mapping.originalLine += 1; + str = temp.rest; + if (str.length === 0 || mappingSeparator.test(str.charAt(0))) { + throw new Error('Found a source and line, but no column'); + } + + // Original column. + temp = base64VLQ.decode(str); + mapping.originalColumn = previousOriginalColumn + temp.value; + previousOriginalColumn = mapping.originalColumn; + str = temp.rest; + + if (str.length > 0 && !mappingSeparator.test(str.charAt(0))) { + // Original name. + temp = base64VLQ.decode(str); + mapping.name = this._names.at(previousName + temp.value); + previousName += temp.value; + str = temp.rest; + } + } + + this.__generatedMappings.push(mapping); + if (typeof mapping.originalLine === 'number') { + this.__originalMappings.push(mapping); + } + } + } + + this.__generatedMappings.sort(util.compareByGeneratedPositions); + this.__originalMappings.sort(util.compareByOriginalPositions); + }; + + /** + * Find the mapping that best matches the hypothetical "needle" mapping that + * we are searching for in the given "haystack" of mappings. + */ + SourceMapConsumer.prototype._findMapping = + function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, + aColumnName, aComparator) { + // To return the position we are searching for, we must first find the + // mapping for the given position and then return the opposite position it + // points to. Because the mappings are sorted, we can use binary search to + // find the best mapping. + + if (aNeedle[aLineName] <= 0) { + throw new TypeError('Line must be greater than or equal to 1, got ' + + aNeedle[aLineName]); + } + if (aNeedle[aColumnName] < 0) { + throw new TypeError('Column must be greater than or equal to 0, got ' + + aNeedle[aColumnName]); + } + + return binarySearch.search(aNeedle, aMappings, aComparator); + }; + + /** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. + * - column: The column number in the generated source. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. + * - column: The column number in the original source, or null. + * - name: The original identifier, or null. + */ + SourceMapConsumer.prototype.originalPositionFor = + function SourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + var mapping = this._findMapping(needle, + this._generatedMappings, + "generatedLine", + "generatedColumn", + util.compareByGeneratedPositions); + + if (mapping && mapping.generatedLine === needle.generatedLine) { + var source = util.getArg(mapping, 'source', null); + if (source && this.sourceRoot) { + source = util.join(this.sourceRoot, source); + } + return { + source: source, + line: util.getArg(mapping, 'originalLine', null), + column: util.getArg(mapping, 'originalColumn', null), + name: util.getArg(mapping, 'name', null) + }; + } + + return { + source: null, + line: null, + column: null, + name: null + }; + }; + + /** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * availible. + */ + SourceMapConsumer.prototype.sourceContentFor = + function SourceMapConsumer_sourceContentFor(aSource) { + if (!this.sourcesContent) { + return null; + } + + if (this.sourceRoot) { + aSource = util.relative(this.sourceRoot, aSource); + } + + if (this._sources.has(aSource)) { + return this.sourcesContent[this._sources.indexOf(aSource)]; + } + + var url; + if (this.sourceRoot + && (url = util.urlParse(this.sourceRoot))) { + // XXX: file:// URIs and absolute paths lead to unexpected behavior for + // many users. We can help them out when they expect file:// URIs to + // behave like it would if they were running a local HTTP server. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. + var fileUriAbsPath = aSource.replace(/^file:\/\//, ""); + if (url.scheme == "file" + && this._sources.has(fileUriAbsPath)) { + return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] + } + + if ((!url.path || url.path == "/") + && this._sources.has("/" + aSource)) { + return this.sourcesContent[this._sources.indexOf("/" + aSource)]; + } + } + + throw new Error('"' + aSource + '" is not in the SourceMap.'); + }; + + /** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: The column number in the original source. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ + SourceMapConsumer.prototype.generatedPositionFor = + function SourceMapConsumer_generatedPositionFor(aArgs) { + var needle = { + source: util.getArg(aArgs, 'source'), + originalLine: util.getArg(aArgs, 'line'), + originalColumn: util.getArg(aArgs, 'column') + }; + + if (this.sourceRoot) { + needle.source = util.relative(this.sourceRoot, needle.source); + } + + var mapping = this._findMapping(needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions); + + if (mapping) { + return { + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null) + }; + } + + return { + line: null, + column: null + }; + }; + + SourceMapConsumer.GENERATED_ORDER = 1; + SourceMapConsumer.ORIGINAL_ORDER = 2; + + /** + * Iterate over each mapping between an original source/line/column and a + * generated line/column in this source map. + * + * @param Function aCallback + * The function that is called with each mapping. + * @param Object aContext + * Optional. If specified, this object will be the value of `this` every + * time that `aCallback` is called. + * @param aOrder + * Either `SourceMapConsumer.GENERATED_ORDER` or + * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to + * iterate over the mappings sorted by the generated file's line/column + * order or the original's source/line/column order, respectively. Defaults to + * `SourceMapConsumer.GENERATED_ORDER`. + */ + SourceMapConsumer.prototype.eachMapping = + function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { + var context = aContext || null; + var order = aOrder || SourceMapConsumer.GENERATED_ORDER; + + var mappings; + switch (order) { + case SourceMapConsumer.GENERATED_ORDER: + mappings = this._generatedMappings; + break; + case SourceMapConsumer.ORIGINAL_ORDER: + mappings = this._originalMappings; + break; + default: + throw new Error("Unknown order of iteration."); + } + + var sourceRoot = this.sourceRoot; + mappings.map(function (mapping) { + var source = mapping.source; + if (source && sourceRoot) { + source = util.join(sourceRoot, source); + } + return { + source: source, + generatedLine: mapping.generatedLine, + generatedColumn: mapping.generatedColumn, + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: mapping.name + }; + }).forEach(aCallback, context); + }; + + exports.SourceMapConsumer = SourceMapConsumer; + +}); diff --git a/bin/node_modules/uglify-js/node_modules/source-map/lib/source-map/source-map-generator.js b/bin/node_modules/uglify-js/node_modules/source-map/lib/source-map/source-map-generator.js new file mode 100644 index 00000000..fb6d6c38 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/source-map/lib/source-map/source-map-generator.js @@ -0,0 +1,400 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var base64VLQ = require('./base64-vlq'); + var util = require('./util'); + var ArraySet = require('./array-set').ArraySet; + + /** + * An instance of the SourceMapGenerator represents a source map which is + * being built incrementally. You may pass an object with the following + * properties: + * + * - file: The filename of the generated source. + * - sourceRoot: A root for all relative URLs in this source map. + */ + function SourceMapGenerator(aArgs) { + if (!aArgs) { + aArgs = {}; + } + this._file = util.getArg(aArgs, 'file', null); + this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); + this._sources = new ArraySet(); + this._names = new ArraySet(); + this._mappings = []; + this._sourcesContents = null; + } + + SourceMapGenerator.prototype._version = 3; + + /** + * Creates a new SourceMapGenerator based on a SourceMapConsumer + * + * @param aSourceMapConsumer The SourceMap. + */ + SourceMapGenerator.fromSourceMap = + function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { + var sourceRoot = aSourceMapConsumer.sourceRoot; + var generator = new SourceMapGenerator({ + file: aSourceMapConsumer.file, + sourceRoot: sourceRoot + }); + aSourceMapConsumer.eachMapping(function (mapping) { + var newMapping = { + generated: { + line: mapping.generatedLine, + column: mapping.generatedColumn + } + }; + + if (mapping.source) { + newMapping.source = mapping.source; + if (sourceRoot) { + newMapping.source = util.relative(sourceRoot, newMapping.source); + } + + newMapping.original = { + line: mapping.originalLine, + column: mapping.originalColumn + }; + + if (mapping.name) { + newMapping.name = mapping.name; + } + } + + generator.addMapping(newMapping); + }); + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content) { + generator.setSourceContent(sourceFile, content); + } + }); + return generator; + }; + + /** + * Add a single mapping from original source line and column to the generated + * source's line and column for this source map being created. The mapping + * object should have the following properties: + * + * - generated: An object with the generated line and column positions. + * - original: An object with the original line and column positions. + * - source: The original source file (relative to the sourceRoot). + * - name: An optional original token name for this mapping. + */ + SourceMapGenerator.prototype.addMapping = + function SourceMapGenerator_addMapping(aArgs) { + var generated = util.getArg(aArgs, 'generated'); + var original = util.getArg(aArgs, 'original', null); + var source = util.getArg(aArgs, 'source', null); + var name = util.getArg(aArgs, 'name', null); + + this._validateMapping(generated, original, source, name); + + if (source && !this._sources.has(source)) { + this._sources.add(source); + } + + if (name && !this._names.has(name)) { + this._names.add(name); + } + + this._mappings.push({ + generatedLine: generated.line, + generatedColumn: generated.column, + originalLine: original != null && original.line, + originalColumn: original != null && original.column, + source: source, + name: name + }); + }; + + /** + * Set the source content for a source file. + */ + SourceMapGenerator.prototype.setSourceContent = + function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { + var source = aSourceFile; + if (this._sourceRoot) { + source = util.relative(this._sourceRoot, source); + } + + if (aSourceContent !== null) { + // Add the source content to the _sourcesContents map. + // Create a new _sourcesContents map if the property is null. + if (!this._sourcesContents) { + this._sourcesContents = {}; + } + this._sourcesContents[util.toSetString(source)] = aSourceContent; + } else { + // Remove the source file from the _sourcesContents map. + // If the _sourcesContents map is empty, set the property to null. + delete this._sourcesContents[util.toSetString(source)]; + if (Object.keys(this._sourcesContents).length === 0) { + this._sourcesContents = null; + } + } + }; + + /** + * Applies the mappings of a sub-source-map for a specific source file to the + * source map being generated. Each mapping to the supplied source file is + * rewritten using the supplied source map. Note: The resolution for the + * resulting mappings is the minimium of this map and the supplied map. + * + * @param aSourceMapConsumer The source map to be applied. + * @param aSourceFile Optional. The filename of the source file. + * If omitted, SourceMapConsumer's file property will be used. + * @param aSourceMapPath Optional. The dirname of the path to the source map + * to be applied. If relative, it is relative to the SourceMapConsumer. + * This parameter is needed when the two source maps aren't in the same + * directory, and the source map to be applied contains relative source + * paths. If so, those relative source paths need to be rewritten + * relative to the SourceMapGenerator. + */ + SourceMapGenerator.prototype.applySourceMap = + function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { + // If aSourceFile is omitted, we will use the file property of the SourceMap + if (!aSourceFile) { + if (!aSourceMapConsumer.file) { + throw new Error( + 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + + 'or the source map\'s "file" property. Both were omitted.' + ); + } + aSourceFile = aSourceMapConsumer.file; + } + var sourceRoot = this._sourceRoot; + // Make "aSourceFile" relative if an absolute Url is passed. + if (sourceRoot) { + aSourceFile = util.relative(sourceRoot, aSourceFile); + } + // Applying the SourceMap can add and remove items from the sources and + // the names array. + var newSources = new ArraySet(); + var newNames = new ArraySet(); + + // Find mappings for the "aSourceFile" + this._mappings.forEach(function (mapping) { + if (mapping.source === aSourceFile && mapping.originalLine) { + // Check if it can be mapped by the source map, then update the mapping. + var original = aSourceMapConsumer.originalPositionFor({ + line: mapping.originalLine, + column: mapping.originalColumn + }); + if (original.source !== null) { + // Copy mapping + mapping.source = original.source; + if (aSourceMapPath) { + mapping.source = util.join(aSourceMapPath, mapping.source) + } + if (sourceRoot) { + mapping.source = util.relative(sourceRoot, mapping.source); + } + mapping.originalLine = original.line; + mapping.originalColumn = original.column; + if (original.name !== null && mapping.name !== null) { + // Only use the identifier name if it's an identifier + // in both SourceMaps + mapping.name = original.name; + } + } + } + + var source = mapping.source; + if (source && !newSources.has(source)) { + newSources.add(source); + } + + var name = mapping.name; + if (name && !newNames.has(name)) { + newNames.add(name); + } + + }, this); + this._sources = newSources; + this._names = newNames; + + // Copy sourcesContents of applied map. + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content) { + if (aSourceMapPath) { + sourceFile = util.join(aSourceMapPath, sourceFile); + } + if (sourceRoot) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + this.setSourceContent(sourceFile, content); + } + }, this); + }; + + /** + * A mapping can have one of the three levels of data: + * + * 1. Just the generated position. + * 2. The Generated position, original position, and original source. + * 3. Generated and original position, original source, as well as a name + * token. + * + * To maintain consistency, we validate that any new mapping being added falls + * in to one of these categories. + */ + SourceMapGenerator.prototype._validateMapping = + function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, + aName) { + if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aGenerated.line > 0 && aGenerated.column >= 0 + && !aOriginal && !aSource && !aName) { + // Case 1. + return; + } + else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aOriginal && 'line' in aOriginal && 'column' in aOriginal + && aGenerated.line > 0 && aGenerated.column >= 0 + && aOriginal.line > 0 && aOriginal.column >= 0 + && aSource) { + // Cases 2 and 3. + return; + } + else { + throw new Error('Invalid mapping: ' + JSON.stringify({ + generated: aGenerated, + source: aSource, + original: aOriginal, + name: aName + })); + } + }; + + /** + * Serialize the accumulated mappings in to the stream of base 64 VLQs + * specified by the source map format. + */ + SourceMapGenerator.prototype._serializeMappings = + function SourceMapGenerator_serializeMappings() { + var previousGeneratedColumn = 0; + var previousGeneratedLine = 1; + var previousOriginalColumn = 0; + var previousOriginalLine = 0; + var previousName = 0; + var previousSource = 0; + var result = ''; + var mapping; + + // The mappings must be guaranteed to be in sorted order before we start + // serializing them or else the generated line numbers (which are defined + // via the ';' separators) will be all messed up. Note: it might be more + // performant to maintain the sorting as we insert them, rather than as we + // serialize them, but the big O is the same either way. + this._mappings.sort(util.compareByGeneratedPositions); + + for (var i = 0, len = this._mappings.length; i < len; i++) { + mapping = this._mappings[i]; + + if (mapping.generatedLine !== previousGeneratedLine) { + previousGeneratedColumn = 0; + while (mapping.generatedLine !== previousGeneratedLine) { + result += ';'; + previousGeneratedLine++; + } + } + else { + if (i > 0) { + if (!util.compareByGeneratedPositions(mapping, this._mappings[i - 1])) { + continue; + } + result += ','; + } + } + + result += base64VLQ.encode(mapping.generatedColumn + - previousGeneratedColumn); + previousGeneratedColumn = mapping.generatedColumn; + + if (mapping.source) { + result += base64VLQ.encode(this._sources.indexOf(mapping.source) + - previousSource); + previousSource = this._sources.indexOf(mapping.source); + + // lines are stored 0-based in SourceMap spec version 3 + result += base64VLQ.encode(mapping.originalLine - 1 + - previousOriginalLine); + previousOriginalLine = mapping.originalLine - 1; + + result += base64VLQ.encode(mapping.originalColumn + - previousOriginalColumn); + previousOriginalColumn = mapping.originalColumn; + + if (mapping.name) { + result += base64VLQ.encode(this._names.indexOf(mapping.name) + - previousName); + previousName = this._names.indexOf(mapping.name); + } + } + } + + return result; + }; + + SourceMapGenerator.prototype._generateSourcesContent = + function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { + return aSources.map(function (source) { + if (!this._sourcesContents) { + return null; + } + if (aSourceRoot) { + source = util.relative(aSourceRoot, source); + } + var key = util.toSetString(source); + return Object.prototype.hasOwnProperty.call(this._sourcesContents, + key) + ? this._sourcesContents[key] + : null; + }, this); + }; + + /** + * Externalize the source map. + */ + SourceMapGenerator.prototype.toJSON = + function SourceMapGenerator_toJSON() { + var map = { + version: this._version, + file: this._file, + sources: this._sources.toArray(), + names: this._names.toArray(), + mappings: this._serializeMappings() + }; + if (this._sourceRoot) { + map.sourceRoot = this._sourceRoot; + } + if (this._sourcesContents) { + map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); + } + + return map; + }; + + /** + * Render the source map being generated to a string. + */ + SourceMapGenerator.prototype.toString = + function SourceMapGenerator_toString() { + return JSON.stringify(this); + }; + + exports.SourceMapGenerator = SourceMapGenerator; + +}); diff --git a/bin/node_modules/uglify-js/node_modules/source-map/lib/source-map/source-node.js b/bin/node_modules/uglify-js/node_modules/source-map/lib/source-map/source-node.js new file mode 100644 index 00000000..66a2ebc5 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/source-map/lib/source-map/source-node.js @@ -0,0 +1,400 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var SourceMapGenerator = require('./source-map-generator').SourceMapGenerator; + var util = require('./util'); + + // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other + // operating systems these days (capturing the result). + var REGEX_NEWLINE = /(\r?\n)/g; + + // Matches a Windows-style newline, or any character. + var REGEX_CHARACTER = /\r\n|[\s\S]/g; + + /** + * SourceNodes provide a way to abstract over interpolating/concatenating + * snippets of generated JavaScript source code while maintaining the line and + * column information associated with the original source code. + * + * @param aLine The original line number. + * @param aColumn The original column number. + * @param aSource The original source's filename. + * @param aChunks Optional. An array of strings which are snippets of + * generated JS, or other SourceNodes. + * @param aName The original identifier. + */ + function SourceNode(aLine, aColumn, aSource, aChunks, aName) { + this.children = []; + this.sourceContents = {}; + this.line = aLine === undefined ? null : aLine; + this.column = aColumn === undefined ? null : aColumn; + this.source = aSource === undefined ? null : aSource; + this.name = aName === undefined ? null : aName; + if (aChunks != null) this.add(aChunks); + } + + /** + * Creates a SourceNode from generated code and a SourceMapConsumer. + * + * @param aGeneratedCode The generated code + * @param aSourceMapConsumer The SourceMap for the generated code + */ + SourceNode.fromStringWithSourceMap = + function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer) { + // The SourceNode we want to fill with the generated code + // and the SourceMap + var node = new SourceNode(); + + // All even indices of this array are one line of the generated code, + // while all odd indices are the newlines between two adjacent lines + // (since `REGEX_NEWLINE` captures its match). + // Processed fragments are removed from this array, by calling `shiftNextLine`. + var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); + var shiftNextLine = function() { + var lineContents = remainingLines.shift(); + // The last line of a file might not have a newline. + var newLine = remainingLines.shift() || ""; + return lineContents + newLine; + }; + + // We need to remember the position of "remainingLines" + var lastGeneratedLine = 1, lastGeneratedColumn = 0; + + // The generate SourceNodes we need a code range. + // To extract it current and last mapping is used. + // Here we store the last mapping. + var lastMapping = null; + + aSourceMapConsumer.eachMapping(function (mapping) { + if (lastMapping !== null) { + // We add the code from "lastMapping" to "mapping": + // First check if there is a new line in between. + if (lastGeneratedLine < mapping.generatedLine) { + var code = ""; + // Associate first line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + lastGeneratedLine++; + lastGeneratedColumn = 0; + // The remaining code is added without mapping + } else { + // There is no new line in between. + // Associate the code between "lastGeneratedColumn" and + // "mapping.generatedColumn" with "lastMapping" + var nextLine = remainingLines[0]; + var code = nextLine.substr(0, mapping.generatedColumn - + lastGeneratedColumn); + remainingLines[0] = nextLine.substr(mapping.generatedColumn - + lastGeneratedColumn); + lastGeneratedColumn = mapping.generatedColumn; + addMappingWithCode(lastMapping, code); + // No more remaining code, continue + lastMapping = mapping; + return; + } + } + // We add the generated code until the first mapping + // to the SourceNode without any mapping. + // Each line is added as separate string. + while (lastGeneratedLine < mapping.generatedLine) { + node.add(shiftNextLine()); + lastGeneratedLine++; + } + if (lastGeneratedColumn < mapping.generatedColumn) { + var nextLine = remainingLines[0]; + node.add(nextLine.substr(0, mapping.generatedColumn)); + remainingLines[0] = nextLine.substr(mapping.generatedColumn); + lastGeneratedColumn = mapping.generatedColumn; + } + lastMapping = mapping; + }, this); + // We have processed all mappings. + if (remainingLines.length > 0) { + if (lastMapping) { + // Associate the remaining code in the current line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + } + // and add the remaining lines without any mapping + node.add(remainingLines.join("")); + } + + // Copy sourcesContent into SourceNode + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content) { + node.setSourceContent(sourceFile, content); + } + }); + + return node; + + function addMappingWithCode(mapping, code) { + if (mapping === null || mapping.source === undefined) { + node.add(code); + } else { + node.add(new SourceNode(mapping.originalLine, + mapping.originalColumn, + mapping.source, + code, + mapping.name)); + } + } + }; + + /** + * Add a chunk of generated JS to this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + SourceNode.prototype.add = function SourceNode_add(aChunk) { + if (Array.isArray(aChunk)) { + aChunk.forEach(function (chunk) { + this.add(chunk); + }, this); + } + else if (aChunk instanceof SourceNode || typeof aChunk === "string") { + if (aChunk) { + this.children.push(aChunk); + } + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + + /** + * Add a chunk of generated JS to the beginning of this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { + if (Array.isArray(aChunk)) { + for (var i = aChunk.length-1; i >= 0; i--) { + this.prepend(aChunk[i]); + } + } + else if (aChunk instanceof SourceNode || typeof aChunk === "string") { + this.children.unshift(aChunk); + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + + /** + * Walk over the tree of JS snippets in this node and its children. The + * walking function is called once for each snippet of JS and is passed that + * snippet and the its original associated source's line/column location. + * + * @param aFn The traversal function. + */ + SourceNode.prototype.walk = function SourceNode_walk(aFn) { + var chunk; + for (var i = 0, len = this.children.length; i < len; i++) { + chunk = this.children[i]; + if (chunk instanceof SourceNode) { + chunk.walk(aFn); + } + else { + if (chunk !== '') { + aFn(chunk, { source: this.source, + line: this.line, + column: this.column, + name: this.name }); + } + } + } + }; + + /** + * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between + * each of `this.children`. + * + * @param aSep The separator. + */ + SourceNode.prototype.join = function SourceNode_join(aSep) { + var newChildren; + var i; + var len = this.children.length; + if (len > 0) { + newChildren = []; + for (i = 0; i < len-1; i++) { + newChildren.push(this.children[i]); + newChildren.push(aSep); + } + newChildren.push(this.children[i]); + this.children = newChildren; + } + return this; + }; + + /** + * Call String.prototype.replace on the very right-most source snippet. Useful + * for trimming whitespace from the end of a source node, etc. + * + * @param aPattern The pattern to replace. + * @param aReplacement The thing to replace the pattern with. + */ + SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { + var lastChild = this.children[this.children.length - 1]; + if (lastChild instanceof SourceNode) { + lastChild.replaceRight(aPattern, aReplacement); + } + else if (typeof lastChild === 'string') { + this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); + } + else { + this.children.push(''.replace(aPattern, aReplacement)); + } + return this; + }; + + /** + * Set the source content for a source file. This will be added to the SourceMapGenerator + * in the sourcesContent field. + * + * @param aSourceFile The filename of the source file + * @param aSourceContent The content of the source file + */ + SourceNode.prototype.setSourceContent = + function SourceNode_setSourceContent(aSourceFile, aSourceContent) { + this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; + }; + + /** + * Walk over the tree of SourceNodes. The walking function is called for each + * source file content and is passed the filename and source content. + * + * @param aFn The traversal function. + */ + SourceNode.prototype.walkSourceContents = + function SourceNode_walkSourceContents(aFn) { + for (var i = 0, len = this.children.length; i < len; i++) { + if (this.children[i] instanceof SourceNode) { + this.children[i].walkSourceContents(aFn); + } + } + + var sources = Object.keys(this.sourceContents); + for (var i = 0, len = sources.length; i < len; i++) { + aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); + } + }; + + /** + * Return the string representation of this source node. Walks over the tree + * and concatenates all the various snippets together to one string. + */ + SourceNode.prototype.toString = function SourceNode_toString() { + var str = ""; + this.walk(function (chunk) { + str += chunk; + }); + return str; + }; + + /** + * Returns the string representation of this source node along with a source + * map. + */ + SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { + var generated = { + code: "", + line: 1, + column: 0 + }; + var map = new SourceMapGenerator(aArgs); + var sourceMappingActive = false; + var lastOriginalSource = null; + var lastOriginalLine = null; + var lastOriginalColumn = null; + var lastOriginalName = null; + this.walk(function (chunk, original) { + generated.code += chunk; + if (original.source !== null + && original.line !== null + && original.column !== null) { + if(lastOriginalSource !== original.source + || lastOriginalLine !== original.line + || lastOriginalColumn !== original.column + || lastOriginalName !== original.name) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + lastOriginalSource = original.source; + lastOriginalLine = original.line; + lastOriginalColumn = original.column; + lastOriginalName = original.name; + sourceMappingActive = true; + } else if (sourceMappingActive) { + map.addMapping({ + generated: { + line: generated.line, + column: generated.column + } + }); + lastOriginalSource = null; + sourceMappingActive = false; + } + chunk.match(REGEX_CHARACTER).forEach(function (ch, idx, array) { + if (REGEX_NEWLINE.test(ch)) { + generated.line++; + generated.column = 0; + // Mappings end at eol + if (idx + 1 === array.length) { + lastOriginalSource = null; + sourceMappingActive = false; + } else if (sourceMappingActive) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + } else { + generated.column += ch.length; + } + }); + }); + this.walkSourceContents(function (sourceFile, sourceContent) { + map.setSourceContent(sourceFile, sourceContent); + }); + + return { code: generated.code, map: map }; + }; + + exports.SourceNode = SourceNode; + +}); diff --git a/bin/node_modules/uglify-js/node_modules/source-map/lib/source-map/util.js b/bin/node_modules/uglify-js/node_modules/source-map/lib/source-map/util.js new file mode 100644 index 00000000..4316445f --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/source-map/lib/source-map/util.js @@ -0,0 +1,302 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + /** + * This is a helper function for getting values from parameter/options + * objects. + * + * @param args The object we are extracting values from + * @param name The name of the property we are getting. + * @param defaultValue An optional value to return if the property is missing + * from the object. If this is not specified and the property is missing, an + * error will be thrown. + */ + function getArg(aArgs, aName, aDefaultValue) { + if (aName in aArgs) { + return aArgs[aName]; + } else if (arguments.length === 3) { + return aDefaultValue; + } else { + throw new Error('"' + aName + '" is a required argument.'); + } + } + exports.getArg = getArg; + + var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/; + var dataUrlRegexp = /^data:.+\,.+$/; + + function urlParse(aUrl) { + var match = aUrl.match(urlRegexp); + if (!match) { + return null; + } + return { + scheme: match[1], + auth: match[2], + host: match[3], + port: match[4], + path: match[5] + }; + } + exports.urlParse = urlParse; + + function urlGenerate(aParsedUrl) { + var url = ''; + if (aParsedUrl.scheme) { + url += aParsedUrl.scheme + ':'; + } + url += '//'; + if (aParsedUrl.auth) { + url += aParsedUrl.auth + '@'; + } + if (aParsedUrl.host) { + url += aParsedUrl.host; + } + if (aParsedUrl.port) { + url += ":" + aParsedUrl.port + } + if (aParsedUrl.path) { + url += aParsedUrl.path; + } + return url; + } + exports.urlGenerate = urlGenerate; + + /** + * Normalizes a path, or the path portion of a URL: + * + * - Replaces consequtive slashes with one slash. + * - Removes unnecessary '.' parts. + * - Removes unnecessary '/..' parts. + * + * Based on code in the Node.js 'path' core module. + * + * @param aPath The path or url to normalize. + */ + function normalize(aPath) { + var path = aPath; + var url = urlParse(aPath); + if (url) { + if (!url.path) { + return aPath; + } + path = url.path; + } + var isAbsolute = (path.charAt(0) === '/'); + + var parts = path.split(/\/+/); + for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { + part = parts[i]; + if (part === '.') { + parts.splice(i, 1); + } else if (part === '..') { + up++; + } else if (up > 0) { + if (part === '') { + // The first part is blank if the path is absolute. Trying to go + // above the root is a no-op. Therefore we can remove all '..' parts + // directly after the root. + parts.splice(i + 1, up); + up = 0; + } else { + parts.splice(i, 2); + up--; + } + } + } + path = parts.join('/'); + + if (path === '') { + path = isAbsolute ? '/' : '.'; + } + + if (url) { + url.path = path; + return urlGenerate(url); + } + return path; + } + exports.normalize = normalize; + + /** + * Joins two paths/URLs. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be joined with the root. + * + * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a + * scheme-relative URL: Then the scheme of aRoot, if any, is prepended + * first. + * - Otherwise aPath is a path. If aRoot is a URL, then its path portion + * is updated with the result and aRoot is returned. Otherwise the result + * is returned. + * - If aPath is absolute, the result is aPath. + * - Otherwise the two paths are joined with a slash. + * - Joining for example 'http://' and 'www.example.com' is also supported. + */ + function join(aRoot, aPath) { + var aPathUrl = urlParse(aPath); + var aRootUrl = urlParse(aRoot); + if (aRootUrl) { + aRoot = aRootUrl.path || '/'; + } + + // `join(foo, '//www.example.org')` + if (aPathUrl && !aPathUrl.scheme) { + if (aRootUrl) { + aPathUrl.scheme = aRootUrl.scheme; + } + return urlGenerate(aPathUrl); + } + + if (aPathUrl || aPath.match(dataUrlRegexp)) { + return aPath; + } + + // `join('http://', 'www.example.com')` + if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { + aRootUrl.host = aPath; + return urlGenerate(aRootUrl); + } + + var joined = aPath.charAt(0) === '/' + ? aPath + : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); + + if (aRootUrl) { + aRootUrl.path = joined; + return urlGenerate(aRootUrl); + } + return joined; + } + exports.join = join; + + /** + * Because behavior goes wacky when you set `__proto__` on objects, we + * have to prefix all the strings in our set with an arbitrary character. + * + * See https://github.com/mozilla/source-map/pull/31 and + * https://github.com/mozilla/source-map/issues/30 + * + * @param String aStr + */ + function toSetString(aStr) { + return '$' + aStr; + } + exports.toSetString = toSetString; + + function fromSetString(aStr) { + return aStr.substr(1); + } + exports.fromSetString = fromSetString; + + function relative(aRoot, aPath) { + aRoot = aRoot.replace(/\/$/, ''); + + var url = urlParse(aRoot); + if (aPath.charAt(0) == "/" && url && url.path == "/") { + return aPath.slice(1); + } + + return aPath.indexOf(aRoot + '/') === 0 + ? aPath.substr(aRoot.length + 1) + : aPath; + } + exports.relative = relative; + + function strcmp(aStr1, aStr2) { + var s1 = aStr1 || ""; + var s2 = aStr2 || ""; + return (s1 > s2) - (s1 < s2); + } + + /** + * Comparator between two mappings where the original positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same original source/line/column, but different generated + * line and column the same. Useful when searching for a mapping with a + * stubbed out mapping. + */ + function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { + var cmp; + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp || onlyCompareOriginal) { + return cmp; + } + + cmp = strcmp(mappingA.name, mappingB.name); + if (cmp) { + return cmp; + } + + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp) { + return cmp; + } + + return mappingA.generatedColumn - mappingB.generatedColumn; + }; + exports.compareByOriginalPositions = compareByOriginalPositions; + + /** + * Comparator between two mappings where the generated positions are + * compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same generated line and column, but different + * source/name/original line and column the same. Useful when searching for a + * mapping with a stubbed out mapping. + */ + function compareByGeneratedPositions(mappingA, mappingB, onlyCompareGenerated) { + var cmp; + + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp || onlyCompareGenerated) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + }; + exports.compareByGeneratedPositions = compareByGeneratedPositions; + +}); diff --git a/bin/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/LICENSE b/bin/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/LICENSE new file mode 100644 index 00000000..f33d665d --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/LICENSE @@ -0,0 +1,58 @@ +amdefine is released under two licenses: new BSD, and MIT. You may pick the +license that best suits your development needs. The text of both licenses are +provided below. + + +The "New" BSD License: +---------------------- + +Copyright (c) 2011, The Dojo Foundation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of the Dojo Foundation nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + +MIT License +----------- + +Copyright (c) 2011, The Dojo Foundation + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/bin/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/README.md b/bin/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/README.md new file mode 100644 index 00000000..c6995c07 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/README.md @@ -0,0 +1,171 @@ +# amdefine + +A module that can be used to implement AMD's define() in Node. This allows you +to code to the AMD API and have the module work in node programs without +requiring those other programs to use AMD. + +## Usage + +**1)** Update your package.json to indicate amdefine as a dependency: + +```javascript + "dependencies": { + "amdefine": ">=0.1.0" + } +``` + +Then run `npm install` to get amdefine into your project. + +**2)** At the top of each module that uses define(), place this code: + +```javascript +if (typeof define !== 'function') { var define = require('amdefine')(module) } +``` + +**Only use these snippets** when loading amdefine. If you preserve the basic structure, +with the braces, it will be stripped out when using the [RequireJS optimizer](#optimizer). + +You can add spaces, line breaks and even require amdefine with a local path, but +keep the rest of the structure to get the stripping behavior. + +As you may know, because `if` statements in JavaScript don't have their own scope, the var +declaration in the above snippet is made whether the `if` expression is truthy or not. If +RequireJS is loaded then the declaration is superfluous because `define` is already already +declared in the same scope in RequireJS. Fortunately JavaScript handles multiple `var` +declarations of the same variable in the same scope gracefully. + +If you want to deliver amdefine.js with your code rather than specifying it as a dependency +with npm, then just download the latest release and refer to it using a relative path: + +[Latest Version](https://github.com/jrburke/amdefine/raw/latest/amdefine.js) + +### amdefine/intercept + +Consider this very experimental. + +Instead of pasting the piece of text for the amdefine setup of a `define` +variable in each module you create or consume, you can use `amdefine/intercept` +instead. It will automatically insert the above snippet in each .js file loaded +by Node. + +**Warning**: you should only use this if you are creating an application that +is consuming AMD style defined()'d modules that are distributed via npm and want +to run that code in Node. + +For library code where you are not sure if it will be used by others in Node or +in the browser, then explicitly depending on amdefine and placing the code +snippet above is suggested path, instead of using `amdefine/intercept`. The +intercept module affects all .js files loaded in the Node app, and it is +inconsiderate to modify global state like that unless you are also controlling +the top level app. + +#### Why distribute AMD-style nodes via npm? + +npm has a lot of weaknesses for front-end use (installed layout is not great, +should have better support for the `baseUrl + moduleID + '.js' style of loading, +single file JS installs), but some people want a JS package manager and are +willing to live with those constraints. If that is you, but still want to author +in AMD style modules to get dynamic require([]), better direct source usage and +powerful loader plugin support in the browser, then this tool can help. + +#### amdefine/intercept usage + +Just require it in your top level app module (for example index.js, server.js): + +```javascript +require('amdefine/intercept'); +``` + +The module does not return a value, so no need to assign the result to a local +variable. + +Then just require() code as you normally would with Node's require(). Any .js +loaded after the intercept require will have the amdefine check injected in +the .js source as it is loaded. It does not modify the source on disk, just +prepends some content to the text of the module as it is loaded by Node. + +#### How amdefine/intercept works + +It overrides the `Module._extensions['.js']` in Node to automatically prepend +the amdefine snippet above. So, it will affect any .js file loaded by your +app. + +## define() usage + +It is best if you use the anonymous forms of define() in your module: + +```javascript +define(function (require) { + var dependency = require('dependency'); +}); +``` + +or + +```javascript +define(['dependency'], function (dependency) { + +}); +``` + +## RequireJS optimizer integration. + +Version 1.0.3 of the [RequireJS optimizer](http://requirejs.org/docs/optimization.html) +will have support for stripping the `if (typeof define !== 'function')` check +mentioned above, so you can include this snippet for code that runs in the +browser, but avoid taking the cost of the if() statement once the code is +optimized for deployment. + +## Node 0.4 Support + +If you want to support Node 0.4, then add `require` as the second parameter to amdefine: + +```javascript +//Only if you want Node 0.4. If using 0.5 or later, use the above snippet. +if (typeof define !== 'function') { var define = require('amdefine')(module, require) } +``` + +## Limitations + +### Synchronous vs Asynchronous + +amdefine creates a define() function that is callable by your code. It will +execute and trace dependencies and call the factory function *synchronously*, +to keep the behavior in line with Node's synchronous dependency tracing. + +The exception: calling AMD's callback-style require() from inside a factory +function. The require callback is called on process.nextTick(): + +```javascript +define(function (require) { + require(['a'], function(a) { + //'a' is loaded synchronously, but + //this callback is called on process.nextTick(). + }); +}); +``` + +### Loader Plugins + +Loader plugins are supported as long as they call their load() callbacks +synchronously. So ones that do network requests will not work. However plugins +like [text](http://requirejs.org/docs/api.html#text) can load text files locally. + +The plugin API's `load.fromText()` is **not supported** in amdefine, so this means +transpiler plugins like the [CoffeeScript loader plugin](https://github.com/jrburke/require-cs) +will not work. This may be fixable, but it is a bit complex, and I do not have +enough node-fu to figure it out yet. See the source for amdefine.js if you want +to get an idea of the issues involved. + +## Tests + +To run the tests, cd to **tests** and run: + +``` +node all.js +node all-intercept.js +``` + +## License + +New BSD and MIT. Check the LICENSE file for all the details. diff --git a/bin/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/amdefine.js b/bin/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/amdefine.js new file mode 100644 index 00000000..53bf5a68 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/amdefine.js @@ -0,0 +1,299 @@ +/** vim: et:ts=4:sw=4:sts=4 + * @license amdefine 0.1.0 Copyright (c) 2011, The Dojo Foundation All Rights Reserved. + * Available via the MIT or new BSD license. + * see: http://github.com/jrburke/amdefine for details + */ + +/*jslint node: true */ +/*global module, process */ +'use strict'; + +/** + * Creates a define for node. + * @param {Object} module the "module" object that is defined by Node for the + * current module. + * @param {Function} [requireFn]. Node's require function for the current module. + * It only needs to be passed in Node versions before 0.5, when module.require + * did not exist. + * @returns {Function} a define function that is usable for the current node + * module. + */ +function amdefine(module, requireFn) { + 'use strict'; + var defineCache = {}, + loaderCache = {}, + alreadyCalled = false, + path = require('path'), + makeRequire, stringRequire; + + /** + * Trims the . and .. from an array of path segments. + * It will keep a leading path segment if a .. will become + * the first path segment, to help with module name lookups, + * which act like paths, but can be remapped. But the end result, + * all paths that use this function should look normalized. + * NOTE: this method MODIFIES the input array. + * @param {Array} ary the array of path segments. + */ + function trimDots(ary) { + var i, part; + for (i = 0; ary[i]; i+= 1) { + part = ary[i]; + if (part === '.') { + ary.splice(i, 1); + i -= 1; + } else if (part === '..') { + if (i === 1 && (ary[2] === '..' || ary[0] === '..')) { + //End of the line. Keep at least one non-dot + //path segment at the front so it can be mapped + //correctly to disk. Otherwise, there is likely + //no path mapping for a path starting with '..'. + //This can still fail, but catches the most reasonable + //uses of .. + break; + } else if (i > 0) { + ary.splice(i - 1, 2); + i -= 2; + } + } + } + } + + function normalize(name, baseName) { + var baseParts; + + //Adjust any relative paths. + if (name && name.charAt(0) === '.') { + //If have a base name, try to normalize against it, + //otherwise, assume it is a top-level require that will + //be relative to baseUrl in the end. + if (baseName) { + baseParts = baseName.split('/'); + baseParts = baseParts.slice(0, baseParts.length - 1); + baseParts = baseParts.concat(name.split('/')); + trimDots(baseParts); + name = baseParts.join('/'); + } + } + + return name; + } + + /** + * Create the normalize() function passed to a loader plugin's + * normalize method. + */ + function makeNormalize(relName) { + return function (name) { + return normalize(name, relName); + }; + } + + function makeLoad(id) { + function load(value) { + loaderCache[id] = value; + } + + load.fromText = function (id, text) { + //This one is difficult because the text can/probably uses + //define, and any relative paths and requires should be relative + //to that id was it would be found on disk. But this would require + //bootstrapping a module/require fairly deeply from node core. + //Not sure how best to go about that yet. + throw new Error('amdefine does not implement load.fromText'); + }; + + return load; + } + + makeRequire = function (systemRequire, exports, module, relId) { + function amdRequire(deps, callback) { + if (typeof deps === 'string') { + //Synchronous, single module require('') + return stringRequire(systemRequire, exports, module, deps, relId); + } else { + //Array of dependencies with a callback. + + //Convert the dependencies to modules. + deps = deps.map(function (depName) { + return stringRequire(systemRequire, exports, module, depName, relId); + }); + + //Wait for next tick to call back the require call. + process.nextTick(function () { + callback.apply(null, deps); + }); + } + } + + amdRequire.toUrl = function (filePath) { + if (filePath.indexOf('.') === 0) { + return normalize(filePath, path.dirname(module.filename)); + } else { + return filePath; + } + }; + + return amdRequire; + }; + + //Favor explicit value, passed in if the module wants to support Node 0.4. + requireFn = requireFn || function req() { + return module.require.apply(module, arguments); + }; + + function runFactory(id, deps, factory) { + var r, e, m, result; + + if (id) { + e = loaderCache[id] = {}; + m = { + id: id, + uri: __filename, + exports: e + }; + r = makeRequire(requireFn, e, m, id); + } else { + //Only support one define call per file + if (alreadyCalled) { + throw new Error('amdefine with no module ID cannot be called more than once per file.'); + } + alreadyCalled = true; + + //Use the real variables from node + //Use module.exports for exports, since + //the exports in here is amdefine exports. + e = module.exports; + m = module; + r = makeRequire(requireFn, e, m, module.id); + } + + //If there are dependencies, they are strings, so need + //to convert them to dependency values. + if (deps) { + deps = deps.map(function (depName) { + return r(depName); + }); + } + + //Call the factory with the right dependencies. + if (typeof factory === 'function') { + result = factory.apply(m.exports, deps); + } else { + result = factory; + } + + if (result !== undefined) { + m.exports = result; + if (id) { + loaderCache[id] = m.exports; + } + } + } + + stringRequire = function (systemRequire, exports, module, id, relId) { + //Split the ID by a ! so that + var index = id.indexOf('!'), + originalId = id, + prefix, plugin; + + if (index === -1) { + id = normalize(id, relId); + + //Straight module lookup. If it is one of the special dependencies, + //deal with it, otherwise, delegate to node. + if (id === 'require') { + return makeRequire(systemRequire, exports, module, relId); + } else if (id === 'exports') { + return exports; + } else if (id === 'module') { + return module; + } else if (loaderCache.hasOwnProperty(id)) { + return loaderCache[id]; + } else if (defineCache[id]) { + runFactory.apply(null, defineCache[id]); + return loaderCache[id]; + } else { + if(systemRequire) { + return systemRequire(originalId); + } else { + throw new Error('No module with ID: ' + id); + } + } + } else { + //There is a plugin in play. + prefix = id.substring(0, index); + id = id.substring(index + 1, id.length); + + plugin = stringRequire(systemRequire, exports, module, prefix, relId); + + if (plugin.normalize) { + id = plugin.normalize(id, makeNormalize(relId)); + } else { + //Normalize the ID normally. + id = normalize(id, relId); + } + + if (loaderCache[id]) { + return loaderCache[id]; + } else { + plugin.load(id, makeRequire(systemRequire, exports, module, relId), makeLoad(id), {}); + + return loaderCache[id]; + } + } + }; + + //Create a define function specific to the module asking for amdefine. + function define(id, deps, factory) { + if (Array.isArray(id)) { + factory = deps; + deps = id; + id = undefined; + } else if (typeof id !== 'string') { + factory = id; + id = deps = undefined; + } + + if (deps && !Array.isArray(deps)) { + factory = deps; + deps = undefined; + } + + if (!deps) { + deps = ['require', 'exports', 'module']; + } + + //Set up properties for this module. If an ID, then use + //internal cache. If no ID, then use the external variables + //for this node module. + if (id) { + //Put the module in deep freeze until there is a + //require call for it. + defineCache[id] = [id, deps, factory]; + } else { + runFactory(id, deps, factory); + } + } + + //define.require, which has access to all the values in the + //cache. Useful for AMD modules that all have IDs in the file, + //but need to finally export a value to node based on one of those + //IDs. + define.require = function (id) { + if (loaderCache[id]) { + return loaderCache[id]; + } + + if (defineCache[id]) { + runFactory.apply(null, defineCache[id]); + return loaderCache[id]; + } + }; + + define.amd = {}; + + return define; +} + +module.exports = amdefine; diff --git a/bin/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/intercept.js b/bin/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/intercept.js new file mode 100644 index 00000000..771a9830 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/intercept.js @@ -0,0 +1,36 @@ +/*jshint node: true */ +var inserted, + Module = require('module'), + fs = require('fs'), + existingExtFn = Module._extensions['.js'], + amdefineRegExp = /amdefine\.js/; + +inserted = "if (typeof define !== 'function') {var define = require('amdefine')(module)}"; + +//From the node/lib/module.js source: +function stripBOM(content) { + // Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) + // because the buffer-to-string conversion in `fs.readFileSync()` + // translates it to FEFF, the UTF-16 BOM. + if (content.charCodeAt(0) === 0xFEFF) { + content = content.slice(1); + } + return content; +} + +//Also adapted from the node/lib/module.js source: +function intercept(module, filename) { + var content = stripBOM(fs.readFileSync(filename, 'utf8')); + + if (!amdefineRegExp.test(module.id)) { + content = inserted + content; + } + + module._compile(content, filename); +} + +intercept._id = 'amdefine/intercept'; + +if (!existingExtFn._id || existingExtFn._id !== intercept._id) { + Module._extensions['.js'] = intercept; +} diff --git a/bin/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/package.json b/bin/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/package.json new file mode 100644 index 00000000..035494a2 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/package.json @@ -0,0 +1,38 @@ +{ + "name": "amdefine", + "description": "Provide AMD's define() API for declaring modules in the AMD format", + "version": "0.1.0", + "homepage": "http://github.com/jrburke/amdefine", + "author": { + "name": "James Burke", + "email": "jrburke@gmail.com", + "url": "http://github.com/jrburke" + }, + "licenses": [ + { + "type": "BSD", + "url": "https://github.com/jrburke/amdefine/blob/master/LICENSE" + }, + { + "type": "MIT", + "url": "https://github.com/jrburke/amdefine/blob/master/LICENSE" + } + ], + "repository": { + "type": "git", + "url": "https://github.com/jrburke/amdefine.git" + }, + "main": "./amdefine.js", + "engines": { + "node": ">=0.4.2" + }, + "readme": "# amdefine\n\nA module that can be used to implement AMD's define() in Node. This allows you\nto code to the AMD API and have the module work in node programs without\nrequiring those other programs to use AMD.\n\n## Usage\n\n**1)** Update your package.json to indicate amdefine as a dependency:\n\n```javascript\n \"dependencies\": {\n \"amdefine\": \">=0.1.0\"\n }\n```\n\nThen run `npm install` to get amdefine into your project.\n\n**2)** At the top of each module that uses define(), place this code:\n\n```javascript\nif (typeof define !== 'function') { var define = require('amdefine')(module) }\n```\n\n**Only use these snippets** when loading amdefine. If you preserve the basic structure,\nwith the braces, it will be stripped out when using the [RequireJS optimizer](#optimizer).\n\nYou can add spaces, line breaks and even require amdefine with a local path, but\nkeep the rest of the structure to get the stripping behavior.\n\nAs you may know, because `if` statements in JavaScript don't have their own scope, the var\ndeclaration in the above snippet is made whether the `if` expression is truthy or not. If\nRequireJS is loaded then the declaration is superfluous because `define` is already already\ndeclared in the same scope in RequireJS. Fortunately JavaScript handles multiple `var`\ndeclarations of the same variable in the same scope gracefully.\n\nIf you want to deliver amdefine.js with your code rather than specifying it as a dependency\nwith npm, then just download the latest release and refer to it using a relative path:\n\n[Latest Version](https://github.com/jrburke/amdefine/raw/latest/amdefine.js)\n\n### amdefine/intercept\n\nConsider this very experimental.\n\nInstead of pasting the piece of text for the amdefine setup of a `define`\nvariable in each module you create or consume, you can use `amdefine/intercept`\ninstead. It will automatically insert the above snippet in each .js file loaded\nby Node.\n\n**Warning**: you should only use this if you are creating an application that\nis consuming AMD style defined()'d modules that are distributed via npm and want\nto run that code in Node.\n\nFor library code where you are not sure if it will be used by others in Node or\nin the browser, then explicitly depending on amdefine and placing the code\nsnippet above is suggested path, instead of using `amdefine/intercept`. The\nintercept module affects all .js files loaded in the Node app, and it is\ninconsiderate to modify global state like that unless you are also controlling\nthe top level app.\n\n#### Why distribute AMD-style nodes via npm?\n\nnpm has a lot of weaknesses for front-end use (installed layout is not great,\nshould have better support for the `baseUrl + moduleID + '.js' style of loading,\nsingle file JS installs), but some people want a JS package manager and are\nwilling to live with those constraints. If that is you, but still want to author\nin AMD style modules to get dynamic require([]), better direct source usage and\npowerful loader plugin support in the browser, then this tool can help.\n\n#### amdefine/intercept usage\n\nJust require it in your top level app module (for example index.js, server.js):\n\n```javascript\nrequire('amdefine/intercept');\n```\n\nThe module does not return a value, so no need to assign the result to a local\nvariable.\n\nThen just require() code as you normally would with Node's require(). Any .js\nloaded after the intercept require will have the amdefine check injected in\nthe .js source as it is loaded. It does not modify the source on disk, just\nprepends some content to the text of the module as it is loaded by Node.\n\n#### How amdefine/intercept works\n\nIt overrides the `Module._extensions['.js']` in Node to automatically prepend\nthe amdefine snippet above. So, it will affect any .js file loaded by your\napp.\n\n## define() usage\n\nIt is best if you use the anonymous forms of define() in your module:\n\n```javascript\ndefine(function (require) {\n var dependency = require('dependency');\n});\n```\n\nor\n\n```javascript\ndefine(['dependency'], function (dependency) {\n\n});\n```\n\n## RequireJS optimizer integration. \n\nVersion 1.0.3 of the [RequireJS optimizer](http://requirejs.org/docs/optimization.html)\nwill have support for stripping the `if (typeof define !== 'function')` check\nmentioned above, so you can include this snippet for code that runs in the\nbrowser, but avoid taking the cost of the if() statement once the code is\noptimized for deployment.\n\n## Node 0.4 Support\n\nIf you want to support Node 0.4, then add `require` as the second parameter to amdefine:\n\n```javascript\n//Only if you want Node 0.4. If using 0.5 or later, use the above snippet.\nif (typeof define !== 'function') { var define = require('amdefine')(module, require) }\n```\n\n## Limitations\n\n### Synchronous vs Asynchronous\n\namdefine creates a define() function that is callable by your code. It will\nexecute and trace dependencies and call the factory function *synchronously*,\nto keep the behavior in line with Node's synchronous dependency tracing.\n\nThe exception: calling AMD's callback-style require() from inside a factory\nfunction. The require callback is called on process.nextTick():\n\n```javascript\ndefine(function (require) {\n require(['a'], function(a) {\n //'a' is loaded synchronously, but\n //this callback is called on process.nextTick().\n });\n});\n```\n\n### Loader Plugins\n\nLoader plugins are supported as long as they call their load() callbacks\nsynchronously. So ones that do network requests will not work. However plugins\nlike [text](http://requirejs.org/docs/api.html#text) can load text files locally.\n\nThe plugin API's `load.fromText()` is **not supported** in amdefine, so this means\ntranspiler plugins like the [CoffeeScript loader plugin](https://github.com/jrburke/require-cs)\nwill not work. This may be fixable, but it is a bit complex, and I do not have\nenough node-fu to figure it out yet. See the source for amdefine.js if you want\nto get an idea of the issues involved.\n\n## Tests\n\nTo run the tests, cd to **tests** and run:\n\n```\nnode all.js\nnode all-intercept.js\n```\n\n## License\n\nNew BSD and MIT. Check the LICENSE file for all the details.\n", + "readmeFilename": "README.md", + "bugs": { + "url": "https://github.com/jrburke/amdefine/issues" + }, + "_id": "amdefine@0.1.0", + "_shasum": "3ca9735cf1dde0edf7a4bf6641709c8024f9b227", + "_from": "amdefine@>=0.0.4", + "_resolved": "https://registry.npmjs.org/amdefine/-/amdefine-0.1.0.tgz" +} diff --git a/bin/node_modules/uglify-js/node_modules/source-map/package.json b/bin/node_modules/uglify-js/node_modules/source-map/package.json new file mode 100644 index 00000000..9d51f22c --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/source-map/package.json @@ -0,0 +1,130 @@ +{ + "name": "source-map", + "description": "Generates and consumes source maps", + "version": "0.1.34", + "homepage": "https://github.com/mozilla/source-map", + "author": { + "name": "Nick Fitzgerald", + "email": "nfitzgerald@mozilla.com" + }, + "contributors": [ + { + "name": "Tobias Koppers", + "email": "tobias.koppers@googlemail.com" + }, + { + "name": "Duncan Beevers", + "email": "duncan@dweebd.com" + }, + { + "name": "Stephen Crane", + "email": "scrane@mozilla.com" + }, + { + "name": "Ryan Seddon", + "email": "seddon.ryan@gmail.com" + }, + { + "name": "Miles Elam", + "email": "miles.elam@deem.com" + }, + { + "name": "Mihai Bazon", + "email": "mihai.bazon@gmail.com" + }, + { + "name": "Michael Ficarra", + "email": "github.public.email@michael.ficarra.me" + }, + { + "name": "Todd Wolfson", + "email": "todd@twolfson.com" + }, + { + "name": "Alexander Solovyov", + "email": "alexander@solovyov.net" + }, + { + "name": "Felix Gnass", + "email": "fgnass@gmail.com" + }, + { + "name": "Conrad Irwin", + "email": "conrad.irwin@gmail.com" + }, + { + "name": "usrbincc", + "email": "usrbincc@yahoo.com" + }, + { + "name": "David Glasser", + "email": "glasser@davidglasser.net" + }, + { + "name": "Chase Douglas", + "email": "chase@newrelic.com" + }, + { + "name": "Evan Wallace", + "email": "evan.exe@gmail.com" + }, + { + "name": "Heather Arthur", + "email": "fayearthur@gmail.com" + }, + { + "name": "Hugh Kennedy", + "email": "hughskennedy@gmail.com" + }, + { + "name": "David Glasser", + "email": "glasser@davidglasser.net" + }, + { + "name": "Simon Lydell", + "email": "simon.lydell@gmail.com" + }, + { + "name": "Jmeas Smith", + "email": "jellyes2@gmail.com" + }, + { + "name": "Michael Z Goddard", + "email": "mzgoddard@gmail.com" + } + ], + "repository": { + "type": "git", + "url": "http://github.com/mozilla/source-map.git" + }, + "directories": { + "lib": "./lib" + }, + "main": "./lib/source-map.js", + "engines": { + "node": ">=0.8.0" + }, + "licenses": [ + { + "type": "BSD", + "url": "http://opensource.org/licenses/BSD-3-Clause" + } + ], + "dependencies": { + "amdefine": ">=0.0.4" + }, + "devDependencies": { + "dryice": ">=0.4.8" + }, + "scripts": { + "test": "node test/run-tests.js", + "build": "node Makefile.dryice.js" + }, + "readme": "# Source Map\n\nThis is a library to generate and consume the source map format\n[described here][format].\n\nThis library is written in the Asynchronous Module Definition format, and works\nin the following environments:\n\n* Modern Browsers supporting ECMAScript 5 (either after the build, or with an\n AMD loader such as RequireJS)\n\n* Inside Firefox (as a JSM file, after the build)\n\n* With NodeJS versions 0.8.X and higher\n\n## Node\n\n $ npm install source-map\n\n## Building from Source (for everywhere else)\n\nInstall Node and then run\n\n $ git clone https://fitzgen@github.com/mozilla/source-map.git\n $ cd source-map\n $ npm link .\n\nNext, run\n\n $ node Makefile.dryice.js\n\nThis should spew a bunch of stuff to stdout, and create the following files:\n\n* `dist/source-map.js` - The unminified browser version.\n\n* `dist/source-map.min.js` - The minified browser version.\n\n* `dist/SourceMap.jsm` - The JavaScript Module for inclusion in Firefox source.\n\n## Examples\n\n### Consuming a source map\n\n var rawSourceMap = {\n version: 3,\n file: 'min.js',\n names: ['bar', 'baz', 'n'],\n sources: ['one.js', 'two.js'],\n sourceRoot: 'http://example.com/www/js/',\n mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA'\n };\n\n var smc = new SourceMapConsumer(rawSourceMap);\n\n console.log(smc.sources);\n // [ 'http://example.com/www/js/one.js',\n // 'http://example.com/www/js/two.js' ]\n\n console.log(smc.originalPositionFor({\n line: 2,\n column: 28\n }));\n // { source: 'http://example.com/www/js/two.js',\n // line: 2,\n // column: 10,\n // name: 'n' }\n\n console.log(smc.generatedPositionFor({\n source: 'http://example.com/www/js/two.js',\n line: 2,\n column: 10\n }));\n // { line: 2, column: 28 }\n\n smc.eachMapping(function (m) {\n // ...\n });\n\n### Generating a source map\n\nIn depth guide:\n[**Compiling to JavaScript, and Debugging with Source Maps**](https://hacks.mozilla.org/2013/05/compiling-to-javascript-and-debugging-with-source-maps/)\n\n#### With SourceNode (high level API)\n\n function compile(ast) {\n switch (ast.type) {\n case 'BinaryExpression':\n return new SourceNode(\n ast.location.line,\n ast.location.column,\n ast.location.source,\n [compile(ast.left), \" + \", compile(ast.right)]\n );\n case 'Literal':\n return new SourceNode(\n ast.location.line,\n ast.location.column,\n ast.location.source,\n String(ast.value)\n );\n // ...\n default:\n throw new Error(\"Bad AST\");\n }\n }\n\n var ast = parse(\"40 + 2\", \"add.js\");\n console.log(compile(ast).toStringWithSourceMap({\n file: 'add.js'\n }));\n // { code: '40 + 2',\n // map: [object SourceMapGenerator] }\n\n#### With SourceMapGenerator (low level API)\n\n var map = new SourceMapGenerator({\n file: \"source-mapped.js\"\n });\n\n map.addMapping({\n generated: {\n line: 10,\n column: 35\n },\n source: \"foo.js\",\n original: {\n line: 33,\n column: 2\n },\n name: \"christopher\"\n });\n\n console.log(map.toString());\n // '{\"version\":3,\"file\":\"source-mapped.js\",\"sources\":[\"foo.js\"],\"names\":[\"christopher\"],\"mappings\":\";;;;;;;;;mCAgCEA\"}'\n\n## API\n\nGet a reference to the module:\n\n // NodeJS\n var sourceMap = require('source-map');\n\n // Browser builds\n var sourceMap = window.sourceMap;\n\n // Inside Firefox\n let sourceMap = {};\n Components.utils.import('resource:///modules/devtools/SourceMap.jsm', sourceMap);\n\n### SourceMapConsumer\n\nA SourceMapConsumer instance represents a parsed source map which we can query\nfor information about the original file positions by giving it a file position\nin the generated source.\n\n#### new SourceMapConsumer(rawSourceMap)\n\nThe only parameter is the raw source map (either as a string which can be\n`JSON.parse`'d, or an object). According to the spec, source maps have the\nfollowing attributes:\n\n* `version`: Which version of the source map spec this map is following.\n\n* `sources`: An array of URLs to the original source files.\n\n* `names`: An array of identifiers which can be referrenced by individual\n mappings.\n\n* `sourceRoot`: Optional. The URL root from which all sources are relative.\n\n* `sourcesContent`: Optional. An array of contents of the original source files.\n\n* `mappings`: A string of base64 VLQs which contain the actual mappings.\n\n* `file`: Optional. The generated filename this source map is associated with.\n\n#### SourceMapConsumer.prototype.originalPositionFor(generatedPosition)\n\nReturns the original source, line, and column information for the generated\nsource's line and column positions provided. The only argument is an object with\nthe following properties:\n\n* `line`: The line number in the generated source.\n\n* `column`: The column number in the generated source.\n\nand an object is returned with the following properties:\n\n* `source`: The original source file, or null if this information is not\n available.\n\n* `line`: The line number in the original source, or null if this information is\n not available.\n\n* `column`: The column number in the original source, or null or null if this\n information is not available.\n\n* `name`: The original identifier, or null if this information is not available.\n\n#### SourceMapConsumer.prototype.generatedPositionFor(originalPosition)\n\nReturns the generated line and column information for the original source,\nline, and column positions provided. The only argument is an object with\nthe following properties:\n\n* `source`: The filename of the original source.\n\n* `line`: The line number in the original source.\n\n* `column`: The column number in the original source.\n\nand an object is returned with the following properties:\n\n* `line`: The line number in the generated source, or null.\n\n* `column`: The column number in the generated source, or null.\n\n#### SourceMapConsumer.prototype.sourceContentFor(source)\n\nReturns the original source content for the source provided. The only\nargument is the URL of the original source file.\n\n#### SourceMapConsumer.prototype.eachMapping(callback, context, order)\n\nIterate over each mapping between an original source/line/column and a\ngenerated line/column in this source map.\n\n* `callback`: The function that is called with each mapping. Mappings have the\n form `{ source, generatedLine, generatedColumn, originalLine, originalColumn,\n name }`\n\n* `context`: Optional. If specified, this object will be the value of `this`\n every time that `callback` is called.\n\n* `order`: Either `SourceMapConsumer.GENERATED_ORDER` or\n `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to iterate over\n the mappings sorted by the generated file's line/column order or the\n original's source/line/column order, respectively. Defaults to\n `SourceMapConsumer.GENERATED_ORDER`.\n\n### SourceMapGenerator\n\nAn instance of the SourceMapGenerator represents a source map which is being\nbuilt incrementally.\n\n#### new SourceMapGenerator([startOfSourceMap])\n\nYou may pass an object with the following properties:\n\n* `file`: The filename of the generated source that this source map is\n associated with.\n\n* `sourceRoot`: A root for all relative URLs in this source map.\n\n#### SourceMapGenerator.fromSourceMap(sourceMapConsumer)\n\nCreates a new SourceMapGenerator based on a SourceMapConsumer\n\n* `sourceMapConsumer` The SourceMap.\n\n#### SourceMapGenerator.prototype.addMapping(mapping)\n\nAdd a single mapping from original source line and column to the generated\nsource's line and column for this source map being created. The mapping object\nshould have the following properties:\n\n* `generated`: An object with the generated line and column positions.\n\n* `original`: An object with the original line and column positions.\n\n* `source`: The original source file (relative to the sourceRoot).\n\n* `name`: An optional original token name for this mapping.\n\n#### SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent)\n\nSet the source content for an original source file.\n\n* `sourceFile` the URL of the original source file.\n\n* `sourceContent` the content of the source file.\n\n#### SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]])\n\nApplies a SourceMap for a source file to the SourceMap.\nEach mapping to the supplied source file is rewritten using the\nsupplied SourceMap. Note: The resolution for the resulting mappings\nis the minimium of this map and the supplied map.\n\n* `sourceMapConsumer`: The SourceMap to be applied.\n\n* `sourceFile`: Optional. The filename of the source file.\n If omitted, sourceMapConsumer.file will be used, if it exists.\n Otherwise an error will be thrown.\n\n* `sourceMapPath`: Optional. The dirname of the path to the SourceMap\n to be applied. If relative, it is relative to the SourceMap.\n\n This parameter is needed when the two SourceMaps aren't in the same\n directory, and the SourceMap to be applied contains relative source\n paths. If so, those relative source paths need to be rewritten\n relative to the SourceMap.\n\n If omitted, it is assumed that both SourceMaps are in the same directory,\n thus not needing any rewriting. (Supplying `'.'` has the same effect.)\n\n#### SourceMapGenerator.prototype.toString()\n\nRenders the source map being generated to a string.\n\n### SourceNode\n\nSourceNodes provide a way to abstract over interpolating and/or concatenating\nsnippets of generated JavaScript source code, while maintaining the line and\ncolumn information associated between those snippets and the original source\ncode. This is useful as the final intermediate representation a compiler might\nuse before outputting the generated JS and source map.\n\n#### new SourceNode([line, column, source[, chunk[, name]]])\n\n* `line`: The original line number associated with this source node, or null if\n it isn't associated with an original line.\n\n* `column`: The original column number associated with this source node, or null\n if it isn't associated with an original column.\n\n* `source`: The original source's filename; null if no filename is provided.\n\n* `chunk`: Optional. Is immediately passed to `SourceNode.prototype.add`, see\n below.\n\n* `name`: Optional. The original identifier.\n\n#### SourceNode.fromStringWithSourceMap(code, sourceMapConsumer)\n\nCreates a SourceNode from generated code and a SourceMapConsumer.\n\n* `code`: The generated code\n\n* `sourceMapConsumer` The SourceMap for the generated code\n\n#### SourceNode.prototype.add(chunk)\n\nAdd a chunk of generated JS to this source node.\n\n* `chunk`: A string snippet of generated JS code, another instance of\n `SourceNode`, or an array where each member is one of those things.\n\n#### SourceNode.prototype.prepend(chunk)\n\nPrepend a chunk of generated JS to this source node.\n\n* `chunk`: A string snippet of generated JS code, another instance of\n `SourceNode`, or an array where each member is one of those things.\n\n#### SourceNode.prototype.setSourceContent(sourceFile, sourceContent)\n\nSet the source content for a source file. This will be added to the\n`SourceMap` in the `sourcesContent` field.\n\n* `sourceFile`: The filename of the source file\n\n* `sourceContent`: The content of the source file\n\n#### SourceNode.prototype.walk(fn)\n\nWalk over the tree of JS snippets in this node and its children. The walking\nfunction is called once for each snippet of JS and is passed that snippet and\nthe its original associated source's line/column location.\n\n* `fn`: The traversal function.\n\n#### SourceNode.prototype.walkSourceContents(fn)\n\nWalk over the tree of SourceNodes. The walking function is called for each\nsource file content and is passed the filename and source content.\n\n* `fn`: The traversal function.\n\n#### SourceNode.prototype.join(sep)\n\nLike `Array.prototype.join` except for SourceNodes. Inserts the separator\nbetween each of this source node's children.\n\n* `sep`: The separator.\n\n#### SourceNode.prototype.replaceRight(pattern, replacement)\n\nCall `String.prototype.replace` on the very right-most source snippet. Useful\nfor trimming whitespace from the end of a source node, etc.\n\n* `pattern`: The pattern to replace.\n\n* `replacement`: The thing to replace the pattern with.\n\n#### SourceNode.prototype.toString()\n\nReturn the string representation of this source node. Walks over the tree and\nconcatenates all the various snippets together to one string.\n\n### SourceNode.prototype.toStringWithSourceMap([startOfSourceMap])\n\nReturns the string representation of this tree of source nodes, plus a\nSourceMapGenerator which contains all the mappings between the generated and\noriginal sources.\n\nThe arguments are the same as those to `new SourceMapGenerator`.\n\n## Tests\n\n[![Build Status](https://travis-ci.org/mozilla/source-map.png?branch=master)](https://travis-ci.org/mozilla/source-map)\n\nInstall NodeJS version 0.8.0 or greater, then run `node test/run-tests.js`.\n\nTo add new tests, create a new file named `test/test-.js`\nand export your test functions with names that start with \"test\", for example\n\n exports[\"test doing the foo bar\"] = function (assert, util) {\n ...\n };\n\nThe new test will be located automatically when you run the suite.\n\nThe `util` argument is the test utility module located at `test/source-map/util`.\n\nThe `assert` argument is a cut down version of node's assert module. You have\naccess to the following assertion functions:\n\n* `doesNotThrow`\n\n* `equal`\n\n* `ok`\n\n* `strictEqual`\n\n* `throws`\n\n(The reason for the restricted set of test functions is because we need the\ntests to run inside Firefox's test suite as well and so the assert module is\nshimmed in that environment. See `build/assert-shim.js`.)\n\n[format]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit\n[feature]: https://wiki.mozilla.org/DevTools/Features/SourceMap\n[Dryice]: https://github.com/mozilla/dryice\n", + "readmeFilename": "README.md", + "bugs": { + "url": "https://github.com/mozilla/source-map/issues" + }, + "_id": "source-map@0.1.34", + "_from": "source-map@0.1.34" +} diff --git a/bin/node_modules/uglify-js/node_modules/source-map/test/run-tests.js b/bin/node_modules/uglify-js/node_modules/source-map/test/run-tests.js new file mode 100755 index 00000000..64a7c3a3 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/source-map/test/run-tests.js @@ -0,0 +1,62 @@ +#!/usr/bin/env node +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +var assert = require('assert'); +var fs = require('fs'); +var path = require('path'); +var util = require('./source-map/util'); + +function run(tests) { + var total = 0; + var passed = 0; + + for (var i = 0; i < tests.length; i++) { + for (var k in tests[i].testCase) { + if (/^test/.test(k)) { + total++; + try { + tests[i].testCase[k](assert, util); + passed++; + } + catch (e) { + console.log('FAILED ' + tests[i].name + ': ' + k + '!'); + console.log(e.stack); + } + } + } + } + + console.log(''); + console.log(passed + ' / ' + total + ' tests passed.'); + console.log(''); + + return total - passed; +} + +function isTestFile(f) { + var testToRun = process.argv[2]; + return testToRun + ? path.basename(testToRun) === f + : /^test\-.*?\.js/.test(f); +} + +function toModule(f) { + return './source-map/' + f.replace(/\.js$/, ''); +} + +var requires = fs.readdirSync(path.join(__dirname, 'source-map')) + .filter(isTestFile) + .map(toModule); + +var code = run(requires.map(require).map(function (mod, i) { + return { + name: requires[i], + testCase: mod + }; +})); + +process.exit(code); diff --git a/bin/node_modules/uglify-js/node_modules/source-map/test/source-map/test-api.js b/bin/node_modules/uglify-js/node_modules/source-map/test/source-map/test-api.js new file mode 100644 index 00000000..3801233c --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/source-map/test/source-map/test-api.js @@ -0,0 +1,26 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2012 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var sourceMap; + try { + sourceMap = require('../../lib/source-map'); + } catch (e) { + sourceMap = {}; + Components.utils.import('resource:///modules/devtools/SourceMap.jsm', sourceMap); + } + + exports['test that the api is properly exposed in the top level'] = function (assert, util) { + assert.equal(typeof sourceMap.SourceMapGenerator, "function"); + assert.equal(typeof sourceMap.SourceMapConsumer, "function"); + assert.equal(typeof sourceMap.SourceNode, "function"); + }; + +}); diff --git a/bin/node_modules/uglify-js/node_modules/source-map/test/source-map/test-array-set.js b/bin/node_modules/uglify-js/node_modules/source-map/test/source-map/test-array-set.js new file mode 100644 index 00000000..b5797edd --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/source-map/test/source-map/test-array-set.js @@ -0,0 +1,104 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var ArraySet = require('../../lib/source-map/array-set').ArraySet; + + function makeTestSet() { + var set = new ArraySet(); + for (var i = 0; i < 100; i++) { + set.add(String(i)); + } + return set; + } + + exports['test .has() membership'] = function (assert, util) { + var set = makeTestSet(); + for (var i = 0; i < 100; i++) { + assert.ok(set.has(String(i))); + } + }; + + exports['test .indexOf() elements'] = function (assert, util) { + var set = makeTestSet(); + for (var i = 0; i < 100; i++) { + assert.strictEqual(set.indexOf(String(i)), i); + } + }; + + exports['test .at() indexing'] = function (assert, util) { + var set = makeTestSet(); + for (var i = 0; i < 100; i++) { + assert.strictEqual(set.at(i), String(i)); + } + }; + + exports['test creating from an array'] = function (assert, util) { + var set = ArraySet.fromArray(['foo', 'bar', 'baz', 'quux', 'hasOwnProperty']); + + assert.ok(set.has('foo')); + assert.ok(set.has('bar')); + assert.ok(set.has('baz')); + assert.ok(set.has('quux')); + assert.ok(set.has('hasOwnProperty')); + + assert.strictEqual(set.indexOf('foo'), 0); + assert.strictEqual(set.indexOf('bar'), 1); + assert.strictEqual(set.indexOf('baz'), 2); + assert.strictEqual(set.indexOf('quux'), 3); + + assert.strictEqual(set.at(0), 'foo'); + assert.strictEqual(set.at(1), 'bar'); + assert.strictEqual(set.at(2), 'baz'); + assert.strictEqual(set.at(3), 'quux'); + }; + + exports['test that you can add __proto__; see github issue #30'] = function (assert, util) { + var set = new ArraySet(); + set.add('__proto__'); + assert.ok(set.has('__proto__')); + assert.strictEqual(set.at(0), '__proto__'); + assert.strictEqual(set.indexOf('__proto__'), 0); + }; + + exports['test .fromArray() with duplicates'] = function (assert, util) { + var set = ArraySet.fromArray(['foo', 'foo']); + assert.ok(set.has('foo')); + assert.strictEqual(set.at(0), 'foo'); + assert.strictEqual(set.indexOf('foo'), 0); + assert.strictEqual(set.toArray().length, 1); + + set = ArraySet.fromArray(['foo', 'foo'], true); + assert.ok(set.has('foo')); + assert.strictEqual(set.at(0), 'foo'); + assert.strictEqual(set.at(1), 'foo'); + assert.strictEqual(set.indexOf('foo'), 0); + assert.strictEqual(set.toArray().length, 2); + }; + + exports['test .add() with duplicates'] = function (assert, util) { + var set = new ArraySet(); + set.add('foo'); + + set.add('foo'); + assert.ok(set.has('foo')); + assert.strictEqual(set.at(0), 'foo'); + assert.strictEqual(set.indexOf('foo'), 0); + assert.strictEqual(set.toArray().length, 1); + + set.add('foo', true); + assert.ok(set.has('foo')); + assert.strictEqual(set.at(0), 'foo'); + assert.strictEqual(set.at(1), 'foo'); + assert.strictEqual(set.indexOf('foo'), 0); + assert.strictEqual(set.toArray().length, 2); + }; + +}); diff --git a/bin/node_modules/uglify-js/node_modules/source-map/test/source-map/test-base64-vlq.js b/bin/node_modules/uglify-js/node_modules/source-map/test/source-map/test-base64-vlq.js new file mode 100644 index 00000000..653a874e --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/source-map/test/source-map/test-base64-vlq.js @@ -0,0 +1,24 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var base64VLQ = require('../../lib/source-map/base64-vlq'); + + exports['test normal encoding and decoding'] = function (assert, util) { + var result; + for (var i = -255; i < 256; i++) { + result = base64VLQ.decode(base64VLQ.encode(i)); + assert.ok(result); + assert.equal(result.value, i); + assert.equal(result.rest, ""); + } + }; + +}); diff --git a/bin/node_modules/uglify-js/node_modules/source-map/test/source-map/test-base64.js b/bin/node_modules/uglify-js/node_modules/source-map/test/source-map/test-base64.js new file mode 100644 index 00000000..ff3a2445 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/source-map/test/source-map/test-base64.js @@ -0,0 +1,35 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var base64 = require('../../lib/source-map/base64'); + + exports['test out of range encoding'] = function (assert, util) { + assert.throws(function () { + base64.encode(-1); + }); + assert.throws(function () { + base64.encode(64); + }); + }; + + exports['test out of range decoding'] = function (assert, util) { + assert.throws(function () { + base64.decode('='); + }); + }; + + exports['test normal encoding and decoding'] = function (assert, util) { + for (var i = 0; i < 64; i++) { + assert.equal(base64.decode(base64.encode(i)), i); + } + }; + +}); diff --git a/bin/node_modules/uglify-js/node_modules/source-map/test/source-map/test-binary-search.js b/bin/node_modules/uglify-js/node_modules/source-map/test/source-map/test-binary-search.js new file mode 100644 index 00000000..ee306830 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/source-map/test/source-map/test-binary-search.js @@ -0,0 +1,54 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var binarySearch = require('../../lib/source-map/binary-search'); + + function numberCompare(a, b) { + return a - b; + } + + exports['test too high'] = function (assert, util) { + var needle = 30; + var haystack = [2,4,6,8,10,12,14,16,18,20]; + + assert.doesNotThrow(function () { + binarySearch.search(needle, haystack, numberCompare); + }); + + assert.equal(binarySearch.search(needle, haystack, numberCompare), 20); + }; + + exports['test too low'] = function (assert, util) { + var needle = 1; + var haystack = [2,4,6,8,10,12,14,16,18,20]; + + assert.doesNotThrow(function () { + binarySearch.search(needle, haystack, numberCompare); + }); + + assert.equal(binarySearch.search(needle, haystack, numberCompare), null); + }; + + exports['test exact search'] = function (assert, util) { + var needle = 4; + var haystack = [2,4,6,8,10,12,14,16,18,20]; + + assert.equal(binarySearch.search(needle, haystack, numberCompare), 4); + }; + + exports['test fuzzy search'] = function (assert, util) { + var needle = 19; + var haystack = [2,4,6,8,10,12,14,16,18,20]; + + assert.equal(binarySearch.search(needle, haystack, numberCompare), 18); + }; + +}); diff --git a/bin/node_modules/uglify-js/node_modules/source-map/test/source-map/test-dog-fooding.js b/bin/node_modules/uglify-js/node_modules/source-map/test/source-map/test-dog-fooding.js new file mode 100644 index 00000000..26757b2d --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/source-map/test/source-map/test-dog-fooding.js @@ -0,0 +1,84 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var SourceMapConsumer = require('../../lib/source-map/source-map-consumer').SourceMapConsumer; + var SourceMapGenerator = require('../../lib/source-map/source-map-generator').SourceMapGenerator; + + exports['test eating our own dog food'] = function (assert, util) { + var smg = new SourceMapGenerator({ + file: 'testing.js', + sourceRoot: '/wu/tang' + }); + + smg.addMapping({ + source: 'gza.coffee', + original: { line: 1, column: 0 }, + generated: { line: 2, column: 2 } + }); + + smg.addMapping({ + source: 'gza.coffee', + original: { line: 2, column: 0 }, + generated: { line: 3, column: 2 } + }); + + smg.addMapping({ + source: 'gza.coffee', + original: { line: 3, column: 0 }, + generated: { line: 4, column: 2 } + }); + + smg.addMapping({ + source: 'gza.coffee', + original: { line: 4, column: 0 }, + generated: { line: 5, column: 2 } + }); + + smg.addMapping({ + source: 'gza.coffee', + original: { line: 5, column: 10 }, + generated: { line: 6, column: 12 } + }); + + var smc = new SourceMapConsumer(smg.toString()); + + // Exact + util.assertMapping(2, 2, '/wu/tang/gza.coffee', 1, 0, null, smc, assert); + util.assertMapping(3, 2, '/wu/tang/gza.coffee', 2, 0, null, smc, assert); + util.assertMapping(4, 2, '/wu/tang/gza.coffee', 3, 0, null, smc, assert); + util.assertMapping(5, 2, '/wu/tang/gza.coffee', 4, 0, null, smc, assert); + util.assertMapping(6, 12, '/wu/tang/gza.coffee', 5, 10, null, smc, assert); + + // Fuzzy + + // Generated to original + util.assertMapping(2, 0, null, null, null, null, smc, assert, true); + util.assertMapping(2, 9, '/wu/tang/gza.coffee', 1, 0, null, smc, assert, true); + util.assertMapping(3, 0, null, null, null, null, smc, assert, true); + util.assertMapping(3, 9, '/wu/tang/gza.coffee', 2, 0, null, smc, assert, true); + util.assertMapping(4, 0, null, null, null, null, smc, assert, true); + util.assertMapping(4, 9, '/wu/tang/gza.coffee', 3, 0, null, smc, assert, true); + util.assertMapping(5, 0, null, null, null, null, smc, assert, true); + util.assertMapping(5, 9, '/wu/tang/gza.coffee', 4, 0, null, smc, assert, true); + util.assertMapping(6, 0, null, null, null, null, smc, assert, true); + util.assertMapping(6, 9, null, null, null, null, smc, assert, true); + util.assertMapping(6, 13, '/wu/tang/gza.coffee', 5, 10, null, smc, assert, true); + + // Original to generated + util.assertMapping(2, 2, '/wu/tang/gza.coffee', 1, 1, null, smc, assert, null, true); + util.assertMapping(3, 2, '/wu/tang/gza.coffee', 2, 3, null, smc, assert, null, true); + util.assertMapping(4, 2, '/wu/tang/gza.coffee', 3, 6, null, smc, assert, null, true); + util.assertMapping(5, 2, '/wu/tang/gza.coffee', 4, 9, null, smc, assert, null, true); + util.assertMapping(5, 2, '/wu/tang/gza.coffee', 5, 9, null, smc, assert, null, true); + util.assertMapping(6, 12, '/wu/tang/gza.coffee', 6, 19, null, smc, assert, null, true); + }; + +}); diff --git a/bin/node_modules/uglify-js/node_modules/source-map/test/source-map/test-source-map-consumer.js b/bin/node_modules/uglify-js/node_modules/source-map/test/source-map/test-source-map-consumer.js new file mode 100644 index 00000000..acd24d5e --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/source-map/test/source-map/test-source-map-consumer.js @@ -0,0 +1,475 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var SourceMapConsumer = require('../../lib/source-map/source-map-consumer').SourceMapConsumer; + var SourceMapGenerator = require('../../lib/source-map/source-map-generator').SourceMapGenerator; + + exports['test that we can instantiate with a string or an object'] = function (assert, util) { + assert.doesNotThrow(function () { + var map = new SourceMapConsumer(util.testMap); + }); + assert.doesNotThrow(function () { + var map = new SourceMapConsumer(JSON.stringify(util.testMap)); + }); + }; + + exports['test that the `sources` field has the original sources'] = function (assert, util) { + var map = new SourceMapConsumer(util.testMap); + var sources = map.sources; + + assert.equal(sources[0], '/the/root/one.js'); + assert.equal(sources[1], '/the/root/two.js'); + assert.equal(sources.length, 2); + }; + + exports['test that the source root is reflected in a mapping\'s source field'] = function (assert, util) { + var map = new SourceMapConsumer(util.testMap); + var mapping; + + mapping = map.originalPositionFor({ + line: 2, + column: 1 + }); + assert.equal(mapping.source, '/the/root/two.js'); + + mapping = map.originalPositionFor({ + line: 1, + column: 1 + }); + assert.equal(mapping.source, '/the/root/one.js'); + }; + + exports['test mapping tokens back exactly'] = function (assert, util) { + var map = new SourceMapConsumer(util.testMap); + + util.assertMapping(1, 1, '/the/root/one.js', 1, 1, null, map, assert); + util.assertMapping(1, 5, '/the/root/one.js', 1, 5, null, map, assert); + util.assertMapping(1, 9, '/the/root/one.js', 1, 11, null, map, assert); + util.assertMapping(1, 18, '/the/root/one.js', 1, 21, 'bar', map, assert); + util.assertMapping(1, 21, '/the/root/one.js', 2, 3, null, map, assert); + util.assertMapping(1, 28, '/the/root/one.js', 2, 10, 'baz', map, assert); + util.assertMapping(1, 32, '/the/root/one.js', 2, 14, 'bar', map, assert); + + util.assertMapping(2, 1, '/the/root/two.js', 1, 1, null, map, assert); + util.assertMapping(2, 5, '/the/root/two.js', 1, 5, null, map, assert); + util.assertMapping(2, 9, '/the/root/two.js', 1, 11, null, map, assert); + util.assertMapping(2, 18, '/the/root/two.js', 1, 21, 'n', map, assert); + util.assertMapping(2, 21, '/the/root/two.js', 2, 3, null, map, assert); + util.assertMapping(2, 28, '/the/root/two.js', 2, 10, 'n', map, assert); + }; + + exports['test mapping tokens fuzzy'] = function (assert, util) { + var map = new SourceMapConsumer(util.testMap); + + // Finding original positions + util.assertMapping(1, 20, '/the/root/one.js', 1, 21, 'bar', map, assert, true); + util.assertMapping(1, 30, '/the/root/one.js', 2, 10, 'baz', map, assert, true); + util.assertMapping(2, 12, '/the/root/two.js', 1, 11, null, map, assert, true); + + // Finding generated positions + util.assertMapping(1, 18, '/the/root/one.js', 1, 22, 'bar', map, assert, null, true); + util.assertMapping(1, 28, '/the/root/one.js', 2, 13, 'baz', map, assert, null, true); + util.assertMapping(2, 9, '/the/root/two.js', 1, 16, null, map, assert, null, true); + }; + + exports['test mappings and end of lines'] = function (assert, util) { + var smg = new SourceMapGenerator({ + file: 'foo.js' + }); + smg.addMapping({ + original: { line: 1, column: 1 }, + generated: { line: 1, column: 1 }, + source: 'bar.js' + }); + smg.addMapping({ + original: { line: 2, column: 2 }, + generated: { line: 2, column: 2 }, + source: 'bar.js' + }); + + var map = SourceMapConsumer.fromSourceMap(smg); + + // When finding original positions, mappings end at the end of the line. + util.assertMapping(2, 1, null, null, null, null, map, assert, true) + + // When finding generated positions, mappings do not end at the end of the line. + util.assertMapping(1, 1, 'bar.js', 2, 1, null, map, assert, null, true); + }; + + exports['test creating source map consumers with )]}\' prefix'] = function (assert, util) { + assert.doesNotThrow(function () { + var map = new SourceMapConsumer(")]}'" + JSON.stringify(util.testMap)); + }); + }; + + exports['test eachMapping'] = function (assert, util) { + var map = new SourceMapConsumer(util.testMap); + var previousLine = -Infinity; + var previousColumn = -Infinity; + map.eachMapping(function (mapping) { + assert.ok(mapping.generatedLine >= previousLine); + + if (mapping.source) { + assert.equal(mapping.source.indexOf(util.testMap.sourceRoot), 0); + } + + if (mapping.generatedLine === previousLine) { + assert.ok(mapping.generatedColumn >= previousColumn); + previousColumn = mapping.generatedColumn; + } + else { + previousLine = mapping.generatedLine; + previousColumn = -Infinity; + } + }); + }; + + exports['test iterating over mappings in a different order'] = function (assert, util) { + var map = new SourceMapConsumer(util.testMap); + var previousLine = -Infinity; + var previousColumn = -Infinity; + var previousSource = ""; + map.eachMapping(function (mapping) { + assert.ok(mapping.source >= previousSource); + + if (mapping.source === previousSource) { + assert.ok(mapping.originalLine >= previousLine); + + if (mapping.originalLine === previousLine) { + assert.ok(mapping.originalColumn >= previousColumn); + previousColumn = mapping.originalColumn; + } + else { + previousLine = mapping.originalLine; + previousColumn = -Infinity; + } + } + else { + previousSource = mapping.source; + previousLine = -Infinity; + previousColumn = -Infinity; + } + }, null, SourceMapConsumer.ORIGINAL_ORDER); + }; + + exports['test that we can set the context for `this` in eachMapping'] = function (assert, util) { + var map = new SourceMapConsumer(util.testMap); + var context = {}; + map.eachMapping(function () { + assert.equal(this, context); + }, context); + }; + + exports['test that the `sourcesContent` field has the original sources'] = function (assert, util) { + var map = new SourceMapConsumer(util.testMapWithSourcesContent); + var sourcesContent = map.sourcesContent; + + assert.equal(sourcesContent[0], ' ONE.foo = function (bar) {\n return baz(bar);\n };'); + assert.equal(sourcesContent[1], ' TWO.inc = function (n) {\n return n + 1;\n };'); + assert.equal(sourcesContent.length, 2); + }; + + exports['test that we can get the original sources for the sources'] = function (assert, util) { + var map = new SourceMapConsumer(util.testMapWithSourcesContent); + var sources = map.sources; + + assert.equal(map.sourceContentFor(sources[0]), ' ONE.foo = function (bar) {\n return baz(bar);\n };'); + assert.equal(map.sourceContentFor(sources[1]), ' TWO.inc = function (n) {\n return n + 1;\n };'); + assert.equal(map.sourceContentFor("one.js"), ' ONE.foo = function (bar) {\n return baz(bar);\n };'); + assert.equal(map.sourceContentFor("two.js"), ' TWO.inc = function (n) {\n return n + 1;\n };'); + assert.throws(function () { + map.sourceContentFor(""); + }, Error); + assert.throws(function () { + map.sourceContentFor("/the/root/three.js"); + }, Error); + assert.throws(function () { + map.sourceContentFor("three.js"); + }, Error); + }; + + exports['test sourceRoot + generatedPositionFor'] = function (assert, util) { + var map = new SourceMapGenerator({ + sourceRoot: 'foo/bar', + file: 'baz.js' + }); + map.addMapping({ + original: { line: 1, column: 1 }, + generated: { line: 2, column: 2 }, + source: 'bang.coffee' + }); + map.addMapping({ + original: { line: 5, column: 5 }, + generated: { line: 6, column: 6 }, + source: 'bang.coffee' + }); + map = new SourceMapConsumer(map.toString()); + + // Should handle without sourceRoot. + var pos = map.generatedPositionFor({ + line: 1, + column: 1, + source: 'bang.coffee' + }); + + assert.equal(pos.line, 2); + assert.equal(pos.column, 2); + + // Should handle with sourceRoot. + var pos = map.generatedPositionFor({ + line: 1, + column: 1, + source: 'foo/bar/bang.coffee' + }); + + assert.equal(pos.line, 2); + assert.equal(pos.column, 2); + }; + + exports['test sourceRoot + originalPositionFor'] = function (assert, util) { + var map = new SourceMapGenerator({ + sourceRoot: 'foo/bar', + file: 'baz.js' + }); + map.addMapping({ + original: { line: 1, column: 1 }, + generated: { line: 2, column: 2 }, + source: 'bang.coffee' + }); + map = new SourceMapConsumer(map.toString()); + + var pos = map.originalPositionFor({ + line: 2, + column: 2, + }); + + // Should always have the prepended source root + assert.equal(pos.source, 'foo/bar/bang.coffee'); + assert.equal(pos.line, 1); + assert.equal(pos.column, 1); + }; + + exports['test github issue #56'] = function (assert, util) { + var map = new SourceMapGenerator({ + sourceRoot: 'http://', + file: 'www.example.com/foo.js' + }); + map.addMapping({ + original: { line: 1, column: 1 }, + generated: { line: 2, column: 2 }, + source: 'www.example.com/original.js' + }); + map = new SourceMapConsumer(map.toString()); + + var sources = map.sources; + assert.equal(sources.length, 1); + assert.equal(sources[0], 'http://www.example.com/original.js'); + }; + + exports['test github issue #43'] = function (assert, util) { + var map = new SourceMapGenerator({ + sourceRoot: 'http://example.com', + file: 'foo.js' + }); + map.addMapping({ + original: { line: 1, column: 1 }, + generated: { line: 2, column: 2 }, + source: 'http://cdn.example.com/original.js' + }); + map = new SourceMapConsumer(map.toString()); + + var sources = map.sources; + assert.equal(sources.length, 1, + 'Should only be one source.'); + assert.equal(sources[0], 'http://cdn.example.com/original.js', + 'Should not be joined with the sourceRoot.'); + }; + + exports['test absolute path, but same host sources'] = function (assert, util) { + var map = new SourceMapGenerator({ + sourceRoot: 'http://example.com/foo/bar', + file: 'foo.js' + }); + map.addMapping({ + original: { line: 1, column: 1 }, + generated: { line: 2, column: 2 }, + source: '/original.js' + }); + map = new SourceMapConsumer(map.toString()); + + var sources = map.sources; + assert.equal(sources.length, 1, + 'Should only be one source.'); + assert.equal(sources[0], 'http://example.com/original.js', + 'Source should be relative the host of the source root.'); + }; + + exports['test github issue #64'] = function (assert, util) { + var map = new SourceMapConsumer({ + "version": 3, + "file": "foo.js", + "sourceRoot": "http://example.com/", + "sources": ["/a"], + "names": [], + "mappings": "AACA", + "sourcesContent": ["foo"] + }); + + assert.equal(map.sourceContentFor("a"), "foo"); + assert.equal(map.sourceContentFor("/a"), "foo"); + }; + + exports['test bug 885597'] = function (assert, util) { + var map = new SourceMapConsumer({ + "version": 3, + "file": "foo.js", + "sourceRoot": "file:///Users/AlGore/Invented/The/Internet/", + "sources": ["/a"], + "names": [], + "mappings": "AACA", + "sourcesContent": ["foo"] + }); + + var s = map.sources[0]; + assert.equal(map.sourceContentFor(s), "foo"); + }; + + exports['test github issue #72, duplicate sources'] = function (assert, util) { + var map = new SourceMapConsumer({ + "version": 3, + "file": "foo.js", + "sources": ["source1.js", "source1.js", "source3.js"], + "names": [], + "mappings": ";EAAC;;IAEE;;MEEE", + "sourceRoot": "http://example.com" + }); + + var pos = map.originalPositionFor({ + line: 2, + column: 2 + }); + assert.equal(pos.source, 'http://example.com/source1.js'); + assert.equal(pos.line, 1); + assert.equal(pos.column, 1); + + var pos = map.originalPositionFor({ + line: 4, + column: 4 + }); + assert.equal(pos.source, 'http://example.com/source1.js'); + assert.equal(pos.line, 3); + assert.equal(pos.column, 3); + + var pos = map.originalPositionFor({ + line: 6, + column: 6 + }); + assert.equal(pos.source, 'http://example.com/source3.js'); + assert.equal(pos.line, 5); + assert.equal(pos.column, 5); + }; + + exports['test github issue #72, duplicate names'] = function (assert, util) { + var map = new SourceMapConsumer({ + "version": 3, + "file": "foo.js", + "sources": ["source.js"], + "names": ["name1", "name1", "name3"], + "mappings": ";EAACA;;IAEEA;;MAEEE", + "sourceRoot": "http://example.com" + }); + + var pos = map.originalPositionFor({ + line: 2, + column: 2 + }); + assert.equal(pos.name, 'name1'); + assert.equal(pos.line, 1); + assert.equal(pos.column, 1); + + var pos = map.originalPositionFor({ + line: 4, + column: 4 + }); + assert.equal(pos.name, 'name1'); + assert.equal(pos.line, 3); + assert.equal(pos.column, 3); + + var pos = map.originalPositionFor({ + line: 6, + column: 6 + }); + assert.equal(pos.name, 'name3'); + assert.equal(pos.line, 5); + assert.equal(pos.column, 5); + }; + + exports['test SourceMapConsumer.fromSourceMap'] = function (assert, util) { + var smg = new SourceMapGenerator({ + sourceRoot: 'http://example.com/', + file: 'foo.js' + }); + smg.addMapping({ + original: { line: 1, column: 1 }, + generated: { line: 2, column: 2 }, + source: 'bar.js' + }); + smg.addMapping({ + original: { line: 2, column: 2 }, + generated: { line: 4, column: 4 }, + source: 'baz.js', + name: 'dirtMcGirt' + }); + smg.setSourceContent('baz.js', 'baz.js content'); + + var smc = SourceMapConsumer.fromSourceMap(smg); + assert.equal(smc.file, 'foo.js'); + assert.equal(smc.sourceRoot, 'http://example.com/'); + assert.equal(smc.sources.length, 2); + assert.equal(smc.sources[0], 'http://example.com/bar.js'); + assert.equal(smc.sources[1], 'http://example.com/baz.js'); + assert.equal(smc.sourceContentFor('baz.js'), 'baz.js content'); + + var pos = smc.originalPositionFor({ + line: 2, + column: 2 + }); + assert.equal(pos.line, 1); + assert.equal(pos.column, 1); + assert.equal(pos.source, 'http://example.com/bar.js'); + assert.equal(pos.name, null); + + pos = smc.generatedPositionFor({ + line: 1, + column: 1, + source: 'http://example.com/bar.js' + }); + assert.equal(pos.line, 2); + assert.equal(pos.column, 2); + + pos = smc.originalPositionFor({ + line: 4, + column: 4 + }); + assert.equal(pos.line, 2); + assert.equal(pos.column, 2); + assert.equal(pos.source, 'http://example.com/baz.js'); + assert.equal(pos.name, 'dirtMcGirt'); + + pos = smc.generatedPositionFor({ + line: 2, + column: 2, + source: 'http://example.com/baz.js' + }); + assert.equal(pos.line, 4); + assert.equal(pos.column, 4); + }; +}); diff --git a/bin/node_modules/uglify-js/node_modules/source-map/test/source-map/test-source-map-generator.js b/bin/node_modules/uglify-js/node_modules/source-map/test/source-map/test-source-map-generator.js new file mode 100644 index 00000000..227140f9 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/source-map/test/source-map/test-source-map-generator.js @@ -0,0 +1,549 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var SourceMapGenerator = require('../../lib/source-map/source-map-generator').SourceMapGenerator; + var SourceMapConsumer = require('../../lib/source-map/source-map-consumer').SourceMapConsumer; + var SourceNode = require('../../lib/source-map/source-node').SourceNode; + var util = require('./util'); + + exports['test some simple stuff'] = function (assert, util) { + var map = new SourceMapGenerator({ + file: 'foo.js', + sourceRoot: '.' + }); + assert.ok(true); + + var map = new SourceMapGenerator(); + assert.ok(true); + }; + + exports['test JSON serialization'] = function (assert, util) { + var map = new SourceMapGenerator({ + file: 'foo.js', + sourceRoot: '.' + }); + assert.equal(map.toString(), JSON.stringify(map)); + }; + + exports['test adding mappings (case 1)'] = function (assert, util) { + var map = new SourceMapGenerator({ + file: 'generated-foo.js', + sourceRoot: '.' + }); + + assert.doesNotThrow(function () { + map.addMapping({ + generated: { line: 1, column: 1 } + }); + }); + }; + + exports['test adding mappings (case 2)'] = function (assert, util) { + var map = new SourceMapGenerator({ + file: 'generated-foo.js', + sourceRoot: '.' + }); + + assert.doesNotThrow(function () { + map.addMapping({ + generated: { line: 1, column: 1 }, + source: 'bar.js', + original: { line: 1, column: 1 } + }); + }); + }; + + exports['test adding mappings (case 3)'] = function (assert, util) { + var map = new SourceMapGenerator({ + file: 'generated-foo.js', + sourceRoot: '.' + }); + + assert.doesNotThrow(function () { + map.addMapping({ + generated: { line: 1, column: 1 }, + source: 'bar.js', + original: { line: 1, column: 1 }, + name: 'someToken' + }); + }); + }; + + exports['test adding mappings (invalid)'] = function (assert, util) { + var map = new SourceMapGenerator({ + file: 'generated-foo.js', + sourceRoot: '.' + }); + + // Not enough info. + assert.throws(function () { + map.addMapping({}); + }); + + // Original file position, but no source. + assert.throws(function () { + map.addMapping({ + generated: { line: 1, column: 1 }, + original: { line: 1, column: 1 } + }); + }); + }; + + exports['test that the correct mappings are being generated'] = function (assert, util) { + var map = new SourceMapGenerator({ + file: 'min.js', + sourceRoot: '/the/root' + }); + + map.addMapping({ + generated: { line: 1, column: 1 }, + original: { line: 1, column: 1 }, + source: 'one.js' + }); + map.addMapping({ + generated: { line: 1, column: 5 }, + original: { line: 1, column: 5 }, + source: 'one.js' + }); + map.addMapping({ + generated: { line: 1, column: 9 }, + original: { line: 1, column: 11 }, + source: 'one.js' + }); + map.addMapping({ + generated: { line: 1, column: 18 }, + original: { line: 1, column: 21 }, + source: 'one.js', + name: 'bar' + }); + map.addMapping({ + generated: { line: 1, column: 21 }, + original: { line: 2, column: 3 }, + source: 'one.js' + }); + map.addMapping({ + generated: { line: 1, column: 28 }, + original: { line: 2, column: 10 }, + source: 'one.js', + name: 'baz' + }); + map.addMapping({ + generated: { line: 1, column: 32 }, + original: { line: 2, column: 14 }, + source: 'one.js', + name: 'bar' + }); + + map.addMapping({ + generated: { line: 2, column: 1 }, + original: { line: 1, column: 1 }, + source: 'two.js' + }); + map.addMapping({ + generated: { line: 2, column: 5 }, + original: { line: 1, column: 5 }, + source: 'two.js' + }); + map.addMapping({ + generated: { line: 2, column: 9 }, + original: { line: 1, column: 11 }, + source: 'two.js' + }); + map.addMapping({ + generated: { line: 2, column: 18 }, + original: { line: 1, column: 21 }, + source: 'two.js', + name: 'n' + }); + map.addMapping({ + generated: { line: 2, column: 21 }, + original: { line: 2, column: 3 }, + source: 'two.js' + }); + map.addMapping({ + generated: { line: 2, column: 28 }, + original: { line: 2, column: 10 }, + source: 'two.js', + name: 'n' + }); + + map = JSON.parse(map.toString()); + + util.assertEqualMaps(assert, map, util.testMap); + }; + + exports['test that source content can be set'] = function (assert, util) { + var map = new SourceMapGenerator({ + file: 'min.js', + sourceRoot: '/the/root' + }); + map.addMapping({ + generated: { line: 1, column: 1 }, + original: { line: 1, column: 1 }, + source: 'one.js' + }); + map.addMapping({ + generated: { line: 2, column: 1 }, + original: { line: 1, column: 1 }, + source: 'two.js' + }); + map.setSourceContent('one.js', 'one file content'); + + map = JSON.parse(map.toString()); + assert.equal(map.sources[0], 'one.js'); + assert.equal(map.sources[1], 'two.js'); + assert.equal(map.sourcesContent[0], 'one file content'); + assert.equal(map.sourcesContent[1], null); + }; + + exports['test .fromSourceMap'] = function (assert, util) { + var map = SourceMapGenerator.fromSourceMap(new SourceMapConsumer(util.testMap)); + util.assertEqualMaps(assert, map.toJSON(), util.testMap); + }; + + exports['test .fromSourceMap with sourcesContent'] = function (assert, util) { + var map = SourceMapGenerator.fromSourceMap( + new SourceMapConsumer(util.testMapWithSourcesContent)); + util.assertEqualMaps(assert, map.toJSON(), util.testMapWithSourcesContent); + }; + + exports['test applySourceMap'] = function (assert, util) { + var node = new SourceNode(null, null, null, [ + new SourceNode(2, 0, 'fileX', 'lineX2\n'), + 'genA1\n', + new SourceNode(2, 0, 'fileY', 'lineY2\n'), + 'genA2\n', + new SourceNode(1, 0, 'fileX', 'lineX1\n'), + 'genA3\n', + new SourceNode(1, 0, 'fileY', 'lineY1\n') + ]); + var mapStep1 = node.toStringWithSourceMap({ + file: 'fileA' + }).map; + mapStep1.setSourceContent('fileX', 'lineX1\nlineX2\n'); + mapStep1 = mapStep1.toJSON(); + + node = new SourceNode(null, null, null, [ + 'gen1\n', + new SourceNode(1, 0, 'fileA', 'lineA1\n'), + new SourceNode(2, 0, 'fileA', 'lineA2\n'), + new SourceNode(3, 0, 'fileA', 'lineA3\n'), + new SourceNode(4, 0, 'fileA', 'lineA4\n'), + new SourceNode(1, 0, 'fileB', 'lineB1\n'), + new SourceNode(2, 0, 'fileB', 'lineB2\n'), + 'gen2\n' + ]); + var mapStep2 = node.toStringWithSourceMap({ + file: 'fileGen' + }).map; + mapStep2.setSourceContent('fileB', 'lineB1\nlineB2\n'); + mapStep2 = mapStep2.toJSON(); + + node = new SourceNode(null, null, null, [ + 'gen1\n', + new SourceNode(2, 0, 'fileX', 'lineA1\n'), + new SourceNode(2, 0, 'fileA', 'lineA2\n'), + new SourceNode(2, 0, 'fileY', 'lineA3\n'), + new SourceNode(4, 0, 'fileA', 'lineA4\n'), + new SourceNode(1, 0, 'fileB', 'lineB1\n'), + new SourceNode(2, 0, 'fileB', 'lineB2\n'), + 'gen2\n' + ]); + var expectedMap = node.toStringWithSourceMap({ + file: 'fileGen' + }).map; + expectedMap.setSourceContent('fileX', 'lineX1\nlineX2\n'); + expectedMap.setSourceContent('fileB', 'lineB1\nlineB2\n'); + expectedMap = expectedMap.toJSON(); + + // apply source map "mapStep1" to "mapStep2" + var generator = SourceMapGenerator.fromSourceMap(new SourceMapConsumer(mapStep2)); + generator.applySourceMap(new SourceMapConsumer(mapStep1)); + var actualMap = generator.toJSON(); + + util.assertEqualMaps(assert, actualMap, expectedMap); + }; + + exports['test applySourceMap throws when file is missing'] = function (assert, util) { + var map = new SourceMapGenerator({ + file: 'test.js' + }); + var map2 = new SourceMapGenerator(); + assert.throws(function() { + map.applySourceMap(new SourceMapConsumer(map2.toJSON())); + }); + }; + + exports['test the two additional parameters of applySourceMap'] = function (assert, util) { + // Assume the following directory structure: + // + // http://foo.org/ + // bar.coffee + // app/ + // coffee/ + // foo.coffee + // temp/ + // bundle.js + // temp_maps/ + // bundle.js.map + // public/ + // bundle.min.js + // bundle.min.js.map + // + // http://www.example.com/ + // baz.coffee + + var bundleMap = new SourceMapGenerator({ + file: 'bundle.js' + }); + bundleMap.addMapping({ + generated: { line: 3, column: 3 }, + original: { line: 2, column: 2 }, + source: '../coffee/foo.coffee' + }); + bundleMap.setSourceContent('../coffee/foo.coffee', 'foo coffee'); + bundleMap.addMapping({ + generated: { line: 13, column: 13 }, + original: { line: 12, column: 12 }, + source: '/bar.coffee' + }); + bundleMap.setSourceContent('/bar.coffee', 'bar coffee'); + bundleMap.addMapping({ + generated: { line: 23, column: 23 }, + original: { line: 22, column: 22 }, + source: 'http://www.example.com/baz.coffee' + }); + bundleMap.setSourceContent( + 'http://www.example.com/baz.coffee', + 'baz coffee' + ); + bundleMap = new SourceMapConsumer(bundleMap.toJSON()); + + var minifiedMap = new SourceMapGenerator({ + file: 'bundle.min.js', + sourceRoot: '..' + }); + minifiedMap.addMapping({ + generated: { line: 1, column: 1 }, + original: { line: 3, column: 3 }, + source: 'temp/bundle.js' + }); + minifiedMap.addMapping({ + generated: { line: 11, column: 11 }, + original: { line: 13, column: 13 }, + source: 'temp/bundle.js' + }); + minifiedMap.addMapping({ + generated: { line: 21, column: 21 }, + original: { line: 23, column: 23 }, + source: 'temp/bundle.js' + }); + minifiedMap = new SourceMapConsumer(minifiedMap.toJSON()); + + var expectedMap = function (sources) { + var map = new SourceMapGenerator({ + file: 'bundle.min.js', + sourceRoot: '..' + }); + map.addMapping({ + generated: { line: 1, column: 1 }, + original: { line: 2, column: 2 }, + source: sources[0] + }); + map.setSourceContent(sources[0], 'foo coffee'); + map.addMapping({ + generated: { line: 11, column: 11 }, + original: { line: 12, column: 12 }, + source: sources[1] + }); + map.setSourceContent(sources[1], 'bar coffee'); + map.addMapping({ + generated: { line: 21, column: 21 }, + original: { line: 22, column: 22 }, + source: sources[2] + }); + map.setSourceContent(sources[2], 'baz coffee'); + return map.toJSON(); + } + + var actualMap = function (aSourceMapPath) { + var map = SourceMapGenerator.fromSourceMap(minifiedMap); + // Note that relying on `bundleMap.file` (which is simply 'bundle.js') + // instead of supplying the second parameter wouldn't work here. + map.applySourceMap(bundleMap, '../temp/bundle.js', aSourceMapPath); + return map.toJSON(); + } + + util.assertEqualMaps(assert, actualMap('../temp_maps'), expectedMap([ + 'coffee/foo.coffee', + '/bar.coffee', + 'http://www.example.com/baz.coffee' + ])); + + util.assertEqualMaps(assert, actualMap('/app/temp_maps'), expectedMap([ + '/app/coffee/foo.coffee', + '/bar.coffee', + 'http://www.example.com/baz.coffee' + ])); + + util.assertEqualMaps(assert, actualMap('http://foo.org/app/temp_maps'), expectedMap([ + 'http://foo.org/app/coffee/foo.coffee', + 'http://foo.org/bar.coffee', + 'http://www.example.com/baz.coffee' + ])); + }; + + exports['test sorting with duplicate generated mappings'] = function (assert, util) { + var map = new SourceMapGenerator({ + file: 'test.js' + }); + map.addMapping({ + generated: { line: 3, column: 0 }, + original: { line: 2, column: 0 }, + source: 'a.js' + }); + map.addMapping({ + generated: { line: 2, column: 0 } + }); + map.addMapping({ + generated: { line: 2, column: 0 } + }); + map.addMapping({ + generated: { line: 1, column: 0 }, + original: { line: 1, column: 0 }, + source: 'a.js' + }); + + util.assertEqualMaps(assert, map.toJSON(), { + version: 3, + file: 'test.js', + sources: ['a.js'], + names: [], + mappings: 'AAAA;A;AACA' + }); + }; + + exports['test ignore duplicate mappings.'] = function (assert, util) { + var init = { file: 'min.js', sourceRoot: '/the/root' }; + var map1, map2; + + // null original source location + var nullMapping1 = { + generated: { line: 1, column: 0 } + }; + var nullMapping2 = { + generated: { line: 2, column: 2 } + }; + + map1 = new SourceMapGenerator(init); + map2 = new SourceMapGenerator(init); + + map1.addMapping(nullMapping1); + map1.addMapping(nullMapping1); + + map2.addMapping(nullMapping1); + + util.assertEqualMaps(assert, map1.toJSON(), map2.toJSON()); + + map1.addMapping(nullMapping2); + map1.addMapping(nullMapping1); + + map2.addMapping(nullMapping2); + + util.assertEqualMaps(assert, map1.toJSON(), map2.toJSON()); + + // original source location + var srcMapping1 = { + generated: { line: 1, column: 0 }, + original: { line: 11, column: 0 }, + source: 'srcMapping1.js' + }; + var srcMapping2 = { + generated: { line: 2, column: 2 }, + original: { line: 11, column: 0 }, + source: 'srcMapping2.js' + }; + + map1 = new SourceMapGenerator(init); + map2 = new SourceMapGenerator(init); + + map1.addMapping(srcMapping1); + map1.addMapping(srcMapping1); + + map2.addMapping(srcMapping1); + + util.assertEqualMaps(assert, map1.toJSON(), map2.toJSON()); + + map1.addMapping(srcMapping2); + map1.addMapping(srcMapping1); + + map2.addMapping(srcMapping2); + + util.assertEqualMaps(assert, map1.toJSON(), map2.toJSON()); + + // full original source and name information + var fullMapping1 = { + generated: { line: 1, column: 0 }, + original: { line: 11, column: 0 }, + source: 'fullMapping1.js', + name: 'fullMapping1' + }; + var fullMapping2 = { + generated: { line: 2, column: 2 }, + original: { line: 11, column: 0 }, + source: 'fullMapping2.js', + name: 'fullMapping2' + }; + + map1 = new SourceMapGenerator(init); + map2 = new SourceMapGenerator(init); + + map1.addMapping(fullMapping1); + map1.addMapping(fullMapping1); + + map2.addMapping(fullMapping1); + + util.assertEqualMaps(assert, map1.toJSON(), map2.toJSON()); + + map1.addMapping(fullMapping2); + map1.addMapping(fullMapping1); + + map2.addMapping(fullMapping2); + + util.assertEqualMaps(assert, map1.toJSON(), map2.toJSON()); + }; + + exports['test github issue #72, check for duplicate names or sources'] = function (assert, util) { + var map = new SourceMapGenerator({ + file: 'test.js' + }); + map.addMapping({ + generated: { line: 1, column: 1 }, + original: { line: 2, column: 2 }, + source: 'a.js', + name: 'foo' + }); + map.addMapping({ + generated: { line: 3, column: 3 }, + original: { line: 4, column: 4 }, + source: 'a.js', + name: 'foo' + }); + util.assertEqualMaps(assert, map.toJSON(), { + version: 3, + file: 'test.js', + sources: ['a.js'], + names: ['foo'], + mappings: 'CACEA;;GAEEA' + }); + }; + +}); diff --git a/bin/node_modules/uglify-js/node_modules/source-map/test/source-map/test-source-node.js b/bin/node_modules/uglify-js/node_modules/source-map/test/source-map/test-source-node.js new file mode 100644 index 00000000..d186521b --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/source-map/test/source-map/test-source-node.js @@ -0,0 +1,487 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var SourceMapGenerator = require('../../lib/source-map/source-map-generator').SourceMapGenerator; + var SourceMapConsumer = require('../../lib/source-map/source-map-consumer').SourceMapConsumer; + var SourceNode = require('../../lib/source-map/source-node').SourceNode; + + function forEachNewline(fn) { + return function (assert, util) { + ['\n', '\r\n'].forEach(fn.bind(null, assert, util)); + } + } + + exports['test .add()'] = function (assert, util) { + var node = new SourceNode(null, null, null); + + // Adding a string works. + node.add('function noop() {}'); + + // Adding another source node works. + node.add(new SourceNode(null, null, null)); + + // Adding an array works. + node.add(['function foo() {', + new SourceNode(null, null, null, + 'return 10;'), + '}']); + + // Adding other stuff doesn't. + assert.throws(function () { + node.add({}); + }); + assert.throws(function () { + node.add(function () {}); + }); + }; + + exports['test .prepend()'] = function (assert, util) { + var node = new SourceNode(null, null, null); + + // Prepending a string works. + node.prepend('function noop() {}'); + assert.equal(node.children[0], 'function noop() {}'); + assert.equal(node.children.length, 1); + + // Prepending another source node works. + node.prepend(new SourceNode(null, null, null)); + assert.equal(node.children[0], ''); + assert.equal(node.children[1], 'function noop() {}'); + assert.equal(node.children.length, 2); + + // Prepending an array works. + node.prepend(['function foo() {', + new SourceNode(null, null, null, + 'return 10;'), + '}']); + assert.equal(node.children[0], 'function foo() {'); + assert.equal(node.children[1], 'return 10;'); + assert.equal(node.children[2], '}'); + assert.equal(node.children[3], ''); + assert.equal(node.children[4], 'function noop() {}'); + assert.equal(node.children.length, 5); + + // Prepending other stuff doesn't. + assert.throws(function () { + node.prepend({}); + }); + assert.throws(function () { + node.prepend(function () {}); + }); + }; + + exports['test .toString()'] = function (assert, util) { + assert.equal((new SourceNode(null, null, null, + ['function foo() {', + new SourceNode(null, null, null, 'return 10;'), + '}'])).toString(), + 'function foo() {return 10;}'); + }; + + exports['test .join()'] = function (assert, util) { + assert.equal((new SourceNode(null, null, null, + ['a', 'b', 'c', 'd'])).join(', ').toString(), + 'a, b, c, d'); + }; + + exports['test .walk()'] = function (assert, util) { + var node = new SourceNode(null, null, null, + ['(function () {\n', + ' ', new SourceNode(1, 0, 'a.js', ['someCall()']), ';\n', + ' ', new SourceNode(2, 0, 'b.js', ['if (foo) bar()']), ';\n', + '}());']); + var expected = [ + { str: '(function () {\n', source: null, line: null, column: null }, + { str: ' ', source: null, line: null, column: null }, + { str: 'someCall()', source: 'a.js', line: 1, column: 0 }, + { str: ';\n', source: null, line: null, column: null }, + { str: ' ', source: null, line: null, column: null }, + { str: 'if (foo) bar()', source: 'b.js', line: 2, column: 0 }, + { str: ';\n', source: null, line: null, column: null }, + { str: '}());', source: null, line: null, column: null }, + ]; + var i = 0; + node.walk(function (chunk, loc) { + assert.equal(expected[i].str, chunk); + assert.equal(expected[i].source, loc.source); + assert.equal(expected[i].line, loc.line); + assert.equal(expected[i].column, loc.column); + i++; + }); + }; + + exports['test .replaceRight'] = function (assert, util) { + var node; + + // Not nested + node = new SourceNode(null, null, null, 'hello world'); + node.replaceRight(/world/, 'universe'); + assert.equal(node.toString(), 'hello universe'); + + // Nested + node = new SourceNode(null, null, null, + [new SourceNode(null, null, null, 'hey sexy mama, '), + new SourceNode(null, null, null, 'want to kill all humans?')]); + node.replaceRight(/kill all humans/, 'watch Futurama'); + assert.equal(node.toString(), 'hey sexy mama, want to watch Futurama?'); + }; + + exports['test .toStringWithSourceMap()'] = forEachNewline(function (assert, util, nl) { + var node = new SourceNode(null, null, null, + ['(function () {' + nl, + ' ', + new SourceNode(1, 0, 'a.js', 'someCall', 'originalCall'), + new SourceNode(1, 8, 'a.js', '()'), + ';' + nl, + ' ', new SourceNode(2, 0, 'b.js', ['if (foo) bar()']), ';' + nl, + '}());']); + var result = node.toStringWithSourceMap({ + file: 'foo.js' + }); + + assert.equal(result.code, [ + '(function () {', + ' someCall();', + ' if (foo) bar();', + '}());' + ].join(nl)); + + var map = result.map; + var mapWithoutOptions = node.toStringWithSourceMap().map; + + assert.ok(map instanceof SourceMapGenerator, 'map instanceof SourceMapGenerator'); + assert.ok(mapWithoutOptions instanceof SourceMapGenerator, 'mapWithoutOptions instanceof SourceMapGenerator'); + mapWithoutOptions._file = 'foo.js'; + util.assertEqualMaps(assert, map.toJSON(), mapWithoutOptions.toJSON()); + + map = new SourceMapConsumer(map.toString()); + + var actual; + + actual = map.originalPositionFor({ + line: 1, + column: 4 + }); + assert.equal(actual.source, null); + assert.equal(actual.line, null); + assert.equal(actual.column, null); + + actual = map.originalPositionFor({ + line: 2, + column: 2 + }); + assert.equal(actual.source, 'a.js'); + assert.equal(actual.line, 1); + assert.equal(actual.column, 0); + assert.equal(actual.name, 'originalCall'); + + actual = map.originalPositionFor({ + line: 3, + column: 2 + }); + assert.equal(actual.source, 'b.js'); + assert.equal(actual.line, 2); + assert.equal(actual.column, 0); + + actual = map.originalPositionFor({ + line: 3, + column: 16 + }); + assert.equal(actual.source, null); + assert.equal(actual.line, null); + assert.equal(actual.column, null); + + actual = map.originalPositionFor({ + line: 4, + column: 2 + }); + assert.equal(actual.source, null); + assert.equal(actual.line, null); + assert.equal(actual.column, null); + }); + + exports['test .fromStringWithSourceMap()'] = forEachNewline(function (assert, util, nl) { + var testCode = util.testGeneratedCode.replace(/\n/g, nl); + var node = SourceNode.fromStringWithSourceMap( + testCode, + new SourceMapConsumer(util.testMap)); + + var result = node.toStringWithSourceMap({ + file: 'min.js' + }); + var map = result.map; + var code = result.code; + + assert.equal(code, testCode); + assert.ok(map instanceof SourceMapGenerator, 'map instanceof SourceMapGenerator'); + map = map.toJSON(); + assert.equal(map.version, util.testMap.version); + assert.equal(map.file, util.testMap.file); + assert.equal(map.mappings, util.testMap.mappings); + }); + + exports['test .fromStringWithSourceMap() empty map'] = forEachNewline(function (assert, util, nl) { + var node = SourceNode.fromStringWithSourceMap( + util.testGeneratedCode.replace(/\n/g, nl), + new SourceMapConsumer(util.emptyMap)); + var result = node.toStringWithSourceMap({ + file: 'min.js' + }); + var map = result.map; + var code = result.code; + + assert.equal(code, util.testGeneratedCode.replace(/\n/g, nl)); + assert.ok(map instanceof SourceMapGenerator, 'map instanceof SourceMapGenerator'); + map = map.toJSON(); + assert.equal(map.version, util.emptyMap.version); + assert.equal(map.file, util.emptyMap.file); + assert.equal(map.mappings.length, util.emptyMap.mappings.length); + assert.equal(map.mappings, util.emptyMap.mappings); + }); + + exports['test .fromStringWithSourceMap() complex version'] = forEachNewline(function (assert, util, nl) { + var input = new SourceNode(null, null, null, [ + "(function() {" + nl, + " var Test = {};" + nl, + " ", new SourceNode(1, 0, "a.js", "Test.A = { value: 1234 };" + nl), + " ", new SourceNode(2, 0, "a.js", "Test.A.x = 'xyz';"), nl, + "}());" + nl, + "/* Generated Source */"]); + input = input.toStringWithSourceMap({ + file: 'foo.js' + }); + + var node = SourceNode.fromStringWithSourceMap( + input.code, + new SourceMapConsumer(input.map.toString())); + + var result = node.toStringWithSourceMap({ + file: 'foo.js' + }); + var map = result.map; + var code = result.code; + + assert.equal(code, input.code); + assert.ok(map instanceof SourceMapGenerator, 'map instanceof SourceMapGenerator'); + map = map.toJSON(); + var inputMap = input.map.toJSON(); + util.assertEqualMaps(assert, map, inputMap); + }); + + exports['test .toStringWithSourceMap() merging duplicate mappings'] = forEachNewline(function (assert, util, nl) { + var input = new SourceNode(null, null, null, [ + new SourceNode(1, 0, "a.js", "(function"), + new SourceNode(1, 0, "a.js", "() {" + nl), + " ", + new SourceNode(1, 0, "a.js", "var Test = "), + new SourceNode(1, 0, "b.js", "{};" + nl), + new SourceNode(2, 0, "b.js", "Test"), + new SourceNode(2, 0, "b.js", ".A", "A"), + new SourceNode(2, 20, "b.js", " = { value: ", "A"), + "1234", + new SourceNode(2, 40, "b.js", " };" + nl, "A"), + "}());" + nl, + "/* Generated Source */" + ]); + input = input.toStringWithSourceMap({ + file: 'foo.js' + }); + + assert.equal(input.code, [ + "(function() {", + " var Test = {};", + "Test.A = { value: 1234 };", + "}());", + "/* Generated Source */" + ].join(nl)) + + var correctMap = new SourceMapGenerator({ + file: 'foo.js' + }); + correctMap.addMapping({ + generated: { line: 1, column: 0 }, + source: 'a.js', + original: { line: 1, column: 0 } + }); + // Here is no need for a empty mapping, + // because mappings ends at eol + correctMap.addMapping({ + generated: { line: 2, column: 2 }, + source: 'a.js', + original: { line: 1, column: 0 } + }); + correctMap.addMapping({ + generated: { line: 2, column: 13 }, + source: 'b.js', + original: { line: 1, column: 0 } + }); + correctMap.addMapping({ + generated: { line: 3, column: 0 }, + source: 'b.js', + original: { line: 2, column: 0 } + }); + correctMap.addMapping({ + generated: { line: 3, column: 4 }, + source: 'b.js', + name: 'A', + original: { line: 2, column: 0 } + }); + correctMap.addMapping({ + generated: { line: 3, column: 6 }, + source: 'b.js', + name: 'A', + original: { line: 2, column: 20 } + }); + // This empty mapping is required, + // because there is a hole in the middle of the line + correctMap.addMapping({ + generated: { line: 3, column: 18 } + }); + correctMap.addMapping({ + generated: { line: 3, column: 22 }, + source: 'b.js', + name: 'A', + original: { line: 2, column: 40 } + }); + // Here is no need for a empty mapping, + // because mappings ends at eol + + var inputMap = input.map.toJSON(); + correctMap = correctMap.toJSON(); + util.assertEqualMaps(assert, inputMap, correctMap); + }); + + exports['test .toStringWithSourceMap() multi-line SourceNodes'] = forEachNewline(function (assert, util, nl) { + var input = new SourceNode(null, null, null, [ + new SourceNode(1, 0, "a.js", "(function() {" + nl + "var nextLine = 1;" + nl + "anotherLine();" + nl), + new SourceNode(2, 2, "b.js", "Test.call(this, 123);" + nl), + new SourceNode(2, 2, "b.js", "this['stuff'] = 'v';" + nl), + new SourceNode(2, 2, "b.js", "anotherLine();" + nl), + "/*" + nl + "Generated" + nl + "Source" + nl + "*/" + nl, + new SourceNode(3, 4, "c.js", "anotherLine();" + nl), + "/*" + nl + "Generated" + nl + "Source" + nl + "*/" + ]); + input = input.toStringWithSourceMap({ + file: 'foo.js' + }); + + assert.equal(input.code, [ + "(function() {", + "var nextLine = 1;", + "anotherLine();", + "Test.call(this, 123);", + "this['stuff'] = 'v';", + "anotherLine();", + "/*", + "Generated", + "Source", + "*/", + "anotherLine();", + "/*", + "Generated", + "Source", + "*/" + ].join(nl)); + + var correctMap = new SourceMapGenerator({ + file: 'foo.js' + }); + correctMap.addMapping({ + generated: { line: 1, column: 0 }, + source: 'a.js', + original: { line: 1, column: 0 } + }); + correctMap.addMapping({ + generated: { line: 2, column: 0 }, + source: 'a.js', + original: { line: 1, column: 0 } + }); + correctMap.addMapping({ + generated: { line: 3, column: 0 }, + source: 'a.js', + original: { line: 1, column: 0 } + }); + correctMap.addMapping({ + generated: { line: 4, column: 0 }, + source: 'b.js', + original: { line: 2, column: 2 } + }); + correctMap.addMapping({ + generated: { line: 5, column: 0 }, + source: 'b.js', + original: { line: 2, column: 2 } + }); + correctMap.addMapping({ + generated: { line: 6, column: 0 }, + source: 'b.js', + original: { line: 2, column: 2 } + }); + correctMap.addMapping({ + generated: { line: 11, column: 0 }, + source: 'c.js', + original: { line: 3, column: 4 } + }); + + var inputMap = input.map.toJSON(); + correctMap = correctMap.toJSON(); + util.assertEqualMaps(assert, inputMap, correctMap); + }); + + exports['test .toStringWithSourceMap() with empty string'] = function (assert, util) { + var node = new SourceNode(1, 0, 'empty.js', ''); + var result = node.toStringWithSourceMap(); + assert.equal(result.code, ''); + }; + + exports['test setSourceContent with toStringWithSourceMap'] = function (assert, util) { + var aNode = new SourceNode(1, 1, 'a.js', 'a'); + aNode.setSourceContent('a.js', 'someContent'); + var node = new SourceNode(null, null, null, + ['(function () {\n', + ' ', aNode, + ' ', new SourceNode(1, 1, 'b.js', 'b'), + '}());']); + node.setSourceContent('b.js', 'otherContent'); + var map = node.toStringWithSourceMap({ + file: 'foo.js' + }).map; + + assert.ok(map instanceof SourceMapGenerator, 'map instanceof SourceMapGenerator'); + map = new SourceMapConsumer(map.toString()); + + assert.equal(map.sources.length, 2); + assert.equal(map.sources[0], 'a.js'); + assert.equal(map.sources[1], 'b.js'); + assert.equal(map.sourcesContent.length, 2); + assert.equal(map.sourcesContent[0], 'someContent'); + assert.equal(map.sourcesContent[1], 'otherContent'); + }; + + exports['test walkSourceContents'] = function (assert, util) { + var aNode = new SourceNode(1, 1, 'a.js', 'a'); + aNode.setSourceContent('a.js', 'someContent'); + var node = new SourceNode(null, null, null, + ['(function () {\n', + ' ', aNode, + ' ', new SourceNode(1, 1, 'b.js', 'b'), + '}());']); + node.setSourceContent('b.js', 'otherContent'); + var results = []; + node.walkSourceContents(function (sourceFile, sourceContent) { + results.push([sourceFile, sourceContent]); + }); + assert.equal(results.length, 2); + assert.equal(results[0][0], 'a.js'); + assert.equal(results[0][1], 'someContent'); + assert.equal(results[1][0], 'b.js'); + assert.equal(results[1][1], 'otherContent'); + }; +}); diff --git a/bin/node_modules/uglify-js/node_modules/source-map/test/source-map/test-util.js b/bin/node_modules/uglify-js/node_modules/source-map/test/source-map/test-util.js new file mode 100644 index 00000000..22e9a9e3 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/source-map/test/source-map/test-util.js @@ -0,0 +1,127 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2014 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var libUtil = require('../../lib/source-map/util'); + + exports['test urls'] = function (assert, util) { + var assertUrl = function (url) { + assert.equal(url, libUtil.urlGenerate(libUtil.urlParse(url))); + }; + assertUrl('http://'); + assertUrl('http://www.example.com'); + assertUrl('http://user:pass@www.example.com'); + assertUrl('http://www.example.com:80'); + assertUrl('http://www.example.com/'); + assertUrl('http://www.example.com/foo/bar'); + assertUrl('http://www.example.com/foo/bar/'); + assertUrl('http://user:pass@www.example.com:80/foo/bar/'); + + assertUrl('//'); + assertUrl('//www.example.com'); + assertUrl('file:///www.example.com'); + + assert.equal(libUtil.urlParse('a//b'), null); + }; + + exports['test normalize()'] = function (assert, util) { + assert.equal(libUtil.normalize('/..'), '/'); + assert.equal(libUtil.normalize('/../'), '/'); + assert.equal(libUtil.normalize('/../../../..'), '/'); + assert.equal(libUtil.normalize('/../../../../a/b/c'), '/a/b/c'); + assert.equal(libUtil.normalize('/a/b/c/../../../d/../../e'), '/e'); + + assert.equal(libUtil.normalize('..'), '..'); + assert.equal(libUtil.normalize('../'), '../'); + assert.equal(libUtil.normalize('../../a/'), '../../a/'); + assert.equal(libUtil.normalize('a/..'), '.'); + assert.equal(libUtil.normalize('a/../../..'), '../..'); + + assert.equal(libUtil.normalize('/.'), '/'); + assert.equal(libUtil.normalize('/./'), '/'); + assert.equal(libUtil.normalize('/./././.'), '/'); + assert.equal(libUtil.normalize('/././././a/b/c'), '/a/b/c'); + assert.equal(libUtil.normalize('/a/b/c/./././d/././e'), '/a/b/c/d/e'); + + assert.equal(libUtil.normalize('.'), '.'); + assert.equal(libUtil.normalize('./'), '.'); + assert.equal(libUtil.normalize('././a'), 'a'); + assert.equal(libUtil.normalize('a/./'), 'a/'); + assert.equal(libUtil.normalize('a/././.'), 'a'); + + assert.equal(libUtil.normalize('/a/b//c////d/////'), '/a/b/c/d/'); + assert.equal(libUtil.normalize('///a/b//c////d/////'), '///a/b/c/d/'); + assert.equal(libUtil.normalize('a/b//c////d'), 'a/b/c/d'); + + assert.equal(libUtil.normalize('.///.././../a/b//./..'), '../../a') + + assert.equal(libUtil.normalize('http://www.example.com'), 'http://www.example.com'); + assert.equal(libUtil.normalize('http://www.example.com/'), 'http://www.example.com/'); + assert.equal(libUtil.normalize('http://www.example.com/./..//a/b/c/.././d//'), 'http://www.example.com/a/b/d/'); + }; + + exports['test join()'] = function (assert, util) { + assert.equal(libUtil.join('a', 'b'), 'a/b'); + assert.equal(libUtil.join('a/', 'b'), 'a/b'); + assert.equal(libUtil.join('a//', 'b'), 'a/b'); + assert.equal(libUtil.join('a', 'b/'), 'a/b/'); + assert.equal(libUtil.join('a', 'b//'), 'a/b/'); + assert.equal(libUtil.join('a/', '/b'), '/b'); + assert.equal(libUtil.join('a//', '//b'), '//b'); + + assert.equal(libUtil.join('a', '..'), '.'); + assert.equal(libUtil.join('a', '../b'), 'b'); + assert.equal(libUtil.join('a/b', '../c'), 'a/c'); + + assert.equal(libUtil.join('a', '.'), 'a'); + assert.equal(libUtil.join('a', './b'), 'a/b'); + assert.equal(libUtil.join('a/b', './c'), 'a/b/c'); + + assert.equal(libUtil.join('a', 'http://www.example.com'), 'http://www.example.com'); + assert.equal(libUtil.join('a', 'data:foo,bar'), 'data:foo,bar'); + + + assert.equal(libUtil.join('http://foo.org/a', 'b'), 'http://foo.org/a/b'); + assert.equal(libUtil.join('http://foo.org/a/', 'b'), 'http://foo.org/a/b'); + assert.equal(libUtil.join('http://foo.org/a//', 'b'), 'http://foo.org/a/b'); + assert.equal(libUtil.join('http://foo.org/a', 'b/'), 'http://foo.org/a/b/'); + assert.equal(libUtil.join('http://foo.org/a', 'b//'), 'http://foo.org/a/b/'); + assert.equal(libUtil.join('http://foo.org/a/', '/b'), 'http://foo.org/b'); + assert.equal(libUtil.join('http://foo.org/a//', '//b'), 'http://b'); + + assert.equal(libUtil.join('http://foo.org/a', '..'), 'http://foo.org/'); + assert.equal(libUtil.join('http://foo.org/a', '../b'), 'http://foo.org/b'); + assert.equal(libUtil.join('http://foo.org/a/b', '../c'), 'http://foo.org/a/c'); + + assert.equal(libUtil.join('http://foo.org/a', '.'), 'http://foo.org/a'); + assert.equal(libUtil.join('http://foo.org/a', './b'), 'http://foo.org/a/b'); + assert.equal(libUtil.join('http://foo.org/a/b', './c'), 'http://foo.org/a/b/c'); + + assert.equal(libUtil.join('http://foo.org/a', 'http://www.example.com'), 'http://www.example.com'); + assert.equal(libUtil.join('http://foo.org/a', 'data:foo,bar'), 'data:foo,bar'); + + + assert.equal(libUtil.join('http://foo.org', 'a'), 'http://foo.org/a'); + assert.equal(libUtil.join('http://foo.org/', 'a'), 'http://foo.org/a'); + assert.equal(libUtil.join('http://foo.org//', 'a'), 'http://foo.org/a'); + assert.equal(libUtil.join('http://foo.org', '/a'), 'http://foo.org/a'); + assert.equal(libUtil.join('http://foo.org/', '/a'), 'http://foo.org/a'); + assert.equal(libUtil.join('http://foo.org//', '/a'), 'http://foo.org/a'); + + + assert.equal(libUtil.join('http://', 'www.example.com'), 'http://www.example.com'); + assert.equal(libUtil.join('file:///', 'www.example.com'), 'file:///www.example.com'); + assert.equal(libUtil.join('http://', 'ftp://example.com'), 'ftp://example.com'); + + assert.equal(libUtil.join('http://www.example.com', '//foo.org/bar'), 'http://foo.org/bar'); + assert.equal(libUtil.join('//www.example.com', '//foo.org/bar'), '//foo.org/bar'); + }; + +}); diff --git a/bin/node_modules/uglify-js/node_modules/source-map/test/source-map/util.js b/bin/node_modules/uglify-js/node_modules/source-map/test/source-map/util.js new file mode 100644 index 00000000..288046bf --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/source-map/test/source-map/util.js @@ -0,0 +1,161 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var util = require('../../lib/source-map/util'); + + // This is a test mapping which maps functions from two different files + // (one.js and two.js) to a minified generated source. + // + // Here is one.js: + // + // ONE.foo = function (bar) { + // return baz(bar); + // }; + // + // Here is two.js: + // + // TWO.inc = function (n) { + // return n + 1; + // }; + // + // And here is the generated code (min.js): + // + // ONE.foo=function(a){return baz(a);}; + // TWO.inc=function(a){return a+1;}; + exports.testGeneratedCode = " ONE.foo=function(a){return baz(a);};\n"+ + " TWO.inc=function(a){return a+1;};"; + exports.testMap = { + version: 3, + file: 'min.js', + names: ['bar', 'baz', 'n'], + sources: ['one.js', 'two.js'], + sourceRoot: '/the/root', + mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA' + }; + exports.testMapWithSourcesContent = { + version: 3, + file: 'min.js', + names: ['bar', 'baz', 'n'], + sources: ['one.js', 'two.js'], + sourcesContent: [ + ' ONE.foo = function (bar) {\n' + + ' return baz(bar);\n' + + ' };', + ' TWO.inc = function (n) {\n' + + ' return n + 1;\n' + + ' };' + ], + sourceRoot: '/the/root', + mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA' + }; + exports.emptyMap = { + version: 3, + file: 'min.js', + names: [], + sources: [], + mappings: '' + }; + + + function assertMapping(generatedLine, generatedColumn, originalSource, + originalLine, originalColumn, name, map, assert, + dontTestGenerated, dontTestOriginal) { + if (!dontTestOriginal) { + var origMapping = map.originalPositionFor({ + line: generatedLine, + column: generatedColumn + }); + assert.equal(origMapping.name, name, + 'Incorrect name, expected ' + JSON.stringify(name) + + ', got ' + JSON.stringify(origMapping.name)); + assert.equal(origMapping.line, originalLine, + 'Incorrect line, expected ' + JSON.stringify(originalLine) + + ', got ' + JSON.stringify(origMapping.line)); + assert.equal(origMapping.column, originalColumn, + 'Incorrect column, expected ' + JSON.stringify(originalColumn) + + ', got ' + JSON.stringify(origMapping.column)); + + var expectedSource; + + if (originalSource && map.sourceRoot && originalSource.indexOf(map.sourceRoot) === 0) { + expectedSource = originalSource; + } else if (originalSource) { + expectedSource = map.sourceRoot + ? util.join(map.sourceRoot, originalSource) + : originalSource; + } else { + expectedSource = null; + } + + assert.equal(origMapping.source, expectedSource, + 'Incorrect source, expected ' + JSON.stringify(expectedSource) + + ', got ' + JSON.stringify(origMapping.source)); + } + + if (!dontTestGenerated) { + var genMapping = map.generatedPositionFor({ + source: originalSource, + line: originalLine, + column: originalColumn + }); + assert.equal(genMapping.line, generatedLine, + 'Incorrect line, expected ' + JSON.stringify(generatedLine) + + ', got ' + JSON.stringify(genMapping.line)); + assert.equal(genMapping.column, generatedColumn, + 'Incorrect column, expected ' + JSON.stringify(generatedColumn) + + ', got ' + JSON.stringify(genMapping.column)); + } + } + exports.assertMapping = assertMapping; + + function assertEqualMaps(assert, actualMap, expectedMap) { + assert.equal(actualMap.version, expectedMap.version, "version mismatch"); + assert.equal(actualMap.file, expectedMap.file, "file mismatch"); + assert.equal(actualMap.names.length, + expectedMap.names.length, + "names length mismatch: " + + actualMap.names.join(", ") + " != " + expectedMap.names.join(", ")); + for (var i = 0; i < actualMap.names.length; i++) { + assert.equal(actualMap.names[i], + expectedMap.names[i], + "names[" + i + "] mismatch: " + + actualMap.names.join(", ") + " != " + expectedMap.names.join(", ")); + } + assert.equal(actualMap.sources.length, + expectedMap.sources.length, + "sources length mismatch: " + + actualMap.sources.join(", ") + " != " + expectedMap.sources.join(", ")); + for (var i = 0; i < actualMap.sources.length; i++) { + assert.equal(actualMap.sources[i], + expectedMap.sources[i], + "sources[" + i + "] length mismatch: " + + actualMap.sources.join(", ") + " != " + expectedMap.sources.join(", ")); + } + assert.equal(actualMap.sourceRoot, + expectedMap.sourceRoot, + "sourceRoot mismatch: " + + actualMap.sourceRoot + " != " + expectedMap.sourceRoot); + assert.equal(actualMap.mappings, expectedMap.mappings, + "mappings mismatch:\nActual: " + actualMap.mappings + "\nExpected: " + expectedMap.mappings); + if (actualMap.sourcesContent) { + assert.equal(actualMap.sourcesContent.length, + expectedMap.sourcesContent.length, + "sourcesContent length mismatch"); + for (var i = 0; i < actualMap.sourcesContent.length; i++) { + assert.equal(actualMap.sourcesContent[i], + expectedMap.sourcesContent[i], + "sourcesContent[" + i + "] mismatch"); + } + } + } + exports.assertEqualMaps = assertEqualMaps; + +}); diff --git a/bin/node_modules/uglify-js/node_modules/uglify-to-browserify/.npmignore b/bin/node_modules/uglify-js/node_modules/uglify-to-browserify/.npmignore new file mode 100644 index 00000000..66d015ba --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/uglify-to-browserify/.npmignore @@ -0,0 +1,14 @@ +lib-cov +*.seed +*.log +*.csv +*.dat +*.out +*.pid +*.gz +pids +logs +results +npm-debug.log +node_modules +/test/output.js diff --git a/bin/node_modules/uglify-js/node_modules/uglify-to-browserify/.travis.yml b/bin/node_modules/uglify-js/node_modules/uglify-to-browserify/.travis.yml new file mode 100644 index 00000000..9a61f6bd --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/uglify-to-browserify/.travis.yml @@ -0,0 +1,3 @@ +language: node_js +node_js: + - "0.10" \ No newline at end of file diff --git a/bin/node_modules/uglify-js/node_modules/uglify-to-browserify/LICENSE b/bin/node_modules/uglify-js/node_modules/uglify-to-browserify/LICENSE new file mode 100644 index 00000000..dfb0b19e --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/uglify-to-browserify/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2013 Forbes Lindesay + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/bin/node_modules/uglify-js/node_modules/uglify-to-browserify/README.md b/bin/node_modules/uglify-js/node_modules/uglify-to-browserify/README.md new file mode 100644 index 00000000..99685da2 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/uglify-to-browserify/README.md @@ -0,0 +1,15 @@ +# uglify-to-browserify + +A transform to make UglifyJS work in browserify. + +[![Build Status](https://travis-ci.org/ForbesLindesay/uglify-to-browserify.png?branch=master)](https://travis-ci.org/ForbesLindesay/uglify-to-browserify) +[![Dependency Status](https://gemnasium.com/ForbesLindesay/uglify-to-browserify.png)](https://gemnasium.com/ForbesLindesay/uglify-to-browserify) +[![NPM version](https://badge.fury.io/js/uglify-to-browserify.png)](http://badge.fury.io/js/uglify-to-browserify) + +## Installation + + npm install uglify-to-browserify + +## License + + MIT \ No newline at end of file diff --git a/bin/node_modules/uglify-js/node_modules/uglify-to-browserify/index.js b/bin/node_modules/uglify-js/node_modules/uglify-to-browserify/index.js new file mode 100644 index 00000000..2cea629e --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/uglify-to-browserify/index.js @@ -0,0 +1,49 @@ +'use strict' + +var fs = require('fs') +var PassThrough = require('stream').PassThrough +var Transform = require('stream').Transform + +if (typeof Transform === 'undefined') { + throw new Error('UglifyJS only supports browserify when using node >= 0.10.x') +} + +var cache = {} +module.exports = transform +function transform(file) { + if (!/tools\/node\.js$/.test(file.replace(/\\/g,'/'))) return new PassThrough(); + if (cache[file]) return makeStream(cache[file]) + var uglify = require(file) + var src = 'var sys = require("util");\nvar MOZ_SourceMap = require("source-map");\nvar UglifyJS = exports;\n' + uglify.FILES.map(function (path) { return fs.readFileSync(path, 'utf8') }).join('\n') + + var ast = uglify.parse(src) + ast.figure_out_scope() + + var variables = ast.variables + .map(function (node, name) { + return name + }) + + src += '\n\n' + variables.map(function (v) { return 'exports.' + v + ' = ' + v + ';' }).join('\n') + '\n\n' + + src += 'exports.AST_Node.warn_function = function (txt) { if (typeof console != "undefined" && typeof console.warn === "function") console.warn(txt) }\n\n' + + src += 'exports.minify = ' + uglify.minify.toString() + ';\n\n' + src += 'exports.describe_ast = ' + uglify.describe_ast.toString() + ';' + + // TODO: remove once https://github.com/substack/node-browserify/issues/631 is resolved + src = src.replace(/"for"/g, '"fo" + "r"') + + cache[file] = src + return makeStream(src); +} + +function makeStream(src) { + var res = new Transform(); + res._transform = function (chunk, encoding, callback) { callback() } + res._flush = function (callback) { + res.push(src) + callback() + } + return res; +} diff --git a/bin/node_modules/uglify-js/node_modules/uglify-to-browserify/package.json b/bin/node_modules/uglify-js/node_modules/uglify-to-browserify/package.json new file mode 100644 index 00000000..790bec37 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/uglify-to-browserify/package.json @@ -0,0 +1,30 @@ +{ + "name": "uglify-to-browserify", + "version": "1.0.2", + "description": "A transform to make UglifyJS work in browserify.", + "keywords": [], + "dependencies": {}, + "devDependencies": { + "uglify-js": "~2.4.0", + "source-map": "~0.1.27" + }, + "scripts": { + "test": "node test/index.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/ForbesLindesay/uglify-to-browserify.git" + }, + "author": { + "name": "ForbesLindesay" + }, + "license": "MIT", + "readme": "# uglify-to-browserify\r\n\r\nA transform to make UglifyJS work in browserify.\r\n\r\n[![Build Status](https://travis-ci.org/ForbesLindesay/uglify-to-browserify.png?branch=master)](https://travis-ci.org/ForbesLindesay/uglify-to-browserify)\r\n[![Dependency Status](https://gemnasium.com/ForbesLindesay/uglify-to-browserify.png)](https://gemnasium.com/ForbesLindesay/uglify-to-browserify)\r\n[![NPM version](https://badge.fury.io/js/uglify-to-browserify.png)](http://badge.fury.io/js/uglify-to-browserify)\r\n\r\n## Installation\r\n\r\n npm install uglify-to-browserify\r\n\r\n## License\r\n\r\n MIT", + "readmeFilename": "README.md", + "bugs": { + "url": "https://github.com/ForbesLindesay/uglify-to-browserify/issues" + }, + "homepage": "https://github.com/ForbesLindesay/uglify-to-browserify", + "_id": "uglify-to-browserify@1.0.2", + "_from": "uglify-to-browserify@~1.0.0" +} diff --git a/bin/node_modules/uglify-js/node_modules/uglify-to-browserify/test/index.js b/bin/node_modules/uglify-js/node_modules/uglify-to-browserify/test/index.js new file mode 100644 index 00000000..41178942 --- /dev/null +++ b/bin/node_modules/uglify-js/node_modules/uglify-to-browserify/test/index.js @@ -0,0 +1,22 @@ +var fs = require('fs') +var br = require('../') +var test = fs.readFileSync(require.resolve('uglify-js/test/run-tests.js'), 'utf8') + .replace(/^#.*\n/, '') + +var transform = br(require.resolve('uglify-js')) +transform.pipe(fs.createWriteStream(__dirname + '/output.js')) + .on('close', function () { + Function('module,require', test)({ + filename: require.resolve('uglify-js/test/run-tests.js') + }, + function (name) { + if (name === '../tools/node') { + return require('./output.js') + } else if (/^[a-z]+$/.test(name)) { + return require(name) + } else { + throw new Error('I didn\'t expect you to require ' + name) + } + }) + }) +transform.end(fs.readFileSync(require.resolve('uglify-js'), 'utf8')) \ No newline at end of file diff --git a/bin/node_modules/uglify-js/package.json b/bin/node_modules/uglify-js/package.json new file mode 100644 index 00000000..4184bccd --- /dev/null +++ b/bin/node_modules/uglify-js/package.json @@ -0,0 +1,45 @@ +{ + "name": "uglify-js", + "description": "JavaScript parser, mangler/compressor and beautifier toolkit", + "homepage": "http://lisperator.net/uglifyjs", + "main": "tools/node.js", + "version": "2.4.15", + "engines": { + "node": ">=0.4.0" + }, + "maintainers": [ + { + "name": "Mihai Bazon", + "email": "mihai.bazon@gmail.com", + "url": "http://lisperator.net/" + } + ], + "repository": { + "type": "git", + "url": "https://github.com/mishoo/UglifyJS2.git" + }, + "dependencies": { + "async": "~0.2.6", + "source-map": "0.1.34", + "optimist": "~0.3.5", + "uglify-to-browserify": "~1.0.0" + }, + "browserify": { + "transform": [ + "uglify-to-browserify" + ] + }, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "scripts": { + "test": "node test/run-tests.js" + }, + "readme": "UglifyJS 2\n==========\n[![Build Status](https://travis-ci.org/mishoo/UglifyJS2.png)](https://travis-ci.org/mishoo/UglifyJS2)\n\nUglifyJS is a JavaScript parser, minifier, compressor or beautifier toolkit.\n\nThis page documents the command line utility. For\n[API and internals documentation see my website](http://lisperator.net/uglifyjs/).\nThere's also an\n[in-browser online demo](http://lisperator.net/uglifyjs/#demo) (for Firefox,\nChrome and probably Safari).\n\nInstall\n-------\n\nFirst make sure you have installed the latest version of [node.js](http://nodejs.org/)\n(You may need to restart your computer after this step).\n\nFrom NPM for use as a command line app:\n\n npm install uglify-js -g\n\nFrom NPM for programmatic use:\n\n npm install uglify-js\n\nFrom Git:\n\n git clone git://github.com/mishoo/UglifyJS2.git\n cd UglifyJS2\n npm link .\n\nUsage\n-----\n\n uglifyjs [input files] [options]\n\nUglifyJS2 can take multiple input files. It's recommended that you pass the\ninput files first, then pass the options. UglifyJS will parse input files\nin sequence and apply any compression options. The files are parsed in the\nsame global scope, that is, a reference from a file to some\nvariable/function declared in another file will be matched properly.\n\nIf you want to read from STDIN instead, pass a single dash instead of input\nfiles.\n\nThe available options are:\n\n```\n --source-map Specify an output file where to generate source map.\n [string]\n --source-map-root The path to the original source to be included in the\n source map. [string]\n --source-map-url The path to the source map to be added in //#\n sourceMappingURL. Defaults to the value passed with\n --source-map. [string]\n --source-map-include-sources\n Pass this flag if you want to include the content of\n source files in the source map as sourcesContent\n property. [boolean]\n --in-source-map Input source map, useful if you're compressing JS that was\n generated from some other original code.\n --screw-ie8 Pass this flag if you don't care about full compliance\n with Internet Explorer 6-8 quirks (by default UglifyJS\n will try to be IE-proof). [boolean]\n --expr Parse a single expression, rather than a program (for\n parsing JSON) [boolean]\n -p, --prefix Skip prefix for original filenames that appear in source\n maps. For example -p 3 will drop 3 directories from file\n names and ensure they are relative paths. You can also\n specify -p relative, which will make UglifyJS figure out\n itself the relative paths between original sources, the\n source map and the output file. [string]\n -o, --output Output file (default STDOUT).\n -b, --beautify Beautify output/specify output options. [string]\n -m, --mangle Mangle names/pass mangler options. [string]\n -r, --reserved Reserved names to exclude from mangling.\n -c, --compress Enable compressor/pass compressor options. Pass options\n like -c hoist_vars=false,if_return=false. Use -c with no\n argument to use the default compression options. [string]\n -d, --define Global definitions [string]\n -e, --enclose Embed everything in a big function, with a configurable\n parameter/argument list. [string]\n --comments Preserve copyright comments in the output. By default this\n works like Google Closure, keeping JSDoc-style comments\n that contain \"@license\" or \"@preserve\". You can optionally\n pass one of the following arguments to this flag:\n - \"all\" to keep all comments\n - a valid JS regexp (needs to start with a slash) to keep\n only comments that match.\n Note that currently not *all* comments can be kept when\n compression is on, because of dead code removal or\n cascading statements into sequences. [string]\n --preamble Preamble to prepend to the output. You can use this to\n insert a comment, for example for licensing information.\n This will not be parsed, but the source map will adjust\n for its presence.\n --stats Display operations run time on STDERR. [boolean]\n --acorn Use Acorn for parsing. [boolean]\n --spidermonkey Assume input files are SpiderMonkey AST format (as JSON).\n [boolean]\n --self Build itself (UglifyJS2) as a library (implies\n --wrap=UglifyJS --export-all) [boolean]\n --wrap Embed everything in a big function, making the “exportsâ€\n and “global†variables available. You need to pass an\n argument to this option to specify the name that your\n module will take when included in, say, a browser.\n [string]\n --export-all Only used when --wrap, this tells UglifyJS to add code to\n automatically export all globals. [boolean]\n --lint Display some scope warnings [boolean]\n -v, --verbose Verbose [boolean]\n -V, --version Print version number and exit. [boolean]\n```\n\nSpecify `--output` (`-o`) to declare the output file. Otherwise the output\ngoes to STDOUT.\n\n## Source map options\n\nUglifyJS2 can generate a source map file, which is highly useful for\ndebugging your compressed JavaScript. To get a source map, pass\n`--source-map output.js.map` (full path to the file where you want the\nsource map dumped).\n\nAdditionally you might need `--source-map-root` to pass the URL where the\noriginal files can be found. In case you are passing full paths to input\nfiles to UglifyJS, you can use `--prefix` (`-p`) to specify the number of\ndirectories to drop from the path prefix when declaring files in the source\nmap.\n\nFor example:\n\n uglifyjs /home/doe/work/foo/src/js/file1.js \\\n /home/doe/work/foo/src/js/file2.js \\\n -o foo.min.js \\\n --source-map foo.min.js.map \\\n --source-map-root http://foo.com/src \\\n -p 5 -c -m\n\nThe above will compress and mangle `file1.js` and `file2.js`, will drop the\noutput in `foo.min.js` and the source map in `foo.min.js.map`. The source\nmapping will refer to `http://foo.com/src/js/file1.js` and\n`http://foo.com/src/js/file2.js` (in fact it will list `http://foo.com/src`\nas the source map root, and the original files as `js/file1.js` and\n`js/file2.js`).\n\n### Composed source map\n\nWhen you're compressing JS code that was output by a compiler such as\nCoffeeScript, mapping to the JS code won't be too helpful. Instead, you'd\nlike to map back to the original code (i.e. CoffeeScript). UglifyJS has an\noption to take an input source map. Assuming you have a mapping from\nCoffeeScript → compiled JS, UglifyJS can generate a map from CoffeeScript →\ncompressed JS by mapping every token in the compiled JS to its original\nlocation.\n\nTo use this feature you need to pass `--in-source-map\n/path/to/input/source.map`. Normally the input source map should also point\nto the file containing the generated JS, so if that's correct you can omit\ninput files from the command line.\n\n## Mangler options\n\nTo enable the mangler you need to pass `--mangle` (`-m`). The following\n(comma-separated) options are supported:\n\n- `sort` — to assign shorter names to most frequently used variables. This\n saves a few hundred bytes on jQuery before gzip, but the output is\n _bigger_ after gzip (and seems to happen for other libraries I tried it\n on) therefore it's not enabled by default.\n\n- `toplevel` — mangle names declared in the toplevel scope (disabled by\n default).\n\n- `eval` — mangle names visible in scopes where `eval` or `with` are used\n (disabled by default).\n\nWhen mangling is enabled but you want to prevent certain names from being\nmangled, you can declare those names with `--reserved` (`-r`) — pass a\ncomma-separated list of names. For example:\n\n uglifyjs ... -m -r '$,require,exports'\n\nto prevent the `require`, `exports` and `$` names from being changed.\n\n## Compressor options\n\nYou need to pass `--compress` (`-c`) to enable the compressor. Optionally\nyou can pass a comma-separated list of options. Options are in the form\n`foo=bar`, or just `foo` (the latter implies a boolean option that you want\nto set `true`; it's effectively a shortcut for `foo=true`).\n\n- `sequences` -- join consecutive simple statements using the comma operator\n\n- `properties` -- rewrite property access using the dot notation, for\n example `foo[\"bar\"] → foo.bar`\n\n- `dead_code` -- remove unreachable code\n\n- `drop_debugger` -- remove `debugger;` statements\n\n- `unsafe` (default: false) -- apply \"unsafe\" transformations (discussion below)\n\n- `conditionals` -- apply optimizations for `if`-s and conditional\n expressions\n\n- `comparisons` -- apply certain optimizations to binary nodes, for example:\n `!(a <= b) → a > b` (only when `unsafe`), attempts to negate binary nodes,\n e.g. `a = !b && !c && !d && !e → a=!(b||c||d||e)` etc.\n\n- `evaluate` -- attempt to evaluate constant expressions\n\n- `booleans` -- various optimizations for boolean context, for example `!!a\n ? b : c → a ? b : c`\n\n- `loops` -- optimizations for `do`, `while` and `for` loops when we can\n statically determine the condition\n\n- `unused` -- drop unreferenced functions and variables\n\n- `hoist_funs` -- hoist function declarations\n\n- `hoist_vars` (default: false) -- hoist `var` declarations (this is `false`\n by default because it seems to increase the size of the output in general)\n\n- `if_return` -- optimizations for if/return and if/continue\n\n- `join_vars` -- join consecutive `var` statements\n\n- `cascade` -- small optimization for sequences, transform `x, x` into `x`\n and `x = something(), x` into `x = something()`\n\n- `warnings` -- display warnings when dropping unreachable code or unused\n declarations etc.\n\n- `negate_iife` -- negate \"Immediately-Called Function Expressions\"\n where the return value is discarded, to avoid the parens that the\n code generator would insert.\n\n- `pure_getters` -- the default is `false`. If you pass `true` for\n this, UglifyJS will assume that object property access\n (e.g. `foo.bar` or `foo[\"bar\"]`) doesn't have any side effects.\n\n- `pure_funcs` -- default `null`. You can pass an array of names and\n UglifyJS will assume that those functions do not produce side\n effects. DANGER: will not check if the name is redefined in scope.\n An example case here, for instance `var q = Math.floor(a/b)`. If\n variable `q` is not used elsewhere, UglifyJS will drop it, but will\n still keep the `Math.floor(a/b)`, not knowing what it does. You can\n pass `pure_funcs: [ 'Math.floor' ]` to let it know that this\n function won't produce any side effect, in which case the whole\n statement would get discarded. The current implementation adds some\n overhead (compression will be slower).\n\n- `drop_console` -- default `false`. Pass `true` to discard calls to\n `console.*` functions.\n\n### The `unsafe` option\n\nIt enables some transformations that *might* break code logic in certain\ncontrived cases, but should be fine for most code. You might want to try it\non your own code, it should reduce the minified size. Here's what happens\nwhen this flag is on:\n\n- `new Array(1, 2, 3)` or `Array(1, 2, 3)` → `[1, 2, 3 ]`\n- `new Object()` → `{}`\n- `String(exp)` or `exp.toString()` → `\"\" + exp`\n- `new Object/RegExp/Function/Error/Array (...)` → we discard the `new`\n- `typeof foo == \"undefined\"` → `foo === void 0`\n- `void 0` → `undefined` (if there is a variable named \"undefined\" in\n scope; we do it because the variable name will be mangled, typically\n reduced to a single character).\n\n### Conditional compilation\n\nYou can use the `--define` (`-d`) switch in order to declare global\nvariables that UglifyJS will assume to be constants (unless defined in\nscope). For example if you pass `--define DEBUG=false` then, coupled with\ndead code removal UglifyJS will discard the following from the output:\n```javascript\nif (DEBUG) {\n\tconsole.log(\"debug stuff\");\n}\n```\n\nUglifyJS will warn about the condition being always false and about dropping\nunreachable code; for now there is no option to turn off only this specific\nwarning, you can pass `warnings=false` to turn off *all* warnings.\n\nAnother way of doing that is to declare your globals as constants in a\nseparate file and include it into the build. For example you can have a\n`build/defines.js` file with the following:\n```javascript\nconst DEBUG = false;\nconst PRODUCTION = true;\n// etc.\n```\n\nand build your code like this:\n\n uglifyjs build/defines.js js/foo.js js/bar.js... -c\n\nUglifyJS will notice the constants and, since they cannot be altered, it\nwill evaluate references to them to the value itself and drop unreachable\ncode as usual. The possible downside of this approach is that the build\nwill contain the `const` declarations.\n\n\n## Beautifier options\n\nThe code generator tries to output shortest code possible by default. In\ncase you want beautified output, pass `--beautify` (`-b`). Optionally you\ncan pass additional arguments that control the code output:\n\n- `beautify` (default `true`) -- whether to actually beautify the output.\n Passing `-b` will set this to true, but you might need to pass `-b` even\n when you want to generate minified code, in order to specify additional\n arguments, so you can use `-b beautify=false` to override it.\n- `indent-level` (default 4)\n- `indent-start` (default 0) -- prefix all lines by that many spaces\n- `quote-keys` (default `false`) -- pass `true` to quote all keys in literal\n objects\n- `space-colon` (default `true`) -- insert a space after the colon signs\n- `ascii-only` (default `false`) -- escape Unicode characters in strings and\n regexps\n- `inline-script` (default `false`) -- escape the slash in occurrences of\n `= (x = f(…)) + * + * For example, let the equation be: + * (a = parseInt('100')) <= a + * + * If a was an integer and has the value of 99, + * (a = parseInt('100')) <= a → 100 <= 100 → true + * + * When transformed incorrectly: + * a >= (a = parseInt('100')) → 99 >= 100 → false + */ + +tranformation_sort_order_equal: { + options = { + comparisons: true, + }; + + input: { (a = parseInt('100')) == a } + expect: { (a = parseInt('100')) == a } +} + +tranformation_sort_order_unequal: { + options = { + comparisons: true, + }; + + input: { (a = parseInt('100')) != a } + expect: { (a = parseInt('100')) != a } +} + +tranformation_sort_order_lesser_or_equal: { + options = { + comparisons: true, + }; + + input: { (a = parseInt('100')) <= a } + expect: { (a = parseInt('100')) <= a } +} +tranformation_sort_order_greater_or_equal: { + options = { + comparisons: true, + }; + + input: { (a = parseInt('100')) >= a } + expect: { (a = parseInt('100')) >= a } +} \ No newline at end of file diff --git a/bin/node_modules/uglify-js/test/compress/issue-22.js b/bin/node_modules/uglify-js/test/compress/issue-22.js new file mode 100644 index 00000000..a8b7bc60 --- /dev/null +++ b/bin/node_modules/uglify-js/test/compress/issue-22.js @@ -0,0 +1,17 @@ +return_with_no_value_in_if_body: { + options = { conditionals: true }; + input: { + function foo(bar) { + if (bar) { + return; + } else { + return 1; + } + } + } + expect: { + function foo (bar) { + return bar ? void 0 : 1; + } + } +} diff --git a/bin/node_modules/uglify-js/test/compress/issue-267.js b/bin/node_modules/uglify-js/test/compress/issue-267.js new file mode 100644 index 00000000..7233d9f1 --- /dev/null +++ b/bin/node_modules/uglify-js/test/compress/issue-267.js @@ -0,0 +1,11 @@ +issue_267: { + options = { comparisons: true }; + input: { + x = a % b / b * c * 2; + x = a % b * 2 + } + expect: { + x = a % b / b * c * 2; + x = a % b * 2; + } +} diff --git a/bin/node_modules/uglify-js/test/compress/issue-269.js b/bin/node_modules/uglify-js/test/compress/issue-269.js new file mode 100644 index 00000000..1d41dea6 --- /dev/null +++ b/bin/node_modules/uglify-js/test/compress/issue-269.js @@ -0,0 +1,66 @@ +issue_269_1: { + options = {unsafe: true}; + input: { + f( + String(x), + Number(x), + Boolean(x), + + String(), + Number(), + Boolean() + ); + } + expect: { + f( + x + '', +x, !!x, + '', 0, false + ); + } +} + +issue_269_dangers: { + options = {unsafe: true}; + input: { + f( + String(x, x), + Number(x, x), + Boolean(x, x) + ); + } + expect: { + f(String(x, x), Number(x, x), Boolean(x, x)); + } +} + +issue_269_in_scope: { + options = {unsafe: true}; + input: { + var String, Number, Boolean; + f( + String(x), + Number(x, x), + Boolean(x) + ); + } + expect: { + var String, Number, Boolean; + f(String(x), Number(x, x), Boolean(x)); + } +} + +strings_concat: { + options = {unsafe: true}; + input: { + f( + String(x + 'str'), + String('str' + x) + ); + } + expect: { + f( + x + 'str', + 'str' + x + ); + } +} diff --git a/bin/node_modules/uglify-js/test/compress/issue-44.js b/bin/node_modules/uglify-js/test/compress/issue-44.js new file mode 100644 index 00000000..7a972f9e --- /dev/null +++ b/bin/node_modules/uglify-js/test/compress/issue-44.js @@ -0,0 +1,31 @@ +issue_44_valid_ast_1: { + options = { unused: true }; + input: { + function a(b) { + for (var i = 0, e = b.qoo(); ; i++) {} + } + } + expect: { + function a(b) { + var i = 0; + for (b.qoo(); ; i++); + } + } +} + +issue_44_valid_ast_2: { + options = { unused: true }; + input: { + function a(b) { + if (foo) for (var i = 0, e = b.qoo(); ; i++) {} + } + } + expect: { + function a(b) { + if (foo) { + var i = 0; + for (b.qoo(); ; i++); + } + } + } +} diff --git a/bin/node_modules/uglify-js/test/compress/issue-59.js b/bin/node_modules/uglify-js/test/compress/issue-59.js new file mode 100644 index 00000000..82b38806 --- /dev/null +++ b/bin/node_modules/uglify-js/test/compress/issue-59.js @@ -0,0 +1,30 @@ +keep_continue: { + options = { + dead_code: true, + evaluate: true + }; + input: { + while (a) { + if (b) { + switch (true) { + case c(): + d(); + } + continue; + } + f(); + } + } + expect: { + while (a) { + if (b) { + switch (true) { + case c(): + d(); + } + continue; + } + f(); + } + } +} diff --git a/bin/node_modules/uglify-js/test/compress/labels.js b/bin/node_modules/uglify-js/test/compress/labels.js new file mode 100644 index 00000000..044b7a7e --- /dev/null +++ b/bin/node_modules/uglify-js/test/compress/labels.js @@ -0,0 +1,163 @@ +labels_1: { + options = { if_return: true, conditionals: true, dead_code: true }; + input: { + out: { + if (foo) break out; + console.log("bar"); + } + }; + expect: { + foo || console.log("bar"); + } +} + +labels_2: { + options = { if_return: true, conditionals: true, dead_code: true }; + input: { + out: { + if (foo) print("stuff"); + else break out; + console.log("here"); + } + }; + expect: { + if (foo) { + print("stuff"); + console.log("here"); + } + } +} + +labels_3: { + options = { if_return: true, conditionals: true, dead_code: true }; + input: { + for (var i = 0; i < 5; ++i) { + if (i < 3) continue; + console.log(i); + } + }; + expect: { + for (var i = 0; i < 5; ++i) + i < 3 || console.log(i); + } +} + +labels_4: { + options = { if_return: true, conditionals: true, dead_code: true }; + input: { + out: for (var i = 0; i < 5; ++i) { + if (i < 3) continue out; + console.log(i); + } + }; + expect: { + for (var i = 0; i < 5; ++i) + i < 3 || console.log(i); + } +} + +labels_5: { + options = { if_return: true, conditionals: true, dead_code: true }; + // should keep the break-s in the following + input: { + while (foo) { + if (bar) break; + console.log("foo"); + } + out: while (foo) { + if (bar) break out; + console.log("foo"); + } + }; + expect: { + while (foo) { + if (bar) break; + console.log("foo"); + } + out: while (foo) { + if (bar) break out; + console.log("foo"); + } + } +} + +labels_6: { + input: { + out: break out; + }; + expect: {} +} + +labels_7: { + options = { if_return: true, conditionals: true, dead_code: true }; + input: { + while (foo) { + x(); + y(); + continue; + } + }; + expect: { + while (foo) { + x(); + y(); + } + } +} + +labels_8: { + options = { if_return: true, conditionals: true, dead_code: true }; + input: { + while (foo) { + x(); + y(); + break; + } + }; + expect: { + while (foo) { + x(); + y(); + break; + } + } +} + +labels_9: { + options = { if_return: true, conditionals: true, dead_code: true }; + input: { + out: while (foo) { + x(); + y(); + continue out; + z(); + k(); + } + }; + expect: { + while (foo) { + x(); + y(); + } + } +} + +labels_10: { + options = { if_return: true, conditionals: true, dead_code: true }; + input: { + out: while (foo) { + x(); + y(); + break out; + z(); + k(); + } + }; + expect: { + out: while (foo) { + x(); + y(); + break out; + } + } +} diff --git a/bin/node_modules/uglify-js/test/compress/loops.js b/bin/node_modules/uglify-js/test/compress/loops.js new file mode 100644 index 00000000..cdf1f045 --- /dev/null +++ b/bin/node_modules/uglify-js/test/compress/loops.js @@ -0,0 +1,123 @@ +while_becomes_for: { + options = { loops: true }; + input: { + while (foo()) bar(); + } + expect: { + for (; foo(); ) bar(); + } +} + +drop_if_break_1: { + options = { loops: true }; + input: { + for (;;) + if (foo()) break; + } + expect: { + for (; !foo();); + } +} + +drop_if_break_2: { + options = { loops: true }; + input: { + for (;bar();) + if (foo()) break; + } + expect: { + for (; bar() && !foo();); + } +} + +drop_if_break_3: { + options = { loops: true }; + input: { + for (;bar();) { + if (foo()) break; + stuff1(); + stuff2(); + } + } + expect: { + for (; bar() && !foo();) { + stuff1(); + stuff2(); + } + } +} + +drop_if_break_4: { + options = { loops: true, sequences: true }; + input: { + for (;bar();) { + x(); + y(); + if (foo()) break; + z(); + k(); + } + } + expect: { + for (; bar() && (x(), y(), !foo());) z(), k(); + } +} + +drop_if_else_break_1: { + options = { loops: true }; + input: { + for (;;) if (foo()) bar(); else break; + } + expect: { + for (; foo(); ) bar(); + } +} + +drop_if_else_break_2: { + options = { loops: true }; + input: { + for (;bar();) { + if (foo()) baz(); + else break; + } + } + expect: { + for (; bar() && foo();) baz(); + } +} + +drop_if_else_break_3: { + options = { loops: true }; + input: { + for (;bar();) { + if (foo()) baz(); + else break; + stuff1(); + stuff2(); + } + } + expect: { + for (; bar() && foo();) { + baz(); + stuff1(); + stuff2(); + } + } +} + +drop_if_else_break_4: { + options = { loops: true, sequences: true }; + input: { + for (;bar();) { + x(); + y(); + if (foo()) baz(); + else break; + z(); + k(); + } + } + expect: { + for (; bar() && (x(), y(), foo());) baz(), z(), k(); + } +} diff --git a/bin/node_modules/uglify-js/test/compress/negate-iife.js b/bin/node_modules/uglify-js/test/compress/negate-iife.js new file mode 100644 index 00000000..89c3f064 --- /dev/null +++ b/bin/node_modules/uglify-js/test/compress/negate-iife.js @@ -0,0 +1,76 @@ +negate_iife_1: { + options = { + negate_iife: true + }; + input: { + (function(){ stuff() })(); + } + expect: { + !function(){ stuff() }(); + } +} + +negate_iife_2: { + options = { + negate_iife: true + }; + input: { + (function(){ return {} })().x = 10; // should not transform this one + } + expect: { + (function(){ return {} })().x = 10; + } +} + +negate_iife_3: { + options = { + negate_iife: true, + }; + input: { + (function(){ return true })() ? console.log(true) : console.log(false); + } + expect: { + !function(){ return true }() ? console.log(false) : console.log(true); + } +} + +negate_iife_3: { + options = { + negate_iife: true, + sequences: true + }; + input: { + (function(){ return true })() ? console.log(true) : console.log(false); + (function(){ + console.log("something"); + })(); + } + expect: { + !function(){ return true }() ? console.log(false) : console.log(true), function(){ + console.log("something"); + }(); + } +} + +negate_iife_4: { + options = { + negate_iife: true, + sequences: true, + conditionals: true, + }; + input: { + if ((function(){ return true })()) { + foo(true); + } else { + bar(false); + } + (function(){ + console.log("something"); + })(); + } + expect: { + !function(){ return true }() ? bar(false) : foo(true), function(){ + console.log("something"); + }(); + } +} diff --git a/bin/node_modules/uglify-js/test/compress/properties.js b/bin/node_modules/uglify-js/test/compress/properties.js new file mode 100644 index 00000000..39470738 --- /dev/null +++ b/bin/node_modules/uglify-js/test/compress/properties.js @@ -0,0 +1,74 @@ +keep_properties: { + options = { + properties: false + }; + input: { + a["foo"] = "bar"; + } + expect: { + a["foo"] = "bar"; + } +} + +dot_properties: { + options = { + properties: true + }; + input: { + a["foo"] = "bar"; + a["if"] = "if"; + a["*"] = "asterisk"; + a["\u0EB3"] = "unicode"; + a[""] = "whitespace"; + a["1_1"] = "foo"; + } + expect: { + a.foo = "bar"; + a["if"] = "if"; + a["*"] = "asterisk"; + a["\u0EB3"] = "unicode"; + a[""] = "whitespace"; + a["1_1"] = "foo"; + } +} + +dot_properties_es5: { + options = { + properties: true, + screw_ie8: true + }; + input: { + a["foo"] = "bar"; + a["if"] = "if"; + a["*"] = "asterisk"; + a["\u0EB3"] = "unicode"; + a[""] = "whitespace"; + } + expect: { + a.foo = "bar"; + a.if = "if"; + a["*"] = "asterisk"; + a["\u0EB3"] = "unicode"; + a[""] = "whitespace"; + } +} + +evaluate_length: { + options = { + properties: true, + unsafe: true, + evaluate: true + }; + input: { + a = "foo".length; + a = ("foo" + "bar")["len" + "gth"]; + a = b.length; + a = ("foo" + b).length; + } + expect: { + a = 3; + a = 6; + a = b.length; + a = ("foo" + b).length; + } +} diff --git a/bin/node_modules/uglify-js/test/compress/sequences.js b/bin/node_modules/uglify-js/test/compress/sequences.js new file mode 100644 index 00000000..46695714 --- /dev/null +++ b/bin/node_modules/uglify-js/test/compress/sequences.js @@ -0,0 +1,163 @@ +make_sequences_1: { + options = { + sequences: true + }; + input: { + foo(); + bar(); + baz(); + } + expect: { + foo(),bar(),baz(); + } +} + +make_sequences_2: { + options = { + sequences: true + }; + input: { + if (boo) { + foo(); + bar(); + baz(); + } else { + x(); + y(); + z(); + } + } + expect: { + if (boo) foo(),bar(),baz(); + else x(),y(),z(); + } +} + +make_sequences_3: { + options = { + sequences: true + }; + input: { + function f() { + foo(); + bar(); + return baz(); + } + function g() { + foo(); + bar(); + throw new Error(); + } + } + expect: { + function f() { + return foo(), bar(), baz(); + } + function g() { + throw foo(), bar(), new Error(); + } + } +} + +make_sequences_4: { + options = { + sequences: true + }; + input: { + x = 5; + if (y) z(); + + x = 5; + for (i = 0; i < 5; i++) console.log(i); + + x = 5; + for (; i < 5; i++) console.log(i); + + x = 5; + switch (y) {} + + x = 5; + with (obj) {} + } + expect: { + if (x = 5, y) z(); + for (x = 5, i = 0; i < 5; i++) console.log(i); + for (x = 5; i < 5; i++) console.log(i); + switch (x = 5, y) {} + with (x = 5, obj); + } +} + +lift_sequences_1: { + options = { sequences: true }; + input: { + foo = !(x(), y(), bar()); + } + expect: { + x(), y(), foo = !bar(); + } +} + +lift_sequences_2: { + options = { sequences: true, evaluate: true }; + input: { + foo.x = (foo = {}, 10); + bar = (bar = {}, 10); + } + expect: { + foo.x = (foo = {}, 10), + bar = {}, bar = 10; + } +} + +lift_sequences_3: { + options = { sequences: true, conditionals: true }; + input: { + x = (foo(), bar(), baz()) ? 10 : 20; + } + expect: { + foo(), bar(), x = baz() ? 10 : 20; + } +} + +lift_sequences_4: { + options = { side_effects: true }; + input: { + x = (foo, bar, baz); + } + expect: { + x = baz; + } +} + +for_sequences: { + options = { sequences: true }; + input: { + // 1 + foo(); + bar(); + for (; false;); + // 2 + foo(); + bar(); + for (x = 5; false;); + // 3 + x = (foo in bar); + for (; false;); + // 4 + x = (foo in bar); + for (y = 5; false;); + } + expect: { + // 1 + for (foo(), bar(); false;); + // 2 + for (foo(), bar(), x = 5; false;); + // 3 + x = (foo in bar); + for (; false;); + // 4 + x = (foo in bar); + for (y = 5; false;); + } +} diff --git a/bin/node_modules/uglify-js/test/compress/switch.js b/bin/node_modules/uglify-js/test/compress/switch.js new file mode 100644 index 00000000..62e39cf7 --- /dev/null +++ b/bin/node_modules/uglify-js/test/compress/switch.js @@ -0,0 +1,260 @@ +constant_switch_1: { + options = { dead_code: true, evaluate: true }; + input: { + switch (1+1) { + case 1: foo(); break; + case 1+1: bar(); break; + case 1+1+1: baz(); break; + } + } + expect: { + bar(); + } +} + +constant_switch_2: { + options = { dead_code: true, evaluate: true }; + input: { + switch (1) { + case 1: foo(); + case 1+1: bar(); break; + case 1+1+1: baz(); + } + } + expect: { + foo(); + bar(); + } +} + +constant_switch_3: { + options = { dead_code: true, evaluate: true }; + input: { + switch (10) { + case 1: foo(); + case 1+1: bar(); break; + case 1+1+1: baz(); + default: + def(); + } + } + expect: { + def(); + } +} + +constant_switch_4: { + options = { dead_code: true, evaluate: true }; + input: { + switch (2) { + case 1: + x(); + if (foo) break; + y(); + break; + case 1+1: + bar(); + default: + def(); + } + } + expect: { + bar(); + def(); + } +} + +constant_switch_5: { + options = { dead_code: true, evaluate: true }; + input: { + switch (1) { + case 1: + x(); + if (foo) break; + y(); + break; + case 1+1: + bar(); + default: + def(); + } + } + expect: { + // the break inside the if ruins our job + // we can still get rid of irrelevant cases. + switch (1) { + case 1: + x(); + if (foo) break; + y(); + } + // XXX: we could optimize this better by inventing an outer + // labeled block, but that's kinda tricky. + } +} + +constant_switch_6: { + options = { dead_code: true, evaluate: true }; + input: { + OUT: { + foo(); + switch (1) { + case 1: + x(); + if (foo) break OUT; + y(); + case 1+1: + bar(); + break; + default: + def(); + } + } + } + expect: { + OUT: { + foo(); + x(); + if (foo) break OUT; + y(); + bar(); + } + } +} + +constant_switch_7: { + options = { dead_code: true, evaluate: true }; + input: { + OUT: { + foo(); + switch (1) { + case 1: + x(); + if (foo) break OUT; + for (var x = 0; x < 10; x++) { + if (x > 5) break; // this break refers to the for, not to the switch; thus it + // shouldn't ruin our optimization + console.log(x); + } + y(); + case 1+1: + bar(); + break; + default: + def(); + } + } + } + expect: { + OUT: { + foo(); + x(); + if (foo) break OUT; + for (var x = 0; x < 10; x++) { + if (x > 5) break; + console.log(x); + } + y(); + bar(); + } + } +} + +constant_switch_8: { + options = { dead_code: true, evaluate: true }; + input: { + OUT: switch (1) { + case 1: + x(); + for (;;) break OUT; + y(); + break; + case 1+1: + bar(); + default: + def(); + } + } + expect: { + OUT: { + x(); + for (;;) break OUT; + y(); + } + } +} + +constant_switch_9: { + options = { dead_code: true, evaluate: true }; + input: { + OUT: switch (1) { + case 1: + x(); + for (;;) if (foo) break OUT; + y(); + case 1+1: + bar(); + default: + def(); + } + } + expect: { + OUT: { + x(); + for (;;) if (foo) break OUT; + y(); + bar(); + def(); + } + } +} + +drop_default_1: { + options = { dead_code: true }; + input: { + switch (foo) { + case 'bar': baz(); + default: + } + } + expect: { + switch (foo) { + case 'bar': baz(); + } + } +} + +drop_default_2: { + options = { dead_code: true }; + input: { + switch (foo) { + case 'bar': baz(); break; + default: + break; + } + } + expect: { + switch (foo) { + case 'bar': baz(); + } + } +} + +keep_default: { + options = { dead_code: true }; + input: { + switch (foo) { + case 'bar': baz(); + default: + something(); + break; + } + } + expect: { + switch (foo) { + case 'bar': baz(); + default: + something(); + } + } +} diff --git a/bin/node_modules/uglify-js/test/compress/typeof.js b/bin/node_modules/uglify-js/test/compress/typeof.js new file mode 100644 index 00000000..cefdd43c --- /dev/null +++ b/bin/node_modules/uglify-js/test/compress/typeof.js @@ -0,0 +1,25 @@ +typeof_evaluation: { + options = { + evaluate: true + }; + input: { + a = typeof 1; + b = typeof 'test'; + c = typeof []; + d = typeof {}; + e = typeof /./; + f = typeof false; + g = typeof function(){}; + h = typeof undefined; + } + expect: { + a='number'; + b='string'; + c=typeof[]; + d=typeof{}; + e=typeof/./; + f='boolean'; + g='function'; + h='undefined'; + } +} diff --git a/bin/node_modules/uglify-js/test/run-tests.js b/bin/node_modules/uglify-js/test/run-tests.js new file mode 100755 index 00000000..f8e88d48 --- /dev/null +++ b/bin/node_modules/uglify-js/test/run-tests.js @@ -0,0 +1,179 @@ +#! /usr/bin/env node + +var U = require("../tools/node"); +var path = require("path"); +var fs = require("fs"); +var assert = require("assert"); +var sys = require("util"); + +var tests_dir = path.dirname(module.filename); +var failures = 0; +var failed_files = {}; + +run_compress_tests(); +if (failures) { + sys.error("\n!!! Failed " + failures + " test cases."); + sys.error("!!! " + Object.keys(failed_files).join(", ")); + process.exit(1); +} + +/* -----[ utils ]----- */ + +function tmpl() { + return U.string_template.apply(this, arguments); +} + +function log() { + var txt = tmpl.apply(this, arguments); + sys.puts(txt); +} + +function log_directory(dir) { + log("*** Entering [{dir}]", { dir: dir }); +} + +function log_start_file(file) { + log("--- {file}", { file: file }); +} + +function log_test(name) { + log(" Running test [{name}]", { name: name }); +} + +function find_test_files(dir) { + var files = fs.readdirSync(dir).filter(function(name){ + return /\.js$/i.test(name); + }); + if (process.argv.length > 2) { + var x = process.argv.slice(2); + files = files.filter(function(f){ + return x.indexOf(f) >= 0; + }); + } + return files; +} + +function test_directory(dir) { + return path.resolve(tests_dir, dir); +} + +function as_toplevel(input) { + if (input instanceof U.AST_BlockStatement) input = input.body; + else if (input instanceof U.AST_Statement) input = [ input ]; + else throw new Error("Unsupported input syntax"); + var toplevel = new U.AST_Toplevel({ body: input }); + toplevel.figure_out_scope(); + return toplevel; +} + +function run_compress_tests() { + var dir = test_directory("compress"); + log_directory("compress"); + var files = find_test_files(dir); + function test_file(file) { + log_start_file(file); + function test_case(test) { + log_test(test.name); + var options = U.defaults(test.options, { + warnings: false + }); + var cmp = new U.Compressor(options, true); + var expect = make_code(as_toplevel(test.expect), false); + var input = as_toplevel(test.input); + var input_code = make_code(test.input); + var output = input.transform(cmp); + output.figure_out_scope(); + output = make_code(output, false); + if (expect != output) { + log("!!! failed\n---INPUT---\n{input}\n---OUTPUT---\n{output}\n---EXPECTED---\n{expected}\n\n", { + input: input_code, + output: output, + expected: expect + }); + failures++; + failed_files[file] = 1; + } + } + var tests = parse_test(path.resolve(dir, file)); + for (var i in tests) if (tests.hasOwnProperty(i)) { + test_case(tests[i]); + } + } + files.forEach(function(file){ + test_file(file); + }); +} + +function parse_test(file) { + var script = fs.readFileSync(file, "utf8"); + var ast = U.parse(script, { + filename: file + }); + var tests = {}; + var tw = new U.TreeWalker(function(node, descend){ + if (node instanceof U.AST_LabeledStatement + && tw.parent() instanceof U.AST_Toplevel) { + var name = node.label.name; + tests[name] = get_one_test(name, node.body); + return true; + } + if (!(node instanceof U.AST_Toplevel)) croak(node); + }); + ast.walk(tw); + return tests; + + function croak(node) { + throw new Error(tmpl("Can't understand test file {file} [{line},{col}]\n{code}", { + file: file, + line: node.start.line, + col: node.start.col, + code: make_code(node, false) + })); + } + + function get_one_test(name, block) { + var test = { name: name, options: {} }; + var tw = new U.TreeWalker(function(node, descend){ + if (node instanceof U.AST_Assign) { + if (!(node.left instanceof U.AST_SymbolRef)) { + croak(node); + } + var name = node.left.name; + test[name] = evaluate(node.right); + return true; + } + if (node instanceof U.AST_LabeledStatement) { + assert.ok( + node.label.name == "input" || node.label.name == "expect", + tmpl("Unsupported label {name} [{line},{col}]", { + name: node.label.name, + line: node.label.start.line, + col: node.label.start.col + }) + ); + var stat = node.body; + if (stat instanceof U.AST_BlockStatement) { + if (stat.body.length == 1) stat = stat.body[0]; + else if (stat.body.length == 0) stat = new U.AST_EmptyStatement(); + } + test[node.label.name] = stat; + return true; + } + }); + block.walk(tw); + return test; + }; +} + +function make_code(ast, beautify) { + if (arguments.length == 1) beautify = true; + var stream = U.OutputStream({ beautify: beautify }); + ast.print(stream); + return stream.get(); +} + +function evaluate(code) { + if (code instanceof U.AST_Node) + code = make_code(code); + return new Function("return(" + code + ")")(); +} diff --git a/bin/node_modules/uglify-js/tools/node.js b/bin/node_modules/uglify-js/tools/node.js new file mode 100644 index 00000000..084998da --- /dev/null +++ b/bin/node_modules/uglify-js/tools/node.js @@ -0,0 +1,187 @@ +var path = require("path"); +var fs = require("fs"); +var vm = require("vm"); +var sys = require("util"); + +var UglifyJS = vm.createContext({ + sys : sys, + console : console, + MOZ_SourceMap : require("source-map") +}); + +function load_global(file) { + file = path.resolve(path.dirname(module.filename), file); + try { + var code = fs.readFileSync(file, "utf8"); + return vm.runInContext(code, UglifyJS, file); + } catch(ex) { + // XXX: in case of a syntax error, the message is kinda + // useless. (no location information). + sys.debug("ERROR in file: " + file + " / " + ex); + process.exit(1); + } +}; + +var FILES = exports.FILES = [ + "../lib/utils.js", + "../lib/ast.js", + "../lib/parse.js", + "../lib/transform.js", + "../lib/scope.js", + "../lib/output.js", + "../lib/compress.js", + "../lib/sourcemap.js", + "../lib/mozilla-ast.js" +].map(function(file){ + return path.join(path.dirname(fs.realpathSync(__filename)), file); +}); + +FILES.forEach(load_global); + +UglifyJS.AST_Node.warn_function = function(txt) { + sys.error("WARN: " + txt); +}; + +// XXX: perhaps we shouldn't export everything but heck, I'm lazy. +for (var i in UglifyJS) { + if (UglifyJS.hasOwnProperty(i)) { + exports[i] = UglifyJS[i]; + } +} + +exports.minify = function(files, options) { + options = UglifyJS.defaults(options, { + spidermonkey : false, + outSourceMap : null, + sourceRoot : null, + inSourceMap : null, + fromString : false, + warnings : false, + mangle : {}, + output : null, + compress : {} + }); + UglifyJS.base54.reset(); + + // 1. parse + var toplevel = null, + sourcesContent = {}; + + if (options.spidermonkey) { + toplevel = UglifyJS.AST_Node.from_mozilla_ast(files); + } else { + if (typeof files == "string") + files = [ files ]; + files.forEach(function(file){ + var code = options.fromString + ? file + : fs.readFileSync(file, "utf8"); + sourcesContent[file] = code; + toplevel = UglifyJS.parse(code, { + filename: options.fromString ? "?" : file, + toplevel: toplevel + }); + }); + } + + // 2. compress + if (options.compress) { + var compress = { warnings: options.warnings }; + UglifyJS.merge(compress, options.compress); + toplevel.figure_out_scope(); + var sq = UglifyJS.Compressor(compress); + toplevel = toplevel.transform(sq); + } + + // 3. mangle + if (options.mangle) { + toplevel.figure_out_scope(); + toplevel.compute_char_frequency(); + toplevel.mangle_names(options.mangle); + } + + // 4. output + var inMap = options.inSourceMap; + var output = {}; + if (typeof options.inSourceMap == "string") { + inMap = fs.readFileSync(options.inSourceMap, "utf8"); + } + if (options.outSourceMap) { + output.source_map = UglifyJS.SourceMap({ + file: options.outSourceMap, + orig: inMap, + root: options.sourceRoot + }); + if (options.sourceMapIncludeSources) { + for (var file in sourcesContent) { + if (sourcesContent.hasOwnProperty(file)) { + output.source_map.get().setSourceContent(file, sourcesContent[file]); + } + } + } + + } + if (options.output) { + UglifyJS.merge(output, options.output); + } + var stream = UglifyJS.OutputStream(output); + toplevel.print(stream); + + if(options.outSourceMap){ + stream += "\n//# sourceMappingURL=" + options.outSourceMap; + } + + return { + code : stream + "", + map : output.source_map + "" + }; +}; + +// exports.describe_ast = function() { +// function doitem(ctor) { +// var sub = {}; +// ctor.SUBCLASSES.forEach(function(ctor){ +// sub[ctor.TYPE] = doitem(ctor); +// }); +// var ret = {}; +// if (ctor.SELF_PROPS.length > 0) ret.props = ctor.SELF_PROPS; +// if (ctor.SUBCLASSES.length > 0) ret.sub = sub; +// return ret; +// } +// return doitem(UglifyJS.AST_Node).sub; +// } + +exports.describe_ast = function() { + var out = UglifyJS.OutputStream({ beautify: true }); + function doitem(ctor) { + out.print("AST_" + ctor.TYPE); + var props = ctor.SELF_PROPS.filter(function(prop){ + return !/^\$/.test(prop); + }); + if (props.length > 0) { + out.space(); + out.with_parens(function(){ + props.forEach(function(prop, i){ + if (i) out.space(); + out.print(prop); + }); + }); + } + if (ctor.documentation) { + out.space(); + out.print_string(ctor.documentation); + } + if (ctor.SUBCLASSES.length > 0) { + out.space(); + out.with_block(function(){ + ctor.SUBCLASSES.forEach(function(ctor, i){ + out.indent(); + doitem(ctor); + out.newline(); + }); + }); + } + }; + doitem(UglifyJS.AST_Node); + return out + ""; +}; diff --git a/bin/package.json b/bin/package.json new file mode 100644 index 00000000..b7e77a2e --- /dev/null +++ b/bin/package.json @@ -0,0 +1,14 @@ +{ + "name": "dreem", + "version": "0.0.1", + "description": "A prototyping language for multiscreen multidevice UX", + "repository": { + "type": "git", + "url": "https://github.com/teem2/dreem" + }, + "dependencies": { + "json-path": "^0.1.3", + "uglify-js": "^2.4.15" + }, + "engine": "node >= 0.10.0" +} diff --git a/bin/phantomrunner.js b/bin/phantomrunner.js new file mode 100644 index 00000000..201f3383 --- /dev/null +++ b/bin/phantomrunner.js @@ -0,0 +1,85 @@ +var fs = require('fs'); + +var timeout = 60; +var path = "/smoke/"; + +var system = require('system'); +var args = system.args; +if (args[1]) { + timeout = parseInt(args[1]); +} + +var list = fs.list("." + path); +var files = []; +for(var i = 0; i < list.length; i++){ + var file = list[i] + if (file.indexOf('.html') > 0) { + files.unshift(file); + } +} + +var expected = fs.read('./bin/expected.txt') +var out = [] + +var runTest = function (file, callback) { + var tId; + var updateTimer = function(ms) { + ms = ms || timeout + if (tId) clearTimeout(tId) + tId = setTimeout(callback, ms); + } + var page = require('webpage').create(); + page.onError = function(msg, trace) { + var msgStack = ['ERROR: ' + msg]; + if (trace && trace.length) { + msgStack.push('TRACE:'); + trace.forEach(function(t) { + msgStack.push(' -> ' + (t.file || t.sourceURL) + ': ' + t.line + (t.function ? ' (in function ' + t.function +')' : '')); + }); + } + console.error(msgStack.join('\n')); + updateTimer(); + }; + page.onInitialized = function () { + // this is executed 'after the web page is created but before a URL is loaded. + // The callback may be used to change global objects.' ... according to the docs + page.evaluate(function () { + window.addEventListener('dreeminit', function (e) { console.log('~~DONE~~') }, false); + }); + // add missing methods to phantom, specifically Function.bind(). See https://github.com/ariya/phantomjs/issues/10522 + page.injectJs('./lib/es5-shim.min.js'); + }; + page.onResourceError = function(resourceError) { + console.log('RESOURCE ERROR: ' + resourceError.errorString + ', URL: ' + resourceError.url + ', File: ' + file); + updateTimer(); + }; + page.onConsoleMessage = function(msg, lineNum, sourceId) { + if (msg === '~~DONE~~') { + updateTimer(timeout); + return; + } + out.push(msg) + console.log(msg) + }; + page.open('http://127.0.0.1:8080' + path + file + '?test'); +} + +var loadNext = function() { + var file = files.pop(); + if (file) { + // console.log('') + console.log('loading file: ' + file) + runTest(file, loadNext); + } else { + var output = out.join('\n') + if (expected !== output) { + console.log('ERROR: unexpected output, expected:'); + console.log(expected) + phantom.exit(1); + } else { + phantom.exit(); + } + } +} + +loadNext(); diff --git a/class.html b/class.html deleted file mode 100644 index d0d68f14..00000000 --- a/class.html +++ /dev/null @@ -1,105 +0,0 @@ - - - rhes.es - - - - - - - - - - if (this.bnd) this.bnd.destroy() - this.setAttribute('clip', false) - // console.log('onclick', this) - - - - - # console.log('oninit instance', this) - this.hello('a', 'b', 'c') - - - # console.log('hello instance', a,b,c, this) - - - - - - - - this.animate({width: 100, height: 100}) - - - - - - - - - - if (@subviews.length) - #console.log('destroy', @, @destroy) - @destroy() - else - lay = new lz.simplelayout(null, {parent: @, locked: true, inset: 15}) - for i of ([0..1000]) - #console.log('creating', i) - new lz.clickresize(null, {parent: @}) - lay.setAttribute('locked', false) - - - Hello - This text should wrap at my width - - Text - - - - if (this.width !== 100) - this.animate({width: 100, height: 100, opacity: .2}, 1000) - - - - - - - - - \ No newline at end of file diff --git a/classdocs.js b/classdocs.js new file mode 100644 index 00000000..105f10b1 --- /dev/null +++ b/classdocs.js @@ -0,0 +1,1143 @@ +/** + * @class dr.ace {UI Components} + * @extends dr.view + * Ace editor component. + * + * @example + * + * + * The initial text can also be included inline, and include dreem code. + * + * @example wide + * + * + */ +/** + * @attribute {string} [theme='ace/theme/chrome'] + * Specify the ace theme to use. + */ +/** + * @attribute {string} [mode='ace/mode/dr'] + * Specify the ace mode to use. + */ +/** + * @attribute {String} [text=""] + * Initial text for the ace editor. + */ +/** + * @event ontext + * Fired when the contents of the ace entry changes + * @param {dr.ace} view The dr.ace that fired the event + */ +/** + * @attribute {Number} [pausedelay=500] + * Time (msec) after user entry stops to fire onpausedelay event. + * 0 will disable this option. + */ +/** + * @event onpausedelay + * Fired when user entries stops for a period of time. + * @param {dr.ace} view The dr.ace that fired the event + */ +/** + * @class dr.alignlayout {Layout} + * @extends dr.variablelayout + * A variablelayout that aligns each view vertically or horizontally + * relative to all the other views. + * + * @example + * + * + * + * + * + * + */ +/** + * @attribute {String} [align='middle'] + * Determines which way the views are aligned. Supported values are + * 'left', 'center', 'right' and 'top', 'middle' and 'bottom'. + */ +/** + * @method doBeforeUpdate + * Determine the maximum subview width/height according to the alignment. + */ +/** + * @class dr.art {UI Components} + * @extends dr.view + * Vector graphics support using svg. + * + * This example shows how to load an existing svg + * + * @example + * + * + * Paths within an svg can be selected using the path attribute + * + * @example + * + * + * Attributes are automatically passed through to the SVG. Here, the fill color is changed + * + * @example + * + * + * Setting the path attribute animates between paths. This example animates when the mouse is clicked + * + * @example + * + * + * this.setAttribute('path', this.path ^ 1); + * + * + * + * By default, the SVG's aspect ratio is preserved. Set the stretches attribute to true to change this behavior. + * + * @example + * + * + * this.setAttribute('path', this.path ^ 1); + * this.animate({width: (this.width == 200 ? 100 : 200)}); + * + * + * + */ +/** + * @attribute {Boolean} [inline=false] + * Set to true if the svg contents is found inline, as a comment + */ +/** + * @attribute {Boolean} stretches [stretches=false] + * Set to true to stretch the svg to fill the view. + */ +/** + * @attribute {String} src + * The svg contents to load + */ +/** + * @attribute {String|Number} path + * The svg path element to display. Can either be the name of the <g> element containing the path or a 0-based index. + */ +/** + * @attribute {Number} [animationspeed=400] + * The number of milliseconds to use when animating between paths + */ +/** + * @attribute {"linear"/"easeout"/"easein"/"easeinout"/"backin"/"backout"/"elastic"/"bounce"} [animationcurve="linear"] + * The name of the curve to use when animating between paths + */ +/** + * @event onready + * Fired when the art is loaded and ready + */ +/** + * @event ontween + * Fired when the art has animated its path to the next position + */ +/** + * @class dr.audioplayer {UI Components} + * @extends dr.node + * audioplayer wraps the web audio APIs to provide a declarative interface to play audio. + * + * This example shows how to load and play an mp3 audio file from the server: + * + * @example + * + */ +/** + * @attribute {String} url + * The URL to an audio file to play + */ +/** + * @attribute {Number} loadprogress + * @readonly + * A Number between 0 and 1 representing load progress + */ +/** + * @attribute {Boolean} loaded + * @readonly + * If true, the audio is done loading + */ +/** + * @attribute {Boolean} playing + * If true, the audio is playing. + */ +/** + * @attribute {Boolean} paused + * If true, the audio is paused. + */ +/** + * @attribute {Boolean} loop + * If true, the audio will play continuously. + */ +/** + * @attribute {Number} time + * @readonly + * The number of seconds the file has played, with 0 being the start. + */ +/** + * @attribute {Number} duration + * @readonly + * The duration in seconds. + */ +/** + * @attribute {Number} fftsize + * The number of fft frames to use when setting {@link #fft fft}. Must be a non-zero power of two in the range 32 to 2048. + */ +/** + * @attribute {Number} [fftsmoothing=0.8] + * The amount of smoothing to apply to the FFT analysis. A value from 0 -> 1 where 0 represents no time averaging with the last FFT analysis frame. + */ +/** + * @attribute {Number[]} fft + * @readonly + * An array of numbers representing the FFT analysis of the audio as it's playing. + */ +/** + * @class dr.bitmap {UI Components} + * @extends dr.view + * Loads an image from a URL. + * + * @example + * + */ +/** + * @attribute {String} src + * The bitmap URL to load + */ +/** + * @event onload + * Fired when the bitmap is loaded + * @param {Object} size An object containing the width and height + */ +/** + * @event onerror + * Fired when there is an error loading the bitmap + */ +/** + * @class dr.buttonbase {UI Components} + * @extends dr.view + * Base class for button components. Buttons share common elements, + * including their ability to be selected, a visual element to display + * their state, and a default and selected color. + * The visual element is a dr.view that shows the current state of the + * button. For example, in a labelbutton the entire button is the visual + * element. For a checkbutton, the visual element is a square dr.view + * that is inside the button. + */ +/** + * @attribute {Number} [padding=3] + * Amount of padding pixels around the button. + */ +/** + * @attribute {String} [defaultcolor="#808080"] + * The default color of the visual button element when not selected. + */ +/** + * @attribute {String} [selectcolor="#a0a0a0"] + * The selected color of the visual button element when selected. + */ +/** + * @attribute {Boolean} [selected=false] + * The current state of the button. + */ +/** + * @event onselected + * Fired when the state of the button changes. + * @param {dr.buttonbase} view The dr.buttonbase that fired the event + */ +/** + * @attribute {String} [text=""] + * Button text. + */ +/** + * @class dr.checkbutton {UI Components} + * @extends dr.buttonbase + * Button class consisting of text and a visual element to show the + * current state of the component. The state of the + * button changes each time the button is clicked. The select property + * holds the current state of the button. The onselected event + * is generated when the button is the selected state. + * + * @example + * + * + * + * + * + * + * Here we listen for the onselected event on a checkbox and print the value that is passed to the handler. + * + * @example + * + * + * + * + * displayselected.setAttribute('text', value); + * + * + * + * + * + * + * + * + * + */ +/** + * @class dr.constantlayout {Layout} + * @extends dr.layout + * A layout that sets the target attribute name to the target value for + * each subview. + * + * @example + * + * + * + * + * + */ +/** + * @attribute {String} [attribute=x] + * The name of the attribute to update on each subview. + */ +/** + * @attribute {*} [value=0] + * The value to set the attribute to. + */ +/** + * @class dr.dataset {Data} + * @extends dr.node + * Datasets hold onto a set of JSON data, either inline or loaded from a URL. + * They are used with lz.replicator for data binding. + * + * This example shows how to create a dataset with inline JSON data, and use a replicator to show values inside. Inline datasets are useful for prototyping, especially when your backend server isn't ready yet: + * + * @example wide + * + * { + * "store": { + * "book": [ + * { + * "category": "reference", + * "author": "Nigel Rees", + * "title": "Sayings of the Century", + * "price": 8.95 + * }, + * { + * "category": "fiction", + * "author": "Evelyn Waugh", + * "title": "Sword of Honour", + * "price": 12.99 + * }, + * { + * "category": "fiction", + * "author": "Herman Melville", + * "title": "Moby Dick", + * "isbn": "0-553-21311-3", + * "price": 8.99 + * }, + * { + * "category": "fiction", + * "author": "J. R. R. Tolkien", + * "title": "The Lord of the Rings", + * "isbn": "0-395-19395-8", + * "price": 22.99 + * } + * ], + * "bicycle": { + * "color": "red", + * "price": 19.95 + * } + * } + * } + * + * + * + * + * Data can be loaded from a URL when your backend server is ready, or reloaded to show changes over time: + * + * @example wide + * + * + * + */ +/** + * @attribute {String} name (required) + * The name of the dataset + */ +/** + * @property {Object} data + * The data inside the dataset + */ +/** + * @attribute {String} url + * The url to load JSON data from. + */ +/** + * @class dr.dragstate {UI Components} + * @extends dr.state + * Allows views to be dragged by the mouse. + * + * Here is a view that contains a dragstate. The dragstate is applied when the mouse is down in the view, and then removed when the mouse is up. You can modify the attributes of the draggable view by setting them inside the dragstate, like we do here with bgcolor. + * + * @example + * + * + * + * this.setAttribute('mouseIsDown', true); + * + * + * this.setAttribute('mouseIsDown', false); + * + * + * + * + * + * + * To constrain the motion of the element to either the x or y axis set the dragaxis property. Here the same purple square can only move horizontally. + * + * @example + * + * + * + * this.setAttribute('mouseIsDown', true); + * + * + * this.setAttribute('mouseIsDown', false); + * + * + * + * + * + */ +/** + * @attribute {"x"/"y"/"both"} [dragaxis="both"] + * The axes to drag on. + */ +/** + * @class dr.gyro {Input} + * @extends dr.node + * Receives gyroscope and compass data where available. See [https://w3c.github.io/deviceorientation/spec-source-orientation.html#deviceorientation](https://w3c.github.io/deviceorientation/spec-source-orientation.html#deviceorientation) and [https://developer.apple.com/library/safari/documentation/SafariDOMAdditions/Reference/DeviceOrientationEventClassRef/DeviceOrientationEvent/DeviceOrientationEvent.html](https://developer.apple.com/library/safari/documentation/SafariDOMAdditions/Reference/DeviceOrientationEventClassRef/DeviceOrientationEvent/DeviceOrientationEvent.html) for details. + */ +/** + * @attribute {Number} [x=0] (readonly) + * The accelerometer x value + */ +/** + * @attribute {Number} [y=0] (readonly) + * The accelerometer y value + */ +/** + * @attribute {Number} [z=0] (readonly) + * The accelerometer z value + */ +/** + * @attribute {Number} [alpha=0] (readonly) + * The gyro alpha value rotating around the z axis + */ +/** + * @attribute {Number} [beta=0] (readonly) + * The gyro beta value rotating around the x axis + */ +/** + * @attribute {Number} [gamma=0] (readonly) + * The gyro gamma value rotating around the y axis + */ +/** + * @attribute {Number} [compass=0] (readonly) + * The compass orientation, see [https://developer.apple.com/library/safari/documentation/SafariDOMAdditions/Reference/DeviceOrientationEventClassRef/DeviceOrientationEvent/DeviceOrientationEvent.html](https://developer.apple.com/library/safari/documentation/SafariDOMAdditions/Reference/DeviceOrientationEventClassRef/DeviceOrientationEvent/DeviceOrientationEvent.html) for details. + */ +/** + * @attribute {Number} [compassaccuracy=0] (readonly) + * The compass accuracy, see [https://developer.apple.com/library/safari/documentation/SafariDOMAdditions/Reference/DeviceOrientationEventClassRef/DeviceOrientationEvent/DeviceOrientationEvent.html](https://developer.apple.com/library/safari/documentation/SafariDOMAdditions/Reference/DeviceOrientationEventClassRef/DeviceOrientationEvent/DeviceOrientationEvent.html) for details. + */ +/** + * @class dr.labelbutton {UI Components} + * @extends dr.buttonbase + * Button class consisting of text centered in a view. The onclick event + * is generated when the button is clicked. The visual state of the + * button changes during onmousedown/onmouseup. + * + * @example + * + * + * + * + * hello.setAttribute('text', 'Hello Universe!'); + * + * + * + * + */ +/** + * @class dr.labeltoggle {UI Components} + * @extends dr.labelbutton + * Button class consisting of text centered in a view. The state of the + * button changes each time the button is clicked. The select property + * holds the current state of the button. The onselected event + * is generated when the button is the selected state. + * + * @example + * + * + * + * + * + */ +/** + * @class dr.logger {Util} + * @extends dr.node + * Logs all attribute setting behavior + * + * This example shows how to log all setAttribute() calls for a replicator to console.log(): + * + * @example + * + * + */ +/** + * @class dr.rangeslider {UI Components} + * @extends dr.view + * An input component whose upper and lower bounds are changed via mouse clicks or drags. + * + * @example + * + * + * + * + * + * + * + * A range slider highlights the inclusive values by default, however this behavior can be reversed with `exclusive="true"`. + * The following example demonstrates an exclusive-valued, inverted (range goes from high to low) horizontal slider. + * + * @example + * + * + * + * + * + * + * + * + */ +/** + * @attribute {Number} [minvalue=0] + * The minimum value of the slider + */ +/** + * @attribute {Number} [minhighvalue=0] + * The minimum value of the right slider + */ +/** + * @attribute {Number} [maxvalue=100] + * The maximum value of the slider + */ +/** + * @attribute {Number} [maxlowvalue=100] + * The maximum value of the lower bound slider + */ +/** + * @attribute {"x"/"y"} [axis=x] + * The axis to track on + */ +/** + * @attribute {Boolean} [invert=false] + * Set to false to have the scale run lower to higher, true to run higher to lower. + */ +/** + * @attribute {Boolean} [exclusive=false] + * Set to true to highlight the outer (exclusive) values of the range, false to select the inner (inclusive) values. + */ +/** + * @attribute {Number} [lowvalue=50] + * The current value of the left slider. + * Use changeLowValue() to range check the number and set the value. + */ +/** + * @attribute {Number} [highvalue=50] + * The current value of the right slider. + * Use changeHighValue() to range check the number and set the value. + */ +/** + * @method changeLowValue + * Given a new value for the slider position, constrain the value + * between minvalue and maxvalue or maxlowvalue (whichever is lower) and then calls setAttribute. + * @param {Number} v The new value of the component. + */ +/** + * @method changeHighValue + * Given a new value for the slider position, constrain the value + * between minvalue or minhighvalue (whichever is higher) and maxvalue and then calls setAttribute. + * @param {Number} v The new value of the component. + */ +/** + * @attribute {String} [lowselectcolor="#a0a0a0"] + * The selected color of the lower bound slider. + */ +/** + * @attribute {String} [highselectcolor="#a0a0a0"] + * The selected color of the upper bound slider. + */ +/** + * @class dr.replicator {Data} + * @extends dr.node + * Handles replication and data binding. + * + * This example shows the replicator to creating four text instances, each corresponding to an item in the data attribute: + * + * @example + * + * + * + * Changing the data attribute to a new array causes the replicator to create a new text for each item: + * + * @example + * + * Click to change data + * + * + * This example uses a {@link #filterexpression filterexpression} to filter the data to only numbers. Clicking changes {@link #filterexpression filterexpression} to show only non-numbers in the data: + * + * @example + * + * Click to change filter + * + * + * Replicators can be used to look up {@link #datapath datapath} expressions to values in JSON data in a dr.dataset. This example looks up the color of the bicycle in the dr.dataset named bikeshop: + * + * @example + * + * { + * "bicycle": { + * "color": "red", + * "price": 19.95 + * } + * } + * + * + * + * Matching one or more items will cause the replicator to create multiple copies: + * + * @example + * + * { + * "bicycle": [ + * { + * "color": "red", + * "price": 19.95 + * }, + * { + * "color": "green", + * "price": 29.95 + * }, + * { + * "color": "blue", + * "price": 59.95 + * } + * ] + * } + * + * + * + * + * It's possible to select a single item on from the array using an array index. This selects the second item: + * + * @example + * + * { + * "bicycle": [ + * { + * "color": "red", + * "price": 19.95 + * }, + * { + * "color": "green", + * "price": 29.95 + * }, + * { + * "color": "blue", + * "price": 59.95 + * } + * ] + * } + * + * + * + * + * It's also possible to replicate a range of items in the array with the [start,end,stepsize] operator. This replicates every other item: + * + * @example + * + * { + * "bicycle": [ + * { + * "color": "red", + * "price": 19.95 + * }, + * { + * "color": "green", + * "price": 29.95 + * }, + * { + * "color": "blue", + * "price": 59.95 + * } + * ] + * } + * + * + * + * + * Sometimes it's necessary to have complete control and flexibility over filtering and transforming results. Adding a [@] operator to the end of your datapath causes {@link #filterfunction filterfunction} to be called for each result. This example shows bike colors for bikes with a price greater than 20, in reverse order: + * + * @example + * + * { + * "bicycle": [ + * { + * "color": "red", + * "price": 19.95 + * }, + * { + * "color": "green", + * "price": 29.95 + * }, + * { + * "color": "blue", + * "price": 59.95 + * } + * ] + * } + * + * + * + * + * // add the color to the beginning of the results if the price is greater than 20 + * if (obj.price > 20) + * accum.unshift(obj.color); + * return accum + * + * + * + * See [https://github.com/flitbit/json-path](https://github.com/flitbit/json-path) for more details. + */ +/** + * @attribute {Boolean} [pooling=false] + * If true, reuse views when replicating. + */ +/** + * @attribute {Array} [data=[]] + * The list of items to replicate. If {@link #datapath datapath} is set, it is converted to an array and stored here. + */ +/** + * @attribute {String} classname (required) + * The name of the class to be replicated. + */ +/** + * @attribute {String} datapath + * The datapath expression to be replicated. + * See [https://github.com/flitbit/json-path](https://github.com/flitbit/json-path) for details. + */ +/** + * @attribute {String} [sortfield=""] + * The field in the data to use for sorting. Only sort then this + */ +/** + * @attribute {Boolean} [sortasc=true] + * If true, sort ascending. + */ +/** + * @attribute {String} [filterexpression=""] + * If defined, data will be filtered against a [regular expression](https://developer.mozilla.org/en/docs/Web/JavaScript/Guide/Regular_Expressions). + */ +/** + * @method refresh + * Refreshes the dataset manually + */ +/** + * @method filterfunction + * @abstract + * Called to filter data. + * @param obj An individual item to be processed. + * @param {Object[]} accum The array of items that have been accumulated. To keep a processed item, it must be added to the accum array. + * @returns {Object[]} The accum array. Must be returned otherwise results will be lost. + */ +/** + * @class dr.resizelayout {Layout} + * @extends dr.spacedlayout + * Resizes one or more views to fill in any remaining space. + * + * @example + * + * + * + * + * + * + */ +/** + * @class dr.shim {Util} + * @extends dr.node + * Connects to the shared event bus. When data is sent with a given type, a corresponding event is sent. For example, send('blah', {}) sends data with the 'blah' type, other shims will receive the object via an 'onblah' event. + */ +/** + * @attribute {Boolean} [connected=false] (readonly) + * If true, we are connected to the server + */ +/** + * @attribute {Number} [pingtime=1000] + * The frequency used to reconnect to the server + */ +/** + * @attribute {Boolean} [websockets=false] + * If true, use websockets to connect to the server + */ +/** + * @method send + * Sends some data over the event bus. + * @param {String} type The type of event to be sent. + * @param {Object} data The data to be sent. + */ +/** + * @class dr.shrinktofit {Layout} + * @extends dr.layout + * A special "layout" that resizes the parent to fit the children + * rather than laying out the children. + * + * + * Here is a view that contains three sub views that are positioned with a spacedlayout. The parent view has a grey background color. Notice that the subviews are visible because they overflow the parent view, but the parent view itself takes up no space. + * + * @example + * + * + * + * + * + * + * + * + * Now we'll add a shrinktofit to the parent view. Notice that now the parent view does take up space, and you can see it through the semi-transparent subviews. + * + * @example + * + * + * + * + * + * + * + * + * + */ +/** + * @attribute {String} [axis=x] + * The axis along which to resize this view to fit its children. + * Supported values are 'x', 'y' and 'both'. + */ +/** + * @attribute {Number} [xpad=0] + * Additional space added on the child extent along the x-axis. + */ +/** + * @attribute {Number} [ypad=0] + * Additional space added on the child extent along the y-axis. + */ +/** + * @method __updateMonitoringSubview + * Wrapped by startMonitoringSubview and stopMonitoringSubview. + * @param {dr.view} view + * @param {Function} func + * @return {void} + * @private + */ +/** + * @class dr.slider {UI Components} + * @extends dr.view + * An input component whose state is changed when the mouse is dragged. + * + * @example + * + * + * Slider with a label: + * + * @example + * + * + * + * + */ +/** + * @attribute {Number} [minvalue=0] + * The minimum value of the slider + */ +/** + * @attribute {Number} [maxvalue=100] + * The maximum value of the slider + */ +/** + * @attribute {"x"/"y"} [axis=x] + * The axis to track on + */ +/** + * @attribute {Boolean} [invert=false] + * Set to true to invert the direction of the slider. + */ +/** + * @attribute {Number} [value=0] + * The current value of the slider. + * Use changeValue() to range check the number and set the value. + */ +/** + * @method changeValue + * Given a new value for the slider position, constrain the value + * between minvalue and maxvalue and then calls setAttribute. + * @param {Number} v The new value of the component. + */ +/** + * @attribute {String} [selectcolor="#a0a0a0"] + * The selected color of the slider. + */ +/** + * @class dr.spacedlayout {Layout} + * @extends dr.variablelayout + * A variableLayout that positions views along an axis using an inset, + * outset and spacing value. + * + * @example + * + * + * + * + * + * + */ +/** + * @attribute {Number} [spacing=0] + * The spacing between views. + */ +/** + * @attribute {Number} [outset=0] + * Space after the last view. Only used when collapseparent is true. + */ +/** + * @attribute {Number} [inset=0] + * Space before the first view. + */ +/** + * @attribute {String} [axis='x'] + * The orientation of the layout. Supported values are 'x' and 'y'. + * A value of 'x' will orient the views horizontally and a value of 'y' + * will orient them vertically. + */ +/** + * @class dr.stats {Util} + * @extends dr.view + * wraps the three.js stats control which shows framerate over time + * + * This example shows how use the stats control to monitor framerate: + * + * @example + * + */ +/** + * @class dr.touch {Input} + * @extends dr.node + * Receives touch and multitouch data where available. + */ +/** + * @attribute {Number} [x=0] (readonly) + * The touch x value for the first finger. + */ +/** + * @attribute {Number} [y=0] (readonly) + * The touch y value for the first finger. + */ +/** + * @attribute {Object[]} touches (readonly) + * An array of x/y coordinates for all fingers, where available. See [https://developer.mozilla.org/en-US/docs/Web/Guide/Events/Touch_events](https://developer.mozilla.org/en-US/docs/Web/Guide/Events/Touch_events) for more details + */ +/** + * @class dr.variablelayout {Layout} + * @extends dr.constantlayout + * Allows for variation based on the index and subview. An updateSubview + * method is provided that can be overriden to provide variable behavior. + * + * @example + * + * + * + * + * + * + */ +/** + * @attribute {boolean} [collapseparent=false] + * If true the updateParent method will be called. The updateParent method + * will typically resize the parent to fit the newly layed out child views. + */ +/** + * @attribute {boolean} [reverse=false] + * If true the layout will position the items in the opposite order. For + * example, right to left instead of left to right. + */ +/** + * @method doBeforeUpdate + * Called by update before any processing is done. Gives subviews a + * chance to do any special setup before update is processed. + * @return {void} + */ +/** + * @method doAfterUpdate + * Called by update after any processing is done but before the optional + * collapsing of parent is done. Gives subviews a chance to do any + * special teardown after update is processed. + * @return {void} + */ +/** + * @method startMonitoringSubview + * Provides a default implementation that calls update when the + * visibility of a subview changes. + * @param {dr.view} view + */ +/** + * @method stopMonitoringSubview + * Provides a default implementation that calls update when the + * visibility of a subview changes. + * @param {dr.view} view + */ +/** + * @method updateSubview + * Called for each subview in the layout. + * @param {Number} count The number of subviews that have been layed out + * including the current one. i.e. count will be 1 for the first + * subview layed out. + * @param {dr.view} view The subview being layed out. + * @param {String} attribute The name of the attribute to update. + * @param {*} value The value to set on the subview. + * @return {*} The value to use for the next subview. + */ +/** + * @method skipSubview + * Called for each subview in the layout to determine if the view should + * be updated or not. The default implementation returns true if the + * subview is not visible. + * @param {dr.view} view The subview to check. + * @return {Boolean} True if the subview should be skipped during + * layout updates. + */ +/** + * @method updateParent + * Called if the collapseparent attribute is true. Subclasses should + * implement this if they want to modify the parent view. + * @param {String} attribute The name of the attribute to update. + * @param {*} value The value to set on the parent. + * @return {void} + */ +/** + * @class dr.webpage {UI Components} + * @extends dr.view + * iframe component for embedding dreem code or html in a dreem application. + * The size of the iframe matches the width/height of the view when the + * component is created. The iframe component can show a web page by + * using the src attribute, or to show dynamic content using the + * contents attribute. + * + * This example shows how to display a web page in an iframe. The + * contents of the iframe are not editable: + * + * @example + * + * + * To make the web page clickable, and to add scrolling: + * + * @example + * + * + * The content of the iframe can also be dynamically generated, including + * adding Dreem code: + * + * @example + * + * + */ +/** + * @attribute {String} [src="/iframe_stub.html"] + * url to load inside the iframe. By default, a file is loaded that has + * an empty body but includes the libraries needed to support Dreem code. + */ +/** + * @attribute {Boolean} [scrolling="false"] + * Controls scrollbar display in the iframe. + */ +/** + * @attribute {String} [contents=""] + * string to write into the iframe body. This is dreem/html code + * that is written inside the iframe's body tag. If you want to display + * static web pages, specify the src attribute, but do not use contents. + */ +/** + * @class dr.wrappinglayout {Layout} + * @extends dr.variablelayout + * An extension of VariableLayout that positions views along an axis using + * an inset, outset and spacing value. Views will be wrapped when they + * overflow the available space. + * + * Supported Layout Hints: + * break:string Will force the subview to start a new line/column. + * + * @example + * + * + * + * + * + * + */ +/** + * @attribute {Number} [spacing=0] + * The spacing between views. + */ +/** + * @attribute {Number} [outset=0] + * Space after the last view. + */ +/** + * @attribute {Number} [inset=0] + * Space before the first view. + */ +/** + * @attribute {Number} [linespacing=0] + * The spacing between each line of views. + */ +/** + * @attribute {Number} [lineoutset=0] + * Space after the last line of views. Only used when collapseparent is true. + */ +/** + * @attribute {Number} [lineinset=0] + * Space before the first line of views. + */ +/** + * @attribute {String} [axis='x'] + * The orientation of the layout. Supported values are 'x' and 'y'. + * A value of 'x' will orient the views horizontally and a value of 'y' + * will orient them vertically. + */ diff --git a/classes/ace.dre b/classes/ace.dre new file mode 100644 index 00000000..4626a30c --- /dev/null +++ b/classes/ace.dre @@ -0,0 +1,172 @@ + + + + + + + + + + + + + + + + + + + + this.setAttribute('text', d) + + + + + if (this.editor) + this.editor.setTheme(this.theme); + + + + + if (this.editor) + this.editor.getSession().setMode(this.mode); + + + + if (this.editor && this.editor.getValue() != text) { + // console.log('set_text', text) + this.editor.setValue(text); + } + + + + + + + + delete this._lastkeytime; + + + + // Get initial text (match behavior of inputtext) + text = this.text || this.sprite.getText(false); + this.sprite.setText(''); + + // I couldn't get jquery syntax to work so directly modify the DOM. + var acediv = document.createElement("DIV"); + acediv.style.position = "absolute"; + acediv.style.width = this.width; + acediv.style.height = this.height; + this.sprite.el.appendChild(acediv); + acediv.$init = true; + + // Keep track of original div in this.acediv, and editor in this.editor + this.acediv = acediv; + this.editor = ace.edit(acediv); + + // Set a default theme and mode + this.editor.setTheme(this.theme); + this.editor.getSession().setMode(this.mode); + + // Text changes immediately update this.text + this.editor.on("change", this.handleChange); + + // To remove line numbers, enable next line + //this.editor.renderer.setShowGutter(false); + + this.editor.setValue(text); + this.text = text; + + //console.log("editor", this.editor); + + + + + + + this.setAttribute('text', this.editor.getValue()); + //console.log("handleChange", this.text); + if (this.pausedelay > 0) { + this._lastkeytime = new Date(); + //console.log("lastkeytime = ", this._lastkeytime); + } + + + + if (this._lastkeytime) { + var now = new Date(); + var elapsed = now - this._lastkeytime; + if (elapsed > this.pausedelay) { + // Editor has been silent. Show onkeypause event + delete this._lastkeytime; + this.sendEvent('keypause', this); + } + } + + + + if (this.editor) { + this.acediv.style.width = this.width; + this.acediv.style.height = this.height; + + this.editor.resize(); + //console.log("handleResize"); + } + + diff --git a/classes/alignlayout.dre b/classes/alignlayout.dre new file mode 100644 index 00000000..fb7aae83 --- /dev/null +++ b/classes/alignlayout.dre @@ -0,0 +1,110 @@ + + + + + + + @measureAttrName ?= 'height' + @setterAttrName ?= 'y' + + @stopMonitoringAllSubviews() + + switch align + when 'left', 'center', 'right' + @measureAttrName = 'width' + @setterAttrName = 'x' + when 'top', 'middle', 'bottom' + @measureAttrName = 'height' + @setterAttrName = 'y' + + + @startMonitoringAllSubviews() + @update() + + + + @super(arguments) + @listenTo(view, @measureAttrName, @update) + + + + @super(arguments) + @stopListening(view, @measureAttrName, @update) + + + + + measureAttrName = @measureAttrName + svs = @subviews + i = svs.length + value = 0 + + while i + sv = svs[--i] + if @skipSubview(sv) then continue + value = Math.max(value, sv[measureAttrName]) + + if (isNaN(value) || 0 >= value) + value = 0 + + @setAttribute('value', value) + + + + switch @align + when 'center','middle' + view.setAttribute(@setterAttrName, (value - view[@measureAttrName]) / 2) + when 'right','bottom' + view.setAttribute(@setterAttrName, value - view[@measureAttrName]) + else + view.setAttribute(@setterAttrName, 0) + + return value + + + + parent = @parent + man = @measureAttrName + parent.setAttribute(man, value + parent[man] - parent['inner' + man]) + + diff --git a/classes/art.dre b/classes/art.dre new file mode 100644 index 00000000..9ee672b0 --- /dev/null +++ b/classes/art.dre @@ -0,0 +1,375 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + return if @path.length == 0 or not @container + @animate_path(@path) + + + + return if !src + return if @src == src + @src = src + + + + # Retrieve the entire inline contents + if @inline + @inline_data = @sprite.getText() + @sprite.setText('') + @loadInline() if @inline + + @loadFromFile() if @src + + + + # If debug=true, show attributes that pass through to the svg + debug = window.location.search.indexOf('debug') > 0 + if debug + @expectedAttr = ['x','y','width','height','parent','clip','id','scrollable','clickable','visible','$textcontent','$tagname','inline','src','path','stretches','animationspeed','animationcurve'] unless @expectedAttr + unless name in @expectedAttr + console.warn('Passing attribute', name, 'to svg') + + + + + # Retrieve an svg path given its name, or index + path = @get_path(name) + if path + d1 = path[0].getAttribute('d') + @createSnap() + @snappath = @snap.path(d1) + + + + + # Animate the path, as well as specified params + return @show_path(name) if !@snap + + curve = mina[@animationcurve] or mina.linear + params = {} if !params + + # Animate to a given path, by name, or id + path = @get_path(name) + if path + d1 = path[0].getAttribute('d') + params['d'] = d1 + @snappath.animate params, @animationspeed, curve, => + @sendEvent('tween') + + + + + + # Create a div to handle resizing of the graphics + return if @container + + @container = document.createElement('div') + #@container.setAttribute('style', 'overflow: hidden; width: 100%; height: 100%') + @container.$init = true; # Prevent warnings + @sprite.el.appendChild(@container) + + + + return if @snap + @snap = Snap() + + # Create another div to handle resizing + @snapcontainer = document.createElement('div') + @snapcontainer.setAttribute('style', 'overflow: hidden; width: 100%; height: 100%') + @sprite.el.appendChild(@snapcontainer) + + @snap.appendTo(@snapcontainer) + + # Set the viewBox to the bounding box of all paths + rect = @get_bounding_box() + viewbox = rect.x + ' ' + rect.y + ' ' + rect.width + ' ' + rect.height + @snap.attr({viewBox: viewbox}) + + # If this object is clickable, listen to mouse events + if @clickable + @snap.click => @sendEvent('click') + @snap.mousedown => @sendEvent('mousedown') + @snap.mouseup => @sendEvent('mouseup') + @snap.mousemove => @sendEvent('mousemove') + @snap.mouseover => @sendEvent('mouseover') + @snap.mouseout => @sendEvent('mouseout') + + @resizeArt() + + # Hide the static svg object + @hide_art() + + + + + + # Hide either fixed art (fixed=true or missing) or snap (false) + fixed = true if not fixed? + $(@container).hide() if @container and fixed + $(@snapcontainer).hide() if @snapcontainer and not fixed + + + + # Read the path information from the svg using id and then index + return null if !@container + + # Assume name is a named element + path = $(@container).find('svg').find('g#'+name).find('path') + return path if path.length == 1 + + # Try using name as an index + index = parseInt(name) + return null if isNaN(index) + elements = $(@container).find('svg').find('g').find('path') + return null if (elements.length-1) < index + + return $(elements[index]) + + + + # Get every path specified in the svg + dom = @container + return null if !dom + + paths = $(dom).find('svg').find('g').find('path') + return paths + + + + # Get the bounding box of all the paths + paths = @get_paths() + for path, index in paths + box = path.getBBox() + if !rect + rect = jQuery.extend({}, box) # clone so IE doesn't error + x1 = box.x + box.width + y1 = box.y + box.height + else + rect.x = Math.min(rect.x, box.x) + rect.y = Math.min(rect.y, box.y) + x1 = Math.max(x1, box.x + box.width) + y1 = Math.max(y1, box.y + box.height) + if rect + # Use floor/ceil to create a viewBox that covers all paths + x1 = Math.ceil(x1) + y1 = Math.ceil(y1) + rect.x = Math.floor(rect.x) + rect.y = Math.floor(rect.y) + rect.width = x1 - rect.x + rect.height = y1 - rect.y + + return rect + + + + + + return unless @container + + # Normalize the svg by setting width and height to 100%, and + # adding a viewBox if one is missing + elements = $(@container).find('svg') + for svg, index in elements + # If width_orig is found it means this method has already run + continue if svg.getAttribute('width_orig') + + # Rewrite width and height, saving the original values + w = svg.getAttribute('width') + h = svg.getAttribute('height') + svg.setAttribute('width_orig', w) + svg.setAttribute('height_orig', h) + svg.setAttribute('width', '100%') + svg.setAttribute('height', '100%') + # console.log('svg size set from ', w, h) + + # Add a viewPort if one is missing and w,h was absolute + viewBox = svg.getAttribute('viewBox') + svg.setAttribute('viewBox_orig', viewBox) if viewBox + if w && h && !viewBox + # Add a viewBox to match the size + viewBox = '0 0 ' + w + ' ' + h + svg.setAttribute('viewBox', viewBox) + # console.log('new viewBox', viewBox) + + # Add click events + if @clickable + $(svg).on 'click', => @sendEvent('click') + $(svg).on 'mousedown', => @sendEvent('mousedown') + $(svg).on 'mouseup', => @sendEvent('mouseup') + $(svg).on 'mousemove', => @sendEvent('mousemove') + $(svg).on 'mouseover', => @sendEvent('mouseover') + $(svg).on 'mouseout', => @sendEvent('mouseout') + + @resizeArt() + + # Move to the specified path + @animate_path(@path) if @path.length > 0 + + + + # Resize the art, if needed, for changes in container size + + # Apply stretches to the static svg + if @container and @stretches + elements = $(@container).find('svg') + if elements.length > 0 + svg = elements[0] + if @stretches + svg.setAttribute('preserveAspectRatio', 'none') + else + svg.removeAttribute('preserveAspectRatio') + + # Apply stretches to the snap svg + if @snap + svg = $(@snap.node)[0] + if @stretches + svg.setAttribute('preserveAspectRatio', 'none') + else + svg.removeAttribute('preserveAspectRatio') + + + + # Load inline svg + @createDOM() + + @inline_data = @inline_data.trim() + # Remove comments. Comments are used to prevent compile errors + match = new RegExp(/^\s*\<\!--(.*)--\>/).exec(@inline_data); + if !!match + @inline_data = match[1] + + $(@container).html(@inline_data) + + # Refresh the div + $(@container).html($(@container).html()) + + # Trigger ready + #TODO Can this be improved? I tried binding to DOM events, svg loaded + setTimeout ( => + @sendEvent('ready') + ), 1 + + + + # Load an svg file + @createDOM() + + # Fire onload when the graphic is loaded + _this = this + $(@container).load @src, -> + # Generate onready event + _this.sendEvent('ready') + + + diff --git a/classes/audioplayer.dre b/classes/audioplayer.dre new file mode 100644 index 00000000..7a4c88d7 --- /dev/null +++ b/classes/audioplayer.dre @@ -0,0 +1,221 @@ + + + + + + + + + + + if (loaded) { + if (this.playing && ! this.paused) { + this.setAttribute('playing', true); + } + } + + + + + if (playing) { + this.play() + } else { + this.stop() + } + + + + + if (paused) { + this.pause() + } else { + this.setAttribute('playing', true) + } + + + + + if (this.source) + this.source.loop = loop; + + + + + + + + + + + + + if (! url) return; + var _this = this; + function updateProgress(evt) { + if (evt.lengthComputable) { + var percentComplete = (evt.loaded / evt.total); + _this.setAttribute('loadprogress', percentComplete); + } + } + + this.sendEvent('loading', url); + var request = new XMLHttpRequest(); + this.setAttribute('loaded', false); + request.open('GET', url, true); + request.onprogress=updateProgress; + request.responseType = 'arraybuffer'; + + // Decode asynchronously + request.onload = function() { + _this.context.decodeAudioData(request.response, function(buffer) { + _this.buffer = buffer; + _this.setAttribute('duration', buffer.duration); + _this.setAttribute('loaded', true); + }); + } + this.buffer = null; + request.send(); + + + // Fix up prefixing + window.AudioContext = window.AudioContext || window.webkitAudioContext; + this.context = new AudioContext(); + var _this = this; + this.context.oncomplete = function() { + _this.setAttribute('playing', false); + } + this.gain = null; + this.fftNode = null; + this.buffer = null; + this.startOffset = 0; + this.startTime = 0; + + + if (! this.buffer) return; + + // track the time when playback started + this.startTime = this.context.currentTime; + // creates a sound source + this.source = this.context.createBufferSource(); + this.source.loop = this.loop; + // tell the source which sound to play + this.source.buffer = this.buffer; + // Create a gain node. + //this.gain = this.context.createGain(); + // Create fft + this.fftNode = this.context.createAnalyser(); + if (this.fftsize) { + this.fftNode.fftSize = this.fftsize; + this.fftNode.smoothingTimeConstant = this.fftsmoothing; + } + + // Connect the source to the gain node. + this.source.connect(this.fftNode); + // Connect the gain node to the destination. + this.fftNode.connect(this.context.destination); + // play the source now + if (!this.source.start) + this.source.start = source.noteOn; + this.source.start(0, this.startOffset % this.duration); + + + if (! this.source) return; + if (!this.source.stop) + this.source.stop = source.noteOff; + this.source.stop(0); + this.setAttribute('time', 0); + this.startTime = this.startOffset = 0; + this.paused = false; + + + if (! this.source) return; + if (!this.source.stop) + this.source.stop = source.noteOff; + this.source.stop(); + this.startOffset += (this.context.currentTime - this.startTime); + + + if (! (this.fftNode && this.playing && ! this.paused)) return; + + var time = this.context.currentTime - this.startTime + this.startOffset; + if (time > this.duration) { + this.stop(); + } + // bypass the setter + this.time = time % this.duration; + this.sendEvent('time', time); + + if (this.fftsize) { + var data = new Uint8Array(this.fftsize); + this.fftNode.getByteFrequencyData(data); + this.setAttribute('fft', data) + } + + \ No newline at end of file diff --git a/classes/bitmap.dre b/classes/bitmap.dre new file mode 100644 index 00000000..0066c9f4 --- /dev/null +++ b/classes/bitmap.dre @@ -0,0 +1,66 @@ + + + + + + if (! src) return + if (this.src == src) return + this.setAttribute('background-image', 'url("' + src + '")'); + this.setAttribute('background-size', 'cover'); + + var img = this._img; + if (! img) { + img = this._img = new Image(); + } + + img.src = src; + + // send load events + var _this = this; + img.onload = function() { + /** + * @event onload + * Fired when the bitmap is loaded + * @param {Object} size An object containing the width and height + */ + _this.sendEvent('load', {width: img.width, height: img.height}); + } + img.onerror = function() { + /** + * @event onerror + * Fired when there is an error loading the bitmap + */ + _this.sendEvent('error', img); + } + + diff --git a/classes/boundedview.dre b/classes/boundedview.dre new file mode 100644 index 00000000..c6c83b43 --- /dev/null +++ b/classes/boundedview.dre @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/classes/boundslayout.lzx b/classes/boundslayout.lzx deleted file mode 100644 index 2f7a64ca..00000000 --- a/classes/boundslayout.lzx +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - # console.log('oninit', this) - - - # console.log('onsubview bound', @update, subview, this) - @listenTo(subview, 'x y width height', @update) - - - # console.log('skip', @skip, @locked) - return if @skip() - @locked = true - # TODO: fix to track outliers (and maybe thresholds) and update everything when all outliers go below that threshold - if false # and sender? and value? and (@lastlength == @parent.subviews.length) - # update based on sender attribute where available - if (! attribute or attribute == 'x' or attribute == 'width') - width = Math.max(@width, sender.x + sender.width) - #if width != @width - @setAttribute('width', width) unless @.width == width - @parent.setAttribute('width', width) unless @parent.width == width - - if (! attribute or attribute == 'y' or attribute == 'height') - height = Math.max(@height, sender.y + sender.height) - #if height != @height - @setAttribute('height', height) unless @.height == height - @parent.setAttribute('height', height) unless @parent.height == height - - # console.log('sender', value, sender, attribute, width, height) - else - # console.log('brute force update') - width = 0 - height = 0 - for subview, len in @parent.subviews - continue if subview.ignorelayout - # console.log 'updating', subview, @attribute, pos - width = Math.max(width, subview.x + subview.width) - height = Math.max(height, subview.y + subview.height) - # return if isNaN(width) or isNaN(height) - # console.log 'value', subview, width, height - - @lastlength = len - - @setAttribute('width', width) unless @.width == width - @setAttribute('height', height) unless @.height == height - @parent.setAttribute('width', width) unless @parent.width == width - @parent.setAttribute('height', height) unless @parent.height == height - @locked = false - - \ No newline at end of file diff --git a/classes/buttonbase.dre b/classes/buttonbase.dre new file mode 100644 index 00000000..be2309dd --- /dev/null +++ b/classes/buttonbase.dre @@ -0,0 +1,104 @@ + + + + + + + + + + + + + + + + + + + + + + + + + # Hack. Should be @inited + return unless @realinited + return unless @visual + @visual.setAttribute('bgcolor', if @selected then @selectcolor else @defaultcolor); + + + + + + + + + + + + + + + # Force an onwidth event in the parent to resize the button + @parent.sendEvent('width', @parent.width) + + + + + + + + # Custom behavior in subclasses + + + diff --git a/classes/checkbutton.dre b/classes/checkbutton.dre new file mode 100644 index 00000000..0b3f4f6b --- /dev/null +++ b/classes/checkbutton.dre @@ -0,0 +1,141 @@ + + + + + + + + + + + + + + + + + + + #TODO Remove this hack when oninit works + $this = @; + func = () -> $this.realinit() + setTimeout(func, 0) + + + + @realinited = true + # return unless @check # oninit can fire before children are inited + + # visual is the object that makes a visual change when selected + @visual = @check + + # Detect if the button was supplied with a size + if (@width > 0 || @height > 0) + @_fixedsize = true + @handleResize() + + @visualize() + + + + return unless @realinited #Hack. Should be @inited + return if @_resize_lock + + @_resize_lock = true + if (@label.width > 0 && @label.height > 0) + # Checkbox size + if @checkw != @label.height || @checkh != @check.height + settings = + checkw: @label.height + checkh: @label.height + @setAttributes(settings) + + if @_fixedsize + #Fixed size button. position text in center of button + + xoffset = (@width + @padding - @label.width - @checkw)/2 + yoffset = (@height + @padding - @label.height)/2 + + settings = + checkx:xoffset + checky:yoffset + @setAttributes(settings) + + settings = + #width: @checkw + @label.width + #height: @label.height + textx: @checkx + @checkw + @innerspacing + texty: yoffset + @setAttributes(settings) + else + #Variable size button. Resize button to text + settings = + checkx: @padding + checky: @padding + width: @checkw + @label.width + @innerspacing + @padding*2 + height: @label.height + @padding*2 + textx: @padding + @checkx + @checkw + @innerspacing + texty: @padding + @setAttributes(settings) + + @_resize_lock = false + + + + @setAttribute('selected', !@selected); + + + diff --git a/classes/constantlayout.dre b/classes/constantlayout.dre new file mode 100644 index 00000000..3a9a374a --- /dev/null +++ b/classes/constantlayout.dre @@ -0,0 +1,57 @@ + + + + + + + + + + + + + if @canUpdate() + attribute = @attribute + value = @value + for subview in @subviews + subview.setAttribute(attribute, value) + + diff --git a/classes/dataset.dre b/classes/dataset.dre new file mode 100644 index 00000000..b8c8789f --- /dev/null +++ b/classes/dataset.dre @@ -0,0 +1,135 @@ + + + + + + + dr.datasets ?= {} + dr.datasets[@name] = @ + + + + + if @$textcontent?.trim() + @setAttribute('data', JSON.parse(@$textcontent)) + # console.log('data', @name, @data) + + + + # console.log('loading url', url) + type = 'json' + if (url.indexOf('callback=?') != -1) + # assume JSONP if 'callback=?' is in the URL + type = 'jsonp' + + $.ajax({ + url: url + dataType: type + }).done((data) => + # console.log('data', url, data) + @setAttribute('data', data) + ); + + + # find the scope and property to be updated + re = /\/([^\/]+)$/ + property = path.match(re) + if property and property[1] + subpath = path.replace(re, '') + + # console.log('updating data', @data, subpath) + scope = JsonPath.resolve(@data, subpath) + # only handle updating a single field + return unless scope.length == 1 + + # console.log(data, @data, path, scope[0], property[1], scope[0][property[1]]) + scope[0][property[1]] = data + # TODO: send smaller updates based on path argument + @sendEvent('data', @data) + + \ No newline at end of file diff --git a/classes/dataset.lzx b/classes/dataset.lzx deleted file mode 100644 index bf6d16b5..00000000 --- a/classes/dataset.lzx +++ /dev/null @@ -1,45 +0,0 @@ - - - lz.datasets ?= {} - lz.datasets[@name] = @ - - - - if @textcontent - @setAttribute('data', JSON.parse(@textcontent)) - # console.log('data', @name, @data) - - - - # console.log('loading url', url) - type = 'json' - if (url.indexOf('callback=?') != -1) - # assume JSONP if 'callback=?' is in the URL - type = 'jsonp' - - $.ajax({ - url: url - dataType: type - }).done((data) => - # console.log('data', url, data) - @setAttribute('data', data) - ); - - - # find the scope and property to be updated - re = /\/([^\/]+)$/ - property = path.match(re) - if property and property[1] - subpath = path.replace(re, '') - - # console.log('updating data', @data, subpath) - scope = JsonPath.resolve(@data, subpath) - # only handle updating a single field - return unless scope.length == 1 - - # console.log(data, @data, path, scope[0], property[1], scope[0][property[1]]) - scope[0][property[1]] = data - # TODO: send smaller updates based on path argument - @sendEvent('data', @data) - - \ No newline at end of file diff --git a/classes/dragstate.dre b/classes/dragstate.dre new file mode 100644 index 00000000..8d0842f5 --- /dev/null +++ b/classes/dragstate.dre @@ -0,0 +1,89 @@ + + + + + + + + //console.log('onapplied', applied, this) + if (applied) { + var pos = this.parent.getAbsolute(); + this.parent.startx = dr.mouse.x - pos.x; + this.parent.starty = dr.mouse.y - pos.y; + //console.log('startx', pos, dr.mouse.x, dr.mouse.y, this.startx, this.starty) + } + + + if (this.dragaxis == 'both' || this.dragaxis == 'x') { + this.updatePos('x', x - this.parent.getAbsolute().x - this.startx) + } + + + if (this.dragaxis == 'both' || this.dragaxis == 'y') { + this.updatePos('y', y - this.parent.getAbsolute().y - this.starty); + } + + + //console.log('updatePos', name, val, this, this.updatePos) + this.setAttribute(name, val) + + diff --git a/classes/gyro.dre b/classes/gyro.dre new file mode 100644 index 00000000..8661bc5b --- /dev/null +++ b/classes/gyro.dre @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + var _this = this; + // TODO: use lzidle to throttle + window.addEventListener('devicemotion', function(ev) { + var o = ev.accelerationIncludingGravity; + for (var key in o) { + _this.setAttribute(key, o[key]); + } + }); + window.addEventListener('deviceorientation', function(ev) { + _this.setAttribute('alpha', ev.alpha); + _this.setAttribute('beta', ev.beta); + _this.setAttribute('gamma', ev.gamma); + _this.setAttribute('compassaccuracy', ev.webkitCompassAccuracy); + _this.setAttribute('compass', ev.webkitCompassHeading); + }); + + \ No newline at end of file diff --git a/classes/inputtext.lzx b/classes/inputtext.lzx deleted file mode 100644 index 232a43a0..00000000 --- a/classes/inputtext.lzx +++ /dev/null @@ -1,37 +0,0 @@ - - - - @set(@sprite.measureTextSize(@multiline, @width)) - - - @setAttribute('text', d) - - - # console.log('set_text', text) - @sprite.value(text) - # @updateSize() if (text != @text) - - - # el = @sprite.el - # Prefer text attribute, fall back to innerHTML - text = @text || @sprite.text() - # clear innerHTML - @sprite.text('') - @sprite.createInputtextElement(text, @multiline, @width) - @updateSize() - - - return unless @replicator - # attempt to coerce to the current type if it was a boolean or number (bad idea?) - newdata = @text - if (typeof @data == 'number') - if parseFloat(newdata) + '' == newdata - newdata = parseFloat(newdata) - else if (typeof @data == 'boolean') - if newdata == 'true' - newdata = true - else if newdata == 'false' - newdata = false - @replicator.updateData(newdata) - - \ No newline at end of file diff --git a/classes/labelbutton.dre b/classes/labelbutton.dre new file mode 100644 index 00000000..afdf2d86 --- /dev/null +++ b/classes/labelbutton.dre @@ -0,0 +1,89 @@ + + + + + + + #TODO Remove this hack when oninit works + $this = @; + func = () -> $this.realinit() + setTimeout(func, 0) + + + + # visual is the object that makes a visual change when selected + @visual = @ + + @realinited = true + + # Detect if the button was supplied with a size + @_fixedsize = true if (@width > 0 || @height > 0) + + @handleResize() + + @visualize() + + + + return unless @realinited #Hack. Should be @inited + return if @_resize_lock + + if (@label.width > 0 && @label.height > 0) + if @_fixedsize + #Fixed size button. position text in center of button + xoffset = (@width + @padding - @label.width)/2 + yoffset = (@height + @padding - @label.height)/2 + @setAttributes(textx:xoffset, texty:yoffset) + else + #Variable size button. Resize button to text + @_resize_lock = true + @setAttributes({width:@label.width + @padding*2, height:@label.height + @padding*2, textx:@padding, texty:@padding}) + @_resize_lock = false + + + + @visual.setAttribute('bgcolor', @selectcolor) + + + + @visual.setAttribute('bgcolor', @defaultcolor) + + + diff --git a/classes/labeltoggle.dre b/classes/labeltoggle.dre new file mode 100644 index 00000000..3094f622 --- /dev/null +++ b/classes/labeltoggle.dre @@ -0,0 +1,44 @@ + + + + + + + @setAttribute('selected', !@selected); + + + diff --git a/classes/logger.dre b/classes/logger.dre new file mode 100644 index 00000000..11600d97 --- /dev/null +++ b/classes/logger.dre @@ -0,0 +1,16 @@ + + + + console.log('setAttribute', name, value, 'on', this) + + \ No newline at end of file diff --git a/classes/rangeslider.dre b/classes/rangeslider.dre new file mode 100644 index 00000000..e020eac4 --- /dev/null +++ b/classes/rangeslider.dre @@ -0,0 +1,290 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + max = Math.min(@maxvalue, @maxlowvalue) + if (v > max) + v = max; + else if (v < @minvalue) + v = @minvalue; + @setAttribute('lowvalue', v); + + + + + min = Math.max(@minvalue, @minhighvalue) + if (v < min) + v = min; + else if (v > @maxvalue) + v = @maxvalue; + @setAttribute('highvalue', v); + + + + + + + + + + + + + + + + + + + + if @axis == 'x' + + if @exclusive + lw = @width * ((@lowvalue - @minvalue) / (@maxvalue - @minvalue)) + + x = if @invert then (@width - lw) else 0 + + @lowvalueview.setAttributes({x:x, y:0, width:lw, height:@height}) + @lowvalueview.setAttribute('background', @lowselectcolor) + + hw = @width * ((@maxvalue - @highvalue) / (@maxvalue - @minvalue)) + hx = if @invert then 0 else (@width - hw) + + @highvalueview.setAttributes({x:hx, y:0, width:hw, height:@height}) + + else + w = @width * ((@highvalue - @lowvalue) / (@maxvalue - @minvalue)) + x = @width * ((@lowvalue - @minvalue) / (@maxvalue - @minvalue)) + + x = (@width - w) - x if @invert + + @lowvalueview.setAttributes({x:x, y:0, width:w, height:@height}) + @highvalueview.setAttributes({x:x, y:0, width:w, height:@height}) + @lowvalueview.setAttribute('background', 'linear-gradient(to right, ' + @lowselectcolor + ', ' + @highselectcolor + ')') + + else + + if @exclusive + lh = @height * ((@lowvalue - @minvalue) / (@maxvalue - @minvalue)) + + y = if @invert then (@height - lh) else 0 + + @lowvalueview.setAttributes({x:0, y:y, width:@width, height:lh}) + @lowvalueview.setAttribute('background', @lowselectcolor) + + hh = @height * ((@maxvalue - @highvalue) / (@maxvalue - @minvalue)) + hy = if @invert then 0 else (@height - hh) + + @highvalueview.setAttributes({x:0, y:hy, width:@width, height:hh}) + + else + h = @height * ((@highvalue - @lowvalue) / (@maxvalue - @minvalue)) + y = @height * ((@lowvalue - @minvalue) / (@maxvalue - @minvalue)) + + y = (@height - h) - y if @invert + + @lowvalueview.setAttributes({x:0, y:y, width:@width, height:h}) + @highvalueview.setAttributes({x:0, y:y, width:@width, height:h}) + @lowvalueview.setAttribute('background', 'linear-gradient(' + @lowselectcolor + ', ' + @highselectcolor + ')') + + + + + + @movePosition(if @axis == 'x' then dr.mouse.x else dr.mouse.y) + @drag.setAttribute('applied', true); + + + @drag.setAttribute('applied', false); + + + @drag.setAttribute('applied', false); + + + + + spread = @maxvalue - @minvalue; + + if (@axis == 'x') + + if (@width > 0) + val = ((p - @getAbsolute().x) / @width * spread) + @minvalue + val = @maxvalue - val if @invert + + ld = Math.abs(@lowvalue - val) + hd = Math.abs(@highvalue - val) + + if (ld < hd) + @changeLowValue(val) + else + @changeHighValue(val) + + else + + if (@height > 0) + val = ((p - @getAbsolute().y) / @height * spread) + @minvalue + val = @maxvalue - val if @invert + + ld = Math.abs(@lowvalue - val) + hd = Math.abs(@highvalue - val) + + if (ld < hd) + @changeLowValue(val) + else + @changeHighValue(val) + + + + + + + @movePosition(x) if @drag.applied && @axis == 'x' + + + @movePosition(y) if @drag.applied && @axis == 'y' + + + diff --git a/classes/replicator.dre b/classes/replicator.dre new file mode 100644 index 00000000..6b429aa0 --- /dev/null +++ b/classes/replicator.dre @@ -0,0 +1,406 @@ + + + + + + + + + + + + return unless datapath + # console.log('evaluating datapath', datapath) + re = /^\$([^\/]+)/ + match = datapath.match(re) + if match and match[1] + # absolute datapath + @setAttribute('_dataset', match[1]) + datapath = datapath.replace(re, '') + + @datapath = datapath + @sendEvent('datapath', datapath) + + @parsedpath = JsonPath.parseSelector(datapath) + # console.log('evaluated datapath', datapath, @parsedpath) + + + + + return unless dataset + @dataset = dr.datasets[dataset] + @_dataset = dataset + + # console.log('listening to dataset', dataset, dr.datasets, @dataset, @_dataset) + @listenTo(@dataset, 'data', (data) => + # console.log('callback', @, data) + @data = data + @applyData() + ) + @sendEvent('dataset', @dataset) + + + + + + + + + + _filterexpression = new RegExp(regex) + # console.log('filtering on', regex, _filterexpression) + @_filterexpressionfunc = (value) -> + return (value + '').match(_filterexpression) if (value) + @doReplication() + + + + # console.log 'onsortfield', @sortfield, @data + @buildsortfunc() + @applyData() + + + # console.log 'onsortasc', @sortasc, @data + @buildsortfunc() + @applyData() + + + if @sortfield + sortfield = @sortfield + sortasc = @sortasc + @sortfunc = (a, b) -> + keyA = a[sortfield] + keyB = b[sortfield] + # Compare the 2 sort fields + result = 0 + if keyA > keyB + result = 1 + else if keyA < keyB + result = -1 + + # console.log sortfield, sortasc + result = -result if (not sortasc) + result + else + @sortfunc = null + + + + + + + + # remove dataset declaration + re = /^\$([^\/]+)/ + @dataset.updateData(@datapath.replace(re, ''), data); + + + + this.applyData() + + + # @parent.setAttribute('display', 'none') + if @children + for child in @children + # console.log 'destroying child', child + child.destroy() + @children = [] + # @parent.setAttribute('display', null) + + + + return unless @inited and @parent and @classname + # console.log('applyData', @data, @classname, @parent, @children, @, @inited) + + unless @classname of dr + console.warn 'missing class for replicator', @classname, 'skipping replication' + return + + return if @locked + + if @datapath + if @_dataset + # absolute datapath + # console.log 'evaluating absolute datapath', @datapath, @_dataset + unless @dataset + console.warn 'missing dataset', @_dataset + return + + if @datapath == '$' + @_dataset + # console.log('dataset only', @datapath, @dataset) + # replicate an instance with data attribute set to the dataset + data = [@dataset] + else + # console.log('evaluating absolute selector', @datapath, @dataset.data, @parsedpath) + data = JsonPath.executeSelectors(@dataset.data, @parsedpath, @filterfunction?.bind(@)) + else + # relative datapath, look for dataset reference in parents + parentdata = @_findInParents('data') + if parentdata? + # console.log 'found dataset in parent ', parentdata + if parentdata.$tagname is 'dataset' and parentdata.data + # console.log 'found parentdata.data', parentdata + parentdata = parentdata.data + # console.log('executing relative selector', @datapath, @parsedpath, parentdata) + data = JsonPath.executeSelectors(parentdata, @parsedpath, @filterfunction?.bind(@)) + # console.log('looking for data', @datapath, parentdata, data) + else + console.warn('No parent datapath found', @datapath, @) + @data = data + else + # no datapath + data = @data + + return unless @data + + @_origdata = @data + + if @data.length > @lazycount + setTimeout(() => + @doReplication() + , 0); + else + @doReplication() + + + return unless @data and @parent + + locked = @locked + @locked = true + + if @filterexpression and @_filterexpressionfunc + @data = @_origdata.filter(@_filterexpressionfunc) + # console.log('_filterexpressionfunc', @_filterexpressionfunc, @data, @_origdata) + + @data.sort(@sortfunc) if (@sortfunc) + @sendEvent('data', @data) if @data.length + + if @classname == 'node' + # bail out before actually replicating + @locked = locked + return + + if @parent.layouts + for layout in @parent.layouts + layout.setAttribute('locked', true) + + #console.log @data.length + if @pooling and @children and @children.length == @data.length + for child, i in @children + datum = @data[i] + # console.log 'replicator updating', i, child, 'in', datum + child.setAttribute('data', datum) + else + @clear() + for datum in @data + # console.log 'replicator creating', @classname, 'in', @parent + child = new dr[@classname](null, {data: datum, parent: @parent, replicator: @}) + # console.log 'replicator created', @classname, child, child.data + @children.push(child) + + # init constraints for all children created + child.initConstraints() if child + + if @parent.layouts + for layout in @parent.layouts + layout.setAttribute('locked', false) + layout.update() + + @locked = locked + + \ No newline at end of file diff --git a/classes/replicator.lzx b/classes/replicator.lzx deleted file mode 100644 index 2cfec66e..00000000 --- a/classes/replicator.lzx +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - @dataset.updateData(@parsedpath, data); - - - return unless @parent - # console.log('applyData', @data, @classname) - - if @datapath - re = /^\$([^\/]+)/ - match = @datapath.match(re) - if match and match[1] - # absolute datapath - # console.log('evaluating datapath', @datapath, match[1]) - @dataset = dataset = lz.datasets[match[1]] - # console.log('listening to dataset', dataset) - @listenTo(dataset, 'data', (data) => - # console.log('callback', @, data) - @setAttribute('data', data) - ) - @parsedpath = path = @datapath.replace(re, '') - if path == '' - # console.log('dataset only', dataset, dataset.data) - data = [dataset] - else - # console.log('evaluating path', path, dataset.data) - data = JsonPath.resolve(dataset.data, path) - else - # relative datapath, look for dataset in parent(s) - parentdata = @_findInParents('data') - if parentdata? - # console.log('parsing selector', @datapath) - data = JsonPath.resolve(parentdata.data, @datapath) - # console.log('looking for data', @datapath, parentdata.data, data) - else - console.warn('No parent datapath found', @datapath, @) - else - # no datapath - data = @data - - return unless data - - if @parent.layouts - for layout in @parent.layouts - layout.setAttribute('locked', true) - - if @children - for child in @children - child.destroy() - @children = [] - - for datum in data - child = new lz[@classname](null, {data: datum, parent: @parent, replicator: @}) - # console.log 'created', datum, @classname, child - @children.push(child) - - # init constraints for all children - child.initConstraints() if child - - if @parent.layouts - for layout in @parent.layouts - layout.setAttribute('locked', false) - - \ No newline at end of file diff --git a/classes/resizelayout.dre b/classes/resizelayout.dre new file mode 100644 index 00000000..af1aeb54 --- /dev/null +++ b/classes/resizelayout.dre @@ -0,0 +1,115 @@ + + + + + # collapseparent attribute is unused in resizelayout. + + + + @super(arguments) + @stopListening(@parent, 'inner' + @measureAttrName, @update) + + + + @super(arguments) + @listenTo(@parent, 'inner' + @measureAttrName, @update) + + + + # Don't monitor width/height of the "stretchy" subviews since this + # layout resizes them so you would get an infinite loop. + if !(Number(view.layouthint) > 0) + @listenTo(view, @measureAttrName, @update) + @listenTo(view, 'visible', @update) + + + + # Don't monitor width/height of the "stretchy" subviews since this + # layout resizes them so you would get an infinite loop. + if !(Number(view.layouthint) > 0) + @stopListening(view, @measureAttrName, @update) + @stopListening(view, 'visible', @update) + + + + # Get size to fill + measureAttrName = @measureAttrName + remainder = @parent['inner' + measureAttrName] + + # Calculate minimum required size + remainder -= @value + @outset + + svs = @subviews + i = svs.length + count = 0 + resizeSum = 0 + + while i + sv = svs[--i] + if @skipSubview(sv) then continue + ++count + hint = Number(sv.layouthint) + if hint > 0 + resizeSum += hint + else + remainder -= sv[measureAttrName] + + if count != 0 + remainder -= (count - 1) * @spacing + + # Store for update + @remainder = remainder + @resizeSum = resizeSum + @scalingFactor = remainder / resizeSum + @resizeSumUsed = @remainderUsed = 0 + + + + hint = Number(view.layouthint) + if hint > 0 + @resizeSumUsed += hint + + size = if @resizeSum == @resizeSumUsed then @remainder - @remainderUsed else Math.round(hint * @scalingFactor) + + @remainderUsed += size + view.setAttribute(@measureAttrName, size) + + return @super(arguments) + + + + # No resizing of parent since this view expands to fill the parent. + + diff --git a/classes/shim.dre b/classes/shim.dre new file mode 100644 index 00000000..fdb336e6 --- /dev/null +++ b/classes/shim.dre @@ -0,0 +1,76 @@ + + + + + + + + + + + var url = location.protocol+'//'+location.hostname+(location.port ? ':'+location.port: '') + '/'; + if (! window['Primus']) return; + this.primus = new Primus(url, {ping: this.pingtime, pong: this.pingtime, websockets: this.websockets}); + var _this = this; + this.primus.on('data', function shim$data(data) { + // console.log('message', data) + _this.setAttribute(data.type, data.data); + }); + this.primus.on('open', function shim$open() { + // console.log('opened') + _this.setAttribute('connected', true); + }); + this.primus.on('error', function shim$error(err) { + // console.error('error', err) + _this.setAttribute('connected', false); + _this.sendEvent('error', err); + }); + + + + if (this.connected) { + var json = {'type': type || 'data', data: data}; + // console.log('sending', json) + this.primus.write(json) + } + this.setAttribute(type, data); + + \ No newline at end of file diff --git a/classes/shrinktofit.dre b/classes/shrinktofit.dre new file mode 100644 index 00000000..45a3fd54 --- /dev/null +++ b/classes/shrinktofit.dre @@ -0,0 +1,141 @@ + + + + + + + @stopMonitoringAllSubviews() + + + @startMonitoringAllSubviews() + @update() + + + + + + + + + + + + @__updateMonitoringSubview(view, @listenTo) + + + + @__updateMonitoringSubview(view, @stopListening) + + + + + axis = @axis + func = func.bind(@) + + if axis != 'y' + func(view, 'x', @update) + func(view, 'width', @update) + + if axis != 'x' + func(view, 'y', @update) + func(view, 'height', @update) + + func(view, 'visible', @update) + + + + if @canUpdate() + # Prevent inadvertent loops + @locked = true + + svs = @subviews + len = svs.length + maxFunc = Math.max + parent = @parent + + if @axis != 'y' + max = 0 + i = len + while i + sv = svs[--i] + if sv.visible then max = maxFunc(max, sv.x + maxFunc(0, sv.width)) + parent.setAttribute('width', max + @xpad + parent.width - parent.innerwidth) + + if @axis != 'x' + max = 0 + i = len + while i + sv = svs[--i] + if sv.visible then max = maxFunc(max, sv.y + maxFunc(0, sv.height)) + parent.setAttribute('height', max + @ypad + parent.height - parent.innerheight) + + @locked = false + + diff --git a/classes/simplelayout.lzx b/classes/simplelayout.lzx deleted file mode 100644 index 1ecf97d0..00000000 --- a/classes/simplelayout.lzx +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - # console.log('oninit', this) - - - # console.log('oninset', inset) - @update() - - - # console.log('onsubview', @axis, @update, subview, this) - @listenTo(subview, @axis, @update) - - - # console.log('spacing setter', spacing, this) - @update() - - - newaxis = switch attr - when 'x' then 'width' - when 'y' then 'height' - - # console.log 'coffee', attr, arguments, @, @parent - unless @skip() - for subview in @parent.subviews - @stopListening(subview, @axis, @update) - @listenTo(subview, newaxis, @update) - - @axis = newaxis - - # console.log('set_attribute', attr, typeof attr, @attribute, @axis, newaxis) - @update() - - - # console.log('skip', @skip(), @locked) - return if @skip() - pos = @inset - skip = true if sender - for subview in @parent.subviews - continue if subview.ignorelayout - if (skip and subview != sender) - # console.log 'skipping', subview, sender - else - # console.log 'updating', subview, @attribute, pos - subview.setAttribute(@attribute, pos) unless subview[@attribute] == pos - skip = false - # console.log 'value', pos, @spacing, @inset, @attribute, @axis, subview, subview[@axis] - pos += @spacing + subview[@axis] - return pos - - \ No newline at end of file diff --git a/classes/slider.dre b/classes/slider.dre new file mode 100644 index 00000000..229d83ea --- /dev/null +++ b/classes/slider.dre @@ -0,0 +1,161 @@ + + + + + + + + + + + + + + + + + + + + @visualize() + + + + + + + + + if (v > @maxvalue) + v = @maxvalue; + else if (v < @minvalue) + v = @minvalue; + @setAttribute('value', v); + + + + + + + + + + + + + if (@axis == 'x') + w = @width * ((@value - @minvalue) / (@maxvalue-@minvalue)) + x = if @invert then @width-w else 0 + y = 0 + width = w + height = @height + @valueview.setAttributes({x:x, y:y, width:width, height:height}) + else + h = @height * ((@value - @minvalue) / (@maxvalue-@minvalue)) + x = 0 + y = if @invert then @height-h else 0 + width = @width + height = h + @valueview.setAttributes({x:x, y:y, width:width, height:height}) + + + + + + @movePosition(if @axis == 'x' then dr.mouse.x else dr.mouse.y) + @drag.setAttribute('applied', true); + + + @drag.setAttribute('applied', false); + + + #console.log("onmouseupoutside"); + @drag.setAttribute('applied', false); + + + + + + spread = @maxvalue - @minvalue; + if (@axis == 'x') + if (@width > 0) + val = (p - @getAbsolute().x) / @width * spread; + val = @maxvalue - val if @invert + @changeValue(val + @minvalue); + else + if (@height > 0) + val = (p - @getAbsolute().y) / @height * spread; + val = @maxvalue - val if @invert + @changeValue(val + @minvalue); + + + + + + @movePosition(x) if @drag.applied && @axis == 'x' + + + @movePosition(y) if @drag.applied && @axis == 'y' + + + diff --git a/classes/spacedlayout.dre b/classes/spacedlayout.dre new file mode 100644 index 00000000..4c53976e --- /dev/null +++ b/classes/spacedlayout.dre @@ -0,0 +1,108 @@ + + + + + + + + + + + + + + + # An alias for value. + @setAttribute('value', inset); + + + + + + # An alias for attribute. + @setAttribute('attribute', axis); + + + + @measureAttrName ?= 'height' + + @stopMonitoringAllSubviews() + + if attribute == 'y' + @measureAttrName = 'height' + else + @measureAttrName = 'width' + + + @startMonitoringAllSubviews() + @update() + + + + @super(arguments) + @listenTo(view, @measureAttrName, @update) + + + + @super(arguments) + @stopListening(view, @measureAttrName, @update) + + + + view.setAttribute(attribute, value) + return value + view[@measureAttrName] + @spacing + + + + parent = @parent + man = @measureAttrName + parent.setAttribute(man, value + @outset - @spacing + parent[man] - parent['inner' + man]) + + diff --git a/classes/stats.dre b/classes/stats.dre new file mode 100644 index 00000000..3b52bf04 --- /dev/null +++ b/classes/stats.dre @@ -0,0 +1,41 @@ + + + + + this.container = this.sprite.el; + this.stats = new Stats(); + this.container.appendChild( this.stats.domElement ); + + + this.stats.update(); + + \ No newline at end of file diff --git a/classes/text.lzx b/classes/text.lzx deleted file mode 100644 index fb7c09f2..00000000 --- a/classes/text.lzx +++ /dev/null @@ -1,19 +0,0 @@ - - - - @set(@sprite.measureTextSize(@multiline, @width)) - - - @setAttribute('text', d) - - - # console.log('set_text', text) - if (text != @text) - @sprite.text(text) - @updateSize() - - - # console.log('oninit', @) - @updateSize() - - \ No newline at end of file diff --git a/classes/threejs.dre b/classes/threejs.dre new file mode 100644 index 00000000..52665ce2 --- /dev/null +++ b/classes/threejs.dre @@ -0,0 +1,83 @@ + + + + + if (! this.camera) return; + this.camera.near = cameranear; + this.camera.updateProjectionMatrix(); + + + + if (! this.camera) return; + this.camera.far = camerafar; + this.camera.updateProjectionMatrix(); + + + this.renderer.render( this.scene, this.camera ); + + + + + + + + var renderer = this.renderer = new THREE.WebGLRenderer(); + + renderer.setClearColor( this.bgcolor ); + renderer.setSize(this.width, this.height); + renderer.domElement.$view = this; + + this.sprite.el.appendChild(renderer.domElement); + + this.camera = new THREE.PerspectiveCamera( 40, this.width / this.height, this.cameranear, this.camerafar ); + this.scene = new THREE.Scene(); + this.initScene(this.scene); + + + + + + if (! this.renderer) return; + this.renderer.setClearColor( color ); + + + + + + if (this.camera) { + + this.camera.aspect = this.width / this.height; + this.camera.updateProjectionMatrix(); + + } + + if (this.renderer) { + + this.renderer.setSize( this.width, this.height ); + + } + + + + + diff --git a/classes/touch.dre b/classes/touch.dre new file mode 100644 index 00000000..b53ea457 --- /dev/null +++ b/classes/touch.dre @@ -0,0 +1,65 @@ + + + + + + + + + + + var _this = this; + var handler = function (ev) { + //console.log(ev) + if (ev.touches && ev.touches.length) { + // make a plain JSON object so it can be serialized + var touch = [] + for (var i = 0; i < ev.touches.length; i++) { + var t = ev.touches[i]; + touch[i] = {x: t.pageX, y: t.pageY}; + } + //console.log('touches', touch); + _this.setAttribute('touches', JSON.stringify(touch)) + // use first finger for coordinate + _this.setAttribute('x', ev.touches[0].pageX) + _this.setAttribute('y', ev.touches[0].pageY) + } + return false; + } + document.addEventListener('touchstart', handler); + document.addEventListener('touchmove', handler); + + \ No newline at end of file diff --git a/classes/variablelayout.dre b/classes/variablelayout.dre new file mode 100644 index 00000000..7ae3ce18 --- /dev/null +++ b/classes/variablelayout.dre @@ -0,0 +1,167 @@ + + + + + + + + + + + + + + # Subclasses to implement as needed. + + + + + # Subclasses to implement as needed. + + + + + @listenTo(view, 'visible', @update) + + + + + @stopListening(view, 'visible', @update) + + + + + view.setAttribute(attribute, value) + return value + + + + + return !view.visible + + + + + # Subclasses to implement as needed. + + + + if @canUpdate() + # Prevent inadvertent loops + @locked = true + + @doBeforeUpdate() + + attribute = @attribute + value = @value + svs = @subviews + len = svs.length + count = 0 + + if @reverse + i = len + while i + sv = svs[--i] + if @skipSubview(sv) then continue + value = @updateSubview(++count, sv, attribute, value) + else + i = 0 + while len > i + sv = svs[i++] + if @skipSubview(sv) then continue + value = @updateSubview(++count, sv, attribute, value) + + @doAfterUpdate() + + if @collapseparent then @updateParent(attribute, value) + + @locked = false + + diff --git a/classes/webpage.dre b/classes/webpage.dre new file mode 100755 index 00000000..30d2e0f3 --- /dev/null +++ b/classes/webpage.dre @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + if @contents + # use new_contents flag so iframe is only touched when necessary. + @new_contents = true + @updateFrame() + + + + return if (@width == 0 || @height == 0) + + @createFrame() + + + + @sprite.el.removeChild(@iframe) if @iframe + @iframe = document.createElement("IFRAME") + + # Static attributes + @iframe.seamless = 'seamless' + @iframe.style.position = 'absolute' + @iframe.style.top = 0 + @iframe.style.left = 0 + + # Dynamic attributes + @updateFrame() + + # Show the iframe + @sprite.el.appendChild(@iframe) + + + + return if (@width == 0 || @height == 0 || !@iframe) + + @iframe.src = @src unless @iframe.src == @src + + if @new_contents + # Don't set the contents until the iframe is loaded + contents = @contents + obj = $(@iframe) + obj.on 'load', -> + #console.log('onload event fired', contents) + obj.contents().find('body').html(contents) + delete @new_contents + + @iframe.style.width = @width unless @iframe.style.width == @width + @iframe.style.height = @height unless @iframe.style.height == @height + + overflow = if @scrolling then 'auto' else 'hidden' + scrolling = if @scrolling then 'auto' else 'no' + + @iframe.style.overflow = overflow unless @iframe.style.overflow == overflow + @iframe.scrolling = scrolling unless @iframe.scrolling == scrolling + + @sprite.el.appendChild(@iframe) + + + + if (@iframe) + @iframe.style.width = @width; + @iframe.style.height = @height; + + diff --git a/classes/wrappinglayout.dre b/classes/wrappinglayout.dre new file mode 100644 index 00000000..9ba7fe25 --- /dev/null +++ b/classes/wrappinglayout.dre @@ -0,0 +1,190 @@ + + + + + + + + + + + + + + + # An alias for value. + @setAttribute('value', inset); + + + + + + + + + + + + + + + + + + # An alias for attribute. + @setAttribute('attribute', axis); + + + + @measureAttrName ?= 'height' + @otherMeasureAttrName ?= 'width' + @otherAttribute ?= 'x' + + @stopMonitoringAllSubviews() + + if attribute == 'y' + @measureAttrName = 'height' + @otherMeasureAttrName = 'width' + @otherAttribute = 'x' + else + @measureAttrName = 'width' + @otherMeasureAttrName = 'height' + @otherAttribute = 'y' + + + @startMonitoringAllSubviews() + @update() + + + + @super(arguments) + @stopListening(@parent, 'inner' + @measureAttrName, @update) + + + + @super(arguments) + @listenTo(@parent, 'inner' + @measureAttrName, @update) + + + + @super(arguments) + @listenTo(view, @measureAttrName, @update) + @listenTo(view, @otherMeasureAttrName, @update) + + + + @super(arguments) + @stopListening(view, @measureAttrName, @update) + @stopListening(view, @otherMeasureAttrName, @update) + + + + # The number of lines layed out. + @lineCount = 1 + + # The maximum size achieved by any line. + @maxSize = 0 + + # Track the maximum size of a line. Used to determine how much to + # update linePos by when wrapping occurs. + @lineSize = 0 + + # The position for each subview in a line. Gets updated for each new + # line of subviews. + @linePos = @lineinset + + # The size of the parent view. Needed to determine when to wrap. The + # outset is already subtracted as a performance optimization. + @parentSizeLessOutset = @parent['inner' + @measureAttrName] - @outset + + + + size = view[@measureAttrName] + otherSize = view[@otherMeasureAttrName] + + if value + size > @parentSizeLessOutset || view.layouthint == 'break' + # Check for overflow + value = @value # Reset to inset. + @linePos += @lineSize + @linespacing + @lineSize = otherSize + + ++@lineCount + else if otherSize > @lineSize + # Update line size if this subview is larger + @lineSize = otherSize + + view.setAttribute(@otherAttribute, @linePos) + view.setAttribute(attribute, value) + + # Track max size achieved during layout. + @maxSize = Math.max(@maxSize, value + size + @outset) + + return value + size + @spacing + + + + parent = @parent + oman = @otherMeasureAttrName + parent.setAttribute(oman, @linePos + @lineSize + @lineoutset + parent[oman] - parent['inner' + oman]) + + diff --git a/coffee_classkit.map b/coffee_classkit.map new file mode 100644 index 00000000..4a5e8d22 --- /dev/null +++ b/coffee_classkit.map @@ -0,0 +1,10 @@ +{ + "version": 3, + "file": "coffee_classkit.js", + "sourceRoot": "", + "sources": [ + "coffee_classkit.coffee" + ], + "names": [], + "mappings": ";AAAA;AAAA,MAAA,kBAAA;IAAA;sBAAA;;AAAA,EAAA,QAAA,GAAiB;AAUf,QAAA,MAAA;;0BAAA;;AAAA,IAAA,QAAC,CAAA,cAAD,GAAmB,CAAC,WAAD,EAAc,kBAAd,CAAnB,CAAA;;AAAA,IACA,QAAC,CAAA,eAAD,GAAmB,CAAC,aAAD,CADnB,CAAA;;AAAA,IAiBA,QAAC,CAAA,gBAAD,GAAmB,SAAC,KAAD,GAAA;AACjB,UAAA,WAAA;AAAA,WAAA,aAAA,GAAA;AACE,QAAA,IAAG,KAAK,CAAC,cAAN,CAAqB,IAArB,CAAA,IAA8B,eAAY,IAAC,CAAA,cAAb,EAAA,IAAA,KAAjC;AACE,UAAA,MAAA,CAAA,KAAa,CAAA,IAAA,CAAb,CADF;SADF;AAAA,OAAA;AAGA,MAAA,IAAG,KAAK,CAAC,SAAT;AACE,QAAA,KAAK,CAAC,SAAN,GAAkB,KAAK,CAAC,SAAS,CAAC,WAAlC,CAAA;;eACe,CAAC,UAAW;SAF7B;OAHA;aAMA,KAPiB;IAAA,CAjBnB,CAAA;;AAAA,IA0BA,QAAC,CAAA,WAAD,GAAc,SAAC,MAAD,EAAS,KAAT,GAAA;AACZ,UAAA,8BAAA;AAAA;AAAA;WAAA,2CAAA;wBAAA;AAEE,QAAA,IAAY,eAAQ,IAAC,CAAA,eAAT,EAAA,IAAA,MAAZ;AAAA,mBAAA;SAAA;AAAA,sBACA,MAAM,CAAC,cAAP,CAAsB,MAAtB,EAA8B,IAA9B,EACE,MAAM,CAAC,wBAAP,CAAgC,KAAK,CAAA,SAArC,EAAyC,IAAzC,CADF,EADA,CAFF;AAAA;sBADY;IAAA,CA1Bd,CAAA;;AAAA,IAiCA,QAAC,CAAA,MAAD,GAAS,SAAC,MAAD,EAAS,KAAT,GAAA;AACP,MAAA,IAAG,KAAK,CAAC,YAAT;AACE,QAAA,KAAK,CAAC,YAAN,CAAmB,MAAnB,CAAA,CADF;OAAA,MAAA;AAGE,QAAA,IAAC,CAAA,YAAD,CAAc,KAAd,EAAqB,MAArB,CAAA,CAHF;OAAA;;QAIA,KAAK,CAAC,SAAU;OAJhB;aAKA,KANO;IAAA,CAjCT,CAAA;;AAAA,IAyCA,QAAC,CAAA,YAAD,GAAe,SAAC,KAAD,EAAQ,MAAR,GAAA;AACb,MAAA,IAAqD,KAAK,CAAC,SAA3D;AAAA,QAAA,IAAC,CAAA,YAAD,CAAc,KAAK,CAAC,SAAS,CAAC,WAA9B,EAA2C,MAA3C,CAAA,CAAA;OAAA;AAAA,MACA,IAAC,CAAA,WAAD,CAAa,MAAb,EAAqB,KAArB,CADA,CAAA;aAEA,KAHa;IAAA,CAzCf,CAAA;;AAAA,IA8CA,QAAC,CAAA,OAAD,GAAU,SAAC,KAAD,EAAQ,KAAR,GAAA;AACR,MAAA,IAAG,KAAK,CAAC,cAAT;AAEE,QAAA,KAAK,CAAC,cAAN,CAAqB,KAArB,CAAA,CAFF;OAAA,MAAA;AAIE,QAAA,OAAO,CAAC,GAAR,CAAY,wBAAZ,EAAsC,KAAtC,EAA6C,KAA7C,CAAA,CAAA;AAAA,QACA,IAAC,CAAA,cAAD,CAAgB,KAAhB,EAAuB,KAAvB,CADA,CAJF;OAAA;;QAMA,KAAK,CAAC,SAAU;OANhB;aAOA,KARQ;IAAA,CA9CV,CAAA;;AAAA,IAwDA,QAAC,CAAA,cAAD,GAAiB,SAAC,KAAD,EAAQ,KAAR,GAAA;AACf,MAAA,IAAsD,KAAK,CAAC,SAA5D;AAAA,QAAA,IAAC,CAAA,cAAD,CAAgB,KAAK,CAAC,SAAS,CAAC,WAAhC,EAA6C,KAA7C,CAAA,CAAA;OAAA;AAAA,MACA,IAAC,CAAA,WAAD,CAAa,KAAK,CAAA,SAAlB,EAAsB,KAAtB,CADA,CAAA;aAEA,KAHe;IAAA,CAxDjB,CAAA;;AAAA,IAyFA,QAAC,CAAA,OAAD,GAAU,SAAC,KAAD,GAAA;AACR,MAAA,IAAC,CAAA,gBAAD,CAAkB,KAAlB,EAAyB,eAAzB,EAA0C,eAA1C,CAAA,CAAA;AAAA,MACA,KAAK,CAAC,aAAN,GAAsB,EADtB,CAAA;AAAA,MAGA,KAAK,CAAC,cAAN,GAAuB,SAAC,IAAD,GAAA;AACrB,YAAA,0BAAA;AAAA,QAAA,IAAG,IAAI,CAAC,aAAR;AACE,UAAA,IAAI,CAAC,aAAa,CAAC,IAAnB,CAAwB,IAAxB,CAAA,CAAA;AACA,iBAAO,KAAP,CAFF;SAAA;AAGA,QAAA,IAAgB,QAAQ,CAAC,UAAT,CAAoB,IAApB,EAA0B,IAA1B,CAAhB;AAAA,iBAAO,KAAP,CAAA;SAHA;AAIA;AAAA,aAAA,2CAAA;yBAAA;AAAA,UAAA,QAAQ,CAAC,OAAT,CAAiB,IAAjB,EAAuB,GAAvB,CAAA,CAAA;AAAA,SAJA;AAAA,QAKA,QAAQ,CAAC,cAAT,CAAwB,IAAxB,EAA2B,IAA3B,CALA,CAAA;AAMA,QAAA,IAAuC,IAAC,CAAA,cAAD,CAAgB,cAAhB,CAAvC;AAAA,UAAA,QAAQ,CAAC,MAAT,CAAgB,IAAhB,EAAsB,IAAC,CAAA,YAAvB,CAAA,CAAA;SANA;2DAOc,CAAE,IAAhB,CAAqB,IAArB,EAA2B,QAA3B,WARqB;MAAA,CAHvB,CAAA;aAYA,KAbQ;IAAA,CAzFV,CAAA;;AAAA,IAwGA,QAAC,CAAA,UAAD,GAAa,SAAC,KAAD,EAAQ,KAAR,GAAA;AACX,aAAM,KAAK,CAAC,SAAZ,GAAA;AACE,QAAA,IAAe,KAAK,CAAC,SAAN,KAAmB,KAAlC;AAAA,iBAAO,IAAP,CAAA;SAAA;AAAA,QACA,KAAA,GAAQ,KAAK,CAAC,SADd,CADF;MAAA,CAAA;aAGA,MAJW;IAAA,CAxGb,CAAA;;AAAA,IA+GA,QAAC,CAAA,gBAAD,GAAmB,SAAA,GAAA;AACjB,UAAA,+BAAA;AAAA,MADkB,oBAAK,+DACvB,CAAA;AAAA,YACK,SAAC,IAAD,GAAA;AACD,YAAA,YAAA;AAAA,QAAA,YAAA,GAAgB,GAAA,GAAE,IAAlB,CAAA;eACA,MAAM,CAAC,cAAP,CAAsB,GAAtB,EAA2B,IAA3B,EACE;AAAA,UAAA,GAAA,EAAK,SAAA,GAAA;AAAG,YAAA,IAAmB,IAAC,CAAA,cAAD,CAAgB,YAAhB,CAAnB;qBAAA,IAAE,CAAA,YAAA,EAAF;aAAH;UAAA,CAAL;AAAA,UACA,GAAA,EAAK,SAAC,GAAD,GAAA;mBAAS,IAAE,CAAA,YAAA,CAAF,GAAkB,IAA3B;UAAA,CADL;SADF,EAFC;MAAA,CADL;AAAA,WAAA,4CAAA;yBAAA;AACE,YAAI,KAAJ,CADF;AAAA,OAAA;aAMA,KAPiB;IAAA,CA/GnB,CAAA;;AAAA,IAwHA,QAAC,CAAA,aAAD,GAAgB,SAAA,GAAA;AACd,UAAA,+BAAA;AAAA,MADe,oBAAK,+DACpB,CAAA;AAAA,YACK,SAAC,IAAD,EAAO,IAAP,GAAA;eACD,MAAM,CAAC,cAAP,CAAsB,GAAtB,EAA2B,IAA3B,EACE;AAAA,UAAA,GAAA,EAAK,SAAA,GAAA;mBAAG,KAAH;UAAA,CAAL;AAAA,UACA,GAAA,EAAK,SAAC,GAAD,GAAA;mBAAS,IAAA,GAAO,IAAhB;UAAA,CADL;SADF,EADC;MAAA,CADL;AAAA,WAAA,4CAAA;yBAAA;AACE,YAAI,MAAa,OAAjB,CADF;AAAA,OAAA;aAKA,KANc;IAAA,CAxHhB,CAAA;;AAAA,IAgIA,QAAC,CAAA,cAAD,GAAiB,SAAA,GAAA;AACf,UAAA,+BAAA;AAAA,MADgB,oBAAK,+DACrB,CAAA;AAAA,YACK,SAAC,IAAD,GAAA;AACD,YAAA,YAAA;AAAA,QAAA,YAAA,GAAgB,GAAA,GAAE,IAAlB,CAAA;eACA,MAAM,CAAC,cAAP,CAAsB,GAAG,CAAA,SAAzB,EAA6B,IAA7B,EACE;AAAA,UAAA,GAAA,EAAK,SAAA,GAAA;AAAG,YAAA,IAAG,IAAC,CAAA,cAAD,CAAgB,YAAhB,CAAH;qBAAsC,IAAE,CAAA,YAAA,EAAxC;aAAA,MAAA;qBAA2D,IAAC,CAAA,WAAY,CAAA,IAAA,EAAxE;aAAH;UAAA,CAAL;AAAA,UACA,GAAA,EAAK,SAAC,KAAD,GAAA;mBAAW,IAAE,CAAA,YAAA,CAAF,GAAkB,MAA7B;UAAA,CADL;SADF,EAFC;MAAA,CADL;AAAA,WAAA,4CAAA;yBAAA;AACE,YAAI,KAAJ,CADF;AAAA,OAAA;aAMA,KAPe;IAAA,CAhIjB,CAAA;;AAAA,IA0IA,QAAC,CAAA,WAAD,GAAc,SAAC,KAAD,EAAQ,EAAR,EAAY,IAAZ,GAAA;AACZ,MAAA,IAAO,6BAAP;AACE,cAAU,IAAA,KAAA,CAAO,iBAAA,GAAgB,KAAK,CAAC,IAAtB,GAA4B,GAA5B,GAA8B,IAArC,CAAV,CADF;OAAA;AAAA,MAEA,KAAK,CAAA,SAAG,CAAA,EAAA,CAAR,GAAc,KAAK,CAAA,SAAG,CAAA,IAAA,CAFtB,CAAA;aAGA,KAJY;IAAA,CA1Id,CAAA;;AAAA,IAgJA,QAAC,CAAA,gBAAD,GAAmB,SAAC,KAAD,EAAQ,MAAR,EAAgB,OAAhB,GAAA;AACjB,UAAA,2BAAA;AAAA,MAAA,OAAA,GAAU,OAAO,CAAC,MAAR,CAAe,CAAf,CAAiB,CAAC,WAAlB,CAAA,CAAA,GAAkC,OAAO,CAAC,MAAR,CAAe,CAAf,CAA5C,CAAA;AAAA,MACA,WAAA,GAAkB,EAAA,GAAE,MAAF,GAAU,MAAV,GAAe,OADjC,CAAA;AAAA,MAEA,cAAA,GAAkB,EAAA,GAAE,MAAF,GAAU,SAAV,GAAkB,OAFpC,CAAA;AAAA,MAGA,IAAC,CAAA,WAAD,CAAa,KAAb,EAAoB,cAApB,EAAoC,MAApC,CAHA,CAAA;aAIA,IAAC,CAAA,WAAD,CAAa,KAAb,EAAoB,MAApB,EAA4B,WAA5B,EALiB;IAAA,CAhJnB,CAAA;;AAAA,IAwJA,QAAC,CAAA,UAAD,GAAa,SAAA,GAAA;AACX,UAAA,0DAAA;AAAA,MADY,uBAAQ,gEACpB,CAAA;AAAA,MAAA,OAAA,GAAa,MAAA,CAAA,MAAc,CAAA,CAAA,CAAd,KAAoB,QAAvB,GACR,MAAM,CAAC,KAAP,CAAA,CADQ,GAGR,EAHF,CAAA;AAIA,MAAA,IAAiC,sBAAjC;AAAA,QAAA,MAAA,GAAS,EAAA,GAAE,OAAO,CAAC,MAAV,GAAkB,GAA3B,CAAA;OAJA;AAKA;WAAA,6CAAA;2BAAA;AAAA,sBAAA,MAAM,CAAC,OAAP,CAAe,EAAA,GAAE,kBAAA,SAAS,EAAT,CAAF,GAAgB,KAA/B,EAAA,CAAA;AAAA;sBANW;IAAA,CAxJb,CAAA;;AAAA,IAgKA,QAAC,CAAA,UAAD,GAAa,SAAA,GAAA;AACX,UAAA,6CAAA;AAAA,MADY,sBAAO,8DACnB,CAAA;AAAA;AAAA;WAAA,2CAAA;0BAAA;AAAA,sBAAA,IAAC,CAAA,OAAD,CAAS,KAAT,EAAgB,MAAhB,EAAA,CAAA;AAAA;sBADW;IAAA,CAhKb,CAAA;;AAAA,IAmKA,QAAC,CAAA,SAAD,GAAY,SAAA,GAAA;AACV,UAAA,gCAAA;AAAA;AAAA;WAAA,2CAAA;0BAAA;AAAA,sBAAA,IAAC,CAAA,MAAD,CAAQ,KAAR,EAAe,MAAf,EAAA,CAAA;AAAA;sBADU;IAAA,CAnKZ,CAAA;;AAAA,IAsKA,QAAC,CAAA,0BAAD,GAA6B,CAC3B,kBAD2B,EAE3B,QAF2B,EAG3B,cAH2B,EAI3B,SAJ2B,EAK3B,gBAL2B,EAM3B,SAN2B,EAO3B,kBAP2B,EAQ3B,eAR2B,EAS3B,gBAT2B,EAU3B,aAV2B,EAW3B,kBAX2B,EAY3B,YAZ2B,EAa3B,WAb2B,CAtK7B,CAAA;;AAAA,IAsLA,QAAC,CAAA,8BAAD,GAAiC,CAC/B,YAD+B,CAtLjC,CAAA;;AAAA,IA2LA,QAAC,CAAA,MAAD,GAAS,SAAC,KAAD,GAAA;AACP,MAAA,IAAC,CAAA,0BAA0B,CAAC,OAA5B,CAAoC,SAAC,MAAD,GAAA;eAClC,KAAM,CAAA,MAAA,CAAN,GAAgB,SAAA,GAAA;AACd,UAAA,QAAS,CAAA,MAAA,CAAT,iBAAiB,CAAA,IAAG,SAAA,aAAA,SAAA,CAAA,CAApB,CAAA,CAAA;iBACA,KAFc;QAAA,EADkB;MAAA,CAApC,CAAA,CAAA;aAIA,IAAC,CAAA,8BAA8B,CAAC,OAAhC,CAAwC,SAAC,MAAD,GAAA;eACtC,KAAM,CAAA,MAAA,CAAN,GAAgB,SAAA,GAAA;iBAAG,QAAS,CAAA,MAAA,CAAT,iBAAiB,CAAA,IAAG,SAAA,aAAA,SAAA,CAAA,CAApB,EAAH;QAAA,EADsB;MAAA,CAAxC,EALO;IAAA,CA3LT,CAAA;;AAAA,IAiNA,QAAC,CAAA,MAAD,GAAe;0BAAN;;oBAAA;;QAjNT,CAAA;;AAAA,IAkNA,QAAC,CAAA,MAAD,CAAQ,QAAC,CAAA,MAAT,CAlNA,CAAA;;oBAAA;;MAVF,CAAA;;AA+NA,EAAA,uDAAG,MAAM,CAAE,gBAAX;AACE,IAAA,MAAM,CAAC,OAAP,GAAiB,QAAjB,CADF;GAAA,MAEK,uDAAG,MAAM,CAAE,YAAX;AACH,IAAA,MAAA,CAAO,SAAA,GAAA;aAAG,SAAH;IAAA,CAAP,CAAA,CADG;GAAA,MAAA;AAGH,IAAA,IAAC,CAAA,QAAD,GAAY,QAAZ,CAHG;GAjOL;AAAA" +} \ No newline at end of file diff --git a/data.html b/data.html deleted file mode 100644 index 501ac835..00000000 --- a/data.html +++ /dev/null @@ -1,169 +0,0 @@ - - - rhes.es - - - - - - - - - - - if (this.bnd) this.bnd.destroy() - this.setAttribute('clip', false) - // console.log('onclick', this) - - - - - # console.log('oninit instance', this) - this.hello('a', 'b', 'c') - - - # console.log('hello instance', a,b,c, this) - - - - - - - - this.animate({width: 100, height: 100}) - - - - - - - - - - if (@subviews.length) - #console.log('destroy', @, @destroy) - @destroy() - else - lay = new lz.simplelayout(null, {parent: @, locked: true, inset: 15}) - for i of ([0..1000]) - #console.log('creating', i) - new lz.clickresize(null, {parent: @}) - lay.setAttribute('locked', false) - - - Hello - This text should wrap at my width - - Text - - - - if (this.width !== 100) - this.animate({width: 100, height: 100, opacity: .2}, 1000) - - - - - { "store": { - "book": [ - { "category": "reference", - "author": "Nigel Rees", - "title": "Sayings of the Century", - "price": 8.95 - }, - { "category": "fiction", - "author": "Evelyn Waugh", - "title": "Sword of Honour", - "price": 12.99 - }, - { "category": "fiction", - "author": "Herman Melville", - "title": "Moby Dick", - "isbn": "0-553-21311-3", - "price": 8.99 - }, - { "category": "fiction", - "author": "J. R. R. Tolkien", - "title": "The Lord of the Rings", - "isbn": "0-395-19395-8", - "price": 22.99 - } - ], - "bicycle": { - "color": "red", - "price": 19.95 - } - } - } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/design/Louis_Vuitton.eps b/design/Louis_Vuitton.eps deleted file mode 100755 index 11342ee7..00000000 Binary files a/design/Louis_Vuitton.eps and /dev/null differ diff --git a/design/WildRide mac/FontMesa WildRide License.txt b/design/WildRide mac/FontMesa WildRide License.txt deleted file mode 100644 index 39c319a1..00000000 --- a/design/WildRide mac/FontMesa WildRide License.txt +++ /dev/null @@ -1,70 +0,0 @@ - - ___ __ _ _ ____ __ __ ___ ___ __ __ __ __ __ -( _) / \( \( )(_ _)( \/ )( _)/ __) ( ) / _)/ \( \/ ) - ) _)( () )) ( )( ) ( ) _)\__ \ /__\ _( (_( () )) ( -(_) \__/(_)\_) (__) (_/\/\_)(___)(___/(_)(_)(_)\__)\__/(_/\/\_) - -Font Name - WildRide v1.0 (Freeware) -******************************************************* - - -Available for PC Truetype and Type1 -Uppercase & Lowercase: Yes -International Characters: No -Euro symbol: No -Kerning: Yes -Platform: Win95, Win98, WinME - -++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -FontMesa Freeware Terms of Use -++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -By downloading and installing this font you agree to the terms of -use as follows: - - -1) Grant of License - -This software is free for home or personal use only, you may use this software for commercial testing but if you decide to use this software for a commercial purpose then a fee is required, please contact support@fontmesa.com for a current price list. - -The download and installation of this software grants to you ("user") as licensee, the non-exclusive right to use and display a copy of the software on an unlimited number of computers, multiple copies may be made for backup. You may transfer the original software from one party to another provided all licensing materials are included and that the recipient agrees to the licensing terms and conditions. - -You may use the Software on or over a network or any other transfer device providing each concurrent user has his or her own copy of the software with its documentation. - - - - -2) Copyright - -All intellectual property rights in the Software are owned by FontMesa Type Foundry and are protected by United States copyright laws and international treaty provisions. FontMesa Type Foundry its suppliers and licensors retain all rights not expressly granted. You must treat the Software like any other copyrighted material, except that you may either make copies of the Software for backup or archival purposes. You may not rent or lease the Software, but you may transfer your rights under this agreement on a permanent basis provided you include a copy of this license agreement with the Software and the recipient agrees to the terms of this agreement. You may not reverse engineer, decompile or disassemble the Software, except to the extent applicable law expressly prohibits this restriction. - - - -3) Policy - -At the option of FontMesa Type Foundry there may be updated versions of the software, which will be offered to users through FontMesa.com and those individuals on our list. - - - -4) Limited Warranty (For Commercial Use Only) - -FONTMESA WARRANTS THAT THE DISTRIBUTED SOFTWARE IS FREE FROM DEFECTS FOR A PERIOD OF THIRTY DAYS FROM TIME OF RECEIPT. - -ANY AND ALL OTHER IMPLIED WARRANTIES WITH RESPECT TO THE SOFTWARE AND THE ACCOMPANYING WRITTEN MATERIALS, INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY AND - -FITNESS FOR A PARTICULAR PURPOSE, ARE LIMITED TO NINETY (90) DAYS. - -THIS LIMITED WARRANTY IS VOID IF FAILURE OF THE SOFTWARE HAS RESULTED FROM ACCIDENT, ABUSE, OR MISAPPLICATION. - -ANY REPLACEMENT SOFTWARE WILL BE WARRANTED FOR THE REMAINDER OF THE ORIGINAL WARRANTY PERIOD. - - - -5) Limitation of Liabilities - -IN NO EVENT WILL FONTMESA TYPE FOUNDRY, ITS SUPPLIERS AND - -LICENSORS BE LIABLE FOR ANY INDIRECT, SPECIAL, INCIDENTAL, ECONOMIC, COVER OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF OR INABILITY TO USE THE SOFTWARE, USER DOCUMENTATION OR RELATED TECHNICAL SUPPORT, INCLUDING WITHOUT LIMITATION, DAMAGES OR COSTS RELATING TO THE LOSS OF PROFITS, BUSINESS, GOODWILL, DATA OR COMPUTER PROGRAMS, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. IN NO EVENT WILL FONTMESA TYPE FOUNDRY, ITS SUPPLIERS AND LICENSORS' LIABILITY EXCEED THE AMOUNT PAID BY YOU FOR THE SOFTWARE. - -Some states or jurisdictions do not allow the exclusions of limitations of incidental, consequential or special damages, so the above exclusion may not apply to you. Also some states or jurisdictions do not allow the exclusions of implied warranties or - -limitations on how long and implied warranty may last, so the above limitations may not apply to you. To the extent permissible, any implied warranties are limited to ninety (90) days. This warranty gives you specific legal rights. You may have other rights, which vary from state to state or jurisdiction to jurisdiction. diff --git a/design/WildRide mac/FontMesa WildRide Readme.txt b/design/WildRide mac/FontMesa WildRide Readme.txt deleted file mode 100644 index 2c29c0ec..00000000 --- a/design/WildRide mac/FontMesa WildRide Readme.txt +++ /dev/null @@ -1,78 +0,0 @@ - ___ __ _ _ ____ __ __ ___ ___ __ __ __ __ __ -( _) / \( \( )(_ _)( \/ )( _)/ __) ( ) / _)/ \( \/ ) - ) _)( () )) ( )( ) ( ) _)\__ \ /__\ _( (_( () )) ( -(_) \__/(_)\_) (__) (_/\/\_)(___)(___/(_)(_)(_)\__)\__/(_/\/\_) - -Font Name - WildRide v1.0 (Freeware) -******************************************************* - - - Available for PC Truetype and Type1 - Uppercase & Lowercase: Yes - International Characters: No - Euro symbol: No - Kerning: Yes - Platform: Win95, Win98, WinME -******************************************************* - - - WildRide is a font that's based on the logo of Reese's® candy and cereal. - - WildRide comes with two fonts, the regular version that you can use alone - and the fill version WildRide Backfill used to create an oversized outline - behind the WildRide regular font. Read the section on how fill fonts work below. - - - HOW TO CONNECT DOUBLE LETTERS TOGETHER: - - In order to make the first letter e connect to the second e you will need to type - the hyphen character to create an extension for the letters e and c, you'll find - it on the key to the right of the number zero key also the minus key just above - the plus key on your number pad at the far right of your keyboard. So simply put - a hyphen or dash as some people call it in between the two lowercase e's and c's, - plus it will also connect e or c to many of the other lowercase letters. - - Note: Not all programs display the kerning or spacing of fonts the same, after - hours of hard work spacing a font I'll always find one or two programs that change - the spacing I've set or not display it at all. - - - HOW FILL FONTS WORK: - - - Fill fonts are created to fill in the hollow space within outline fonts - to prevent the background from showing through the font. - Fill fonts are usually slightly smaller than the fonts outline - but may also be oversized to create a border behind and around the font - to help separate it from a background image. Another application for fill - fonts would be to add decorations to the top layer of a font. - - Fill fonts can only be used within applications that allow multiple - layers within the work area so fill fonts wouldn't work in programs - such as word processors like MS Word or Wordpad. - - Fill fonts may not work with all applications in Windows, some - fonts have characters that extend outside it's em-square, although - the font may have been generated to allow it to display outside - of this boundary display problems may occur within some applications. - In some applications alignment problems may occur with the fill font in - relation to the font(s) layered above or below it, some fill fonts have - characters that are located to the right or left of that fonts basepoint, - some applications don't recognize the left side bearing of a font set by - its basepoint as part of that fonts spacing and will shift the fill fonts - character spacing to the left side of the characters outline and cause a - misalignment to happen. The only solution around this problem is to use - a different program for your design work, Adobe Photoshop6 , Adobe - Illustrator8, Adobe ImageStyler, and Paintshop Pro 7 all work well with - fill fonts. - - To use fill fonts simply type the text using the first font as the base - then select the next font style and add the same text on top the base font, - then repeat the same with any decoration fills adding different colors - and textures to each font. - - For questions and support with fill fonts go to www.fontmesa.com - - - - \ No newline at end of file diff --git "a/design/WildRide mac/Icon\r" "b/design/WildRide mac/Icon\r" deleted file mode 100644 index e69de29b..00000000 diff --git a/design/WildRide mac/Wild Ride Back Fill.suit b/design/WildRide mac/Wild Ride Back Fill.suit deleted file mode 100644 index e69de29b..00000000 diff --git a/design/WildRide mac/Wild Ride.suit b/design/WildRide mac/Wild Ride.suit deleted file mode 100644 index e69de29b..00000000 diff --git a/design/WildRide mac/WildRideBackFill.ttf b/design/WildRide mac/WildRideBackFill.ttf deleted file mode 100644 index 416658d2..00000000 Binary files a/design/WildRide mac/WildRideBackFill.ttf and /dev/null differ diff --git a/design/WildRide mac/absolutely.txt b/design/WildRide mac/absolutely.txt deleted file mode 100644 index ee25db95..00000000 --- a/design/WildRide mac/absolutely.txt +++ /dev/null @@ -1 +0,0 @@ -This Font was downloaded from: Absolutely Fonts http://www.absolutelyfonts.com Fonts for Macintosh and PC Please consult the README file that may be included with the font to make sure you comply with any specific license terms the author requests. Please note that certain author copyright restrictions from the designer may apply. If this font is shareware, we encourage you to register and pay the authors for their designs. To the best of our knowledge, all files are freeware or shareware, unless otherwise stated by the author. If you are the creator of this font and would like it removed from this archive, please contact us at http://www.absolutelyfonts.com/abfonts/contact.htm. \ No newline at end of file diff --git a/design/background-r.psd b/design/background-r.psd deleted file mode 100644 index a4456b81..00000000 Binary files a/design/background-r.psd and /dev/null differ diff --git a/design/rheses-color.psd b/design/rheses-color.psd deleted file mode 100644 index 7b08dffe..00000000 Binary files a/design/rheses-color.psd and /dev/null differ diff --git a/design/rheses-color.svg b/design/rheses-color.svg deleted file mode 100644 index 7f43a8f3..00000000 --- a/design/rheses-color.svg +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - diff --git a/design/sketch.ai b/design/sketch.ai deleted file mode 100644 index 10b300e9..00000000 --- a/design/sketch.ai +++ /dev/null @@ -1,1070 +0,0 @@ -%PDF-1.5 %âãÏÓ -1 0 obj <>/OCGs[5 0 R 21 0 R 36 0 R]>>/Pages 3 0 R/Type/Catalog>> endobj 2 0 obj <>stream - - - - - application/pdf - - - sketch - - - - - Adobe Illustrator CS5 - 2013-03-24T11:25:20-07:00 - 2013-04-02T22:42:46-07:00 - 2013-04-02T22:42:46-07:00 - - - - 256 - 80 - JPEG - /9j/4AAQSkZJRgABAgEASABIAAD/7QAsUGhvdG9zaG9wIDMuMAA4QklNA+0AAAAAABAASAAAAAEA AQBIAAAAAQAB/+4ADkFkb2JlAGTAAAAAAf/bAIQABgQEBAUEBgUFBgkGBQYJCwgGBggLDAoKCwoK DBAMDAwMDAwQDA4PEA8ODBMTFBQTExwbGxscHx8fHx8fHx8fHwEHBwcNDA0YEBAYGhURFRofHx8f Hx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8f/8AAEQgAUAEAAwER AAIRAQMRAf/EAaIAAAAHAQEBAQEAAAAAAAAAAAQFAwIGAQAHCAkKCwEAAgIDAQEBAQEAAAAAAAAA AQACAwQFBgcICQoLEAACAQMDAgQCBgcDBAIGAnMBAgMRBAAFIRIxQVEGE2EicYEUMpGhBxWxQiPB UtHhMxZi8CRygvElQzRTkqKyY3PCNUQnk6OzNhdUZHTD0uIIJoMJChgZhJRFRqS0VtNVKBry4/PE 1OT0ZXWFlaW1xdXl9WZ2hpamtsbW5vY3R1dnd4eXp7fH1+f3OEhYaHiImKi4yNjo+Ck5SVlpeYmZ qbnJ2en5KjpKWmp6ipqqusra6voRAAICAQIDBQUEBQYECAMDbQEAAhEDBCESMUEFURNhIgZxgZEy obHwFMHR4SNCFVJicvEzJDRDghaSUyWiY7LCB3PSNeJEgxdUkwgJChgZJjZFGidkdFU38qOzwygp 0+PzhJSktMTU5PRldYWVpbXF1eX1RlZmdoaWprbG1ub2R1dnd4eXp7fH1+f3OEhYaHiImKi4yNjo +DlJWWl5iZmpucnZ6fkqOkpaanqKmqq6ytrq+v/aAAwDAQACEQMRAD8A9U4ql6+YvL76n+iU1O0b VBX/AEATxm4+Hc/uuXPanhjaaTDFDsVdirsVWyyxQxPNM6xxRqXkkchVVVFSzE7AAYqwIfnf5KbW LGwjF3JbajcmztNXEIWxeZSqsqyuyswVnUFgpG/XBxMuAs00nV9N1fT4tR02dbmynBMM6V4sFYqS KgdwcLEhF4q7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq+VPzrNkn5leY7rU4jPHEbOOxiLMtX+pxM4F CNtwTmJlviqO3e5WKuHd5dd6nd3Pws3CBfsW8fwxqPAKMlGACTK0Lk0IrS7sWeoW9yRVYnBYe3Q/ hkMkeKJCYmi9DlsrfUJ7e7ZxNbxLygj6oXP7Zod6DpmtEjEEdXIq91XTraa2tEgldHZNgUUoKfKp wTkCbCYigwnzdqMV5qQSFg0duvDkKEFiamhGZ2ngYx36tGQ2UjzIYK1td3VtIJLeVonHdTT7/HBK IPNQaTm3msrywuJoLdYNZtwJUeIsoZVYFmVQeIIHUUyggxIBNxLMEEeb6J/Oz8xtZspl8oeVOZ1y 4ge51C5hpztrVELtxYkBXKKWLE/CvuQRmSLiwj1LAG0fWda0Xy1qNhBFpNncPJpnlTTVdnupZ7oG O71C7lCp+whk5DuF2p9qLO2S+Wvza1yz0uw0bRtLgntdNAUTxW1y0ctmLv6nAKIziCWRUeRpJXK7 dycILExTG+/OfzbFc31hDp1udThub6MW6W11c/V49PBZhN6DkymbnEFdeCLyJbYbniXgDKvI3mnz VqXmXU9I1YwIljFBdCNoytwUvVMq0dGEfGFqw8SnLapYmuEFiQGe4WLwj8+/Neravqw8g6HKIo4b d77XrgsVRY44zNwkYA0RI15t4kqMhI9GyA6vPtMsYvNGj6LarfC88zXdNM0fSIIwLXTLMOUluZ+H L42Cs3xfFvz3+E4GfJPtD/MP8w7fS4/LmkXQgttPkmjsr42EhlaO3lWKO2aKKG4AZVBdxTlRhVvF soMQmT/mT+ak1qsEN5LFcX8lzLb3z2J9Jlgl9OGKzWO3mcq4+JvVQmg+0N8NlHCHoX5Jya7LpGrN qV3LPbQ6lcQaekkQjjMQf1DNG7Ksz+o8hrz7j54YsZvRskwdirTuiIzuwVFBZmY0AA3JJOKsN1D8 2fKVndNbh5bgoaNJClV+zXYsVrv8OY0tXAFuGCRZFonmHSNbtjcabcCZF2dejqTv8SncZdDIJCw1 ygY81bVdW0/SrKS9v51gt4+rMdyaVCqOrMabAYZzERZRGJJoPPrn88NPWcrbaXLLBX+8klWNqbVP EK/v+1/ZhnXDoHJGmPeynyp570TzIpS2YwXqAGS0loHp3KUPxgU7fTTMjFnjPlzacmIxTDzB5i0r QbE3moS8EJ4xxjd3bwVe+TyZBAWWMIGRoPP5fzyjExEOkFoRWhefix602CMB275hnXeTkflvNmfl Tzto3mSNvqjGK6jHKW0koJAtachTqOm48cycWeM+TTkxGPN8w/8AOQly8v5q6tCT8Futsqjt8VrE xP44mNEnvbIHYPN8WSdaN5eOo6dd3XMq8VVgUdC6gMa/QaZRlzcMgGcYWEly9gjtP1vU9PHG2mKx k1MbAMtfkcrnijLmkSIV7zzPrF3EYpJuEbfaWMBa/MjfIxwRCTMlKsuYp1beXjNoE2p8yJFJaNOx RNnr79fuyiWap8LMQ2tJcvYK1ldSWl3FcxmjRMGHuO4+kZGUbFKDT6+ufyq0FLnzfrGtanIT5iRk uLwFbdrSzAHKJZGLrSiAFmFOIAp43U4/FyY75T1f8pfKs2lwwWV48d6lwul+ZtSjjl5xW6H1fSZm E0URRqDjCqNXvviKZEEs58reTvy5Gk6fe6Loto1mU9fTrma3LTBJiX5K9ypmUNyqK9vbCAGJJTP/ AAZ5P+rwW36C0/6vau0lrD9Vg4ROxBZo14UViQKkY0iyjbLSNJsJbiaxsoLSW8f1LuSCJI2lff4p CoBdtzucKLReKsZtvy58qQ6xrerSWpurvzAnpagbg+ovolQrRIKfCjcQT/YMFJ4iwyLz35e0e/uv LH5Z+XodSurZXm1CaBktrOL0/tGW4IPMj7I39gcpllr6Q2CF81byd+fXl7VdCW+1a3bTbt70WEdr CGuPVlkXmpj4KG3rQ1HXvvj41c1OLuep5e1OxV2KuxVhX5t6lc2XlQrAxQ3UyQuwKg8aFiN99+Pb MXVyIg36cXJ4Vmqc5l35Walc2nm+1hjciK85RTJUUYcSVJ5dwRtTf9RydLIiY82nOLinP51apcSa zaaZyItoIRNx7F5GIr0HQL4n9eWa2R4gGGmjtaR2flCe30FNWuljE10Oduk7BY4bfkFN1Kv2mqzK EUA1rXfplQw1Gz+PNsOTekFca3bWnmaDUNEX0o7X0lV1URiZo1CyPwAIUSEH4aZEzAlcUiNxopp+ aOo3epecZbQBmW2EcFtCAakuobYUBqzPk9VIynTHAAIs08vfl/Y+XtJS/wBSFs2oEq93c3VGhtYu rCNW+FpO1T3+5srHpxAWef3NM8pkaDDdR8zacv5iQaroMYhtY5YkPprwEwJ4ynjxNOYJHSvfrmNL KPEuLcIHgovMfz+/8m3r3/Rp/wBQUObGXNx4cmFaRJpkd4rajG0kFOi9j2LDaoynIJEenm2Rq92d afLYzW6vpJjSyWRvrS+my8vg3A+zv0zAmCD6ubeK6MX1678tTQBdPgIuK7SIPTUDvUHr9305l4o5 AfUdmqRj0SDMhg7FUz0KbRorlm1OJpEoPTI3UHvyUdcqyiRHpZRI6s0hksnsvXtjH+hVilMsQjIr Q7kA022PbMEg3R+pu2ryYj5gudAm4fo2EpID8cgHBCKdOJ7/AHZmYYzH1FqmR0SbL2D6I/OvzBqX mjXL/wAp6fci00Hy7atf6/dHkVeRVDRwkKRy+JlVVru5/wAnJyaoCt0n0DQk86WGjzSXdzqmvX7L aalNbxsLLR9KjDM0EXpxiGOWWFeHCv7R233eak0reWdV/MbV7eyGmS6lFpKyPNYEG/ZY3+vEGF5U imWWOC2i4CKaRV+Lq1KYi1ID0Hy7qfmrTvLvmLUZY9U1DWbm6vV0OK6gu+EyRqZLeT6s6f6Ip5cO LBFbiKbnCGJpi+mwfmXJY2P1u51eY32pWP1m2j/SUUjRqrC9Z55YbU2icpUKqKR/AQC3UjdOz3WJ OEaJyL8QF5tuxoKVNKbnJtbxj/nIX8ybvSraLyjokjDVNSSt5JFX1Ehc8VjTjvzlP4fPKckunTq2 449XnP5e2HnfVIr/APLnRo4tBlbnN5jvZg5uHVSE9Jio+FRy4hBStTU7nKhZPffw5d7ZKhupXuny 6Bq15feWJIW0nyOfT/Sd0OS3GpS0V3RBVWcsOKr0VVBPvAjf4/j9aQdt2Zf8rp/MbU9tKtEV9MW3 hvY47SW4N1dsVW4QMoKQolWPWv37A6iRArr+B80eEGV+UvzI8zXd75s1HXZba10ny1JMl1pKwsbl EjVjGyy8tyxSh5LTwplsckrthKAY1YfnB+Zt76mrwackmnTWt7cx2P1WYJbx28fOCR7lgokL9aKa EeHaBzSs1+P7Gfhinp35W6z5g1zynaazrF3b3Zv0E0DW8RhKCpDxuOTKSjCgIpmRiMjzaZgA7J35 k0K213R59NuCVWUAo4/Zdd1P39clkxicaRCXCbeKah+V/nC0umiis/rcYNEniZeLDjyrQkEdKfPY V2rq5aWYPJzhniWe/lx+XVzodw2qaoy/XivCCBCCIww+Is3dj026e+Zem05ibPNx82bi2CG/N7yn dXiwa7ZRGZ7VRHdwqKkx8qq9BuaE0b29hg1eIn1BOnyVsXnVz5rvLufUZryCG4fUI1hHPmBDHGwd EiCMtFUquxqNt++YRyk3fVyRjAqkT5E8p3ev61APTP6OgcPeTkfBxUglAT1ZulPeuSwYjOXkjLkE R5s08/aRcaJ5ts/N0FobqyVka6iWi8ZI1oCaA0BVa1p1HyzJ1EDGYnWzRilxR4Uin/NOS703Ura+ 02O6mvpOcbSOWijRaemnpkfEIyteoqdzlR1Vggjm2DBRFFLvy98qXet63BMYyNPtJFkuZiBxPE8g gr1LUyGnxGUvIMs2ThHmwb8+dKvpvzS165gj9WNfqvMIys60s4ftIDyH3ZsJ5AJUWjHE8LzLClM9 M124sLK6tYxUXA+Bq/YY7E/8DlU8QkQe5lGVBLMtYqlvBLcTpBEvKSRgqqPE4CQBZUBFavp4srrh Gwlt3AaGZTVWHRtx4MDkMc+IeaZCkDliEzg125h0abTFHwyttJXdVP2lp7/1yo4gZcTIS2pLMtYo u10q+uYWnjjpbp9qZ2VEH+yYgZCWQA11SIkvuK28neV7Z9VaPTYW/TcnrassoMyzv/lrIXXj/kgU 9syKcWymVjp9hp9qlpYW0Vpax7R28CLHGvyRAAMKFfFXYq7FXYq8J8lfl/5l1r83dZ82+ZbGS0t7 K4kfTluUbjJICY7cpUrzSJFDVB60zGiDL8fj8BvlIAbNeU/yK8/Wmtajdan5jWztNTdxqR09nNxc ozFiObqvp8ieta4jET+Px9vyU5Azu9/JnylP5MPlO2a4tLA3QvTMjh5jMNiWZw1artlnhbMPEN21 D+SXkOO5M/pXbhyr3EJu5hHNKop6siqy8nJ+InxyH5aPL8frT40l6/kx5IBBZLuRmmee6aS6lY3J dOHGck1dQpIGP5aK+KVO3/JHyNb20kEYvgrIYom+uT1hRq8liowChgaEU6YnTRXxSzDQ9E0zQ9Jt tJ0yH0LG0XhBECWoCSx3Ykkkkk5dGIAprJtHZJDsVdirsVSe68n+Vrudp7jS7Z5m3Z/TUEkkkk0p Unl1ys4YHmGYySHVNLa1trWFYbaFIIV+zHGoRR8gtBkwAOTEm17ojoyOoZGFGVhUEHsQcKEgl8ge TZZ/XbSYOda0UMq9v2FIXt4fryk6eHc2eLLvTu1tLW0gWC1iSCFAAkcahVAAp0GWgAcmBNvlT86b 240f839ZvfTEi3MVsI15U2FtCDUD3TMbNETsdzk4jQt53rv1eW4ivbdPSjvI/VMf8rhmRwPpWuDF YFHoyl3pblrFXs7O4vJhDAoaRugJC/rIyMpCIsqBadW7aXpSXNsS8+qyI8IlRQEjdgVoCxU9eppl B4p0f4WwUPe6tlZ2TaPrCSCZZDJFLHxYRh1Wnf51FMd5HiiuwFFLNR0i5seDuVeCQBopVNOSnoeJ ow+7LYZBJgY0gcsQrWUAuL23gJoJpEjJ8OTAZGRoEqBunWo6t+l/R0mytxDCsii3q1KgAqOQp71y iGPg9RLYZXsH1R5s/MDWfKms2V1rdnDB5RvLp7FrkcmuYXChorhyjOhjkIf4OPJQK1qeOZxLhiNr fL/5ow6xeLfXE1joXluUSfo9tSnWO+vlQlTNFGzxiOEHueRNO3UNqYsztdb0W7eFLS/trh7lHkt1 imjcyJE3CRkCk8gj/CxHQ7YWNIWPzh5RlWdo9bsHW1VnumW6hIiVGCs0lG+EKzAEnucFpooa+8+e WreGwktrpNT/AElex6daLYPFOWmkAbchwoVEPNzXYfMY2tJg3mLy+lmL1tTtFszI0IuTPGIjKhIZ OfLjyBU1Fa7YbWlK182+VbtgtrrNjcMys6iK5hclUXm7Dix2VdyewxtaKpN5j8vQrbNNqlpGt6I2 sy88SiYTf3Ziq3x8/wBnj17Y2tNXvmTRLC5mt766W0NvClxPPcBordI5HKJyuHCwhmZTRefL2xta bi8yeXZrSe8i1S0ks7ZVe5uUniaONZFDoXcNxUMrBhXqDja0onzj5QCTyHXNPCWzrFcubqGkcjEh Uc8vhY8TQHBa0UTDr+hTz3NvDqNrLcWS87yFJo2eFOvKVQ1UHu2FaUF81eXZHiS2vo7xprj6mPqd boLPwLlZDAJPToi1JegHc42tLrDzR5Z1EyjT9XsrwwJ6s31e4il4Rg05twY8V26nG1pQ0Tzbper+ Wv8AEkKTQ6WUmmV5Y/3jQwMwMixxmRiGCFlH2iO2C1IRKeY9BaW2ga/giurwKba0ncQ3Dc15qvoS cJQ3E14la+2G1pE32padp8aS391DaRSOsUbzyLGrSN9lAXIBY02GKENaeY/L15HJLaapaXEcMQnl eKeJ1SE1pIxVjRDxPxHbY42mlz+YNAS4tbZ9StVuL5PVsoTPGHmjpy5xKWq60FaritKNt5t8q3Ut vFbazYzy3bMlrHHcwu0rJ9tYwrEsV7gdMbWilPl/zbfat511/R40hl0rR1hT61EH5LdOW5wu7Nxc hVBPFRxPwmvXBaSNmV4WL5W/N/TbaT82/MF1qihdOCWvB3YrVhaQfYoQT0PTMPPMg1H6nLwjbfk8 w1m+hvLzlbp6dtEoit06URf6kk5LHAxG/NZGygcsQ7FU+0nU47tHsL5I5JZY2jtLuRVLo5FFBYit K9D2zHyQr1D4hnGV7Ftbo6Tp3CaBW1Wd2dHlUM8SUCg1YVqSpoMeHjlsfSt0PNI5ppZpGklcySNu zsak/fl4AHJgswqvhmeGaOaM0eNg6H3U1GAixShkd/babqdiLvSYlW/Lh7iBWIcbGvFSafa/lGY0 JSialybCARYe9/mzp2p+cvzG8veRVEkeiRxfpXVJVqAyc2Tr4hUKKf5nzOO5cWOwtX1P8nPMN7c6 vHFe2lna3V2t5YXkZla5SO0h4afacCirFFbyfESrsWFNhjwo4kl1fyh5x8v6FdWs/wBUF1qdhaeX tHGnyXU8ltbxK8t3IY47b1pBMy8n9ONj8XgK4KSCCjNL/Li+1hdJ816Jcabc2zSRSQ6YzTpZJb2U LQ2QDmESyPDMTJIHjTmdvhphpTLonOjflZYeXtVtdb16W1u9N0Gxdo7poyZmvJp2ubi6kXgQixlv 3XFjx+1sd8aQZWx2L8vLjzdeajr2jxRRaGNWgk0nTLp5IbS6tYI0jupUaNJGRbp4YyrBOinxwVae KkVd/kv50juNUubK/sbi71+3ePUp5nmt/Re6uPUu0tkSKb4JIlWLkxBpXbfDwrxhlmm+X9L8tfpj zH5xNkDc3EKW0gRpbe0s7YKlnEpeMFCrbk0pypvXCxu+TFLbyh+ZWuQT+ZtPmtNPvtellu2jvlC3 FukY9HT1X1La8oI4eTEKEarfawUWVjki/wDlUev2b6X+hzZWk2naQkRB5NZy6nBKzQyzJTnJw9eS QMyH46Hj2xpHEoQflL56lvluL2405ZEvbGe1vIpm9S3trFZEECww2VpA9VmcfZTrjSeII21/KfXT 5cs9EuI7CFuUVtq+pQ3NxJPdWJnNzdbPCirJPJwrudurkUGNI4lL8wtCki8xSLpX1KPU7mx+o+XN ItKLcCa+/c3WoTxqi8Eit04K+4oO3TErEodvyW8xT2F3HI+nWskum2uhWltE8s0MNlHMs9zMXeFC 87yKXT4BQn7XfHhTxs28zeRje+WtP8q6MkFhoIniGpxKTGzWcbeo8USojAvK4+JmI79a4SGIPVit t+XXmi18yeXtQuba3vTJqt1qnmGaCYJHCwj9KwRPUVHeO3jJCqq9fAb4KTxBCeZfy18weYvMk2ta hpMc7yXFxLDHPJCyx21hCyafbH42/wB6p29WWmwXZvDEhIlSV+RPKtrqmpeWdKjsRbR+X7SY+bzG weKW6M6vFZTEKFZhLAJmTcAfDv1IAUlmE/5c6tLq2vXN7aWGrx6nefW7a4ubq5gmWNYGgjtSscLh VRZX4tyYb14V6GkcSXaH5B8weVmttbv59N/3DaJJZTXHqcRctEVltRL60cUcYgdAolL1IAqFpjSm Vsr/ACq8sSeX/JlpDcusupXxbUNSnVlkD3Fz8bEOlVai8VquxpUYQESNll+Fi+O/z+/8m3r3/Rp/ 1BQ5XLm3w5PPcizZF5f0G2v9KvLiX+9BMcBrTiyqGr9NRmNmzGMgGyELDHcyWtwJBqNiOhxVXvbu a8uXuJjWR6VPyAH8MjGIiKCk2oZJWRWeg20vlee+b/en4pI2r0WMkFae9DmNLKRkA6Ngj6bY7mS1 uxV9p235jwQ6nNaa5ZtpMLQm6sZpjvJCCQOSU5K7cSQv0desBqaNSFNZw7bbp15c1281qNr0WLWm mOP9Ekmb99MK/b9MCiL4fEa5ZjyGW9UGE4iO17phqOl6ZqdsbXUrSG9tWILQXMaSxkjoSrhhlrBU tLO0sraO1s4I7a1hUJDBCqxxoo6BVUAAfLFVs1/ZQ3UFpJMq3Vzy9CGvxtwBZiB4ADrgMgDSaKvh Q7FXYqpQ3lpPLNFDMkktuwSdFYFkYioDAdNsAIKSFXCh2KuxVRa8tEuo7RpkW6lVnjgLAOyrTkQv WgrgsXSaXz3EFvC888ixQxgtJI5CqoHUknEmkAKL6np6WKX8lwkVnIEZJ5DwUiSnDdqdajBxCr6J 4TdInJIdirsVdirsVSTyt5jfXYLyY231dba5e2SjiQOECknkvw/tU2JHgTlWLJx372c4cKd5awfH f5/f+Tb17/o0/wCoKHK5c2+HJhWkX8NjeCea3W5UCnFux/mWtRXKckDIUDTZE0Wc6fqUeqwLeQNJ BHbSMHi+H46JWjddvizAnDgNHe28G92MeYPMlrqUIiitApBB9eSnMey0/rmXhwGJu2qc7SDMhg7F Uz0LVbfTrkyzWyzhhQN+2nutdsqy4zIbFlGVM0h1KK4shrCNIkEUcpa3qtG4nqff4dt8wTCjwt4l YtiPmDXrfUyoitREVNfWb+8I8Nu335mYcRh1aZytJsvYPrfzFa/4t/MaLSeANho0fK6b+cmjshbw Ziqfecx8g8TLXSKwPBC+9LJvKfn26ha7ktp4ryPkJgLhKy+o4URwRhikccUVePv09qziyHfqyGSA 2RWr6h5g0zS5or8Pp2o6xfKixfWIxw0+3jA4RzM3BCOQHIsC1TkpylEb7En7ERAJ23AH2rJvJ3m5 AkNvBJLa3kckqxx3X7qCeRysQkkLc5Ehioy06sTgOGfz81GSKa6b5Ys7CS/1PzJK1lDDGlhZTtMU Zo44uMsoIZqGeh269e+WRxAWZbdPx72JmTQikkOh+cNQsdNvhHdajYv6yW9s8whYWwFLb1CWQ0cm rsOqgb5UITIB3I/FM+KIJHJXtPLPniwkaye0murZprb6zdR3CANBH+8ljjDMG/eSH4mPgBkhiyDa u5BnE7p7Yxw+XdPfzH5lupV1q4M86WTTsEDN0hjiVuDbU8afRlsRwDikfUwPqPDHkx660H8wLqxW L6pJL9bIvbiYS+mfWuOPLYzIAYkVVVShpvlJx5COXPf8btglAFM7zy75utWvbeyFzd2EE8a6fDJM SVFxGHnnDGSEyGFhRKsKMS2TOOYsDcdGAnE80ss/K/n5AHWzmhmQ3cyobsCJJXVRCYqSsxYMp+2S D3JrkBiyd3f1ZmcE5t/K+u3TWdk639nZXMouNWnnukkkJhiCqEKMzL6rliwqabfIWDFI0NwOu7Az A32SfVY9V/St9o+m+u15IRY2dotx6k0VjERPPMzs5CGZuPHkRtt4ZXMGzEc+XwZxqrKLtPJnmO7S OxvbeWDTL6+WeeF7j1fQtbdTRGYMavNzp9FdskMMjseRP2MTkiNxzpkvmux1qSbTrPS7R203T0N0 6o4USywD/RrfdgacwC1e3uMvyxlsANh+A14yNyeZSvytoXmPSddWe7F3dK2nNLcMZQ0b3cj8zGAW oOIHEbdd+mV4oSjLe+X2spyiRt3pFf8Alfzq1ve6lP8AWlungaeaOOfiplnlFY1VW+xDEOR/yttx lUsU6J3bBOPJN/L9l+lvMN3FaXtzd+XIBFNdiWXmk97x/u/UUsGQVBdVJWoHUUyzHHikaPp/Swma G/ND3Og+crvS72Wa2v11y5DQvIl3CIOLTB1CRl9o1VAtajqdjgOOZB58XvSJxB6Ur3GmeY7CLzBe Q2dyJJYYLTSozO0zBnAil9JRI9UHLmpcVH34TGQ4jXuQJRNBm3lvRotF0Oz02On7iMCRh+1Ifidv pYnMrHDhiA0TlxG0yybF8jf85CWY/wCVlateRHkv+jR3A/lk+qRFa+zJTMcy9RBcmA9ILzLJJRdn qt5aW1xbwtSO5XjJ4j3HhttkJYwSCeiRIhCZNDJ9J8ly3EKz3shhVwCsSgF6HxJ2GYuTU0aDZHHf NE3nkSMRFrO4b1ANkloQf9kKU+7IR1feGRxdzE54JreZ4ZlKSxkq6nsRmYCCLDSQrx6peR6dLp6t /o8rBmHfbqAfA7VyJxgy4uqeI1SEyaEZpdmLm6HqHjbRfvLmTssa9fpPQZDJKh5piLfecGn2NvcT 3MECRz3RDXEqqAzlRQcj3oMyBEA24pJV8KEp17yto2uBPr8TF4wUWSN2jbg1CykqRyU06HK8mKMu bOMzHkmVvBFb28VvCvGKFFjjXrRVFAN/YZMCtmBK6SKOVCkiB0PVWAINN+hw0q7FXYqpy29vMUMs SSGM8o+ahuLeIr0OAi1tUwq7FXYq7FViwQrK0yxqJXADyADkQOgJ64KW1+FXYq7FXYqtjiiiQJEi og6KoAG+/QYgKuxVRubO1uhGtzEswikWWMOAeMiGqsK9xgIB5pBpWwodirwH8yfy28+6h591vU9M 0NdV0rVRagE3VvDT0bdImBWV1avJeuY2XEZmxtTkY8giGC3n/OPf5k0EtnpJ4tubaW5tPUU+HISl GHvXDES5EJM49Cg/+VA/m3/1Yf8Ap7sv+q2WcJY8YRek/kH+aCajbvd6Hxt0cNITdWbCi7gECVq1 PtkMkZcJrmyjON7sxv8A8sfzHjtXa00b1rg7Rqbi1ABPc1lGwzBhpJk7jZuOePRC2/5QfmI11BPL pjIIFYMzXFsZJWcUJbjKVCjqBX7snLTzoimIzR70n81fkd+ZN7ex3FlovqVTjKRc2i7g7falXtl2 nxyiKLHJkiTskv8AyoH82/8Aqw/9Pdl/1WzI4S18YVrT/nHr805ZAJ9KW3j7s1zasfoCynIyBHIW kTj3po35LfmSLGTS7Xy2YYZivqXsl5ZljxYHkyLK223QHKfBlfEfkz8WNU//2Q== - - - - - - proof:pdf - uuid:65E6390686CF11DBA6E2D887CEACB407 - xmp.did:04801174072068118083E64280F2A589 - uuid:38806dfe-21f4-654e-a574-ecbbd52fe1dd - - xmp.iid:03801174072068118083E64280F2A589 - xmp.did:03801174072068118083E64280F2A589 - uuid:65E6390686CF11DBA6E2D887CEACB407 - proof:pdf - - - - - saved - xmp.iid:01801174072068118083E64280F2A589 - 2013-03-20T23:26:39-07:00 - Adobe Illustrator CS5 - / - - - saved - xmp.iid:02801174072068118083E64280F2A589 - 2013-03-20T23:50:55-07:00 - Adobe Illustrator CS5 - / - - - saved - xmp.iid:03801174072068118083E64280F2A589 - 2013-03-20T23:55:02-07:00 - Adobe Illustrator CS5 - / - - - saved - xmp.iid:04801174072068118083E64280F2A589 - 2013-03-24T11:25:18-07:00 - Adobe Illustrator CS5 - / - - - - - - Web - Document - - - 1 - False - False - - 11.111111 - 41.666667 - Inches - - - - - WildRide - Wild Ride - Regular - TrueType - Macromedia Fontographer 4.1.5 12/7/01 - False - Wild Ride.suit - - - - - - - Default Swatch Group - 0 - - - - White - RGB - PROCESS - 255 - 255 - 255 - - - Black - RGB - PROCESS - 0 - 0 - 0 - - - RGB Red - RGB - PROCESS - 255 - 0 - 0 - - - RGB Yellow - RGB - PROCESS - 255 - 255 - 0 - - - RGB Green - RGB - PROCESS - 0 - 255 - 0 - - - RGB Cyan - RGB - PROCESS - 0 - 255 - 255 - - - RGB Blue - RGB - PROCESS - 0 - 0 - 255 - - - RGB Magenta - RGB - PROCESS - 255 - 0 - 255 - - - R=193 G=39 B=45 - RGB - PROCESS - 193 - 39 - 45 - - - R=237 G=28 B=36 - RGB - PROCESS - 237 - 28 - 36 - - - R=241 G=90 B=36 - RGB - PROCESS - 241 - 90 - 36 - - - R=247 G=147 B=30 - RGB - PROCESS - 247 - 147 - 30 - - - R=251 G=176 B=59 - RGB - PROCESS - 251 - 176 - 59 - - - R=252 G=238 B=33 - RGB - PROCESS - 252 - 238 - 33 - - - R=217 G=224 B=33 - RGB - PROCESS - 217 - 224 - 33 - - - R=140 G=198 B=63 - RGB - PROCESS - 140 - 198 - 63 - - - R=57 G=181 B=74 - RGB - PROCESS - 57 - 181 - 74 - - - R=0 G=146 B=69 - RGB - PROCESS - 0 - 146 - 69 - - - R=0 G=104 B=55 - RGB - PROCESS - 0 - 104 - 55 - - - R=34 G=181 B=115 - RGB - PROCESS - 34 - 181 - 115 - - - R=0 G=169 B=157 - RGB - PROCESS - 0 - 169 - 157 - - - R=41 G=171 B=226 - RGB - PROCESS - 41 - 171 - 226 - - - R=0 G=113 B=188 - RGB - PROCESS - 0 - 113 - 188 - - - R=46 G=49 B=146 - RGB - PROCESS - 46 - 49 - 146 - - - R=27 G=20 B=100 - RGB - PROCESS - 27 - 20 - 100 - - - R=102 G=45 B=145 - RGB - PROCESS - 102 - 45 - 145 - - - R=147 G=39 B=143 - RGB - PROCESS - 147 - 39 - 143 - - - R=158 G=0 B=93 - RGB - PROCESS - 158 - 0 - 93 - - - R=212 G=20 B=90 - RGB - PROCESS - 212 - 20 - 90 - - - R=237 G=30 B=121 - RGB - PROCESS - 237 - 30 - 121 - - - R=199 G=178 B=153 - RGB - PROCESS - 199 - 178 - 153 - - - R=153 G=134 B=117 - RGB - PROCESS - 153 - 134 - 117 - - - R=115 G=99 B=87 - RGB - PROCESS - 115 - 99 - 87 - - - R=83 G=71 B=65 - RGB - PROCESS - 83 - 71 - 65 - - - R=198 G=156 B=109 - RGB - PROCESS - 198 - 156 - 109 - - - R=166 G=124 B=82 - RGB - PROCESS - 166 - 124 - 82 - - - R=140 G=98 B=57 - RGB - PROCESS - 140 - 98 - 57 - - - R=117 G=76 B=36 - RGB - PROCESS - 117 - 76 - 36 - - - R=96 G=56 B=19 - RGB - PROCESS - 96 - 56 - 19 - - - R=66 G=33 B=11 - RGB - PROCESS - 66 - 33 - 11 - - - - - - Grays - 1 - - - - R=0 G=0 B=0 - RGB - PROCESS - 0 - 0 - 0 - - - R=26 G=26 B=26 - RGB - PROCESS - 26 - 26 - 26 - - - R=51 G=51 B=51 - RGB - PROCESS - 51 - 51 - 51 - - - R=77 G=77 B=77 - RGB - PROCESS - 77 - 77 - 77 - - - R=102 G=102 B=102 - RGB - PROCESS - 102 - 102 - 102 - - - R=128 G=128 B=128 - RGB - PROCESS - 128 - 128 - 128 - - - R=153 G=153 B=153 - RGB - PROCESS - 153 - 153 - 153 - - - R=179 G=179 B=179 - RGB - PROCESS - 179 - 179 - 179 - - - R=204 G=204 B=204 - RGB - PROCESS - 204 - 204 - 204 - - - R=230 G=230 B=230 - RGB - PROCESS - 230 - 230 - 230 - - - R=242 G=242 B=242 - RGB - PROCESS - 242 - 242 - 242 - - - - - - Web Color Group - 1 - - - - R=63 G=169 B=245 - RGB - PROCESS - 63 - 169 - 245 - - - R=122 G=201 B=67 - RGB - PROCESS - 122 - 201 - 67 - - - R=255 G=147 B=30 - RGB - PROCESS - 255 - 147 - 30 - - - R=255 G=29 B=37 - RGB - PROCESS - 255 - 29 - 37 - - - R=255 G=123 B=172 - RGB - PROCESS - 255 - 123 - 172 - - - R=189 G=204 B=212 - RGB - PROCESS - 189 - 204 - 212 - - - - - - - - - Adobe PDF library 9.90 - - - - - - - - - - - - - - - - - - - - - - - - - endstream endobj 3 0 obj <> endobj 7 0 obj <>/Resources<>>>/Thumb 40 0 R/TrimBox[0.0 0.0 800.0 3000.0]/Type/Page>> endobj 38 0 obj <>stream -H‰Ò÷wVÐ÷u6PprqVàrõ)[ã endstream endobj 40 0 obj <>stream -8;Z]L0`_7S!5bE.$!5._?9eMk!"T`N!+Gf%X8~> endstream endobj 41 0 obj [/Indexed/DeviceRGB 255 42 0 R] endobj 42 0 obj <>stream -8;X]O>EqN@%''O_@%e@?J;%+8(9e>X=MR6S?i^YgA3=].HDXF.R$lIL@"pJ+EP(%0 -b]6ajmNZn*!='OQZeQ^Y*,=]?C.B+\Ulg9dhD*"iC[;*=3`oP1[!S^)?1)IZ4dup` -E1r!/,*0[*9.aFIR2&b-C#soRZ7Dl%MLY\.?d>Mn -6%Q2oYfNRF$$+ON<+]RUJmC0InDZ4OTs0S!saG>GGKUlQ*Q?45:CI&4J'_2j$XKrcYp0n+Xl_nU*O( -l[$6Nn+Z_Nq0]s7hs]`XX1nZ8&94a\~> endstream endobj 36 0 obj <> endobj 43 0 obj [/View/Design] endobj 44 0 obj <>>> endobj 39 0 obj <> endobj 45 0 obj <> endobj 46 0 obj <>stream -%!PS-Adobe-3.0 %%Creator: Adobe Illustrator(R) 15.0 %%AI8_CreatorVersion: 15.0.2 %%For: (Max Carlson) () %%Title: (sketch.ai) %%CreationDate: 4/2/13 10:42 PM %%Canvassize: 16383 %%BoundingBox: -7780 6416 -6928 6676 %%HiResBoundingBox: -7779.0522 6416.6221 -6928.3325 6675.5942 %%DocumentProcessColors: Cyan Magenta Yellow Black %AI5_FileFormat 11.0 %AI12_BuildNumber: 399 %AI3_ColorUsage: Color %AI7_ImageSettings: 0 %%RGBProcessColor: 0 0 0 ([Registration]) %AI3_Cropmarks: 0 -3000 800 0 %AI3_TemplateBox: 400.5 -1500.5 400.5 -1500.5 %AI3_TileBox: 112 -1856 688 -1122 %AI3_DocumentPreview: None %AI5_ArtSize: 14400 14400 %AI5_RulerUnits: 0 %AI9_ColorModel: 1 %AI5_ArtFlags: 0 0 0 1 0 0 1 0 0 %AI5_TargetResolution: 800 %AI5_NumLayers: 1 %AI9_OpenToView: -7722.5 6716 2 1320 716 18 1 0 78 174 0 0 0 1 1 0 1 1 0 1 %AI5_OpenViewLayers: 7 %%PageOrigin:0 -1800 %AI7_GridSettings: 72 8 72 8 1 0 0.8 0.8 0.8 0.9 0.9 0.9 %AI9_Flatten: 1 %AI12_CMSettings: 00.MS %%EndComments endstream endobj 47 0 obj <>stream -%%BoundingBox: -7780 6416 -6928 6676 %%HiResBoundingBox: -7779.0522 6416.6221 -6928.3325 6675.5942 %AI7_Thumbnail: 128 40 8 %%BeginData: 8434 Hex Bytes %0000330000660000990000CC0033000033330033660033990033CC0033FF %0066000066330066660066990066CC0066FF009900009933009966009999 %0099CC0099FF00CC0000CC3300CC6600CC9900CCCC00CCFF00FF3300FF66 %00FF9900FFCC3300003300333300663300993300CC3300FF333300333333 %3333663333993333CC3333FF3366003366333366663366993366CC3366FF %3399003399333399663399993399CC3399FF33CC0033CC3333CC6633CC99 %33CCCC33CCFF33FF0033FF3333FF6633FF9933FFCC33FFFF660000660033 %6600666600996600CC6600FF6633006633336633666633996633CC6633FF %6666006666336666666666996666CC6666FF669900669933669966669999 %6699CC6699FF66CC0066CC3366CC6666CC9966CCCC66CCFF66FF0066FF33 %66FF6666FF9966FFCC66FFFF9900009900339900669900999900CC9900FF %9933009933339933669933999933CC9933FF996600996633996666996699 %9966CC9966FF9999009999339999669999999999CC9999FF99CC0099CC33 %99CC6699CC9999CCCC99CCFF99FF0099FF3399FF6699FF9999FFCC99FFFF %CC0000CC0033CC0066CC0099CC00CCCC00FFCC3300CC3333CC3366CC3399 %CC33CCCC33FFCC6600CC6633CC6666CC6699CC66CCCC66FFCC9900CC9933 %CC9966CC9999CC99CCCC99FFCCCC00CCCC33CCCC66CCCC99CCCCCCCCCCFF %CCFF00CCFF33CCFF66CCFF99CCFFCCCCFFFFFF0033FF0066FF0099FF00CC %FF3300FF3333FF3366FF3399FF33CCFF33FFFF6600FF6633FF6666FF6699 %FF66CCFF66FFFF9900FF9933FF9966FF9999FF99CCFF99FFFFCC00FFCC33 %FFCC66FFCC99FFCCCCFFCCFFFFFF33FFFF66FFFF99FFFFCC110000001100 %000011111111220000002200000022222222440000004400000044444444 %550000005500000055555555770000007700000077777777880000008800 %000088888888AA000000AA000000AAAAAAAABB000000BB000000BBBBBBBB %DD000000DD000000DDDDDDDDEE000000EE000000EEEEEEEE0000000000FF %00FF0000FFFFFF0000FF00FFFFFF00FFFFFF %524C45FD59FF514B27765151274B274B2751274B75A075514B76767C75A0 %754B2751274B274B27515176274B4BFD58FFA84B517C4BFD04274B272727 %4B277575764B762776757675762727274B2727274B27274B7C7527FD1DFF %7DA1FD3AFF277C4B27274B274B274B274B274B4B7C757C7576757C757C27 %4B274B274B274B274B27274B7C27FD04FFA87D7DFFA8FD13FF4B7620767D %FD37FFA852FD0427264B2727264B272726274B7C757C7576757C4B27264B %2727264B2727264B27274B51FFFFFFA876A75152A1FD12FF277D7D514B7D %FD04FFA8FFFFA1A8FD2FFF514B274B2751274B274B274B2751274B4B7C76 %7C757C4B4B2751274B274B274B2751274B274B75FFFF7D277D7D275252FF %7DFD04A8A77D7DA7FD07FF4B274B527D52277D5252527D76522752A8FD1B %FFCAFD0BFFA8FD06FF51204B2727274B27274B4B2727274B272727514B4B %FD05274B274B4B4B2727274B27272751FFA84B275276A8527D5252527C76 %76517D52A8FD06FF7D27524BA87D527D27FD07527DFD0FFFA8A8A7FD08FF %A87C7C76A7CAFD05FFA8A1767C76A7CFFFFFFF4B4B274B274B274B4B7C51 %4B274B274B274B274B274B274B274B274B517C274B274B274B274B27FF52 %277D27FF52A152524B7D52524B767D52A8FD05FFA84B4B7D205227A85252 %527D527D527D52A8FD0EFF7C76757575A7FD04FFA87C517675755176A7FF %FFFFA17551765175517CA8FFA84B2727264B27272051757520272727264B %2727264B2727264B27272676755120272727264B2727FF27A8524B76A8A8 %527DFD06A8FF7DFD06FFCA26A8A1767DFD19FF7C7C757C757C75CAFFFFFF %A1757C757C7CA7767CA8FFA87C757C75A1A8CF767CFFFF4B4B2751274B27 %5251A075764B4B2751274B2751274B2751274B4B76757C51524B4B275127 %4B277D52FFA87DFD13FFA8A8FD05FFA8A8FD15FFA875757C7576757C76FF %FFCA7576757CA17CA7A151A1FFA1757651A7FFCAFFA751A7FF4BFD04274B %7C757C4B76757C5127274B2727274B2727274B517C75764B7C757C4B2727 %4B2727FD05FF7DA8FD16FFA752514B7DFFA8FD12FFA8757C757C757C757C %CAFFA17C7576A7A87CA8757C7CFF757C75A7FD04FF757CA0FF274B274B27 %51517C7576757C5152274B274B274B274B274B2752757C757C7576515127 %4B274B27FFFFFFA852A827767DFD13FF7C2676CF20525176FD12FFA17575 %76757C757675FFFFA151757DFFA1A17575517CA87C51A0FFFFFFA7757551 %A0A84B204B27272627275175762727204B2727264B2727264B2727202727 %7675512727264B2727264BFFFFA827A87652527DCAA8A8CF7DFFFFA8A1FF %7DFD07FF7D2776FF76277551A7FD13FF757C757C757C75A1FFFFA17C7CFF %7CA87C7C757C7CFF767CA8FFA8FFA17C757CA1FF274B274B2751274B4BA0 %754B2751274B2751274B2751274B2751274B51A04B4B2751274B275127FF %FF264B277D7D7C52524B7C527DFFA84B52527DFD06FF7D2727A151267C7C %2676A1A8517DA1527CFFA75176A851A1FD05FFA77575757C7576A8FFFFCA %517C7C75A1A1757651A7FFA151CFA1A7FFA8757651A8FF4B264B2727274B %274B51512727274B2727274B2727274B2727274B2751514B2727274B2727 %274BFF52517D52FF767D7C4B527D7D7DFF52527D7D52FD05FFCF51204B27 %51A7FF27764B754B764B5151CFA84B51514B76A8FD06FFA87C7C75A1A8FD %04FFA7517C757C757C757CCFFFA87C757C76A0757C75A0FFFF4B4B274B27 %4B274B274B274B274B274B274B277C274B274B274B274B274B274B274B27 %4B274B27A8277D76207D7DFF4B7D7DA87DFFA8A87DFF7DA8FD05FF7CF851 %76277DFF5251A75126517C7D7651FF7626A07C7D27FD09FFA8CAA8FD06FF %A151757575517CA8FFFFFFA8765175517551A0A8FFA87651512627272726 %4B2727264B27272627275151512727264B272726272727264B2727265151 %51A852FF7DA7FD14FF2727A7A127A77C4BA7A826764B7C767C517C515176 %7C5176FD14FFA1A17DCAFD06FFCAA77CA07CCAFD04FF27767C76274B2751 %274B2751274B274B2752514B7552274B274B2751274B2751274B27767C76 %27FD18FF7C2751CF2627267CA7FFA87CA7CAA1FFA1FFA1CFA7FD04A8FD27 %FFA84B4B7675512727274B2727274B27272751755120517551FD05274B27 %27274B274B75764B27FD18FF7620CAFFA17CCAFD3AFF4B4B2751514B274B %274B274B274B277651764B4B4B765176274B274B274B274B274B5152274B %4BFD18FFA7A7FD3FFF762027275126272727264B272727765127F84B754B %F8275176FD0427264B2727205127272075FD59FF4B4B2776514B274B2751 %274B2751275251764B514B7675522751274B2751274B274B5176275127FF %A17DFFFFA87DFD4AFFA7A8FD06FF27277C754B274B2727274B2727274B27 %517576215175512727274B2727274B2727274B757C4B27CF7D52A8A852FD %0DFFA1FD24FFA8A8FD17FF52A8FD06FF27757552274B274B274B274B274B %274B2751514B5151274B274B274B274B274B274B27527C7627A8FF7D2727 %A87DA77DCFA1FF7D7DA8A87DCA527D7DFFA87D7DA87DA8A8FF7DA8FFA17D %A17DA8FFA87DA7A8A7A87DA8FF7DA87DA87D7DA8A827FFFFA17DA87DA8FF %FFA77D7DFD04A8CF7DA87DA87DFFA152A8FD05FFA876514B20272727264B %2727264B2727264B275151512727264B272726272727264B272720515151 %FFFF7D20A8767D277D7DA87D7D52527D767D52A8A15252527D27A17DA852 %A1A8FF52A87D767C7D7DA87676527D7DA852A8FD047D527D527DFFFF52A8 %52767DFF765227527D7C7DFF527D527D767CFF767DFD07FF4B4B2751274B %2751274B2751274B2751274B277C274B2751274B274B27512751274B2751 %274B27FFFF207D7D767D4B5252A8527D7D4B7D527D7DFFFF52527DFD0452 %767CFFFF7D52524B7DA84B7D4B527D5252FF7D76FF7D7D7C76527D52A8FF %7D7C52A852FFA87D767D52FF27FF7D76A8A84B7D52A827FD07FFA84B2727 %274B2727274B7551274B2727274B2727274B2727274B27272751754B274B %2727274B2727FF7C27A8FF7DCAA87D7DA852A1FFA87DFF7DFFFFA752FF7D %FFA87D7DA8A8FFFF52A8A87DFD04A8A17DA8A8A87DA8A8FFA1CA527DA8FF %A7FFFFFD04A852A8A17D7D7D767D7DFFFF7DA8A7A87DFFA87DFD08FF274B %274B274B27274BA0754B274B274B274B274B274B274B274B274B51A04B27 %274B274B274B27FF7D52FD07FF7D7652FD06FFA852A8FD08FFA8767DFD11 %FF52A8FD0AFFA8FFA8FFA8FF7D52A8FD08FFA8A8FD07FFA84B204B272726 %27275175762727204B2727264B2727264B27272027277675512727264B27 %27264BFD0BFF7DA8FD4CFF274B274B2752757C7576757C7576274B275127 %4B2751274B2776757C7576757C5152274B275127CFFD05FFA8FD52FF4B26 %4B27274B7C757C4B76757C514B2727274B2727274B2727517C75764B7C75 %7C4BFD04274BA775CAFFA77CFD4AFFA7A1FD07FF274B274B274B2752517C %75524B4B274B274B274B274B274B274B4B52757C5151274B274B274B27A7 %A7757C76FD0DFF7DFD0DFFA8A8FD10FFA7FD04FFA8A1FFCAA8FD14FF76A7 %FD06FFA84B2727264B27272051757520272727264B2727264B2727264B27 %272676755120272727264B2727FFCF7C75CFA1A1A1CFA7FFA7A1A1A87CA8 %7CA0A1A8A8A77CA7A1CFA7CF7CA7FFCAA1CA7CA7A8CAA7A7A1A7A7A7A1FF %7CA8A7A7A7A1A7CA75CFFFCAA1A87CCAFFCF7CA7A1A7A7CFA7FF7CA8A1A8 %A1CFA87CFD08FF4B4B2751274B274B4B7C514B274B2751274B274B274B27 %51274B274B517C274B274B2751274B27FFA875A77CA7757C7CA7A8FD067C %A0A8CF767C76A775A07DA17CA7CAFF76A77C7C7D7C7DA175A17C7C7DCA7C %A1A87CA1FD047CA1FFFF7CA776A07DFF7C7C767CA7A176FF7CA8A77CA77C %A8A17CFD07FFCF522727274B2727274B4B4B274BFD0527514B512727274B %2727274B4B27274B2727274B2751FF76A0FF7C7CA77C7CA7A87CA8A17CA1 %A77CFFFFA0A1A17CA77C7C7CA1FFFFA7A17C7C7CFF7CA8767C7CA17CA1A7 %A1FFA87DA77CA0A1A1CAFFA7A1A1A87DA7A8A17DA87CFF7CA8FF7CA1CA7C %A77CFF76FD09FF754B274B274B274B274B274B274B274B517C757C757C51 %4B274B274B274B274B274B274B274B75A875A1FFA8FFFFFFA8CF75A1A8FF %A8FFA8FFA8A07CFFA8FFFFFFA8FFA8FFA17CA8FFA8FFFFFFA8FFA8FFA8FF %A8FFA8FFA8A076FFA8FFA8FFFFFFA8FFFFCFA8FFA8FFFFA87CA0FFFFA8FF %A8FFA8FFA8A7FD08FFA8514B272727264B2727264B27272627517C757C75 %76757C4B27264B2727264B2727264B27274B51FFA1FD07FFCFA175CAFD06 %FFA8FD0AFFCFA8FD11FFA8FD12FFCFFD0AFFA8FD09FF277C514B2751274B %2751274B274B4B7C757C76765176757C4B4B274B2751274B2751274B4B7C %27FD0AFFA8CFFD4CFFA84B517C4B2720272727262727272076757675754B %75277C75512027272726272727204B4B76514BFD59FF514B277676522752 %27512752275175A07C7C2776517C75A076512752275127524B5275764B51 %51FD5AFFA8FFA8FFFFFFA8FFA8FFA8FFA8FFA8FFA8FFA8FFCFFFA8FFA8FF %A8FFA8FFA8FFFFFFA8FFA8FF %%EndData endstream endobj 48 0 obj <>stream -%AI12_CompressedDataxœì½é’7–0úxÞް'š¬2‘‹=q#¸z<Ÿ¼„ewû» -ªŠ’8f‘Õ¬*Ûê§¿gÁ– ·"%¥¤,¨T$2 àœ_ü??=ïo6/ýxõÄ_Œ·‹ùÃfûuj{ß­V÷[¬úòç¯zR"¸iø]þÂÜø÷Åö~¹YM— -.Îðé/¿ŸÿÕÏ·«ûÍú«Þ—_Aý/ˇÕ®Üÿ¾x¸~3˜/¿²¯ƒç'ó¸–\©+÷dôu¢z?}×çë?æ÷÷ËÃU™Æy u£Íãúf¹~=Úüõu¯ŸeyÔK™öúi¡ò^šf)Üô_ËŸ÷Õ;³bi¥èöAª”ägq¬4>¨ºHp “ÍõãíbýðÓvs½¸¿oV›íý×½ñÛùº÷ýü5\™÷þïbµÚüÙ­æ×¿Ì6ë¸õËÕÍÏË›Epå‡ÅâfqS»>üN¿˜-W ˜·ÛùCOJœâáwR½=ÂM?<Þ¾\ÀŒÆEÕñ ê̯÷Ð è~ÆêìÅw·Pó|ñðã…öL?; -•T¾üçÏ‹×K‚*Ìüÿ|ešÝnînçÛßñÙ^?Ž¢¨—ÃoÄWYÜÞ­F4“I t¯/5ý-}3wÃpèN)\ÉuÚKó>I¥ø?Á‹?–‹?¿îý°Y›¹nž3¼hšÿç+??®Û_×Ëßð»‚'ãûÍÍb÷»çg«9Íéÿç~™o_/=6«ÇÂÝܾ&ûÙüía-ù?Þ-Ö¿lþN} R -Æšf€mª'cõð£Ì©ù þd‰{«ôÿsãØ6d߈~ ý¸]¾^®¿Žp¦¸#Ù‹o·ËÌLõrþ†1ȃßÂþra苵é? Ñøû)¢Á÷Ïá­ÓõÍxs‹óë °a ˆ²Ú¼ækî3]ÇïÄ?E\\ýëq󰸇¶V‹^‘^½ÞÎÿXô¤Ê¯†7ËÅ®Ü_ ·pùj|½¸Y®Vó«éüúñaqõÃ`òâêG{›¸úÕ=1ç[æÔÚÕüz¹ÔxµZüu5÷÷ðósjüÚ6¾ 'ÅÕ‚].Ü£Kn~É÷,ƒ{–îž55/®6|ï†ïÝ÷nܽîÊ#ßúÈ·>ú[ÅÕ£»÷fþúõb{u\,®®a¾¯îÛŽâ~qÈwõòqµZ<\ÝÍ·8wo®à‰Ûùúæå -fiK Z»¹ºÞܽDyóp ÷fKõŠûà^7Xon¯®†Ó«ïWóû7ÂUÝ¿]®ýMöïÛÅúêö±Z-j÷Ù¿›íÍ«4µ\/ðóíüþúq…_ì s¨7oÿ×ãây³ùs}µøëz5¿¥€]Ëëù -pO½‚u¼\×»ñhàjq»ÞñêÁã™ -¼¼Ã‘ßßͯWCÆÐ ›ù3½Ú ެo KW‹[úCˆ SLÚ/Ü&}óõ\y³üiµŸ47çÿ×}zµ3D§Û õ”VŠë7}£æÄÕ«% Ø ¼ùêÞ³¹A!Xûuör~¿p¤/pëÛÍã= ˆ¸(: >3¦®sSžšï¸þ»]¿s7}Ç7ýÈ7ý´gÇý#ßñ+ßñkØÌ¯|é! û*xšq;¿Þ"¾Å§Ûæ×´ xIóŠWoׯçÛÇÛÕüñÖ!0…߯®çðœøeJTTÿ÷‹_îuxŽ¿ 25]_o×Ý{ay«g²ÿ¼r•Wî*ê_þ?nèžm¢÷ËöqñËÛ;xN¦Ò,_ íñLÃâ_ó|I¯–ëW° Þ‹ ‡N7mÁæ¿™K\c°Æ–óÕÍòÕ«+Ã-ñß«»íææñ(ÀZ|@ZÍçÅÕ·‹×óž…¾‚ë¥'‹ìj~üezQäW“Å -„%ƒ¤°¸þ½X¿^ôTáÍ+@ÛÏß޾ܬ^\ñßÒÈ5Oß ˜ÎŸÈ)Äw‚d¼ŸVpéÛíæñî»õ«ø’…Â_Óqš~|ù¿@Ä@¼3þÓóÇåÃD¼»¯ö6Ìj»èñEx˜¾Ú¿‡Ÿž,^ÈäçÚéúÅjs4ëj`Éôþ1ßÞnú§Õ|=ßö¨Þµül Üî§9Ì‘oÛ×Ñ(pý;¤úØÎU^°ç†àÒ/š?¼¹HÞ½k›¿–;Îu‡Û{~2Ŷ7Ú>Þ¿éý²Ù¬\³åK®uSMµx;Þñ=°þqÍT“¹¡ú&([÷¸{÷àb›[Ïo“°³¼nzAÃu÷&¾v -bÉ[Þßz| -j~B’|½Z< bÖí¾Öp6€Þß"uó½ÝÜÞ¡žÙ{þf~· 6ÞÌèÎç®Aü%¤±ýþâ+‹Þh\ÿ0KОg ûÁlõ¦7¯¬{~%š*¾Ç½Ñ ÈíÑ -²Teø!í—>ĹÎ4|ÈâBë>È8Sk¤’:¥¥“B$½/^Œ¶—iÄ÷¥g›éÙfz¶™žm¦g›é™f@åM¿§A¡½ZUæÅ[ÝŸÝ?É­é‹uÏ7xÞ™±^zî¨o£‰Cs‹­ÍüÃb³îýŒúhïïË×kÐM€ÁMµ¨=g‡³(‹cESI‚%ˆ‡yœÊ‘-Ê-ño’E„ô3RýþSŒ’‘¥£|TŒ†£Éh:ŽÆr“±gã|<Æ“ñlMÔ$ž$=É ä“ánžL&ÓÉlMÕ4ž&S=M§™˜fÓ|:„mA;¦ü3›ÎfIE™CÁÿú”˜¢ÍÿðW¸Ê$¸)6EÑoX°q|I„¯ƒ—ÚŸ è’ ~¨‡C*ôKF%…¢©$0,, -Š„M£ÉŒÊt‚?038 f£€9ÉinR(f*ùŠaÖÔDÂìAÏð½øÌF0·ÃqsœAIa¾5Ìzs‹± Èq4šAnÂKàþÑ@4@å£ J -€Ó¾x¤ Hñÿ"4#(’Šý«ø2ÜÆ7ò ý©„šJ蛦o©ù«…ýàþOÜMüHbþÍKàÅÙù~az'ðÿÆŠŸFb8„ÃaA¿ù0£_=Lè7¦_9Œð·˜3ø£b ¿E1„߬€õYè")TÃo$ -YD¼ üŽóa>‚ß<Ï ¤y’ë<ÎUå2›lF0Óà žÏ²,……¢³8“™Ê¢t†PKÇé0Š´H³TCIR•F©,€x†Úƒ øk¥#%S4ÌÁ0·%°ØüQ‰L$ ç€90ÏE<Œó8‹uœÆI¬â8–qh5ü«!À¥P9üf*U‰Ò*!hœh˜. -æDÂŒàœLaFÆfVŠ"ÇÁ¼¤4/83\"˜˜¢%L NÍPà9ÿ¤¦`¿qŽT.i–f4S„“f®p¶p¾´$0c -æLÂŒÍÒ©€µ2¦‡€™ËÒ”æFš‚ª3ÁZâDÜáYÌÌ<&4“RKXÔ°Þ¬€Qi:«:…U…˜;43ŠsšÄ±™ÑÌéÄÌéçSÐ”â¤Æ -"¢>X]¸8 -³¤×Ëh9ü…¢uŽ )âF@g#6”XD -ʉ?M¢ -1Ó¢¢L4­|EKû¹ÆEËgD«%…õ¡pM‚B c@ òpñ]cØeŒá„Ý#N !¤€ 0 -ƒAe˜ü±€‰/`ÚS˜ð¦<‚ ŸóD§4ÍÊLòPvhÐfVÒÜNÍܪÊLüÃÉÜäŽÝôâ㞘I†7›¢\‘Xÿqåìñ¤‡š0$_ÔŽ²ë'ªAã™í(ÓeÒXÆXÿ)•ÑŽ2ÜQаˆàK¾£d;JÚT¼©$;J¼£$¾XÓPªÐ„¹Á‰›‚à€×%A/ÄEôMF u,$’àà7,aÀt”b"¸bXH¸At„’ XC¢ë°¦MIÔ‰[úÃú"^ÂÂÊ; !³€‡4n£…·C›xk’h«2‚ˆd±òˆDr œh&ÈI8i–1´ RXÚHg d!°ÔÇD§zF3/S%€ÄÐ&2º”ÈvÉøˆúH;ÐxrHt$!Ž™7ȉ/ ‰£Ž_€Ø$²2Z( -ˆPBÌLÌX±æð¡ ÉZ3Â#I\<ž¥‰ex#qzr08«P l”8¡$"à˜Rr$†@Ç@$'Ã)C“á( ‚…ƒÞÔA.vPË d# .ƒJ '†ÒÄAH1t h0 –™IâÀQXP é€:Œì䛩ݴçnÊqÂy¶y®µp=t“ ;—ĵÉŠÄ;Ô2£%Œ€?¦0š‘® Œ¶’¾PÆ0Þ6%­AZ½A€€…ŠCAªÃØ©2T3 -£9 Ö0hzE……ZO³f¦!žàÏ…$k•‡üSóDAKÊEÄ™Äi%,ÅRIŸVÒšNHÚaK$qåNâb™ dQs-Q%±kJ2) -^#’Iñ™œ$S\º$w!áœHYî»b#vE$ªNITE1e®<¹J\ ±z‰k]dy+À±À¸:&y« y+LÖ†ýKf$qi]³?H_%Ó@95…´V;$ÍLeFkDA™˜ÂÔU -ú`I2ò³™ãaâ11¡‘á9C˜&Ï{p.ðojÄ3’D‰ÄÁÿÌ;è´çq‰I(ÇüÿNàˆ×ðß‘À!þ§àq$ou‡£iü9ÍΈ˜ØHŸØGûžBúÄ>Ú÷Ò'öѾ§>±öí'}¬™!Á1ȤPÛV¤[³rÌ -³¦fRj*£æ¸Q iöögLebÊ” -ZfN’ã•FÂÅ86%¡¢©¤‚Õ2ÖãÆD‡ÆFidê86oóÙ2È>e†Å¬DÉE)C‘Q#&óFBæ ,¤<“ñƒC9Ñy.L’y(æ-d;™6ȃÊÌH´LH”)l~!:eL2È&Rړ²KtvEî/¢bGª–ø@IªET*ôÞ’(À Ä,ÛSò½¥h*"ø2zÙ‘$G– ŽÃ=BcYd¬Ê‹ei1E½4IT$ã\alFÚX¼qÎZŽrg;ŠCë‘pæ#GZ³±íÈæRöbÞX“Ì÷ÚpoÄ·†|i¬'3gΟ“þÄ1)fYCA‹Ðr³Ü™ù­©?5<ÐrÄØ™ý•eÎüe* 8OÀØñâ¡ñ pa®ÿíü‰eüÂÈŒ«ÖÒ3s¾ƒ©“$ÆÆ‹À?CãM(_¹p"Œ¤bå–Äy b'ßH¯Ž…Š Ê+ò–F沩ý¼mWÄRc¦¢R±Ÿ3×{¥Þ‹½’Á~¹b‡0â¿kªrPEgVNŠÕFødIvhä̉•.T©œ,©RoÕz…“§F¿ŒŽ¯œX¨0˜;uäľi íÁ:%1Ï xÆÇ^¹Â0À‘ó)Z¿âÄ9÷fìîÉ‹JîE+»©’œV—×, uVü_8e.;ïÞµh}ŠCãGLÿP™AâBäd’ šë @²0¡•ï½èøÃEËŒ„؈U¿‘\¢±Š½EHHQeÂJ*Ú„ˆ.ªlH„Ù¦ˆ*[’ÌØŒ8D{?‚lJLE2¶¢Ýph„±yp”1fÆD8&ʇò–˜ø ©ilD&4Á -(s!›JÉ'—ݘ=v$eEÆ•‡2»÷ØÕ¢•€ÿ&ìdŸ üÆÆOÈ>ÃÌø ãS“…BÓØ8§ìˆDai8$3ÅN·óþK\‰#wö[êVNb8þîž`ÿ¹Õõ¸Q«ÿÉ -­t4“E¶S”ÑùY,ʽe)[=e úk£úŒêÏöjk­N­š ÕcâXV÷ÇŸD1& ‰ú[ÛtˆK›ŒIše|ÈøÎ-HÈwb¾±DKò&Î ]8Ã25fhé Þ]x|caŸõ Y’õ­Ÿ“†¦°¬?1’¾u˜&"°D³Í€ÐŠ•î¥1p!= š~Žm°É¹áÝÖ?H# Þ¤Æb”›ÚÈÙª–#¶5YŽÈn$ î Õˆñ†-F©AT -Q!du0%EÄÑš ÄLĆ)S€jÞˆH “•ÌÀw -0E:’è;"¸I šh’ˆ€$¬AB€Ë#b ^@v7$6‡ N‘-Å;u š»|HU_SuÒƒ" §^vyÁfìP >¶]>¹bG)¹úDðe——°îOäÒè„;}–»Ì3»&Úüˆšu—×5ðÌZcÝÄé^Cç HÉ”ÿ$ç̘û­±¿lêOÈY¥DÍÈšø«~é´³²Ÿu4ÒÒ„‹¬°ªš5ò³¶fõ5ÖØ¬Î¦LpEÙØOº›¨DX®bô·Š«rÖðÏÚœÕçX££–!ù)Y­cÅΪv¬ÜYõŽ<«âY%Ï`°¢7)`cXݳ -ŸUù{ÊÚ¢’µûMIޙȭPÖ’NÚ“´U¶–î½ ð+a¢¯8þ‚ƒ®8àꉪ¼hÖ埮ʋf]þ骼hÖ埮ʋf]~¿*ï•Ë…2"ˆP%¥X3ãùË(l&¡UQX™]ãc2âẵ®=&¬Ož§y“1Qü͘´Åkò³a~šÈyN¸!†sÐ㸗â#(‰Ö$„ï6 Ð:Rرâ-93ö°GfxiÆ÷fb# ÍoÙí3õ.!“($ðÙ CëS²Û<"©™‹³ -Dá\U¼ëc,Œ'+Ð'̯¤0Å ˆ5X—|H‘vÖ¡<0ý˜½€¥˜.Þé¡V}‚¬ŠÖ%`©µ,EuV3%ò¼s‘]Æþ(¯ ’;¦ ÒˆtPí"¼XR—D+µ‘ÓǤnJB½[Jg}bÈŸ—ÑG”bff<9‹5ÝOŒûØKè:Xh`aX³tAÍ$­sàÉEÃNðí ;)fâ²a'èi»hØ rꋆ QþȰkyšÐ¤°T­úY©”%g0‘M¾”= ÕŸ²›¢¬Ï8*Êz8ªÞ²od\*U·Jàrn;“-UMV*eWOÙ D¼F^¢²i擲‡3p[‰†ì& ÙLLðíOºø9A—º¸›Ø…ÑUbošCoDCì­Ûwc£ìÃn„‰»¡œF•Ø› yFÂø›ÜmºO]ª#ŽÀ31x HË3ˆG¡x.ûQáârlDžÉ‹ ý(.ÏEæÙ¼HcA^"» -r¤Ç¸m‘Ø¢«·XOæœåšÐI8̱X»ð=éÀ=}7_‰ÛŸdC÷íÞ¥ÌÞàd·<Ù­VVm³Ú6 ‘Â0‰Èí§RÁk¿×Z;®Ëùªýk¶fI&ð–ÌÛ³¬úÈdlÊÊ(˜Ž|¢5Lòf6\YÒª©sw(R9ÊÆÄ¶ÙÐ*›N›¸hœšZ_Š:ž|šSS0ÕÄí—´ÇyZjC«r— -7øŒ‰ NÙÍ ¿ÒléVæ7v´ÿMˆj”°ÍÇÒoøÍKßVMÃ,‹Kzí”wô ·Ï=|~ÿ^9QŸ b²ù@lÀàØO§á©ÒñTή¶‡£2Ù**¦0¥ÇÄñÕFÎJ~¦©¡?@{ēȒ§…œÕæñ¹L^Ú% ãL^… G•f'• m)ŒKJ‘Åyâv]¢‘‚öêYÍB ‡w$Ü8§]QËi–Ñ\£Žç7AF³œÜrÊäîã|f˜­oJ çÂlf>—&’›˜8œ åáRœÜd0³ùËlö²©ñÉqN¸0fqbR‘Ph—pfÎ0ùT…ÃU|`Ž Í±Á9¥ŒRƼi÷èh¦cu¬ÅYR¤sëïÎ'5+å“Jj»ó­Ci"JÙ¤jxŒkÉ:—‚lRÁžÒn}QË%U߯“;Ç»Q}ŒõK‡Í¡ÍÁA8…ìÇ‘  *šC*vUˆæ¸ -†r`EchE9¸B¸èŠÆøŠ’åËXtù®NHú5‰ŒSQ¢5LÀÃ0€YÀôZJFº(Q -:Ô„ÉTylÒYZЬlØaIϱZNdR‚ŽDi‹üAõL­ÝÉç•DÓ‡g–C'Œ]ÚEgM¸¼ö{¦ÎîÌ*¥c~:Y–å„a«ÊdfEtÁñ;UI+€;uÒøqÎ2Ÿ4ü|øYŸ¹‡Ý:ØÅÎÆ'Æ3Š]»âiXGäy©„=$AšpL@èáùËl—ÝA¡ÍQ -&hÀ† ØÀ0tÀetq.„À&qqÙ¢”(%ŠòÁ™K e³Bƒ V9 Å…]PÞa³=•öî³L_ 48Ì?BîÁ¼ÃïüÔe¦!Œ™Pƒù…Å Ë)¬0ôé{KáÄàÁïÔŸ•œú™†yK¯"ßIêb\³žfl³ì‡PÑ(Þ?Ä3eì³áMì¹Û7<1;×­¥2sh5¥Mª&Ö¸Nà•ÖTi·«ÒÞ–O›$žkV­ZUÅN³êÓòˆSª»œî‡ßµÇ‚+j\w·ëý°˜¯8`È­i›Æoî<ç¡ïÜï Ý^¥$÷ÎÆ…yîE)MMPcSÓxŸz˜ÆdUpÉ@½wæZ˜]€>¨w³'NÍ—nÿoUJd×+ûyfÆãro£Ä,y·¤]9%R³‹-ÓüÍ2wQb–¤»…«“wKâU`f¢iõ)ìSÞbZ²"µàsM_¡iäˆä¶œY;šLhk3Ö7#zVÁøœ€6 Í8 ÒÁ±ÆÙмµ(Á.½Š©¨f²¿iÍRüŠÀ%±hfR?Mýjló´+‘&‘¦QI‡íÈDǘ gH™[µ‚"(ò´†Þh“!ÃåþÀ€ -MéÌ8 Ä¢­•‰~*Ø?gb4…9&Õ‚Íõ¢]ª…‘¨d[ðìvx„z6¦¬;Q(މ€?Z9Ù™r¯ ðÞQa’nL]¤¦•Çì£ .¨\§»§Máö6Ñ…vA*¹É7)ªhá"U&˜ÑÍH5©Éf16^Ož^Îc1¥yÅYeO焜¸ Â&° ™—LI’àì,¨(Rò wEj†=#_±&ÁÀd®` #«5ÇJ³ñåº@8¯å­p­“Ä¥ÏnhÈ0P„œÀ+aÂ%°üÀr„ê a~‰óñUÓ -'¢”^ÀºûÆÙâRv©sýYçiÇÂx-\r§&—s dNY¶ÎÀN™f·LÍ1còI9ÏŒ\3ÍΙF÷LÝAcý3b‡‹¦ÑI³ÃM³ÃQÓìª)9k¬ëÍ*>]Fƒ÷žÑÀŸñÔ³Íôl3=ÛLÏ4Ó³Íôl3æ4ªLÒHê^€R+ÐÕ囦ó¸Îlvó Zy6j_¬»ÕvÍÙaÀ-S<¾+‰¢,7‡€B}®9ði>è Ÿ/´i H¨ðÀ°§7B½€ÛR¼…‚D›§3{ÄXÉ"ÅAy Ì€mÀ2Ì|GÎlçé3R T%gΈiä28äM•_‰* _¦·Yª¢‚.àksw¹74Ž½Æ©O€´"˜]`IPñ'H^Lh!¬ -9ñÎümÑLF@õŽ$N5šÛ±˜ |AÑA|¹ÔðÙ£p¡JfÁ¬ÛÐÙ3¤0ïú23dÚº®HtâI÷r¸ÖÔøez­\Ün2ˆuž]°Óõ¶©Ï:ɆZe&%r:@ÝCáC bH™#~E:Ïéí7U”— @ -°òrMž·Z€mƒürÕb:k¾l[é…Åó'«ÒÞÅd ‚P‰ ç2º$…nhü½¶óP†—êm¹ÑSÎ8ýi¹þ½÷3|¯¾¥oШ2GšZu¿~¼‰ h®3;C‰ÓäížÇ,\ ³¤ì¸¬ÖÛl67.ç6°fÐ<1¦iBéQá§Üzþ°‚™Û;›í"þ¤Î_:sŽ…Øù°ìáY´5Q˜¸çòv×p«ky£+¯'ìâ0”‚43³=Äú©BUÕ;Åf˲_Êž_RsI ã•bTè—Átá %ÕÓI’¦ÓI²†ÓIª§”øsJìI%þ´’àÌ›T½º¥)3¥Ü]Ê'o^ò©<“¨)jvo“©º¨›|Eš YÑ&¿ u’ãñÇ&\eJʦu¹ù° w^ Q±;«F&8…¼q.–ƒ>6)¡ÙXhCI“R<Å)¿çJ¹øŽ>É\äÉЭ‰ êÛdRŒH]úhTÌad¤¥ÛŒán«¦DÕ VvÊÄÄî΄I¹ýU±Ûa•R ðÐìD¹|ÀS³Ýjf2QGö”S´KÚ…Â - ‡)‚mV|“õßlª›Ò†_L\µ0FÍrlyÒXôîB¾=‰{¶f´ jL{› -ÚÈ”ÒÖ%Þª¹-Jûw$8ç™pÞ³ªÿ¬ìA }h΋ìNpŽ4øÒ’ÒÇ©ótj»›ö6š„«ÂX—B×WegctÕ§]mØÛÈÉEéxµ0Ûøè8òR$¹¨“ûprŸË‘³9²%ÕG•³E5vûØ - bnÃÌ9Ðܛۀst>t¡ç… @·…º.ø¹ëÂÒô“ì.¼kpÖq°œù¥ŒƒÎ“–rÌEÁÎÛ*z_®ß#cܹ¢rv­Çuwâß -& -—tÿ.[åp±~Î_ E!:#Ë8™`D-ƒ-U¼ 1³ 7 ;EA«(*ƒ„e< q5ÀWQBÚ:ò¹V¼)õŸÂ˜@N”$+¢ËÈ?q/)P¢MEûà­F·ÖËš€§P =úÐl‰µqYâ•Q*ó§?|Ьüëz=¿]Üô^›ªž‘¹¡ÚYrþOQé ":iÿ 7>…ƒh*¹¨ø¶æ‹Úýj„Ò‹Q‰Äà Ÿ!jè²ëØ9äËe’S>°¥!Ýhéܱlo”jsœê4ˆ>JGèyåÀ4U -LcGh–f7zïŒJ/h90mË2Aæ’¸“o•¹wižX -µ›?3—q#§@}“wÃå“›yŒ)`&.¸ÚX‡AÖ>çgåà€kt“Û#uÿgxv–¾ÎI éìÆ&}G)¡ùU‚\vÇçщ+±0-…§¡©`“©ßéÓ.ø®ñ¡![H [QNv¹"#Û6ЋH³­.G{\BVMV¥‚숞+z†zvCìF“q–‘µJfh†Æ@q%»Áør€°å°ÀV¥oÅ–/Ô»Õ€Köˆ<>X{QFMÅfXÞÌJ,§Yö8¿¥ó‘fID‘ÈŠ"HÜJáÏþ Ë0øÙ›šü¹©‹O/ÌFHcaÁQ¸aðs%ü¹–¾lM‚–˜Ëä.C¬se“×HgF,È´25!Îö\-¶âÈfsŽÖ4Ì|@¹6´|nÖØX2Y ùÈ¢ð`§ü§ ”·:7lvvú©”€pÃs}ËsyÓsmÛ3‡²^,s'øËåã/ ›f;”PaNM·Í*XµÿXë-á A“Òɺ¡)h—íÇ+6™/¢FA™ÅR|»÷Àt$‚ƒf·1Á–,(¤Þ2×jÖèYŸOƒ±9<2£ÀH/úO(2·Y-Ê¢Ýr”¸ÍŸc³ÙȤ‚§=˼Ç(¥ÿm¬b"˜Ô借¸ Y1¥ŸÐV,LÇj¿ãFДv_E´tHéÞÊyÏYÞ3A›@#2—Žh hB§VLi×k¸ç•ªp‹ÒdŠ AfV“'†ÇS†Ùã&A¡ãEl%DÀ"(áOæJê‹(áw”p „©.ÂL8lÓ@ g¤°e”qPF&mòЧ§™oÞj(žžf¾y«¡xzšùæ=Eâ´4óËÆÞä™`´(I°)¥ øÁøåNCÄž6ö4•0ñ(@Ä -è¬y2±!:)ù݃©à6¾ðÕOkÀ¼Ä=€ s2 ó°æî‚p#ñS“¬ø”gÏyâ¢QæêÐsÉERÙi¹Â 9 ãt@rÙ£Uå.ž±òƒ\5¡Ãž›Î›ƒ$nœ¨ösà N–7$à oï ³IÅBnÊ>ÃòNC#n‹@â¶’zo(y§f£Gîv$î<¾Â9d'T>õûXªNTë@ s•å¥j6shá2Æù¼}ÊéGQ)_9ƒŸÝ»SIá'røEþ¸<·ÇâƒÅ‹+^n㤷cç v4á‡(IO)8)L› %!N”1‚2 ‡ulð¸b¾lE”’FÁ9Ò>«½²ì9ܯ¢]Ô´’r f¹‘YÓ2ä#ðÚ ŒU†0´;s£r°• Yáæ@Q»ÚÃ3§Tƒti¢²ð˹Қ–9 ¾ìö¾U@4“€¨‚Þßj`iÁ76øcÄw°;Ê€Q¡ -âa {ø°µPMñÊ‹Whì…¾KÀ€jâ«íØG1x¢²+Ï"AÓþÐòÑ—·ÏFÜR¬­0ˆ°Âìåឈ:;ТÂŽE†Ë„¡…9ÂÃ"Ã.:R—¹Ì ÂèxT€¦$½Ìû›ÎIèÈCd(¥ó@„9$ÌPtèÊÀQ–~Ž-(Z8†ÎMVEch c›q*~ÌÓÒdó‘ c ª qÅéeÂʧ‚(w.Î'.-ŸxŸfQì"¦¥):ÞjçÐÏ¢?-D•Ϲ~çjô»jКê ;†5ËÒÑGSˆsâE›ÂEÅ9ñ¢Má¢âœxÑÆ£)vÇ‹9üãÇdñ{?˜ÅŸŽÁæÇÇ|Ö¸ £Æ«é<Õœ„ѱ¬ÓÙ¬C…:TèP¡† -a6Ó¨Ñ@FÅNXó|CµJI\ìMÜõGrôäÞŸ³æÎc¨c¶ÍW“Ó|7;×Õ¤zöK¸¶Â¤Y»×Ö˜ÏTÏ~©º€Gæ”i¿ÂšÎ©û€c>FXË­´ß>ðý&fÍÙUW”s™òYãìäµ­Œe¯®ñå2U”D#ãÐð® ûM¹ß°Ød åt ðITÓ7ÛæÃÍçvÛºÏ PÎ`='CaÔ€±Kfæ -0yzïÍÉff3™07@nrؼCÒGøÄ;$/m¹ŒL:kE™Ø$ºdËW…CW{›=†M¹CØ2›îBºÉf)»êOªN¿ ôØ$Êð>'%ÌG{C@(Fbä« è À7á>¦¥Kºr{âþZ3„Ÿ8}GéýqðPÒð]¹n5þNÓ œúgç(*Í(£sdó\ÀØÚzÅ…¶™:[¯¸„±7´õŠK{Cå^gìe-|âr€‚>-€Ë¯b’0”Ò0T1€/Üùͧ¥†ÙÜ™©æ˜æ0ƒKÈ 22Ôs2”ƒ ƒ©¥eŠÚ0{Ž„© - ãlWäB÷†ªÐ¨\:†ý$l¥pÅïùÌ‚’Ö²Ùm'µ©eŽẖ#{Ä$Ì!|úˆ ìϱ7ƒ„¨&‘86‡ÄŽ,æTÞ‰Ëü1òø, ÃJ¢‰Tå”Ð Š`ùHþç=“Š)¥Ü…;TMp&š8³!–c)SÌý d¢¥4érꔲ/(“>5×»sHÕÈYr¡jŒ)TRè¤B§—$.œ%–\z¢cÃåÄŽh¹™I<ÚÈ…áqCÎýæ–ãÂà¸Rˆœ ’ ¢¿”SÏê9šÆ;¿jA„¢)ê‹g†)ÃÎð/ÝþUˆ –Ç;Vªn—ZèÎÈF7…Ána’Y//{‰ÙF¼™¡ ãT=#EáB(ýàƒð¦ÚÀið¢åÔçTŠp²q48p6 RœÙ£9©éÔeæH)s)×3¥,¥åÔtΠ¨Ù“Ø#{h¶øÈž¡9²'i<²g ÊpD~á1_CaNï“æ¸žPÝFe›U횢Í;û”²Ô!öŠGœR•9Ä1g ÔÌ4¸Ë-ÉÅž¡yÄKyxâ¸#^ªÃcÈ]à›p€â'Ø„ÃÇž`S^ÍxGl¿È1±eˆ3>d–!§m2<4âtìø¡œ Ì/Ö$§ OUbb€¤Pº <ñhY(([RPê‘!GQþ¤Ä¦•‚†w6Š —jð,†ÝȯËìÚ)bÝ€n@€ Ý€nÀTèvt;Nÿévt;ºXß;Ö·C…:TèPaׯûS㪚ý©ÏîŽÒØ™âîB -v³†]ÎmwL\=GÕTTlö0€ÒþhÜ#ã{kŽü¸ÇQÐQÁ`mn.ô3a(Yw¢(Íøƒ&Ã÷ÄÔ?”hÄC xœ.ÖdSÈÃI /ä5Jš–HR7BÉF#”·8”ÿ -Ùø'ް3°åWè_%HI4ÛƒýȯQÿÛ(Ž=¤X •p·¦„²Þ(eÃm@  Mrn5cyR‚Nûu@Yû&kE•´/ú_4ž$³ã¸˜J8Kõð:MC4ž^â"“Œ©bÌçÒ7a´ŽB“Hí•óKÂSL’ðüÒ S¨T˜ùxÍØXHô“Ä`Æ*ùH¥48›oHf¿1©”&d‰æÊ,%‚tL½ >>ÂÆÆÛ¨ -LÊb±ûM>^IöŸÊòQ?>>(Œ²aIø?À'<‚…?û#X‚cWjQgþ\ [‚²¨»~*ÊR¸ºòñ,þ$>[ÅË’údÖ•‡Ê¥|5<²…†/xÀ†)vBrk…d«ÄÌ(3Ää„‚3[}°ÆÁ «êya1V;B¬ç{ã«Æ ÁUŽæǞͳ7¨*«»ÏæÙRåÝþX w à辊æÅ¹;8н°¹âãx *OH£³þμâï,+‚g7õÁôBÝ$óê’ÌÛA×A×A×A×A÷Ž k×Ájgôçì–Îâ}iïKKÑŽ÷u¼¯ã}ïëxßâ}íâ5mãÅOç}Yï˺€Û.à¶ ¸ín»€Û.à¶ ¸ín»€ÛßkØEYv¨Ð¡B‡ -]Àí{u¬6&&Ë/L˜Ö‚ Ü,žJ85‚óÁ:û[ «‡Î™O¢1|ΧŒªšœ+fçÃAcös=hÌöHVä» h,ùÊácÕ± xìÒR&°8´òY{ªÁAÕР™µŠÆÐ o¬†Ul¯ï= æˆp˜ŠyQ§´%?RI„l‚)›mšš<‹tN&ÁDGE¾ƒ6ÝÒ£TE¥*Ž¥Tõ|§uÅè`Øó°F«š3ž6å<%=_”ÓžÒ:-å==Va­“·¨Fäd¸Ô%ˆ.Ç †¤O1§³I48ÛBGÛhÏû Ó<3½8$Xí&X‡HVhùˆFx8G4Ö×þdqE“ç(¤qe:×Dñꔯ‰Žš’°ÕÉb<6§g3D3m(Žt–É"ÈŽ9»Hâ!©£\´¸ˆØ1¹3Û B‰ÇG½[‹VH˜ã²IË7?î>u¦¢ÐðûU©=ŠTé|žÂx)ÆÆ113Ùž%yXcÊùœç5%óUN¹¨¬kL^[NE -òîÆäëMÌÊ%Åû ¬áŽœUÎ=29¸ù©Øtg½TST¯ŒŠÁCûoÆ*,S—L„³0 b¥uå(fˆl.dvèýcŽ -²ç:³÷em±†Ù‰’8mÑÂD -„”=„tkíPuaŽG™8ý™4hÞ÷–Ÿ¦åŸ¨ã‡x‹ÎáÄyÓÀ}8!“ út‚ÆBØæw;éG”2O”‚œú³älJ+hÝ€Æ(ÊÞÀX„ªRó_Ùø·¬j™üÁ>ƒpUŪªWÕ=Så-7ä¯A MaBe†fßÔÈ¥ræbâ Ì&Ó™´?f3©Ð‰ é” Ð,^¤6*I™tÏ’¾û'm}ìâ”b×"«æœZófW~‡•ƒíû8ktÓ÷$ø¦+Wé›0R³™Ë^ÈÜwþ››²™Ûôµãþ°AlŸ—ø%Ó£½Jœl°:Nœg®jÈ×`¹tÁ?6È'ýå@ ¿Oeäü¥…)¹)™Ï,‚Ý+'äÓs¼ -ïß;»#û¼âg ,ʦÀª„ì‰.@Aä`Ï"Eojæš¼X>áj%3z‘ò,M¼‘å2ÍQhkkMIhc<éÛT ˆNdÁ‰Rr¸Q Rf)e±Åµ¾­,hXA×.Ó§£þ“ãè¢ð=²€5¤‡IƩ⃳ûªºá[ž›·„Uæ-‡p%ÄBã<-á@šd$7|>¬³8`Ÿ}ÖÐ^6ô|œ”`sW-lÂwWÛ³ï±Ë2\;Y>È’è0l3«6+÷§Ú^õ=áÚ±ï9„«ö=á:©¶W}Oûžóaêì{BXTÛ«b›}>ĶpìÛÂ*ƒm‡°å³Î Ê+rs š¶ïD eÇ^â¿|Î Æ !±$Òxl7%»:zpñKw-¿cI‰½/*½¡éŽ*9–ÈK|wùc™Ö±ÄwÓ -ÉNT^qGQÝJ3•ÖÃADeºqµmX%!´ <Í)ÎKÐä±Ä¶ÚÞ©DýXb{QW»‰ú±Ä¶‰ˆÅØ %¶»û±‚н/*½¡éŽêj<–m4É¥…äi7Þ·‹mbƒ¥ç >Û÷4ÝW[fœ!FÛ ±åXöTmïT6ØÔO;ž¦ûjúYjÖ‰ÏÅÿ*ÍØÖSV¸@C3êÖ“4¶œ¯Œ¶÷ol;. Œj{Pýh—CøýíOñ(JúX³6FºX?ËH ¥¸…/) ` -3Ä5ÏÊ5Z£"ÃÕüT½†žZC° ? -dó Ó 5©Šiwo‘ç…æÌ£Ef·ÑÂM&,Ywæõ~ÆÝ¼EÆÛ~ÓL+þc„5ªPq¡ÉVgõh¬qçÖIjö·!žÆÓûG¡ -`Š}NQF°†>NÂÂêg•ê|zšæ©ÙQíyYn&— Å,Ýo«+Í ¦Ë(©öeGµoäež³Ø8˜ÛÝíîèÅŽ¡7NÔKñ«(z_~ÕûíçÀ^ª%,±Œn‘GÕK‚jFÔd¨BáŒäƒ¸ÈMÏ‘™(’(©a±Gþû¥â«k£¹öc±ïS ‹Ãj‡oº“â -ffƒ<ŠU ‹óAKUÃx;ÔÒÚð•‡ÓâPεZÂMÓ»¾w†óMÀ¥±87©ÁY:~â©j©&W]h"w­&@à àP<ÈÓ€ø½à¤ÎUðÚ[CŒ€çÙêD9®Tyb*1C‰­„Wae P†^Xj¦tsu!Kù@ü 1ÔQ%ö@ƹ©T±Á¨ÖE›jƒ‰hØÉYHVS[UöýÈ£ùq òµR\E Sò½öýЉCã &}ñâj¸}˜,¯–›õ|û¶÷5T}Ù—€€QV¤_õ®ž?l—ë×½/G£áõõãíÏ›‡9ÞûUïopç7ðk§×¼z‡òÚì"M{DtPÔfs™çŠ ª£CñzÿÞ™öO›åúá™Ý[GuŽEç>eo*_/oçí ýµ\­Ž¶E-ÿn—Š{_†45×ßonŽe«åz1oWp¤AÅ…b»²€÷m„â®WÌч‚R½Õ©]£¡Ž—Ç2ÇÃQû0sÓº]k)Ayl›Ò8ˆÝ®I`óíÑQP«?çoÛ…xnä³÷ý@}?nûÌÑ©‰Þ7–SéÍÍòaùDZƒÜ.ÈÞÖ®ñ¹!T$”íæö£ÜÏÁÿ ™(^¶‹òœ«-µLÇ8C[j\Œw§'hk×âë´]· ]0L+ÁrN0LÞª‘tÁ0Ÿ^0Ìu»üuÝA…ÇÊí²‹vá0!c:ƒÅ¶‹j|öá0×íòr)‰¶Ó¶…rF8LËpì¼p˜v Ö]8LӅüØœ¯ µË$z.km?Cm\.#»p˜Còn—‘á\òвEuyh\:ÿO—Vo/Ñ9~‰¶ ±Ÿû -ms/žPhc&’ócQ.ÍrüÆû–e˜;ãèŸv ¤KfX’lÙžžÌp¼Ù¬Fí‹NïÎyí’6¾ü Ÿ_ð%;)ŸV»L€GfÓ:ƒ!ßñ‹vÍH—†¶£hE;…¢¥­R(Z»f¤£hE{7m±ÝÚoû1´v $” M„ÖÑ³Žž}¼ô¬]âH èY»&äc¥gm$y‚¿]'ùøßÍz aü¢]³Ó-›Ö,›¬UˆÑ¶eÓ®Ùù8—ͧ‘Ik»¸ÝÊaÒ‚LZÛÅÝbþ09:KÓr}³xµ\/[fÜ †Q߉™Âîï0WX«†Öe -«ŽF¶l8ŸYª°.ÃV®€äχvtéµ.;¾éµNÚ"{òõ¤†ÿ£ü~Ÿáï7p¡×ªáv{?^¶ílóÏæ¼ÒãÓ€µ DÙÒ.}îŒ ãÍíÝæ~ÙNµê´}`v$?>xä㢠í[@çºX ½%þ•ãsL´Ù¦:‚¡]÷ÎÝ#ÚVJw6e˜o—on-[E—¢mìjéh~?éÑÒͰØíÊ@øª¼¬]Ij90Ómˆ¬ äØåÒ2Ô:•‡v»«ÏØ]ÝZ®ÝÎÝ¥Gù"ZþµXý´š¿}Ѳ)ýÜvÉÕ‡zÐFìO؈zº]>AçN¾ ±ìÜÉŸ¸;¹;xªs'wîäÎܹ“?yw2ImèPVÑ7í“à:rëÜ+ ¹õ ê\ÈåTþ¯^=Þ/žaR"F§Æ¹©éÔ¸NëÔ¸­ÆuwjÜyòØ¥Ô¸•a‘ýkáeÞ.½Ûõ¾<í‹tä"mר‚î_zËåI:ý k$­š›O? -ôh}¾à©«ô§0ë -‡hÕȪ㨉g€–ÏO8¸«]¥þWl2ÛW †œ2¶vå”/ ¢ÿðoÖĦ?JØÕÆp’€òünq Ƕ³;uv§Îîô¡‡ÖÙ:»ÓTgwêìNŸ¾ÝÉX™ØîdŒPd~êìNï?ýX-wuøˆ™®ãvF´Îˆ¶kZî~Õ¶M†Ÿ¾!íI–'à­Ö~³“E®SííZªõQœm’ ÊŽ~úרÇðe#¬â3Ý.ÿ‰Òû¶«Ë¢QP{#W?ß«åÃOóå!ÚþqQ„6gk9“&|²ù3Zé2>#wF»äØ.wFÛ\£gäÎhD:ÞÙ.Ì:“y¶R èøæÇ§ýty§ÚF©»¼SmC­.ïÔûË;ÕNnýIäœ:°ú>¸´Ë9µ; ¶u >êœS]î„V+7íµ@W‡ô„|í¢ÂgäøñÕ«ûE+cƒNZ<Òíâ¦}8÷é‡Yܼ=r,í:ó»]Èñ£­ù«SoÞ›zÓrjs„žó)B¥í®ÈRñ|þf~³ù³ËtüaµÎN5ëT³N5;2½UCêT³– KjæÆ’·j g¨f-H§šuªY§šuªÙñ{,ÅîKýE«¦³F³%Ù­É_Õ‘¼YÞƒêcâ¨]ñ½/éÏåÍñV“– ÉtþoO6j´Ë‰Ó5ZoÔøåqûòqµX_¿oé¬ËôîP²Ët(–ë£Ét|>¡.ЇL'ô°96vЮƒ°ãUbÑeFr¶°ùýb¶]üë8ä ¦KŒtÙñíHŒôj»¹=z©µ+•wýÒI[¸ŸGMÈ«íüúa¾úa³lÙVI×âS-ò×íR|š-ð'“Öâpe å®oûãèðá–åk û_uÚ-®ßü²\=´õæ9=Óª–†ñD÷ÐuË'jΡ£3°µŒh°µäCz«·ÂO-ƒB—wå£ ­8¼ÿít´=ÊØú0oÛVàÎÔÚ™ZÏ¢×'¨á@Úƒ g+8®Vè’jDô)ë튎ùÜÔˆÏNdm¡è„ÖÏZh=š |Ѫ¹xrdMËÆqf\MÔ²á\ ®¦mCzz\Ú_È?Ô)|Â÷‰*|Ÿ®ß¨u’Ü%U¾vm羬Æ×®±u_§ñu_§ñu_§ñ}„êQ§ñ5k|í2™w_ë5¾.EÄû×>™›OŠajêTê /Ú¥Ýu /Z¾ýÓOxq4=ØX„kÑhj¡Ë¬ørjúŽÙj³9$;·ŸŠµïtó„ëèæÖ ¨‰û¿=úpÓWˆf| ì×/Wóëß¿éqÕæn~½|xûuÛlÚfpŸŽA´“ -Ú¼¸:›ïÇ… §MÛï)¡Ç¸}Hxê.• ÍøÌœ÷ýÞm2“%½ýÌh[GrÆ:1½e›ejì~þïåíãñfã¸]&V×ûò +èÈ)ù:Ûµ­1èþ¥ýP'É m<¤µ3´£8ÂiÂ|»|xs»h[r£óiC+m›uïàïöûý­ v»2qmHRÈ…¡¥Šv»2c—JË ÒñÎVÁãLÞÙÊ1ulóãS~žÎ:[F¨;ÖÙ¶ÁÊö0Ù2NØdd£^þýóêµË -_Ái ×Ë¾í°¬•X6ÈzQ¯]ã: ÏFžµÏäGLÎÞ½ úpÿÙrÛ.ÈÂjêgka3ü§†j­]BQ¤: 6o8ëbLß_4c‹‰Ñ¥bŸL¨ ÂÃÕªU³âIôegæh‘lÙ©ÿ©u#9ó(ݲá\ਸ਼ éé'@ýc³¹y½·LŽèŽò·šãŸ¾~'£Óõ; -«4Ö¼øa³þ FD „ú\=Z¼^®Ã â‡;j#áKÏß޾ܬė£ùý¯DÔÂïoŠGñÀü'ðíG 2)ÐÍiV¤yL"¥|("™&&Jì·¹ðÁc¿½…/ÿ þªþì%½ï{ÿüŸ¨wƒíÿ,ú*Ä‘Œ{*äEÒ»¥™©¤Gƒ¨ˆâ^_%•fi/–ƒ<ÏT¨A”f‰« ªI}Í3A¥þ!jU®Uø®Š"·ï…&2ŒÎ{zDqŒMô›ªÊÝ}&^Á8&B&­¤îÉx U¬a®z¦â¤'õ@iÜ“’ï)ÔãuóýZ@Mž¤™¿#«´•ß1¶Fiž±g¾F—)z µ Ý¥;ì[íwx«é—»#©´”ß1®ç †×D¹ -ÆïjLïá!™¤~¼zóu7~Pª£ÄÕ¤•ÒÊ;ÆÂÖøñ»Ó{Û¦}«¿í—­‰+-Ä•wŒkcÅñ÷«» ªLÿûØ™4òCî×ç ÝÑšô«óد¾~,úÕ>> ªÌ0\ÃvœýúT¸º{ªÓÙ¯Îø¸>ršÂÃÒlØ; ÂÌ,˜ BÍÒ\0jæÁ-I¥¤ô茩 &ÂÖØØFÝÍ{ƒi°]ó·d•6²Ò[ƵñâüǯÍ4£¢§:I’ç!J Ÿúr™Ê°‹Å Õ…Ì® ’¤€f@äDc¢u”58œ¸ˆ©Ÿ¶NtK²ç[Ji$£¬G¯£¹Ê±N€ÞAgªÉB&x1s¸ñ%*…)"éëúøžlŹ2_RsñF$Ræ)=«p¼‘,{M;±¹Œï±Ÿ qã<òOrã2TQœJ¯*dSXÀRîÕ¦tŒÔ'èGcÛaZ`Ä´*â<¦U(qÍ'©«‚‰‰’(Ìè#³ò<¬J¡°'°æ|%àM–i¤¶-IX†ò‰}¡­¹Fp% ‚Âß• •g2hÉÕ/tu®_®%Û÷êø®™úü*¾xêCIýâ €$‰°9,€,JjW?/æ+ÞK÷õ@ñO .¶ëâùjɹ Avüv»¼ù? Rh¿x6›UéîéÝ%ß>.oXjýâ…6RtpÓÏ wÞ?l)â#PñBÕoÄô‚Û ¿/DÑûò«Þoÿä`–`›dÚÇÕjñÐë÷FóëßÿœooJâí#K¶»ÄUUäU ›ŠQHkªRüÖ‡_û•>OÀ ’x}²×Ãñ:þE¡Š>Àš .‡Ï™»aQûÏDðÎàîÞØöó™½vóÆè P“/]£NtÓ5ïf¹€¹N¿Â«€T°ÔQ‚ΤTªÌŒØÿG¯,~å\Ñ·_úYVÈ^ -z(€Ä£[Zv£¼k¸F -€©¡r0ˆAvNŒ–0ˆb­ -¬Õøµ - Ú9tPh:ó(–”ô8£ùNŸi:”™ճׂ{p”¢‘aÁ3}¾Á¦Ø‚÷õÃû¦{cÛÏgbÆÃ•¤ -%áOøÖb é3ýúoæ•Iϼ>Ð5úßÜ`„î øæ‚½“E*nzíÚw/1½ ×W6H#çoDj×Ó ¸tGëz‚Ë‘¿5Ÿ\³\MÒÒ/LWôÑöÛ„o¥ûLW½Ö7mšx«»î1÷^»þámkî:‚àËáz³”LhDŽ׸ -×8¨¡P ’Bš¾E¶Ì£­BÁ1.4rJ” -°?,yÌ@“O$‰„¹.Šàƒ¹ŽÍÔKVÐÜåð9s72xË3AH\°“±ï£À×yÓâJ:.Ú‚Vwœ& «Yþ Ô™ÔHÂWÚóµYbsšÔgЉßnÝ#’„gºù‘¤\;£ë“ß2:ú-i†âH?£ë*‘v$ç¡LåÁ[#E©Œ`º‹] á%¸ëÙ®ÙU1Mo -„KšùPäI"EÓŠ•€T¤!A§s LWñtàAŽÕ=?8÷I¡F‚òÖbe mÀè`¶r¸`Ú“µXÆæYÕø,È—ÀÚ#ÏÂÌ<õµ£#_›e9à$J¥×€4 -$_‚H¤A’-ÒÀ@9 ¯¯oÞ<¸XIx8|²wõÃæáçÅõf{ aQd׌W%›ñð»o yµÙÞÚ Ä$^ý¸Ù¼\¼~W¼€Þ>ǃ_ø7BˆÃ/  €!êD ©-Aš#K‰%Ê'–eÜ -e‰·2œ ~àKë_ ¢éŸ–-V?-¶¯×,!ý×|}³ZT‡µKzT=€-ü“êé2£|ï2ã)à—ÿ¾x{¦„9Ùü¹î¤ËÒ_!™ˆóD¤f)%¨m£*c´îTWA‚æ™±˜i¿ô³<åÍhrhéNÖìdͶȚÙQ²&𢬙òÙ*–5³Q­D;dÍ䉲fÒ kâkŒ°©KÂf’d®—~û¤M” b™g±“7“ ªò&ZŒ’A„‹±YTh-‹«òf - Ú5åÍb&2 åÍcß2:ú-i†Æ¬8?,o"¤ìøÁÒ×áZ±j ¢‚¿àkdbTƈñ²TæzÂö ¤ ˜ƒæõXÚhè§iïc×$7ä9椒ˆvVVðñ•(§Ø f"ãÞ –ì9:œ T$ -hv4w§øpœž‚){»FǾ „ÐA/t/Û/~š&¢ ˆŸ»'øƒ‹ M8ñQJ ²ä)Šì$К:Ûl;ggâìÄÎÏCìŒ;ggâl9ûyhãÄOÖÄÙÏgxÛ“œVæÑ9@*–;gŸ-ŽIƒ  AÎS:-Û9ûlqÄ×X‹cóªÐ jU68>õµ£c_› âéeæÜ9ç\Ìì,Ÿ…œùlñê¡2;Kg'r~n"gÚY:;Kç±£Ú(ÿ¢á²‡±°ö²cF­\ɶºˆ.ôýóäéæÍ¾p™* éÍó Nz36Gg*ôãÏàFšG–›#èZ‚T'y²ëAü«©ÐŽBÃÄÁD=ᥣ“^ŠÜ!†š¤8(y^Hðlžâ.q~2†MÕ6w œ?Ó.½Nâì$ÎNâüÌ$μ“8;‰s—¡Óˆœ}+söÐÙw¼pJý’ØÙ²Ü¹gî­ä× ¿å@aKÒfð”ä©Ìw?¥“AŽû”J8ú]£SÞuq Ó A-•Á:çòì×»Në°NûÜ0}) ë?œ“Y»>tâ×¥Ä/@":f© àDóGÙ°EúÔwAÎðg¢1¬Qq(¤zbTcŸ7}¨4ã}Û2 -¤03À Ñ(w«$©`72AD¦2ŠŽÇæ &¬?šÇ°–™Hv“)¡ó”׎Ž-ò βØ<;ê÷F˜š©,ˆž*Šb(_,1±,`†:F£{¯Ÿ§|%äJ!IµîÆ·_úî²}¶ÛfñËXзˆR›ÚЊo¤fðŠmÆVàKìg{Í>ÏÙ©ùp;IgÎj‘h™:¶II÷†G%˜†$ðÕl¤²°<"Gš"ªJ Ôô¥*)EJáÓ&×8ø0R¤Ð•˜©S_=z«ÓLJ4Ӌ؉&KñåY¬eNâ5%é@’¢£"§˜¢,S:)8íU‘J”´=´1ß MeYLß Ê@æ=Ï]4p´ß -sÕ>ºÞ}º--Ò*¼b›pü÷ÕõÀ=ý ÐïF_•ÔeQ€Á@“8ï{5Áà$Î ^wû¯Ï¯}¼Ÿ&+èì š”t«°™`¶¦ÔŠ›û7aÔ¢ÿö,øfGPŸGHÓ›RÅ³Ú 5×ÔTŒ¢à@VKÆ#ëhìÑÒ -†Œö?\ÔÒq¯Êöø-×J`…I©b\ôÉ—‘ò¡’<²«-’”±$¦Åy2q¸:cx P¢k¬`™É`âB þX”S°Li¡ë4uú‚…ª´a0v­€>›¥Œ1ˆ–®ŒøÊo$©¼¤pܨSëˆ(_ÎJñŒ•¦olѼÇÃI‘IÂð`º¹’ÌÏ:Wº©ÏH ‹ýÔ3޹iO1w`ÎrL–WAúh0ã“b…3/,ÂY§ï•¥Á•Ï̵ Ê -ܶŸuÖ¯=Lß\÷=̺¶°Ã!À3TŸÝqÓZÈSIàøÕÉFV¼I‹çnRƒ9ä­H) Têj4fõÁíR $¦ð×~ÇqÙÏ}{Ñ>Ü·OÛö]ŵÈ`É&2¨Êå€×¶b+Hr1Ÿí5ûtõöûøÈ­È‚ V¥tV˜Íl ñªAŠQ’³·ñó˜¿Bh&dÔNBu! ›Ÿ5 — ,0n•êÔWÁÄ$fÖb¤2® °ýl¯Ù§íÃnÖÌ÷1‚]SFHS£sè.[°ß±uûÙ½Ú>ܯ¶ß÷/8ˆfx©‚ù£ýЦJgîœBÍVP2Û9¾fŸ¶HaÞ+·­É• nÁ~§ÉSnfù¢}¸_m¿ï_P«:Å’çß~|«¾~×è¾Tg :C~öðîÚäÖ¦¿6|¬6µ™ò¹næÉ‰ãÉÆð‡iÖ@ÕâB2–kJÓWð‚*bþân{Ò®‚•ӴȌԂؼ6ˆ†’¸/"GËU‚=JæB‚´Xc–ÏâÀÃð‘õ ß:ù£'¼1¶¡óH6j"hXŠÐ'—ÆyB9vS´¡Ñhƒu›\Å—–0É4É@[AÂD`ˆ2 ž-èfB+J 2ÒmeiŸŸ,âT£qî.b­ñ.P«TÐŒ»­ú-\Ogn‡ ;Áy¶‚ä)óÙ^³î4éXZ[KMôÃöûµ·»g›°ÕºCS”å•öXu;W‘W·ù]9`[‚9}mMd¬bô¯Fš{B“MÌŽO«†ÞÜUm!l¾öò°ká Æ¥!i†r³Â|šxKuÌTÖöõ\óõYøÕO—ï²m2€׌Ãî¸Z2x *«-Ö^Zîc¹‹ÕUGìQÔw®Z÷¬iþvVVÅbÃ=Ùë]‚ 1R³ù63Øi><ÃŒŸá¾ô¸i¢xÚ$Ð1þ€yýßµgéƒsçÙüÍâ+óåÿ0Œùò‡Yâ¤x–B?ŽI®i+ P|Jñm«ÐŠ †*â”y(P͈# -¥8¥AΡçÝÆDá’*âE4ĘEšU@GakŠìøºóA©¡Ýð,\ d¡¬OS Û¾QäÛÝÜMÔJ–¹V(÷»} ç~w½0‰ã%ÑazÚ§ÁP %ËÇ×#&;uJ™ÀÍ´ôiæbíg®OÓ‹lÐßÌ&ÈwwÁ{³5/E)ïu0NôɧhÓÆCLÎm{6„Ûà= ªÀd³ÈÄCFf¡ŒI~å«r¤9¹¦7ŽÏ£÷bð“”1ÆGdo¡ Áð¸!ÆÌú|CLbGQ–Û6úôÚHW'ÄÖŒéЄ8G뀿+H P”8<¦ ->n  y“žB*‘íA]”§äêÄgOEÚWlaHsŠÄ¡¯è€ÉS޳„¡ÝJ0[ -FÅöÖ &µ‡Š´–!¡YŽºK·$æ<§[É4·ÇTaКßÄùê ê§9é#ÔUéºJSy”§~44âD†C¦YIü¬à¼eY0o50ëf3­WxÁ.·¾Æ®Sòuø÷L«O9Ø(gO§ÇíÏÁþ_‹Õ]õT¡èÝ*„ë\0é®P4æXË*Cç:Ÿƒ€ô+¢ÿQ“ -*ûÕ'úÕF1©¿f$BôÅC)l…ûnŸñØfm«öÔêFPS¹¹ÖZåuÕîÔ{ü -ã#\ýö/LMŒÉÒ­=tvd@màC0’;Tõ«·÷«-bìSAGŒÀ,¯#"b*ú®†î&Šç³M÷]ÛöÅ}êLŸzƒuŠ“õjOØÖ‚fkï®ö®>ZÕ –cz™Ä1ZG²AÄÁWÀŠORD™æèVrEÌE‚:ÂAr'mžÀ’cþ)ÊRi¢¤1ENª4åéPƒ(‰Ù†HGìà–%®É—2‰L­Ä¨QŽéÔ™˜È:­@¿Dòœë?ŠÙ4?x@¾§Ák -=W@+ãDòY3tȲ¦#_ÇI”î.2‹ájUÈꔯ¹’8•ôUjRqŸå5@2WãáÂ@²4Ψ†$ ˜6ô»`à®"Gfƒ§7™*€Œ¦Àì8ÔrŠRèXOh ù,*Ps†ñi 8È)kætˆ$FÓ굦3SðxLó)9èáH™t–(Igƒ`$)¾'ÉÑYLïÁ3”ŒQA“¨¡oørâBHïñ¨¸Uûo°Ö5Že,‚ª¦K‚~¥Ð -_Œ†‰8ž6‚à‚ "Ééÿgï?³ZI–@x6À$„@BH”7Xyœ@€„·2%ƒ,2í~Ì^fÎùñmg~Ì:&"²œ,âö½Ý÷öãõyUVVšÈÈp‰¬Xe¦¼@QX4O˜œî1‘TA¡#)UgwWèàQÆÌB]“èB1‘ÎÎp^Š*jŠ*„¢»ÛÊ*ÐL ÓG¬{PÐì2L¾¼Ð°‚Þc›7)J ÉM8REàÙ½8((vÊVª \j¢”S€ Ãil‰Ì"€¢“ÝìK‰‰.VOf Ð@Kõ9³D2o‰3Û°í^ìs vÖH'¦ƒ“œ úeü§‡NËø¯#éz)†#¼¦¡ÏÌ£txÀ¢#@ÇAïfÑõåYN±\r·FUHé20ôÏV‰5+ptÚ¼_+鬈‘²²GºÖÉõ—½Æß:úž ®¯'Fn’PΈw·ò»Û€:´ÿ0‡lVÉtÄ—Ì ¸2¤©€@­’?Åè+ë ÇdåÄv1S)p¸/ÍüÁn«rÿ`¯þ ÏZà“ -Hî2ðVänV —(šóŠþ+m¥k<ÉöŠÓŽ5xë,˜_tG‘ -F",ö–]" -Fs5ó¦E$dDÙî¢0U—êvÕ"²e«÷Éf°1é®JÎþUZgÐüx|Ä¥¼TD1è8­ -+h¦‰^9’zDäܲèA„@Tqé|ƒúGaWâ8Š -ÐñÆ:òTUðv/]t9«LÅëÎÓ:„t|÷]`œæÆ?ÆI'—ßþÐñKIáPÀ×Q3C yNÖì"¼yŽä&ºQÅ*ÀkØHF|²Ë09¢î±›AO•Ic¤„MÈKó(8*w&Ùa?1ˆ / -˜GUS‘ºÓk#È5äø‘FÚÅ8‰]ße—ILuÃ;xy -ùF/[SzÇ›Àíf…#1ÛUI‰Z“]íØfg,©¬Yf§ ±Ò-‰Õ›YÀìZæìJö¨í†Æçö÷Á |†GWæ k>Pf!9Âb,¡¬º NـѠ€ìƒºzË)ÒÑOi"L‡<ýè^fMg6+Q“í)MÒW´É×pZ1 ¬žJKvèü²ÄZ"楫VOV.Æ©cŽ×ielN²h\‘8憶²hœ ¿>¼Kw$U¼Ž®Ðè/`2:ªÙ%¸i.T¢IæUØh5ƒF4fn4 в&Ú¡TûT×xfR5Ûq™‘ÍË.“È–bÇPž{ 5°»³ -ÐÖjÉ*r¦a¶2>¯¿\9"(è:IÀµ0RVA/E4cWnBáaG«ÌŸ„<¾é.z³D7/^šCæÛ0¹žhˆ`Ì|e ¤¢SÄ£îŽ>{V+vÙ­Ž]‚æGÝҙ͎¬´#™ƒ±ŠÜ VÆgô(1 *Y´Ø|@ƒ"€  ¸œnµ# ' :Ý«-qd×r•áUéä‚&r#ã3ÏdhÜÙE§¤„WžKÌ®f×âÑø…‚¡Ý’]bõWZrÊ@¾ɽÙn ÉDiìþ¬:À0GeײGn·41¿ïA‘‡*fì~Eb­ hëØ™8›é‰ ¥*<™‰YxRË.ÂS‘*²NOâx´)¡ggqÕ<°JX Šä4aØÝ`K« H,Ú’­VPL–æË@Ù¥%k,v‘=~³‘‰ù|d¦À›lÎü2%`¨"ªÐº‚7‚»‰1iŽcD3Aá5²ÀKæ5òt7Z©É./à …Î :~4SE°¢ÚXH9ÑœÃzAµññPâ„Õ"äRYBw&qàñ²J7?ItX¢›Ç(Z§qàC¶`)W‘BHÌržë`Öºxˆ®‘WTÌX/ ¿¥ãMIÇ 8(é˜fÆŽ€¸óªÂ#Uª@fèKÔª³£Gk[³[çy"džq¸•f9}ò2søçt•ÒßÑø Ï”wJWÌ|¢býÁBŠŽÀ£ ŒjQ4zZiDØÓt†&²+s¶ÈñLU5;¶ÏP¡¥[d Šð¨~)*I䟊œˆÝ‚Gå±¾¢‹vV˱Cât}¡^ãìšY]“ÍûÈ÷|Ê‡šˆ€˜/(U/<`U—Ìè+îàã²váA˜ -s”þ®gû§–¦Y–æ¢ß|S‰9”ï†À#8˜&Fhª2óÿÑ%9 0B2Ô“];ÂáÖRП…ì@r‘§' !3þ‹(–ȧ˜ø¬³#E|F_œ%ž9Eþ„g´tu“”é” Ç1È‹È+òòÍG2`¶ šé«…£%â=L\ÄsZÔšÜïŠ)œà‰xhL€Qðk,àY*ÖE™P0Ým,q/ðÉ$ä¾Z`BE'DÓu…þ’–€‘2H>U`Þ@êðV;`W2~¥yìËHT¿¢Ït©ÿ˜ &è‚)hê< št‹éKš¶Œj:N•„>yÔé'¾çA]Gï/€ÌRfG}q&»¨ž˜ñ„f±¾‘€¬Òa=Ù¥ ½iŸê*c½¤Ië¸öñO ÛÔÄfý£ø™.4AÜP…¿›Wú[ÖóW¤"ªÛ–ÛĨnÙª1)ºDG˜¿*]ÄÌɧ’'TÙ$SH&?¼ˆ¦óäà@I–¨–®`¦‘¼£Y²'ºñ',’ôKF m8+H‘俉ÎÁÌãug!›¨i*;¦ä$ŸU -ÄR´£Â$n4z,»„‘&‚¼Òi^ð¬2Á…üðG‚=®0ˆPr„"ÓÐüG}‰Â¦*3g„È}3‘ñà‘M¤Ð -çEæx(‰˜8Ú·q—ªÐY„¦žJÓ²†'­äúÀ‰šÆüÜYà7ñÐYv’ŠÞ1ìšL3º³ØpYÑ=VŸòµk¡0 €(y§c ®–ÎÊé‹u'×7C¡¾L²âÄwxg;ˆ”‹3„ÑYp¼€± -£Ð¢‰`ÿq²PPB8þïÞ·ù-+øëQ ~„f°Ó~2”¡W ]í¥h:“GU¼ -mÂ*àâ¡!÷“ 3ÛY’ÙãeælÆÜ³0 •–™Žƒ’Ä>ÒQá&ÍN ßtv ›Gjè{Gdt¦®°*ä€È,­¦É¤ QcÖ%ÓˆŠ"12cèÎP'¤Øô‘5rc£T+CïF•ð}†ÙwìP1Õ.FIA!/6f4±YTvÓÙ$¿UkÑDte™¹ÓÓ_³ÐOŠˆ"¹´óºÊ&Ä™G’™,A‰Pó¹êSÔ0©¯ -ºŠÀjQ^½…Qb Pì ÀJC5ƒ&¾)ˆ8zªðü)¨Œ„QQ¥Pr ü´O§ug¼I•y~ñ¢0õS]a&ò#s‘ŸÇ „´&]F"šŒd^¦÷‘"*è÷÷·õ—Ï.ä¯FGè2iåú wôkÂ$¤f’ØÂ,›†a0OÛèŠQÃc4¢/ÀŽÑÿže´Z k1niÌÜ‚z1ºJ•ð.UŒZ$á@bf*2‰° ‘u¶UEö@%ŽüMQ:áÍó+™Ü1Ñõ’c{Ö48«Ó{ËL*¨2Â]æY-‘…ŸpÁÂîa!â” [fáæÊ)0 xæ1¨Éˆ\Ï3¸o–6$r Œ°¤9<–j„™ŠÌÀìhèW”4ÇÆ¡c|P nÅÄöÐw} DÒúao)¨Ã´~d|”»è*jḲº™_dâcXX<4•J¼ -[N•ËÆ¡#YQ…—ÅÅz³“"AæIß8´[M~¨³œ]Ì*Göµø¢Ã -[mˆtÀéœö1…@ÇcN¿ƒ¬ñ¹õûÕxÊgÆ82´2¢¯`쩲l-eÕ “™ã/¨:s¬Ð}ŠÐeæi‹e:y ªìdI˜}¢©6«¢è¦ÍAG†›‘"ƒ¡[æ‹'[:QL-D&i¨jzsS$ÆÂ6™ñ»‰@·<0¢jzÛë¦c;¨Ù胋C§soÌì¤Ry4 d§©ÏxjÁ²ç ”^Ì<ëE÷q¤dDuÆøÍ‚…ërÌÿPö!UGJ$i -ÈDh`µÈ ›3u@y@]áØff¹¶Ku©[Ö@¢û£PfÔ¦œ ™º(‚þÉ)3¾Öé„& ¦° 5…ÝvÌœg¾¦T¾Xßt畨ªœfZ7$qÖ§J “£Œ(SR7~.päg hLýˆvPÚ)[þ¾pñÉÅüÕhǘiC7…xT@p‹£¹+ìT+Xî)ÜÇ€% °ó<ÊæI~JoÂBi#òKÉS ­£¥ÃŽTAÀ ^·ì$á£ÝAÀ< ¸î’zúþÕÑì%Rd1~:|e”_01s@S(T§ìuÀé\ƒ§ã¤7¢\òŠˆ'”•‡Lšä»'è–²Yh.Ùwš!Ñ¢³Êï Ðz7¯o–0t™£ÈIY¢´AÝ:G·;£-ï  ?Ð5Á´J3ƒ -r· åÁ›Ý‰9Á‰DþI6(è,sª¨(Œh`0$Ú4=²†¸ µ¦|,Ht‡j/ ŒƒàA&]¬WÜò -¿ÂC{Ò´1©¶Š©í(Á’Ž9¡ã‹— á" -9D~œ[›GßqàF_ÈøüþjÄÂv!wÛ…m¬24tš ç.»½¬è<[7#Ï€»QÖ0ë'3¯ë¦…ékÉþÚy¶:`ŠƒY¦ZF³ŒÞÀC-ÎùIQ,xÎ,qÆl~>1‰™›YeÚfBfE¯hš P‘°ÀÙL= ¤jC ­KՄǤeáI“‚¹’»af8$nÄniÄvVžŽ Y¤9_«º¸.ž.«ÂX¦æOvÿlךdÞ›˜{ðjÔ*6é¡:‰H®ÂP R¿™Ø­ŸA'Ö7 ÔÌLe -"‹à×ËáoyÔJc Èfê|6^å2— T±“þ€(1–ð£ -ÐÛ]4ï3‹¤ˆ…'¢$‘ä¡ë<³ÇJèîo”(g†e;UÔÑ6ìg³vjCEN† -Öv?ÒU`†œK”þŬcÕnd|>¸×¦£Øíiæê( è(Õ{%Xmá%èÙ¦$Q^ºV]3õ>RªxvÈWeÊáE bÉx´Œg²¢ÊN²0y$ªUsf•£¨}2èš±â¬SâLóYAd`žûØÇ[1€•™EaŒìA=-Cž4f–r<»)*Óe¨t ->ŽN!11)ô §eQD×DÉÜ­ºk¡3+Ê0è¡qLÔ4–U,¢i*3V™%⬩æ Y™…&™%ÁJ­¢bð7õŠ^*äÅÎédž“˜`fNd)ÂmB˜H…§¿{*–™gÚ/!÷Y’3 -½Rm"ßËDyCQ (·9qÌ0ŽæYެ!x ‹ÞddrtI }v:n´ž‰˜§“‡?º§Iû”#ò‚6ÓP›É™%¼â@ftû!:  ;°ôæTÖº‰ª›$J2ÑU¡Kñ –#s õI§˜ÃçU“J Ì+žt%`kMŠUà0Eá J”_†3ŸéHs^êÚ†¥Iè4 g'BTôÙÁ*Cóÿ¸~È^AŒ/™XVøéÕ¡‹½Æ× ¿a…à³É5‚ÂoY%¼-‹ÿÅÆî-rx_ßifÎ;Ên, ¦Â),‘›hfÿÇàASY!zY¢ØŠÚ¸ª™ÇšœYX¡È'kôWŽ8£r¦Vó㲊騖ó„Yæk+"ËN/1#*ˆŽh_щE ‘DŤ‚H”ÅRA9AX†hPx 蘋ìˆ2ϸ™ B³/&0Á³dtBQÚ8¬çfH‘eE±K$ô)h)7óOãÉ{ReFUv%®få!¡ (<ù)𺨱x)‰Z(]%ÎwnPÀ|P†•abbÁ -º!ŒÃÍÊße•“”õZKþGö\«0ȼO4¶TfçÆTKÓÐ!ÒÙ!·B© XÒ vÄŒGÔÌIažYZ tóE{'&ò”%÷9Ëá‚Þ=èõá©\b }|Xˆˆˆ.u(µZ5×­…°ž)¿ý²Jð\Mø°tQF;s,ω -”KPÌkÇ(,H!s“Ä3;7&ucîÍrDV8úH ß>²Æ±`V泈F. ]ƒ$óÒòrV4–FË <Á"•®îšÃkLœ1<IŸ$ -Î’Œ¯Zbbíd\3]aIxAÿ–|Ó³z©:È[’Š4\Å„^:®1º`ú’ÿ²¬4(ô¦ç=¶óz-šù˜C$‘ëªÏâºÀSD&éæöWLî™aG”ê$c`‡ÌR¿""êéHŠ(s4C)Û2K“¯§42ÙÕäxœá.xE,‡.è“ȫϮ¯!aÚ±$7Hfh™õ`F?é¼l^2ˆnyßçú -Ö ìv$„ -]=K·˜ˆdÏ@‘JÇ_a'õŠùð–uJgB ýx:éSttð0/Û†¹¥ ƒx†¬gæÀc>ºuýy29K”‘ŒÙô¥5P“S2.„d-Ƥª2Ë·2ñ><ÑHx²£ðäh“CO™XxÊüÃSÀžM´3cÁäh&ÃxºBUâ‚©T2Ϙ×bjGŒé`·œcœ(r– m ½8Ì&D2;&! }9òíh»Szv mìaDÅ#óò¿Liž®žuˆª{xxƒíØð)“¾=;&]×5ïdŒG†Ë’ÿ:—a(® ªÂhäXò-3&‹ÑŠ«;Œ…aäÇ©›b¥aSÈýSáQNCȇQdt*¤jæá%ž‰%ÈN!#dí5ãÉ%ŒÁÅñ+ÊÎ3ÿ~2n ç%C#|’Ž]ÉPyÅSúQE 0WÅÉæ04O (§S2y¢ÀëÅ:¡›0¬‹ŠƒÌLBlfrxvÏ.H$*»o¡Û -Q\Á;Ç ¦Ž¢:_H(ª¡”(᱑Bážš*3ƒ2ÞÇ!áå)*jj(‡Üb.úYãØ)/òô/5‰Y[ ŽÅKßÜi|ÁNñ J%û·d -ƒ3ÝöïYW&X<žó”:­ngØ.{úµB×ð´:e7›Ÿo?Ÿ‚ÝÌ">†ß¬p ÃIýg&ú1,GŠ1ç GN &ÈB“¸N'j“ØN:ô¾Cé´f§á¼ièÃzŽ1¼ŸÍ9W|b mTVæ ¨ßíÏŠ‡ùÂÔôQŸ’ Q$©„i <·dØ“Ìb0¤Œ¬¿<]zÅq#C¶^÷#R3WͰ»‰°»uŒa¢N3KÖßdJ&2…·’QrzvŒÇë -7ç:p4Ë@¯2sy´¼("˜yµ™®Fc·©jߦ£(¦4Xú|?ñÅû†Q–ÊøåC7¤1=©ÖU1 -oçÉð(,4Ek+ì2J¬KŠl.J Ì’pPL<~¯°tª§emt™Æ3ë:>†ÝM„ݭ㻺ΰGkTÔˆ¬±áŽÌëƒkáEô%“ã\Y×ç_ Ï“ƒ‚Z5ò?ÛM|ñn0 •Ý%?ŠÉŽáPë,ŠîÆÉÌéë ‹™ÜÁøBfÞ3.ÄqNâO‘Ü…Côœ+dÌÀÁ'* O´žµ61ZÖÜø¤æáÚ´[!euä†TwXˆÕ#Kö¤iæ¨8‰!¹U&™Ù€hzš¹]Ü[)±4º±ÜûŠšQ\Í8f_¸—íÁ8Dô_¡àá‘¡ÌØ¿sÃ`W‘Ù{ùñLÏ3FQÅ@ò8Jµ1úuZ=‘¥Ôó›Œ/ФŠÉb…‘°+sOò£™$&w¥ Bñ–]f¡bï7Ih‘p!Êw²gt ¦P7Qhív{oaábaó#ˆ¥˜ul¸Ô’ÂêM)r!œ»pï höóapšžh;<1F&Ç:¾ÓnœÝSv.˜Ûù”gÊ‘Ü;.ìþÁ^ýÙU1zizþF"Õ_ärp§Þûö#$\JfcÒGâ7}4-úhÖüN.F8è<.=ìzNæø0B¢Ç¾<‹žETA#“ù¬Ï •xd¡ÑË;ˆ/Ú”cj»)"-ö`2S7!´åJ‡ªnJ‹a³PóÉd¡ªÅBÝDÎMßXŸ ó̃ak_ìr»TµIv©Ne—ê»T'Ø%Ñ1vé.´Ù¥:Î.-QÔf—–$:Â.åIv9½h’]š±³ã(ç°K†gcìÒUè°KחቶÃCpØåèXÇW`.»d9;]„3vÒÍFHp%«KŽnVɸJ¤Ùyêì$^uMWÝeª©zÚ5Ãí„Gû¢Ø02KÖß¹Ê%F=è¦n‰É Ñwlžn)ŠÔM·æ9>ªÆ""a†7Œîâµñ‹2)6œÔ’ù_Kèð¢hc -çgûŽKß vF8IØÂ®u±-æaJSÃ4L]¥Â«ûͱӡ-%h²VïŸÀϾœ&Âvã’n!õ¬0{»kPa÷hG¦õ!⳸BáŠ"[¯Q`ËÌB #œÇ "Ë4ýt2äŸî'¾x?xí6åÃI!™ÝCð³IÊÈÅÐ[ùŠÊ2>¾œuÚç½z{ƒ‡Y1 ÐîKg]|£±7çÍ!ü›-¾AÇK̳Üï û5Ïi¡]¨=O¶W6zÁùï<ìe¢ÐlÖawtkõ’Y3SÜôžî âÉþV€ß“UaAîúòÜúSªRéfaða}‘ê_¢•´.51åuÖ“uÙDxyò @Æl¡6Òt¼Ðn=«N_Q£µÜÓ2qiJ[±^¯ó»ÇÕD‚|Åû0¨[o@‘ÕþÎXSf£qÆd+89B ‹ºŒaœæå=±£—x¯Þ4 ú,S/Â^}Iä ªú‚¿€®Góiþ©yÌX\˜†{añ‘®tŸŽýŸžL×”y£ý¦Î-D] øŸâAÿ@³[þ‡t+ŽMY„ÿ¬ »þûîý2P›øÃÃ.—-%HÿÑÚ0ÆNyêU4‘™ÿýªc@V=êgü=wÀ4bãbÔŠPqÓcÉB¬Æ9R(ë?b­ÂGÞ㈼ùDÛïB"¤3òÿÔ´fÑNäm6ñ´éæ¬yz$i±Ršçœ´©¥ê&‰à'šüÄCôÓÄ:{cE”õ—6OÚßÛôÒ“y÷æ ’ÍHV¿ÖÛÍ„ypž®7ÆX?Q+ÔÛV•23ƦYeDµÍëz¿R68ÙBnP(5>ÑB¼Ð¯—œÏÙ¢ç½NÃðd+•¾,„Ÿý½ùÁQ³9$gÎN/RèvaÊ ´ð‘aN>0Ò¨'€ð¤*(ºAí|}@Í ÔO3Û3+Ãç… -ÚÒ «Îš>j÷ëÌ!`ý´Ýh“õ~·Yø“=b•Mö¥¹$0ÏË%¯›¶Œ™ä˜k"o]£p¢nzÉcÖSÏmlayžYj6“FųíY²ÆM½ãh¶=4]Ïö°ÐLY D§]Ö‹¬íœVÈŸ@’yk@ æÀïsÞ´s"·uvYº´(öy5'ËSía+ÑéÖYuÕ>xiu~3_ÎT,™u»õöy§Þ˜:5¯­šxÕÃhçF¯d°OÆ_º_Ú€Ù•;­ú_ÆH/½Î 00^’Fµgýi¯.ÀÚSf}èšµÓ‹Qi‚¼p;­ðî?ê²å>ÂÛ1<ÍÎït'ѹþ"׿ ¹v°x>½Nö:Ý\­Pîü)Ô§jwS‹QjÙ"?Åæ°gÒ#¢ŸÕÁŸÝ Ã;z.6Û4ÃkS-5åÃ˪Ìquº…Òÿ2Ë©ž¸ñ›Ñüö²ÿ)/‹ISýÇ{¾Gš\ Š’-5ë-¢ìmVéÜÛý­=è.¸í~¬NÇš(£BWxEÔÙfŒÈª"©äEÇã¯%ÈïW÷J9‘/ád >ÿ‹ëÌ{RÐ{€ñJj¼e7"¨ò?–2€Ãôð¯¿þôœúïE:ÓM„ùbd“·õ·ËyÜç‡"Ìù9vü–dóÅÀû¿&ï2 çK•ÿâ–ÿ3¹"¦“zT÷=Önø›v‘¶£ñJDÒfÙ,[À4==,DxÅ*¬uzM7DLPASÐaT“Džbdà©ñ7V oZìÒn¡NîQýfôˆIÉ6[/z ÷KýÞ,£Ãÿ4i6zEb½R FvX¯Öšðÿ_Ëîú³´ùTÏÝðì#ª•gîúÉÆ¿ÝåÀ};¸góª]/uÊÆ§Ü H—9Y%Ïoø+˜š<Ï‹ª@Jè#>'NÀ€8þs®œ¹¥ÉêÔ6úý¤Ñ…íÐ϶Gfì×ÓK¯ ½z3ò:YHà -MkW›ÆÈ+yüC‚ÕA¶øv £ßòŒù# Ùtß? S˜+¼±¤Á *‡½±†4õ%}viÀ¸`wç;ÿº9„ÌB?ÂÃé§±ˆ ?ŽÂ²ê¼.áþ Y ’ÊÉ:]¤‹çÒ¦Bwœï¼k³­þ—UÚ0¾ƒVû?HæÝÒô–” _¤ü{Y¶¹ˆ¤ÿPRþ‹©£ßÝ‹PÔƒLºâ1,"в®¡ð%DT4®#,†¦‰¼ð+¦#Ñÿq©à'C„©«Ï]$ùG[+ÿ'ôà(- ›ƒ'—⛫·ºM[ñaW"'k™xÊ ¢+šH?8R†è¯HÖœæøVO7 ç@Ó®QûcGúKª]Žõ4®>–ÈXòrÖiŸ‡YqÜt^hƒAc?/.<ÚÀÃ%|MRî)H³¾ýki¼|é¼4 –ÀM­>0Ø»E¡S@Ì*”V‹]uyDóv•˃¸çÒ(›Ms -ÏÈé¡<»?‡j[uïŒ&zΰê ^+’îÚ.N½ƒža´Íj2¯ê¢J­ò‚,êº=9«vâÏ‚U(«‚Ù·#ª¢óе¼œ«r¼9´@!(ºÎáÌ5˜8'Ú£p*Ÿª°Ã f}^ÑJ4£«š®Š”êDHEàU¢ª¬0{›“ƒ†£S“»¼.zvEÝß•d l|ªˆyI cxUD,á8N—è6†Cå­o^Âcy³Yt°+hЬ¨ØK¦BUÊ+­’-ÚãÙZ3C°*{˜#íAÑÁ.ˆFN{t8©(ä-À)Ä k²"+æzk°œÓ¨=ÿBƒœÓ ÀS0„¤I¶¬©¼ÈɬA´WâK…bØQžy€n6(ãqÀñ]Y·þ+šãÅN“Ì–0-•áÿ˜VK‚N$؉ÖJk̈LÔÉž†D4ršjšTG›ãi%`]ÍÉ,Y_9š.5'j ©e‰!¡jAÎT@M„‘8œ¨ŽÃS¬öTIáežÍNW 8DlFpI±= SAÖžL ¡oÚU%kÓ(¢F/¯Ê¨èÒHE˜°Îhe`\@XC4, á¯Xð‡yÐöEI• Ë4•EP8Efë*±ÈÔ¹q§¸ãf²µ+TÌïĸ«j ø¼µ†öìL‹5#JöäxÞnH“$¢<8F%ɪL62D@• ËÖõ•‰a)¸YyYµ¨–®Ò>œUMyŽgö"¥ $C -¶ÌZ‘ªâ¨ÁÚMš*‹YP$Ù&TIB4Ç ¢ÉNv„q šfA[‡ÍÂv·,Q÷œ(é[Žƒ=Jö> „¼ðVÅ4G¦@»ÍOb#r ë%PJ@EY yœAÑÂz‘µhb=!=’ žãl$• ÞÜL:CUAÐO$‡:ÂÀ1±žÃM ‚#³RÒe™Æ3‡¹cK*ŽM6˜>B~,º&›Æs7©ùå%k7ùÁæhR ®ðœÆM,T(N^šÉÄXK ìâŒu›hð€i €’NæVŽÓTðA4÷½>6>‹hütÎá¸*’k\N²¶‚Ãy…®TD7iÞâr‚†{v¯$ý*1.­Zè¡ § ›—ͧtBZp߆PeJð+A›"Ã^˜á…¢qDÃVJCB¤±a/#ëüÀ¸;U›4ŠláBĸÚl‡Ó‰nÛ¬Ê"䢛UÁFGV…KªÙªLÿ‚Æ$žèkÔ0`‰³iš¹ £Ã¬Q ‡J;V‘m0**£nš¨K,Â$(ŽGšã¢à -Žº\«ƒD +´M,¢)ò²NIë$×á{úèšÎѪ˜YÁѳ<߬]·1O,G¬fAdø¯J5«Iü&¡ð´Øç-^kò7ç!Æc?„*Z.ErM|Qœ§Ø9Øœ¼³æÈvLœâG— Q”ø¶-YÀ‰ô-´Í@ ¨Ïä*Š,³”Òw47$l%´:B€Ö‚«¤ªŒªÀ¶ Už¶¥{›À(Xcå­mÅ1òËZ%¸ŠDuÙfb -`ºP6<ùŽ'UF¯a’?Ðÿ¦}b¶7jY83@+º¡ï¹®WÛ¨)|Øö´oœÁÞlpN¬ÖÔ!×Û EÓ4?lÆ]#;Y]‘‡E ÓqÌþ{pµôäéŽÁXRà Wø“œ£Ï«ŸÒ`ãDrh3%Af;SQ¢­ §èîjBÀéˆÎ `3‚,``øf ’•zVq‹cl á©jm%vºLX%¨,ì^QS"c¼ÒD-·ÆËkºƒ_† -ÛNR­Þ,÷ sÇŒooWÅÂ:/,ÎÞÂö±¹lõ x:ƒTå^Ø…§4:büæãaVÛý—Ò°?è´¶gTvYøg—ÁšÃärЋ­ß›àaÿgÎactüF,hvJ £ü1œÚ¶ñóÈý”ýXèÁ6d꣹ëí2¼ç¾ù¹gñ#±à´àgÞ, itîýÊïÿì7ë¥ÿû£‰ä:Ã^Ɉ£ÔO9§Ñ!ÿùáQ•"š$Ø1*? ®O¬ÿøp:aô‡' ÂO6Ÿ?¦Í§f˜aó'%JBD¹Ÿm‰¬ÑOÎë÷z™<†çOKÓ…ˆ¤ëòO6-sð“³*v@‡o¡‰ÀÒB?˜ ­Uþ$3›œÀOÂo=ýâìöûñœï4x— Âm¡‰ñ¼Ç¶Ü5ìz2…vuX¨žóNwØeõeX‚ùî)Xv ‘O•|·¬¶šSãV¿žF×ÎpU;V³‡S£\¶<—F¿Óš^nöÂOz~ 4Lž÷ ŒF1;Më¸M†§ˆnЦ‡=Q'N(;tal—…þÀèÕÿ"Ç:רLæ(Ë¢< -¼§g ævÛñ¦a”q‹];ˆ;¾rNÞ¾ng06•egÀ"+ôÕ3McÖ(w둱ï -ͺ¹ø¢ŸÙ-”Ë6BÄŽ<±á cÏØXpŠE{â„ kÝk i‰{¿ž¼ñÇÀ“*×…b½Y˜Ò¯ˆšh·k!J¢Ðþ­ÐÏÙS²p=Ñëtc=£Àb)GiŽŠr*v °ÁJ’ÖËžþâ`qá?/`֩ѯ}€W.ÄÕ=ÝB»_o ›§ -?³ss" -zÕ±:çF¯ß5h–0D¿÷øl{çXÅ„Ñl&@”5‘PTEÑfºÙéôâ-væ<^Ó<-8tI²6³6Ž5õÇÀ&T³Û¥d»…’¯ólÆLÅÓ:9oÚF¾Óµ“Yâ°ðš„Ù0t¦û!d.mÔŸ=U:}pÏ•ÆOÞDŒ?7(Ø6ìQŸèÃ1’µËÆ9£Ôi›Cà =Ôçàº.´ëýPOW§ Ûf:àÒlà\×ß¡·d½?(´K €úpaùÂÀ´‘!NâÐ75]ïõÍOT]†^E+&~^qÏ}8@6p›ˆržŠÍ1û6ëmÃ3jjö¦¨‹áõ6 l‚݈z,BªžLct ©›^K3)5Ÿ.” ; ¶ŽUù Ù)š—FwØì»iæìíG`¡ðê÷‹1ÿ3{=>õ•³S?›M¼HèvÓ.ΖGN®¦¯‚_F“œ¶³!Œ=ŽXœ9%YSg1+jӵݜwj³6©µxù"ÞÔê¥Úy¯S©7ãOg'k¦ZE£<^sö -Rß#KÈÏØu¥f½ ¬OJþ™¨ -(lŠfª#RŒ|Ñ#i!ü›)‹=€û ”\r€) -£¨|1, îy2,å¼áXD OA ýy»·0H`Φ#ÿEÈ›³1ÆéÛ,¹j×Í^ŠpÎ¥À ÒÃfÓð®áS¼?Ó®%=v~3z]<ïbÊøò¶öˆX7‡RØ8çJg=¹Ü°›"Ý./‘W»PïcîŽ «§©& ž©GŒª¼9£yXÌ2hµ¤¾û„zz]˜±Ñ;Jºkº_çñè{6<àí®Á¾c,Êõz_Û!hcsPû¼¾Ê»%êvÇÁO½M{ݦ¨²Óøyý£ kîY`ŒUÙtÔïÍnµÕˆJ%2ìÐ<ÄÙw J#õ#ˆÄV¨µ3û±J€a£õ\:íxÕZ¡lôŒùí5ùñlsö1ê(•@gxÓMº|¸(µ"]F=ƒ3ÁuZò„5Ü]¥Wîõ#ìðuv;t#n©3·’Ýù:mÌXÄè  À€q¨ê4ÐUÚƒH6ü`~•r³Û«tl"4mT¬š¢iM€Œ6îÄò\+Êœµ‚Ù·'¼u&\~P¡?¾×GÖºÛíE\ÆÓ@Ò¨ß){Šz’= v½ùcÄÏAbhÑ4Ô†Jõlþ3fš\[—æWî9º(¯Í¯:èt«ØD_1S ˜9V·½„gTsm*U*eæ4gCC%÷> -ÌwÐ4«w»åÙ]c5³k»Þ-C]Äê¦ËÐ rc½d¼a>‘^Ç£¡ôÓ9½º@cHÈÞ| †m |@Gøs댉83êµjÁ1M]”~¤XGÞ0»7ðØ¬ lz—ynŒâæu½lt6O; NìãR§‰—UÀà+¨2©µ -½Fù{¯,Pݵ[¨íl˜)xëÙòúÅú UèΖ]ÕÅS„yõŠæ!ì¼ËF¿^ms—›(Y?"oµÎ¨ò3‹ -.VÍMøé¬¼Ô+GèB“Èo Ö«ÍëjuzU«­¹uj¶R> /¨Ò5ý*ç@jU€'[¹ Ñ~=«^§‡9>Z¦f/bËuE‘3¯®Åï»Á,Ášþ€´!JÍ'C$15¤ÃR#/P³Ôú³1á¡"Ò[çÿ`Œ$/ÚíŽc°™\eªdiNóÄNVqØ.}„2êf¡û1j™õjógPoÚ'7SKÂ÷R{ž Æêt›¥?¦eOŸ.XH÷nªº@uU] ¶MU¨;2êé*  ½y -Öë¹òL|Pµ BP½]é|Ôs¯3‡è;1ë`B«YVŠ– —°4‹ì3^Ó;vù`ãPðõS~-þ¢ž5sš}+cÊœ:#rþ 9ܤkŽQ— ¦Õ¬ŽC€Æi5{ã5Õi„*ާ¶íc;Ô´cVEc1øÚšÍyŠ#Õ¤–ùè€bÓ„mw¼R”¾^ßÀÁÍ¡ÚX³ß¨wÿ´‹È=гy|×_˜ÅX_¸¦6 -êãNñ¶ž Ð#ÇÛ hÄŽæ—ük‘Øü^ÇJË—þÆ™¿6ÎðëT¢ÞÏoâ# TNF.Ã}øæém:aôÞññ -é׽÷þ(À?ºjÅ=Ò\t™"·œ÷éDåi÷/å^éÖRÅ<·œÞIc1³¿.Æ7Ãç±ü{ߟNÅ×€uà)U\ÙzHVÖýÉ“¡øL #`ŠK~~(æóÖ„ä‘x*$W¶¸×kþò¯¿V»+½¨¢׫J>|w/¤¼áøf­µ²ÖcÉÿÒãâ]UÌÅ[oܳB×Û•€Æ·Œp½P!| ÅÇ0͵“g(nÔ­ºË[¸:ÙxstéŒV%l‰_äö5ññ,ÂÄïî/c—åýÕxjÓ'áx‘êûs(¹×ØM­vn×âÊk¼±UÞˆ¾ßÕã.TrZÍža»®é—Wï±V§:L爐ŠrRºNÔw·B©Ó }ß/©¡T&}¦ˆ+ÃÒ_m6ŽO¼¡½AO5!Ô>ÞŠå6¢íD½Z,ùÕÖã^$iô÷ÕÔ}%n½56O*!Im=ðWc£9Ý>êfSEnc;¹óU`%ßBñ°~ñ<*­-ùãÍhSŒ7eQU7û1Ö+ñ¡†þ„ÛcùâzÎtb¹¡·Ч„ÊAŒï…CÑÄZ1¦…#ËÉJøQLÆOO÷Æ—”­å_„Ãy}A>ìõ"å].¾y½É p¶—ðz÷8Îes­‚ëOËÞàÙí»w}K_'§u…æŽ <á“/èhÜ_ÊM¸ŠöƒU _…·½«ÞåÕ§-¯o#yæ]BE¯_…­»º›•÷×¶¸o`¿ùà ¦rïúÉvĺXŽ{7®Ÿ¯½áÇÔ›7R ½›Õú®—k_xù¾jxEß`Å+¯¯¼ºsìU6|Ï^•éyµè©èÕÓÒ¡wëÊûìÝ.•`…¼»«7ªwoï8ëݿޭz£m>äo­'½‰ß‹7µÚ[ñ¦ÏߣÞC÷Ñ{”íú¼'áaÌ›)ø_¼gû¡ ÷|U9ò^cuoîèTò^q·WÞëáÛ²÷¶³‘òÞ¿ìÖ —ÇÛ+Õû|Ñ|ô¾æå oñú2ç-ßvW¼•ò^Æ[ëÞÆ*wèmmݽ{;ÙÈ÷½tóîl‡ËÞ£ÂpÙן.¯Æ}«ËÚíÕr(±Ï-‡ûþ×eî´°½,ò§­%ÿ²ü¶u¼¬­–··ÚË{k…åhïî}9Q»Ì-§ŸO¤å£§£æræñ0»œ-ŸJË—Í‹öòÕà:¿|ÇA;±æòòKÎû²\lAÏ•í#a¹~ ´|ݧåî¹v½ Ö®ßr®·â[•ök¾`½xã ç”C/Þi>yU ù´V¡ïÛyÝ®ø¢—o÷¾äÙqÖw˜ãÒ¾ÌMc×wþx!ùòo»aß/¸æ{һ˾Ây¡ç3ª¹–ïM8y[òûÚ—‰š¯¿«®,g÷++k‰êJèù ¶ÂmŸ¼­ÈÞ«ÖŠþøò¾²wÒõ®$’üÚÊ¡ ¯œ†nä•ËþîÊMdë`åqóú|¥°å{X©œžÔV¯ýáJwpñ{·‡»K~ÿêíYÆ®=úù³BÛ¯ b!ÿÎÙêž?ÎUrþƒÚEÍz²ôçÔHÔ·<¸õ?7ïþò[]ñ¿½¼žû»•RkÕ[.H«kòÅjdµÕ]•ÔåíÕ­sþa5Z–ü«ÊõÉêém£½š_ÝØ]½¿8(®¸º´Z5ä‡Õvò&²: oÖVû7áµ°±y»&]?EÖ¶/¶×â'ií(›+¯?îí¯ÝÔݵçaít­¢Ü…ÖZ™£—µA#ºôomo׈TôÛ€¢+[Ý7mH¥·o§@ùvn5ðøX(ÊÇÝL ç”À ~²\‹¥àf"tT3™½àþs?iV:ákùQ ¿>Þœ†‘ËZxX½ç"¡øÃiDY-6#ÑZz‰œ\n"×™•Háäê0Ò<¿üïõ˜ ì®…„½Nª)œ$žï„ÛõÈ*¼g|kb0™k‹Š|òë•x®ÆÅ'}%*¾eªš´|“å–üÒæ ’vwÔUéø.´,Ý®¯ $ãn¥/õÅ•¾j¬dýF]– ¿|µ™ Ê¥p•“ß7ÖUe}=¾¯hüë¡’Žoæ”üeîE)6Må]¿[U×%EÕƒå4ð³ƒç“[õzOh¨å^g]í—‘·œfo´Ãîv’ˆKÚýÞö™V?‰¾é¾lTÐãä\¯^wõ‹TmG5V`¿k;[ëõ»‹­­ô²hÖþÁÖQënÕó»É%ÿöÊI³³-%ÒÛÉäZ;Ÿ|Êl—oŽ×¶îf‡ øähâ­¾s^+í´ÇàÎ{åþu7¼—ØÝ[/wÏ -µÒîËõÊÉn÷X÷6Nz{»ÉâÓÞÙÉúÑÞËý)¬þ^·Þ]݇ý½³ÞÓ~¶›9ß/¤7’û½nAnf6£1U\‹æ~o´ÜjtcÞç§FL,<Ôc©ò]5vS½©ÄÞÖ -µøÚNã-®_ [ñ“.׋?Ç|ñn¯Zò'"gëb"&dö¹Áà8Q)\'Wn‡å¤š=ë'³‘Hòé¦Kv_Os©ÍÕ½z*®­SWÞXª¾ÞºK¯Ý¼õÓÛ›5=}f4®ÒÅì àÝ -îÈaíùà(x½<ùK§ï¡`ïÓO‡Éó^ãð¶–Ú;l­7«Gù“½£X0øvtõPJ½é½ãàP8;Þ3|¡ã\¾öt\»6öNÙ‡þÉîýóõ (X:ÐËú Ðzw™Ý!¾äÏäÖbë™ÚõÃÛi÷^ŸîÕã‰ÓüU]8}‹o{ÏBjµvSRg7²ï쬵ó˜ÌFNÓÛÙä3'd–‡Ù÷Tcí\¨|çGûÃó—ÁóàÂûT^héÎòEVø—ü•¼ lžs—ûâ›zy­mî_¶Î®Žs›ÆêUî`ó²˜{λyïòc(¯å÷wòç[l¾:¨¯ÖK×¾«øÃÉÖÕ}.zqÕËo7®åç]þú´¶wz]YM½Ýã9iÉ«V®nî5ÿòM¯²—ºUŸÞn³¡ÀömµqZº ½®¨wɧ«âÝÓƒ Ý{ õÊýV-³ŸßØêÜ·RÁÌ_é¯?œˆÕç‡òsqï1¸[ò>&üõûÇÇbwïÉûY]ò?mŸmŸ®.r™§N¾©>KÅ÷œõÞWžëêúÕKäê*õràÕ—Òm-ô”ކ¯‰6ßx}~” -+GÅÇÂ~ôú¦p=φGçÅíËóóâuùú¼Ø[/^–´³Áõ’¿”ëó¥ÎÉQ¡¬lTßÊ%®Wn]? 阓óÝû¸ÑLl_VÄÃ÷R%{s;¬4*Q±* -âQ5›[}©6úoM¼ho×Î7[×µf£×«KÁíúÅÕÖC½}–éóM9/½åC­·nõh·¡¯6ËëdLmôߺ…æNêBkÞ y£µ|ÛÚkEwr­Ö³>n¯ôµvjl—6¹ÝΆtŽÅ›N­¸·Ó¸¬¯{ž{yívBÞã%ÿ»öº'¿ß–{^1bô¢‘§ëÞ˺zÐú+úÿ¹g[w¦hµIJâ°€%-ðàºÐÁãJ¬üÉÓÄi6/ÔÏÏ“é—óBÕ8²-¾ÓÌ^VMQo;'4“&Ý‘ºyËH¬Ìi„¹\ÔNêí9†R„'~tÕ7Èf–ÿàDÁîí?…‘¯ [Åv¡Þœc2·¾1íFyW@ÁÇÙöšÛ§ÌMqÛz/ÈA &k8¦Ž£°¶åŸô1 avÝîyV±ÞÂ0óNSGÅ>¿à§Ú§­ÊŽ“ùØ-°– -LñÃÒV8ø2ÍíÇõ„óŒ1Í÷´ž¿H´¢ ­U?í´;¥Z¯Ó2¦Mgºý¤+ç³YfÄ6œét:÷»=Ogø¬-“5£_BQ“jµK@ -)`¢YŸ{úgïE:¯O€c½Áï^#î:ÛûÀ`ouÎF•í9'ù 4•®-ãÙÎÆó•ÚeL[ÅPU˜vØ3ŽÐù)Vìü6Ïýd&\óóœEl>c‹ÇJ½N±0Èþ4,Ò'-´I¦sþ,GIÅø$çv|ùFvÉç sé -éð.>òÆ8*òÕ+uëk>eó‚‡Cóåf‡©@Ç(®Syææ_ lnA˜˜w%üét+Íâͧ—žzJýA½mÆf9¤æCl™FÄç -^Ìy ™ªã²>o`3hу\(ÇÌãdtê¹ðâá Ó ç±¹Ïð+‹p¸DaŒ!LIº,’´nñ¡ÏíÌÌ|ÇqÆÍ;棣±žµçó5¿HÏ fxLÏAŒd@‰¯mO¿ðb~¡í¾ÁÍCÊB¡ÅìŽ,èÀŽˆŽx@Æ&áßÑÆþì =]Xì6ƒAŠºfÍUñr§úHGèÌþ´ ³õ :ØDÉðÔÉÙ¾àiþİomØNîK5ÞQ;IyN3¬·6t£ëTœîë}ϰÝÀ c"‹í{hºÔ«w?M/ÆhèÇÛŒ[¾á²2.ߟ¦î.ú2¢¡}€€—#žF³µئ7F#/m(g4;aë†G¿¹ÂoÆ) fvglÔ·Áµ<µÑ-´'"•&"ajßë¶/žƒÉlLèœÓa¹ã^ -î3^TèÌÓ„ ÐY›ýA¤äDEO÷>1ëÁ1‚†Ž‹\àÿùÿÿßÿïÿïÿš¿Âæç€°•ÞûœuuwShJÍžô©ÚfÆË0+‘ù‡Sšïäè®Yï;Þ‹ J4Ñ ¢~TÄ™þ”hÒ™Í;±Ž …Ÿ-Vº+ñ뺃”[¯ôŒ÷¡cøˆØ¾“Êdšz:RÛ®ùQ»¦«Øb•Góæ'ŒââGè$Œí[Ç]óZ©{[y…Ï ¯0мœëôY| -{…O`¯0нóñEø,ö -ŸÃ^a {§¹0Ô^{…Ï`¯ð ìå?‡½üç°—Ÿ½Ö%cw·(úòŸA_~}ÕЗÿúòŸ@_~}ç# ÿYôå?‡¾üúN“ØGj/ˆ¾ügЗÿúrŸC_îsèËÍ@_º}ïã¾Å]î3¸Ëã®25¦ÁýÁ§p—ûîr£¸;[¸Ïâ.÷9ÜåÆp÷ÃÚ ×üîrnÜµÜ”Ú æªwy(Ï–úÛVXØ<ŸLi?»úÚ¹Ù]Û.Ün‹«Ùp<Ú;hÕ¶ªmïqÚ»XKÔ ‘þŠru˜R|[Ñ«ƒ½Si+ó¸ví Kj:%œj~^’|×O¾%«ÜJtû9²ÝÙèö£ýasÉÝÎx{V¥ãA¼zx‘‰îHF.QßÝ+%#‘µêDW™òô§&Óþ-õþ`|{ŠK÷áX«“郶4¨…öß0”Vnâo͵›%²Â§6¶¢êõúâá1–OD®gwê®·õÝi¤Ÿ¢[ýH+”ÜðÓƒreÉOÀJ¿‚~›¬<ݨèjw»U‰×‰šzÏ€ãu5Yâ3ïÑýµÖ ¹Ÿx®>wà×ê;zëyãaím%– ûÚl ·…òpɯ¿B¥TI¾$jÒËöNÌ/®†âg¯è¦w•NÃõ½ëc_m»T*4ðW=”ªdj¬gžÛ,¨½úÊëVýù¸oú÷×½Ðã0–É­¾ãøƒÑí㚸äW¶¯Ÿ¢±vi­Ú=ÝÞT[»õÁ-Þn±”<î_ØÔ5C½¹òV=±Y€õåOwá #ÞTÏ[lw4q´ã»ImèrÖåèAñí©‰Îshçºü°%}OÔì^ÛÚSÖ}¸$ÊrÑF8íÅA%l¢æu9ÃñO¾Óäfag5í Ý÷°_°{‰• ‰Êdo<ùB F§NI¹WÞJ±|ò-”¬lž¼§ -…µ•¸R¼ºÐÏý·W±l"~ž¬äêïÑ÷§­ê’?.Ýå_0ï•ò}ê…]Ç¥ÛX6|»yIÔß”ÍíJË_M'*ë<pïUU/˧?-÷Þ:‰e3ë'éd°|Â`cšá>¬þ ¹í_ÞÙ„ö­ÝΖcùãÁprjcuÁÁZˆÛž×j*;'›,ùS÷eUxÝÙOréǨH(°óº“Nv¬o„âýy|­F!ë^Xk!æì×úC‚ÌÅ §ãÌAìå˜'ŒÙ u·_ÓÊI$Æíäï…àÊóÈ(8”á¥n¤«Ý`¢¦\6R¡L$í`*l€»R˜\ªŒ…MÕZ…©ù‚‰j-ÕW·KW—1õ^¸_ƒóÃæõHÛË©ðFQŸ¶$zÃ8I,ùcùÓr(ÌžžŒgîÓFK5]õîÔ -lš”À Òé$æ ÎÓÁóæv:)ß ¡½ƒ×ð’ß™̪TI§’²WÂÙk"8þðzƒ:Mn¾v×ãoƒr+Þl_wbùÚí -4q²è¦6:gBz5¬>Ä.+µ5øìi5®„25F-ƒèU®Àh;5FS×·‡ ‡Nžòb:ZݽEÿš,Jµ›Ø•¿Ô­·»Ì?4µ·fx‡(šÃ ç}ç˜Û‰7Ýzz瀸hûýåzÁ à%.bÍsÅa*°û~ãpš±·€ÉZ…ṉ÷Úkhû¨_Š]òÉq~Ø|ˆå^æ[=öÝ9LD Êë5PÌjœ¿¾Ärü伥Ê@Ç  í•¶VÙj¹÷çæÝÎ~6ÑVÕ“‚;ìtŠí±No÷h¿8«5ºª vØ"«˜¶UÌ ‰Ÿáp#)uõÆÖßÔâ ü–MÍÁ1{áoØ6¬&¾ iIÌéÄh'cßA%ký¢ á4ØL16À-ú­Çò×'íttÍȃ¤_Ü CµWV3é×Ó»­´w=\Œ3Š[šÅíÃ+ ¹$ÑßU5Q~‰¦J÷UÆÊ\â„<8Ÿ­Î¸ÅŽÐ ©3 ‹*44Ðd5Üg¢ßùQðÑáq#Úç‹^¯ôDmxyŸ<9y»'1b—íd6š{î)©Åö"ÝaëŒk¾ì„_Óñ·›ËÁPB¯»©ÒF~3®la—ÞÈNjդ±ž:td+””އºS -{Ô².ÕÍ-D€jŠº­ÞLw*L<›hàV‚ÏÂÍÓËÇŽ $%Öåû¿£œ, š ¤ô7•“TSê³14ŒSc*óˆîûÜp4­éškpåo˜òÑíqœÄXNNSÿ-Í‚iKŸ:|LžÄ•5è XŒ_DÖãþ§‰ÃÜñ¯N“[!´ßSN"É£7µà€ 4 œ þXûP½nfò±ìÕ  ;ìN†œÎ@f) ž{вno€ƒxS©>ô¿äwäÿÉÙäAÃoÀöºØA£F ~m ºËE]mKg£Íff();kŒÂÄrÍh¾®¾ó¥Ëý¬½òꦦš_7X é¥_¸oøµGï øåÅZý§L7{?Þ8 "r^‘ì ²…ŠÁs¼!ìz6²s[åV“Ãe:Ñ‘•xz'õ±[QÓÏOë¾tª=„])øõ–Æ0kceóASK™ãøÅyô\ÞµÎÌïü±‹³Ü5êÚÖ‹›7Ñ„qg•SÃâ9—éFšý¬ÑëÙÜ•c}ïž—ü6J¦£½^íJÚ:½Ù§¶¹ýíWÔî\EO¹ÚÎvã‡qiçø«¾wd žcúöIØ~‘—Þ#õéb©hoùø0½Ü€\Ý€~³QnwºL§_‚ÞÎTŒîŸÛÑ›‹ÐêV-”«óÓßÏ]Ôy€qN÷Ö_ŽMbŒ7µÇjÚûw¤±Åv¯ ÄV‰¢æ£ý+:FÇù»×5ܽ  -v*‰z¿® U!üòCê=1ÖâZ¾«Ù /pnk÷ŠüAâ¤IU¶xÍ{{?xw>ˆÜñe¶Œ»'gåd¹¥oXÈX=}ŸK&}Œ…;Þ½30ëÙÍ®¼e¼®&œÏ7ãÍÈ%æÚ$v,ùYgWÚSêåÙÿƒ¯z£ïñç€Í±j6ÞÕUVü ýyN5Uܼ¯Ê0D±Hw7ùu¦ -’’zsÚÍònVSÝSFê9[|Ùd N%˜*…¸Ç˜Ð/€üÝhL0»}Ñý«ÕäQ«þ—¯o#±‹õójì2JÃ~ñ<©ñ_î¹EÆPv7“G™u6.© -PçÜ´ÁkùÕ•\úÅ·z—¬¼âMme#yH¸±÷>IUpB_Þ®¬äjS:•€‰^öS¡u¥âfo¸VÝ—øsôze0°{ÎÀW½Ê “/.ç#á‘Wk^îèá`ÇlÂæ¯d¡=}«T¶êk§ ÒmÄÒÉ»ÃõiS©'‡–üÛO‡Çy•®×Õ³Òvv¬Ê¶ñlm묺]Omtîy Œ2ËÉ駃Ö`} ë½Yf‹|}à%§5&Èì+·‰³Äõþn˜§=ïˆÍï—°ÈÑw—th6ÅE¼7Ý%?€LYƒìÏEÙM¿î$›Ù‚ÍE|öy“•Ük'Q_^‘±¥l¬½wÔ™†C¸.ˆtÙN©«ŸV6ùXv+uÝŽwÝ’·9²@´Ö‡H“£1õ©|–¬è¯›©{c°:Oý­·–¾ÿ|ëÔ²ë±Qd±Å%z|tƒÚ?raÉÞ®"NC½Kåcª~IbãK²rÑŽÌH…9ÚC_:{ª¦ÑêåáÊ.Ó7±éUbëoÑëüQ!½“¸F”Ø·ݺ1ªQ­Û{!»äd/)!¸NkXt^[t¦LÌmeç yÚ -í©‡À_Þï·ïì…P¦úh¦¿ìx[^WòCWÛ{Êñ0¹,‡)oƒK8‡òÊrº0^ìíú2°ú-à~#à_knÖŒçW Ô†äÇav˜<|î÷“Åtj'¸â¿\¼{·²{ò$¾\,ûjÜ£¤´Í€ÎI~Õò›ÉJ¾ÊWi¹vàQÿéõÀŸöžD{¾çA²ÒéE¦ ¬\³ijÛt¢²/:ÛÇÔ_P8PÑËD¬ôÊí[äF-y°ç7@ÄÐfƒ-]ß÷íf·Ó£ò *—H#n“ÆÎ3ª -ãZ§<âz ¨É½íŠÞbY>.‚š½ßˆîìu}î½h‰Að«¼é‚"×߸Wö®¤TLŸ\ ¡à'{¡J4Ðç´ŸÊ“–Ó™vª$·¡çp$8Xk15wš†5¸;ub•Àô^ò'Ú¬& =qÕ­Óœ4¿ê]h§Ž =[—Yˆoß¹lâ|;Æ ûé @ªW.UºëÉÉèa÷ݪ¼ÑANaˆtpmÒÁ¡)]„vï]ЮóoªÑR%̃LÔõ!Ò‹Ë­pe§gÏÔm‚8= rñf³û:¦À;8æbÛÅT‘ÛYsKðf‹ -{k <•ðáa »ìdÉì{Ù’”C{ÔnþB½¬¦JËÊh2Þ^:¥]Ž R”·+­ÕUPÛßGš"œÅNEh±¡—92ÅöM*”] ŸÃóêíÂ6&¤Yò+>y;—NG«€ä¹a¾ü1þ*¤ôP8ô¹@Ù9µ²ü¬·Ý½r¦JÃå–rBe ½€µ¸Ô(—•ë«§kMÝO&jåeÔ°–£;âsòädgÙ>,ÿ ä±ta5Ý~º±S½qÂÆ{ ¨ü}xn¥»lÊ7#D¸pío—“'Ç" ½/ÞFP­Sûó{5ÿ2l/ù¡fb7Y••åác]Ù{_O´þžÞI—Ll´é“Mš,šdÒ±¾©Tœ¯†v£êr’|` O 5Wîì€4Þ]y;ÆÍ­r¹”ß -ëçñf˜ÏÜÞß¶a]qǚǪœ=‡é×§ar#‘nnoä%Z÷bsƒÌ…%@Ú ßÀÂ_bíbµoÓ¶‘Ÿ…ñ@—ÅH³× ¼>€w~ kCç-ñ›XþJÍ;°ÓÑ· ̼u3b²D(¿Þ‹êrý·sÖuÙD Xñµ|r½¾YÚÙ¸;‰Ç´#loµs¡½j D³ o-Ž)á¥@˜Š—bÙ“C<.­Þ!„‘!],s0¶ 77Ð^7SoþtJïÔSÏ·µ+ 8á»)Õ_•«ìÛIa2éÇ™m§ƒƒíNª¤åøi0XWÛG!ÔÄÇ­ÑÀ÷OÓk€Î+÷©ðVK7bصúõçj,Ÿì¯+ï'…ý]Р\íð£ýÙ­¬ïÂ~)n5v“Oõ;Ÿ ÑìvH­žÓšÕ„x‘¨EËáäQ3q3Æò9áâÑ—œÄ5X—óûŽkþ#vpŦ uÔ?åT1Ÿ’Ê8Òó= -‡e2X[’{l*¨#‹\yÔæ²•*¼¾mÄÚûÞóôkàIÀÍð˜<öV8gxVÛ/ÏÛGÙÃKeëöªs1Ò¦ˆ¨fR‹c® -«b^:xtÛê•-ßÓB®E²þJ†tØu¡ ØCù~ª´wM]­vWô«ÔÊ^½FvˆvùÈs,_+ pŒ# Üq*Nn‡íÉØÐbGúKª]¶âh°:òüKܨÖÛ˜sÑz·DA=î’©>t¡=ùU í_7¹ÍÐéFh¿6ñ×ÿÇÞ{vµÑs¿€ÿ€éÕ–4š¡„Þ!  „–FHB[ç<_Îow‘f4ã{lü|y×µîuç2Û²ÊÖÖî[RúÍ»/ùâ]ò‰¾˜õŸ—@#X¿Û|?w‰ªü|ò­šœ{ü¨Mİ6µ{‚·Žý¦j“ŸÆëÞN\›œ_¯à•=ïh<½°ÿu^l|ÝZÀÙD¬ÛÝ>.½¬Nîî|\ÙÞ¬}°ß®ÜÕOþFüõp}nõãÒíûÅÆÓ÷73_vcØÏO+ ?fdT_¿ù°üeó÷ÊêÙ×ÉK *¿¶<þÎ ÚñZFÿ>Ô¦~üëª6y]®M]ܜզÔÚ‡ÚØÆÓþyj–6÷o8]Úü¿ñ7ÿ`Þ[÷f‘—ï—2Ëå=À§ÿÒ&”ÛˆŸ/n—Ÿ¢µ?‡j,>7#’–±ŸÎìñóÓ÷FŽ^ RÕÓ®í6Z÷>Î~ƒ?×ÃoOWìÂwžgŸÀºzü2{°/úØ»4èºü¬O~ìLúåûÒFé úÕ¨¥ƒe†½z47²sûã¨pÐõwÑqÑ }ÃtlF¦kõ¼ÖÕÏwkŒ?.N‚'šݸ¸÷&þ 4ü—tgsï Šòåtz,·ÖЯ×?ª?-‰ûwañ ›/ÑÎéu”-xvÿ÷­åJ̓n×þM• z6)>ì<¼ºíשּׂ-€ W¸ÖÃÍŸ›¥ƒ~Ø ¿– º"ŽÅyœFáaw¦o.&f =>Ÿ{*ôxìöâ_Ù »âãôfë®uguòãbô¸\8è§©ÃóÒA î,åÅQxØÏørùu²xн£Ÿw3Ã{S…ƒžŸŸ\”ú÷vaì;é0Eký¼+¾®î¬ºv$Nžßm úø¸7=h½òÆiPÅÈšÉxbÕãA/ž×³\iæñÅ[8èTÓ ûscç«'‹0èÜcnÐÉ™¿§ ™aï≜€þv6À¢\-ÊÍ,{x/V÷ÎÖqÐéf™º7=ôÇ›=€A—ŸiPb)‚WWÕyÐ…±Õ©+½™4\ÉšYÞÎÊÔÛɹhï m4 ÷ ÌnlÀ°[µÜZkjiÿ‡tæ]=·Ò_çVïxÐ…£,zÿúñ—d*¨PËYíB=ß×ÔÌŸ«ôûÌ·/#5ïæþ_ñ·zͼ[ô-sþG ‡ÝŸ%¿>=«oöWùÛ&]àÓœØYô}ÛÌÞ?-ˆ÷ šOeÑ÷oÅÎÍvPöí²Ø­}ŒÊ¾]û×›ïÓo³ÓŸ.ćå»ç’_ŸM‰ǃµ²oëâpqw¬è[ÂØ™/Žjõâ_¿©‰Ç—Zh¾mæTâø¨6Çßæ™>ÛÇß§,Æš¿ß‡â·eßî‰ÁêrÙ·âÓ`ø%ý6‡±³_âËɧ‰’_Å—_ߦʾÅùѬWô-aìó¢¸.â’__<ÊúĶ_òí嘌¿ªÝ’o¯åÒÈùZ)Æ®>Èíw[%ß^ÿ•{wêgÉ·7ãòô×öHÆüó?‡³ož?ÿZ=ÔFÇ·öè[5:?¶‘ýöm­¾±8Ïßf9bL=ÿ®½Ñ[¿œï—§'Þ»ØØÍáäÒß§=æ?lŸé©÷È“–€în—ˆõÌÇC¿è“c<.Hàc‹çÑåµÃ…ðtåÓÚéáʧÕ7u€‰µå¥úõòòRc{ҵ߾ÿÆÙx<ž3ò 7J¦ q9´sÎ\}¬±ý¹“<gÀ¿½I,ÕÁÆÏ¹«q8C«OÑ»™ƒ Ã}P£sÓ,FÐÎqØ­;¨–Z:ÓaÝAõéIù k7ÒAÉÎÉècî° Ü‚¥sY6è׃®OÇΠ7##ƒé °û¨ÿ'Ãz9£ö?k]ÿAïÀ˜;¨þ0” -ö ¬gô±ì°¤ý—  ¢öÿ¹xP}zV:(XIk÷ªt­¤ý—ŠÚÿMÙ ·é |ö‡\RÚ{wR>(ê¥èEâ¢hPâc§ïšvupfÊ OŸ ÏTl7›k祰¥þ¼S©G=~Àí˜[¨ ëâƒk5¥ùµ°µGÏ–S épÌ\솦'~QNÉ©äŸ3×Xl#Rÿeuþ¯“°‹÷ŽÇmþ`ä/Nµñ‹.kÂá·üáaú·ó£«›ö“Ù¬ í·fôäœ÷i>^?:€?G†Í?—'ŽÆl|föàBã³¹úåiÝY®3áùÕaþ39?µû—±Ãz{Î×+ -\Î ÐÅüRãÇíÊ0þ¹ 6sSrý04©¤Qá¤`6«SüÁ§,rÊ_R”¿éôYÙÕ…ë;¨µ_` ÿó¾Í‚ž¼Ûnÿ.^&ìäÙ¦qÖG¶˜!ªd“KUyÿf'sô™ø-K‘Õ¢³©ªÄžµøŠÈ}ýô_—”åJd¢,ñMœ¾ó)Þ‹ˆ4Ù—1/:â }ÃYdýs{üZÿÛÄzN§þeHVߊõ/\v7VqëNÉ”3¬g|„¨²w§SϹSÙ4âíôÁ]Q„q·úù¸VƶËN%›.K[Û;¯YûÇ+ ZÜÔG8šPˆãõƒûÒUñZèŸ^U1o?_·Ow»\PBÉ@;Yás˜õ표®žÙ¦•FZPVv†˜‹r)-nŸ†rJ¶öKagWOwVrêä?ÖÇ2çîJ=t~î -溆.¤Msö‹÷òâet½Ý©„+•Ååšúò²´Ýz;­Ü7“gGtóI†õe¹`¦³©¥13%w^“¥rÿrM|[®Ÿ•ìþ»"-¬Õ–èÚÔzÅIÝE­ymUÖ«:qȇϋêDgL÷w=ÏUóbÉînßpÛý½Y——C£¯Ñž’³×Ú!kîj¬Â”ÔÒ§x«LV&ó©¢ÒÝŃ¥SJ·.Ý?¤äò¼j©X VÝ?¤±Ö*]åóy³.n//ŽŠº"¦ãÎ~Ýw4/‡[6w–(¯X$ìþ·Ñ‡“a¬L«ë -cßfÆ>õ c9ŽÖÙ"_+õÃ<Ï?ä Wµtrþôjífó}ƒÄoÎ<$:LND=Ï?É»–!…%³IFöÓFëKÚ0Ÿ_›À.W«PâÔP_žþÔÊu˜"öQv@~m¶S;ì”úÚxZ`Rσ¯fTiô´Ù3ðk³ˆ´´÷K×÷<9Ú Ç/•/@eºB Õ–hò c+Ϙ©²ôk­Dõ£ð@š\¸BçÄ&›gýóCGÈ¢^8ª YñÈ¢^QV6#+{Äë4¥Ì¿ßJ8{­K¬î¶Þ%ohf` ½‡dÄzHŠ í~«…×K)Y²£ ‡¤½K–&G‹–Æg©š›ä~Ë[8>ÜíܽázG½¡øA¼Öï³£ÿÍ-ÈÆ,:YP^¦¶÷û4K±¹õ’åè]ø}-~;__žd,ú,vÊý5+pläIEeT±ƒçœ*í- Wp&2¯qs®š÷àßö«}f0ŒV·œOUMx;/³Ñ7Ü ü·„Ý—…£¹ñ -\©ÿÛÎ ?'ÊSÙ *y-+÷ª,(›¡jhG¿–lç¤]F¾t„˜œ +dVÐQLÜh³EØÉê²måP‰.ËšÒ(Œ=8êdQÀ§e€•»»;0aO>°þ•ñ‰õƒûÖÒ®¯ƒ$vÖÞßZäm-°, ³.ŸC‹phd%žÜ’Vq×ÆÇªR<ò±ýL¼öäP/“}Ã=égªu/}Uû™îÌ÷Ÿ•{ŽÜ§Îê¯è,ëOõÍ”[ž¦1†WF «¬¸!St +ˆœW‹ OYŒ¯D‰@ªÂHT õ3ÃÑJ6çnL<ÇÑ6“Wä:âhξõ‚£ÿ-âhYëµ2GƒÎ:áh´ûe$è¬íéÎëÁÙÇ@|NTéì7g?t8¶_¨Ÿ*<¤ýl -™Gg±Wê§QjÖ7~üœ³4äê}Ãe[6ÙÂI憓A3:ŠIôJ²;Ðæ™È'u¬ÊF´À.Ûm´ñöšÙÉq&‹öK%6{ÜZ«oÍds±Wìì•Ù”§“³¥³±×ŠÇw-›ÔÔ†)”ÐöÓ¹j_ØK.2Òu?í ê¾*ý´Ëk¥’gÎ>uÖ3_õ(ˆÝõÉTZ>v9°óÐýþc‘,ìÔâC«soVâQ,è¬;ý¾¨«¾á×KÃorÀï…»Øí‰ƒ~ª(¯ígÓƒ "ê§ G]¦ºÖö#;—†e6ÝÒŸÜ©4DóªIÎŒÕS}ìuÒ&röÜ:uª¯9‘¦tý3c²tK2¨Ldyô Œ…Þøª¹+<Ûí9•Ó}ñØúläZ·ÀXÐ¥=ØDɰ—ÇÕ-ÕÆ|’s]ç=WÒérSªB}•“Z:9ÎiM™íýÉ¥‚é´•‘V%s-cïÃÌ~”:¢3¨¬p¸–ë^¯²m±³6¢Å•/­£7ØY·D\€±Ó‘NTŒÉ;™I¾-÷Árg%‡ýê©Uò­KN4¡å¤>—ªP•sU]/œh¬]’³Ùª—›ßÿ±þûøòbeðæeu-Z<_;œ?Xm]A×7Ü›ºÖt}ý©¡k]AGÜ=¨¡k]A—­쾆®uœ—žÔе® kª첆®uœ—žÔе® kª첆®u]RûöʺÖtŽ%þª:CÎ%tå’ÎjèZWйþä– É-ÊÞÚ§ºäràË+Jí€ -SJ­W˜T»ÄíÝ¿•ʳ.&ÌrÉÚÈ•=ùg+YÛ¶Ä9PÉÓ{0ÚQ.yùÖœq2u§\•M&µ¨ÏÊxÇäjQ V)¯™š -ìè¬qV^Ÿ©›sÎ~>“®êú*f_µÚÕ\0§Ó)¹•íT:9>Všš<ÚÂ^¬*òè–æê© e„vܛۀ©ŸêǰÔz¥~^ ‹léÎﺡ~ªT‡;Š}9‡9nºb¦ÝmSå^i²Å>?4å0"¬À¤îØ Æ -¤÷O¯çc{Y‘ú±—©{Q‘úù¡'©r`º'©ÐO*R±—^T¤b?½¨HÅúµj×@W¯e|Jx@Z\šÚq’°‡ô¦£\<öæ•Â9|¬ÓjJáR ¶Ä?Ø“R8c=+tm*…ëÐo™ÅXå*¢vveoJáè¼”Kڕ¯B…JÓ×”Â9þ±jiw ?[(†%7—KäÓ|‚DÇuu®>Ötµpת!Æ -Ã?yb2vö\AWÒaNó— w\ÀÄ Õ -!œV·ó"+o´y@‰vÑJ<8uu¹»¾+¦³&ÞQ#R•}‰îö(Ï}1|ìýPˆ/†¨¾´S›Ž¦/jÛ³²6µòþcmêøü>~Ø7\›8|àçl¹\›Þ¾ðEãä.4âhîï;eëqÊ»µx.î !rï#»ugO£CÝP³ÅncWCïïJŠÝÆ?·ª°X;Ÿ.T¬-û%ƒƒ™²¨|…ÝyË -»õš_>èúúãi2h¾+Wu–ïK‹°w‹ïAsÅn³¿öJ¥÷ø?Nü++;mUìö]”*Ö¾l´ª°¾k_• zÙbÐu1S:(¾Ç÷}k°d­Á`íó`pTRKX›jµÒÍ‘¬vì4M€>ÙZ¼—›Üî·Û¼mÝŽÞàÆ±÷çjz||¹¸s}*¸æ&EÔ\øíÔ‰S·¹•QÕ>å6§ÁŒÜ§"#÷›<ª]—öü+r;5Ç,çeù;V‹­¯jÎO©,{ð`¤í-ÕJÅœü±²„”n^’+šR_e'oû—äªzáFzƒ§œ˜oŸ××Á#rí½pÝ?"Wa}É»oí©º¾Âäðl~rE¤·}g$?¥b¯B…÷ãªOiGnù²dqºkÐxz_YMWÝóšjº¬êεtŒõ¤š®hi}Uœ:¯v9Óyéi5Ý«++UÓùâ‰Ü£jº¢Ì­Ô7Þ«jºŠ7„¼²š®‰Ü}5]~;±–®Š×º³jº"? Z¯½­¦+ª¥k‘ÛÓe5]‘bX”Ûóºj:·±­¥ky¯BWÕtEÊ hã=®¦+š’+_zSMWTK—Ó”zPMW¤œ¦žÞ^UÓíŸ}aªwÕtEµt]GxK«éŠºªP_Ùa5]Œõ¨š®¨–îU+¬¦«Ž±×TÓ…Qò/¿¾šÎíÀºŠÓÌ®^UÓÕÒ±Dîe5]I|«éŠ­×^WÓa%ro«éŠåK¯«éŠ”Üãjº"d´¸á0» ÊÕtE*iö=>0_iÎ<å @~_¬G…t0÷¾ -ŸªÖÞ6{s2ÚEOÞ«ã)µÔ.zð^]}Ú¨h)žÚ¾l[Ž'7ß…k+À«‘@é;´NÕs•Iµ~ª®tJe¯Ë•›ã0-&tÁ2{Èpo(¾kd-¢­¼EÔœTÅ3GÏܽ:ªÒ3wöN•Ö*ùkŸ¹Ë¾.WòÐ]GK+zæ®àýÊv…t=¸=»ð¡»Î”óé–¾2Ó²L©ÓgîŠ=й‡îJSõ™»*”\% ±õ3wåµo•‚G +¬¹Í=WÛ=¬³ø·Ý£%XZjy¶+åb4Óg¶êyæ]­£ÜÃ’zÇá|Fs“]Y­®ÃÜß"Y‰5tåIÕßík_•V-‰ ±V¢äŠ/l5ÊX‰WMе‹‹¡kþõ…]¤[ê6ÞáªÙP¤ó÷*Šªÿ_Mc€ïî_®¾0 „ØóÒm?­jjÓ^ú†ÛôÓñÛ®E½à­€¯=<›V•ìI¥p•t3ì¬ÓÂÚ$o¼¨°ö×íXSaí¯Û6±¤RßZÓ­€ØY%]¨JÙׯۉ|®B{ÙUŠÊZ£²ð½×–9ÔÇÍ!]„µÌ n¶ÄKKò™#ÝU¦õîã^¾`xTµ¡õÙ?þÛåCÕ.¡=ÝMö ¿Z ~Z2TŠVs?¯¿%€ûyíkÕü(]ÁÓZ‰•T­”Á9 2´ð‚îÕ| ÖI!C¹žß¸ëAa–Õa›î:z·ºëîš*_ ^¸ëú¥¼Žê‰Z½”׋zΩü-gÝöSá…»J¾ñW¿p×üÞkö;[‹×a¢E‹ê§l„hU3Òaa­¨T ›¨9¸/¥…µràÕ¯¤#¶o‡zRùØö²œ -÷\Q?¯ófñ{RXû±4Ñ)o‹µï§ü^¸ò"&§2%÷\^¹£½ó"&Šñå“k°Xꨵ«XÄtñز¾²¤Œ© •'­‹˜œ|˜*eL0èUéã`åf{ñ¾@g?*¤ V*b»«t*+<ÂuÒÚvïÈ®¼x첈)ãÃ×[—1u ”ë»È«ÐyëUSÄ•`‰bXzkSµ×¥“›—²uX¹ï¢D^®w‘gWª]=õì¹Gè*q·ô(V©q½zªp5UEf¹^Å=Yñ¥¼“‹êw'•œÏÓ"‘WVõܾƦT‘"ïhxHÏ_û§p<³;OêyÈ”èmŧXÛwˆÿ,Ö&¯ë[}ÃXØ·LÕ}uo'J6o$7=ó)Sšöø$‡Ýó™)MÓj&v}ÙwØFJëá_¾ÖË‹ð&ߨï…/Îõ ó;lå¯ëéÓO­ž¹û%Kkßö>dh,÷›Üº¸.ô¦Õ;lKœA“Ò4ÀU9þ¸u*âržºOVš«‡//ÂôΩ çÏ—áÅ¢¬ö/z¯ÎËŠð -Ë “ª´µ']´VSå8õõ¸tÐÑÛ±ðGY^=ûî[¾ og´tÐǧ£ùZé µÅ/Ó‡™=½½OŸÓ_þtsŸkYØîüåþOÛvÁ`ßðÃùêÉ~Û–þCwFLb‰Ìç·9¥ÓzdÆîs¢ײöòXÎË©Ô|Êj«Ñ |Ŭ£ÄÉjŒ®•¸˜J<$-^Åk™ZU:¥||¥ÃÔªòj«5'ªôª—YVZ=‚âºsûÚ{’ÎVª¦V•nÛb+¦Vµ¨J›(2®ºªJk“¡ÙLM¥w`g%yZ¯oº³ìÁV%n­²´ú†;™TGÙlΔr7á¤ÚæiUœ’ã÷iz5Ã̧976Ë® -.Ã<_-õ1wöfÊj—×ÑfuþÓ©çÖlåj¤ÕÏǵ,‡éÚ^íI”çtºJJMÛ‡ã0Âûúb·ö!ë¶÷ZSàkš³X©tMi;ÄT®kgµ¬6ÝWí’‡[f“FdslçJ=´£ójær­W6ò•7ã0]G½Ñ'X岫\¾e™W•» ¿#—b,çU¹‹þ埕É;;ÕGy½•æÖa!YNo+z3¥r)`›{:ª±ºê䞃â)áîßÅå÷TÐÆ3SúQ˜ªÏúX§¥€Y~ß¾”³TSºYoû¤qåý{ÌÇ÷_ÕY…·ÒªwÖö¦®Êꑱ³v¶J'k[ËS½³ÒÈe7kûžN'kQÖT.\ªN¯õkª«Ö¶¼‡¤m`;Uº,;½³*Àª5€–ówëO®Vˆq±î««ÖV{Ŭ 'Uk“È{Ñ&·­¬ZX©Ê¦UkK9¥*Àª5€ÙÈeÑ·Ö5€ûG}%›ÜÛGùZ¿ÈÖ«Gù:¨âlSKØŠe°W¡bÒS×ò½ÈÖûGùÊøXoåëk[ Ñ‹GùXëÛü_~”¯ÕkY½{”¯ôýÊW=Ê—ÒísÖ«Éáù´+ 6ïú¹3l~կ˻¡šÞõë&®ówýÊ „­Þ u¿Õƒ»¡*¼ëW!O©ïúµ~Õ¯úÝP­ßõ«|7Ô«ÞõKw¨õÝP¯{ׯuÊ"ŽÒ‹wýZ+ì…D]¼ëWPÉåè-Å>¥ª~ú®_ë|¦¾½ë×ziˆ±^¼ë×›@Ú½ë×zAVнö]¿¤à®°\¶ÓúÊŽÿp,¾æšÄ®ÊŠ‹./F)ÂÛƒwý -òoœWý^W•VÕ-Üþªjïúµ6uÓ,è×½ë—`»môkÞõë¬æ½Ûwý -z™lÇ-;ׯu/å–xgïúµ ¨pEjÞõ³ªfñ«~ìOîM•Xù«~É=$¯|ׯu(­×^¼ë×:ášOåëßõk•p}üc|½xׯõšûª×=ܶzׯu « V´«wýòIôÙWý^ó_õG‚[¿Ç÷ê[<Ì«~½y¯_¥š£ù]¿juÅÙ¶¯yׯ¨î!}Õ/3Ê+ÞõËæWýº­JkS;„ôbNÞõkwUoÞõk}ÅrGïñuýVwî=¾×ÃÂWýº|¯C[ºðö†æwý:zНùU¿rÏU‡7ê´|Õ¯eåcïúõ¤*í•jŽCc¯zׯõ«~]ÝÚTð®_7¾¾Îßõ+í…¼Y½x¯½Té=¾WÃó !Ó-êp;«y*~Õ¯“»Ó[½ëçTVøµZyà;yׯX p¥X/ÞõkJÚý¼ë—b¬Èl/¸®JÍSÓ»~ú-³«ü®_;»²7ïúµ”³f–¿ë×Z1tùØkÞõk­6G»{ׯ •üª_id¤ÃwýZ¿êDzòõïúµÎ.©®íø]¿rŒa¥@ûXRµwýZpòյݾë×Z84Uqvù®_‰p¸å8cn”Ûça#Ê/1e×î·£™Fα‹²òh¦ÅqnxŸ+[Ì„#þ¥>,#+as–ÓcŸqyMþq‘@eI ÔåÀŸeƒOë3?»¸]~|œÿs±ñüf«oø­Œ>~P£ó+Ôë©6&.kß'Gj語oü¨Õç~½œˆ'ß̾?<üy÷W¬®þjˆÕ_Ó3bmûÝŠXûûsG¬¿‹§ÅÎæÞ…Ø¹ÿö]ìÿ¾ýû°ëÅâpóç±8zúñM‹çßâø|îE|œ>Ÿ¦ŽÆÅ—«}q~~òM\¼÷žÅWïdT|Ý{÷øø¸Úx|úüwöñEþ9~|¹ˆÆžFÃTÞ?ceçèôÏ› °Ä7öâo‹Ç_>}¯MŒ Ÿ E³¿—†>¬oü¸ˆ{cƒ¿¯‡7u<²õëdåÍ„-¬½LýÓ{_iK¸ìííÚáá°º½ØÁß”ƒd<½f_¨¾ôé JwjÓK§ÚyÒ¼#8³T‚¬ Èxy_ßœ?>îMOÒJû†‹×ªÇO&ßx£‹bmi{I¬}»Þëû{÷OƒçÁV®ÖÌxó«“sÑÞ™h¬]Ô°&ñX=/è‘?ÑØ¿ÊÚb@6Yíj$Chc÷©¿ÕYZ*}\<<ÔÆßìéÚtcô+nWú†kC+Q£65¾¸ˆÐ­Úä»=,¼ÝÃ/jÓo½›ÚÔîÉFmâaVzùš^{AÞ­&‘oɉe9»üó²!qU‹³;µGÚœµUµÑyùðON}ÿ>ŸŽȬ»:ýڊ«7èOdŠcæÓ¯Û øÅÆ8?×ùmôaÿœ4ÎŒMãŸÓô'žýmº.ð¼z}÷‹†¿)ÞÞÿÝyz»ýñã±qµy²v1~¶-§ÄŸ¯v¢Û“+SÃ/kc››rjyø*ùbÊýâHÞô '_Õݯ¾ÏÙñæwœñÀ6ú·d³>368.nÆÆf,lq2i|.WÏgÞШõ­¯M§_Q¾;Àv¬$5Ö÷ú'wõ#…}O—{ŽMßÀœ°Éüþ?7§-›y™04Ð:5‚NžàÏ÷B}yº’ðÏ þyÂÝz ‡x¯ÔøP}Üìßéæ~;éîþé~Fñ–"/š½=ÿÖ7¼ü#XÛ_ú F޽ÏÜ›;Ëû¬Ëz|ßÈõXÔ׊VìñH¤=Gs3ËoFf¿.ÿ·ÿ½=|ûç#™X-Mœ©¨ñ듟´íDɇÞäêñÉîËWw¯v¦’ »„³Q¿Øû:¢h -ËfÆùÓåÀñ4}”˜àOKŸ¼ TONÁx³É’S³µWß}l„¿þ ‡æ¨ŽIصh”¾€¾ßŽñ§Ë¡å93›»K•Ìæ -8Z°_|×é©üä'k¹òŽÖ0a÷k49|š^i\¾™ùþgôhíͪþå:„ë'ïŒs€ÿÉTS©7D‹°û<ìóYçˆÔöv‚?­~ÞšäOμŸ¿{SK§“«¹ÙŸî7~¯|~:\|³p¢ßnŸˆÁJÜÒ>züê¹ü@’®óÁðòËʧµÛ“•Á›—Õå/ëïOf¾ìÿ[ý¸´ yiü÷ãHç`ciUÔg?íü™_ÿ}|òùíFP»".g»Å½ÒF {4{5nì.[|ŽO’@,### S|²|¬Î–™}ð§§@`qÿœ™” M ݘJöô3üâX ¬N¶æéÔMí›\?¯c–ÌF£D£Þ¤;'®ûÅö¦Ü>ä9(2áóD#葬# 19o,½{{ã’$°Lá_mãFlK‡«®/=pº¿ïÃ{0Àé_:Mã¶Š|OB÷ÿ†©Æj'4˜¾Iàx½`–iúÞ<›`ç‡ãž¢.\M­„T~ò·@WLc˜»5·^¬¾afíxp¿Þøyz‚Ÿf´¿_ZÅŒ9>wª±[`6ç¤y<øµØøyð~CN‡Sjå&ÞmüôçÕÊ»åÏEvIçÃs¾eᚆ¿ÐãüѪ·Ô˜¾íhx\K§ëoþìÍ^ñê>Ív;~ÞŸlÿÌ×ü³=÷aõFÜ ÿYy|œ»ÎhT¤ƒ¿Ùf¯5VˇWÚ­ã#(¾k½k»ø:œïâåêà´¾è…_-ù¤¶å”`µ¹Ó{«'?eïˆ }MŸ¸]ø×ò]x›giøn c%FˆØYø¯]Œâ6„¨`ŽÑÙÿ.ùŒèåÃ„Ý L¢Ê…›ÌaÀGÓqÍ/_ÁÌJnyÀ×¶/áüM®ñÕ(Èàè¶ÿÇøØÂÙoÇj£Wšùš”Ùû÷Ém x1G<>íhº&Än'íÀIíocÕÜÝñø¸tzfM~^ý3ˆI½óÖãjÌô(*a쥖êå5ýt6bUòñüb0MƲà÷ ‹žƒ„á7µ¯ ºAH(zì/Lc¬<}HŸ}§Ø$¼œí'H8É"a*‡„"x‹ïÆÆ -.öSWb«å³cœð–” Á5®äÖ“¡ý¥ñí_꿎h%YJ(¢Ð(Ÿ…!âpÿÎ A½H×û»etÀYæºq§˜”ZvA1Üö´ˆzrYtå+欥Ë.ÈßXñHÁ¾tÁÏÁt¿cœ“’Ð4bÌRuEšswÃ=åx óâv‘"³| 3wlùR<¤s`ŒUæO)a‹•WÉÍC²íÈ5×.½K1–½£6'mÙ%¤<·{‘P¯:‡{å‰sñÐ%¹Ò'ÃzK;h¢1÷Ä—’©ÛE~îqµ¨, ±V˜èh7Òìx%L´˜Ã¸{â3sÈJ±–]”œø*ÛÉq±ñt7º#ªqW7£ÒÊ—Ö]8Úé2¨z‘Ílh—Ë(b\¹9ÀZZ΢Âù¬®|~g:POçÙȨM$r7˜˜H©²õ‰Ü<‹œ$ê|)UvË-'ªPe"‡èìç%ÑDkº¬0µt*7Ó?‘Æžg¶RرËÛ(¹ýuÛ0®1×u¢Ccüë7‰náýÚðŸð¢6MíÔ–ßä\ÎùšÄ‘¤ÛFF7>Ž ¤a@kºÌ¸E)Íf}2V~’ÅõìÇK]NÞ…£9dâëû³8+އÈ_Cz«ÿûêfdåÓÚéád¬ëOjðïê—ì­MÉít”«1?µZ—×aM6~ÖcõuöF‰oµ*J<`® qåz_‘Ëljgqæ°·p´³“Zm)vЬ+Ç:º²‘˼‹¢ðÛ4Cu¬ÕnØ=hÞ élyÄ~ðîvhžLAò[¦èí÷.æÌ¸™]ërJ^.z#oÞlÂùÜÒðI¬Â?ï>$£Ä“ó#÷¹g—Þïe‡g£ pÎëÙ¯¶Ml`p£ÿá¢ZÙ˜›æ ƒ'ïvæÕøÙƬÙDò¹íÈ»=’¶3>ØìïÙ»fI²N†¹À§Õ ÓoægkÖcJÙ^ãjeúò-Œ"<ÊU8[×› ûX8.?6ߪÕÙûkZ$ÞHòira¼1¨.~ïDØÄ‡?‡_¼‘ãûˆN¯74»ºÕä÷ '–åúEm‹(C°‘¯ÏIJZõ¾|˜œŸÅ ¬zo~šÁE~.Ú! Ö¼•¡síî1Pcß–ÅöØwO­Üo¿´-o¨ñw;爑1"Ò¾aò8¯“é -EÃ'`‘‹ bëùrÛx-ÁæjhÏãÓ¬f˜÷?õç1ŒFCW£KpàÄ:í>ìÁüúÇ1uq6±‰nä³[TäQâ¹ì8(@y%{ƒksrjç×xƒ\×”?¤^ò<Ÿ¢çunÊås§c´9ƽŽG3ù¡ý™?]ÐÐ?¤†{pÂ7Y•nèÊfmA}­­nã†âÛÑÍš\?úÌóej:Û„íüzm'yH¶|ñmlm6tz6ô¯R›C@";guµZÛÛmü\?Û‘×Áò—tC;Úξü†ºõ‚/ -¤qâÙùV¾Ý®÷ßnÿüµúøédgXï­¼£8x’¥–ó¼Ã1;=²öÒväÐX…x@–ó_Ü.?Õ¾Œ®r%_ØÈŠ4q±…ÅÙäÄ/ùÏC·ë_>]ý2qª“»AÔV.kS7‡ðÏõ§¾áÚÈܾWÙÙ(‹Ù, LëIØÐ¼\âxÊ{»÷f3“«p(“ »Ä˼¦pJž[K™¥oŒ¦ºñ1 - -%Ö%7íÃb;‘ ˹o3³9n%»áÊ¡ìnlÝgÎÐÁ)3Š9Ú!x•W@Èr¯x¸9Íœñ¹.÷WåÆâꬥPt¼+:ûÇ´oÓͧ{EQÀ%ÃM¦ÐûpÜH¸‰ßšë`”§™ï”p¬ÕïŠëP• ó†ø¶sŽaiÃež”º{r‡=<«¯ê|°s’·W;õ -’ýÉVÖªGߪ¯[ÝI$Íû%µúf;ÌIæü]°¦Ž$ ñd#kþ÷$ ­¥õž÷@Ò˜ìôT©ù_‘4øj†»¡ÿ;’†0V¼¡]Jš¹ÃÕÅ…µÃ7{—Kã¿î®ÅµÕ¯}Ãë¿//ÖÖÎ'ã`úx±ñ¼±ÿ,l/~;ÚÛYúº7~@-áÛ‰£•…±›O+ƒ·?¾LÆþýþêãyøeòp÷iÐ7‡šÉo ¹1´8Ÿ&‡Ù¨w‘Œs&ÿàpÆTÆaê⾆Aàúõöˆñ¡HÈÆàӛɣÙÇ$ ÿ×XÓÿŽFøÊý¡•ð©6rr©1æô\îÇR…¯ÈA¦Vá¼ìÖ|¤±¿‹o9¥<jüÓ‡š‰[_`$:È„1:uúçÅÍ]òë£v¥xçÜéoê 0Æ—š…cIÐö¨ª™b”É?9#%Oɯ2SJæc=2SJ×ׇª:cbtagž‚î†Ú²ˆù5º1Ÿ$ ¸ŒðîMÝeºÙx*ÇÇÈLù~¬pªæüë}|jÀQG±úòô§æ½Ýe©C¯úÆõ¢†½‘ljy|R}nraìùÉÙý>‹™º …¨ÙzMë7T™þó†_6#z¡R]|Z °å,ãž*ÚA Œ6¾¿‘ëç7f#æâ™*…óúƒV÷K@{3jüfûCãçÕý&Dj¢önSN=Äû&Ö—c¬Bq¾ZnwñE6Gçy=Æ\ ”q|aQ·î³n‰1ãí˜;=Oó”vÿ$ @iÆÐïoÎI2® ÿôÑäs=Õ &5¤ý$Ùsn‚ÉȘÙ×Êææ?[€-9{„?—ëö‡k'ÂM—ýqoÓåÂñ4]ÎÍ$›ŸãÔ8¶+¿¸9BóËijÜ—L"Éf2Þ¶;ÞôÐfšñÁÉ„ ‘.Ø$`ÌÉ;9¯_'_M»_ü›Álš½†ÍãÁ”àHÊf“@ßWçÃIßï&¹ÉÕ?9Mûòn:9šC`ÕŒaÎÕ»:7¹ˆý¼tm›¼Þا?M·×ŸÎ¤Í½[›lì~¸ÃðóáŸm ø'K­î°õûÃðêT<~ný^e~­¦*“ÔÆhäúë{u¢H@óGzïmøåfŒXž—T–œž¥Im_½¡7o¾š½—›;‹ïNÊ&±L„ö·òiÓ˜k+×û¾ùôûH±¦Ÿ_ÎΉ›¨ÕñË óI}÷± Χ@Öƒ=~ªSºeÿöâå½éûëøIBmŸT:X °³_ÉWÚɽK×òõcm9eæK¿ëßu^ÛYÙÞ¬}p|§ä*oNÐJnÔI„1òÍ[;è—-¹³æäÛ‘Ù3ß|Z¹ü™´óL»ãû·ùÙì/~é^[ù=pýöýáçÑÕ«éÅiÞü«3àÒü7àüÿkpiþ[éÛè=È€KóßXƒýßÉ€KóßLæp—pÿo¾/ cÙðOãýËïÛÇýÇŸßþéŸê›ík¼Ý”òèÏÍßµÇÛÛÃÛÿû¼ò÷úåþöÏsÿLãí‡åÍÍÈ_¹½þ{sÛ?ÅVt褬°–g.¯ÌÃÏî“•oñúÝÆàû¹Ë•oât>ýwø€JëFß0%†Ñ©rV›RkjcOSøç)gµdsû2š4YOƒ+·K/«“»;sŒŒ„øëáúpºK·ïOßß46Þ~Ú^ù´vü¬ñ×z€±$s÷ɹørñÓ\õ¶Z@‘šA™àdàÍ~k¿Ø—iJ½áPësN¾3òúò”£œ»c¯oÖ‘ýNoù<ÉGíËÓ¯øâ½¤?½…£üy°˜ö}a¸ÖÁéJf¼]"B⤈-œª}ØÚƒýgåcüy$9 Ÿ3ÂμDö£ñfb&åüt'U޾ÚQLußpµ¬î¤ˆ¼)«;¶åK-²ÄÍ=5U{´NÔãøVô.ŽÖ×GoW6oæj6gÿDZÍîE*H ñã¿/­zp© |‡¼®ö9åÞ(°WG Cö`œÊ«Íqøª ¤«s5o*Ø««K|uØ|¾ÑÔ…ÙÚ»÷Óœ•Åtðç‰-̸;öÓ¹t2ðË ¾¸ñœ/ÎkÞ¬…eÿîðYËÝ}P¡ì!_ôþ“/zx>©;çåÚËó¹ërq >]Jûé&U²® yþ¥›fã?¯MŒÏφÇÓ»k_w‡S[½m2u;geá.„£3#•îû€ž˜‰•ÉØ×oLu°ã ”—¿òry°_Í-¬ÅCïo–¿l ÒÓs;iíçÕ86ï YæåÀÖ8ÇñLà‹pÀë\áN¸ÏOø}#Õ+àÏð‘L#VB&ÞÎýKM#èñƒ6ìofìÁ²¿Åizù ™#¨SÇæV/øOø†ëÀ-Ï -«½¿/~6:uò~Æ&›n»VüŒÜy{ÒÕ>åÔÎ$2éíi£•|Ÿk¬l½ù+€3®Õ]–ßý^ú=ðg-o8áéæ"F°žêjeúl’j˜p×vI ¡bþ7Óð«ä|Lþ—óý_Î÷9ßÿå|ÿ—óý_Î÷9ßÿå|ÿ—óý_Î÷9ßÿå|ÿÿ2ç;ŸÄmŠlÓ;ª¹»t ¢õÚk°KÇ Vt vé4¾¾ª®Á.ƒtïFu×`—ŽAÜý\ƒ]:Ó;C+¹»t âZ:p véÄ}éÀ5Ø¥c°¯3×`—ŽÁæûPZº»t âZ:p ’‡(ç¥1Ø™;en’\f2a]qþõ™{\—Ó6_A¥ù -IŠÁ(EåMvt0rï²#> l±ö…0‹‰KSÄxQ"¿¼Ùlüüá#tçªoŒÚöËñþÀÎEãíãóÊÏëçŸÿ\>þOÿ ‚NvwŽ6Wúgú¹í´íƒÙˆ h _cÀñfxÑ'úßÂÿOþOßKßÄ Ì`þÚïu?Õ/ê/"íá‡ÀW2„¾¯B˜•¨«Pûÿ+e endstream endobj 49 0 obj <>stream -Àë2VÒûO.¡÷ЇÔBz1¶ˆ=?Ò¸¦º"ñCd~ÄBƬí'‹‡?þþØ‚¿ôú¥èßí?û"úop²ïû¦C_Èz¨DØø¡®ÇQìõßXÁÂGpX×ÚÓýôêˆ5㺈¼&X,µì¿îË€#Y‚Hõs§TõH‡!aa:@ì@Ç0‚/³muÖ}Ä'UEô롯bJ‰@ö/Sº®ü˜:Ðußdí8¨{÷ÀÊÌ`AD³Å„gfëÉÀòÊt= 3nÛ ‹Xq¯±y¹Q=ô$uà×aÆü{)êaIž—Tôs 8’¾6ëJf€ÙH*ßü>Gu…¾i+…GÛ$;×øp¥¡WÔÙ‰/8ÓPÀ~IJÀJ<šS×¥g6&Â@Øÿ>#*ýÐ,U “ -|KÐúa¥R¹0;éò³M2¤E"& W%!F -üØvtêÅaÝ‹e@ma3íLyú[+UH4áÀdcìä`¾Ùæ¥sØÀfJÙ–JÈ´GÏSÍmm—ž×ßǾO§ - 4Em x¢lcHË9â Þ(§m S[9Ρڊ4 D+˜*¡×HyÊn¿ä^‘ŠZÂö2°;ð|ŸÙGšÙ{$À0¥: Xª´"ÅñB\pŸžðB¦óv|Å"…'à–± œ-Ä“KDå™s‰GÔ ^{<©U3I…¡e7>(I>ï´H˜¾‚J™í%KõˆÛäg¤ªªm¢D c"ЭâÈ7ÓŠñà¦@ÆÇâ'Ó6цB½¢êˆ0Ø Ô@aVpÀtù÷0ÅÀ÷=ž¬Â_ã¥`­(¢ƒ€0MýðAæÇ@´ò¡\ê©)h-!-6´+¢ ¥²Ðã僬ƒ£.‘}˜=œj ½Jg€`~(a+BÛA -´†ZQ[ÜA¤*8MQ =õ § -'¿µã+M"_‡•Ä­i’E ‰kòÂ(–;,p3m-´n “t£"ŸàÉHÂþ 5³VC¹` 4}U€ ,2dÊ(0Šm Y'î <: ƒžmOt2q«Qo$‰ Ãh±Š ´kB—K«í¡yàÅDV@ã¤S¥@ê¨Ägöâ´Ö±J¡¡{fa@ Â3Ü6…Jèžtò¾ ñÌð:òb -9B1¨ÎÌ™T‘™ÚÓEa©8B¶®¢üòÚà€Df¨”/¸°J>ÚU äéÃYƒCm‹l8$”À®‚E[Æþa¢: -=fBÉ# ­ êN+áˆyz±v€Ô -hÚ‚ÆÄ±–X)F,bØBÍ¢Èe~¤Íâ*ôYu@ žOš9òn W#q¯™åÂ1GéÀ 1ú€ÚBÖ8´á} VfXHÂbDF,5õÀ^öÍï.ÂHÊæ×.T …s—šù-ðþ8ÖÒÌI)>è#ƼÄù aTüP°‚\"òÍÁ"Æ›ú@ Îú-8=™:`Û%@ÎMt‹@ÅGŸadu Ø¢æeÁ¬ °ÂÄ*¬Â³ÎVÄ­r…,ôDß'š¨0tAê¯U"€Â<Ñ­T¤‹wPz=ÓTĬH‹¬ÿ 6Tè—n ->™€ö(²z˜ôX•Eª -Yã‚ï[% Ó#…ó €ÚH6ádl¹8Úq`΀ŒÚ2KN¬âÇ I“sÚJ Ab –+áTZƒÎX§,F®Öf1ê¡Ûod{Q¦Tìçg€¢Z«|[Xn¨Ì)´DJ\(µÁè-†c -Ü;Åó‚IøÆyÒØ×>êõY šcÒKœ$ -ÛvªBÚbhBL¹y®û®údÿÛ?}¢ÅZLÌ=àð‰À:‚ËšÝ% +”ŽŒMÊþ`™Š5hZmì»@Þ#$è(×ö¤ Ï}F¼ñ F7BÑ‚º†š®i£Ð  ol@Ÿ¹–!NçW& òøÀ†ù詽Ðhlí6a!Á‹¨ ´¬@¿·¬?" B˜d³aý¬z§õØþ#U]Hxm8LD›i‹L^Rh -û:þ¡}/é€Á¨W Ì`¤_²Fç±¥”jº12vÏj€“€­m8¬mGÒdØ;ШT!–-~&Žˆ$e"Ü@%‹“0Ó: PÃíÀ–±»‹SÆ›§J=grmÜvR™^cvG¢7)Å@b›–p:=%'ÅÓÖFC™5Ÿamµ>è±ÎêǾuˆ‚Á宀§*™Dy­‘ôn@BÁÆ3 |ÏZLÖ»J»„€ä£:]AMU( 2NW˜&™qº‚ž+6\§+êäš\ŽÓc¦š:R5¨Iq¹@Z<ÈHí‘vì´ED²g*uºj`å^Lj˜ãtÕ(£4ûg­ÓU£ Ë8uº:@×éê‚§+vža)ìtÕ@3Æw®·Wz†Q¯+ÁjÎú] ãuuÁ‰××*e¼1Æ•Š3#ë7JÜ®8ÙHzù¶èYÆÅcÜ®8"2Ö|âvÕlśӿiÍ3ˆ­ÛU„‘ÌBˆ»UX˜ãvuaI„è(6ŒDÆ`šikÔàf'²úGM=¿?×cö7››‹Pëš|–ìuõÈHÓè^Ð*ëuÕ¤jzÊb"ÔÁÃ0Û¹cÌO¼®.0õº:ÐÔëJ@é9^W„€‘ñºâžxab¼†–ÿ¯«F»‚¥SêuuŽ×Õ§^WDG RWª†ÎÄqÝ®N‡bÆi‹šC¤²nW=‘w»‚"iÏêveލ¬Ý®Ðq»ºPPÆùœFqªe…žâ9¡$J©´â0°:iD"pnM{Òò˜ÿ!×3ŽXäõìRÉ´…ISõLVË5ìµ`—!ꤨbÙDgÛ¢x÷¥NôÌØþ(ä:̶ö ÄY”è#aE×ã3Äœ(ÏJ£“úžãµ±:©ŒÙ§rÝ—§:©&kÓú‚ŒNмÞcs)ÕIy^Æ”†5˜êÊlè1 KB8 =b§l­Iætb"gçubÜå˜5ìT)Öä„ô2š.žëBt´b$ˆPÊ8×Ö³ç;ÑŠ]Xª;ÐT+F 郉VŒƒ ²ð½XC/Ú\½™Z¬"G/FˆŒdV/.Àĵ£÷õÅýcãý'9üʧñ -z¹`ƒXSNÁšŒ:mtRT\GÁÓÖÕ«(z Ã\%nΈ}fA†±¶nNÉ¢€@;qdÝ4ÀVq(°JaLã9°ðÐÂD°V©…#|—:€‹£ÔR,Š;HÁh¾L’_;ððØÆÚcRù2k70&…(t‘“³Ù¥Òx“¡c<Ìá7q–º`X£dõvµ©@¡¿Ç³ë2è¶@î”AsÚfÙM„ÓR!Gü&éí´„@êÄáî{¨ù -Ý'‘iJŽ[š,8û{!Bžj¬­÷Î;0ÝÈ 7Ë"'2:s- -P› ÑH€ì¬óMp?Óg€ª_ SĦ@4Q·&ÞR V `n€‡F,âE)¶x`(‰®Z‚—¸ £ÀWŒ¨ïg Ù@—ÅæëÙ`«VõØól[Žï!qùžæ žéÐâ ґ̵MÖ½Õ#0B–éó ˆd¹8Þ!“0ÛÀd€º]Äëò©Êè‡ÖRê qº •b24aÍ`JX×:½c‰býïa`Ž:È !JÍý"0b»€è’e¯¹‚QÝîhìøù¶ -×3ν„b4[1Üg"éŠ6¶  £(T9 iÖñŸ‚c¦/ž= Êò\B(1ÐŒHŒd`ÿ¨)3ë–0\C‘¸”9 ˆDIqwä}2ölÒ¢FðJi»åytÈÌ‹© ì뀙2j$‰ß]¡Æ ñe9‡ shz.‡Ì7¢x”27@«1вmZqàåF*\÷}36)J{@.,CôØKŽ:Î$ðiÎÚbbwa¨ åvŠrܶQh±–¬eر— C(ö¤¢Nj6¸]Äqh`î€ê€åS¨Ø× -"d©ÌA‰JN%Ú ÅB+]—Ž™-⤪ñÓ¡ÚÆK÷"îì>84ÊÀ(Š&#²¤ý(öX€)ž9G q•Ìz€'1G ÁZ’,U" ø¨i•@È©TñÉ(‹,µý½eA‚%IÄÌ:waÁ é:$ ? Á§"›@€~äˆ' "vÇú3+Ê(3@³W°XëÈô›  0‘’¶†Kú8®okr–qb  !,% FŸ\r’¹¤UY±˜ig«áçØˆ%#†è0òø|)4øY?ÂÈ‘áÈž@— f³ÏÐGÏS–K»@Ä…o=‘)8dÄpŸ±AKÌ‹E Æ(6T¤…ñ³Q|Ü£ì/U-0ÇLhÓ -Û TAî cv—ÇPœrE@K˜¬à‡¦e"Spb1EèœÌ¸h„ Z&‘tŠ­‘*¨“%D& -— "e9—Š˜æH1ûrˆuSj¦ ÅEN}'ed1ƒI(ìXÖl¤—螨y i44aAä„%P"ƒ)Í"šÁ&ôN@ Cž>g„‘‹@ÈJذ/æ ñ ³üuÇÑÂdïå”Ê섊´áo&!}!*2L3RqÐ'ê˜mbìËüÞ¤4€ó.EÞ="E­íOSh€>'•¤¬úìš-`“)'6‘6ߘ t(îsà›˜ŸÃÜ55Í1´JbmÄv'âc‚Ó`Ìv³¥(ö0B*í`FaEÞš ó0¯24Å+3:7ÒŸ‘²(é;ä;M eZwÎд–v0·mBŠHRxý…dë(Pó:<Ã%i/îsà4ˆ3±&Aœ°Yí[õÌ-é€çÚ†VÄ^ú‚‹fU g(ˆ˜ÌÆÒù¿Ð–N;!†S 1÷0jœvà'V¿ÿ6+ê5›DÙ¹Ùå 3iFM“^…Ö]LYx”¸hÕO >û¾'$¨9œ›àš‹T8Æ"#Êh@ãpŒ…Ùà·¯„Ÿm‰¡f3QÂÛ`èˆyŒñ:“ˆª0'Á R0h+¦SƒV¢uT"ØNU&¶²G¹´F´r:f’<¤ÌL °iµjÒTU ³Ð×yU2gÂ8«*` ƒôÃ,¥J´i¢&ªFçæ¶MHÑQšÉÖQ w¡¬í”ª -ØÉ· Q„Yñ/qUìÛvU•È\ÛØdz¹ª.Z±Aåª -J²äʨ -4ûæ¨ -ˆJÉÒÎUÐРϨ -˜ìEQVUp–›ª -ͨiRÐ;D6Š ®™3 !﹦9u,Ùq²RyoìŽKö‘òÜ¥u«£ÄÑCì€\Ô«u¡ P‘ëf@4w]<±‡“Q™[L’-£â`ž·ª¼ŠƒF¾Õv-1` _eÌOŠ­©—¨8B›T·¥v(Áª8ÐUqpªâ8ÎQdUAI}Öž¨8ÂK¦šª8vàeUœ˜a¤8Uq¦K’›ÌQq„o›Qqò&ßò&Û6´"Âáb°Ÿ!%åg9ЉåÚi[¬«ŠD”ã£Úam©uÀ®Š`íY·žUq¨^‹™fªâ @Ӿʫ8-–ÀϪ8ÒÈïŒÚ"Òü Ϋ8"6i·­ˆL«â8@WÅqÀ©Š#0«ƒ$£âPj~äUœ­¡„TÅÁè‡2«â8@WÅqÀ©ŠƒÁjdVÅHU‘=îÉæˆˆE@FÅÁB îÕað‚¤‰«Ëpй}¶-¬\Q”ª8'ß0µ£>*¾é L—n[ÆJëþøªw.ãÝËýSü×åýíæŸ›Ûÿ ËþƇç¿ÿcÿVý üÝÛ?Ï?/ÿ¼|úùç;ÝßÜý¢Ë¸ôÚ*ò°ÒŽ ,»•˜7JU©Rã7†Âòl8F*ô©Ä:ÂÒ ª½Æ"jÅEÔÓ ŠF‰g/ýî^DâĘG -ŽåAQ8EFQ ÞÉ`ÏÊKŽ˜Ç¹PFÞ)ïšT> Úƒ}¬z1GGa¦ƒQkcà } Aœ€9ÁÜ̘,G`LƒñCã -SÞ´¦äJÔ2fæÈ`Ó$è ñÑ;B }v15ÞLmNò{ªVÅh%”ØGs‚&çKV¸µ‚Ö\䆞é%­ ¦…Át¾µà·lߘûª­ôJg‚qRhäæM‘e?éÛ®Á"4y‹):0¼ŽiµYÜQ(³ý²˜Æà™Äbüì¾P ÊÓqnMT-Èí9æYh` -9 -ÁÐ{ C•£'ì„Òv²ÔG•< ÚÉ*%Öø–&-¶©@"Á6¦›Ê8È5Ž¡?å5õã¤8‰ÄpŸkøÝYkØ>O…Anš~”Ç‚mQˆƒ?zùœ3ØÖ"bA›ÝÑai«6íFjBú¹]×XeÑü\ÑÔåÂ9‡¢4ªÇTÍÐŽHùYjÕ²¶ÝÖÎIHûΜ›t&™S–Î;s&ÓUfN°A‰LzŠ» OH1á é¾døMº‹î”îy–—%’å| =eùdB}Y®šj–7ñë²Þþé@©ê(såFF½°éЙ4†Xã#4EƒÞtOP8v†U(ÌžËP{œO`É—& }ÐÊÐ\ÃZCèc Ù%eå…¬¡„¾µh0Y[ú”bmR€‘ =Ñ9 ðUÐ/ð÷Ú·Yç–¬^楨Ü; ’Y¡ŽSŠIˆ‘ÇÍU š—ŠMâuˆ)È1:34:TXÙ ƒˆãøDË¢Òa(LN¤ˆÏúQ®-šáÑÇ^µ"U1ÝA¡ÑŒÀREîÀc“À˜ÒNþ’ùO³ |ÓA -Äú1S‡ï‚#¬ì”¦­'¥ÁIÇÁkÆYî#¹‚ÚÂáŠi–‡‚0›8i Nö‹n‹13(J›ëÙZ-ĬŽPWÆ7%¸ Z¡±‰Y”20)•6$ããÂÆ(BPv{ÈtDE'4WL8׉˜¢EŽl%„( MÛÃTôeÚz ‹˜ 2ÐpÌ‚ŽME‚)מ(]Úñ1­ÜòÌkò=•k«ÑçzE×|¤šf€ ¦Ÿk+.†<*àml¢ðÔ¡Š ¡œ ¢˜G*—-³YBî=BºÏIG±–ˆ/ d K+ݶÞã¡y0S$’l!3ù8H¶(ÀÌ”˜÷X+Ó6´‡£°F,;ÀÐí £Ã¬C˜÷K@Ë50º-mK^%\k«1$Q4t±TÕ"¡GÁlÇ{Öñö –TfuBüÍ»÷݆äÐ’f5΋6 -´aÒ÷‘’g…x%Ȉ # -,cñzãù%ÕKÆ3a¡å£˜ãóÌe˜àNU`Bæ„*Ä]KÀ@Ò¡ h±¤4eíí $%¼Øc±A ¬±Uy\h7*D•42øö0¢SÙp44%D`:Ð|+ÃH™ÝSöûšèR›ú)îÕNKsaÏ5TZ2ïól*¡†ìYäh€ž&H Ãí •±=÷”&-T¨†*ÓâB—#¾§±ÓQ@†œõ&»?Äà¥?SÛˆ;…—Z;ƒ!0²",3ä'Ì>¶¨PšuS¬*9À0½ÈÅÇx2”a^fZ¾)àå¡Ì´|í°D…¬˜9IÌ+ãÙ$’ï„A``çjÜo·Ñm«íŽ!PQâA`žšÊV a2y 8dš¡äC’—h+˜‚nmʸÍrut­+mΘ'5#œ*Ê 'ú:³.K€-ëZE°¤ü9’Æï"ÐÈá˜g›š+—’ 8Dƒ623ðC+Fíi„¹OÊF °Þâ¶Å¢i޾' PYÑè &zî@YqƒùEÆFÁ£Ny\•Ëg>!¦µå‘IFE:0%ÏÄ‘(…‰vÁˆIõç‘¢±N -Að–óecÄ$´6Äá)HÈ=CbñBB^K¥Ô6dOÙù¡ç[`Ž+»Êe@Eé‘þV¹¥ P¤½œr‰`_y˜*—^íê‘ Äó’S. y$Ú©m‹‘êD“eå2 ÒÂ@ç”KkÊip”Kz‚Й*—.ÐQ.]0Ú„|Uìû†~Aâbô‰Pþ'JWir©¬d‘lbà éF‚€‚"§[b G,\%’¶Žn±ˆrº¥ «@Œ5/F¥Ë¤pʤ¨æÜêß–ñà}¯"’y&…—ôè(εΕ0©€.o!gŒË¤p‹b/ò3L*Àk°x;S&åC·ƒœ0)Ùà0¼B"\÷w 53m‹5ú Ækð¶Æ~L PÄ—=é‰×ÌÅlâ5+Ø…&.…Vˆ!˜ý´QxU©ÖÆ–ó• öbŘTßN”Ar§ÉЀÑÇó•îÈdV發ÇD!0ò*íë<8 ònkqáÝ;†»úÏ ‰W9RòXv‚­Ô~²œÈ3` ýÄtˆ4>`ÀX0K÷ÐÓ­9¦òÛ×shƒ«¸p/Ž]àµASÄqP·­ÇÚ7ªýóƒä‘Up(IvݾµßCÅ›ùztù+}.’ÍuÐ ä8¡iqä¹—™5–Ãø‘ (›/MHk£‹ÛâmŠÄ¯¯“^1—cè)U–YSé3ëˆIìfÊðÑ~¡Óí™[Ùï†Æ1u€ÑU/6Ÿe%ØB“¼ñŒ˜>NúÆk¬hº{ÇFzEÌDœôH -½ñë¨#0˜,äœ4Vmï2³©Wc,Ñù`PJ´¹¹ Ádöز²#óËÙÑ™{H:0à˜ë\ MªØY€ÓâR -jËJ|e"Z·JIC“’ò®hį̂Ž(öž)uÀ -wºcŠÁì ÃeN ¡x@ì@Ó¾ â ¹ãobWl¢kβâKã *âË4ÕðÇýÖŸg(/Œñ¦Y²GÏ/»Zq1ltã°~dÂ(l·Ø<ÒøD‘64{›mˆî[ÐhmfªŒ¬“Î*^”@šx£Ý•·¾Çç#I¥ ø(`ÜAN !ù±ÍÐ òä'giðžuÛ%RÆb“ÁÆ¥„žF¢ÙÅP`ÒûÄ’§Ëy8V‡Ë2‡#œÇ€i%FÉó10/ðe«’‚Øè©væ&%Þj5ó¸ ¤lÞÈ*:‰™R¼ìŒŒH#ƪÑxCˆ®ÆÌ@ÏWnœùÚt€!ù\[´Ý(Òx±I蛡RE¯ ÑÎ’^F±2U¤ «H;àT‘ÆXKdãzV‘ÆJNvÉ(ÒJ˜'W\EšR¹8.“*ÇtGBìjÌ–¹Ãé˺)×Ê0ìT‘v€®"‚EšêÙ°Oi¾ŠÆžT‘ÆÂ-æÍŽ"!)r<ÞCËÌ=£ÆÊyL®-ºÈ™Û9Ê1=ÿBöPF‘Æ”;ŽÚºmÑ7!rþ‰¥ íúÚh*£“¶Òr|G‘n¦pG‘ƺ–~EÚ§Š4^ªëY¯¹UŽ1pÆYNEZ)«¸m1SÆ3Žl«H+Ÿi §Hã¥&§#U¤Q…àítif;°àT‘Æ’+Ñ™™Dìyý9E“9Xî¶¾[ÿ“U¤UÊa]EË—ÌYOi³©"ݼ M¥C±‡ò›]LÂÏxÅ“£?Ù‹£0ƒ*PV’ ï°ƒDMÁÜSOÚà˜q1â%@RhÃŒš‚@³¥nøÁgs¥ágzj€ÅyÄB aÎnÀ ož²\" ?#ÐP}~F ùî³ág\Y+cnކ@£=¥ágú6~­Ò',|¯JÃÏ„/3­$üLØŠ#“z“„Ÿ _Ì%Òð3ãÐ7,ÑœPz:C%Ú¦ þâUL˜/Ýñ–¬XEÆ1ágÌþ¥Ü´lø/ÏÚ4¬Öjÿ"HôÝ$¤Œ ÁDa¹Ðû*̶•‰j›†Ÿ] ~vÁIø™—™V~¦¡xZnøS’-{IÂÏ|§—Í ²ê:vc&N­‘ ;Ú¶¾Ý±4üŒ@AoreÂψDCiøFº§ágF¢‰«‹ÀJÌ4üŒK0 -H~F ¥'üL`fiø™€qd¼\&üìð³ NÂÏ4Úf´hé9žÌFJ#÷¥ÌµÅÖÀ}~¦‡GâÐ$Ý$á瀊ß(¬—†Ÿéª±@—® ?ãYˆ¥2™tIø™Î²5&üL'L[Ï€ ?ãiô™”Ýð31”81JÍ[W˜z/­p6ág➬L¹„D¼ÖÈì$üŒ@£Ð¥á箜©§¼\«äRÝÛ½§Ö­}ï$ÔR# ½1ÍwüxI>Chï Šl0Ý6âÛ;Ö|–b¾ Òýa‘P)Œ~@å°PÚ2Â2AiΤÅÞCi(‚Ëêø÷xc$‘vµ¶÷¢Ii3”ä -:tnF÷5Ï‘p±Õ´\WŒO!«.’€±`Pö•f`XÒä’ó‹MƒVÒOÙ»úžU-©-›:èöC•ôÊù:: ­ñ“ž Íø¦Üñè%€]§¾«ùÛÖ2²AP'”Ù -m|Çmz´LXªL¸ˆÇ Un[e.ŽÃ^If’]†*ùâ›À0´Í’‹àLØ%±ö©­ò-Sæ¸&ÍŽà -}ið̵¥‰ᛟ|s%•¦*n&-*…ŠLpÑ -ÇPZ£‰‚@%ž‰îš4vZ8gŽxÚÆ¢ééº)+ZÌÅ;Bœ¶¾Ókrs¥!¹W¬#w„obÓôü SÞlë±+&´ñ|hžË²'Ö‚c¶í§{½(!@…ÉÞ‡Œ˜»XÜ–˜7ÈüÛÜÍ@XßJ^ŵҠ6Æ6… -âÜœð Âxm8–ɰvÛ⣴œ(!“[O)¡Þ7º:‡iC™{ÔØÝÜ -&-¾ñP¨äÚºPh›ðe*tI'<Hý’äˆU®-:÷•ë].¤z<Ótg_$E^Zà±÷9¨²v6^îÄ6ßÉ··q™G -S ¯Xð Í™¶8IAh ¢D>ÃÐK• ¬­¯.7óÙqŽê0ïõcs¡+ÝËo¥"šKé-(~OÆ·—Æ‘ïÙþïåg/±r¨:‰|Û/˜Ã­e -3ü}¥tU y2`kÃos5ÏLâUùÚ¦5Ú^r¦^žÔ’ãYˆ…©N¡TQFæCÓ—ör3Þ¥ìeÀôzcl“ýüÐ>³ÈWëb¥ƒ¨ ˜”ø8´Ö`hžßÅš8DFF`§åyÒÚ%x"–Mm‡;ÐÌñÍuL±õ°¢áé%·)%øBëËìÓOal³üÎK’ŠÐ ²~¸ôÂ2“Ùóƒ@ƒDôb“ÌK²ÑתíÝ(¸ .B“(à—pá¦W,؈í‹\)ЋìŽ˜ýÍ> ž¦«ÃB%ŒÐ·f)N\Yo*è‘>eÛú 8½¢òÉAäÌ |ªøÌÍ˃98Žn.Ñ ¸°;HÁßBɧŠ+rÉsø– )É©·ÒyÏ׿’'Òsª²ÓBψ¹ruíÐó Å!§-"Ñø<:–Œí@ù¦2OV'D—¸H²âca7,ä?<ŒöN¬ˆÑ+{»¹ùþtÓ«™U”ˆHœç´X w€“y~®-¾ãd5c•ÒÖò±õ}GÊSÌBÈHÙW섹&ŠDŒ¹$žuT£b+=8[÷[FA9!Âi›2/êÕœÑ&Fç^²&´g4©{EdSEÌ£ä`‘Fñ¦ÃÎ áxàµ]Ÿö¢\Û$Nõ|¾aÝX!gmÎÄ`£×û’‰IsO2ºÚMÆ2Þ½å!‡s,â-/ ’öM@Í Úgû”§¥Lj†Ÿ­t£Ÿá˜i[ŒExÖÙ#„¹Ž¯ ‰MŽ2¼-ŠÓPM¶Wì8Pc°OóE&)%¶OgúäÚM# “Áê@iå§·kù±4ð çÁÌYi½œ¯RŽ%Ò4yxW'”o¦Šm/U¯± s:2æ¿YW›UÛ±Æ,²¹R`ÇÙ÷ô"“²à³#ûõ“EéƒÕ“n>/Ñ«Ü^çsbŒÛÓ¢¤Éì2®ZG„¸*Ÿb­Êh¡¢ÛðX—eצ}3Û¨6eVæéY.®7=äI[Å -BÒ«L´Ó(ÕºñÆ4³åA¢Fâ¥1,ƒðmYm.âŠÌ:!*ºÒäBù‰‘ƒeì¡ýY‘Oõžq­'Å«tU•²îãSóév|›ðcõB™°Œr%Uߤ²›à¨dt3˜ÍMLÕ7¼+ñ'mÆå¨oÍLνøP&tçªoøŽˆ/dV}â$ƒ¢T%à HvÕ7,‹Š8ÝÖi‹Ì΋³êVoòPõ ‰,™˜UßèUs­³ê›tÕ7œªo¶f¥ÀQÉ$Þ •´‡×rK§­Â·€â¬ú֌ļú†o®YCĨ_ü ¨°F"‘­4WÔÄ( ãI7"_Ì´è­Oˆß ÍùDìfÚ&mé9>C¶&øèýTDgÁFŸÀ^S½ÐdŸá¥V±Ti 'æ ûæ4Ø“„|\`”æH¹àÀ&Âà`fZ:ñnâ´ n±´Zh/YBj—'m#ë\I“4ðŠ8ã2t:ðàX±â´Õ–°Ñën墟ÈEÍAy+Å- 3s¤¶Ì# µS¯†Öˆ¹ù™x0tÂR±>ÍèÛ¾}'\HËc´ŸøAñÞ;6¶,±›«¶ˆÃæu’ÍåCVȸƒñLÜ«QxtêdÇ;Žø\¡”¨Å8[#j¼$ˆ.¤•ªè3à´BèÛ4Ï,8L÷EZ6‰ª¦Jž‰¶^…8Ýz—7– 7ǶWŒŽQ`H+U4¹DGQZ'hÒVX]¼™<ƒæsï* xõHÙ˜-û>ö­šDçq~ ZetÆWö¤ˆM3• Òÿ¿âÞng›ÝƼ‚}߉d0»S’ªT¥ÉQ÷7 À;è™üì‰Ãq: dÛ·»ƒ¾ûÔZ‹¤¨ªÇɱ1 os×ËG¥’(Š\\<‡±ÉÒsߌGÊZÙY:Ì.vhe7ÿ1˱gaWœXz§øŒwDÇL’£*DöÑÛ½f4nelzô±>‹vƒÍËBèï«Í$ så;³*hÑꋊ­ÍÕ§ò(Q0¡UYHŠÑÙÓÒÅ–j°î›Ý}MË:ìHv¯¸ˆ¼^á4¾§ùìÓïÝ{ðˆçÒö¿¦p --í㟆l¸²+Þ3µMœ™’éHÉB¨AMÏ^ÎH è§Àæ+fµ–E¤²²¬rU±Î‹á7º_³ðš×å$Ƈ¹ì§ì÷®=¬û)hÐZÜOÂ{ù’"„µ…1Q¶ÏØÜò½'Ñ̵:ŸI<»'­† ü°é–=‰F.–qNÙm_¾ôý8!b»Ø³–Ý&psó`¿g·!5lÅÌn3ÑØF«œ5 … ÊnÓËSÚd>‰žCÇf›ß²ÛÌ•sGÊn3Y"øÁÌn=o¸Ï™Ý&Î^[4g·Ù(86‘ÝfWÍË×c„o8Ç–³Žì6„Æ„3³Û°`Æz•³Ûû9ϑݦµ³ÅÙmiݽàÚ³Ûxº5GQx›1“ÝÓÍI\Õ,g·4ТžÙíM©ŠyäîÅàûŸhðì¶>Ì1ÏV§¦™ÙíËnY•DŒ:e·9åt&2Å£(TéE³P¸-ž^¨á·ýÒ±å³båŠÉb÷຋‚Xm0À̘INBt×ôe¼ˆ;Ü:üìÚÔÌ›‰Ía>«E©€¡óËæ—/[~VW @.A3‹Jgw4÷ô˜á¸…OÏîºüäŒë‡/¡ŒëÎN<ëSÆ5K#ãº/œPv…Cfoœ3®Œ¿ôŒù³—³ÍŒk¦ŒkGÆ•a!#•ŠŒ+ï4S3)ãJÿûò<ªe\é=)JdQY} ¶‘2®4u<Ÿó×÷.{ nÎQƒK ÜÔŸâê\x÷Vò´-^$7§“›D h'7‰ò¨»ÇYÈÐÚ -çFm{”9߈ªèçx<{: †mWãg¤ m_!ŒkÐ,ÀN+Ö✧­êâgþî²UݬIýN"xD\$›×¿{ŠŸ^¸‹‰1á^kÄÄðž¯@GƘÐ*é„ÈÏ6ŸðûÇ -Lá©pLq@ÿH»h•*ÁÁŸïK¦ ÈØ8£–g‹ÌiÅ­7rb0¾Ö°pV‡dñ<½®Ù͉ü`TB;-£DXj5FYŸ…©NÓá—iË8Ù ôu>¿gN+¾˜žb#èÖ.½Ä›SÝôÍßX¤Î7ô¤{j•·0féÙ¹w†_g?ì³1‚v³Ru{Ä(‹Osÿ&g—z@8‚g0ÕàíN«WœÏ‚,Q߃Ð-ÿÖœ·n¹ñ°/¬$ÜÌ‚;dòºéZš… XŸÅÈ/§K–ŽÍËè…P șfHœ*®Åôdæ$ÝÕy`”ˆÇ6™68Y§ªmj 5MêþIØÿH´i›ÜR©| ¹r÷ªñ’ŒäÊei¸r —g†;»g‚½qvån×Âçï³DBûn™4¯Ëÿ£(i¡}x<+L…Šì¶™]Á¬¯Åžthú>U½×oÓúóˆº"ÊjÍ€ƒl¶9¨Ó/Âû6CI \)fp6·‰èï@´<\ݤ³Ðè¤`Š{l“3ÖÓ~…¹éÃëBÐÁÝ ![‡ Ù-üy)óÛf\cV±¬ÂiJ“8ÑÐjžDг$ B/ÿ`’æÀcßÝèsðǰÖ&ˆ¼ çd(oýýîÅ_ôyò£ÆY. í\>‡ØèšŠêÏЖ¹¦3óeGÌ8^‡4öºÇ†æQpE™ý,Ó‚¬5XC r:}©å(´b¹ @£Ö^ VÉ¿Ñx»Õê -cÇDŒS #äŽ%ŽzØ0Þ,ZÙªžtÆË 3IP¸8¬†[t–~û“Ó{…·ë!4Ûµ˜¶EÇèŠ>¬!}Ç¥ ³”ÇB¤êðE½Ç±ßah_kçÞÀcº{Û7vµ‹Ù´Ale+Ó´A«üæd®Pá|yštš6 ¬{¢Ô¢ÿî§'¤|WÔ#êItz€IU7©dÅná–]l(´W8fU&ÄõLæB"«5aïe^Ä8¯º,Á´ùm¶±·ûf—6»c¼:fsœIkA^áB*»^\F &ÕÀlw:K[5˜ÐJ*ýC¸ÇÕÁoÐøY=úåN~cCÜËnã–Ópe´¥Ñü:ޱz5âááÄUH4”L±‡‘!Fß=W_2ò êïAîç%½ñìáÓJVÓ´6 •/Tìß;ÞØH¥ç¸æ$>â3L˴ϵËDNAwk¸{îiK«G\Ù´L…5®ÞfFÈ_‚ýJsËd±¡Æ«—…²U»q`…KMïfÜ(“çaF‚=‹{œ‡ÀÍ[ÂdÎî¾Éz| ¬àqìg½ßjJ2`n·¾YAïçScŽ+°=‡# Vòò´µŒêHUL¨jWÞ†ü‚øüÍ€Â,[û ¶39}JN‰vËÚBèÆW"ëÙ°`÷ø”]S¡˜gð¡6†—¨U©C¼úyúŒ]^¿œ&Ø´Ÿ„÷ÕÄâÉô¦lv­ ¬¦ÄŽ5 ¦øaä—=ØÖ.ؘjml¥¼9cÕq‚x»×ºEïÊÆÀ–‡}ÙÅ› -%g2ñC -˜ÔãÊ'—¶jéYïEËË•PÖq:+ÈînX  ~~öö³úù8PA‘zµ'R•æ6šijóanßgær¤¢Î¶z•k:AŸÎí× €¨6/³ -”dC¨À"eAèÔÐÑÒB\AèÔÊæ,O™Ð bë1 Z©Nœ’n ¨9ßý” B§V&C:5LäÙOB§VN§OÈ„N tÖû'Z- -‘dB§ž ÍA&tj$'¿VB'ªVõ> à€ØdB§ä®LB'­Üt:­Â¨cÌâóñXWÙæ$t‚pëÜk™Ð ¯Ð5á“Љ>„ ì$tj`ψXp€• òa&¡SCìËRêAèÔÊÌÉ'B'ˆA}'±:Ahäi“Щ¡UÀḠtÂ×-GÔKزGkØà„Ní“„NXõô{Œ»ð ‰iÛÊÊáeDì .%ã4MQI€yñ¢á>¿LÓ!Ò¸<¦Ö›§L¸<žô Fè„ߺ‚g__«ŒLs&¨Ì`R:aZlT“Ð ój[&tÂþrçhÆÝÑ<èÁ­d)ä„–Çw&’ tj +¶¼²¿ÀÛÆeXÑì/Žû@ -eq … Ü[·°±!… ôËcŠ›WÀ1šW)T¯Ûœ]ÃÁFš"î¯mû,LH¡,¤P%+¨“?ú#°ÚÏŒº—»—§gR±¾ªÃšƒõ)TGToN¤P «8‡!…²0!…²8BÐê„@ÿÜŸÍ7OF -Õ±9izvâ_&R¨‚’ÀjÌ)”… )í<¨Am^v>Ñ?˜–óôÖÂ[Ymr~mª×%*dZÁ×®“‘B84·«Y4×BZ)ùD -eaB -%±#…*P‰úý‰ª@ä]Žˆ¤¾€/ù@ -aa›_ê-¹Å•U< -‰0Ìë&ÚülKZ )ôaÓ-{a&ynÔ[Á)¼yP€z+µ)1A½$»—ÍøÄƒHC ãÔ[Á”Ðóñlä®'¨7 ÓcÛ™ -­°rfäT0´nG€z10møKZúõfaõfq€zñc3ýn†es›^ÁìÒõV@êšC“,ý^u îöHÕ׫øšHÏâ;×ïÊ‚Þ.;µÔ›Åê…‚K7&¨—ZÅÍâ ÞŠN´—ã|Ô[‰Š >eW›ß,s=TÆÑPoIŠq8§gO§‡˜ Þ,L Þ,P/´ºQ· -#°‹QõVÒóV¨k^Ë s€z³0z³øœßeó0æõbXWi~ˆïrž±ÙÔ[A±=rÞXZ“Ù`šòqì³@zÝËSvŒ½÷ýbŽY œÍ•’‹YÀéf&Ó, Ù'?5muÞ—÷<Í«Ýö‡ é5®tÓ,$a6 ‹ØÍBŸ Ó, Ÿvx¿i€S°ÑN³€+r‰ú[3 I˜ÍBO³€BF +™øF†jÏf©ŒÍÓÌñ쵺s«÷îõ*‹YèQãœMHñ“Y`UÇx¤å7ÅÓ, gaõ_Ó,@«•å»Y«øæžÆ4 `?=Šjf¤â»› -ŸkŠ×mÿö0 ÈeóaBzTæ$³„Ù,$ñ4 =ª@’Y@_Z«CÉfèû¹šäQªßÝ,$a6 I<ÍBÏ5Unؼ·–§Yè{ªhw³À>æÛc«ã‚`Àl°Omø³ìLÐfÞû~1 (ðøÌ¯Ï??Ä/ñ¦\‘Í:t!-$©¸¯U5Õ)3&]y‰Ž¾þ콺ðMÕïßYØ’Iâ]í³¥Õò«ìè+G™p FQHíø¹ -pŠ ;£µOß¼ÍIeó&õ^9:Si,Çòdš•.Zä3¨t}ÅÏ -&ÿ¸MqHNm|yG=ÔÕg XêÎrû{øêˆÇnqИ§d„åûöí®û¬Ž Äs%3Hµ*(ËÃT^OoŠê ñJ–ÈÓ&Úiº¢˜QòKBìVDWf`fáfUËbº‘½³­­.G…ºPŸæ~­QËãÙÝk÷Ío¿YX“ Jâ,P«xå÷tä•(!-3ãSIè„Ãn®xJðNÝPVÖw¹f`£"N®Èʹy“®Jšfž-H1Ý#“°Lô^á%„‡²ÑgàÛ1ã¥s¡ н=ŸÝ½Ùn³KL€m>Vg­{”»£±-{lºóˈXv÷®Ì~jã+©”Û…ZÜÃ7BzÁ6SìÛ¶gJÓWÂ5„sñÔN[±¢­LËrú·? k -ÿÿ¢ýùÉ·õGß÷Ûªîè;ñð_Dò{Ÿ°ð azîÿ-y7ð%Ý úDGøýÛÿùÃ} ¤¨z4ô!E@¡E´Ñ&¹øk³©Æ}Ã8)ù#â¤ä?ÂÆ~w¿p’ÿÓí·o÷ ~»ÿå·÷?”í~«òíßý«øy~`EcïñŸ!†3Bè\ˆ§—x;HìTÆ›…HBîê,ŸÅÈ}îßxÓ~ðÏçï»^¬›|~ö—1†Î$Ê¿žÄi¤Sgz§÷ûc-øxÿR007$õ€Eçä ¾Ã;ÓD.åZuKw…à·öMªŽÚùkW(èã¼Áñ÷WëxÔÜ;b‹aD„¸¤@Ѭ{*±H±ôcŸÅI"­zA¿ Pg¼Â=ýß©‘TÜNÀÿ¡8(êÙ Ú%ì¸CãC"Éÿ d%÷Þöï r~¾ÙnIìExX>ÒàÐ!Óæ_xþØqY<͆ŸÂ²Whƒ -à&Ü&÷ûËëvrâ^ß|bpI>€HÛµðæ$K´oöæ„#ü4°nJ>#2„RД̟<ýØ\¨å|!qx¤Bø -¨vom__wC-:Êa¹¯ø˜ÄmCg°îÞ8‰Sèu!‹|F@¥à²ª~òK#À°v@…Ÿ§ ®=¤6½§¬& ³õIâ!RþE!–$bŽËïºP;4†—Ÿ/2µ¾_Z^daa'<}þ Œ~~ˆÛ_à”-í]¯îq]"\Ý.Ä!YSúm}õÃû‘U&IŸpÆ,Z‹Jduè¦_7ÿ|4=9_gª|¿:æ×–‚{˜ô¯ªáý“¦½Ò±+qjlÿ}=†æBz›áƒó³Y¬k[µ&¡€ -¦GFeî5iÅé°ÑaM#p!ggŽ6=;ßkjý0³ ¢tïÙÌ -b M A›mj^Yˆíßx«J -/v¾çû~‰A™­±TE9œ¶bHÁž‚Иd¬ÍùÎ÷CÇW> ÃVíÙ'Ín&PÀÂr²M3sYíbVP ƒÚ?õ²Õw¿Íp¡†5GBN -,yVÐñDò,ÿŠòb¥Vá}µ€D».{\y¾s‘”4ÛB‡Ým/>1ºÕ ÄÖ¯Ç$V´v?ôì¦"œEÈO#• -êðÏè7¸ùc°·] 6‹¯{Ûì½Ðàèfo ííòº8ä+iD81 NÓ¨û±Nb­“ *M8ÜŒSŸ‘Ÿfo«ŸQÛ -šŠÓ'ç mÕXÍŽp_H—¿Âým!1Ïd/Ë<¸ç¨>-úý÷NøõrâÐÿŸC LÃ8I8†]îBæ.#ÿ¸nj¥29€µ}Û(®Á_âÙbvù¬‚2™qz°¡ö§$¾–V:ý€nTÜ£û¶9µÑ†ÜÒˆiûoµ¿\E’û*þk¦ö6D÷PFüšÜ‰ï%Í_+Ö)·³wKÓ1PÙ7ó@þâ{f¹ÌC‡¬¡àœ±½Tèýɦr?ð)FEþÛB:110>ÑÈ¡—;×ãϱâ±&0×[ÉFÒ˹¼ŽŸ>9Ü}~ñïÿÙ_þþÿûßþúû»ßþê÷ÿøí»Eÿˆí¾ÙþÓoÿì_ÿá÷ûÛ¿ùöOþê¯þò׿þûŸÿÕïþð+<úO¿ý¯÷ƒÿüþïö¥±8;ºÈ0SÆUQÉDS’Blü‹³Œ¥r•‡pSí&—ÿƒæ«)­ø¸góïa#p¡À¤Á=ËÏ9ÖUë.#Hâ4ÚКßë5ôMú@‚ösÝ26”–·Ìýl[ö¾n™>pƳâ7¶Ì-ëŠÕ,[†b8Öë–éƒ5ùÇ•·L¨w`Ý\Ú2ùÑØ2YmÚ2³EÞ2hqnFvn™ûÝÀ£Æ š·Ìœ‡¹e4gM#›[†â¶×ë±e64:϶l™ @“ÑúcËl`j<ÆcËd½iË|úrª-£/ÍœWÞ2·u#ýÊKëwÀ÷‹E¸ç‚ÍâXÜYklƒ<‚´en1µ¶> L‰ŒkÒ:…Ë’86´æ÷zÍÁsËK⸮ǖa UmÙ2ŒÓ–º?¶ ã¿pkòž ½ëž‘XU i# ôÕHÁ—ö Éd°ÖÖM2•0ÜEïeÁuÓH¬®iÓ}‰¨·´iÎq½›ÆÈ“®eÓ„ÞuÓP ¢“uÓ`Äõ`6kn¼1Ië¦Ap“‘‘E/^WŸ>»?æиöǦ qÞ #:Σ>„°¯ÛþØ4`Iº=²¾lÆSY”’GàÂuÓägc#d­S¸Œ ‰ÓhCk~¯×Ø8øeÓL—dnšäšåM“\³¹i’o–7Mr¢ò¦I×Ü4É7Ë›&?›&ëM›&9gyÓ$çlnšäœ-›&9©±i’s–7Mr¢–M3³´i¦s¶lšéœÍM“õ¦MóéÛýœ³¼i’5Wr¸æ2\„sÉfq,ï¬56BAÚ4ÉÊφÕµNá2‚$N£ ­ù½^s‘çs-~ÝhLwµüàiÃv¼YX:&Šïõ¨c'“|㘷a-Lc(›]ïÿõø(â¯âÌÜw/ºWÕv,#ðþDTÀbˆÁK<@ʼ«níÐzd輈ÌßJ÷°í2c ouVBI6äŒk×{‘pöã|ÿ£ ðGVµ´qýZ -µÜwKE':X´yÿÕ$#EÏ£ï²H99˜Ž$#Ù¢1BžBà Àªðl9.½Mñx³ëýé‰÷¡°*¨IÛjCeFa° ô'­ëÐ%3üì|™c:Ÿdà`ﵤ÷0Ë?·].®ÅÞ¿ï×·ªO¼×ug¿ n¹ÎPýÒjAÐúؓޟl2 &6V…íìÚŒÄeîF'„q Y‘˜äÏìfY5<ü½œÌQãçßîOfø­ o<ø’0à¾ùΪ`{q»¾!¬§÷Ceٞ®.U¿þa#îfφÖY˜FàB*8eQ<= D†G]kæ$ñíÔšÞë=)/Æ 9–šÌ²}žû²t¾3Dy÷zzÂúI”dgxÞž -e:„­¸y·A+)äi ”ìî¸3 àäŽñ-àÇ.T€âQF¡N’­e>P‡ÛÒYÆŒ¬!|n´x}üþ†Ä&¢#Ù<”Û½ Ý«}¿ÿŸÔ2¡Ž%ë˜ Ž˜ç8m‚‡EfûAtõÁe޶ð,îíåýÑð, -Rñh±/j² Íœ‰w»ŸãŽÊæ÷C› ™ÕhæÐÔAí/×G¯™œjAó€^=úµ¢Z5w»Ÿƒ›¿ðŠÏŒäT|7Ý)N4W¬ÿ—ë<ŒCem6gl¡z²©ìŒ‘S\š¥ÝÁMFË(ܸž¢ÇRþ¥={ï< Ò¢“¢éŸ>¹?ÝUƒËŽûëg“e£Éû—K•ÿÒ±Ôº½?„‡à&ž+s±qR.JÏ-¢%ó÷]è¹²]7ùü,lC(Ikæ$ñíÔ:_ë5ÓcRVæì«MºÅàG¢ù›togTF2ã6é¬8ë¯=Ã3˜2( nÙ&eùb²IiÙ&ÝbÔ£ÃäN›t\{x°ºMºíÞ¡TÐúût+Š »M¢Ji$›ôéýÿ´ÞRAˆâáÉ&ÝbpŽº‘MÒ`b]’Mºç¥{„ÚmÒý(ê¿ÊµÚ$ŠÇyƯífmh6HÌd ¤x.¬QV˜¬‘~ž„Ùq¤·­;²5â[ñR¹X£<a4[À-Öˆb1)gkt_"Ñ‘°ÙÝ}ÿãyú)eÖˆÏu;²5Êz“5úôÍþtw8.8®Ìi˜^ª¥Œ´m™v>ºO¾¿á´‹ØíFV&ÿ~²FLR·qg«Eg­I˜GÄs´Së|­×|ò@½r!$µzH`«º¿Ò±xH;«…Û I°°R.ÒÎOA¸‹ÄÆ•ç^…UØÈz®.Ù·†ìr¸H X«ƒ‘Âé$­#' £Ýªf÷’ÀÆ’òsðçò’@ÒF´Ùê%5\‚W ìV½—òð‘©Ý5óá$…ÖÕI’¸Ô‡“:¼z,.'î^½ ”{Âmf­8ïåôð‘$pò‘ÈOHªŠä#–¹Ó³ÈóvÕcñ‘Bïê#«ãê#aÄ2…‡„w»íÅõðvoˆ³hÅŒÏϼ¿ÚŸÁCa+9gV)ÄÙïÙ –ɾ?„ˆˆ‹c7ig­¥ˆ2a WiyÖýž¬5 ó’xŽvjMïõžƒO^R¶KÉKšv)yIÓ.%7)[…ä&M»”ܤi—Ò²]JnÒ´KÉMšv)9J˦£4íRò”¦]ú4.O)Û¥ä'¸]J~R¶KÉOšv)9JÙ.%¿&Û%w€Ü(%7)¥x,,RÖ—,Rò“²EJ~Ò´HÉOÊ)½ÿ´HÉOÊ)ù3Ù"%?É-Rò’²EJ^Ò´HYk²HŸ¾×ŸÁKÊ)y4sç&ßgîñE8íÁ"vÛ‘µ†•É#H)y4˳îûd­I˜GÄs´Skz¯÷^FIÐôMÐôÿŸðöÿé‡ÿç‡ß:à~ûö×ÿó€{bì7bìïËÂF’MwÈŸ=@KÛ=ÐÂGA÷æ&Dj…FŒñ9æ[Á,κ`Ä[A>XDÊ^->úfû† OËËÜŠ^÷øû±i VçÄoýºv–«X0јG*ËßNSP Á½ƒ³ep±à]­yùš¥Ô"âã»'€ôÛT°ˆ»šrmìÏ%¿e“Eÿ8ƒß‰˜üËßUJM £ÿšá&~X–­±ªÕ2jC¢E;/õ7ã³¥Þ<êÅfccÍ)’%¬Ýä™DJ A!HÓ†`Þø÷‹˜ì–mQ=Eo -¡Q¾û“ˆ¤`k!.Ý>œ¸3Õ߇>+.íƒBk ørþ<ÈúÔF6Ï/2P»O”×kA+#œÖÛSö1ÇìmåráãÄú_þÞó-µ9' Lõn<¸Y]X“‚ D™9i³K¨}šÉÙ.§"éA‡v¨ÁUï þ=Ì;ӽüeâë<Íð’ Â#¼pƾéAcÇöÀüÝÞA, u›Î×>†ÝÄlç ¡Ñ󂨰³° o=«eÒ¤öø Í 0•÷ÿ3µ]áŠÉ#¡u¦©FÁ¤¿»o»Žê%ŸvöäÇæÑà“°‹ d}—lWá ?ÏãºLo'‹%ŠO:sª=@ý‹`§Ô^ª Q•è&ëNùs³5Ä¢F /céeqƒ‚÷iæK #zÛÈOnÅ ´w’Ç"˜Ÿ®6¨ÔÏ©|#¨à›={ pŽjA‹ß7£¯:΢<&è, Z!o„ÛÙÌ‹½ýŠbzÁ«¯ív”©—f“b²ÇHEPØGüÖˆÞï`œ”Ö]¬­ßß«˜ÖÃ;øAë)¥=:­¢çqwÙÑœDÉUϹZ‡q°ô!5ù婨á5¢hY ‹÷‚ǘРGóvT¤Ö¨MTPîÔè9ç…´ê(ÂV‹¼Ææe­Z¡:Ï8Y­ÛK¨ÃØ>ØyáËÄ#$N…ÿ6ÒzgHÞV!ƒ¸HqNn6¹ ùT#4—.ë£Eþ9qFˆaU)™J=h‹q¦ aº¿›•¯ÄÓgáò °£^f&Ø Œr—q¸—÷…o¯÷"‰þ˜Õ€…xÆ:E 1âê„îݺf–ªsÆKä)hMûÝrˆ÷Û6çÈ—‰÷±ãÃ6:*[€-6J7¡±§cåIu†3yœžnFfÙ(i±,d­ýí{y7y<}‘Åð8Jú9ê‹a;Ë:4°L\ÛX_¢WѾÏþnÉXï[mÓóeⳬ‰šgžð ï ÷œýä«9  %}Ié„‘ºÚúÕûlë5×x#Ä?éké»åákKËîË„Îè2—è¹éøÎkù,~+ðeO¥Ào¥§M¢„=ˆ£W«m¨û¢¼o¢™›[œ:Þi“ÛTzq©vVZnê/-|2g´ßK¦wÊîý'iV¤Þšw°¤’ÞR%'À2ƒ…¦nNÆî– 25Gu#øÝþ~Tgz¥ÉtµÃ8º^¨{1PXaõ’ ¶p6èEì\!XTŠ*±x¦ƒàÚ):—ÃÌÓÅá;M½åý,r½E,óéܺ"TœN8ô8¨ÕIœ†Ò{:¯ŸÒ‹ÝT?gÑPT:‘ÁÅ mG·k%Æ,Nù¯ù[cun¡u‚L®~I…ýîfPí0|Œä”P/8»N5æ™þˈ`nòt@ûÖ¶š¼"׫ÂËð¡4^´ž|ú[¸iï­®žÙ­×bcîÅI/ªg´0—Oãmp+÷Õ=DŸÛ¾]«#9@“\ÎïöºC(Ü?õYhr·¦+‹÷%t—XA"~Â=þnƒºDþêδ´¢[“¹ØîwC&#žüóûïUý¾¼OÁ.÷Ô=,øB ?Hï6Ú®Ž0èú¼ÛI)£{{óû"7¬TE¼‚ñ=® OhêB(¥„uì9e×Úxd[ЏÙ|n­gb íŠÑ2oH)¯eZçPœéžšqú„“Ù¡£½ Ø7bx_ߌœÃ—]ñ6 ½j³×=å©lÖ9ÏF5LF_µ·ªÝÅ›í«¶jjË>e/òzPØPZ,áðƒpcÏÀ+ôÞç6¨ÛÍ„¡+Œ\+”oÇa“ ÖLˆW¶¾í®—-ëqNSÓxì@ÌÏ«ñvc•hз²›µÄmCXTSÅéÁØè)Øwû{Ðh@|(†âj+ÒѷƆŸ:8‚&û¡Ÿ"ñľq3®= -iñkÙUqÒKêÂ8Ré. -Õæ¢!\7ºkÅ™`AiÚµêË|5{]ÐGpHX=%à“ŒÖ’µÃO²ÂÓ¥Ñdù²½ÏM¦ï -7 2¯VÓ¾Ã)gιmfH‡Wøl£Ð—‰ÙäM`^%Öo—V£OׯÆìsL'aÛ6SÚ›»‹ñp‡^‚'…ý‰Ø…”ÛÒi¢Z€•M/hcõM®ö—‰oU%fe¨|%Q -¡ TyU$=â“Q9JoDæh9Qqö»gwœµI¬h'|@@ñ$;ŽÑMX¬ƒZp¨›Zôh„¿ÉN86Øî]¢Ñô¦dxÇ‹)PÛí¬ƒ³ -‚+ ;jþ=ìÔŠ¾X› ƒdgÃæ¦¹ÚŒ -BƒâC(. ‹ôž53~Ž[O.>NËÂwÛtŸûÑ¥{} Õ,3x”«h—ùÏ}Y€0åuhH€oýX_wšÞò K/î†[žž/«©TžJøÛŒÊåIG_”sìñy¤W_Â>å—y•ÈÈŸŽ1#ßi}àbxhl)y¨N”£±ðürzv}Ÿ¹HÉ”z]ër«ë~”´ô¥—“5m”/‹Å?o*Hõsû¡fà<òVýn·|rÖǾþ²€8V² ‰µÒìÓV4ÿ=Y…X—LЗIÉ÷“­XAØ4Û5±q•d¿[ø¤¹e¥½ü²XË>zYmk£´¯Vüf4@n°=VC–ï0våîæAКµ™M'Fóð Ÿ-®ºßêœç‚`hRÍc YuXíH:Û*: ”=ƒ®µ âüÐü2ñ~pqÍó?Uk=ˆ‘õ婇¶ìH:2x[*ÿ—Ýø¾òà’ã€'Í÷0'#ô*à.‰‡-ó›ÜŽwþäè@¯8ÁÝ)òpè~%JZ›S}'_ Ù“]ÎÖôÊná¥ä–{p»µP„y{_&=Dv˜êÞ‹‰ìMw`I,YRÀšˆ§* Wj÷šm¹åÜû°j)•¼ttÆ6 ¯/ý²ôÕ½›NsÊTFÚº0í¡‘§U=b½WpŠó ãY¥øÜÕ{˜Ø™mÍ,ˆóŸþÞ\TeÑû5Þ8„—ë‰Cù…Cèpfß8„7ý‰CÎù‰C^ö¡ÃKâ:¯Å~éážý7á¾Ì½q˜€8ˆ_8_8„˜Á?‚Cè X½p}”7#|â0ÅpD?pýoBwî‡ñ ‡@á‡O®8b¢Ÿ8„ÎÛÜŠCÀÂyãðªOÂ2¿ŽCàD½q˜ÖÂ!>À‡ `ý ‡Ð‘xã0%¦ã…C€ðßé›á…Cèä¯_qÜ/¶ÂB×ÝtÅ!`Q½pÜÌ/¶ÒÄ/mć€/ý‡€ý‡ñ ‡ÐqÛzà û€CÀrù€CèìãñÀ!peà0ˆ'¾p~À!`p'œñ' ->à8 oßâ‰CX„ŽC+!~nÅ!ä¡!¿Dàâ…WBLOÆ!ä‰tBžðÀ!ÄÇYpñ%WBþêCÈë#p±–2!–ÝŠCÈK4pi-!–ýŠCˆM²âò† -BÞzCˆmºâbS¯8„l‡MEବ8„0B+!,Ç!dË8„0‚+!LæŠCHÖ5pÉ -! ö‚Cë¾âòA8„|b!N—‡gÑŠCÈçVàò 8„8 WBœ+!Ÿ³CÈ'²ãüè^q~ʯ8„ì!»C7cÅ!„S²â²ÿ8„ìé!¼¢‡>ÔŠCÈþVà²g8„ðâVB¸|+!»‡CÈŽ¤áÂå\q៮8„äÊ:!»¼C÷xÅ!„3½à²ß8„ìŸ!|ù‡žÿŠCè°O„/*Ç?à:£/ÂmGß8¨>q}À! |÷C€ô…Cèˆyq¡rQ¡`Å!ÄÏ­8„<´À!ä—B¼ðŠCˆéYqy*‡'=pöyVB|ʇ?{àÒúB,¥‡ oÅ!äE8„¼œ‡KÅ!ÄFYqyS!o¿À!ÄV]q¾¯WB6CH¶"paUB˜ ‡­Uà²] B˜À‡örÅ!dÛ8„l…‡{Á!„q_qù B:1‡àgËŠCðshÅ!ä#+pél Bƒ+!͇Î×À!äƒ8pqh¯8„8âWBv‡‡À!„“±âÂ%YqÙ} Bvt‡NQÆ!„µâ²¯8„ì•!<¸‡àÞÞŠCÈŽ¡ã²8w6WBx¦+!9±CÈÞnàÂ3^qáG¯8„ìs!{çïþÅ! iò‡€;Ä ‡€ë ‡€Ÿø€C€ø…CàŸ8„ÎÅ ‡€)yá0y/BWÇÁ'Ÿô…C¸ÿóÆ!`¥|À!`©=q$Wzâ ô+í…CÀ³pÐûÂ!`_|À!túBïÛ‡áÄ/Bg°nÅ!@ö‡€q½p\”§ë‰CÀ¼¼pË×röχ€%ðÂ!toãýcÂ!p÷¼q¤5{â°_8?à à…CàÊ|â°2?à°^8„<©CÀ—ú€CÈ0p¾p~À!Pï‡_{ÖO8|Ã'!OAà`>à`_^8RE=q¨|À!,¹wÇ! ¨ôÂ!0úÂ! öÂ!0‚öÄ!DZuÅ!ðÂ! JôÂ!„‰ýáþï‘ÐHÝŒ—? m«:KuDÂ}—rDBÙ|Všvïo}MDBÛº[èítDBÛNG$lÝ ÷ä"aÛ'"oˆc ‘€ß2D¨E„Hh[sDbߎHÀøí8Aø^ˆ¼«!JqDBá¥MDÂ*6D˜7BüZsácD5)!^úD$`:m•¢{‘ Ô^<ƒJ1DBÛ†#¶k"ò -B$lÝ ŒüB$`Z„Hh¥¹¥A¨Ù «Ø P`ˆ‚Ëôái"ÁŸÔŸ®Âb"¡mÅ Ûaˆ„ŠVB$€€Ë ÷}Ç à—W˦Ñ‘0çÏ"lÇ刄Ò‘€¹6DBéŽHøðÞˆ„J§´ÜcLDB•oÄÉß&"¡žÕ Àe)âIá¡é°È(þÜ"9[ˆ„Š®«r4ï-ž¸˜Â³êxØŒ*Œ‹ ‘€íሼƒ ø4ŽHÐv[ B»r`*ä\é#ÑFb3;"#ŸŸ#n³éˆdÍ÷†Ð °Šãï ‘pé@$à% ‘PÚD$@lˆ„[lqz ‘PvèW2uÉ‘P­"¡‘p_‘DªÒ -"+C  ‘À†tg¨"¡\H¨¤'ä Ï@fˆ„ºy¦D?ÄÅŠZ?G$Tô="¡n‘pO #XÈ›gEM‚ µxfB;kADâˆ* "¡ÃËwDBu Å–_‚ -":®)Gü "¡²ÊÀÅH¨ˆ·Š†ZÕ÷x*"ð¨rf”‘ÐkŸˆе<Á 䈈‰H`¯ åíªZ? -Á¡ "¡kåMµH¨L ‘èÀ¥+R -ºaávkó’" DÄB$t4gwDÄB$t\æ•­ÈIIµ¹]õv ìBÐêD$Àô ‘½H ETÛ®V,‹ ƒ(Dd©*8¤6 ‘ÐŒð44,¢Ñý²o@½ÌL -‘Ð'‘7!:IÏÇ« x³@$@,Da rœÐD$àQK¤óð#"Â@$à„"CDþ¡¹éžÌÇQ)DB'¦¥t -‘H€“a]¸Ú>  ‘À·øÇ­%³’9ø=æÑ ‡4 ñsÔ[¼ßnZ©†HÈ/q›¸f«é˜ˆ„Vv†øô|™ø,ëD–Cˆ„<á´etHüãHé)DB|Ié¼ ‘¿:Z[l{]Ö„B$ÄZ¢Zð¶´ì¾L(DBZ¢÷1jˆ„¹–ÌVqY â+J ù&‘ÚÝ iC5بM¯[ÂÃVR™ˆˆ…HˆMýeb!’h`TÕ$LSѪ‘N³"½Ã a„¨·m†HH«± ¾,–2"Â~·¿"!L¦«"aZ׆yVª ¬pC!? a°¥u"!¬»”†HH„B$¤B!âtùn - ‘àg‘ë5DÂ<·· ¿yµÖ‘à§¡ô^ŽHð³Sz‡#æ9 ¡yPóD†Pˆ;º]«!ì”ÿš¿5‡BC$L׿$D‚»T»G$¸SB½H[‘0ý—Æ^¥ò`ÃÓi쿽Õä¹^C$¸%½›#¦¿…g ‘0=3è5D‚{qÒÛ‘à.Ÿôîžíœî!„†H˜Ž$„Œƒ¹ËùÝ^× îŸú,"!\Y¾/]¨éòbP†Hp÷ø» Ê îLKëaˆ„éwS&#>ýsü½!Ü—÷)"!<¬ ªðó„Pˆ-: -B$㜈„Æ, ›ÂàlwD†fMaÆá1Z…H81]cÚ„ÍщW8ö˜[!ÐõÑS»ü¼ YŽ"ÐB"áÕÏüD$ˆ¤I`C9@Á‘€!花žñ¨ ÷2ö(9G5Lˆ @ˆt0 -DV­ [ žŠˆ„YùÍ~k³ƒð¸Ž‰H€^!xªŽH€X®ÕA§ö8l„H8P¡à¥FÀÞ5HÌ;";]ˆ„ƒÔš»›šÓ è¿i‰X+! TÆ -‘p\)« ± ±û~šKKDÂqž–µÑO© P÷ô~Jˆ<舘qíQH‘ÐZ3D¥—†Õ ‘À¾ØJDA(DÂArÎîZ› nˆŽH€T÷Xöœªf¯«! ´¬Î!! DŽ,! DÎM5ÓBº_™»†Ó–±u<¾ƒáoa™ˆ„¦Þñ‡úf"b"Ž~Y–· Y:G¼ :"¡±`3¥H€ó!DZb[JŽŠ xÖ’§ -‘µHhLÄðpDÄB$@l)\øJB$ ï“%{áU ‘€'‘@oˆ„£Ÿ‘ÏNˆˆ•q†(Dd–š†Pˆ¨ DÜH!0K?B(DzWYrN¨ ZΪ "oÑë‘ïXˆ„ƒ  ‹\C$@hi…HÀ°‘]Ùü\ä5éÍ‘€îï> ßODÂC¨¬T(ð(— ñs_ "! °S"òKà¨#"!^Xz›!bz¾L,DBžJ3•Ë“¾C$Øç‘Öbˆ„ø”_ä"!}vÞ÷ˆH˜ëƒÃC“pNDnœB$ÄÂóË© i‘V4Èì×µ,g…Hˆ¥/½‡!b£|™Xˆ„´©po"!m?ܰ…Hˆ­úÝnùB$ø¾þ²€ É@(D´)WVE‘Š!DB˜ /“‘¬dB$$»†@… a¿[ø¤¹e Db-B$$ÛZ‰–+ !¯a°=VCDBw×*DB: @ˆ„yb ¤ð Ÿ-®"ÁÏ!)Ý ‘Ž,­«fœm ‘Ç k"!Í/ ‘0ÏWþ é †p³S¿NDBeî§µtÄ{ØRˆ„ä ’(DBrø¤ùm"¨W–Ù] -‘ÜA¯Žõ^ò=ΉH`ÜóJ”´î†HH¾„B$$¯¬2mwɃóØ­Bîí}™Tˆ„äBHDBò 1(!ÜÙ”Òfˆ„ðL=Ð,DÂtb"!y»xPˆ„ðŒ}„H?ÚÂÊ('Ÿ›BÍìôÎ?ÄðˆZ¥Ë@*áˆDÉ ‘€– 9…´9"¡‘Ôþ²ËB f¾ bC$@¨ä Ç(Df›n×D$@,D¦Ä ̰‘€É3D„æäaíˆ_B$à“v?#.C$csDBR€ -ZG$`B$`© ‘Àä xÔ ˜!ÚNC$TÐäË-DBn‘Ä,÷•ׄªu"°/‘€P¡ Øo†H`@ˆ„uæ;#´Ë:ì‘@×Bë–N m¸!B$@«! $"²@$0GDÆåA'ü½î[×åˆÍ¹†#ðóB$`^ ‘€¡ -‘¿2zD$`ÿáÖ‘€%`ˆF#uà ,DT -‘ÀÝ㈈…H€Ø “ X„†H˜ A‘çNˆ(0DBc;f õðt<N!°2‘¯Uˆ¬C$Àé"!O*J_‰HÀ— -DƒvÌv刀Ø)#¸;"N¾ "×eI¨÷´áeàƒøÚ«°OD‚î›}CC$`XD$ä)@M°ük´ rD¼yËõróèïKà±Ä‡-¡îˆ„{›"a.·œ{g«ŒjA%C$L£ÓÅÍñzC$ 9Œ 0††HÀ'"iåˆ<­êéC$`;ó ãYÔà ‘ðÁÄþ™ŠÚ4ÔjÜ'ÊÿÞ·[™gTj JŠ úN3VÙðJ¡¾MÏBx©e´ÁÜÏÄ5SÅ![°¨VB™Za*®vmp ‹á®Þ§‚Öò„¡î:ÆP¤ÌFÌP°wy#÷°üI”yÐ>¥®6àHôˆ0Y¼\.ª‚Èã‹ï§ÿu3¨$¡•¶ |ج‡âkß¹î2xü­ÒV¢qzç)¾ÇŽÖðï6F­(ÆgD¸&~$&ê}rûœBOP̿ï§þ‘¶f-áq§8. òfýŠNŸ²Õ„Âðñ´ ~Íð["XÓŽ¡Ûô³¥Œ„l^­hæq¨_:f(…)œþ݆5.†Áquôþõ#êÏR=Õb`ƒ=V 60žìG³¯ÊÓ®¶W;ò±k$Ä¥)Ùm(0 Â…rQóDÀ”?”£8ê—ù²l79ô™P¨æ‰H´úvA AÕ”L³ÐƬR=НWäý†²èÀϸ—‹Ÿ²¼¢€LnÝ£fÂó¾SÆU‹ð³Éµô6ƒû@z¯1S‹ö)ʵnJ”CˆÄÒv†éÉ¡rU‚ç»ÿýA p½í:B­íE mw-⌺%¼Çi¯šëÄ·­1µÈ˜Ñî %Ò¢Uäå਽Lí@ùRª†¹QV2Á#½÷®»ÈDiXŠ…Ó¬A|‡`[g€¼E3E‡ -Èš±˜Q/Ð;§¥±ÛØL-ðKûeI(æ dpÙ2^‡Ú)Bxϳ©=ÐGGj™úù¦Rk nÌÅq{IxõË—@>RØ=_„˜£©÷ëYÃy¨¨UÅrë–Û¾v]"°Ö.Ë­—‹¸1ÈøŠJ"Z KYÔ1‹IÊërôG2<ò'((q/¡r"ÊìVõ2½²qû}_Ž,ùÉ\zÇ 7:”vlJi`šýòw>®¹pAiÑ5ã¬Xb«v CªâäV® xl*—R•‚tóaN¤Á‚œ¶vU2¸›0W˜ýgã*¼«=)ÚýM/é×¾LÜJ#k,hêë;`¢•Jó÷•Þ.woÎŽô²‹ï:‘½õ– gÉÕÒ·¡Ò}s‡I*evì,ëWWvl]H”ŒZÒR’Ú– \x_&nûv­‹”ɱ}¬«yGtk?Ò—^¸òGŸ»DjOµ¹]6Ý*H[-mOÛTj±jè£ùžþ2±êÒþGM‹¥€§¥8}ßÊœW³ûÉßð!âã^µô¨"gÝpÈJÙ ½kž:þÞp²îÕûp¯¶Ü¾LÌx ƒ§ë¾ž -œ'» V¦. +xæƒ-ä¦ÂämOXj«, ¡/ËÀÀùGÝNa#’-=}¸TàQ¯¾ïé×¾Lz»ø×20tÝK_ß—›«îém¥µû{¦¹ñ«”‚÷i÷Ü”±~ k9¯ôq¤¶¹òOùeâMF/}vÖÎ:ÚÀîˆu¯s)}·û¨0ܱî¾ìö:X‹”—(àÓ%i1l¨+/|é=ÝBû6ù2ñ­¬¬[ŠXDZø´ùà€‘öéw»ìŸmxR?]-nµ¾ÙÝ 3±Ó4%[ìòåIrÚé-‚O+ôebaƳÅ"‹ÙYWÛ|Æ!5;øÝb)ON«ùe‘—ÝrÊÓÂ’È»÷Õo<ÙÔÜì2uÖ’‘wµ…[*¬%£oNŽÍz¡ÍSÆ£Wtæ™$µÈÍÇ"î×y¬<¸£•y&ºÖM)A?@¿L,@n>l·*äår,o$):Ò ®˜ã}µÅóóÞc™£_mñ Øüè=;|ðTJÙüP{Èë1ï$Bƒ6Üðdø¬2ÅÓç¡Þ1’{äÒråΔFÛ=õ2/tÇx¸hŒjËO5oÎÕb¿'×Ï'ávW7­Ó6N‡ -îó %ßÓÃÏG¡)wOÕƒåÌ|%§²{Z¦È¼_ü½§”ÌSö`y7O×üj7yªÓ§PÙ.÷Õ?DöŸp¦Što8µùÙ¢y÷ Û5¥ÜÁöwWQ'ï$[9ÂÌíŠýÃX˜9 -ñšA”šÇãöÍbüÙäc(+|¾*¸ÒiC lp~9’—“w)Ö0íÌ4"®þcJÇ0Iwø ±Õð®µë~\IÔyH¸ý|h5¡ŸW>§E™`­ý”áhÈ'ÜL縼`¹¿Ò Æ[®á³U‹ç+î‡ÿ`ÓÍ9Ä -6À@eJ‘çÇEÂâÝÏ@Á4/ÀÄî7ùµ •7[lâ{/­i.âhŠJò@xRÜ4ÔÝÖˆÃUe ¾±Pàeñâh6]¬›qªSwÝ>Ö~9 ø<ô,ŽØf“Ušy0À´-ØqYÄ·«sù³Õ¶Ô}¥ð@"Ó SøÝ"†;«¹+÷ÓC†Ý‘¥ëêÂÚSX²øp'[=íš·­š;z¥õQd¡²at" øïœA¸åu”$–³O‡Ä`Kºê"R&ÿî²/ÌOÈkD·[ân¸§ƒ±N÷tâØKÕßk ƒÄb`ª‰]diîP·Ma ¶lФ½XNµì>ÿÍ@/C™›Á¬Z™b‰ÆéecŒpkʹ[à«5hYÞ „ ²*é$.‚ñÊ‚©îÀ ÖZ¢¬h·?ß"«ûÑ}Î3ýÕ¿øËyüûñÛÿðõ«üÍïüñ‡_üâÿúÕßüæßüþWûŸóûþæï~õ¿ùö«ßþöwøÕ~ó_îóío~ÿ›¿ûÃï~ÿ›o÷Ÿ~÷_!¹ÿÄÿÅ/þÅ_ÿ?ü76É endstream endobj 5 0 obj <> endobj 21 0 obj <> endobj 28 0 obj [/View/Design] endobj 29 0 obj <>>> endobj 13 0 obj [/View/Design] endobj 14 0 obj <>>> endobj 37 0 obj [36 0 R] endobj 50 0 obj <> endobj xref 0 51 0000000004 65535 f -0000000016 00000 n -0000000173 00000 n -0000047411 00000 n -0000000006 00000 f -0000155434 00000 n -0000000008 00000 f -0000047462 00000 n -0000000009 00000 f -0000000010 00000 f -0000000011 00000 f -0000000012 00000 f -0000000015 00000 f -0000155691 00000 n -0000155722 00000 n -0000000016 00000 f -0000000017 00000 f -0000000018 00000 f -0000000019 00000 f -0000000020 00000 f -0000000000 00000 f -0000155504 00000 n -0000000000 00000 f -0000000000 00000 f -0000000000 00000 f -0000000000 00000 f -0000000000 00000 f -0000000000 00000 f -0000155575 00000 n -0000155606 00000 n -0000000000 00000 f -0000000000 00000 f -0000000000 00000 f -0000000000 00000 f -0000000000 00000 f -0000000000 00000 f -0000048598 00000 n -0000155807 00000 n -0000047761 00000 n -0000048785 00000 n -0000047857 00000 n -0000048037 00000 n -0000048085 00000 n -0000048669 00000 n -0000048700 00000 n -0000048859 00000 n -0000049055 00000 n -0000050074 00000 n -0000058721 00000 n -0000124309 00000 n -0000155832 00000 n -trailer <]>> startxref 156002 %%EOF \ No newline at end of file diff --git a/design/sketch.png b/design/sketch.png deleted file mode 100644 index 3d3feaef..00000000 Binary files a/design/sketch.png and /dev/null differ diff --git a/design/slogan.png b/design/slogan.png deleted file mode 100644 index 4f5f9a4a..00000000 Binary files a/design/slogan.png and /dev/null differ diff --git a/design/you-got-your.psd b/design/you-got-your.psd deleted file mode 100644 index fb95007d..00000000 Binary files a/design/you-got-your.psd and /dev/null differ diff --git a/docs/api-examples-resources/shasta.jpg b/docs/api-examples-resources/shasta.jpg new file mode 100644 index 00000000..cc5875ce Binary files /dev/null and b/docs/api-examples-resources/shasta.jpg differ diff --git a/docs/api/app-0c945a27f43452df695771ddb60b3d14.js b/docs/api/app-0c945a27f43452df695771ddb60b3d14.js new file mode 100644 index 00000000..3005ffbf --- /dev/null +++ b/docs/api/app-0c945a27f43452df695771ddb60b3d14.js @@ -0,0 +1 @@ +var CodeMirror=(function(){function u(aM,aJ){var b1={},bj=u.defaults;for(var az in bj){if(bj.hasOwnProperty(az)){b1[az]=(aJ&&aJ.hasOwnProperty(az)?aJ:bj)[az]}}var aD=document.createElement("div");aD.className="CodeMirror"+(b1.lineWrapping?" CodeMirror-wrap":"");aD.innerHTML='
 
';if(aM.appendChild){aM.appendChild(aD)}else{aM(aD)}var bX=aD.firstChild,bm=bX.firstChild,bk=aD.lastChild,bM=bk.firstChild,cg=bM.firstChild,aH=cg.firstChild,aY=aH.firstChild,bu=aH.nextSibling.firstChild,av=bu.firstChild,bc=av.nextSibling,bg=bc.nextSibling,aq=bg.nextSibling;cD();if(s){bm.style.width="0px"}if(!f){bu.draggable=true}bu.style.outline="none";if(b1.tabindex!=null){bm.tabIndex=b1.tabindex}if(b1.autofocus){bz()}if(!b1.gutter&&!b1.lineNumbers){aH.style.display="none"}if(m){bX.style.height="1px",bX.style.position="absolute"}try{ct("x")}catch(b8){if(b8.message.match(/runtime/i)){b8=new Error("A CodeMirror inside a P-style element does not work in Internet Explorer. (innerHTML bug)")}throw b8}var b7=new z(),aw=new z(),cP;var cb,cy=new i([new ah([new e("")])]),ch,cj;bT();var cW={from:{line:0,ch:0},to:{line:0,ch:0},inverted:false};var ci,bq,aZ,bF=0,bb,cn=false,cs=false;var cp,b6,aB,cN,aP,bf,aS,cA;var bd=0,cQ=0,bL=0,bN=0;var b4;var bD="",aF;var ap={};ar(function(){aW(b1.value||"");cp=false})();var a8=new k();r(bk,"mousedown",ar(ck));r(bk,"dblclick",ar(bW));r(bu,"selectstart",T);if(!N){r(bk,"contextmenu",a1)}r(bk,"scroll",function(){bF=bk.scrollTop;cd([]);if(b1.fixedGutter){aH.style.left=bk.scrollLeft+"px"}if(b1.onScroll){b1.onScroll(b9)}});r(window,"resize",function(){cd(true)});r(bm,"keyup",ar(cl));r(bm,"input",aQ);r(bm,"keydown",ar(cc));r(bm,"keypress",ar(bn));r(bm,"focus",cU);r(bm,"blur",aE);if(b1.dragDrop){r(bu,"dragstart",aI);function bC(cZ){if(b1.onDragEvent&&b1.onDragEvent(b9,O(cZ))){return}w(cZ)}r(bk,"dragenter",bC);r(bk,"dragover",bC);r(bk,"drop",ar(an))}r(bk,"paste",function(){bz();aQ()});r(bm,"paste",aQ);r(bm,"cut",ar(function(){if(!b1.readOnly){bs("")}}));if(m){r(bM,"mouseup",function(){if(document.activeElement==bm){bm.blur()}bz()})}var cw;try{cw=(document.activeElement==bm)}catch(b8){}if(cw||b1.autofocus){setTimeout(cU,20)}else{aE()}function br(cZ){return cZ>=0&&cZcZ&&c3.y>c1.offsetHeight){c4=c3.y-c1.offsetHeight}if(c0+c1.offsetWidth>c6){c0=c6-c1.offsetWidth}}}c1.style.top=(c4+cr())+"px";c1.style.left=c1.style.right="";if(c7=="right"){c0=bM.clientWidth-c1.offsetWidth;c1.style.right="0px"}else{if(c7=="left"){c0=0}else{if(c7=="middle"){c0=(bM.clientWidth-c1.offsetWidth)/2}}c1.style.left=(c0+a5())+"px"}if(c5){aA(c0,c4,c0+c1.offsetWidth,c4+c1.offsetHeight)}},lineCount:function(){return cy.size},clipPos:aT,getCursor:function(cZ){if(cZ==null){cZ=cW.inverted}return aa(cZ?cW.from:cW.to)},somethingSelected:function(){return !ad(cW.from,cW.to)},setCursor:ar(function(cZ,c1,c0){if(c1==null&&typeof cZ.line=="number"){a6(cZ.line,cZ.ch,c0)}else{a6(cZ,c1,c0)}}),setSelection:ar(function(c1,c0,cZ){(cZ?bx:bw)(aT(c1),aT(c0||c1))}),getLine:function(cZ){if(br(cZ)){return cF(cZ).text}},getLineHandle:function(cZ){if(br(cZ)){return cF(cZ)}},setLine:ar(function(cZ,c0){if(br(cZ)){bQ(c0,{line:cZ,ch:0},{line:cZ,ch:cF(cZ).text.length})}}),removeLine:ar(function(cZ){if(br(cZ)){bQ("",{line:cZ,ch:0},aT({line:cZ+1,ch:0}))}}),replaceRange:ar(bQ),getRange:function(c0,cZ){return cO(aT(c0),aT(cZ))},triggerOnKeyDown:ar(cc),execCommand:function(cZ){return L[cZ](b9)},moveH:ar(cE),deleteH:ar(cm),moveV:ar(cx),toggleOverwrite:function(){if(cn){cn=false;bc.className=bc.className.replace(" CodeMirror-overwrite","")}else{cn=true;bc.className+=" CodeMirror-overwrite"}},posFromIndex:function(c0){var c1=0,cZ;cy.iter(0,cy.size,function(c2){var c3=c2.text.length+1;if(c3>c0){cZ=c0;return true}c0-=c3;++c1});return aT({line:c1,ch:cZ})},indexFromPos:function(c0){if(c0.line<0||c0.ch<0){return 0}var cZ=c0.ch;cy.iter(0,c0.line,function(c1){cZ+=c1.text.length+1});return cZ},scrollTo:function(cZ,c0){if(cZ!=null){bk.scrollLeft=cZ}if(c0!=null){bk.scrollTop=c0}cd([])},operation:function(cZ){return ar(cZ)()},compoundChange:function(cZ){return bO(cZ)},refresh:function(){cd(true);if(bk.scrollHeight>bF){bk.scrollTop=bF}},getInputField:function(){return bm},getWrapperElement:function(){return aD},getScrollerElement:function(){return bk},getGutterElement:function(){return aH}};function cF(cZ){return C(cy,cZ)}function a3(c0,cZ){aS=true;var c1=cZ-c0.height;for(var c2=c0;c2;c2=c2.parent){c2.height+=c1}}function aW(cZ){var c0={line:0,ch:0};aO(c0,{line:cy.size-1,ch:cF(cy.size-1).text.length},A(cZ),c0,c0);cp=true}function b2(){var cZ=[];cy.iter(0,cy.size,function(c0){cZ.push(c0.text)});return cZ.join("\n")}function ck(c8){a4(y(c8,"shiftKey"));for(var c3=j(c8);c3!=aD;c3=c3.parentNode){if(c3.parentNode==bM&&c3!=cg){return}}for(var c3=j(c8);c3!=aD;c3=c3.parentNode){if(c3.parentNode==aY){if(b1.onGutterClick){b1.onGutterClick(b9,q(aY.childNodes,c3)+cQ,c8)}return T(c8)}}var cZ=a2(c8);switch(x(c8)){case 3:if(N&&!M){a1(c8)}return;case 2:if(cZ){a6(cZ.line,cZ.ch,true)}return}if(!cZ){if(j(c8)==bk){T(c8)}return}if(!cj){cU()}var c0=+new Date;if(aZ&&aZ.time>c0-400&&ad(aZ.pos,cZ)){T(c8);setTimeout(bz,20);return aK(cZ.line)}else{if(bq&&bq.time>c0-400&&ad(bq.pos,cZ)){aZ={time:c0,pos:cZ};T(c8);return bI(cZ)}else{bq={time:c0,pos:cZ}}}var da=cZ,c1;if(b1.dragDrop&&F&&!b1.readOnly&&!ad(cW.from,cW.to)&&!Z(cZ,cW.from)&&!Z(cW.to,cZ)){if(f){bu.draggable=true}function c4(db){if(f){bu.draggable=false}bb=false;c7();c2();if(Math.abs(c8.clientX-db.clientX)+Math.abs(c8.clientY-db.clientY)<10){T(db);a6(cZ.line,cZ.ch,true);bz()}}var c7=r(document,"mouseup",ar(c4),true);var c2=r(bk,"drop",ar(c4),true);bb=true;if(bu.dragDrop){bu.dragDrop()}return}T(c8);a6(cZ.line,cZ.ch,true);function c9(db){var dd=a2(db,true);if(dd&&!ad(dd,da)){if(!cj){cU()}da=dd;bx(cZ,dd);cp=false;var dc=bA();if(dd.line>=dc.to||dd.line-1){setTimeout(ar(function(){by(cW.to.line,"smart")}),75)}}if(bY(c2,c0)){return}aQ()}function cl(cZ){if(b1.onKeyEvent&&b1.onKeyEvent(b9,O(cZ))){return}if(y(cZ,"keyCode")==16){ci=null}}function cU(){if(b1.readOnly=="nocursor"){return}if(!cj){if(b1.onFocus){b1.onFocus(b9)}cj=true;if(aD.className.search(/\bCodeMirror-focused\b/)==-1){aD.className+=" CodeMirror-focused"}if(!bf){cC(true)}}am();cM()}function aE(){if(cj){if(b1.onBlur){b1.onBlur(b9)}cj=false;if(b4){ar(function(){if(b4){b4();b4=null}})()}aD.className=aD.className.replace(" CodeMirror-focused","")}clearInterval(cP);setTimeout(function(){if(!cj){ci=null}},150)}function aO(c4,c3,c2,c0,cZ){if(cs){return}if(a8){var c1=[];cy.iter(c4.line,c3.line+1,function(c5){c1.push(c5.text)});a8.addChange(c4.line,c2.length,c1);while(a8.done.length>b1.undoDepth){a8.done.shift()}}at(c4,c3,c2,c0,cZ)}function ca(c4,c5){if(!c4.length){return}var c6=c4.pop(),c0=[];for(var c1=c6.length-1;c1>=0;c1-=1){var c3=c6[c1];var c7=[],cZ=c3.start+c3.added;cy.iter(c3.start,cZ,function(c8){c7.push(c8.text)});c0.push({start:c3.start,added:c3.old.length,old:c7});var c2=aT({line:c3.start+c3.old.length-1,ch:W(c7[c7.length-1],c3.old[c3.old.length-1])});at({line:c3.start,ch:0},{line:cZ-1,ch:cF(cZ-1).text.length},c3.old,c2,c2)}cp=true;c5.push(c0)}function cT(){ca(a8.done,a8.undone)}function cJ(){ca(a8.undone,a8.done)}function at(de,c3,dk,cZ,dl){if(cs){return}var dj=false,c2=bD.length;if(!b1.lineWrapping){cy.iter(de.line,c3.line+1,function(dm){if(dm.text.length==c2){dj=true;return true}})}if(de.line!=c3.line||dk.length>1){aS=true}var db=c3.line-de.line,da=cF(de.line),c0=cF(c3.line);if(de.ch==0&&c3.ch==0&&dk[dk.length-1]==""){var c8=[],c9=null;if(de.line){c9=cF(de.line-1);c9.fixMarkEnds(c0)}else{c0.fixMarkStarts()}for(var dg=0,di=dk.length-1;dg1){cy.remove(de.line+1,db-1,cA)}cy.insert(de.line+1,c8)}}}if(b1.lineWrapping){var c5=Math.max(5,bk.clientWidth/bh()-3);cy.iter(de.line,de.line+dk.length,function(dm){if(dm.hidden){return}var dn=Math.ceil(dm.text.length/c5)||1;if(dn!=dm.height){a3(dm,dn)}})}else{cy.iter(de.line,de.line+dk.length,function(dn){var dm=dn.text;if(dm.length>c2){bD=dm;c2=dm.length;aF=null;dj=false}});if(dj){c2=0;bD="";aF=null;cy.iter(0,cy.size,function(dn){var dm=dn.text;if(dm.length>c2){c2=dm.length;bD=dm}})}}var c1=[],c7=dk.length-db-1;for(var dg=0,dd=ch.length;dgc3.line){c1.push(dh+c7)}}}var df=de.line+Math.min(dk.length,500);cH(de.line,df);c1.push(df);ch=c1;bG(100);aB.push({from:de.line,to:c3.line+1,diff:c7});var c6={from:de,to:c3,text:dk};if(cN){for(var c4=cN;c4.next;c4=c4.next){}c4.next=c6}else{cN=c6}function dc(dm){return dm<=Math.min(c3.line,c3.line+c7)?dm:dm+c7}bw(cZ,dl,dc(cW.from.line),dc(cW.to.line));if(bk.clientHeight){bM.style.height=(cy.height*bP()+2*cr())+"px"}}function bQ(c0,c3,c2){c3=aT(c3);if(!c2){c2=c3}else{c2=aT(c2)}c0=A(c0);function c1(c6){if(Z(c6,c3)){return c6}if(!Z(c2,c6)){return cZ}var c4=c6.line+c0.length-(c2.line-c3.line)-1;var c5=c6.ch;if(c6.line==c2.line){c5+=c0[c0.length-1].length-(c2.ch-(c2.line==c3.line?c3.ch:0))}return{line:c4,ch:c5}}var cZ;aC(c0,c3,c2,function(c4){cZ=c4;return{from:c1(cW.from),to:c1(cW.to)}});return cZ}function bs(cZ,c0){aC(A(cZ),cW.from,cW.to,function(c1){if(c0=="end"){return{from:c1,to:c1}}else{if(c0=="start"){return{from:cW.from,to:cW.from}}else{return{from:cW.from,to:c1}}}})}function aC(c2,c4,c3,cZ){var c1=c2.length==1?c2[0].length+c4.ch:c2[c2.length-1].length;var c0=cZ({line:c4.line+c2.length-1,ch:c1});aO(c4,c3,c2,c0.from,c0.to)}function cO(c3,c2){var c0=c3.line,cZ=c2.line;if(c0==cZ){return cF(c0).text.slice(c3.ch,c2.ch)}var c1=[cF(c0).text.slice(c3.ch)];cy.iter(c0+1,cZ,function(c4){c1.push(c4.text)});c1.push(cF(cZ).text.slice(0,c2.ch));return c1.join("\n")}function b3(){return cO(cW.from,cW.to)}var bt=false;function am(){if(bt){return}b7.set(b1.pollInterval,function(){aN();bK();if(cj){am()}ay()})}function aQ(){var cZ=false;bt=true;function c0(){aN();var c1=bK();if(!c1&&!cZ){cZ=true;b7.set(60,c0)}else{bt=false;am()}ay()}b7.set(20,c0)}var ba="";function bK(){if(bf||!cj||ae(bm)||b1.readOnly){return false}var c0=bm.value;if(c0==ba){return false}ci=null;var c1=0,cZ=Math.min(ba.length,c0.length);while(c1c0){bc.scrollIntoView()}}function cf(){var c0=cR(cW.inverted?cW.from:cW.to);var cZ=b1.lineWrapping?Math.min(c0.x,bu.offsetWidth):c0.x;return aA(cZ,c0.y,cZ,c0.yBot)}function aA(c1,c7,cZ,c6){var c4=a5(),dc=cr();c7+=dc;c6+=dc;c1+=c4;cZ+=c4;var c9=bk.clientHeight,c2=bk.scrollTop,c0=false,db=true;if(c7c2+c9){bk.scrollTop=c6-c9;c0=true}}var c8=bk.clientWidth,da=bk.scrollLeft;var c5=b1.fixedGutter?aH.clientWidth:0;var c3=c1c8+da-3){bk.scrollLeft=cZ+10-c8;c0=true;if(cZ>bM.clientWidth){db=false}}}if(c0&&b1.onScroll){b1.onScroll(b9)}return db}function bA(){var cZ=bP(),c2=bk.scrollTop-cr();var c1=Math.max(0,Math.floor(c2/cZ));var c0=Math.ceil((c2+bk.clientHeight)/cZ);return{from:X(cy,c1),to:X(cy,c0)}}function cd(c7,c3){if(!bk.clientWidth){cQ=bL=bd=0;return}var c2=bA();if(c7!==true&&c7.length==0&&c2.from>cQ&&c2.toc9&&bL-c9<20){c9=Math.min(cy.size,bL)}var db=c7===true?[]:b0([{from:cQ,to:bL,domStart:0}],c7);var c6=0;for(var c4=0;c4c9){c5.to=c9}if(c5.from>=c5.to){db.splice(c4--,1)}else{c6+=c5.to-c5.from}}if(c6==c9-c8&&c8==cQ&&c9==bL){return}db.sort(function(dd,dc){return dd.domStart-dc.domStart});var c1=bP(),cZ=aH.style.display;aq.style.display="none";aR(c8,c9,db);aq.style.display=aH.style.display="";var c0=c8!=cQ||c9!=bL||bN!=bk.clientHeight+c1;if(c0){bN=bk.clientHeight+c1}cQ=c8;bL=c9;bd=g(cy,c8);cg.style.top=(bd*c1)+"px";if(bk.clientHeight){bM.style.height=(cy.height*c1+2*cr())+"px"}if(aq.childNodes.length!=bL-cQ){throw new Error("BAD PATCH! "+JSON.stringify(db)+" size="+(bL-cQ)+" nodes="+aq.childNodes.length)}function da(){aF=bk.clientWidth;var dd=aq.firstChild,dc=false;cy.iter(cQ,bL,function(df){if(!df.hidden){var de=Math.round(dd.offsetHeight/c1)||1;if(df.height!=de){a3(df,de);aS=dc=true}}dd=dd.nextSibling});if(dc){bM.style.height=(cy.height*c1+2*cr())+"px"}return dc}if(b1.lineWrapping){da()}else{if(aF==null){aF=ct(bD)}if(aF>bk.clientWidth){bu.style.width=aF+"px";bM.style.width="";bM.style.width=bk.scrollWidth+"px"}else{bu.style.width=bM.style.width=""}}aH.style.display=cZ;if(c0||aS){aL()&&b1.lineWrapping&&da()&&aL()}cV();if(!c3&&b1.onUpdate){b1.onUpdate(b9)}return true}function b0(c8,c6){for(var c3=0,c1=c6.length||0;c3=c4.to){cZ.push(c4)}else{if(c5.from>c4.from){cZ.push({from:c4.from,to:c5.from,domStart:c4.domStart})}if(c5.toc3){c1=cZ(c1);c3++}for(var c2=0,c6=da.to-da.from;c2c2){if(dc.hidden){var dd=c7.innerHTML="
"}else{var dd=""+dc.getHTML(a9)+"";if(dc.bgClassName){dd='
 
'+dd+"
"}}c7.innerHTML=dd;aq.insertBefore(c7.firstChild,c1)}else{c1=c1.nextSibling}++c2})}function aL(){if(!b1.gutter&&!b1.lineNumbers){return}var c0=cg.offsetHeight,c8=bk.clientHeight;aH.style.height=(c0-c8<2?c8:c0)+"px";var c6=[],c4=cQ,c7;cy.iter(cQ,Math.max(bL,cQ+1),function(da){if(da.hidden){c6.push("
")}else{var c9=da.gutterMarker;var dc=b1.lineNumbers?c4+b1.firstLineNumber:null;if(c9&&c9.text){dc=c9.text.replace("%N%",dc!=null?dc:"")}else{if(dc==null){dc="\u00a0"}}c6.push((c9&&c9.style?'
':"
"),dc);for(var db=1;db ")}c6.push("
");if(!c9){c7=c4}}++c4});aH.style.display="none";aY.innerHTML=c6.join("");if(c7!=null){var c2=aY.childNodes[c7-cQ];var c3=String(cy.size).length,cZ=H(c2),c1="";while(cZ.length+c1.length2;bu.style.marginLeft=aH.offsetWidth+"px";aS=false;return c5}function cV(){var c2=ad(cW.from,cW.to);var dd=cR(cW.from,true);var c8=c2?dd:cR(cW.to,true);var c6=cW.inverted?dd:c8,c0=bP();var cZ=ak(aD),c1=ak(aq);bX.style.top=Math.max(0,Math.min(bk.offsetHeight,c6.y+c1.top-cZ.top))+"px";bX.style.left=Math.max(0,Math.min(bk.offsetWidth,c6.x+c1.left-cZ.left))+"px";if(c2){bc.style.top=c6.y+"px";bc.style.left=(b1.lineWrapping?Math.min(c6.x,bu.offsetWidth):c6.x)+"px";bc.style.display="";bg.style.display="none"}else{var db=dd.y==c8.y,c4="";var c9=bu.clientWidth||bu.offsetWidth;var c5=bu.clientHeight||bu.offsetHeight;function dc(di,dh,dg,de){var df=E?"width: "+(!dg?c9:c9-dg-di)+"px":"right: "+dg+"px";c4+='
'}if(cW.from.ch&&dd.y>=0){var da=db?c9-c8.x:0;dc(dd.x,dd.y,da,c0)}var c3=Math.max(0,dd.y+(cW.from.ch?c0:0));var c7=Math.min(c8.y,c5)-c3;if(c7>0.2*c0){dc(0,c3,0,c7)}if((!db||!cW.from.ch)&&c8.yc1||c8>c5.text.length){c8=c5.text.length}return{line:c9,ch:c8}}c9+=c7}}var cZ=cF(c4.line);var c2=c4.ch==cZ.text.length&&c4.ch!=c1;if(!cZ.hidden){return c4}if(c4.line>=c0){return c3(1)||c3(-1)}else{return c3(-1)||c3(1)}}function a6(cZ,c1,c0){var c2=aT({line:cZ,ch:c1||0});(c0?bx:bw)(c2,c2)}function bZ(cZ){return Math.max(0,Math.min(cZ,cy.size-1))}function aT(c1){if(c1.line<0){return{line:0,ch:0}}if(c1.line>=cy.size){return{line:cy.size-1,ch:cF(cy.size-1).text.length}}var cZ=c1.ch,c0=cF(c1.line).text.length;if(cZ==null||cZ>c0){return{line:c1.line,ch:c0}}else{if(cZ<0){return{line:c1.line,ch:0}}else{return c1}}}function co(c2,c6){var c3=cW.inverted?cW.from:cW.to,c7=c3.line,cZ=c3.ch;var c5=cF(c7);function c0(){for(var c8=c7+c2,da=c2<0?-1:cy.size;c8!=da;c8+=c2){var c9=cF(c8);if(!c9.hidden){c7=c8;c5=c9;return true}}}function c4(c8){if(cZ==(c2<0?0:c5.text.length)){if(!c8&&c0()){cZ=c2<0?c5.text.length:0}else{return false}}else{cZ+=c2}return true}if(c6=="char"){c4()}else{if(c6=="column"){c4(true)}else{if(c6=="word"){var c1=false;for(;;){if(c2<0){if(!c4()){break}}if(ag(c5.text.charAt(cZ))){c1=true}else{if(c1){if(c2<0){c2=1;c4()}break}}if(c2>0){if(!c4()){break}}}}}}return{line:c7,ch:cZ}}function cE(cZ,c0){var c1=cZ<0?cW.from:cW.to;if(ci||ad(cW.from,cW.to)){c1=co(cZ,c0)}a6(c1.line,c1.ch,true)}function cm(cZ,c0){if(!ad(cW.from,cW.to)){bQ("",cW.from,cW.to)}else{if(cZ<0){bQ("",co(cZ,c0),cW.to)}else{bQ("",cW.from,co(cZ,c0))}}b6=true}var cv=null;function cx(cZ,c0){var c2=0,c3=cR(cW.inverted?cW.from:cW.to,true);if(cv!=null){c3.x=cv}if(c0=="page"){c2=Math.min(bk.clientHeight,window.innerHeight||document.documentElement.clientHeight)}else{if(c0=="line"){c2=bP()}}var c1=bH(c3.x,c3.y+c2*cZ+2);if(c0=="page"){bk.scrollTop+=cR(c1,true).y-c3.y}a6(c1.line,c1.ch,true);cv=c3.x}function bI(c2){var c0=cF(c2.line).text;var c1=c2.ch,cZ=c2.ch;while(c1>0&&ag(c0.charAt(c1-1))){--c1}while(cZbD.length){bD=c2.text}})}aB.push({from:0,to:cy.size})}function a9(c0){var cZ=b1.tabSize-c0%b1.tabSize,c2=ap[cZ];if(c2){return c2}for(var c3='',c1=0;c1",width:cZ})}function cD(){bk.className=bk.className.replace(/\s*cm-s-\S+/g,"")+b1.theme.replace(/(^|\s)\s*/g," cm-s-")}function cX(){this.set=[]}cX.prototype.clear=ar(function(){var c4=Infinity,c0=-Infinity;for(var c3=0,c6=this.set.length;c3=c4.ch)){c3.push(cZ.marker||cZ)}}return c3}function bV(cZ,c1,c0){if(typeof cZ=="number"){cZ=cF(bZ(cZ))}cZ.gutterMarker={text:c1,style:c0};aS=true;return cZ}function au(cZ){if(typeof cZ=="number"){cZ=cF(bZ(cZ))}cZ.gutterMarker=null;aS=true}function aX(c0,c2){var c1=c0,cZ=c0;if(typeof c0=="number"){cZ=cF(bZ(c0))}else{c1=Y(c0)}if(c1==null){return null}if(c2(cZ,c1)){aB.push({from:c1,to:c1+1})}else{return null}return cZ}function bl(c0,cZ,c1){return aX(c0,function(c2){if(c2.className!=cZ||c2.bgClassName!=c1){c2.className=cZ;c2.bgClassName=c1;return true}})}function cK(c0,cZ){return aX(c0,function(c1,c4){if(c1.hidden!=cZ){c1.hidden=cZ;a3(c1,cZ?0:1);var c3=cW.from.line,c2=cW.to.line;if(cZ&&(c3==c4||c2==c4)){var c6=c3==c4?bR({line:c3,ch:0},c3,0):cW.from;var c5=c2==c4?bR({line:c2,ch:0},c2,0):cW.to;if(!c5){return}bw(c6,c5)}return(aS=true)}})}function aV(c0){if(typeof c0=="number"){if(!br(c0)){return null}var c1=c0;c0=cF(c0);if(!c0){return null}}else{var c1=Y(c0);if(c1==null){return null}}var cZ=c0.gutterMarker;return{line:c1,handle:c0,text:c0.text,markerText:cZ&&cZ.text,markerClass:cZ&&cZ.style,lineClass:c0.className,bgClass:c0.bgClassName}}function ct(cZ){av.innerHTML="
x
";av.firstChild.firstChild.firstChild.nodeValue=cZ;return av.firstChild.firstChild.offsetWidth||10}function aG(db,c5){if(c5<=0){return 0}var c2=cF(db),c8=c2.text;function c9(dc){return b5(c2,dc).left}var c6=0,c4=0,c7=c8.length,c3;var c0=Math.min(c7,Math.ceil(c5/bh()));for(;;){var c1=c9(c0);if(c1<=c5&&c0c3){return c7}c0=Math.floor(c7*0.8);c1=c9(c0);if(c1c5-c4)?c6:c7}var da=Math.ceil((c6+c7)/2),cZ=c9(da);if(cZ>c5){c7=da;c3=cZ}else{c6=da;c4=cZ}}}var cz="CodeMirror-temp-"+Math.floor(Math.random()*16777215).toString(16);function b5(c0,c3){if(c3==0){return{top:0,left:0}}var cZ=b1.lineWrapping&&c3"+c0.getHTML(a9,c3,cz,cZ)+"
";var c2=document.getElementById(cz);var c5=c2.offsetTop,c4=c2.offsetLeft;if(I&&c5==0&&c4==0){var c1=document.createElement("span");c1.innerHTML="x";c2.parentNode.insertBefore(c1,c2.nextSibling);c5=c1.offsetTop}return{top:c5,left:c4}}function cR(c4,c2){var cZ,c0=bP(),c3=c0*(g(cy,c4.line)-(c2?bd:0));if(c4.ch==0){cZ=0}else{var c1=b5(cF(c4.line),c4.ch);cZ=c1.left;if(b1.lineWrapping){c3+=Math.max(0,c1.top)}}return{x:cZ,y:c3,yBot:c3+c0}}function bH(c8,c7){if(c7<0){c7=0}var c5=bP(),c3=bh(),de=bd+Math.floor(c7/c5);var c9=X(cy,de);if(c9>=cy.size){return{line:cy.size-1,ch:cF(cy.size-1).text.length}}var c0=cF(c9),db=c0.text;var dg=b1.lineWrapping,c6=dg?de-g(cy,c9):0;if(c8<=0&&c6==0){return{line:c9,ch:0}}function df(di){var dj=b5(c0,di);if(dg){var dk=Math.round(dj.top/c5);return Math.max(0,dj.left+(dk-c6)*bk.clientWidth)}return dj.left}var dd=0,dc=0,c1=db.length,cZ;var da=Math.min(c1,Math.ceil((c8+c6*bk.clientWidth*0.9)/c3));for(;;){var c4=df(da);if(c4<=c8&&dacZ){return{line:c9,ch:c1}}da=Math.floor(c1*0.8);c4=df(da);if(c4c8-dc)?dd:c1}}var dh=Math.ceil((dd+c1)/2),c2=df(dh);if(c2>c8){c1=dh;cZ=c2}else{dd=dh;dc=c2}}}function ao(c1){var cZ=cR(c1,true),c0=ak(bu);return{x:c0.left+cZ.x,y:c0.top+cZ.y,yBot:c0.top+cZ.yBot}}var a0,ax,bU;function bP(){if(bU==null){bU="
";for(var c0=0;c0<49;++c0){bU+="x
"}bU+="x
"}var cZ=aq.clientHeight;if(cZ==ax){return a0}ax=cZ;av.innerHTML=bU;a0=av.firstChild.offsetHeight/50||1;av.innerHTML="";return a0}var cS,bv=0;function bh(){if(bk.clientWidth==bv){return cS}bv=bk.clientWidth;return(cS=ct("x"))}function cr(){return bu.offsetTop}function a5(){return bu.offsetLeft}function a2(c3,c2){var c1=ak(bk,true),cZ,c4;try{cZ=c3.clientX;c4=c3.clientY}catch(c3){return null}if(!c2&&(cZ-c1.left>bk.clientWidth||c4-c1.top>bk.clientHeight)){return null}var c0=ak(bu,true);return bH(cZ-c0.left,c4-c0.top)}function a1(c0){var c5=a2(c0),c4=bk.scrollTop;if(!c5||window.opera){return}if(ad(cW.from,cW.to)||Z(c5,cW.from)||!Z(c5,cW.to)){ar(a6)(c5.line,c5.ch)}var c3=bm.style.cssText;bX.style.position="absolute";bm.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(c0.clientY-5)+"px; left: "+(c0.clientX-5)+"px; z-index: 1000; background: white; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";bf=true;var c2=bm.value=b3();bz();a(bm);function cZ(){var c6=A(bm.value).join("\n");if(c6!=c2){ar(bs)(c6,"end")}bX.style.position="relative";bm.style.cssText=c3;if(B){bk.scrollTop=c4}bf=false;cC(true);am()}if(N){w(c0);var c1=r(window,"mouseup",function(){c1();setTimeout(cZ,20)},true)}else{setTimeout(cZ,50)}}function cM(){clearInterval(cP);var cZ=true;bc.style.visibility="";cP=setInterval(function(){bc.style.visibility=(cZ=!cZ)?"":"hidden"},650)}var bp={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"};function ce(c5){var cZ=cW.inverted?cW.from:cW.to,c7=cF(cZ.line),c0=cZ.ch-1;var c4=(c0>=0&&bp[c7.text.charAt(c0)])||bp[c7.text.charAt(++c0)];if(!c4){return}var c8=c4.charAt(0),c6=c4.charAt(1)==">",di=c6?1:-1,dd=c7.styles;for(var dj=c0+1,df=0,dh=dd.length;df=dr&&dq"==c6){c2.push(dt)}else{if(c2.pop()!=dn.charAt(0)){return{pos:dq,match:false}}else{if(!c2.length){return{pos:dq,match:true}}}}}}}}for(var df=cZ.line,dh=c6?Math.min(df+100,cy.size):Math.max(-1,df-100);df!=dh;df+=di){var c7=cF(df),c3=df==cZ.line;var c9=da(c7,c3&&c6?c0+1:0,c3&&!c6?c0:c7.text.length);if(c9){break}}if(!c9){c9={pos:null,match:false}}var dg=c9.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";var de=bE({line:cZ.line,ch:c0},{line:cZ.line,ch:c0+1},dg),c1=c9.pos!=null&&bE({line:df,ch:c9.pos},{line:df,ch:c9.pos+1},dg);var db=ar(function(){de.clear();c1&&c1.clear()});if(c5){setTimeout(db,800)}else{b4=db}}function a7(c5){var c4,c1;for(var c0=c5,c2=c5-40;c0>c2;--c0){if(c0==0){return 0}var cZ=cF(c0-1);if(cZ.stateAfter){return c0}var c3=cZ.indentation(b1.tabSize);if(c1==null||c4>c3){c1=c0-1;c4=c3}}return c1}function cu(c1){var c0=a7(c1),cZ=c0&&cF(c0-1).stateAfter;if(!cZ){cZ=V(cb)}else{cZ=p(cb,cZ)}cy.iter(c0,c1,function(c2){c2.highlight(cb,cZ,b1.tabSize);c2.stateAfter=p(cb,cZ)});if(c0=cy.size){continue}var c0=a7(c2),cZ=c0&&cF(c0-1).stateAfter;if(cZ){cZ=p(cb,cZ)}else{cZ=V(cb)}var c4=0,c1=cb.compareStates,c7=false,c6=c0,c3=false;cy.iter(c6,cy.size,function(da){var db=da.stateAfter;if(+new Date>c5){ch.push(c6);bG(b1.workDelay);if(c7){aB.push({from:c2,to:c6+1})}return(c3=true)}var dc=da.highlight(cb,cZ,b1.tabSize);if(dc){c7=true}da.stateAfter=p(cb,cZ);var c9=null;if(c1){var dd=db&&c1(db,cZ);if(dd!=ab){c9=!!dd}}if(c9==null){if(dc!==false||!db){c4=0}else{if(++c4>3&&(!cb.indent||cb.indent(db,"")==cb.indent(cZ,""))){c9=true}}}if(c9){return true}++c6});if(c3){return}if(c7){aB.push({from:c2,to:c6+1})}}if(c8&&b1.onHighlightComplete){b1.onHighlightComplete(b9)}}function bG(cZ){if(!ch.length){return}aw.set(cZ,ar(bS))}function aN(){cp=b6=cN=null;aB=[];aP=false;cA=[]}function ay(){var c3=false,c0;if(aP){c3=!cf()}if(aB.length){c0=cd(aB,true)}else{if(aP){cV()}if(aS){aL()}}if(c3){cf()}if(aP){cY();cM()}if(cj&&!bf&&(cp===true||(cp!==false&&aP))){cC(b6)}if(aP&&b1.matchBrackets){setTimeout(ar(function(){if(b4){b4();b4=null}if(ad(cW.from,cW.to)){ce(false)}}),20)}var cZ=cN,c1=cA;if(aP&&b1.onCursorActivity){b1.onCursorActivity(b9)}if(cZ&&b1.onChange&&b9){b1.onChange(b9,cZ)}for(var c2=0;c22){ao.dependencies=[];for(var an=2;an0&&ao.ch=this.string.length},sol:function(){return this.pos==0},peek:function(){return this.string.charAt(this.pos)},next:function(){if(this.posan},eatSpace:function(){var am=this.pos;while(/[\s\u00a0]/.test(this.string.charAt(this.pos))){++this.pos}return this.pos>am},skipToEnd:function(){this.pos=this.string.length},skipTo:function(am){var an=this.string.indexOf(am,this.pos);if(an>-1){this.pos=an;return true}},backUp:function(am){this.pos-=am},column:function(){return n(this.string,this.start,this.tabSize)},indentation:function(){return n(this.string,null,this.tabSize)},match:function(ap,an,am){if(typeof ap=="string"){function aq(ar){return am?ar.toLowerCase():ar}if(aq(this.string).indexOf(aq(ap),this.pos)==this.pos){if(an!==false){this.pos+=ap.length}return true}}else{var ao=this.string.slice(this.pos).match(ap);if(ao&&an!==false){this.pos+=ao[0].length}return ao}},current:function(){return this.string.slice(this.start,this.pos)}};u.StringStream=b;function K(ap,ao,an,am){this.from=ap;this.to=ao;this.style=an;this.marker=am}K.prototype={attach:function(am){this.marker.set.push(am)},detach:function(an){var am=q(this.marker.set,an);if(am>-1){this.marker.set.splice(am,1)}},split:function(ap,am){if(this.to<=ap&&this.to!=null){return null}var ao=this.fromthis.from&&(ap=aq){this.from=Math.max(ap,this.from)+ao}}if(am&&(aqthis.from||this.from==null)){this.to=null}else{if(this.to!=null&&this.to>aq){this.to=ap=this.to},sameSet:function(am){return this.marker==am.marker}};function G(am){this.from=am;this.to=am;this.line=null}G.prototype={attach:function(am){this.line=am},detach:function(am){if(this.line==am){this.line=null}},split:function(an,am){if(anthis.to},clipTo:function(an,aq,am,ap,ao){if((an||aqthis.to)){this.from=0;this.to=-1}else{if(this.from>aq){this.from=this.to=Math.max(ap,this.from)+ao}}},sameSet:function(am){return false},find:function(){if(!this.line||!this.line.parent){return null}return{line:Y(this.line),ch:this.from}},clear:function(){if(this.line){var am=q(this.line.marked,this);if(am!=-1){this.line.marked.splice(am,1)}this.line=null}}};function e(an,am){this.styles=am||[an,null];this.text=an;this.height=1;this.marked=this.gutterMarker=this.className=this.bgClassName=this.handlers=null;this.stateAfter=this.parent=this.hidden=null}e.inheritMarks=function(aq,au){var ap=new e(aq),am=au&&au.marked;if(am){for(var ao=0;ao5000){ax[au++]=this.text.slice(aw.pos);ax[au++]=null;break}}if(ax.length!=au){ax.length=au;aq=true}if(au&&ax[au-2]!=av){aq=true}return aq||(ax.length<5&&this.text.length<10?null:false)},getTokenAt:function(ar,ap,ao){var am=this.text,aq=new b(am);while(aq.pos',aX,"")}else{ax.push(aX)}}var aL=aI;if(am!=null){var aG=0,aB='';aL=function(aW,aV){var aU=aW.length;if(am>=aG&&amaG){aI(aW.slice(0,am-aG),aV);if(aq){ax.push("")}}ax.push(aB);aI(aW.slice(am-aG),aV);ax.push("");am--;aG+=aU}else{aG+=aU;aI(aW,aV);if(aG==am&&aG==aQ){ax.push(aB+"")}else{if(aG>am+10&&/\s/.test(aW)){aL=function(){}}}}}}var aF=this.styles,aw=this.text,aC=this.marked;var aQ=aw.length;function ar(aU){if(!aU){return null}return"cm-"+aU.replace(/ +/g," cm-")}if(!aw&&am==null){aL(" ")}else{if(!aC||!aC.length){for(var aN=0,ay=0;ayaQ){aE=aE.slice(0,aQ-ay)}ay+=aH;aL(aE,ar(aP))}}else{var au=0,aN=0,aA="",aP,aT=0;var aS=aC[0].from||0,aK=[],aR=0;function aO(){var aU;while(aRaz?aA.slice(0,az-au):aA,an);if(ap>=az){aA=aA.slice(az-au);au=az;break}au=ap}aA=aF[aN++];aP=ar(aF[aN++])}}}}return ax.join("")},cleanUp:function(){this.parent=null;if(this.marked){for(var am=0,an=this.marked.length;amat){av.push(ao.slice(at-ar,Math.min(ao.length,au-ar)),am[aq+1])}if(ap>=at){an=1}}else{if(an==1){if(ap>au){av.push(ao.slice(0,au-ar),am[aq+1])}else{av.push(ao,am[aq+1])}}}ar=ap}}function ah(an){this.lines=an;this.parent=null;for(var ao=0,ap=an.length,am=0;ao50){while(am.lines.length>50){var ap=am.lines.splice(am.lines.length-25,25);var au=new ah(ap);am.height-=au.height;this.children.splice(ao+1,0,au);au.parent=this}this.maybeSpill()}break}an-=ar}},maybeSpill:function(){if(this.children.length<=10){return}var ap=this;do{var an=ap.children.splice(ap.children.length-5,5);var ao=new i(an);if(!ap.parent){var aq=new i(ap.children);aq.parent=ap;ap.children=[aq,ao];ap=aq}else{ap.size-=ao.size;ap.height-=ao.height;var am=q(ap.parent.children,ap);ap.parent.children.splice(am+1,0,ao)}ao.parent=ap.parent}while(ap.children.length>10);ap.parent.maybeSpill()},iter:function(ao,an,am){this.iterN(ao,an-ao,am)},iterN:function(am,av,au){for(var an=0,aq=this.children.length;an400||!av||this.closed||av.start>am+an.length||av.start+av.added0;--ap){av.old.unshift(an[ap-1])}for(var ap=aw;ap>0;--ap){av.old.push(an[an.length-ap])}if(at){av.start=am}av.added+=ar-(an.length-at-aw)}}this.time=ao},startCompound:function(){if(!this.compound++){this.closed=true}},endCompound:function(){if(!--this.compound){this.closed=true}}};function J(){w(this)}function O(am){if(!am.stop){am.stop=J}return am}function T(am){if(am.preventDefault){am.preventDefault()}else{am.returnValue=false}}function D(am){if(am.stopPropagation){am.stopPropagation()}else{am.cancelBubble=true}}function w(am){T(am);D(am)}u.e_stop=w;u.e_preventDefault=T;u.e_stopPropagation=D;function j(am){return am.target||am.srcElement}function x(am){if(am.which){return am.which}else{if(am.button&1){return 1}else{if(am.button&2){return 3}else{if(am.button&4){return 2}}}}}function y(an,ao){var am=an.override&&an.override.hasOwnProperty(ao);return am?an.override[ao]:an[ao]}function r(ap,ao,an,am){if(typeof ap.addEventListener=="function"){ap.addEventListener(ao,an,false);if(am){return function(){ap.removeEventListener(ao,an,false)}}}else{var aq=function(ar){an(ar||window.event)};ap.attachEvent("on"+ao,aq);if(am){return function(){ap.detachEvent("on"+ao,aq)}}}}u.connect=r;function z(){this.id=null}z.prototype={set:function(am,an){clearTimeout(this.id);this.id=setTimeout(an,am)}};var ab=u.Pass={toString:function(){return"CodeMirror.Pass"}};var N=/gecko\/\d{7}/i.test(navigator.userAgent);var I=/MSIE \d/.test(navigator.userAgent);var B=/MSIE [1-8]\b/.test(navigator.userAgent);var E=I&&document.documentMode==5;var f=/WebKit\//.test(navigator.userAgent);var af=/Chrome\//.test(navigator.userAgent);var h=/Apple Computer/.test(navigator.vendor);var m=/KHTML\//.test(navigator.userAgent);var F=function(){if(B){return false}var am=document.createElement("div");return"draggable" in am||"dragDrop" in am}();var d=function(){var am=document.createElement("textarea");am.value="foo\nbar";if(am.value.indexOf("\r")>-1){return"\r\n"}return"\n"}();var o=/^$/;if(N){o=/$'/}else{if(h){o=/\-[^ \-?]|\?[^ !'\"\),.\-\/:;\?\]\}]/}else{if(af){o=/\-[^ \-\.?]|\?[^ \-\.?\]\}:;!'\"\),\/]|[\.!\"#&%\)*+,:;=>\]|\}~][\(\{\[<]|\$'/}}}function n(an,am,ap){if(am==null){am=an.search(/[^\s\u00a0]/);if(am==-1){am=an.length}}for(var ao=0,aq=0;ao=0&&am>=0;--an,--am){if(ap.charAt(an)!=ao.charAt(am)){break}}return am+1}function q(ap,am){if(ap.indexOf){return ap.indexOf(am)}for(var an=0,ao=ap.length;an-1){am.push(ao.slice(ap,ao.charAt(an-1)=="\r"?an-1:an));ap=an+1}am.push(ao.slice(ap));return am}:function(am){return am.split(/\r?\n/)};u.splitLines=A;var ae=window.getSelection?function(an){try{return an.selectionStart!=an.selectionEnd}catch(am){return false}}:function(ao){try{var am=ao.ownerDocument.selection.createRange()}catch(an){}if(!am||am.parentElement()!=ao){return false}return am.compareEndPoints("StartToEnd",am)!=0};u.defineMode("null",function(){return{token:function(am){am.skipToEnd()}}});u.defineMIME("text/plain","null");var R={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",91:"Mod",92:"Mod",93:"Mod",127:"Delete",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63276:"PageUp",63277:"PageDown",63275:"End",63273:"Home",63234:"Left",63232:"Up",63235:"Right",63233:"Down",63302:"Insert",63272:"Delete"};u.keyNames=R;(function(){for(var am=0;am<10;am++){R[am+48]=String(am)}for(var am=65;am<=90;am++){R[am]=String.fromCharCode(am)}for(var am=1;am<=12;am++){R[am+111]=R[am+63235]="F"+am}})();return u})();CodeMirror.defineMode("javascript",function(I,M){var v=I.indentUnit;var Q=M.json;var b=function(){function W(Z){return{type:Z,style:"keyword"}}var T=W("keyword a"),Y=W("keyword b"),X=W("keyword c");var U=W("operator"),V={type:"atom",style:"atom"};return{"if":T,"while":T,"with":T,"else":Y,"do":Y,"try":Y,"finally":Y,"return":X,"break":X,"continue":X,"new":X,"delete":X,"throw":X,"var":W("var"),"const":W("var"),let:W("var"),"function":W("function"),"catch":W("catch"),"for":W("for"),"switch":W("switch"),"case":W("case"),"default":W("default"),"in":U,"typeof":U,"instanceof":U,"true":V,"false":V,"null":V,"undefined":V,"NaN":V,"Infinity":V}}();var N=/[+\-*&%=<>!?|]/;function R(V,U,T){U.tokenize=T;return T(V,U)}function h(W,T){var V=false,U;while((U=W.next())!=null){if(U==T&&!V){return false}V=!V&&U=="\\"}return V}var S,p;function B(V,U,T){S=V;p=T;return U}function l(X,V){var T=X.next();if(T=='"'||T=="'"){return R(X,V,z(T))}else{if(/[\[\]{}\(\),;\:\.]/.test(T)){return B(T)}else{if(T=="0"&&X.eat(/x/i)){X.eatWhile(/[\da-f]/i);return B("number","number")}else{if(/\d/.test(T)){X.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/);return B("number","number")}else{if(T=="/"){if(X.eat("*")){return R(X,V,f)}else{if(X.eat("/")){X.skipToEnd();return B("comment","comment")}else{if(V.reAllowed){h(X,"/");X.eatWhile(/[gimy]/);return B("regexp","string-2")}else{X.eatWhile(N);return B("operator",null,X.current())}}}}else{if(T=="#"){X.skipToEnd();return B("error","error")}else{if(N.test(T)){X.eatWhile(N);return B("operator",null,X.current())}else{X.eatWhile(/[\w\$_]/);var W=X.current(),U=b.propertyIsEnumerable(W)&&b[W];return(U&&V.kwAllowed)?B(U.type,U.style,W):B("variable","variable",W)}}}}}}}}function z(T){return function(V,U){if(!h(V,T)){U.tokenize=l}return B("string","string")}}function f(W,V){var T=false,U;while(U=W.next()){if(U=="/"&&T){V.tokenize=l;break}T=(U=="*")}return B("comment","comment")}var k={atom:true,number:true,variable:true,string:true,regexp:true};function t(Y,U,T,X,V,W){this.indented=Y;this.column=U;this.type=T;this.prev=V;this.info=W;if(X!=null){this.align=X}}function w(V,U){for(var T=V.localVars;T;T=T.next){if(T.name==U){return true}}}function E(X,U,T,W,Y){var Z=X.cc;u.state=X;u.stream=Y;u.marked=null,u.cc=Z;if(!X.lexical.hasOwnProperty("align")){X.lexical.align=true}while(true){var V=Z.length?Z.pop():Q?x:y;if(V(T,W)){while(Z.length&&Z[Z.length-1].lex){Z.pop()()}if(u.marked){return u.marked}if(T=="variable"&&w(X,W)){return"variable-2"}return U}}}var u={state:null,column:null,marked:null,cc:null};function a(){for(var T=arguments.length-1;T>=0;T--){u.cc.push(arguments[T])}}function G(){a.apply(null,arguments);return true}function m(U){var V=u.state;if(V.context){u.marked="def";for(var T=V.localVars;T;T=T.next){if(T.name==U){return}}V.localVars={name:U,next:V.localVars}}}var D={name:"this",next:{name:"arguments"}};function s(){if(!u.state.context){u.state.localVars=D}u.state.context={prev:u.state.context,vars:u.state.localVars}}function r(){u.state.localVars=u.state.context.vars;u.state.context=u.state.context.prev}function j(U,V){var T=function(){var W=u.state;W.lexical=new t(W.indented,u.stream.column(),U,null,W.lexical,V)};T.lex=true;return T}function F(){var T=u.state;if(T.lexical.prev){if(T.lexical.type==")"){T.indented=T.lexical.indented}T.lexical=T.lexical.prev}}F.lex=true;function c(U){return function T(V){if(V==U){return G()}else{if(U==";"){return a()}else{return G(arguments.callee)}}}}function y(T){if(T=="var"){return G(j("vardef"),J,c(";"),F)}if(T=="keyword a"){return G(j("form"),x,y,F)}if(T=="keyword b"){return G(j("form"),y,F)}if(T=="{"){return G(j("}"),n,F)}if(T==";"){return G()}if(T=="function"){return G(i)}if(T=="for"){return G(j("form"),c("("),j(")"),g,c(")"),F,y,F)}if(T=="variable"){return G(j("stat"),C)}if(T=="switch"){return G(j("form"),x,j("}","switch"),c("{"),n,F,F)}if(T=="case"){return G(x,c(":"))}if(T=="default"){return G(c(":"))}if(T=="catch"){return G(j("form"),s,c("("),q,c(")"),y,F,r)}return a(j("stat"),x,c(";"),F)}function x(T){if(k.hasOwnProperty(T)){return G(L)}if(T=="function"){return G(i)}if(T=="keyword c"){return G(A)}if(T=="("){return G(j(")"),A,c(")"),F,L)}if(T=="operator"){return G(x)}if(T=="["){return G(j("]"),O(x,"]"),F,L)}if(T=="{"){return G(j("}"),O(o,"}"),F,L)}return G()}function A(T){if(T.match(/[;\}\)\],]/)){return a()}return a(x)}function L(T,U){if(T=="operator"&&/\+\+|--/.test(U)){return G(L)}if(T=="operator"||T==":"){return G(x)}if(T==";"){return}if(T=="("){return G(j(")"),O(x,")"),F,L)}if(T=="."){return G(P,L)}if(T=="["){return G(j("]"),x,c("]"),F,L)}}function C(T){if(T==":"){return G(F,y)}return a(L,c(";"),F)}function P(T){if(T=="variable"){u.marked="property";return G()}}function o(T){if(T=="variable"){u.marked="property"}if(k.hasOwnProperty(T)){return G(c(":"),x)}}function O(V,T){function U(X){if(X==","){return G(V,U)}if(X==T){return G()}return G(c(T))}return function W(X){if(X==T){return G()}else{return a(V,U)}}}function n(T){if(T=="}"){return G()}return a(y,n)}function J(T,U){if(T=="variable"){m(U);return G(H)}return G()}function H(T,U){if(U=="="){return G(x,H)}if(T==","){return G(J)}}function g(T){if(T=="var"){return G(J,e)}if(T==";"){return a(e)}if(T=="variable"){return G(K)}return a(e)}function K(T,U){if(U=="in"){return G(x)}return G(L,e)}function e(T,U){if(T==";"){return G(d)}if(U=="in"){return G(x)}return G(x,c(";"),d)}function d(T){if(T!=")"){G(x)}}function i(T,U){if(T=="variable"){m(U);return G(i)}if(T=="("){return G(j(")"),s,O(q,")"),F,y,r)}}function q(T,U){if(T=="variable"){m(U);return G()}}return{startState:function(T){return{tokenize:l,reAllowed:true,kwAllowed:true,cc:[],lexical:new t((T||0)-v,0,"block",false),localVars:M.localVars,context:M.localVars&&{vars:M.localVars},indented:0}},token:function(V,U){if(V.sol()){if(!U.lexical.hasOwnProperty("align")){U.lexical.align=false}U.indented=V.indentation()}if(V.eatSpace()){return null}var T=U.tokenize(V,U);if(S=="comment"){return T}U.reAllowed=!!(S=="operator"||S=="keyword c"||S.match(/^[\[{}\(,;:]$/));U.kwAllowed=S!=".";return E(U,T,S,p,V)},indent:function(Y,T){if(Y.tokenize!=l){return 0}var X=T&&T.charAt(0),V=Y.lexical;if(V.type=="stat"&&X=="}"){V=V.prev}var W=V.type,U=X==W;if(W=="vardef"){return V.indented+4}else{if(W=="form"&&X=="{"){return V.indented}else{if(W=="stat"||W=="form"){return V.indented+v}else{if(V.info=="switch"&&!U){return V.indented+(/^(?:case|default)\b/.test(T)?v:2*v)}else{if(V.align){return V.column+(U?0:1)}else{return V.indented+(U?0:v)}}}}}},electricChars:":{}"}});CodeMirror.defineMIME("text/javascript","javascript");CodeMirror.defineMIME("application/json",{name:"javascript",json:true});CodeMirror.defineMode("xml",function(y,k){var r=y.indentUnit;var x=k.htmlMode?{autoSelfClosers:{area:true,base:true,br:true,col:true,command:true,embed:true,frame:true,hr:true,img:true,input:true,keygen:true,link:true,meta:true,param:true,source:true,track:true,wbr:true},implicitlyClosed:{dd:true,li:true,optgroup:true,option:true,p:true,rp:true,rt:true,tbody:true,td:true,tfoot:true,th:true,tr:true},contextGrabbers:{dd:{dd:true,dt:true},dt:{dd:true,dt:true},li:{li:true},option:{option:true,optgroup:true},optgroup:{optgroup:true},p:{address:true,article:true,aside:true,blockquote:true,dir:true,div:true,dl:true,fieldset:true,footer:true,form:true,h1:true,h2:true,h3:true,h4:true,h5:true,h6:true,header:true,hgroup:true,hr:true,menu:true,nav:true,ol:true,p:true,pre:true,section:true,table:true,ul:true},rp:{rp:true,rt:true},rt:{rp:true,rt:true},tbody:{tbody:true,tfoot:true},td:{td:true,th:true},tfoot:{tbody:true},th:{td:true,th:true},thead:{tbody:true,tfoot:true},tr:{tr:true}},doNotIndent:{pre:true},allowUnquoted:true,allowMissing:false}:{autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:false,allowMissing:false};var a=k.alignCDATA;var f,g;function o(E,D){function B(G){D.tokenize=G;return G(E,D)}var C=E.next();if(C=="<"){if(E.eat("!")){if(E.eat("[")){if(E.match("CDATA[")){return B(w("atom","]]>"))}else{return null}}else{if(E.match("--")){return B(w("comment","-->"))}else{if(E.match("DOCTYPE",true,true)){E.eatWhile(/[\w\._\-]/);return B(z(1))}else{return null}}}}else{if(E.eat("?")){E.eatWhile(/[\w\._\-]/);D.tokenize=w("meta","?>");return"meta"}else{g=E.eat("/")?"closeTag":"openTag";E.eatSpace();f="";var F;while((F=E.eat(/[^\s\u00a0=<>\"\'\/?]/))){f+=F}D.tokenize=n;return"tag"}}}else{if(C=="&"){var A;if(E.eat("#")){if(E.eat("x")){A=E.eatWhile(/[a-fA-F\d]/)&&E.eat(";")}else{A=E.eatWhile(/[\d]/)&&E.eat(";")}}else{A=E.eatWhile(/[\w\.\-:]/)&&E.eat(";")}return A?"atom":"error"}else{E.eatWhile(/[^&<]/);return null}}}function n(C,B){var A=C.next();if(A==">"||(A=="/"&&C.eat(">"))){B.tokenize=o;g=A==">"?"endTag":"selfcloseTag";return"tag"}else{if(A=="="){g="equals";return null}else{if(/[\'\"]/.test(A)){B.tokenize=j(A);return B.tokenize(C,B)}else{C.eatWhile(/[^\s\u00a0=<>\"\'\/?]/);return"word"}}}}function j(A){return function(C,B){while(!C.eol()){if(C.next()==A){B.tokenize=n;break}}return"string"}}function w(B,A){return function(D,C){while(!D.eol()){if(D.match(A)){C.tokenize=o;break}D.next()}return B}}function z(A){return function(D,C){var B;while((B=D.next())!=null){if(B=="<"){C.tokenize=z(A+1);return C.tokenize(D,C)}else{if(B==">"){if(A==1){C.tokenize=o;break}else{C.tokenize=z(A-1);return C.tokenize(D,C)}}}}return"meta"}}var l,h;function b(){for(var A=arguments.length-1;A>=0;A--){l.cc.push(arguments[A])}}function e(){b.apply(null,arguments);return true}function i(A,C){var B=x.doNotIndent.hasOwnProperty(A)||(l.context&&l.context.noIndent);l.context={prev:l.context,tagName:A,indent:l.indented,startOfLine:C,noIndent:B}}function u(){if(l.context){l.context=l.context.prev}}function d(A){if(A=="openTag"){l.tagName=f;return e(m,c(l.startOfLine))}else{if(A=="closeTag"){var B=false;if(l.context){if(l.context.tagName!=f){if(x.implicitlyClosed.hasOwnProperty(l.context.tagName.toLowerCase())){u()}B=!l.context||l.context.tagName!=f}}else{B=true}if(B){h="error"}return e(s(B))}}return e()}function c(A){return function(B){if(B=="selfcloseTag"||(B=="endTag"&&x.autoSelfClosers.hasOwnProperty(l.tagName.toLowerCase()))){q(l.tagName.toLowerCase());return e()}if(B=="endTag"){q(l.tagName.toLowerCase());i(l.tagName,A);return e()}return e()}}function s(A){return function(B){if(A){h="error"}if(B=="endTag"){u();return e()}h="error";return e(arguments.callee)}}function q(B){var A;while(true){if(!l.context){return}A=l.context.tagName.toLowerCase();if(!x.contextGrabbers.hasOwnProperty(A)||!x.contextGrabbers[A].hasOwnProperty(B)){return}u()}}function m(A){if(A=="word"){h="attribute";return e(p,m)}if(A=="endTag"||A=="selfcloseTag"){return b()}h="error";return e(m)}function p(A){if(A=="equals"){return e(v,m)}if(!x.allowMissing){h="error"}return(A=="endTag"||A=="selfcloseTag")?b():e()}function v(A){if(A=="string"){return e(t)}if(A=="word"&&x.allowUnquoted){h="string";return e()}h="error";return(A=="endTag"||A=="selfCloseTag")?b():e()}function t(A){if(A=="string"){return e(t)}else{return b()}}return{startState:function(){return{tokenize:o,cc:[],indented:0,startOfLine:true,tagName:null,context:null}},token:function(D,C){if(D.sol()){C.startOfLine=true;C.indented=D.indentation()}if(D.eatSpace()){return null}h=g=f=null;var B=C.tokenize(D,C);C.type=g;if((B||g)&&B!="comment"){l=C;while(true){var A=C.cc.pop()||d;if(A(g||B)){break}}}C.startOfLine=false;return h||B},indent:function(D,A,C){var B=D.context;if((D.tokenize!=n&&D.tokenize!=o)||B&&B.noIndent){return C?C.match(/^(\s*)/)[0].length:0}if(a&&/`]+/;function e(I,H,G){H.f=H.inline=G;return G(I,H)}function r(I,H,G){H.f=H.block=G;return G(I,H)}function o(G){G.em=false;G.strong=false;return null}function l(I,H){var G;if(H.indentationDiff>=4){H.indentation-=H.indentationDiff;I.skipToEnd();return d}else{if(I.eatSpace()){return null}else{if(I.peek()==="#"||I.match(n)){H.header=true}else{if(I.eat(">")){H.indentation++;H.quote=true}else{if(I.peek()==="["){return e(I,H,k)}else{if(I.match(F,true)){return E}else{if(G=I.match(p,true)||I.match(u,true)){H.indentation+=G[0].length;return z}}}}}}}return e(I,H,H.inline)}function x(I,H){var G=i.token(I,H.htmlState);if(G==="tag"&&H.htmlState.type!=="openTag"&&!H.htmlState.context){H.f=q;H.block=l}return G}function t(H){var G=[];if(H.strong){G.push(H.em?w:j)}else{if(H.em){G.push(g)}}if(H.header){G.push(y)}if(H.quote){G.push(A)}return G.length?G.join(" "):null}function b(H,G){if(H.match(f,true)){return t(G)}return undefined}function q(K,J){var I=J.text(K,J);if(typeof I!=="undefined"){return I}var H=K.next();if(H==="\\"){K.next();return t(J)}if(H==="`"){return e(K,J,v(d,"`"))}if(H==="["){return e(K,J,C)}if(H==="<"&&K.match(/^\w/,false)){K.backUp(1);return r(K,J,x)}var G=t(J);if(H==="*"||H==="_"){if(K.eat(H)){return(J.strong=!J.strong)?t(J):G}return(J.em=!J.em)?t(J):G}return t(J)}function C(I,H){while(!I.eol()){var G=I.next();if(G==="\\"){I.next()}if(G==="]"){H.inline=H.f=h;return s}}return s}function h(I,H){I.eatSpace();var G=I.next();if(G==="("||G==="["){return e(I,H,v(D,G==="("?")":"]"))}return"error"}function k(H,G){if(H.match(/^[^\]]*\]:/,true)){G.f=a;return s}return e(H,G,q)}function a(H,G){H.eatSpace();H.match(/^[^\s]+/,true);G.f=G.inline=q;return D}function c(G){if(!c[G]){c[G]=new RegExp("^(?:[^\\\\\\"+G+"]|\\\\.)*(?:\\"+G+"|$)")}return c[G]}function v(H,I,G){G=G||q;return function(K,J){K.match(c(I));J.inline=J.f=G;return H}}return{startState:function(){return{f:l,block:l,htmlState:i.startState(),indentation:0,inline:q,text:b,em:false,strong:false,header:false,quote:false}},copyState:function(G){return{f:G.f,block:G.block,htmlState:CodeMirror.copyState(i,G.htmlState),indentation:G.indentation,inline:G.inline,text:G.text,em:G.em,strong:G.strong,header:G.header,quote:G.quote}},token:function(I,H){if(I.sol()){if(I.match(/^\s*$/,true)){return o(H)}H.header=false;H.quote=false;H.f=H.block;var G=I.match(/^\s*/,true)[0].replace(/\t/g," ").length;H.indentationDiff=G-H.indentation;H.indentation=G;if(G>0){return null}}return H.f(I,H)},blankLine:o,getType:t}},"xml");CodeMirror.defineMIME("text/x-markdown","markdown");Ext.define("Docs.History",{singleton:true,init:function(){Ext.util.History.useTopWindow=false;Ext.util.History.init(function(){this.historyLoaded=true;this.initialNavigate()},this);Ext.util.History.on("change",function(b){this.navigate(b,true)},this)},notifyTabsLoaded:function(){this.tabsLoaded=true;this.initialNavigate()},initialNavigate:function(){if(this.tabsLoaded&&this.historyLoaded){this.navigate(Ext.util.History.getToken(),true)}},navigate:function(e,g){var f=this.parseToken(e);if(f.url=="#!/api"){Docs.App.getController("Classes").loadIndex(g)}else{if(f.type==="api"){Docs.App.getController("Classes").loadClass(f.url,g)}else{if(f.url==="#!/guide"){Docs.App.getController("Guides").loadIndex(g)}else{if(f.type==="guide"){Docs.App.getController("Guides").loadGuide(f.url,g)}else{if(f.url==="#!/video"){Docs.App.getController("Videos").loadIndex(g)}else{if(f.type==="video"){Docs.App.getController("Videos").loadVideo(f.url,g)}else{if(f.url==="#!/example"){Docs.App.getController("Examples").loadIndex()}else{if(f.type==="example"){Docs.App.getController("Examples").loadExample(f.url,g)}else{if(f.url==="#!/comment"){Docs.App.getController("Comments").loadIndex()}else{if(f.url==="#!/tests"){Docs.App.getController("Tests").loadIndex()}else{if(Docs.App.getController("Welcome").isActive()){Docs.App.getController("Welcome").loadIndex(g)}else{if(!this.noRepeatNav){this.noRepeatNav=true;var h=Ext.getCmp("doctabs").staticTabs[0];if(h){this.navigate(h.href,g)}}}}}}}}}}}}}},parseToken:function(d){var c=d&&d.match(/!?(\/(api|guide|example|video|comment|tests)(\/(.*))?)/);return c?{type:c[2],url:"#!"+c[1]}:{}},push:function(e,f){e=this.cleanUrl(e);if(!/^#!?/.test(e)){e="#!"+e}var d=Ext.util.History.getToken()||"";if("#"+d.replace(/^%21/,"!")!==e){Ext.util.History.add(e)}},cleanUrl:function(b){return b.replace(/^[^#]*#/,"#")}});Ext.define("Docs.Auth",{singleton:true,requires:["Ext.Ajax","Ext.util.Cookies"],init:function(c,d){Ext.Ajax.request({url:Docs.data.commentsUrl+"/session",params:{sid:this.getSid()},method:"GET",cors:true,callback:function(g,a,h){if(h&&h.responseText){var b=Ext.JSON.decode(h.responseText);if(b&&b.sessionID){this.setSid(b.sessionID)}if(b&&b.userName){this.currentUser=b}c.call(d,true)}else{c.call(d,false)}},scope:this})},login:function(b){Ext.Ajax.request({url:Docs.data.commentsUrl+"/login",method:"POST",cors:true,params:{username:b.username,password:b.password},callback:function(h,f,a){var g=Ext.JSON.decode(a.responseText);if(g.success){this.currentUser=g;this.setSid(g.sessionID,b.remember);b.success&&b.success.call(b.scope)}else{b.failure&&b.failure.call(b.scope,g.reason)}},scope:this})},logout:function(c,d){Ext.Ajax.request({url:Docs.data.commentsUrl+"/logout?sid="+this.getSid(),method:"POST",cors:true,callback:function(){this.currentUser=undefined;c&&c.call(d)},scope:this})},setSid:function(d,f){this.sid=d;if(d){var e=null;if(f){e=new Date();e.setTime(e.getTime()+(60*60*24*30*1000))}Ext.util.Cookies.set("sid",d,e)}else{Ext.util.Cookies.clear("sid")}},getSid:function(){if(!this.sid){this.sid=Ext.util.Cookies.get("sid")}return this.sid},getUser:function(){return this.currentUser},isLoggedIn:function(){return !!this.getUser()},isModerator:function(){return this.getUser()&&this.getUser().mod},getRegistrationUrl:function(){return Docs.data.commentsUrl+"/register"}});Ext.define("Docs.CommentCounts",{constructor:function(b){this.counts={};Ext.Array.each(b,function(a){this.counts[a._id]=a.value},this)},get:function(b){return this.counts[b.join("__")]||0},change:function(c,d){delete this.totals;return this.counts[c.join("__")]=this.get(c)+d},getClassTotal:function(b){if(!this.totals){this.totals={};Ext.Object.each(this.counts,function(a,f){var e=a.split("__");if(e[0]==="class"){this.totals[e[1]]=(this.totals[e[1]]||0)+f}},this)}return this.totals[b]}});Ext.define("Docs.CommentSubscriptions",{constructor:function(b){this.subscriptions={};Ext.Array.each(b,function(a){this.subscriptions[a.join("__")]=true},this)},has:function(b){return this.subscriptions[b.join("__")]},set:function(c,d){this.subscriptions[c.join("__")]=d}});Ext.define("Docs.LocalStore",{storeName:"",init:function(){this.localStorage=!!window.localStorage;this.store=Ext.create(this.storeName);if(this.localStorage){this.cleanup();this.store.load();if(window.addEventListener){window.addEventListener("storage",Ext.Function.bind(this.onStorageChange,this),false)}else{window.attachEvent("onstorage",Ext.Function.bind(this.onStorageChange,this))}}},onStorageChange:function(b){b=b||window.event;if(b.key===this.store.getProxy().id){this.store.load()}},syncStore:function(){this.localStorage&&this.store.sync()},cleanup:function(){var f=/-settings/;for(var d=0;d',"
",'',"
",""].join("")}];this.tpl=new Ext.XTemplate('');this.callParent(arguments)},load:function(b){this.update(this.tpl.apply(b))},clear:function(){this.update("")}});Ext.define("Docs.controller.Content",{extend:"Ext.app.Controller",MIDDLE:1,title:"",loadIndex:function(b){b||Docs.History.push(this.baseUrl);this.getViewport().setPageTitle(this.title);Ext.getCmp("doctabs").activateTab(this.baseUrl);Ext.getCmp("card-panel").layout.setActiveItem(this.getIndex());this.getIndex().restoreScrollState()},opensNewWindow:function(b){return b.button===this.MIDDLE||b.shiftKey||b.ctrlKey},getBaseUrl:function(){return document.location.href.replace(/\/?(index.html|template.html)?(\?[^#]*)?#.*/,"")}});Ext.define("Docs.ClassRegistry",{singleton:true,canonicalName:function(b){if(!this.altNames){this.altNames={};Ext.each(Docs.data.search,function(a){if(a.type==="class"&&!/:/.test(a.cls)){this.altNames[a.cls]=a.id}},this)}return this.altNames[b]||b},shortName:function(b){return b.split(/\./).pop()},packageName:function(b){return b.slice(0,-this.shortName(b).length-1)||""},search:function(S,H){var J=5;var T=4;var X=3;var K=new Array(J*T*X);for(var E=0;E5){K[P+U+O].push(i)}else{if(i.score>1){K[P+U+Z].push(i)}else{K[P+U+R].push(i)}}}}var M=/[.:]/.test(S);var G=Ext.escapeRe(S);var g=new RegExp("^"+G+"$","i");var Y=new RegExp("^"+G,"i");var N=new RegExp(G,"i");var V=Docs.data.search;for(var E=0,r=V.length;E$&");c.fullName=c.fullName.replace(d,"$&");return c}});Ext.define("Docs.GuideSearch",{singleton:true,isEnabled:function(){return !!Docs.data.guideSearch.url},deferredSearch:function(f,h,j,g){clearTimeout(this.timeout);var i=this.timeout=Ext.Function.defer(function(){this.search(f,function(a){if(i===this.timeout){h.call(j,a)}},this)},g,this)},search:function(f,g,e){var h=this.currentRequest=Ext.data.JsonP.request({url:Docs.data.guideSearch.url,params:{fragsize:32,max_fragments:1,q:f,product:Docs.data.guideSearch.product,version:Docs.data.guideSearch.version,start:0,limit:100},callback:function(a,b){if(a&&b.success&&this.currentRequest===h){g.call(e,Ext.Array.map(b.docs,this.adaptJson,this))}},scope:this})},adaptJson:function(b){return{icon:"icon-guide",name:this.format(b.title),fullName:this.format(b.body),url:b.url,meta:{},score:b.score}},format:function(c){var d=c.replace(/\s+/g," ");return d.replace(/(.*?)<\/em>/g,"$1")}});Ext.define("Docs.store.Search",{extend:"Ext.data.Store",fields:["name","fullName","icon","url","meta","sort"],proxy:{type:"memory",reader:{type:"json"}}});Ext.define("Docs.Syntax",{singleton:true,highlight:function(b){Ext.Array.forEach(Ext.query("pre",b.dom||b),function(a){a=Ext.get(a);if(a.child("code")){if(!(a.hasCls("inline-example")&&a.hasCls("preview"))){a.addCls("prettyprint")}}else{if(!a.parent(".CodeMirror")&&!a.hasCls("hierarchy")){a.addCls("notpretty")}}});prettyPrint()}});Ext.define("Docs.model.Setting",{fields:["id","key","value"],extend:"Ext.data.Model",requires:["Ext.data.proxy.LocalStorage"],proxy:{type:window.localStorage?"localstorage":"memory",id:Docs.data.localStorageDb+"-settings"}});Ext.define("Docs.view.TabMenu",{extend:"Ext.menu.Menu",plain:true,componentCls:"tab-menu",initComponent:function(){this.addEvents("tabItemClick","closeAllTabs");this.items=[{text:"Close other tabs",iconCls:"close",cls:"close-all",handler:function(){this.fireEvent("closeAllTabs")},scope:this}];this.callParent()},addTab:function(c,d){this.insert(this.items.length-1,{text:c.text,iconCls:c.iconCls,origIcon:c.iconCls,href:c.href,cls:d,handler:this.onTabItemClick,scope:this})},onTabItemClick:function(b){this.fireEvent("tabItemClick",b)},addTabCls:function(c,d){this.items.each(function(a){if(a.href===c.href){a.addCls(d)}})}});Ext.define("Docs.view.Scrolling",{onClassMixedIn:function(b){Ext.Function.interceptBefore(b.prototype,"initComponent",this.prototype.initScrolling)},initScrolling:function(){this.scrollContext="index";this.scrollState={};this.on("afterrender",function(){this.getScrollEl().addListener("scroll",this.saveScrollState,this)},this)},setScrollContext:function(b){this.scrollContext=b},eraseScrollContext:function(b){delete this.scrollState[b]},saveScrollState:function(){this.scrollState[this.scrollContext]=this.getScrollTop()},restoreScrollState:function(){this.setScrollTop(this.scrollState[this.scrollContext]||0)},scrollToView:function(d,c){d=Ext.get(d);c=c||{};if(d){this.setScrollTop(this.getScrollTop()+d.getY()+(c.offset||0));this.setScrollLeft(0);c.highlight&&d.highlight()}},getScrollTop:function(){return this.getScrollEl().getScroll()["top"]},setScrollTop:function(b){return this.getScrollEl().scrollTo("top",b)},setScrollLeft:function(b){return this.getScrollEl().scrollTo("left",b)},scrollToTop:function(){this.getScrollEl().scrollTo("top")},getScrollEl:function(){return this.body||this.el}});Ext.define("Docs.ContentGrabber",{singleton:true,get:function(f){var e;var d=Ext.get(f);if(d){e=d.dom.innerHTML;d.remove()}return e}});Ext.define("Docs.view.comments.HeaderMenu",{extend:"Ext.container.Container",alias:"widget.commentsHeaderMenu",componentCls:"comments-header-menu",html:["

",' Users',' Topics',' Tags',"

"].join(""),afterRender:function(){this.callParent(arguments);Ext.Array.forEach(["users","targets","tags"],function(d){var c=this.getEl().down("a."+d);c.on("click",function(b,a){this.getEl().select("a",true).removeCls("selected");c.addCls("selected");this.fireEvent("select",d)},this,{preventDefault:true})},this)}});Ext.define("Docs.view.examples.Device",{config:{url:"",id:undefined,device:"phone",orientation:"landscape"},constructor:function(b){this.initConfig(b);Ext.apply(this,this.getIframeSize());this.id=this.id||Ext.id();this.tpl=new Ext.XTemplate('
','',"
",{deviceUrl:function(a){return a.url+"?deviceType="+(a.device==="tablet"?"Tablet":"Phone")}})},toHtml:function(){return this.tpl.apply(this)},setDevice:function(b){this.device=b;Ext.apply(this,this.getIframeSize())},setOrientation:function(b){this.orientation=b;Ext.apply(this,this.getIframeSize())},getIframeSize:function(){var b={phone:{width:"481px",height:"320px"},miniphone:{width:"320px",height:"219px"},tablet:{width:"717px",height:"538px"}}[this.device];if(this.orientation==="landscape"){return b}else{return{width:b.height,height:b.width}}}});Ext.define("Docs.model.Test",{extend:"Ext.data.Model",fields:["id","name","href","code","options",{name:"status",defaultValue:"ready"},"message"]});Ext.define("Docs.view.examples.InlineToolbar",{extend:"Ext.toolbar.Toolbar",componentCls:"inline-example-tb",height:30,initComponent:function(){this.addEvents("buttonclick");this.items=[{iconCls:"code",padding:"0 2 0 0",margin:"0 3 0 0",text:"Code Editor",handler:this.createEventFirerer("code")},{padding:0,margin:"0 3 0 0",iconCls:"preview",text:"Live Preview",handler:this.createEventFirerer("preview")},"->",{padding:0,margin:0,iconCls:"copy",text:"Select Code",handler:this.createEventFirerer("copy")}];this.callParent(arguments)},createEventFirerer:function(b){return Ext.Function.bind(function(){this.fireEvent("buttonclick",b)},this)},activateButton:function(b){Ext.Array.each(this.query("button"),function(a){a.removeCls("active")});Ext.Array.each(this.query("button[iconCls="+b+"]"),function(a){a.addCls("active")})}});Ext.define("Docs.view.Signature",{singleton:true,render:function(f,d){d=d||"short";var e=Ext.Array.map(Docs.data.signatures,function(a){return f[a.tagname]?''+(a[d])+"":""}).join(" ");return''+e+""}});Ext.define("Docs.view.DocTree",{extend:"Ext.tree.Panel",alias:"widget.doctree",cls:"doc-tree iScroll",useArrows:true,rootVisible:false,border:false,bodyBorder:false,initComponent:function(){this.addEvents("urlclick");this.root.expanded=true;this.on("itemclick",this.onItemClick,this);this.on("beforeitemcollapse",this.handleBeforeExpandCollapse,this);this.on("beforeitemexpand",this.handleBeforeExpandCollapse,this);this.callParent();this.nodeTpl=new Ext.XTemplate('{text}');this.initNodeLinks()},initNodeLinks:function(){this.getRootNode().cascadeBy(this.applyNodeTpl,this)},applyNodeTpl:function(b){if(b.get("leaf")){b.set("text",this.nodeTpl.apply({text:b.get("text"),url:b.raw.url}));b.commit()}},onItemClick:function(h,j,k,l,i){var e=j.raw?j.raw.url:j.data.url;if(e){this.fireEvent("urlclick",e,i)}else{if(!j.isLeaf()){if(j.isExpanded()){j.collapse(false)}else{j.expand(false)}}}},selectUrl:function(d){var c=this.findNodeByUrl(d);if(c){c.bubble(function(a){a.expand()});this.getSelectionModel().select(c)}else{this.getSelectionModel().deselectAll()}},findNodeByUrl:function(b){return this.getRootNode().findChildBy(function(a){return b===a.raw.url},this,true)},findRecordByUrl:function(d){var c=this.findNodeByUrl(d);return c?c.raw:undefined},handleBeforeExpandCollapse:function(b){if(this.getView().isAnimating(b)){return false}}});Ext.define("Docs.Tip",{singleton:true,show:function(g,e,f){f=f||"right";this.tips=this.tips||{};if(this.tips[f]){var h=this.tips[f];h.update(g);h.setTarget(e);h.show()}else{var h=this.tips[f]=Ext.create("Ext.tip.ToolTip",{anchor:f,target:e,html:g});h.show()}}});Ext.define("Docs.view.comments.Pager",{extend:"Ext.Component",alias:"widget.commentsPager",componentCls:"recent-comments-pager",afterRender:function(){this.callParent(arguments);this.getEl().on("click",function(){this.fireEvent("loadMore",this.offset+this.limit)},this,{preventDefault:true,delegate:"a.fetchMoreComments"})},configure:function(b){Ext.apply(this,b);this.update(this.getPagerHtml())},reset:function(){this.update("No comments found.")},getPagerHtml:function(){var d=this.total_rows||0;var e=this.offset+this.limit;var f=Math.min(this.limit,d-e);if(d>e){return["",'',"Showing comments 1-"+e+" of "+d+". ","Click to load "+f+" more...",""].join("")}else{return"That's all. Total "+d+" comments."}}});Ext.define("Docs.view.SimpleSelectBehavior",{mixins:{observable:"Ext.util.Observable"},constructor:function(c,d){this.mixins.observable.constructor.call(this,{listeners:d});c.on({select:this.onSelect,deselect:this.onDeselect,scope:this})},onSelect:function(c,d){this.selectedItem=d;this.fireEvent("select",d)},onDeselect:function(c,d){this.selectedItem=undefined;Ext.Function.defer(function(){if(!this.selectedItem){this.fireEvent("deselect",d)}},10,this)}});Ext.define("Docs.view.comments.FilterField",{extend:"Ext.form.field.Trigger",alias:"widget.commentsFilterField",triggerCls:"reset",componentCls:"comments-filter-field",hideTrigger:true,enableKeyEvents:true,initComponent:function(){this.callParent(arguments);this.on({keyup:this.onKeyUp,specialkey:this.onSpecialKey,scope:this})},onKeyUp:function(){this.fireEvent("filter",this.getValue());this.setHideTrigger(this.getValue().length===0)},onSpecialKey:function(c,d){if(d.keyCode===Ext.EventObject.ESC){this.reset();this.fireEvent("filter","")}},onTriggerClick:function(){this.reset();this.focus();this.fireEvent("filter","");this.setHideTrigger(true)}});Ext.define("Docs.view.comments.TopList",{extend:"Ext.panel.Panel",componentCls:"comments-toplist",requires:["Docs.view.SimpleSelectBehavior","Docs.view.comments.FilterField"],layout:"border",displayField:"text",scoreField:"score",filterEmptyText:"Filter by name...",initComponent:function(){this.items=[this.tabpanel=Ext.widget("tabpanel",{plain:true,region:"north",height:50,items:[{title:"By comment count"}],dockedItems:[{dock:"bottom",items:[{xtype:"commentsFilterField",emptyText:this.filterEmptyText,width:320,height:20,listeners:{filter:this.onFilter,scope:this}}]}]}),this.list=Ext.widget("dataview",{region:"center",cls:"iScroll top-list",autoScroll:true,store:new Ext.data.Store({model:this.model}),allowDeselect:true,tpl:["
    ",'',"
  • ",'{'+this.scoreField+"}",'{'+this.displayField+"}","
  • ","
    ","
"],itemSelector:"li"})];new Docs.view.SimpleSelectBehavior(this.list,{select:this.onSelect,deselect:this.onDeselect,scope:this});this.callParent(arguments)},afterRender:function(){this.callParent(arguments);this.list.getStore().load()},onFilter:function(b){this.list.getSelectionModel().deselectAll();this.list.getStore().clearFilter(true);this.list.getStore().filter({property:this.displayField,value:b,anyMatch:true})},deselectAll:function(){this.list.getSelectionModel().deselectAll()},onSelect:function(b){this.fireEvent("select",b)},onDeselect:function(){this.fireEvent("select",undefined)}});Ext.define("Docs.view.cls.MemberWrap",{constructor:function(b){Ext.apply(this,b);this.el=Ext.get(b.el)},setExpanded:function(b){if(b){if(!this.isExpanded()){this.el.addCls("open")}}else{this.el.removeCls("open")}},isExpanded:function(){return this.el.hasCls("open")},getDefinedIn:function(){return this.el.down(".meta .defined-in").getAttribute("rel")},getMemberId:function(){return this.el.getAttribute("id")}});Ext.define("Docs.view.examples.InlineEditor",{extend:"Ext.Panel",bodyPadding:2,autoScroll:true,componentCls:"inline-example-editor",initComponent:function(){this.addEvents("init","change");this.on("afterlayout",this.initCodeMirror,this);this.callParent(arguments)},initCodeMirror:function(b){if(!this.codemirror){this.codemirror=CodeMirror(this.body,{mode:"javascript",indentUnit:4,value:this.value,extraKeys:{Tab:"indentMore","Shift-Tab":"indentLess"},onChange:Ext.Function.bind(function(a){this.fireEvent("change")},this)});this.fireEvent("init")}},refresh:function(){this.codemirror.refresh()},getValue:function(){return this.codemirror?this.codemirror.getValue():this.value},getHeight:function(){var b=this.el.down(".CodeMirror-lines");return b?b.getHeight():undefined},selectAll:function(){var d=this.codemirror.lineCount()-1;var c=this.codemirror.getLine(d).length;this.codemirror.setSelection({line:0,ch:0},{line:d,ch:c})}});Ext.define("Docs.view.examples.InlinePreview",{extend:"Ext.Panel",requires:["Docs.view.examples.Device"],bodyPadding:"0 10",statics:{iframeCounter:0,getNextIframeId:function(){this.iframeCounter++;return this.iframeCounter.toString()}},options:{},constructor:function(b){b=b||{};b.iframeId=this.self.getNextIframeId();b.id="inline-preview-"+b.iframeId;this.callParent([b]);this.addEvents(["previewsuccess","previewfailure"])},initComponent:function(){this.html=this.getHtml();this.callParent(arguments)},getHtml:function(){if(Docs.data.touchExamplesUi){return Ext.create("Docs.view.examples.Device",{url:"eg-iframe.html",id:this.iframeId,device:this.options.device,orientation:this.options.orientation}).toHtml()}else{var b=new Ext.XTemplate('');return b.apply({id:this.iframeId})}},update:function(h){var f=this.options;var e=Ext.get(this.iframeId);var g=Ext.Function.bind(this.iframeCallback,this);if(e){e.on("load",function(){Ext.Function.defer(function(){e.dom.contentWindow.loadInlineExample(h+"\n",f,g)},100)},this,{single:true});e.dom.src="eg-iframe.html"}},iframeCallback:function(c,d){if(c){this.fireEvent("previewsuccess",this)}else{this.fireEvent("previewfailure",this,d)}},getHeight:function(){return document.getElementById(this.iframeId).parentNode.clientHeight}});Ext.define("Docs.view.cls.Logic",{showPrivateClasses:false,constructor:function(b){Ext.apply(this,b)}});Ext.define("Docs.view.comments.Form",{extend:"Ext.Component",alias:"widget.commentsForm",requires:["Docs.Tip"],tpl:['
newComment">','',"

{title}

","
","",'
',"{[Docs.Comments.avatar(values.user.emailHash)]}",'
Logged in as {user.userName}
','',' />',' | ',"","",'Show help ↓','','',' or cancel',"","
",'","
"],initComponent:function(){this.data={title:this.title,updateComment:(this.content!==undefined),content:this.content,userSubscribed:this.userSubscribed,user:this.user};this.callParent(arguments)},setValue:function(b){this.codeMirror.setValue(b)},afterRender:function(){this.callParent(arguments);this.makeCodeMirror(this.getEl().down("textarea").dom);this.bindEvents()},makeCodeMirror:function(d){var c=true;this.codeMirror=CodeMirror.fromTextArea(d,{mode:"markdown",lineWrapping:true,indentUnit:4,extraKeys:{Tab:"indentMore","Shift-Tab":"indentLess"},onFocus:Ext.Function.bind(function(){if(c&&this.codeMirror.getValue()===""){this.toggleGuide(true)}c=false},this)})},bindEvents:function(){this.getEl().on("click",function(){this.toggleGuide()},this,{preventDefault:true,delegate:"a.toggleCommentGuide"});this.getEl().on("click",function(){this.fireEvent("cancel")},this,{preventDefault:true,delegate:"a.cancelUpdateComment"});this.getEl().on("click",function(){this.fireEvent("submit",this.codeMirror.getValue())},this,{preventDefault:true,delegate:"input.submitComment"});this.getEl().on("click",function(c,d){this.fireEvent("subscriptionChange",Ext.get(d).dom.checked)},this,{delegate:"input.subscriptionCheckbox"})},toggleGuide:function(f){var d=this.getEl().down(".commentGuideTxt");d.setVisibilityMode(Ext.dom.Element.DISPLAY);var e=this.getEl().down(".toggleCommentGuide");if(!d.isVisible()||f===true){d.show(true);e.update("Hide help ↑")}else{d.hide(true);e.update("Show help ↓")}},showSubscriptionMessage:function(d){var e=this.getEl().down("input.subscriptionCheckbox");var f=d?"Updates to this thread will be e-mailed to you":"You have unsubscribed from this thread";Docs.Tip.show(f,e,"bottom")}});Ext.define("Docs.view.comments.DragZone",{extend:"Ext.dd.DragZone",constructor:function(d,c){this.view=d;this.callParent([d.getEl(),c])},getDragData:function(f){var d=f.getTarget("img.drag-handle",10);if(d){var e=Ext.fly(d).up(this.view.itemSelector).dom;return{sourceEl:e,repairXY:Ext.fly(e).getXY(),ddel:this.cloneCommentEl(e),comment:this.view.getRecord(e)}}return false},cloneCommentEl:function(e){var f=e.cloneNode(true);var d=Ext.fly(f).down(".comments-list-with-form");d&&d.remove();f.id=Ext.id();return f},getRepairXY:function(){return this.dragData.repairXY}});Ext.define("Docs.view.comments.DropZone",{extend:"Ext.dd.DropZone",constructor:function(d,c){this.view=d;this.callParent([d.getEl(),c])},getTargetFromEvent:function(b){return b.getTarget(this.view.itemSelector,10)},onNodeEnter:function(g,f,h,e){if(this.isValidDropTarget(g,e)){Ext.fly(g).addCls("drop-target-hover")}},onNodeOut:function(g,f,h,e){Ext.fly(g).removeCls("drop-target-hover")},onNodeOver:function(g,f,h,e){if(this.isValidDropTarget(g,e)){return this.dropAllowed}else{return false}},isValidDropTarget:function(d,e){var f=this.view.getRecord(d);return f&&f.get("id")!==e.comment.get("id")},onNodeDrop:function(g,f,h,e){if(this.isValidDropTarget(g,e)){this.onValidDrop(e.comment,this.view.getRecord(g));return true}return false},onValidDrop:Ext.emptyFn});Ext.define("Docs.view.comments.TopLevelDropZone",{extend:"Ext.dd.DropZone",getTargetFromEvent:function(b){return b.getTarget("a.side.toggleComments",10)},onNodeEnter:function(g,f,h,e){if(this.isValidDropTarget(e)){Ext.fly(g).addCls("drop-target-hover")}},onNodeOut:function(g,f,h,e){Ext.fly(g).removeCls("drop-target-hover")},onNodeOver:function(g,f,h,e){if(this.isValidDropTarget(e)){return this.dropAllowed}else{return false}},isValidDropTarget:function(b){return !!b.comment.get("parentId")},onNodeDrop:function(g,f,h,e){if(this.isValidDropTarget(e)){this.onValidDrop(e.comment,undefined);return true}return false},onValidDrop:Ext.emptyFn});Ext.define("Docs.Comments",{extend:"Ext.util.Observable",singleton:true,requires:["Docs.Auth","Docs.CommentCounts","Docs.CommentSubscriptions","Ext.data.JsonP","Ext.Ajax"],init:function(c,d){if(!(Docs.data.commentsUrl&&Docs.data.commentsDomain&&this.isBrowserSupported())){c.call(d);return}Docs.Auth.init(function(a){if(a){this.enabled=true;this.fetchCountsAndSubscriptions(function(f,b){this.counts=new Docs.CommentCounts(f);this.subscriptions=new Docs.CommentSubscriptions(b);c.call(d)},this)}else{c.call(d)}},this)},isBrowserSupported:function(){return("withCredentials" in new XMLHttpRequest())||(Ext.ieVersion>=8)},fetchCountsAndSubscriptions:function(c,d){this.request("jsonp",{url:"/comments_meta",method:"GET",success:function(a){c.call(d,a.comments,a.subscriptions)},scope:this})},loadSubscriptions:function(c,d){this.fetchSubscriptions(function(a){this.subscriptions=new Docs.CommentSubscriptions(a);c.call(d)},this)},clearSubscriptions:function(){this.subscriptions=new Docs.CommentSubscriptions([])},fetchSubscriptions:function(c,d){this.request("jsonp",{url:"/subscriptions",method:"GET",success:function(a){c.call(d,a.subscriptions)},scope:this})},isEnabled:function(){return this.enabled},getCount:function(b){return this.enabled?this.counts.get(b):0},changeCount:function(f,e){var d=this.counts.change(f,e);this.fireEvent("countChange",f,d)},hasSubscription:function(b){return this.subscriptions.has(b)},getClassTotalCount:function(b){return this.counts.getClassTotal(b)},load:function(d,f,e){this.request("jsonp",{url:"/comments",method:"GET",params:{startkey:Ext.JSON.encode(d)},success:f,scope:e})},loadReplies:function(f,d,e){this.request("jsonp",{url:"/replies",method:"GET",params:{parentId:f},success:d,scope:e})},post:function(b){this.request("ajax",{url:"/comments",method:"POST",params:{target:Ext.JSON.encode(b.target),parentId:b.parentId,comment:b.content,url:this.buildPostUrl(b.target)},callback:function(h,f,a){var g=Ext.JSON.decode(a.responseText);if(f&&g.success){this.changeCount(b.target,+1);b.callback&&b.callback.call(b.scope,g.comment)}},scope:this})},buildPostUrl:function(i){var f=i[0];var g=i[1];var h=i[2];if(f=="video"){var j="#!/video/"+g}else{if(f=="guide"){var j="#!/guide/"+g}else{var j="#!/api/"+g+(h?"-"+h:"")}}return"http://"+window.location.host+window.location.pathname+j},subscribe:function(h,e,g,f){this.request("ajax",{url:"/subscribe",method:"POST",params:{target:Ext.JSON.encode(h),subscribed:e},callback:function(c,a,d){var b=Ext.JSON.decode(d.responseText);if(a&&b.success){this.subscriptions.set(h,e);g&&g.call(f)}},scope:this})},request:function(c,d){d.url=this.buildRequestUrl(d.url);if(c==="jsonp"){Ext.data.JsonP.request(d)}else{d.cors=true;Ext.Ajax.request(d)}},buildRequestUrl:function(b){b=Docs.data.commentsUrl+"/"+Docs.data.commentsDomain+b;return b+(b.match(/\?/)?"&":"?")+"sid="+Docs.Auth.getSid()},avatar:function(c,d){return''},counterHtml:function(b){return b>0?''+b+"":""}});Ext.define("Docs.controller.Auth",{extend:"Ext.app.Controller",requires:["Docs.Auth","Docs.Comments"],refs:[{ref:"authHeaderForm",selector:"authHeaderForm"}],init:function(){this.control({"authHeaderForm, authForm":{login:this.login,logout:this.logout}});var b=this.getController("Tabs");b.onLaunch=Ext.Function.createSequence(b.onLaunch,this.afterTabsLaunch,this)},afterTabsLaunch:function(){if(Docs.Comments.isEnabled()){if(Docs.Auth.isLoggedIn()){this.setLoggedIn()}else{this.setLoggedOut()}}},login:function(e,g,f,h){Docs.Auth.login({username:g,password:f,remember:h,success:this.setLoggedIn,failure:function(a){e.showMessage(a)},scope:this})},logout:function(b){Docs.Auth.logout(this.setLoggedOut,this)},setLoggedIn:function(){Docs.Comments.loadSubscriptions(function(){this.getAuthHeaderForm().showLoggedIn(Docs.Auth.getUser());this.eachCmp("commentsListWithForm",function(b){b.showCommentingForm()});this.eachCmp("commentsList",function(b){b.refresh()});this.getController("Tabs").showCommentsTab()},this)},setLoggedOut:function(){Docs.Comments.clearSubscriptions();this.getAuthHeaderForm().showLoggedOut();this.eachCmp("commentsListWithForm",function(b){b.showAuthForm()});this.eachCmp("commentsList",function(b){b.refresh()});this.getController("Tabs").hideCommentsTab()},eachCmp:function(e,f,d){Ext.Array.forEach(Ext.ComponentQuery.query(e),f,d)}});Ext.define("Docs.controller.Welcome",{extend:"Docs.controller.Content",baseUrl:"#",refs:[{ref:"viewport",selector:"#viewport"},{ref:"index",selector:"#welcomeindex"}],init:function(){this.addEvents("loadIndex")},loadIndex:function(){this.fireEvent("loadIndex");Ext.getCmp("treecontainer").hide();this.callParent([true])},isActive:function(){return !!this.getIndex().getTab()}});Ext.define("Docs.controller.Failure",{extend:"Docs.controller.Content",baseUrl:"#",refs:[{ref:"viewport",selector:"#viewport"},{ref:"index",selector:"#failure"}],show404:function(c){var d=new Ext.XTemplate("

Oops...

","

{msg}

","

Maybe it was renamed to something else?
Or maybe your internet connection has failed?
","This would be sad. Hopefully it's just a bug on our side.

","

Most likely you just followed a broken link inside this very documentation. ","Go and report it to the authors of the docs.

","

But if you think it's a bug in JSDuck documentation-generator itself, feel free to open ","an issue at the JSDuck issue tracker.

","

Sorry for all this :(

");Ext.getCmp("failure").update(d.apply({msg:c}));Ext.getCmp("card-panel").layout.setActiveItem("failure")}});Ext.define("Docs.controller.Search",{extend:"Ext.app.Controller",requires:["Docs.ClassRegistry","Docs.GuideSearch","Docs.store.Search","Docs.History"],stores:["Search"],refs:[{ref:"field",selector:"#search-field"}],pageIndex:0,pageSize:10,basicSearchDelay:50,guideSearchDelay:500,dropdownHideDelay:500,init:function(){this.control({"#search-dropdown":{itemclick:function(c,d){this.loadRecord(d)},changePage:function(c,d){this.pageIndex+=d;this.displayResults();this.keepDropdown()},footerClick:function(b){this.keepDropdown()}},"#search-field":{keyup:function(m,l){var j=this.getDropdown();m.setHideTrigger(m.getValue().length===0);if(l.keyCode===Ext.EventObject.ESC||!m.value){j.hide();m.setValue("");return}else{j.show()}var h=j.getSelectionModel();var i=h.getLastSelected();var n=j.store.indexOf(i);var k=j.store.getCount()-1;if(l.keyCode===Ext.EventObject.UP){if(n===undefined){h.select(0)}else{h.select(n===0?k:(n-1))}}else{if(l.keyCode===Ext.EventObject.DOWN){if(n===undefined){h.select(0)}else{h.select(n===k?0:n+1)}}else{if(l.keyCode===Ext.EventObject.ENTER){l.preventDefault();i&&this.loadRecord(i)}else{this.pageIndex=0;clearTimeout(this.searchTimeout);this.searchTimeout=Ext.Function.defer(function(){this.search(m.value)},this.basicSearchDelay,this)}}}},focus:function(b){if(b.value&&this.getDropdown().store.getCount()>0){this.getDropdown().show()}},blur:function(){var b=this.getDropdown();this.hideTimeout=Ext.Function.defer(b.hide,this.dropdownHideDelay,b)}}})},getDropdown:function(){return this.dropdown||(this.dropdown=Ext.getCmp("search-dropdown"))},keepDropdown:function(){clearTimeout(this.hideTimeout);this.getField().focus()},loadRecord:function(b){Docs.History.navigate(b.get("url"));this.getDropdown().hide()},search:function(b){if(b===this.previousTerm){return}this.previousTerm=b;this.basicSearch(b);if(Docs.GuideSearch.isEnabled()){this.guideSearch(b)}},guideSearch:function(b){Docs.GuideSearch.deferredSearch(b,function(a){this.basicSearch(b,a)},this,this.guideSearchDelay)},basicSearch:function(c,d){this.displayResults(Docs.ClassRegistry.search(c,d))},displayResults:function(d){d=d||this.previousResults;if(this.pageIndex<0){this.pageIndex=0}else{if(this.pageIndex>Math.floor(d.length/this.pageSize)){this.pageIndex=Math.floor(d.length/this.pageSize)}}var f=this.pageIndex*this.pageSize;var e=f+this.pageSize;this.getDropdown().setTotal(d.length);this.getDropdown().setStart(f);this.getDropdown().getStore().loadData(d.slice(f,e));this.getDropdown().alignTo("search-field","bl",[-12,-2]);if(d.length>0){this.getDropdown().getSelectionModel().select(0)}this.previousResults=d}});Ext.define("Docs.controller.Classes",{extend:"Docs.controller.Content",baseUrl:"#!/api",title:"API Documentation",requires:["Docs.History","Docs.Syntax","Docs.ClassRegistry"],refs:[{ref:"viewport",selector:"#viewport"},{ref:"index",selector:"#classindex"},{ref:"header",selector:"classheader"},{ref:"overview",selector:"classoverview"},{ref:"tabPanel",selector:"classtabpanel"},{ref:"tree",selector:"#classtree"},{ref:"favoritesGrid",selector:"#favorites-grid"}],cache:{},init:function(){this.addEvents("showIndex","showClass","showMember");Ext.getBody().addListener("click",function(c,d){this.handleUrlClick(decodeURI(d.href),c)},this,{preventDefault:true,delegate:".docClass"});this.control({classtree:{urlclick:function(d,c){this.handleUrlClick(d,c,this.getTree())}},toolbar:{toggleExpanded:function(b){this.getOverview().setAllMembersExpanded(b)}},classoverview:{afterrender:function(b){b.el.addListener("click",function(i,k){var h=Ext.get(k).up(".member"),l=h.down(".meta .defined-in"),j=l.getAttribute("rel"),a=h.getAttribute("id");if(this.getOverview().isMemberExpanded(a)){this.setExpanded(a,false)}else{this.setExpanded(a,true);this.fireEvent("showMember",j,a)}},this,{preventDefault:true,delegate:".expandable"});b.el.addListener("click",Ext.emptyFn,this,{preventDefault:true,delegate:".not-expandable"})}},treecontainer:{afterrender:function(b){b.el.addListener("dblclick",function(){if(b.getWidth()<30){b.setWidth(b.expandedWidth)}else{b.expandedWidth=b.getWidth();b.setWidth(20)}},this,{delegate:".x-resizable-handle"})}},doctabs:{tabClose:function(b){this.getOverview().eraseScrollContext(b)}}})},setExpanded:function(f,d){var e=this.currentCls;if(!e.expanded){e.expanded={}}this.getOverview().setMemberExpanded(f,d);if(d){e.expanded[f]=d}else{delete e.expanded[f]}},applyExpanded:function(b){Ext.Object.each(b.expanded||{},function(a){Ext.get(a).addCls("open")},this)},handleUrlClick:function(d,f,e){d=Docs.History.cleanUrl(d);if(this.opensNewWindow(f)){window.open(d);e&&e.selectUrl(this.currentCls?"#!/api/"+this.currentCls.name:"")}else{this.loadClass(d)}},loadIndex:function(b){Ext.getCmp("treecontainer").showTree("classtree");this.callParent(arguments);this.fireEvent("showIndex")},loadClass:function(f,i){Ext.getCmp("card-panel").layout.setActiveItem("classcontainer");Ext.getCmp("treecontainer").showTree("classtree");i||Docs.History.push(f);var j=f.match(/^#!\/api\/(.*?)(?:-(.*))?$/);var g=Docs.ClassRegistry.canonicalName(j[1]);var h=j[2];if(this.getOverview()){this.getOverview().setLoading(true)}if(this.cache[g]){this.showClass(this.cache[g],h)}else{this.cache[g]="in-progress";Ext.data.JsonP.request({url:this.getBaseUrl()+"/output/"+g+".js",callbackName:g.replace(/\./g,"_"),success:function(b,a){this.cache[g]=b;this.showClass(b,h)},failure:function(b,a){this.cache[g]=false;this.getOverview().setLoading(false);this.getController("Failure").show404("Class "+Ext.String.htmlEncode(g)+" was not found.")},scope:this})}},showClass:function(e,f){var d=false;if(e==="in-progress"){return}this.getOverview().setLoading(false);this.getViewport().setPageTitle(e.name);if(this.currentCls!==e){this.currentCls=e;this.getHeader().load(e);this.getOverview().load(e);this.applyExpanded(e);d=true}this.currentCls=e;this.getOverview().setScrollContext("#!/api/"+e.name);if(f){this.getOverview().scrollToEl("#"+f);this.fireEvent("showMember",e.name,f)}else{this.getOverview().restoreScrollState()}this.getTree().selectUrl("#!/api/"+e.name);this.fireEvent("showClass",e.name,{reRendered:d})}});Ext.define("Docs.controller.Examples",{extend:"Docs.controller.Content",baseUrl:"#!/example",title:"Examples",refs:[{ref:"viewport",selector:"#viewport"},{ref:"index",selector:"#exampleindex"},{ref:"tree",selector:"#exampletree"},{ref:"page",selector:"#example"}],init:function(){this.addEvents("showExample");this.control({"#exampletree":{urlclick:function(d,c){this.loadExample(d)}},"exampleindex > thumblist":{urlclick:function(b){this.loadExample(b)}},"touchexamplecontainer, examplecontainer":{afterrender:function(b){b.el.addListener("click",function(d,a){this.openInNewWindow()},this,{delegate:"button.new-window"})}},touchexamplecontainer:{afterrender:function(b){b.el.addListener("click",function(d,a){this.changeDevice("tablet")},this,{delegate:"button.tablet"});b.el.addListener("click",function(d,a){this.changeDevice("phone")},this,{delegate:"button.phone"});b.el.addListener("click",function(d,a){this.changeOrientation("portrait")},this,{delegate:"button.portrait"});b.el.addListener("click",function(d,a){this.changeOrientation("landscape")},this,{delegate:"button.landscape"})}}})},loadIndex:function(){Ext.getCmp("treecontainer").showTree("exampletree");this.callParent()},loadExample:function(d,f){var e=this.getExample(d);if(!e){this.getController("Failure").show404("Example "+Ext.String.htmlEncode(d)+" was not found.");return}this.getViewport().setPageTitle(e.text);if(this.activeUrl!==d){this.getPage().clear();this.activateExampleCard();this.getPage().load(e)}else{this.activateExampleCard()}f||Docs.History.push(d);this.fireEvent("showExample",d);this.getTree().selectUrl(d);this.activeUrl=d},activateExampleCard:function(){Ext.getCmp("card-panel").layout.setActiveItem("example");Ext.getCmp("treecontainer").showTree("exampletree")},getExample:function(b){if(!this.map){this.map={};Ext.Array.forEach(Docs.data.examples,function(a){Ext.Array.forEach(a.items,function(d){this.map["#!/example/"+d.name]=d},this)},this)}return this.map[b]},changeOrientation:function(b){this.getPage().setOrientation(b)},changeDevice:function(b){this.getPage().setDevice(b)},openInNewWindow:function(){window.open(this.getExample(this.activeUrl).url)}});Ext.define("Docs.controller.Videos",{extend:"Docs.controller.Content",baseUrl:"#!/video",title:"Videos",refs:[{ref:"viewport",selector:"#viewport"},{ref:"index",selector:"#videoindex"},{ref:"tree",selector:"#videotree"}],init:function(){this.addEvents("showVideo");this.control({"#videotree":{urlclick:function(b){this.loadVideo(b)}},"videoindex > thumblist":{urlclick:function(b){this.loadVideo(b)}}})},loadIndex:function(){Ext.getCmp("treecontainer").showTree("videotree");this.callParent()},loadVideo:function(j,h){var f=false;Ext.getCmp("card-panel").layout.setActiveItem("video");Ext.getCmp("treecontainer").showTree("videotree");var g=j.match(/^#!\/video\/(.*)$/)[1];var i=this.getVideo(g);if(!i){this.getController("Failure").show404("Video "+Ext.String.htmlEncode(g)+" was not found.");return}this.getViewport().setPageTitle(i.title);if(this.activeUrl!==j){Ext.getCmp("video").load(i);f=true}h||Docs.History.push(j);this.fireEvent("showVideo",g,{reRendered:f});this.getTree().selectUrl(j);this.activeUrl=j},getVideo:function(b){if(!this.map){this.map={};Ext.Array.forEach(Docs.data.videos,function(a){Ext.Array.forEach(a.items,function(d){this.map[d.name]=d},this)},this)}return this.map[b]}});Ext.define("Docs.controller.Guides",{extend:"Docs.controller.Content",baseUrl:"#!/guide",title:"Guides",refs:[{ref:"viewport",selector:"#viewport"},{ref:"index",selector:"#guideindex"},{ref:"tree",selector:"#guidetree"},{ref:"guide",selector:"#guide"}],cache:{},init:function(){this.addEvents("showGuide");this.control({"#guidetree":{urlclick:function(d,c){this.handleUrlClick(d,c,this.getTree())}},"guideindex > thumblist":{urlclick:function(b){this.loadGuide(b)}},indexcontainer:{afterrender:function(b){b.el.addListener("click",function(d,a){this.handleUrlClick(a.href,d)},this,{preventDefault:true,delegate:".guide"})}},doctabs:{tabClose:function(b){this.getGuide().eraseScrollContext(b)}}})},handleUrlClick:function(d,f,e){d=d.replace(/.*#!?/,"#!");if(this.opensNewWindow(f)){window.open(d);e&&e.selectUrl(this.activeUrl?this.activeUrl:"")}else{this.loadGuide(d)}},loadIndex:function(){Ext.getCmp("treecontainer").showTree("guidetree");this.callParent()},loadGuide:function(j,h){Ext.getCmp("card-panel").layout.setActiveItem("guide");Ext.getCmp("treecontainer").showTree("guidetree");var g=j.match(/^#!\/guide\/(.*?)(-section-.*)?$/);var f=g[1];var i=g[2];j="#!/guide/"+f;h||Docs.History.push(j);if(this.cache[f]){this.showGuide(this.cache[f],j,f,i)}else{this.cache[f]="in-progress";Ext.data.JsonP.request({url:this.getBaseUrl()+"/guides/"+f+"/README.js",callbackName:f,success:function(a){this.cache[f]=a;this.showGuide(a,j,f,i)},failure:function(b,a){this.cache[f]=false;this.getController("Failure").show404("Guide "+Ext.String.htmlEncode(f)+" was not found.")},scope:this})}},showGuide:function(i,j,f,h){var g=false;if(i==="in-progress"){return}this.getViewport().setPageTitle(i.title);if(this.activeUrl!==j){Ext.getCmp("guide").load({name:f,content:i.guide});g=true}this.activeUrl=j;this.getGuide().setScrollContext(this.activeUrl);if(h){this.getGuide().scrollToEl(f+h)}else{this.getGuide().restoreScrollState()}this.fireEvent("showGuide",f,{reRendered:g});this.getTree().selectUrl(j)}});Ext.define("Docs.controller.CommentCounts",{extend:"Ext.app.Controller",requires:["Docs.Comments"],refs:[{ref:"class",selector:"classoverview"},{ref:"classIndex",selector:"#classindex"},{ref:"guide",selector:"#guide"},{ref:"guideIndex",selector:"#guideindex"},{ref:"video",selector:"#video"},{ref:"videoIndex",selector:"#videoindex"}],init:function(){Docs.Comments.on("countChange",this.updateCounts,this)},updateCounts:function(c,d){this.getClass().updateCommentCounts();this.getClassIndex().updateCommentCounts();this.getGuide().updateCommentCounts();this.getGuideIndex().updateCommentCounts();this.getVideo().updateCommentCounts();this.getVideoIndex().updateCommentCounts()}});Ext.define("Docs.controller.Tests",{extend:"Docs.controller.Content",baseUrl:"#!/tests",refs:[{ref:"viewport",selector:"#viewport"},{ref:"index",selector:"#testsindex"}],init:function(){this.addEvents("loadIndex");this.control({"#testsgrid":{afterrender:this.loadExamples}})},loadIndex:function(){this.fireEvent("loadIndex");Ext.getCmp("treecontainer").hide();this.callParent([true])},isActive:function(){return !!this.getIndex().getTab()},loadExamples:function(){this.getIndex().disable();Ext.data.JsonP.request({url:this.getBaseUrl()+"/inline-examples.js",callbackName:"__inline_examples__",success:function(b){this.getIndex().addExamples(b);this.getIndex().enable()},scope:this})}});Ext.define("Docs.store.Settings",{extend:"Ext.data.Store",requires:["Docs.model.Setting"],model:"Docs.model.Setting"});Ext.define("Docs.Settings",{extend:"Docs.LocalStore",singleton:true,requires:"Docs.store.Settings",storeName:"Docs.store.Settings",defaults:{show:{"public":true,"protected":false,"private":false,deprecated:false,removed:false,inherited:true,accessor:true},comments:{hideRead:false},showPrivateClasses:false,classTreeLogic:"PackageLogic"},set:function(d,f){var e=this.store.findExact("key",d);if(e>-1){this.store.removeAt(e)}this.store.add({key:d,value:f});this.syncStore()},get:function(c){var d=this.store.findExact("key",c);return d>-1?this.store.getAt(d).get("value"):this.defaults[c]}});Ext.define("Docs.controller.Tabs",{extend:"Ext.app.Controller",requires:["Docs.History","Docs.Settings"],refs:[{ref:"welcomeIndex",selector:"#welcomeindex"},{ref:"classIndex",selector:"#classindex"},{ref:"guideIndex",selector:"#guideindex"},{ref:"videoIndex",selector:"#videoindex"},{ref:"exampleIndex",selector:"#exampleindex"},{ref:"testsIndex",selector:"#testsindex"},{ref:"commentIndex",selector:"#commentindex"},{ref:"classTree",selector:"#classtree"},{ref:"guideTree",selector:"#guidetree"},{ref:"exampleTree",selector:"#exampletree"},{ref:"videoTree",selector:"#videotree"},{ref:"doctabs",selector:"#doctabs"}],init:function(){this.getController("Classes").addListener({showClass:function(b){this.addTabFromTree("#!/api/"+b)},scope:this});this.getController("Guides").addListener({showGuide:function(b){this.addTabFromTree("#!/guide/"+b)},scope:this});this.getController("Examples").addListener({showExample:function(b){this.addTabFromTree(b)},scope:this});this.getController("Videos").addListener({showVideo:function(b){this.addTabFromTree("#!/video/"+b)},scope:this});this.control({"[componentCls=doctabs]":{tabActivate:function(d,c){Docs.History.push(d,c)},scope:this}})},onLaunch:function(){this.getDoctabs().setStaticTabs(Ext.Array.filter([this.getWelcomeIndex().getTab(),this.getClassIndex().getTab(),this.getGuideIndex().getTab(),this.getVideoIndex().getTab(),this.getExampleIndex().getTab(),this.getTestsIndex().getTab()],function(a){return a}));this.commentsTab=this.getCommentIndex().getTab();var b=Docs.Settings.get("tabs");if(b){Ext.Array.forEach(b,function(a){this.addTabFromTree(a,{animate:false})},this)}Docs.History.notifyTabsLoaded()},showCommentsTab:function(){var b=this.getDoctabs().getStaticTabs();this.getDoctabs().setStaticTabs(b.concat(this.commentsTab))},hideCommentsTab:function(){var b=this.getDoctabs().getStaticTabs();this.getDoctabs().setStaticTabs(Ext.Array.remove(b,this.commentsTab))},addTabFromTree:function(h,g){var e=this.getTree(h);var f=e.findRecordByUrl(h);if(f){this.addTab(f,g)}},addTab:function(d,c){c=c||{animate:true,activate:true};this.getDoctabs().addTab({href:d.url,text:d.text,iconCls:d.iconCls},c)},getTree:function(b){if(/#!?\/api/.test(b)){return this.getClassTree()}else{if(/#!?\/guide/.test(b)){return this.getGuideTree()}else{if(/#!?\/video/.test(b)){return this.getVideoTree()}else{if(/#!?\/example/.test(b)){return this.getExampleTree()}else{return this.getClassTree()}}}}}});Ext.define("Docs.controller.Comments",{extend:"Docs.controller.Content",baseUrl:"#!/comment",title:"Comments",requires:["Docs.Settings","Docs.Comments"],refs:[{ref:"viewport",selector:"#viewport"},{ref:"index",selector:"#commentindex"},{ref:"commentsFullList",selector:"commentsFullList"}],recentCommentsSettings:{},init:function(){this.control({commentsFullList:{hideReadChange:function(){this.fetchRecentComments()},sortOrderChange:function(b){this.recentCommentsSettings.sortByScore=(b==="votes");this.fetchRecentComments()}},commentsPager:{loadMore:function(b){this.fetchRecentComments(b)}},commentsUsers:{select:function(b){this.recentCommentsSettings.username=b;this.fetchRecentComments()}},commentsTargets:{select:function(b){this.recentCommentsSettings.targetId=b&&b.get("id");this.fetchRecentComments()}},commentsTags:{select:function(b){this.recentCommentsSettings.tagname=b&&b.get("tagname");this.fetchRecentComments()}}})},loadIndex:function(){this.fireEvent("loadIndex");Ext.getCmp("treecontainer").hide();if(!this.recentComments){this.fetchRecentComments();this.recentComments=true}this.callParent([true])},fetchRecentComments:function(f){var e=Docs.Settings.get("comments");var d={offset:f||0,limit:100,hideRead:e.hideRead?1:undefined,sortByScore:this.recentCommentsSettings.sortByScore?1:undefined,username:this.recentCommentsSettings.username,targetId:this.recentCommentsSettings.targetId,tagname:this.recentCommentsSettings.tagname};this.getCommentsFullList().setMasked(true);Docs.Comments.request("jsonp",{url:"/comments_recent",method:"GET",params:d,success:function(a){this.getCommentsFullList().setMasked(false);var b=f>0;this.getCommentsFullList().load(a,b)},scope:this})}});Ext.define("Docs.view.Tabs",{extend:"Ext.container.Container",alias:"widget.doctabs",id:"doctabs",componentCls:"doctabs",requires:["Docs.History","Docs.ClassRegistry","Docs.view.TabMenu"],minTabWidth:80,maxTabWidth:160,animDuration:150,tabs:[],tabsInBar:[],tabCache:{},staticTabs:[],initComponent:function(){this.addEvents("tabActivate","tabClose");this.tpl=Ext.create("Ext.XTemplate",'','
','
','
','','{text}',"",' ',"","
",'
',"
","
",'
 
','
');this.html=this.tpl.applyTemplate(this.staticTabs);this.tabTpl=Ext.create("Ext.XTemplate",'
','
','
',' ','{text}',"
",'',"
");this.on("afterrender",this.initListeners,this);this.on("resize",this.refresh,this);this.callParent()},initListeners:function(){this.el.on("mouseover",function(c,d){Ext.get(d).addCls("ovr")},this,{delegate:".close"});this.el.on("mouseout",function(c,d){Ext.get(d).removeCls("ovr")},this,{delegate:".close"});this.el.on("click",function(f,d){var e=Ext.get(d).up(".doctab").down(".tabUrl").getAttribute("href");e=Docs.History.cleanUrl(e);this.removeTab(e);this.fireEvent("tabClose",e)},this,{delegate:".close",preventDefault:true});this.el.on("click",function(f,d){if(Ext.fly(f.getTarget()).hasCls("close")){return}var e=Ext.get(d).down(".tabUrl").getAttribute("href");this.fireEvent("tabActivate",e,{navigate:true})},this,{delegate:".doctab"});this.el.on("contextmenu",function(c,d){if(!Ext.get(d).hasCls("overview")){this.createMenu().showBy(d)}},this,{delegate:".doctab",preventDefault:true});this.el.on("click",Ext.emptyFn,this,{delegate:".tabUrl",preventDefault:true});this.el.on("mouseleave",function(){if(this.shouldResize){this.resizeTabs({animate:true})}},this)},setStaticTabs:function(b){this.staticTabs=b;this.refresh()},getStaticTabs:function(b){return this.staticTabs},addTab:function(d,c){d=this.formatTabTexts(d);this.tabCache[d.href]=d;if(!this.hasTab(d.href)){this.tabs.push(d.href);if(this.roomForNewTab()){this.addTabToBar(d,c)}this.addTabToMenu(this.overflowButton.menu,d)}if(c.activate){this.activateTab(d.href)}this.saveTabs()},formatTabTexts:function(c){if(/#!?\/api\//.test(c.href)){var d=c.href.replace(/^.*#!?\/api\//,"");c.text=Docs.ClassRegistry.shortName(d);c.tooltip=d}else{c.tooltip=c.text}return c},removeTab:function(d){if(!this.hasTab(d)){return}this.removeFromArray(this.tabs,d);var e=this.removeFromArray(this.tabsInBar,d);var f=this.tabs[this.tabsInBar.length];if(f){this.tabsInBar.push(f)}if(this.activeTab===d){if(this.tabs.length===0){Docs.App.getController(this.getControllerName(d)).loadIndex()}else{if(e===this.tabs.length){e-=1}this.activateTab(this.tabs[e]);this.fireEvent("tabActivate",this.tabs[e])}}if(this.tabs.length>=this.maxTabsInBar()){this.refresh()}else{this.removeTabFromBar(d)}this.saveTabs()},removeFromArray:function(f,d){var e=Ext.Array.indexOf(f,d);if(e!==-1){Ext.Array.erase(f,e,1)}return e},activateTab:function(d){this.activeTab=d;if(!this.inTabs(d)){this.swapLastTabWith(d)}Ext.Array.each(Ext.query(".doctab a.tabUrl"),function(a){Ext.get(a).up(".doctab").removeCls(["active","highlight"])});var e=Ext.query('.doctab a[href="'+d+'"]')[0];if(e){var f=Ext.get(e).up(".doctab");f.addCls("active")}this.highlightOverviewTab(d)},refresh:function(){var i=this.tpl.applyTemplate(this.staticTabs);var f=this.maxTabsInBar()this.maxTabWidth){return this.maxTabWidth}else{if(bthis.tabsInBar.length&&f===this.maxTabsInBar()){g.addTabCls(h,"overflow")}var e=this.inTabBar(h.href);g.addTab(h,e?"":"overflow")},addToolTips:function(){Ext.Array.each(this.staticTabs,function(c){var d=Ext.get(Ext.query(".doctab."+c.cls)[0]);if(d){Ext.create("Ext.tip.ToolTip",{target:d,html:c.tooltip})}});Ext.Array.each(this.tabsInBar,function(e){var f=Ext.get(Ext.query('a.main-tab[href="'+e+'"]')[0]);var d=this.tabCache[e];if(f){this.addMainTabTooltip(f.up(".doctab"),d)}},this)},addMainTabTooltip:function(c,d){if(d.tooltip){Ext.create("Ext.tip.ToolTip",{target:c,html:d.tooltip})}},saveTabs:function(){Docs.Settings.set("tabs",this.tabs)},getControllerName:function(b){if(/#!?\/api/.test(b)){return"Classes"}else{if(/#!?\/guide/.test(b)){return"Guides"}else{if(/#!?\/video/.test(b)){return"Videos"}else{if(/#!?\/example/.test(b)){return"Examples"}else{if(/#!?\/tests/.test(b)){return"Tests"}else{if(/#!?\/comment/.test(b)){return"Comments"}else{return"Index"}}}}}}}});Ext.define("Docs.view.welcome.Index",{extend:"Ext.container.Container",alias:"widget.welcomeindex",mixins:["Docs.view.Scrolling"],requires:["Docs.ContentGrabber"],cls:"welcome iScroll",initComponent:function(){this.html=Docs.ContentGrabber.get("welcome-content");this.hasContent=!!this.html;this.callParent(arguments)},getTab:function(){return this.hasContent?{cls:"index",href:"#",tooltip:"Home"}:false}});Ext.define("Docs.view.cls.Index",{extend:"Ext.container.Container",alias:"widget.classindex",requires:["Docs.ContentGrabber","Docs.Comments"],mixins:["Docs.view.Scrolling"],cls:"class-categories iScroll",margin:"15 10",autoScroll:true,initComponent:function(){this.tpl=new Ext.XTemplate('

API Documentation

','','
{notice}
',"
","{categories}","{news}");this.data={notice:Docs.data.message||Docs.ContentGrabber.get("notice-text"),categories:Docs.ContentGrabber.get("categories-content"),news:Docs.ContentGrabber.get("news-content")};this.callParent(arguments)},afterRender:function(){this.callParent(arguments);if(!Docs.Comments.isEnabled()){return}this.initComments()},initComments:function(){this.getEl().select("a.docClass").each(function(a){var f=a.getHTML();var e=Docs.Comments.getClassTotalCount(f);if(e){Ext.DomHelper.append(a,Docs.Comments.counterHtml(e))}},this)},updateCommentCounts:function(){if(!this.getEl()){return}this.getEl().select(".comment-counter-small").remove();this.initComments()},getTab:function(){var b=(Docs.data.classes||[]).length>0;return b?{cls:"classes",href:"#!/api",tooltip:"API Documentation"}:false}});Ext.define("Docs.view.examples.TouchContainer",{extend:"Ext.panel.Panel",alias:"widget.touchexamplecontainer",requires:["Docs.view.examples.Device"],layout:"fit",cls:"example-container iScroll",autoScroll:true,bodyPadding:"10 0 5 0",initComponent:function(){this.dockedItems=[{xtype:"container",dock:"top",html:['

Example

','
','
','','',"
",' ','
','','',"
","
",'',"
","
"].join("")}];this.callParent(arguments)},load:function(b){this.title=b.title+" Example";this.device=Ext.create("Docs.view.examples.Device",{url:b.url,device:b.device||"phone",orientation:b.orientation||"landscape"});this.refresh()},refresh:function(){this.update(this.device.toHtml());this.updateScale();this.updateTitle();this.updateButtons()},setDevice:function(b){this.device.setDevice(b);this.refresh()},setOrientation:function(b){this.device.setOrientation(b);this.refresh()},updateScale:function(){var b=Ext.query("iframe",this.el.dom)[0];if(b){b.onload=Ext.Function.bind(function(){var d=document.createElement("style");var a="html { overflow: hidden }";if(this.device.getDevice()==="tablet"){a+="body { font-size: 79.8% !important; }"}d.innerHTML=a;b.contentWindow.document.body.appendChild(d)},this)}},updateTitle:function(){Ext.get(Ext.query(".example-title")).update(this.title)},updateButtons:function(){Ext.Array.each(Ext.query(".example-toolbar .orientations button"),function(b){Ext.get(b).removeCls("selected")});Ext.get(Ext.query(".example-toolbar .orientations button."+this.device.getOrientation())).addCls("selected");Ext.Array.each(Ext.query(".example-toolbar .devices button"),function(b){Ext.get(b).removeCls("selected")});Ext.get(Ext.query(".example-toolbar .devices button."+this.device.getDevice())).addCls("selected")},clear:function(){this.update("")}});Ext.define("Docs.view.search.Dropdown",{extend:"Ext.view.View",alias:"widget.searchdropdown",requires:["Docs.view.Signature"],floating:true,autoShow:false,autoRender:true,toFrontOnShow:true,focusOnToFront:false,store:"Search",id:"search-dropdown",overItemCls:"x-view-over",trackOver:true,itemSelector:"div.item",singleSelect:true,pageStart:0,pageSize:10,initComponent:function(){this.addEvents("changePage","footerClick");this.tpl=new Ext.XTemplate('','
','
','
{[this.getMetaTags(values.meta)]}
','
{name}
','
{fullName}
',"
","
",'",{getCls:function(b){return b["private"]?"private":(b.removed?"removed":"")},getMetaTags:function(b){return Docs.view.Signature.render(b)},getTotal:Ext.bind(this.getTotal,this),getStart:Ext.bind(this.getStart,this),getEnd:Ext.bind(this.getEnd,this)});this.on("afterrender",function(){this.el.addListener("click",function(){this.fireEvent("changePage",this,-1)},this,{preventDefault:true,delegate:".prev"});this.el.addListener("click",function(){this.fireEvent("changePage",this,+1)},this,{preventDefault:true,delegate:".next"});this.el.addListener("click",function(){this.fireEvent("footerClick",this)},this,{delegate:".footer"})},this);this.callParent(arguments)},setTotal:function(b){this.total=b},getTotal:function(){return this.total},setStart:function(b){this.pageStart=b},getStart:function(b){return this.pageStart},getEnd:function(c){var d=this.pageStart+this.pageSize;return d>this.total?this.total:d}});Ext.define("Docs.view.search.Container",{extend:"Ext.container.Container",alias:"widget.searchcontainer",requires:"Docs.view.search.Dropdown",initComponent:function(){if(Docs.data.search.length){this.cls="search";this.items=[{xtype:"triggerfield",triggerCls:"reset",emptyText:"Search",width:170,id:"search-field",enableKeyEvents:true,hideTrigger:true,onTriggerClick:function(){this.reset();this.focus();this.setHideTrigger(true);Ext.getCmp("search-dropdown").hide()}},{xtype:"searchdropdown"}]}this.callParent()}});Ext.define("Docs.view.GroupTree",{extend:"Docs.view.DocTree",alias:"widget.grouptree",initComponent:function(){this.root={text:"Root",children:this.buildTree(this.data)};this.callParent()},buildTree:function(b){return Ext.Array.map(b,function(a){if(a.items){return{text:a.title,expanded:true,iconCls:"icon-pkg",children:this.buildTree(a.items)}}else{return this.convert(a)}},this)}});Ext.define("Docs.view.auth.BaseForm",{extend:"Ext.Component",requires:["Docs.Tip","Docs.Auth"],createLoginFormHtml:function(){return['
','','','',''," or ",'Register',"
"].join("")},bindFormSubmitEvent:function(){this.getEl().down("form").on("submit",this.submitLogin,this,{preventDefault:true})},submitLogin:function(m,h){var n=Ext.get(h);var j=n.down("input[name=username]").getValue();var i=n.down("input[name=password]").getValue();var l=n.down("input[name=remember]");var k=l?!!(l.getAttribute("checked")):false;this.fireEvent("login",this,j,i,k)},showMessage:function(c){var d=this.getEl().down("input[type=submit]");Docs.Tip.show(c,d,"bottom")}});Ext.define("Docs.view.auth.HeaderForm",{extend:"Docs.view.auth.BaseForm",alias:"widget.authHeaderForm",requires:["Docs.Comments"],afterRender:function(){this.callParent(arguments);this.getEl().addListener("click",this.showLoginForm,this,{preventDefault:true,delegate:".login"});this.getEl().addListener("click",function(){this.fireEvent("logout",this)},this,{preventDefault:true,delegate:".logout"})},showLoginForm:function(){this.update(this.createLoginFormHtml());this.bindFormSubmitEvent()},showLoggedIn:function(d){var c=Docs.Comments.avatar(d.emailHash);this.update(c+"
"+d.userName+' | Logout
')},showLoggedOut:function(){this.update('')}});Ext.define("Docs.view.comments.Users",{alias:"widget.commentsUsers",extend:"Ext.panel.Panel",componentCls:"comments-users",requires:["Docs.Comments","Docs.view.SimpleSelectBehavior","Docs.view.comments.FilterField"],layout:"border",initComponent:function(){this.items=[this.tabpanel=Ext.widget("tabpanel",{plain:true,region:"north",height:50,items:[{title:"Votes"},{title:"Comments"}],dockedItems:[{dock:"bottom",items:[{xtype:"commentsFilterField",emptyText:"Filter users by name...",width:320,height:20,listeners:{filter:this.onFilter,scope:this}}]}],listeners:{tabchange:this.onTabChange,scope:this}}),this.list=Ext.widget("dataview",{region:"center",cls:"iScroll users-list",autoScroll:true,store:Ext.create("Ext.data.Store",{fields:["userName","score","emailHash","mod"]}),allowDeselect:true,tpl:["
    ",'',"
  • ",'{score}',"{[Docs.Comments.avatar(values.emailHash)]}",'moderator">{userName}',"
  • ","
    ","
"],itemSelector:"li"})];new Docs.view.SimpleSelectBehavior(this.list,{select:this.onSelect,deselect:this.onDeselect,scope:this});this.callParent(arguments)},afterRender:function(){this.callParent(arguments);this.fetchUsers("votes")},onTabChange:function(d,c){if(c.title==="Votes"){this.fetchUsers("votes")}else{this.fetchUsers("comments")}},onFilter:function(b){this.list.getSelectionModel().deselectAll();this.list.getStore().clearFilter(true);this.list.getStore().filter({property:"userName",value:b,anyMatch:true})},deselectAll:function(){this.list.getSelectionModel().deselectAll()},onSelect:function(b){this.selectedUser=b;this.fireEvent("select",b.get("userName"))},onDeselect:function(){this.selectedUser=undefined;this.fireEvent("select",undefined)},fetchUsers:function(b){Docs.Comments.request("jsonp",{url:"/users",method:"GET",params:{sortBy:b},success:this.loadUsers,scope:this})},loadUsers:function(c){this.list.getStore().loadData(c.data);if(this.selectedUser){var d=this.list.getStore().findExact("userName",this.selectedUser.get("userName"));this.list.getSelectionModel().select(d,false,true)}}});Ext.define("Docs.view.cls.Header",{extend:"Ext.container.Container",requires:["Docs.view.Signature"],alias:"widget.classheader",cls:"classheader",padding:"10 0 17 0",height:55,initComponent:function(){this.tpl=Ext.create("Ext.XTemplate",'

','','{name}','View source...',"","",'{name}',"",'','singleton',"","",'enum of {[values["enum"].type]}',"","{[this.renderAliases(values.aliases)]}","{[this.renderMetaTags(values.meta)]}","

",'','Print',"",{getClass:function(b){if(b.singleton){return"singleton"}else{if(b.component){return"component"}else{return"class"}}},renderAliases:function(e){var f={widget:"xtype",plugin:"ptype",feature:"ftype"};var d=[];e&&Ext.Object.each(e,function(a,b){d.push((f[a]||a)+": "+b.join(", "))});if(d.length>0){return""+d.join(", ")+""}else{return""}},renderMetaTags:function(b){return" "+Docs.view.Signature.render(b,"long")}});if(Docs.data.source){this.on("render",this.initSourceLink,this)}this.callParent()},initSourceLink:function(){this.classLinkEvent("click",function(){var d=this.loadedCls.files;if(d.length===1){window.open("source/"+d[0].href)}else{var c=this.createFileMenu(d);c.showBy(this,undefined,[58,-20])}},this);this.classLinkEvent("mouseover",function(){this.el.down(".class-source-tip").addCls("hover")},this);this.classLinkEvent("mouseout",function(){this.el.down(".class-source-tip").removeCls("hover")},this)},classLinkEvent:function(d,e,f){this.el.on(d,e,f,{preventDefault:true,delegate:"a.class-source-link"})},createFileMenu:function(b){return new Ext.menu.Menu({items:Ext.Array.map(b,function(a){return{text:a.filename,handler:function(){window.open("source/"+a.href)}}},this)})},load:function(b){this.loadedCls=b;this.update(this.tpl.apply(b))}});Ext.override(Ext.dom.Element,{getAttribute:(Ext.isIE6||Ext.isIE7||Ext.isIE8)?function(f,h){var g=this.dom,d;if(h){d=typeof g[h+":"+f];if(d!="undefined"&&d!="unknown"){return g[h+":"+f]||null}return null}if(f==="for"){f="htmlFor"}return g[f]||null}:function(e,d){var f=this.dom;if(d){return f.getAttributeNS(d,e)||f.getAttribute(d+":"+e)}return f.getAttribute(e)||f[e]||null}});Ext.define("Docs.view.ThumbList",{extend:"Ext.view.View",alias:"widget.thumblist",requires:["Docs.Comments"],cls:"thumb-list",itemSelector:"dl",urlField:"url",commentType:"",itemTpl:[],initComponent:function(){this.addEvents("urlclick");Ext.Array.forEach(this.data,function(c,d){c.id="sample-"+d});this.store=Ext.create("Ext.data.JsonStore",{fields:["id","title","items"]});this.store.loadData(this.flattenSubgroups(this.data));this.tpl=new Ext.XTemplate(Ext.Array.flatten(["
",'','

{title}

',"
",'',this.itemTpl,"",'
',"
","
"]));this.itemTpl=undefined;this.data=undefined;this.on("viewready",function(){this.initHover();if(Docs.Comments.isEnabled()){this.initComments()}},this);this.callParent(arguments)},initHover:function(){this.getEl().on("mouseover",function(c,d){Ext.get(d).addCls("over")},this,{delegate:"dd"});this.getEl().on("mouseout",function(c,d){Ext.get(d).removeCls("over")},this,{delegate:"dd"})},initComments:function(){this.getEl().select("dd").each(function(e){var d=e.getAttributeNS("ext",this.urlField).replace(/^.*\//,"");var f=Docs.Comments.getCount([this.commentType,d,""]);if(f){Ext.DomHelper.append(e.down("p"),Docs.Comments.counterHtml(f))}},this)},updateCommentCounts:function(){if(!this.getEl()){return}this.getEl().select(".comment-counter-small").remove();this.initComments()},flattenSubgroups:function(c){function d(a){if(a.items){return Ext.Array.map(a.items,d)}else{return a}}return Ext.Array.map(c,function(a){return{id:a.id,title:a.title,items:Ext.Array.map(a.items,function(b){if(b.items){var f=Ext.apply({},d(b)[0]);f.title=b.title;return f}else{return b}})}})},onContainerClick:function(c){var d=c.getTarget("h2",3,true);if(d){d.up("div").toggleCls("collapsed")}},onItemClick:function(h,j,l,i){var k=i.getTarget("dd",5,true);if(k&&!i.getTarget("a",2)){var e=k.getAttributeNS("ext",this.urlField);this.fireEvent("urlclick",e)}return this.callParent(arguments)}});Ext.define("Docs.view.guides.Index",{extend:"Ext.container.Container",alias:"widget.guideindex",requires:["Docs.view.ThumbList"],mixins:["Docs.view.Scrolling"],cls:"iScroll",margin:"10 0 0 0",autoScroll:true,initComponent:function(){this.items=[{xtype:"container",html:'

Guides

'},Ext.create("Docs.view.ThumbList",{commentType:"guide",itemTpl:['
',"

{title}

{description}

","
"],data:Docs.data.guides})];this.callParent(arguments)},getTab:function(){var b=(Docs.data.guides||[]).length>0;return b?{cls:"guides",href:"#!/guide",tooltip:"Guides"}:false},updateCommentCounts:function(){this.down("thumblist").updateCommentCounts()}});Ext.define("Docs.view.videos.Index",{extend:"Ext.container.Container",alias:"widget.videoindex",requires:["Docs.view.ThumbList"],mixins:["Docs.view.Scrolling"],cls:"iScroll",margin:"10 0 0 0",autoScroll:true,initComponent:function(){this.items=[{xtype:"container",html:'

Videos

'},Ext.create("Docs.view.ThumbList",{commentType:"video",itemTpl:['
',"

{title}","

{[values.description.substr(0,80)]}...

","
"],data:Docs.data.videos})];this.callParent(arguments)},getTab:function(){var b=(Docs.data.videos||[]).length>0;return b?{cls:"videos",href:"#!/video",tooltip:"Videos"}:false},updateCommentCounts:function(){this.down("thumblist").updateCommentCounts()}});Ext.define("Docs.view.examples.Index",{extend:"Ext.container.Container",alias:"widget.exampleindex",requires:["Docs.view.ThumbList"],mixins:["Docs.view.Scrolling"],cls:"iScroll",margin:"10 0 0 0",autoScroll:true,initComponent:function(){this.cls+=Docs.data.touchExamplesUi?" touch-examples-ui":"";this.items=[{xtype:"container",html:'

Examples

'},Ext.create("Docs.view.ThumbList",{itemTpl:['
','
',"

{title}","",' (New)',"","",' (Updated)',"","",' (Experimental)',"","

{description}

","
"],data:Docs.data.examples})];this.callParent(arguments)},getTab:function(){var b=(Docs.data.examples||[]).length>0;return b?{cls:"examples",href:"#!/example",tooltip:"Examples"}:false}});Ext.define("Docs.view.examples.Inline",{extend:"Ext.Panel",alias:"widget.inlineexample",requires:["Docs.view.examples.InlineEditor","Docs.view.examples.InlinePreview"],componentCls:"inline-example-cmp",layout:"card",border:0,resizable:{transparent:true,handles:"s",constrainTo:false},maxCodeHeight:400,options:{},constructor:function(){this.callParent(arguments);this.addEvents("previewsuccess","previewfailure")},initComponent:function(){this.options=Ext.apply({device:"phone",orientation:"landscape"},this.options);this.items=[this.editor=Ext.create("Docs.view.examples.InlineEditor",{cmpName:"code",value:this.value,listeners:{init:this.updateHeight,change:this.updateHeight,scope:this}}),this.preview=Ext.create("Docs.view.examples.InlinePreview",{cmpName:"preview",options:this.options})];this.relayEvents(this.preview,["previewsuccess","previewfailure"]);if(this.options.preview){this.activeItem=1;if(this.toolbar){this.toolbar.activateButton("preview")}}else{this.activeItem=0;if(this.toolbar){this.toolbar.activateButton("code")}}this.on("afterrender",this.init,this);this.callParent(arguments)},init:function(){var b=this.layout.getActiveItem();if(b.cmpName==="preview"){this.showPreview()}this.updateHeight();if(this.toolbar){this.initToolbarEvents()}},initToolbarEvents:function(){this.toolbar.on("buttonclick",function(b){if(b==="code"){this.showCode()}else{if(b==="preview"){this.showPreview()}else{if(b==="copy"){this.showCode();this.editor.selectAll()}}}},this)},showCode:function(){this.layout.setActiveItem(0);this.updateHeight();if(this.toolbar){this.toolbar.activateButton("code")}},showPreview:function(){this.preview.update(this.editor.getValue());this.layout.setActiveItem(1);this.updateHeight();if(this.toolbar){this.toolbar.activateButton("preview")}},updateHeight:function(){var d=this.preview.getHeight();var e=this.editor.getHeight();var f=30;if(Docs.data.touchExamplesUi&&d>0){this.setHeight(d+f)}else{if(e>0){this.setHeight(Ext.Number.constrain(e+f,0,this.maxCodeHeight))}}}});Ext.define("Docs.view.examples.InlineWrap",{requires:["Docs.view.examples.Inline","Docs.view.examples.InlineToolbar"],constructor:function(c){this.pre=c;var d=this.parseOptions(c.className);this.initToolbar();if(d.preview){this.replacePre(d)}else{this.tb.on("buttonclick",function(a){d.preview=(a==="preview");this.replacePre(d)},this,{single:true})}},parseOptions:function(c){var d={};Ext.Array.forEach(c.split(/ +/),function(a){if(a==="phone"||a==="miniphone"||a==="tablet"){d.device=a}else{if(a==="ladscape"||a==="portrait"){d.orientation=a}else{d[a]=true}}});return d},initToolbar:function(){var b=document.createElement("div");this.pre.parentNode.insertBefore(b,this.pre);this.tb=Ext.create("Docs.view.examples.InlineToolbar",{renderTo:b})},replacePre:function(d){var c=document.createElement("div");this.pre.parentNode.replaceChild(c,this.pre);Ext.create("Docs.view.examples.Inline",{height:200,renderTo:c,value:Ext.String.htmlDecode(Ext.util.Format.stripTags(this.pre.innerHTML)),options:d,toolbar:this.tb})}});Ext.define("Docs.controller.InlineExamples",{extend:"Ext.app.Controller",requires:["Docs.view.examples.InlineWrap"],init:function(){this.control({classoverview:{resize:this.createResizer(".class-overview"),afterload:this.replaceExampleDivs},guidecontainer:{resize:this.createResizer(".guide-container"),afterload:this.replaceExampleDivs}})},createResizer:function(b){return function(){Ext.Array.each(Ext.ComponentQuery.query(b+" .inlineexample"),function(a){if(a.editor&&a.isVisible()){a.doLayout()}})}},replaceExampleDivs:function(){Ext.Array.each(Ext.query(".inline-example"),function(b){Ext.create("Docs.view.examples.InlineWrap",b)},this)}});Ext.define("Docs.view.tests.BatchRunner",{extend:"Ext.container.Container",requires:["Docs.view.examples.Inline"],initComponent:function(){this.addEvents("start","finish","statuschange");this.callParent(arguments)},run:function(b){this.fireEvent("start");this.runNext({pass:0,fail:0,total:b.length,remaining:b})},runNext:function(h){this.fireEvent("statuschange",h);if(!h.remaining||h.remaining.length<1){this.fireEvent("finish");return}var j=h.remaining.shift();var i=j.get("options");i.preview=false;var f="var alert = function(){};\n";var g=Ext.create("Docs.view.examples.Inline",{cls:"doc-test-preview",height:0,value:f+j.get("code"),options:i,listeners:{previewsuccess:function(a){this.onSuccess(j,h)},previewfailure:function(a,b){this.onFailure(j,h,b)},scope:this}});this.removeAll();this.add(g);g.showPreview()},onSuccess:function(d,c){d.set("status","success");d.commit();c.pass++;this.runNext(c)},onFailure:function(e,f,d){e.set("status","failure");e.set("message",d.toString());e.commit();f.fail++;this.runNext(f)}});Ext.define("Docs.view.tests.Index",{extend:"Ext.container.Container",requires:["Docs.model.Test","Docs.view.tests.BatchRunner"],mixins:["Docs.view.Scrolling"],alias:"widget.testsindex",layout:{type:"vbox",align:"stretch",shrinkToFit:true},padding:10,initComponent:function(){this.store=Ext.create("Ext.data.Store",{model:"Docs.model.Test",data:[]});this.grid=Ext.create("Ext.grid.Panel",{itemId:"testsgrid",padding:"5 0 5 0",autoScroll:true,flex:1,store:this.store,selModel:{mode:"MULTI"},columns:[{xtype:"templatecolumn",text:"Name",width:300,tpl:'{name}'},{xtype:"templatecolumn",text:"Status",width:80,tpl:'{status}'},{text:"Message",flex:1,dataIndex:"message"}],listeners:{itemdblclick:function(c,d){this.batchRunner.run([d])},scope:this}});this.batchRunner=Ext.create("Docs.view.tests.BatchRunner",{height:0,listeners:{start:this.disable,finish:this.enable,statuschange:this.updateTestStatus,scope:this}});this.items=[{html:"

Inline examples test page

",height:30},{itemId:"testcontainer",layout:{type:"vbox",align:"stretch",shrinkToFit:true},flex:1,items:[{itemId:"testcontrols",layout:"hbox",items:[{html:"Double-click to run an example, or",margin:"5 5 5 0"},{xtype:"button",itemId:"run-selected-button",text:"Run Selected",margin:5,handler:function(){this.batchRunner.run(this.grid.getSelectionModel().getSelection())},scope:this},{html:"or",margin:5},{xtype:"button",itemId:"run-all-button",text:"Run All Examples",margin:5,handler:function(){this.batchRunner.run(this.store.getRange())},scope:this},{itemId:"testStatus",margin:"5 5 5 15"}]},this.grid]},this.batchRunner];this.callParent(arguments)},getTab:function(){return Docs.data.tests?{cls:"tests",href:"#!/tests",tooltip:"Tests",text:"Tests"}:false},addExamples:function(b){this.store.add(b);this.setStatus(true,this.store.getCount()+" examples loaded.")},updateTestStatus:function(d){var c=d.pass+d.fail;this.setStatus(d.fail===0,c+"/"+d.total+" examples tested, "+d.fail+" failures")},setStatus:function(d,f){var e=d?"doc-test-success":"doc-test-failure";this.down("#testStatus").update(''+f+"")}});Ext.define("Docs.view.cls.PackageLogic",{extend:"Docs.view.cls.Logic",requires:"Docs.ClassRegistry",create:function(){this.root={children:[],text:"Root"};this.packages={"":this.root};this.privates=[];Ext.Array.forEach(this.classes,this.addClass,this);this.sortTree(this.root);return{root:this.root,privates:this.privates}},sortTree:function(b){b.children.sort(this.compare);Ext.Array.forEach(b.children,this.sortTree,this)},compare:function(g,h){if(g.leaf===h.leaf){var b=g.text.toLowerCase();var a=h.text.toLowerCase();return b>a?1:(ba?1:(b{2}',d,Docs.Settings.get("classTreeLogic")===d?"selected":"",c)},setupButtonClickHandler:function(){this.el.addListener("click",function(g,h){var f=Ext.get(h),e=Ext.get(Ext.query(".cls-grouping button.selected")[0]);if(e.dom===f.dom){return}e.removeCls("selected");f.addCls("selected");if(f.hasCls("PackageLogic")){this.setLogic("PackageLogic",Docs.Settings.get("showPrivateClasses"))}else{this.setLogic("InheritanceLogic",Docs.Settings.get("showPrivateClasses"))}},this,{delegate:"button"})},setLogic:function(i,f){Docs.Settings.set("classTreeLogic",i);Docs.Settings.set("showPrivateClasses",f);var g=new Docs.view.cls[i]({classes:this.data,showPrivateClasses:f});if(this.root){var h=this.getSelectionModel().getLastSelected();var j=g.create();this.expandLonelyNode(j.root);this.setRootNode(j.root);this.initNodeLinks();h&&this.selectUrl(h.raw.url)}else{var j=g.create();this.root=j.root;this.expandLonelyNode(this.root)}this.privates=j.privates},expandLonelyNode:function(d){var c=Ext.Array.filter(d.children,function(a){return a.children.length>0});if(c.length==1){c[0].expanded=true}},findRecordByUrl:function(b){return this.callParent([b])||this.findPrivateRecordByUrl(b)},findPrivateRecordByUrl:function(e){var f=this.privates;for(var d=0;d','',"{[this.renderCount(values.count)]}","",{renderCount:this.renderCount});this.data={count:this.count};this.callParent(arguments)},renderCount:function(b){if(b===1){return"View 1 comment."}else{if(b>1){return"View "+b+" comments."}else{return"No comments. Click to add."}}},afterRender:function(){this.callParent(arguments);this.getEl().select(".toggleComments").each(function(b){b.on("click",this.toggle,this,{preventDefault:true})},this);new Docs.view.comments.TopLevelDropZone(this.getEl().down(".side.toggleComments"),{onValidDrop:Ext.Function.bind(this.setParent,this)})},setParent:function(c,d){c.setParent(d,this.reload,this)},toggle:function(){this.expanded?this.collapse():this.expand()},expand:function(){this.expanded=true;this.getEl().addCls("open");this.getEl().down(".name").setStyle("display","none");if(this.list){this.list.show()}else{this.loadComments()}},collapse:function(){this.expanded=false;this.getEl().removeCls("open");this.getEl().down(".name").setStyle("display","block");if(this.list){this.list.hide()}},loadComments:function(){this.list=new Docs.view.comments.ListWithForm({target:this.target,newCommentTitle:this.newCommentTitle,renderTo:this.getEl(),listeners:{reorder:this.reload,scope:this}});this.reload()},reload:function(){Docs.Comments.load(this.target,function(b){this.list.load(b)},this)},setCount:function(b){this.getEl().down(".name").update(this.renderCount(b))}});Ext.define("Docs.view.comments.LargeExpander",{requires:["Docs.Comments","Docs.view.comments.Expander"],html:['
','

Comments

',"
","
"].join(""),type:"class",constructor:function(e){Ext.apply(this,e);this.el=Ext.get(e.el);var d=Ext.DomHelper.append(this.el,this.html,true).down("div");var f=[this.type,this.name,""];this.expander=new Docs.view.comments.Expander({count:Docs.Comments.getCount(f),target:f,renderTo:d,onCountUpdated:this.onCountUpdated})},getExpander:function(){return this.expander}});Ext.define("Docs.view.guides.Container",{extend:"Ext.panel.Panel",alias:"widget.guidecontainer",componentCls:"guide-container",mixins:["Docs.view.Scrolling"],requires:["Docs.Comments","Docs.view.comments.LargeExpander"],initComponent:function(){this.addEvents("afterload");this.callParent(arguments)},scrollToEl:function(c){var d=Ext.get(c);if(!d){d=Ext.get(Ext.query("a[name='"+c+"']")[0])}this.scrollToView(d,{highlight:true,offset:-100})},load:function(b){this.guide=b;this.tpl=this.tpl||new Ext.XTemplate(Docs.data.showPrintButton?'Print':"","{content}");this.update(this.tpl.apply(b));Docs.Syntax.highlight(this.getEl());if(Docs.Comments.isEnabled()){this.initComments()}this.fireEvent("afterload")},initComments:function(){this.expander=new Docs.view.comments.LargeExpander({type:"guide",name:this.guide.name,el:this.getEl().down(".x-panel-body")})},updateCommentCounts:function(){if(!this.expander){return}this.expander.getExpander().setCount(Docs.Comments.getCount(["guide",this.guide.name,""]))}});Ext.define("Docs.view.videos.Container",{extend:"Ext.panel.Panel",alias:"widget.videocontainer",componentCls:"video-container",requires:["Docs.Comments","Docs.view.comments.LargeExpander"],initComponent:function(){this.callParent(arguments);this.on("hide",this.pauseVideo,this)},pauseVideo:function(){var b=document.getElementById("video_player");if(b&&b.api_pause){b.api_pause()}},load:function(b){this.video=b;this.tpl=this.tpl||new Ext.XTemplate('","

{title}

","

{[this.linkify(values.description)]}

",{linkify:function(a){return a.replace(/(\bhttps?:\/\/\S+)/ig,"$1")}});this.update(this.tpl.apply(b));if(Docs.Comments.isEnabled()){this.initComments()}},initComments:function(){this.expander=new Docs.view.comments.LargeExpander({type:"video",name:this.video.name,el:this.getEl().down(".x-panel-body")})},updateCommentCounts:function(){if(!this.expander){return}this.expander.getExpander().setCount(Docs.Comments.getCount(["video",this.video.name,""]))}});Ext.define("Docs.view.comments.MemberWrap",{extend:"Docs.view.cls.MemberWrap",requires:["Docs.Comments","Docs.view.comments.Expander"],constructor:function(d){this.callParent([d]);var c=Docs.Comments.getCount(this.getTarget());if(c>0){this.updateSignatureCommentCount(c)}},getTarget:function(){if(!this.target){this.target=["class",this.getDefinedIn(),this.getMemberId()]}return this.target},getExpander:function(){if(!this.expander){var b=Ext.DomHelper.append(this.el.down(".long"),"
");this.expander=new Docs.view.comments.Expander({count:Docs.Comments.getCount(this.getTarget()),target:this.getTarget(),newCommentTitle:this.getNewCommentTitle(),renderTo:b})}return this.expander},setCount:function(b){this.getExpander().setCount(b);this.updateSignatureCommentCount(b)},updateSignatureCommentCount:function(g){var e=this.el.down(".title");var f=e.down(".comment-counter-small");if(g>0){if(f){f.update(""+g)}else{var h=Ext.DomHelper.append(e,Docs.Comments.counterHtml(g),true);h.on("click",function(){this.el.addCls("open");this.getExpander().expand();this.parent.scrollToEl(this.getExpander().getEl())},this)}}else{if(f){f.remove()}}},getNewCommentTitle:function(){if(this.getDefinedIn()!==this.className){return["Be aware. This member is inherited from "+this.getDefinedIn()+"; ","comments posted here will also be posted to that page."].join("")}else{return undefined}},setExpanded:function(b){this.callParent([b]);if(b){this.getExpander().show()}}});Ext.define("Docs.view.comments.Template",{extend:"Ext.XTemplate",requires:["Docs.Auth","Docs.Comments"],statics:{create:function(d){var c="tpl-"+Ext.JSON.encode(d);if(!this[c]){this[c]=new this();Ext.apply(this[c],d)}return this[c]}},constructor:function(){this.callParent(["
",'','
','','
Comment was deleted. Undo.
',"",'
',"{[this.avatar(values.emailHash)]}",'
moderator" title="Sencha Engineer">',"{author}",'',' on {[this.target(values.target)]}',"","
",'
','','',"{.}",'',"","",'','+',"",'','read">Read',"",'','Edit','Delete',"",'{[this.dateStr(values.createdAt)]}',"
",'
',' ','{score}',' ',"
","
",'
{contentHtml}
',"
","
","
","
",this])},avatar:function(b){return Docs.Comments.avatar(b,this.isMod()&&this.enableDragDrop?"drag-handle":"")},isTargetVisible:function(){return this.showTarget},dateStr:function(e){try{var h=Math.ceil(Number(new Date())/1000);var i=Math.ceil(Number(new Date(e))/1000);var k=h-i;if(k<60){return"just now"}else{if(k<60*60){var j=String(Math.round(k/(60)));return j+(j=="1"?" minute":" minutes")+" ago"}else{if(k<60*60*24){var j=String(Math.round(k/(60*60)));return j+(j=="1"?" hour":" hours")+" ago"}else{if(k<60*60*24*31){var j=String(Math.round(k/(60*60*24)));return j+(j=="1"?" day":" days")+" ago"}else{return Ext.Date.format(new Date(e),"jS M 'y")}}}}}catch(l){return""}},date:function(d){try{return Ext.Date.format(new Date(d),"jS F Y g:ia")}catch(c){return""}},isMod:function(){return Docs.Auth.isModerator()},isAuthor:function(b){return Docs.Auth.getUser().userName==b},target:function(h){var e=h[1],g=h[1],f="#!/api/";if(h[0]=="video"){g="Video "+g;f="#!/video/"}else{if(h[0]=="guide"){g="Guide "+g;f="#!/guide/"}else{if(h[2]!=""){e+="-"+h[2];if(h[0]=="class"){g+="#"+h[2].replace(/^.*-/,"")}else{g+=" "+h[2]}}}}return''+g+""}});Ext.define("Docs.view.comments.RepliesExpander",{alias:"widget.commentsRepliesExpander",extend:"Ext.Component",requires:["Docs.Comments"],uses:["Docs.view.comments.ListWithForm"],componentCls:"comments-replies-expander",initComponent:function(){this.tpl=new Ext.XTemplate('',"{[this.renderCount(values.count)]}","",{renderCount:this.renderCount,getCountCls:this.getCountCls});this.data={count:this.count};this.callParent(arguments)},renderCount:function(b){if(b===1){return"1 reply..."}else{if(b>1){return b+" replies..."}else{return"Write reply..."}}},getCountCls:function(b){return(b>0)?"with-replies":""},afterRender:function(){this.callParent(arguments);this.getEl().down(".replies-button").on("click",this.toggle,this,{preventDefault:true})},toggle:function(){this.expanded?this.collapse():this.expand()},expand:function(){this.expanded=true;this.getEl().down(".replies-button").update("Hide replies.");if(this.list){this.list.show()}else{this.loadComments()}},collapse:function(){this.expanded=false;this.refreshRepliesButton();if(this.list){this.list.hide()}},refreshRepliesButton:function(){var b=this.getEl().down(".replies-button");b.update(this.renderCount(this.count));b.removeCls("with-replies");b.addCls(this.getCountCls(this.count))},loadComments:function(){this.list=new Docs.view.comments.ListWithForm({target:this.target,parentId:this.parentId,newCommentTitle:"Reply to comment",renderTo:this.getEl(),listeners:{countChange:this.setCount,scope:this}});Docs.Comments.loadReplies(this.parentId,function(b){this.list.load(b)},this)},setCount:function(b){this.count=b;if(!this.expanded){this.refreshRepliesButton()}}});Ext.define("Docs.model.Comment",{extend:"Ext.data.Model",requires:["Docs.Comments"],fields:[{name:"id",mapping:"_id"},"author","emailHash","moderator","createdAt","target","score","upVote","downVote","contentHtml","read","tags","deleted","parentId","replyCount"],proxy:{type:"ajax",reader:"json"},vote:function(c,d){this.request({method:"POST",url:"/comments/"+this.get("id"),params:{vote:c},success:function(a){this.set("upVote",a.direction==="up");this.set("downVote",a.direction==="down");this.set("score",a.total);this.commit()},failure:Ext.Function.bind(d.failure,d.scope),scope:this})},loadContent:function(c,d){this.request({url:"/comments/"+this.get("id"),method:"GET",success:function(a){c.call(d,a.content)},scope:this})},saveContent:function(b){this.request({url:"/comments/"+this.get("id"),method:"POST",params:{content:b},success:function(a){this.set("contentHtml",a.content);this.commit()},scope:this})},setDeleted:function(b){this.request({url:"/comments/"+this.get("id")+(b?"/delete":"/undo_delete"),method:"POST",success:function(){this.set("deleted",b);this.commit();Docs.Comments.changeCount(this.get("target"),b?-1:+1)},scope:this})},markRead:function(){this.request({url:"/comments/"+this.get("id")+"/read",method:"POST",success:function(){this.set("read",true);this.commit()},scope:this})},setParent:function(d,f,e){this.request({url:"/comments/"+this.get("id")+"/set_parent",method:"POST",params:d?{parentId:d.get("id")}:undefined,success:f,scope:e})},addTag:function(b){this.changeTag("add_tag",b,function(){this.get("tags").push(b)},this)},removeTag:function(b){this.changeTag("remove_tag",b,function(){Ext.Array.remove(this.get("tags"),b)},this)},changeTag:function(h,e,g,f){this.request({url:"/comments/"+this.get("id")+"/"+h,method:"POST",params:{tagname:e},success:function(){g.call(f);this.commit()},scope:this})},request:function(b){Docs.Comments.request("ajax",{url:b.url,method:b.method,params:b.params,callback:function(h,f,a){var g=Ext.JSON.decode(a.responseText);if(f&&g.success){b.success&&b.success.call(b.scope,g)}else{b.failure&&b.failure.call(b.scope,g.reason)}},scope:this})}});Ext.define("Docs.CommentsProxy",{extend:"Ext.data.proxy.JsonP",alias:"proxy.comments",requires:["Docs.Comments"],constructor:function(b){b.url=Docs.Comments.buildRequestUrl(b.url);this.callParent([b])}});Ext.define("Docs.model.Target",{extend:"Ext.data.Model",requires:["Docs.CommentsProxy"],fields:["id","type","cls","member","score",{name:"text",convert:function(e,f){var d=f.data;if(d.type==="class"){return d.cls+(d.member?"#"+d.member.replace(/^.*-/,""):"")}else{return d.type+" "+d.cls}}}],proxy:{type:"comments",url:"/targets",reader:{type:"json",root:"data"}}});Ext.define("Docs.view.comments.Targets",{extend:"Docs.view.comments.TopList",alias:"widget.commentsTargets",requires:["Docs.model.Target"],model:"Docs.model.Target",displayField:"text",filterEmptyText:"Filter topics by name..."});Ext.define("Docs.model.Tag",{extend:"Ext.data.Model",requires:["Docs.CommentsProxy"],fields:["tagname","score"],proxy:{type:"comments",url:"/tags",reader:{type:"json",root:"data"}}});Ext.define("Docs.view.comments.Tags",{extend:"Docs.view.comments.TopList",alias:"widget.commentsTags",requires:["Docs.model.Tag"],model:"Docs.model.Tag",displayField:"tagname",filterEmptyText:"Filter tags by name..."});Ext.define("Docs.view.comments.TagEditor",{extend:"Ext.container.Container",requires:["Docs.model.Tag"],floating:true,hidden:true,componentCls:"comments-tageditor",statics:{cachedStore:undefined,getStore:function(){if(!this.cachedStore){this.cachedStore=Ext.create("Ext.data.Store",{model:"Docs.model.Tag",listeners:{load:function(){this.cachedStore.sort("tagname","ASC")},scope:this}});this.cachedStore.load()}return this.cachedStore}},initComponent:function(){this.items=[{xtype:"combobox",listConfig:{cls:"comments-tageditor-boundlist"},store:this.statics().getStore(),queryMode:"local",displayField:"tagname",valueField:"tagname",enableKeyEvents:true,emptyText:"New tag name...",listeners:{select:this.handleSelect,blur:this.destroy,keyup:this.onKeyUp,scope:this}}];this.callParent(arguments)},popup:function(b){this.show();this.alignTo(b,"bl",[-12,-2]);this.down("combobox").focus(true,100)},onKeyUp:function(c,d){if(d.keyCode===Ext.EventObject.ENTER){this.handleSelect()}else{if(d.keyCode===Ext.EventObject.ESC){this.destroy()}}},handleSelect:function(){var c=Ext.String.trim(this.down("combobox").getValue()||"");if(c){var d=this.rememberNewTag(c);this.fireEvent("select",d)}this.destroy()},rememberNewTag:function(g){var f=this.statics().getStore();var e=new RegExp("^"+Ext.String.escapeRegex(g)+"$","i");var h=f.query("tagname",e);if(h.getCount()===0){f.add({tagname:g});f.sort("tagname","ASC");return g}else{return h.get(0).get("tagname")}}});Ext.define("Docs.view.comments.List",{extend:"Ext.view.View",alias:"widget.commentsList",requires:["Docs.Auth","Docs.Syntax","Docs.Comments","Docs.view.comments.Template","Docs.view.comments.Form","Docs.view.comments.TagEditor","Docs.view.comments.RepliesExpander","Docs.view.comments.DragZone","Docs.view.comments.DropZone","Docs.model.Comment","Docs.Tip"],componentCls:"comments-list",itemSelector:"div.comment",emptyText:'
Loading...
',deferEmptyText:false,initComponent:function(){this.store=Ext.create("Ext.data.Store",{model:"Docs.model.Comment",listeners:{update:this.fireChangeEvent,scope:this}});this.tpl=Docs.view.comments.Template.create({showTarget:this.showTarget,enableDragDrop:this.enableDragDrop});this.callParent(arguments);this.on("refresh",function(){Docs.Syntax.highlight(this.getEl());this.renderExpanders(this.store.getRange())},this);this.on("itemupdate",function(f,e,d){Docs.Syntax.highlight(d);this.renderExpanders([f])},this)},renderExpanders:function(b){if(b[0]&&b[0].get("parentId")){return}Ext.Array.forEach(b,function(a){if(a.get("deleted")){return}new Docs.view.comments.RepliesExpander({count:a.get("replyCount"),target:a.get("target"),parentId:a.get("id"),renderTo:this.getNode(a)})},this)},afterRender:function(){this.callParent(arguments);this.mun(this.getTargetEl(),"keydown");this.delegateClick("a.voteCommentUp",function(d,c){this.vote(d,c,"up")},this);this.delegateClick("a.voteCommentDown",function(d,c){this.vote(d,c,"down")},this);this.delegateClick("a.editComment",function(d,c){this.edit(d,c)},this);this.delegateClick("a.deleteComment",function(d,c){this.setDeleted(d,c,true)},this);this.delegateClick("a.undoDeleteComment",function(d,c){this.setDeleted(d,c,false)},this);this.delegateClick("a.readComment",this.markRead,this);this.delegateClick("a.add-tag",this.addTag,this);this.delegateClick("a.remove-tag",this.removeTag,this);if(this.enableDragDrop){new Docs.view.comments.DragZone(this);new Docs.view.comments.DropZone(this,{onValidDrop:Ext.Function.bind(this.setParent,this)})}},delegateClick:function(e,f,d){this.getEl().on("click",function(b,c){var a=this.getRecord(this.findItemByChild(c));if(a){f.call(d,c,a)}},this,{preventDefault:true,delegate:e})},vote:function(e,f,d){if(!Docs.Auth.isLoggedIn()){Docs.Tip.show("Please login to vote on this comment",e);return}if(f.get("upVote")&&d==="up"||f.get("downVote")&&d==="down"){Docs.Tip.show("You have already voted on this comment",e);return}f.vote(d,{failure:function(a){Docs.Tip.show(a,e)}})},edit:function(d,c){c.loadContent(function(a){var b=Ext.get(d).up(".comment").down(".content");b.update("");new Docs.view.comments.Form({renderTo:b,title:"Edit comment",user:Docs.Auth.getUser(),content:a,listeners:{submit:function(f){c.saveContent(f)},cancel:function(){this.refreshComment(c)},scope:this}})},this)},refreshComment:function(b){this.refreshNode(this.getStore().findExact("id",b.get("id")))},setDeleted:function(d,f,e){f.setDeleted(e)},markRead:function(d,c){c.markRead()},addTag:function(d,f){var e=new Docs.view.comments.TagEditor();e.on("select",f.addTag,f);e.popup(d)},removeTag:function(e,f){var d=Ext.get(e).up(".tag").down("b").getHTML();f.removeTag(d)},setParent:function(c,d){c.setParent(d,function(){this.fireEvent("reorder")},this)},load:function(f,e){if(f.length===0){this.emptyText=""}var d=this.store.getProxy().getReader().readRecords(f).records;this.store.loadData(d,e);this.fireChangeEvent()},fireChangeEvent:function(){var b=function(a){return !a.get("deleted")};this.fireEvent("countChange",this.getStore().queryBy(b).getCount())}});Ext.define("Docs.view.comments.FullList",{extend:"Ext.panel.Panel",alias:"widget.commentsFullList",requires:["Docs.Settings","Docs.Auth","Docs.Comments","Docs.view.comments.List","Docs.view.comments.Pager"],componentCls:"comments-full-list",dockedItems:[{xtype:"container",dock:"top",height:35,html:['

Comments

','

','',"

"].join(" ")}],layout:"border",items:[{xtype:"tabpanel",cls:"comments-tabpanel",plain:true,region:"north",height:25,items:[{title:"Recent"},{title:"Votes"}]},{region:"center",xtype:"container",autoScroll:true,cls:"iScroll",items:[{xtype:"commentsList",id:"recentcomments",showTarget:true},{xtype:"commentsPager"}]}],afterRender:function(){this.callParent(arguments);this.initCheckboxes();this.initTabs();this.setMasked(true)},load:function(f,e){this.down("commentsList").load(f,e);var d=f[f.length-1];if(d){this.down("commentsPager").configure(d)}else{this.down("commentsPager").reset()}},setMasked:function(c){var d=this.getEl();if(d){d[c?"mask":"unmask"]()}},initCheckboxes:function(){var f=Docs.Settings.get("comments");var e=Ext.get("hideRead");if(e){e.dom.checked=f.hideRead;e.on("change",function(){this.saveSetting("hideRead",e.dom.checked);this.fireEvent("hideReadChange")},this)}this.setHideReadVisibility();var d=Docs.App.getController("Auth");d.on("available",this.setHideReadVisibility,this);d.on("loggedIn",this.setHideReadVisibility,this);d.on("loggedOut",this.setHideReadVisibility,this)},setHideReadVisibility:function(){var b=Docs.Auth.isModerator();Ext.get("hideRead").up("label").setStyle("display",b?"inline":"none")},initTabs:function(){this.down("tabpanel[cls=comments-tabpanel]").on("tabchange",function(d,c){if(c.title==="Recent"){this.fireEvent("sortOrderChange","recent")}else{this.fireEvent("sortOrderChange","votes")}},this)},saveSetting:function(d,e){var f=Docs.Settings.get("comments");f[d]=e;Docs.Settings.set("comments",f)},getTab:function(){return Docs.Comments.isEnabled()?{cls:"comments",href:"#!/comment",tooltip:"Comments"}:false}});Ext.define("Docs.view.comments.Index",{extend:"Ext.panel.Panel",alias:"widget.commentindex",mixins:["Docs.view.Scrolling"],requires:["Docs.Comments","Docs.view.comments.FullList","Docs.view.comments.HeaderMenu","Docs.view.comments.Users","Docs.view.comments.Targets","Docs.view.comments.Tags"],componentCls:"comments-index",margin:"10 0 0 0",layout:"border",items:[{region:"center",xtype:"commentsFullList"},{region:"east",itemId:"cardPanel",layout:"border",width:300,margin:"0 0 0 20",layout:"card",dockedItems:[{xtype:"commentsHeaderMenu",dock:"top",height:35}],items:[{xtype:"commentsUsers"},{xtype:"commentsTargets"},{xtype:"commentsTags"}]}],initComponent:function(){this.callParent(arguments);var d=this.down("#cardPanel");var c={users:this.down("commentsUsers"),targets:this.down("commentsTargets"),tags:this.down("commentsTags")};this.down("commentsHeaderMenu").on("select",function(a){Ext.Object.each(c,function(b,f){if(b!==a){f.deselectAll()}});d.getLayout().setActiveItem(c[a])},this)},getTab:function(){return Docs.Comments.isEnabled()?{cls:"comments",href:"#!/comment",tooltip:"Comments"}:false}});Ext.define("Docs.view.HoverMenu",{extend:"Ext.view.View",requires:["Docs.Comments","Docs.view.Signature"],alias:"widget.hovermenu",componentCls:"hover-menu",itemSelector:"div.item",deferEmptyText:false,columnHeight:25,initComponent:function(){this.renderTo=Ext.getBody();this.tpl=new Ext.XTemplate("","","","","
",'','
',"{[this.renderLink(values)]}","
",'',"
","","","
",{columnHeight:this.columnHeight,renderLink:function(e){var d=Docs.view.Signature.render(e.meta);var f=Docs.Comments.counterHtml(e.commentCount);return Ext.String.format('{1} {2} {3}',e.url,e.label,d,f)}});this.callParent()}});Ext.define("Docs.view.HoverMenuButton",{extend:"Ext.toolbar.TextItem",alias:"widget.hovermenubutton",componentCls:"hover-menu-button",requires:["Docs.view.HoverMenu"],showCount:false,statics:{menus:[]},initComponent:function(){this.addEvents("click");if(this.showCount){this.initialText=this.text;this.text+=" "+this.store.getCount()+"";this.store.on("datachanged",function(){this.setText(this.initialText+" "+this.store.getCount()+"")},this)}this.callParent(arguments)},getColumnHeight:function(){var c=200;var d=18;return Math.floor((Ext.Element.getViewportHeight()-c)/d)},onRender:function(){this.callParent(arguments);this.getEl().on({click:function(){this.fireEvent("click")},mouseover:this.deferShowMenu,mouseout:this.deferHideMenu,scope:this})},onDestroy:function(){if(this.menu){this.menu.destroy();Ext.Array.remove(Docs.view.HoverMenuButton.menus,this.menu)}this.callParent(arguments)},renderMenu:function(){this.menu=Ext.create("Docs.view.HoverMenu",{store:this.store,columnHeight:this.getColumnHeight()});this.menu.getEl().on({click:function(b){this.menu.hide();b.preventDefault()},mouseover:function(){clearTimeout(this.hideTimeout)},mouseout:this.deferHideMenu,scope:this});Docs.view.HoverMenuButton.menus.push(this.menu)},deferHideMenu:function(){clearTimeout(Docs.view.HoverMenuButton.showTimeout);if(!this.menu){return}this.hideTimeout=Ext.Function.defer(function(){this.menu.hide()},200,this)},deferShowMenu:function(){clearTimeout(Docs.view.HoverMenuButton.showTimeout);Docs.view.HoverMenuButton.showTimeout=Ext.Function.defer(function(){if(!this.menu){this.renderMenu()}Ext.Array.forEach(Docs.view.HoverMenuButton.menus,function(a){if(a!==this.menu){a.hide()}},this);clearTimeout(this.hideTimeout);this.menu.show();var j=this.getEl().getXY(),n=Ext.ComponentQuery.query("classoverview toolbar")[0],k=j[0]-10,l=n.getEl().getXY(),i=n.getWidth(),m=this.menu.getEl().getWidth(),h=Ext.getCmp("doctabs").getWidth();if(m>h){k=0}else{if((k+m)>h){k=h-m-30}}if(kd.name?1:0)});if(a.length>0){var f=this.createMemberButton({text:e.toolbar_title||e.title,type:e.name,members:a});this.memberButtons[e.name]=f;this.items.push(f)}},this);this.checkItems={"public":this.createCb("Public","public"),"protected":this.createCb("Protected","protected"),"private":this.createCb("Private","private"),inherited:this.createCb("Inherited","inherited"),accessor:this.createCb("Accessor","accessor"),deprecated:this.createCb("Deprecated","deprecated"),removed:this.createCb("Removed","removed")};var b=this;this.items=this.items.concat([{xtype:"tbfill"},this.filterField=Ext.widget("triggerfield",{triggerCls:"reset",cls:"member-filter",hideTrigger:true,emptyText:"Filter class members",enableKeyEvents:true,width:150,listeners:{keyup:function(a){this.fireEvent("filter",a.getValue(),this.getShowFlags());a.setHideTrigger(a.getValue().length===0)},specialkey:function(d,a){if(a.keyCode===Ext.EventObject.ESC){d.reset();this.fireEvent("filter","",this.getShowFlags())}},scope:this},onTriggerClick:function(){this.reset();this.focus();b.fireEvent("filter","",b.getShowFlags());this.setHideTrigger(true)}}),{xtype:"tbspacer",width:10},this.commentCount=this.createCommentCount(),{xtype:"button",text:"Show",menu:[this.checkItems["public"],this.checkItems["protected"],this.checkItems["private"],"-",this.checkItems.inherited,this.checkItems.accessor,this.checkItems.deprecated,this.checkItems.removed]},{xtype:"button",iconCls:"expand-all-members",tooltip:"Expand all",enableToggle:true,toggleHandler:function(a,d){a.setIconCls(d?"collapse-all-members":"expand-all-members");this.fireEvent("toggleExpanded",d)},scope:this}]);this.callParent(arguments)},getShowFlags:function(){var d={};for(var c in this.checkItems){d[c]=this.checkItems[c].checked}return d},createCb:function(c,d){return Ext.widget("menucheckitem",{text:c,checked:Docs.Settings.get("show")[d],listeners:{checkchange:function(){this.fireEvent("filter",this.filterField.getValue(),this.getShowFlags())},scope:this}})},createMemberButton:function(d){var c=Ext.Array.map(d.members,function(a){return this.createLinkRecord(this.docClass.name,a)},this);return Ext.create("Docs.view.HoverMenuButton",{text:d.text,cls:"icon-"+d.type,store:this.createStore(c),showCount:true,listeners:{click:function(){this.fireEvent("menubuttonclick",d.type)},scope:this}})},createStore:function(c){var d=Ext.create("Ext.data.Store",{fields:["id","url","label","inherited","accessor","meta","commentCount"]});d.add(c);return d},createLinkRecord:function(d,c){return{id:c.id,url:d+"-"+c.id,label:(c.tagname==="method"&&c.name==="constructor")?"new "+d:c.name,inherited:c.owner!==d,accessor:c.tagname==="method"&&this.accessors.hasOwnProperty(c.name),meta:c.meta,commentCount:Docs.Comments.getCount(["class",d,c.id])}},showMenuItems:function(d,e,f){Ext.Array.forEach(Docs.data.memberTypes,function(b){var c=this.memberButtons[b.name];if(c){c.getStore().filterBy(function(h){return !(!d["public"]&&!(h.get("meta")["private"]||h.get("meta")["protected"])||!d["protected"]&&h.get("meta")["protected"]||!d["private"]&&h.get("meta")["private"]||!d.inherited&&h.get("inherited")||!d.accessor&&h.get("accessor")||!d.deprecated&&h.get("meta")["deprecated"]||!d.removed&&h.get("meta")["removed"]||e&&!f.test(h.get("label")))});var a=c.menu;if(a&&Ext.getVersion().version>="4.1.0"){a.show();a.hide()}}},this)},getFilterValue:function(){return this.filterField.getValue()},createCommentCount:function(){return Ext.create("Ext.container.Container",{width:24,margin:"0 4 0 0",cls:"comment-btn",html:"0",hidden:true,listeners:{afterrender:function(b){b.el.addListener("click",function(){this.fireEvent("commentcountclick")},this)},scope:this}})},showCommentCount:function(){this.commentCount.show()},setCommentCount:function(b){this.commentCount.update(""+(b||0));this.refreshMenuCommentCounts()},refreshMenuCommentCounts:function(){Ext.Object.each(this.memberButtons,function(c,d){d.getStore().each(function(a){a.set("commentCount",Docs.Comments.getCount(["class",this.docClass.name,a.get("id")]))},this)},this)}});Ext.define("Docs.view.cls.Overview",{extend:"Ext.panel.Panel",alias:"widget.classoverview",requires:["Docs.view.cls.Toolbar","Docs.view.examples.Inline","Docs.view.comments.LargeExpander","Docs.view.cls.MemberWrap","Docs.view.comments.MemberWrap","Docs.Syntax","Docs.Settings","Docs.Comments"],mixins:["Docs.view.Scrolling"],cls:"class-overview iScroll",autoScroll:true,border:false,bodyPadding:"20 8 20 5",initComponent:function(){this.addEvents("afterload");this.callParent(arguments)},scrollToEl:function(j,h){var g=(typeof j=="string")?Ext.get(Ext.query(j)[0]):j;if(g){var f=g.hasCls("member");g.show();if(!g.isVisible(true)){g.up(".subsection").show();g.up(".members-section").show()}if(f&&g.down(".expandable")){this.setMemberExpanded(j.replace(/#/,""),true)}var i=this.body.getBox().y;this.scrollToView(g,{highlight:true,offset:(h||0)-(f?i:i-10)})}},load:function(b){this.docClass=b;this.accessors=this.buildAccessorsMap();if(this.toolbar){this.removeDocked(this.toolbar,false);this.toolbar.destroy()}this.toolbar=Ext.create("Docs.view.cls.Toolbar",{docClass:this.docClass,accessors:this.accessors,listeners:{filter:function(d,a){this.filterMembers(d,a)},menubuttonclick:function(a){this.scrollToEl("h3.members-title.icon-"+a,-20)},commentcountclick:this.expandClassComments,scope:this}});this.addDocked(this.toolbar);this.update(b.html);Docs.Syntax.highlight(this.getEl());this.filterMembers("",Docs.Settings.get("show"));if(Docs.Comments.isEnabled()){this.initComments()}else{this.initBasicMemberWrappers()}this.fireEvent("afterload")},initComments:function(){this.toolbar.showCommentCount();this.toolbar.setCommentCount(Docs.Comments.getCount(["class",this.docClass.name,""]));this.clsExpander=new Docs.view.comments.LargeExpander({name:this.docClass.name,el:Ext.query(".doc-contents")[0]});this.memberWrappers={};Ext.Array.forEach(Ext.query(".member"),function(c){var d=new Docs.view.comments.MemberWrap({parent:this,className:this.docClass.name,el:c});this.memberWrappers[d.getMemberId()]=d},this)},initBasicMemberWrappers:function(){this.memberWrappers={};Ext.Array.forEach(Ext.query(".member"),function(c){var d=new Docs.view.cls.MemberWrap({el:c});this.memberWrappers[d.getMemberId()]=d},this)},updateCommentCounts:function(){if(!this.docClass){return}var b=Docs.Comments.getCount(["class",this.docClass.name,""]);this.toolbar.setCommentCount(b);this.clsExpander.getExpander().setCount(b);Ext.Object.each(this.memberWrappers,function(a,d){d.setCount(Docs.Comments.getCount(d.getTarget()))},this)},expandClassComments:function(){var b=this.clsExpander.getExpander();b.expand();this.scrollToEl(b.getEl(),-40)},setMemberExpanded:function(c,d){this.memberWrappers[c].setExpanded(d)},isMemberExpanded:function(b){return this.memberWrappers[b].isExpanded()},setAllMembersExpanded:function(b){if(Docs.Comments.isEnabled()){Ext.Object.each(this.memberWrappers,function(a,d){d.getExpander().show()},this)}Ext.Object.each(this.memberWrappers,function(a,d){d.setExpanded(b)},this)},filterMembers:function(h,e){Docs.Settings.set("show",e);var f=h.length>0;Ext.Array.forEach(Ext.query(".doc-contents, .hierarchy"),function(a){Ext.get(a).setStyle({display:f?"none":"block"})});var g=new RegExp(Ext.String.escapeRegex(h),"i");this.eachMember(function(c){var b=Ext.get(c.id);var a=!(!e["public"]&&!(c.meta["private"]||c.meta["protected"])||!e["protected"]&&c.meta["protected"]||!e["private"]&&c.meta["private"]||!e.inherited&&(c.owner!==this.docClass.name)||!e.accessor&&c.tagname==="method"&&this.accessors.hasOwnProperty(c.name)||!e.deprecated&&c.meta.deprecated||!e.removed&&c.meta.removed||f&&!g.test(c.name));if(a){b.setStyle({display:"block"})}else{b.setStyle({display:"none"})}},this);Ext.Array.forEach(Ext.query(".member.first-child"),function(a){Ext.get(a).removeCls("first-child")});Ext.Array.forEach(Ext.query(".members-section"),function(b){var a=this.getVisibleElements(".member",b);Ext.get(b).setStyle({display:a.length>0?"block":"none"});Ext.Array.forEach(Ext.query(".subsection",b),function(d){var c=this.getVisibleElements(".member",d);if(c.length>0){c[0].addCls("first-child");Ext.get(d).setStyle({display:"block"})}else{Ext.get(d).setStyle({display:"none"})}},this)},this);this.toolbar.showMenuItems(e,f,g)},buildAccessorsMap:function(c){var d={};Ext.Array.forEach(this.docClass.members,function(b){if(b.tagname==="cfg"){var a=Ext.String.capitalize(b.name);d["get"+a]=true;d["set"+a]=true}});return d},getVisibleElements:function(e,d){var f=Ext.Array.map(Ext.query(e,d),function(a){return Ext.get(a)});return Ext.Array.filter(f,function(a){return a.isVisible()})},eachMember:function(c,d){Ext.Array.forEach(this.docClass.members,c,d)}});Ext.define("Docs.view.cls.Container",{extend:"Ext.container.Container",alias:"widget.classcontainer",requires:["Docs.view.cls.Header","Docs.view.cls.Overview"],layout:"border",padding:"5 10 0 10",initComponent:function(){this.items=[Ext.create("Docs.view.cls.Header",{region:"north"}),Ext.create("Docs.view.cls.Overview",{region:"center"})];this.callParent(arguments)}});Ext.define("Docs.view.Viewport",{extend:"Ext.container.Viewport",requires:["Docs.view.search.Container","Docs.view.Header","Docs.view.Tabs","Docs.view.TreeContainer","Docs.view.welcome.Index","Docs.view.auth.HeaderForm","Docs.view.comments.Index","Docs.view.cls.Index","Docs.view.cls.Container","Docs.view.guides.Index","Docs.view.guides.Container","Docs.view.videos.Index","Docs.view.videos.Container","Docs.view.examples.Index","Docs.view.examples.Container","Docs.view.examples.TouchContainer","Docs.view.tests.Index"],id:"viewport",layout:"border",defaults:{xtype:"container"},initComponent:function(){this.items=[{region:"north",id:"north-region",height:65,layout:{type:"vbox",align:"stretch"},items:[{height:37,xtype:"container",layout:"hbox",items:[{xtype:"docheader"},{xtype:"container",flex:1},{id:"loginContainer",xtype:"authHeaderForm",padding:"10 20 0 0"},{xtype:"searchcontainer",id:"search-container",width:230,margin:"4 0 0 0"}]},{xtype:"doctabs"}]},{region:"center",layout:"border",items:[{region:"west",xtype:"treecontainer",id:"treecontainer",border:1,bodyPadding:"10 9 4 9",width:240},{region:"center",id:"center-container",layout:"fit",border:false,padding:"5 10",items:{id:"card-panel",cls:"card-panel",xtype:"container",layout:{type:"card",deferredRender:true},items:[{autoScroll:true,xtype:"welcomeindex",id:"welcomeindex"},{xtype:"container",id:"failure"},{autoScroll:true,xtype:"classindex",id:"classindex"},{xtype:"classcontainer",id:"classcontainer"},{autoScroll:true,xtype:"guideindex",id:"guideindex"},{autoScroll:true,xtype:"guidecontainer",id:"guide",cls:"iScroll"},{xtype:"videoindex",id:"videoindex"},{autoScroll:true,xtype:"videocontainer",id:"video",cls:"iScroll"},{xtype:"exampleindex",id:"exampleindex"},{xtype:Docs.data.touchExamplesUi?"touchexamplecontainer":"examplecontainer",id:"example"},{xtype:"testsindex",id:"testsindex"},{xtype:"commentindex",id:"commentindex"}]}}]},{region:"south",id:"footer",height:20,contentEl:"footer-content"}];this.callParent(arguments)},setPageTitle:function(b){b=Ext.util.Format.stripTags(b);if(!this.origTitle){this.origTitle=document.title}document.title=b?(b+" - "+this.origTitle):this.origTitle}});Ext.define("Docs.Application",{requires:["Ext.app.Application","Docs.History","Docs.Comments","Docs.Settings","Docs.view.Viewport","Docs.controller.Auth","Docs.controller.Welcome","Docs.controller.Failure","Docs.controller.Classes","Docs.controller.Search","Docs.controller.InlineExamples","Docs.controller.Examples","Docs.controller.Guides","Docs.controller.Videos","Docs.controller.Tabs","Docs.controller.Comments","Docs.controller.CommentCounts","Docs.controller.Tests"],constructor:function(){Docs.Comments.init(this.createApp,this)},createApp:function(){new Ext.app.Application({name:"Docs",controllers:["Auth","Welcome","Failure","Classes","Search","InlineExamples","Examples","Guides","Videos","Tabs","Comments","CommentCounts","Tests"],launch:this.launch})},launch:function(){Docs.App=this;Docs.Settings.init();Ext.create("Docs.view.Viewport");Docs.History.init();if(Docs.initEventTracking){Docs.initEventTracking()}Ext.get("loading").remove()}});Ext.define("Docs.view.auth.Form",{extend:"Docs.view.auth.BaseForm",alias:"widget.authForm",componentCls:"auth-form",initComponent:function(){this.html=['Sign in to post a comment:',this.createLoginFormHtml()];this.callParent(arguments)},afterRender:function(){this.callParent(arguments);this.bindFormSubmitEvent()}});Ext.define("Docs.view.comments.ListWithForm",{extend:"Ext.container.Container",alias:"widget.commentsListWithForm",requires:["Docs.view.comments.List","Docs.view.comments.Form","Docs.view.auth.Form","Docs.Comments","Docs.Auth"],componentCls:"comments-list-with-form",initComponent:function(){this.items=[this.list=new Docs.view.comments.List({enableDragDrop:true})];this.relayEvents(this.list,["countChange","reorder"]);this.callParent(arguments)},load:function(c,d){this.list.load(c,d);if(Docs.Auth.isLoggedIn()){this.showCommentingForm()}else{this.showAuthForm()}},showAuthForm:function(){if(this.commentingForm){this.remove(this.commentingForm);delete this.commentingForm}if(!this.authForm){this.authForm=new Docs.view.auth.Form();this.add(this.authForm)}},showCommentingForm:function(){if(this.authForm){this.remove(this.authForm);delete this.authForm}if(!this.commentingForm){this.commentingForm=new Docs.view.comments.Form({title:this.newCommentTitle,user:Docs.Auth.getUser(),userSubscribed:Docs.Comments.hasSubscription(this.target),listeners:{submit:this.postComment,subscriptionChange:this.subscribe,scope:this}});this.add(this.commentingForm)}},postComment:function(b){Docs.Comments.post({target:this.target,parentId:this.parentId,content:b,callback:function(a){this.commentingForm.setValue("");this.list.load([a],true)},scope:this})},subscribe:function(b){Docs.Comments.subscribe(this.target,b,function(){this.commentingForm.showSubscriptionMessage(b)},this)}});Ext.ns("Docs");Ext.Loader.setConfig({enabled:true,paths:{Docs:"app"}});Ext.require("Ext.form.field.Trigger");Ext.require("Ext.tab.Panel");Ext.require("Ext.grid.column.Action");Ext.require("Ext.grid.plugin.DragDrop");Ext.require("Ext.layout.container.Border");Ext.require("Ext.data.TreeStore");Ext.require("Ext.toolbar.Spacer");Ext.require("Docs.Application");Ext.onReady(function(){Ext.create("Docs.Application")});!function(){var a=null;window.PR_SHOULD_USE_CONTINUATION=!0;(function(){function h(J){function G(O){var M=O.charCodeAt(0);if(M!==92){return M}var N=O.charAt(1);return(M=p[N])?M:"0"<=N&&N<="7"?parseInt(O.substring(1),8):N==="u"||N==="x"?parseInt(O.substring(2),16):O.charCodeAt(1)}function F(M){if(M<32){return(M<16?"\\x0":"\\x")+M.toString(16)}M=String.fromCharCode(M);return M==="\\"||M==="-"||M==="]"||M==="^"?"\\"+M:M}function I(R){var M=R.substring(1,R.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),R=[],O=M[0]==="^",S=["["];O&&S.push("^");for(var O=O?1:0,Q=M.length;O122||(N<65||P>90||R.push([Math.max(65,P)|32,Math.min(N,90)|32]),N<97||P>122||R.push([Math.max(97,P)&-33,Math.min(N,122)&-33]))}}R.sort(function(U,T){return U[0]-T[0]||T[1]-U[1]});M=[];Q=[];for(O=0;OP[0]&&(P[1]+1>P[0]&&S.push("-"),S.push(F(P[1])))}S.push("]");return S.join("")}function L(Q){for(var N=Q.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),S=N.length,R=[],P=0,O=0;P=2&&Q==="["?N[P]=I(M):Q!=="\\"&&(N[P]=M.replace(/[A-Za-z]/g,function(T){T=T.charCodeAt(0);return"["+String.fromCharCode(T&-33,T|32)+"]"}))}}return N.join("")}for(var K=0,y=!1,D=!1,C=0,H=J.length;C=5&&"lang-"===S.substring(0,5))&&!(T&&typeof T[1]==="string")){N=!1,S="src"}N||(F[P]=S)}M=Q;Q+=P.length;if(N){N=T[1];var I=P.indexOf(N),G=I+N.length;T[2]&&(G=P.length-T[2].length,I=G-N.length);S=S.substring(5);t(K+M,P.substring(0,I),D,J);t(K+M+I,N,s(S,N),J);t(K+M+G,P.substring(G),D,J)}else{J.push(K+M,S)}}R.g=J}var v={},C;(function(){for(var J=y.concat(E),G=[],F={},M=0,H=J.length;M=0;){v[L.charAt(K)]=I}}I=I[1];L=""+I;F.hasOwnProperty(L)||(G.push(I),F[L]=a)}G.push(/[\S\s]/);C=h(G)})();var p=E.length;return D}function u(v){var D=[],C=[];v.tripleQuotedStrings?D.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,a,"'\""]):v.multiLineStrings?D.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,a,"'\"`"]):D.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,a,"\"'"]);v.verbatimStrings&&C.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,a]);var p=v.hashComments;p&&(v.cStyleComments?(p>1?D.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,a,"#"]):D.push(["com",/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\n\r]*)/,a,"#"]),C.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,a])):D.push(["com",/^#[^\n\r]*/,a,"#"]));v.cStyleComments&&(C.push(["com",/^\/\/[^\n\r]*/,a]),C.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,a]));if(p=v.regexLiterals){var y=(p=p>1?"":"\n\r")?".":"[\\S\\s]";C.push(["lang-regex",RegExp("^(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*("+("/(?=[^/*"+p+"])(?:[^/\\x5B\\x5C"+p+"]|\\x5C"+y+"|\\x5B(?:[^\\x5C\\x5D"+p+"]|\\x5C"+y+")*(?:\\x5D|$))+/")+")")])}(p=v.types)&&C.push(["typ",p]);p=(""+v.keywords).replace(/^ | $/g,"");p.length&&C.push(["kwd",RegExp("^(?:"+p.replace(/[\s,]+/g,"|")+")\\b"),a]);D.push(["pln",/^\s+/,a," \r\n\t\u00a0"]);p="^.[^\\s\\w.$@'\"`/\\\\]*";v.regexLiterals&&(p+="(?!s*/)");C.push(["lit",/^@[$_a-z][\w$@]*/i,a],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,a],["pln",/^[$_a-z][\w$@]*/i,a],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,a,"0123456789"],["pln",/^\\[\S\s]?/,a],["pun",RegExp(p),a]);return A(D,C)}function q(J,G,F){function I(M){var P=M.nodeType;if(P==1&&!K.test(M.className)){if("br"===M.nodeName){L(M),M.parentNode&&M.parentNode.removeChild(M)}else{for(M=M.firstChild;M;M=M.nextSibling){I(M)}}}else{if((P==3||P==4)&&F){var O=M.nodeValue,N=O.match(y);if(N){P=O.substring(0,N.index),M.nodeValue=P,(O=O.substring(N.index+N[0].length))&&M.parentNode.insertBefore(D.createTextNode(O),M.nextSibling),L(M),P||M.parentNode.removeChild(M)}}}}function L(N){function M(P,U){var T=U?P.cloneNode(!1):P,S=P.parentNode;if(S){var S=M(S,1),R=P.nextSibling;S.appendChild(T);for(var Q=R;Q;Q=R){R=Q.nextSibling,S.appendChild(Q)}}return T}for(;!N.nextSibling;){if(N=N.parentNode,!N){return}}for(var N=M(N.nextSibling,0),O;(O=N.parentNode)&&O.nodeType===1;){N=O}H.push(N)}for(var K=/(?:^|\s)nocode(?:\s|$)/,y=/\r\n?|\n/,D=J.ownerDocument,C=D.createElement("li");J.firstChild;){C.appendChild(J.firstChild)}for(var H=[C],E=0;E=0;){var p=C[y];w.hasOwnProperty(p)?z.console&&console.warn("cannot override language handler %s",p):w[p]=v}}function s(p,v){if(!p||!w.hasOwnProperty(p)){p=/^\s*=S&&(ac+=2);X>=M&&(K+=2)}}finally{if(Y){Y.style.display=W}}}catch(H){z.console&&console.log(H&&H.stack||H)}}var z=window,r=["break,continue,do,else,for,if,return,while"],x=[[r,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],n=[x,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],m=[x,"abstract,assert,boolean,byte,extends,final,finally,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],l=[m,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,internal,into,is,let,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var,virtual,where"],x=[x,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],k=[r,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],j=[r,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],d=[r,"as,assert,const,copy,drop,enum,extern,fail,false,fn,impl,let,log,loop,match,mod,move,mut,priv,pub,pure,ref,self,static,struct,true,trait,type,unsafe,use"],r=[r,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],i=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,e=/\S/,c=u({keywords:[n,l,x,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",k,j,r],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),w={};B(c,["default-code"]);B(A([],[["pln",/^[^]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);B(A([["pln",/^\s+/,a," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,a,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css",/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);B(A([],[["atv",/^[\S\s]+/]]),["uq.val"]);B(u({keywords:n,hashComments:!0,cStyleComments:!0,types:i}),["c","cc","cpp","cxx","cyc","m"]);B(u({keywords:"null,true,false"}),["json"]);B(u({keywords:l,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:i}),["cs"]);B(u({keywords:m,cStyleComments:!0}),["java"]);B(u({keywords:r,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]);B(u({keywords:k,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]);B(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]);B(u({keywords:j,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]);B(u({keywords:x,cStyleComments:!0,regexLiterals:!0}),["javascript","js"]);B(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);B(u({keywords:d,cStyleComments:!0,multilineStrings:!0}),["rc","rs","rust"]);B(A([],[["str",/^[\S\s]+/]]),["regex"]);var b=z.PR={createSimpleLexer:A,registerLangHandler:B,sourceDecorator:u,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ",prettyPrintOne:z.prettyPrintOne=function(v,C,y){var p=document.createElement("div");p.innerHTML="
"+v+"
";p=p.firstChild;y&&q(p,y,!0);o({h:C,j:y,c:p,i:1});return p.innerHTML},prettyPrint:z.prettyPrint=function(T,Q){function N(){for(var v=z.PR_SHOULD_USE_CONTINUATION?R.now()+250:Infinity;L + + + + + + Dreem Examples + + + + + + + + + + + + + + + + diff --git a/docs/api/extjs/ext-all.js b/docs/api/extjs/ext-all.js new file mode 100644 index 00000000..46aeaa00 --- /dev/null +++ b/docs/api/extjs/ext-all.js @@ -0,0 +1,38 @@ +/* +Ext JS 4.1 - JavaScript Library +Copyright (c) 2006-2012, Sencha Inc. +All rights reserved. +licensing@sencha.com + +http://www.sencha.com/license + +Open Source License +------------------------------------------------------------------------------------------ +This version of Ext JS is licensed under the terms of the Open Source GPL 3.0 license. + +http://www.gnu.org/licenses/gpl.html + +There are several FLOSS exceptions available for use with this release for +open source applications that are distributed under a license other than GPL. + +* Open Source License Exception for Applications + + http://www.sencha.com/products/floss-exception.php + +* Open Source License Exception for Development + + http://www.sencha.com/products/ux-exception.php + + +Alternate Licensing +------------------------------------------------------------------------------------------ +Commercial and OEM Licenses are available for an alternate download of Ext JS. +This is the appropriate option if you are creating proprietary applications and you are +not prepared to distribute and share the source code of your application under the +GPL v3 license. Please visit http://www.sencha.com/license for more details. + +-- + +This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT OF THIRD-PARTY INTELLECTUAL PROPERTY RIGHTS. See the GNU General Public License for more details. +*/ +var Ext=Ext||{};Ext._startTime=new Date().getTime();(function(){var h=this,a=Object.prototype,j=a.toString,b=true,g={toString:1},e=function(){},d=function(){var i=d.caller.caller;return i.$owner.prototype[i.$name].apply(this,arguments)},c;Ext.global=h;for(c in g){b=null}if(b){b=["hasOwnProperty","valueOf","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","constructor"]}Ext.enumerables=b;Ext.apply=function(o,n,q){if(q){Ext.apply(o,q)}if(o&&n&&typeof n==="object"){var p,m,l;for(p in n){o[p]=n[p]}if(b){for(m=b.length;m--;){l=b[m];if(n.hasOwnProperty(l)){o[l]=n[l]}}}}return o};Ext.buildSettings=Ext.apply({baseCSSPrefix:"x-",scopeResetCSS:false},Ext.buildSettings||{});Ext.apply(Ext,{name:Ext.sandboxName||"Ext",emptyFn:e,emptyString:new String(),baseCSSPrefix:Ext.buildSettings.baseCSSPrefix,applyIf:function(k,i){var l;if(k){for(l in i){if(k[l]===undefined){k[l]=i[l]}}}return k},iterate:function(i,l,k){if(Ext.isEmpty(i)){return}if(k===undefined){k=i}if(Ext.isIterable(i)){Ext.Array.each.call(Ext.Array,i,l,k)}else{Ext.Object.each.call(Ext.Object,i,l,k)}}});Ext.apply(Ext,{extend:(function(){var i=a.constructor,k=function(n){for(var l in n){if(!n.hasOwnProperty(l)){continue}this[l]=n[l]}};return function(l,q,o){if(Ext.isObject(q)){o=q;q=l;l=o.constructor!==i?o.constructor:function(){q.apply(this,arguments)}}var n=function(){},m,p=q.prototype;n.prototype=p;m=l.prototype=new n();m.constructor=l;l.superclass=p;if(p.constructor===i){p.constructor=q}l.override=function(r){Ext.override(l,r)};m.override=k;m.proto=m;l.override(o);l.extend=function(r){return Ext.extend(l,r)};return l}}()),override:function(m,n){if(m.$isClass){m.override(n)}else{if(typeof m=="function"){Ext.apply(m.prototype,n)}else{var i=m.self,k,l;if(i&&i.$isClass){for(k in n){if(n.hasOwnProperty(k)){l=n[k];if(typeof l=="function"){l.$name=k;l.$owner=i;l.$previous=m.hasOwnProperty(k)?m[k]:d}m[k]=l}}}else{Ext.apply(m,n)}}}return m}});Ext.apply(Ext,{valueFrom:function(l,i,k){return Ext.isEmpty(l,k)?i:l},typeOf:function(k){var i,l;if(k===null){return"null"}i=typeof k;if(i==="undefined"||i==="string"||i==="number"||i==="boolean"){return i}l=j.call(k);switch(l){case"[object Array]":return"array";case"[object Date]":return"date";case"[object Boolean]":return"boolean";case"[object Number]":return"number";case"[object RegExp]":return"regexp"}if(i==="function"){return"function"}if(i==="object"){if(k.nodeType!==undefined){if(k.nodeType===3){return(/\S/).test(k.nodeValue)?"textnode":"whitespace"}else{return"element"}}return"object"}},isEmpty:function(i,k){return(i===null)||(i===undefined)||(!k?i==="":false)||(Ext.isArray(i)&&i.length===0)},isArray:("isArray" in Array)?Array.isArray:function(i){return j.call(i)==="[object Array]"},isDate:function(i){return j.call(i)==="[object Date]"},isObject:(j.call(null)==="[object Object]")?function(i){return i!==null&&i!==undefined&&j.call(i)==="[object Object]"&&i.ownerDocument===undefined}:function(i){return j.call(i)==="[object Object]"},isSimpleObject:function(i){return i instanceof Object&&i.constructor===Object},isPrimitive:function(k){var i=typeof k;return i==="string"||i==="number"||i==="boolean"},isFunction:(typeof document!=="undefined"&&typeof document.getElementsByTagName("body")==="function")?function(i){return j.call(i)==="[object Function]"}:function(i){return typeof i==="function"},isNumber:function(i){return typeof i==="number"&&isFinite(i)},isNumeric:function(i){return !isNaN(parseFloat(i))&&isFinite(i)},isString:function(i){return typeof i==="string"},isBoolean:function(i){return typeof i==="boolean"},isElement:function(i){return i?i.nodeType===1:false},isTextNode:function(i){return i?i.nodeName==="#text":false},isDefined:function(i){return typeof i!=="undefined"},isIterable:function(k){var i=typeof k,l=false;if(k&&i!="string"){if(i=="function"){if(Ext.isSafari){l=k instanceof NodeList||k instanceof HTMLCollection}}else{l=true}}return l?k.length!==undefined:false}});Ext.apply(Ext,{clone:function(q){var p,o,m,l,r,n;if(q===null||q===undefined){return q}if(q.nodeType&&q.cloneNode){return q.cloneNode(true)}p=j.call(q);if(p==="[object Date]"){return new Date(q.getTime())}if(p==="[object Array]"){o=q.length;r=[];while(o--){r[o]=Ext.clone(q[o])}}else{if(p==="[object Object]"&&q.constructor===Object){r={};for(n in q){r[n]=Ext.clone(q[n])}if(b){for(m=b.length;m--;){l=b[m];r[l]=q[l]}}}}return r||q},getUniqueGlobalNamespace:function(){var l=this.uniqueGlobalNamespace,k;if(l===undefined){k=0;do{l="ExtBox"+(++k)}while(Ext.global[l]!==undefined);Ext.global[l]=Ext;this.uniqueGlobalNamespace=l}return l},functionFactoryCache:{},cacheableFunctionFactory:function(){var o=this,l=Array.prototype.slice.call(arguments),k=o.functionFactoryCache,i,m,n;if(Ext.isSandboxed){n=l.length;if(n>0){n--;l[n]="var Ext=window."+Ext.name+";"+l[n]}}i=l.join("");m=k[i];if(!m){m=Function.prototype.constructor.apply(Function.prototype,l);k[i]=m}return m},functionFactory:function(){var l=this,i=Array.prototype.slice.call(arguments),k;if(Ext.isSandboxed){k=i.length;if(k>0){k--;i[k]="var Ext=window."+Ext.name+";"+i[k]}}return Function.prototype.constructor.apply(Function.prototype,i)},Logger:{verbose:e,log:e,info:e,warn:e,error:function(i){throw new Error(i)},deprecate:e}});Ext.type=Ext.typeOf}());Ext.globalEval=Ext.global.execScript?function(a){execScript(a)}:function($$code){(function(){eval($$code)}())};(function(){var a="4.1.1.1",b;Ext.Version=b=Ext.extend(Object,{constructor:function(c){var e,d;if(c instanceof b){return c}this.version=this.shortVersion=String(c).toLowerCase().replace(/_/g,".").replace(/[\-+]/g,"");d=this.version.search(/([^\d\.])/);if(d!==-1){this.release=this.version.substr(d,c.length);this.shortVersion=this.version.substr(0,d)}this.shortVersion=this.shortVersion.replace(/[^\d]/g,"");e=this.version.split(".");this.major=parseInt(e.shift()||0,10);this.minor=parseInt(e.shift()||0,10);this.patch=parseInt(e.shift()||0,10);this.build=parseInt(e.shift()||0,10);return this},toString:function(){return this.version},valueOf:function(){return this.version},getMajor:function(){return this.major||0},getMinor:function(){return this.minor||0},getPatch:function(){return this.patch||0},getBuild:function(){return this.build||0},getRelease:function(){return this.release||""},isGreaterThan:function(c){return b.compare(this.version,c)===1},isGreaterThanOrEqual:function(c){return b.compare(this.version,c)>=0},isLessThan:function(c){return b.compare(this.version,c)===-1},isLessThanOrEqual:function(c){return b.compare(this.version,c)<=0},equals:function(c){return b.compare(this.version,c)===0},match:function(c){c=String(c);return this.version.substr(0,c.length)===c},toArray:function(){return[this.getMajor(),this.getMinor(),this.getPatch(),this.getBuild(),this.getRelease()]},getShortVersion:function(){return this.shortVersion},gt:function(){return this.isGreaterThan.apply(this,arguments)},lt:function(){return this.isLessThan.apply(this,arguments)},gtEq:function(){return this.isGreaterThanOrEqual.apply(this,arguments)},ltEq:function(){return this.isLessThanOrEqual.apply(this,arguments)}});Ext.apply(b,{releaseValueMap:{dev:-6,alpha:-5,a:-5,beta:-4,b:-4,rc:-3,"#":-2,p:-1,pl:-1},getComponentValue:function(c){return !c?0:(isNaN(c)?this.releaseValueMap[c]||c:parseInt(c,10))},compare:function(h,g){var d,e,c;h=new b(h).toArray();g=new b(g).toArray();for(c=0;ce){return 1}}}return 0}});Ext.apply(Ext,{versions:{},lastRegisteredVersion:null,setVersion:function(d,c){Ext.versions[d]=new b(c);Ext.lastRegisteredVersion=Ext.versions[d];return this},getVersion:function(c){if(c===undefined){return Ext.lastRegisteredVersion}return Ext.versions[c]},deprecate:function(c,e,g,d){if(b.compare(Ext.getVersion(c),e)<1){g.call(d)}}});Ext.setVersion("core",a)}());Ext.String=(function(){var i=/^[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000]+|[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000]+$/g,m=/('|\\)/g,h=/\{(\d+)\}/g,b=/([-.*+?\^${}()|\[\]\/\\])/g,n=/^\s+|\s+$/g,j=/\s+/,l=/(^[^a-z]*|[^\w])/gi,d,a,g,c,e=function(p,o){return d[o]},k=function(p,o){return(o in a)?a[o]:String.fromCharCode(parseInt(o.substr(2),10))};return{createVarName:function(o){return o.replace(l,"")},htmlEncode:function(o){return(!o)?o:String(o).replace(g,e)},htmlDecode:function(o){return(!o)?o:String(o).replace(c,k)},addCharacterEntities:function(p){var o=[],s=[],q,r;for(q in p){r=p[q];a[q]=r;d[r]=q;o.push(r);s.push(q)}g=new RegExp("("+o.join("|")+")","g");c=new RegExp("("+s.join("|")+"|&#[0-9]{1,5};)","g")},resetCharacterEntities:function(){d={};a={};this.addCharacterEntities({"&":"&",">":">","<":"<",""":'"',"'":"'"})},urlAppend:function(p,o){if(!Ext.isEmpty(o)){return p+(p.indexOf("?")===-1?"?":"&")+o}return p},trim:function(o){return o.replace(i,"")},capitalize:function(o){return o.charAt(0).toUpperCase()+o.substr(1)},uncapitalize:function(o){return o.charAt(0).toLowerCase()+o.substr(1)},ellipsis:function(q,o,r){if(q&&q.length>o){if(r){var s=q.substr(0,o-2),p=Math.max(s.lastIndexOf(" "),s.lastIndexOf("."),s.lastIndexOf("!"),s.lastIndexOf("?"));if(p!==-1&&p>=(o-15)){return s.substr(0,p)+"..."}}return q.substr(0,o-3)+"..."}return q},escapeRegex:function(o){return o.replace(b,"\\$1")},escape:function(o){return o.replace(m,"\\$1")},toggle:function(p,q,o){return p===q?o:q},leftPad:function(p,q,r){var o=String(p);r=r||" ";while(o.lengthe)?e:d)},snap:function(h,e,g,i){var d;if(h===undefined||h=e){h+=e}else{if(d*2<-e){h-=e}}}}return b.constrain(h,g,i)},snapInRange:function(h,d,g,i){var e;g=(g||0);if(h===undefined||h=d){h+=d}}if(i!==undefined){if(h>(i=b.snapInRange(i,d,g))){h=i}}return h},toFixed:c?function(g,d){d=d||0;var e=a.pow(10,d);return(a.round(g*e)/e).toFixed(d)}:function(e,d){return e.toFixed(d)},from:function(e,d){if(isFinite(e)){e=parseFloat(e)}return !isNaN(e)?e:d},randomInt:function(e,d){return a.floor(a.random()*(d-e+1)+e)}});Ext.num=function(){return b.from.apply(this,arguments)}};(function(){var g=Array.prototype,o=g.slice,q=(function(){var A=[],e,z=20;if(!A.splice){return false}while(z--){A.push("A")}A.splice(15,0,"F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F");e=A.length;A.splice(13,0,"XXX");if(e+1!=A.length){return false}return true}()),j="forEach" in g,u="map" in g,p="indexOf" in g,y="every" in g,c="some" in g,d="filter" in g,n=(function(){var e=[1,2,3,4,5].sort(function(){return 0});return e[0]===1&&e[1]===2&&e[2]===3&&e[3]===4&&e[4]===5}()),k=true,a,w,t,v;try{if(typeof document!=="undefined"){o.call(document.getElementsByTagName("body"))}}catch(s){k=false}function m(z,e){return(e<0)?Math.max(0,z.length+e):Math.min(z.length,e)}function x(G,F,z,J){var K=J?J.length:0,B=G.length,H=m(G,F),E,I,A,e,C,D;if(H===B){if(K){G.push.apply(G,J)}}else{E=Math.min(z,B-H);I=H+E;A=I+K-E;e=B-I;C=B-E;if(AI){for(D=e;D--;){G[A+D]=G[I+D]}}}if(K&&H===C){G.length=C;G.push.apply(G,J)}else{G.length=C+K;for(D=0;D-1;z--){if(B.call(A||D[z],D[z],z,D)===false){return z}}}return true},forEach:j?function(A,z,e){return A.forEach(z,e)}:function(C,A,z){var e=0,B=C.length;for(;ee){e=A}}}return e},mean:function(e){return e.length>0?a.sum(e)/e.length:undefined},sum:function(C){var z=0,e,B,A;for(e=0,B=C.length;e0){return setTimeout(Ext.supports.TimeoutActualLateness?function(){e()}:e,c)}e();return 0},createSequence:function(b,c,a){if(!c){return b}else{return function(){var d=b.apply(this,arguments);c.apply(a||this,arguments);return d}}},createBuffered:function(e,b,d,c){var a;return function(){var h=c||Array.prototype.slice.call(arguments,0),g=d||this;if(a){clearTimeout(a)}a=setTimeout(function(){e.apply(g,h)},b)}},createThrottled:function(e,b,d){var g,a,c,i,h=function(){e.apply(d||this,c);g=new Date().getTime()};return function(){a=new Date().getTime()-g;c=arguments;clearTimeout(i);if(!g||(a>=b)){h()}else{i=setTimeout(h,b-a)}}},interceptBefore:function(b,a,d,c){var e=b[a]||Ext.emptyFn;return(b[a]=function(){var g=d.apply(c||this,arguments);e.apply(this,arguments);return g})},interceptAfter:function(b,a,d,c){var e=b[a]||Ext.emptyFn;return(b[a]=function(){e.apply(this,arguments);return d.apply(c||this,arguments)})}};Ext.defer=Ext.Function.alias(Ext.Function,"defer");Ext.pass=Ext.Function.alias(Ext.Function,"pass");Ext.bind=Ext.Function.alias(Ext.Function,"bind");(function(){var a=function(){},b=Ext.Object={chain:function(d){a.prototype=d;var c=new a();a.prototype=null;return c},toQueryObjects:function(e,k,d){var c=b.toQueryObjects,j=[],g,h;if(Ext.isArray(k)){for(g=0,h=k.length;g0){k=o.split("=");w=decodeURIComponent(k[0]);n=(k[1]!==undefined)?decodeURIComponent(k[1]):"";if(!r){if(u.hasOwnProperty(w)){if(!Ext.isArray(u[w])){u[w]=[u[w]]}u[w].push(n)}else{u[w]=n}}else{h=w.match(/(\[):?([^\]]*)\]/g);t=w.match(/^([^\[]+)/);w=t[0];l=[];if(h===null){u[w]=n;continue}for(p=0,c=h.length;p 0 ? +1 : (Ext.Date.getWeekOfYear(this) >= 52 && this.getMonth() < 11 ? -1 : 0)))",Y:"Ext.String.leftPad(this.getFullYear(), 4, '0')",y:"('' + this.getFullYear()).substring(2, 4)",a:"(this.getHours() < 12 ? 'am' : 'pm')",A:"(this.getHours() < 12 ? 'AM' : 'PM')",g:"((this.getHours() % 12) ? this.getHours() % 12 : 12)",G:"this.getHours()",h:"Ext.String.leftPad((this.getHours() % 12) ? this.getHours() % 12 : 12, 2, '0')",H:"Ext.String.leftPad(this.getHours(), 2, '0')",i:"Ext.String.leftPad(this.getMinutes(), 2, '0')",s:"Ext.String.leftPad(this.getSeconds(), 2, '0')",u:"Ext.String.leftPad(this.getMilliseconds(), 3, '0')",O:"Ext.Date.getGMTOffset(this)",P:"Ext.Date.getGMTOffset(this, true)",T:"Ext.Date.getTimezone(this)",Z:"(this.getTimezoneOffset() * -60)",c:function(){var k,h,g,d,j;for(k="Y-m-dTH:i:sP",h=[],g=0,d=k.length;g= 0 && y >= 0){","v = Ext.Date.add(new Date(y < 100 ? 100 : y, 0, 1, h, i, s, ms), Ext.Date.YEAR, y < 100 ? y - 100 : 0);","v = !strict? v : (strict === true && (z <= 364 || (Ext.Date.isLeapYear(v) && z <= 365))? Ext.Date.add(v, Ext.Date.DAY, z) : null);","}else if(strict === true && !Ext.Date.isValid(y, m + 1, d, h, i, s, ms)){","v = null;","}else{","v = Ext.Date.add(new Date(y < 100 ? 100 : y, m, d, h, i, s, ms), Ext.Date.YEAR, y < 100 ? y - 100 : 0);","}","}","}","if(v){","if(zz != null){","v = Ext.Date.add(v, Ext.Date.SECOND, -v.getTimezoneOffset() * 60 - zz);","}else if(o){","v = Ext.Date.add(v, Ext.Date.MINUTE, -v.getTimezoneOffset() + (sn == '+'? -1 : 1) * (hr * 60 + mn));","}","}","return v;"].join("\n");return function(o){var e=a.parseRegexes.length,p=1,g=[],n=[],l=false,d="",j=0,k=o.length,m=[],h;for(;j Ext.Date.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"},a:{g:1,c:"if (/(am)/i.test(results[{0}])) {\nif (!h || h == 12) { h = 0; }\n} else { if (!h || h < 12) { h = (h || 0) + 12; }}",s:"(am|pm|AM|PM)",calcAtEnd:true},A:{g:1,c:"if (/(am)/i.test(results[{0}])) {\nif (!h || h == 12) { h = 0; }\n} else { if (!h || h < 12) { h = (h || 0) + 12; }}",s:"(AM|PM|am|pm)",calcAtEnd:true},g:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(1[0-2]|[0-9])"},G:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(2[0-3]|1[0-9]|[0-9])"},h:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(1[0-2]|0[1-9])"},H:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(2[0-3]|[0-1][0-9])"},i:{g:1,c:"i = parseInt(results[{0}], 10);\n",s:"([0-5][0-9])"},s:{g:1,c:"s = parseInt(results[{0}], 10);\n",s:"([0-5][0-9])"},u:{g:1,c:"ms = results[{0}]; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n",s:"(\\d+)"},O:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1),","hr = o.substring(1,3)*1 + Math.floor(o.substring(3,5) / 60),","mn = o.substring(3,5) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + Ext.String.leftPad(hr, 2, '0') + Ext.String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+-]\\d{4})"},P:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1),","hr = o.substring(1,3)*1 + Math.floor(o.substring(4,6) / 60),","mn = o.substring(4,6) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + Ext.String.leftPad(hr, 2, '0') + Ext.String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+-]\\d{2}:\\d{2})"},T:{g:0,c:null,s:"[A-Z]{1,4}"},Z:{g:1,c:"zz = results[{0}] * 1;\nzz = (-43200 <= zz && zz <= 50400)? zz : null;\n",s:"([+-]?\\d{1,5})"},c:function(){var e=[],c=[a.formatCodeToRegex("Y",1),a.formatCodeToRegex("m",2),a.formatCodeToRegex("d",3),a.formatCodeToRegex("H",4),a.formatCodeToRegex("i",5),a.formatCodeToRegex("s",6),{c:"ms = results[7] || '0'; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n"},{c:["if(results[8]) {","if(results[8] == 'Z'){","zz = 0;","}else if (results[8].indexOf(':') > -1){",a.formatCodeToRegex("P",8).c,"}else{",a.formatCodeToRegex("O",8).c,"}","}"].join("\n")}],g,d;for(g=0,d=c.length;g0?"-":"+")+Ext.String.leftPad(Math.floor(Math.abs(e)/60),2,"0")+(d?":":"")+Ext.String.leftPad(Math.abs(e%60),2,"0")},getDayOfYear:function(g){var e=0,j=Ext.Date.clone(g),c=g.getMonth(),h;for(h=0,j.setDate(1),j.setMonth(0);h28){e=Math.min(e,Ext.Date.getLastDateOfMonth(Ext.Date.add(Ext.Date.getFirstDateOfMonth(h),Ext.Date.MONTH,i)).getDate())}j.setDate(e);j.setMonth(h.getMonth()+i);break;case Ext.Date.YEAR:e=h.getDate();if(e>28){e=Math.min(e,Ext.Date.getLastDateOfMonth(Ext.Date.add(Ext.Date.getFirstDateOfMonth(h),Ext.Date.YEAR,i)).getDate())}j.setDate(e);j.setFullYear(h.getFullYear()+i);break}return j},between:function(d,g,c){var e=d.getTime();return g.getTime()<=e&&e<=c.getTime()},compat:function(){var d=window.Date,c,l,j=["useStrict","formatCodeToRegex","parseFunctions","parseRegexes","formatFunctions","y2kYear","MILLI","SECOND","MINUTE","HOUR","DAY","MONTH","YEAR","defaults","dayNames","monthNames","monthNumbers","getShortMonthName","getShortDayName","getMonthNumber","formatCodes","isValid","parseDate","getFormatCode","createFormat","createParser","parseCodes"],h=["dateFormat","format","getTimezone","getGMTOffset","getDayOfYear","getWeekOfYear","isLeapYear","getFirstDayOfMonth","getLastDayOfMonth","getDaysInMonth","getSuffix","clone","isDST","clearTime","add","between"],i=j.length,e=h.length,g,k,m;for(m=0;m0){for(d=0;d0){if(x===w){return z[x]}y=z[x];w=w.substring(x.length+1)}if(y.length>0){y+="/"}return y.replace(c,"/")+w.replace(g,"/")+".js"},getPrefix:function(x){var z=j.config.paths,y,w="";if(z.hasOwnProperty(x)){return x}for(y in z){if(z.hasOwnProperty(y)&&y+"."===x.substring(0,y.length+1)){if(y.length>w.length){w=y}}}return w},isAClassNameWithAKnownPrefix:function(w){var x=j.getPrefix(w);return x!==""&&x!==w},require:function(y,x,w,z){if(x){x.call(w)}},syncRequire:function(){},exclude:function(w){return{require:function(z,y,x){return j.require(z,y,x,w)},syncRequire:function(z,y,x){return j.syncRequire(z,y,x,w)}}},onReady:function(z,y,A,w){var x;if(A!==false&&Ext.onDocumentReady){x=z;z=function(){Ext.onDocumentReady(x,y,w)}}z.call(y)}});var o=[],p={},s={},q={},n={},u=[],v=[],i={};Ext.apply(j,{documentHead:typeof document!="undefined"&&(document.head||document.getElementsByTagName("head")[0]),isLoading:false,queue:o,isClassFileLoaded:p,isFileLoaded:s,readyListeners:u,optionalRequires:v,requiresMap:i,numPendingFiles:0,numLoadedFiles:0,hasFileLoadError:false,classNameToFilePathMap:q,scriptsLoading:0,syncModeEnabled:false,scriptElements:n,refreshQueue:function(){var A=o.length,x,z,w,y;if(!A&&!j.scriptsLoading){return j.triggerReady()}for(x=0;xj.numLoadedFiles){continue}for(w=0;w=200&&A<300)||(A===304)){if(!Ext.isIE){B="\n//@ sourceURL="+x}Ext.globalEval(G.responseText+B);E.call(H)}else{}}G=null}},syncRequire:function(){var w=j.syncModeEnabled;if(!w){j.syncModeEnabled=true}j.require.apply(j,arguments);if(!w){j.syncModeEnabled=false}j.refreshQueue()},require:function(O,F,z,B){var H={},y={},E=[],Q=[],N=[],x=[],D,P,J,I,w,C,M,L,K,G,A;if(B){B=(typeof B==="string")?[B]:B;for(L=0,G=B.length;L0){E=b.getNamesByExpression(w);for(K=0,A=E.length;K0){D=function(){var S=[],R,T;for(R=0,T=x.length;R0){Q=b.getNamesByExpression(I);A=Q.length;for(K=0;K0){if(!j.config.enabled){throw new Error("Ext.Loader is not enabled, so dependencies cannot be resolved dynamically. Missing required class"+((N.length>1)?"es":"")+": "+N.join(", "))}}else{D.call(z);return j}P=j.syncModeEnabled;if(!P){o.push({requires:N.slice(),callback:D,scope:z})}G=N.length;for(L=0;Lwindow.innerWidth?"portrait":"landscape"},destroy:function(){var c=arguments.length,b,a;for(b=0;b]+>/gi,c=/(?:)((\n|\r|.)*?)(?:<\/script>)/ig,b=/\r?\n/g,d=/[^\d\.]/g,a;Ext.apply(g,{thousandSeparator:",",decimalSeparator:".",currencyPrecision:2,currencySign:"$",currencyAtEnd:false,undef:function(h){return h!==undefined?h:""},defaultValue:function(i,h){return i!==undefined&&i!==""?i:h},substr:"ab".substr(-1)!="b"?function(i,k,h){var j=String(i);return(k<0)?j.substr(Math.max(j.length+k,0),h):j.substr(k,h)}:function(i,j,h){return String(i).substr(j,h)},lowercase:function(h){return String(h).toLowerCase()},uppercase:function(h){return String(h).toUpperCase()},usMoney:function(h){return g.currency(h,"$",2)},currency:function(k,m,j,h){var o="",n=",0",l=0;k=k-0;if(k<0){k=-k;o="-"}j=Ext.isDefined(j)?j:g.currencyPrecision;n+=n+(j>0?".":"");for(;l2){}else{if(h.length>1){y=Ext.Number.toFixed(y,h[1].length)}else{y=Ext.Number.toFixed(y,0)}}x=y.toString();h=x.split(".");if(k){w=h[0];p=[];t=w.length;o=Math.floor(t/3);l=w.length%3||3;for(u=0;u")},capitalize:Ext.String.capitalize,ellipsis:Ext.String.ellipsis,format:Ext.String.format,htmlDecode:Ext.String.htmlDecode,htmlEncode:Ext.String.htmlEncode,leftPad:Ext.String.leftPad,trim:Ext.String.trim,parseBox:function(i){i=Ext.isEmpty(i)?"":i;if(Ext.isNumber(i)){i=i.toString()}var j=i.split(" "),h=j.length;if(h==1){j[1]=j[2]=j[3]=j[0]}else{if(h==2){j[2]=j[0];j[3]=j[1]}else{if(h==3){j[3]=j[1]}}}return{top:parseInt(j[0],10)||0,right:parseInt(j[1],10)||0,bottom:parseInt(j[2],10)||0,left:parseInt(j[3],10)||0}},escapeRegex:function(h){return h.replace(/([\-.*+?\^${}()|\[\]\/\\])/g,"\\$1")}})}());Ext.define("Ext.util.TaskRunner",{interval:10,timerId:null,constructor:function(a){var b=this;if(typeof a=="number"){b.interval=a}else{if(a){Ext.apply(b,a)}}b.tasks=[];b.timerFn=Ext.Function.bind(b.onTick,b)},newTask:function(b){var a=new Ext.util.TaskRunner.Task(b);a.manager=this;return a},start:function(a){var c=this,b=new Date().getTime();if(!a.pending){c.tasks.push(a);a.pending=true}a.stopped=false;a.taskStartTime=b;a.taskRunTime=a.fireOnStart!==false?0:a.taskStartTime;a.taskRunCount=0;if(!c.firing){if(a.fireOnStart!==false){c.startTimer(0,b)}else{c.startTimer(a.interval,b)}}return a},stop:function(a){if(!a.stopped){a.stopped=true;if(a.onStop){a.onStop.call(a.scope||a,a)}}return a},stopAll:function(){Ext.each(this.tasks,this.stop,this)},firing:false,nextExpires:1e+99,onTick:function(){var m=this,e=m.tasks,a=new Date().getTime(),n=1e+99,k=e.length,c,o,h,b,d,g;m.timerId=null;m.firing=true;for(h=0;hc){n=c}}}if(o){m.tasks=o}m.firing=false;if(m.tasks.length){m.startTimer(n-a,new Date().getTime())}},startTimer:function(e,c){var d=this,b=c+e,a=d.timerId;if(a&&d.nextExpires-b>d.interval){clearTimeout(a);a=null}if(!a){if(e',''," ({childCount} children)","",''," ({depth} deep)","",'',", {type}: {[this.time(values.sum)]} msec (","avg={[this.time(values.sum / parent.count)]}",")","",""].join(""),{time:function(n){return Math.round(n*100)/100}})}var m=this.getData(l);m.name=this.name;m.pure.type="Pure";m.total.type="Total";m.times=[m.pure,m.total];return d.apply(m)},getData:function(l){var m=this;return{count:m.count,childCount:m.childCount,depth:m.maxDepth,pure:g(m.count,m.childCount,l,m.pure),total:g(m.count,m.childCount,l,m.total)}},enter:function(){var l=this,m={accum:l,leave:e,childTime:0,parent:c};++l.depth;if(l.maxDepth','
',"",'
','
',"
",'
','
'].join("");e.body.appendChild(h)}while(i--){g=c[i];if(h||g.early){d[g.identity]=g.fn.call(d,e,h)}else{b.push(g)}}if(h){e.body.removeChild(h)}d.tests=b},PointerEvents:"pointerEvents" in document.documentElement.style,CSS3BoxShadow:"boxShadow" in document.documentElement.style||"WebkitBoxShadow" in document.documentElement.style||"MozBoxShadow" in document.documentElement.style,ClassList:!!document.documentElement.classList,OrientationChange:((typeof window.orientation!="undefined")&&("onorientationchange" in window)),DeviceMotion:("ondevicemotion" in window),Touch:("ontouchstart" in window)&&(!Ext.is.Desktop),TimeoutActualLateness:(function(){setTimeout(function(){Ext.supports.TimeoutActualLateness=arguments.length!==0},0)}()),tests:[{identity:"Transitions",fn:function(h,k){var g=["webkit","Moz","o","ms","khtml"],j="TransitionEnd",b=[g[0]+j,"transitionend",g[2]+j,g[3]+j,g[4]+j],e=g.length,d=0,c=false;for(;d

";return(c.childNodes.length==2)}},{identity:"Float",fn:function(b,c){return !!c.lastChild.style.cssFloat}},{identity:"AudioTag",fn:function(b){return !!b.createElement("audio").canPlayType}},{identity:"History",fn:function(){var b=window.history;return !!(b&&b.pushState)}},{identity:"CSS3DTransform",fn:function(){return(typeof WebKitCSSMatrix!="undefined"&&new WebKitCSSMatrix().hasOwnProperty("m41"))}},{identity:"CSS3LinearGradient",fn:function(h,j){var g="background-image:",d="-webkit-gradient(linear, left top, right bottom, from(black), to(white))",i="linear-gradient(left top, black, white)",e="-moz-"+i,b="-o-"+i,c=[g+d,g+i,g+e,g+b];j.style.cssText=c.join(";");return(""+j.style.backgroundImage).indexOf("gradient")!==-1}},{identity:"CSS3BorderRadius",fn:function(e,g){var c=["borderRadius","BorderRadius","MozBorderRadius","WebkitBorderRadius","OBorderRadius","KhtmlBorderRadius"],d=false,b;for(b=0;b=534.16}},{identity:"TextAreaMaxLength",fn:function(){var b=document.createElement("textarea");return("maxlength" in b)}},{identity:"GetPositionPercentage",fn:function(b,c){return a(c.childNodes[2],"left")=="10%"}}]}}());Ext.supports.init();Ext.util.DelayedTask=function(d,c,a){var e=this,g,b=function(){clearInterval(g);g=null;d.apply(c,a||[])};this.delay=function(i,k,j,h){e.cancel();d=k||d;c=j||c;a=h||a;g=setInterval(b,i)};this.cancel=function(){if(g){clearInterval(g);g=null}}};Ext.require("Ext.util.DelayedTask",function(){Ext.util.Event=Ext.extend(Object,(function(){var b={};function d(h,i,j,g){return function(){if(j.target===arguments[0]){h.apply(g,arguments)}}}function c(h,i,j,g){i.task=new Ext.util.DelayedTask();return function(){i.task.delay(j.buffer,h,g,Ext.Array.toArray(arguments))}}function a(h,i,j,g){return function(){var k=new Ext.util.DelayedTask();if(!i.tasks){i.tasks=[]}i.tasks.push(k);k.delay(j.delay||10,h,g,Ext.Array.toArray(arguments))}}function e(h,i,j,g){return function(){var k=i.ev;if(k.removeListener(i.fn,g)&&k.observable){k.observable.hasListeners[k.name]--}return h.apply(g,arguments)}}return{isEvent:true,constructor:function(h,g){this.name=g;this.observable=h;this.listeners=[]},addListener:function(i,h,g){var j=this,k;h=h||j.observable;if(!j.isListening(i,h)){k=j.createListener(i,h,g);if(j.firing){j.listeners=j.listeners.slice(0)}j.listeners.push(k)}},createListener:function(j,i,g){g=g||b;i=i||this.observable;var k={fn:j,scope:i,o:g,ev:this},h=j;if(g.single){h=e(h,k,g,i)}if(g.target){h=d(h,k,g,i)}if(g.delay){h=a(h,k,g,i)}if(g.buffer){h=c(h,k,g,i)}k.fireFn=h;return k},findListener:function(l,k){var j=this.listeners,g=j.length,m,h;while(g--){m=j[g];if(m){h=m.scope;if(m.fn==l&&(h==(k||this.observable))){return g}}}return -1},isListening:function(h,g){return this.findListener(h,g)!==-1},removeListener:function(j,i){var l=this,h,m,g;h=l.findListener(j,i);if(h!=-1){m=l.listeners[h];if(l.firing){l.listeners=l.listeners.slice(0)}if(m.task){m.task.cancel();delete m.task}g=m.tasks&&m.tasks.length;if(g){while(g--){m.tasks[g].cancel()}delete m.tasks}Ext.Array.erase(l.listeners,h,1);return true}return false},clearListeners:function(){var h=this.listeners,g=h.length;while(g--){this.removeListener(h[g].fn,h[g].scope)}},fire:function(){var l=this,j=l.listeners,k=j.length,h,g,m;if(k>0){l.firing=true;for(h=0;h";for(;r\^])\s?|\s|$)/,c=/^(#)?([\w\-]+|\*)(?:\((true|false)\))?/,b=[{re:/^\.([\w\-]+)(?:\((true|false)\))?/,method:m},{re:/^(?:[\[](?:@)?([\w\-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]])/,method:n},{re:/^#([\w\-]+)/,method:d},{re:/^\:([\w\-]+)(?:\(((?:\{[^\}]+\})|(?:(?!\{)[^\s>\/]*?(?!\})))\))?/,method:l},{re:/^(?:\{([^\}]+)\})/,method:k}];h.Query=Ext.extend(Object,{constructor:function(o){o=o||{};Ext.apply(this,o)},execute:function(p){var r=this.operations,s=0,t=r.length,q,o;if(!p){o=Ext.ComponentManager.all.getArray()}else{if(Ext.isArray(p)){o=p}else{if(p.isMixedCollection){o=p.items}}}for(;s1){for(r=0,s=t.length;r0){o.push(p[0])}return o},last:function(q){var o=q.length,p=[];if(o>0){p.push(q[o-1])}return p}},query:function(p,w){var x=p.split(","),o=x.length,q=0,r=[],y=[],v={},t,s,u;for(;q1){s=r.length;for(q=0;q111&&g.keyCode<124){g.keyCode=-1}}catch(h){}}},getRelatedTarget:function(e){e=e.browserEvent||e;var g=e.relatedTarget;if(!g){if(a.mouseLeaveRe.test(e.type)){g=e.toElement}else{if(a.mouseEnterRe.test(e.type)){g=e.fromElement}}}return a.resolveTextNode(g)},getPageX:function(e){return a.getPageXY(e)[0]},getPageY:function(e){return a.getPageXY(e)[1]},getPageXY:function(h){h=h.browserEvent||h;var g=h.pageX,j=h.pageY,i=d.documentElement,e=d.body;if(!g&&g!==0){g=h.clientX+(i&&i.scrollLeft||e&&e.scrollLeft||0)-(i&&i.clientLeft||e&&e.clientLeft||0);j=h.clientY+(i&&i.scrollTop||e&&e.scrollTop||0)-(i&&i.clientTop||e&&e.clientTop||0)}return[g,j]},getTarget:function(e){e=e.browserEvent||e;return a.resolveTextNode(e.target||e.srcElement)},resolveTextNode:Ext.isGecko?function(g){if(!g){return}var e=HTMLElement.prototype.toString.call(g);if(e=="[xpconnect wrapped native prototype]"||e=="[object XULElement]"){return}return g.nodeType==3?g.parentNode:g}:function(e){return e&&e.nodeType==3?e.parentNode:e},curWidth:0,curHeight:0,onWindowResize:function(i,h,g){var e=a.resizeEvent;if(!e){a.resizeEvent=e=new Ext.util.Event();a.on(c,"resize",a.fireResize,null,{buffer:100})}e.addListener(i,h,g)},fireResize:function(){var e=Ext.Element.getViewWidth(),g=Ext.Element.getViewHeight();if(a.curHeight!=g||a.curWidth!=e){a.curHeight=g;a.curWidth=e;a.resizeEvent.fire(e,g)}},removeResizeListener:function(h,g){var e=a.resizeEvent;if(e){e.removeListener(h,g)}},onWindowUnload:function(i,h,g){var e=a.unloadEvent;if(!e){a.unloadEvent=e=new Ext.util.Event();a.addListener(c,"unload",a.fireUnload)}if(i){e.addListener(i,h,g)}},fireUnload:function(){try{d=c=undefined;var m,h,k,j,g;a.unloadEvent.fire();if(Ext.isGecko3){m=Ext.ComponentQuery.query("gridview");h=0;k=m.length;for(;h=525:!((Ext.isGecko&&!Ext.isWindows)||Ext.isOpera),getKeyEvent:function(){return a.useKeyDown?"keydown":"keypress"}});if(!("addEventListener" in document)&&document.attachEvent){Ext.apply(a,{pollScroll:function(){var g=true;try{document.documentElement.doScroll("left")}catch(h){g=false}if(g&&document.body){a.onReadyEvent({type:"doScroll"})}else{a.scrollTimeout=setTimeout(a.pollScroll,20)}return g},scrollTimeout:null,readyStatesRe:/complete/i,checkReadyState:function(){var e=document.readyState;if(a.readyStatesRe.test(e)){a.onReadyEvent({type:e})}},bindReadyEvent:function(){var g=true;if(a.hasBoundOnReady){return}try{g=window.frameElement===undefined}catch(h){g=false}if(!g||!d.documentElement.doScroll){a.pollScroll=Ext.emptyFn}if(a.pollScroll()===true){return}if(d.readyState=="complete"){a.onReadyEvent({type:"already "+(d.readyState||"body")})}else{d.attachEvent("onreadystatechange",a.checkReadyState);window.attachEvent("onload",a.onReadyEvent);a.hasBoundOnReady=true}},onReadyEvent:function(g){if(g&&g.type){a.onReadyChain.push(g.type)}if(a.hasBoundOnReady){document.detachEvent("onreadystatechange",a.checkReadyState);window.detachEvent("onload",a.onReadyEvent)}if(Ext.isNumber(a.scrollTimeout)){clearTimeout(a.scrollTimeout);delete a.scrollTimeout}if(!Ext.isReady){a.fireDocReady()}},onReadyChain:[]})}Ext.onReady=function(h,g,e){Ext.Loader.onReady(h,g,true,e)};Ext.onDocumentReady=a.onDocumentReady;a.on=a.addListener;a.un=a.removeListener;Ext.onReady(b)};Ext.define("Ext.EventObjectImpl",{uses:["Ext.util.Point"],BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,RETURN:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,WHEEL_SCALE:(function(){var a;if(Ext.isGecko){a=3}else{if(Ext.isMac){if(Ext.isSafari&&Ext.webKitVersion>=532){a=120}else{a=12}a*=3}else{a=120}}return a}()),clickRe:/(dbl)?click/,safariKeys:{3:13,63234:37,63235:39,63232:38,63233:40,63276:33,63277:34,63272:46,63273:36,63275:35},btnMap:Ext.isIE?{1:0,4:1,2:2}:{0:0,1:1,2:2},constructor:function(a,b){if(a){this.setEvent(a.browserEvent||a,b)}},setEvent:function(d,e){var c=this,b,a;if(d==c||(d&&d.browserEvent)){return d}c.browserEvent=d;if(d){b=d.button?c.btnMap[d.button]:(d.which?d.which-1:-1);if(c.clickRe.test(d.type)&&b==-1){b=0}a={type:d.type,button:b,shiftKey:d.shiftKey,ctrlKey:d.ctrlKey||d.metaKey||false,altKey:d.altKey,keyCode:d.keyCode,charCode:d.charCode,target:Ext.EventManager.getTarget(d),relatedTarget:Ext.EventManager.getRelatedTarget(d),currentTarget:d.currentTarget,xy:(e?c.getXY():null)}}else{a={button:-1,shiftKey:false,ctrlKey:false,altKey:false,keyCode:0,charCode:0,target:null,xy:[0,0]}}Ext.apply(c,a);return c},stopEvent:function(){this.stopPropagation();this.preventDefault()},preventDefault:function(){if(this.browserEvent){Ext.EventManager.preventDefault(this.browserEvent)}},stopPropagation:function(){var a=this.browserEvent;if(a){if(a.type=="mousedown"){Ext.EventManager.stoppedMouseDownEvent.fire(this)}Ext.EventManager.stopPropagation(a)}},getCharCode:function(){return this.charCode||this.keyCode},getKey:function(){return this.normalizeKey(this.keyCode||this.charCode)},normalizeKey:function(a){return Ext.isWebKit?(this.safariKeys[a]||a):a},getPageX:function(){return this.getX()},getPageY:function(){return this.getY()},getX:function(){return this.getXY()[0]},getY:function(){return this.getXY()[1]},getXY:function(){if(!this.xy){this.xy=Ext.EventManager.getPageXY(this.browserEvent)}return this.xy},getTarget:function(b,c,a){if(b){return Ext.fly(this.target).findParent(b,c,a)}return a?Ext.get(this.target):this.target},getRelatedTarget:function(b,c,a){if(b){return Ext.fly(this.relatedTarget).findParent(b,c,a)}return a?Ext.get(this.relatedTarget):this.relatedTarget},correctWheelDelta:function(c){var b=this.WHEEL_SCALE,a=Math.round(c/b);if(!a&&c){a=(c<0)?-1:1}return a},getWheelDeltas:function(){var d=this,c=d.browserEvent,b=0,a=0;if(Ext.isDefined(c.wheelDeltaX)){b=c.wheelDeltaX;a=c.wheelDeltaY}else{if(c.wheelDelta){a=c.wheelDelta}else{if(c.detail){a=-c.detail;if(a>100){a=3}else{if(a<-100){a=-3}}if(Ext.isDefined(c.axis)&&c.axis===c.HORIZONTAL_AXIS){b=a;a=0}}}}return{x:d.correctWheelDelta(b),y:d.correctWheelDelta(a)}},getWheelDelta:function(){var a=this.getWheelDeltas();return a.y},within:function(d,e,b){if(d){var c=e?this.getRelatedTarget():this.getTarget(),a;if(c){a=Ext.fly(d).contains(c);if(!a&&b){a=c==Ext.getDom(d)}return a}}return false},isNavKeyPress:function(){var b=this,a=this.normalizeKey(b.keyCode);return(a>=33&&a<=40)||a==b.RETURN||a==b.TAB||a==b.ESC},isSpecialKey:function(){var a=this.normalizeKey(this.keyCode);return(this.type=="keypress"&&this.ctrlKey)||this.isNavKeyPress()||(a==this.BACKSPACE)||(a>=16&&a<=20)||(a>=44&&a<=46)},getPoint:function(){var a=this.getXY();return new Ext.util.Point(a[0],a[1])},hasModifier:function(){return this.ctrlKey||this.altKey||this.shiftKey||this.metaKey},injectEvent:(function(){var d,e={},c;if(!Ext.isIE&&document.createEvent){d={createHtmlEvent:function(k,i,h,g){var j=k.createEvent("HTMLEvents");j.initEvent(i,h,g);return j},createMouseEvent:function(u,s,m,l,o,k,i,j,g,r,q,n,p){var h=u.createEvent("MouseEvents"),t=u.defaultView||window;if(h.initMouseEvent){h.initMouseEvent(s,m,l,t,o,k,i,k,i,j,g,r,q,n,p)}else{h=u.createEvent("UIEvents");h.initEvent(s,m,l);h.view=t;h.detail=o;h.screenX=k;h.screenY=i;h.clientX=k;h.clientY=i;h.ctrlKey=j;h.altKey=g;h.metaKey=q;h.shiftKey=r;h.button=n;h.relatedTarget=p}return h},createUIEvent:function(m,k,i,h,j){var l=m.createEvent("UIEvents"),g=m.defaultView||window;l.initUIEvent(k,i,h,g,j);return l},fireEvent:function(i,g,h){i.dispatchEvent(h)},fixTarget:function(g){if(g==window&&!g.dispatchEvent){return document}return g}}}else{if(document.createEventObject){c={0:1,1:4,2:2};d={createHtmlEvent:function(k,i,h,g){var j=k.createEventObject();j.bubbles=h;j.cancelable=g;return j},createMouseEvent:function(t,s,m,l,o,k,i,j,g,r,q,n,p){var h=t.createEventObject();h.bubbles=m;h.cancelable=l;h.detail=o;h.screenX=k;h.screenY=i;h.clientX=k;h.clientY=i;h.ctrlKey=j;h.altKey=g;h.shiftKey=r;h.metaKey=q;h.button=c[n]||n;h.relatedTarget=p;return h},createUIEvent:function(l,j,h,g,i){var k=l.createEventObject();k.bubbles=h;k.cancelable=g;return k},fireEvent:function(i,g,h){i.fireEvent("on"+g,h)},fixTarget:function(g){if(g==document){return document.documentElement}return g}}}}Ext.Object.each({load:[false,false],unload:[false,false],select:[true,false],change:[true,false],submit:[true,true],reset:[true,false],resize:[true,false],scroll:[true,false]},function(i,j){var h=j[0],g=j[1];e[i]=function(m,k){var l=d.createHtmlEvent(i,h,g);d.fireEvent(m,i,l)}});function b(i,h){var g=(i!="mousemove");return function(m,j){var l=j.getXY(),k=d.createMouseEvent(m.ownerDocument,i,true,g,h,l[0],l[1],j.ctrlKey,j.altKey,j.shiftKey,j.metaKey,j.button,j.relatedTarget);d.fireEvent(m,i,k)}}Ext.each(["click","dblclick","mousedown","mouseup","mouseover","mousemove","mouseout"],function(g){e[g]=b(g,1)});Ext.Object.each({focusin:[true,false],focusout:[true,false],activate:[true,true],focus:[false,false],blur:[false,false]},function(i,j){var h=j[0],g=j[1];e[i]=function(m,k){var l=d.createUIEvent(m.ownerDocument,i,h,g,1);d.fireEvent(m,i,l)}});if(!d){e={};d={fixTarget:function(g){return g}}}function a(h,g){}return function(j){var i=this,h=e[i.type]||a,g=j?(j.dom||j):i.getTarget();g=d.fixTarget(g);h(g,i)}}())},function(){Ext.EventObject=new Ext.EventObjectImpl()});Ext.define("Ext.dom.AbstractQuery",{select:function(k,b){var h=[],d,g,e,c,a;b=b||document;if(typeof b=="string"){b=document.getElementById(b)}k=k.split(",");for(g=0,c=k.length;g")}else{c.push(">");if((j=d.tpl)){j.applyOut(d.tplData,c)}if((j=d.html)){c.push(j)}if((j=d.cn||d.children)){h.generateMarkup(j,c)}g=h.closeTags;c.push(g[a]||(g[a]=""))}}}return c},generateStyles:function(e,c){var b=c||[],d;for(d in e){if(e.hasOwnProperty(d)){b.push(this.decamelizeName(d),":",e[d],";")}}return c||b.join("")},markup:function(a){if(typeof a=="string"){return a}var b=this.generateMarkup(a,[]);return b.join("")},applyStyles:function(d,e){if(e){var b=0,a,c;d=Ext.fly(d);if(typeof e=="function"){e=e.call()}if(typeof e=="string"){e=Ext.util.Format.trim(e).split(/\s*(?::|;)\s*/);for(a=e.length;b "'+g+'"'},insertBefore:function(a,c,b){return this.doInsert(a,c,b,"beforebegin")},insertAfter:function(a,c,b){return this.doInsert(a,c,b,"afterend","nextSibling")},insertFirst:function(a,c,b){return this.doInsert(a,c,b,"afterbegin","firstChild")},append:function(a,c,b){return this.doInsert(a,c,b,"beforeend","",true)},overwrite:function(a,c,b){a=Ext.getDom(a);a.innerHTML=this.markup(c);return b?Ext.get(a.firstChild):a.firstChild},doInsert:function(d,g,e,h,c,a){var b=this.insertHtml(h,Ext.getDom(d),this.markup(g));return e?Ext.get(b,true):b}});(function(){var a=window.document,b=/^\s+|\s+$/g,c=/\s/;if(!Ext.cache){Ext.cache={}}Ext.define("Ext.dom.AbstractElement",{inheritableStatics:{get:function(e){var g=this,h=Ext.dom.Element,d,j,i,k;if(!e){return null}if(typeof e=="string"){if(e==Ext.windowId){return h.get(window)}else{if(e==Ext.documentId){return h.get(a)}}d=Ext.cache[e];if(d&&d.skipGarbageCollection){j=d.el;return j}if(!(i=a.getElementById(e))){return null}if(d&&d.el){j=Ext.updateCacheEntry(d,i).el}else{j=new h(i,!!d)}return j}else{if(e.tagName){if(!(k=e.id)){k=Ext.id(e)}d=Ext.cache[k];if(d&&d.el){j=Ext.updateCacheEntry(d,e).el}else{j=new h(e,!!d)}return j}else{if(e instanceof g){if(e!=g.docEl&&e!=g.winEl){k=e.id;d=Ext.cache[k];if(d){Ext.updateCacheEntry(d,a.getElementById(k)||e.dom)}}return e}else{if(e.isComposite){return e}else{if(Ext.isArray(e)){return g.select(e)}else{if(e===a){if(!g.docEl){g.docEl=Ext.Object.chain(h.prototype);g.docEl.dom=a;g.docEl.id=Ext.id(a);g.addToCache(g.docEl)}return g.docEl}else{if(e===window){if(!g.winEl){g.winEl=Ext.Object.chain(h.prototype);g.winEl.dom=window;g.winEl.id=Ext.id(window);g.addToCache(g.winEl)}return g.winEl}}}}}}}return null},addToCache:function(d,e){if(d){Ext.addCacheEntry(e,d)}return d},addMethods:function(){this.override.apply(this,arguments)},mergeClsList:function(){var n,m={},k,d,g,l,e,o=[],h=false;for(k=0,d=arguments.length;kwindow.innerWidth)?"portrait":"landscape"},fromPoint:function(a,b){return Ext.get(document.elementFromPoint(a,b))},parseStyles:function(c){var a={},b=this.cssRe,d;if(c){b.lastIndex=0;while((d=b.exec(c))){a[d[1]]=d[2]}}return a}});(function(){var g=document,a=Ext.dom.AbstractElement,e=null,d=g.compatMode=="CSS1Compat",c,b=function(i){if(!c){c=new a.Fly()}c.attach(i);return c};if(!("activeElement" in g)&&g.addEventListener){g.addEventListener("focus",function(i){if(i&&i.target){e=(i.target==g)?null:i.target}},true)}function h(j,k,i){return function(){j.selectionStart=k;j.selectionEnd=i}}a.addInheritableStatics({getActiveElement:function(){return g.activeElement||e},getRightMarginFixCleaner:function(n){var k=Ext.supports,l=k.DisplayChangeInputSelectionBug,m=k.DisplayChangeTextAreaSelectionBug,o,i,p,j;if(l||m){o=g.activeElement||e;i=o&&o.tagName;if((m&&i=="TEXTAREA")||(l&&i=="INPUT"&&o.type=="text")){if(Ext.dom.Element.isAncestor(n,o)){p=o.selectionStart;j=o.selectionEnd;if(Ext.isNumber(p)&&Ext.isNumber(j)){return h(o,p,j)}}}}return Ext.emptyFn},getViewWidth:function(i){return i?Ext.dom.Element.getDocumentWidth():Ext.dom.Element.getViewportWidth()},getViewHeight:function(i){return i?Ext.dom.Element.getDocumentHeight():Ext.dom.Element.getViewportHeight()},getDocumentHeight:function(){return Math.max(!d?g.body.scrollHeight:g.documentElement.scrollHeight,Ext.dom.Element.getViewportHeight())},getDocumentWidth:function(){return Math.max(!d?g.body.scrollWidth:g.documentElement.scrollWidth,Ext.dom.Element.getViewportWidth())},getViewportHeight:function(){return Ext.isIE?(Ext.isStrict?g.documentElement.clientHeight:g.body.clientHeight):self.innerHeight},getViewportWidth:function(){return(!Ext.isStrict&&!Ext.isOpera)?g.body.clientWidth:Ext.isIE?g.documentElement.clientWidth:self.innerWidth},getY:function(i){return Ext.dom.Element.getXY(i)[1]},getX:function(i){return Ext.dom.Element.getXY(i)[0]},getXY:function(k){var n=g.body,j=g.documentElement,i=0,l=0,o=[0,0],r=Math.round,m,q;k=Ext.getDom(k);if(k!=g&&k!=n){if(Ext.isIE){try{m=k.getBoundingClientRect();l=j.clientTop||n.clientTop;i=j.clientLeft||n.clientLeft}catch(p){m={left:0,top:0}}}else{m=k.getBoundingClientRect()}q=b(document).getScroll();o=[r(m.left+q.left-i),r(m.top+q.top-l)]}return o},setXY:function(j,k){(j=Ext.fly(j,"_setXY")).position();var l=j.translatePoints(k),i=j.dom.style,m;for(m in l){if(!isNaN(l[m])){i[m]=l[m]+"px"}}},setX:function(j,i){Ext.dom.Element.setXY(j,[i,false])},setY:function(i,j){Ext.dom.Element.setXY(i,[false,j])},serializeForm:function(k){var l=k.elements||(document.forms[k]||Ext.getDom(k)).elements,v=false,u=encodeURIComponent,p="",n=l.length,q,i,t,x,w,r,m,s,j;for(r=0;rn){m=q?h.left-r:n-r}if(m<0){m=q?h.right:0}if(l+p>u){l=o?h.top-p:u-p}if(l<0){l=o?h.bottom:0}}return[m,l]},getAnchor:function(){var b=(this.$cache||this.getCache()).data,a;if(!this.dom){return}a=b._anchor;if(!a){a=b._anchor={}}return a},adjustForConstraints:function(c,b){var a=this.getConstrainVector(b,c);if(a){c[0]+=a[0];c[1]+=a[1]}return c}});Ext.dom.AbstractElement.addMethods({appendChild:function(a){return Ext.get(a).appendTo(this)},appendTo:function(a){Ext.getDom(a).appendChild(this.dom);return this},insertBefore:function(a){a=Ext.getDom(a);a.parentNode.insertBefore(this.dom,a);return this},insertAfter:function(a){a=Ext.getDom(a);a.parentNode.insertBefore(this.dom,a.nextSibling);return this},insertFirst:function(b,a){b=b||{};if(b.nodeType||b.dom||typeof b=="string"){b=Ext.getDom(b);this.dom.insertBefore(b,this.dom.firstChild);return !a?Ext.get(b):b}else{return this.createChild(b,this.dom.firstChild,a)}},insertSibling:function(b,g,j){var i=this,k=(g||"before").toLowerCase()=="after",d,a,c,h;if(Ext.isArray(b)){a=i;c=b.length;for(h=0;h1){g=[g,arguments[1]]}e=c.translatePoints(g);b=c.dom.style;for(d in e){if(!e.hasOwnProperty(d)){continue}if(!isNaN(e[d])){b[d]=e[d]+"px"}}return c},getLeft:function(b){return parseInt(this.getStyle("left"),10)||0},getRight:function(b){return parseInt(this.getStyle("right"),10)||0},getTop:function(b){return parseInt(this.getStyle("top"),10)||0},getBottom:function(b){return parseInt(this.getStyle("bottom"),10)||0},translatePoints:function(b,i){i=isNaN(b[1])?i:b[1];b=isNaN(b[0])?b:b[0];var e=this,g=e.isStyle("position","relative"),h=e.getXY(),c=parseInt(e.getStyle("left"),10),d=parseInt(e.getStyle("top"),10);c=!isNaN(c)?c:(g?0:e.dom.offsetLeft);d=!isNaN(d)?d:(g?0:e.dom.offsetTop);return{left:(b-h[0]+c),top:(i-h[1]+d)}},setBox:function(e){var d=this,c=e.width,b=e.height,h=e.top,g=e.left;if(g!==undefined){d.setLeft(g)}if(h!==undefined){d.setTop(h)}if(c!==undefined){d.setWidth(c)}if(b!==undefined){d.setHeight(b)}return this},getBox:function(i,m){var j=this,g=j.dom,d=g.offsetWidth,n=g.offsetHeight,p,h,e,c,o,k;if(!m){p=j.getXY()}else{if(i){p=[0,0]}else{p=[parseInt(j.getStyle("left"),10)||0,parseInt(j.getStyle("top"),10)||0]}}if(!i){h={x:p[0],y:p[1],0:p[0],1:p[1],width:d,height:n}}else{e=j.getBorderWidth.call(j,"l")+j.getPadding.call(j,"l");c=j.getBorderWidth.call(j,"r")+j.getPadding.call(j,"r");o=j.getBorderWidth.call(j,"t")+j.getPadding.call(j,"t");k=j.getBorderWidth.call(j,"b")+j.getPadding.call(j,"b");h={x:p[0]+e,y:p[1]+o,0:p[0]+e,1:p[1]+o,width:d-(e+c),height:n-(o+k)}}h.left=h.x;h.top=h.y;h.right=h.x+h.width;h.bottom=h.y+h.height;return h},getPageBox:function(g){var j=this,d=j.dom,m=d.offsetWidth,i=d.offsetHeight,o=j.getXY(),n=o[1],c=o[0]+m,k=o[1]+i,e=o[0];if(!d){return new Ext.util.Region()}if(g){return new Ext.util.Region(n,c,k,e)}else{return{left:e,top:n,width:m,height:i,right:c,bottom:k}}}})}());(function(){var q=Ext.dom.AbstractElement,o=document.defaultView,n=Ext.Array,m=/^\s+|\s+$/g,b=/\w/g,p=/\s+/,t=/^(?:transparent|(?:rgba[(](?:\s*\d+\s*[,]){3}\s*0\s*[)]))$/i,h=Ext.supports.ClassList,e="padding",d="margin",s="border",k="-left",r="-right",l="-top",c="-bottom",i="-width",j={l:s+k+i,r:s+r+i,t:s+l+i,b:s+c+i},g={l:e+k,r:e+r,t:e+l,b:e+c},a={l:d+k,r:d+r,t:d+l,b:d+c};q.override({styleHooks:{},addStyles:function(B,A){var w=0,z=(B||"").match(b),y,u=z.length,x,v=[];if(u==1){w=Math.abs(parseFloat(this.getStyle(A[z[0]]))||0)}else{if(u){for(y=0;y0?u:0},getWidth:function(u){var w=this.dom,v=u?(w.clientWidth-this.getPadding("lr")):w.offsetWidth;return v>0?v:0},setWidth:function(u){var v=this;v.dom.style.width=q.addUnits(u);return v},setHeight:function(u){var v=this;v.dom.style.height=q.addUnits(u);return v},getBorderWidth:function(u){return this.addStyles(u,j)},getPadding:function(u){return this.addStyles(u,g)},margins:a,applyStyles:function(w){if(w){var v,u,x=this.dom;if(typeof w=="function"){w=w.call()}if(typeof w=="string"){w=Ext.util.Format.trim(w).split(/\s*(?::|;)\s*/);for(v=0,u=w.length;v'+v+""):""});C=A.getSize();x.mask=E;if(w===document.body){C.height=window.innerHeight;if(A.orientationHandler){Ext.EventManager.unOrientationChange(A.orientationHandler,A)}A.orientationHandler=function(){C=A.getSize();C.height=window.innerHeight;E.setSize(C)};Ext.EventManager.onOrientationChange(A.orientationHandler,A)}E.setSize(C);if(Ext.is.iPad){Ext.repaint()}},unmask:function(){var v=this,x=(v.$cache||v.getCache()).data,u=x.mask,w=Ext.baseCSSPrefix;if(u){u.remove();delete x.mask}v.removeCls([w+"masked",w+"masked-relative"]);if(v.dom===document.body){Ext.EventManager.unOrientationChange(v.orientationHandler,v);delete v.orientationHandler}}});q.populateStyleMap=function(B,u){var A=["margin-","padding-","border-width-"],z=["before","after"],w,y,v,x;for(w=A.length;w--;){for(x=2;x--;){y=A[w]+z[x];B[q.normalize(y)]=B[y]={name:q.normalize(A[w]+u[x])}}}};Ext.onReady(function(){var C=Ext.supports,u,A,y,v,B;function z(H,E,G,D){var F=D[this.name]||"";return t.test(F)?"transparent":F}function x(J,G,I,F){var D=F.marginRight,E,H;if(D!="0px"){E=J.style;H=E.display;E.display="inline-block";D=(I?F:J.ownerDocument.defaultView.getComputedStyle(J,null)).marginRight;E.display=H}return D}function w(K,H,J,G){var D=G.marginRight,F,E,I;if(D!="0px"){F=K.style;E=q.getRightMarginFixCleaner(K);I=F.display;F.display="inline-block";D=(J?G:K.ownerDocument.defaultView.getComputedStyle(K,"")).marginRight;F.display=I;E()}return D}u=q.prototype.styleHooks;q.populateStyleMap(u,["left","right"]);if(C.init){C.init()}if(!C.RightMargin){u.marginRight=u["margin-right"]={name:"marginRight",get:(C.DisplayChangeInputSelectionBug||C.DisplayChangeTextAreaSelectionBug)?w:x}}if(!C.TransparentColor){A=["background-color","border-color","color","outline-color"];for(y=A.length;y--;){v=A[y];B=q.normalize(v);u[v]=u[B]={name:B,get:z}}}})}());Ext.dom.AbstractElement.override({findParent:function(h,b,a){var e=this.dom,c=document.documentElement,g=0,d;b=b||50;if(isNaN(b)){d=Ext.getDom(b);b=Number.MAX_VALUE}while(e&&e.nodeType==1&&g "+a,c.dom);return b?d:Ext.get(d)},parent:function(a,b){return this.matchNode("parentNode","parentNode",a,b)},next:function(a,b){return this.matchNode("nextSibling","nextSibling",a,b)},prev:function(a,b){return this.matchNode("previousSibling","previousSibling",a,b)},first:function(a,b){return this.matchNode("nextSibling","firstChild",a,b)},last:function(a,b){return this.matchNode("previousSibling","lastChild",a,b)},matchNode:function(b,e,a,c){if(!this.dom){return null}var d=this.dom[e];while(d){if(d.nodeType==1&&(!a||Ext.DomQuery.is(d,a))){return !c?Ext.get(d):d}d=d[b]}return null},isAncestor:function(a){return this.self.isAncestor.call(this.self,this.dom,a)}});(function(){var b="afterbegin",i="afterend",a="beforebegin",o="beforeend",l="",h="
",c=l+"",n=""+h,k=c+"",e=""+n,p=document.createElement("div"),m=["BeforeBegin","previousSibling"],j=["AfterEnd","nextSibling"],d={beforebegin:m,afterend:j},g={beforebegin:m,afterend:j,afterbegin:["AfterBegin","firstChild"],beforeend:["BeforeEnd","lastChild"]};Ext.define("Ext.dom.Helper",{extend:"Ext.dom.AbstractHelper",requires:["Ext.dom.AbstractElement"],tableRe:/^table|tbody|tr|td$/i,tableElRe:/td|tr|tbody/i,useDom:false,createDom:function(q,w){var r,z=document,u,x,s,y,v,t;if(Ext.isArray(q)){r=z.createDocumentFragment();for(v=0,t=q.length;v+~]\s?|\s|$)/,tagTokenRe=/^(#)?([\w\-\*\\]+)/,nthRe=/(\d*)n\+?(\d*)/,nthRe2=/\D/,startIdRe=/^\s*\#/,isIE=window.ActiveXObject?true:false,key=30803,longHex=/\\([0-9a-fA-F]{6})/g,shortHex=/\\([0-9a-fA-F]{1,6})\s{0,1}/g,nonHex=/\\([^0-9a-fA-F]{1})/g,escapes=/\\/g,num,hasEscapes,longHexToChar=function($0,$1){return String.fromCharCode(parseInt($1,16))},shortToLongHex=function($0,$1){while($1.length<6){$1="0"+$1}return"\\"+$1},charToLongHex=function($0,$1){num=$1.charCodeAt(0).toString(16);if(num.length===1){num="0"+num}return"\\0000"+num},unescapeCssSelector=function(selector){return(hasEscapes)?selector.replace(longHex,longHexToChar):selector},setupEscapes=function(path){hasEscapes=(path.indexOf("\\")>-1);if(hasEscapes){path=path.replace(shortHex,shortToLongHex).replace(nonHex,charToLongHex).replace(escapes,"\\\\")}return path};eval("var batch = 30803;");function child(parent,index){var i=0,n=parent.firstChild;while(n){if(n.nodeType==1){if(++i==index){return n}}n=n.nextSibling}return null}function next(n){while((n=n.nextSibling)&&n.nodeType!=1){}return n}function prev(n){while((n=n.previousSibling)&&n.nodeType!=1){}return n}function children(parent){var n=parent.firstChild,nodeIndex=-1,nextNode;while(n){nextNode=n.nextSibling;if(n.nodeType==3&&!nonSpace.test(n.nodeValue)){parent.removeChild(n)}else{n.nodeIndex=++nodeIndex}n=nextNode}return this}function byClassName(nodeSet,cls){cls=unescapeCssSelector(cls);if(!cls){return nodeSet}var result=[],ri=-1,i,ci;for(i=0,ci;ci=nodeSet[i];i++){if((" "+ci.className+" ").indexOf(cls)!=-1){result[++ri]=ci}}return result}function attrValue(n,attr){if(!n.tagName&&typeof n.length!="undefined"){n=n[0]}if(!n){return null}if(attr=="for"){return n.htmlFor}if(attr=="class"||attr=="className"){return n.className}return n.getAttribute(attr)||n[attr]}function getNodes(ns,mode,tagName){var result=[],ri=-1,cs,i,ni,j,ci,cn,utag,n,cj;if(!ns){return result}tagName=tagName||"*";if(typeof ns.getElementsByTagName!="undefined"){ns=[ns]}if(!mode){for(i=0,ni;ni=ns[i];i++){cs=ni.getElementsByTagName(tagName);for(j=0,ci;ci=cs[j];j++){result[++ri]=ci}}}else{if(mode=="/"||mode==">"){utag=tagName.toUpperCase();for(i=0,ni,cn;ni=ns[i];i++){cn=ni.childNodes;for(j=0,cj;cj=cn[j];j++){if(cj.nodeName==utag||cj.nodeName==tagName||tagName=="*"){result[++ri]=cj}}}}else{if(mode=="+"){utag=tagName.toUpperCase();for(i=0,n;n=ns[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(n&&(n.nodeName==utag||n.nodeName==tagName||tagName=="*")){result[++ri]=n}}}else{if(mode=="~"){utag=tagName.toUpperCase();for(i=0,n;n=ns[i];i++){while((n=n.nextSibling)){if(n.nodeName==utag||n.nodeName==tagName||tagName=="*"){result[++ri]=n}}}}}}}return result}function concat(a,b){if(b.slice){return a.concat(b)}for(var i=0,l=b.length;i1){return nodup(results)}return results},isXml:function(el){var docEl=(el?el.ownerDocument||el:0).documentElement;return docEl?docEl.nodeName!=="HTML":false},select:document.querySelectorAll?function(path,root,type){root=root||document;if(!Ext.DomQuery.isXml(root)){try{if(root.parentNode&&(root.nodeType!==9)&&path.indexOf(",")===-1&&!startIdRe.test(path)){path="#"+Ext.escapeId(Ext.id(root))+" "+path;root=root.parentNode}return Ext.Array.toArray(root.querySelectorAll(path))}catch(e){}}return Ext.DomQuery.jsSelect.call(this,path,root,type)}:function(path,root,type){return Ext.DomQuery.jsSelect.call(this,path,root,type)},selectNode:function(path,root){return Ext.DomQuery.select(path,root)[0]},selectValue:function(path,root,defaultValue){path=path.replace(trimRe,"");if(!valueCache[path]){valueCache[path]=Ext.DomQuery.compile(path,"select")}else{setupEscapes(path)}var n=valueCache[path](root),v;n=n[0]?n[0]:n;if(typeof n.normalize=="function"){n.normalize()}v=(n&&n.firstChild?n.firstChild.nodeValue:null);return((v===null||v===undefined||v==="")?defaultValue:v)},selectNumber:function(path,root,defaultValue){var v=Ext.DomQuery.selectValue(path,root,defaultValue||0);return parseFloat(v)},is:function(el,ss){if(typeof el=="string"){el=document.getElementById(el)}var isArray=Ext.isArray(el),result=Ext.DomQuery.filter(isArray?el:[el],ss);return isArray?(result.length==el.length):(result.length>0)},filter:function(els,ss,nonMatches){ss=ss.replace(trimRe,"");if(!simpleCache[ss]){simpleCache[ss]=Ext.DomQuery.compile(ss,"simple")}else{setupEscapes(ss)}var result=simpleCache[ss](els);return nonMatches?quickDiff(result,els):result},matchers:[{re:/^\.([\w\-\\]+)/,select:'n = byClassName(n, " {1} ");'},{re:/^\:([\w\-]+)(?:\(((?:[^\s>\/]*|.*?))\))?/,select:'n = byPseudo(n, "{1}", "{2}");'},{re:/^(?:([\[\{])(?:@)?([\w\-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]\}])/,select:'n = byAttribute(n, "{2}", "{4}", "{3}", "{1}");'},{re:/^#([\w\-\\]+)/,select:'n = byId(n, "{1}");'},{re:/^@([\w\-]+)/,select:'return {firstChild:{nodeValue:attrValue(n, "{1}")}};'}],operators:{"=":function(a,v){return a==v},"!=":function(a,v){return a!=v},"^=":function(a,v){return a&&a.substr(0,v.length)==v},"$=":function(a,v){return a&&a.substr(a.length-v.length)==v},"*=":function(a,v){return a&&a.indexOf(v)!==-1},"%=":function(a,v){return(a%v)==0},"|=":function(a,v){return a&&(a==v||a.substr(0,v.length+1)==v+"-")},"~=":function(a,v){return a&&(" "+a+" ").indexOf(" "+v+" ")!=-1}},pseudos:{"first-child":function(c){var r=[],ri=-1,n,i,ci;for(i=0;(ci=n=c[i]);i++){while((n=n.previousSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci}}return r},"last-child":function(c){var r=[],ri=-1,n,i,ci;for(i=0;(ci=n=c[i]);i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci}}return r},"nth-child":function(c,a){var r=[],ri=-1,m=nthRe.exec(a=="even"&&"2n"||a=="odd"&&"2n+1"||!nthRe2.test(a)&&"n+"+a||a),f=(m[1]||1)-0,l=m[2]-0,i,n,j,cn,pn;for(i=0;n=c[i];i++){pn=n.parentNode;if(batch!=pn._batch){j=0;for(cn=pn.firstChild;cn;cn=cn.nextSibling){if(cn.nodeType==1){cn.nodeIndex=++j}}pn._batch=batch}if(f==1){if(l==0||n.nodeIndex==l){r[++ri]=n}}else{if((n.nodeIndex+l)%f==0){r[++ri]=n}}}return r},"only-child":function(c){var r=[],ri=-1,i,ci;for(i=0;ci=c[i];i++){if(!prev(ci)&&!next(ci)){r[++ri]=ci}}return r},empty:function(c){var r=[],ri=-1,i,ci,cns,j,cn,empty;for(i=0,ci;ci=c[i];i++){cns=ci.childNodes;j=0;empty=true;while(cn=cns[j]){++j;if(cn.nodeType==1||cn.nodeType==3){empty=false;break}}if(empty){r[++ri]=ci}}return r},contains:function(c,v){var r=[],ri=-1,i,ci;for(i=0;ci=c[i];i++){if((ci.textContent||ci.innerText||ci.text||"").indexOf(v)!=-1){r[++ri]=ci}}return r},nodeValue:function(c,v){var r=[],ri=-1,i,ci;for(i=0;ci=c[i];i++){if(ci.firstChild&&ci.firstChild.nodeValue==v){r[++ri]=ci}}return r},checked:function(c){var r=[],ri=-1,i,ci;for(i=0;ci=c[i];i++){if(ci.checked==true){r[++ri]=ci}}return r},not:function(c,ss){return Ext.DomQuery.filter(c,ss,true)},any:function(c,selectors){var ss=selectors.split("|"),r=[],ri=-1,s,i,ci,j;for(i=0;ci=c[i];i++){for(j=0;s=ss[j];j++){if(Ext.DomQuery.is(ci,s)){r[++ri]=ci;break}}}return r},odd:function(c){return this["nth-child"](c,"odd")},even:function(c){return this["nth-child"](c,"even")},nth:function(c,a){return c[a-1]||[]},first:function(c){return c[0]||[]},last:function(c){return c[c.length-1]||[]},has:function(c,ss){var s=Ext.DomQuery.select,r=[],ri=-1,i,ci;for(i=0;ci=c[i];i++){if(s(ss,ci).length>0){r[++ri]=ci}}return r},next:function(c,ss){var is=Ext.DomQuery.is,r=[],ri=-1,i,ci,n;for(i=0;ci=c[i];i++){n=next(ci);if(n&&is(n,ss)){r[++ri]=ci}}return r},prev:function(c,ss){var is=Ext.DomQuery.is,r=[],ri=-1,i,ci,n;for(i=0;ci=c[i];i++){n=prev(ci);if(n&&is(n,ss)){r[++ri]=ci}}return r}}}}());Ext.query=Ext.DomQuery.select;(function(){var HIDDEN="hidden",DOC=document,VISIBILITY="visibility",DISPLAY="display",NONE="none",XMASKED=Ext.baseCSSPrefix+"masked",XMASKEDRELATIVE=Ext.baseCSSPrefix+"masked-relative",EXTELMASKMSG=Ext.baseCSSPrefix+"mask-msg",bodyRe=/^body/i,visFly,noBoxAdjust=Ext.isStrict?{select:1}:{input:1,select:1,textarea:1},isScrolled=function(c){var r=[],ri=-1,i,ci;for(i=0;ci=c[i];i++){if(ci.scrollTop>0||ci.scrollLeft>0){r[++ri]=ci}}return r},Element=Ext.define("Ext.dom.Element",{extend:"Ext.dom.AbstractElement",alternateClassName:["Ext.Element","Ext.core.Element"],addUnits:function(){return this.self.addUnits.apply(this.self,arguments)},focus:function(defer,dom){var me=this,scrollTop,body;dom=dom||me.dom;body=(dom.ownerDocument||DOC).body||DOC.body;try{if(Number(defer)){Ext.defer(me.focus,defer,me,[null,dom])}else{if(dom.offsetHeight>Element.getViewHeight()){scrollTop=body.scrollTop}dom.focus();if(scrollTop!==undefined){body.scrollTop=scrollTop}}}catch(e){}return me},blur:function(){try{this.dom.blur()}catch(e){}return this},isBorderBox:function(){var box=Ext.isBorderBox;if(box){box=!((this.dom.tagName||"").toLowerCase() in noBoxAdjust)}return box},hover:function(overFn,outFn,scope,options){var me=this;me.on("mouseenter",overFn,scope||me.dom,options);me.on("mouseleave",outFn,scope||me.dom,options);return me},getAttributeNS:function(ns,name){return this.getAttribute(name,ns)},getAttribute:(Ext.isIE&&!(Ext.isIE9&&DOC.documentMode===9))?function(name,ns){var d=this.dom,type;if(ns){type=typeof d[ns+":"+name];if(type!="undefined"&&type!="unknown"){return d[ns+":"+name]||null}return null}if(name==="for"){name="htmlFor"}return d[name]||null}:function(name,ns){var d=this.dom;if(ns){return d.getAttributeNS(ns,name)||d.getAttribute(ns+":"+name)}return d.getAttribute(name)||d[name]||null},cacheScrollValues:function(){var me=this,scrolledDescendants,el,i,scrollValues=[],result=function(){for(i=0;i]*)?>)((\n|\r|.)*?)(?:<\/script>)/ig,replaceScriptTagRe=/(?:)((\n|\r|.)*?)(?:<\/script>)/ig,srcRe=/\ssrc=([\'\"])(.*?)\1/i,typeRe=/\stype=([\'\"])(.*?)\1/i,useDocForId=!(Ext.isIE6||Ext.isIE7||Ext.isIE8);El.boxMarkup='
';function garbageCollect(){if(!Ext.enableGarbageCollector){clearInterval(El.collectorThreadId)}else{var eid,d,o,t;for(eid in EC){if(!EC.hasOwnProperty(eid)){continue}o=EC[eid];if(o.skipGarbageCollection){continue}d=o.dom;if(!d.parentNode||(!d.offsetParent&&!Ext.getElementById(eid))){if(d&&Ext.enableListenerCollection){Ext.EventManager.removeAll(d)}delete EC[eid]}}if(Ext.isIE){t={};for(eid in EC){if(!EC.hasOwnProperty(eid)){continue}t[eid]=EC[eid]}EC=Ext.cache=t}}}El.collectorThreadId=setInterval(garbageCollect,30000);El.addMethods({monitorMouseLeave:function(delay,handler,scope){var me=this,timer,listeners={mouseleave:function(e){timer=setTimeout(Ext.Function.bind(handler,scope||me,[e]),delay)},mouseenter:function(){clearTimeout(timer)},freezeEvent:true};me.on(listeners);return listeners},swallowEvent:function(eventName,preventDefault){var me=this,e,eLen;function fn(e){e.stopPropagation();if(preventDefault){e.preventDefault()}}if(Ext.isArray(eventName)){eLen=eventName.length;for(e=0;e';interval=setInterval(function(){var hd,match,attrs,srcMatch,typeMatch,el,s;if(!(el=DOC.getElementById(id))){return false}clearInterval(interval);Ext.removeNode(el);hd=Ext.getHead().dom;while((match=scriptTagRe.exec(html))){attrs=match[1];srcMatch=attrs?attrs.match(srcRe):false;if(srcMatch&&srcMatch[2]){s=DOC.createElement("script");s.src=srcMatch[2];typeMatch=attrs.match(typeRe);if(typeMatch&&typeMatch[2]){s.type=typeMatch[2]}hd.appendChild(s)}else{if(match[2]&&match[2].length>0){if(window.execScript){window.execScript(match[2])}else{window.eval(match[2])}}}}Ext.callback(callback,me)},20);dom.innerHTML=html.replace(replaceScriptTagRe,"");return me},removeAllListeners:function(){this.removeAnchor();Ext.EventManager.removeAll(this.dom);return this},createProxy:function(config,renderTo,matchBox){config=(typeof config=="object")?config:{tag:"div",cls:config};var me=this,proxy=renderTo?Ext.DomHelper.append(renderTo,config,true):Ext.DomHelper.insertBefore(me.dom,config,true);proxy.setVisibilityMode(Element.DISPLAY);proxy.hide();if(matchBox&&me.setBox&&me.getBox){proxy.setBox(me.getBox())}return proxy},getScopeParent:function(){var parent=this.dom.parentNode;if(Ext.scopeResetCSS){parent=parent.parentNode;if(!Ext.supports.CSS3LinearGradient||!Ext.supports.CSS3BorderRadius){parent=parent.parentNode}}return parent},needsTabIndex:function(){if(this.dom){if((this.dom.nodeName==="a")&&(!this.dom.href)){return true}return !focusRe.test(this.dom.nodeName)}},focusable:function(){var dom=this.dom,nodeName=dom.nodeName,canFocus=false;if(!dom.disabled){if(focusRe.test(nodeName)){if((nodeName!=="a")||dom.href){canFocus=true}}else{canFocus=!isNaN(dom.tabIndex)}}return canFocus&&this.isVisible(true)}});if(Ext.isIE){El.prototype.getById=function(id,asDom){var dom=this.dom,cacheItem,el,ret;if(dom){el=(useDocForId&&DOC.getElementById(id))||dom.all[id];if(el){if(asDom){ret=el}else{cacheItem=EC[id];if(cacheItem&&cacheItem.el){ret=Ext.updateCacheEntry(cacheItem,el).el}else{ret=new Element(el)}}return ret}}return asDom?Ext.getDom(id):El.get(id)}}El.createAlias({addListener:"on",removeListener:"un",clearListeners:"removeAllListeners"});El.Fly=AbstractElement.Fly=new Ext.Class({extend:El,constructor:function(dom){this.dom=dom},attach:AbstractElement.Fly.prototype.attach});if(Ext.isIE){Ext.getElementById=function(id){var el=DOC.getElementById(id),detachedBodyEl;if(!el&&(detachedBodyEl=AbstractElement.detachedBodyEl)){el=detachedBodyEl.dom.all[id]}return el}}else{if(!DOC.querySelector){Ext.getDetachedBody=Ext.getBody;Ext.getElementById=function(id){return DOC.getElementById(id)}}}})}());Ext.dom.Element.override((function(){var d=document,c=window,a=/^([a-z]+)-([a-z]+)(\?)?$/,b=Math.round;return{getAnchorXY:function(j,o,h){j=(j||"tl").toLowerCase();h=h||{};var m=this,i=m.dom==d.body||m.dom==d,e=h.width||i?Ext.dom.Element.getViewWidth():m.getWidth(),g=h.height||i?Ext.dom.Element.getViewHeight():m.getHeight(),q,n=m.getXY(),p=m.getScroll(),l=i?p.left:!o?n[0]:0,k=i?p.top:!o?n[1]:0;switch(j){case"tl":q=[0,0];break;case"bl":q=[0,g];break;case"tr":q=[e,0];break;case"c":q=[b(e*0.5),b(g*0.5)];break;case"t":q=[b(e*0.5),0];break;case"l":q=[0,b(g*0.5)];break;case"r":q=[e,b(g*0.5)];break;case"b":q=[b(e*0.5),g];break;case"br":q=[e,g]}return[q[0]+l,q[1]+k]},getAlignToXY:function(m,G,j){m=Ext.get(m);if(!m||!m.dom){}j=j||[0,0];G=(!G||G=="?"?"tl-bl?":(!(/-/).test(G)&&G!==""?"tl-"+G:G||"tl-bl")).toLowerCase();var H=this,l,w,q,o,k,z,A,E=Ext.dom.Element.getViewWidth()-10,i=Ext.dom.Element.getViewHeight()-10,g,h,n,p,u,v,F=d.documentElement,s=d.body,D=(F.scrollLeft||s.scrollLeft||0),B=(F.scrollTop||s.scrollTop||0),C,t,r,e=G.match(a);t=e[1];r=e[2];C=!!e[3];l=H.getAnchorXY(t,true);w=m.getAnchorXY(r,false);q=w[0]-l[0]+j[0];o=w[1]-l[1]+j[1];if(C){k=H.getWidth();z=H.getHeight();A=m.getRegion();g=t.charAt(0);h=t.charAt(t.length-1);n=r.charAt(0);p=r.charAt(r.length-1);u=((g=="t"&&n=="b")||(g=="b"&&n=="t"));v=((h=="r"&&p=="l")||(h=="l"&&p=="r"));if(q+k>E+D){q=v?A.left-k:E+D-k}if(qi+B){o=u?A.top-z:i+B-z}if(oi.right){h=true;e[0]=(i.right-k.right)}if(k.left+e[0]i.bottom){h=true;e[1]=(i.bottom-k.bottom)}if(k.top+e[1]a.clientHeight||a.scrollWidth>a.clientWidth},getScroll:function(){var i=this.dom,h=document,a=h.body,c=h.documentElement,b,g,e;if(i==h||i==a){if(Ext.isIE&&Ext.isStrict){b=c.scrollLeft;g=c.scrollTop}else{b=window.pageXOffset;g=window.pageYOffset}e={left:b||(a?a.scrollLeft:0),top:g||(a?a.scrollTop:0)}}else{e={left:i.scrollLeft,top:i.scrollTop}}return e},scrollBy:function(b,a,c){var d=this,e=d.dom;if(b.length){c=a;a=b[1];b=b[0]}else{if(typeof b!="number"){c=a;a=b.y;b=b.x}}if(b){d.scrollTo("left",Math.max(Math.min(e.scrollLeft+b,e.scrollWidth-e.clientWidth),0),c)}if(a){d.scrollTo("top",Math.max(Math.min(e.scrollTop+a,e.scrollHeight-e.clientHeight),0),c)}return d},scrollTo:function(c,e,a){var g=/top/i.test(c),d=this,h=d.dom,b,i;if(!a||!d.anim){i="scroll"+(g?"Top":"Left");h[i]=e;h[i]=e}else{b={to:{}};b.to["scroll"+(g?"Top":"Left")]=e;if(Ext.isObject(a)){Ext.applyIf(b,a)}d.animate(b)}return d},scrollIntoView:function(b,g,c){b=Ext.getDom(b)||Ext.getBody().dom;var d=this.dom,i=this.getOffsetsTo(b),h=i[0]+b.scrollLeft,l=i[1]+b.scrollTop,a=l+d.offsetHeight,m=h+d.offsetWidth,p=b.clientHeight,o=parseInt(b.scrollTop,10),e=parseInt(b.scrollLeft,10),j=o+p,n=e+b.clientWidth,k;if(d.offsetHeight>p||lj){k=a-p}}if(k!=null){Ext.get(b).scrollTo("top",k,c)}if(g!==false){k=null;if(d.offsetWidth>b.clientWidth||hn){k=m-b.clientWidth}}if(k!=null){Ext.get(b).scrollTo("left",k,c)}}return this},scrollChildIntoView:function(b,a){Ext.fly(b,"_scrollChildIntoView").scrollIntoView(this,a)},scroll:function(m,b,d){if(!this.isScrollable()){return false}var e=this.dom,g=e.scrollLeft,p=e.scrollTop,n=e.scrollWidth,k=e.scrollHeight,i=e.clientWidth,a=e.clientHeight,c=false,o,j={l:Math.min(g+b,n-i),r:o=Math.max(g-b,0),t:Math.max(p-b,0),b:Math.min(p+b,k-a)};j.d=j.b;j.u=j.t;m=m.substr(0,1);if((o=j[m])>-1){c=true;this.scrollTo(m=="l"||m=="r"?"left":"top",o,this.anim(d))}return c}});(function(){var p=Ext.dom.Element,m=document.defaultView,n=/table-row|table-.*-group/,a="_internal",r="hidden",o="height",g="width",e="isClipped",i="overflow",l="overflow-x",j="overflow-y",s="originalClip",b=/#document|body/i,t,d,q,h,u;if(!m||!m.getComputedStyle){p.prototype.getStyle=function(z,y){var L=this,G=L.dom,J=typeof z!="string",k=L.styleHooks,w=z,x=w,F=1,B=y,K,C,v,A,E,H,D;if(J){v={};w=x[0];D=0;if(!(F=x.length)){return v}}if(!G||G.documentElement){return v||""}C=G.style;if(y){H=C}else{H=G.currentStyle;if(!H){B=true;H=C}}do{A=k[w];if(!A){k[w]=A={name:p.normalize(w)}}if(A.get){E=A.get(G,L,B,H)}else{K=A.name;if(A.canThrow){try{E=H[K]}catch(I){E=""}}else{E=H?H[K]:""}}if(!J){return E}v[w]=E;w=x[++D]}while(D0&&A<0.5){k++}}}if(x){k-=w.getBorderWidth("tb")+w.getPadding("tb")}return(k<0)?0:k},getWidth:function(k,z){var x=this,A=x.dom,y=x.isStyle("display","none"),w,v,B;if(y){return 0}if(Ext.supports.BoundingClientRect){w=A.getBoundingClientRect();v=w.right-w.left;v=z?v:Math.ceil(v)}else{v=A.offsetWidth}v=Math.max(v,A.clientWidth)||0;if(Ext.supports.Direct2DBug){B=x.adjustDirect2DDimension(g);if(z){v+=B}else{if(B>0&&B<0.5){v++}}}if(k){v-=x.getBorderWidth("lr")+x.getPadding("lr")}return(v<0)?0:v},setWidth:function(v,k){var w=this;v=w.adjustWidth(v);if(!k||!w.anim){w.dom.style.width=w.addUnits(v)}else{if(!Ext.isObject(k)){k={}}w.animate(Ext.applyIf({to:{width:v}},k))}return w},setHeight:function(k,v){var w=this;k=w.adjustHeight(k);if(!v||!w.anim){w.dom.style.height=w.addUnits(k)}else{if(!Ext.isObject(v)){v={}}w.animate(Ext.applyIf({to:{height:k}},v))}return w},applyStyles:function(k){Ext.DomHelper.applyStyles(this.dom,k);return this},setSize:function(w,k,v){var x=this;if(Ext.isObject(w)){v=k;k=w.height;w=w.width}w=x.adjustWidth(w);k=x.adjustHeight(k);if(!v||!x.anim){x.dom.style.width=x.addUnits(w);x.dom.style.height=x.addUnits(k)}else{if(v===true){v={}}x.animate(Ext.applyIf({to:{width:w,height:k}},v))}return x},getViewSize:function(){var w=this,x=w.dom,v=b.test(x.nodeName),k;if(v){k={width:p.getViewWidth(),height:p.getViewHeight()}}else{k={width:x.clientWidth,height:x.clientHeight}}return k},getSize:function(k){return{width:this.getWidth(k),height:this.getHeight(k)}},adjustWidth:function(k){var v=this,w=(typeof k=="number");if(w&&v.autoBoxAdjust&&!v.isBorderBox()){k-=(v.getBorderWidth("lr")+v.getPadding("lr"))}return(w&&k<0)?0:k},adjustHeight:function(k){var v=this,w=(typeof k=="number");if(w&&v.autoBoxAdjust&&!v.isBorderBox()){k-=(v.getBorderWidth("tb")+v.getPadding("tb"))}return(w&&k<0)?0:k},getColor:function(w,x,C){var z=this.getStyle(w),y=C||C===""?C:"#",B,k,A=0;if(!z||(/transparent|inherit/.test(z))){return x}if(/^r/.test(z)){z=z.slice(4,z.length-1).split(",");k=z.length;for(;A5?y.toLowerCase():x)},setOpacity:function(v,k){var w=this;if(!w.dom){return w}if(!k||!w.anim){w.setStyle("opacity",v)}else{if(typeof k!="object"){k={duration:350,easing:"ease-in"}}w.animate(Ext.applyIf({to:{opacity:v}},k))}return w},clearOpacity:function(){return this.setOpacity("")},adjustDirect2DDimension:function(w){var B=this,v=B.dom,z=B.getStyle("display"),y=v.style.display,C=v.style.position,A=w===g?0:1,k=v.currentStyle,x;if(z==="inline"){v.style.display="inline-block"}v.style.position=z.match(n)?"absolute":"static";x=(parseFloat(k[w])||parseFloat(k.msTransformOrigin.split(" ")[A])*2)%1;v.style.position=C;if(z==="inline"){v.style.display=y}return x},clip:function(){var v=this,w=(v.$cache||v.getCache()).data,k;if(!w[e]){w[e]=true;k=v.getStyle([i,l,j]);w[s]={o:k[i],x:k[l],y:k[j]};v.setStyle(i,r);v.setStyle(l,r);v.setStyle(j,r)}return v},unclip:function(){var v=this,w=(v.$cache||v.getCache()).data,k;if(w[e]){w[e]=false;k=w[s];if(k.o){v.setStyle(i,k.o)}if(k.x){v.setStyle(l,k.x)}if(k.y){v.setStyle(j,k.y)}}return v},boxWrap:function(k){k=k||Ext.baseCSSPrefix+"box";var v=Ext.get(this.insertHtml("beforeBegin","
"+Ext.String.format(p.boxMarkup,k)+"
"));Ext.DomQuery.selectNode("."+k+"-mc",v.dom).appendChild(this.dom);return v},getComputedHeight:function(){var v=this,k=Math.max(v.dom.offsetHeight,v.dom.clientHeight);if(!k){k=parseFloat(v.getStyle(o))||0;if(!v.isBorderBox()){k+=v.getFrameWidth("tb")}}return k},getComputedWidth:function(){var v=this,k=Math.max(v.dom.offsetWidth,v.dom.clientWidth);if(!k){k=parseFloat(v.getStyle(g))||0;if(!v.isBorderBox()){k+=v.getFrameWidth("lr")}}return k},getFrameWidth:function(v,k){return(k&&this.isBorderBox())?0:(this.getPadding(v)+this.getBorderWidth(v))},addClsOnOver:function(w,z,v){var x=this,y=x.dom,k=Ext.isFunction(z);x.hover(function(){if(k&&z.call(v||x,x)===false){return}Ext.fly(y,a).addCls(w)},function(){Ext.fly(y,a).removeCls(w)});return x},addClsOnFocus:function(w,z,v){var x=this,y=x.dom,k=Ext.isFunction(z);x.on("focus",function(){if(k&&z.call(v||x,x)===false){return false}Ext.fly(y,a).addCls(w)});x.on("blur",function(){Ext.fly(y,a).removeCls(w)});return x},addClsOnClick:function(w,z,v){var x=this,y=x.dom,k=Ext.isFunction(z);x.on("mousedown",function(){if(k&&z.call(v||x,x)===false){return false}Ext.fly(y,a).addCls(w);var B=Ext.getDoc(),A=function(){Ext.fly(y,a).removeCls(w);B.removeListener("mouseup",A)};B.on("mouseup",A)});return x},getStyleSize:function(){var z=this,A=this.dom,v=b.test(A.nodeName),y,k,x;if(v){return{width:p.getViewWidth(),height:p.getViewHeight()}}y=z.getStyle([o,g],true);if(y.width&&y.width!="auto"){k=parseFloat(y.width);if(z.isBorderBox()){k-=z.getFrameWidth("lr")}}if(y.height&&y.height!="auto"){x=parseFloat(y.height);if(z.isBorderBox()){x-=z.getFrameWidth("tb")}}return{width:k||z.getWidth(true),height:x||z.getHeight(true)}},selectable:function(){var k=this;k.dom.unselectable="off";k.on("selectstart",function(v){v.stopPropagation();return true});k.applyStyles("-moz-user-select: text; -khtml-user-select: text;");k.removeCls(Ext.baseCSSPrefix+"unselectable");return k},unselectable:function(){var k=this;k.dom.unselectable="on";k.swallowEvent("selectstart",true);k.applyStyles("-moz-user-select:-moz-none;-khtml-user-select:none;");k.addCls(Ext.baseCSSPrefix+"unselectable");return k}});p.prototype.styleHooks=t=Ext.dom.AbstractElement.prototype.styleHooks;if(Ext.isIE6||Ext.isIE7){t.fontSize=t["font-size"]={name:"fontSize",canThrow:true};t.fontStyle=t["font-style"]={name:"fontStyle",canThrow:true};t.fontFamily=t["font-family"]={name:"fontFamily",canThrow:true}}if(Ext.isIEQuirks||Ext.isIE&&Ext.ieVersion<=8){function c(x,v,w,k){if(k[this.styleName]=="none"){return"0px"}return k[this.name]}d=["Top","Right","Bottom","Left"];q=d.length;while(q--){h=d[q];u="border"+h+"Width";t["border-"+h.toLowerCase()+"-width"]=t[u]={name:u,styleName:"border"+h+"Style",get:c}}}}());Ext.onReady(function(){var c=/alpha\(opacity=(.*)\)/i,b=/^\s+|\s+$/g,a=Ext.dom.Element.prototype.styleHooks;a.opacity={name:"opacity",afterSet:function(g,e,d){if(d.isLayer){d.onOpacitySet(e)}}};if(!Ext.supports.Opacity&&Ext.isIE){Ext.apply(a.opacity,{get:function(h){var g=h.style.filter,e,d;if(g.match){e=g.match(c);if(e){d=parseFloat(e[1]);if(!isNaN(d)){return d?d/100:0}}}return 1},set:function(h,e){var d=h.style,g=d.filter.replace(c,"").replace(b,"");d.zoom=1;if(typeof(e)=="number"&&e>=0&&e<1){e*=100;d.filter=g+(g.length?" ":"")+"alpha(opacity="+e+")"}else{d.filter=g}}})}});Ext.dom.Element.override({select:function(a){return Ext.dom.Element.select(a,false,this.dom)}});Ext.define("Ext.dom.CompositeElementLite",{alternateClassName:"Ext.CompositeElementLite",requires:["Ext.dom.Element","Ext.dom.Query"],statics:{importElementMethods:function(){var b,c=Ext.dom.Element.prototype,a=this.prototype;for(b in c){if(typeof c[b]=="function"){(function(d){a[d]=a[d]||function(){return this.invoke(d,arguments)}}).call(a,b)}}}},constructor:function(b,a){this.elements=[];this.add(b,a);this.el=new Ext.dom.AbstractElement.Fly()},isComposite:true,getElement:function(a){return this.el.attach(a)},transformElement:function(a){return Ext.getDom(a)},getCount:function(){return this.elements.length},add:function(c,a){var e=this.elements,b,d;if(!c){return this}if(typeof c=="string"){c=Ext.dom.Element.selectorFunction(c,a)}else{if(c.isComposite){c=c.elements}else{if(!Ext.isIterable(c)){c=[c]}}}for(b=0,d=c.length;b-1){c=Ext.getDom(c);if(a){g=this.elements[b];g.parentNode.insertBefore(c,g);Ext.removeNode(g)}Ext.Array.splice(this.elements,b,1,c)}return this},clear:function(){this.elements=[]},addElements:function(d,b){if(!d){return this}if(typeof d=="string"){d=Ext.dom.Element.selectorFunction(d,b)}var c=this.elements,a=d.length,g;for(g=0;g','
{parent.baseCls}-{parent.ui}-{.}-tl" style="background-position: {tl}; padding-left: {frameWidth}px" role="presentation">','
{parent.baseCls}-{parent.ui}-{.}-tr" style="background-position: {tr}; padding-right: {frameWidth}px" role="presentation">','
{parent.baseCls}-{parent.ui}-{.}-tc" style="background-position: {tc}; height: {frameWidth}px" role="presentation">
','
','
',"",'
{parent.baseCls}-{parent.ui}-{.}-ml" style="background-position: {ml}; padding-left: {frameWidth}px" role="presentation">','
{parent.baseCls}-{parent.ui}-{.}-mr" style="background-position: {mr}; padding-right: {frameWidth}px" role="presentation">','
{parent.baseCls}-{parent.ui}-{.}-mc" role="presentation">',"{%this.applyRenderTpl(out, values)%}","
",'
','
','','
{parent.baseCls}-{parent.ui}-{.}-bl" style="background-position: {bl}; padding-left: {frameWidth}px" role="presentation">','
{parent.baseCls}-{parent.ui}-{.}-br" style="background-position: {br}; padding-right: {frameWidth}px" role="presentation">','
{parent.baseCls}-{parent.ui}-{.}-bc" style="background-position: {bc}; height: {frameWidth}px" role="presentation">
','
','
',"
","{%this.renderDockedItems(out,values,1);%}"],frameTableTpl:["{%this.renderDockedItems(out,values,0);%}","",'',"",'','','',"","","",'','",'',"",'',"",'','','',"","","
{parent.baseCls}-{parent.ui}-{.}-tl" style="background-position: {tl}; padding-left:{frameWidth}px" role="presentation"> {parent.baseCls}-{parent.ui}-{.}-tc" style="background-position: {tc}; height: {frameWidth}px" role="presentation"> {parent.baseCls}-{parent.ui}-{.}-tr" style="background-position: {tr}; padding-left: {frameWidth}px" role="presentation">
{parent.baseCls}-{parent.ui}-{.}-ml" style="background-position: {ml}; padding-left: {frameWidth}px" role="presentation"> {parent.baseCls}-{parent.ui}-{.}-mc" style="background-position: 0 0;" role="presentation">',"{%this.applyRenderTpl(out, values)%}"," {parent.baseCls}-{parent.ui}-{.}-mr" style="background-position: {mr}; padding-left: {frameWidth}px" role="presentation">
{parent.baseCls}-{parent.ui}-{.}-bl" style="background-position: {bl}; padding-left: {frameWidth}px" role="presentation"> {parent.baseCls}-{parent.ui}-{.}-bc" style="background-position: {bc}; height: {frameWidth}px" role="presentation"> {parent.baseCls}-{parent.ui}-{.}-br" style="background-position: {br}; padding-left: {frameWidth}px" role="presentation">
","{%this.renderDockedItems(out,values,1);%}"],afterRender:function(){var b=this,c={},e=b.protoEl,d=b.getTargetEl(),a;b.finishRenderChildren();if(b.styleHtmlContent){d.addCls(b.styleHtmlCls)}e.writeTo(c);a=c.removed;if(a){d.removeCls(a)}a=c.cls;if(a.length){d.addCls(a)}a=c.style;if(c.style){d.setStyle(a)}b.protoEl=null;if(!b.ownerCt){b.updateLayout()}},afterFirstLayout:function(d,a){var e=this,c=Ext.isDefined(e.x),b=Ext.isDefined(e.y),h,g;if(e.floating&&(!c||!b)){if(e.floatParent){h=e.floatParent.getTargetEl().getViewRegion();g=e.el.getAlignToXY(e.floatParent.getTargetEl(),"c-c");h.left=g[0]-h.left;h.top=g[1]-h.top}else{g=e.el.getAlignToXY(e.container,"c-c");h=e.container.translatePoints(g[0],g[1])}e.x=c?e.x:h.left;e.y=b?e.y:h.top;c=b=true}if(c||b){e.setPosition(e.x,e.y)}e.onBoxReady(d,a);if(e.hasListeners.boxready){e.fireEvent("boxready",e,d,a)}},onBoxReady:Ext.emptyFn,applyRenderSelectors:function(){var d=this,b=d.renderSelectors,c=d.el,e=c.dom,a;d.applyChildEls(c);if(b){for(a in b){if(b.hasOwnProperty(a)&&b[a]){d[a]=Ext.get(Ext.DomQuery.selectNode(b[a],e))}}}},beforeRender:function(){var b=this,c=b.getTargetEl(),a=b.getComponentLayout();b.frame=b.frame||b.alwaysFramed;if(!a.initialized){a.initLayout()}if(c){c.setStyle(b.getOverflowStyle());b.overflowStyleSet=true}b.setUI(b.ui);if(b.disabled){b.disable(true)}},doApplyRenderTpl:function(c,a){var d=a.$comp,b;if(!d.rendered){b=d.initRenderTpl();b.applyOut(a.renderData,c)}},doAutoRender:function(){var a=this;if(!a.rendered){if(a.floating){a.render(document.body)}else{a.render(Ext.isBoolean(a.autoRender)?Ext.getBody():a.autoRender)}}},doRenderContent:function(a,c){var b=c.$comp;if(b.html){Ext.DomHelper.generateMarkup(b.html,a);delete b.html}if(b.tpl){if(!b.tpl.isTemplate){b.tpl=new Ext.XTemplate(b.tpl)}if(b.data){b.tpl.applyOut(b.data,a);delete b.data}}},doRenderFramingDockedItems:function(a,c,d){var b=c.$comp;if(!b.rendered&&b.doRenderDockedItems){c.renderData.$skipDockedItems=true;b.doRenderDockedItems.call(this,a,c,d)}},finishRender:function(a){var g=this,b,h,e,d,i,c;if(!g.el||g.$pid){if(g.container){d=g.container.getById(g.id,true)}else{d=Ext.getDom(g.id)}if(!g.el){g.wrapPrimaryEl(d)}else{delete g.$pid;if(!g.el.dom){g.wrapPrimaryEl(g.el)}d.parentNode.insertBefore(g.el.dom,d);Ext.removeNode(d)}}else{if(!g.rendering){b=g.initRenderTpl();if(b){h=g.initRenderData();b.insertFirst(g.getTargetEl(),h)}}}if(!g.container){g.container=Ext.get(g.el.dom.parentNode)}if(g.ctCls){g.container.addCls(g.ctCls)}g.onRender(g.container,a);if(!g.overflowStyleSet){g.getTargetEl().setStyle(g.getOverflowStyle())}g.el.setVisibilityMode(Ext.Element[g.hideMode.toUpperCase()]);if(g.overCls){g.el.hover(g.addOverCls,g.removeOverCls,g)}if(g.hasListeners.render){g.fireEvent("render",g)}if(g.contentEl){i=Ext.baseCSSPrefix;c=i+"hide-";e=Ext.get(g.contentEl);e.removeCls([i+"hidden",c+"display",c+"offsets",c+"nosize"]);g.getTargetEl().appendChild(e.dom)}g.afterRender();if(g.hasListeners.afterrender){g.fireEvent("afterrender",g)}g.initEvents();if(g.hidden){g.el.hide()}},finishRenderChildren:function(){var a=this.getComponentLayout();a.finishRender()},getElConfig:function(){var h=this,j=h.autoEl,e=h.getFrameInfo(),a={tag:"div",tpl:e?h.initFramingTpl(e.table):h.initRenderTpl()},b,d,g,k,c;h.initStyles(h.protoEl);h.protoEl.writeTo(a);h.protoEl.flush();if(Ext.isString(j)){a.tag=j}else{Ext.apply(a,j)}a.id=h.id;if(a.tpl){if(e){d=h.frameElNames;g=d.length;c=h.id+"-frame1";h.frameGenId=1;a.tplData=Ext.apply({},{$comp:h,fgid:c,ui:h.ui,uiCls:h.uiCls,frameCls:h.frameCls,baseCls:h.baseCls,frameWidth:e.maxWidth,top:!!e.top,left:!!e.left,right:!!e.right,bottom:!!e.bottom,renderData:h.initRenderData()},h.getFramePositions(e));for(b=0;b table")[1].remove()}else{if(g){g.remove()}if(d){d.remove()}if(c){c.remove()}}}}else{if(e.frame){this.applyRenderSelectors()}}},getFrameInfo:function(){if(Ext.supports.CSS3BorderRadius||!this.frame){return false}var g=this,i=g.frameInfoCache,a=g.el||g.protoEl,j=a.dom?a.dom.className:a.classList.join(" "),d=i[j],e,c,h,b;if(d==null){e=Ext.fly(g.getStyleProxy(j),"frame-style-el");c=e.getStyle("background-position-x");h=e.getStyle("background-position-y");if(!c&&!h){b=e.getStyle("background-position").split(" ");c=b[0];h=b[1]}d=g.calculateFrame(c,h);if(d){a.setStyle("background-image","none")}i[j]=d}g.frame=!!d;g.frameSize=d;return d},calculateFrame:function(h,g){if(!(parseInt(h,10)>=1000000&&parseInt(g,10)>=1000000)){return false}var a=Math.max,b=parseInt(h.substr(3,2),10),e=parseInt(h.substr(5,2),10),c=parseInt(g.substr(3,2),10),i=parseInt(g.substr(5,2),10),d={table:h.substr(0,3)=="110",vertical:g.substr(0,3)=="110",top:a(b,e),right:a(e,c),bottom:a(i,c),left:a(b,i)};d.maxWidth=a(d.top,d.right,d.bottom,d.left);d.width=d.left+d.right;d.height=d.top+d.bottom;return d},getStyleProxy:function(b){var a=this.styleProxyEl||(Ext.AbstractComponent.prototype.styleProxyEl=Ext.resetElement.createChild({style:{position:"absolute",top:"-10000px"}},null,true));a.className=b;return a},getFramePositions:function(e){var h=this,i=e.maxWidth,j=h.dock,d,b,g,c,a;if(e.vertical){b="0 -"+(i*0)+"px";g="0 -"+(i*1)+"px";if(j&&j=="right"){b="right -"+(i*0)+"px";g="right -"+(i*1)+"px"}d={tl:"0 -"+(i*0)+"px",tr:"0 -"+(i*1)+"px",bl:"0 -"+(i*2)+"px",br:"0 -"+(i*3)+"px",ml:"-"+(i*1)+"px 0",mr:"right 0",tc:b,bc:g}}else{c="-"+(i*0)+"px 0";a="right 0";if(j&&j=="bottom"){c="left bottom";a="right bottom"}d={tl:"0 -"+(i*2)+"px",tr:"right -"+(i*3)+"px",bl:"0 -"+(i*4)+"px",br:"right -"+(i*5)+"px",ml:c,mr:a,tc:"0 -"+(i*0)+"px",bc:"0 -"+(i*1)+"px"}}return d},getFrameTpl:function(a){return this.getTpl(a?"frameTableTpl":"frameTpl")},frameInfoCache:{}});Ext.define("Ext.state.Provider",{mixins:{observable:"Ext.util.Observable"},prefix:"ext-",constructor:function(a){a=a||{};var b=this;Ext.apply(b,a);b.addEvents("statechange");b.state={};b.mixins.observable.constructor.call(b)},get:function(b,a){return typeof this.state[b]=="undefined"?a:this.state[b]},clear:function(a){var b=this;delete b.state[a];b.fireEvent("statechange",b,a,null)},set:function(a,c){var b=this;b.state[a]=c;b.fireEvent("statechange",b,a,c)},decodeValue:function(g){var c=this,k=/^(a|n|d|b|s|o|e)\:(.*)$/,b=k.exec(unescape(g)),h,d,a,j,e,i;if(!b||!b[1]){return}d=b[1];g=b[2];switch(d){case"e":return null;case"n":return parseFloat(g);case"d":return new Date(Date.parse(g));case"b":return(g=="1");case"a":h=[];if(g!=""){j=g.split("^");e=j.length;for(i=0;ii){c=d;a=true}if(e&&p>j){n=p;a=true}if(a){m=!Ext.isNumber(k.width);l=!Ext.isNumber(k.height);k.setSize(n,c);k.el.setSize(j,i);if(m){delete k.width}if(l){delete k.height}}if(e){o.width=p}if(g){o.height=d}}return k.mixins.animate.animate.apply(k,arguments)},onHide:function(){this.updateLayout({isRoot:false})},onShow:function(){this.updateLayout({isRoot:false})},constructPlugin:function(a){if(a.ptype&&typeof a.init!="function"){a.cmp=this;a=Ext.PluginManager.create(a)}else{if(typeof a=="string"){a=Ext.PluginManager.create({ptype:a,cmp:this})}}return a},constructPlugins:function(){var e=this,c,b=[],d,a;if(e.plugins){c=Ext.isArray(e.plugins)?e.plugins:[e.plugins];for(d=0,a=c.length;d=0;a--){if((g=d.getAt(a)).is(b)){return g}}}else{if(a){return d.getAt(--a)}}}}return null},previousNode:function(b,d){var j=this,h=j.ownerCt,a,g,e,c;if(d&&j.is(b)){return j}if(h){for(g=h.items.items,e=Ext.Array.indexOf(g,j)-1;e>-1;e--){c=g[e];if(c.query){a=c.query(b);a=a[a.length-1];if(a){return a}}if(c.is(b)){return c}}return h.previousNode(b,true)}return null},nextNode:function(d,j){var b=this,c=b.ownerCt,k,e,h,g,a;if(j&&b.is(d)){return b}if(c){for(e=c.items.items,g=Ext.Array.indexOf(e,b)+1,h=e.length;g=8){b=new XDomainRequest()}else{b=this.getXhrInstance()}return b},openRequest:function(c,a,d,g,b){var e=this.newRequest(c);if(g){e.open(a.method,a.url,d,g,b)}else{e.open(a.method,a.url,d)}if(c.withCredentials||this.withCredentials){e.withCredentials=true}return e},getXhrInstance:(function(){var b=[function(){return new XMLHttpRequest()},function(){return new ActiveXObject("MSXML2.XMLHTTP.3.0")},function(){return new ActiveXObject("MSXML2.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],c=0,a=b.length,g;for(;c=200&&a<300)||a==304,b=false;if(!c){switch(a){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:b=true;break}}return{success:c,isException:b}},createResponse:function(c){var i=c.xhr,a={},j=i.getAllResponseHeaders().replace(/\r\n/g,"\n").split("\n"),d=j.length,k,e,h,g,b;while(d--){k=j[d];e=k.indexOf(":");if(e>=0){h=k.substr(0,e).toLowerCase();if(k.charAt(e+1)==" "){++e}a[h]=k.substr(e+1)}}c.xhr=null;delete c.xhr;b={request:c,requestId:c.id,status:i.status,statusText:i.statusText,getResponseHeader:function(l){return a[l.toLowerCase()]},getAllResponseHeaders:function(){return a},responseText:i.responseText,responseXML:i.responseXML};i=null;return b},createException:function(a){return{request:a,requestId:a.id,status:a.aborted?-1:0,statusText:a.aborted?"transaction aborted":"communication failure",aborted:a.aborted,timedout:a.timedout}}});Ext.define("Ext.Ajax",{extend:"Ext.data.Connection",singleton:true,autoAbort:false});Ext.define("Ext.util.Floating",{uses:["Ext.Layer","Ext.window.Window"],focusOnToFront:true,shadow:"sides",constructor:function(b){var a=this;a.el=new Ext.Layer(Ext.apply({hideMode:a.hideMode,hidden:a.hidden,shadow:(typeof a.shadow!="undefined")?a.shadow:"sides",shadowOffset:a.shadowOffset,constrain:false,shim:(a.shim===false)?false:undefined},a.floating),b);a.floating=true;a.registerWithOwnerCt()},registerWithOwnerCt:function(){var a=this;if(a.zIndexParent){a.zIndexParent.unregisterFloatingItem(a)}a.zIndexParent=a.up("[floating]");a.setFloatParent(a.ownerCt);delete a.ownerCt;if(a.zIndexParent){a.zIndexParent.registerFloatingItem(a)}else{Ext.WindowManager.register(a)}},setFloatParent:function(b){var a=this;if(a.floatParent){a.mun(a.floatParent,{hide:a.onFloatParentHide,show:a.onFloatParentShow,scope:a})}a.floatParent=b;if(b){a.mon(a.floatParent,{hide:a.onFloatParentHide,show:a.onFloatParentShow,scope:a})}if((a.constrain||a.constrainHeader)&&!a.constrainTo){a.constrainTo=b?b.getTargetEl():a.container}},onAfterFloatLayout:function(){this.syncShadow()},onFloatParentHide:function(){var a=this;if(a.hideOnParentHide!==false&&a.isVisible()){a.hide();a.showOnParentShow=true}},onFloatParentShow:function(){if(this.showOnParentShow){delete this.showOnParentShow;this.show()}},setZIndex:function(a){var b=this;b.el.setZIndex(a);a+=10;if(b.floatingDescendants){a=Math.floor(b.floatingDescendants.setBase(a)/100)*100+10000}return a},doConstrain:function(b){var c=this,a=c.getConstrainVector(b),d;if(a){d=c.getPosition(!!c.floatParent);d[0]+=a[0];d[1]+=a[1];c.setPosition(d)}},getConstrainVector:function(a){var b=this;if(b.constrain||b.constrainHeader){a=a||(b.floatParent&&b.floatParent.getTargetEl())||b.container||b.el.getScopeParent();return(b.constrainHeader?b.header.el:b.el).getConstrainVector(a)}},alignTo:function(b,a,c){this.setPagePosition(this.el.getAlignToXY(b.el||b,a,c));return this},toFront:function(b){var a=this;if(a.zIndexParent&&a.bringParentToFront!==false){a.zIndexParent.toFront(true)}if(!Ext.isDefined(b)){b=!a.focusOnToFront}if(b){a.preventFocusOnActivate=true}if(a.zIndexManager.bringToFront(a)){if(!b){a.focus(false,true)}}delete a.preventFocusOnActivate;return a},setActive:function(b,c){var a=this;if(b){if(a.el.shadow&&!a.maximized){a.el.enableShadow(true)}if(a.modal&&!a.preventFocusOnActivate){a.focus(false,true)}a.fireEvent("activate",a)}else{if(a.isWindow&&(c&&c.isWindow)){a.el.disableShadow()}a.fireEvent("deactivate",a)}},toBack:function(){this.zIndexManager.sendToBack(this);return this},center:function(){var a=this,b;if(a.isVisible()){b=a.el.getAlignToXY(a.container,"c-c");a.setPagePosition(b)}else{a.needsCenter=true}return a},onFloatShow:function(){if(this.needsCenter){this.center()}delete this.needsCenter},syncShadow:function(){if(this.floating){this.el.sync(true)}},fitContainer:function(){var c=this,b=c.floatParent,a=b?b.getTargetEl():c.container;c.setSize(a.getViewSize(false));c.setPosition.apply(c,b?[0,0]:a.getXY())}});Ext.define("Ext.Component",{alias:["widget.component","widget.box"],extend:"Ext.AbstractComponent",requires:["Ext.util.DelayedTask"],uses:["Ext.Layer","Ext.resizer.Resizer","Ext.util.ComponentDragger"],mixins:{floating:"Ext.util.Floating"},statics:{DIRECTION_TOP:"top",DIRECTION_RIGHT:"right",DIRECTION_BOTTOM:"bottom",DIRECTION_LEFT:"left",VERTICAL_DIRECTION_Re:/^(?:top|bottom)$/,INVALID_ID_CHARS_Re:/[\.,\s]/g},resizeHandles:"all",floating:false,toFrontOnShow:true,hideMode:"display",bubbleEvents:[],monPropRe:/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/,defaultComponentLayoutType:"autocomponent",constructor:function(a){var b=this;a=a||{};if(a.initialConfig){if(a.isAction){b.baseAction=a}a=a.initialConfig}else{if(a.tagName||a.dom||Ext.isString(a)){a={applyTo:a,id:a.id||a}}}b.callParent([a]);if(b.baseAction){b.baseAction.addComponent(b)}},initComponent:function(){var a=this;a.callParent();if(a.listeners){a.on(a.listeners);a.listeners=null}a.enableBubble(a.bubbleEvents);a.mons=[]},afterRender:function(){var a=this;a.callParent();if(!(a.x&&a.y)&&(a.pageX||a.pageY)){a.setPagePosition(a.pageX,a.pageY)}},setAutoScroll:function(a){var b=this;b.autoScroll=!!a;if(b.rendered){b.getTargetEl().setStyle(b.getOverflowStyle())}b.updateLayout();return b},setOverflowXY:function(b,a){var c=this,d=arguments.length;if(d){c.overflowX=b||"";if(d>1){c.overflowY=a||""}}if(c.rendered){c.getTargetEl().setStyle(c.getOverflowStyle())}c.updateLayout();return c},beforeRender:function(){var b=this,c=b.floating,a;if(c){b.addCls(Ext.baseCSSPrefix+"layer");a=c.cls;if(a){b.addCls(a)}}return b.callParent()},afterComponentLayout:function(){this.callParent(arguments);if(this.floating){this.onAfterFloatLayout()}},makeFloating:function(a){this.mixins.floating.constructor.call(this,a)},wrapPrimaryEl:function(a){if(this.floating){this.makeFloating(a)}else{this.callParent(arguments)}},initResizable:function(a){var b=this;a=Ext.apply({target:b,dynamic:false,constrainTo:b.constrainTo||(b.floatParent?b.floatParent.getTargetEl():null),handles:b.resizeHandles},a);a.target=b;b.resizer=new Ext.resizer.Resizer(a)},getDragEl:function(){return this.el},initDraggable:function(){var c=this,a=(c.resizer&&c.resizer.el!==c.el)?c.resizerComponent=new Ext.Component({el:c.resizer.el,rendered:true,container:c.container}):c,b=Ext.applyIf({el:a.getDragEl(),constrainTo:c.constrain?(c.constrainTo||(c.floatParent?c.floatParent.getTargetEl():c.el.getScopeParent())):undefined},c.draggable);if(c.constrain||c.constrainDelegate){b.constrain=c.constrain;b.constrainDelegate=c.constrainDelegate}c.dd=new Ext.util.ComponentDragger(a,b)},scrollBy:function(b,a,c){var d;if((d=this.getTargetEl())&&d.dom){d.scrollBy.apply(d,arguments)}},setLoading:function(c,d){var b=this,a;if(b.rendered){Ext.destroy(b.loadMask);b.loadMask=null;if(c!==false&&!b.collapsed){if(Ext.isObject(c)){a=Ext.apply({},c)}else{if(Ext.isString(c)){a={msg:c}}else{a={}}}if(d){Ext.applyIf(a,{useTargetEl:true})}b.loadMask=new Ext.LoadMask(b,a);b.loadMask.show()}}return b.loadMask},beforeSetPosition:function(){var b=this,c=b.callParent(arguments),a;if(c){a=b.adjustPosition(c.x,c.y);c.x=a.x;c.y=a.y}return c||null},afterSetPosition:function(b,a){this.onPosition(b,a);this.fireEvent("move",this,b,a)},showAt:function(a,d,b){var c=this;if(!c.rendered&&(c.autoRender||c.floating)){c.doAutoRender();c.hidden=true}if(c.floating){c.setPosition(a,d,b)}else{c.setPagePosition(a,d,b)}c.show()},setPagePosition:function(a,g,b){var c=this,d,e;if(Ext.isArray(a)){g=a[1];a=a[0]}c.pageX=a;c.pageY=g;if(c.floating){if(c.isContainedFloater()){e=c.floatParent.getTargetEl().getViewRegion();if(Ext.isNumber(a)&&Ext.isNumber(e.left)){a-=e.left}if(Ext.isNumber(g)&&Ext.isNumber(e.top)){g-=e.top}}else{d=c.el.translatePoints(a,g);a=d.left;g=d.top}c.setPosition(a,g,b)}else{d=c.el.translatePoints(a,g);c.setPosition(d.left,d.top,b)}return c},isContainedFloater:function(){return(this.floating&&this.floatParent)},getBox:function(b){var c=b?this.getPosition(b):this.el.getXY(),a=this.getSize();a.x=c[0];a.y=c[1];return a},updateBox:function(a){this.setSize(a.width,a.height);this.setPagePosition(a.x,a.y);return this},getOuterSize:function(){var a=this.el;return{width:a.getWidth()+a.getMargin("lr"),height:a.getHeight()+a.getMargin("tb")}},adjustPosition:function(a,d){var b=this,c;if(b.isContainedFloater()){c=b.floatParent.getTargetEl().getViewRegion();a+=c.left;d+=c.top}return{x:a,y:d}},getPosition:function(a){var c=this,b=c.el,e,d=c.isContainedFloater(),g;if((a===true)&&!d){return[b.getLocalX(),b.getLocalY()]}e=c.el.getXY();if((a===true)&&d){g=c.floatParent.getTargetEl().getViewRegion();e[0]-=g.left;e[1]-=g.top}return e},getId:function(){var a=this,b;if(!a.id){b=a.getXType();if(b){b=b.replace(Ext.Component.INVALID_ID_CHARS_Re,"-")}else{b=Ext.name.toLowerCase()+"-comp"}a.id=b+"-"+a.getAutoId()}return a.id},show:function(d,a,b){var c=this,e=c.rendered;if(e&&c.isVisible()){if(c.toFrontOnShow&&c.floating){c.toFront()}}else{if(c.fireEvent("beforeshow",c)!==false){c.hidden=false;if(!e&&(c.autoRender||c.floating)){c.doAutoRender();e=c.rendered}if(e){c.beforeShow();c.onShow.apply(c,arguments);c.afterShow.apply(c,arguments)}}else{c.onShowVeto()}}return c},onShowVeto:Ext.emptyFn,beforeShow:Ext.emptyFn,onShow:function(){var a=this;a.el.show();a.callParent(arguments);if(a.floating){if(a.maximized){a.fitContainer()}else{if(a.constrain){a.doConstrain()}}}},afterShow:function(h,b,e){var g=this,a,c,d;h=h||g.animateTarget;if(!g.ghost){h=null}if(h){h=h.el?h.el:Ext.get(h);c=g.el.getBox();a=h.getBox();g.el.addCls(Ext.baseCSSPrefix+"hide-offsets");d=g.ghost();d.el.stopAnimation();d.el.setX(-10000);d.el.animate({from:a,to:c,listeners:{afteranimate:function(){delete d.componentLayout.lastComponentSize;g.unghost();g.el.removeCls(Ext.baseCSSPrefix+"hide-offsets");g.onShowComplete(b,e)}}})}else{g.onShowComplete(b,e)}},onShowComplete:function(a,b){var c=this;if(c.floating){c.toFront();c.onFloatShow()}Ext.callback(a,b||c);c.fireEvent("show",c);delete c.hiddenByLayout},hide:function(){var a=this;a.showOnParentShow=false;if(!(a.rendered&&!a.isVisible())&&a.fireEvent("beforehide",a)!==false){a.hidden=true;if(a.rendered){a.onHide.apply(a,arguments)}}return a},onHide:function(g,a,d){var e=this,c,b;g=g||e.animateTarget;if(!e.ghost){g=null}if(g){g=g.el?g.el:Ext.get(g);c=e.ghost();c.el.stopAnimation();b=g.getBox();b.width+="px";b.height+="px";c.el.animate({to:b,listeners:{afteranimate:function(){delete c.componentLayout.lastComponentSize;c.el.hide();e.afterHide(a,d)}}})}e.el.hide();if(!g){e.afterHide(a,d)}},afterHide:function(a,b){var c=this;delete c.hiddenByLayout;Ext.AbstractComponent.prototype.onHide.call(this);Ext.callback(a,b||c);c.fireEvent("hide",c)},onDestroy:function(){var a=this;if(a.rendered){Ext.destroy(a.proxy,a.proxyWrap,a.resizer,a.resizerComponent)}delete a.focusTask;a.callParent()},deleteMembers:function(){var b=arguments,a=b.length,c=0;for(;c1){for(;c]*)\>)|(?:<\/tpl>)/g,actionsRe:/\s*(elif|elseif|if|for|exec|switch|case|eval)\s*\=\s*(?:(?:"([^"]*)")|(?:'([^']*)'))\s*/g,propRe:/prop=(?:(?:"([^"]*)")|(?:'([^']*)'))/,defaultRe:/^\s*default\s*$/,elseRe:/^\s*else\s*$/});Ext.define("Ext.XTemplateCompiler",{extend:"Ext.XTemplateParser",useEval:Ext.isGecko,useIndex:Ext.isIE6||Ext.isIE7,useFormat:true,propNameRe:/^[\w\d\$]*$/,compile:function(a){var c=this,b=c.generate(a);return c.useEval?c.evalTpl(b):(new Function("Ext",b))(Ext)},generate:function(a){var d=this,b="var fm=Ext.util.Format,ts=Object.prototype.toString;",c;d.maxLevel=0;d.body=["var c0=values, a0="+d.createArrayTest(0)+", p0=parent, n0=xcount, i0=xindex, v;\n"];if(d.definitions){if(typeof d.definitions==="string"){d.definitions=[d.definitions,b]}else{d.definitions.push(b)}}else{d.definitions=[b]}d.switches=[];d.parse(a);d.definitions.push((d.useEval?"$=":"return")+" function ("+d.fnArgs+") {",d.body.join(""),"}");c=d.definitions.join("\n");d.definitions.length=d.body.length=d.switches.length=0;delete d.definitions;delete d.body;delete d.switches;return c},doText:function(c){var b=this,a=b.body;c=c.replace(b.aposRe,"\\'").replace(b.newLineRe,"\\n");if(b.useIndex){a.push("out[out.length]='",c,"'\n")}else{a.push("out.push('",c,"')\n")}},doExpr:function(b){var a=this.body;a.push("if ((v="+b+")!==undefined) out");if(this.useIndex){a.push("[out.length]=v+''\n")}else{a.push(".push(v+'')\n")}},doTag:function(a){this.doExpr(this.parseTag(a))},doElse:function(){this.body.push("} else {\n")},doEval:function(a){this.body.push(a,"\n")},doIf:function(b,c){var a=this;if(b==="."){a.body.push("if (values) {\n")}else{if(a.propNameRe.test(b)){a.body.push("if (",a.parseTag(b),") {\n")}else{a.body.push("if (",a.addFn(b),a.callFn,") {\n")}}if(c.exec){a.doExec(c.exec)}},doElseIf:function(b,c){var a=this;if(b==="."){a.body.push("else if (values) {\n")}else{if(a.propNameRe.test(b)){a.body.push("} else if (",a.parseTag(b),") {\n")}else{a.body.push("} else if (",a.addFn(b),a.callFn,") {\n")}}if(c.exec){a.doExec(c.exec)}},doSwitch:function(b){var a=this;if(b==="."){a.body.push("switch (values) {\n")}else{if(a.propNameRe.test(b)){a.body.push("switch (",a.parseTag(b),") {\n")}else{a.body.push("switch (",a.addFn(b),a.callFn,") {\n")}}a.switches.push(0)},doCase:function(e){var d=this,c=Ext.isArray(e)?e:[e],g=d.switches.length-1,a,b;if(d.switches[g]){d.body.push("break;\n")}else{d.switches[g]++}for(b=0,g=c.length;b');c.scrollRangeFlags=e}}},finishRender:function(){var b=this,c,a;b.callParent();b.cacheElements();c=b.getRenderTarget();a=b.getLayoutItems();if(b.targetCls){b.getTarget().addCls(b.targetCls)}b.finishRenderItems(c,a)},notifyOwner:function(){this.owner.afterLayout(this)},getContainerSize:function(c,h){var d=c.targetContext,g=d.getFrameInfo(),k=d.getPaddingInfo(),j=0,l=0,a=c.state.overflowAdjust,e,i,b,m;if(!c.widthModel.shrinkWrap){++l;b=h?d.getDomProp("width"):d.getProp("width");e=(typeof b=="number");if(e){++j;b-=g.width+k.width;if(a){b-=a.width}}}if(!c.heightModel.shrinkWrap){++l;m=h?d.getDomProp("height"):d.getProp("height");i=(typeof m=="number");if(i){++j;m-=g.height+k.height;if(a){m-=a.height}}}return{width:b,height:m,needed:l,got:j,gotAll:j==l,gotWidth:e,gotHeight:i}},getLayoutItems:function(){var a=this.owner,b=a&&a.items;return(b&&b.items)||[]},getRenderData:function(){var a=this.owner;return{$comp:a,$layout:this,ownerId:a.id}},getRenderedItems:function(){var e=this,h=e.getRenderTarget(),a=e.getLayoutItems(),d=a.length,g=[],b,c;for(b=0;b'],calculate:function(b){var a=this,c;if(!b.hasDomProp("containerChildrenDone")){a.done=false}else{c=a.getContainerSize(b);if(!c.gotAll){a.done=false}a.calculateContentSize(b)}}});Ext.define("Ext.util.Filter",{anyMatch:false,exactMatch:false,caseSensitive:false,constructor:function(a){var b=this;Ext.apply(b,a);b.filter=b.filter||b.filterFn;if(b.filter===undefined){if(b.property===undefined||b.value===undefined){}else{b.filter=b.createFilterFn()}b.filterFn=b.filter}},createFilterFn:function(){var a=this,c=a.createValueMatcher(),b=a.property;return function(d){var e=a.getRoot.call(a,d)[b];return c===null?e===null:c.test(e)}},getRoot:function(b){var a=this.root;return a===undefined?b:b[a]},createValueMatcher:function(){var d=this,e=d.value,g=d.anyMatch,c=d.exactMatch,a=d.caseSensitive,b=Ext.String.escapeRegex;if(e===null){return e}if(!e.exec){e=String(e);if(g===true){e=b(e)}else{e="^"+b(e);if(c===true){e+="$"}}e=new RegExp(e,a?"":"i")}return e}});Ext.define("Ext.util.AbstractMixedCollection",{requires:["Ext.util.Filter"],mixins:{observable:"Ext.util.Observable"},isMixedCollection:true,generation:0,constructor:function(b,a){var c=this;c.items=[];c.map={};c.keys=[];c.length=0;c.allowFunctions=b===true;if(a){c.getKey=a}c.mixins.observable.constructor.call(c)},allowFunctions:false,add:function(b,e){var d=this,g=e,c=b,a;if(arguments.length==1){g=c;c=d.getKey(g)}if(typeof c!="undefined"&&c!==null){a=d.map[c];if(typeof a!="undefined"){return d.replace(c,g)}d.map[c]=g}d.generation++;d.length++;d.items.push(g);d.keys.push(c);if(d.hasListeners.add){d.fireEvent("add",d.length-1,g,c)}return g},getKey:function(a){return a.id},replace:function(c,e){var d=this,a,b;if(arguments.length==1){e=arguments[0];c=d.getKey(e)}a=d.map[c];if(typeof c=="undefined"||c===null||typeof a=="undefined"){return d.add(c,e)}d.generation++;b=d.indexOfKey(c);d.items[b]=e;d.map[c]=e;if(d.hasListeners.replace){d.fireEvent("replace",c,a,e)}return e},addAll:function(g){var e=this,d=0,b,a,c;if(arguments.length>1||Ext.isArray(g)){b=arguments.length>1?arguments:g;for(a=b.length;d=d.length){return d.add(c,g)}d.generation++;d.length++;Ext.Array.splice(d.items,a,0,g);if(typeof c!="undefined"&&c!==null){d.map[c]=g}Ext.Array.splice(d.keys,a,0,c);if(d.hasListeners.add){d.fireEvent("add",a,g,c)}return g},remove:function(a){this.generation++;return this.removeAt(this.indexOf(a))},removeAll:function(b){b=[].concat(b);var c,a=b.length;for(c=0;c=0){c.length--;d=c.items[a];Ext.Array.erase(c.items,a,1);b=c.keys[a];if(typeof b!="undefined"){delete c.map[b]}Ext.Array.erase(c.keys,a,1);if(c.hasListeners.remove){c.fireEvent("remove",d,b)}c.generation++;return d}return false},removeAtKey:function(a){return this.removeAt(this.indexOfKey(a))},getCount:function(){return this.length},indexOf:function(a){return Ext.Array.indexOf(this.items,a)},indexOfKey:function(a){return Ext.Array.indexOf(this.keys,a)},get:function(b){var d=this,a=d.map[b],c=a!==undefined?a:(typeof b=="number")?d.items[b]:undefined;return typeof c!="function"||d.allowFunctions?c:null},getAt:function(a){return this.items[a]},getByKey:function(a){return this.map[a]},contains:function(a){return typeof this.map[this.getKey(a)]!="undefined"},containsKey:function(a){return typeof this.map[a]!="undefined"},clear:function(){var a=this;a.length=0;a.items=[];a.keys=[];a.map={};a.generation++;if(a.hasListeners.clear){a.fireEvent("clear")}},first:function(){return this.items[0]},last:function(){return this.items[this.length-1]},sum:function(h,b,j,a){var c=this.extractValues(h,b),g=c.length,e=0,d;j=j||0;a=(a||a===0)?a:g-1;for(d=j;d<=a;d++){e+=c[d]}return e},collect:function(k,e,h){var l=this.extractValues(k,e),a=l.length,b={},c=[],j,g,d;for(d=0;d=a;d--){b[b.length]=c[d]}}return b},filter:function(d,c,g,a){var b=[],e;if(Ext.isString(d)){b.push(new Ext.util.Filter({property:d,value:c,anyMatch:g,caseSensitive:a}))}else{if(Ext.isArray(d)||d instanceof Ext.util.Filter){b=b.concat(d)}}e=function(h){var n=true,o=b.length,j,m,l,k;for(j=0;je?1:(g>1;h=d(e,b[c]);if(h>=0){i=c+1}else{if(h<0){a=c-1}}}return i},reorder:function(d){var h=this,b=h.items,c=0,g=b.length,a=[],e=[],i;h.suspendEvents();for(i in d){a[d[i]]=b[i]}for(c=0;ce?1:(g=0&&a[d].hidden;--d){}if((b=a[d])){e._setActiveChild(b,c);if(b.modal){return}}for(;d>=0;--d){b=a[d];if(b.isVisible()&&b.modal){e._showModalMask(b);return}}e._hideModalMask()},_showModalMask:function(a){var c=this,e=a.el.getStyle("zIndex")-4,b=a.floatParent?a.floatParent.getTargetEl():a.container,d=b.getBox();if(b.dom===document.body){d.height=Math.max(document.body.scrollHeight,Ext.dom.Element.getDocumentHeight());d.width=Math.max(document.body.scrollWidth,d.width)}if(!c.mask){c.mask=Ext.getBody().createChild({cls:Ext.baseCSSPrefix+"mask"});c.mask.setVisibilityMode(Ext.Element.DISPLAY);c.mask.on("click",c._onMaskClick,c)}c.mask.maskTarget=b;b.addCls(Ext.baseCSSPrefix+"body-masked");c.mask.setStyle("zIndex",e);c.mask.show();c.mask.setBox(d)},_hideModalMask:function(){var a=this.mask;if(a&&a.isVisible()){a.maskTarget.removeCls(Ext.baseCSSPrefix+"body-masked");a.maskTarget=undefined;a.hide()}},_onMaskClick:function(){if(this.front){this.front.focus()}},_onContainerResize:function(){var a=this.mask,b,c;if(a&&a.isVisible()){a.hide();b=a.maskTarget;if(b.dom===document.body){c={height:Math.max(document.body.scrollHeight,Ext.dom.Element.getDocumentHeight()),width:Math.max(document.body.scrollWidth,document.documentElement.clientWidth)}}else{c=b.getViewSize(true)}a.setSize(c);a.show()}},register:function(a){var b=this;if(a.zIndexManager){a.zIndexManager.unregister(a)}a.zIndexManager=b;b.list[a.id]=a;b.zIndexStack.push(a);a.on("hide",b.onComponentHide,b)},unregister:function(a){var b=this,c=b.list;delete a.zIndexManager;if(c&&c[a.id]){delete c[a.id];a.un("hide",b.onComponentHide);Ext.Array.remove(b.zIndexStack,a);b._activateLast()}},get:function(a){return a.isComponent?a:this.list[a]},bringToFront:function(b){var c=this,a=false,d=c.zIndexStack;b=c.get(b);if(b!==c.front){Ext.Array.remove(d,b);if(b.preventBringToFront){d.unshift(b)}else{d.push(b)}c.assignZIndices();a=true;this.front=b}if(a&&b.modal){c._showModalMask(b)}return a},sendToBack:function(a){var b=this;a=b.get(a);Ext.Array.remove(b.zIndexStack,a);b.zIndexStack.unshift(a);b.assignZIndices();this._activateLast();return a},hideAll:function(){var b=this.list,a,c;for(c in b){if(b.hasOwnProperty(c)){a=b[c];if(a.isComponent&&a.isVisible()){a.hide()}}}},hide:function(){var g=this,c=g.mask,e=0,b=g.zIndexStack,a=b.length,d;g.tempHidden=g.tempHidden||[];for(;e0;){b=a[c];if(b.isComponent&&e.call(d||b,b)===false){return}}},destroy:function(){var b=this,c=b.list,a,d;for(d in c){if(c.hasOwnProperty(d)){a=c[d];if(a.isComponent){a.destroy()}}}delete b.zIndexStack;delete b.list;delete b.container;delete b.targetEl}},function(){Ext.WindowManager=Ext.WindowMgr=new this()});Ext.define("Ext.container.AbstractContainer",{extend:"Ext.Component",requires:["Ext.util.MixedCollection","Ext.layout.container.Auto","Ext.ZIndexManager"],renderTpl:"{%this.renderContainer(out,values)%}",suspendLayout:false,autoDestroy:true,defaultType:"panel",detachOnRemove:true,isContainer:true,layoutCounter:0,baseCls:Ext.baseCSSPrefix+"container",bubbleEvents:["add","remove"],defaultLayoutType:"auto",initComponent:function(){var a=this;a.addEvents("afterlayout","beforeadd","beforeremove","add","remove");a.callParent();a.getLayout();a.initItems()},initItems:function(){var b=this,a=b.items;b.items=new Ext.util.AbstractMixedCollection(false,b.getComponentId);if(a){if(!Ext.isArray(a)){a=[a]}b.add(a)}},getFocusEl:function(){return this.getTargetEl()},finishRenderChildren:function(){this.callParent();var a=this.getLayout();if(a){a.finishRender()}},beforeRender:function(){var b=this,a=b.getLayout();b.callParent();if(!a.initialized){a.initLayout()}},setupRenderTpl:function(b){var a=this.getLayout();this.callParent(arguments);a.setupRenderTpl(b)},setLayout:function(b){var a=this.layout;if(a&&a.isLayout&&a!=b){a.setOwner(null)}this.layout=b;b.setOwner(this)},getLayout:function(){var a=this;if(!a.layout||!a.layout.isLayout){a.setLayout(Ext.layout.Layout.create(a.layout,a.self.prototype.layout||"autocontainer"))}return a.layout},doLayout:function(){this.updateLayout();return this},afterLayout:function(b){var a=this;++a.layoutCounter;if(a.hasListeners.afterlayout){a.fireEvent("afterlayout",a,b)}},prepareItems:function(b,d){if(Ext.isArray(b)){b=b.slice()}else{b=[b]}var g=this,c=0,a=b.length,e;for(;c "+a)[0]||null},nextChild:function(e,b){var c=this,a,d=c.items.indexOf(e);if(d!==-1){a=b?Ext.ComponentQuery(b,c.items.items.slice(d+1)):c.items.getAt(d+1);if(!a&&c.ownerCt){a=c.ownerCt.nextChild(c,b)}}return a},prevChild:function(e,b){var c=this,a,d=c.items.indexOf(e);if(d!==-1){a=b?Ext.ComponentQuery(b,c.items.items.slice(d+1)):c.items.getAt(d+1);if(!a&&c.ownerCt){a=c.ownerCt.nextChild(c,b)}}return a},down:function(a){return this.query(a)[0]||null},enable:function(){this.callParent(arguments);var d=this.getChildItemsToDisable(),c=d.length,b,a;for(a=0;a=d){h=0}else{if(h<0){h=d-1}}if(h===e){return[]}if((k=g[h]).isFocusable()){return[k]}}return[]},prevFocus:function(e,d){return this.nextFocus(e,d,-1)},root:function(e){var d=e.length,h=[],g=0,j;for(;ge.el.getZIndex()});return d.concat(b)},initDOM:function(c){var g=this,b=g.focusFrameCls,e=Ext.ComponentQuery.query("{getFocusEl()}:not([focusListenerAdded])"),d=0,a=e.length;if(!Ext.isReady){return Ext.onReady(g.initDOM,g)}for(;d:focusable",a)[0]:a;if(d){d.focus()}else{if(Ext.isFunction(a.onClick)){g.button=0;a.onClick(g);if(a.isVisible(true)){a.focus()}else{c.navigateOut()}}}}},navigateOut:function(c){var b=this,a;if(!b.focusedCmp||!(a=b.focusedCmp.up(":focusable"))){b.focusEl.focus()}else{a.focus()}return true},navigateSiblings:function(i,b,o){var j=this,a=b||j,p=i.getKey(),g=Ext.EventObject,k=i.shiftKey||p==g.LEFT||p==g.UP,c=p==g.LEFT||p==g.RIGHT||p==g.UP||p==g.DOWN,h=k?"prev":"next",n,d,m,l;m=(a.focusedCmp&&a.focusedCmp.comp)||a.focusedCmp;if(!m&&!o){return true}if(c&&j.isWhitelisted(m)){return true}if(!m||m.is(":root")){l=j.getRootComponents()}else{o=o||m.up();if(o){l=o.getRefItems()}}if(l){n=m?Ext.Array.indexOf(l,m):-1;d=Ext.ComponentQuery.query(":"+h+"Focus("+n+")",l)[0];if(d&&m!==d){d.focus();return d}}},onComponentBlur:function(b,c){var a=this;if(a.focusedCmp===b){a.previousFocusedCmp=b;delete a.focusedCmp}if(a.focusFrame){a.focusFrame.hide()}},onComponentFocus:function(d,g){var c=this,a=c.focusChain,b;if(!d.isFocusable()){c.clearComponent(d);if(a[d.id]){return}b=d.up();if(b){a[d.id]=true;b.focus()}return}c.focusChain={};c.focusTask.delay(10,null,null,[d,d.getFocusEl()])},handleComponentFocus:function(m,i){var k=this,p,a,d,h,o,b,l,e,g,c,n,j;if(k.fireEvent("beforecomponentfocus",k,m,k.previousFocusedCmp)===false){k.clearComponent(m);return}k.focusedCmp=m;if(k.shouldShowFocusFrame(m)){p="."+k.focusFrameCls+"-";a=k.focusFrame;h=i.getPageBox();o=h.top;b=h.left;l=h.width;e=h.height;g=a.child(p+"top");c=a.child(p+"bottom");n=a.child(p+"left");j=a.child(p+"right");g.setWidth(l).setLeftTop(b,o);c.setWidth(l).setLeftTop(b,o+e-2);n.setHeight(e-2).setLeftTop(b,o+2);j.setHeight(e-2).setLeftTop(b+l-2,o+2);a.show()}k.fireEvent("componentfocus",k,m,k.previousFocusedCmp)},onComponentHide:function(e){var d=this,b=false,a=d.focusedCmp,c;if(a){b=e.hasFocus||(e.isContainer&&e.isAncestor(d.focusedCmp))}d.clearComponent(e);if(b&&(c=e.up(":focusable"))){c.focus()}else{d.focusEl.focus()}},onComponentDestroy:function(){},removeDOM:function(){var a=this;if(a.enabled||a.subscribers.length){return}Ext.destroy(a.focusFrame);delete a.focusEl;delete a.focusFrame},removeXTypeFromWhitelist:function(b){var a=this;if(Ext.isArray(b)){Ext.Array.forEach(b,a.removeXTypeFromWhitelist,a);return}Ext.Array.remove(a.whitelist,b)},setupSubscriberKeys:function(a,g){var e=this,d=a.getFocusEl(),c=g.scope,b={backspace:e.focusLast,enter:e.navigateIn,esc:e.navigateOut,scope:e},h=function(i){if(e.focusedCmp===a){return e.navigateSiblings(i,e,a)}else{return e.navigateSiblings(i)}};Ext.iterate(g,function(j,i){b[j]=function(l){var k=h(l);if(Ext.isFunction(i)&&i.call(c||a,l,k)===true){return true}return k}},e);return new Ext.util.KeyNav(d,b)},shouldShowFocusFrame:function(c){var b=this,a=b.options||{},e=c.getFocusEl(),d=Ext.getDom(e).tagName;if(!b.focusFrame||!c){return false}if(a.focusFrame){return true}if(b.focusData[c.id].focusFrame){return true}return false}});Ext.define("Ext.Img",{extend:"Ext.Component",alias:["widget.image","widget.imagecomponent"],autoEl:"img",src:"",alt:"",imgCls:"",getElConfig:function(){var c=this,b=c.callParent(),a;if(c.autoEl=="img"){a=b}else{b.cn=[a={tag:"img",id:c.id+"-img"}]}if(c.imgCls){a.cls=(a.cls?a.cls+" ":"")+c.imgCls}a.src=c.src||Ext.BLANK_IMAGE_URL;if(c.alt){a.alt=c.alt}return b},onRender:function(){var b=this,a;b.callParent(arguments);a=b.el;b.imgEl=(b.autoEl=="img")?a:a.getById(b.id+"-img")},onDestroy:function(){Ext.destroy(this.imgEl);this.imgEl=null;this.callParent()},setSrc:function(c){var a=this,b=a.imgEl;a.src=c;if(b){b.dom.src=c||Ext.BLANK_IMAGE_URL}}});Ext.define("Ext.Layer",{extend:"Ext.Element",uses:["Ext.Shadow"],statics:{shims:[]},isLayer:true,constructor:function(b,a){b=b||{};var c=this,d=Ext.DomHelper,g=b.parentEl,e=g?Ext.getDom(g):document.body,h=b.hideMode;if(a){c.dom=Ext.getDom(a)}if(!c.dom){c.dom=d.append(e,b.dh||{tag:"div",cls:Ext.baseCSSPrefix+"layer"})}else{c.addCls(Ext.baseCSSPrefix+"layer");if(!c.dom.parentNode){e.appendChild(c.dom)}}if(b.id){c.id=c.dom.id=b.id}else{c.id=Ext.id(c.dom)}Ext.Element.addToCache(c);if(b.cls){c.addCls(b.cls)}c.constrain=b.constrain!==false;if(h){c.setVisibilityMode(Ext.Element[h.toUpperCase()]);if(c.visibilityMode==Ext.Element.ASCLASS){c.visibilityCls=b.visibilityCls}}else{if(b.useDisplay){c.setVisibilityMode(Ext.Element.DISPLAY)}else{c.setVisibilityMode(Ext.Element.VISIBILITY)}}if(b.shadow){c.shadowOffset=b.shadowOffset||4;c.shadow=new Ext.Shadow({offset:c.shadowOffset,mode:b.shadow});c.disableShadow()}else{c.shadowOffset=0}c.useShim=b.shim!==false&&Ext.useShims;if(b.hidden===true){c.hide()}else{c.show()}},getZIndex:function(){return parseInt((this.getShim()||this).getStyle("z-index"),10)},getShim:function(){var b=this,c,a;if(!b.useShim){return null}if(!b.shim){c=b.self.shims.shift();if(!c){c=b.createShim();c.enableDisplayMode("block");c.hide()}a=b.dom.parentNode;if(c.dom.parentNode!=a){a.insertBefore(c.dom,b.dom)}b.shim=c}return b.shim},hideShim:function(){var a=this;if(a.shim){a.shim.setDisplayed(false);a.self.shims.push(a.shim);delete a.shim}},disableShadow:function(){var a=this;if(a.shadow&&!a.shadowDisabled){a.shadowDisabled=true;a.shadow.hide();a.lastShadowOffset=a.shadowOffset;a.shadowOffset=0}},enableShadow:function(a){var b=this;if(b.shadow&&b.shadowDisabled){b.shadowDisabled=false;b.shadowOffset=b.lastShadowOffset;delete b.lastShadowOffset;if(a){b.sync(true)}}},sync:function(b){var j=this,n=j.shadow,i,e,a,d,c,o,m,g,k;if(!j.updating&&j.isVisible()&&(n||j.useShim)){d=j.getShim();c=j.getLocalX();o=j.getLocalY();m=j.dom.offsetWidth;g=j.dom.offsetHeight;if(n&&!j.shadowDisabled){if(b&&!n.isVisible()){n.show(j)}else{n.realign(c,o,m,g)}if(d){k=d.getStyle("z-index");if(k>j.zindex){j.shim.setStyle("z-index",j.zindex-2)}d.show();if(n.isVisible()){i=n.el.getXY();e=d.dom.style;a=n.el.getSize();if(Ext.supports.CSS3BoxShadow){a.height+=6;a.width+=4;i[0]-=2;i[1]-=4}e.left=(i[0])+"px";e.top=(i[1])+"px";e.width=(a.width)+"px";e.height=(a.height)+"px"}else{d.setSize(m,g);d.setLeftTop(c,o)}}}else{if(d){k=d.getStyle("z-index");if(k>j.zindex){j.shim.setStyle("z-index",j.zindex-2)}d.show();d.setSize(m,g);d.setLeftTop(c,o)}}}return j},remove:function(){this.hideUnders();this.callParent()},beginUpdate:function(){this.updating=true},endUpdate:function(){this.updating=false;this.sync(true)},hideUnders:function(){if(this.shadow){this.shadow.hide()}this.hideShim()},constrainXY:function(){if(this.constrain){var g=Ext.Element.getViewWidth(),b=Ext.Element.getViewHeight(),l=Ext.getDoc().getScroll(),k=this.getXY(),i=k[0],e=k[1],a=this.shadowOffset,j=this.dom.offsetWidth+a,c=this.dom.offsetHeight+a,d=false;if((i+j)>g+l.left){i=g-j-a;d=true}if((e+c)>b+l.top){e=b-c-a;d=true}if(i',floating:{shadow:"frame"},focusOnToFront:false,bringParentToFront:false,constructor:function(a,b){var c=this;if(!a.isComponent){a=Ext.get(a);this.isElement=true}c.ownerCt=a;if(!this.isElement){c.bindComponent(a)}c.callParent([b]);if(c.store){c.bindStore(c.store,true)}},bindComponent:function(a){var c=this,b={scope:this,resize:c.sizeMask,added:c.onComponentAdded,removed:c.onComponentRemoved},d=Ext.container.Container.hierarchyEventSource;if(a.floating){b.move=c.sizeMask;c.activeOwner=a}else{if(a.ownerCt){c.onComponentAdded(a.ownerCt)}else{c.preventBringToFront=true}}c.mon(a,b);c.mon(d,{show:c.onContainerShow,hide:c.onContainerHide,expand:c.onContainerExpand,collapse:c.onContainerCollapse,scope:c})},onComponentAdded:function(a){var b=this;delete b.activeOwner;b.floatParent=a;if(!a.floating){a=a.up("[floating]")}if(a){b.activeOwner=a;b.mon(a,"move",b.sizeMask,b)}a=b.floatParent.ownerCt;if(b.rendered&&b.isVisible()&&a){b.floatOwner=a;b.mon(a,"afterlayout",b.sizeMask,b,{single:true})}},onComponentRemoved:function(a){var c=this,d=c.activeOwner,b=c.floatOwner;if(d){c.mun(d,"move",c.sizeMask,c)}if(b){c.mun(b,"afterlayout",c.sizeMask,c)}delete c.activeOwner;delete c.floatOwner},afterRender:function(){this.callParent(arguments);this.container=this.floatParent.getContentTarget()},onContainerShow:function(a){if(this.isActiveContainer(a)){this.onComponentShow()}},onContainerHide:function(a){if(this.isActiveContainer(a)){this.onComponentHide()}},onContainerExpand:function(a){if(this.isActiveContainer(a)){this.onComponentShow()}},onContainerCollapse:function(a){if(this.isActiveContainer(a)){this.onComponentHide()}},isActiveContainer:function(a){return this.isDescendantOf(a)},onComponentHide:function(){var a=this;if(a.rendered&&a.isVisible()){a.hide();a.showNext=true}},onComponentShow:function(){if(this.showNext){this.show()}delete this.showNext},sizeMask:function(){var a=this,b;if(a.rendered&&a.isVisible()){a.center();b=a.getMaskTarget();a.getMaskEl().show().setSize(b.getSize()).alignTo(b,"tl-tl")}},bindStore:function(a,b){var c=this;c.mixins.bindable.bindStore.apply(c,arguments);a=c.store;if(a&&a.isLoading()){c.onBeforeLoad()}},getStoreListeners:function(){return{beforeload:this.onBeforeLoad,load:this.onLoad,exception:this.onLoad,cachemiss:this.onBeforeLoad,cachefilled:this.onLoad}},onDisable:function(){this.callParent(arguments);if(this.loading){this.onLoad()}},getOwner:function(){return this.ownerCt||this.floatParent},getMaskTarget:function(){var a=this.getOwner();return this.useTargetEl?a.getTargetEl():a.getEl()},onBeforeLoad:function(){var c=this,a=c.getOwner(),b;if(!c.disabled){c.loading=true;if(a.componentLayoutCounter){c.maybeShow()}else{b=a.afterComponentLayout;a.afterComponentLayout=function(){a.afterComponentLayout=b;b.apply(a,arguments);c.maybeShow()}}}},maybeShow:function(){var b=this,a=b.getOwner();if(!a.isVisible(true)){b.showNext=true}else{if(b.loading&&a.rendered){b.show()}}},getMaskEl:function(){var a=this;return a.maskEl||(a.maskEl=a.el.insertSibling({cls:a.maskCls,style:{zIndex:a.el.getStyle("zIndex")-2}},"before"))},onShow:function(){var b=this,a=b.msgEl;b.callParent(arguments);b.loading=true;if(b.useMsg){a.show().update(b.msg)}else{a.parent().hide()}},hide:function(){if(this.isElement){this.ownerCt.unmask();this.fireEvent("hide",this);return}delete this.showNext;return this.callParent(arguments)},onHide:function(){this.callParent();this.getMaskEl().hide()},show:function(){if(this.isElement){this.ownerCt.mask(this.useMsg?this.msg:"",this.msgCls);this.fireEvent("show",this);return}return this.callParent(arguments)},afterShow:function(){this.callParent(arguments);this.sizeMask()},setZIndex:function(b){var c=this,a=c.activeOwner;if(a){b=parseInt(a.el.getStyle("zIndex"),10)+1}c.getMaskEl().setStyle("zIndex",b-1);return c.mixins.floating.setZIndex.apply(c,arguments)},onLoad:function(){this.loading=false;this.hide()},onDestroy:function(){var a=this;if(a.isElement){a.ownerCt.unmask()}Ext.destroy(a.maskEl);a.callParent()}});Ext.define("Ext.data.association.Association",{alternateClassName:"Ext.data.Association",primaryKey:"id",defaultReaderType:"json",isAssociation:true,initialConfig:null,statics:{AUTO_ID:1000,create:function(a){if(Ext.isString(a)){a={type:a}}switch(a.type){case"belongsTo":return new Ext.data.association.BelongsTo(a);case"hasMany":return new Ext.data.association.HasMany(a);case"hasOne":return new Ext.data.association.HasOne(a);default:}return a}},constructor:function(a){Ext.apply(this,a);var d=this,b=Ext.ModelManager.types,c=a.ownerModel,g=a.associatedModel,e=b[c],h=b[g];d.initialConfig=a;d.ownerModel=e;d.associatedModel=h;Ext.applyIf(d,{ownerName:c,associatedName:g});d.associationId="association"+(++d.statics().AUTO_ID)},getReader:function(){var c=this,a=c.reader,b=c.associatedModel;if(a){if(Ext.isString(a)){a={type:a}}if(a.isReader){a.setModel(b)}else{Ext.applyIf(a,{model:b,type:c.defaultReaderType})}c.reader=Ext.createByAlias("reader."+a.type,a)}return c.reader||null}});Ext.define("Ext.ModelManager",{extend:"Ext.AbstractManager",alternateClassName:"Ext.ModelMgr",requires:["Ext.data.association.Association"],singleton:true,typeName:"mtype",associationStack:[],registerType:function(c,b){var d=b.prototype,a;if(d&&d.isModel){a=b}else{if(!b.extend){b.extend="Ext.data.Model"}a=Ext.define(c,b)}this.types[c]=a;return a},onModelDefined:function(c){var a=this.associationStack,g=a.length,e=[],b,d,h;for(d=0;d','
{text}
',"",'
','','
',"
{text}
","
","
","
"],componentLayout:"progressbar",initComponent:function(){this.callParent();this.addEvents("update")},initRenderData:function(){var a=this;return Ext.apply(a.callParent(),{internalText:!a.hasOwnProperty("textEl"),text:a.text||" ",percentage:a.value?a.value*100:0})},onRender:function(){var a=this;a.callParent(arguments);if(a.textEl){a.textEl=Ext.get(a.textEl);a.updateText(a.text)}else{a.textEl=a.el.select("."+a.baseCls+"-text")}},updateProgress:function(d,e,a){var c=this,b=c.value;c.value=d||0;if(e){c.updateText(e)}if(c.rendered&&!c.isDestroyed){if(a===true||(a!==false&&c.animate)){c.bar.stopAnimation();c.bar.animate(Ext.apply({from:{width:(b*100)+"%"},to:{width:(c.value*100)+"%"}},c.animate))}else{c.bar.setStyle("width",(c.value*100)+"%")}}c.fireEvent("update",c,c.value,e);return c},updateText:function(b){var a=this;a.text=b;if(a.rendered){a.textEl.update(a.text)}return a},applyText:function(a){this.updateText(a)},getText:function(){return this.text},wait:function(c){var b=this,a;if(!b.waitTimer){a=b;c=c||{};b.updateText(c.text);b.waitTimer=Ext.TaskManager.start({run:function(d){var e=c.increment||10;d-=1;b.updateProgress(((((d+e)%e)+1)*(100/e))*0.01,null,c.animate)},interval:c.interval||1000,duration:c.duration,onStop:function(){if(c.fn){c.fn.apply(c.scope||b)}b.reset()},scope:a})}return b},isWaiting:function(){return this.waitTimer!==null},reset:function(a){var b=this;b.updateProgress(0);b.clearTimer();if(a===true){b.hide()}return b},clearTimer:function(){var a=this;if(a.waitTimer){a.waitTimer.onStop=null;Ext.TaskManager.stop(a.waitTimer);a.waitTimer=null}},onDestroy:function(){var a=this;a.clearTimer();if(a.rendered){if(a.textEl.isComposite){a.textEl.clear()}Ext.destroyMembers(a,"textEl","progressBar")}a.callParent()}});Ext.define("Ext.ShadowPool",{singleton:true,requires:["Ext.DomHelper"],markup:(function(){return Ext.String.format('',Ext.baseCSSPrefix,Ext.isIE&&!Ext.supports.CSS3BoxShadow?"ie":"css")}()),shadows:[],pull:function(){var a=this.shadows.shift();if(!a){a=Ext.get(Ext.DomHelper.insertHtml("beforeBegin",document.body.firstChild,this.markup));a.autoBoxAdjust=false}return a},push:function(a){this.shadows.push(a)},reset:function(){var c=[].concat(this.shadows),b,a=c.length;for(b=0;b]+>/gi,asText:function(a){return String(a).replace(this.stripTagsRE,"")},asUCText:function(a){return String(a).toUpperCase().replace(this.stripTagsRE,"")},asUCString:function(a){return String(a).toUpperCase()},asDate:function(a){if(!a){return 0}if(Ext.isDate(a)){return a.getTime()}return Date.parse(String(a))},asFloat:function(a){var b=parseFloat(String(a).replace(/,/g,""));return isNaN(b)?0:b},asInt:function(a){var b=parseInt(String(a).replace(/,/g,""),10);return isNaN(b)?0:b}});Ext.define("Ext.data.Types",{singleton:true,requires:["Ext.data.SortTypes"]},function(){var a=Ext.data.SortTypes;Ext.apply(Ext.data.Types,{stripRe:/[\$,%]/g,AUTO:{sortType:a.none,type:"auto"},STRING:{convert:function(c){var b=this.useNull?null:"";return(c===undefined||c===null)?b:String(c)},sortType:a.asUCString,type:"string"},INT:{convert:function(b){return b!==undefined&&b!==null&&b!==""?parseInt(String(b).replace(Ext.data.Types.stripRe,""),10):(this.useNull?null:0)},sortType:a.none,type:"int"},FLOAT:{convert:function(b){return b!==undefined&&b!==null&&b!==""?parseFloat(String(b).replace(Ext.data.Types.stripRe,""),10):(this.useNull?null:0)},sortType:a.none,type:"float"},BOOL:{convert:function(b){if(this.useNull&&(b===undefined||b===null||b==="")){return null}return b===true||b==="true"||b==1},sortType:a.none,type:"bool"},DATE:{convert:function(c){var d=this.dateFormat,b;if(!c){return null}if(Ext.isDate(c)){return c}if(d){if(d=="timestamp"){return new Date(c*1000)}if(d=="time"){return new Date(parseInt(c,10))}return Ext.Date.parse(c,d)}b=Date.parse(c);return b?new Date(b):null},sortType:a.asDate,type:"date"}});Ext.apply(Ext.data.Types,{BOOLEAN:this.BOOL,INTEGER:this.INT,NUMBER:this.FLOAT})});Ext.define("Ext.data.Field",{requires:["Ext.data.Types","Ext.data.SortTypes"],alias:"data.field",isField:true,constructor:function(b){var d=this,c=Ext.data.Types,a;if(Ext.isString(b)){b={name:b}}Ext.apply(d,b);a=d.sortType;if(d.type){if(Ext.isString(d.type)){d.type=c[d.type.toUpperCase()]||c.AUTO}}else{d.type=c.AUTO}if(Ext.isString(a)){d.sortType=Ext.data.SortTypes[a]}else{if(Ext.isEmpty(a)){d.sortType=d.type.sortType}}if(!b.hasOwnProperty("convert")){d.convert=d.type.convert}else{if(!d.convert&&d.type.convert&&!b.hasOwnProperty("defaultValue")){d.defaultValue=d.type.convert(d.defaultValue)}}if(b.convert){d.hasCustomConvert=true}},dateFormat:null,useNull:false,defaultValue:"",mapping:null,sortType:null,sortDir:"ASC",allowBlank:true,persist:true});Ext.define("Ext.data.Errors",{extend:"Ext.util.MixedCollection",isValid:function(){return this.length===0},getByField:function(e){var d=[],a,c,b;for(b=0;b1){if(h.action=="update"||a[0].clientIdProperty){j=new Ext.util.MixedCollection();j.addAll(k);for(g=a.length;g--;){b=a[g];c=j.findBy(h.matchClientRec,b);b.copyFrom(c)}}else{for(d=0,e=a.length;da)){return false}else{return true}},email:function(b,a){return Ext.data.validations.emailRe.test(a)},format:function(a,b){return !!(a.matcher&&a.matcher.test(b))},inclusion:function(a,b){return a.list&&Ext.Array.indexOf(a.list,b)!=-1},exclusion:function(a,b){return a.list&&Ext.Array.indexOf(a.list,b)==-1}});Ext.define("Ext.data.Model",{alternateClassName:"Ext.data.Record",mixins:{observable:"Ext.util.Observable"},requires:["Ext.ModelManager","Ext.data.IdGenerator","Ext.data.Field","Ext.data.Errors","Ext.data.Operation","Ext.data.validations","Ext.util.MixedCollection"],compareConvertFields:function(a,d){var c=a.convert&&a.type&&a.convert!==a.type.convert,b=d.convert&&d.type&&d.convert!==d.type.convert;if(c&&!b){return 1}if(!c&&b){return -1}return 0},itemNameFn:function(a){return a.name},onClassExtended:function(b,c,a){var d=a.onBeforeCreated;a.onBeforeCreated=function(g,D){var C=this,E=Ext.getClassName(g),r=g.prototype,x=g.prototype.superclass,j=D.validations||[],t=D.fields||[],h,m=D.associations||[],e=function(G,I){var H=0,F,J;if(G){G=Ext.Array.from(G);for(F=G.length;H0;delete b.modifiedSave;delete b.dataSave;delete b.dirtySave;if(d&&a!==true){b.afterEdit(c)}}},getModifiedFieldNames:function(){var d=this,c=d.dataSave,e=d[d.persistenceProperty],a=[],b;for(b in e){if(e.hasOwnProperty(b)){if(!d.isEqual(e[b],c[b])){a.push(b)}}}return a},getChanges:function(){var a=this.modified,b={},c;for(c in a){if(a.hasOwnProperty(c)){b[c]=this.get(c)}}return b},isModified:function(a){return this.modified.hasOwnProperty(a)},setDirty:function(){var c=this,a=c.fields.items,g=a.length,e,b,d;c.dirty=true;for(d=0;d0){b=p.data.items;h=b.length;for(r=0;ra.maxSize){i=j.constrainedMax;d=a.maxSize}else{d=m}}}if(b){m=h.size;if(mh.maxSize){g=j.constrainedMax;k=h.maxSize}else{if(!e.collapsedVert&&!this.owner.manageHeight){c=false;e.bodyContext.setProp("margin-bottom",h.dockedPixelsEnd)}k=m}}}if(i||g){if(i&&g&&i.constrainedMax&&g.constrainedMin){e.invalidate({widthModel:i});return false}if(!e.widthModel.calculatedFromShrinkWrap&&!e.heightModel.calculatedFromShrinkWrap){e.invalidate({widthModel:i,heightModel:g});return false}}if(l){e.setWidth(d);if(i){e.widthModel=i}}if(b){e.setHeight(k,c);if(g){e.heightModel=g}}return true},finishPositions:function(d,a,h){var j=d.dockedItems,c=j.length,g=a.delta,e=h.delta,i,b;for(i=0;i/,constructor:function(){this.callParent(arguments);this.hackWidth=Ext.isIE&&(!Ext.isStrict||Ext.isIE6||Ext.isIE7||Ext.isIE8);this.heightIncludesPadding=Ext.isIE6&&Ext.isStrict},beginLayout:function(a){this.callParent(arguments);this.cacheTargetInfo(a)},beginLayoutCycle:function(e){var c=this,d="",a=c.owner,b=a.btnEl,i=a.btnInnerEl,g=a.text,h;c.callParent(arguments);i.setStyle("overflow",d);if(!e.widthModel.natural){a.el.setStyle("width",d)}h=e.heightModel.shrinkWrap&&g&&c.htmlRE.test(g);b.setStyle("width",d);b.setStyle("height",h?"auto":d);i.setStyle("width",d);i.setStyle("height",h?"auto":d);i.setStyle("line-height",h?"normal":d);i.setStyle("padding-top",d);a.btnIconEl.setStyle("width",d)},calculateOwnerHeightFromContentHeight:function(b,a){return a},calculateOwnerWidthFromContentWidth:function(b,a){return a},measureContentWidth:function(c){var i=this,b=i.owner,g=b.btnEl,d=b.btnInnerEl,l=b.text,m,j,h,a,k,e;if(b.text&&i.hackWidth&&g){m=i.btnFrameWidth;if(l.indexOf(">")===-1){l=l.replace(/=0){h.setProp("line-height",e-b+"px")}if(l&&j.htmlRE.test(l)){h.setProp("line-height","normal");d.setStyle("line-height","normal");k=Ext.util.TextMetrics.measure(d,l).height;n=Math.floor(Math.max(e-b-k,0)/2);h.setProp("padding-top",j.btnFrameTop+n);h.setHeight(e-(j.heightIncludesPadding?n:0))}},publishInnerWidth:function(g,c){var e=this,h=Ext.isNumber,a=g.getEl("btnEl"),b=g.getEl("btnInnerEl"),d=h(c)?c-e.adjWidth:c;a.setWidth(d);b.setWidth(d)},clearTargetCache:function(){delete this.adjWidth},cacheTargetInfo:function(b){var g=this,a=g.owner,d=a.scale,i,e,j,c,h;if(!("adjWidth" in g)||g.lastScale!==d){if(g.lastScale){a.btnInnerEl.setStyle("line-height","")}g.lastScale=d;i=b.getPaddingInfo();e=b.getFrameInfo();j=b.getEl("btnWrap").getPaddingInfo();c=b.getEl("btnInnerEl");h=c.getPaddingInfo();Ext.apply(g,{adjWidth:j.width+e.width+i.width,adjHeight:j.height+e.height+i.height,btnFrameWidth:h.width,btnFrameHeight:h.height,btnFrameTop:h.top,minTextHeight:parseInt(c.getStyle("line-height"),10)})}g.callParent(arguments)},finishedLayout:function(){var a=this.owner;this.callParent(arguments);if(Ext.isWebKit){a.el.dom.offsetWidth}}});Ext.define("Ext.menu.Manager",{singleton:true,requires:["Ext.util.MixedCollection","Ext.util.KeyMap"],alternateClassName:"Ext.menu.MenuMgr",uses:["Ext.menu.Menu"],menus:{},groups:{},attached:false,lastShow:new Date(),init:function(){var a=this;a.active=new Ext.util.MixedCollection();Ext.getDoc().addKeyListener(27,function(){if(a.active.length>0){a.hideAll()}},a)},hideAll:function(){var c=this.active,e,b,a,d;if(c&&c.length>0){e=c.clone();b=e.items;d=b.length;for(a=0;a50&&c.length>0&&!d.getTarget("."+Ext.baseCSSPrefix+"menu")){b.hideAll()}},register:function(b){var a=this;if(!a.active){a.init()}if(b.floating){a.menus[b.id]=b;b.on({beforehide:a.onBeforeHide,hide:a.onHide,beforeshow:a.onBeforeShow,show:a.onShow,scope:a})}},get:function(b){var a=this.menus;if(typeof b=="string"){if(!a){return null}return a[b]}else{if(b.isMenu){return b}else{if(Ext.isArray(b)){return new Ext.menu.Menu({items:b})}else{return Ext.ComponentManager.create(b,"menu")}}}},unregister:function(d){var a=this,b=a.menus,c=a.active;delete b[d.id];c.remove(d);d.un({beforehide:a.onBeforeHide,hide:a.onHide,beforeshow:a.onBeforeShow,show:a.onShow,scope:a})},registerCheckable:function(c){var a=this.groups,b=c.group;if(b){if(!a[b]){a[b]=[]}a[b].push(c)}},unregisterCheckable:function(c){var a=this.groups,b=c.group;if(b){Ext.Array.remove(a[b],c)}},onCheckChange:function(d,g){var a=this.groups,c=d.group,b=0,j,e,h;if(c&&g){j=a[c];e=j.length;for(;b class="{splitCls}">','',' tabIndex="{tabIndex}"',' disabled="disabled"',' role="link">','',"{text}","",' style="background-image:url({iconUrl})">',"","",'","","
",'','',""],scale:"small",allowedScales:["small","medium","large"],iconAlign:"left",arrowAlign:"right",arrowCls:"arrow",maskOnDisable:false,persistentPadding:undefined,shrinkWrap:3,frame:true,initComponent:function(){var a=this;a.callParent(arguments);a.addEvents("click","toggle","mouseover","mouseout","menushow","menuhide","menutriggerover","menutriggerout");if(a.menu){a.split=true;a.menu=Ext.menu.Manager.get(a.menu);a.menu.ownerButton=a}if(a.url){a.href=a.url}if(a.href&&!a.hasOwnProperty("preventDefault")){a.preventDefault=false}if(Ext.isString(a.toggleGroup)&&a.toggleGroup!==""){a.enableToggle=true}if(a.html&&!a.text){a.text=a.html;delete a.html}},getActionEl:function(){return this.btnEl},getFocusEl:function(){return this.useElForFocus?this.el:this.btnEl},onFocus:function(b){var a=this;a.useElForFocus=true;a.callParent(arguments);a.useElForFocus=false},onBlur:function(a){this.useElForFocus=true;this.callParent(arguments);this.useElForFocus=false},onDisable:function(){this.useElForFocus=true;this.callParent(arguments);this.useElForFocus=false},setComponentCls:function(){var b=this,a=b.getComponentCls();if(!Ext.isEmpty(b.oldCls)){b.removeClsWithUI(b.oldCls);b.removeClsWithUI(b.pressedCls)}b.oldCls=a;b.addClsWithUI(a)},getComponentCls:function(){var b=this,a=[];if(b.iconCls||b.icon){if(b.text){a.push("icon-text-"+b.iconAlign)}else{a.push("icon")}}else{if(b.text){a.push("noicon")}}if(b.pressed){a.push(b.pressedCls)}return a},beforeRender:function(){var a=this;a.callParent();a.oldCls=a.getComponentCls();a.addClsWithUI(a.oldCls);Ext.applyIf(a.renderData,a.getTemplateArgs());if(a.scale){a.setScale(a.scale)}},onRender:function(){var c=this,d,a,b;c.doc=Ext.getDoc();c.callParent(arguments);if(c.split&&c.arrowTooltip){c.arrowEl.dom.setAttribute(c.getTipAttr(),c.arrowTooltip)}a=c.el;if(c.tooltip){c.setTooltip(c.tooltip,true)}if(c.handleMouseEvents){b={scope:c,mouseover:c.onMouseOver,mouseout:c.onMouseOut,mousedown:c.onMouseDown};if(c.split){b.mousemove=c.onMouseMove}}else{b={scope:c}}if(c.menu){c.mon(c.menu,{scope:c,show:c.onMenuShow,hide:c.onMenuHide});c.keyMap=new Ext.util.KeyMap({target:c.el,key:Ext.EventObject.DOWN,handler:c.onDownKey,scope:c})}if(c.repeat){c.mon(new Ext.util.ClickRepeater(a,Ext.isObject(c.repeat)?c.repeat:{}),"click",c.onRepeatClick,c)}else{if(b[c.clickEvent]){d=true}else{b[c.clickEvent]=c.onClick}}c.mon(a,b);if(d){c.mon(a,c.clickEvent,c.onClick,c)}Ext.ButtonToggleManager.register(c)},getTemplateArgs:function(){var c=this,b=c.getPersistentPadding(),a="";if(Math.max.apply(Math,b)>0){a="margin:"+Ext.Array.map(b,function(d){return -d+"px"}).join(" ")}return{href:c.getHref(),disabled:c.disabled,hrefTarget:c.hrefTarget,type:c.type,btnCls:c.getBtnCls(),splitCls:c.getSplitCls(),iconUrl:c.icon,iconCls:c.iconCls,text:c.text||" ",tabIndex:c.tabIndex,innerSpanStyle:a}},getHref:function(){var a=this,b=Ext.apply({},a.baseParams);b=Ext.apply(b,a.params);return a.href?Ext.urlAppend(a.href,Ext.Object.toQueryString(b)):false},setParams:function(a){this.params=a;this.btnEl.dom.href=this.getHref()},getSplitCls:function(){var a=this;return a.split?(a.baseCls+"-"+a.arrowCls)+" "+(a.baseCls+"-"+a.arrowCls+"-"+a.arrowAlign):""},getBtnCls:function(){return this.textAlign?this.baseCls+"-"+this.textAlign:""},setIconCls:function(b){var d=this,a=d.btnIconEl,c=d.iconCls;d.iconCls=b;if(a){a.removeCls(c);a.addCls(b||"");d.setComponentCls();if(d.didIconStateChange(c,b)){d.updateLayout()}}return d},setTooltip:function(c,a){var b=this;if(b.rendered){if(!a){b.clearTip()}if(Ext.isObject(c)){Ext.tip.QuickTipManager.register(Ext.apply({target:b.btnEl.id},c));b.tooltip=c}else{b.btnEl.dom.setAttribute(b.getTipAttr(),c)}}else{b.tooltip=c}return b},setTextAlign:function(c){var b=this,a=b.btnEl;if(a){a.removeCls(b.baseCls+"-"+b.textAlign);a.addCls(b.baseCls+"-"+c)}b.textAlign=c;return b},getTipAttr:function(){return this.tooltipType=="qtip"?"data-qtip":"title"},getRefItems:function(a){var c=this.menu,b;if(c){b=c.getRefItems(a);b.unshift(c)}return b||[]},clearTip:function(){if(Ext.isObject(this.tooltip)){Ext.tip.QuickTipManager.unregister(this.btnEl)}},beforeDestroy:function(){var a=this;if(a.rendered){a.clearTip()}if(a.menu&&a.destroyMenu!==false){Ext.destroy(a.menu)}Ext.destroy(a.btnInnerEl,a.repeater);a.callParent()},onDestroy:function(){var a=this;if(a.rendered){a.doc.un("mouseover",a.monitorMouseOver,a);a.doc.un("mouseup",a.onMouseUp,a);delete a.doc;Ext.ButtonToggleManager.unregister(a);Ext.destroy(a.keyMap);delete a.keyMap}a.callParent()},setHandler:function(b,a){this.handler=b;this.scope=a;return this},setText:function(b){var a=this;a.text=b;if(a.rendered){a.btnInnerEl.update(b||" ");a.setComponentCls();if(Ext.isStrict&&Ext.isIE8){a.el.repaint()}a.updateLayout()}return a},setIcon:function(b){var c=this,a=c.btnIconEl,d=c.icon;c.icon=b;if(a){a.setStyle("background-image",b?"url("+b+")":"");c.setComponentCls();if(c.didIconStateChange(d,b)){c.updateLayout()}}return c},didIconStateChange:function(a,c){var b=Ext.isEmpty(c);return Ext.isEmpty(a)?!b:b},getText:function(){return this.text},toggle:function(c,a){var b=this;c=c===undefined?!b.pressed:!!c;if(c!==b.pressed){if(b.rendered){b[c?"addClsWithUI":"removeClsWithUI"](b.pressedCls)}b.pressed=c;if(!a){b.fireEvent("toggle",b,c);Ext.callback(b.toggleHandler,b.scope||b,[b,c])}}return b},maybeShowMenu:function(){var a=this;if(a.menu&&!a.hasVisibleMenu()&&!a.ignoreNextClick){a.showMenu()}},showMenu:function(){var a=this;if(a.rendered&&a.menu){if(a.tooltip&&a.getTipAttr()!="title"){Ext.tip.QuickTipManager.getQuickTip().cancelShow(a.btnEl)}if(a.menu.isVisible()){a.menu.hide()}a.menu.showBy(a.el,a.menuAlign,((!Ext.isStrict&&Ext.isIE)||Ext.isIE6)?[-2,-2]:undefined)}return a},hideMenu:function(){if(this.hasVisibleMenu()){this.menu.hide()}return this},hasVisibleMenu:function(){var a=this.menu;return a&&a.rendered&&a.isVisible()},onRepeatClick:function(a,b){this.onClick(b)},onClick:function(b){var a=this;if(a.preventDefault||(a.disabled&&a.getHref())&&b){b.preventDefault()}if(b.button!==0){return}if(!a.disabled){a.doToggle();a.maybeShowMenu();a.fireHandler(b)}},fireHandler:function(c){var b=this,a=b.handler;if(b.fireEvent("click",b,c)!==false){if(a){a.call(b.scope||b,b,c)}b.blur()}},doToggle:function(){var a=this;if(a.enableToggle&&(a.allowDepress!==false||!a.pressed)){a.toggle()}},onMouseOver:function(b){var a=this;if(!a.disabled&&!b.within(a.el,true,true)){a.onMouseEnter(b)}},onMouseOut:function(b){var a=this;if(!b.within(a.el,true,true)){if(a.overMenuTrigger){a.onMenuTriggerOut(b)}a.onMouseLeave(b)}},onMouseMove:function(h){var d=this,c=d.el,g=d.overMenuTrigger,b,a;if(d.split){if(d.arrowAlign==="right"){b=h.getX()-c.getX();a=c.getWidth()}else{b=h.getY()-c.getY();a=c.getHeight()}if(b>(a-d.getTriggerSize())){if(!g){d.onMenuTriggerOver(h)}}else{if(g){d.onMenuTriggerOut(h)}}}},getTriggerSize:function(){var e=this,c=e.triggerSize,b,a,d;if(c===d){b=e.arrowAlign;a=b.charAt(0);c=e.triggerSize=e.el.getFrameWidth(a)+e.btnWrap.getFrameWidth(a)+e.frameSize[b]}return c},onMouseEnter:function(b){var a=this;a.addClsWithUI(a.overCls);a.fireEvent("mouseover",a,b)},onMouseLeave:function(b){var a=this;a.removeClsWithUI(a.overCls);a.fireEvent("mouseout",a,b)},onMenuTriggerOver:function(b){var a=this;a.overMenuTrigger=true;a.fireEvent("menutriggerover",a,a.menu,b)},onMenuTriggerOut:function(b){var a=this;delete a.overMenuTrigger;a.fireEvent("menutriggerout",a,a.menu,b)},enable:function(a){var b=this;b.callParent(arguments);if(b.btnEl){b.btnEl.dom.disabled=false}b.removeClsWithUI("disabled");return b},disable:function(a){var b=this;b.callParent(arguments);if(b.btnEl){b.btnEl.dom.disabled=true}b.addClsWithUI("disabled");b.removeClsWithUI(b.overCls);if(b.btnInnerEl&&(Ext.isIE6||Ext.isIE7)){b.btnInnerEl.repaint()}return b},setScale:function(c){var a=this,b=a.ui.replace("-"+a.scale,"");if(!Ext.Array.contains(a.allowedScales,c)){throw ("#setScale: scale must be an allowed scale ("+a.allowedScales.join(", ")+")")}a.scale=c;a.setUI(b)},setUI:function(b){var a=this;if(a.scale&&!b.match(a.scale)){b=b+"-"+a.scale}a.callParent([b])},onMouseDown:function(b){var a=this;if(!a.disabled&&b.button===0){a.addClsWithUI(a.pressedCls);a.doc.on("mouseup",a.onMouseUp,a)}},onMouseUp:function(b){var a=this;if(b.button===0){if(!a.pressed){a.removeClsWithUI(a.pressedCls)}a.doc.un("mouseup",a.onMouseUp,a)}},onMenuShow:function(b){var a=this;a.ignoreNextClick=0;a.addClsWithUI(a.menuActiveCls);a.fireEvent("menushow",a,a.menu)},onMenuHide:function(b){var a=this;a.removeClsWithUI(a.menuActiveCls);a.ignoreNextClick=Ext.defer(a.restoreClick,250,a);a.fireEvent("menuhide",a,a.menu)},restoreClick:function(){this.ignoreNextClick=0},onDownKey:function(){var a=this;if(!a.disabled){if(a.menu){a.showMenu()}}},getPersistentPadding:function(){var g=this,e=Ext.scopeResetCSS,h=g.persistentPadding,b,a,d,i,c;if(!h){h=g.self.prototype.persistentPadding=[0,0,0,0];if(!Ext.isIE){b=new Ext.button.Button({text:"test",style:"position:absolute;top:-999px;"});b.el=Ext.DomHelper.append(Ext.resetElement,b.getRenderTree(),true);b.applyChildEls(b.el);d=b.btnEl;i=b.btnInnerEl;d.setSize(null,null);a=i.getOffsetsTo(d);h[0]=a[1];h[1]=d.getWidth()-i.getWidth()-a[0];h[2]=d.getHeight()-i.getHeight()-a[1];h[3]=a[0];b.destroy();b.el.remove()}}return h}},function(){var a={},b=function(d,j){if(j){var h=a[d.toggleGroup],e=h.length,c;for(c=0;c(None)',constructor:function(b){var a=this;a.callParent(arguments);a.triggerButtonCls=a.triggerButtonCls||Ext.baseCSSPrefix+"box-menu-"+b.getNames().right;a.menuItems=[]},beginLayout:function(a){this.callParent(arguments);this.clearOverflow(a)},beginLayoutCycle:function(b,a){this.callParent(arguments);if(!a){this.clearOverflow(b);this.layout.cacheChildItems(b)}},onRemove:function(a){Ext.Array.remove(this.menuItems,a)},getSuffixConfig:function(){var c=this,b=c.layout,a=b.owner.id;c.menu=new Ext.menu.Menu({listeners:{scope:c,beforeshow:c.beforeMenuShow}});c.menuTrigger=new Ext.button.Button({id:a+"-menu-trigger",cls:Ext.layout.container.Box.prototype.innerCls+" "+c.triggerButtonCls,hidden:true,ownerCt:b.owner,ownerLayout:b,iconCls:Ext.baseCSSPrefix+c.getOwnerType(b.owner)+"-more-icon",ui:b.owner instanceof Ext.toolbar.Toolbar?"default-toolbar":"default",menu:c.menu,getSplitCls:function(){return""}});return c.menuTrigger.getRenderTree()},getOverflowCls:function(){return Ext.baseCSSPrefix+this.layout.direction+"-box-overflow-body"},handleOverflow:function(d){var c=this,b=c.layout,g=b.getNames(),e=d.state.boxPlan,a=[null,null];c.showTrigger(d);a[g.heightIndex]=(e.maxSize-c.menuTrigger[g.getHeight]())/2;c.menuTrigger.setPosition.apply(c.menuTrigger,a);return{reservedSpace:c.menuTrigger[g.getWidth]()}},captureChildElements:function(){var a=this.menuTrigger;if(a.rendering){a.finishRender()}},_asLayoutRoot:{isRoot:true},clearOverflow:function(h){var g=this,b=g.menuItems,e,c=0,d=b.length,a=g.layout.owner,j=g._asLayoutRoot;a.suspendLayouts();g.captureChildElements();g.hideTrigger();a.resumeLayouts();for(;cb){j=q.target;o.menuItems.push(j);j.hide()}}a.resumeLayouts()},hideTrigger:function(){var a=this.menuTrigger;if(a){a.hide()}},beforeMenuShow:function(j){var h=this,b=h.menuItems,d=0,a=b.length,g,e,c=function(k,i){return k.isXType("buttongroup")&&!(i instanceof Ext.toolbar.Separator)};j.suspendLayouts();h.clearMenu();j.removeAll();for(;d=this.getMaxScrollPosition()},scrollTo:function(a,b){var g=this,e=g.layout,h=e.getNames(),d=g.getScrollPosition(),c=Ext.Number.constrain(a,0,g.getMaxScrollPosition());if(c!=d&&!g.scrolling){delete g.scrollPosition;if(b===undefined){b=g.animateScroll}e.innerCt.scrollTo(h.left,c,b?g.getScrollAnim():false);if(b){g.scrolling=true}else{g.updateScrollButtons()}g.fireEvent("scroll",g,c,b?g.getScrollAnim():false)}},scrollToItem:function(h,b){var g=this,e=g.layout,i=e.getNames(),a,d,c;h=g.getItem(h);if(h!==undefined){a=g.getItemVisibility(h);if(!a.fullyVisible){d=h.getBox(true,true);c=d[i.x];if(a.hiddenEnd){c-=(g.layout.innerCt["get"+i.widthCap]()-d[i.width])}g.scrollTo(c,b)}}},getItemVisibility:function(j){var h=this,b=h.getItem(j).getBox(true,true),c=h.layout,g=c.getNames(),e=b[g.x],d=e+b[g.width],a=h.getScrollPosition(),i=a+c.innerCt["get"+g.widthCap]();return{hiddenStart:ei,fullyVisible:e>a&&d=a.x&&b.right<=a.right&&b.y>=a.y&&b.bottom<=a.bottom)},intersect:function(h){var g=this,d=Math.max(g.y,h.y),e=Math.min(g.right,h.right),a=Math.min(g.bottom,h.bottom),c=Math.max(g.x,h.x);if(a>d&&e>c){return new this.self(d,e,a,c)}else{return false}},union:function(h){var g=this,d=Math.min(g.y,h.y),e=Math.max(g.right,h.right),a=Math.max(g.bottom,h.bottom),c=Math.min(g.x,h.x);return new this.self(d,e,a,c)},constrainTo:function(b){var a=this,c=Ext.Number.constrain;a.top=a.y=c(a.top,b.y,b.bottom);a.bottom=c(a.bottom,b.y,b.bottom);a.left=a.x=c(a.left,b.x,b.right);a.right=c(a.right,b.x,b.right);return a},adjust:function(d,g,a,c){var e=this;e.top=e.y+=d;e.left=e.x+=c;e.right+=g;e.bottom+=a;return e},getOutOfBoundOffset:function(a,b){if(!Ext.isObject(a)){if(a=="x"){return this.getOutOfBoundOffsetX(b)}else{return this.getOutOfBoundOffsetY(b)}}else{b=a;var c=new Ext.util.Offset();c.x=this.getOutOfBoundOffsetX(b.x);c.y=this.getOutOfBoundOffsetY(b.y);return c}},getOutOfBoundOffsetX:function(a){if(a<=this.x){return this.x-a}else{if(a>=this.right){return this.right-a}}return 0},getOutOfBoundOffsetY:function(a){if(a<=this.y){return this.y-a}else{if(a>=this.bottom){return this.bottom-a}}return 0},isOutOfBound:function(a,b){if(!Ext.isObject(a)){if(a=="x"){return this.isOutOfBoundX(b)}else{return this.isOutOfBoundY(b)}}else{b=a;return(this.isOutOfBoundX(b.x)||this.isOutOfBoundY(b.y))}},isOutOfBoundX:function(a){return(athis.right)},isOutOfBoundY:function(a){return(athis.bottom)},restrict:function(b,d,a){if(Ext.isObject(b)){var c;a=d;d=b;if(d.copy){c=d.copy()}else{c={x:d.x,y:d.y}}c.x=this.restrictX(d.x,a);c.y=this.restrictY(d.y,a);return c}else{if(b=="x"){return this.restrictX(d,a)}else{return this.restrictY(d,a)}}},restrictX:function(b,a){if(!a){a=1}if(b<=this.x){b-=(b-this.x)*a}else{if(b>=this.right){b-=(b-this.right)*a}}return b},restrictY:function(b,a){if(!a){a=1}if(b<=this.y){b-=(b-this.y)*a}else{if(b>=this.bottom){b-=(b-this.bottom)*a}}return b},getSize:function(){return{width:this.right-this.x,height:this.bottom-this.y}},copy:function(){return new this.self(this.y,this.right,this.bottom,this.x)},copyFrom:function(b){var a=this;a.top=a.y=a[1]=b.y;a.right=b.right;a.bottom=b.bottom;a.left=a.x=a[0]=b.x;return this},toString:function(){return"Region["+this.top+","+this.right+","+this.bottom+","+this.left+"]"},translateBy:function(a,c){if(arguments.length==1){c=a.y;a=a.x}var b=this;b.top=b.y+=c;b.right+=a;b.bottom+=c;b.left=b.x+=a;return b},round:function(){var a=this;a.top=a.y=Math.round(a.y);a.right=Math.round(a.right);a.bottom=Math.round(a.bottom);a.left=a.x=Math.round(a.x);return a},equals:function(a){return(this.top==a.top&&this.right==a.right&&this.bottom==a.bottom&&this.left==a.left)}});Ext.define("Ext.dd.DragDropManager",{singleton:true,requires:["Ext.util.Region"],uses:["Ext.tip.QuickTipManager"],alternateClassName:["Ext.dd.DragDropMgr","Ext.dd.DDM"],ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initialized:false,locked:false,init:function(){this.initialized=true},POINT:0,INTERSECT:1,mode:0,notifyOccluded:false,_execOnAll:function(c,b){var d,a,e;for(d in this.ids){for(a in this.ids[d]){e=this.ids[d][a];if(!this.isTypeOfDD(e)){continue}e[c].apply(e,b)}}},_onLoad:function(){this.init();var a=Ext.EventManager;a.on(document,"mouseup",this.handleMouseUp,this,true);a.on(document,"mousemove",this.handleMouseMove,this,true);a.on(window,"unload",this._onUnload,this,true);a.on(window,"resize",this._onResize,this,true)},_onResize:function(a){this._execOnAll("resetConstraints",[])},lock:function(){this.locked=true},unlock:function(){this.locked=false},isLocked:function(){return this.locked},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:350,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,regDragDrop:function(b,a){if(!this.initialized){this.init()}if(!this.ids[a]){this.ids[a]={}}this.ids[a][b.id]=b},removeDDFromGroup:function(c,a){if(!this.ids[a]){this.ids[a]={}}var b=this.ids[a];if(b&&b[c.id]){delete b[c.id]}},_remove:function(b){for(var a in b.groups){if(a&&this.ids[a]&&this.ids[a][b.id]){delete this.ids[a][b.id]}}delete this.handleIds[b.id]},regHandle:function(b,a){if(!this.handleIds[b]){this.handleIds[b]={}}this.handleIds[b][a]=a},isDragDrop:function(a){return(this.getDDById(a))?true:false},getRelated:function(g,b){var e=[],d,c,a;for(d in g.groups){for(c in this.ids[d]){a=this.ids[d][c];if(!this.isTypeOfDD(a)){continue}if(!b||a.isTarget){e[e.length]=a}}}return e},isLegalTarget:function(e,d){var b=this.getRelated(e,true),c,a;for(c=0,a=b.length;cc.clickPixelThresh||a>c.clickPixelThresh){c.startDrag(c.startX,c.startY)}}if(c.dragThreshMet){c.dragCurrent.b4Drag(d);c.dragCurrent.onDrag(d);if(!c.dragCurrent.moveOnly){c.fireEvents(d,false)}}c.stopEvent(d);return true},fireEvents:function(n,q){var p=this,k=p.dragCurrent,r=n.getPoint(),b,t,d=[],a=[],g=[],l=[],j=[],c=[],o,h,m,s;if(!k||k.isLocked()){return}for(h in p.dragOvers){b=p.dragOvers[h];if(!p.isTypeOfDD(b)){continue}if(!this.isOverTarget(r,b,p.mode)){g.push(b)}a[h]=true;delete p.dragOvers[h]}for(s in k.groups){if("string"!=typeof s){continue}for(h in p.ids[s]){b=p.ids[s][h];if(p.isTypeOfDD(b)&&(t=b.getEl())&&(b.isTarget)&&(!b.isLocked())&&(Ext.fly(t).isVisible(true))&&((b!=k)||(k.ignoreSelf===false))){if((b.zIndex=p.getZIndex(t))!==-1){o=true}d.push(b)}}}if(o){Ext.Array.sort(d,p.byZIndex)}for(h=0,m=d.length;h','
',"{%this.renderBody(out, values)%}","
","","{%if (oh.getSuffixConfig!==Ext.emptyFn) {","if(oc=oh.getSuffixConfig())dh.generateMarkup(oc, out)","}%}",{disableFormats:true,definitions:"var dh=Ext.DomHelper;"}],constructor:function(a){var c=this,b;c.callParent(arguments);c.flexSortFn=Ext.Function.bind(c.flexSort,c);c.initOverflowHandler();b=typeof c.padding;if(b=="string"||b=="number"){c.padding=Ext.util.Format.parseBox(c.padding);c.padding.height=c.padding.top+c.padding.bottom;c.padding.width=c.padding.left+c.padding.right}},getNames:function(){return this.names},_percentageRe:/^\s*(\d+(?:\.\d*)?)\s*[%]\s*$/,getItemSizePolicy:function(m,n){var j=this,h=j.sizePolicy,g=j.align,e=m.flex,k=g,i=j.names,a=m[i.width],l=m[i.height],c=j._percentageRe,b=c.test(a),d=(g=="stretch");if((d||e||b)&&!n){n=j.owner.getSizeModel()}if(d){if(!c.test(l)&&n[i.height].shrinkWrap){k="stretchmax"}}else{if(g!="stretchmax"){if(c.test(l)){k="stretch"}else{k=""}}}if(e||b){if(!n[i.width].shrinkWrap){h=h.flex}}return h[k]},flexSort:function(d,c){var e=this.getNames().maxWidth,g=Infinity;d=d.target[e]||g;c=c.target[e]||g;if(!isFinite(d)&&!isFinite(c)){return 0}return d-c},isItemBoxParent:function(a){return true},isItemShrinkWrap:function(a){return true},minSizeSortFn:function(d,c){return c.available-d.available},roundFlex:function(a){return Math.ceil(a)},beginCollapse:function(b){var a=this;if(a.direction==="vertical"&&b.collapsedVertical()){b.collapseMemento.capture(["flex"]);delete b.flex}else{if(a.direction==="horizontal"&&b.collapsedHorizontal()){b.collapseMemento.capture(["flex"]);delete b.flex}}},beginExpand:function(a){a.collapseMemento.restore(["flex"])},beginLayout:function(c){var b=this,e=b.owner.stretchMaxPartner,a=b.innerCt.dom.style,d=b.getNames();c.boxNames=d;b.overflowHandler.beginLayout(c);if(typeof e==="string"){e=Ext.getCmp(e)||b.owner.query(e)[0]}c.stretchMaxPartner=e&&c.context.getCmp(e);b.callParent(arguments);c.innerCtContext=c.getEl("innerCt",b);b.scrollParallel=!!(b.owner.autoScroll||b.owner[d.overflowX]);b.scrollPerpendicular=!!(b.owner.autoScroll||b.owner[d.overflowY]);if(b.scrollParallel){b.scrollPos=b.owner.getTargetEl().dom[d.scrollLeft]}a.width="";a.height=""},beginLayoutCycle:function(e,a){var d=this,h=d.align,g=e.boxNames,b=d.pack,c=g.heightModel;d.overflowHandler.beginLayoutCycle(e,a);d.callParent(arguments);e.parallelSizeModel=e[g.widthModel];e.perpendicularSizeModel=e[c];e.boxOptions={align:h={stretch:h=="stretch",stretchmax:h=="stretchmax",center:h==g.center},pack:b={center:b=="center",end:b=="end"}};if(h.stretch&&e.perpendicularSizeModel.shrinkWrap){h.stretchmax=true;h.stretch=false}h.nostretch=!(h.stretch||h.stretchmax);if(e.parallelSizeModel.shrinkWrap){b.center=b.end=false}d.cacheFlexes(e);if(Ext.isWebKit){d.targetEl.setWidth(20000)}},cacheFlexes:function(k){var u=this,l=k.boxNames,a=l.widthModel,d=l.heightModel,c=k.boxOptions.align.nostretch,o=0,b=k.childItems,q=b.length,s=[],m=0,j=l.minWidth,g=u._percentageRe,r=0,t=0,e,n,p,h;while(q--){n=b[q];e=n.target;if(n[a].calculated){n.flex=p=e.flex;if(p){o+=p;s.push(n);m+=e[j]||0}else{h=g.exec(e[l.width]);n.percentageParallel=parseFloat(h[1])/100;++r}}if(c&&n[d].calculated){h=g.exec(e[l.height]);n.percentagePerpendicular=parseFloat(h[1])/100;++t}}k.flexedItems=s;k.flexedMinSize=m;k.totalFlex=o;k.percentageWidths=r;k.percentageHeights=t;Ext.Array.sort(s,u.flexSortFn)},calculate:function(d){var b=this,a=b.getContainerSize(d),g=d.boxNames,c=d.state,e=c.boxPlan||(c.boxPlan={});e.targetSize=a;if(!d.parallelSizeModel.shrinkWrap&&!a[g.gotWidth]){b.done=false;return}if(!c.parallelDone){c.parallelDone=b.calculateParallel(d,g,e)}if(!c.perpendicularDone){c.perpendicularDone=b.calculatePerpendicular(d,g,e)}if(c.parallelDone&&c.perpendicularDone){if(b.owner.dock&&(Ext.isIE6||Ext.isIE7||Ext.isIEQuirks)&&!b.owner.width&&!b.horizontal){e.isIEVerticalDock=true;e.calculatedWidth=e.maxSize+d.getPaddingInfo().width+d.getFrameInfo().width}b.publishInnerCtSize(d,b.reserveOffset?b.availableSpaceOffset:0);if(b.done&&d.childItems.length>1&&d.boxOptions.align.stretchmax&&!c.stretchMaxDone){b.calculateStretchMax(d,g,e);c.stretchMaxDone=true}}else{b.done=false}},calculateParallel:function(k,n,b){var F=this,z=n.width,a=k.childItems,d=n.left,r=n.right,q=n.setWidth,A=a.length,x=k.flexedItems,s=x.length,v=k.boxOptions.pack,m=F.padding,h=b.targetSize[z],B=0,e=m[d],E=e+m[r]+F.scrollOffset+(F.reserveOffset?F.availableSpaceOffset:0),w=Ext.getScrollbarSize()[n.width],u,l,g,y,o,t,D,p,C,c,j;if(w&&F.scrollPerpendicular&&k.parallelSizeModel.shrinkWrap&&!k.boxOptions.align.stretch&&!k.perpendicularSizeModel.shrinkWrap){if(!k.state.perpendicularDone){return false}C=true}for(u=0;ub.targetSize[n.height])){p+=w;k[n.hasOverflowY]=true;k.target.componentLayout[n.setWidthInDom]=true;k[n.invalidateScrollY]=(Ext.isStrict&&Ext.isIE8)}k[n.setContentWidth](p);return true},calculatePerpendicular:function(r,v,c){var G=this,a=r.perpendicularSizeModel.shrinkWrap,d=c.targetSize,b=r.childItems,E=b.length,J=Math.max,H=v.height,m=v.setHeight,p=v.top,F=v.y,u=G.padding,w=u[p],h=d[H]-w-u[v.bottom],B=r.boxOptions.align,o=B.stretch,z=B.stretchmax,n=B.center,A=0,g=0,l=Ext.getScrollbarSize().height,I,C,e,t,s,y,x,k,j,q,D;if(o||(n&&!a)){if(isNaN(h)){return false}}if(G.scrollParallel&&c.tooNarrow){if(a){q=true}else{h-=l;c.targetSize[H]-=l}}if(o){y=h}else{for(C=0;C0){I=w+Math.round(s/2)}}}x.setProp(F,I)}return true},calculateStretchMax:function(d,k,m){var l=this,h=k.height,n=k.width,g=d.childItems,b=g.length,o=m.maxSize,a=l.onBeforeInvalidateChild,q=l.onAfterInvalidateChild,p,j,e,c;for(e=0;e":{xtype:"tbfill",height:0}},1:{"->":{xtype:"tbfill",width:0}}}},initComponent:function(){var b=this,a;if(!b.layout&&b.enableOverflow){b.layout={overflowHandler:"Menu"}}if(b.dock==="right"||b.dock==="left"){b.vertical=true}b.layout=Ext.applyIf(Ext.isString(b.layout)?{type:b.layout}:b.layout||{},{type:b.vertical?"vbox":"hbox",align:b.vertical?"stretchmax":"middle"});if(b.vertical){b.addClsWithUI("vertical")}if(b.ui==="footer"){b.ignoreBorderManagement=true}b.callParent();b.addEvents("overflowchange")},getRefItems:function(a){var e=this,b=e.callParent(arguments),d=e.layout,c;if(a&&e.enableOverflow){c=d.overflowHandler;if(c&&c.menu){b=b.concat(c.menu.getRefItems(a))}}return b},lookupComponent:function(d){if(typeof d=="string"){var b=Ext.toolbar.Toolbar,a=b.shortcutsHV[this.vertical?1:0][d]||b.shortcuts[d];if(typeof a=="string"){d={xtype:a}}else{if(a){d=Ext.apply({},a)}else{d={xtype:"tbtext",text:d}}}this.applyDefaults(d)}return this.callParent(arguments)},applyDefaults:function(a){if(!Ext.isString(a)){a=this.callParent(arguments)}return a},trackMenu:function(c,a){if(this.trackMenus&&c.menu){var d=a?"mun":"mon",b=this;b[d](c,"mouseover",b.onButtonOver,b);b[d](c,"menushow",b.onButtonMenuShow,b);b[d](c,"menuhide",b.onButtonMenuHide,b)}},constructButton:function(a){return a.events?a:Ext.widget(a.split?"splitbutton":this.defaultType,a)},onBeforeAdd:function(a){if(a.is("field")||(a.is("button")&&this.ui!="footer")){a.ui=a.ui+"-toolbar"}if(a instanceof Ext.toolbar.Separator){a.setUI((this.vertical)?"vertical":"horizontal")}this.callParent(arguments)},onAdd:function(a){this.callParent(arguments);this.trackMenu(a)},onRemove:function(a){this.callParent(arguments);this.trackMenu(a,true)},getChildItemsToDisable:function(){return this.items.getRange()},onButtonOver:function(a){if(this.activeMenuBtn&&this.activeMenuBtn!=a){this.activeMenuBtn.hideMenu();a.showMenu();this.activeMenuBtn=a}},onButtonMenuShow:function(a){this.activeMenuBtn=a},onButtonMenuHide:function(a){delete this.activeMenuBtn}});Ext.define("Ext.container.DockingContainer",{requires:["Ext.util.MixedCollection","Ext.Element"],isDockingContainer:true,defaultDockWeights:{top:{render:1,visual:1},left:{render:3,visual:5},right:{render:5,visual:7},bottom:{render:7,visual:3}},dockOrder:{top:-1,left:-1,right:1,bottom:1},addDocked:function(a,g){var e=this,b=0,d,c;a=e.prepareItems(a);c=a.length;for(;b":"",'
{bodyCls}',' {baseCls}-body-{ui}',' {parent.baseCls}-body-{parent.ui}-{.}','" style="{bodyStyle}">',"{%this.renderContainer(out,values);%}","
","{% this.renderDockedItems(out,values,1); %}"],bodyPosProps:{x:"x",y:"y"},border:true,emptyArray:[],initComponent:function(){var a=this;if(a.frame&&a.border&&a.bodyBorder===undefined){a.bodyBorder=false}if(a.frame&&a.border&&(a.bodyBorder===false||a.bodyBorder===0)){a.manageBodyBorders=true}a.callParent()},beforeDestroy:function(){this.destroyDockedItems();this.callParent()},initItems:function(){this.callParent();this.initDockingItems()},initRenderData:function(){var a=this,b=a.callParent();a.initBodyStyles();a.protoBody.writeTo(b);delete a.protoBody;return b},getComponent:function(a){var b=this.callParent(arguments);if(b===undefined&&!Ext.isNumber(a)){b=this.getDockedComponent(a)}return b},getProtoBody:function(){var b=this,a=b.protoBody;if(!a){b.protoBody=a=new Ext.util.ProtoElement({cls:b.bodyCls,style:b.bodyStyle,clsProp:"bodyCls",styleProp:"bodyStyle",styleIsText:true})}return a},initBodyStyles:function(){var c=this,a=c.getProtoBody(),b=Ext.Element;if(c.bodyPadding!==undefined){a.setStyle("padding",b.unitizeBox((c.bodyPadding===true)?5:c.bodyPadding))}if(c.frame&&c.bodyBorder){if(!Ext.isNumber(c.bodyBorder)){c.bodyBorder=1}a.setStyle("border-width",b.unitizeBox(c.bodyBorder))}},getCollapsedDockedItems:function(){var a=this;return a.collapseMode=="placeholder"?a.emptyArray:[a.getReExpander()]},setBodyStyle:function(b,d){var c=this,a=c.rendered?c.body:c.getProtoBody();if(Ext.isFunction(b)){b=b()}if(arguments.length==1){if(Ext.isString(b)){b=Ext.Element.parseStyles(b)}a.setStyle(b)}else{a.setStyle(b,d)}return c},addBodyCls:function(b){var c=this,a=c.rendered?c.body:c.getProtoBody();a.addCls(b);return c},removeBodyCls:function(b){var c=this,a=c.rendered?c.body:c.getProtoBody();a.removeCls(b);return c},addUIClsToElement:function(b){var c=this,a=c.callParent(arguments);c.addBodyCls([Ext.baseCSSPrefix+b,c.baseCls+"-body-"+b,c.baseCls+"-body-"+c.ui+"-"+b]);return a},removeUIClsFromElement:function(b){var c=this,a=c.callParent(arguments);c.removeBodyCls([Ext.baseCSSPrefix+b,c.baseCls+"-body-"+b,c.baseCls+"-body-"+c.ui+"-"+b]);return a},addUIToElement:function(){var a=this;a.callParent(arguments);a.addBodyCls(a.baseCls+"-body-"+a.ui)},removeUIFromElement:function(){var a=this;a.callParent(arguments);a.removeBodyCls(a.baseCls+"-body-"+a.ui)},getTargetEl:function(){return this.body},getRefItems:function(a){var b=this.callParent(arguments);return this.getDockingRefItems(a,b)},setupRenderTpl:function(a){this.callParent(arguments);this.setupDockingRenderTpl(a)}});Ext.define("Ext.layout.component.Body",{alias:["layout.body"],extend:"Ext.layout.component.Auto",type:"body",beginLayout:function(a){this.callParent(arguments);a.bodyContext=a.getEl("body")},calculateOwnerHeightFromContentHeight:function(c,b){var a=this.callParent(arguments);if(c.targetContext!=c){a+=c.getPaddingInfo().height}return a},calculateOwnerWidthFromContentWidth:function(c,a){var b=this.callParent(arguments);if(c.targetContext!=c){b+=c.getPaddingInfo().width}return b},measureContentWidth:function(a){return a.bodyContext.setWidth(a.bodyContext.el.dom.offsetWidth,false)},measureContentHeight:function(a){return a.bodyContext.setHeight(a.bodyContext.el.dom.offsetHeight,false)},publishInnerHeight:function(c,a){var d=a-c.getFrameInfo().height,b=c.targetContext;if(b!=c){d-=c.getPaddingInfo().height}return c.bodyContext.setHeight(d,!c.heightModel.natural)},publishInnerWidth:function(d,c){var a=c-d.getFrameInfo().width,b=d.targetContext;if(b!=d){a-=d.getPaddingInfo().width}d.bodyContext.setWidth(a,!d.widthModel.natural)}});Ext.define("Ext.panel.Header",{extend:"Ext.container.Container",uses:["Ext.panel.Tool","Ext.draw.Component","Ext.util.CSS","Ext.layout.component.Body","Ext.Img"],alias:"widget.header",isHeader:true,defaultType:"tool",indicateDrag:false,weight:-1,componentLayout:"body",titleAlign:"left",childEls:["body"],renderTpl:['
{parent.baseCls}-body-{parent.ui}-{.}"',' style="{bodyStyle}">',"{%this.renderContainer(out,values)%}","
"],headingTpl:'{title}',shrinkWrap:3,initComponent:function(){var b=this,e,d,a,c,g;b.addEvents("click","dblclick");b.indicateDragCls=b.baseCls+"-draggable";b.title=b.title||" ";b.tools=b.tools||[];b.items=b.items||[];b.orientation=b.orientation||"horizontal";b.dock=(b.dock)?b.dock:(b.orientation=="horizontal")?"top":"left";b.addClsWithUI([b.orientation,b.dock]);if(b.indicateDrag){b.addCls(b.indicateDragCls)}if(!Ext.isEmpty(b.iconCls)||!Ext.isEmpty(b.icon)){b.initIconCmp();b.items.push(b.iconCmp)}if(b.orientation=="vertical"){b.layout={type:"vbox",align:"center"};b.textConfig={width:16,cls:b.baseCls+"-text",type:"text",text:b.title,rotate:{degrees:90}};c=b.ui;if(Ext.isArray(c)){c=c[0]}e="."+b.baseCls+"-text-"+c;if(Ext.scopeResetCSS){e="."+Ext.baseCSSPrefix+"reset "+e}d=Ext.util.CSS.getRule(e);if(d){a=d.style}else{a=(g=Ext.resetElement.createChild({style:"position:absolute",cls:b.baseCls+"-text-"+c})).getStyles("fontFamily","fontWeight","fontSize","color");g.remove()}if(a){Ext.apply(b.textConfig,{"font-family":a.fontFamily,"font-weight":a.fontWeight,"font-size":a.fontSize,fill:a.color})}b.titleCmp=new Ext.draw.Component({width:16,ariaRole:"heading",focusable:false,viewBox:false,flex:1,id:b.id+"_hd",autoSize:true,items:b.textConfig,xhooks:{setSize:function(h){this.callParent([h])}},childEls:[{name:"textEl",select:"."+b.baseCls+"-text"}]})}else{b.layout={type:"hbox",align:"middle"};b.titleCmp=new Ext.Component({ariaRole:"heading",focusable:false,noWrap:true,flex:1,id:b.id+"_hd",style:"text-align:"+b.titleAlign,cls:b.baseCls+"-text-container",renderTpl:b.getTpl("headingTpl"),renderData:{title:b.title,cls:b.baseCls,ui:b.ui},childEls:["textEl"]})}b.items.push(b.titleCmp);b.items=b.items.concat(b.tools);b.callParent();b.on({dblclick:b.onDblClick,click:b.onClick,element:"el",scope:b})},initIconCmp:function(){var b=this,a={focusable:false,src:Ext.BLANK_IMAGE_URL,cls:[b.baseCls+"-icon",b.iconCls],id:b.id+"-iconEl",iconCls:b.iconCls};if(!Ext.isEmpty(b.icon)){delete a.iconCls;a.src=b.icon}b.iconCmp=new Ext.Img(a)},afterRender:function(){this.el.unselectable();this.callParent()},addUIClsToElement:function(b){var e=this,a=e.callParent(arguments),d=[e.baseCls+"-body-"+b,e.baseCls+"-body-"+e.ui+"-"+b],g,c;if(e.bodyCls){g=e.bodyCls.split(" ");for(c=0;c=e.duration),g,i;g=this.collectTargetData(e,a,h,c);if(h){e.target.setAttr(g.anims[e.id].attributes,true);d.collectTargetData(e,e.duration,h,c);e.paused=true;g=e.target.target;if(e.target.isComposite){g=e.target.target.last()}i={};i[Ext.supports.CSS3TransitionEnd]=e.lastFrame;i.scope=e;i.single=true;g.on(i)}},collectTargetData:function(c,a,e,g){var b=c.target.getId(),d=this.targetArr[b];if(!d){d=this.targetArr[b]={id:b,el:c.target,anims:{}}}d.anims[c.id]={id:c.id,anim:c,elapsed:a,isLastFrame:g,attributes:[{duration:c.duration,easing:(e&&c.reverse)?c.easingFn.reverse().toCSS3():c.easing,attrs:c.runAnim(a)}]};return d},applyPendingAttrs:function(){var e=this.targetArr,g,c,b,d,a;for(c in e){if(e.hasOwnProperty(c)){g=e[c];for(a in g.anims){if(g.anims.hasOwnProperty(a)){b=g.anims[a];d=b.anim;if(b.attributes&&d.isRunning()){g.el.setAttr(b.attributes,false,b.isLastFrame);if(b.isLastFrame){d.lastFrame()}}}}}}}});Ext.define("Ext.fx.Animator",{mixins:{observable:"Ext.util.Observable"},requires:["Ext.fx.Manager"],isAnimator:true,duration:250,delay:0,delayStart:0,dynamic:false,easing:"ease",running:false,paused:false,damper:1,iterations:1,currentIteration:0,keyframeStep:0,animKeyFramesRE:/^(from|to|\d+%?)$/,constructor:function(a){var b=this;a=Ext.apply(b,a||{});b.config=a;b.id=Ext.id(null,"ext-animator-");b.addEvents("beforeanimate","keyframe","afteranimate");b.mixins.observable.constructor.call(b,a);b.timeline=[];b.createTimeline(b.keyframes);if(b.target){b.applyAnimator(b.target);Ext.fx.Manager.addAnim(b)}},sorter:function(d,c){return d.pct-c.pct},createTimeline:function(g){var k=this,n=[],l=k.to||{},c=k.duration,o,a,e,j,m,b,d,h;for(m in g){if(g.hasOwnProperty(m)&&k.animKeyFramesRE.test(m)){h={attrs:Ext.apply(g[m],l)};if(m=="from"){m=0}else{if(m=="to"){m=100}}h.pct=parseInt(m,10);n.push(h)}}Ext.Array.sort(n,k.sorter);j=n.length;for(e=0;e0},isRunning:function(){return false}});Ext.define("Ext.fx.CubicBezier",{singleton:true,cubicBezierAtTime:function(o,d,b,n,m,i){var j=3*d,l=3*(n-d)-j,a=1-j-l,h=3*b,k=3*(m-b)-h,p=1-h-k;function g(q){return((a*q+l)*q+j)*q}function c(q,s){var r=e(q,s);return((p*r+k)*r+h)*r}function e(q,y){var w,v,t,r,u,s;for(t=q,s=0;s<8;s++){r=g(t)-q;if(Math.abs(r)v){return v}while(wr){w=t}else{v=t}t=(v-w)/2+w}return t}return c(o,1/(200*i))},cubicBezier:function(b,e,a,c){var d=function(g){return Ext.fx.CubicBezier.cubicBezierAtTime(g,b,e,a,c,1)};d.toCSS3=function(){return"cubic-bezier("+[b,e,a,c].join(",")+")"};d.reverse=function(){return Ext.fx.CubicBezier.cubicBezier(1-a,1-c,1-b,1-e)};return d}});Ext.ns("Ext.fx");Ext.require("Ext.fx.CubicBezier",function(){var e=Math,h=e.PI,d=e.pow,b=e.sin,g=e.sqrt,a=e.abs,c=1.70158;Ext.fx.Easing={};Ext.apply(Ext.fx.Easing,{linear:function(i){return i},ease:function(l){var i=0.07813-l/2,m=-0.25,o=g(0.0066+i*i),r=o-i,k=d(a(r),1/3)*(r<0?-1:1),p=-o-i,j=d(a(p),1/3)*(p<0?-1:1),s=k+j+0.25;return d(1-s,2)*3*s*0.1+(1-s)*3*s*s+s*s*s},easeIn:function(i){return d(i,1.7)},easeOut:function(i){return d(i,0.48)},easeInOut:function(r){var l=0.48-r/1.04,k=g(0.1734+l*l),i=k-l,p=d(a(i),1/3)*(i<0?-1:1),o=-k-l,m=d(a(o),1/3)*(o<0?-1:1),j=p+m+0.5;return(1-j)*3*j*j+j*j*j},backIn:function(i){return i*i*((c+1)*i-c)},backOut:function(i){i=i-1;return i*i*((c+1)*i+c)+1},elasticIn:function(k){if(k===0||k===1){return k}var j=0.3,i=j/4;return d(2,-10*k)*b((k-i)*(2*h)/j)+1},elasticOut:function(i){return 1-Ext.fx.Easing.elasticIn(1-i)},bounceIn:function(i){return 1-Ext.fx.Easing.bounceOut(1-i)},bounceOut:function(m){var j=7.5625,k=2.75,i;if(m<(1/k)){i=j*m*m}else{if(m<(2/k)){m-=(1.5/k);i=j*m*m+0.75}else{if(m<(2.5/k)){m-=(2.25/k);i=j*m*m+0.9375}else{m-=(2.625/k);i=j*m*m+0.984375}}}return i}});Ext.apply(Ext.fx.Easing,{"back-in":Ext.fx.Easing.backIn,"back-out":Ext.fx.Easing.backOut,"ease-in":Ext.fx.Easing.easeIn,"ease-out":Ext.fx.Easing.easeOut,"elastic-in":Ext.fx.Easing.elasticIn,"elastic-out":Ext.fx.Easing.elasticIn,"bounce-in":Ext.fx.Easing.bounceIn,"bounce-out":Ext.fx.Easing.bounceOut,"ease-in-out":Ext.fx.Easing.easeInOut})});Ext.define("Ext.draw.Color",{colorToHexRe:/(.*?)rgb\((\d+),\s*(\d+),\s*(\d+)\)/,rgbRe:/\s*rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)\s*/,hexRe:/\s*#([0-9a-fA-F][0-9a-fA-F]?)([0-9a-fA-F][0-9a-fA-F]?)([0-9a-fA-F][0-9a-fA-F]?)\s*/,lightnessFactor:0.2,constructor:function(d,c,a){var b=this,e=Ext.Number.constrain;b.r=e(d,0,255);b.g=e(c,0,255);b.b=e(a,0,255)},getRed:function(){return this.r},getGreen:function(){return this.g},getBlue:function(){return this.b},getRGB:function(){var a=this;return[a.r,a.g,a.b]},getHSL:function(){var j=this,a=j.r/255,i=j.g/255,k=j.b/255,m=Math.max(a,i,k),d=Math.min(a,i,k),n=m-d,e,o=0,c=0.5*(m+d);if(d!=m){o=(c<0.5)?n/(m+d):n/(2-m-d);if(a==m){e=60*(i-k)/n}else{if(i==m){e=120+60*(k-a)/n}else{e=240+60*(a-i)/n}}if(e<0){e+=360}if(e>=360){e-=360}}return[e,o,c]},getLighter:function(b){var a=this.getHSL();b=b||this.lightnessFactor;a[2]=Ext.Number.constrain(a[2]+b,0,1);return this.fromHSL(a[0],a[1],a[2])},getDarker:function(a){a=a||this.lightnessFactor;return this.getLighter(-a)},toString:function(){var h=this,c=Math.round,e=c(h.r).toString(16),d=c(h.g).toString(16),a=c(h.b).toString(16);e=(e.length==1)?"0"+e:e;d=(d.length==1)?"0"+d:d;a=(a.length==1)?"0"+a:a;return["#",e,d,a].join("")},toHex:function(b){if(Ext.isArray(b)){b=b[0]}if(!Ext.isString(b)){return""}if(b.substr(0,1)==="#"){return b}var e=this.colorToHexRe.exec(b),g,d,a,c;if(Ext.isArray(e)){g=parseInt(e[2],10);d=parseInt(e[3],10);a=parseInt(e[4],10);c=a|(d<<8)|(g<<16);return e[1]+"#"+("000000"+c.toString(16)).slice(-6)}else{return b}},fromString:function(i){var c,e,d,a,h=parseInt;if((i.length==4||i.length==7)&&i.substr(0,1)==="#"){c=i.match(this.hexRe);if(c){e=h(c[1],16)>>0;d=h(c[2],16)>>0;a=h(c[3],16)>>0;if(i.length==4){e+=(e*16);d+=(d*16);a+=(a*16)}}}else{c=i.match(this.rgbRe);if(c){e=c[1];d=c[2];a=c[3]}}return(typeof e=="undefined")?undefined:new Ext.draw.Color(e,d,a)},getGrayscale:function(){return this.r*0.3+this.g*0.59+this.b*0.11},fromHSL:function(g,o,d){var a,b,c,e,k=[],n=Math.abs,j=Math.floor;if(o==0||g==null){k=[d,d,d]}else{g/=60;a=o*(1-n(2*d-1));b=a*(1-n(g-2*j(g/2)-1));c=d-a/2;switch(j(g)){case 0:k=[a,b,0];break;case 1:k=[b,a,0];break;case 2:k=[0,a,b];break;case 3:k=[0,b,a];break;case 4:k=[b,0,a];break;case 5:k=[a,0,b];break}k=[k[0]+c,k[1]+c,k[2]+c]}return new Ext.draw.Color(k[0]*255,k[1]*255,k[2]*255)}},function(){var a=this.prototype;this.addStatics({fromHSL:function(){return a.fromHSL.apply(a,arguments)},fromString:function(){return a.fromString.apply(a,arguments)},toHex:function(){return a.toHex.apply(a,arguments)}})});Ext.define("Ext.draw.Draw",{singleton:true,requires:["Ext.draw.Color"],pathToStringRE:/,?([achlmqrstvxz]),?/gi,pathCommandRE:/([achlmqstvz])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?\s*,?\s*)+)/ig,pathValuesRE:/(-?\d*\.?\d*(?:e[-+]?\d+)?)\s*,?\s*/ig,stopsRE:/^(\d+%?)$/,radian:Math.PI/180,availableAnimAttrs:{along:"along",blur:null,"clip-rect":"csv",cx:null,cy:null,fill:"color","fill-opacity":null,"font-size":null,height:null,opacity:null,path:"path",r:null,rotation:"csv",rx:null,ry:null,scale:"csv",stroke:"color","stroke-opacity":null,"stroke-width":null,translation:"csv",width:null,x:null,y:null},is:function(b,a){a=String(a).toLowerCase();return(a=="object"&&b===Object(b))||(a=="undefined"&&typeof b==a)||(a=="null"&&b===null)||(a=="array"&&Array.isArray&&Array.isArray(b))||(Object.prototype.toString.call(b).toLowerCase().slice(8,-1))==a},ellipsePath:function(b){var a=b.attr;return Ext.String.format("M{0},{1}A{2},{3},0,1,1,{0},{4}A{2},{3},0,1,1,{0},{1}z",a.x,a.y-a.ry,a.rx,a.ry,a.y+a.ry)},rectPath:function(b){var a=b.attr;if(a.radius){return Ext.String.format("M{0},{1}l{2},0a{3},{3},0,0,1,{3},{3}l0,{5}a{3},{3},0,0,1,{4},{3}l{6},0a{3},{3},0,0,1,{4},{4}l0,{7}a{3},{3},0,0,1,{3},{4}z",a.x+a.radius,a.y,a.width-a.radius*2,a.radius,-a.radius,a.height-a.radius*2,a.radius*2-a.width,a.radius*2-a.height)}else{return Ext.String.format("M{0},{1}L{2},{1},{2},{3},{0},{3}z",a.x,a.y,a.width+a.x,a.height+a.y)}},path2string:function(){return this.join(",").replace(Ext.draw.Draw.pathToStringRE,"$1")},pathToString:function(a){return a.join(",").replace(Ext.draw.Draw.pathToStringRE,"$1")},parsePathString:function(a){if(!a){return null}var d={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},c=[],b=this;if(b.is(a,"array")&&b.is(a[0],"array")){c=b.pathClone(a)}if(!c.length){String(a).replace(b.pathCommandRE,function(g,e,j){var i=[],h=e.toLowerCase();j.replace(b.pathValuesRE,function(l,k){k&&i.push(+k)});if(h=="m"&&i.length>2){c.push([e].concat(Ext.Array.splice(i,0,2)));h="l";e=(e=="m")?"l":"L"}while(i.length>=d[h]){c.push([e].concat(Ext.Array.splice(i,0,d[h])));if(!d[h]){break}}})}c.toString=b.path2string;return c},mapPath:function(l,g){if(!g){return l}var h,e,c,k,a,d,b;l=this.path2curve(l);for(c=0,k=l.length;c7){h[b].shift();e=h[b];while(e.length){Ext.Array.splice(h,b++,0,["C"].concat(Ext.Array.splice(e,0,6)))}Ext.Array.erase(h,b,1);c=h.length;b--}a=h[b];g=a.length;j.x=a[g-2];j.y=a[g-1];j.bx=parseFloat(a[g-4])||j.x;j.by=parseFloat(a[g-3])||j.y}return h},interpolatePaths:function(r,l){var j=this,d=j.pathToAbsolute(r),m=j.pathToAbsolute(l),n={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},a={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},b=function(p,s){if(p[s].length>7){p[s].shift();var t=p[s];while(t.length){Ext.Array.splice(p,s++,0,["C"].concat(Ext.Array.splice(t,0,6)))}Ext.Array.erase(p,s,1);o=Math.max(d.length,m.length||0)}},c=function(v,u,s,p,t){if(v&&u&&v[t][0]=="M"&&u[t][0]!="M"){Ext.Array.splice(u,t,0,["M",p.x,p.y]);s.bx=0;s.by=0;s.x=v[t][1];s.y=v[t][2];o=Math.max(d.length,m.length||0)}},h,o,g,q,e,k;for(h=0,o=Math.max(d.length,m.length||0);h1){ac=X(ac);J=ac*J;H=ac*H}d=J*J;T=H*H;W=(o==j?-1:1)*X(w((d*T-d*P*P-T*Q*Q)/(d*P*P+T*Q*Q)));E=W*J*P/H+(v+u)/2;D=W*-H*Q/J+(ah+ag)/2;n=p(((ah-D)/H).toFixed(7));m=p(((ag-D)/H).toFixed(7));n=vm){n=n-e*2}if(!j&&m>n){m=m-e*2}}else{n=C[0];m=C[1];E=C[2];D=C[3]}s=m-n;if(w(s)>G){F=m;I=u;q=ag;m=n+G*(j&&m>n?1:-1);u=E+J*V(m);ag=D+H*a(m);O=z.arc2curve(u,ag,J,H,B,0,j,I,q,[m,F,E,D])}s=m-n;l=V(n);af=a(n);g=V(m);ae=a(m);R=L.tan(s/4);U=4/3*J*R;S=4/3*H*R;ad=[v,ah];ab=[v+U*af,ah-S*l];aa=[u+U*ae,ag-S*g];Y=[u,ag];ab[0]=2*ad[0]-ab[0];ab[1]=2*ad[1]-ab[1];if(C){return[ab,aa,Y].concat(O)}else{O=[ab,aa,Y].concat(O).join().split(",");N=[];M=O.length;for(Z=0;Z(a[1]-c[1])*(b[0]-c[0])},intersectIntersection:function(n,m,g,d){var c=[],b=g[0]-d[0],a=g[1]-d[1],k=n[0]-m[0],i=n[1]-m[1],l=g[0]*d[1]-g[1]*d[0],j=n[0]*m[1]-n[1]*m[0],h=1/(b*i-a*k);c[0]=(l*k-j*b)*h;c[1]=(l*i-j*a)*h;return c},intersect:function(o,c){var n=this,k=0,m=c.length,h=c[m-1],q=o,g,r,l,p,a,b,d;for(;k0){v.push(g)}}else{j=t-3*q+3*n-m;p=2*(t-q-q+n);h=t-q;u=p*p-4*j*h;e=j+j;if(u===0){g=p/e;if(g<1&&g>0){v.push(g)}}else{if(u>0){w=Math.sqrt(u);g=(w+p)/e;if(g<1&&g>0){v.push(g)}g=(p-w)/e;if(g<1&&g>0){v.push(g)}}}}k=Math.min(t,m);o=Math.max(t,m);for(l=0;l=d&&j>=u)||(j<=d&&j<=u)){h=l=r}else{h=g((k-e)/m(j-d));if(dr){c-=p}h+=c;l+=c;o=k-t*a(h);n=j+t*b(h);x=k+s*a(l);w=j+s*b(l);if((j>d&&nd)){o+=m(d-n)*(o-k)/(n-j);n=d}if((j>u&&wu)){x-=m(u-w)*(x-k)/(w-j);w=u}return{x1:o,y1:n,x2:x,y2:w}},smooth:function(a,r){var q=this.path2curve(a),e=[q[0]],k=q[0][1],h=q[0][2],s,u,v=1,l=q.length,g=1,n=k,m=h,c=0,b=0,A,z,w,o,t,p,d;for(;v=b.x&&a<=(b.x+b.width)&&c>=b.y&&c<=(b.y+b.height))},parseGradient:function(k){var e=this,g=k.type||"linear",c=k.angle||0,i=e.radian,l=k.stops,a=[],j,b,h,d;if(g=="linear"){b=[0,0,Math.cos(c*i),Math.sin(c*i)];h=1/(Math.max(Math.abs(b[2]),Math.abs(b[3]))||1);b[2]*=h;b[3]*=h;if(b[2]<0){b[0]=-b[2];b[2]=0}if(b[3]<0){b[1]=-b[3];b[3]=0}}for(j in l){if(l.hasOwnProperty(j)&&e.stopsRE.test(j)){d={offset:parseInt(j,10),color:Ext.draw.Color.toHex(l[j].color)||"#ffffff",opacity:l[j].opacity||1};a.push(d)}}Ext.Array.sort(a,e.sorter);if(g=="linear"){return{id:k.id,type:g,vector:b,stops:a}}else{return{id:k.id,type:g,centerX:k.centerX,centerY:k.centerY,focalX:k.focalX,focalY:k.focalY,radius:k.radius,vector:b,stops:a}}}});Ext.define("Ext.fx.PropertyHandler",{requires:["Ext.draw.Draw"],statics:{defaultHandler:{pixelDefaultsRE:/width|height|top$|bottom$|left$|right$/i,unitRE:/^(-?\d*\.?\d*){1}(em|ex|px|in|cm|mm|pt|pc|%)*$/,scrollRE:/^scroll/i,computeDelta:function(j,c,a,g,i){a=(typeof a=="number")?a:1;var h=this.unitRE,d=h.exec(j),b,e;if(d){j=d[1];e=d[2];if(!this.scrollRE.test(i)&&!e&&this.pixelDefaultsRE.test(i)){e="px"}}j=+j||0;d=h.exec(c);if(d){c=d[1];e=d[2]||e}c=+c||0;b=(g!=null)?g:j;return{from:j,delta:(c-b)*a,units:e}},get:function(o,b,a,n,k){var m=o.length,d=[],e,h,l,c,g;for(e=0;e=d){l=d;a=true}if(i.reverse){l=d-l}for(e in k){if(k.hasOwnProperty(e)){j=k[e];h=a?1:c(l/d);g[e]=b[e].set(j,h)}}i.frameCount++;return g},lastFrame:function(){var c=this,a=c.iterations,b=c.currentIteration;b++;if(b0},isRunning:function(){return this.paused===false&&this.running===true&&this.isAnimator!==true}});Ext.enableFx=true;Ext.define("Ext.dd.DragDrop",{requires:["Ext.dd.DragDropManager"],constructor:function(c,a,b){if(c){this.init(c,a,b)}},id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true},moveOnly:false,unlock:function(){this.locked=false},isTarget:true,padding:null,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,b4StartDrag:function(a,b){},startDrag:function(a,b){},b4Drag:function(a){},onDrag:function(a){},onDragEnter:function(a,b){},b4DragOver:function(a){},onDragOver:function(a,b){},b4DragOut:function(a){},onDragOut:function(a,b){},b4DragDrop:function(a){},onDragDrop:function(a,b){},onInvalidDrop:function(a){},b4EndDrag:function(a){},endDrag:function(a){},b4MouseDown:function(a){},onMouseDown:function(a){},onMouseUp:function(a){},onAvailable:function(){},defaultPadding:{left:0,right:0,top:0,bottom:0},constrainTo:function(i,g,n){if(Ext.isNumber(g)){g={left:g,right:g,top:g,bottom:g}}g=g||this.defaultPadding;var k=Ext.get(this.getEl()).getBox(),a=Ext.get(i),m=a.getScroll(),j,d=a.dom,l,h,e;if(d==document.body){j={x:m.left,y:m.top,width:Ext.Element.getViewWidth(),height:Ext.Element.getViewHeight()}}else{l=a.getXY();j={x:l[0],y:l[1],width:d.clientWidth,height:d.clientHeight}}h=k.y-j.y;e=k.x-j.x;this.resetConstraints();this.setXConstraint(e-(g.left||0),j.width-e-k.width-(g.right||0),this.xTickSize);this.setYConstraint(h-(g.top||0),j.height-h-k.height-(g.bottom||0),this.yTickSize)},getEl:function(){if(!this._domRef){this._domRef=Ext.getDom(this.id)}return this._domRef},getDragEl:function(){return Ext.getDom(this.dragElId)},init:function(c,a,b){this.initTarget(c,a,b);Ext.EventManager.on(this.id,"mousedown",this.handleMouseDown,this)},initTarget:function(c,a,b){this.config=b||{};this.DDMInstance=Ext.dd.DragDropManager;this.groups={};if(typeof c!=="string"){c=Ext.id(c)}this.id=c;this.addToGroup((a)?a:"default");this.handleElId=c;this.setDragElId(c);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig();this.handleOnAvailable()},applyConfig:function(){this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false)},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable()},setPadding:function(c,a,d,b){if(!a&&0!==a){this.padding=[c,c,c,c]}else{if(!d&&0!==d){this.padding=[c,a,c,a]}else{this.padding=[c,a,d,b]}}},setInitPosition:function(d,c){var e=this.getEl(),b,a,g;if(!this.DDMInstance.verifyEl(e)){return}b=d||0;a=c||0;g=Ext.Element.getXY(e);this.initPageX=g[0]-b;this.initPageY=g[1]-a;this.lastPageX=g[0];this.lastPageY=g[1];this.setStartPosition(g)},setStartPosition:function(b){var a=b||Ext.Element.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=a[0];this.startPageY=a[1]},addToGroup:function(a){this.groups[a]=true;this.DDMInstance.regDragDrop(this,a)},removeFromGroup:function(a){if(this.groups[a]){delete this.groups[a]}this.DDMInstance.removeDDFromGroup(this,a)},setDragElId:function(a){this.dragElId=a},setHandleElId:function(a){if(typeof a!=="string"){a=Ext.id(a)}this.handleElId=a;this.DDMInstance.regHandle(this.id,a)},setOuterHandleElId:function(a){if(typeof a!=="string"){a=Ext.id(a)}Ext.EventManager.on(a,"mousedown",this.handleMouseDown,this);this.setHandleElId(a);this.hasOuterHandles=true},unreg:function(){Ext.EventManager.un(this.id,"mousedown",this.handleMouseDown,this);this._domRef=null;this.DDMInstance._remove(this)},destroy:function(){this.unreg()},isLocked:function(){return(this.DDMInstance.isLocked()||this.locked)},handleMouseDown:function(b,a){if(this.primaryButtonOnly&&b.button!=0){return}if(this.isLocked()){return}this.DDMInstance.refreshCache(this.groups);if(this.hasOuterHandles||this.DDMInstance.isOverTarget(b.getPoint(),this)){if(this.clickValidator(b)){this.setStartPosition();this.b4MouseDown(b);this.onMouseDown(b);this.DDMInstance.handleMouseDown(b,this);this.DDMInstance.stopEvent(b)}}},clickValidator:function(b){var a=b.getTarget();return(this.isValidHandleChild(a)&&(this.id==this.handleElId||this.DDMInstance.handleWasClicked(a,this.id)))},addInvalidHandleType:function(a){var b=a.toUpperCase();this.invalidHandleTypes[b]=b},addInvalidHandleId:function(a){if(typeof a!=="string"){a=Ext.id(a)}this.invalidHandleIds[a]=a},addInvalidHandleClass:function(a){this.invalidHandleClasses.push(a)},removeInvalidHandleType:function(a){var b=a.toUpperCase();delete this.invalidHandleTypes[b]},removeInvalidHandleId:function(a){if(typeof a!=="string"){a=Ext.id(a)}delete this.invalidHandleIds[a]},removeInvalidHandleClass:function(b){for(var c=0,a=this.invalidHandleClasses.length;c=this.minX;b=b-a){if(!c[b]){this.xTicks[this.xTicks.length]=b;c[b]=true}}for(b=this.initPageX;b<=this.maxX;b=b+a){if(!c[b]){this.xTicks[this.xTicks.length]=b;c[b]=true}}Ext.Array.sort(this.xTicks,this.DDMInstance.numericSort)},setYTicks:function(d,a){this.yTicks=[];this.yTickSize=a;var c={},b;for(b=this.initPageY;b>=this.minY;b=b-a){if(!c[b]){this.yTicks[this.yTicks.length]=b;c[b]=true}}for(b=this.initPageY;b<=this.maxY;b=b+a){if(!c[b]){this.yTicks[this.yTicks.length]=b;c[b]=true}}Ext.Array.sort(this.yTicks,this.DDMInstance.numericSort)},setXConstraint:function(c,b,a){this.leftConstraint=c;this.rightConstraint=b;this.minX=this.initPageX-c;this.maxX=this.initPageX+b;if(a){this.setXTicks(this.initPageX,a)}this.constrainX=true},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks()},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0},setYConstraint:function(a,c,b){this.topConstraint=a;this.bottomConstraint=c;this.minY=this.initPageY-a;this.maxY=this.initPageY+c;if(b){this.setYTicks(this.initPageY,b)}this.constrainY=true},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var b=(this.maintainOffset)?this.lastPageX-this.initPageX:0,a=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(b,a)}else{this.setInitPosition()}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize)}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize)}},getTick:function(h,d){if(!d){return h}else{if(d[0]>=h){return d[0]}else{var b,a,c,g,e;for(b=0,a=d.length;b=h){g=h-d[b];e=d[c]-h;return(e>g)?d[b]:d[c]}}return d[d.length-1]}}},toString:function(){return("DragDrop "+this.id)}});Ext.define("Ext.dd.DD",{extend:"Ext.dd.DragDrop",requires:["Ext.dd.DragDropManager"],constructor:function(c,a,b){if(c){this.init(c,a,b)}},scroll:true,autoOffset:function(c,b){var a=c-this.startPageX,d=b-this.startPageY;this.setDelta(a,d)},setDelta:function(b,a){this.deltaX=b;this.deltaY=a},setDragElPos:function(c,b){var a=this.getDragEl();this.alignElWithMouse(a,c,b)},alignElWithMouse:function(b,e,c){var g=this.getTargetCoord(e,c),d=b.dom?b:Ext.fly(b,"_dd"),l=d.getSize(),i=Ext.Element,j,a,k,h;if(!this.deltaSetXY){j=this.cachedViewportSize={width:i.getDocumentWidth(),height:i.getDocumentHeight()};a=[Math.max(0,Math.min(g.x,j.width-l.width)),Math.max(0,Math.min(g.y,j.height-l.height))];d.setXY(a);k=d.getLocalX();h=d.getLocalY();this.deltaSetXY=[k-g.x,h-g.y]}else{j=this.cachedViewportSize;d.setLeftTop(Math.max(0,Math.min(g.x+this.deltaSetXY[0],j.width-l.width)),Math.max(0,Math.min(g.y+this.deltaSetXY[1],j.height-l.height)))}this.cachePosition(g.x,g.y);this.autoScroll(g.x,g.y,b.offsetHeight,b.offsetWidth);return g},cachePosition:function(b,a){if(b){this.lastPageX=b;this.lastPageY=a}else{var c=Ext.Element.getXY(this.getEl());this.lastPageX=c[0];this.lastPageY=c[1]}},autoScroll:function(l,k,e,m){if(this.scroll){var n=Ext.Element.getViewHeight(),b=Ext.Element.getViewWidth(),p=this.DDMInstance.getScrollTop(),d=this.DDMInstance.getScrollLeft(),j=e+k,o=m+l,i=(n+p-k-this.deltaY),g=(b+d-l-this.deltaX),c=40,a=(document.all)?80:30;if(j>n&&i0&&k-pb&&g0&&l-dthis.maxX){a=this.maxX}}if(this.constrainY){if(dthis.maxY){d=this.maxY}}a=this.getTick(a,this.xTicks);d=this.getTick(d,this.yTicks);return{x:a,y:d}},applyConfig:function(){this.callParent();this.scroll=(this.config.scroll!==false)},b4MouseDown:function(a){this.autoOffset(a.getPageX(),a.getPageY())},b4Drag:function(a){this.setDragElPos(a.getPageX(),a.getPageY())},toString:function(){return("DD "+this.id)}});Ext.define("Ext.dd.DDProxy",{extend:"Ext.dd.DD",statics:{dragElId:"ygddfdiv"},constructor:function(c,a,b){if(c){this.init(c,a,b);this.initFrame()}},resizeFrame:true,centerFrame:false,createFrame:function(){var b=this,a=document.body,d,c;if(!a||!a.firstChild){setTimeout(function(){b.createFrame()},50);return}d=this.getDragEl();if(!d){d=document.createElement("div");d.id=this.dragElId;c=d.style;c.position="absolute";c.visibility="hidden";c.cursor="move";c.border="2px solid #aaa";c.zIndex=999;a.insertBefore(d,a.firstChild)}},initFrame:function(){this.createFrame()},applyConfig:function(){this.callParent();this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||Ext.dd.DDProxy.dragElId)},showFrame:function(e,d){var c=this.getEl(),a=this.getDragEl(),b=a.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(b.width,10)/2),Math.round(parseInt(b.height,10)/2))}this.setDragElPos(e,d);Ext.fly(a).show()},_resizeProxy:function(){if(this.resizeFrame){var a=this.getEl();Ext.fly(this.getDragEl()).setSize(a.offsetWidth,a.offsetHeight)}},b4MouseDown:function(b){var a=b.getPageX(),c=b.getPageY();this.autoOffset(a,c);this.setDragElPos(a,c)},b4StartDrag:function(a,b){this.showFrame(a,b)},b4EndDrag:function(a){Ext.fly(this.getDragEl()).hide()},endDrag:function(c){var b=this.getEl(),a=this.getDragEl();a.style.visibility="";this.beforeMove();b.style.visibility="hidden";Ext.dd.DDM.moveToEl(b,a);a.style.visibility="hidden";b.style.visibility="";this.afterDrag()},beforeMove:function(){},afterDrag:function(){},toString:function(){return("DDProxy "+this.id)}});Ext.define("Ext.dd.StatusProxy",{extend:"Ext.Component",animRepair:false,childEls:["ghost"],renderTpl:['
'],constructor:function(a){var b=this;a=a||{};Ext.apply(b,{hideMode:"visibility",hidden:true,floating:true,id:b.id||Ext.id(),cls:Ext.baseCSSPrefix+"dd-drag-proxy "+this.dropNotAllowed,shadow:a.shadow||false,renderTo:Ext.getDetachedBody()});b.callParent(arguments);this.dropStatus=this.dropNotAllowed},dropAllowed:Ext.baseCSSPrefix+"dd-drop-ok",dropNotAllowed:Ext.baseCSSPrefix+"dd-drop-nodrop",setStatus:function(a){a=a||this.dropNotAllowed;if(this.dropStatus!=a){this.el.replaceCls(this.dropStatus,a);this.dropStatus=a}},reset:function(b){var c=this,a=Ext.baseCSSPrefix+"dd-drag-proxy ";c.el.replaceCls(a+c.dropAllowed,a+c.dropNotAllowed);c.dropStatus=c.dropNotAllowed;if(b){c.ghost.update("")}},update:function(a){if(typeof a=="string"){this.ghost.update(a)}else{this.ghost.update("");a.style.margin="0";this.ghost.dom.appendChild(a)}var b=this.ghost.dom.firstChild;if(b){Ext.fly(b).setStyle("float","none")}},getGhost:function(){return this.ghost},hide:function(a){this.callParent();if(a){this.reset(true)}},stop:function(){if(this.anim&&this.anim.isAnimated&&this.anim.isAnimated()){this.anim.stop()}},sync:function(){this.el.sync()},repair:function(c,d,a){var b=this;b.callback=d;b.scope=a;if(c&&b.animRepair!==false){b.el.addCls(Ext.baseCSSPrefix+"dd-drag-repair");b.el.hideUnders(true);b.anim=b.el.animate({duration:b.repairDuration||500,easing:"ease-out",to:{x:c[0],y:c[1]},stopAnimation:true,callback:b.afterRepair,scope:b})}else{b.afterRepair()}},afterRepair:function(){var a=this;a.hide(true);a.el.removeCls(Ext.baseCSSPrefix+"dd-drag-repair");if(typeof a.callback=="function"){a.callback.call(a.scope||a)}delete a.callback;delete a.scope}});Ext.define("Ext.dd.DragSource",{extend:"Ext.dd.DDProxy",requires:["Ext.dd.StatusProxy","Ext.dd.DragDropManager"],dropAllowed:Ext.baseCSSPrefix+"dd-drop-ok",dropNotAllowed:Ext.baseCSSPrefix+"dd-drop-nodrop",animRepair:true,repairHighlightColor:"c3daf9",constructor:function(b,a){this.el=Ext.get(b);if(!this.dragData){this.dragData={}}Ext.apply(this,a);if(!this.proxy){this.proxy=new Ext.dd.StatusProxy({id:this.el.id+"-drag-status-proxy",animRepair:this.animRepair})}this.callParent([this.el.dom,this.ddGroup||this.group,{dragElId:this.proxy.id,resizeFrame:false,isTarget:false,scroll:this.scroll===true}]);this.dragging=false},getDragData:function(a){return this.dragData},onDragEnter:function(c,d){var b=Ext.dd.DragDropManager.getDDById(d),a;this.cachedTarget=b;if(this.beforeDragEnter(b,c,d)!==false){if(b.isNotifyTarget){a=b.notifyEnter(this,c,this.dragData);this.proxy.setStatus(a)}else{this.proxy.setStatus(this.dropAllowed)}if(this.afterDragEnter){this.afterDragEnter(b,c,d)}}},beforeDragEnter:function(b,a,c){return true},onDragOver:function(c,d){var b=this.cachedTarget||Ext.dd.DragDropManager.getDDById(d),a;if(this.beforeDragOver(b,c,d)!==false){if(b.isNotifyTarget){a=b.notifyOver(this,c,this.dragData);this.proxy.setStatus(a)}if(this.afterDragOver){this.afterDragOver(b,c,d)}}},beforeDragOver:function(b,a,c){return true},onDragOut:function(b,c){var a=this.cachedTarget||Ext.dd.DragDropManager.getDDById(c);if(this.beforeDragOut(a,b,c)!==false){if(a.isNotifyTarget){a.notifyOut(this,b,this.dragData)}this.proxy.reset();if(this.afterDragOut){this.afterDragOut(a,b,c)}}this.cachedTarget=null},beforeDragOut:function(b,a,c){return true},onDragDrop:function(b,c){var a=this.cachedTarget||Ext.dd.DragDropManager.getDDById(c);if(this.beforeDragDrop(a,b,c)!==false){if(a.isNotifyTarget){if(a.notifyDrop(this,b,this.dragData)!==false){this.onValidDrop(a,b,c)}else{this.onInvalidDrop(a,b,c)}}else{this.onValidDrop(a,b,c)}if(this.afterDragDrop){this.afterDragDrop(a,b,c)}}delete this.cachedTarget},beforeDragDrop:function(b,a,c){return true},onValidDrop:function(b,a,c){this.hideProxy();if(this.afterValidDrop){this.afterValidDrop(b,a,c)}},getRepairXY:function(b,a){return this.el.getXY()},onInvalidDrop:function(b,a,c){if(!a){a=b;b=null;c=a.getTarget().id}this.beforeInvalidDrop(b,a,c);if(this.cachedTarget){if(this.cachedTarget.isNotifyTarget){this.cachedTarget.notifyOut(this,a,this.dragData)}this.cacheTarget=null}this.proxy.repair(this.getRepairXY(a,this.dragData),this.afterRepair,this);if(this.afterInvalidDrop){this.afterInvalidDrop(a,c)}},afterRepair:function(){var a=this;if(Ext.enableFx){a.el.highlight(a.repairHighlightColor)}a.dragging=false},beforeInvalidDrop:function(b,a,c){return true},handleMouseDown:function(b){if(this.dragging){return}var a=this.getDragData(b);if(a&&this.onBeforeDrag(a,b)!==false){this.dragData=a;this.proxy.stop();this.callParent(arguments)}},onBeforeDrag:function(a,b){return true},onStartDrag:Ext.emptyFn,alignElWithMouse:function(){this.proxy.ensureAttachedToBody(true);return this.callParent(arguments)},startDrag:function(a,b){this.proxy.reset();this.proxy.hidden=false;this.dragging=true;this.proxy.update("");this.onInitDrag(a,b);this.proxy.show()},onInitDrag:function(a,c){var b=this.el.dom.cloneNode(true);b.id=Ext.id();this.proxy.update(b);this.onStartDrag(a,c);return true},getProxy:function(){return this.proxy},hideProxy:function(){this.proxy.hide();this.proxy.reset(true);this.dragging=false},triggerCacheRefresh:function(){Ext.dd.DDM.refreshCache(this.groups)},b4EndDrag:function(a){},endDrag:function(a){this.onEndDrag(this.dragData,a)},onEndDrag:function(a,b){},autoOffset:function(a,b){this.setDelta(-12,-20)},destroy:function(){this.callParent();Ext.destroy(this.proxy)}});Ext.define("Ext.panel.Proxy",{alternateClassName:"Ext.dd.PanelProxy",moveOnDrag:true,constructor:function(a,b){var c=this;c.panel=a;c.id=c.panel.id+"-ddproxy";Ext.apply(c,b)},insertProxy:true,setStatus:Ext.emptyFn,reset:Ext.emptyFn,update:Ext.emptyFn,stop:Ext.emptyFn,sync:Ext.emptyFn,getEl:function(){return this.ghost.el},getGhost:function(){return this.ghost},getProxy:function(){return this.proxy},hide:function(){var a=this;if(a.ghost){if(a.proxy){a.proxy.remove();delete a.proxy}a.panel.unghost(null,a.moveOnDrag);delete a.ghost}},show:function(){var b=this,a;if(!b.ghost){a=b.panel.getSize();b.panel.el.setVisibilityMode(Ext.Element.DISPLAY);b.ghost=b.panel.ghost();if(b.insertProxy){b.proxy=b.panel.el.insertSibling({cls:Ext.baseCSSPrefix+"panel-dd-spacer"});b.proxy.setSize(a)}}},repair:function(b,c,a){this.hide();Ext.callback(c,a||this)},moveProxy:function(a,b){if(this.proxy){a.insertBefore(this.proxy.dom,b)}}});Ext.define("Ext.panel.DD",{extend:"Ext.dd.DragSource",requires:["Ext.panel.Proxy"],constructor:function(b,a){var c=this;c.panel=b;c.dragData={panel:b};c.panelProxy=new Ext.panel.Proxy(b,a);c.proxy=c.panelProxy.proxy;c.callParent([b.el,a]);c.setupEl(b)},setupEl:function(a){var c=this,d=a.header,b=a.body;if(d){c.setHandleElId(d.id);b=d.el}if(b){b.setStyle("cursor","move");c.scroll=false}else{a.on("boxready",c.setupEl,c,{single:true})}},showFrame:Ext.emptyFn,startDrag:Ext.emptyFn,b4StartDrag:function(a,b){this.panelProxy.show()},b4MouseDown:function(b){var a=b.getPageX(),c=b.getPageY();this.autoOffset(a,c)},onInitDrag:function(a,b){this.onStartDrag(a,b);return true},createFrame:Ext.emptyFn,getDragEl:function(a){return this.panelProxy.ghost.el.dom},endDrag:function(a){this.panelProxy.hide();this.panel.saveState()},autoOffset:function(a,b){a-=this.startPageX;b-=this.startPageY;this.setDelta(a,b)},onInvalidDrop:function(c,b,d){var a=this;a.beforeInvalidDrop(c,b,d);if(a.cachedTarget){if(a.cachedTarget.isNotifyTarget){a.cachedTarget.notifyOut(a,b,a.dragData)}a.cacheTarget=null}if(a.afterInvalidDrop){a.afterInvalidDrop(b,d)}}});Ext.define("Ext.util.Memento",(function(){function d(i,h,j,g){i[g?g+j:j]=h[j]}function c(h,g,i){delete h[i]}function e(k,j,l,i){var g=i?i+l:l,h=k[g];if(h||k.hasOwnProperty(g)){a(j,l,h)}}function a(h,i,g){if(Ext.isDefined(g)){h[i]=g}else{delete h[i]}}function b(h,m,l,i,j){if(m){if(Ext.isArray(i)){var k,g=i.length;for(k=0;ka){if(j.anchorToTarget){j.defaultAlign="r-l";if(j.mouseOffset){j.mouseOffset[0]*=-1}}j.anchor="right";return j.getTargetXY()}if(b[1]i){if(j.anchorToTarget){j.defaultAlign="b-t";if(j.mouseOffset){j.mouseOffset[1]*=-1}}j.anchor="bottom";return j.getTargetXY()}}j.anchorCls=Ext.baseCSSPrefix+"tip-anchor-"+j.getAnchorPosition();j.anchorEl.addCls(j.anchorCls);j.targetCounter=0;return b}else{d=j.getMouseOffset();return(j.targetXY)?[j.targetXY[0]+d[0],j.targetXY[1]+d[1]]:d}},getMouseOffset:function(){var a=this,b=a.anchor?[0,0]:[15,18];if(a.mouseOffset){b[0]+=a.mouseOffset[0];b[1]+=a.mouseOffset[1]}return b},getAnchorPosition:function(){var b=this,a;if(b.anchor){b.tipAnchor=b.anchor.charAt(0)}else{a=b.defaultAlign.match(/^([a-z]+)-([a-z]+)(\?)?$/);b.tipAnchor=a[1].charAt(0)}switch(b.tipAnchor){case"t":return"top";case"b":return"bottom";case"r":return"right"}return"left"},getAnchorAlign:function(){switch(this.anchor){case"top":return"tl-bl";case"left":return"tl-tr";case"right":return"tr-tl";default:return"bl-tl"}},getOffsets:function(){var c=this,d,b,a=c.getAnchorPosition().charAt(0);if(c.anchorToTarget&&!c.trackMouse){switch(a){case"t":b=[0,9];break;case"b":b=[0,-13];break;case"r":b=[-13,0];break;default:b=[9,0];break}}else{switch(a){case"t":b=[-15-c.anchorOffset,30];break;case"b":b=[-19-c.anchorOffset,-13-c.el.dom.offsetHeight];break;case"r":b=[-15-c.el.dom.offsetWidth,-13-c.anchorOffset];break;default:b=[25,-13-c.anchorOffset];break}}d=c.getMouseOffset();b[0]+=d[0];b[1]+=d[1];return b},onTargetOver:function(c){var b=this,a;if(b.disabled||c.within(b.target.dom,true)){return}a=c.getTarget(b.delegate);if(a){b.triggerElement=a;b.clearTimer("hide");b.targetXY=c.getXY();b.delayShow()}},delayShow:function(){var a=this;if(a.hidden&&!a.showTimer){if(Ext.Date.getElapsed(a.lastActive)b){e=d[a];for(c in e){if(e[c]){e[c].hide(true)}}}}});Ext.define("Ext.layout.component.Draw",{alias:"layout.draw",extend:"Ext.layout.component.Auto",type:"draw",measureContentWidth:function(b){var c=b.target,a=b.getPaddingInfo(),d=this.getBBox(b);if(!c.viewBox){if(c.autoSize){return d.width+a.width}else{return d.x+d.width+a.width}}else{if(b.heightModel.shrinkWrap){return a.width}else{return d.width/d.height*(b.getProp("contentHeight")-a.height)+a.width}}},measureContentHeight:function(b){var c=b.target,a=b.getPaddingInfo(),d=this.getBBox(b);if(!b.target.viewBox){if(c.autoSize){return d.height+a.height}else{return d.y+d.height+a.height}}else{if(b.widthModel.shrinkWrap){return a.height}else{return d.height/d.width*(b.getProp("contentWidth")-a.width)+a.height}}},getBBox:function(a){var b=a.surfaceBBox;if(!b){b=a.target.surface.items.getBBox();if(b.width===-Infinity&&b.height===-Infinity){b.width=b.height=b.x=b.y=0}a.surfaceBBox=b}return b},publishInnerWidth:function(b,a){b.setContentWidth(a-b.getFrameInfo().width,true)},publishInnerHeight:function(b,a){b.setContentHeight(a-b.getFrameInfo().height,true)},finishedLayout:function(c){var b=c.props,a=c.getPaddingInfo();this.owner.setSurfaceSize(b.contentWidth-a.width,b.contentHeight-a.height);this.callParent(arguments)}});Ext.define("Ext.draw.CompositeSprite",{extend:"Ext.util.MixedCollection",mixins:{animate:"Ext.util.Animate"},autoDestroy:false,isCompositeSprite:true,constructor:function(a){var b=this;a=a||{};Ext.apply(b,a);b.addEvents("mousedown","mouseup","mouseover","mouseout","click");b.id=Ext.id(null,"ext-sprite-group-");b.callParent()},onClick:function(a){this.fireEvent("click",a)},onMouseUp:function(a){this.fireEvent("mouseup",a)},onMouseDown:function(a){this.fireEvent("mousedown",a)},onMouseOver:function(a){this.fireEvent("mouseover",a)},onMouseOut:function(a){this.fireEvent("mouseout",a)},attachEvents:function(b){var a=this;b.on({scope:a,mousedown:a.onMouseDown,mouseup:a.onMouseUp,mouseover:a.onMouseOver,mouseout:a.onMouseOut,click:a.onClick})},add:function(b,c){var a=this.callParent(arguments);this.attachEvents(a);return a},insert:function(a,b,c){return this.callParent(arguments)},remove:function(b){var a=this;b.un({scope:a,mousedown:a.onMouseDown,mouseup:a.onMouseUp,mouseover:a.onMouseOver,mouseout:a.onMouseOut,click:a.onClick});return a.callParent(arguments)},getBBox:function(){var e=0,n,j,k=this.items,g=this.length,h=Infinity,c=h,m=-h,b=h,l=-h,d,a;for(;e0){b=d.first();d.remove(b);a.remove(b,c)}}d.clearListeners()}});Ext.define("Ext.draw.Surface",{mixins:{observable:"Ext.util.Observable"},requires:["Ext.draw.CompositeSprite"],uses:["Ext.draw.engine.Svg","Ext.draw.engine.Vml","Ext.draw.engine.SvgExporter","Ext.draw.engine.ImageExporter"],separatorRe:/[, ]+/,statics:{create:function(b,d){d=d||["Svg","Vml"];var c=0,a=d.length,e;for(;c1,h,b,c,e,k;if(a||Ext.isArray(g[0])){h=a?g:g[0];b=[];for(c=0,e=h.length;ch){b=i-1}else{if(a-1;b--){this.remove(a[b],d)}},onRemove:Ext.emptyFn,onDestroy:Ext.emptyFn,applyViewBox:function(){var d=this,l=d.viewBox,a=d.width||1,h=d.height||1,g,e,j,b,i,c,k;if(l&&(a||h)){g=l.x;e=l.y;j=l.width;b=l.height;i=h/b;c=a/j;k=Math.min(c,i);if(j*k0.85){e=e.getDarker(0.3)}else{if(h>0.7){e=e.getDarker(0.15)}}}}c.colors=[e.getDarker(0.3).toString(),e.getDarker(0.15).toString(),e.toString(),e.getLighter(0.15).toString(),e.getLighter(0.3).toString()];delete c.baseColor}if(c.colors){a=c.colors.slice();s=b.markerThemes;r=b.seriesThemes;j=a.length;b.colors=a;for(;m0?s:s+m,y:k>0?r:r+k,width:j(m),height:j(k)};u.mask.updateBox(u.maskSelection);u.mask.show();u.maskSprite.setAttributes({hidden:true},true)}else{if(o=="horizontal"){l=["M",s,h,"L",s,k]}else{if(o=="vertical"){l=["M",i,r,"L",m,r]}else{l=["M",s,h,"L",s,k,"M",i,r,"L",m,r]}}u.maskSprite.setAttributes({path:l,fill:u.maskMouseDown?u.maskSprite.stroke:false,"stroke-width":o===true?1:3,hidden:false},true)}},onMouseLeave:function(b){var a=this;a.mouseMoved=false;a.mouseDown=false;a.maskMouseDown=false;a.mask.hide();a.maskSprite.hide(true)}});Ext.define("Ext.chart.Navigation",{constructor:function(){this.originalStore=this.store},setZoom:function(k){var j=this,g=j.axes,a=g.items,e,h,c,p=j.chartBBox,o=1/p.width,b=1/p.height,d={x:k.x*o,y:k.y*b,width:k.width*o,height:k.height*b},l,n,m;for(e=0,h=a.length;e0.5?0.2:0.8;F.setAttributes({fill:String(m.fromHSL.apply({},B))},true)}}E++;y++}}l=q.length;while(l>c){K.push(c);c++}}o.hideLabels(K)},hideLabels:function(b){var a=this.labelsGroup,c=!!b&&b.length;if(!a){return}if(c===false){c=a.getCount();while(c--){a.getAt(c).hide(true)}}else{while(c--){a.getAt(b[c]).hide(true)}}}});Ext.define("Ext.chart.TipSurface",{extend:"Ext.draw.Component",spriteArray:false,renderFirst:true,constructor:function(a){this.callParent([a]);if(a.sprites){this.spriteArray=[].concat(a.sprites);delete a.sprites}},onRender:function(){var c=this,b=0,a=0,d,e;this.callParent(arguments);e=c.spriteArray;if(c.renderFirst&&e){c.renderFirst=false;for(a=e.length;bs){u=s}if(y0){u=0}if(y=y){y=u+1}return{min:u,max:y}},calcEnds:function(){var h=this,d=h.getRange(),g=d.min,a=d.max,c,i,e,b;c=(Ext.isNumber(h.majorTickSteps)?h.majorTickSteps+1:h.steps);i=!(Ext.isNumber(h.maximum)&&Ext.isNumber(h.minimum)&&Ext.isNumber(h.majorTickSteps)&&h.majorTickSteps>0);e=Ext.draw.Draw.snapEnds(g,a,c,i);if(Ext.isNumber(h.maximum)){e.to=h.maximum;b=true}if(Ext.isNumber(h.minimum)){e.from=h.minimum;b=true}if(h.adjustMaximumByMajorUnit){e.to=Math.ceil(e.to/e.step)*e.step;b=true}if(h.adjustMinimumByMajorUnit){e.from=Math.floor(e.from/e.step)*e.step;b=true}if(b){e.steps=Math.ceil((e.to-e.from)/e.step)}h.prevMin=(g==a?0:g);h.prevMax=a;return e},drawAxis:function(r){var C=this,s,j=C.x,h=C.y,A=C.chart.maxGutter[0],z=C.chart.maxGutter[1],e=C.dashSize,w=C.minorTickSteps||0,v=C.minorTickSteps||0,b=C.length,D=C.position,g=[],m=false,c=C.applyData(),d=c.step,t=c.steps,q=c.from,a=c.to,u,p,o,n,l,k,B;if(C.hidden||isNaN(d)||(q>a)){return}C.from=c.from;C.to=c.to;if(D=="left"||D=="right"){p=Math.floor(j)+0.5;n=["M",p,h,"l",0,-b];u=b-(z*2)}else{o=Math.floor(h)+0.5;n=["M",j,o,"l",b,0];u=b-(A*2)}B=t&&u/t;l=Math.max(w+1,0);k=Math.max(v+1,0);if(C.type=="Numeric"||C.type=="Time"){m=true;C.labels=[c.from]}if(D=="right"||D=="left"){o=h-z;p=j-((D=="left")*e*2);while(o>=h-z-u){n.push("M",p,Math.floor(o)+0.5,"l",e*2+1,0);if(o!=h-z){for(s=1;s=0){if(!this.sprites){for(e=0;e<=l;e++){n=a.add({type:"path",path:["M",d+(m-c)*o(e/l*g-g),b+(m-c)*k(e/l*g-g),"L",d+m*o(e/l*g-g),b+m*k(e/l*g-g),"Z"],stroke:"#ccc"});n.setAttributes({hidden:false},true);h.push(n)}}else{h=this.sprites;for(e=0;e<=l;e++){h[e].setAttributes({path:["M",d+(m-c)*o(e/l*g-g),b+(m-c)*k(e/l*g-g),"L",d+m*o(e/l*g-g),b+m*k(e/l*g-g),"Z"],stroke:"#ccc"},true)}}}this.sprites=h;this.drawLabel();if(this.title){this.drawTitle()}},drawTitle:function(){var e=this,d=e.chart,a=d.surface,g=d.chartBBox,c=e.titleSprite,b;if(!c){e.titleSprite=c=a.add({type:"text",zIndex:2})}c.setAttributes(Ext.apply({text:e.title},e.label||{}),true);b=c.getBBox();c.setAttributes({x:g.x+(g.width/2)-(b.width/2),y:g.y+g.height-(b.height/2)-4},true)},setTitle:function(a){this.title=a;this.drawTitle()},drawLabel:function(){var l=this.chart,p=l.surface,b=l.chartBBox,j=b.x+(b.width/2),h=b.y+b.height,m=this.margin||10,d=Math.min(b.width,2*b.height)/2+2*m,u=Math.round,n=[],g,s=this.maximum||0,k=this.minimum||0,r=this.steps,q=0,v,t=Math.PI,c=Math.cos,a=Math.sin,e=this.label,o=e.renderer||function(i){return i};if(!this.labelArray){for(q=0;q<=r;q++){v=(q===0||q===r)?7:0;g=p.add({type:"text",text:o(u(k+q/r*(s-k))),x:j+d*c(q/r*t-t),y:h+d*a(q/r*t-t)-v,"text-anchor":"middle","stroke-width":0.2,zIndex:10,stroke:"#333"});g.setAttributes({hidden:false},true);n.push(g)}}else{n=this.labelArray;for(q=0;q<=r;q++){v=(q===0||q===r)?7:0;n[q].setAttributes({text:o(u(k+q/r*(s-k))),x:j+d*c(q/r*t-t),y:h+d*a(q/r*t-t)-v},true)}}this.labelArray=n}});Ext.define("Ext.chart.axis.Numeric",{extend:"Ext.chart.axis.Axis",alternateClassName:"Ext.chart.NumericAxis",type:"numeric",alias:"axis.numeric",uses:["Ext.data.Store"],constructor:function(c){var d=this,a=!!(c.label&&c.label.renderer),b;d.callParent([c]);b=d.label;if(c.constrain==null){d.constrain=(c.minimum!=null&&c.maximum!=null)}if(!a){b.renderer=function(e){return d.roundToDecimal(e,d.decimals)}}},roundToDecimal:function(a,c){var b=Math.pow(10,c||0);return Math.round(a*b)/b},minimum:NaN,maximum:NaN,constrain:true,decimals:2,scale:"linear",doConstrain:function(){var t=this,b=t.chart.store,h=b.data.items,s,u,a,e=t.chart.series.items,j=t.fields,c=j.length,g=t.calcEnds(),m=g.from,p=g.to,q,n,r=false,k,v=[],o;for(q=0,n=e.length;q+p){o=false;break}}if(o){v.push(a)}}t.chart.substore=Ext.create("Ext.data.Store",{model:b.model});t.chart.substore.loadData(v)},position:"left",adjustMaximumByMajorUnit:false,adjustMinimumByMajorUnit:false,processView:function(){var a=this,b=a.constrain;if(b){a.doConstrain()}},applyData:function(){this.callParent();return this.calcEnds()}});Ext.define("Ext.chart.axis.Radial",{extend:"Ext.chart.axis.Abstract",position:"radial",alias:"axis.radial",drawAxis:function(u){var m=this.chart,a=m.surface,t=m.chartBBox,q=m.store,b=q.getCount(),e=t.x+(t.width/2),c=t.y+(t.height/2),p=Math.min(t.width,t.height)/2,k=[],r,o=this.steps,g,d,h=Math.PI*2,s=Math.cos,n=Math.sin;if(this.sprites&&!m.resizing){this.drawLabel();return}if(!this.sprites){for(g=1;g<=o;g++){r=a.add({type:"circle",x:e,y:c,radius:Math.max(p*g/o,0),stroke:"#ccc"});r.setAttributes({hidden:false},true);k.push(r)}for(g=0;g>0),e)}}}},processView:function(){var a=this;if(a.fromDate){a.minimum=+a.fromDate}if(a.toDate){a.maximum=+a.toDate}if(a.constrain){a.doConstrain()}},calcEnds:function(){var c=this,a,b=c.step;if(b){a=c.getRange();a=Ext.draw.Draw.snapEndsByDateAndStep(new Date(a.min),new Date(a.max),Ext.isNumber(b)?[Date.MILLI,b]:b);if(c.minimum){a.from=c.minimum}if(c.maximum){a.to=c.maximum}a.step=(a.to-a.from)/a.steps;return a}else{return c.callParent(arguments)}}});Ext.define("Ext.chart.series.Series",{mixins:{observable:"Ext.util.Observable",labels:"Ext.chart.Label",highlights:"Ext.chart.Highlight",tips:"Ext.chart.Tip",callouts:"Ext.chart.Callout"},type:null,title:null,showInLegend:true,renderer:function(e,a,c,d,b){return c},shadowAttributes:null,animating:false,constructor:function(a){var b=this;if(a){Ext.apply(b,a)}b.shadowGroups=[];b.mixins.labels.constructor.call(b,a);b.mixins.highlights.constructor.call(b,a);b.mixins.tips.constructor.call(b,a);b.mixins.callouts.constructor.call(b,a);b.addEvents({scope:b,itemmouseover:true,itemmouseout:true,itemmousedown:true,itemmouseup:true,mouseleave:true,afterdraw:true,titlechange:true});b.mixins.observable.constructor.call(b,a);b.on({scope:b,itemmouseover:b.onItemMouseOver,itemmouseout:b.onItemMouseOut,mouseleave:b.onMouseLeave});if(b.style){Ext.apply(b.seriesStyle,b.style)}},eachRecord:function(c,b){var a=this.chart;(a.substore||a.store).each(c,b)},getRecordCount:function(){var b=this.chart,a=b.substore||b.store;return a?a.getCount():0},isExcluded:function(a){var b=this.__excludes;return !!(b&&b[a])},setBBox:function(a){var e=this,c=e.chart,b=c.chartBBox,g=a?0:c.maxGutter[0],d=a?0:c.maxGutter[1],h,i;h={x:b.x,y:b.y,width:b.width,height:b.height};e.clipBox=h;i={x:(h.x+g)-(c.zoom.x*c.zoom.width),y:(h.y+d)-(c.zoom.y*c.zoom.height),width:(h.width-(g*2))*c.zoom.width,height:(h.height-(d*2))*c.zoom.height};e.bbox=i},onAnimate:function(b,a){var c=this;b.stopAnimation();if(c.animating){return b.animate(Ext.applyIf(a,c.chart.animate))}else{c.animating=true;return b.animate(Ext.apply(Ext.applyIf(a,c.chart.animate),{listeners:{afteranimate:function(){c.animating=false;c.fireEvent("afterrender")}}}))}},getGutters:function(){return[0,0]},onItemMouseOver:function(b){var a=this;if(b.series===a){if(a.highlight){a.highlightItem(b)}if(a.tooltip){a.showTip(b)}}},onItemMouseOut:function(b){var a=this;if(b.series===a){a.unHighlightItem();if(a.tooltip){a.hideTip(b)}}},onMouseLeave:function(){var a=this;a.unHighlightItem();if(a.tooltip){a.hideTip()}},getItemForPoint:function(a,j){if(!this.items||!this.items.length||this.seriesIsHidden){return null}var g=this,b=g.items,h=g.bbox,e,c,d;if(!Ext.draw.Draw.withinBox(a,j,h)){return null}for(c=0,d=b.length;c0){c=Infinity;l=-c;for(e=0,h=d.length;el){l=b}if(bl){l=r}if(r0){b=Infinity;l=-b;for(d=0,h=c.length;dl){l=n}if(m-1){b="top"}else{if(Ext.Array.indexOf(d,"bottom")>-1){b="bottom"}else{if(l.get("top")&&l.get("bottom")){for(h=0,k=o.length;h-1){a="left"}else{if(Ext.Array.indexOf(d,"right")>-1){a="right"}else{if(l.get("left")&&l.get("right")){for(h=0,k=e.length;hk.width)&&j.areas){H=j.shrink(z,D,k.width);z=H.x;D=H.y}return{bbox:k,minX:C,minY:B,xValues:z,yValues:D,xScale:h,yScale:E,areasLen:A}},getPaths:function(){var w=this,m=w.chart,c=m.getChartStore(),e=true,g=w.getBounds(),a=g.bbox,n=w.items=[],v=[],b,d=0,p=[],s,j,k,h,q,t,l,z,r,u,o;j=g.xValues.length;for(s=0;sa.x+a.width)?(j-(j+n-a.x-a.width)):j;h=h-ma.y+a.height)?(h-(h+m-a.y-a.height)):h;if(u.chart.animate&&!u.chart.resizing){g.show(true);u.onAnimate(g,{to:{x:j,y:h}})}else{g.setAttributes({x:j,y:h},true);if(r){u.animation.on("afteranimate",function(){g.show(true)})}else{g.show(true)}}},onPlaceCallout:function(m,r,J,G,F,d,k){var M=this,s=M.chart,D=s.surface,H=s.resizing,L=M.callouts,t=M.items,v=(G==0)?false:t[G-1].point,z=(G==t.length-1)?false:t[G+1].point,c=J.point,A,g,N,K,o,q,b=m.label.getBBox(),I=30,C=10,B=3,h,e,j,w,u,E=M.clipRect,n,l;if(!v){v=c}if(!z){z=c}K=(z[1]-v[1])/(z[0]-v[0]);o=(c[1]-v[1])/(c[0]-v[0]);q=(z[1]-c[1])/(z[0]-c[0]);g=Math.sqrt(1+K*K);A=[1/g,K/g];N=[-A[1],A[0]];if(o>0&&q<0&&N[1]<0||o<0&&q>0&&N[1]>0){N[0]*=-1;N[1]*=-1}else{if(Math.abs(o)Math.abs(q)&&N[0]>0){N[0]*=-1;N[1]*=-1}}n=c[0]+N[0]*I;l=c[1]+N[1]*I;h=n+(N[0]>0?0:-(b.width+2*B));e=l-b.height/2-B;j=b.width+2*B;w=b.height+2*B;if(h(E[0]+E[2])){N[0]*=-1}if(e(E[1]+E[3])){N[1]*=-1}n=c[0]+N[0]*I;l=c[1]+N[1]*I;h=n+(N[0]>0?0:-(b.width+2*B));e=l-b.height/2-B;j=b.width+2*B;w=b.height+2*B;m.lines.setAttributes({path:["M",c[0],c[1],"L",n,l,"Z"]},true);m.box.setAttributes({x:h,y:e,width:j,height:w},true);m.label.setAttributes({x:n+(N[0]>0?B:-(b.width+B)),y:l},true);for(u in m){m[u].show(true)}},isItemInPoint:function(j,h,m,c){var g=this,b=m.pointsUp,d=m.pointsDown,q=Math.abs,o=false,l=false,e=Infinity,a,n,k;for(a=0,n=b.length;aq(j-k[0])){e=q(j-k[0]);o=true;if(l){++a}}if(!o||(o&&l)){k=b[a-1];if(h>=k[1]&&(!d.length||h<=(d[a-1][1]))){m.storeIndex=a-1;m.storeField=g.yField[c];m.storeItem=g.chart.store.getAt(a-1);m._points=d.length?[k,d[a-1]]:[k];return true}else{break}}}return false},highlightSeries:function(){var a,c,b;if(this._index!==undefined){a=this.areas[this._index];if(a.__highlightAnim){a.__highlightAnim.paused=true}a.__highlighted=true;a.__prevOpacity=a.__prevOpacity||a.attr.opacity||1;a.__prevFill=a.__prevFill||a.attr.fill;a.__prevLineWidth=a.__prevLineWidth||a.attr.lineWidth;b=Ext.draw.Color.fromString(a.__prevFill);c={lineWidth:(a.__prevLineWidth||0)+2};if(b){c.fill=b.getLighter(0.2).toString()}else{c.opacity=Math.max(a.__prevOpacity-0.3,0)}if(this.chart.animate){a.__highlightAnim=new Ext.fx.Anim(Ext.apply({target:a,to:c},this.chart.animate))}else{a.setAttributes(c,true)}}},unHighlightSeries:function(){var a;if(this._index!==undefined){a=this.areas[this._index];if(a.__highlightAnim){a.__highlightAnim.paused=true}if(a.__highlighted){a.__highlighted=false;a.__highlightAnim=new Ext.fx.Anim({target:a,to:{fill:a.__prevFill,opacity:a.__prevOpacity,lineWidth:a.__prevLineWidth}})}}},highlightItem:function(c){var b=this,a,d;if(!c){this.highlightSeries();return}a=c._points;d=a.length==2?["M",a[0][0],a[0][1],"L",a[1][0],a[1][1]]:["M",a[0][0],a[0][1],"L",a[0][0],b.bbox.y+b.bbox.height];b.highlightSprite.setAttributes({path:d,hidden:false},true)},unHighlightItem:function(a){if(!a){this.unHighlightSeries()}if(this.highlightSprite){this.highlightSprite.hide(true)}},hideAll:function(a){var b=this;a=(isNaN(b._index)?a:b._index)||0;b.__excludes[a]=true;b.areas[a].hide(true);b.redraw()},showAll:function(a){var b=this;a=(isNaN(b._index)?a:b._index)||0;b.__excludes[a]=false;b.areas[a].show(true);b.redraw()},redraw:function(){var a=this,b;b=a.chart.legend.rebuild;a.chart.legend.rebuild=false;a.chart.redraw();a.chart.legend.rebuild=b},hide:function(){if(this.areas){var h=this,b=h.areas,d,c,a,g,e;if(b&&b.length){for(d=0,g=b.length;d0)][M]+=n(I)}}w[+(r>0)].push(n(r));w[+(F>0)].push(n(F));g=k.apply(u,w[0]);d=k.apply(u,w[1]);z=(H?q.height-m*2:q.width-h*2)/(d+g);a=a+g*z*(H?-1:1)}else{if(F/r<0){a=a-F*z*(H?-1:1)}}return{bars:v,bbox:q,shrunkBarWidth:C,barsLen:p,groupBarsLen:l,barWidth:t,groupBarWidth:e,scale:z,zero:a,xPadding:h,yPadding:m,signed:F/r<0,minY:F,maxY:r}},getPaths:function(){var v=this,X=v.chart,b=X.getChartStore(),W=b.data.items,V,E,L,G=v.bounds=v.getBounds(),z=v.items=[],P=v.yField,l=v.gutter/100,c=v.groupGutter/100,T=X.animate,N=v.column,x=v.group,m=X.shadow,R=v.shadowGroups,Q=v.shadowAttributes,q=R.length,y=G.bbox,B=G.barWidth,K=G.shrunkBarWidth,n=v.xPadding,r=v.yPadding,S=v.stacked,w=G.barsLen,O=v.colorArrayStyle,h=O&&O.length||0,C=Math,o=C.max,I=C.min,u=C.abs,U,Y,e,J,D,a,k,t,s,p,g,d,F,A,M,H;for(V=0,E=W.length;V1?U:0)%h]};if(N){Ext.apply(s,{height:e,width:o(G.groupBarWidth,0),x:(y.x+n+(B-K)*0.5+V*B*(1+l)+g*G.groupBarWidth*(1+c)*!S),y:a-e})}else{M=(E-1)-V;Ext.apply(s,{height:o(G.groupBarWidth,0),width:e+(a==G.zero),x:a+(a!=G.zero),y:(y.y+r+(B-K)*0.5+M*B*(1+l)+g*G.groupBarWidth*(1+c)*!S+1)})}if(e<0){if(N){s.y=k;s.height=u(e)}else{s.x=k+e;s.width=u(e)}}if(S){if(e<0){k+=e*(N?-1:1)}else{a+=e*(N?-1:1)}J+=u(e);if(e<0){D+=u(e)}}s.x=Math.floor(s.x)+1;H=Math.floor(s.y);if(!Ext.isIE9&&s.y>H){H--}s.y=H;s.width=Math.floor(s.width);s.height=Math.floor(s.height);z.push({series:v,yField:P[U],storeItem:L,value:[L.get(v.xField),Y],attr:s,point:N?[s.x+s.width/2,Y>=0?s.y:s.y+s.height]:[Y>=0?s.x+s.width:s.x,s.y+s.height/2]});if(T&&X.resizing){p=N?{x:s.x,y:G.zero,width:s.width,height:0}:{x:G.zero,y:s.y,width:0,height:s.height};if(m&&(S&&!t||!S)){t=true;for(d=0;d(O>=0?b-u.y:u.y+u.height-b)){p=M}}else{if(c+C>l.height){p=k;G.isOutside=true}}D=l.x+d/2;B=p==q?(b+((c/2+3)*(O>=0?-1:1))):(O>=0?(l.y+((c/2+3)*(p==k?-1:1))):(l.y+l.height+((c/2+3)*(p===k?1:-1))))}else{if(p==k){if(a+E+l.width>(O>=0?u.x+u.width-b:b-u.x)){p=M}}else{if(a+E>l.width){p=k;G.isOutside=true}}D=p==q?(b+((a/2+5)*(O>=0?1:-1))):(O>=0?(l.x+l.width+((a/2+5)*(p===k?1:-1))):(l.x+((a/2+5)*(p===k?-1:1))));B=l.y+d/2}w={x:D,y:B};if(K){w.rotate={x:D,y:B,degrees:270}}if(H&&A){if(F){D=l.x+l.width/2;B=b}else{D=b;B=l.y+l.height/2}G.setAttributes({x:D,y:B},true);if(K){G.setAttributes({rotate:{x:D,y:B,degrees:270}},true)}}if(H){m.onAnimate(G,{to:w})}else{G.setAttributes(Ext.apply(w,{hidden:false}),true)}},getLabelSize:function(g){var k=this.testerLabel,a=this.label,d=Ext.apply({},a,this.seriesLabelStyle||{}),b=a.orientation==="vertical",j,i,e,c;if(!k){k=this.testerLabel=this.chart.surface.add(Ext.apply({type:"text",opacity:0},d))}k.setAttributes({text:g},true);j=k.getBBox();i=j.width;e=j.height;return{width:b?e:i,height:b?i:e}},onAnimate:function(b,a){b.show();return this.callParent(arguments)},isItemInPoint:function(a,d,b){var c=b.sprite.getBBox();return c.x<=a&&c.y<=d&&(c.x+c.width)>=a&&(c.y+c.height)>=d},hideAll:function(a){var e=this.chart.axes,c=e.items,d=c.length,b=0;a=(isNaN(this._index)?a:this._index)||0;if(!this.__excludes){this.__excludes=[]}this.__excludes[a]=true;this.drawSeries();for(b;b180,D=Math.min(q,p)*B,A=Math.max(q,p)*B,o=false;k+=l*d(j);i+=l*a(j);w=k+b.startRho*d(D);h=i+b.startRho*a(D);v=k+b.endRho*d(D);g=i+b.endRho*a(D);u=k+b.startRho*d(A);e=i+b.startRho*a(A);s=k+b.endRho*d(A);c=i+b.endRho*a(A);if(n(w-u)<=z&&n(h-e)<=z){o=true}if(o){return{path:[["M",w,h],["L",v,g],["A",b.endRho,b.endRho,0,+t,1,s,c],["Z"]]}}else{return{path:[["M",w,h],["L",v,g],["A",b.endRho,b.endRho,0,+t,1,s,c],["L",u,e],["A",b.startRho,b.startRho,0,+t,0,w,h],["Z"]]}}},calcMiddle:function(p){var k=this,l=k.rad,o=p.slice,n=k.centerX,m=k.centerY,j=o.startAngle,e=o.endAngle,i=Math.max(("rho" in o)?o.rho:k.radius,k.label.minMargin),h=+k.donut,b=Math.min(j,e)*l,a=Math.max(j,e)*l,d=-(b+(a-b)/2),g=n+(p.endRho+p.startRho)/2*Math.cos(d),c=m-(p.endRho+p.startRho)/2*Math.sin(d);p.middle={x:g,y:c}},drawSeries:function(){var w=this,W=w.chart,b=W.getChartStore(),A=w.group,S=w.chart.animate,D=w.chart.axes.get(0),E=D&&D.minimum||w.minimum||0,I=D&&D.maximum||w.maximum||0,n=w.angleField||w.field||w.xField,M=W.surface,H=W.chartBBox,h=w.rad,c=+w.donut,X={},B=[],m=w.seriesStyle,a=w.seriesLabelStyle,g=w.colorArrayStyle,z=g&&g.length||0,K=W.maxGutter[0],J=W.maxGutter[1],k=Math.cos,s=Math.sin,t,e,d,v,r,C,O,F,G,L,U,T,l,V,x,o,Q,R,q,y,u,P,N;Ext.apply(m,w.style||{});w.setBBox();y=w.bbox;if(w.colorSet){g=w.colorSet;z=g.length}if(!b||!b.getCount()||w.seriesIsHidden){w.hide();w.items=[];return}e=w.centerX=H.x+(H.width/2);d=w.centerY=H.y+H.height;w.radius=Math.min(e-H.x,d-H.y);w.slices=r=[];w.items=B=[];if(!w.value){L=b.getAt(0);w.value=L.get(n)}O=w.value;if(w.needle){P={series:w,value:O,startAngle:-180,endAngle:0,rho:w.radius};u=-180*(1-(O-E)/(I-E));r.push(P)}else{u=-180*(1-(O-E)/(I-E));P={series:w,value:O,startAngle:-180,endAngle:u,rho:w.radius};N={series:w,value:w.maximum-O,startAngle:u,endAngle:0,rho:w.radius};r.push(P,N)}for(U=0,G=r.length;U=g&&b=n.startRho&&k<=n.endRho)},showAll:function(){if(!isNaN(this._index)){this.__excludes[this._index]=false;this.drawSeries()}},getLegendColor:function(a){var b=this;return b.colorArrayStyle[a%b.colorArrayStyle.length]}});Ext.define("Ext.chart.series.Line",{extend:"Ext.chart.series.Cartesian",alternateClassName:["Ext.chart.LineSeries","Ext.chart.LineChart"],requires:["Ext.chart.axis.Axis","Ext.chart.Shape","Ext.draw.Draw","Ext.fx.Anim"],type:"line",alias:"series.line",selectionTolerance:20,showMarkers:true,markerConfig:{},style:{},smooth:false,defaultSmoothness:3,fill:false,constructor:function(c){this.callParent(arguments);var e=this,a=e.chart.surface,g=e.chart.shadow,d,b;c.highlightCfg=Ext.Object.merge({"stroke-width":3},c.highlightCfg);Ext.apply(e,c,{shadowAttributes:[{"stroke-width":6,"stroke-opacity":0.05,stroke:"rgb(0, 0, 0)",translate:{x:1,y:1}},{"stroke-width":4,"stroke-opacity":0.1,stroke:"rgb(0, 0, 0)",translate:{x:1,y:1}},{"stroke-width":2,"stroke-opacity":0.15,stroke:"rgb(0, 0, 0)",translate:{x:1,y:1}}]});e.group=a.getGroup(e.seriesId);if(e.showMarkers){e.markerGroup=a.getGroup(e.seriesId+"-markers")}if(g){for(d=0,b=e.shadowAttributes.length;dau.width){a=an.shrink(aB,ae,au.width);aB=a.x;ae=a.y}an.items=[];l=0;az=aB.length;for(Q=0;Qa.x+a.width)?(j-(j+n-a.x-a.width)):j;h=(h-ma.x+a.width)?(j-(j+n-a.x-a.width)):j;h=h-ma.y+a.height)?(h-(h+m-a.y-a.height)):h}}if(u.chart.animate&&!u.chart.resizing){g.show(true);u.onAnimate(g,{to:{x:j,y:h}})}else{g.setAttributes({x:j,y:h},true);if(r&&u.animation){u.animation.on("afteranimate",function(){g.show(true)})}else{g.show(true)}}},highlightItem:function(){var a=this;a.callParent(arguments);if(a.line&&!a.highlighted){if(!("__strokeWidth" in a.line)){a.line.__strokeWidth=parseFloat(a.line.attr["stroke-width"])||0}if(a.line.__anim){a.line.__anim.paused=true}a.line.__anim=Ext.create("Ext.fx.Anim",{target:a.line,to:{"stroke-width":a.line.__strokeWidth+3}});a.highlighted=true}},unHighlightItem:function(){var a=this;a.callParent(arguments);if(a.line&&a.highlighted){a.line.__anim=Ext.create("Ext.fx.Anim",{target:a.line,to:{"stroke-width":a.line.__strokeWidth}});a.highlighted=false}},onPlaceCallout:function(m,r,J,G,F,d,k){if(!F){return}var M=this,s=M.chart,D=s.surface,H=s.resizing,L=M.callouts,t=M.items,v=G==0?false:t[G-1].point,z=(G==t.length-1)?false:t[G+1].point,c=[+J.point[0],+J.point[1]],A,g,N,K,o,q,I=L.offsetFromViz||30,C=L.offsetToSide||10,B=L.offsetBox||3,h,e,j,w,u,E=M.clipRect,b={width:L.styles.width||10,height:L.styles.height||10},n,l;if(!v){v=c}if(!z){z=c}K=(z[1]-v[1])/(z[0]-v[0]);o=(c[1]-v[1])/(c[0]-v[0]);q=(z[1]-c[1])/(z[0]-c[0]);g=Math.sqrt(1+K*K);A=[1/g,K/g];N=[-A[1],A[0]];if(o>0&&q<0&&N[1]<0||o<0&&q>0&&N[1]>0){N[0]*=-1;N[1]*=-1}else{if(Math.abs(o)Math.abs(q)&&N[0]>0){N[0]*=-1;N[1]*=-1}}n=c[0]+N[0]*I;l=c[1]+N[1]*I;h=n+(N[0]>0?0:-(b.width+2*B));e=l-b.height/2-B;j=b.width+2*B;w=b.height+2*B;if(h(E[0]+E[2])){N[0]*=-1}if(e(E[1]+E[3])){N[1]*=-1}n=c[0]+N[0]*I;l=c[1]+N[1]*I;h=n+(N[0]>0?0:-(b.width+2*B));e=l-b.height/2-B;j=b.width+2*B;w=b.height+2*B;if(s.animate){M.onAnimate(m.lines,{to:{path:["M",c[0],c[1],"L",n,l,"Z"]}});if(m.panel){m.panel.setPosition(h,e,true)}}else{m.lines.setAttributes({path:["M",c[0],c[1],"L",n,l,"Z"]},true);if(m.panel){m.panel.setPosition(h,e)}}for(u in m){m[u].show(true)}},isItemInPoint:function(j,g,A,q){var C=this,n=C.items,s=C.selectionTolerance,k=null,z,c,p,v,h,w,b,t,a,l,B,e,d,o,u,r,D=Math.sqrt,m=Math.abs;c=n[q];z=q&&n[q-1];if(q>=h){z=n[h-1]}p=z&&z.point;v=c&&c.point;w=z?p[0]:v[0]-s;b=z?p[1]:v[1];t=c?v[0]:p[0]+s;a=c?v[1]:p[1];e=D((j-w)*(j-w)+(g-b)*(g-b));d=D((j-t)*(j-t)+(g-a)*(g-a));o=Math.min(e,d);if(o<=s){return o==e?z:c}return false},toggleAll:function(a){var e=this,b,d,g,c;if(!a){Ext.chart.series.Cartesian.prototype.hideAll.call(e)}else{Ext.chart.series.Cartesian.prototype.showAll.call(e)}if(e.line){e.line.setAttributes({hidden:!a},true);if(e.line.shadows){for(b=0,c=e.line.shadows,d=c.length;b1?T:U)%w]}||{}));D=Ext.apply({},o.segment,{slice:r,series:s,storeItem:r.storeItem,index:U});s.calcMiddle(D);if(g){D.shadows=r.shadowAttrs[T]}y[U]=D;if(!z){m=Ext.apply({type:"path",group:x,middle:D.middle},Ext.apply(h,e&&{fill:e[(K>1?T:U)%w]}||{}));z=J.add(Ext.apply(m,o))}r.sprite=r.sprite||[];D.sprite=z;r.sprite.push(z);r.point=[D.middle.x,D.middle.y];if(S){o=s.renderer(z,a.getAt(U),o,U,a);z._to=o;z._animating=true;s.onAnimate(z,{to:o,listeners:{afteranimate:{fn:function(){this._animating=false},scope:z}}})}else{o=s.renderer(z,a.getAt(U),Ext.apply(o,{hidden:false}),U,a);z.setAttributes(o,true)}B+=q}}F=x.getCount();for(U=0;U>0]&&x.getAt(U)){x.getAt(U).hide(true)}}if(g){aa=Q.length;for(E=0;E>0]){for(T=0;T90&&v<270)?v+180:v;h=k.attr.rotation.degrees;if(h!=null&&Math.abs(h-v)>180*0.5){if(v>h){v-=360}else{v+=360}v=v%360}else{v=a(v)}b.rotate={degrees:v,x:b.x,y:b.y};break;default:break}b.translate={x:0,y:0};if(e&&!w&&(s!="rotate"||h!=null)){B.onAnimate(k,{to:b})}else{k.setAttributes(b,true)}k._from=r},onPlaceCallout:function(l,o,z,v,u,d,e){var A=this,q=A.chart,j=A.centerX,h=A.centerY,B=z.middle,b={x:B.x,y:B.y},m=B.x-j,k=B.y-h,c=1,n,g=Math.atan2(k,m||1),a=l.label.getBBox(),w=20,t=10,s=10,r;c=z.endRho+w;n=(z.endRho+z.startRho)/2+(z.endRho-z.startRho)/3;b.x=c*Math.cos(g)+j;b.y=c*Math.sin(g)+h;m=n*Math.cos(g);k=n*Math.sin(g);if(q.animate){A.onAnimate(l.lines,{to:{path:["M",m+j,k+h,"L",b.x,b.y,"Z","M",b.x,b.y,"l",m>0?t:-t,0,"z"]}});A.onAnimate(l.box,{to:{x:b.x+(m>0?t:-(t+a.width+2*s)),y:b.y+(k>0?(-a.height-s/2):(-a.height-s/2)),width:a.width+2*s,height:a.height+2*s}});A.onAnimate(l.label,{to:{x:b.x+(m>0?(t+s):-(t+a.width+s)),y:b.y+(k>0?-a.height/4:-a.height/4)}})}else{l.lines.setAttributes({path:["M",m+j,k+h,"L",b.x,b.y,"Z","M",b.x,b.y,"l",m>0?t:-t,0,"z"]},true);l.box.setAttributes({x:b.x+(m>0?t:-(t+a.width+2*s)),y:b.y+(k>0?(-a.height-s/2):(-a.height-s/2)),width:a.width+2*s,height:a.height+2*s},true);l.label.setAttributes({x:b.x+(m>0?(t+s):-(t+a.width+s)),y:b.y+(k>0?-a.height/4:-a.height/4)},true)}for(r in l){l[r].show(true)}},onAnimate:function(b,a){b.show();return this.callParent(arguments)},isItemInPoint:function(l,j,n,e){var h=this,d=h.centerX,c=h.centerY,p=Math.abs,o=p(l-d),m=p(j-c),g=n.startAngle,a=n.endAngle,k=Math.sqrt(o*o+m*m),b=Math.atan2(j-c,l-d)/h.rad;if(b>h.firstAngle){b-=h.accuracy}return(b<=g&&b>a&&k>=n.startRho&&k<=n.endRho)},hideAll:function(c){var g,b,j,h,e,a,d;c=(isNaN(this._index)?c:this._index)||0;this.__excludes=this.__excludes||[];this.__excludes[c]=true;d=this.slices[c].sprite;for(e=0,a=d.length;ea.x+a.width)?(j-(j+n-a.x-a.width)):j;h=(h-ma.x+a.width)?(j-(j+n-a.x-a.width)):j;h=h-ma.y+a.height)?(h-(h+m-a.y-a.height)):h}}if(!l.animate){g.setAttributes({x:j,y:h},true);g.show(true)}else{if(s){o=t.sprite.getActiveAnimation();if(o){o.on("afteranimate",function(){g.setAttributes({x:j,y:h},true);g.show(true)})}else{g.show(true)}}else{v.onAnimate(g,{to:{x:j,y:h}})}}},onPlaceCallout:function(k,m,B,z,w,c,h){var E=this,n=E.chart,u=n.surface,A=n.resizing,D=E.callouts,o=E.items,b=B.point,F,a=k.label.getBBox(),C=30,t=10,s=3,e,d,g,r,q,v=E.bbox,l,j;F=[Math.cos(Math.PI/4),-Math.sin(Math.PI/4)];l=b[0]+F[0]*C;j=b[1]+F[1]*C;e=l+(F[0]>0?0:-(a.width+2*s));d=j-a.height/2-s;g=a.width+2*s;r=a.height+2*s;if(e(v[0]+v[2])){F[0]*=-1}if(d(v[1]+v[3])){F[1]*=-1}l=b[0]+F[0]*C;j=b[1]+F[1]*C;e=l+(F[0]>0?0:-(a.width+2*s));d=j-a.height/2-s;g=a.width+2*s;r=a.height+2*s;if(n.animate){E.onAnimate(k.lines,{to:{path:["M",b[0],b[1],"L",l,j,"Z"]}},true);E.onAnimate(k.box,{to:{x:e,y:d,width:g,height:r}},true);E.onAnimate(k.label,{to:{x:l+(F[0]>0?s:-(a.width+s)),y:j}},true)}else{k.lines.setAttributes({path:["M",b[0],b[1],"L",l,j,"Z"]},true);k.box.setAttributes({x:e,y:d,width:g,height:r},true);k.label.setAttributes({x:l+(F[0]>0?s:-(a.width+s)),y:j},true)}for(q in k){k[q].show(true)}},onAnimate:function(b,a){b.show();return this.callParent(arguments)},isItemInPoint:function(c,h,e){var b,d=10,a=Math.abs;function g(i){var k=a(i[0]-c),j=a(i[1]-h);return Math.sqrt(k*k+j*j)}b=e.point;return(b[0]-d<=c&&b[0]+d>=c&&b[1]-d<=h&&b[1]+d>=h)}});Ext.define("Ext.layout.container.Table",{alias:["layout.table"],extend:"Ext.layout.container.Container",alternateClassName:"Ext.layout.TableLayout",monitorResize:false,type:"table",clearEl:true,targetCls:Ext.baseCSSPrefix+"table-layout-ct",tableCls:Ext.baseCSSPrefix+"table-layout",cellCls:Ext.baseCSSPrefix+"table-layout-cell",tableAttrs:null,itemSizePolicy:{setsWidth:0,setsHeight:0},getItemSizePolicy:function(a){return this.itemSizePolicy},getLayoutItems:function(){var g=this,b=[],c=g.callParent(),e,a=c.length,d;for(d=0;d=h||n[d]>0){if(d>=h){d=0;a=0;b++;for(c=0;c0){n[c]--}}}else{d++}}m.push({rowIdx:b,cellIdx:a});for(c=l.colspan||1;c;--c){n[d]=l.rowspan||1;++d}++a}return m},getRenderTree:function(){var k=this,h=k.getLayoutItems(),o,p=[],q=Ext.apply({tag:"table",role:"presentation",cls:k.tableCls,cellspacing:0,cn:{tag:"tbody",cn:p}},k.tableAttrs),c=k.tdAttrs,d=k.needsDivWrap(),e,g=h.length,n,m,j,b,a,l;o=k.calculateCells(h);for(e=0;e0){b.create=g;h=true}if(d.length>0){b.update=d;h=true}if(a.length>0){b.destroy=a;h=true}if(h&&e.fireEvent("beforesync",b)!==false){c=c||{};e.proxy.batch(Ext.apply(c,{operations:b,listeners:e.getBatchListeners()}))}return e},getBatchListeners:function(){var b=this,a={scope:b,exception:b.onBatchException};if(b.batchUpdateMode=="operation"){a.operationcomplete=b.onBatchOperationComplete}else{a.complete=b.onBatchComplete}return a},save:function(){return this.sync.apply(this,arguments)},load:function(b){var c=this,a;b=Ext.apply({action:"read",filters:c.filters.items,sorters:c.getSorters()},b);c.lastOptions=b;a=new Ext.data.Operation(b);if(c.fireEvent("beforeload",c,a)!==false){c.loading=true;c.proxy.read(a,c.onProxyLoad,c)}return c},reload:function(a){return this.load(Ext.apply(this.lastOptions,a))},afterEdit:function(a,e){var d=this,b,c;if(d.autoSync&&!d.autoSyncSuspended){for(b=e.length;b--;){if(a.fields.get(e[b]).persist){c=true;break}}if(c){d.sync()}}d.fireEvent("update",d,a,Ext.data.Model.EDIT,e)},afterReject:function(a){this.fireEvent("update",this,a,Ext.data.Model.REJECT,null)},afterCommit:function(a){this.fireEvent("update",this,a,Ext.data.Model.COMMIT,null)},destroyStore:function(){var a=this;if(!a.isDestroyed){if(a.storeId){Ext.data.StoreManager.unregister(a)}a.clearData();a.data=a.tree=a.sorters=a.filters=a.groupers=null;if(a.reader){a.reader.destroyReader()}a.proxy=a.reader=a.writer=null;a.clearListeners();a.isDestroyed=true;if(a.implicitModel){Ext.destroy(a.model)}else{a.model=null}}},doSort:function(a){var b=this;if(b.remoteSort){b.load()}else{b.data.sortBy(a);b.fireEvent("datachanged",b);b.fireEvent("refresh",b)}},clearData:Ext.emptyFn,getCount:Ext.emptyFn,getById:Ext.emptyFn,removeAll:Ext.emptyFn,isLoading:function(){return !!this.loading},suspendAutoSync:function(){this.autoSyncSuspended=true},resumeAutoSync:function(){this.autoSyncSuspended=false}});Ext.define("Ext.data.ResultSet",{loaded:true,count:0,total:0,success:false,constructor:function(a){Ext.apply(this,a);this.totalRecords=this.total;if(a.count===undefined){this.count=this.records.length}}});Ext.define("Ext.data.reader.Reader",{requires:["Ext.data.ResultSet","Ext.XTemplate"],alternateClassName:["Ext.data.Reader","Ext.data.DataReader"],mixins:{observable:"Ext.util.Observable"},totalProperty:"total",successProperty:"success",root:"",implicitIncludes:true,readRecordsOnFailure:true,isReader:true,applyDefaults:true,lastFieldGeneration:null,constructor:function(a){var b=this;b.mixins.observable.constructor.call(b,a);b.fieldCount=0;b.model=Ext.ModelManager.getModel(b.model);b.accessExpressionFn=Ext.Function.bind(b.createFieldAccessExpression,b);if(b.model&&b.model.prototype.fields){b.buildExtractors()}this.addEvents("exception")},setModel:function(a,c){var b=this;b.model=Ext.ModelManager.getModel(a);b.buildExtractors(true);if(c&&b.proxy){b.proxy.setModel(b.model,true)}},read:function(a){var b;if(a){b=a.responseText?this.getResponseData(a):this.readRecords(a)}return b||this.nullResultSet},readRecords:function(c){var d=this,i,b,a,g,e,h,j;if(d.lastFieldGeneration!==d.model.prototype.fields.generation){d.buildExtractors(true)}d.rawData=c;c=d.getData(c);i=true;b=0;a=[];if(d.successProperty){h=d.getSuccess(c);if(h===false||h==="false"){i=false}}if(d.messageProperty){j=d.getMessage(c)}if(d.readRecordsOnFailure||i){g=Ext.isArray(c)?c:d.getRoot(c);if(g){e=g.length}if(d.totalProperty){h=parseInt(d.getTotal(c),10);if(!isNaN(h)){e=h}}if(g){a=d.extractData(g);b=a.length}}return new Ext.data.ResultSet({total:e||b,count:b,records:a,success:i,message:j})},extractData:function(k){var j=this,d=[],b=j.model,a=k.length,e,c,h,g;if(!k.length&&Ext.isObject(k)){k=[k];a=1}for(g=0;g',' ,__field{#} = fields.get("{name}")\n',"",";\n","return function(dest, source, record) {\n",'',' value = {[ this.createFieldAccessExpression(values, "__field" + xindex, "source") ]};\n','',' dest["{name}"] = value === undefined ? __field{#}.convert(__field{#}.defaultValue, record) : __field{#}.convert(value, record);\n',''," if (value === undefined) {\n"," if (me.applyDefaults) {\n",'',' dest["{name}"] = __field{#}.convert(__field{#}.defaultValue, record);\n',"",' dest["{name}"] = __field{#}.defaultValue\n',""," };\n"," } else {\n",'',' dest["{name}"] = __field{#}.convert(value, record);\n',"",' dest["{name}"] = value;\n',""," };",""," if (value !== undefined) {\n",'',' dest["{name}"] = __field{#}.convert(value, record);\n',"",' dest["{name}"] = value;\n',""," }\n","","",'',' if (record && (internalId = {[ this.createFieldAccessExpression({mapping: values.clientIdProp}, null, "source") ]})) {\n',' record.{["internalId"]} = internalId;\n'," }\n","","};"],buildRecordDataExtractor:function(){var c=this,a=c.model.prototype,b={clientIdProp:a.clientIdProperty,fields:a.fields.items};c.recordDataExtractorTemplate.createFieldAccessExpression=c.accessExpressionFn;return Ext.functionFactory(c.recordDataExtractorTemplate.apply(b)).call(c)},destroyReader:function(){var a=this;delete a.proxy;delete a.model;delete a.convertRecordData;delete a.getId;delete a.getTotal;delete a.getSuccess;delete a.getMessage}},function(){var a=this.prototype;Ext.apply(a,{nullResultSet:new Ext.data.ResultSet({total:0,count:0,records:[],success:true}),recordDataExtractorTemplate:new Ext.XTemplate(a.recordDataExtractorTemplate)})});Ext.define("Ext.data.reader.Json",{extend:"Ext.data.reader.Reader",alternateClassName:"Ext.data.JsonReader",alias:"reader.json",root:"",useSimpleAccessors:false,readRecords:function(a){if(a.metaData){this.onMetaChange(a.metaData)}this.jsonData=a;return this.callParent([a])},getResponseData:function(a){var d,b;try{d=Ext.decode(a.responseText);return this.readRecords(d)}catch(c){b=new Ext.data.ResultSet({total:0,count:0,records:[],success:false,message:c.message});this.fireEvent("exception",this,a,b);Ext.Logger.warn("Unable to parse the JSON returned by the server");return b}},buildExtractors:function(){var a=this;a.callParent(arguments);if(a.root){a.getRoot=a.createAccessor(a.root)}else{a.getRoot=function(b){return b}}},extractData:function(a){var e=this.record,d=[],c,b;if(e){c=a.length;if(!c&&Ext.isObject(a)){c=1;a=[a]}for(b=0;b=0){return Ext.functionFactory("obj","return obj"+(b>0?".":"")+c)}}return function(d){return d[c]}}}()),createFieldAccessExpression:(function(){var a=/[\[\.]/;return function(i,d,c){var e=this,g=(i.mapping!==null),h=g?i.mapping:i.name,b,j;if(typeof h==="function"){b=d+".mapping("+c+", this)"}else{if(this.useSimpleAccessors===true||((j=String(h).search(a))<0)){if(!g||isNaN(h)){h='"'+h+'"'}b=c+"["+h+"]"}else{b=c+(j>0?".":"")+h}}return b}}())});Ext.define("Ext.data.writer.Writer",{alias:"writer.base",alternateClassName:["Ext.data.DataWriter","Ext.data.Writer"],writeAllFields:true,nameProperty:"name",isWriter:true,constructor:function(a){Ext.apply(this,a)},write:function(e){var c=e.operation,b=c.records||[],a=b.length,d=0,g=[];for(;d1){e[l]=g.internalId}}else{e[g.idProperty]=g.getId()}return e}});Ext.define("Ext.data.writer.Json",{extend:"Ext.data.writer.Writer",alternateClassName:"Ext.data.JsonWriter",alias:"writer.json",root:undefined,encode:false,allowSingle:true,writeRecords:function(b,c){var a=this.root;if(this.allowSingle&&c.length==1){c=c[0]}if(this.encode){if(a){b.params[a]=Ext.encode(c)}else{}}else{b.jsonData=b.jsonData||{};if(a){b.jsonData[a]=c}else{b.jsonData=c}}return b}});Ext.define("Ext.data.proxy.Server",{extend:"Ext.data.proxy.Proxy",alias:"proxy.server",alternateClassName:"Ext.data.ServerProxy",uses:["Ext.data.Request"],pageParam:"page",startParam:"start",limitParam:"limit",groupParam:"group",groupDirectionParam:"groupDir",sortParam:"sort",filterParam:"filter",directionParam:"dir",simpleSortMode:false,simpleGroupMode:false,noCache:true,cacheString:"_dc",timeout:30000,constructor:function(a){var b=this;a=a||{};b.callParent([a]);b.extraParams=a.extraParams||{};b.api=Ext.apply({},a.api||b.api);b.nocache=b.noCache},create:function(){return this.doRequest.apply(this,arguments)},read:function(){return this.doRequest.apply(this,arguments)},update:function(){return this.doRequest.apply(this,arguments)},destroy:function(){return this.doRequest.apply(this,arguments)},setExtraParam:function(a,b){this.extraParams[a]=b},buildRequest:function(a){var c=this,d=Ext.applyIf(a.params||{},c.extraParams||{}),b;d=Ext.applyIf(d,c.getParams(a));if(a.id!==undefined&&d.id===undefined){d.id=a.id}b=new Ext.data.Request({params:d,action:a.action,records:a.records,operation:a,url:a.url,proxy:c});b.url=c.buildUrl(b);a.request=b;return b},processResponse:function(h,a,c,b,g,i){var e=this,d,j;if(h===true){d=e.getReader();d.applyDefaults=a.action==="read";j=d.read(e.extractResponseData(b));if(j.success!==false){Ext.apply(a,{response:b,resultSet:j});a.commitRecords(j.records);a.setCompleted();a.setSuccessful()}else{a.setException(j.message);e.fireEvent("exception",this,b,a)}}else{e.setException(a,b);e.fireEvent("exception",this,b,a)}if(typeof g=="function"){g.call(i||e,a)}e.afterRequest(c,h)},setException:function(b,a){b.setException({status:a.status,statusText:a.statusText})},extractResponseData:function(a){return a},applyEncoding:function(a){return Ext.encode(a)},encodeSorters:function(d){var b=[],c=d.length,a=0;for(;a0){if(d){t[c]=r[0].property;t[k]=r[0].direction||"ASC"}else{t[c]=u.encodeSorters(r)}}if(e&&a&&a.length>0){if(j){t[e]=a[0].property;t[m]=a[0].direction}else{t[e]=u.encodeSorters(a)}}if(o&&l&&l.length>0){t[o]=u.encodeFilters(l)}return t},buildUrl:function(c){var b=this,a=b.getUrl(c);if(b.noCache){a=Ext.urlAppend(a,Ext.String.format("{0}={1}",b.cacheString,Ext.Date.now()))}return a},getUrl:function(a){return a.url||this.api[a.action]||this.url},doRequest:function(a,c,b){},afterRequest:Ext.emptyFn,onDestroy:function(){Ext.destroy(this.reader,this.writer)}});Ext.define("Ext.data.proxy.Ajax",{requires:["Ext.util.MixedCollection","Ext.Ajax"],extend:"Ext.data.proxy.Server",alias:"proxy.ajax",alternateClassName:["Ext.data.HttpProxy","Ext.data.AjaxProxy"],actionMethods:{create:"POST",read:"GET",update:"POST",destroy:"POST"},doRequest:function(a,e,b){var d=this.getWriter(),c=this.buildRequest(a,e,b);if(a.allowWrite()){c=d.write(c)}Ext.apply(c,{headers:this.headers,timeout:this.timeout,scope:this,callback:this.createRequestCallback(c,a,e,b),method:this.getMethod(c),disableCaching:false});Ext.Ajax.request(c);return c},getMethod:function(a){return this.actionMethods[a.action]},createRequestCallback:function(d,a,e,b){var c=this;return function(h,i,g){c.processResponse(i,a,d,g,e,b)}}},function(){Ext.data.HttpProxy=this});Ext.define("Ext.data.proxy.Client",{extend:"Ext.data.proxy.Proxy",alternateClassName:"Ext.data.ClientProxy",isSynchronous:true,clear:function(){}});Ext.define("Ext.data.proxy.Memory",{extend:"Ext.data.proxy.Client",alias:"proxy.memory",alternateClassName:"Ext.data.MemoryProxy",constructor:function(a){this.callParent([a]);this.setReader(this.reader)},updateOperation:function(b,g,d){var c=0,e=b.getRecords(),a=e.length;for(c;c0){for(;a.first&&b;b--){a.removeAtKey(a.first.key)}}}});Ext.define("Ext.data.Store",{extend:"Ext.data.AbstractStore",alias:"store.store",requires:["Ext.data.StoreManager","Ext.data.Model","Ext.data.proxy.Ajax","Ext.data.proxy.Memory","Ext.data.reader.Json","Ext.data.writer.Json","Ext.util.LruCache"],uses:["Ext.ModelManager","Ext.util.Grouper"],remoteSort:false,remoteFilter:false,remoteGroup:false,groupField:undefined,groupDir:"ASC",trailingBufferZone:25,leadingBufferZone:200,pageSize:undefined,currentPage:1,clearOnPageLoad:true,loading:false,sortOnFilter:true,buffered:false,purgePageCount:5,clearRemovedOnLoad:true,defaultPageSize:25,addRecordsOptions:{addRecords:true},statics:{recordIdFn:function(a){return a.internalId},recordIndexFn:function(a){return a.index}},onClassExtended:function(b,d,a){var c=d.model,e;if(typeof c=="string"){e=a.onBeforeCreated;a.onBeforeCreated=function(){var h=this,g=arguments;Ext.require(c,function(){e.apply(h,g)})}}},constructor:function(b){b=Ext.Object.merge({},b);var d=this,g=b.groupers||d.groupers,a=b.groupField||d.groupField,c,e;e=b.data||d.data;d.data=new Ext.util.MixedCollection(false,Ext.data.Store.recordIdFn);if(e){d.inlineData=e;delete b.data}if(!g&&a){g=[{property:a,direction:b.groupDir||d.groupDir}]}delete b.groupers;d.groupers=new Ext.util.MixedCollection();d.groupers.addAll(d.decodeGroupers(g));this.callParent([b]);if(d.buffered){d.pageMap=new d.PageMap({pageSize:d.pageSize,maxSize:d.purgePageCount,listeners:{clear:d.cancelAllPrefetches,scope:d}});d.pageRequests={};d.sortOnLoad=false;d.filterOnLoad=false}if(d.remoteGroup){d.remoteSort=true}if(d.groupers.items.length&&!d.remoteGroup){d.sort(d.groupers.items,"prepend",false)}c=d.proxy;e=d.inlineData;if(!d.buffered&&!d.pageSize){d.pageSize=d.defaultPageSize}if(e){if(c instanceof Ext.data.proxy.Memory){c.data=e;d.read()}else{d.add.apply(d,[e])}d.sort();delete d.inlineData}else{if(d.autoLoad){Ext.defer(d.load,10,d,[typeof d.autoLoad==="object"?d.autoLoad:undefined])}}},destroyStore:function(){this.callParent(arguments);if(this.pageMap){this.pageMap.clear()}},onBeforeSort:function(){var a=this.groupers;if(a.getCount()>0){this.sort(a.items,"prepend",false)}},decodeGroupers:function(e){if(!Ext.isArray(e)){if(e===undefined){e=[]}else{e=[e]}}var d=e.length,g=Ext.util.Grouper,b,c,a=[];for(c=0;c0},fireGroupChange:function(){this.fireEvent("groupchange",this,this.groupers)},getGroups:function(b){var d=this.data.items,a=d.length,c=[],k={},g,h,j,e;for(e=0;e-1){b=e.phantom!==true;if(!k&&b){e.removedFrom=g;h.removed.push(e)}e.unjoin(h);h.data.remove(e);j=j||b;h.fireEvent("remove",h,e,g)}}h.fireEvent("datachanged",h);if(!k&&h.autoSync&&j&&!h.autoSyncSuspended){h.sync()}},removeAt:function(b){var a=this.getAt(b);if(a){this.remove(a)}},load:function(a){var b=this;a=a||{};if(typeof a=="function"){a={callback:a}}a.groupers=a.groupers||b.groupers.items;a.page=a.page||b.currentPage;a.start=(a.start!==undefined)?a.start:(a.page-1)*b.pageSize;a.limit=a.limit||b.pageSize;a.addRecords=a.addRecords||false;if(b.buffered){return b.loadToPrefetch(a)}return b.callParent([a])},reload:function(l){var g=this,h,b,e,k,d,a,j,c;if(!l){l={}}if(g.buffered){delete g.totalCount;a=function(){if(g.rangeCached(h,b)){g.loading=false;g.pageMap.un("pageAdded",a);c=g.pageMap.getRange(h,b);g.loadRecords(c,{start:h});g.fireEvent("load",g,c,true)}};j=Math.ceil((g.leadingBufferZone+g.trailingBufferZone)/2);h=l.start||g.getAt(0).index;b=h+(l.count||g.getCount())-1;e=g.getPageFromRecordIndex(Math.max(h-j,0));k=g.getPageFromRecordIndex(b+j);g.pageMap.clear(true);if(g.fireEvent("beforeload",g,l)!==false){g.loading=true;for(d=e;d<=k;d++){g.prefetchPage(d,l)}g.pageMap.on("pageAdded",a)}}else{return g.callParent(arguments)}},onProxyLoad:function(b){var d=this,c=b.getResultSet(),a=b.getRecords(),e=b.wasSuccessful();if(c){d.totalCount=c.total}if(e){d.loadRecords(a,b)}d.loading=false;if(d.hasListeners.load){d.fireEvent("load",d,a,e)}if(d.hasListeners.read){d.fireEvent("read",d,a,e)}Ext.callback(b.callback,b.scope||d,[a,b,e])},getNewRecords:function(){return this.data.filterBy(this.filterNew).items},getUpdatedRecords:function(){return this.data.filterBy(this.filterUpdated).items},filter:function(e,g){if(Ext.isString(e)){e={property:e,value:g}}var d=this,a=d.decodeFilters(e),b=0,h=d.sorters.length&&d.sortOnFilter&&!d.remoteSort,c=a.length;for(;bthis.totalCount)?this.totalCount-1:c;var h=this,e=h.lastRequestStart,d={prefetchStart:i,prefetchEnd:c,cb:a,scope:g},b;h.lastRequestStart=i;if(h.rangeCached(i,c)){if(i0){c=b[0].get(g)}for(;d0){a=c[0].get(g)}for(;da){a=e}}return a},average:function(c,a){var b=this;if(a&&b.isGrouped()){return b.aggregate(b.getAverage,b,true,[c])}else{return b.getAverage(b.data.items,c)}},getAverage:function(b,e){var c=0,a=b.length,d=0;if(b.length>0){for(;c1){for(a=b.length;c0){g.timeout=setTimeout(Ext.bind(j.handleTimeout,j,[g]),m)}j.setupErrorHandling(g);j[l]=Ext.bind(j.handleResponse,j,[g],true);j.loadScript(g);return g},abort:function(c){var b=this,d=b.requests,a;if(c){if(!c.id){c=d[c]}b.handleAbort(c)}else{for(a in d){if(d.hasOwnProperty(a)){b.abort(d[a])}}}},setupErrorHandling:function(a){a.script.onerror=Ext.bind(this.handleError,this,[a])},handleAbort:function(a){a.errorType="abort";this.handleResponse(null,a)},handleError:function(a){a.errorType="error";this.handleResponse(null,a)},cleanupErrorHandling:function(a){a.script.onerror=null},handleTimeout:function(a){a.errorType="timeout";this.handleResponse(null,a)},handleResponse:function(a,b){var c=true;if(b.timeout){clearTimeout(b.timeout)}delete this[b.callbackName];delete this.requests[b.id];this.cleanupErrorHandling(b);Ext.fly(b.script).remove();if(b.errorType){c=false;Ext.callback(b.failure,b.scope,[b.errorType])}else{Ext.callback(b.success,b.scope,[a])}Ext.callback(b.callback,b.scope,[c,a,b.errorType])},createScript:function(c,d,b){var a=document.createElement("script");a.setAttribute("src",Ext.urlAppend(c,Ext.Object.toQueryString(d)));a.setAttribute("async",true);a.setAttribute("type","text/javascript");return a},loadScript:function(a){Ext.getHead().appendChild(a.script)}});Ext.define("Ext.data.proxy.JsonP",{extend:"Ext.data.proxy.Server",alternateClassName:"Ext.data.ScriptTagProxy",alias:["proxy.jsonp","proxy.scripttag"],requires:["Ext.data.JsonP"],defaultWriterType:"base",callbackKey:"callback",recordParam:"records",autoAppendParams:true,constructor:function(){this.addEvents("exception");this.callParent(arguments)},doRequest:function(a,h,b){var d=this,e=d.getWriter(),c=d.buildRequest(a),g=c.params;if(a.allowWrite()){c=e.write(c)}Ext.apply(c,{callbackKey:d.callbackKey,timeout:d.timeout,scope:d,disableCaching:false,callback:d.createRequestCallback(c,a,h,b)});if(d.autoAppendParams){c.params={}}c.jsonp=Ext.data.JsonP.request(c);c.params=g;a.setStarted();d.lastRequest=c;return c},createRequestCallback:function(d,a,e,b){var c=this;return function(i,g,h){delete c.lastRequest;c.processResponse(i,a,d,g,e,b)}},setException:function(b,a){b.setException(b.request.jsonp.errorType)},buildUrl:function(h){var g=this,b=g.callParent(arguments),j=Ext.apply({},h.params),e=j.filters,a,d,c;delete j.filters;if(g.autoAppendParams){b=Ext.urlAppend(b,Ext.Object.toQueryString(j))}if(e&&e.length){for(c=0;c0){b=Ext.urlAppend(b,Ext.String.format("{0}={1}",g.recordParam,g.encodeRecords(a)))}return b},destroy:function(){this.abort();this.callParent(arguments)},abort:function(){var a=this.lastRequest;if(a){Ext.data.JsonP.abort(a.jsonp)}},encodeRecords:function(b){var d="",c=0,a=b.length;for(;c0},isExpandable:function(){var a=this;if(a.get("expandable")){return !(a.isLeaf()||(a.isLoaded()&&!a.hasChildNodes()))}return false},triggerUIUpdate:function(){this.afterEdit([])},appendChild:function(b,k,c){var h=this,d,g,e,j,a;if(Ext.isArray(b)){h.callStore("suspendAutoSync");for(d=0,g=b.length-1;d0?c-1:0,a=h.childNodes.length;d0?k-1:0,c=h.childNodes.length;d0){Ext.Array.sort(d,g);for(c=0;cj){i=i.substring(i.length-j)}else{if(i.length>>16)&4095)|(j.version<<12),4);k[3]=a(128|((j.clockSeq>>>8)&63),2)+a(j.clockSeq&255,2);k[4]=a(j.salt.hi,4)+a(j.salt.lo,8);if(j.version==4){j.init()}else{++i.lo;if(i.lo>=c){i.lo=0;++i.hi}}return k.join("-").toLowerCase()},getRecId:function(i){return i.getId()},init:function(){var j=this,i,k;if(j.version==4){j.clockSeq=d(0,h-1);i=j.salt||(j.salt={});k=j.timestamp||(j.timestamp={});i.lo=d(0,c-1);i.hi=d(0,g-1);k.lo=d(0,c-1);k.hi=d(0,e-1)}else{j.salt=b(j.salt);j.timestamp=b(j.timestamp);j.salt.hi|=256}},reconfigure:function(i){Ext.apply(this,i);this.init()}}}()));Ext.define("Ext.data.reader.Xml",{extend:"Ext.data.reader.Reader",alternateClassName:"Ext.data.XmlReader",alias:"reader.xml",createAccessor:function(b){var a=this;if(Ext.isEmpty(b)){return Ext.emptyFn}if(Ext.isFunction(b)){return b}return function(c){return a.getNodeValue(Ext.DomQuery.selectNode(b,c))}},getNodeValue:function(a){if(a&&a.firstChild){return a.firstChild.nodeValue}return undefined},getResponseData:function(a){var c=a.responseXML,b,d;if(!c){d="XML data not found in the response";b=new Ext.data.ResultSet({total:0,count:0,records:[],success:false,message:d});this.fireEvent("exception",this,a,b);Ext.Logger.warn(d);return b}return this.readRecords(c)},getData:function(a){return a.documentElement||a},getRoot:function(b){var c=b.nodeName,a=this.root;if(!a||(c&&c==a)){return b}else{if(Ext.DomQuery.isXml(b)){return Ext.DomQuery.selectNode(a,b)}}},extractData:function(a){var b=this.record;if(b!=a.nodeName){a=Ext.DomQuery.select(b,a)}else{a=[a]}return this.callParent([a])},getAssociatedDataRoot:function(b,a){return Ext.DomQuery.select(a,b)[0]},readRecords:function(a){if(Ext.isArray(a)){a=a[0]}this.xmlData=a;return this.callParent([a])},createFieldAccessExpression:function(e,d,c){var b=e.mapping||e.name,a;if(typeof b==="function"){a=d+".mapping("+c+", this)"}else{a='me.getNodeValue(Ext.DomQuery.selectNode("'+b+'", '+c+"))"}return a}});Ext.define("Ext.data.writer.Xml",{extend:"Ext.data.writer.Writer",alternateClassName:"Ext.data.XmlWriter",alias:"writer.xml",documentRoot:"xmlData",defaultDocumentRoot:"xmlData",header:"",record:"record",writeRecords:function(a,b){var h=this,d=[],c=0,g=b.length,j=h.documentRoot,e=h.record,m=b.length!==1,l,k;d.push(h.header||"");if(!j&&m){j=h.defaultDocumentRoot}if(j){d.push("<",j,">")}for(;c");for(k in l){if(l.hasOwnProperty(k)){d.push("<",k,">",l[k],"")}}d.push("")}if(j){d.push("")}a.xmlData=d.join("");return a}});Ext.define("Ext.data.XmlStore",{extend:"Ext.data.Store",alias:"store.xml",requires:["Ext.data.proxy.Ajax","Ext.data.reader.Xml","Ext.data.writer.Xml"],constructor:function(a){a=Ext.apply({proxy:{type:"ajax",reader:"xml",writer:"xml"}},a);this.callParent([a])}});Ext.define("Ext.data.association.BelongsTo",{extend:"Ext.data.association.Association",alternateClassName:"Ext.data.BelongsToAssociation",alias:"association.belongsto",constructor:function(c){this.callParent(arguments);var e=this,a=e.ownerModel.prototype,g=e.associatedName,d=e.getterName||"get"+g,b=e.setterName||"set"+g;Ext.applyIf(e,{name:g,foreignKey:g.toLowerCase()+"_id",instanceName:g+"BelongsToInstance",associationKey:g.toLowerCase()});a[d]=e.createGetter();a[b]=e.createSetter()},createSetter:function(){var b=this,a=b.foreignKey;return function(e,c,d){if(e&&e.isModel){e=e.getId()}this.set(a,e);if(Ext.isFunction(c)){c={callback:c,scope:d||this}}if(Ext.isObject(c)){return this.save(c)}}},createGetter:function(){var d=this,e=d.associatedName,g=d.associatedModel,c=d.foreignKey,b=d.primaryKey,a=d.instanceName;return function(k,l){k=k||{};var j=this,m=j.get(c),n,h,i;if(k.reload===true||j[a]===undefined){h=Ext.ModelManager.create({},e);h.set(b,m);if(typeof k=="function"){k={callback:k,scope:l||j}}n=k.success;k.success=function(o){j[a]=o;if(n){n.apply(this,arguments)}};g.load(m,k);j[a]=h;return h}else{h=j[a];i=[h];l=l||k.scope||j;Ext.callback(k,l,i);Ext.callback(k.success,l,i);Ext.callback(k.failure,l,i);Ext.callback(k.callback,l,i);return h}}},read:function(b,a,c){b[this.instanceName]=a.read([c]).records[0]}});Ext.define("Ext.util.Inflector",{singleton:true,plurals:[[(/(quiz)$/i),"$1zes"],[(/^(ox)$/i),"$1en"],[(/([m|l])ouse$/i),"$1ice"],[(/(matr|vert|ind)ix|ex$/i),"$1ices"],[(/(x|ch|ss|sh)$/i),"$1es"],[(/([^aeiouy]|qu)y$/i),"$1ies"],[(/(hive)$/i),"$1s"],[(/(?:([^f])fe|([lr])f)$/i),"$1$2ves"],[(/sis$/i),"ses"],[(/([ti])um$/i),"$1a"],[(/(buffal|tomat|potat)o$/i),"$1oes"],[(/(bu)s$/i),"$1ses"],[(/(alias|status|sex)$/i),"$1es"],[(/(octop|vir)us$/i),"$1i"],[(/(ax|test)is$/i),"$1es"],[(/^person$/),"people"],[(/^man$/),"men"],[(/^(child)$/),"$1ren"],[(/s$/i),"s"],[(/$/),"s"]],singulars:[[(/(quiz)zes$/i),"$1"],[(/(matr)ices$/i),"$1ix"],[(/(vert|ind)ices$/i),"$1ex"],[(/^(ox)en/i),"$1"],[(/(alias|status)es$/i),"$1"],[(/(octop|vir)i$/i),"$1us"],[(/(cris|ax|test)es$/i),"$1is"],[(/(shoe)s$/i),"$1"],[(/(o)es$/i),"$1"],[(/(bus)es$/i),"$1"],[(/([m|l])ice$/i),"$1ouse"],[(/(x|ch|ss|sh)es$/i),"$1"],[(/(m)ovies$/i),"$1ovie"],[(/(s)eries$/i),"$1eries"],[(/([^aeiouy]|qu)ies$/i),"$1y"],[(/([lr])ves$/i),"$1f"],[(/(tive)s$/i),"$1"],[(/(hive)s$/i),"$1"],[(/([^f])ves$/i),"$1fe"],[(/(^analy)ses$/i),"$1sis"],[(/((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$/i),"$1$2sis"],[(/([ti])a$/i),"$1um"],[(/(n)ews$/i),"$1ews"],[(/people$/i),"person"],[(/s$/i),""]],uncountable:["sheep","fish","series","species","money","rice","information","equipment","grass","mud","offspring","deer","means"],singular:function(b,a){this.singulars.unshift([b,a])},plural:function(b,a){this.plurals.unshift([b,a])},clearSingulars:function(){this.singulars=[]},clearPlurals:function(){this.plurals=[]},isTransnumeral:function(a){return Ext.Array.indexOf(this.uncountable,a)!=-1},pluralize:function(g){if(this.isTransnumeral(g)){return g}var e=this.plurals,d=e.length,a,c,b;for(b=0;bb.tolerance){b.triggerStart(g)}else{return}}if(b.fireEvent("mousemove",b,g)===false){b.onMouseUp(g)}else{b.onDrag(g);b.fireEvent("drag",b,g)}},onMouseUp:function(b){var a=this;a.mouseIsDown=false;if(a.mouseIsOut){a.mouseIsOut=false;a.onMouseOut(b)}b.preventDefault();if(Ext.isIE&&document.releaseCapture){document.releaseCapture()}a.fireEvent("mouseup",a,b);a.endDrag(b)},endDrag:function(d){var b=this,c=Ext.getDoc(),a=b.active;c.un("mousemove",b.onMouseMove,b);c.un("mouseup",b.onMouseUp,b);c.un("selectstart",b.stopSelect,b);b.clearStart();b.active=false;if(a){b.onEnd(d);b.fireEvent("dragend",b,d)}delete b._constrainRegion;delete Ext.EventObject.dragTracked},triggerStart:function(b){var a=this;a.clearStart();a.active=true;a.onStart(b);a.fireEvent("dragstart",a,b)},clearStart:function(){var a=this.timer;if(a){clearTimeout(a);delete this.timer}},stopSelect:function(a){a.stopEvent();return false},onBeforeStart:function(a){},onStart:function(a){},onDrag:function(a){},onEnd:function(a){},getDragTarget:function(){return this.dragTarget},getDragCt:function(){return this.el},getConstrainRegion:function(){var a=this;if(a.constrainTo){if(a.constrainTo instanceof Ext.util.Region){return a.constrainTo}if(!a._constrainRegion){a._constrainRegion=Ext.fly(a.constrainTo).getViewRegion()}}else{if(!a._constrainRegion){a._constrainRegion=a.getDragCt().getViewRegion()}}return a._constrainRegion},getXY:function(a){return a?this.constrainModes[a](this,this.lastXY):this.lastXY},getOffset:function(c){var b=this.getXY(c),a=this.startXY;return[b[0]-a[0],b[1]-a[1]]},constrainModes:{point:function(b,d){var c=b.dragRegion,a=b.getConstrainRegion();if(!a){return d}c.x=c.left=c[0]=c.right=d[0];c.y=c.top=c[1]=c.bottom=d[1];c.constrainTo(a);return[c.left,c.top]},dragTarget:function(c,g){var b=c.startXY,e=c.startRegion.copy(),a=c.getConstrainRegion(),d;if(!a){return g}e.translateBy(g[0]-b[0],g[1]-b[1]);if(e.right>a.right){g[0]+=d=(a.right-e.right);e.left+=d}if(e.lefta.bottom){g[1]+=d=(a.bottom-e.bottom);e.top+=d}if(e.top0){if(b){for(d=0,a=b.length;d0){this.sendRequest(a==1?b[0]:b);this.callBuffer=[]}},configureFormRequest:function(e,a,b,i,j){var h=this,c=new Ext.direct.Transaction({provider:h,action:e,method:a.name,args:[b,i,j],callback:j&&Ext.isFunction(i)?Ext.Function.bind(i,j):i,isForm:true}),g,d;if(h.fireEvent("beforecall",h,c,a)!==false){Ext.direct.Manager.addTransaction(c);g=String(b.getAttribute("enctype")).toLowerCase()=="multipart/form-data";d={extTID:c.id,extAction:e,extMethod:a.name,extType:"rpc",extUpload:String(g)};Ext.apply(c,{form:Ext.getDom(b),isUpload:g,params:i&&Ext.isObject(i.params)?Ext.apply(d,i.params):d});h.fireEvent("call",h,c,a);h.sendFormRequest(c)}},sendFormRequest:function(a){Ext.Ajax.request({url:this.url,params:a.params,callback:this.onData,scope:this,form:a.form,isUpload:a.isUpload,transaction:a})}});Ext.define("Ext.draw.Matrix",{requires:["Ext.draw.Draw"],constructor:function(h,g,l,k,j,i){if(h!=null){this.matrix=[[h,l,j],[g,k,i],[0,0,1]]}else{this.matrix=[[1,0,0],[0,1,0],[0,0,1]]}},add:function(s,p,m,k,i,h){var n=this,g=[[],[],[]],r=[[s,m,i],[p,k,h],[0,0,1]],q,o,l,j;for(q=0;q<3;q++){for(o=0;o<3;o++){j=0;for(l=0;l<3;l++){j+=n.matrix[q][l]*r[l][o]}g[q][o]=j}}n.matrix=g},prepend:function(s,p,m,k,i,h){var n=this,g=[[],[],[]],r=[[s,m,i],[p,k,h],[0,0,1]],q,o,l,j;for(q=0;q<3;q++){for(o=0;o<3;o++){j=0;for(l=0;l<3;l++){j+=r[q][l]*n.matrix[l][o]}g[q][o]=j}}n.matrix=g},invert:function(){var j=this.matrix,i=j[0][0],h=j[1][0],n=j[0][1],m=j[1][1],l=j[0][2],k=j[1][2],g=i*m-h*n;return new Ext.draw.Matrix(m/g,-h/g,-n/g,i/g,(n*k-m*l)/g,(h*l-i*k)/g)},clone:function(){var i=this.matrix,h=i[0][0],g=i[1][0],m=i[0][1],l=i[1][1],k=i[0][2],j=i[1][2];return new Ext.draw.Matrix(h,g,m,l,k,j)},translate:function(a,b){this.prepend(1,0,0,1,a,b)},scale:function(b,e,a,d){var c=this;if(e==null){e=b}c.add(b,0,0,e,a*(1-b),d*(1-e))},rotate:function(c,b,h){c=Ext.draw.Draw.rad(c);var e=this,g=+Math.cos(c).toFixed(9),d=+Math.sin(c).toFixed(9);e.add(g,d,-d,g,b-g*b+d*h,-(d*b)+h-g*h)},x:function(a,c){var b=this.matrix;return a*b[0][0]+c*b[0][1]+b[0][2]},y:function(a,c){var b=this.matrix;return a*b[1][0]+c*b[1][1]+b[1][2]},get:function(b,a){return +this.matrix[b][a].toFixed(4)},toString:function(){var a=this;return[a.get(0,0),a.get(0,1),a.get(1,0),a.get(1,1),0,0].join()},toSvg:function(){var a=this;return"matrix("+[a.get(0,0),a.get(1,0),a.get(0,1),a.get(1,1),a.get(0,2),a.get(1,2)].join()+")"},toFilter:function(b,a){var c=this;b=b||0;a=a||0;return"progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand', filterType='bilinear', M11="+c.get(0,0)+", M12="+c.get(0,1)+", M21="+c.get(1,0)+", M22="+c.get(1,1)+", Dx="+(c.get(0,2)+b)+", Dy="+(c.get(1,2)+a)+")"},offset:function(){var a=this.matrix;return[(a[0][2]||0).toFixed(4),(a[1][2]||0).toFixed(4)]},split:function(){function d(g){return g[0]*g[0]+g[1]*g[1]}function b(g){var h=Math.sqrt(d(g));g[0]/=h;g[1]/=h}var a=this.matrix,c={translateX:a[0][2],translateY:a[1][2]},e;e=[[a[0][0],a[0][1]],[a[1][1],a[1][1]]];c.scaleX=Math.sqrt(d(e[0]));b(e[0]);c.shear=e[0][0]*e[1][0]+e[0][1]*e[1][1];e[1]=[e[1][0]-e[0][0]*c.shear,e[1][1]-e[0][1]*c.shear];c.scaleY=Math.sqrt(d(e[1]));b(e[1]);c.shear/=c.scaleY;c.rotate=Math.asin(-e[0][1]);c.isSimple=!+c.shear.toFixed(9)&&(c.scaleX.toFixed(9)==c.scaleY.toFixed(9)||!c.rotate);return c}});Ext.define("Ext.draw.SpriteDD",{extend:"Ext.dd.DragSource",constructor:function(b,a){var d=this,c=b.el;d.sprite=b;d.el=c;d.dragData={el:c,sprite:b};d.callParent([c,a]);d.sprite.setStyle("cursor","move")},showFrame:Ext.emptyFn,createFrame:Ext.emptyFn,getDragEl:function(a){return this.el},getRegion:function(){var j=this,g=j.el,m,d,c,o,n,s,a,k,h,q,p;p=j.sprite;q=p.getBBox();try{m=Ext.Element.getXY(g)}catch(i){}if(!m){return null}d=m[0];c=d+q.width;o=m[1];n=o+q.height;return new Ext.util.Region(o,c,n,d)},startDrag:function(b,d){var c=this,a=c.sprite.attr;c.prev=c.sprite.surface.transformToViewBox(b,d)},onDrag:function(i){var h=i.getXY(),g=this,d=g.sprite,a=d.attr,c,b;h=g.sprite.surface.transformToViewBox(h[0],h[1]);c=h[0]-g.prev[0];b=h[1]-g.prev[1];d.setAttributes({translate:{x:a.translation.x+c,y:a.translation.y+b}},true);g.prev=h},setDragElPos:function(){return false}});Ext.define("Ext.draw.Sprite",{mixins:{observable:"Ext.util.Observable",animate:"Ext.util.Animate"},requires:["Ext.draw.SpriteDD"],dirty:false,dirtyHidden:false,dirtyTransform:false,dirtyPath:true,dirtyFont:true,zIndexDirty:true,isSprite:true,zIndex:0,fontProperties:["font","font-size","font-weight","font-style","font-family","text-anchor","text"],pathProperties:["x","y","d","path","height","width","radius","r","rx","ry","cx","cy"],constructor:function(a){var b=this;a=Ext.merge({},a||{});b.id=Ext.id(null,"ext-sprite-");b.transformations=[];Ext.copyTo(this,a,"surface,group,type,draggable");b.bbox={};b.attr={zIndex:0,translation:{x:null,y:null},rotation:{degrees:null,x:null,y:null},scaling:{x:null,y:null,cx:null,cy:null}};delete a.surface;delete a.group;delete a.type;delete a.draggable;b.setAttributes(a);b.addEvents("beforedestroy","destroy","render","mousedown","mouseup","mouseover","mouseout","mousemove","click");b.mixins.observable.constructor.apply(this,arguments)},initDraggable:function(){var a=this;a.draggable=true;if(!a.el){a.surface.createSpriteElement(a)}a.dd=new Ext.draw.SpriteDD(a,Ext.isBoolean(a.draggable)?null:a.draggable);a.on("beforedestroy",a.dd.destroy,a.dd)},setAttributes:function(l,o){var t=this,j=t.fontProperties,q=j.length,h=t.pathProperties,g=h.length,r=!!t.surface,a=r&&t.surface.customAttributes||{},c=t.attr,b=false,m,p,k,d,s,n,u,e;l=Ext.apply({},l);for(m in a){if(l.hasOwnProperty(m)&&typeof a[m]=="function"){Ext.apply(l,a[m].apply(t,[].concat(l[m])))}}if(!!l.hidden!==!!c.hidden){t.dirtyHidden=true}for(p=0;p-1)&&(p[o] in g)){p[o]=g[p[o]]}if(o=="hidden"&&r.type=="text"){continue}if(o in s){c.dom.setAttribute(o,s[o](p[o],r,m))}else{c.dom.setAttribute(o,p[o])}}}if(r.type=="text"){m.tuneText(r,p)}r.dirtyFont=false;b=j.style;if(b){c.setStyle(b)}r.dirty=false;if(Ext.isSafari3){m.webkitRect.show();setTimeout(function(){m.webkitRect.hide()})}},setClip:function(b,g){var e=this,d=g["clip-rect"],a,c;if(d){if(b.clip){b.clip.parentNode.parentNode.removeChild(b.clip.parentNode)}a=e.createSvgElement("clipPath");c=e.createSvgElement("rect");a.id=Ext.id(null,"ext-clip-");c.setAttribute("x",d.x);c.setAttribute("y",d.y);c.setAttribute("width",d.width);c.setAttribute("height",d.height);a.appendChild(c);e.getDefs().appendChild(a);b.el.dom.setAttribute("clip-path","url(#"+a.id+")");b.clip=c}},applyZIndex:function(d){var g=this,b=g.items,a=b.indexOf(d),e=d.el,c;if(g.el.dom.childNodes[a+2]!==e.dom){if(a>0){do{c=b.getAt(--a).el}while(!c&&a>0)}e.insertAfter(c||g.bgRect)}d.zIndexDirty=false},createItem:function(a){var b=new Ext.draw.Sprite(a);b.surface=this;return b},addGradient:function(h){h=Ext.draw.Draw.parseGradient(h);var e=this,d=h.stops.length,a=h.vector,l=Ext.isSafari&&!Ext.isStrict,j,g,k,c,b;b=e.gradientsMap||{};if(!l){if(h.type=="linear"){j=e.createSvgElement("linearGradient");j.setAttribute("x1",a[0]);j.setAttribute("y1",a[1]);j.setAttribute("x2",a[2]);j.setAttribute("y2",a[3])}else{j=e.createSvgElement("radialGradient");j.setAttribute("cx",h.centerX);j.setAttribute("cy",h.centerY);j.setAttribute("r",h.radius);if(Ext.isNumber(h.focalX)&&Ext.isNumber(h.focalY)){j.setAttribute("fx",h.focalX);j.setAttribute("fy",h.focalY)}}j.id=h.id;e.getDefs().appendChild(j);for(c=0;c"},text:function(u){var r=u.attr,q=c.exec(r.font),w=(q&&q[1])||"12",p=(q&&q[3])||"Arial",v=r.text,t=(Ext.isFF3_0||Ext.isFF3_5)?2:4,o="",s;u.getBBox();o+='';o+=Ext.htmlEncode(v)+"";s=d({x:r.x,y:r.y,"font-size":w,"font-family":p,"font-weight":r["font-weight"],"text-anchor":r["text-anchor"],fill:r.fill||"#000","fill-opacity":r.opacity,transform:u.matrix.toSvg()});return""+o+""},rect:function(p){var o=p.attr,q=d({x:o.x,y:o.y,rx:o.rx,ry:o.ry,width:o.width,height:o.height,fill:o.fill||"none","fill-opacity":o.opacity,stroke:o.stroke,"stroke-opacity":o["stroke-opacity"],"stroke-width":o["stroke-width"],transform:p.matrix&&p.matrix.toSvg()});return""},circle:function(p){var o=p.attr,q=d({cx:o.x,cy:o.y,r:o.radius,fill:o.translation.fill||o.fill||"none","fill-opacity":o.opacity,stroke:o.stroke,"stroke-opacity":o["stroke-opacity"],"stroke-width":o["stroke-width"],transform:p.matrix.toSvg()});return""},image:function(p){var o=p.attr,q=d({x:o.x-(o.width/2>>0),y:o.y-(o.height/2>>0),width:o.width,height:o.height,"xlink:href":o.src,transform:p.matrix.toSvg()});return""}},a=function(){var o='';o+='';return o},l=function(){var w='',p="",H,F,v,q,G,J,z,x,t,y,B,o,K,u,E,C,I,D,s,r;v=g.items.items;F=v.length;G=function(O){var V=O.childNodes,S=V.length,R=0,P,Q,L="",M,U,N,T;for(;R0){L+=G(M)}L+=""}return L};if(g.getDefs){p=G(g.getDefs())}else{x=g.gradientsColl;if(x){t=x.keys;y=x.items;B=0;o=t.length}for(;B';var A=q.colors.replace(j,"rgb($1|$2|$3)");A=A.replace(h,"rgba($1|$2|$3|$4)");J=A.split(",");for(E=0,I=J.length;E'}p+=""}}w+=""+p+"";w+=k.rect({attr:{width:"100%",height:"100%",fill:"#fff",stroke:"none",opacity:"0"}});D=new Array(F);for(E=0;E";return w},d=function(q){var p="",o;for(o in q){if(q.hasOwnProperty(o)&&q[o]!=null){p+=o+'="'+q[o]+'" '}}return p};return{singleton:true,generate:function(o,p){p=p||{};n(o);return a()+l()}}});Ext.define("Ext.draw.engine.Vml",{extend:"Ext.draw.Surface",requires:["Ext.draw.Draw","Ext.draw.Color","Ext.draw.Sprite","Ext.draw.Matrix","Ext.Element"],engine:"Vml",map:{M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},bitesRe:/([clmz]),?([^clmz]*)/gi,valRe:/-?[^,\s\-]+/g,fillUrlRe:/^url\(\s*['"]?([^\)]+?)['"]?\s*\)$/i,pathlike:/^(path|rect)$/,NonVmlPathRe:/[ahqstv]/ig,partialPathRe:/[clmz]/g,fontFamilyRe:/^['"]+|['"]+$/g,baseVmlCls:Ext.baseCSSPrefix+"vml-base",vmlGroupCls:Ext.baseCSSPrefix+"vml-group",spriteCls:Ext.baseCSSPrefix+"vml-sprite",measureSpanCls:Ext.baseCSSPrefix+"vml-measure-span",zoom:21600,coordsize:1000,coordorigin:"0 0",zIndexShift:0,orderSpritesByZIndex:false,path2vml:function(t){var n=this,u=n.NonVmlPathRe,b=n.map,e=n.valRe,s=n.zoom,d=n.bitesRe,g=Ext.Function.bind(Ext.draw.Draw.pathToAbsolute,Ext.draw.Draw),m,o,c,a,k,q,h,l;if(String(t).match(u)){g=Ext.Function.bind(Ext.draw.Draw.path2curve,Ext.draw.Draw)}else{if(!String(t).match(n.partialPathRe)){m=String(t).replace(d,function(r,w,j){var v=[],i=w.toLowerCase()=="m",p=b[w];j.replace(e,function(x){if(i&&v.length===2){p+=v+b[w=="m"?"l":"L"];v=[]}v.push(Math.round(x*s))});return p+v});return m}}o=g(t);m=[];for(k=0,q=o.length;k")}a.W=h.span.offsetWidth;a.H=h.span.offsetHeight+2;if(c["text-anchor"]=="middle"){e["v-text-align"]="center"}else{if(c["text-anchor"]=="end"){e["v-text-align"]="right";a.bbx=-Math.round(a.W/2)}else{e["v-text-align"]="left";a.bbx=Math.round(a.W/2)}}}a.X=c.x;a.Y=c.y;a.path.v=Ext.String.format("m{0},{1}l{2},{1}",Math.round(a.X*j),Math.round(a.Y*j),Math.round(a.X*j)+1);i.bbox.plain=null;i.bbox.transform=null;i.dirtyFont=false},setText:function(a,b){a.vml.textpath.string=Ext.htmlDecode(b)},hide:function(){this.el.hide()},show:function(){this.el.show()},hidePrim:function(a){a.el.addCls(Ext.baseCSSPrefix+"hide-visibility")},showPrim:function(a){a.el.removeCls(Ext.baseCSSPrefix+"hide-visibility")},setSize:function(b,a){var c=this;b=b||c.width;a=a||c.height;c.width=b;c.height=a;if(c.el){if(b!=undefined){c.el.setWidth(b)}if(a!=undefined){c.el.setHeight(a)}}c.callParent(arguments)},applyViewBox:function(){var g=this,h=g.viewBox,e=g.width,b=g.height,c,a,d;g.callParent();if(h&&(e||b)){c=g.items.items;a=c.length;for(d=0;d')}}catch(d){c.createNode=function(e){return g.createElement("<"+e+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}}if(!c.el){b=g.createElement("div");c.el=Ext.get(b);c.el.addCls(c.baseVmlCls);c.span=g.createElement("span");Ext.get(c.span).addCls(c.measureSpanCls);b.appendChild(c.span);c.el.setSize(c.width||0,c.height||0);a.appendChild(b);c.el.on({scope:c,mouseup:c.onMouseUp,mousedown:c.onMouseDown,mouseover:c.onMouseOver,mouseout:c.onMouseOut,mousemove:c.onMouseMove,mouseenter:c.onMouseEnter,mouseleave:c.onMouseLeave,click:c.onClick,dblclick:c.onDblClick})}c.renderAll()},renderAll:function(){this.items.each(this.renderItem,this)},redraw:function(a){a.dirty=true;this.renderItem(a)},renderItem:function(a){if(!this.el){return}if(!a.el){this.createSpriteElement(a)}if(a.dirty){this.applyAttrs(a);if(a.dirtyTransform){this.applyTransformations(a)}}},rotationCompensation:function(d,c,a){var b=new Ext.draw.Matrix();b.rotate(-d,0.5,0.5);return{x:b.x(c,a),y:b.y(c,a)}},transform:function(x,I){var H=this,b=H.getBBox(x,true),j=b.x+b.width*0.5,h=b.y+b.height*0.5,B=new Ext.draw.Matrix(),q=x.transformations,v=q.length,C=0,o=0,d=1,c=1,n="",g=x.el,E=g.dom,z=E.style,a=H.zoom,k=x.skew,D=H.viewBoxShift,G,F,s,l,r,p,A,w,u,t,e,m;for(;C32767){m[0]=32767}else{if(m[0]<-32768){m[0]=-32768}}if(m[1]>32767){m[1]=32767}else{if(m[1]<-32768){m[1]=-32768}}k.offset=m}else{z.filter=B.toFilter();z.left=Math.min(B.x(b.x,b.y),B.x(b.x+b.width,b.y),B.x(b.x,b.y+b.height),B.x(b.x+b.width,b.y+b.height))+"px";z.top=Math.min(B.y(b.x,b.y),B.y(b.x+b.width,b.y),B.y(b.x,b.y+b.height),B.y(b.x+b.width,b.y+b.height))+"px"}},createItem:function(a){return Ext.create("Ext.draw.Sprite",a)},getRegion:function(){return this.el.getRegion()},addCls:function(a,b){if(a&&a.el){a.el.addCls(b)}},removeCls:function(a,b){if(a&&a.el){a.el.removeCls(b)}},addGradient:function(g){var d=this.gradientsColl||(this.gradientsColl=Ext.create("Ext.util.MixedCollection")),a=[],j=Ext.create("Ext.util.MixedCollection"),l,e,b,h,k,c;j.addAll(g.stops);j.sortByKey("ASC",function(m,i){m=parseInt(m,10);i=parseInt(i,10);return m>i?1:(m'],initComponent:function(){this.callParent();this.addEvents("success","failure")},beforeRender:function(){this.callParent();Ext.applyIf(this.renderData,{swfId:this.getSwfId()})},afterRender:function(){var b=this,a=Ext.apply({},b.flashParams),c=Ext.apply({},b.flashVars);b.callParent();a=Ext.apply({allowScriptAccess:"always",bgcolor:b.backgroundColor,wmode:b.wmode},a);c=Ext.apply({allowedDomain:document.location.hostname},c);new swfobject.embedSWF(b.url,b.getSwfId(),b.swfWidth,b.swfHeight,b.flashVersion,b.expressInstall?b.statics.EXPRESS_INSTALL_URL:undefined,c,a,b.flashAttributes,Ext.bind(b.swfCallback,b))},swfCallback:function(b){var a=this;if(b.success){a.swf=Ext.get(b.ref);a.onSuccess();a.fireEvent("success",a)}else{a.onFailure();a.fireEvent("failure",a)}},getSwfId:function(){return this.swfId||(this.swfId="extswf"+this.getAutoId())},onSuccess:function(){this.swf.setStyle("visibility","inherit")},onFailure:Ext.emptyFn,beforeDestroy:function(){var b=this,a=b.swf;if(a){swfobject.removeSWF(b.getSwfId());Ext.destroy(a);delete b.swf}b.callParent()},statics:{EXPRESS_INSTALL_URL:"http://swfobject.googlecode.com/svn/trunk/swfobject/expressInstall.swf"}});Ext.define("Ext.form.action.Action",{alternateClassName:"Ext.form.Action",submitEmptyText:true,constructor:function(a){if(a){Ext.apply(this,a)}var b=a.params;if(Ext.isString(b)){this.params=Ext.Object.fromQueryString(b)}},run:Ext.emptyFn,onFailure:function(a){this.response=a;this.failureType=Ext.form.action.Action.CONNECT_FAILURE;this.form.afterAction(this,false)},processResponse:function(a){this.response=a;if(!a.responseText&&!a.responseXML){return true}return(this.result=this.handleResponse(a))},getUrl:function(){return this.url||this.form.url},getMethod:function(){return(this.method||this.form.method||"POST").toUpperCase()},getParams:function(){return Ext.apply({},this.params,this.form.baseParams)},createCallback:function(){var c=this,a,b=c.form;return{success:c.onSuccess,failure:c.onFailure,scope:c,timeout:(this.timeout*1000)||(b.timeout*1000),upload:b.fileUpload?c.onSuccess:a}},statics:{CLIENT_INVALID:"client",SERVER_INVALID:"server",CONNECT_FAILURE:"connect",LOAD_FAILURE:"load"}});Ext.define("Ext.form.action.Load",{extend:"Ext.form.action.Action",requires:["Ext.data.Connection"],alternateClassName:"Ext.form.Action.Load",alias:"formaction.load",type:"load",run:function(){Ext.Ajax.request(Ext.apply(this.createCallback(),{method:this.getMethod(),url:this.getUrl(),headers:this.headers,params:this.getParams()}))},onSuccess:function(b){var a=this.processResponse(b),c=this.form;if(a===true||!a.success||!a.data){this.failureType=Ext.form.action.Action.LOAD_FAILURE;c.afterAction(this,false);return}c.clearInvalid();c.setValues(a.data);c.afterAction(this,true)},handleResponse:function(c){var a=this.form.reader,b,d;if(a){b=a.read(c);d=b.records&&b.records[0]?b.records[0].data:null;return{success:b.success,data:d}}return Ext.decode(c.responseText)}});Ext.define("Ext.form.action.Submit",{extend:"Ext.form.action.Action",alternateClassName:"Ext.form.Action.Submit",alias:"formaction.submit",type:"submit",run:function(){var a=this.form;if(this.clientValidation===false||a.isValid()){this.doSubmit()}else{this.failureType=Ext.form.action.Action.CLIENT_INVALID;a.afterAction(this,false)}},doSubmit:function(){var b,a=Ext.apply(this.createCallback(),{url:this.getUrl(),method:this.getMethod(),headers:this.headers});if(this.form.hasUpload()){b=a.form=this.buildForm();a.isUpload=true}else{a.params=this.getParams()}Ext.Ajax.request(a);if(b){Ext.removeNode(b)}},getParams:function(){var c=false,b=this.callParent(),a=this.form.getValues(c,c,this.submitEmptyText!==c);return Ext.apply({},a,b)},buildForm:function(){var k=[],i,q,e=this.form,d=this.getParams(),c=[],g=e.getFields().items,h,r=g.length,j,o,m,n,l,p,b;for(h=0;hid="{id}">','','',"{beforeLabelTpl}",' class="{labelCls}"',' style="{labelStyle}">',"{beforeLabelTextTpl}",'{fieldLabel}{labelSeparator}',"{afterLabelTextTpl}","","{afterLabelTpl}","","",'',"{beforeBodyEl}","","{beforeLabelTpl}",'
','","
","{afterLabelTpl}","
","{beforeSubTpl}","{[values.$comp.getSubTplMarkup()]}","{afterSubTpl}","","{afterBodyEl}","","",'',"","",'',"{afterBodyEl}","","","",{disableFormats:true}],activeErrorsTpl:['','
  • {.}
',"
"],isFieldLabelable:true,formItemCls:Ext.baseCSSPrefix+"form-item",labelCls:Ext.baseCSSPrefix+"form-item-label",errorMsgCls:Ext.baseCSSPrefix+"form-error-msg",baseBodyCls:Ext.baseCSSPrefix+"form-item-body",fieldBodyCls:"",clearCls:Ext.baseCSSPrefix+"clear",invalidCls:Ext.baseCSSPrefix+"form-invalid",fieldLabel:undefined,labelAlign:"left",labelWidth:100,labelPad:5,labelSeparator:":",hideLabel:false,hideEmptyLabel:true,preventMark:false,autoFitErrors:true,msgTarget:"qtip",noWrap:true,labelableInsertions:["beforeBodyEl","afterBodyEl","beforeLabelTpl","afterLabelTpl","beforeSubTpl","afterSubTpl","beforeLabelTextTpl","afterLabelTextTpl","labelAttrTpl"],labelableRenderProps:["allowBlank","id","labelAlign","fieldBodyCls","baseBodyCls","clearCls","labelSeparator","msgTarget"],initLabelable:function(){var a=this,b=a.padding;if(b){a.padding=undefined;a.extraMargins=Ext.Element.parseBox(b)}a.addCls(a.formItemCls);a.lastActiveError="";a.addEvents("errorchange")},trimLabelSeparator:function(){var c=this,d=c.labelSeparator,a=c.fieldLabel||"",b=a.substr(a.length-1);return b===d?a.slice(0,-1):a},getFieldLabel:function(){return this.trimLabelSeparator()},setFieldLabel:function(b){b=b||"";var c=this,d=c.labelSeparator,a=c.labelEl;c.fieldLabel=b;if(c.rendered){if(Ext.isEmpty(b)&&c.hideEmptyLabel){a.parent().setDisplayed("none")}else{if(d){b=c.trimLabelSeparator()+d}a.update(b);a.parent().setDisplayed("")}c.updateLayout()}},getInsertionRenderData:function(d,e){var b=e.length,a,c;while(b--){a=e[b];c=this[a];if(c){if(typeof c!="string"){if(!c.isTemplate){c=Ext.XTemplate.getTpl(this,a)}c=c.apply(d)}}d[a]=c||""}return d},getLabelableRenderData:function(){var b=this,c,d,a=b.labelAlign==="top";if(!Ext.form.Labelable.errorIconWidth){Ext.form.Labelable.errorIconWidth=(d=Ext.resetElement.createChild({style:"position:absolute",cls:Ext.baseCSSPrefix+"form-invalid-icon"})).getWidth();d.remove()}c=Ext.copyTo({inFormLayout:b.ownerLayout&&b.ownerLayout.type==="form",inputId:b.getInputId(),labelOnLeft:!a,hideLabel:!b.hasVisibleLabel(),fieldLabel:b.getFieldLabel(),labelCellStyle:b.getLabelCellStyle(),labelCellAttrs:b.getLabelCellAttrs(),labelCls:b.getLabelCls(),labelStyle:b.getLabelStyle(),bodyColspan:b.getBodyColspan(),externalError:!b.autoFitErrors,errorMsgCls:b.getErrorMsgCls(),errorIconWidth:Ext.form.Labelable.errorIconWidth},b,b.labelableRenderProps,true);b.getInsertionRenderData(c,b.labelableInsertions);return c},beforeLabelableRender:function(){var a=this;if(a.ownerLayout){a.addCls(Ext.baseCSSPrefix+a.ownerLayout.type+"-form-item")}},onLabelableRender:function(){var c=this,d,a,b={};if(c.extraMargins){d=c.el.getMargin();for(a in d){if(d.hasOwnProperty(a)){b["margin-"+a]=(d[a]+c.extraMargins[a])+"px"}}c.el.setStyle(b)}},hasVisibleLabel:function(){if(this.hideLabel){return false}return !(this.hideEmptyLabel&&!this.getFieldLabel())},getBodyColspan:function(){var b=this,a;if(b.msgTarget==="side"&&(!b.autoFitErrors||b.hasActiveError())){a=1}else{a=2}if(b.labelAlign!=="top"&&!b.hasVisibleLabel()){a++}return a},getLabelCls:function(){var b=this.labelCls,a=this.labelClsExtra;if(this.labelAlign==="top"){b+="-top"}return a?b+" "+a:b},getLabelCellStyle:function(){var b=this,a=b.hideLabel||(!b.fieldLabel&&b.hideEmptyLabel);return a?"display:none;":""},getErrorMsgCls:function(){var b=this,a=(b.hideLabel||(!b.fieldLabel&&b.hideEmptyLabel));return b.errorMsgCls+(!a&&b.labelAlign==="top"?" "+Ext.baseCSSPrefix+"lbl-top-err-icon":"")},getLabelCellAttrs:function(){var c=this,b=c.labelAlign,a="";if(b!=="top"){a='valign="top" halign="'+b+'" width="'+(c.labelWidth+c.labelPad)+'"'}return a+' class="'+Ext.baseCSSPrefix+'field-label-cell"'},getLabelStyle:function(){var c=this,b=c.labelPad,a="";if(c.labelAlign!=="top"){if(c.labelWidth){a="width:"+c.labelWidth+"px;"}a+="margin-right:"+b+"px;"}return a+(c.labelStyle||"")},getSubTplMarkup:function(){return""},getInputId:function(){return""},getActiveError:function(){return this.activeError||""},hasActiveError:function(){return !!this.getActiveError()},setActiveError:function(a){this.setActiveErrors(a)},getActiveErrors:function(){return this.activeErrors||[]},setActiveErrors:function(a){a=Ext.Array.from(a);this.activeError=a[0];this.activeErrors=a;this.activeError=this.getTpl("activeErrorsTpl").apply({errors:a});this.renderActiveError()},unsetActiveError:function(){delete this.activeError;delete this.activeErrors;this.renderActiveError()},renderActiveError:function(){var c=this,b=c.getActiveError(),a=!!b;if(b!==c.lastActiveError){c.fireEvent("errorchange",c,b);c.lastActiveError=b}if(c.rendered&&!c.isDestroyed&&!c.preventMark){c.el[a?"addCls":"removeCls"](c.invalidCls);c.getActionEl().dom.setAttribute("aria-invalid",a);if(c.errorEl){c.errorEl.dom.innerHTML=b}}},setFieldDefaults:function(c){var b=this,d,a;for(a in c){if(c.hasOwnProperty(a)){d=c[a];if(!b.hasOwnProperty(a)){b[a]=d}}}}});Ext.define("Ext.form.field.Field",{isFormField:true,disabled:false,submitValue:true,validateOnChange:true,suspendCheckChange:0,initField:function(){this.addEvents("change","validitychange","dirtychange");this.initValue()},initValue:function(){var a=this;a.value=a.transformOriginalValue(a.value);a.originalValue=a.lastValue=a.value;a.suspendCheckChange++;a.setValue(a.value);a.suspendCheckChange--},transformOriginalValue:function(a){return a},getName:function(){return this.name},getValue:function(){return this.value},setValue:function(b){var a=this;a.value=b;a.checkChange();return a},isEqual:function(b,a){return String(b)===String(a)},isEqualAsString:function(b,a){return String(Ext.value(b,""))===String(Ext.value(a,""))},getSubmitData:function(){var a=this,b=null;if(!a.disabled&&a.submitValue&&!a.isFileUpload()){b={};b[a.getName()]=""+a.getValue()}return b},getModelData:function(){var a=this,b=null;if(!a.disabled&&!a.isFileUpload()){b={};b[a.getName()]=a.getValue()}return b},reset:function(){var a=this;a.beforeReset();a.setValue(a.originalValue);a.clearInvalid();delete a.wasValid},beforeReset:Ext.emptyFn,resetOriginalValue:function(){this.originalValue=this.getValue();this.checkDirty()},checkChange:function(){if(!this.suspendCheckChange){var c=this,b=c.getValue(),a=c.lastValue;if(!c.isEqual(b,a)&&!c.isDestroyed){c.lastValue=b;c.fireEvent("change",c,b,a);c.onChange(b,a)}}},onChange:function(b,a){if(this.validateOnChange){this.validate()}this.checkDirty()},isDirty:function(){var a=this;return !a.disabled&&!a.isEqual(a.getValue(),a.originalValue)},checkDirty:function(){var a=this,b=a.isDirty();if(b!==a.wasDirty){a.fireEvent("dirtychange",a,b);a.onDirtyChange(b);a.wasDirty=b}},onDirtyChange:Ext.emptyFn,getErrors:function(a){return[]},isValid:function(){var a=this;return a.disabled||Ext.isEmpty(a.getErrors())},validate:function(){var a=this,b=a.isValid();if(b!==a.wasValid){a.wasValid=b;a.fireEvent("validitychange",a,b)}return b},batchChanges:function(a){try{this.suspendCheckChange++;a()}catch(b){throw b}finally{this.suspendCheckChange--}this.checkChange()},isFileUpload:function(){return false},extractFileInput:function(){return null},markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn});Ext.define("Ext.form.field.Base",{extend:"Ext.Component",mixins:{labelable:"Ext.form.Labelable",field:"Ext.form.field.Field"},alias:"widget.field",alternateClassName:["Ext.form.Field","Ext.form.BaseField"],requires:["Ext.util.DelayedTask","Ext.XTemplate","Ext.layout.component.field.Field"],fieldSubTpl:[' name="{name}"
',' value="{[Ext.util.Format.htmlEncode(values.value)]}"',' placeholder="{placeholder}"','{%if (values.maxLength !== undefined){%} maxlength="{maxLength}"{%}%}',' readonly="readonly"',' disabled="disabled"',' tabIndex="{tabIdx}"',' style="{fieldStyle}"',' class="{fieldCls} {typeCls} {editableCls}" autocomplete="off"/>',{disableFormats:true}],subTplInsertions:["inputAttrTpl"],inputType:"text",invalidText:"The value in this field is invalid",fieldCls:Ext.baseCSSPrefix+"form-field",focusCls:"form-focus",dirtyCls:Ext.baseCSSPrefix+"form-dirty",checkChangeEvents:Ext.isIE&&(!document.documentMode||document.documentMode<9)?["change","propertychange"]:["change","input","textInput","keyup","dragdrop"],checkChangeBuffer:50,componentLayout:"field",readOnly:false,readOnlyCls:Ext.baseCSSPrefix+"form-readonly",validateOnBlur:true,hasFocus:false,baseCls:Ext.baseCSSPrefix+"field",maskOnDisable:false,initComponent:function(){var a=this;a.callParent();a.subTplData=a.subTplData||{};a.addEvents("specialkey","writeablechange");a.initLabelable();a.initField();if(!a.name){a.name=a.getInputId()}},beforeRender:function(){var a=this;a.callParent(arguments);a.beforeLabelableRender(arguments);if(a.readOnly){a.addCls(a.readOnlyCls)}},getInputId:function(){return this.inputId||(this.inputId=this.id+"-inputEl")},getSubTplData:function(){var c=this,b=c.inputType,a=c.getInputId(),d;d=Ext.apply({id:a,cmpId:c.id,name:c.name||a,disabled:c.disabled,readOnly:c.readOnly,value:c.getRawValue(),type:b,fieldCls:c.fieldCls,fieldStyle:c.getFieldStyle(),tabIdx:c.tabIndex,typeCls:Ext.baseCSSPrefix+"form-"+(b==="password"?"text":b)},c.subTplData);c.getInsertionRenderData(d,c.subTplInsertions);return d},afterFirstLayout:function(){this.callParent();var a=this.inputEl;if(a){a.selectable()}},applyRenderSelectors:function(){var a=this;a.callParent();a.inputEl=a.el.getById(a.getInputId())},getSubTplMarkup:function(){return this.getTpl("fieldSubTpl").apply(this.getSubTplData())},initRenderTpl:function(){var a=this;if(!a.hasOwnProperty("renderTpl")){a.renderTpl=a.getTpl("labelableRenderTpl")}return a.callParent()},initRenderData:function(){return Ext.applyIf(this.callParent(),this.getLabelableRenderData())},setFieldStyle:function(a){var b=this,c=b.inputEl;if(c){c.applyStyles(a)}b.fieldStyle=a},getFieldStyle:function(){return"width:100%;"+(Ext.isObject(this.fieldStyle)?Ext.DomHelper.generateStyles(this.fieldStyle):this.fieldStyle||"")},onRender:function(){var a=this;a.callParent(arguments);a.onLabelableRender();a.renderActiveError()},getFocusEl:function(){return this.inputEl},isFileUpload:function(){return this.inputType==="file"},extractFileInput:function(){var b=this,a=b.isFileUpload()?b.inputEl.dom:null,c;if(a){c=a.cloneNode(true);a.parentNode.replaceChild(c,a);b.inputEl=Ext.get(c)}return a},getSubmitData:function(){var a=this,b=null,c;if(!a.disabled&&a.submitValue&&!a.isFileUpload()){c=a.getSubmitValue();if(c!==null){b={};b[a.getName()]=c}}return b},getSubmitValue:function(){return this.processRawValue(this.getRawValue())},getRawValue:function(){var b=this,a=(b.inputEl?b.inputEl.getValue():Ext.value(b.rawValue,""));b.rawValue=a;return a},setRawValue:function(b){var a=this;b=Ext.value(a.transformRawValue(b),"");a.rawValue=b;if(a.inputEl){a.inputEl.dom.value=b}return b},transformRawValue:function(a){return a},valueToRaw:function(a){return""+Ext.value(a,"")},rawToValue:function(a){return a},processRawValue:function(a){return a},getValue:function(){var a=this,b=a.rawToValue(a.processRawValue(a.getRawValue()));a.value=b;return b},setValue:function(b){var a=this;a.setRawValue(a.valueToRaw(b));return a.mixins.field.setValue.call(a,b)},onBoxReady:function(){var a=this;a.callParent();if(a.setReadOnlyOnBoxReady){a.setReadOnly(a.readOnly)}},onDisable:function(){var a=this,b=a.inputEl;a.callParent();if(b){b.dom.disabled=true;if(a.hasActiveError()){a.clearInvalid();a.needsValidateOnEnable=true}}},onEnable:function(){var a=this,b=a.inputEl;a.callParent();if(b){b.dom.disabled=false;if(a.needsValidateOnEnable){delete a.needsValidateOnEnable;a.forceValidation=true;a.isValid();delete a.forceValidation}}},setReadOnly:function(c){var a=this,b=a.inputEl;c=!!c;a[c?"addCls":"removeCls"](a.readOnlyCls);a.readOnly=c;if(b){b.dom.readOnly=c}else{if(a.rendering){a.setReadOnlyOnBoxReady=true}}a.fireEvent("writeablechange",a,c)},fireKey:function(a){if(a.isSpecialKey()){this.fireEvent("specialkey",this,new Ext.EventObjectImpl(a))}},initEvents:function(){var g=this,i=g.inputEl,b,j,c=g.checkChangeEvents,h,a=c.length,d;if(g.inEditor){g.onBlur=Ext.Function.createBuffered(g.onBlur,10)}if(i){g.mon(i,Ext.EventManager.getKeyEvent(),g.fireKey,g);b=new Ext.util.DelayedTask(g.checkChange,g);g.onChangeEvent=j=function(){b.delay(g.checkChangeBuffer)};for(h=0;hg.maxLength){k.push(j(g.maxLengthText,g.maxLength))}if(e){if(!h[e](l,g)){k.push(g.vtypeText||h[e+"Text"])}}if(i&&!i.test(l)){k.push(g.regexText||g.invalidText)}return k},selectText:function(i,a){var h=this,c=h.getRawValue(),d=true,g=h.inputEl.dom,e,b;if(c.length>0){i=i===e?0:i;a=a===e?c.length:a;if(g.setSelectionRange){g.setSelectionRange(i,a)}else{if(g.createTextRange){b=g.createTextRange();b.moveStart("character",i);b.moveEnd("character",a-c.length);b.select()}}d=Ext.isGecko||Ext.isOpera}if(d){h.focus()}},autoSize:function(){var a=this;if(a.grow&&a.rendered){a.autoSizing=true;a.updateLayout()}},afterComponentLayout:function(){var b=this,a;b.callParent(arguments);if(b.autoSizing){a=b.inputEl.getWidth();if(a!==b.lastInputWidth){b.fireEvent("autosize",b,a);b.lastInputWidth=a;delete b.autoSizing}}}});Ext.define("Ext.layout.component.field.TextArea",{extend:"Ext.layout.component.field.Text",alias:"layout.textareafield",type:"textareafield",canGrowWidth:false,naturalSizingProp:"cols",beginLayout:function(a){this.callParent(arguments);a.target.inputEl.setStyle("height","")},measureContentHeight:function(b){var e=this,a=e.owner,k=e.callParent(arguments),c,i,h,g,d,j;if(a.grow&&!b.state.growHandled){c=b.inputContext;i=a.inputEl;d=i.getWidth(true);h=Ext.util.Format.htmlEncode(i.dom.value)||" ";h+=a.growAppend;h=h.replace(/\n/g,"
");j=Ext.util.TextMetrics.measure(i,h,d).height+c.getBorderInfo().height+c.getPaddingInfo().height;j=Ext.Number.constrain(j,a.growMin,a.growMax);c.setHeight(j);b.state.growHandled=true;c.domBlock(e,"height");k=NaN}return k}});Ext.define("Ext.form.field.TextArea",{extend:"Ext.form.field.Text",alias:["widget.textareafield","widget.textarea"],alternateClassName:"Ext.form.TextArea",requires:["Ext.XTemplate","Ext.layout.component.field.TextArea","Ext.util.DelayedTask"],fieldSubTpl:['",{disableFormats:true}],growMin:60,growMax:1000,growAppend:"\n-",cols:20,rows:4,enterIsSpecial:false,preventScrollbars:false,componentLayout:"textareafield",setGrowSizePolicy:Ext.emptyFn,returnRe:/\r/g,getSubTplData:function(){var c=this,b=c.getFieldStyle(),a=c.callParent();if(c.grow){if(c.preventScrollbars){a.fieldStyle=(b||"")+";overflow:hidden;height:"+c.growMin+"px"}}Ext.applyIf(a,{cols:c.cols,rows:c.rows});return a},afterRender:function(){var a=this;a.callParent(arguments);a.needsMaxCheck=a.enforceMaxLength&&a.maxLength!==Number.MAX_VALUE&&!Ext.supports.TextAreaMaxLength;if(a.needsMaxCheck){a.inputEl.on("paste",a.onPaste,a)}},transformRawValue:function(a){return this.stripReturns(a)},transformOriginalValue:function(a){return this.stripReturns(a)},valueToRaw:function(a){a=this.stripReturns(a);return this.callParent([a])},stripReturns:function(a){if(a){a=a.replace(this.returnRe,"")}return a},onPaste:function(b){var a=this;if(!a.pasteTask){a.pasteTask=new Ext.util.DelayedTask(a.pasteCheck,a)}a.pasteTask.delay(1)},pasteCheck:function(){var b=this,c=b.getValue(),a=b.maxLength;if(c.length>a){c=c.substr(0,a);b.setValue(c)}},fireKey:function(d){var b=this,a=d.getKey(),c;if(d.isSpecialKey()&&(b.enterIsSpecial||(a!==d.ENTER||d.hasModifier()))){b.fireEvent("specialkey",b,d)}if(b.needsMaxCheck&&a!==d.BACKSPACE&&a!==d.DELETE&&!d.isNavKeyPress()&&!b.isCutCopyPasteSelectAll(d,a)){c=b.getValue();if(c.length>=b.maxLength){d.stopEvent()}}},isCutCopyPasteSelectAll:function(b,a){if(b.CTRL){return a===b.A||a===b.C||a===b.V||a===b.X}return false},autoSize:function(){var b=this,a;if(b.grow&&b.rendered){b.updateLayout();a=b.inputEl.getHeight();if(a!==b.lastInputHeight){b.fireEvent("autosize",b,a);b.lastInputHeight=a}}},initAria:function(){this.callParent(arguments);this.getActionEl().dom.setAttribute("aria-multiline",true)},beforeDestroy:function(){var a=this.pasteTask;if(a){a.delay()}this.callParent()}});Ext.define("Ext.form.field.Display",{extend:"Ext.form.field.Base",alias:"widget.displayfield",requires:["Ext.util.Format","Ext.XTemplate"],alternateClassName:["Ext.form.DisplayField","Ext.form.Display"],fieldSubTpl:['
style="{fieldStyle}"',' class="{fieldCls}">{value}
',{compiled:true,disableFormats:true}],fieldCls:Ext.baseCSSPrefix+"form-display-field",htmlEncode:false,validateOnChange:false,initEvents:Ext.emptyFn,submitValue:false,isDirty:function(){return false},isValid:function(){return true},validate:function(){return true},getRawValue:function(){return this.rawValue},setRawValue:function(b){var a=this,c;b=Ext.value(b,"");a.rawValue=b;if(a.rendered){a.inputEl.dom.innerHTML=a.getDisplayValue();a.updateLayout()}return b},getDisplayValue:function(){var a=this,b=this.getRawValue(),c;if(a.renderer){c=a.renderer.call(a.scope||a,b,a)}else{c=a.htmlEncode?Ext.util.Format.htmlEncode(b):b}return c},getSubTplData:function(){var a=this.callParent(arguments);a.value=this.getDisplayValue();return a}});Ext.define("Ext.layout.container.Anchor",{alias:"layout.anchor",extend:"Ext.layout.container.Container",alternateClassName:"Ext.layout.AnchorLayout",type:"anchor",manageOverflow:2,renderTpl:["{%this.renderBody(out,values);this.renderPadder(out,values)%}"],defaultAnchor:"100%",parseAnchorRE:/^(r|right|b|bottom)$/i,beginLayout:function(c){var j=this,a=0,g,k,e,d,b,h;j.callParent(arguments);e=c.childItems;b=e.length;for(d=0;d','','',"{% this.renderColumn(out,parent,xindex-1) %}","","",""],lastOwnerItemsGeneration:null,beginLayout:function(b){var k=this,e,d,h,a,j,g=0,m=0,l=k.autoFlex,c=k.innerCt.dom.style;k.callParent(arguments);e=k.columnNodes;b.innerCtContext=b.getEl("innerCt",k);if(!b.widthModel.shrinkWrap){d=e.length;if(k.columnsArray){for(h=0;ha){d=b-a;g=e.rowEl;for(c=0;c',"{%this.renderContainer(out,values);%}",""],stateEvents:["collapse","expand"],maskOnDisable:false,beforeDestroy:function(){var b=this,a=b.legend;if(a){delete a.ownerCt;a.destroy();b.legend=null}b.callParent()},initComponent:function(){var b=this,a=b.baseCls;b.callParent();b.addEvents("beforeexpand","beforecollapse","expand","collapse");if(b.collapsed){b.addCls(a+"-collapsed");b.collapse()}if(b.title){b.addCls(a+"-with-title")}if(b.title||b.checkboxToggle||b.collapsible){b.addCls(a+"-with-legend");b.legend=Ext.widget(b.createLegendCt())}},initRenderData:function(){var a=this.callParent();a.baseCls=this.baseCls;return a},getState:function(){var a=this.callParent();a=this.addPropertyToState(a,"collapsed");return a},afterCollapse:Ext.emptyFn,afterExpand:Ext.emptyFn,collapsedHorizontal:function(){return true},collapsedVertical:function(){return true},createLegendCt:function(){var c=this,a=[],b={xtype:"container",baseCls:c.baseCls+"-header",id:c.id+"-legend",autoEl:"legend",items:a,ownerCt:c,ownerLayout:c.componentLayout};if(c.checkboxToggle){a.push(c.createCheckboxCmp())}else{if(c.collapsible){a.push(c.createToggleCmp())}}a.push(c.createTitleCmp());return b},createTitleCmp:function(){var b=this,a={xtype:"component",html:b.title,cls:b.baseCls+"-header-text",id:b.id+"-legendTitle"};if(b.collapsible&&b.toggleOnTitleClick){a.listeners={el:{scope:b,click:b.toggle}};a.cls+=" "+b.baseCls+"-header-text-collapsible"}return(b.titleCmp=Ext.widget(a))},createCheckboxCmp:function(){var a=this,b="-checkbox";a.checkboxCmp=Ext.widget({xtype:"checkbox",hideEmptyLabel:true,name:a.checkboxName||a.id+b,cls:a.baseCls+"-header"+b,id:a.id+"-legendChk",checked:!a.collapsed,listeners:{change:a.onCheckChange,scope:a}});return a.checkboxCmp},createToggleCmp:function(){var a=this;a.toggleCmp=Ext.widget({xtype:"tool",type:"toggle",handler:a.toggle,id:a.id+"-legendToggle",scope:a});return a.toggleCmp},doRenderLegend:function(b,e){var d=e.$comp,c=d.legend,a;if(c){c.ownerLayout.configureItem(c);a=c.getRenderTree();Ext.DomHelper.generateMarkup(a,b)}},finishRender:function(){var a=this.legend;this.callParent();if(a){a.finishRender()}},getCollapsed:function(){return this.collapsed?"top":false},getCollapsedDockedItems:function(){var a=this.legend;return a?[a]:[]},setTitle:function(c){var b=this,a=b.legend;b.title=c;if(b.rendered){if(!b.legend){b.legend=a=Ext.widget(b.createLegendCt());a.ownerLayout.configureItem(a);a.render(b.el,0)}b.titleCmp.update(c)}return b},getTargetEl:function(){return this.body||this.frameBody||this.el},getContentTarget:function(){return this.body},expand:function(){return this.setExpanded(true)},collapse:function(){return this.setExpanded(false)},setExpanded:function(b){var c=this,d=c.checkboxCmp,a=b?"expand":"collapse";if(!c.rendered||c.fireEvent("before"+a,c)!==false){b=!!b;if(d){d.setValue(b)}if(b){c.removeCls(c.baseCls+"-collapsed")}else{c.addCls(c.baseCls+"-collapsed")}c.collapsed=!b;if(c.rendered){c.updateLayout({isRoot:false});c.fireEvent(a,c)}}return c},getRefItems:function(a){var c=this.callParent(arguments),b=this.legend;if(b){c.unshift(b);if(a){c.unshift.apply(c,b.getRefItems(true))}}return c},toggle:function(){this.setExpanded(!!this.collapsed)},onCheckChange:function(b,a){this.setExpanded(a)},setupRenderTpl:function(a){this.callParent(arguments);a.renderLegend=this.doRenderLegend}});Ext.define("Ext.form.Label",{extend:"Ext.Component",alias:"widget.label",requires:["Ext.util.Format"],autoEl:"label",maskOnDisable:false,getElConfig:function(){var a=this;a.html=a.text?Ext.util.Format.htmlEncode(a.text):(a.html||"");return Ext.apply(a.callParent(),{htmlFor:a.forId||""})},setText:function(c,b){var a=this;b=b!==false;if(b){a.text=c;delete a.html}else{a.html=c;delete a.text}if(a.rendered){a.el.dom.innerHTML=b!==false?Ext.util.Format.htmlEncode(c):c;a.updateLayout()}return a}});Ext.define("Ext.form.Panel",{extend:"Ext.panel.Panel",mixins:{fieldAncestor:"Ext.form.FieldAncestor"},alias:"widget.form",alternateClassName:["Ext.FormPanel","Ext.form.FormPanel"],requires:["Ext.form.Basic","Ext.util.TaskRunner"],layout:"anchor",ariaRole:"form",basicFormConfigs:["api","baseParams","errorReader","method","paramOrder","paramsAsHash","reader","standardSubmit","timeout","trackResetOnLoad","url","waitMsgTarget","waitTitle"],initComponent:function(){var a=this;if(a.frame){a.border=false}a.initFieldAncestor();a.callParent();a.relayEvents(a.form,["beforeaction","actionfailed","actioncomplete","validitychange","dirtychange"]);if(a.pollForChanges){a.startPolling(a.pollInterval||500)}},initItems:function(){var a=this;a.form=a.createForm();a.callParent()},afterFirstLayout:function(){this.callParent();this.form.initialize()},createForm:function(){var b={},d=this.basicFormConfigs,a=d.length,c=0,e;for(;c","{beforeBoxLabelTpl}",'","{afterBoxLabelTpl}","
",' tabIndex="{tabIdx}"
',' disabled="disabled"',' style="{fieldStyle}"',' class="{fieldCls} {typeCls}" autocomplete="off" hidefocus="true" />',"","{beforeBoxLabelTpl}",'","{afterBoxLabelTpl}","",{disableFormats:true,compiled:true}],subTplInsertions:["beforeBoxLabelTpl","afterBoxLabelTpl","beforeBoxLabelTextTpl","afterBoxLabelTextTpl","boxLabelAttrTpl","inputAttrTpl"],isCheckbox:true,focusCls:"form-cb-focus",fieldBodyCls:Ext.baseCSSPrefix+"form-cb-wrap",checked:false,checkedCls:Ext.baseCSSPrefix+"form-cb-checked",boxLabelCls:Ext.baseCSSPrefix+"form-cb-label",boxLabelAlign:"after",inputValue:"on",checkChangeEvents:[],inputType:"checkbox",onRe:/^on$/i,initComponent:function(){this.callParent(arguments);this.getManager().add(this)},initValue:function(){var b=this,a=!!b.checked;b.originalValue=b.lastValue=a;b.setValue(a)},getElConfig:function(){var a=this;if(a.isChecked(a.rawValue,a.inputValue)){a.addCls(a.checkedCls)}return a.callParent()},getFieldStyle:function(){return Ext.isObject(this.fieldStyle)?Ext.DomHelper.generateStyles(this.fieldStyle):this.fieldStyle||""},getSubTplData:function(){var a=this;return Ext.apply(a.callParent(),{disabled:a.readOnly||a.disabled,boxLabel:a.boxLabel,boxLabelCls:a.boxLabelCls,boxLabelAlign:a.boxLabelAlign})},initEvents:function(){var a=this;a.callParent();a.mon(a.inputEl,"click",a.onBoxClick,a)},onBoxClick:function(b){var a=this;if(!a.disabled&&!a.readOnly){this.setValue(!this.checked)}},getRawValue:function(){return this.checked},getValue:function(){return this.checked},getSubmitValue:function(){var a=this.uncheckedValue,b=Ext.isDefined(a)?a:null;return this.checked?this.inputValue:b},isChecked:function(b,a){return(b===true||b==="true"||b==="1"||b===1||(((Ext.isString(b)||Ext.isNumber(b))&&a)?b==a:this.onRe.test(b)))},setRawValue:function(c){var b=this,d=b.inputEl,a=b.isChecked(c,b.inputValue);if(d){b[a?"addCls":"removeCls"](b.checkedCls)}b.checked=b.rawValue=a;return a},setValue:function(g){var e=this,c,b,a,d;if(Ext.isArray(g)){c=e.getManager().getByName(e.name,e.getFormId()).items;a=c.length;for(b=0;bc){c=g;k=m}}a=Math.max(h.callParent(arguments),b.inputEl.getTextWidth(k+b.growAppend));if(!h.startingWidth||b.removingRecords){h.startingWidth=a;if(a'+b+""+a.getTriggerMarkup()+""},getSubTplData:function(){var b=this,c=b.callParent(),d=b.readOnly===true,a=b.editable!==false;return Ext.apply(c,{editableCls:(d||!a)?" "+b.triggerNoEditCls:"",readOnly:!a||d})},getLabelableRenderData:function(){var b=this,c=b.triggerWrapCls,a=b.callParent(arguments);return Ext.applyIf(a,{triggerWrapCls:c,triggerMarkup:b.getTriggerMarkup()})},getTriggerMarkup:function(){var c=this,b=0,d=(c.readOnly||c.hideTrigger),g,e=c.triggerBaseCls,a=[];if(!c.trigger1Cls){c.trigger1Cls=c.triggerCls}for(b=0;(g=c["trigger"+(b+1)+"Cls"])||b<1;b++){a.push({tag:"td",valign:"top",cls:Ext.baseCSSPrefix+"trigger-cell",style:"width:"+c.triggerWidth+(d?"px;display:none":"px"),cn:{cls:[Ext.baseCSSPrefix+"trigger-index-"+b,e,g].join(" "),role:"button"}})}a[b-1].cn.cls+=" "+e+"-last";return Ext.DomHelper.markup(a)},disableCheck:function(){return !this.disabled},beforeRender:function(){var a=this,b=a.triggerBaseCls,c;if(!a.triggerWidth){c=Ext.resetElement.createChild({style:"position: absolute;",cls:Ext.baseCSSPrefix+"form-trigger"});Ext.form.field.Trigger.prototype.triggerWidth=c.getWidth();c.remove()}a.callParent();if(b!=Ext.baseCSSPrefix+"form-trigger"){a.addChildEls({name:"triggerEl",select:"."+b})}a.lastTriggerStateFlags=a.getTriggerStateFlags()},onRender:function(){var a=this;a.callParent(arguments);a.doc=Ext.getDoc();a.initTrigger();a.triggerEl.unselectable()},getTriggerWidth:function(){var b=this,a=0;if(b.triggerWrap&&!b.hideTrigger&&!b.readOnly){a=b.triggerEl.getCount()*b.triggerWidth}return a},setHideTrigger:function(a){if(a!=this.hideTrigger){this.hideTrigger=a;this.updateLayout()}},setEditable:function(a){if(a!=this.editable){this.editable=a;this.updateLayout()}},setReadOnly:function(a){if(a!=this.readOnly){this.readOnly=a;this.updateLayout()}},initTrigger:function(){var h=this,i=h.triggerWrap,k=h.triggerEl,a=h.disableCheck,d,c,b,g,j;if(h.repeatTriggerClick){h.triggerRepeater=new Ext.util.ClickRepeater(i,{preventDefault:true,handler:h.onTriggerWrapClick,listeners:{mouseup:h.onTriggerWrapMouseup,scope:h},scope:h})}else{h.mon(i,{click:h.onTriggerWrapClick,mouseup:h.onTriggerWrapMouseup,scope:h})}k.setVisibilityMode(Ext.Element.DISPLAY);k.addClsOnOver(h.triggerBaseCls+"-over",a,h);d=k.elements;c=d.length;for(g=0;g1){b.doSelect(a,c,false)}else{b.doSelect(a,false)}}}}break;case"SIMPLE":if(b.isSelected(a)){b.doDeselect(a)}else{b.doSelect(a,true)}break;case"SINGLE":if(b.allowDeselect&&b.isSelected(a)){b.doDeselect(a)}else{b.doSelect(a,false)}break}},selectRange:function(l,e,m,c){var j=this,k=j.store,d=0,h,g,a,b=[];if(j.isLocked()){return}if(!m){j.deselectAll(true)}if(!Ext.isNumber(l)){l=k.indexOf(l)}if(!Ext.isNumber(e)){e=k.indexOf(e)}if(l>e){g=e;e=l;l=g}for(h=l;h<=e;h++){if(j.isSelected(k.getAt(h))){d++}}if(!c){a=-1}else{a=(c=="up")?l:e}for(h=l;h<=e;h++){if(d==(e-l+1)){if(h!=a){j.doDeselect(h,true)}}else{b.push(k.getAt(h))}}j.doMultiSelect(b,true)},select:function(b,c,a){if(Ext.isDefined(b)){this.doSelect(b,c,a)}},deselect:function(b,a){this.doDeselect(b,a)},doSelect:function(c,e,b){var d=this,a;if(d.locked||!d.store){return}if(typeof c==="number"){c=[d.store.getAt(c)]}if(d.selectionMode=="SINGLE"&&c){a=c.length?c[0]:c;d.doSingleSelect(a,b)}else{d.doMultiSelect(c,e,b)}},doMultiSelect:function(a,l,k){var h=this,b=h.selected,j=false,d=0,g,e;if(h.locked){return}a=!Ext.isArray(a)?[a]:a;g=a.length;if(!l&&b.getCount()>0){if(h.doDeselect(h.getSelection(),k)===false){return}}function c(){b.add(e);j=true}for(;d0&&!k);return g===l},doSingleSelect:function(a,b){var d=this,g=false,c=d.selected;if(d.locked){return}if(d.isSelected(a)){return}function e(){d.bulkChange=true;if(c.getCount()>0&&d.doDeselect(d.lastSelected,b)===false){delete d.bulkChange;return false}delete d.bulkChange;c.add(a);d.lastSelected=a;g=true}d.onSelectChange(a,true,b,e);if(g){if(!b){d.setLastFocused(a)}d.maybeFireSelectionChange(!b)}},setLastFocused:function(c,b){var d=this,a=d.lastFocused;d.lastFocused=c;if(c!==a){d.onLastFocusChanged(a,c,b)}},isFocused:function(a){return a===this.getLastFocused()},maybeFireSelectionChange:function(a){var b=this;if(a&&!b.bulkChange){b.fireEvent("selectionchange",b,b.getSelection())}},getLastSelected:function(){return this.lastSelected},getLastFocused:function(){return this.lastFocused},getSelection:function(){return this.selected.getRange()},getSelectionMode:function(){return this.selectionMode},setSelectionMode:function(a){a=a?a.toUpperCase():"SINGLE";this.selectionMode=this.modes[a]?a:"SINGLE"},isLocked:function(){return this.locked},setLocked:function(a){this.locked=!!a},isSelected:function(a){a=Ext.isNumber(a)?this.store.getAt(a):a;return this.selected.indexOf(a)!==-1},hasSelection:function(){return this.selected.getCount()>0},refresh:function(){var e=this,j=e.store,c=[],a=e.getSelection(),d=a.length,h,g,b=0,k=e.getLastFocused();if(!j){return}for(;b0){this.clearSelections();this.maybeFireSelectionChange(true)}},onStoreRemove:function(b,a,c){var e=this,d=e.selected;if(e.locked||!e.pruneRemoved){return}if(d.remove(a)){if(e.lastSelected==a){e.lastSelected=null}if(e.getLastFocused()==a){e.setLastFocused(null)}e.maybeFireSelectionChange(true)}},getCount:function(){return this.selected.getCount()},destroy:Ext.emptyFn,onStoreUpdate:Ext.emptyFn,onStoreLoad:Ext.emptyFn,onSelectChange:Ext.emptyFn,onLastFocusChanged:function(b,a){this.fireEvent("focuschange",this,b,a)},onEditorKey:Ext.emptyFn,bindComponent:Ext.emptyFn,beforeViewRender:Ext.emptyFn});Ext.define("Ext.selection.DataViewModel",{extend:"Ext.selection.Model",requires:["Ext.util.KeyNav"],deselectOnContainerClick:true,enableKeyNav:true,constructor:function(a){this.addEvents("beforedeselect","beforeselect","deselect","select");this.callParent(arguments)},bindComponent:function(a){var b=this,c={refresh:b.refresh,scope:b};b.view=a;b.bindStore(a.getStore());c[a.triggerEvent]=b.onItemClick;c[a.triggerCtEvent]=b.onContainerClick;a.on(c);if(b.enableKeyNav){b.initKeyNav(a)}},onItemClick:function(b,a,d,c,g){this.selectWithEvent(a,g)},onContainerClick:function(){if(this.deselectOnContainerClick){this.deselectAll()}},initKeyNav:function(a){var b=this;if(!a.rendered){a.on({render:Ext.Function.bind(b.initKeyNav,b,[a]),single:true});return}a.el.set({tabIndex:-1});b.keyNav=new Ext.util.KeyNav({target:a.el,ignoreInputFields:true,down:Ext.pass(b.onNavKey,[1],b),right:Ext.pass(b.onNavKey,[1],b),left:Ext.pass(b.onNavKey,[-1],b),up:Ext.pass(b.onNavKey,[-1],b),scope:b})},onNavKey:function(g){g=g||1;var e=this,b=e.view,d=e.getSelection()[0],c=e.view.store.getCount(),a;if(d){a=b.indexOf(b.getNode(d))+g}else{a=0}if(a<0){a=c-1}else{if(a>=c){a=0}}e.select(a)},onSelectChange:function(b,e,d,h){var g=this,a=g.view,c=e?"select":"deselect";if((d||g.fireEvent("before"+c,g,b))!==false&&h()!==false){if(a){if(e){a.onItemSelect(b)}else{a.onItemDeselect(b)}}if(!d){g.fireEvent(c,g,b)}}},destroy:function(){Ext.destroy(this.keyNav);this.callParent()}});Ext.define("Ext.view.AbstractView",{extend:"Ext.Component",requires:["Ext.LoadMask","Ext.data.StoreManager","Ext.CompositeElementLite","Ext.DomQuery","Ext.selection.DataViewModel"],mixins:{bindable:"Ext.util.Bindable"},inheritableStatics:{getRecord:function(a){return this.getBoundView(a).getRecord(a)},getBoundView:function(a){return Ext.getCmp(a.boundView)}},deferInitialRefresh:true,itemCls:Ext.baseCSSPrefix+"dataview-item",loadingText:"Loading...",loadMask:true,loadingUseMsg:true,selectedItemCls:Ext.baseCSSPrefix+"item-selected",emptyText:"",deferEmptyText:true,trackOver:false,blockRefresh:false,preserveScrollOnRefresh:false,last:false,triggerEvent:"itemclick",triggerCtEvent:"containerclick",addCmpEvents:function(){},initComponent:function(){var c=this,a=Ext.isDefined,d=c.itemTpl,b={};if(d){if(Ext.isArray(d)){d=d.join("")}else{if(Ext.isObject(d)){b=Ext.apply(b,d.initialConfig);d=d.html}}if(!c.itemSelector){c.itemSelector="."+c.itemCls}d=Ext.String.format('
{1}
',c.itemCls,d);c.tpl=new Ext.XTemplate(d,b)}c.callParent();if(Ext.isString(c.tpl)||Ext.isArray(c.tpl)){c.tpl=new Ext.XTemplate(c.tpl)}c.addEvents("beforerefresh","refresh","viewready","itemupdate","itemadd","itemremove");c.addCmpEvents();c.store=Ext.data.StoreManager.lookup(c.store||"ext-empty-store");c.bindStore(c.store,true);c.all=new Ext.CompositeElementLite();c.scrollState={top:0,left:0};c.on({scroll:c.onViewScroll,element:"el",scope:c})},onRender:function(){var c=this,b=c.loadMask,a={msg:c.loadingText,msgCls:c.loadingCls,useMsg:c.loadingUseMsg,store:c.getMaskStore()};c.callParent(arguments);if(b){if(Ext.isObject(b)){a=Ext.apply(a,b)}c.loadMask=new Ext.LoadMask(c,a);c.loadMask.on({scope:c,beforeshow:c.onMaskBeforeShow,hide:c.onMaskHide})}},finishRender:function(){var a=this;a.callParent(arguments);if(!a.up("[collapsed],[hidden]")){a.doFirstRefresh(a.store)}},onBoxReady:function(){var a=this;a.callParent(arguments);if(!a.firstRefreshDone){a.doFirstRefresh(a.store)}},getMaskStore:function(){return this.store},onMaskBeforeShow:function(){var b=this,a=b.loadingHeight;b.getSelectionModel().deselectAll();b.all.clear();if(a&&a>b.getHeight()){b.hasLoadingHeight=true;b.oldMinHeight=b.minHeight;b.minHeight=a;b.updateLayout()}},onMaskHide:function(){var a=this;if(!a.destroying&&a.hasLoadingHeight){a.minHeight=a.oldMinHeight;a.updateLayout();delete a.hasLoadingHeight}},beforeRender:function(){this.callParent(arguments);this.getSelectionModel().beforeViewRender(this)},afterRender:function(){this.callParent(arguments);this.getSelectionModel().bindComponent(this)},getSelectionModel:function(){var a=this,b="SINGLE";if(!a.selModel){a.selModel={}}if(a.simpleSelect){b="SIMPLE"}else{if(a.multiSelect){b="MULTI"}}Ext.applyIf(a.selModel,{allowDeselect:a.allowDeselect,mode:b});if(!a.selModel.events){a.selModel=new Ext.selection.DataViewModel(a.selModel)}if(!a.selModel.hasRelaySetup){a.relayEvents(a.selModel,["selectionchange","beforeselect","beforedeselect","select","deselect","focuschange"]);a.selModel.hasRelaySetup=true}if(a.disableSelection){a.selModel.locked=true}return a.selModel},refresh:function(){var c=this,h,b,e,d,g,a;if(!c.rendered||c.isDestroyed){return}if(!c.hasListeners.beforerefresh||c.fireEvent("beforerefresh",c)!==false){h=c.getTargetEl();a=c.store.getRange();g=h.dom;if(!c.preserveScrollOnRefresh){b=g.parentNode;e=g.style.display;g.style.display="none";d=g.nextSibling;b.removeChild(g)}if(c.refreshCounter){c.clearViewEl()}else{c.fixedNodes=h.dom.childNodes.length;c.refreshCounter=1}c.tpl.append(h,c.collectData(a,0));if(a.length<1){if(!c.deferEmptyText||c.hasSkippedEmptyText){Ext.core.DomHelper.insertHtml("beforeEnd",h.dom,c.emptyText)}c.all.clear()}else{c.all.fill(Ext.query(c.getItemSelector(),h.dom));c.updateIndexes(0)}c.selModel.refresh();c.hasSkippedEmptyText=true;if(!c.preserveScrollOnRefresh){b.insertBefore(g,d);g.style.display=e}this.refreshSize();c.fireEvent("refresh",c);if(!c.viewReady){c.viewReady=true;c.fireEvent("viewready",c)}}},refreshSize:function(){var a=this.getSizeModel();if(a.height.shrinkWrap||a.width.shrinkWrap){this.updateLayout()}},clearViewEl:function(){var b=this,a=b.getTargetEl();if(b.fixedNodes){while(a.dom.childNodes[b.fixedNodes]){a.dom.removeChild(a.dom.childNodes[b.fixedNodes])}}else{a.update("")}b.refreshCounter++},onViewScroll:Ext.emptyFn,saveScrollState:function(){if(this.rendered){var b=this.el.dom,a=this.scrollState;a.left=b.scrollLeft;a.top=b.scrollTop}},restoreScrollState:function(){if(this.rendered){var b=this.el.dom,a=this.scrollState;b.scrollLeft=a.left;b.scrollTop=a.top}},prepareData:function(e,d,c){var b,a;if(c){b=c.getAssociatedData();for(a in b){if(b.hasOwnProperty(a)){e[a]=b[a]}}}return e},collectData:function(c,g){var e=[],d=0,a=c.length,b;for(;d-1){c=d.bufferRender([a],b)[0];if(d.getNode(a)){d.all.replaceElement(b,c,true);d.updateIndexes(b,b);d.selModel.refresh();if(d.hasListeners.itemupdate){d.fireEvent("itemupdate",a,b,c)}return c}}}},onAdd:function(e,b,c){var d=this,a;if(d.rendered){if(d.all.getCount()===0){d.refresh();return}a=d.bufferRender(b,c);d.doAdd(a,b,c);d.selModel.refresh();d.updateIndexes(c);d.refreshSize();if(d.hasListeners.itemadd){d.fireEvent("itemadd",b,c,a)}}},doAdd:function(b,a,c){var d=this.all,e=d.getCount();if(e===0){this.clearViewEl();this.getTargetEl().appendChild(b)}else{if(c
',initComponent:function(){this.callParent();this.addEvents("spin","spinup","spindown")},onRender:function(){var b=this,a;b.callParent(arguments);a=b.triggerEl;b.spinUpEl=a.item(0);b.spinDownEl=a.item(1);b.triggerCell=b.spinUpEl.parent();b.setSpinUpEnabled(b.spinUpEnabled);b.setSpinDownEnabled(b.spinDownEnabled);if(b.keyNavEnabled){b.spinnerKeyNav=new Ext.util.KeyNav(b.inputEl,{scope:b,up:b.spinUp,down:b.spinDown})}if(b.mouseWheelEnabled){b.mon(b.bodyEl,"mousewheel",b.onMouseWheel,b)}},getSubTplMarkup:function(){var a=this,b=Ext.form.field.Base.prototype.getSubTplMarkup.apply(a,arguments);return'"+a.getTriggerMarkup()+"
'+b+"
"},getTriggerMarkup:function(){var a=this,b=(a.readOnly||a.hideTrigger);return a.getTpl("triggerTpl").apply({triggerStyle:"width:"+a.triggerWidth+(b?"px;display:none":"px")})},getTriggerWidth:function(){var b=this,a=0;if(b.triggerWrap&&!b.hideTrigger&&!b.readOnly){a=b.triggerWidth}return a},onTrigger1Click:function(){this.spinUp()},onTrigger2Click:function(){this.spinDown()},onTriggerWrapMouseup:function(){this.inputEl.focus()},spinUp:function(){var a=this;if(a.spinUpEnabled&&!a.disabled){a.fireEvent("spin",a,"up");a.fireEvent("spinup",a);a.onSpinUp()}},spinDown:function(){var a=this;if(a.spinDownEnabled&&!a.disabled){a.fireEvent("spin",a,"down");a.fireEvent("spindown",a);a.onSpinDown()}},setSpinUpEnabled:function(a){var b=this,c=b.spinUpEnabled;b.spinUpEnabled=a;if(c!==a&&b.rendered){b.spinUpEl[a?"removeCls":"addCls"](b.trigger1Cls+"-disabled")}},setSpinDownEnabled:function(a){var b=this,c=b.spinDownEnabled;b.spinDownEnabled=a;if(c!==a&&b.rendered){b.spinDownEl[a?"removeCls":"addCls"](b.trigger2Cls+"-disabled")}},onMouseWheel:function(b){var a=this,c;if(a.hasFocus){c=b.getWheelDelta();if(c>0){a.spinUp()}else{if(c<0){a.spinDown()}}b.stopEvent()}},onDestroy:function(){Ext.destroyMembers(this,"spinnerKeyNav","spinUpEl","spinDownEl");this.callParent()}});Ext.define("Ext.form.field.Number",{extend:"Ext.form.field.Spinner",alias:"widget.numberfield",alternateClassName:["Ext.form.NumberField","Ext.form.Number"],allowDecimals:true,decimalSeparator:".",submitLocaleSeparator:true,decimalPrecision:2,minValue:Number.NEGATIVE_INFINITY,maxValue:Number.MAX_VALUE,step:1,minText:"The minimum value for this field is {0}",maxText:"The maximum value for this field is {0}",nanText:"{0} is not a valid number",negativeText:"The value cannot be negative",baseChars:"0123456789",autoStripChars:false,initComponent:function(){var a=this,b;a.callParent();a.setMinValue(a.minValue);a.setMaxValue(a.maxValue);if(a.disableKeyFilter!==true){b=a.baseChars+"";if(a.allowDecimals){b+=a.decimalSeparator}if(a.minValue<0){b+="-"}b=Ext.String.escapeRegex(b);a.maskRe=new RegExp("["+b+"]");if(a.autoStripChars){a.stripCharsRe=new RegExp("[^"+b+"]","gi")}}},getErrors:function(c){var b=this,e=b.callParent(arguments),d=Ext.String.format,a;c=Ext.isDefined(c)?c:this.processRawValue(this.getRawValue());if(c.length<1){return e}c=String(c).replace(b.decimalSeparator,".");if(isNaN(c)){e.push(d(b.nanText,c))}a=b.parseValue(c);if(b.minValue===0&&a<0){e.push(this.negativeText)}else{if(ab.maxValue){e.push(d(b.maxText,b.maxValue))}return e},rawToValue:function(b){var a=this.fixPrecision(this.parseValue(b));if(a===null){a=b||null}return a},valueToRaw:function(c){var b=this,a=b.decimalSeparator;c=b.parseValue(c);c=b.fixPrecision(c);c=Ext.isNumber(c)?c:parseFloat(String(c).replace(a,"."));c=isNaN(c)?"":String(c).replace(".",a);return c},getSubmitValue:function(){var a=this,b=a.callParent();if(!a.submitLocaleSeparator){b=b.replace(a.decimalSeparator,".")}return b},onChange:function(){this.toggleSpinners();this.callParent(arguments)},toggleSpinners:function(){var b=this,c=b.getValue(),a=c===null;b.setSpinUpEnabled(a||cb.minValue)},setMinValue:function(a){this.minValue=Ext.Number.from(a,Number.NEGATIVE_INFINITY);this.toggleSpinners()},setMaxValue:function(a){this.maxValue=Ext.Number.from(a,Number.MAX_VALUE);this.toggleSpinners()},parseValue:function(a){a=parseFloat(String(a).replace(this.decimalSeparator,"."));return isNaN(a)?null:a},fixPrecision:function(d){var c=this,b=isNaN(d),a=c.decimalPrecision;if(b||!d){return b?"":d}else{if(!c.allowDecimals||a<=0){a=0}}return parseFloat(Ext.Number.toFixed(parseFloat(d),a))},beforeBlur:function(){var b=this,a=b.parseValue(b.getRawValue());if(!Ext.isEmpty(a)){b.setValue(a)}},onSpinUp:function(){var a=this;if(!a.readOnly){a.setValue(Ext.Number.constrain(a.getValue()+a.step,a.minValue,a.maxValue))}},onSpinDown:function(){var a=this;if(!a.readOnly){a.setValue(Ext.Number.constrain(a.getValue()-a.step,a.minValue,a.maxValue))}}});Ext.define("Ext.toolbar.Paging",{extend:"Ext.toolbar.Toolbar",alias:"widget.pagingtoolbar",alternateClassName:"Ext.PagingToolbar",requires:["Ext.toolbar.TextItem","Ext.form.field.Number"],mixins:{bindable:"Ext.util.Bindable"},displayInfo:false,prependButtons:false,displayMsg:"Displaying {0} - {1} of {2}",emptyMsg:"No data to display",beforePageText:"Page",afterPageText:"of {0}",firstText:"First Page",prevText:"Previous Page",nextText:"Next Page",lastText:"Last Page",refreshText:"Refresh",inputItemWidth:30,getPagingItems:function(){var a=this;return[{itemId:"first",tooltip:a.firstText,overflowText:a.firstText,iconCls:Ext.baseCSSPrefix+"tbar-page-first",disabled:true,handler:a.moveFirst,scope:a},{itemId:"prev",tooltip:a.prevText,overflowText:a.prevText,iconCls:Ext.baseCSSPrefix+"tbar-page-prev",disabled:true,handler:a.movePrevious,scope:a},"-",a.beforePageText,{xtype:"numberfield",itemId:"inputItem",name:"inputItem",cls:Ext.baseCSSPrefix+"tbar-page-number",allowDecimals:false,minValue:1,hideTrigger:true,enableKeyEvents:true,keyNavEnabled:false,selectOnFocus:true,submitValue:false,isFormField:false,width:a.inputItemWidth,margins:"-1 2 3 2",listeners:{scope:a,keydown:a.onPagingKeyDown,blur:a.onPagingBlur}},{xtype:"tbtext",itemId:"afterTextItem",text:Ext.String.format(a.afterPageText,1)},"-",{itemId:"next",tooltip:a.nextText,overflowText:a.nextText,iconCls:Ext.baseCSSPrefix+"tbar-page-next",disabled:true,handler:a.moveNext,scope:a},{itemId:"last",tooltip:a.lastText,overflowText:a.lastText,iconCls:Ext.baseCSSPrefix+"tbar-page-last",disabled:true,handler:a.moveLast,scope:a},"-",{itemId:"refresh",tooltip:a.refreshText,overflowText:a.refreshText,iconCls:Ext.baseCSSPrefix+"tbar-loading",handler:a.doRefresh,scope:a}]},initComponent:function(){var b=this,c=b.getPagingItems(),a=b.items||b.buttons||[];if(b.prependButtons){b.items=a.concat(c)}else{b.items=c.concat(a)}delete b.buttons;if(b.displayInfo){b.items.push("->");b.items.push({xtype:"tbtext",itemId:"displayItem"})}b.callParent();b.addEvents("change","beforechange");b.on("beforerender",b.onLoad,b,{single:true});b.bindStore(b.store||"ext-empty-store",true)},updateInfo:function(){var e=this,c=e.child("#displayItem"),a=e.store,b=e.getPageData(),d,g;if(c){d=a.getCount();if(d===0){g=e.emptyMsg}else{g=Ext.String.format(e.displayMsg,b.fromRecord,b.toRecord,b.total)}c.setText(g)}},onLoad:function(){var g=this,d,b,c,a,e,h;e=g.store.getCount();h=e===0;if(!h){d=g.getPageData();b=d.currentPage;c=d.pageCount;a=Ext.String.format(g.afterPageText,isNaN(c)?1:c)}else{b=0;c=0;a=Ext.String.format(g.afterPageText,0)}Ext.suspendLayouts();g.child("#afterTextItem").setText(a);g.child("#inputItem").setDisabled(h).setValue(b);g.child("#first").setDisabled(b===1||h);g.child("#prev").setDisabled(b===1||h);g.child("#next").setDisabled(b===c||h);g.child("#last").setDisabled(b===c||h);g.child("#refresh").enable();g.updateInfo();Ext.resumeLayouts(true);if(g.rendered){g.fireEvent("change",g,d)}},getPageData:function(){var b=this.store,a=b.getTotalCount();return{total:a,currentPage:b.currentPage,pageCount:Math.ceil(a/b.pageSize),fromRecord:((b.currentPage-1)*b.pageSize)+1,toRecord:Math.min(b.currentPage*b.pageSize,a)}},onLoadError:function(){if(!this.rendered){return}this.child("#refresh").enable()},readPageFromInput:function(b){var a=this.child("#inputItem").getValue(),c=parseInt(a,10);if(!a||isNaN(c)){this.child("#inputItem").setValue(b.currentPage);return false}return c},onPagingFocus:function(){this.child("#inputItem").select()},onPagingBlur:function(b){var a=this.getPageData().currentPage;this.child("#inputItem").setValue(a)},onPagingKeyDown:function(i,h){var d=this,b=h.getKey(),c=d.getPageData(),a=h.shiftKey?10:1,g;if(b==h.RETURN){h.stopEvent();g=d.readPageFromInput(c);if(g!==false){g=Math.min(Math.max(1,g),c.pageCount);if(d.fireEvent("beforechange",d,g)!==false){d.store.loadPage(g)}}}else{if(b==h.HOME||b==h.END){h.stopEvent();g=b==h.HOME?1:c.pageCount;i.setValue(g)}else{if(b==h.UP||b==h.PAGE_UP||b==h.DOWN||b==h.PAGE_DOWN){h.stopEvent();g=d.readPageFromInput(c);if(g){if(b==h.DOWN||b==h.PAGE_DOWN){a*=-1}g+=a;if(g>=1&&g<=c.pageCount){i.setValue(g)}}}}}},beforeLoad:function(){if(this.rendered&&this.refresh){this.refresh.disable()}},moveFirst:function(){if(this.fireEvent("beforechange",this,1)!==false){this.store.loadPage(1)}},movePrevious:function(){var b=this,a=b.store.currentPage-1;if(a>0){if(b.fireEvent("beforechange",b,a)!==false){b.store.previousPage()}}},moveNext:function(){var c=this,b=c.getPageData().pageCount,a=c.store.currentPage+1;if(a<=b){if(c.fireEvent("beforechange",c,a)!==false){c.store.nextPage()}}},moveLast:function(){var b=this,a=b.getPageData().pageCount;if(b.fireEvent("beforechange",b,a)!==false){b.store.loadPage(a)}},doRefresh:function(){var a=this,b=a.store.currentPage;if(a.fireEvent("beforechange",a,b)!==false){a.store.loadPage(b)}},getStoreListeners:function(){return{beforeload:this.beforeLoad,load:this.onLoad,exception:this.onLoadError}},unbind:function(a){this.bindStore(null)},bind:function(a){this.bindStore(a)},onDestroy:function(){this.unbind();this.callParent()}});Ext.define("Ext.view.BoundList",{extend:"Ext.view.View",alias:"widget.boundlist",alternateClassName:"Ext.BoundList",requires:["Ext.layout.component.BoundList","Ext.toolbar.Paging"],pageSize:0,baseCls:Ext.baseCSSPrefix+"boundlist",itemCls:Ext.baseCSSPrefix+"boundlist-item",listItemCls:"",shadow:false,trackOver:true,refreshed:0,deferInitialRefresh:false,componentLayout:"boundlist",childEls:["listEl"],renderTpl:['
',"{%","var me=values.$comp, pagingToolbar=me.pagingToolbar;","if (pagingToolbar) {","pagingToolbar.ownerLayout = me.componentLayout;","Ext.DomHelper.generateMarkup(pagingToolbar.getRenderTree(), out);","}","%}",{disableFormats:true}],initComponent:function(){var b=this,a=b.baseCls,c=b.itemCls;b.selectedItemCls=a+"-selected";b.overItemCls=a+"-item-over";b.itemSelector="."+c;if(b.floating){b.addCls(a+"-floating")}if(!b.tpl){b.tpl=new Ext.XTemplate('
    ','
  • '+b.getInnerTpl(b.displayField)+"
  • ","
")}else{if(Ext.isString(b.tpl)){b.tpl=new Ext.XTemplate(b.tpl)}}if(b.pageSize){b.pagingToolbar=b.createPagingToolbar()}b.callParent()},beforeRender:function(){var a=this;a.callParent(arguments);if(a.up("menu")){a.addCls(Ext.baseCSSPrefix+"menu")}},getBubbleTarget:function(){return this.pickerField},getRefItems:function(){return this.pagingToolbar?[this.pagingToolbar]:[]},createPagingToolbar:function(){return Ext.widget("pagingtoolbar",{id:this.id+"-paging-toolbar",pageSize:this.pageSize,store:this.store,border:false,ownerCt:this,ownerLayout:this.getComponentLayout()})},finishRenderChildren:function(){var a=this.pagingToolbar;this.callParent(arguments);if(a){a.finishRender()}},refresh:function(){var b=this,a=b.pagingToolbar;b.callParent();if(b.rendered&&a&&a.rendered&&!b.preserveScrollOnRefresh){b.el.appendChild(a.el)}},bindStore:function(a,b){var c=this.pagingToolbar;this.callParent(arguments);if(c){c.bindStore(this.store,b)}},getTargetEl:function(){return this.listEl||this.el},getInnerTpl:function(a){return"{"+a+"}"},onDestroy:function(){Ext.destroyMembers(this,"pagingToolbar","listEl");this.callParent()}});Ext.define("Ext.view.BoundListKeyNav",{extend:"Ext.util.KeyNav",requires:"Ext.view.BoundList",constructor:function(b,a){var c=this;c.boundList=a.boundList;c.callParent([b,Ext.apply({},a,c.defaultHandlers)])},defaultHandlers:{up:function(){var e=this,b=e.boundList,d=b.all,g=b.highlightedItem,c=g?b.indexOf(g):-1,a=c>0?c-1:d.getCount()-1;e.highlightAt(a)},down:function(){var e=this,b=e.boundList,d=b.all,g=b.highlightedItem,c=g?b.indexOf(g):-1,a=c',' value="{[Ext.util.Format.htmlEncode(values.value)]}"
',' name="{name}"',' placeholder="{placeholder}"',' size="{size}"',' maxlength="{maxLength}"',' readonly="readonly"',' disabled="disabled"',' tabIndex="{tabIdx}"',' style="{fieldStyle}"',"/>",{compiled:true,disableFormats:true}],getSubTplData:function(){var a=this;Ext.applyIf(a.subTplData,{hiddenDataCls:a.hiddenDataCls});return a.callParent(arguments)},afterRender:function(){var a=this;a.callParent(arguments);a.setHiddenValue(a.value)},multiSelect:false,delimiter:", ",displayField:"text",triggerAction:"all",allQuery:"",queryParam:"query",queryMode:"remote",queryCaching:true,pageSize:0,autoSelect:true,typeAhead:false,typeAheadDelay:250,selectOnTab:true,forceSelection:false,growToLongestValue:true,defaultListConfig:{loadingHeight:70,minWidth:70,maxHeight:300,shadow:"sides"},ignoreSelection:0,removingRecords:null,resizeComboToGrow:function(){var a=this;return a.grow&&a.growToLongestValue},initComponent:function(){var e=this,c=Ext.isDefined,b=e.store,d=e.transform,a,g;Ext.applyIf(e.renderSelectors,{hiddenDataEl:"."+e.hiddenDataCls.split(" ").join(".")});this.addEvents("beforequery","select","beforeselect","beforedeselect");if(d){a=Ext.getDom(d);if(a){if(!e.store){b=Ext.Array.map(Ext.Array.from(a.options),function(h){return[h.value,h.text]})}if(!e.name){e.name=a.name}if(!("value" in e)){e.value=a.value}}}e.bindStore(b||"ext-empty-store",true);b=e.store;if(b.autoCreated){e.queryMode="local";e.valueField=e.displayField="field1";if(!b.expanded){e.displayField="field2"}}if(!c(e.valueField)){e.valueField=e.displayField}g=e.queryMode==="local";if(!c(e.queryDelay)){e.queryDelay=g?10:500}if(!c(e.minChars)){e.minChars=g?0:4}if(!e.displayTpl){e.displayTpl=new Ext.XTemplate('{[typeof values === "string" ? values : values["'+e.displayField+'"]]}'+e.delimiter+"")}else{if(Ext.isString(e.displayTpl)){e.displayTpl=new Ext.XTemplate(e.displayTpl)}}e.callParent();e.doQueryTask=new Ext.util.DelayedTask(e.doRawQuery,e);if(e.store.getCount()>0){e.setValue(e.value)}if(a){e.render(a.parentNode,a);Ext.removeNode(a);delete e.renderTo}},getStore:function(){return this.store},beforeBlur:function(){this.doQueryTask.cancel();this.assertValue()},assertValue:function(){var a=this,b=a.getRawValue(),c;if(a.forceSelection){if(a.multiSelect){if(b!==a.getDisplayValue()){a.setValue(a.lastSelection)}}else{c=a.findRecordByDisplay(b);if(c){a.select(c)}else{a.setValue(a.lastSelection)}}}a.collapse()},onTypeAhead:function(){var e=this,d=e.displayField,b=e.store.findRecord(d,e.getRawValue()),c=e.getPicker(),g,a,h;if(b){g=b.get(d);a=g.length;h=e.getRawValue().length;c.highlightItem(c.getNode(b));if(h!==0&&h!==a){e.setRawValue(g);e.selectText(h,g.length)}}},resetToDefault:Ext.emptyFn,beforeReset:function(){this.callParent();this.clearFilter()},onUnbindStore:function(a){var b=this.picker;if(!a&&b){b.bindStore(null)}this.clearFilter()},onBindStore:function(a,c){var b=this.picker;if(!c){this.resetToDefault()}if(b){b.bindStore(a)}},getStoreListeners:function(){var a=this;return{beforeload:a.onBeforeLoad,clear:a.onClear,datachanged:a.onDataChanged,load:a.onLoad,exception:a.onException,remove:a.onRemove}},onBeforeLoad:function(){++this.ignoreSelection},onDataChanged:function(){var a=this;if(a.resizeComboToGrow()){a.updateLayout()}},onClear:function(){var a=this;if(a.resizeComboToGrow()){a.removingRecords=true;a.onDataChanged()}},onRemove:function(){var a=this;if(a.resizeComboToGrow()){a.removingRecords=true}},onException:function(){if(this.ignoreSelection>0){--this.ignoreSelection}this.collapse()},onLoad:function(){var a=this,b=a.value;if(a.ignoreSelection>0){--a.ignoreSelection}if(a.rawQuery){a.rawQuery=false;a.syncSelection();if(a.picker&&!a.picker.getSelectionModel().hasSelection()){a.doAutoSelect()}}else{if(a.value||a.value===0){a.setValue(a.value)}else{if(a.store.getCount()){a.doAutoSelect()}else{a.setValue(a.value)}}}},doRawQuery:function(){this.doQuery(this.getRawValue(),false,true)},doQuery:function(i,d,g){i=i||"";var e=this,b={query:i,forceAll:d,combo:e,cancel:false},a=e.store,h=e.queryMode==="local",c;if(e.fireEvent("beforequery",b)===false||b.cancel){return false}i=b.query;d=b.forceAll;if(d||(i.length>=e.minChars)){e.expand();if(!e.queryCaching||e.lastQuery!==i){e.lastQuery=i;if(h){a.suspendEvents();c=e.clearFilter();if(i||!d){e.activeFilter=new Ext.util.Filter({root:"data",property:e.displayField,value:i});a.filter(e.activeFilter);c=true}else{delete e.activeFilter}a.resumeEvents();if(e.rendered&&c){e.getPicker().refresh()}}else{e.rawQuery=g;if(e.pageSize){e.loadPage(1)}else{a.load({params:e.getParams(i)})}}}if(e.getRawValue()!==e.getDisplayValue()){e.ignoreSelection++;e.picker.getSelectionModel().deselectAll();e.ignoreSelection--}if(h){e.doAutoSelect()}if(e.typeAhead){e.doTypeAhead()}}return true},clearFilter:function(){var a=this.store,c=this.activeFilter,d=a.filters,b;if(c){if(d.getCount()>1){d.remove(c);b=d.getRange()}a.clearFilter(true);if(b){a.filter(b)}}return !!c},loadPage:function(a){this.store.loadPage(a,{params:this.getParams(this.lastQuery)})},onPageChange:function(b,a){this.loadPage(a);return false},getParams:function(c){var b={},a=this.queryParam;if(a){b[a]=c}return b},doAutoSelect:function(){var b=this,a=b.picker,c,d;if(a&&b.autoSelect&&b.store.getCount()>0){c=a.getSelectionModel().lastSelected;d=a.getNode(c||0);if(d){a.highlightItem(d);a.listEl.scrollChildIntoView(d,false)}}},doTypeAhead:function(){if(!this.typeAheadTask){this.typeAheadTask=new Ext.util.DelayedTask(this.onTypeAhead,this)}if(this.lastKey!=Ext.EventObject.BACKSPACE&&this.lastKey!=Ext.EventObject.DELETE){this.typeAheadTask.delay(this.typeAheadDelay)}},onTriggerClick:function(){var a=this;if(!a.readOnly&&!a.disabled){if(a.isExpanded){a.collapse()}else{a.onFocus({});if(a.triggerAction==="all"){a.doQuery(a.allQuery,true)}else{a.doQuery(a.getRawValue(),false,true)}}a.inputEl.focus()}},onKeyUp:function(d,b){var c=this,a=d.getKey();if(!c.readOnly&&!c.disabled&&c.editable){c.lastKey=a;if(!d.isSpecialKey()||a==d.BACKSPACE||a==d.DELETE){c.doQueryTask.delay(c.queryDelay)}}if(c.enableKeyEvents){c.callParent(arguments)}},initEvents:function(){var a=this;a.callParent();if(!a.enableKeyEvents){a.mon(a.inputEl,"keyup",a.onKeyUp,a)}},onDestroy:function(){this.bindStore(null);this.callParent()},onAdded:function(){var a=this;a.callParent(arguments);if(a.picker){a.picker.ownerCt=a.up("[floating]");a.picker.registerWithOwnerCt()}},createPicker:function(){var c=this,b,a=Ext.apply({xtype:"boundlist",pickerField:c,selModel:{mode:c.multiSelect?"SIMPLE":"SINGLE"},floating:true,hidden:true,store:c.store,displayField:c.displayField,focusOnToFront:false,pageSize:c.pageSize,tpl:c.tpl},c.listConfig,c.defaultListConfig);b=c.picker=Ext.widget(a);if(c.pageSize){b.pagingToolbar.on("beforechange",c.onPageChange,c)}c.mon(b,{itemclick:c.onItemClick,refresh:c.onListRefresh,scope:c});c.mon(b.getSelectionModel(),{beforeselect:c.onBeforeSelect,beforedeselect:c.onBeforeDeselect,selectionchange:c.onListSelectionChange,scope:c});return b},alignPicker:function(){var b=this,a=b.getPicker(),e=b.getPosition()[1]-Ext.getBody().getScroll().top,d=Ext.Element.getViewHeight()-e-b.getHeight(),c=Math.max(e,d);if(a.height){delete a.height;a.updateLayout()}if(a.getHeight()>c-5){a.setHeight(c-5)}b.callParent()},onListRefresh:function(){this.alignPicker();this.syncSelection()},onItemClick:function(c,a){var e=this,d=e.picker.getSelectionModel().getSelection(),b=e.valueField;if(!e.multiSelect&&d.length){if(a.get(b)===d[0].get(b)){e.displayTplData=[a.data];e.setRawValue(e.getDisplayValue());e.collapse()}}},onBeforeSelect:function(b,a){return this.fireEvent("beforeselect",this,a,a.index)},onBeforeDeselect:function(b,a){return this.fireEvent("beforedeselect",this,a,a.index)},onListSelectionChange:function(b,d){var a=this,e=a.multiSelect,c=d.length>0;if(!a.ignoreSelection&&a.isExpanded){if(!e){Ext.defer(a.collapse,1,a)}if(e||c){a.setValue(d,false)}if(c){a.fireEvent("select",a,d)}a.inputEl.focus()}},onExpand:function(){var d=this,a=d.listKeyNav,c=d.selectOnTab,b=d.getPicker();if(a){a.enable()}else{a=d.listKeyNav=new Ext.view.BoundListKeyNav(this.inputEl,{boundList:b,forceKeyDown:true,tab:function(g){if(c){this.selectHighlighted(g);d.triggerBlur()}return true}})}if(c){d.ignoreMonitorTab=true}Ext.defer(a.enable,1,a);d.inputEl.focus()},onCollapse:function(){var b=this,a=b.listKeyNav;if(a){a.disable();b.ignoreMonitorTab=false}},select:function(a){this.setValue(a,true)},findRecord:function(d,c){var b=this.store,a=b.findExact(d,c);return a!==-1?b.getAt(a):false},findRecordByValue:function(a){return this.findRecord(this.valueField,a)},findRecordByDisplay:function(a){return this.findRecord(this.displayField,a)},setValue:function(m,e){var k=this,c=k.valueNotFoundText,n=k.inputEl,g,j,h,a,l=[],b=[],d=[];if(k.store.loading){k.value=m;k.setHiddenValue(k.value);return k}m=Ext.Array.from(m);for(g=0,j=m.length;g0){e.hiddenDataEl.update(Ext.DomHelper.markup({tag:"input",type:"hidden",name:a}));c=1;h=b.firstChild}while(c>g){b.removeChild(k[0]);--c}while(c=0){g.push(i)}}h.ignoreSelection++;c=d.getSelectionModel();c.deselectAll();if(g.length){c.select(g)}h.ignoreSelection--}},onEditorTab:function(b){var a=this.listKeyNav;if(this.selectOnTab&&a){a.selectHighlighted(b)}}});Ext.define("Ext.picker.Month",{extend:"Ext.Component",requires:["Ext.XTemplate","Ext.util.ClickRepeater","Ext.Date","Ext.button.Button"],alias:"widget.monthpicker",alternateClassName:"Ext.MonthPicker",childEls:["bodyEl","prevEl","nextEl","buttonsEl","monthEl","yearEl"],renderTpl:['
','
','','',"","
",'
','
','','',"
",'','',"","
",'
',"
",'','
{%',"var me=values.$comp, okBtn=me.okBtn, cancelBtn=me.cancelBtn;","okBtn.ownerLayout = cancelBtn.ownerLayout = me.componentLayout;","okBtn.ownerCt = cancelBtn.ownerCt = me;","Ext.DomHelper.generateMarkup(okBtn.getRenderTree(), out);","Ext.DomHelper.generateMarkup(cancelBtn.getRenderTree(), out);","%}
","
"],okText:"OK",cancelText:"Cancel",baseCls:Ext.baseCSSPrefix+"monthpicker",showButtons:true,width:178,measureWidth:35,measureMaxHeight:20,smallCls:Ext.baseCSSPrefix+"monthpicker-small",totalYears:10,yearOffset:5,monthOffset:6,initComponent:function(){var a=this;a.selectedCls=a.baseCls+"-selected";a.addEvents("cancelclick","monthclick","monthdblclick","okclick","select","yearclick","yeardblclick");if(a.small){a.addCls(a.smallCls)}a.setValue(a.value);a.activeYear=a.getYear(new Date().getFullYear()-4,-4);if(a.showButtons){a.okBtn=new Ext.button.Button({text:a.okText,handler:a.onOkClick,scope:a});a.cancelBtn=new Ext.button.Button({text:a.cancelText,handler:a.onCancelClick,scope:a})}this.callParent()},beforeRender:function(){var g=this,c=0,b=[],a=Ext.Date.getShortMonthName,e=g.monthOffset,h=g.monthMargin,d="";g.callParent();for(;cd.measureMaxHeight){--c;a.setStyle("margin","0 "+c+"px")}return c},getLargest:function(a){var b=0;this.months.each(function(d){var c=d.getHeight();if(c>b){b=c}});return b},setValue:function(d){var c=this,e=c.activeYear,g=c.monthOffset,b,a;if(!d){c.value=[null,null]}else{if(Ext.isDate(d)){c.value=[d.getMonth(),d.getFullYear()]}else{c.value=[d[0],d[1]]}}if(c.rendered){b=c.value[1];if(b!==null){if((be+c.yearOffset)){c.activeYear=b-c.yearOffset+1}}c.updateBody()}return c},getValue:function(){return this.value},hasSelection:function(){var a=this.value;return a[0]!==null&&a[1]!==null},getYears:function(){var d=this,e=d.yearOffset,g=d.activeYear,a=g+e,c=g,b=[];for(;c','",'','','','',"","",'','',"{#:this.isEndOfWeek}",'","","","",'','',"","",{firstInitial:function(a){return Ext.picker.Date.prototype.getDayInitial(a)},isEndOfWeek:function(b){b--;var a=b%7===0&&b!==0;return a?'':""},renderTodayBtn:function(a,b){Ext.DomHelper.generateMarkup(a.$comp.todayBtn.getRenderTree(),b)},renderMonthBtn:function(a,b){Ext.DomHelper.generateMarkup(a.$comp.monthBtn.getRenderTree(),b)}}],todayText:"Today",ariaTitle:"Date Picker: {0}",ariaTitleDateFormat:"F d, Y",todayTip:"{0} (Spacebar)",minText:"This date is before the minimum date",maxText:"This date is after the maximum date",disabledDaysText:"Disabled",disabledDatesText:"Disabled",nextText:"Next Month (Control+Right)",prevText:"Previous Month (Control+Left)",monthYearText:"Choose a month (Control+Up/Down to move years)",monthYearFormat:"F Y",startDay:0,showToday:true,disableAnim:false,baseCls:Ext.baseCSSPrefix+"datepicker",longDayFormat:"F d, Y",focusOnShow:false,focusOnSelect:true,width:178,initHour:12,numDays:42,initComponent:function(){var b=this,a=Ext.Date.clearTime;b.selectedCls=b.baseCls+"-selected";b.disabledCellCls=b.baseCls+"-disabled";b.prevCls=b.baseCls+"-prevday";b.activeCls=b.baseCls+"-active";b.nextCls=b.baseCls+"-prevday";b.todayCls=b.baseCls+"-today";b.dayNames=b.dayNames.slice(b.startDay).concat(b.dayNames.slice(0,b.startDay));b.listeners=Ext.apply(b.listeners||{},{mousewheel:{element:"eventEl",fn:b.handleMouseWheel,scope:b},click:{element:"eventEl",fn:b.handleDateClick,scope:b,delegate:"a."+b.baseCls+"-date"}});this.callParent();b.value=b.value?a(b.value,true):a(new Date());b.addEvents("select");b.initDisabledDays()},beforeRender:function(){var b=this,c=new Array(b.numDays),a=Ext.Date.format(new Date(),b.format);if(b.up("menu")){b.addCls(Ext.baseCSSPrefix+"menu")}b.monthBtn=new Ext.button.Split({ownerCt:b,ownerLayout:b.getComponentLayout(),text:"",tooltip:b.monthYearText,listeners:{click:b.showMonthPicker,arrowclick:b.showMonthPicker,scope:b}});if(this.showToday){b.todayBtn=new Ext.button.Button({ownerCt:b,ownerLayout:b.getComponentLayout(),text:Ext.String.format(b.todayText,a),tooltip:Ext.String.format(b.todayTip,a),tooltipType:"title",handler:b.selectToday,scope:b})}b.callParent();Ext.applyIf(b,{renderData:{}});Ext.apply(b.renderData,{dayNames:b.dayNames,showToday:b.showToday,prevText:b.prevText,nextText:b.nextText,days:c})},finishRenderChildren:function(){var a=this;a.callParent();a.monthBtn.finishRender();if(a.showToday){a.todayBtn.finishRender()}},onRender:function(b,a){var c=this;c.callParent(arguments);c.el.unselectable();c.cells=c.eventEl.select("tbody td");c.textNodes=c.eventEl.query("tbody td span")},initEvents:function(){var c=this,a=Ext.Date,b=a.DAY;c.callParent();c.prevRepeater=new Ext.util.ClickRepeater(c.prevEl,{handler:c.showPrevMonth,scope:c,preventDefault:true,stopDefault:true});c.nextRepeater=new Ext.util.ClickRepeater(c.nextEl,{handler:c.showNextMonth,scope:c,preventDefault:true,stopDefault:true});c.keyNav=new Ext.util.KeyNav(c.eventEl,Ext.apply({scope:c,left:function(d){if(d.ctrlKey){c.showPrevMonth()}else{c.update(a.add(c.activeDate,b,-1))}},right:function(d){if(d.ctrlKey){c.showNextMonth()}else{c.update(a.add(c.activeDate,b,1))}},up:function(d){if(d.ctrlKey){c.showNextYear()}else{c.update(a.add(c.activeDate,b,-7))}},down:function(d){if(d.ctrlKey){c.showPrevYear()}else{c.update(a.add(c.activeDate,b,7))}},pageUp:c.showNextMonth,pageDown:c.showPrevMonth,enter:function(d){d.stopPropagation();return true}},c.keyNavConfig));if(c.showToday){c.todayKeyListener=c.eventEl.addKeyListener(Ext.EventObject.SPACE,c.selectToday,c)}c.update(c.value)},initDisabledDays:function(){var h=this,b=h.disabledDates,g="(?:",a,i,c,e;if(!h.disabledDatesRE&&b){a=b.length-1;c=b.length;for(i=0;i0){this.showPrevMonth()}else{if(b<0){this.showNextMonth()}}}},handleDateClick:function(d,a){var c=this,b=c.handler;d.stopEvent();if(!c.disabled&&a.dateValue&&!Ext.fly(a.parentNode).hasCls(c.disabledCellCls)){c.doCancelFocus=c.focusOnSelect===false;c.setValue(new Date(a.dateValue));delete c.doCancelFocus;c.fireEvent("select",c,c.value);if(b){b.call(c.scope||c,c,c.value)}c.onSelect()}},onSelect:function(){if(this.hideOnSelect){this.hide()}},selectToday:function(){var c=this,a=c.todayBtn,b=c.handler;if(a&&!a.disabled){c.setValue(Ext.Date.clearTime(new Date()));c.fireEvent("select",c,c.value);if(b){b.call(c.scope||c,c,c.value)}c.onSelect()}return c},selectedUpdate:function(a){var d=this,i=a.getTime(),j=d.cells,k=d.selectedCls,g=j.elements,b,e=g.length,h;j.removeCls(k);for(b=0;bv||(C&&x&&C.test(n.dateFormat(F,x)))||(H&&H.indexOf(F.getDay())!=-1));if(!E.disabled){E.todayBtn.setDisabled(a);E.todayKeyListener.setDisabled(a)}}m=function(i){r=+n.clearTime(q,true);i.title=n.format(q,b);i.firstChild.dateValue=r;if(r==z){i.className+=" "+E.todayCls;i.title=E.todayText}if(r==u){i.className+=" "+E.selectedCls;E.fireEvent("highlightitem",E,i);if(e&&E.floating){Ext.fly(i.firstChild).focus(50)}}if(rv){i.className=G;i.title=E.maxText;return}if(H){if(H.indexOf(q.getDay())!=-1){i.title=B;i.className=G}}if(C&&x){j=n.dateFormat(q,x);if(C.test(j)){i.title=s.replace("%0",j);i.className=G}}};for(;w=l){o=(++D);c=E.nextCls}else{o=w-h+1;c=E.activeCls}}d[w].innerHTML=o;g[w].className=c;q.setDate(q.getDate()+1);m(g[w])}E.monthBtn.setText(Ext.Date.format(A,E.monthYearFormat))},update:function(a,d){var b=this,c=b.activeDate;if(b.rendered){b.activeDate=a;if(!d&&c&&b.el&&c.getMonth()==a.getMonth()&&c.getFullYear()==a.getFullYear()){b.selectedUpdate(a,c)}else{b.fullUpdate(a,c)}b.innerEl.dom.title=Ext.String.format(b.ariaTitle,Ext.Date.format(b.activeDate,b.ariaTitleDateFormat))}return b},beforeDestroy:function(){var a=this;if(a.rendered){Ext.destroy(a.todayKeyListener,a.keyNav,a.monthPicker,a.monthBtn,a.nextRepeater,a.prevRepeater,a.todayBtn);delete a.textNodes;delete a.cells.elements}a.callParent()},onShow:function(){this.callParent(arguments);if(this.focusOnShow){this.focus()}}},function(){var b=this.prototype,a=Ext.Date;b.monthNames=a.monthNames;b.dayNames=a.dayNames;b.format=a.defaultFormat});Ext.define("Ext.form.field.Date",{extend:"Ext.form.field.Picker",alias:"widget.datefield",requires:["Ext.picker.Date"],alternateClassName:["Ext.form.DateField","Ext.form.Date"],format:"m/d/Y",altFormats:"m/d/Y|n/j/Y|n/j/y|m/j/y|n/d/y|m/j/Y|n/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d|n-j|n/j",disabledDaysText:"Disabled",disabledDatesText:"Disabled",minText:"The date in this field must be equal to or after {0}",maxText:"The date in this field must be equal to or before {0}",invalidText:"{0} is not a valid date - it must be in the format {1}",triggerCls:Ext.baseCSSPrefix+"form-date-trigger",showToday:true,useStrict:undefined,initTime:"12",initTimeFormat:"H",matchFieldWidth:false,startDay:0,initComponent:function(){var d=this,b=Ext.isString,c,a;c=d.minValue;a=d.maxValue;if(b(c)){d.minValue=d.parseDate(c)}if(b(a)){d.maxValue=d.parseDate(a)}d.disabledDatesRE=null;d.initDisabledDays();d.callParent()},initValue:function(){var a=this,b=a.value;if(Ext.isString(b)){a.value=a.rawToValue(b)}a.callParent()},initDisabledDays:function(){if(this.disabledDates){var b=this.disabledDates,a=b.length-1,g="(?:",h,e=b.length,c;for(h=0;hk(h).getTime()){o.push(p(j.maxText,j.formatDate(h)))}if(n){l=q.getDay();for(;e'+Ext.DomHelper.markup(b)+"";c.destroy();return a},createFileInput:function(){var a=this;a.fileInputEl=a.buttonEl.createChild({name:a.getName(),id:a.id+"-fileInputEl",cls:Ext.baseCSSPrefix+"form-file-input",tag:"input",type:"file",size:1});a.fileInputEl.on({scope:a,change:a.onFileChange})},onFileChange:function(){this.lastValue=null;Ext.form.field.File.superclass.setValue.call(this,this.fileInputEl.dom.value)},setValue:Ext.emptyFn,reset:function(){var a=this;if(a.rendered){a.fileInputEl.remove();a.createFileInput();a.inputEl.dom.value=""}a.callParent()},onDisable:function(){this.callParent();this.disableItems()},disableItems:function(){var a=this.fileInputEl;if(a){a.dom.disabled=true}this["buttonEl-btnEl"].dom.disabled=true},onEnable:function(){var a=this;a.callParent();a.fileInputEl.dom.disabled=false;this["buttonEl-btnEl"].dom.disabled=false},isFileUpload:function(){return true},extractFileInput:function(){var a=this.fileInputEl.dom;this.reset();return a},onDestroy:function(){Ext.destroyMembers(this,"fileInputEl","buttonEl");this.callParent()}});Ext.define("Ext.form.field.Hidden",{extend:"Ext.form.field.Base",alias:["widget.hiddenfield","widget.hidden"],alternateClassName:"Ext.form.Hidden",inputType:"hidden",hideLabel:true,initComponent:function(){this.formItemCls+="-hidden";this.callParent()},isEqual:function(b,a){return this.isEqualAsString(b,a)},initEvents:Ext.emptyFn,setSize:Ext.emptyFn,setWidth:Ext.emptyFn,setHeight:Ext.emptyFn,setPosition:Ext.emptyFn,setPagePosition:Ext.emptyFn,markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn});Ext.define("Ext.layout.component.field.HtmlEditor",{extend:"Ext.layout.component.field.Field",alias:["layout.htmleditor"],type:"htmleditor",toolbarSizePolicy:{setsWidth:0,setsHeight:0},beginLayout:function(a){this.callParent(arguments);a.textAreaContext=a.getEl("textareaEl");a.iframeContext=a.getEl("iframeEl");a.toolbarContext=a.context.getCmp(this.owner.getToolbar())},renderItems:Ext.emptyFn,getItemSizePolicy:function(a){return this.toolbarSizePolicy},getLayoutItems:function(){var a=this.owner.getToolbar();return a?[a]:[]},getRenderTarget:function(){return this.owner.bodyEl},publishInnerHeight:function(c,a){var b=this,d=a-b.measureLabelErrorHeight(c)-c.toolbarContext.getProp("height")-c.bodyCellContext.getPaddingInfo().height;if(Ext.isNumber(d)){c.textAreaContext.setHeight(d);c.iframeContext.setHeight(d)}else{b.done=false}}});Ext.define("Ext.picker.Color",{extend:"Ext.Component",requires:"Ext.XTemplate",alias:"widget.colorpicker",alternateClassName:"Ext.ColorPalette",componentCls:Ext.baseCSSPrefix+"color-picker",selectedCls:Ext.baseCSSPrefix+"color-picker-selected",value:null,clickEvent:"click",allowReselect:false,colors:["000000","993300","333300","003300","003366","000080","333399","333333","800000","FF6600","808000","008000","008080","0000FF","666699","808080","FF0000","FF9900","99CC00","339966","33CCCC","3366FF","800080","969696","FF00FF","FFCC00","FFFF00","00FF00","00FFFF","00CCFF","993366","C0C0C0","FF99CC","FFCC99","FFFF99","CCFFCC","CCFFFF","99CCFF","CC99FF","FFFFFF"],colorRe:/(?:^|\s)color-(.{6})(?:\s|$)/,renderTpl:['','',' ',"",""],initComponent:function(){var a=this;a.callParent(arguments);a.addEvents("select");if(a.handler){a.on("select",a.handler,a.scope,true)}},initRenderData:function(){var a=this;return Ext.apply(a.callParent(),{itemCls:a.itemCls,colors:a.colors})},onRender:function(){var b=this,a=b.clickEvent;b.callParent(arguments);b.mon(b.el,a,b.handleClick,b,{delegate:"a"});if(a!="click"){b.mon(b.el,"click",Ext.emptyFn,b,{delegate:"a",stopEvent:true})}},afterRender:function(){var a=this,b;a.callParent(arguments);if(a.value){b=a.value;a.value=null;a.select(b,true)}},handleClick:function(c,d){var b=this,a;c.stopEvent();if(!b.disabled){a=d.className.match(b.colorRe)[1];b.select(a.toUpperCase())}},select:function(b,a){var d=this,g=d.selectedCls,e=d.value,c;b=b.replace("#","");if(!d.rendered){d.value=b;return}if(b!=e||d.allowReselect){c=d.el;if(d.value){c.down("a.color-"+e).removeCls(g)}c.down("a.color-"+b).addCls(g);d.value=b;if(a!==true){d.fireEvent("select",d,b)}}},getValue:function(){return this.value||null}});Ext.define("Ext.form.field.HtmlEditor",{extend:"Ext.Component",mixins:{labelable:"Ext.form.Labelable",field:"Ext.form.field.Field"},alias:"widget.htmleditor",alternateClassName:"Ext.form.HtmlEditor",requires:["Ext.tip.QuickTipManager","Ext.picker.Color","Ext.toolbar.Item","Ext.toolbar.Toolbar","Ext.util.Format","Ext.layout.component.field.HtmlEditor"],childEls:["iframeEl","textareaEl"],fieldSubTpl:["{beforeTextAreaTpl}",'","{afterTextAreaTpl}","{beforeIFrameTpl}",'',"{afterIFrameTpl}",{disableFormats:true}],subTplInsertions:["beforeTextAreaTpl","afterTextAreaTpl","beforeIFrameTpl","afterIFrameTpl","iframeAttrTpl","inputAttrTpl"],enableFormat:true,enableFontSize:true,enableColors:true,enableAlignments:true,enableLists:true,enableSourceEdit:true,enableLinks:true,enableFont:true,createLinkText:"Please enter the URL for the link:",defaultLinkValue:"http://",fontFamilies:["Arial","Courier New","Tahoma","Times New Roman","Verdana"],defaultFont:"tahoma",defaultValue:(Ext.isOpera||Ext.isIE6)?" ":"​",editorWrapCls:Ext.baseCSSPrefix+"html-editor-wrap",componentLayout:"htmleditor",initialized:false,activated:false,sourceEditMode:false,iframePad:3,hideMode:"offsets",afterBodyEl:"",maskOnDisable:true,initComponent:function(){var a=this;a.addEvents("initialize","activate","beforesync","beforepush","sync","push","editmodechange");a.callParent(arguments);a.createToolbar(a);a.initLabelable();a.initField()},getRefItems:function(){return[this.toolbar]},createToolbar:function(g){var j=this,h=[],c,l=Ext.tip.QuickTipManager&&Ext.tip.QuickTipManager.isEnabled(),e=Ext.baseCSSPrefix,d,k,b;function a(n,i,m){return{itemId:n,cls:e+"btn-icon",iconCls:e+"edit-"+n,enableToggle:i!==false,scope:g,handler:m||g.relayBtnCmd,clickEvent:"mousedown",tooltip:l?g.buttonTips[n]||b:b,overflowText:g.buttonTips[n].title||b,tabIndex:-1}}if(j.enableFont&&!Ext.isSafari2){d=Ext.widget("component",{renderTpl:['"],renderData:{cls:e+"font-select",fonts:j.fontFamilies,defaultFont:j.defaultFont},childEls:["selectEl"],afterRender:function(){j.fontSelect=this.selectEl;Ext.Component.prototype.afterRender.apply(this,arguments)},onDisable:function(){var i=this.selectEl;if(i){i.dom.disabled=true}Ext.Component.prototype.onDisable.apply(this,arguments)},onEnable:function(){var i=this.selectEl;if(i){i.dom.disabled=false}Ext.Component.prototype.onEnable.apply(this,arguments)},listeners:{change:function(){j.relayCmd("fontname",j.fontSelect.dom.value);j.deferFocus()},element:"selectEl"}});h.push(d,"-")}if(j.enableFormat){h.push(a("bold"),a("italic"),a("underline"))}if(j.enableFontSize){h.push("-",a("increasefontsize",false,j.adjustFont),a("decreasefontsize",false,j.adjustFont))}if(j.enableColors){h.push("-",{itemId:"forecolor",cls:e+"btn-icon",iconCls:e+"edit-forecolor",overflowText:g.buttonTips.forecolor.title,tooltip:l?g.buttonTips.forecolor||b:b,tabIndex:-1,menu:Ext.widget("menu",{plain:true,items:[{xtype:"colorpicker",allowReselect:true,focus:Ext.emptyFn,value:"000000",plain:true,clickEvent:"mousedown",handler:function(m,i){j.execCmd("forecolor",Ext.isWebKit||Ext.isIE?"#"+i:i);j.deferFocus();this.up("menu").hide()}}]})},{itemId:"backcolor",cls:e+"btn-icon",iconCls:e+"edit-backcolor",overflowText:g.buttonTips.backcolor.title,tooltip:l?g.buttonTips.backcolor||b:b,tabIndex:-1,menu:Ext.widget("menu",{plain:true,items:[{xtype:"colorpicker",focus:Ext.emptyFn,value:"FFFFFF",plain:true,allowReselect:true,clickEvent:"mousedown",handler:function(m,i){if(Ext.isGecko){j.execCmd("useCSS",false);j.execCmd("hilitecolor",i);j.execCmd("useCSS",true);j.deferFocus()}else{j.execCmd(Ext.isOpera?"hilitecolor":"backcolor",Ext.isWebKit||Ext.isIE?"#"+i:i);j.deferFocus()}this.up("menu").hide()}}]})})}if(j.enableAlignments){h.push("-",a("justifyleft"),a("justifycenter"),a("justifyright"))}if(!Ext.isSafari2){if(j.enableLinks){h.push("-",a("createlink",false,j.createLink))}if(j.enableLists){h.push("-",a("insertorderedlist"),a("insertunorderedlist"))}if(j.enableSourceEdit){h.push("-",a("sourceedit",true,function(i){j.toggleSourceEdit(!j.sourceEditMode)}))}}for(c=0;c',b.iframePad,a)},getEditorBody:function(){var a=this.getDoc();return a.body||a.documentElement},getDoc:function(){return(!Ext.isIE&&this.iframeEl.dom.contentDocument)||this.getWin().document},getWin:function(){return Ext.isIE?this.iframeEl.dom.contentWindow:window.frames[this.iframeEl.dom.name]},finishRenderChildren:function(){this.callParent();this.toolbar.finishRender()},onRender:function(){var a=this;a.callParent(arguments);a.inputEl=a.iframeEl;a.monitorTask=Ext.TaskManager.start({run:a.checkDesignMode,scope:a,interval:100})},initRenderTpl:function(){var a=this;if(!a.hasOwnProperty("renderTpl")){a.renderTpl=a.getTpl("labelableRenderTpl")}return a.callParent()},initRenderData:function(){this.beforeSubTpl='
'+Ext.DomHelper.markup(this.toolbar.getRenderTree());return Ext.applyIf(this.callParent(),this.getLabelableRenderData())},getSubTplData:function(){return{$comp:this,cmpId:this.id,id:this.getInputId(),textareaCls:Ext.baseCSSPrefix+"hidden",value:this.value,iframeName:Ext.id(),iframeSrc:Ext.SSL_SECURE_URL,size:"height:100px;width:100%"}},getSubTplMarkup:function(){return this.getTpl("fieldSubTpl").apply(this.getSubTplData())},initFrameDoc:function(){var b=this,c,a;Ext.TaskManager.stop(b.monitorTask);c=b.getDoc();b.win=b.getWin();c.open();c.write(b.getDocMarkup());c.close();a={run:function(){var d=b.getDoc();if(d.body||d.readyState==="complete"){Ext.TaskManager.stop(a);b.setDesignMode(true);Ext.defer(b.initEditor,10,b)}},interval:10,duration:10000,scope:b};Ext.TaskManager.start(a)},checkDesignMode:function(){var a=this,b=a.getDoc();if(b&&(!b.editorInitialized||a.getDesignMode()!=="on")){a.initFrameDoc()}},setDesignMode:function(c){var a=this,b=a.getDoc();if(b){if(a.readOnly){c=false}b.designMode=(/on|true/i).test(String(c).toLowerCase())?"on":"off"}},getDesignMode:function(){var a=this.getDoc();return !a?"":String(a.designMode).toLowerCase()},disableItems:function(d){var b=this.getToolbar().items.items,c,a=b.length,e;for(c=0;c'+d+"
"}}d=e.cleanHtml(d);if(e.fireEvent("beforesync",e,d)!==false){if(e.textareaEl.dom.value!=d){e.textareaEl.dom.value=d;g=true}e.fireEvent("sync",e,d);if(g){e.checkChange()}}}},getValue:function(){var a=this,b;if(!a.sourceEditMode){a.syncValue()}b=a.rendered?a.textareaEl.dom.value:a.value;a.value=b;return b},pushValue:function(){var b=this,a;if(b.initialized){a=b.textareaEl.dom.value||"";if(!b.activated&&a.length<1){a=b.defaultValue}if(b.fireEvent("beforepush",b,a)!==false){b.getEditorBody().innerHTML=a;if(Ext.isGecko){b.setDesignMode(false);b.setDesignMode(true)}b.fireEvent("push",b,a)}}},deferFocus:function(){this.focus(false,true)},getFocusEl:function(){var a=this,b=a.win;return b&&!a.sourceEditMode?b:a.textareaEl},initEditor:function(){try{var g=this,d=g.getEditorBody(),b=g.textareaEl.getStyles("font-size","font-family","background-image","background-repeat","background-color","color"),i,c;b["background-attachment"]="fixed";d.bgProperties="fixed";Ext.DomHelper.applyStyles(d,b);i=g.getDoc();if(i){try{Ext.EventManager.removeAll(i)}catch(h){}}c=Ext.Function.bind(g.onEditorEvent,g);Ext.EventManager.on(i,{mousedown:c,dblclick:c,click:c,keyup:c,buffer:100});c=g.onRelayedEvent;Ext.EventManager.on(i,{mousedown:c,mousemove:c,mouseup:c,click:c,dblclick:c,scope:g});if(Ext.isGecko){Ext.EventManager.on(i,"keypress",g.applyCommand,g)}if(g.fixKeys){Ext.EventManager.on(i,"keydown",g.fixKeys,g)}Ext.EventManager.on(window,"unload",g.beforeDestroy,g);i.editorInitialized=true;g.initialized=true;g.pushValue();g.setReadOnly(g.readOnly);g.fireEvent("initialize",g)}catch(a){}},beforeDestroy:function(){var a=this,d=a.monitorTask,c,g;if(d){Ext.TaskManager.stop(d)}if(a.rendered){try{c=a.getDoc();if(c){Ext.EventManager.removeAll(Ext.fly(c));for(g in c){if(c.hasOwnProperty&&c.hasOwnProperty(g)){delete c[g]}}}}catch(b){}Ext.destroyMembers(a,"toolbar","iframeEl","textareaEl")}a.callParent()},onRelayedEvent:function(c){var b=this.iframeEl,d=b.getXY(),a=c.getXY();c.xy=[d[0]+a[0],d[1]+a[1]];c.injectEvent(b);c.xy=a},onFirstFocus:function(){var c=this,b,a;c.activated=true;c.disableItems(c.readOnly);if(Ext.isGecko){c.win.focus();b=c.win.getSelection();if(!b.focusNode||b.focusNode.nodeType!==3){a=b.getRangeAt(0);a.selectNodeContents(c.getEditorBody());a.collapse(true);c.deferFocus()}try{c.execCmd("useCSS",true);c.execCmd("styleWithCSS",false)}catch(d){}}c.fireEvent("activate",c)},adjustFont:function(d){var e=d.getItemId()==="increasefontsize"?1:-1,c=this.getDoc().queryCommandValue("FontSize")||"2",a=Ext.isString(c)&&c.indexOf("px")!==-1,b;c=parseInt(c,10);if(a){if(c<=10){c=1+e}else{if(c<=13){c=2+e}else{if(c<=16){c=3+e}else{if(c<=18){c=4+e}else{if(c<=24){c=5+e}else{c=6+e}}}}}c=Ext.Number.constrain(c,1,6)}else{b=Ext.isSafari;if(b){e*=2}c=Math.max(1,c+e)+(b?"px":0)}this.execCmd("FontSize",c)},onEditorEvent:function(a){this.updateToolbar()},updateToolbar:function(){var e=this,d,g,a,c;if(e.readOnly){return}if(!e.activated){e.onFirstFocus();return}d=e.getToolbar().items.map;g=e.getDoc();if(e.enableFont&&!Ext.isSafari2){a=(g.queryCommandValue("FontName")||e.defaultFont).toLowerCase();c=e.fontSelect.dom;if(a!==c.value){c.value=a}}function b(){for(var k=0,h=arguments.length,j;k0){g=String.fromCharCode(g);switch(g){case"b":b="bold";break;case"i":b="italic";break;case"u":b="underline";break}if(b){a.win.focus();a.execCmd(b);a.deferFocus();d.preventDefault()}}}},insertAtCursor:function(c){var b=this,a;if(b.activated){b.win.focus();if(Ext.isIE){a=b.getDoc().selection.createRange();if(a){a.pasteHTML(c);b.syncValue();b.deferFocus()}}else{b.execCmd("InsertHTML",c);b.deferFocus()}}},fixKeys:(function(){if(Ext.isIE){return function(h){var c=this,b=h.getKey(),g=c.getDoc(),i=c.readOnly,a,d;if(b===h.TAB){h.stopEvent();if(!i){a=g.selection.createRange();if(a){a.collapse(true);a.pasteHTML("    ");c.deferFocus()}}}else{if(b===h.ENTER){if(!i){a=g.selection.createRange();if(a){d=a.parentElement();if(!d||d.tagName.toLowerCase()!=="li"){h.stopEvent();a.pasteHTML("
");a.collapse(false);a.select()}}}}}}}if(Ext.isOpera){return function(b){var a=this;if(b.getKey()===b.TAB){b.stopEvent();if(!a.readOnly){a.win.focus();a.execCmd("InsertHTML","    ");a.deferFocus()}}}}if(Ext.isWebKit){return function(c){var b=this,a=c.getKey(),d=b.readOnly;if(a===c.TAB){c.stopEvent();if(!d){b.execCmd("InsertText","\t");b.deferFocus()}}else{if(a===c.ENTER){c.stopEvent();if(!d){b.execCmd("InsertHtml","

");b.deferFocus()}}}}}return null}()),getToolbar:function(){return this.toolbar},buttonTips:{bold:{title:"Bold (Ctrl+B)",text:"Make the selected text bold.",cls:Ext.baseCSSPrefix+"html-editor-tip"},italic:{title:"Italic (Ctrl+I)",text:"Make the selected text italic.",cls:Ext.baseCSSPrefix+"html-editor-tip"},underline:{title:"Underline (Ctrl+U)",text:"Underline the selected text.",cls:Ext.baseCSSPrefix+"html-editor-tip"},increasefontsize:{title:"Grow Text",text:"Increase the font size.",cls:Ext.baseCSSPrefix+"html-editor-tip"},decreasefontsize:{title:"Shrink Text",text:"Decrease the font size.",cls:Ext.baseCSSPrefix+"html-editor-tip"},backcolor:{title:"Text Highlight Color",text:"Change the background color of the selected text.",cls:Ext.baseCSSPrefix+"html-editor-tip"},forecolor:{title:"Font Color",text:"Change the color of the selected text.",cls:Ext.baseCSSPrefix+"html-editor-tip"},justifyleft:{title:"Align Text Left",text:"Align text to the left.",cls:Ext.baseCSSPrefix+"html-editor-tip"},justifycenter:{title:"Center Text",text:"Center text in the editor.",cls:Ext.baseCSSPrefix+"html-editor-tip"},justifyright:{title:"Align Text Right",text:"Align text to the right.",cls:Ext.baseCSSPrefix+"html-editor-tip"},insertunorderedlist:{title:"Bullet List",text:"Start a bulleted list.",cls:Ext.baseCSSPrefix+"html-editor-tip"},insertorderedlist:{title:"Numbered List",text:"Start a numbered list.",cls:Ext.baseCSSPrefix+"html-editor-tip"},createlink:{title:"Hyperlink",text:"Make the selected text a hyperlink.",cls:Ext.baseCSSPrefix+"html-editor-tip"},sourceedit:{title:"Source Edit",text:"Switch to source editing mode.",cls:Ext.baseCSSPrefix+"html-editor-tip"}}});Ext.define("Ext.form.field.Radio",{extend:"Ext.form.field.Checkbox",alias:["widget.radiofield","widget.radio"],alternateClassName:"Ext.form.Radio",requires:["Ext.form.RadioManager"],isRadio:true,inputType:"radio",ariaRole:"radio",formId:null,getGroupValue:function(){var a=this.getManager().getChecked(this.name,this.getFormId());return a?a.inputValue:null},onBoxClick:function(b){var a=this;if(!a.disabled&&!a.readOnly){this.setValue(true)}},onRemoved:function(){this.callParent(arguments);this.formId=null},setValue:function(a){var b=this,c;if(Ext.isBoolean(a)){b.callParent(arguments)}else{c=b.getManager().getWithValue(b.name,a,b.getFormId()).getAt(0);if(c){c.setValue(true)}}return b},getSubmitValue:function(){return this.checked?this.inputValue:null},getModelData:function(){return this.getSubmitData()},onChange:function(c,a){var g=this,e,d,b,h;g.callParent(arguments);if(c){h=g.getManager().getByName(g.name,g.getFormId()).items;d=h.length;for(e=0;e=b&&e<=a})},createStore:function(){var d=this,c=Ext.Date,e=[],b=d.absMin,a=d.absMax;while(b<=a){e.push({disp:c.dateFormat(b,d.format),date:b});b=c.add(b,"mi",d.increment)}return new Ext.data.Store({fields:["disp","date"],data:e})}});Ext.define("Ext.form.field.Time",{extend:"Ext.form.field.ComboBox",alias:"widget.timefield",requires:["Ext.form.field.Date","Ext.picker.Time","Ext.view.BoundListKeyNav","Ext.Date"],alternateClassName:["Ext.form.TimeField","Ext.form.Time"],triggerCls:Ext.baseCSSPrefix+"form-time-trigger",minText:"The time in this field must be equal to or after {0}",maxText:"The time in this field must be equal to or before {0}",invalidText:"{0} is not a valid time",format:"g:i A",altFormats:"g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|ha|gA|h a|g a|g A|gi|hi|gia|hia|g|H|gi a|hi a|giA|hiA|gi A|hi A",increment:15,pickerMaxHeight:300,selectOnTab:true,snapToIncrement:false,initDate:"1/1/2008",initDateFormat:"j/n/Y",ignoreSelection:0,queryMode:"local",displayField:"disp",valueField:"date",initComponent:function(){var c=this,b=c.minValue,a=c.maxValue;if(b){c.setMinValue(b)}if(a){c.setMaxValue(a)}c.displayTpl=new Ext.XTemplate('{[typeof values === "string" ? values : this.formatDate(values["'+c.displayField+'"])]}'+c.delimiter+"",{formatDate:Ext.Function.bind(c.formatDate,c)});this.callParent()},transformOriginalValue:function(a){if(Ext.isString(a)){return this.rawToValue(a)}return a},isEqual:function(b,a){return Ext.Date.isEqual(b,a)},setMinValue:function(c){var b=this,a=b.picker;b.setLimit(c,true);if(a){a.setMinValue(b.minValue)}},setMaxValue:function(c){var b=this,a=b.picker;b.setLimit(c,false);if(a){a.setMaxValue(b.maxValue)}},setLimit:function(b,g){var a=this,e,c;if(Ext.isString(b)){e=a.parseDate(b)}else{if(Ext.isDate(b)){e=b}}if(e){c=Ext.Date.clearTime(new Date(a.initDate));c.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}else{c=null}a[g?"minValue":"maxValue"]=c},rawToValue:function(a){return this.parseDate(a)||a||null},valueToRaw:function(a){return this.formatDate(this.parseDate(a))},getErrors:function(d){var b=this,g=Ext.String.format,h=b.callParent(arguments),c=b.minValue,e=b.maxValue,a;d=b.formatDate(d||b.processRawValue(b.getRawValue()));if(d===null||d.length<1){return h}a=b.parseDate(d);if(!a){h.push(g(b.invalidText,d,Ext.Date.unescapeFormat(b.format)));return h}if(c&&ae){h.push(g(b.maxText,b.formatDate(e)))}return h},formatDate:function(){return Ext.form.field.Date.prototype.formatDate.apply(this,arguments)},parseDate:function(e){var d=this,h=e,b=d.altFormats,g=d.altFormatsArray,c=0,a;if(e&&!Ext.isDate(e)){h=d.safeParse(e,d.format);if(!h&&b){g=g||b.split("|");a=g.length;for(;c0){c=c[0];if(c&&Ext.Date.isEqual(a.get("date"),c.get("date"))){d.collapse()}}},onListSelectionChange:function(c,e){var b=this,a=e[0],d=a?a.get("date"):null;if(!b.ignoreSelection){b.skipSync=true;b.setValue(d);b.skipSync=false;b.fireEvent("select",b,d);b.picker.clearHighlight();b.collapse();b.inputEl.focus()}},syncSelection:function(){var j=this,h=j.picker,c,g,k,b,i,e,a;if(h&&!j.skipSync){h.clearHighlight();k=j.getValue();g=h.getSelectionModel();j.ignoreSelection++;if(k===null){g.deselectAll()}else{if(Ext.isDate(k)){b=h.store.data.items;e=b.length;for(i=0;i1||(g===1&&c[0].nodeType!==3))){b=j.last();i=b.getOffsetsTo(j)[0]+b.getWidth();m=j.getWidth();a=m-i;if(!k.editingPlugin.grid.columnLines){a--}d[0]+=i;k.addCls(Ext.baseCSSPrefix+"grid-editor-on-text-node")}else{a=h.getWidth()-1}if(e===true){k.field.setWidth(a)}k.alignTo(h,k.alignment,d)},onEditorTab:function(b){var a=this.field;if(a.onEditorTab){a.onEditorTab(b)}},alignment:"tl-tl",hideEl:false,cls:Ext.baseCSSPrefix+"small-editor "+Ext.baseCSSPrefix+"grid-editor",shim:false,shadow:false});Ext.define("Ext.grid.ColumnComponentLayout",{extend:"Ext.layout.component.Auto",alias:"layout.columncomponent",type:"columncomponent",setWidthInDom:true,getContentHeight:function(a){return this.owner.isGroupHeader?a.getProp("contentHeight"):this.callParent(arguments)},calculateOwnerHeightFromContentHeight:function(c,b){var a=this.callParent(arguments);if(this.owner.isGroupHeader){a+=this.owner.titleEl.dom.offsetHeight}return a},getContentWidth:function(a){return this.owner.isGroupHeader?a.getProp("contentWidth"):this.callParent(arguments)},calculateOwnerWidthFromContentWidth:function(b,a){return a+b.getPaddingInfo().width}});Ext.define("Ext.grid.ColumnLayout",{extend:"Ext.layout.container.HBox",alias:"layout.gridcolumn",type:"gridcolumn",reserveOffset:false,firstHeaderCls:Ext.baseCSSPrefix+"column-header-first",lastHeaderCls:Ext.baseCSSPrefix+"column-header-last",initLayout:function(){this.grid=this.owner.up("[scrollerOwner]");this.callParent()},beginLayout:function(j){var h=this,e=h.grid,b=e.view,d=0,c=h.getVisibleItems(),a=c.length,g;j.gridContext=j.context.getCmp(h.grid);if(e.lockable){if(h.owner.up("tablepanel")===b.normalGrid){b=b.normalGrid.getView()}else{b=null}}h.callParent(arguments);for(;d0){c[0].addCls(h.firstHeaderCls);c[a-1].addCls(h.lastHeaderCls)}if(!h.owner.isHeader&&Ext.getScrollbarSize().width&&!e.collapsed&&b&&b.table.dom&&(b.autoScroll||b.overflowY)){j.viewContext=j.context.getCmp(b)}},roundFlex:function(a){return Math.floor(a)},calculate:function(e){var d=this,c=e.viewContext,b,a;d.callParent(arguments);if(e.state.parallelDone){e.setProp("columnWidthsDone",true)}if(c&&!e.state.overflowAdjust.width&&!e.gridContext.heightModel.shrinkWrap){b=c.tableContext.getProp("height");a=c.getProp("height");if(isNaN(b+a)){d.done=false}else{if(b>=a){e.gridContext.invalidate({after:function(){e.state.overflowAdjust={width:Ext.getScrollbarSize().width,height:0}}})}}}},completeLayout:function(c){var j=this,b=j.owner,a=c.state,g=false,k=j.sizeModels.calculated,e,h,d,m,l;j.callParent(arguments);if(!a.flexesCalculated&&b.forceFit&&!b.isHeader){e=c.childItems;h=e.length;for(d=0;d",initComponent:function(){var b=this,a=b.scroll;b.table=new Ext.dom.Element.Fly();b.table.id=b.id+"gridTable";b.autoScroll=undefined;if(a===true||a==="both"){b.autoScroll=true}else{if(a==="horizontal"){b.overflowX="auto"}else{if(a==="vertical"){b.overflowY="auto"}}}b.selModel.view=b;b.headerCt.view=b;b.headerCt.markDirty=b.markDirty;b.initFeatures(b.grid);delete b.grid;b.tpl=b.getTpl("initialTpl");b.callParent()},moveColumn:function(a,p,d){var n=this,l=(d>1)?document.createDocumentFragment():undefined,c=p,q=n.getGridColumns().length,o=q-1,b=(n.firstCls||n.lastCls)&&(p===0||p==q||a===0||a==o),g,e,r,k,m,h;if(n.rendered){h=n.el.query(n.headerRowSelector);r=n.el.query(n.rowSelector);if(p>a&&l){c-=d}for(g=0,k=h.length;ge){i=j.bottom-e}}d=g.getRecord(k);b=g.store.indexOf(d);if(i){a.scrollByDeltaY(i)}g.fireEvent("rowfocus",d,k,b)}},focusCell:function(h){var j=this,k=j.getCellByPosition(h),b=j.el,d=0,e=0,c=b.getRegion(),a=j.ownerCt,i,g;c.bottom=c.top+b.dom.clientHeight;c.right=c.left+b.dom.clientWidth;if(k){i=k.getRegion();if(i.topc.bottom){d=i.bottom-c.bottom}}if(i.leftc.right){e=i.right-c.right}}if(d){a.scrollByDeltaY(d)}if(e){a.scrollByDeltaX(e)}b.focus();j.fireEvent("cellfocus",g,k,h)}},scrollByDelta:function(c,b){b=b||"scrollTop";var a=this.el.dom;a[b]=(a[b]+=c)},onUpdate:function(g,e,k,p){var v=this,j,d,l,s,r,u,q,b,c,w,t,r,a,n,m,h,o=v.editingPlugin&&v.editingPlugin.editing;if(v.viewReady){j=v.store.indexOf(e);a=v.headerCt.getGridColumns();n=v.overItemCls;if(a.length&&j>-1){d=v.bufferRender([e],j)[0];q=v.all.item(j);if(q){b=q.dom;m=q.hasCls(n);if(b.mergeAttributes){b.mergeAttributes(d,true)}else{l=d.attributes;s=l.length;for(r=0;re){e=b}}return e},getPositionByEvent:function(g){var d=this,b=g.getTarget(d.cellSelector),c=g.getTarget(d.itemSelector),a=d.getRecord(c),h=d.getHeaderByCell(b);return d.getPosition(a,h)},getHeaderByCell:function(b){if(b){var a=b.className.match(this.cellRe);if(a&&a[1]){return Ext.getCmp(a[1])}}return false},walkCells:function(l,m,h,n,a,o){if(!l){return}var j=this,p=l.row,d=l.column,k=j.store.getCount(),g=j.getFirstVisibleColumnIndex(),b=j.getLastVisibleColumnIndex(),i={row:p,column:d},c=j.headerCt.getHeaderAtIndex(d);if(!c||c.hidden){return false}h=h||{};m=m.toLowerCase();switch(m){case"right":if(d===b){if(n||p===k-1){return false}if(!h.ctrlKey){i.row=p+1;i.column=g}}else{if(!h.ctrlKey){i.column=d+j.getRightGap(c)}else{i.column=b}}break;case"left":if(d===g){if(n||p===0){return false}if(!h.ctrlKey){i.row=p-1;i.column=b}}else{if(!h.ctrlKey){i.column=d+j.getLeftGap(c)}else{i.column=g}}break;case"up":if(p===0){return false}else{if(!h.ctrlKey){i.row=p-1}else{i.row=0}}break;case"down":if(p===k-1){return false}else{if(!h.ctrlKey){i.row=p+1}else{i.row=k-1}}break}if(a&&a.call(o||window,i)!==true){return false}else{return i}},getFirstVisibleColumnIndex:function(){var a=this.getHeaderCt().getVisibleGridColumns()[0];return a?a.getIndex():-1},getLastVisibleColumnIndex:function(){var b=this.getHeaderCt().getVisibleGridColumns(),a=b[b.length-1];return a.getIndex()},getHeaderCt:function(){return this.headerCt},getPosition:function(a,e){var d=this,b=d.store,c=d.headerCt.getGridColumns();return{row:b.indexOf(a),column:Ext.Array.indexOf(c,e)}},getRightGap:function(a){var g=this.getHeaderCt(),e=g.getGridColumns(),b=Ext.Array.indexOf(e,a),c=b+1,d;for(;c<=e.length;c++){if(!e[c].hidden){d=c;break}}return d-b},beforeDestroy:function(){if(this.rendered){this.el.removeAllListeners()}this.callParent(arguments)},getLeftGap:function(a){var g=this.getHeaderCt(),e=g.getGridColumns(),c=Ext.Array.indexOf(e,a),d=c-1,b;for(;d>=0;d--){if(!e[d].hidden){b=d;break}}return b-c},onAdd:function(c,a,b){this.callParent(arguments);this.doStripeRows(b)},onRemove:function(c,a,b){this.callParent(arguments);this.doStripeRows(b)},doStripeRows:function(b,a){var d=this,e,h,c,g;if(d.rendered&&d.stripeRows){e=d.getNodes(b,a);for(c=0,h=e.length;c>#normalHeaderCt"},normal:{items:c,itemId:"normalHeaderCt",stretchMaxPartner:"^^>>#lockedHeaderCt"}}},onLockedViewMouseWheel:function(i){var d=this,h=-d.scrollDelta,a=h*i.getWheelDeltas().y,b=d.lockedGrid.getView().el.dom,c,g;if(b){c=b.scrollTop!==b.scrollHeight-b.clientHeight;g=b.scrollTop!==0}if((a<0&&g)||(a>0&&c)){i.stopEvent();d.scrolling=true;b.scrollTop+=a;d.normalGrid.getView().el.dom.scrollTop=b.scrollTop;d.scrolling=false;d.onNormalViewScroll()}},onLockedViewScroll:function(){var e=this,d=e.lockedGrid.getView(),c=e.normalGrid.getView(),a,b;if(!e.scrolling){e.scrolling=true;c.el.dom.scrollTop=d.el.dom.scrollTop;if(e.store.buffered){b=d.el.child("table",true);a=c.el.child("table",true);b.style.position="absolute"}e.scrolling=false}},onNormalViewScroll:function(){var e=this,d=e.lockedGrid.getView(),c=e.normalGrid.getView(),a,b;if(!e.scrolling){e.scrolling=true;d.el.dom.scrollTop=c.el.dom.scrollTop;if(e.store.buffered){b=d.el.child("table",true);a=c.el.child("table",true);b.style.position="absolute";b.style.top=a.style.top}e.scrolling=false}},onLockedHeaderMove:function(){if(this.syncRowHeight){this.onNormalViewRefresh()}},onNormalHeaderMove:function(){if(this.syncRowHeight){this.onLockedViewRefresh()}},updateSpacer:function(){var d=this,b=d.lockedGrid.getView().el,c=d.normalGrid.getView().el.dom,a=b.dom.id+"-spacer",e=(c.offsetHeight-c.clientHeight)+"px";d.spacerEl=Ext.getDom(a);if(d.spacerEl){d.spacerEl.style.height=e}else{Ext.core.DomHelper.append(b,{id:a,style:"height: "+e})}},onLockedViewRefresh:function(){if(this.normalGrid.headerCt.getGridColumns().length){var e=this,a=e.lockedGrid.getView(),c=a.el,g=c.query(a.getItemSelector()),d=g.length,b=0;e.lockedHeights=[];for(;bk[e]){Ext.fly(g[e]).setHeight(a[e])}else{if(a[e]0){a.setWidth(b);a.show()}else{a.hide()}Ext.resumeLayouts(true);return b>0},onLockedHeaderResize:function(){this.syncLockedWidth()},onLockedHeaderHide:function(){this.syncLockedWidth()},onLockedHeaderShow:function(){this.syncLockedWidth()},onLockedHeaderSortChange:function(b,c,a){if(a){this.normalGrid.headerCt.clearOtherSortStates(null,true)}},onNormalHeaderSortChange:function(b,c,a){if(a){this.lockedGrid.headerCt.clearOtherSortStates(null,true)}},unlock:function(a,e){var d=this,g=d.normalGrid,i=d.lockedGrid,h=g.headerCt,c=i.headerCt,b=false;if(!Ext.isDefined(e)){e=0}a=a||c.getMenu().activeHeader;Ext.suspendLayouts();a.ownerCt.remove(a,false);if(d.syncLockedWidth()){b=true}a.locked=false;h.insert(e,a);d.normalGrid.getView().refresh();if(b){d.lockedGrid.getView().refresh()}Ext.resumeLayouts(true);d.fireEvent("unlockcolumn",d,a)},applyColumnsState:function(h){var p=this,e=p.lockedGrid,g=e.headerCt,n=p.normalGrid.headerCt,q=Ext.Array.toMap(g.items,"headerId"),j=Ext.Array.toMap(n.items,"headerId"),m=[],o=[],l=1,b=h.length,k,a,d,c;for(k=0;ke.viewSize){e.viewSize=e.store.viewSize=c;e.handleViewScroll(e.lastScrollDirection||1)}},beforeViewRefresh:function(){var b=this,a=b.view,c,d;b.focusOnRefresh=Ext.Element.getActiveElement===a.el.dom;if(b.variableRowHeight){d=b.lastScrollDirection;b.commonRecordIndex=undefined;if(d&&(b.previousStart!==undefined)&&(b.scrollProportion===undefined)&&(c=a.getNodes()).length){if(d===1){if(b.tableStart<=b.previousEnd){b.commonRecordIndex=c.length-1}}else{if(d===-1){if(b.tableEnd>=b.previousStart){b.commonRecordIndex=0}}}b.scrollOffset=-a.el.getOffsetsTo(c[b.commonRecordIndex])[1];b.commonRecordIndex-=(b.tableStart-b.previousStart)}else{b.scrollOffset=undefined}}},onLockRefresh:function(a){a.table.dom.style.position="absolute"},onViewRefresh:function(){var d=this,g=d.store,c,e=d.view,j=e.el,k=j.dom,m,i,b,l=e.table.dom,h,a;if(d.focusOnRefresh){j.focus();d.focusOnRefresh=false}d.disabled=true;if(g.getCount()===g.getTotalCount()||(g.isFiltered()&&!g.remoteFilter)){d.stretcher.setHeight(0);d.position=k.scrollTop=0;d.setTablePosition("absolute");return}d.stretcher.setHeight(c=d.getScrollHeight());a=k.scrollTop;d.isScrollRefresh=(a>0);if(d.scrollProportion!==undefined){d.setTablePosition("absolute");d.setTableTop((d.scrollProportion?(c*d.scrollProportion)-(l.offsetHeight*d.scrollProportion):0)+"px")}else{d.setTablePosition("absolute");d.setTableTop((h=(d.tableStart||0)*d.rowHeight)+"px");if(d.scrollOffset){m=e.getNodes();i=-j.getOffsetsTo(m[d.commonRecordIndex])[1];b=i-d.scrollOffset;d.position=(k.scrollTop+=b)}else{if((h>a)||((h+l.offsetHeight)b?1:-1;if(b!==d.position){d.handleViewScroll(d.lastScrollDirection)}}},handleViewScroll:function(i){var e=this,k=e.store,h=e.view,g=e.viewSize,l=k.getTotalCount(),d=l-g,c=e.getFirstVisibleRowIndex(),j=e.getLastVisibleRowIndex(),a=h.el.dom,b,m;if(l>=g){e.scrollProportion=undefined;if(i==-1){if(e.tableStart){if(c!==undefined){if(c<(e.tableStart+e.numFromEdge)){b=Math.max(0,j+e.trailingBufferZone-g)}}else{e.scrollProportion=a.scrollTop/(a.scrollHeight-a.clientHeight);b=Math.max(0,l*e.scrollProportion-(g/2)-e.numFromEdge-((e.leadingBufferZone+e.trailingBufferZone)/2))}}}else{if(c!==undefined){if(j>(e.tableEnd-e.numFromEdge)){b=Math.max(0,c-e.trailingBufferZone)}}else{e.scrollProportion=a.scrollTop/(a.scrollHeight-a.clientHeight);b=l*e.scrollProportion-(g/2)-e.numFromEdge-((e.leadingBufferZone+e.trailingBufferZone)/2)}}if(b!==undefined){if(b>d){b=d&~1;m=l-1}else{b=b&~1;m=b+g-1}if(k.rangeCached(b,m)){e.cancelLoad();k.guaranteeRange(b,m)}else{e.attemptLoad(b,m)}}}},getFirstVisibleRowIndex:function(){var d=this,a=d.view,h=a.el.dom.scrollTop,e,c,b,g;if(d.variableRowHeight){e=a.getNodes();c=e.length;if(!c){return}g=Ext.fly(e[0]).getOffsetsTo(a.el)[1];for(b=0;ba.el.dom.clientHeight){return}if(g>0){return a.getRecord(e[b]).index}}}else{return Math.floor(h/d.rowHeight)}},getLastVisibleRowIndex:function(){var h=this,c=h.store,a=h.view,b=a.el.dom.clientHeight,j,g,e,d;if(h.variableRowHeight){j=a.getNodes();if(!j.length){return}g=c.getCount()-1;d=Ext.fly(j[g]).getOffsetsTo(a.el)[1]+j[g].offsetHeight;for(e=g;e>=0;e--){d-=j[e].offsetHeight;if(d<0){return}if(de.viewSize){g-=e.rowHeight}}}else{if(c){h=a.el.down(a.getItemSelector());if(h){e.rowHeight=h.getHeight(false,true)}}}return Math.floor(b.getTotalCount()*e.rowHeight)+g},attemptLoad:function(c,a){var b=this;if(b.scrollToLoadBuffer){if(!b.loadTask){b.loadTask=new Ext.util.DelayedTask(b.doAttemptLoad,b,[])}b.loadTask.delay(b.scrollToLoadBuffer,b.doAttemptLoad,b,[c,a])}else{b.store.guaranteeRange(c,a)}},cancelLoad:function(){if(this.loadTask){this.loadTask.cancel()}},doAttemptLoad:function(b,a){this.store.guaranteeRange(b,a)},destroy:function(){var b=this,a=b.viewListeners.scroll;b.store.un({guaranteedrange:b.onGuaranteedRange,scope:b});b.view.un(b.viewListeners);if(b.view.rendered){b.stretcher.remove();b.view.el.un("scroll",a.fn,a.scope)}}});Ext.define("Ext.layout.container.Fit",{extend:"Ext.layout.container.Container",alternateClassName:"Ext.layout.FitLayout",alias:"layout.fit",itemCls:Ext.baseCSSPrefix+"fit-item",targetCls:Ext.baseCSSPrefix+"layout-fit",type:"fit",defaultMargins:{top:0,right:0,bottom:0,left:0},manageMargins:true,sizePolicies:{0:{setsWidth:0,setsHeight:0},1:{setsWidth:1,setsHeight:0},2:{setsWidth:0,setsHeight:1},3:{setsWidth:1,setsHeight:1}},getItemSizePolicy:function(b,c){var a=c||this.owner.getSizeModel(),d=(a.width.shrinkWrap?0:1)|(a.height.shrinkWrap?0:2);return this.sizePolicies[d]},beginLayoutCycle:function(k,g){var t=this,u=t.lastHeightModel&&t.lastHeightModel.calculated,h=t.lastWidthModel&&t.lastWidthModel.calculated,o=h||u,l=0,m=0,s,b,p,r,e,a,j,n,q,d;t.callParent(arguments);if(o&&k.targetContext.el.dom.tagName.toUpperCase()!="TD"){o=h=u=false}b=k.childItems;e=b.length;for(p=0;p'+a.emptyText+"":""}));a.view.getComponentLayout().headerCt=a.headerCt;a.mon(a.view,{uievent:a.processEvent,scope:a});b.view=a.view;a.headerCt.view=a.view;a.relayEvents(a.view,["cellclick","celldblclick"])}return a.view},setAutoScroll:Ext.emptyFn,processEvent:function(g,b,a,c,d,i){var h=this,j;if(d!==-1){j=h.headerCt.getGridColumns()[d];return j.processEvent.apply(j,arguments)}},determineScrollbars:function(){},invalidateScroller:function(){},scrollByDeltaY:function(b,a){this.getView().scrollBy(0,b,a)},scrollByDeltaX:function(b,a){this.getView().scrollBy(b,0,a)},afterCollapse:function(){var a=this;a.saveScrollPos();a.saveScrollPos();a.callParent(arguments)},afterExpand:function(){var a=this;a.callParent(arguments);a.restoreScrollPos();a.restoreScrollPos()},saveScrollPos:Ext.emptyFn,restoreScrollPos:Ext.emptyFn,onHeaderResize:function(){this.delayScroll()},onHeaderMove:function(e,g,a,b,d){var c=this;if(c.optimizedColumnMove===false){c.view.refresh()}else{c.view.moveColumn(b,d,a)}c.delayScroll()},onHeaderHide:function(a,b){this.delayScroll()},onHeaderShow:function(a,b){this.delayScroll()},delayScroll:function(){var a=this.getScrollTarget().el;if(a){this.scrollTask.delay(10,null,null,[a.dom.scrollLeft])}},onViewReady:function(){this.fireEvent("viewready",this)},onRestoreHorzScroll:function(){var a=this.scrollLeftPos;if(a){this.syncHorizontalScroll(a,true)}},getScrollerOwner:function(){var a=this;if(!this.scrollerOwner){a=this.up("[scrollerOwner]")}return a},getLhsMarker:function(){var a=this;return a.lhsMarker||(a.lhsMarker=Ext.DomHelper.append(a.el,{cls:Ext.baseCSSPrefix+"grid-resize-marker"},true))},getRhsMarker:function(){var a=this;return a.rhsMarker||(a.rhsMarker=Ext.DomHelper.append(a.el,{cls:Ext.baseCSSPrefix+"grid-resize-marker"},true))},getSelectionModel:function(){if(!this.selModel){this.selModel={}}var b="SINGLE",a;if(this.simpleSelect){b="SIMPLE"}else{if(this.multiSelect){b="MULTI"}}Ext.applyIf(this.selModel,{allowDeselect:this.allowDeselect,mode:b});if(!this.selModel.events){a=this.selModel.selType||this.selType;this.selModel=Ext.create("selection."+a,this.selModel)}if(!this.selModel.hasRelaySetup){this.relayEvents(this.selModel,["selectionchange","beforeselect","beforedeselect","select","deselect"]);this.selModel.hasRelaySetup=true}if(this.disableSelection){this.selModel.locked=true}return this.selModel},getScrollTarget:function(){var a=this.getScrollerOwner(),b=a.query("tableview");return b[1]||b[0]},onHorizontalScroll:function(a,b){this.syncHorizontalScroll(b.scrollLeft)},syncHorizontalScroll:function(d,b){var c=this,a;b=b===true;if(c.rendered&&(b||d!==c.scrollLeftPos)){if(b){a=c.getScrollTarget();a.el.dom.scrollLeft=d}c.headerCt.el.dom.scrollLeft=d;c.scrollLeftPos=d}},onStoreLoad:Ext.emptyFn,getEditorParent:function(){return this.body},bindStore:function(a){var b=this;b.store=a;b.getView().bindStore(a)},beforeDestroy:function(){Ext.destroy(this.verticalScroller);this.callParent()},reconfigure:function(a,b){var c=this,d=c.headerCt;if(c.lockable){c.reconfigureLockable(a,b)}else{Ext.suspendLayouts();if(b){delete c.scrollLeftPos;d.removeAll();d.add(b)}if(a){a=Ext.StoreManager.lookup(a);c.bindStore(a)}else{c.getView().refresh()}d.setSortState();Ext.resumeLayouts(true)}c.fireEvent("reconfigure",c,a,b)}});Ext.define("Ext.grid.View",{extend:"Ext.view.Table",alias:"widget.gridview",stripeRows:true,autoScroll:true});Ext.define("Ext.grid.Panel",{extend:"Ext.panel.Table",requires:["Ext.grid.View"],alias:["widget.gridpanel","widget.grid"],alternateClassName:["Ext.list.ListView","Ext.ListView","Ext.grid.GridPanel"],viewType:"gridview",lockable:false,bothCfgCopy:["invalidateScrollerOnRefresh","hideHeaders","enableColumnHide","enableColumnMove","enableColumnResize","sortableColumns"],normalCfgCopy:["verticalScroller","verticalScrollDock","verticalScrollerType","scroll"],lockedCfgCopy:[],rowLines:true});Ext.define("Ext.grid.RowEditor",{extend:"Ext.form.Panel",requires:["Ext.tip.ToolTip","Ext.util.HashMap","Ext.util.KeyNav"],saveBtnText:"Update",cancelBtnText:"Cancel",errorsText:"Errors",dirtyText:"You need to commit or cancel your changes",lastScrollLeft:0,lastScrollTop:0,border:false,hideMode:"offsets",initComponent:function(){var b=this,a;b.cls=Ext.baseCSSPrefix+"grid-row-editor";b.layout={type:"hbox",align:"middle"};b.columns=new Ext.util.HashMap();b.columns.getKey=function(d){var c;if(d.getEditor){c=d.getEditor();if(c){return c.id}}return d.id};b.mon(b.columns,{add:b.onFieldAdd,remove:b.onFieldRemove,replace:b.onFieldReplace,scope:b});b.callParent(arguments);if(b.fields){b.setField(b.fields);delete b.fields}b.mon(Ext.container.Container.hierarchyEventSource,{scope:b,show:b.repositionIfVisible});a=b.getForm();a.trackResetOnLoad=true},onFieldChange:function(){var c=this,b=c.getForm(),a=b.isValid();if(c.errorSummary&&c.isVisible()){c[a?"hideToolTip":"showToolTip"]()}c.updateButton(a);c.isValid=a},updateButton:function(b){var a=this.floatingButtons;if(a){a.child("#update").setDisabled(!b)}},afterRender:function(){var b=this,a=b.editingPlugin;b.callParent(arguments);b.mon(b.renderTo,"scroll",b.onCtScroll,b,{buffer:100});b.mon(b.el,{click:Ext.emptyFn,stopPropagation:true});b.el.swallowEvent(["keypress","keydown"]);b.keyNav=new Ext.util.KeyNav(b.el,{enter:a.completeEdit,esc:a.onEscKey,scope:a});b.mon(a.view,{beforerefresh:b.onBeforeViewRefresh,refresh:b.onViewRefresh,itemremove:b.onViewItemRemove,scope:b})},onBeforeViewRefresh:function(b){var c=this,a=b.el.dom;if(c.el.dom.parentNode===a){a.removeChild(c.el.dom)}},onViewRefresh:function(c){var e=this,b=c.el.dom,d=e.context,a;b.appendChild(e.el.dom);if(d&&(a=d.store.indexOf(d.record))>=0){d.row=c.getNode(a);e.reposition();if(e.tooltip&&e.tooltip.isVisible()){e.tooltip.setTarget(d.row)}}else{e.editingPlugin.cancelEdit()}},onViewItemRemove:function(a,b){var c=this.context;if(c&&a===c.record){this.editingPlugin.cancelEdit()}},onCtScroll:function(d,c){var a=this,b=c.scrollTop,g=c.scrollLeft;if(b!==a.lastScrollTop){a.lastScrollTop=b;if((a.tooltip&&a.tooltip.isVisible())||a.hiddenTip){a.repositionTip()}}if(g!==a.lastScrollLeft){a.lastScrollLeft=g;a.reposition()}},onColumnAdd:function(a){if(!a.isGroupHeader){this.setField(a)}},onColumnRemove:function(a){this.columns.remove(a)},onColumnResize:function(b,a){if(!b.isGroupHeader){b.getEditor().setWidth(a-2);this.repositionIfVisible()}},onColumnHide:function(a){if(!a.isGroupHeader){a.getEditor().hide();this.repositionIfVisible()}},onColumnShow:function(a){var b=a.getEditor();b.setWidth(a.getWidth()-2).show();this.repositionIfVisible()},onColumnMove:function(b,a,c){if(!b.isGroupHeader){var d=b.getEditor();if(this.items.indexOf(d)!=c){this.move(a,c)}}},onFieldAdd:function(e,a,b){var c=this,g,d;if(!b.isGroupHeader){g=c.editingPlugin.grid.headerCt.getHeaderIndex(b);d=b.getEditor({xtype:"displayfield"});c.insert(g,d)}},onFieldRemove:function(g,a,b){var c=this,e,d;if(!b.isGroupHeader){e=b.getEditor();d=e.el;c.remove(e,false);if(d){d.remove()}}},onFieldReplace:function(d,a,c,b){this.onFieldRemove(d,a,b)},clearFields:function(){var b=this.columns,a;for(a in b){if(b.hasOwnProperty(a)){b.removeAtKey(a)}}},getFloatingButtons:function(){var e=this,g=Ext.baseCSSPrefix,d=g+"grid-row-editor-buttons",c=e.editingPlugin,a=Ext.panel.Panel.prototype.minButtonWidth,b;if(!e.floatingButtons){b=e.floatingButtons=new Ext.Container({renderTpl:['
','
','
','
','
',"{%this.renderContainer(out,values)%}"],width:200,renderTo:e.el,baseCls:d,layout:{type:"hbox",align:"middle"},defaults:{flex:1,margins:"0 1 0 1"},items:[{itemId:"update",xtype:"button",handler:c.completeEdit,scope:c,text:e.saveBtnText,minWidth:a},{xtype:"button",handler:c.cancelEdit,scope:c,text:e.cancelBtnText,minWidth:a}]});e.mon(b.el,{mousedown:Ext.emptyFn,click:Ext.emptyFn,stopEvent:true})}return e.floatingButtons},repositionIfVisible:function(d){var b=this,a=b.view;if(d&&(d==b||!a.isDescendantOf(d))){return}if(b.isVisible()&&a.isVisible(true)){b.reposition()}},reposition:function(r){var s=this,c=s.context,e=c&&Ext.get(c.row),p=s.getFloatingButtons(),q=p.el,a=s.editingPlugin.grid,g=a.view.el,o=a.headerCt.getFullWidth(),t=a.getWidth(),l=Math.min(o,t),n=a.view.el.dom.scrollLeft,i=p.getWidth(),d=(l-i)/2+n,j,h,m,k=function(){q.scrollIntoView(g,false);if(r&&r.callback){r.callback.call(r.scope||s)}},b;if(e&&Ext.isElement(e.dom)){e.scrollIntoView(g,false);j=e.getXY()[1]-5;h=e.getHeight();m=h+(s.editingPlugin.grid.rowLines?9:10);if(s.getHeight()!=m){s.setHeight(m);s.el.setLeft(0)}if(r){b={to:{y:j},duration:r.duration||125,listeners:{afteranimate:function(){k();j=e.getXY()[1]-5}}};s.el.animate(b)}else{s.el.setY(j);k()}}if(s.getWidth()!=o){s.setWidth(o)}q.setLeft(d)},getEditor:function(a){var b=this;if(Ext.isNumber(a)){return b.query(">[isFormField]")[a]}else{if(a.isHeader&&!a.isGroupHeader){return a.getEditor()}}},removeField:function(b){var a=this;b=a.getEditor(b);a.mun(b,"validitychange",a.onValidityChange,a);a.columns.removeAtKey(b.id);Ext.destroy(b)},setField:function(b){var d=this,a,c,e;if(Ext.isArray(b)){c=b.length;for(a=0;adisplayfield");b=g.length;for(c=0;cg&&a":"",h=[],a=d.query(">[isFormField]"),c=a.length,b;function g(i){return"
  • "+i+"
  • "}for(b=0;b"+h.join("")+""},beforeDestroy:function(){Ext.destroy(this.floatingButtons,this.tooltip);this.callParent()}});Ext.define("Ext.grid.plugin.HeaderResizer",{extend:"Ext.AbstractPlugin",requires:["Ext.dd.DragTracker","Ext.util.Region"],alias:"plugin.gridheaderresizer",disabled:false,config:{dynamic:false},colHeaderCls:Ext.baseCSSPrefix+"column-header",minColWidth:40,maxColWidth:1000,wResizeCursor:"col-resize",eResizeCursor:"col-resize",init:function(a){this.headerCt=a;a.on("render",this.afterHeaderRender,this,{single:true})},destroy:function(){if(this.tracker){this.tracker.destroy()}},afterHeaderRender:function(){var b=this.headerCt,a=b.el;b.mon(a,"mousemove",this.onHeaderCtMouseMove,this);this.tracker=new Ext.dd.DragTracker({disabled:this.disabled,onBeforeStart:Ext.Function.bind(this.onBeforeStart,this),onStart:Ext.Function.bind(this.onStart,this),onDrag:Ext.Function.bind(this.onDrag,this),onEnd:Ext.Function.bind(this.onEnd,this),tolerance:3,autoStart:300,el:a})},onHeaderCtMouseMove:function(b,k){var d=this,a,i,j,g,c,h;if(d.headerCt.dragging){if(d.activeHd){d.activeHd.el.dom.style.cursor="";delete d.activeHd}}else{i=b.getTarget("."+d.colHeaderCls,3,true);if(i){j=Ext.getCmp(i.id);if(j.isOnLeftEdge(b)){g=j.previousNode("gridcolumn:not([hidden]):not([isGroupHeader])");if(g){h=d.headerCt.up("tablepanel");c=g.up("tablepanel");if(!((c===h)||((h.ownerCt.isXType("tablepanel"))&&h.ownerCt.view.lockedGrid===c))){g=null}}}else{if(j.isOnRightEdge(b)){g=j}else{g=null}}if(g){if(g.isGroupHeader){a=g.getGridColumns();g=a[a.length-1]}if(g&&!(g.fixed||(g.resizable===false)||d.disabled)){d.activeHd=g;j.el.dom.style.cursor=d.eResizeCursor}}else{j.el.dom.style.cursor="";delete d.activeHd}}}},onBeforeStart:function(b){var a=b.getTarget();this.dragHd=this.activeHd;if(!!this.dragHd&&!Ext.fly(a).hasCls(Ext.baseCSSPrefix+"column-header-trigger")&&!this.headerCt.dragging){this.tracker.constrainTo=this.getConstrainRegion();return true}else{this.headerCt.dragging=false;return false}},getConstrainRegion:function(){var c=this,a=c.dragHd.el,d=Ext.util.Region.getRegion(a),b;if(c.headerCt.forceFit){b=c.dragHd.nextNode("gridcolumn:not([hidden]):not([isGroupHeader])")}return d.adjust(0,c.headerCt.forceFit?(b?b.getWidth()-c.minColWidth:0):c.maxColWidth-a.getWidth(),0,c.minColWidth)},onStart:function(u){var v=this,h=v.dragHd,b=h.el,o=b.getWidth(),j=v.headerCt,l=u.getTarget(),d,r,g,k,c,n,a,i,s,q,p,m;if(v.dragHd&&!Ext.fly(l).hasCls(Ext.baseCSSPrefix+"column-header-trigger")){j.dragging=true}v.origWidth=o;if(!v.dynamic){d=b.getXY();r=j.up("[scrollerOwner]");g=v.dragHd.up(":not([isGroupHeader])");k=g.up();c=r.getLhsMarker();n=r.getRhsMarker();a=n.parent();i=a.getLocalX();s=a.getLocalY();q=a.translatePoints(d);p=k.body.getHeight()+j.getHeight();m=q.top-s;c.setTop(m);n.setTop(m);c.setHeight(p);n.setHeight(p);c.setLeft(q.left-i);n.setLeft(q.left+o-i)}},onDrag:function(h){if(!this.dynamic){var g=this.tracker.getXY("point"),a=this.headerCt.up("[scrollerOwner]"),i=a.getRhsMarker(),c=i.parent(),b=c.translatePoints(g),d=c.getLocalX();i.setLeft(b.left-d)}else{this.doResize()}},onEnd:function(g){this.headerCt.dragging=false;if(this.dragHd){if(!this.dynamic){var d=this.dragHd,b=this.headerCt.up("[scrollerOwner]"),c=b.getLhsMarker(),h=b.getRhsMarker(),a=-9999;c.setLeft(a);h.setLeft(a)}this.doResize()}},doResize:function(){if(this.dragHd){var b=this.dragHd,a,c=this.tracker.getOffset("point");if(b.flex){delete b.flex}Ext.suspendLayouts();b.setWidth(this.origWidth+c[0]);if(this.headerCt.forceFit){a=b.nextNode("gridcolumn:not([hidden]):not([isGroupHeader])");if(a){delete a.flex;a.setWidth(a.getWidth()-c[0])}}Ext.resumeLayouts(true)}},disable:function(){this.disabled=true;if(this.tracker){this.tracker.disable()}},enable:function(){this.disabled=false;if(this.tracker){this.tracker.enable()}}});Ext.define("Ext.grid.header.DragZone",{extend:"Ext.dd.DragZone",colHeaderCls:Ext.baseCSSPrefix+"column-header",maxProxyWidth:120,constructor:function(a){this.headerCt=a;this.ddGroup=this.getDDGroup();this.callParent([a.el]);this.proxy.el.addCls(Ext.baseCSSPrefix+"grid-col-dd")},getDDGroup:function(){return"header-dd-zone-"+this.headerCt.up("[scrollerOwner]").id},getDragData:function(b){var d=b.getTarget("."+this.colHeaderCls),a,c;if(d){a=Ext.getCmp(d.id);if(!this.headerCt.dragging&&a.draggable&&!(a.isOnLeftEdge(b)||a.isOnRightEdge(b))){c=document.createElement("div");c.innerHTML=Ext.getCmp(d.id).text;return{ddel:c,header:a}}}return false},onBeforeDrag:function(){return !(this.headerCt.dragging||this.disabled)},onInitDrag:function(){this.headerCt.dragging=true;this.callParent(arguments)},onDragDrop:function(){this.headerCt.dragging=false;this.callParent(arguments)},afterRepair:function(){this.callParent();this.headerCt.dragging=false},getRepairXY:function(){return this.dragData.header.el.getXY()},disable:function(){this.disabled=true},enable:function(){this.disabled=false}});Ext.define("Ext.grid.header.DropZone",{extend:"Ext.dd.DropZone",colHeaderCls:Ext.baseCSSPrefix+"column-header",proxyOffsets:[-4,-9],constructor:function(a){this.headerCt=a;this.ddGroup=this.getDDGroup();this.callParent([a.el])},getDDGroup:function(){return"header-dd-zone-"+this.headerCt.up("[scrollerOwner]").id},getTargetFromEvent:function(a){return a.getTarget("."+this.colHeaderCls)},getTopIndicator:function(){if(!this.topIndicator){this.topIndicator=Ext.DomHelper.append(Ext.getBody(),{cls:"col-move-top",html:" "},true)}return this.topIndicator},getBottomIndicator:function(){if(!this.bottomIndicator){this.bottomIndicator=Ext.DomHelper.append(Ext.getBody(),{cls:"col-move-bottom",html:" "},true)}return this.bottomIndicator},getLocation:function(d,b){var a=d.getXY()[0],c=Ext.fly(b).getRegion(),h,g;if((c.right-a)<=(c.right-c.left)/2){h="after"}else{h="before"}return{pos:h,header:Ext.getCmp(b.id),node:b}},positionIndicator:function(v,o,u){var a=this.getLocation(u,o),q=a.header,g=a.pos,d=v.nextSibling("gridcolumn:not([hidden])"),t=v.previousSibling("gridcolumn:not([hidden])"),l,r,s,b,c,k,m,x,w,n,j,p,h;if(!q.draggable&&q.getIndex()===0){return false}this.lastLocation=a;if((v!==q)&&((g==="before"&&d!==q)||(g==="after"&&t!==q))&&!q.isDescendantOf(v)){n=Ext.dd.DragDropManager.getRelated(this);j=n.length;p=0;for(;pl)){p-=1}Ext.suspendLayouts();if(t!==a){t.remove(q,false);if(t.isGroupHeader){if(!t.items.getCount()){c=t.ownerCt;c.remove(t,false);t.el.dom.parentNode.removeChild(t.el.dom)}}}if(t===a){a.move(l,p)}else{a.insert(p,q)}if(a.isGroupHeader){if(a!==t){q.savedFlex=q.flex;delete q.flex;q.width=q.getWidth()}}else{if(q.savedFlex){q.flex=q.savedFlex;delete q.width}}i.purgeCache();Ext.resumeLayouts(true);i.onHeaderMoved(q,m,b,s);if(!t.items.getCount()){t.destroy()}}}}}});Ext.define("Ext.grid.plugin.HeaderReorderer",{extend:"Ext.AbstractPlugin",requires:["Ext.grid.header.DragZone","Ext.grid.header.DropZone"],alias:"plugin.gridheaderreorderer",init:function(a){this.headerCt=a;a.on({render:this.onHeaderCtRender,single:true,scope:this})},destroy:function(){Ext.destroy(this.dragZone,this.dropZone)},onHeaderCtRender:function(){var a=this;a.dragZone=new Ext.grid.header.DragZone(a.headerCt);a.dropZone=new Ext.grid.header.DropZone(a.headerCt);if(a.disabled){a.dragZone.disable()}},enable:function(){this.disabled=false;if(this.dragZone){this.dragZone.enable()}},disable:function(){this.disabled=true;if(this.dragZone){this.dragZone.disable()}}});Ext.define("Ext.grid.header.Container",{extend:"Ext.container.Container",requires:["Ext.grid.ColumnLayout","Ext.grid.plugin.HeaderResizer","Ext.grid.plugin.HeaderReorderer"],uses:["Ext.grid.column.Column","Ext.menu.Menu","Ext.menu.CheckItem","Ext.menu.Separator"],border:true,alias:"widget.headercontainer",baseCls:Ext.baseCSSPrefix+"grid-header-ct",dock:"top",weight:100,defaultType:"gridcolumn",detachOnRemove:false,defaultWidth:100,sortAscText:"Sort Ascending",sortDescText:"Sort Descending",sortClearText:"Clear Sort",columnsText:"Columns",headerOpenCls:Ext.baseCSSPrefix+"column-header-open",triStateSort:false,ddLock:false,dragging:false,sortable:true,initComponent:function(){var a=this;a.headerCounter=0;a.plugins=a.plugins||[];if(!a.isHeader){if(a.enableColumnResize){a.resizer=new Ext.grid.plugin.HeaderResizer();a.plugins.push(a.resizer)}if(a.enableColumnMove){a.reorderer=new Ext.grid.plugin.HeaderReorderer();a.plugins.push(a.reorderer)}}if(a.isHeader&&!a.items){a.layout=a.layout||"auto"}else{a.layout=Ext.apply({type:"gridcolumn",align:"stretchmax"},a.initialConfig.layout)}a.defaults=a.defaults||{};Ext.applyIf(a.defaults,{triStateSort:a.triStateSort,sortable:a.sortable});a.menuTask=new Ext.util.DelayedTask(a.updateMenuDisabledState,a);a.callParent();a.addEvents("columnresize","headerclick","headertriggerclick","columnmove","columnhide","columnshow","sortchange","menucreate")},onDestroy:function(){var a=this;a.menuTask.cancel();Ext.destroy(a.resizer,a.reorderer);a.callParent()},applyColumnsState:function(e){if(!e||!e.length){return}var m=this,k=m.items.items,j=k.length,g=0,b=e.length,l,d,a,h;for(l=0;lgridcolumn[hideable]"),h=a.length,d;for(;b{text}
    {%this.renderContainer(out,values)%}',dataIndex:null,text:" ",menuText:null,emptyCellText:" ",sortable:true,resizable:true,hideable:true,menuDisabled:false,renderer:false,editRenderer:false,align:"left",draggable:true,tooltipType:"qtip",initDraggable:Ext.emptyFn,isHeader:true,componentLayout:"columncomponent",initResizable:Ext.emptyFn,initComponent:function(){var a=this,b;if(Ext.isDefined(a.header)){a.text=a.header;delete a.header}if(!a.triStateSort){a.possibleSortStates.length=2}if(Ext.isDefined(a.columns)){a.isGroupHeader=true;a.items=a.columns;delete a.columns;delete a.flex;delete a.width;a.cls=(a.cls||"")+" "+Ext.baseCSSPrefix+"group-header";a.sortable=false;a.resizable=false;a.align="center"}else{a.isContainer=false;if(a.flex){a.minWidth=a.minWidth||Ext.grid.plugin.HeaderResizer.prototype.minColWidth}}a.addCls(Ext.baseCSSPrefix+"column-header-align-"+a.align);b=a.renderer;if(b){if(typeof b=="string"){a.renderer=Ext.util.Format[b]}a.hasCustomRenderer=true}else{if(a.defaultRenderer){a.scope=a;a.renderer=a.defaultRenderer}}a.callParent(arguments);a.on({element:"el",click:a.onElClick,dblclick:a.onElDblClick,scope:a});a.on({element:"titleEl",mouseenter:a.onTitleMouseOver,mouseleave:a.onTitleMouseOut,scope:a})},onAdd:function(a){a.isSubHeader=true;a.addCls(Ext.baseCSSPrefix+"group-sub-header");this.callParent(arguments)},onRemove:function(a){a.isSubHeader=false;a.removeCls(Ext.baseCSSPrefix+"group-sub-header");this.callParent(arguments)},initRenderData:function(){var b=this,d="",c=b.tooltip,a=b.tooltipType=="qtip"?"data-qtip":"title";if(!Ext.isEmpty(c)){d=a+'="'+c+'" '}return Ext.applyIf(b.callParent(arguments),{text:b.text,menuDisabled:b.menuDisabled,tipMarkup:d})},applyColumnState:function(b){var a=this,c=Ext.isDefined;a.applyColumnsState(b.columns);if(c(b.hidden)){a.hidden=b.hidden}if(c(b.locked)){a.locked=b.locked}if(c(b.sortable)){a.sortable=b.sortable}if(c(b.width)){delete a.flex;a.width=b.width}else{if(c(b.flex)){delete a.width;a.flex=b.flex}}},getColumnState:function(){var e=this,b=e.items.items,a=b?b.length:0,d,c=[],g={id:e.getStateId()};e.savePropsToState(["hidden","sortable","locked","flex","width"],g);if(e.isGroupHeader){for(d=0;d:not([hidden])");if(h.length===1&&h[0]==j){j.ownerCt.hide();return}}Ext.suspendLayouts();if(j.isGroupHeader){h=j.items.items;for(d=0,g=h.length;d*");for(e=0,a=c.length;e
    ',indicatorCls:Ext.baseCSSPrefix+"grid-drop-indicator",constructor:function(a){var b=this;Ext.apply(b,a);if(!b.ddGroup){b.ddGroup="view-dd-zone-"+b.view.id}b.callParent([b.view.el])},fireViewEvent:function(){var b=this,a;b.lock();a=b.view.fireEvent.apply(b.view,arguments);b.unlock();return a},getTargetFromEvent:function(k){var j=k.getTarget(this.view.getItemSelector()),d,c,b,g,a,h;if(!j){d=k.getPageY();for(g=0,c=this.view.getNodes(),a=c.length;g=(b.bottom-b.top)/2){d="before"}else{d="after"}return d},containsRecordAtOffset:function(d,b,g){if(!b){return false}var a=this.view,c=a.indexOf(b),e=a.getNode(c+g),h=e?a.getRecord(e):null;return h&&Ext.Array.contains(d,h)},positionIndicator:function(b,c,d){var g=this,i=g.view,h=g.getPosition(d,b),k=i.getRecord(b),a=c.records,j;if(!Ext.Array.contains(a,k)&&(h=="before"&&!g.containsRecordAtOffset(a,k,-1)||h=="after"&&!g.containsRecordAtOffset(a,k,1))){g.valid=true;if(g.overRecord!=k||g.currentPosition!=h){j=Ext.fly(b).getY()-i.el.getY()-1;if(h=="after"){j+=Ext.fly(b).getHeight()}g.getIndicator().setWidth(Ext.fly(i.el).getWidth()).showAt(0,j);g.overRecord=k;g.currentPosition=h}}else{g.invalidateDrop()}},invalidateDrop:function(){if(this.valid){this.valid=false;this.getIndicator().hide()}},onNodeOver:function(c,a,g,d){var b=this;if(!Ext.Array.contains(d.records,b.view.getRecord(c))){b.positionIndicator(c,d,g)}return b.valid?b.dropAllowed:b.dropNotAllowed},notifyOut:function(c,a,g,d){var b=this;b.callParent(arguments);delete b.overRecord;delete b.currentPosition;if(b.indicator){b.indicator.hide()}},onContainerOver:function(a,h,g){var d=this,b=d.view,c=b.store.getCount();if(c){d.positionIndicator(b.getNode(c-1),g,h)}else{delete d.overRecord;delete d.currentPosition;d.getIndicator().setWidth(Ext.fly(b.el).getWidth()).showAt(0,0);d.valid=true}return d.dropAllowed},onContainerDrop:function(a,c,b){return this.onNodeDrop(a,null,c,b)},onNodeDrop:function(g,a,i,h){var d=this,c=false,b={wait:false,processDrop:function(){d.invalidateDrop();d.handleNodeDrop(h,d.overRecord,d.currentPosition);c=true;d.fireViewEvent("drop",g,h,d.overRecord,d.currentPosition)},cancelDrop:function(){d.invalidateDrop();c=true}},j=false;if(d.valid){j=d.fireViewEvent("beforedrop",g,h,d.overRecord,d.currentPosition,b);if(b.wait){return}if(j!==false){if(!c){b.processDrop()}}}return j},destroy:function(){Ext.destroy(this.indicator);delete this.indicator;this.callParent()}});Ext.define("Ext.grid.ViewDropZone",{extend:"Ext.view.DropZone",indicatorHtml:'
    ',indicatorCls:Ext.baseCSSPrefix+"grid-drop-indicator",handleNodeDrop:function(b,d,e){var j=this.view,k=j.getStore(),h,a,c,g;if(b.copy){a=b.records;b.records=[];for(c=0,g=a.length;cActions",sortable:false,constructor:function(d){var g=this,b=Ext.apply({},d),c=b.items||[g],h,e,a;g.origRenderer=b.renderer||g.renderer;g.origScope=b.scope||g.scope;delete g.renderer;delete g.scope;delete b.renderer;delete b.scope;delete b.items;g.callParent([b]);g.items=c;for(e=0,a=c.length;e"}return g},enableAction:function(b,a){var c=this;if(!b){b=0}else{if(!Ext.isNumber(b)){b=Ext.Array.indexOf(c.items,b)}}c.items[b].disabled=false;c.up("tablepanel").el.select("."+Ext.baseCSSPrefix+"action-col-"+b).removeCls(c.disabledCls);if(!a){c.fireEvent("enable",c)}},disableAction:function(b,a){var c=this;if(!b){b=0}else{if(!Ext.isNumber(b)){b=Ext.Array.indexOf(c.items,b)}}c.items[b].disabled=true;c.up("tablepanel").el.select("."+Ext.baseCSSPrefix+"action-col-"+b).addCls(c.disabledCls);if(!a){c.fireEvent("disable",c)}},destroy:function(){delete this.items;delete this.renderer;return this.callParent(arguments)},processEvent:function(i,l,n,a,j,g,c,p){var h=this,d=g.getTarget(),b,o,k,m=i=="keydown"&&g.getKey();if(m&&!Ext.fly(d).findParent(l.cellSelector)){d=Ext.fly(n).down("."+Ext.baseCSSPrefix+"action-col-icon",true)}if(d&&(b=d.className.match(h.actionIdRe))){o=h.items[parseInt(b[1],10)];if(o){if(i=="click"||(m==g.ENTER||m==g.SPACE)){k=o.handler||h.handler;if(k&&!o.disabled){k.call(o.scope||h.origScope||h,l,a,j,o,g,c,p)}}else{if(i=="mousedown"&&o.stopSelection!==false){return false}}}}return h.callParent(arguments)},cascade:function(b,a){b.call(a||this,this)},getRefItems:function(){return[]}});Ext.define("Ext.grid.column.Boolean",{extend:"Ext.grid.column.Column",alias:["widget.booleancolumn"],alternateClassName:"Ext.grid.BooleanColumn",trueText:"true",falseText:"false",undefinedText:" ",defaultRenderer:function(a){if(a===undefined){return this.undefinedText}if(!a||a==="false"){return this.falseText}return this.trueText}});Ext.define("Ext.grid.column.Date",{extend:"Ext.grid.column.Column",alias:["widget.datecolumn"],requires:["Ext.Date"],alternateClassName:"Ext.grid.DateColumn",initComponent:function(){if(!this.format){this.format=Ext.Date.defaultFormat}this.callParent(arguments)},defaultRenderer:function(a){return Ext.util.Format.date(a,this.format)}});Ext.define("Ext.grid.column.Number",{extend:"Ext.grid.column.Column",alias:["widget.numbercolumn"],requires:["Ext.util.Format"],alternateClassName:"Ext.grid.NumberColumn",format:"0,000.00",defaultRenderer:function(a){return Ext.util.Format.number(a,this.format)}});Ext.define("Ext.grid.column.Template",{extend:"Ext.grid.column.Column",alias:["widget.templatecolumn"],requires:["Ext.XTemplate"],alternateClassName:"Ext.grid.TemplateColumn",initComponent:function(){var a=this;a.tpl=(!Ext.isPrimitive(a.tpl)&&a.tpl.compile)?a.tpl:new Ext.XTemplate(a.tpl);a.hasCustomRenderer=true;a.callParent(arguments)},defaultRenderer:function(c,d,a){var b=Ext.apply({},a.data,a.getAssociatedData());return this.tpl.apply(b)}});Ext.define("Ext.grid.feature.Feature",{extend:"Ext.util.Observable",alias:"feature.feature",isFeature:true,disabled:false,hasFeatureEvent:true,eventPrefix:null,eventSelector:null,view:null,grid:null,collectData:false,constructor:function(a){this.initialConfig=a;this.callParent(arguments)},clone:function(){return new this.self(this.initialConfig)},init:Ext.emptyFn,getFeatureTpl:function(){return""},getFireEventArgs:function(b,a,c,d){return[b,a,c,d]},attachEvents:function(){},getFragmentTpl:Ext.emptyFn,mutateMetaRowTpl:Ext.emptyFn,getMetaRowTplFragments:function(){return{}},getTableFragments:function(){return{}},getAdditionalData:function(c,a,b,d){return{}},enable:function(){this.disabled=false},disable:function(){this.disabled=true}});Ext.define("Ext.grid.feature.AbstractSummary",{extend:"Ext.grid.feature.Feature",alias:"feature.abstractsummary",showSummaryRow:true,nestedIdRe:/\{\{id\}([\w\-]*)\}/g,init:function(){var a=this;a.grid.optimizedColumnMove=false;a.view.mon(a.view.store,{update:a.onStoreUpdate,scope:a})},onStoreUpdate:function(){var a=this.view;if(this.showSummaryRow){a.saveScrollState();a.refresh();a.restoreScrollState()}},toggleSummaryRow:function(a){this.showSummaryRow=!!a},getSummaryFragments:function(){var a={};if(this.showSummaryRow){Ext.apply(a,{printSummaryRow:Ext.bind(this.printSummaryRow,this)})}return a},printSummaryRow:function(b){var a=this.view.getTableChunker().metaRowTpl.join(""),c=Ext.baseCSSPrefix;a=a.replace(c+"grid-row",c+"grid-row-summary");a=a.replace("{{id}}","{gridSummaryValue}");a=a.replace(this.nestedIdRe,"{id$1}");a=a.replace("{[this.embedRowCls()]}","{rowCls}");a=a.replace("{[this.embedRowAttr()]}","{rowAttr}");a=new Ext.XTemplate(a,{firstOrLastCls:Ext.view.TableChunker.firstOrLastCls});return a.applyTemplate({columns:this.getPrintData(b)})},getColumnValue:function(c,a){var b=Ext.getCmp(c.id),e=a[c.id],d=b.summaryRenderer;if(!e&&e!==0){e="\u00a0"}if(d){e=d.call(b.scope||this,e,a,c.dataIndex)}return e},getSummary:function(a,b,d,c){if(b){if(Ext.isFunction(b)){return a.aggregate(b,null,c)}switch(b){case"count":return a.count(c);case"min":return a.min(d,c);case"max":return a.max(d,c);case"sum":return a.sum(d,c);case"average":return a.average(d,c);default:return c?{}:""}}}});Ext.define("Ext.grid.feature.Chunking",{extend:"Ext.grid.feature.Feature",alias:"feature.chunking",chunkSize:20,rowHeight:Ext.isIE?27:26,visibleChunk:0,hasFeatureEvent:false,attachEvents:function(){this.view.el.on("scroll",this.onBodyScroll,this,{buffer:300})},onBodyScroll:function(g,c){var b=this.view,d=c.scrollTop,a=Math.floor(d/this.rowHeight/this.chunkSize);if(a!==this.visibleChunk){this.visibleChunk=a;b.refresh();b.el.dom.scrollTop=d;b.el.dom.scrollTop=d}},collectData:function(d,m,l,k,c){var j=this,e=c.rows.length,b=0,g=0,a=j.visibleChunk,p,n,h=c.rows;delete c.rows;c.chunks=[];for(;be){n=e-b}else{n=j.chunkSize}if(g>=a-1&&g<=a+1){p=h.slice(b,b+j.chunkSize)}else{p=[]}c.chunks.push({rows:p,fullWidth:k,chunkHeight:n*j.rowHeight})}return c},getTableFragments:function(){return{openTableWrap:function(){return'
    '},closeTableWrap:function(){return"
    "}}}});Ext.define("Ext.grid.feature.Grouping",{extend:"Ext.grid.feature.Feature",alias:"feature.grouping",eventPrefix:"group",eventSelector:"."+Ext.baseCSSPrefix+"grid-group-hd",bodySelector:"."+Ext.baseCSSPrefix+"grid-group-body",constructor:function(){var a=this;a.collapsedState={};a.callParent(arguments)},groupHeaderTpl:"{columnName}: {name}",depthToIndent:17,collapsedCls:Ext.baseCSSPrefix+"grid-group-collapsed",hdCollapsedCls:Ext.baseCSSPrefix+"grid-group-hd-collapsed",hdCollapsibleCls:Ext.baseCSSPrefix+"grid-group-hd-collapsible",groupByText:"Group by this field",showGroupsText:"Show in groups",hideGroupedHeader:false,startCollapsed:false,enableGroupingMenu:true,enableNoGroups:true,collapsible:true,enable:function(){var c=this,a=c.view,b=a.store,d;c.lastGroupField=c.getGroupField();if(c.lastGroupIndex){c.block();b.group(c.lastGroupIndex);c.unblock()}c.callParent();d=c.view.headerCt.getMenu().down("#groupToggleMenuItem");d.setChecked(true,true);c.refreshIf()},disable:function(){var d=this,a=d.view,b=a.store,g=b.remoteGroup,e,c;c=b.groupers.first();if(c){d.lastGroupIndex=c.property;d.block();b.clearGrouping();d.unblock()}d.callParent();e=d.view.headerCt.getMenu().down("#groupToggleMenuItem");e.setChecked(true,true);e.setChecked(false,true);d.refreshIf()},refreshIf:function(){var b=this.grid.ownerCt,a=this.view;if(!a.store.remoteGroup&&!this.blockRefresh){if(b&&b.lockable){b.view.refresh()}else{a.refresh()}}},getFeatureTpl:function(b,c,a,d){return["",'
    {collapsed}{[this.renderGroupHeaderTpl(values, parent)]}
    ','{[this.recurse(values)]}',"
    "].join("")},getFragmentTpl:function(){var a=this;return{indentByDepth:a.indentByDepth,depthToIndent:a.depthToIndent,renderGroupHeaderTpl:function(b,c){return Ext.XTemplate.getTpl(a,"groupHeaderTpl").apply(b,c)}}},indentByDepth:function(a){return'style="padding-left:'+((a.depth||0)*this.depthToIndent)+'px;"'},destroy:function(){delete this.view;delete this.prunedHeader},attachEvents:function(){var b=this,a=b.view;a.on({scope:b,groupclick:b.onGroupClick,rowfocus:b.onRowFocus});a.mon(a.store,{scope:b,groupchange:b.onGroupChange,remove:b.onRemove,add:b.onAdd,update:b.onUpdate});if(b.enableGroupingMenu){b.injectGroupingMenu()}b.pruneGroupedHeader();b.lastGroupField=b.getGroupField();b.block();b.onGroupChange();b.unblock()},onAdd:function(l,c){var j=this,k=j.view,a=j.getGroupField(),g=0,h=c.length,n,d,b,e,m;if(k.rendered){d={};n={};for(;g"},closeRow:function(){return""},mutateMetaRowTpl:function(a){a.unshift("{[this.isRow()]}");a.push("{[this.closeRow()]}")},getAdditionalData:function(e,j,g,i){var h=this.view,d=h.headerCt,c=d.items.getAt(0),b={},a;if(c){a=c.id+"-tdAttr";b[a]=this.indentByDepth(e)+" "+(i[a]?i[a]:"");b.collapsed="true";b.data=g.getData()}return b},getGroupRows:function(m,d,n,k){var i=this,c=m.children,o=m.rows=[],j=i.view,g=i.getGroupedHeader(),b=i.getGroupField(),h=-1,a,l=d.length,e;if(j.store.buffered){i.collapsible=false}m.viewId=j.id;for(a=0;a-1){m.name=m.renderedValue=n[h][g.id]}if(i.collapsedState[m.name]){m.collapsedCls=i.collapsedCls;m.hdCollapsedCls=i.hdCollapsedCls}else{m.collapsedCls=m.hdCollapsedCls=""}if(i.collapsible){m.collapsibleClass=i.hdCollapsibleCls}else{m.collapsibleClass=""}return m},getGroupHeaderId:function(a){return this.view.id+"-hd-"+a},getGroupBodyId:function(a){return this.view.id+"-bd-"+a},getGroupName:function(a){var b=this,c;c=Ext.fly(a).findParent(b.eventSelector);if(c){return c.id.split(this.view.id+"-hd-")[1]}c=Ext.fly(a).findParent(b.bodySelector);if(c){return c.id.split(this.view.id+"-bd-")[1]}},collectData:function(c,p,n,k,a){var h=this,l=h.view.store,j=h.collapsedState,e,d,b,i,m;if(h.startCollapsed){h.startCollapsed=false;e=true}if(!h.disabled&&l.isGrouped()){a.rows=b=l.getGroups();i=b.length;for(d=0;d","");a+="{[this.printSummaryRow(xindex)]}"}return a},getFragmentTpl:function(){var b=this,a=b.callParent();Ext.apply(a,b.getSummaryFragments());if(b.showSummaryRow){b.summaryGroups=b.view.store.getGroups();b.summaryData=b.generateSummaryData()}return a},getPrintData:function(j){var k=this,e=k.view.headerCt.getColumnsForTpl(),h=0,b=e.length,g=[],a=k.summaryGroups[j-1].name,d=k.summaryData[a],c;for(;h','','
    {rowBody}
    ',"",""].join("")},getMetaRowTplFragments:function(){return{getRowBody:this.getRowBody,rowBodyTrCls:this.rowBodyTrCls,rowBodyTdCls:this.rowBodyTdCls,rowBodyDivCls:this.rowBodyDivCls}},mutateMetaRowTpl:function(a){a.push("{[this.getRowBody(values)]}")},getAdditionalData:function(c,a,b,g){var d=this.view.headerCt,e=d.getColumnCount();return{rowBody:"",rowBodyCls:this.rowBodyCls,rowBodyColspan:e}}});Ext.define("Ext.grid.feature.RowWrap",{extend:"Ext.grid.feature.Feature",alias:"feature.rowwrap",hasFeatureEvent:false,init:function(){if(!this.disabled){this.enable()}},getRowSelector:function(){return"tr:has(> "+this.view.cellSelector+")"},enable:function(){var b=this,a=b.view;b.callParent();b.savedRowSelector=a.rowSelector;a.rowSelector=b.getRowSelector();a.getComponentLayout().getColumnSelector=b.getColumnSelector},disable:function(){var c=this,a=c.view,b=c.savedRowSelector;c.callParent();if(b){a.rowSelector=b}delete c.savedRowSelector},mutateMetaRowTpl:function(a){var b=Ext.baseCSSPrefix;a[0]=a[0].replace(b+"grid-row","");a[0]=a[0].replace("{[this.embedRowCls()]}","");a.unshift('');a.unshift('
    ');a.push("
    ");a.push("")},embedColSpan:function(){return"{colspan}"},embedFullWidth:function(){return"{fullWidth}"},getAdditionalData:function(h,p,k,m){var d=this.view.headerCt,c=d.getColumnCount(),n=d.getFullWidth(),l=d.query("gridcolumn"),q=l.length,g=0,b={colspan:c,fullWidth:n},a,j,e;for(;g{[this.printSummaryRow()]}"},getPrintData:function(a){var g=this,c=g.view.headerCt.getColumnsForTpl(),b=0,e=c.length,h=[],j=g.summaryData,d;for(;bc?1:0))}},setColumnField:function(b,d){var c=this,a=c.getEditor();a.removeField(b);c.callParent(arguments);c.getEditor().setField(b)}});Ext.define("Ext.grid.property.Grid",{extend:"Ext.grid.Panel",alias:"widget.propertygrid",alternateClassName:"Ext.grid.PropertyGrid",uses:["Ext.grid.plugin.CellEditing","Ext.grid.property.Store","Ext.grid.property.HeaderContainer","Ext.XTemplate","Ext.grid.CellEditor","Ext.form.field.Date","Ext.form.field.Text","Ext.form.field.Number","Ext.form.field.ComboBox"],valueField:"value",nameField:"name",enableColumnMove:false,columnLines:true,stripeRows:false,trackMouseOver:false,clicksToEdit:1,enableHdMenu:false,initComponent:function(){var a=this;a.addCls(Ext.baseCSSPrefix+"property-grid");a.plugins=a.plugins||[];a.plugins.push(new Ext.grid.plugin.CellEditing({clicksToEdit:a.clicksToEdit,startEdit:function(b,c){return this.self.prototype.startEdit.call(this,b,a.headerCt.child("#"+a.valueField))}}));a.selModel={selType:"cellmodel",onCellSelect:function(b){if(b.column!=1){b.column=1}return this.self.prototype.onCellSelect.call(this,b)}};a.customRenderers=a.customRenderers||{};a.customEditors=a.customEditors||{};if(!a.store){a.propStore=a.store=new Ext.grid.property.Store(a,a.source)}if(a.sortableColumns){a.store.sort("name","ASC")}a.columns=new Ext.grid.property.HeaderContainer(a,a.store);a.addEvents("beforepropertychange","propertychange");a.callParent();a.getView().walkCells=this.walkCells;a.editors={date:new Ext.grid.CellEditor({field:new Ext.form.field.Date({selectOnFocus:true})}),string:new Ext.grid.CellEditor({field:new Ext.form.field.Text({selectOnFocus:true})}),number:new Ext.grid.CellEditor({field:new Ext.form.field.Number({selectOnFocus:true})}),"boolean":new Ext.grid.CellEditor({field:new Ext.form.field.ComboBox({editable:false,store:[[true,a.headerCt.trueText],[false,a.headerCt.falseText]]})})};a.store.on("update",a.onUpdate,a)},onUpdate:function(d,a,c){var g=this,b,e;if(g.rendered&&c==Ext.data.Model.EDIT){b=a.get(g.valueField);e=a.modified.value;if(g.fireEvent("beforepropertychange",g.source,a.getId(),b,e)!==false){if(g.source){g.source[a.getId()]=b}a.commit();g.fireEvent("propertychange",g.source,a.getId(),b,e)}else{a.reject()}}},walkCells:function(h,g,d,c,a,b){if(g=="left"){g="up"}else{if(g=="right"){g="down"}}h=Ext.view.Table.prototype.walkCells.call(this,h,g,d,c,a,b);if(!h.column){h.column=1}return h},getCellEditor:function(a,c){var d=this,e=a.get(d.nameField),g=a.get(d.valueField),b=d.customEditors[e];if(b){if(!(b instanceof Ext.grid.CellEditor)){if(!(b instanceof Ext.form.field.Base)){b=Ext.ComponentManager.create(b,"textfield")}b=d.customEditors[e]=new Ext.grid.CellEditor({field:b})}}else{if(Ext.isDate(g)){b=d.editors.date}else{if(Ext.isNumber(g)){b=d.editors.number}else{if(Ext.isBoolean(g)){b=d.editors["boolean"]}else{b=d.editors.string}}}}b.editorId=e;return b},beforeDestroy:function(){var a=this;a.callParent();a.destroyEditors(a.editors);a.destroyEditors(a.customEditors);delete a.source},destroyEditors:function(b){for(var a in b){if(b.hasOwnProperty(a)){Ext.destroy(b[a])}}},setSource:function(a){this.source=a;this.propStore.setSource(a)},getSource:function(){return this.propStore.getSource()},setProperty:function(c,b,a){this.propStore.setValue(c,b,a)},removeProperty:function(a){this.propStore.remove(a)}});Ext.define("Ext.grid.property.HeaderContainer",{extend:"Ext.grid.header.Container",alternateClassName:"Ext.grid.PropertyColumnModel",nameWidth:115,nameText:"Name",valueText:"Value",dateFormat:"m/j/Y",trueText:"true",falseText:"false",nameColumnCls:Ext.baseCSSPrefix+"grid-property-name",constructor:function(b,a){var c=this;c.grid=b;c.store=a;c.callParent([{items:[{header:c.nameText,width:b.nameColumnWidth||c.nameWidth,sortable:b.sortableColumns,dataIndex:b.nameField,renderer:Ext.Function.bind(c.renderProp,c),itemId:b.nameField,menuDisabled:true,tdCls:c.nameColumnCls},{header:c.valueText,renderer:Ext.Function.bind(c.renderCell,c),getEditor:Ext.Function.bind(c.getCellEditor,c),sortable:b.sortableColumns,flex:1,fixed:true,dataIndex:b.valueField,itemId:b.valueField,menuDisabled:true}]}])},getCellEditor:function(a){return this.grid.getCellEditor(a,this)},renderProp:function(a){return this.getPropertyName(a)},renderCell:function(g,d,e){var b=this,c=b.grid.customRenderers[e.get(b.grid.nameField)],a=g;if(c){return c.apply(b,arguments)}if(Ext.isDate(g)){a=b.renderDate(g)}else{if(Ext.isBoolean(g)){a=b.renderBool(g)}}return Ext.util.Format.htmlEncode(a)},renderDate:Ext.util.Format.date,renderBool:function(a){return this[a?"trueText":"falseText"]},getPropertyName:function(b){var a=this.grid.propertyNames;return a&&a[b]?a[b]:b}});Ext.define("Ext.grid.property.Property",{extend:"Ext.data.Model",alternateClassName:"Ext.PropGridProperty",fields:[{name:"name",type:"string"},{name:"value"}],idProperty:"name"});Ext.define("Ext.grid.property.Store",{extend:"Ext.data.Store",alternateClassName:"Ext.grid.PropertyStore",sortOnLoad:false,uses:["Ext.data.reader.Reader","Ext.data.proxy.Proxy","Ext.data.ResultSet","Ext.grid.property.Property"],constructor:function(a,c){var b=this;b.grid=a;b.source=c;b.callParent([{data:c,model:Ext.grid.property.Property,proxy:b.getProxy()}])},getProxy:function(){if(!this.proxy){Ext.grid.property.Store.prototype.proxy=new Ext.data.proxy.Memory({model:Ext.grid.property.Property,reader:this.getReader()})}return this.proxy},getReader:function(){if(!this.reader){Ext.grid.property.Store.prototype.reader=new Ext.data.reader.Reader({model:Ext.grid.property.Property,buildExtractors:Ext.emptyFn,read:function(a){return this.readRecords(a)},readRecords:function(b){var d,c,a={records:[],success:true};for(c in b){if(b.hasOwnProperty(c)){d=b[c];if(this.isEditableValue(d)){a.records.push(new Ext.grid.property.Property({name:c,value:d},c))}}}a.total=a.count=a.records.length;return new Ext.data.ResultSet(a)},isEditableValue:function(a){return Ext.isPrimitive(a)||Ext.isDate(a)}})}return this.reader},setSource:function(a){var b=this;b.source=a;b.suspendEvents();b.removeAll();b.proxy.data=a;b.load();b.resumeEvents();b.fireEvent("datachanged",b);b.fireEvent("refresh",b)},getProperty:function(a){return Ext.isNumber(a)?this.getAt(a):this.getById(a)},setValue:function(e,c,a){var b=this,d=b.getRec(e);if(d){d.set("value",c);b.source[e]=c}else{if(a){b.source[e]=c;d=new Ext.grid.property.Property({name:e,value:c},e);b.add(d)}}},remove:function(b){var a=this.getRec(b);if(a){this.callParent([a]);delete this.source[b]}},getRec:function(a){return this.getById(a)},getSource:function(){return this.source}});Ext.define("Ext.layout.ClassList",(function(){var b=Ext.String.splitWords,a=Ext.Array.toMap;return{dirty:false,constructor:function(c){this.owner=c;this.map=a(this.classes=b(c.el.className))},add:function(c){var d=this;if(!d.map[c]){d.map[c]=true;d.classes.push(c);if(!d.dirty){d.dirty=true;d.owner.markDirty()}}},addMany:function(c){Ext.each(b(c),this.add,this)},contains:function(c){return this.map[c]},flush:function(){this.owner.el.className=this.classes.join(" ");this.dirty=false},remove:function(c){var d=this;if(d.map[c]){delete d.map[c];d.classes=Ext.Array.filter(d.classes,function(e){return e!=c});if(!d.dirty){d.dirty=true;d.owner.markDirty()}}},removeMany:function(d){var e=this,c=a(b(d));e.classes=Ext.Array.filter(e.classes,function(g){if(!c[g]){return true}delete e.map[g];if(!e.dirty){e.dirty=true;e.owner.markDirty()}return false})}}}()));Ext.define("Ext.util.Queue",{constructor:function(){this.clear()},add:function(c){var b=this,a=b.getKey(c);if(!b.map[a]){++b.length;b.items.push(c);b.map[a]=c}return c},clear:function(){var b=this,a=b.items;b.items=[];b.map={};b.length=0;return a},contains:function(b){var a=this.getKey(b);return this.map.hasOwnProperty(a)},getCount:function(){return this.length},getKey:function(a){return a.id},remove:function(e){var d=this,c=d.getKey(e),a=d.items,b;if(d.map[c]){b=Ext.Array.indexOf(a,e);Ext.Array.erase(a,b,1);delete d.map[c];--d.length}return e}});Ext.define("Ext.layout.ContextItem",{requires:["Ext.layout.ClassList"],heightModel:null,widthModel:null,sizeModel:null,boxChildren:null,boxParent:null,children:[],dirty:null,dirtyCount:0,hasRawContent:true,isContextItem:true,isTopLevel:false,consumersContentHeight:0,consumersContentWidth:0,consumersContainerHeight:0,consumersContainerWidth:0,consumersHeight:0,consumersWidth:0,ownerCtContext:null,remainingChildLayouts:0,remainingComponentChildLayouts:0,remainingContainerChildLayouts:0,props:null,state:null,wrapsComponent:false,constructor:function(b){var g=this,e,d,a,c,h;Ext.apply(g,b);e=g.el;g.id=e.id;g.lastBox=e.lastBox;g.flushedProps={};g.props={};g.styles={};h=g.target;if(h.isComponent){g.wrapsComponent=true;d=h.ownerCt;if(d&&(a=g.context.items[d.el.id])){g.ownerCtContext=a}g.sizeModel=c=h.getSizeModel(a&&a.widthModel.pairsByHeightOrdinal[a.heightModel.ordinal]);g.widthModel=c.width;g.heightModel=c.height}},init:function(j,c){var s=this,a=s.props,d=s.dirty,l=s.ownerCtContext,p=s.target.ownerLayout,h=!s.state,t=j||h,e,o,m,q,b,u,v=s.heightModel,g=s.widthModel,k,r;s.dirty=s.invalid=false;s.props={};if(s.boxChildren){s.boxChildren.length=0}if(!h){s.clearAllBlocks("blocks");s.clearAllBlocks("domBlocks")}if(!s.wrapsComponent){return t}u=s.target;s.state={};if(h){if(u.beforeLayout){u.beforeLayout()}if(!l&&(q=u.ownerCt)){l=s.context.items[q.el.id]}if(l){s.ownerCtContext=l;s.isBoxParent=u.ownerLayout.isItemBoxParent(s)}else{s.isTopLevel=true}s.frameBodyContext=s.getEl("frameBody")}else{l=s.ownerCtContext;s.isTopLevel=!l;e=s.children;for(o=0,m=e.length;o0);if(j){s.widthModel=s.heightModel=null;b=u.getSizeModel(l&&l.widthModel.pairsByHeightOrdinal[l.heightModel.ordinal]);if(h){s.sizeModel=b}s.widthModel=b.width;s.heightModel=b.height}else{if(a){s.recoverProp("x",a,d);s.recoverProp("y",a,d);if(s.widthModel.calculated){s.recoverProp("width",a,d)}if(s.heightModel.calculated){s.recoverProp("height",a,d)}}}if(a&&p&&p.manageMargins){s.recoverProp("margin-top",a,d);s.recoverProp("margin-right",a,d);s.recoverProp("margin-bottom",a,d);s.recoverProp("margin-left",a,d)}if(c){k=c.heightModel;r=c.widthModel;if(r&&k&&g&&v){if(g.shrinkWrap&&v.shrinkWrap){if(r.constrainedMax&&k.constrainedMin){k=null}}}if(r){s.widthModel=r}if(k){s.heightModel=k}if(c.state){Ext.apply(s.state,c.state)}}return t},initContinue:function(d){var e=this,c=e.ownerCtContext,b=e.widthModel,a;if(d){if(c&&b.shrinkWrap){a=c.isBoxParent?c:c.boxParent;if(a){a.addBoxChild(e)}}else{if(b.natural){e.boxParent=c}}}return d},initDone:function(b,g,a,h){var d=this,c=d.props,e=d.state;if(g){c.componentChildrenDone=true}if(a){c.containerChildrenDone=true}if(h){c.containerLayoutDone=true}if(d.boxChildren&&d.boxChildren.length&&d.widthModel.shrinkWrap){d.el.setWidth(10000);e.blocks=(e.blocks||0)+1}},initAnimation:function(){var b=this,c=b.target,a=b.ownerCtContext;if(a&&a.isTopLevel){b.animatePolicy=c.ownerLayout.getAnimatePolicy(b)}else{if(!a&&c.isCollapsingOrExpanding&&c.animCollapse){b.animatePolicy=c.componentLayout.getAnimatePolicy(b)}}if(b.animatePolicy){b.context.queueAnimation(b)}},noFraming:{left:0,top:0,right:0,bottom:0,width:0,height:0},addCls:function(a){this.getClassList().addMany(a)},removeCls:function(a){this.getClassList().removeMany(a)},addBlock:function(b,d,e){var c=this,g=c[b]||(c[b]={}),a=g[e]||(g[e]={});if(!a[d.id]){a[d.id]=d;++d.blockCount;++c.context.blockCount}},addBoxChild:function(d){var c=this,b,a=d.widthModel;d.boxParent=this;d.measuresBox=a.shrinkWrap?d.hasRawContent:a.natural;if(d.measuresBox){b=c.boxChildren;if(b){b.push(d)}else{c.boxChildren=[d]}}},addTrigger:function(g,h){var e=this,a=h?"domTriggers":"triggers",i=e[a]||(e[a]={}),b=e.context,d=b.currentLayout,c=i[g]||(i[g]={});if(!c[d.id]){c[d.id]=d;++d.triggerCount;c=b.triggers[h?"dom":"data"];(c[d.id]||(c[d.id]=[])).push({item:this,prop:g});if(e.props[g]!==undefined){if(!h||!(e.dirty&&(g in e.dirty))){++d.firedTriggers}}}},boxChildMeasured:function(){var b=this,c=b.state,a=(c.boxesMeasured=(c.boxesMeasured||0)+1);if(a==b.boxChildren.length){c.clearBoxWidth=1;++b.context.progressCount;b.markDirty()}},borderNames:["border-top-width","border-right-width","border-bottom-width","border-left-width"],marginNames:["margin-top","margin-right","margin-bottom","margin-left"],paddingNames:["padding-top","padding-right","padding-bottom","padding-left"],trblNames:["top","right","bottom","left"],cacheMissHandlers:{borderInfo:function(a){var b=a.getStyles(a.borderNames,a.trblNames);b.width=b.left+b.right;b.height=b.top+b.bottom;return b},marginInfo:function(a){var b=a.getStyles(a.marginNames,a.trblNames);b.width=b.left+b.right;b.height=b.top+b.bottom;return b},paddingInfo:function(b){var a=b.frameBodyContext||b,c=a.getStyles(b.paddingNames,b.trblNames);c.width=c.left+c.right;c.height=c.top+c.bottom;return c}},checkCache:function(a){return this.cacheMissHandlers[a](this)},clearAllBlocks:function(a){var c=this[a],b;if(c){for(b in c){this.clearBlocks(a,b)}}},clearBlocks:function(c,g){var h=this[c],b=h&&h[g],d,e,a;if(b){delete h[g];d=this.context;for(a in b){e=b[a];--d.blockCount;if(!--e.blockCount&&!e.pending&&!e.done){d.queueLayout(e)}}}},block:function(a,b){this.addBlock("blocks",a,b)},domBlock:function(a,b){this.addBlock("domBlocks",a,b)},fireTriggers:function(b,g){var h=this[b],d=h&&h[g],c=this.context,e,a;if(d){for(a in d){e=d[a];++e.firedTriggers;if(!e.done&&!e.blockCount&&!e.pending){c.queueLayout(e)}}}},flush:function(){var b=this,a=b.dirty,c=b.state,d=b.el;b.dirtyCount=0;if(b.classList&&b.classList.dirty){b.classList.flush()}if("attributes" in b){d.set(b.attributes);delete b.attributes}if("innerHTML" in b){d.innerHTML=b.innerHTML;delete b.innerHTML}if(c&&c.clearBoxWidth){c.clearBoxWidth=0;b.el.setStyle("width",null);if(!--c.blocks){b.context.queueItemLayouts(b)}}if(a){delete b.dirty;b.writeProps(a,true)}},flushAnimations:function(){var o=this,c=o.lastBox,l,n,e,h,g,d,i,m,k,a,b;if(c){l=o.target;n=l.layout&&l.layout.animate;if(n){e=Ext.isNumber(n)?n:n.duration}h=Ext.Object.getKeys(o.animatePolicy);g=Ext.apply({},{from:{},to:{},duration:e||Ext.fx.Anim.prototype.duration},n);for(d=0,i=0,m=h.length;i0||p>0)){if(!C.frameBodyContext){z=C.paddingInfo.width;o=C.paddingInfo.height}if(t){t=v(parseInt(t,10)-(C.borderInfo.width+z),0);i.width=t+"px";++h}if(p){p=v(parseInt(p,10)-(C.borderInfo.height+o),0);i.height=p+"px";++h}}if(C.wrapsComponent&&Ext.isIE9&&Ext.isStrict){if((g=t!==undefined&&C.hasOverflowY)||(a=p!==undefined&&C.hasOverflowX)){s=C.isAbsolute;if(s===undefined){s=false;q=C.target.getTargetEl();w=q.getStyle("position");if(w=="absolute"){w=q.getStyle("box-sizing");s=(w=="border-box")}C.isAbsolute=s}if(s){u=Ext.getScrollbarSize();if(g){t=parseInt(t,10)+u.width;i.width=t+"px";++h}if(a){p=parseInt(p,10)+u.height;i.height=p+"px";++h}}}}if(h){c.setStyle(i)}}},function(){var c={dom:true,parseInt:true,suffix:"px"},b={dom:true},a={dom:false};this.prototype.styleInfo={childrenDone:a,componentChildrenDone:a,containerChildrenDone:a,containerLayoutDone:a,displayed:a,done:a,x:a,y:a,columnWidthsDone:a,left:c,top:c,right:c,bottom:c,width:c,height:c,"border-top-width":c,"border-right-width":c,"border-bottom-width":c,"border-left-width":c,"margin-top":c,"margin-right":c,"margin-bottom":c,"margin-left":c,"padding-top":c,"padding-right":c,"padding-bottom":c,"padding-left":c,"line-height":b,display:b}});Ext.define("Ext.layout.Context",{requires:["Ext.util.Queue","Ext.layout.ContextItem","Ext.layout.Layout","Ext.fx.Anim","Ext.fx.Manager"],remainingLayouts:0,state:0,constructor:function(a){var b=this;Ext.apply(b,a);b.items={};b.layouts={};b.blockCount=0;b.cycleCount=0;b.flushCount=0;b.calcCount=0;b.animateQueue=b.newQueue();b.completionQueue=b.newQueue();b.finalizeQueue=b.newQueue();b.finishQueue=b.newQueue();b.flushQueue=b.newQueue();b.invalidateData={};b.layoutQueue=b.newQueue();b.invalidQueue=[];b.triggers={data:{},dom:{}}},callLayout:function(b,a){this.currentLayout=b;b[a](this.getCmp(b.owner))},cancelComponent:function(j,a,m){var p=this,h=j,l=!j.isComponent,b=l?h.length:1,d,c,o,n,g,s,q,r,t,e;for(d=0;d0},runLayout:function(b){var a=this,c=a.getCmp(b.owner);b.pending=false;if(c.state.blocks){return}b.done=true;++b.calcCount;++a.calcCount;b.calculate(c);if(b.done){a.layoutDone(b);if(b.completeLayout){a.queueCompletion(b)}if(b.finalizeLayout){a.queueFinalize(b)}}else{if(!b.pending&&!b.invalid&&!(b.blockCount+b.triggerCount-b.firedTriggers)){a.queueLayout(b)}}},setItemSize:function(h,g,b){var d=h,a=1,c,e;if(h.isComposite){d=h.elements;a=d.length;h=d[0]}else{if(!h.dom&&!h.el){a=d.length;h=d[0]}}for(e=0;epanel:not([collapsed])");g=c.length;for(d=0;dpanel:not([collapsed])");if(c.length===1){g.expand()}}else{if(g){g.expand()}}a.deferLayouts=b;e.processing=false}},onComponentShow:function(a){this.onComponentExpand(a)}});Ext.define("Ext.resizer.Splitter",{extend:"Ext.Component",requires:["Ext.XTemplate"],uses:["Ext.resizer.SplitterTracker"],alias:"widget.splitter",childEls:["collapseEl"],renderTpl:['','
     
    ',"
    "],baseCls:Ext.baseCSSPrefix+"splitter",collapsedClsInternal:Ext.baseCSSPrefix+"splitter-collapsed",canResize:true,collapsible:false,collapseOnDblClick:true,defaultSplitMin:40,defaultSplitMax:1000,collapseTarget:"next",horizontal:false,vertical:false,getTrackerConfig:function(){return{xclass:"Ext.resizer.SplitterTracker",el:this.el,splitter:this}},beforeRender:function(){var d=this,e=d.getCollapseTarget(),g=d.getCollapseDirection(),c=d.vertical,b=c?"width":"height",h=c?"height":"width",a;d.callParent();if(!d.hasOwnProperty(h)){d[h]="100%"}if(!d.hasOwnProperty(b)){d[b]=5}if(e.collapsed){d.addCls(d.collapsedClsInternal)}a=d.baseCls+"-"+d.orientation;d.addCls(a);if(!d.canResize){d.addCls(a+"-noresize")}Ext.applyIf(d.renderData,{collapseDir:g,collapsible:d.collapsible||e.collapsible})},onRender:function(){var a=this;a.callParent(arguments);if(a.performCollapse!==false){if(a.renderData.collapsible){a.mon(a.collapseEl,"click",a.toggleTargetCmp,a)}if(a.collapseOnDblClick){a.mon(a.el,"dblclick",a.toggleTargetCmp,a)}}a.mon(a.getCollapseTarget(),{collapse:a.onTargetCollapse,expand:a.onTargetExpand,scope:a});a.el.unselectable();if(a.canResize){a.tracker=Ext.create(a.getTrackerConfig());a.relayEvents(a.tracker,["beforedragstart","dragstart","dragend"])}},getCollapseDirection:function(){var g=this,c=g.collapseDirection,e,a,b,d;if(!c){e=g.collapseTarget;if(e.isComponent){c=e.collapseDirection}if(!c){d=g.ownerCt.layout.type;if(e.isComponent){b=g.ownerCt.items;a=Number(b.indexOf(e)==b.indexOf(g)-1)<<1|Number(d=="hbox")}else{a=Number(g.collapseTarget=="prev")<<1|Number(d=="hbox")}c=["bottom","right","top","left"][a]}g.collapseDirection=c}g.orientation=(c=="top"||c=="bottom")?"horizontal":"vertical";g[g.orientation]=true;return c},getCollapseTarget:function(){var a=this;return a.collapseTarget.isComponent?a.collapseTarget:a.collapseTarget=="prev"?a.previousSibling():a.nextSibling()},onTargetCollapse:function(a){this.el.addCls([this.collapsedClsInternal,this.collapsedCls])},onTargetExpand:function(a){this.el.removeCls([this.collapsedClsInternal,this.collapsedCls])},toggleTargetCmp:function(d,b){var c=this.getCollapseTarget(),g=c.placeholder,a;if(g&&!g.hidden){a=true}else{a=!c.hidden}if(a){if(c.collapsed){c.expand()}else{if(c.collapseDirection){c.collapse()}else{c.collapse(this.renderData.collapseDir)}}}},setSize:function(){var a=this;a.callParent(arguments);if(Ext.isIE&&a.el){a.el.repaint()}},beforeDestroy:function(){Ext.destroy(this.tracker);this.callParent()}});Ext.define("Ext.resizer.BorderSplitter",{extend:"Ext.resizer.Splitter",uses:["Ext.resizer.BorderSplitterTracker"],alias:"widget.bordersplitter",collapseTarget:null,getTrackerConfig:function(){var a=this.callParent();a.xclass="Ext.resizer.BorderSplitterTracker";return a}});Ext.define("Ext.layout.container.Border",{alias:"layout.border",extend:"Ext.layout.container.Container",requires:["Ext.resizer.BorderSplitter","Ext.Component","Ext.fx.Anim"],alternateClassName:"Ext.layout.BorderLayout",targetCls:Ext.baseCSSPrefix+"border-layout-ct",itemCls:[Ext.baseCSSPrefix+"border-item",Ext.baseCSSPrefix+"box-item"],type:"border",padding:undefined,percentageRe:/(\d+)%/,axisProps:{horz:{borderBegin:"west",borderEnd:"east",horizontal:true,posProp:"x",sizeProp:"width",sizePropCap:"Width"},vert:{borderBegin:"north",borderEnd:"south",horizontal:false,posProp:"y",sizeProp:"height",sizePropCap:"Height"}},centerRegion:null,collapseDirections:{north:"top",south:"bottom",east:"right",west:"left"},manageMargins:true,panelCollapseAnimate:true,panelCollapseMode:"placeholder",regionWeights:{north:20,south:10,center:0,west:-10,east:-20},beginAxis:function(m,b,w){var u=this,c=u.axisProps[w],r=!c.horizontal,l=c.sizeProp,p=0,a=m.childItems,g=a.length,t,q,o,h,s,e,k,n,d,v,j;for(q=0;q',"{%this.renderBody(out,values)%}",'
    ',"","{%this.renderPadder(out,values)%}"],getItemSizePolicy:function(a){if(a.columnWidth){return this.columnWidthSizePolicy}return this.autoSizePolicy},beginLayout:function(){this.callParent(arguments);this.innerCt.dom.style.width=""},calculate:function(c){var a=this,d=a.getContainerSize(c),b=c.state;if(b.calculatedColumns||(b.calculatedColumns=a.calculateColumns(c))){if(a.calculateHeights(c)){a.calculateOverflow(c,d);return}}a.done=false},calculateColumns:function(d){var m=this,a=m.getContainerSize(d),o=d.getEl("innerCt",m),l=d.childItems,j=l.length,b=0,g,n,e,c,h,k;if(!d.heightModel.shrinkWrap&&!d.targetContext.hasProp("height")){return false}if(!a.gotWidth){d.targetContext.block(m,"width");g=true}else{n=a.width;o.setWidth(n)}for(e=0;e',renderTpl:['',"{%this.renderBody(out,values)%}","
    ","{%this.renderPadder(out,values)%}"],getRenderData:function(){var a=this.callParent();a.tableCls=this.tableCls;return a},calculate:function(e){var d=this,h=d.getContainerSize(e,true),a,g,b=0,c;if(h.gotWidth){this.callParent(arguments);a=d.formTable.dom.offsetWidth;g=e.childItems;for(c=g.length;b',"{text}","",'target="{hrefTarget}" hidefocus="true" unselectable="on">','','style="margin-right: 17px;" >{text}','',"",""],maskOnDisable:false,activate:function(){var a=this;if(!a.activated&&a.canActivate&&a.rendered&&!a.isDisabled()&&a.isVisible()){a.el.addCls(a.activeCls);a.focus();a.activated=true;a.fireEvent("activate",a)}},getFocusEl:function(){return this.itemEl},deactivate:function(){var a=this;if(a.activated){a.el.removeCls(a.activeCls);a.blur();a.hideMenu();a.activated=false;a.fireEvent("deactivate",a)}},deferExpandMenu:function(){var a=this;if(a.activated&&(!a.menu.rendered||!a.menu.isVisible())){a.parentMenu.activeChild=a.menu;a.menu.parentItem=a;a.menu.parentMenu=a.menu.ownerCt=a.parentMenu;a.menu.showBy(a,a.menuAlign)}},deferHideMenu:function(){if(this.menu.isVisible()){this.menu.hide()}},cancelDeferHide:function(){clearTimeout(this.hideMenuTimer)},deferHideParentMenus:function(){var a;Ext.menu.Manager.hideAll();if(!Ext.Element.getActiveElement()){a=this.up(":not([hidden])");if(a){a.focus()}}},expandMenu:function(a){var b=this;if(b.menu){b.cancelDeferHide();if(a===0){b.deferExpandMenu()}else{b.expandMenuTimer=Ext.defer(b.deferExpandMenu,Ext.isNumber(a)?a:b.menuExpandDelay,b)}}},getRefItems:function(a){var c=this.menu,b;if(c){b=c.getRefItems(a);b.unshift(c)}return b||[]},hideMenu:function(a){var b=this;if(b.menu){clearTimeout(b.expandMenuTimer);b.hideMenuTimer=Ext.defer(b.deferHideMenu,Ext.isNumber(a)?a:b.menuHideDelay,b)}},initComponent:function(){var b=this,c=Ext.baseCSSPrefix,a=[c+"menu-item"],d;b.addEvents("activate","click","deactivate");if(b.plain){a.push(c+"menu-item-plain")}if(b.cls){a.push(b.cls)}b.cls=a.join(" ");if(b.menu){d=b.menu;delete b.menu;b.setMenu(d)}b.callParent(arguments)},onClick:function(b){var a=this;if(!a.href){b.stopEvent()}if(a.disabled){return}if(a.hideOnClick){a.deferHideParentMenusTimer=Ext.defer(a.deferHideParentMenus,a.clickHideDelay,a)}Ext.callback(a.handler,a.scope||a,[a,b]);a.fireEvent("click",a,b);if(!a.hideOnClick){a.focus()}},onRemoved:function(){var a=this;if(a.activated&&a.parentMenu.activeItem===a){a.parentMenu.deactivateActiveItem()}a.callParent(arguments);delete a.parentMenu;delete a.ownerButton},beforeDestroy:function(){var a=this;if(a.rendered){a.clearTip()}a.callParent()},onDestroy:function(){var a=this;clearTimeout(a.expandMenuTimer);a.cancelDeferHide();clearTimeout(a.deferHideParentMenusTimer);a.setMenu(null);a.callParent(arguments)},beforeRender:function(){var b=this,d=Ext.BLANK_IMAGE_URL,a,c;b.callParent();if(b.iconAlign==="right"){a=b.checkChangeDisabled?b.disabledCls:"";c=Ext.baseCSSPrefix+"menu-item-icon-right "+b.iconCls}else{a=b.iconCls+(b.checkChangeDisabled?" "+b.disabledCls:"");c=b.menu?b.arrowCls:""}Ext.applyIf(b.renderData,{href:b.href||"#",hrefTarget:b.hrefTarget,icon:b.icon||d,iconCls:a,plain:b.plain,text:b.text,arrowCls:c,blank:d})},onRender:function(){var a=this;a.callParent(arguments);if(a.tooltip){a.setTooltip(a.tooltip,true)}},setMenu:function(e,d){var c=this,b=c.menu,a=c.arrowEl;if(b){delete b.parentItem;delete b.parentMenu;delete b.ownerCt;delete b.ownerItem;if(d===true||(d!==false&&c.destroyMenu)){Ext.destroy(b)}}if(e){c.menu=Ext.menu.Manager.get(e);c.menu.ownerItem=c}else{c.menu=null}if(c.rendered&&!c.destroying&&a){a[c.menu?"addCls":"removeCls"](c.arrowCls)}},setHandler:function(b,a){this.handler=b||null;this.scope=a},setIcon:function(b){var a=this.iconEl;if(a){a.src=b||Ext.BLANK_IMAGE_URL}this.icon=b},setIconCls:function(b){var c=this,a=c.iconEl;if(a){if(c.iconCls){a.removeCls(c.iconCls)}if(b){a.addCls(b)}}c.iconCls=b},setText:function(c){var b=this,a=b.textEl||b.el;b.text=c;if(b.rendered){a.update(c||"");b.ownerCt.updateLayout()}},getTipAttr:function(){return this.tooltipType=="qtip"?"data-qtip":"title"},clearTip:function(){if(Ext.isObject(this.tooltip)){Ext.tip.QuickTipManager.unregister(this.itemEl)}},setTooltip:function(c,a){var b=this;if(b.rendered){if(!a){b.clearTip()}if(Ext.isObject(c)){Ext.tip.QuickTipManager.register(Ext.apply({target:b.itemEl.id},c));b.tooltip=c}else{b.itemEl.dom.setAttribute(b.getTipAttr(),c)}}else{b.tooltip=c}return b}});Ext.define("Ext.menu.CheckItem",{extend:"Ext.menu.Item",alias:"widget.menucheckitem",checkedCls:Ext.baseCSSPrefix+"menu-item-checked",uncheckedCls:Ext.baseCSSPrefix+"menu-item-unchecked",groupCls:Ext.baseCSSPrefix+"menu-group-icon",hideOnClick:false,checkChangeDisabled:false,afterRender:function(){var a=this;a.callParent();a.checked=!a.checked;a.setChecked(!a.checked,true);if(a.checkChangeDisabled){a.disableCheckChange()}},initComponent:function(){var a=this;a.addEvents("beforecheckchange","checkchange");a.callParent(arguments);Ext.menu.Manager.registerCheckable(a);if(a.group){if(!a.iconCls){a.iconCls=a.groupCls}if(a.initialConfig.hideOnClick!==false){a.hideOnClick=true}}},disableCheckChange:function(){var b=this,a=b.iconEl;if(a){a.addCls(b.disabledCls)}if(!(Ext.isIE9&&Ext.isStrict)&&b.rendered){b.el.repaint()}b.checkChangeDisabled=true},enableCheckChange:function(){var b=this,a=b.iconEl;if(a){a.removeCls(b.disabledCls)}b.checkChangeDisabled=false},onClick:function(b){var a=this;if(!a.disabled&&!a.checkChangeDisabled&&!(a.checked&&a.group)){a.setChecked(!a.checked)}this.callParent([b])},onDestroy:function(){Ext.menu.Manager.unregisterCheckable(this);this.callParent(arguments)},setChecked:function(c,a){var b=this;if(b.checked!==c&&(a||b.fireEvent("beforecheckchange",b,c)!==false)){if(b.el){b.el[c?"addCls":"removeCls"](b.checkedCls)[!c?"addCls":"removeCls"](b.uncheckedCls)}b.checked=c;Ext.menu.Manager.onCheckChange(b,c);if(!a){Ext.callback(b.checkHandler,b.scope,[b,c]);b.fireEvent("checkchange",b,c)}}}});Ext.define("Ext.menu.KeyNav",{extend:"Ext.util.KeyNav",requires:["Ext.FocusManager"],constructor:function(b){var a=this;a.menu=b;a.callParent([b.el,{down:a.down,enter:a.enter,esc:a.escape,left:a.left,right:a.right,space:a.enter,tab:a.tab,up:a.up}])},down:function(b){var a=this,c=a.menu.focusedItem;if(c&&b.getKey()==Ext.EventObject.DOWN&&a.isWhitelisted(c)){return true}a.focusNextItem(1)},enter:function(b){var c=this.menu,a=c.focusedItem;if(c.activeItem){c.onClick(b)}else{if(a&&a.isFormField){return true}}},escape:function(a){Ext.menu.Manager.hideAll()},focusNextItem:function(g){var h=this.menu,b=h.items,d=h.focusedItem,c=d?b.indexOf(d):-1,a=c+g,e;while(a!=c){if(a<0){a=b.length-1}else{if(a>=b.length){a=0}}e=b.getAt(a);if(h.canActivateItem(e)){h.setActiveItem(e);break}a+=g}},isWhitelisted:function(a){return Ext.FocusManager.isWhitelisted(a)},left:function(b){var c=this.menu,d=c.focusedItem,a=c.activeItem;if(d&&this.isWhitelisted(d)){return true}c.hide();if(c.parentMenu){c.parentMenu.focus()}},right:function(c){var d=this.menu,g=d.focusedItem,a=d.activeItem,b;if(g&&this.isWhitelisted(g)){return true}if(a){b=d.activeItem.menu;if(b){a.expandMenu(0);Ext.defer(function(){b.setActiveItem(b.items.getAt(0))},25)}}},tab:function(b){var a=this;if(b.shiftKey){a.up(b)}else{a.down(b)}},up:function(b){var a=this,c=a.menu.focusedItem;if(c&&b.getKey()==Ext.EventObject.UP&&a.isWhitelisted(c)){return true}a.focusNextItem(-1)}});Ext.define("Ext.menu.Separator",{extend:"Ext.menu.Item",alias:"widget.menuseparator",canActivate:false,focusable:false,hideOnClick:false,plain:true,separatorCls:Ext.baseCSSPrefix+"menu-item-separator",text:" ",beforeRender:function(a,c){var b=this;b.callParent();b.addCls(b.separatorCls)}});Ext.define("Ext.menu.Menu",{extend:"Ext.panel.Panel",alias:"widget.menu",requires:["Ext.layout.container.Fit","Ext.layout.container.VBox","Ext.menu.CheckItem","Ext.menu.Item","Ext.menu.KeyNav","Ext.menu.Manager","Ext.menu.Separator"],enableKeyNav:true,allowOtherMenus:false,ariaRole:"menu",defaultAlign:"tl-bl?",floating:true,constrain:true,hidden:true,hideMode:"visibility",ignoreParentClicks:false,isMenu:true,showSeparator:true,minWidth:undefined,defaultMinWidth:120,initComponent:function(){var b=this,d=Ext.baseCSSPrefix,a=[d+"menu"],c=b.bodyCls?[b.bodyCls]:[],e=b.floating!==false;b.addEvents("click","mouseenter","mouseleave","mouseover");Ext.menu.Manager.register(b);if(b.plain){a.push(d+"menu-plain")}b.cls=a.join(" ");c.unshift(d+"menu-body");b.bodyCls=c.join(" ");if(!b.layout){b.layout={type:"vbox",align:"stretchmax",overflowHandler:"Scroller"}}if(e&&b.minWidth===undefined){b.minWidth=b.defaultMinWidth}if(!e&&b.initialConfig.hidden!==true){b.hidden=false}b.callParent(arguments);b.on("beforeshow",function(){var g=!!b.items.length;if(g&&b.rendered){b.el.setStyle("visibility",null)}return g})},beforeRender:function(){this.callParent(arguments);if(!this.getSizeModel().width.shrinkWrap){this.layout.align="stretch"}},onBoxReady:function(){var a=this,b;a.callParent(arguments);if(a.showSeparator){b={cls:Ext.baseCSSPrefix+"menu-icon-separator",html:" "};if((!Ext.isStrict&&Ext.isIE)||Ext.isIE6){b.style="height:"+a.el.getHeight()+"px"}a.iconSepEl=a.layout.getElementTarget().insertFirst(b)}a.mon(a.el,{click:a.onClick,mouseover:a.onMouseOver,scope:a});a.mouseMonitor=a.el.monitorMouseLeave(100,a.onMouseLeave,a);if(a.enableKeyNav){a.keyNav=new Ext.menu.KeyNav(a)}},getBubbleTarget:function(){return this.parentMenu||this.ownerButton||this.callParent(arguments)},canActivateItem:function(a){return a&&!a.isDisabled()&&a.isVisible()&&(a.canActivate||a.getXTypes().indexOf("menuitem")<0)},deactivateActiveItem:function(b){var c=this,d=c.activeItem,a=c.focusedItem;if(d){d.deactivate();if(!d.activated){delete c.activeItem}}if(a&&b){a.blur();delete c.focusedItem}},getFocusEl:function(){return this.focusedItem||this.el},hide:function(){this.deactivateActiveItem(true);this.callParent(arguments)},getItemFromEvent:function(a){return this.getChildByElement(a.getTarget())},lookupComponent:function(b){var a=this;if(typeof b=="string"){b=a.lookupItemFromString(b)}else{if(Ext.isObject(b)){b=a.lookupItemFromObject(b)}}b.minWidth=b.minWidth||a.minWidth;return b},lookupItemFromObject:function(c){var b=this,d=Ext.baseCSSPrefix,a;if(!c.isComponent){if(!c.xtype){c=Ext.create("Ext.menu."+(Ext.isBoolean(c.checked)?"Check":"")+"Item",c)}else{c=Ext.ComponentManager.create(c,c.xtype)}}if(c.isMenuItem){c.parentMenu=b}if(!c.isMenuItem&&!c.dock){a=[d+"menu-item",d+"menu-item-cmp"];if(!b.plain&&(c.indent===true||c.iconCls==="no-icon")){a.push(d+"menu-item-indent")}if(c.rendered){c.el.addCls(a)}else{c.cls=(c.cls?c.cls:"")+" "+a.join(" ")}}return c},lookupItemFromString:function(a){return(a=="separator"||a=="-")?new Ext.menu.Separator():new Ext.menu.Item({canActivate:false,hideOnClick:false,plain:true,text:a})},onClick:function(c){var b=this,a;if(b.disabled){c.stopEvent();return}a=(c.type==="click")?b.getItemFromEvent(c):b.activeItem;if(a&&a.isMenuItem){if(!a.menu||!b.ignoreParentClicks){a.onClick(c)}else{c.stopEvent()}}if(!a||a.disabled){a=undefined}b.fireEvent("click",b,a,c)},onDestroy:function(){var a=this;Ext.menu.Manager.unregister(a);delete a.parentMenu;delete a.ownerButton;if(a.rendered){a.el.un(a.mouseMonitor);Ext.destroy(a.keyNav);delete a.keyNav}a.callParent(arguments)},onMouseLeave:function(b){var a=this;a.deactivateActiveItem();if(a.disabled){return}a.fireEvent("mouseleave",a,b)},onMouseOver:function(h){var g=this,i=h.getRelatedTarget(),b=!g.el.contains(i),d=g.getItemFromEvent(h),c=g.parentMenu,a=g.parentItem;if(b&&c){c.setActiveItem(a);a.cancelDeferHide();c.mouseMonitor.mouseenter()}if(g.disabled){return}if(d&&!d.activated){g.setActiveItem(d);if(d.activated&&d.expandMenu){d.expandMenu()}}if(b){g.fireEvent("mouseenter",g,h)}g.fireEvent("mouseover",g,d,h)},setActiveItem:function(b){var a=this;if(b&&(b!=a.activeItem)){a.deactivateActiveItem();if(a.canActivateItem(b)){if(b.activate){b.activate();if(b.activated){a.activeItem=b;a.focusedItem=b;a.focus()}}else{b.focus();a.focusedItem=b}}b.el.scrollIntoView(a.layout.getRenderTarget())}},showBy:function(b,d,c){var a=this;if(a.floating&&b){a.show();a.setPagePosition(a.el.getAlignToXY(b.el||b,d||a.defaultAlign,c));a.setVerticalPosition()}return a},show:function(){var d=this,c,b,a,e=d.maxHeight;if(!d.rendered){d.doAutoRender()}if(d.floating){c=Ext.fly(d.el.getScopeParent());b=c.getViewSize().height;d.maxHeight=Math.min(e||b,b)}a=d.callParent(arguments);d.maxHeight=e;return a},afterComponentLayout:function(c,a,b,e){var d=this;d.callParent(arguments);if(d.showSeparator){d.iconSepEl.setHeight(d.componentLayout.lastComponentSize.contentHeight)}},setVerticalPosition:function(){var d=this,g,e=d.el.getY(),h=e,j=d.getHeight(),b=Ext.Element.getViewportHeight().height,c=Ext.fly(d.el.getScopeParent()),a=c.getViewSize().height,i=e-c.getScroll().top;c=null;if(d.floating){g=d.maxHeight?d.maxHeight:a-i;if(j>a){h=e-i}else{if(gb){h=b-j}}}}d.el.setY(h)}});Ext.define("Ext.menu.ColorPicker",{extend:"Ext.menu.Menu",alias:"widget.colormenu",requires:["Ext.picker.Color"],hideOnClick:true,pickerId:null,initComponent:function(){var b=this,a=Ext.apply({},b.initialConfig);delete a.listeners;Ext.apply(b,{plain:true,showSeparator:false,items:Ext.applyIf({cls:Ext.baseCSSPrefix+"menu-color-item",id:b.pickerId,xtype:"colorpicker"},a)});b.callParent(arguments);b.picker=b.down("colorpicker");b.relayEvents(b.picker,["select"]);if(b.hideOnClick){b.on("select",b.hidePickerOnSelect,b)}},hidePickerOnSelect:function(){Ext.menu.Manager.hideAll()}});Ext.define("Ext.menu.DatePicker",{extend:"Ext.menu.Menu",alias:"widget.datemenu",requires:["Ext.picker.Date"],hideOnClick:true,pickerId:null,initComponent:function(){var b=this,a=Ext.apply({},b.initialConfig);delete a.listeners;Ext.apply(b,{showSeparator:false,plain:true,border:false,bodyPadding:0,items:Ext.applyIf({cls:Ext.baseCSSPrefix+"menu-date-item",id:b.pickerId,xtype:"datepicker"},a)});b.callParent(arguments);b.picker=b.down("datepicker");b.relayEvents(b.picker,["select"]);if(b.hideOnClick){b.on("select",b.hidePickerOnSelect,b)}},hidePickerOnSelect:function(){Ext.menu.Manager.hideAll()}});Ext.define("Ext.panel.Tool",{extend:"Ext.Component",requires:["Ext.tip.QuickTipManager"],alias:"widget.tool",baseCls:Ext.baseCSSPrefix+"tool",disabledCls:Ext.baseCSSPrefix+"tool-disabled",toolPressedCls:Ext.baseCSSPrefix+"tool-pressed",toolOverCls:Ext.baseCSSPrefix+"tool-over",ariaRole:"button",childEls:["toolEl"],renderTpl:[''],tooltipType:"qtip",stopEvent:true,height:15,width:15,initComponent:function(){var a=this;a.addEvents("click");a.type=a.type||a.id;Ext.applyIf(a.renderData,{baseCls:a.baseCls,blank:Ext.BLANK_IMAGE_URL,type:a.type});a.tooltip=a.tooltip||a.qtip;a.callParent();a.on({element:"toolEl",click:a.onClick,mousedown:a.onMouseDown,mouseover:a.onMouseOver,mouseout:a.onMouseOut,scope:a})},afterRender:function(){var b=this,a;b.callParent(arguments);if(b.tooltip){if(Ext.isObject(b.tooltip)){Ext.tip.QuickTipManager.register(Ext.apply({target:b.id},b.tooltip))}else{a=b.tooltipType=="qtip"?"data-qtip":"title";b.toolEl.dom.setAttribute(a,b.tooltip)}}},getFocusEl:function(){return this.el},setType:function(a){var b=this;b.type=a;if(b.rendered){b.toolEl.dom.className=b.baseCls+"-"+a}return b},bindTo:function(a){this.owner=a},onClick:function(d,c){var b=this,a;if(b.disabled){return false}a=b.owner||b.ownerCt;b.el.removeCls(b.toolPressedCls);b.el.removeCls(b.toolOverCls);if(b.stopEvent!==false){d.stopEvent()}Ext.callback(b.handler,b.scope||b,[d,c,a,b]);b.fireEvent("click",b,d);return true},onDestroy:function(){if(Ext.isObject(this.tooltip)){Ext.tip.QuickTipManager.unregister(this.id)}this.callParent()},onMouseDown:function(){if(this.disabled){return false}this.el.addCls(this.toolPressedCls)},onMouseOver:function(){if(this.disabled){return false}this.el.addCls(this.toolOverCls)},onMouseOut:function(){this.el.removeCls(this.toolOverCls)}});Ext.define("Ext.resizer.SplitterTracker",{extend:"Ext.dd.DragTracker",requires:["Ext.util.Region"],enabled:true,overlayCls:Ext.baseCSSPrefix+"resizable-overlay",createDragOverlay:function(){var a;a=this.overlay=Ext.getBody().createChild({cls:this.overlayCls,html:" "});a.unselectable();a.setSize(Ext.Element.getViewWidth(true),Ext.Element.getViewHeight(true));a.show()},getPrevCmp:function(){var a=this.getSplitter();return a.previousSibling()},getNextCmp:function(){var a=this.getSplitter();return a.nextSibling()},onBeforeStart:function(i){var d=this,g=d.getPrevCmp(),a=d.getNextCmp(),c=d.getSplitter().collapseEl,h=i.getTarget(),b;if(c&&h===d.getSplitter().collapseEl.dom){return false}if(a.collapsed||g.collapsed){return false}d.prevBox=g.getEl().getBox();d.nextBox=a.getEl().getBox();d.constrainTo=b=d.calculateConstrainRegion();if(!b){return false}d.createDragOverlay();return b},onStart:function(b){var a=this.getSplitter();a.addCls(a.baseCls+"-active")},calculateConstrainRegion:function(){var g=this,a=g.getSplitter(),h=a.getWidth(),i=a.defaultSplitMin,b=a.orientation,d=g.prevBox,j=g.getPrevCmp(),c=g.nextBox,e=g.getNextCmp(),l,k;if(b==="vertical"){l=new Ext.util.Region(d.y,(j.maxWidth?d.x+j.maxWidth:c.right-(e.minWidth||i))+h,d.bottom,d.x+(j.minWidth||i));k=new Ext.util.Region(c.y,c.right-(e.minWidth||i),c.bottom,(e.maxWidth?c.right-e.maxWidth:d.x+(d.minWidth||i))-h)}else{l=new Ext.util.Region(d.y+(j.minHeight||i),d.right,(j.maxHeight?d.y+j.maxHeight:c.bottom-(e.minHeight||i))+h,d.x);k=new Ext.util.Region((e.maxHeight?c.bottom-e.maxHeight:d.y+(j.minHeight||i))-h,c.right,c.bottom-(e.minHeight||i),c.x)}return l.intersect(k)},performResize:function(m,g){var o=this,a=o.getSplitter(),h=a.orientation,p=o.getPrevCmp(),n=o.getNextCmp(),b=a.ownerCt,k=b.query(">[flex]"),l=k.length,j=0,d,q,c=0;for(;jq){v=q}}if(v-m<2){return null}n=new Ext.util.Region(p,x,k,g);y.constraintAdjusters[a.collapseDirection](n,m,v,a);y.dragInfo={minRange:m,maxRange:v,targetSize:b};return n},constraintAdjusters:{left:function(c,a,b,d){c[0]=c.x=c.left=c.right+a;c.right+=b+d.getWidth()},top:function(c,a,b,d){c[1]=c.y=c.top=c.bottom+a;c.bottom+=b+d.getHeight()},bottom:function(c,a,b,d){c.bottom=c.top-a;c.top-=b+d.getHeight()},right:function(c,a,b,d){c.right=c.left-a;c.left-=b+d.getWidth()}},onBeforeStart:function(h){var k=this,b=k.splitter,a=b.collapseTarget,m=b.neighbors,d=k.getSplitter().collapseEl,j=h.getTarget(),c=m.length,g,l;if(d&&j===b.collapseEl.dom){return false}if(a.collapsed){return false}for(g=0;gc){d.minWidth=d.el.getWidth()*a}else{d.minHeight=d.el.getHeight()*c}}if(d.throttle){e=Ext.Function.createThrottled(function(){Ext.resizer.ResizeTracker.prototype.resize.apply(d,arguments)},d.throttle);d.resize=function(h,i,g){if(g){Ext.resizer.ResizeTracker.prototype.resize.apply(d,arguments)}else{e.apply(null,arguments)}}}},onBeforeStart:function(a){this.startBox=this.el.getBox()},getDynamicTarget:function(){var a=this,b=a.target;if(a.dynamic){return b}else{if(!a.proxy){a.proxy=a.createProxy(b)}}a.proxy.show();return a.proxy},createProxy:function(c){var b,a=this.proxyCls,d;if(c.isComponent){b=c.getProxy().addCls(a)}else{d=Ext.getBody();if(Ext.scopeResetCSS){d=Ext.getBody().createChild({cls:Ext.resetCls})}b=c.createProxy({tag:"div",cls:a,id:c.id+"-rzproxy"},d)}b.removeCls(Ext.baseCSSPrefix+"proxy-el");return b},onStart:function(a){this.activeResizeHandle=Ext.get(this.getDragTarget().id);if(!this.dynamic){this.resize(this.startBox,{horizontal:"none",vertical:"none"})}},onDrag:function(a){if(this.dynamic||this.proxy){this.updateDimensions(a)}},updateDimensions:function(s,m){var t=this,c=t.activeResizeHandle.region,g=t.getOffset(t.constrainTo?"dragTarget":null),k=t.startBox,h,p=0,u=0,j,q,a=0,w=0,v,n=g[0]<0?"right":"left",r=g[1]<0?"down":"up",i,b,d,o,l;switch(c){case"south":u=g[1];b=2;break;case"north":u=-g[1];w=-u;b=2;break;case"east":p=g[0];b=1;break;case"west":p=-g[0];a=-p;b=1;break;case"northeast":u=-g[1];w=-u;p=g[0];i=[k.x,k.y+k.height];b=3;break;case"southeast":u=g[1];p=g[0];i=[k.x,k.y];b=3;break;case"southwest":p=-g[0];a=-p;u=g[1];i=[k.x+k.width,k.y];b=3;break;case"northwest":u=-g[1];w=-u;p=-g[0];a=-p;i=[k.x+k.width,k.y+k.height];b=3;break}d={width:k.width+p,height:k.height+u,x:k.x+a,y:k.y+w};j=Ext.Number.snap(d.width,t.widthIncrement);q=Ext.Number.snap(d.height,t.heightIncrement);if(j!=d.width||q!=d.height){switch(c){case"northeast":d.y-=q-d.height;break;case"north":d.y-=q-d.height;break;case"southwest":d.x-=j-d.width;break;case"west":d.x-=j-d.width;break;case"northwest":d.x-=j-d.width;d.y-=q-d.height}d.width=j;d.height=q}if(d.widtht.maxWidth){d.width=Ext.Number.constrain(d.width,t.minWidth,t.maxWidth);if(a){d.x=k.x+(k.width-d.width)}}else{t.lastX=d.x}if(d.heightt.maxHeight){d.height=Ext.Number.constrain(d.height,t.minHeight,t.maxHeight);if(w){d.y=k.y+(k.height-d.height)}}else{t.lastY=d.y}if(t.preserveRatio||s.shiftKey){h=t.startBox.width/t.startBox.height;o=Math.min(Math.max(t.minHeight,d.width/h),t.maxHeight);l=Math.min(Math.max(t.minWidth,d.height*h),t.maxWidth);if(b==1){d.height=o}else{if(b==2){d.width=l}else{v=Math.abs(i[0]-this.lastXY[0])/Math.abs(i[1]-this.lastXY[1]);if(v>h){d.height=o}else{d.width=l}if(c=="northeast"){d.y=k.y-(d.height-k.height)}else{if(c=="northwest"){d.y=k.y-(d.height-k.height);d.x=k.x-(d.width-k.width)}else{if(c=="southwest"){d.x=k.x-(d.width-k.width)}}}}}}if(u===0){r="none"}if(p===0){n="none"}t.resize(d,{horizontal:n,vertical:r},m)},getResizeTarget:function(a){return a?this.target:this.getDynamicTarget()},resize:function(b,d,a){var c=this.getResizeTarget(a);if(c.isComponent){c.setSize(b.width,b.height);if(c.floating){c.setPagePosition(b.x,b.y)}}else{c.setBox(b)}c=this.originalTarget;if(c&&(this.dynamic||a)){if(c.isComponent){c.setSize(b.width,b.height);if(c.floating){c.setPagePosition(b.x,b.y)}}else{c.setBox(b)}}},onEnd:function(a){this.updateDimensions(a,true);if(this.proxy){this.proxy.hide()}}});Ext.define("Ext.resizer.Resizer",{mixins:{observable:"Ext.util.Observable"},uses:["Ext.resizer.ResizeTracker","Ext.Component"],alternateClassName:"Ext.Resizable",handleCls:Ext.baseCSSPrefix+"resizable-handle",pinnedCls:Ext.baseCSSPrefix+"resizable-pinned",overCls:Ext.baseCSSPrefix+"resizable-over",wrapCls:Ext.baseCSSPrefix+"resizable-wrap",dynamic:true,handles:"s e se",height:null,width:null,heightIncrement:0,widthIncrement:0,minHeight:20,minWidth:20,maxHeight:10000,maxWidth:10000,pinned:false,preserveRatio:false,transparent:false,possiblePositions:{n:"north",s:"south",e:"east",w:"west",se:"southeast",sw:"southwest",nw:"northwest",ne:"northeast"},constructor:function(b){var k=this,j,o,q,p=k.handles,c,n,g,d=0,m,l=[],h,a,e;k.addEvents("beforeresize","resizedrag","resize");if(Ext.isString(b)||Ext.isElement(b)||b.dom){j=b;b=arguments[1]||{};b.target=j}k.mixins.observable.constructor.call(k,b);j=k.target;if(j){if(j.isComponent){k.el=j.getEl();if(j.minWidth){k.minWidth=j.minWidth}if(j.minHeight){k.minHeight=j.minHeight}if(j.maxWidth){k.maxWidth=j.maxWidth}if(j.maxHeight){k.maxHeight=j.maxHeight}if(j.floating){if(!k.hasOwnProperty("handles")){k.handles="n ne e se s sw w nw"}}}else{k.el=k.target=Ext.get(j)}}else{k.target=k.el=Ext.get(k.el)}q=k.el.dom.tagName.toUpperCase();if(q=="TEXTAREA"||q=="IMG"||q=="TABLE"){k.originalTarget=k.target;o=k.el;e=o.getBox();k.target=k.el=k.el.wrap({cls:k.wrapCls,id:k.el.id+"-rzwrap",style:o.getStyles("margin-top","margin-bottom")});k.el.setPositioning(o.getPositioning());o.clearPositioning();k.el.setBox(e);o.setStyle("position","absolute")}k.el.position();if(k.pinned){k.el.addCls(k.pinnedCls)}k.resizeTracker=new Ext.resizer.ResizeTracker({disabled:k.disabled,target:k.target,constrainTo:k.constrainTo,overCls:k.overCls,throttle:k.throttle,originalTarget:k.originalTarget,delegate:"."+k.handleCls,dynamic:k.dynamic,preserveRatio:k.preserveRatio,heightIncrement:k.heightIncrement,widthIncrement:k.widthIncrement,minHeight:k.minHeight,maxHeight:k.maxHeight,minWidth:k.minWidth,maxWidth:k.maxWidth});k.resizeTracker.on({mousedown:k.onBeforeResize,drag:k.onResize,dragend:k.onResizeEnd,scope:k});if(k.handles=="all"){k.handles="n s e w ne nw se sw"}p=k.handles=k.handles.split(/ |\s*?[,;]\s*?/);n=k.possiblePositions;g=p.length;c=k.handleCls+" "+(k.target.isComponent?(k.target.baseCls+"-handle "):"")+k.handleCls+"-";h=Ext.isIE6?' style="height:'+k.el.getHeight()+'px"':"";for(;d")}}Ext.DomHelper.append(k.el,l.join(""));for(d=0;d-1){this.doSelect(a.view.getStore().getAt(a.row),false,b)}},onCellDeselect:function(a,b){if(a&&a.row!==undefined){this.doDeselect(a.view.getStore().getAt(a.row),b)}},onSelectChange:function(b,e,d,h){var g=this,i,c,a;if(e){i=g.nextSelection;c="select"}else{i=g.lastSelection||g.noSelection;c="deselect"}a=i.view||g.primaryView;if((d||g.fireEvent("before"+c,g,b,i.row,i.column))!==false&&h()!==false){if(e){a.onCellSelect(i);a.onCellFocus(i)}else{a.onCellDeselect(i);delete g.selection}if(!d){g.fireEvent(c,g,b,i.row,i.column)}}},onKeyTab:function(d,b){var c=this,a=c.getCurrentPosition().view.editingPlugin;if(a&&c.wasEditing){c.onEditorTab(a,d)}else{c.move(d.shiftKey?"left":"right",d)}},onEditorTab:function(b,g){var c=this,d=g.shiftKey?"left":"right",a=c.move(d,g);if(a){if(b.startEditByPosition(a)){c.wasEditing=false}else{c.wasEditing=true;if(!a.columnHeader.dataIndex){c.onEditorTab(b,g)}}}},refresh:function(){var b=this.getCurrentPosition(),a;if(b&&(a=this.store.indexOf(this.selected.last()))!==-1){b.row=a}},onColumnMove:function(d,e,b,c){var a=d.up("tablepanel");if(a){this.onViewRefresh(a.view)}},onViewRefresh:function(b){var c=this,g=c.getCurrentPosition(),e=b.headerCt,a,d;if(g&&g.view===b){a=g.record;d=g.columnHeader;if(!d.isDescendantOf(e)){d=e.queryById(d.id)||e.down('[text="'+d.text+'"]')||e.down('[dataIndex="'+d.dataIndex+'"]')}if(d&&(b.store.indexOfId(a.getId())!==-1)){c.setCurrentPosition({row:a,column:d,view:b})}}},selectByPosition:function(a){this.setCurrentPosition(a)}},function(){var a=this.prototype.Selection=function(b){this.model=b};a.prototype.setPosition=function(e,c){var d=this,b;if(arguments.length===1){if(e.view){d.view=b=e.view}c=e.column;e=e.row}if(!b){d.view=b=d.model.primaryView}if(typeof e==="number"){d.row=e;d.record=b.store.getAt(e)}else{if(e.isModel){d.record=e;d.row=b.indexOf(e)}else{if(e.tagName){d.record=b.getRecord(e);d.row=b.indexOf(d.record)}}}if(typeof c==="number"){d.column=c;d.columnHeader=b.getHeaderAtIndex(c)}else{d.columnHeader=c;d.column=c.getIndex()}return d}});Ext.define("Ext.selection.RowModel",{extend:"Ext.selection.Model",alias:"selection.rowmodel",requires:["Ext.util.KeyNav"],deltaScroll:5,enableKeyNav:true,ignoreRightMouseSelection:false,constructor:function(){this.addEvents("beforedeselect","beforeselect","deselect","select");this.views=[];this.callParent(arguments)},bindComponent:function(a){var b=this;b.views=b.views||[];b.views.push(a);b.bindStore(a.getStore(),true);a.on({itemmousedown:b.onRowMouseDown,scope:b});if(b.enableKeyNav){b.initKeyNav(a)}},initKeyNav:function(a){var b=this;if(!a.rendered){a.on("render",Ext.Function.bind(b.initKeyNav,b,[a],0),b,{single:true});return}a.el.set({tabIndex:-1});b.keyNav=new Ext.util.KeyNav({target:a,ignoreInputFields:true,eventName:"itemkeydown",processEvent:function(d,c,h,e,g){g.record=c;g.recordIndex=e;return g},up:b.onKeyUp,down:b.onKeyDown,right:b.onKeyRight,left:b.onKeyLeft,pageDown:b.onKeyPageDown,pageUp:b.onKeyPageUp,home:b.onKeyHome,end:b.onKeyEnd,space:b.onKeySpace,enter:b.onKeyEnter,scope:b})},getRowsVisible:function(){var e=false,a=this.views[0],d=a.getNode(0),b,c;if(d){b=Ext.fly(d).getHeight();c=a.el.getHeight();e=Math.floor(c/b)}return e},onKeyEnd:function(c){var b=this,a=b.store.getAt(b.store.getCount()-1);if(a){if(c.shiftKey){b.selectRange(a,b.lastFocused||0);b.setLastFocused(a)}else{if(c.ctrlKey){b.setLastFocused(a)}else{b.doSelect(a)}}}},onKeyHome:function(b){var a=this,c=a.store.getAt(0);if(c){if(b.shiftKey){a.selectRange(c,a.lastFocused||0);a.setLastFocused(c)}else{if(b.ctrlKey){a.setLastFocused(c)}else{a.doSelect(c,false)}}}},onKeyPageUp:function(g){var d=this,h=d.getRowsVisible(),b,c,a;if(h){b=g.recordIndex;c=b-h;if(c<0){c=0}a=d.store.getAt(c);if(g.shiftKey){d.selectRange(a,g.record,g.ctrlKey,"up");d.setLastFocused(a)}else{if(g.ctrlKey){g.preventDefault();d.setLastFocused(a)}else{d.doSelect(a)}}}},onKeyPageDown:function(g){var c=this,h=c.getRowsVisible(),a,d,b;if(h){a=g.recordIndex;d=a+h;if(d>=c.store.getCount()){d=c.store.getCount()-1}b=c.store.getAt(d);if(g.shiftKey){c.selectRange(b,g.record,g.ctrlKey,"down");c.setLastFocused(b)}else{if(g.ctrlKey){g.preventDefault();c.setLastFocused(b)}else{c.doSelect(b)}}}},onKeySpace:function(c){var b=this,a=b.lastFocused;if(a){if(b.isSelected(a)){b.doDeselect(a,false)}else{b.doSelect(a,true)}}},onKeyEnter:Ext.emptyFn,onKeyUp:function(d){var c=this,a=c.store.indexOf(c.lastFocused),b;if(a>0){b=c.store.getAt(a-1);if(d.shiftKey&&c.lastFocused){if(c.isSelected(c.lastFocused)&&c.isSelected(b)){c.doDeselect(c.lastFocused,true);c.setLastFocused(b)}else{if(!c.isSelected(c.lastFocused)){c.doSelect(c.lastFocused,true);c.doSelect(b,true)}else{c.doSelect(b,true)}}}else{if(d.ctrlKey){c.setLastFocused(b)}else{c.doSelect(b)}}}},onKeyDown:function(d){var c=this,a=c.store.indexOf(c.lastFocused),b;if(a+1 '},onRowMouseDown:function(b,a,h,d,i){b.el.focus();var g=this,c=i.getTarget("."+Ext.baseCSSPrefix+"grid-row-checker"),j;if(!g.allowRightMouseSelection(i)){return}if(g.checkOnly&&!c){return}if(c){j=g.getSelectionMode();if(j!=="SINGLE"){g.setSelectionMode("SIMPLE")}g.selectWithEvent(a,i);g.setSelectionMode(j)}else{g.selectWithEvent(a,i)}},onSelectChange:function(){var a=this;a.callParent(arguments);a.updateHeaderState()},onStoreLoad:function(){var a=this;a.callParent(arguments);a.updateHeaderState()},updateHeaderState:function(){var a=this.selected.getCount()===this.store.getCount();this.toggleUiHeader(a)}});Ext.define("Ext.selection.TreeModel",{extend:"Ext.selection.RowModel",alias:"selection.treemodel",pruneRemoved:false,onKeyRight:function(d,b){var c=this.getLastFocused(),a=this.view;if(c){if(c.isExpanded()){this.onKeyDown(d,b)}else{if(c.isExpandable()){a.expand(c)}}}},onKeyLeft:function(i,d){var h=this.getLastFocused(),c=this.view,b=c.getSelectionModel(),a,g;if(h){a=h.parentNode;if(h.isExpanded()){c.collapse(h)}else{if(a&&!a.isRoot()){if(i.shiftKey){b.selectRange(a,h,i.ctrlKey,"up");b.setLastFocused(a)}else{if(i.ctrlKey){b.setLastFocused(a)}else{b.select(a)}}}}}},onKeySpace:function(b,a){this.toggleCheck(b)},onKeyEnter:function(b,a){this.toggleCheck(b)},toggleCheck:function(b){b.stopEvent();var a=this.getLastSelected();if(a){this.view.onCheckChange(a)}}});Ext.define("Ext.slider.Thumb",{requires:["Ext.dd.DragTracker","Ext.util.Format"],topZIndex:10000,constructor:function(a){var b=this;Ext.apply(b,a||{},{cls:Ext.baseCSSPrefix+"slider-thumb",constrain:false});b.callParent([a])},render:function(){var a=this;a.el=a.slider.innerEl.insertFirst(a.getElConfig());a.onRender()},onRender:function(){if(this.disabled){this.disable()}this.initEvents()},getElConfig:function(){var c=this,b=c.slider,a={};a[b.vertical?"bottom":"left"]=b.calculateThumbPosition(b.normalizeValue(c.value))+"%";return{style:a,id:this.id,cls:this.cls}},move:function(c,b){var d=this.el,a=this.slider.vertical?"bottom":"left",g,e;c+="%";if(!b){d.dom.style[a]=c}else{g={};g[a]=c;if(!Ext.supports.GetPositionPercentage){e={};e[a]=d.dom.style[a]}new Ext.fx.Anim({target:d,duration:350,from:e,to:g})}},bringToFront:function(){this.el.setStyle("zIndex",this.topZIndex)},sendToBack:function(){this.el.setStyle("zIndex","")},enable:function(){var a=this;a.disabled=false;if(a.el){a.el.removeCls(a.slider.disabledCls)}},disable:function(){var a=this;a.disabled=true;if(a.el){a.el.addCls(a.slider.disabledCls)}},initEvents:function(){var b=this,a=b.el;b.tracker=new Ext.dd.DragTracker({onBeforeStart:Ext.Function.bind(b.onBeforeDragStart,b),onStart:Ext.Function.bind(b.onDragStart,b),onDrag:Ext.Function.bind(b.onDrag,b),onEnd:Ext.Function.bind(b.onDragEnd,b),tolerance:3,autoStart:300,overCls:Ext.baseCSSPrefix+"slider-thumb-over"});b.tracker.initEl(a)},onBeforeDragStart:function(a){if(this.disabled){return false}else{this.slider.promoteThumb(this);return true}},onDragStart:function(b){var a=this;a.el.addCls(Ext.baseCSSPrefix+"slider-thumb-drag");a.dragging=a.slider.dragging=true;a.dragStartValue=a.value;a.slider.fireEvent("dragstart",a.slider,b,a)},onDrag:function(h){var d=this,c=d.slider,b=d.index,g=d.getValueFromTracker(),a,i;if(g!==undefined){if(d.constrain){a=c.thumbs[b+1];i=c.thumbs[b-1];if(i!==undefined&&g<=i.value){g=i.value}if(a!==undefined&&g>=a.value){g=a.value}}c.setValue(b,g,false);c.fireEvent("drag",c,h,d)}},getValueFromTracker:function(){var a=this.slider,b=a.getTrackpoint(this.tracker.getXY());if(b!==undefined){return a.reversePixelValue(b)}},onDragEnd:function(d){var b=this,a=b.slider,c=b.value;b.el.removeCls(Ext.baseCSSPrefix+"slider-thumb-drag");b.dragging=a.dragging=false;a.fireEvent("dragend",a,d);if(b.dragStartValue!=c){a.fireEvent("changecomplete",a,c,b)}},destroy:function(){Ext.destroy(this.tracker)}});Ext.define("Ext.slider.Tip",{extend:"Ext.tip.Tip",minWidth:10,alias:"widget.slidertip",offsets:null,align:null,position:"",defaultVerticalPosition:"left",defaultHorizontalPosition:"top",isSliderTip:true,init:function(c){var b=this,d,a;if(!b.position){b.position=c.vertical?b.defaultVerticalPosition:b.defaultHorizontalPosition}switch(b.position){case"top":a=[0,-10];d="b-t?";break;case"bottom":a=[0,10];d="t-b?";break;case"left":a=[-10,0];d="r-l?";break;case"right":a=[10,0];d="l-r?"}if(!b.align){b.align=d}if(!b.offsets){b.offsets=a}c.on({scope:b,dragstart:b.onSlide,drag:b.onSlide,dragend:b.hide,destroy:b.destroy})},onSlide:function(c,d,a){var b=this;b.show();b.update(b.getText(a));b.el.alignTo(a.el,b.align,b.offsets)},getText:function(a){return String(a.value)}});Ext.define("Ext.slider.Multi",{extend:"Ext.form.field.Base",alias:"widget.multislider",alternateClassName:"Ext.slider.MultiSlider",requires:["Ext.slider.Thumb","Ext.slider.Tip","Ext.Number","Ext.util.Format","Ext.Template","Ext.layout.component.field.Slider"],childEls:["endEl","innerEl"],fieldSubTpl:['
    ','","
    ",{renderThumbs:function(g,e){var j=e.$comp,h=0,c=j.thumbs,b=c.length,d,a;for(;hg?g:c.value}e.syncThumbs()},setValue:function(c,g,b,e){var d=this,a=d.thumbs[c];g=d.normalizeValue(g);if(g!==a.value&&d.fireEvent("beforechange",d,g,a.value,a)!==false){a.value=g;if(d.rendered){d.inputEl.set({"aria-valuenow":g,"aria-valuetext":g});a.move(d.calculateThumbPosition(g),Ext.isDefined(b)?b!==false:d.animate);d.fireEvent("change",d,g,a);d.checkDirty();if(e){d.fireEvent("changecomplete",d,g,a)}}}},calculateThumbPosition:function(a){return(a-this.minValue)/(this.maxValue-this.minValue)*100},getRatio:function(){var b=this,a=this.vertical?this.innerEl.getHeight():this.innerEl.getWidth(),c=this.maxValue-this.minValue;return c===0?a:(a/c)},reversePixelValue:function(a){return this.minValue+(a/this.getRatio())},reversePercentageValue:function(a){return this.minValue+(this.maxValue-this.minValue)*(a/100)},onDisable:function(){var g=this,d=0,b=g.thumbs,a=b.length,c,e,h;g.callParent();for(;d {baseCls}-body-{ui} {parent.baseCls}-body-{parent.ui}-{.}" style="{bodyStyle}">',"{%this.renderContainer(out,values)%}","",'
    {baseCls}-strip-{ui} {parent.baseCls}-strip-{parent.ui}-{.}">
    '],initComponent:function(){var a=this;if(a.plain){a.setUI(a.ui+"-plain")}a.addClsWithUI(a.dock);a.addEvents("change");a.callParent(arguments);a.layout.align=(a.orientation=="vertical")?"left":"top";a.layout.overflowHandler=new Ext.layout.container.boxOverflow.Scroller(a.layout);a.remove(a.titleCmp);delete a.titleCmp;Ext.apply(a.renderData,{bodyCls:a.bodyCls})},getLayout:function(){var a=this;a.layout.type=(a.dock==="top"||a.dock==="bottom")?"hbox":"vbox";return a.callParent(arguments)},onAdd:function(a){a.position=this.dock;this.callParent(arguments)},onRemove:function(a){var b=this;if(a===b.previousTab){b.previousTab=null}b.callParent(arguments)},afterComponentLayout:function(a){this.callParent(arguments);this.strip.setWidth(a)},onClick:function(g,d){var c=this,i=g.getTarget("."+Ext.tab.Tab.prototype.baseCls),b=i&&Ext.getCmp(i.id),h=c.tabPanel,a=b&&b.closeEl&&(d===b.closeEl.dom);if(a){g.preventDefault()}if(b&&b.isDisabled&&!b.isDisabled()){if(b.closable&&a){b.onCloseClick()}else{if(h){h.setActiveTab(b.card)}else{c.setActiveTab(b)}b.focus()}}},closeTab:function(c){var d=this,b=c.card,e=d.tabPanel,a;if(b&&b.fireEvent("beforeclose",b)===false){return false}a=d.findNextActivatable(c);Ext.suspendLayouts();if(e&&b){delete c.ownerCt;b.fireEvent("close",b);e.remove(b);if(!e.getComponent(b)){c.fireClose();d.remove(c)}else{c.ownerCt=d;Ext.resumeLayouts(true);return false}}if(a){if(e){e.setActiveTab(a.card)}else{d.setActiveTab(a)}a.focus()}Ext.resumeLayouts(true)},findNextActivatable:function(a){var b=this;if(a.active&&b.items.getCount()>1){return(b.previousTab&&b.previousTab!==a&&!b.previousTab.disabled)?b.previousTab:(a.next("tab[disabled=false]")||a.prev("tab[disabled=false]"))}},setActiveTab:function(a){var b=this;if(!a.disabled&&a!==b.activeTab){if(b.activeTab){if(b.activeTab.isDestroyed){b.previousTab=null}else{b.previousTab=b.activeTab;b.activeTab.deactivate()}}a.activate();b.activeTab=a;b.fireEvent("change",b,a,a.card);b.on({afterlayout:b.afterTabActivate,scope:b,single:true});b.updateLayout()}},afterTabActivate:function(){this.layout.overflowHandler.scrollToItem(this.activeTab)}});Ext.define("Ext.tab.Panel",{extend:"Ext.panel.Panel",alias:"widget.tabpanel",alternateClassName:["Ext.TabPanel"],requires:["Ext.layout.container.Card","Ext.tab.Bar"],tabPosition:"top",removePanelHeader:true,plain:false,itemCls:Ext.baseCSSPrefix+"tabpanel-child",minTabWidth:undefined,maxTabWidth:undefined,deferredRender:true,initComponent:function(){var c=this,b=[].concat(c.dockedItems||[]),a=c.activeTab||(c.activeTab=0);c.layout=new Ext.layout.container.Card(Ext.apply({owner:c,deferredRender:c.deferredRender,itemCls:c.itemCls,activeItem:c.activeTab},c.layout));c.tabBar=new Ext.tab.Bar(Ext.apply({dock:c.tabPosition,plain:c.plain,border:c.border,cardLayout:c.layout,tabPanel:c},c.tabBar));b.push(c.tabBar);c.dockedItems=b;c.addEvents("beforetabchange","tabchange");c.callParent(arguments);c.activeTab=c.getComponent(a);if(c.activeTab){c.activeTab.tab.activate(true);c.tabBar.activeTab=c.activeTab.tab}},setActiveTab:function(a){var c=this,b;a=c.getComponent(a);if(a){b=c.getActiveTab();if(b!==a&&c.fireEvent("beforetabchange",c,a,b)===false){return false}if(!a.isComponent){Ext.suspendLayouts();a=c.add(a);Ext.resumeLayouts()}c.activeTab=a;Ext.suspendLayouts();c.layout.setActiveItem(a);a=c.activeTab=c.layout.getActiveItem();if(a&&a!==b){c.tabBar.setActiveTab(a.tab);Ext.resumeLayouts(true);if(b!==a){c.fireEvent("tabchange",c,a,b)}}else{Ext.resumeLayouts(true)}return a}},getActiveTab:function(){var b=this,a=b.getComponent(b.activeTab);if(a&&b.items.indexOf(a)!=-1){b.activeTab=a}else{b.activeTab=null}return b.activeTab},getTabBar:function(){return this.tabBar},onAdd:function(e,c){var d=this,b=e.tabConfig||{},a={xtype:"tab",card:e,disabled:e.disabled,closable:e.closable,hidden:e.hidden&&!e.hiddenByLayout,tooltip:e.tooltip,tabBar:d.tabBar,closeText:e.closeText};b=Ext.applyIf(b,a);e.tab=d.tabBar.insert(c,b);e.on({scope:d,enable:d.onItemEnable,disable:d.onItemDisable,beforeshow:d.onItemBeforeShow,iconchange:d.onItemIconChange,iconclschange:d.onItemIconClsChange,titlechange:d.onItemTitleChange});if(e.isPanel){if(d.removePanelHeader){if(e.rendered){if(e.header){e.header.hide()}}else{e.header=false}}if(e.isPanel&&d.border){e.setBorder(false)}}},onItemEnable:function(a){a.tab.enable()},onItemDisable:function(a){a.tab.disable()},onItemBeforeShow:function(a){if(a!==this.activeTab){this.setActiveTab(a);return false}},onItemIconChange:function(b,a){b.tab.setIcon(a)},onItemIconClsChange:function(b,a){b.tab.setIconCls(a)},onItemTitleChange:function(a,b){a.tab.setText(b)},doRemove:function(d,b){var c=this,a;if(c.destroying||c.items.getCount()==1){c.activeTab=null}else{if((a=c.tabBar.items.indexOf(c.tabBar.findNextActivatable(d.tab)))!==-1){c.setActiveTab(a)}}this.callParent(arguments);delete d.tab.card;delete d.tab},onRemove:function(b,c){var a=this;b.un({scope:a,enable:a.onItemEnable,disable:a.onItemDisable,beforeshow:a.onItemBeforeShow});if(!a.destroying&&b.tab.ownerCt===a.tabBar){a.tabBar.remove(b.tab)}}});Ext.define("Ext.toolbar.Spacer",{extend:"Ext.Component",alias:"widget.tbspacer",alternateClassName:"Ext.Toolbar.Spacer",baseCls:Ext.baseCSSPrefix+"toolbar-spacer",focusable:false});Ext.define("Ext.tree.Column",{extend:"Ext.grid.column.Column",alias:"widget.treecolumn",tdCls:Ext.baseCSSPrefix+"grid-cell-treecolumn",treePrefix:Ext.baseCSSPrefix+"tree-",elbowPrefix:Ext.baseCSSPrefix+"tree-elbow-",expanderCls:Ext.baseCSSPrefix+"tree-expander",imgText:'',checkboxText:'',initComponent:function(){var a=this;a.origRenderer=a.renderer||a.defaultRenderer;a.origScope=a.scope||window;a.renderer=a.treeRenderer;a.scope=a;a.callParent()},treeRenderer:function(l,n,c,b,k,e,j){var s=this,r=[],p=Ext.String.format,u=c.getDepth(),q=s.treePrefix,d=s.elbowPrefix,m=s.expanderCls,i=s.imgText,v=s.checkboxText,h=s.origRenderer.apply(s.origScope,arguments),g=Ext.BLANK_IMAGE_URL,o=c.get("href"),t=c.get("hrefTarget"),a=c.get("cls");while(c){if(!c.isRoot()||(c.isRoot()&&j.rootVisible)){if(c.getDepth()===u){r.unshift(p(i,q+"icon "+q+"icon"+(c.get("icon")?"-inline ":(c.isLeaf()?"-leaf ":"-parent "))+(c.get("iconCls")||""),c.get("icon")||g));if(c.get("checked")!==null){r.unshift(p(v,(q+"checkbox")+(c.get("checked")?" "+q+"checkbox-checked":""),c.get("checked")?'aria-checked="true"':""));if(c.get("checked")){n.tdCls+=(" "+q+"checked")}}if(c.isLast()){if(c.isExpandable()){r.unshift(p(i,(d+"end-plus "+m),g))}else{r.unshift(p(i,(d+"end"),g))}}else{if(c.isExpandable()){r.unshift(p(i,(d+"plus "+m),g))}else{r.unshift(p(i,(q+"elbow"),g))}}}else{if(c.isLast()||c.getDepth()===0){r.unshift(p(i,(d+"empty"),g))}else{if(c.getDepth()!==0){r.unshift(p(i,(d+"line"),g))}}}}c=c.parentNode}if(o){r.push('',h,"")}else{r.push(h)}if(a){n.tdCls+=" "+a}return r.join("")},defaultRenderer:function(a){return a}});Ext.define("Ext.tree.View",{extend:"Ext.view.Table",alias:"widget.treeview",requires:["Ext.data.NodeStore"],loadingCls:Ext.baseCSSPrefix+"grid-tree-loading",expandedCls:Ext.baseCSSPrefix+"grid-tree-node-expanded",leafCls:Ext.baseCSSPrefix+"grid-tree-node-leaf",expanderSelector:"."+Ext.baseCSSPrefix+"tree-expander",checkboxSelector:"."+Ext.baseCSSPrefix+"tree-checkbox",expanderIconOverCls:Ext.baseCSSPrefix+"tree-expander-over",nodeAnimWrapCls:Ext.baseCSSPrefix+"tree-animator-wrap",blockRefresh:true,loadMask:false,rootVisible:true,deferInitialRefresh:false,expandDuration:250,collapseDuration:250,toggleOnDblClick:true,stripeRows:false,uiFields:["expanded","loaded","checked","expandable","leaf","icon","iconCls","loading","qtip","qtitle"],initComponent:function(){var a=this,b=a.panel.getStore();if(a.initialConfig.animate===undefined){a.animate=Ext.enableFx}a.store=new Ext.data.NodeStore({treeStore:b,recursive:true,rootVisible:a.rootVisible,listeners:{beforeexpand:a.onBeforeExpand,expand:a.onExpand,beforecollapse:a.onBeforeCollapse,collapse:a.onCollapse,write:a.onStoreWrite,datachanged:a.onStoreDataChanged,scope:a}});if(a.node){a.setRootNode(a.node)}a.animQueue={};a.animWraps={};a.addEvents("afteritemexpand","afteritemcollapse");a.callParent(arguments);a.on({element:"el",scope:a,delegate:a.expanderSelector,mouseover:a.onExpanderMouseOver,mouseout:a.onExpanderMouseOut});a.on({element:"el",scope:a,delegate:a.checkboxSelector,click:a.onCheckboxChange})},getMaskStore:function(){return this.panel.getStore()},afterComponentLayout:function(){this.callParent(arguments);var a=this.stretcher;if(a){a.setWidth((this.getWidth()-Ext.getScrollbarSize().width))}},processUIEvent:function(a){if(a.getTarget("."+this.nodeAnimWrapCls,this.el)){return false}return this.callParent(arguments)},onClear:function(){this.store.removeAll()},setRootNode:function(b){var a=this;a.store.setNode(b);a.node=b},onCheckboxChange:function(d,a){var c=this,b=d.getTarget(c.getItemSelector(),c.getTargetEl());if(b){c.onCheckChange(c.getRecord(b))}},onCheckChange:function(a){var b=a.get("checked");if(Ext.isBoolean(b)){b=!b;a.set("checked",b);this.fireEvent("checkchange",a,b)}},getChecked:function(){var a=[];this.node.cascadeBy(function(b){if(b.get("checked")){a.push(b)}});return a},isItemChecked:function(a){return a.get("checked")},createAnimWrap:function(j,k){var g="",e=this.panel.headerCt,b=e.getGridColumns(),h=0,l=b.length,m,d=this.getNode(j),a,c;for(;h'}c=Ext.get(d);a=c.insertSibling({tag:"tr",html:['','
    ','',g,"
    ","
    ",""].join("")},"after");return{record:j,node:d,el:a,expanding:false,collapsing:false,animating:false,animateEl:a.down("div"),targetEl:a.down("tbody")}},getAnimWrap:function(d,a){if(!this.animate){return null}var b=this.animWraps,c=b[d.internalId];if(a!==false){while(!c&&d){d=d.parentNode;if(d){c=b[d.internalId]}}}return c},doAdd:function(b,d,i){var j=this,g=d[0],l=g.parentNode,k=j.all.elements,n=0,e=j.getAnimWrap(l),m,c,h;if(!e||!e.expanding){return j.callParent(arguments)}l=e.record;m=e.targetEl;c=m.dom.childNodes;h=c.length-1;n=i-j.indexOf(l)-1;if(!h||n>=h){m.appendChild(b)}else{Ext.fly(c[n+1]).insertSibling(b,"before",true)}Ext.Array.insert(k,i,b);if(e.isAnimating){j.onExpand(l)}},beginBulkUpdate:function(){this.bulkUpdate=true},endBulkUpdate:function(){this.bulkUpdate=false},onRemove:function(e,a,b){var d=this,c=d.bulkUpdate;if(d.viewReady){d.doRemove(a,b);if(!c){d.updateIndexes(b)}if(d.store.getCount()===0){d.refresh()}if(!c){d.fireEvent("itemremove",a,b)}}},doRemove:function(a,c){var h=this,d=h.all,b=h.getAnimWrap(a),g=d.item(c),e=g?g.dom:null;if(!e||!b||!b.collapsing){return h.callParent(arguments)}b.targetEl.appendChild(e);d.removeElement(c)},onBeforeExpand:function(d,b,c){var e=this,a;if(!e.rendered||!e.animate){return}if(e.getNode(d)){a=e.getAnimWrap(d,false);if(!a){a=e.animWraps[d.internalId]=e.createAnimWrap(d);a.animateEl.setHeight(0)}else{if(a.collapsing){a.targetEl.select(e.itemSelector).remove()}}a.expanding=true;a.collapsing=false}},onExpand:function(i){var h=this,e=h.animQueue,a=i.getId(),c=h.getNode(i),g=c?h.indexOf(c):-1,d,b,j;if(h.singleExpand){h.ensureSingleExpand(i)}if(g===-1){return}d=h.getAnimWrap(i,false);if(!d){h.isExpandingOrCollapsing=false;h.fireEvent("afteritemexpand",i,g,c);return}b=d.animateEl;j=d.targetEl;b.stopAnimation();e[a]=true;b.slideIn("t",{duration:h.expandDuration,listeners:{scope:h,lastframe:function(){d.el.insertSibling(j.query(h.itemSelector),"before");d.el.remove();h.refreshSize();delete h.animWraps[d.record.internalId];delete e[a]}},callback:function(){h.isExpandingOrCollapsing=false;h.fireEvent("afteritemexpand",i,g,c)}});d.isAnimating=true},onBeforeCollapse:function(d,b,c){var e=this,a;if(!e.rendered||!e.animate){return}if(e.getNode(d)){a=e.getAnimWrap(d);if(!a){a=e.animWraps[d.internalId]=e.createAnimWrap(d,c)}else{if(a.expanding){a.targetEl.select(this.itemSelector).remove()}}a.expanding=false;a.collapsing=true}},onCollapse:function(i){var h=this,e=h.animQueue,a=i.getId(),c=h.getNode(i),g=c?h.indexOf(c):-1,d=h.getAnimWrap(i),b,j;if(g===-1){return}if(!d){h.isExpandingOrCollapsing=false;h.fireEvent("afteritemcollapse",i,g,c);return}b=d.animateEl;j=d.targetEl;e[a]=true;b.stopAnimation();b.slideOut("t",{duration:h.collapseDuration,listeners:{scope:h,lastframe:function(){d.el.remove();h.refreshSize();delete h.animWraps[d.record.internalId];delete e[a]}},callback:function(){h.isExpandingOrCollapsing=false;h.fireEvent("afteritemcollapse",i,g,c)}});d.isAnimating=true},isAnimating:function(a){return !!this.animQueue[a.getId()]},collectData:function(c){var g=this.callParent(arguments),e=g.rows,a=e.length,d=0,h,b;for(;d1){b.expandPath(h.join(a),d,a,function(m,l){var k=l;if(m&&l){l=l.findChild(d,e);if(l){b.getSelectionModel().select(l);Ext.callback(g,i||b,[true,l]);return}}Ext.callback(g,i||b,[false,k])},b)}else{c=b.getRootNode();if(c.getId()===e){b.getSelectionModel().select(c);Ext.callback(g,i||b,[true,c])}else{Ext.callback(g,i||b,[false,null])}}}});Ext.define("Ext.view.DragZone",{extend:"Ext.dd.DragZone",containerScroll:false,constructor:function(b){var e=this,a,d,c;Ext.apply(e,b);if(!e.ddGroup){e.ddGroup="view-dd-zone-"+e.view.id}a=e.view;d=a.ownerCt;if(d){c=d.getTargetEl().dom}else{c=a.el.dom.parentNode}e.callParent([c]);e.ddel=Ext.get(document.createElement("div"));e.ddel.addCls(Ext.baseCSSPrefix+"grid-dd-wrap")},init:function(c,a,b){this.initTarget(c,a,b);this.view.mon(this.view,{itemmousedown:this.onItemMouseDown,scope:this})},onValidDrop:function(b,a,c){this.callParent();b.el.focus()},onItemMouseDown:function(b,a,d,c,g){if(!this.isPreventDrag(g,a,d,c)){this.view.focus();this.handleMouseDown(g);if(b.getSelectionModel().selectionMode=="MULTI"&&!g.ctrlKey&&b.getSelectionModel().isSelected(a)){return false}}},isPreventDrag:function(a){return false},getDragData:function(c){var a=this.view,b=c.getTarget(a.getItemSelector());if(b){return{copy:a.copy||(a.allowCopy&&c.ctrlKey),event:new Ext.EventObjectImpl(c),view:a,ddel:this.ddel,item:b,records:a.getSelectionModel().getSelection(),fromPosition:Ext.fly(b).getXY()}}},onInitDrag:function(b,j){var g=this,h=g.dragData,d=h.view,a=d.getSelectionModel(),c=d.getRecord(h.item),i=h.event;if(!a.isSelected(c)){a.select(c,true)}h.records=a.getSelection();g.ddel.update(g.getDragText());g.proxy.update(g.ddel.dom);g.onStartDrag(b,j);return true},getDragText:function(){var a=this.dragData.records.length;return Ext.String.format(this.dragText,a,a==1?"":"s")},getRepairXY:function(b,a){return a?a.fromPosition:false}});Ext.define("Ext.tree.ViewDragZone",{extend:"Ext.view.DragZone",isPreventDrag:function(b,a){return(a.get("allowDrag")===false)||!!b.getTarget(this.view.expanderSelector)},afterRepair:function(){var h=this,a=h.view,i=a.selectedItemCls,b=h.dragData.records,g,e=b.length,c=Ext.fly,d;if(Ext.enableFx&&h.repairHighlight){for(g=0;g=i.top&&h<(i.top+d)){return"before"}else{if(!a&&(k||(h>=(i.bottom-d)&&h<=i.bottom))){return"after"}else{return"append"}}},isValidDropPoint:function(b,j,n,k,g){if(!b||!g.item){return false}var o=this.view,l=o.getRecord(b),d=g.records,a=d.length,m=d.length,c,h;if(!(l&&j&&a)){return false}for(c=0;c=0;--k){m=o[k].selectorText;if(m){m=m.split(",");h=m.length;for(g=0;g2)?a[2]:null,h=(i>3)?a[3]:"/",d=(i>4)?a[4]:null,g=(i>5)?a[5]:false;document.cookie=c+"="+escape(e)+((b===null)?"":("; expires="+b.toGMTString()))+((h===null)?"":("; path="+h))+((d===null)?"":("; domain="+d))+((g===true)?"; secure":"")},get:function(d){var b=d+"=",g=b.length,a=document.cookie.length,e=0,c=0;while(e=0?a.substr(b+1):null},setHash:function(d){var a=this,c=a.useTopWindow?window.top:window;try{c.location.hash=d}catch(b){}},doSave:function(){this.hiddenField.value=this.currentToken},handleStateChange:function(a){this.currentToken=a;this.fireEvent("change",a)},updateIFrame:function(b){var a='
    '+Ext.util.Format.htmlEncode(b)+"
    ",d;try{d=this.iframe.contentWindow.document;d.open();d.write(a);d.close();return true}catch(c){return false}},checkIFrame:function(){var d=this,b=d.iframe.contentWindow,e,c,a,g;if(!b||!b.document){Ext.Function.defer(this.checkIFrame,10,this);return}e=b.document;c=e.getElementById("state");a=c?c.innerText:null;g=d.getHash();Ext.TaskManager.start({run:function(){var k=b.document,j=k.getElementById("state"),h=j?j.innerText:null,i=d.getHash();if(h!==a){a=h;d.handleStateChange(h);d.setHash(h);g=h;d.doSave()}else{if(i!==g){g=i;d.updateIFrame(i)}}},interval:50,scope:d});d.ready=true;d.fireEvent("ready",d)},startUp:function(){var a=this,b;a.currentToken=a.hiddenField.value||this.getHash();if(a.oldIEMode){a.checkIFrame()}else{b=a.getHash();Ext.TaskManager.start({run:function(){var c=a.getHash();if(c!==b){b=c;a.handleStateChange(b);a.doSave()}},interval:50,scope:a});a.ready=true;a.fireEvent("ready",a)}},init:function(d,b){var c=this,a=Ext.DomHelper;if(c.ready){Ext.callback(d,b,[c]);return}if(!Ext.isReady){Ext.onReady(function(){c.init(d,b)});return}c.hiddenField=Ext.getDom(c.fieldId);if(!c.hiddenField){c.hiddenField=Ext.getBody().createChild({id:Ext.id(),tag:"form",cls:Ext.baseCSSPrefix+"hide-display",children:[{tag:"input",type:"hidden",id:c.fieldId}]},false,true).firstChild}if(c.oldIEMode){c.iframe=Ext.getDom(c.iframeId);if(!c.iframe){c.iframe=a.append(c.hiddenField.parentNode,{tag:"iframe",id:c.iframeId,src:Ext.SSL_SECURE_URL})}}c.addEvents("ready","change");if(d){c.on("ready",d,b,{single:true})}c.startUp()},add:function(a,c){var b=this;if(c!==false){if(b.getToken()===a){return true}}if(b.oldIEMode){return b.updateIFrame(a)}else{b.setHash(a);return true}},back:function(){window.history.go(-1)},forward:function(){window.history.go(1)},getToken:function(){return this.ready?this.currentToken:this.getHash()}});Ext.define("Ext.util.Point",{extend:"Ext.util.Region",statics:{fromEvent:function(a){a=(a.changedTouches&&a.changedTouches.length>0)?a.changedTouches[0]:a;return new this(a.pageX,a.pageY)}},constructor:function(a,b){this.callParent([b,a,b,a])},toString:function(){return"Point["+this.x+","+this.y+"]"},equals:function(a){return(this.x==a.x&&this.y==a.y)},isWithin:function(b,a){if(!Ext.isObject(a)){a={x:a,y:a}}return(this.x<=b.x+a.x&&this.x>=b.x-a.x&&this.y<=b.y+a.y&&this.y>=b.y-a.y)},roundedEquals:function(a){return(Math.round(this.x)==Math.round(a.x)&&Math.round(this.y)==Math.round(a.y))}},function(){this.prototype.translate=Ext.util.Region.prototype.translateBy});Ext.define("Ext.view.TableChunker",{singleton:true,requires:["Ext.XTemplate"],metaTableTpl:["{%if (this.openTableWrap)out.push(this.openTableWrap())%}",'',"",'','','',"","","{[this.openRows()]}","{row}",'',"{[this.embedFeature(values, parent, xindex, xcount)]}","","{[this.closeRows()]}","","
    ","{%if (this.closeTableWrap)out.push(this.closeTableWrap())%}"],constructor:function(){Ext.XTemplate.prototype.recurse=function(b,a){return this.apply(a?b[a]:b)}},embedFeature:function(b,d,a,e){var c="";if(!b.disabled){c=b.getFeatureTpl(b,d,a,e)}return c},embedFullWidth:function(b){var a='style="width:{fullWidth}px;';if(!b.rowCount){a+="height:1px;"}return a+'"'},openRows:function(){return''},closeRows:function(){return""},metaRowTpl:['','','','
    {{id}}
    ',"","
    ",""],firstOrLastCls:function(a,b){if(a===1){return Ext.view.Table.prototype.firstCls}else{if(a===b){return Ext.view.Table.prototype.lastCls}}},embedRowCls:function(){return"{rowCls}"},embedRowAttr:function(){return"{rowAttr}"},openTableWrap:undefined,closeTableWrap:undefined,getTableTpl:function(k,b){var j,h={openRows:this.openRows,closeRows:this.closeRows,embedFeature:this.embedFeature,embedFullWidth:this.embedFullWidth,openTableWrap:this.openTableWrap,closeTableWrap:this.closeTableWrap},g={},c=k.features||[],m=c.length,e=0,l={embedRowCls:this.embedRowCls,embedRowAttr:this.embedRowAttr,firstOrLastCls:this.firstOrLastCls,unselectableAttr:k.enableTextSelection?"":'unselectable="on"',unselectableCls:k.enableTextSelection?"":Ext.baseCSSPrefix+"unselectable"},d=Array.prototype.slice.call(this.metaRowTpl,0),a;for(;eDynamically Constraining Attributes with JavaScript Expressions\n\n

    The attributes of dr.node tags (and any subclass of dr.node, such as dr.view) don't have to be declared at runtime. Instead, they can be generated dynamically in a number of ways with with JavaScript expressions.

    \n\n

    It is often convenient to constrain the size of subviews to fit within the bounds of their parent, so that you don't have to calculate exact sizes by hand. This is very easy to accomplish using the ${inline javascript} syntax For example, if you needed to create two columns and ensure that they fit within a parent view, regardless of it's size, you could accomplish this by ensuring the width of each column is proportional to the number of columns that are being added (i.e. parent.width / parent.subviews.length):

    \n\n
    <view width=\"200\" height=\"100\" bgcolor=\"lightpink\">\n\n  <view width=\"${this.parent.width / this.parent.subviews.length}\" \n        height=\"${this.parent.height}\" \n        x=\"0\" \n        y=\"0\" \n        bgcolor=\"lightblue\">\n  </view>\n\n  <view width=\"${this.parent.width / this.parent.subviews.length}\" \n        height=\"${this.parent.height}\" \n        x=\"${this.parent.width / this.parent.subviews.length}\" \n        y=\"0\" \n        bgcolor=\"lightgreen\">\n  </view>\n\n</view>\n
    \n\n

    This works well, but would be a bit cumbersome to continue to use as more columns are added. To DRY up your code, you can define methods in the views themselves, and then use those new methods to constrain other attributes.

    \n\n
    <view width=\"200\" height=\"100\" y=\"110\" bgcolor=\"lightpink\">\n\n    <method name=\"columnWidth\">\n        return this.width / this.subviews.length;\n    </method>\n\n    <method name=\"columnX\" args=\"column\">\n        return this.columnWidth() * this.subviews.indexOf(column);\n    </method>\n\n    <view width=\"${this.parent.columnWidth()}\"\n          height=\"${this.parent.height}\"\n          x=\"${this.parent.columnX(this)}\"\n          y=\"0\"\n          bgcolor=\"lightblue\">\n    </view>\n\n    <view width=\"${this.parent.columnWidth()}\"\n          height=\"${this.parent.height}\"\n          x=\"${this.parent.columnX(this)}\"\n          y=\"0\"\n          bgcolor=\"lightgreen\">\n    </view>\n\n    <view width=\"${this.parent.columnWidth()}\"\n          height=\"${this.parent.height}\"\n          x=\"${this.parent.columnX(this)}\"\n          y=\"0\"\n          bgcolor=\"lightyellow\">\n    </view>\n\n</view>\n
    \n\n

    Dynamic attributes are not limited to geometery, any attribute that can be set via javascript is settable in this way. For example, You might want to set the value of a text element based on the value of other attributes. Here we set the value by concatenating three attributes together.

    \n\n
    <attribute name=\"firstName\" type=\"string\" value=\"Lumpy\"></attribute>\n<attribute name=\"middleName\" type=\"string\" value=\"Space\"></attribute>\n<attribute name=\"lastName\" type=\"string\" value=\"Princess\"></attribute>\n\n<text text=\"${this.parent.firstName + ' ' + this.parent.middleName + ' ' + this.parent.lastName}\" \n      color=\"hotpink\">\n</text>\n
    \n\n

    Of course arbitrarily complex Javascript is available:

    \n\n
    <text text=\"${this.parent.firstName.charAt(0) + ' ' + ' ' + this.parent.lastName.charAt(0)}\" \n      color=\"hotpink\">\n</text>\n
    \n\n

    And methods can be used to set attributes in any dr.node tag, not just views:

    \n\n
    <method name=\"initials\">\n    return this.firstName.charAt(0) + ' ' + this.middleName.charAt(0) + ' ' + this.lastName.charAt(0);\n</method>\n\n<text text=\"${this.parent.initials()}\" color=\"hotpink\"></text>\n
    \n","title":"Dynamically Constraining Attributes with JavaScript Expressions"}); \ No newline at end of file diff --git a/docs/api/guides/constraints/README.md b/docs/api/guides/constraints/README.md new file mode 100644 index 00000000..1646c764 --- /dev/null +++ b/docs/api/guides/constraints/README.md @@ -0,0 +1,90 @@ +# Dynamically Constraining Attributes with JavaScript Expressions + +[//]: # This introduction to attribute constraints and explains how to get started using them in Dreem. + +The attributes of {@link dr.node} tags (and any subclass of {@link dr.node}, such as {@link dr.view}) don't have to be declared at runtime. Instead, they can be generated dynamically in a number of ways with with JavaScript expressions. + +It is often convenient to constrain the size of {@link dr.view subviews} to fit within the bounds of their parent, so that you don't have to calculate exact sizes by hand. This is very easy to accomplish using the `${inline javascript}` syntax For example, if you needed to create two columns and ensure that they fit within a parent view, regardless of it's size, you could accomplish this by ensuring the width of each column is proportional to the number of columns that are being added (i.e. `parent.width / parent.subviews.length`): + + @example + + + + + + + + + + +This works well, but would be a bit cumbersome to continue to use as more columns are added. To DRY up your code, you can define methods in the views themselves, and then use those new methods to constrain other attributes. + + @example + + + + return this.width / this.subviews.length; + + + + return this.columnWidth() * this.subviews.indexOf(column); + + + + + + + + + + + + + +Dynamic attributes are not limited to geometery, any attribute that can be set via javascript is settable in this way. For example, You might want to set the value of a text element based on the value of other attributes. Here we set the value by concatenating three attributes together. + + @example + + + + + + + +Of course arbitrarily complex Javascript is available: + + @example + + + +And methods can be used to set attributes in any {@link dr.node} tag, not just views: + + @example + + return this.firstName.charAt(0) + ' ' + this.middleName.charAt(0) + ' ' + this.lastName.charAt(0); + + + + diff --git a/docs/api/guides/constraints/icon.png b/docs/api/guides/constraints/icon.png new file mode 100644 index 00000000..a8f9f7a0 Binary files /dev/null and b/docs/api/guides/constraints/icon.png differ diff --git a/docs/api/guides/subclassing/README.js b/docs/api/guides/subclassing/README.js new file mode 100644 index 00000000..84ff067c --- /dev/null +++ b/docs/api/guides/subclassing/README.js @@ -0,0 +1 @@ +Ext.data.JsonP.subclassing({"guide":"

    Subclassing in Dreem

    \n\n

    inheritance

    \n","title":"Subclassing in Dreem"}); \ No newline at end of file diff --git a/docs/api/guides/subclassing/README.md b/docs/api/guides/subclassing/README.md new file mode 100644 index 00000000..012b1125 --- /dev/null +++ b/docs/api/guides/subclassing/README.md @@ -0,0 +1,7 @@ +# Subclassing in Dreem + +[//]: # This introduction to the object model and class hierarchy of Dreem. + + +inheritance + diff --git a/docs/api/guides/subclassing/icon.png b/docs/api/guides/subclassing/icon.png new file mode 100644 index 00000000..a8f9f7a0 Binary files /dev/null and b/docs/api/guides/subclassing/icon.png differ diff --git a/docs/api/index.html b/docs/api/index.html new file mode 100644 index 00000000..e6ee6af7 --- /dev/null +++ b/docs/api/index.html @@ -0,0 +1,169 @@ + + + + Dreem API documentation + + + + + + + + + + + + + + + + + + + + +
    Dreem API documentation
    + +
    Dreem API documentation
    + + + + + + + + + + + + + + diff --git a/docs/api/member-icons/attribute.png b/docs/api/member-icons/attribute.png new file mode 100644 index 00000000..4f208aba Binary files /dev/null and b/docs/api/member-icons/attribute.png differ diff --git a/docs/api/member-icons/cfg.png b/docs/api/member-icons/cfg.png new file mode 100644 index 00000000..4f208aba Binary files /dev/null and b/docs/api/member-icons/cfg.png differ diff --git a/docs/api/member-icons/css_mixin.png b/docs/api/member-icons/css_mixin.png new file mode 100644 index 00000000..1c060347 Binary files /dev/null and b/docs/api/member-icons/css_mixin.png differ diff --git a/docs/api/member-icons/css_var.png b/docs/api/member-icons/css_var.png new file mode 100644 index 00000000..cb7684f5 Binary files /dev/null and b/docs/api/member-icons/css_var.png differ diff --git a/docs/api/member-icons/event.png b/docs/api/member-icons/event.png new file mode 100644 index 00000000..d5e7e5d3 Binary files /dev/null and b/docs/api/member-icons/event.png differ diff --git a/docs/api/member-icons/method.png b/docs/api/member-icons/method.png new file mode 100644 index 00000000..6e3674b2 Binary files /dev/null and b/docs/api/member-icons/method.png differ diff --git a/docs/api/member-icons/property.png b/docs/api/member-icons/property.png new file mode 100644 index 00000000..62feb07e Binary files /dev/null and b/docs/api/member-icons/property.png differ diff --git a/docs/api/output/Eventable.js b/docs/api/output/Eventable.js new file mode 100644 index 00000000..06c12635 --- /dev/null +++ b/docs/api/output/Eventable.js @@ -0,0 +1 @@ +Ext.data.JsonP.Eventable({"tagname":"class","name":"Eventable","autodetected":{},"files":[{"filename":"layout.js","href":"layout.html#Eventable"}],"extends":"Module","members":[{"name":"sendEvent","tagname":"method","owner":"Eventable","id":"method-sendEvent","meta":{"chainable":true}},{"name":"setAttribute","tagname":"method","owner":"Eventable","id":"method-setAttribute","meta":{"chainable":true}},{"name":"setAttributes","tagname":"method","owner":"Eventable","id":"method-setAttributes","meta":{"chainable":true}}],"alternateClassNames":[],"aliases":{},"id":"class-Eventable","short_doc":"The baseclass used by everything in dreem. ...","component":false,"superclasses":["Module"],"subclasses":["dr.idle","dr.keyboard","dr.mouse","dr.node","dr.window"],"mixedInto":[],"mixins":[],"parentMixins":[],"requires":[],"uses":[],"html":"

    Hierarchy

    Module
    Eventable

    Subclasses

    Files

    The baseclass used by everything in dreem. Adds higher level event APIs.

    \n
    Defined By

    Methods

    Eventable
    view source
    ( name, value ) : Eventablechainable
    Sends an event ...

    Sends an event

    \n

    Parameters

    • name : String

      the name of the event to send

      \n
    • value : Object

      the value to send with the event

      \n

    Returns

    Eventable
    view source
    ( name, value ) : Eventablechainable
    Sets an attribute, calls a setter if there is one, then sends an event with the new value ...

    Sets an attribute, calls a setter if there is one, then sends an event with the new value

    \n

    Parameters

    • name : String

      the name of the attribute to set

      \n
    • value : Object

      the value to set to

      \n

    Returns

    Eventable
    view source
    ( attributes ) : Eventablechainable
    Calls setAttribute for each name/value pair in the attributes object ...

    Calls setAttribute for each name/value pair in the attributes object

    \n

    Parameters

    • attributes : Object

      An object of name/value pairs to be set

      \n

    Returns

    ","meta":{}}); \ No newline at end of file diff --git a/docs/api/output/Events.js b/docs/api/output/Events.js new file mode 100644 index 00000000..ba07f53a --- /dev/null +++ b/docs/api/output/Events.js @@ -0,0 +1 @@ +Ext.data.JsonP.Events({"tagname":"class","name":"Events","autodetected":{},"files":[{"filename":"layout.js","href":"layout.html#Events"}],"private":true,"members":[{"name":"bind","tagname":"method","owner":"Events","id":"method-bind","meta":{"chainable":true}},{"name":"listenTo","tagname":"method","owner":"Events","id":"method-listenTo","meta":{"chainable":true}},{"name":"listenToOnce","tagname":"method","owner":"Events","id":"method-listenToOnce","meta":{"chainable":true}},{"name":"one","tagname":"method","owner":"Events","id":"method-one","meta":{"chainable":true}},{"name":"stopListening","tagname":"method","owner":"Events","id":"method-stopListening","meta":{"chainable":true}},{"name":"trigger","tagname":"method","owner":"Events","id":"method-trigger","meta":{"chainable":true}},{"name":"unbind","tagname":"method","owner":"Events","id":"method-unbind","meta":{"chainable":true}}],"alternateClassNames":[],"aliases":{},"id":"class-Events","component":false,"superclasses":[],"subclasses":[],"mixedInto":[],"mixins":[],"parentMixins":[],"requires":[],"uses":[],"html":"

    Files

    NOTE: This is a private utility class for internal use by the framework. Don't rely on its existence.

    A lightweight event system, used internally.

    \n
    Defined By

    Methods

    ( ev, callback ) : Eventschainable
    Binds an event to the current scope ...

    Binds an event to the current scope

    \n

    Parameters

    • ev : String

      the name of the event

      \n
    • callback : Function

      called when the event is fired

      \n

    Returns

    ( obj, ev, callback ) : Eventschainable
    Listens for an event on a specific scope ...

    Listens for an event on a specific scope

    \n

    Parameters

    • obj : Object

      scope to listen for events on

      \n
    • ev : String

      the name of the event

      \n
    • callback : Function

      called when the event is fired

      \n

    Returns

    ( obj, ev, callback ) : Eventschainable
    Only listens for an event one time ...

    Only listens for an event one time

    \n

    Parameters

    • obj : Object

      scope to listen for events on

      \n
    • ev : String

      the name of the event

      \n
    • callback : Function

      called when the event is fired

      \n

    Returns

    ( ev, callback ) : Eventschainable
    Binds an event to the current scope, automatically unbinds when the event fires ...

    Binds an event to the current scope, automatically unbinds when the event fires

    \n

    Parameters

    • ev : String

      the name of the event

      \n
    • callback : Function

      called when the event is fired

      \n

    Returns

    ( obj, ev, callback ) : Eventschainable
    Stops listening for an event on a given scope ...

    Stops listening for an event on a given scope

    \n

    Parameters

    • obj : Object

      scope to listen for events on

      \n
    • ev : String

      the name of the event

      \n
    • callback : Function

      called when the event would have been fired

      \n

    Returns

    ( ev ) : Eventschainable
    Fires an event ...

    Fires an event

    \n

    Parameters

    • ev : String

      the name of the event to fire

      \n

    Returns

    ( ev, callback ) : Eventschainable
    Stops listening for an event on the current scope ...

    Stops listening for an event on the current scope

    \n

    Parameters

    • ev : String

      the name of the event

      \n
    • callback : Function

      called when the event would have been fired

      \n

    Returns

    ","meta":{"private":true}}); \ No newline at end of file diff --git a/docs/api/output/Module.js b/docs/api/output/Module.js new file mode 100644 index 00000000..0824d606 --- /dev/null +++ b/docs/api/output/Module.js @@ -0,0 +1 @@ +Ext.data.JsonP.Module({"tagname":"class","name":"Module","autodetected":{},"files":[{"filename":"layout.js","href":"layout.html#Module"}],"private":true,"members":[{"name":"include","tagname":"method","owner":"Module","id":"method-include","meta":{"chainable":true}}],"alternateClassNames":[],"aliases":{},"id":"class-Module","component":false,"superclasses":[],"subclasses":["Eventable"],"mixedInto":[],"mixins":[],"parentMixins":[],"requires":[],"uses":[],"html":"

    Subclasses

    Files

    NOTE: This is a private utility class for internal use by the framework. Don't rely on its existence.

    Adds basic mixin support.

    \n
    Defined By

    Methods

    ( obj ) : Modulechainable
    Includes a mixin in the current scope ...

    Includes a mixin in the current scope

    \n

    Parameters

    • obj : Object

      the object to be mixed in

      \n

    Returns

    ","meta":{"private":true}}); \ No newline at end of file diff --git a/docs/api/output/Sprite.js b/docs/api/output/Sprite.js new file mode 100644 index 00000000..ce42836b --- /dev/null +++ b/docs/api/output/Sprite.js @@ -0,0 +1 @@ +Ext.data.JsonP.Sprite({"tagname":"class","name":"Sprite","autodetected":{},"files":[{"filename":"layout.js","href":"layout.html#Sprite"}],"private":true,"members":[],"alternateClassNames":[],"aliases":{},"id":"class-Sprite","component":false,"superclasses":[],"subclasses":[],"mixedInto":[],"mixins":[],"parentMixins":[],"requires":[],"uses":[],"html":"

    Files

    NOTE: This is a private utility class for internal use by the framework. Don't rely on its existence.

    Abstracts the underlying visual primitives (currently HTML) from dreem's view system.

    \n
    ","meta":{"private":true}}); \ No newline at end of file diff --git a/docs/api/output/dr.ace.js b/docs/api/output/dr.ace.js new file mode 100644 index 00000000..6a100065 --- /dev/null +++ b/docs/api/output/dr.ace.js @@ -0,0 +1 @@ +Ext.data.JsonP.dr_ace({"tagname":"class","name":"dr.ace","autodetected":{},"files":[{"filename":"classdocs.js","href":"classdocs.html#dr-ace"}],"extends":"dr.view","members":[{"name":"bgcolor","tagname":"attribute","owner":"dr.view","id":"attribute-bgcolor","meta":{}},{"name":"border","tagname":"attribute","owner":"dr.view","id":"attribute-border","meta":{}},{"name":"bordercolor","tagname":"attribute","owner":"dr.view","id":"attribute-bordercolor","meta":{}},{"name":"borderstyle","tagname":"attribute","owner":"dr.view","id":"attribute-borderstyle","meta":{}},{"name":"clickable","tagname":"attribute","owner":"dr.view","id":"attribute-clickable","meta":{}},{"name":"clip","tagname":"attribute","owner":"dr.view","id":"attribute-clip","meta":{}},{"name":"height","tagname":"attribute","owner":"dr.view","id":"attribute-height","meta":{}},{"name":"id","tagname":"attribute","owner":"dr.node","id":"attribute-id","meta":{}},{"name":"mode","tagname":"attribute","owner":"dr.ace","id":"attribute-mode","meta":{}},{"name":"name","tagname":"attribute","owner":"dr.node","id":"attribute-name","meta":{}},{"name":"padding","tagname":"attribute","owner":"dr.view","id":"attribute-padding","meta":{}},{"name":"pausedelay","tagname":"attribute","owner":"dr.ace","id":"attribute-pausedelay","meta":{}},{"name":"scriptincludes","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludes","meta":{}},{"name":"scriptincludeserror","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludeserror","meta":{}},{"name":"scrollable","tagname":"attribute","owner":"dr.view","id":"attribute-scrollable","meta":{}},{"name":"text","tagname":"attribute","owner":"dr.ace","id":"attribute-text","meta":{}},{"name":"theme","tagname":"attribute","owner":"dr.ace","id":"attribute-theme","meta":{}},{"name":"visible","tagname":"attribute","owner":"dr.view","id":"attribute-visible","meta":{}},{"name":"width","tagname":"attribute","owner":"dr.view","id":"attribute-width","meta":{}},{"name":"x","tagname":"attribute","owner":"dr.view","id":"attribute-x","meta":{}},{"name":"y","tagname":"attribute","owner":"dr.view","id":"attribute-y","meta":{}},{"name":"ignorelayout","tagname":"property","owner":"dr.view","id":"property-ignorelayout","meta":{}},{"name":"inited","tagname":"property","owner":"dr.node","id":"property-inited","meta":{"readonly":true}},{"name":"layouts","tagname":"property","owner":"dr.view","id":"property-layouts","meta":{"readonly":true}},{"name":"subnodes","tagname":"property","owner":"dr.node","id":"property-subnodes","meta":{"readonly":true}},{"name":"subviews","tagname":"property","owner":"dr.view","id":"property-subviews","meta":{"readonly":true}},{"name":"animate","tagname":"method","owner":"dr.view","id":"method-animate","meta":{"chainable":true}},{"name":"destroy","tagname":"method","owner":"dr.node","id":"method-destroy","meta":{}},{"name":"doLayoutAdded","tagname":"method","owner":"dr.view","id":"method-doLayoutAdded","meta":{}},{"name":"doLayoutRemoved","tagname":"method","owner":"dr.view","id":"method-doLayoutRemoved","meta":{}},{"name":"doSubnodeAdded","tagname":"method","owner":"dr.view","id":"method-doSubnodeAdded","meta":{}},{"name":"doSubnodeRemoved","tagname":"method","owner":"dr.view","id":"method-doSubnodeRemoved","meta":{}},{"name":"doSubviewAdded","tagname":"method","owner":"dr.view","id":"method-doSubviewAdded","meta":{}},{"name":"doSubviewRemoved","tagname":"method","owner":"dr.view","id":"method-doSubviewRemoved","meta":{}},{"name":"sendEvent","tagname":"method","owner":"Eventable","id":"method-sendEvent","meta":{"chainable":true}},{"name":"setAttribute","tagname":"method","owner":"Eventable","id":"method-setAttribute","meta":{"chainable":true}},{"name":"setAttributes","tagname":"method","owner":"Eventable","id":"method-setAttributes","meta":{"chainable":true}},{"name":"layoutAdded","tagname":"event","owner":"dr.view","id":"event-layoutAdded","meta":{}},{"name":"layoutRemoved","tagname":"event","owner":"dr.view","id":"event-layoutRemoved","meta":{}},{"name":"onclick","tagname":"event","owner":"dr.view","id":"event-onclick","meta":{}},{"name":"ondestroy","tagname":"event","owner":"dr.node","id":"event-ondestroy","meta":{}},{"name":"oninit","tagname":"event","owner":"dr.node","id":"event-oninit","meta":{}},{"name":"onlayouts","tagname":"event","owner":"dr.view","id":"event-onlayouts","meta":{}},{"name":"onmousedown","tagname":"event","owner":"dr.view","id":"event-onmousedown","meta":{}},{"name":"onmouseout","tagname":"event","owner":"dr.view","id":"event-onmouseout","meta":{}},{"name":"onmouseover","tagname":"event","owner":"dr.view","id":"event-onmouseover","meta":{}},{"name":"onmouseup","tagname":"event","owner":"dr.view","id":"event-onmouseup","meta":{}},{"name":"onpausedelay","tagname":"event","owner":"dr.ace","id":"event-onpausedelay","meta":{}},{"name":"onsubnodes","tagname":"event","owner":"dr.node","id":"event-onsubnodes","meta":{}},{"name":"onsubviews","tagname":"event","owner":"dr.view","id":"event-onsubviews","meta":{}},{"name":"ontext","tagname":"event","owner":"dr.ace","id":"event-ontext","meta":{}},{"name":"subnodeAdded","tagname":"event","owner":"dr.node","id":"event-subnodeAdded","meta":{}},{"name":"subnodeRemoved","tagname":"event","owner":"dr.node","id":"event-subnodeRemoved","meta":{}},{"name":"subviewAdded","tagname":"event","owner":"dr.view","id":"event-subviewAdded","meta":{}},{"name":"subviewRemoved","tagname":"event","owner":"dr.view","id":"event-subviewRemoved","meta":{}}],"alternateClassNames":[],"aliases":{},"id":"class-dr.ace","short_doc":"Ace editor component. ...","component":false,"superclasses":["Module","Eventable","dr.node","dr.view"],"subclasses":[],"mixedInto":[],"mixins":[],"parentMixins":[],"requires":[],"uses":[],"html":"

    Hierarchy

    Files

    Ace editor component.

    \n\n
    <ace id=\"editor\" width=\"500\" text='Hello World'></ace>\n
    \n\n

    The initial text can also be included inline, and include dreem code.

    \n\n
    <ace id=\"editor\" width=\"500\"><view width=\"100%\" height=\"100%\" bgcolor=\"thistle\"></view></ace>\n
    \n
    Defined By

    Attributes

    Sets this view's background color

    \n

    Sets this view's background color

    \n

    Sets this view's border width

    \n

    Sets this view's border width

    \n

    Sets this view's border color

    \n

    Sets this view's border color

    \n

    Sets this view's border style (can be any css border-style value)

    \n

    Sets this view's border style (can be any css border-style value)

    \n
    If true, this view recieves mouse events. ...

    If true, this view recieves mouse events. Automatically set to true when an onclick/mouse* event is registered for this view.

    \n

    Defaults to: false

    If true, this view clips to its bounds ...

    If true, this view clips to its bounds

    \n

    Defaults to: false

    This view's height ...

    This view's height

    \n

    Defaults to: 0

    Gives this node a global ID, which can be looked up in the global window object. ...

    Gives this node a global ID, which can be looked up in the global window object.\nTake care to not override builtin globals, or override your own instances!

    \n
    : string
    Specify the ace mode to use. ...

    Specify the ace mode to use.

    \n

    Defaults to: 'ace/mode/dr'

    Names this node in its parent scope so it can be referred to later.

    \n

    Names this node in its parent scope so it can be referred to later.

    \n

    Sets this view's padding

    \n

    Sets this view's padding

    \n
    : Number
    Time (msec) after user entry stops to fire onpausedelay event. ...

    Time (msec) after user entry stops to fire onpausedelay event.\n0 will disable this option.

    \n

    Defaults to: 500

    A comma separated list of URLs to javascript includes required as dependencies. ...

    A comma separated list of URLs to javascript includes required as dependencies. Useful if you need to ensure a third party library is available.

    \n

    An error to show if scriptincludes fail to load

    \n

    An error to show if scriptincludes fail to load

    \n
    If true, this view clips to its bounds and provides scrolling to see content that overflows the bounds ...

    If true, this view clips to its bounds and provides scrolling to see content that overflows the bounds

    \n

    Defaults to: false

    : String
    Initial text for the ace editor. ...

    Initial text for the ace editor.

    \n

    Defaults to: ""

    : string
    Specify the ace theme to use. ...

    Specify the ace theme to use.

    \n

    Defaults to: 'ace/theme/chrome'

    If false, this view is invisible ...

    If false, this view is invisible

    \n

    Defaults to: true

    This view's width ...

    This view's width

    \n

    Defaults to: 0

    This view's x position ...

    This view's x position

    \n

    Defaults to: 0

    This view's y position ...

    This view's y position

    \n

    Defaults to: 0

    Defined By

    Properties

    If true, layouts should ignore this view

    \n

    If true, layouts should ignore this view

    \n
    : Booleanreadonly

    True when this node and all its children are completely initialized

    \n

    True when this node and all its children are completely initialized

    \n
    An array of this views's layouts. ...

    An array of this views's layouts. Only defined when needed.

    \n
    An array of this node's child nodes ...

    An array of this node's child nodes

    \n

    Defaults to: []

    An array of this views's child views

    \n

    An array of this views's child views

    \n
    Defined By

    Methods

    ( obj, Number ) : dr.viewchainable
    Animates this view's attribute(s) ...

    Animates this view's attribute(s)

    \n

    Parameters

    • obj : Object

      A hash of attribute names and values to animate to

      \n
    • Number : Object

      duration The duration of the animation in milliseconds

      \n

    Returns

    Destroys this node ...

    Destroys this node

    \n
    Called when a layout is added to this view. ...

    Called when a layout is added to this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to add a layout. Instead call setParent.

    \n

    Parameters

    • layout : dr.layout

      The layout that was added.

      \n

    Returns

    • void
      \n
    Called when a layout is removed from this view. ...

    Called when a layout is removed from this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to remove a layout. Instead call _removeFromParent.

    \n

    Parameters

    • layout : dr.layout

      The layout that was removed.

      \n

    Returns

    • void
      \n
    Calls doSubviewAdded/doLayoutAdded if the added subnode is a view or\nlayout respectively. ...

    Calls doSubviewAdded/doLayoutAdded if the added subnode is a view or\nlayout respectively. Subclasses should call super.

    \n

    Parameters

    • node : Object

    Overrides: dr.node.doSubnodeAdded

    Calls doSubviewRemoved/doLayoutRemoved if the removed subnode is a view or\nlayout respectively. ...

    Calls doSubviewRemoved/doLayoutRemoved if the removed subnode is a view or\nlayout respectively. Subclasses should call super.

    \n

    Parameters

    • node : Object

    Overrides: dr.node.doSubnodeRemoved

    Called when a subview is added to this view. ...

    Called when a subview is added to this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to add a subview. Instead call setParent.

    \n

    Parameters

    • sv : dr.view

      The subview that was added.

      \n

    Returns

    • void
      \n
    Called when a subview is removed from this view. ...

    Called when a subview is removed from this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to remove a subview. Instead call _removeFromParent.

    \n

    Parameters

    • sv : dr.view

      The subview that was removed.

      \n

    Returns

    • void
      \n
    ( name, value ) : Eventablechainable
    Sends an event ...

    Sends an event

    \n

    Parameters

    • name : String

      the name of the event to send

      \n
    • value : Object

      the value to send with the event

      \n

    Returns

    Sets an attribute, calls a setter if there is one, then sends an event with the new value ...

    Sets an attribute, calls a setter if there is one, then sends an event with the new value

    \n

    Parameters

    • name : String

      the name of the attribute to set

      \n
    • value : Object

      the value to set to

      \n

    Returns

    Calls setAttribute for each name/value pair in the attributes object ...

    Calls setAttribute for each name/value pair in the attributes object

    \n

    Parameters

    • attributes : Object

      An object of name/value pairs to be set

      \n

    Returns

    Defined By

    Events

    Fired when a layout is added to this view. ...

    Fired when a layout is added to this view.

    \n

    Parameters

    Fired when a layout is removed from this view. ...

    Fired when a layout is removed from this view.

    \n

    Parameters

    Fired when this view is clicked ...

    Fired when this view is clicked

    \n

    Parameters

    Fired when this node and all its children are about to be destroyed ...

    Fired when this node and all its children are about to be destroyed

    \n

    Parameters

    Fired when this node and all its children are completely initialized ...

    Fired when this node and all its children are completely initialized

    \n

    Parameters

    Fired when this views's layouts array has changed ...

    Fired when this views's layouts array has changed

    \n

    Parameters

    Fired when the mouse goes down on this view ...

    Fired when the mouse goes down on this view

    \n

    Parameters

    Fired when the mouse moves off this view ...

    Fired when the mouse moves off this view

    \n

    Parameters

    Fired when the mouse moves over this view ...

    Fired when the mouse moves over this view

    \n

    Parameters

    Fired when the mouse goes up on this view ...

    Fired when the mouse goes up on this view

    \n

    Parameters

    Fired when user entries stops for a period of time. ...

    Fired when user entries stops for a period of time.

    \n

    Parameters

    Fired when this node's subnodes array has changed ...

    Fired when this node's subnodes array has changed

    \n

    Parameters

    Fired when this views's subviews array has changed ...

    Fired when this views's subviews array has changed

    \n

    Parameters

    ( view )
    Fired when the contents of the ace entry changes ...

    Fired when the contents of the ace entry changes

    \n

    Parameters

    Fired when a subnode is added to this node. ...

    Fired when a subnode is added to this node.

    \n

    Parameters

    Fired when a subnode is removed from this node. ...

    Fired when a subnode is removed from this node.

    \n

    Parameters

    Fired when a subview is added to this view. ...

    Fired when a subview is added to this view.

    \n

    Parameters

    Fired when a subview is removed from this view. ...

    Fired when a subview is removed from this view.

    \n

    Parameters

    ","meta":{}}); \ No newline at end of file diff --git a/docs/api/output/dr.alignlayout.js b/docs/api/output/dr.alignlayout.js new file mode 100644 index 00000000..043ba8eb --- /dev/null +++ b/docs/api/output/dr.alignlayout.js @@ -0,0 +1 @@ +Ext.data.JsonP.dr_alignlayout({"tagname":"class","name":"dr.alignlayout","autodetected":{},"files":[{"filename":"classdocs.js","href":"classdocs.html#dr-alignlayout"}],"extends":"dr.variablelayout","members":[{"name":"align","tagname":"attribute","owner":"dr.alignlayout","id":"attribute-align","meta":{}},{"name":"attribute","tagname":"attribute","owner":"dr.constantlayout","id":"attribute-attribute","meta":{}},{"name":"collapseparent","tagname":"attribute","owner":"dr.variablelayout","id":"attribute-collapseparent","meta":{}},{"name":"id","tagname":"attribute","owner":"dr.node","id":"attribute-id","meta":{}},{"name":"name","tagname":"attribute","owner":"dr.node","id":"attribute-name","meta":{}},{"name":"reverse","tagname":"attribute","owner":"dr.variablelayout","id":"attribute-reverse","meta":{}},{"name":"scriptincludes","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludes","meta":{}},{"name":"scriptincludeserror","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludeserror","meta":{}},{"name":"value","tagname":"attribute","owner":"dr.constantlayout","id":"attribute-value","meta":{}},{"name":"inited","tagname":"property","owner":"dr.node","id":"property-inited","meta":{"readonly":true}},{"name":"subnodes","tagname":"property","owner":"dr.node","id":"property-subnodes","meta":{"readonly":true}},{"name":"addSubview","tagname":"method","owner":"dr.layout","id":"method-addSubview","meta":{}},{"name":"canUpdate","tagname":"method","owner":"dr.layout","id":"method-canUpdate","meta":{}},{"name":"destroy","tagname":"method","owner":"dr.node","id":"method-destroy","meta":{}},{"name":"doAfterUpdate","tagname":"method","owner":"dr.variablelayout","id":"method-doAfterUpdate","meta":{}},{"name":"doBeforeUpdate","tagname":"method","owner":"dr.alignlayout","id":"method-doBeforeUpdate","meta":{}},{"name":"doSubnodeAdded","tagname":"method","owner":"dr.node","id":"method-doSubnodeAdded","meta":{}},{"name":"doSubnodeRemoved","tagname":"method","owner":"dr.node","id":"method-doSubnodeRemoved","meta":{}},{"name":"ignore","tagname":"method","owner":"dr.layout","id":"method-ignore","meta":{}},{"name":"removeSubview","tagname":"method","owner":"dr.layout","id":"method-removeSubview","meta":{}},{"name":"sendEvent","tagname":"method","owner":"Eventable","id":"method-sendEvent","meta":{"chainable":true}},{"name":"setAttribute","tagname":"method","owner":"Eventable","id":"method-setAttribute","meta":{"chainable":true}},{"name":"setAttributes","tagname":"method","owner":"Eventable","id":"method-setAttributes","meta":{"chainable":true}},{"name":"skipSubview","tagname":"method","owner":"dr.variablelayout","id":"method-skipSubview","meta":{}},{"name":"startMonitoringAllSubviews","tagname":"method","owner":"dr.layout","id":"method-startMonitoringAllSubviews","meta":{}},{"name":"startMonitoringSubview","tagname":"method","owner":"dr.variablelayout","id":"method-startMonitoringSubview","meta":{}},{"name":"stopMonitoringAllSubviews","tagname":"method","owner":"dr.layout","id":"method-stopMonitoringAllSubviews","meta":{}},{"name":"stopMonitoringSubview","tagname":"method","owner":"dr.variablelayout","id":"method-stopMonitoringSubview","meta":{}},{"name":"update","tagname":"method","owner":"dr.layout","id":"method-update","meta":{}},{"name":"updateParent","tagname":"method","owner":"dr.variablelayout","id":"method-updateParent","meta":{}},{"name":"updateSubview","tagname":"method","owner":"dr.variablelayout","id":"method-updateSubview","meta":{}},{"name":"ondestroy","tagname":"event","owner":"dr.node","id":"event-ondestroy","meta":{}},{"name":"oninit","tagname":"event","owner":"dr.node","id":"event-oninit","meta":{}},{"name":"onsubnodes","tagname":"event","owner":"dr.node","id":"event-onsubnodes","meta":{}},{"name":"subnodeAdded","tagname":"event","owner":"dr.node","id":"event-subnodeAdded","meta":{}},{"name":"subnodeRemoved","tagname":"event","owner":"dr.node","id":"event-subnodeRemoved","meta":{}}],"alternateClassNames":[],"aliases":{},"id":"class-dr.alignlayout","short_doc":"A variablelayout that aligns each view vertically or horizontally\nrelative to all the other views. ...","component":false,"superclasses":["Module","Eventable","dr.node","dr.layout","dr.constantlayout","dr.variablelayout"],"subclasses":[],"mixedInto":[],"mixins":[],"parentMixins":[],"requires":[],"uses":[],"html":"

    Hierarchy

    Files

    A variablelayout that aligns each view vertically or horizontally\nrelative to all the other views.

    \n\n
    <alignlayout align=\"middle\" collapseparent=\"true\">\n</alignlayout>\n\n<view width=\"100\" height=\"35\" bgcolor=\"plum\"></view>\n<view width=\"100\" height=\"25\" bgcolor=\"lightpink\"></view>\n<view width=\"100\" height=\"15\" bgcolor=\"lightblue\"></view>\n
    \n
    Defined By

    Attributes

    dr.alignlayout
    view source
    : String
    Determines which way the views are aligned. ...

    Determines which way the views are aligned. Supported values are\n'left', 'center', 'right' and 'top', 'middle' and 'bottom'.

    \n

    Defaults to: 'middle'

    The name of the attribute to update on each subview. ...

    The name of the attribute to update on each subview.

    \n

    Defaults to: x

    If true the updateParent method will be called. ...

    If true the updateParent method will be called. The updateParent method\nwill typically resize the parent to fit the newly layed out child views.

    \n

    Defaults to: false

    Gives this node a global ID, which can be looked up in the global window object. ...

    Gives this node a global ID, which can be looked up in the global window object.\nTake care to not override builtin globals, or override your own instances!

    \n

    Names this node in its parent scope so it can be referred to later.

    \n

    Names this node in its parent scope so it can be referred to later.

    \n
    If true the layout will position the items in the opposite order. ...

    If true the layout will position the items in the opposite order. For\nexample, right to left instead of left to right.

    \n

    Defaults to: false

    A comma separated list of URLs to javascript includes required as dependencies. ...

    A comma separated list of URLs to javascript includes required as dependencies. Useful if you need to ensure a third party library is available.

    \n

    An error to show if scriptincludes fail to load

    \n

    An error to show if scriptincludes fail to load

    \n
    The value to set the attribute to. ...

    The value to set the attribute to.

    \n

    Defaults to: 0

    Defined By

    Properties

    : Booleanreadonly

    True when this node and all its children are completely initialized

    \n

    True when this node and all its children are completely initialized

    \n
    An array of this node's child nodes ...

    An array of this node's child nodes

    \n

    Defaults to: []

    Defined By

    Methods

    Adds the provided view to the subviews array of this layout. ...

    Adds the provided view to the subviews array of this layout.

    \n

    Parameters

    • view : dr.view

      The view to add to this layout.

      \n

    Returns

    • void
      \n
    Checks if the layout is locked or not. ...

    Checks if the layout is locked or not. Should be called by the\n\"update\" method of each layout to check if it is OK to do the update.

    \n

    Returns

    • boolean

      true if not locked, false otherwise.

      \n
    Destroys this node ...

    Destroys this node

    \n
    Called by update after any processing is done but before the optional\ncollapsing of parent is done. ...

    Called by update after any processing is done but before the optional\ncollapsing of parent is done. Gives subviews a chance to do any\nspecial teardown after update is processed.

    \n

    Returns

    • void
      \n
    dr.alignlayout
    view source
    ( )
    Determine the maximum subview width/height according to the alignment. ...

    Determine the maximum subview width/height according to the alignment.

    \n

    Overrides: dr.variablelayout.doBeforeUpdate

    Called when a subnode is added to this node. ...

    Called when a subnode is added to this node. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to add a subnode. Instead call setParent.

    \n

    Parameters

    • node : dr.node

      The subnode that was added.

      \n

    Returns

    • void
      \n
    Called when a subnode is removed from this node. ...

    Called when a subnode is removed from this node. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to remove a subnode. Instead call _removeFromParent.

    \n

    Parameters

    • node : dr.node

      The subnode that was removed.

      \n

    Returns

    • void
      \n
    ( view ) : boolean
    Checks if a subview can be added to this Layout or not. ...

    Checks if a subview can be added to this Layout or not. The default\nimplementation returns the 'ignorelayout' attributes of the subview.

    \n

    Parameters

    Returns

    • boolean

      True means the subview will be skipped, false otherwise.

      \n
    Removes the provided View from the subviews array of this Layout. ...

    Removes the provided View from the subviews array of this Layout.

    \n

    Parameters

    • view : dr.view

      The view to remove from this layout.

      \n

    Returns

    • number

      the index of the removed subview or -1 if not removed.

      \n
    ( name, value ) : Eventablechainable
    Sends an event ...

    Sends an event

    \n

    Parameters

    • name : String

      the name of the event to send

      \n
    • value : Object

      the value to send with the event

      \n

    Returns

    Sets an attribute, calls a setter if there is one, then sends an event with the new value ...

    Sets an attribute, calls a setter if there is one, then sends an event with the new value

    \n

    Parameters

    • name : String

      the name of the attribute to set

      \n
    • value : Object

      the value to set to

      \n

    Returns

    Calls setAttribute for each name/value pair in the attributes object ...

    Calls setAttribute for each name/value pair in the attributes object

    \n

    Parameters

    • attributes : Object

      An object of name/value pairs to be set

      \n

    Returns

    Called for each subview in the layout to determine if the view should\nbe updated or not. ...

    Called for each subview in the layout to determine if the view should\nbe updated or not. The default implementation returns true if the\nsubview is not visible.

    \n

    Parameters

    • view : dr.view

      The subview to check.

      \n

    Returns

    • Boolean

      True if the subview should be skipped during\n layout updates.

      \n
    Calls startMonitoringSubview for all views. ...

    Calls startMonitoringSubview for all views. Used by layout\nimplementations when a change occurs to the layout that requires\nrefreshing all the subview monitoring.

    \n

    Returns

    • void
      \n
    Provides a default implementation that calls update when the\nvisibility of a subview changes. ...

    Provides a default implementation that calls update when the\nvisibility of a subview changes.

    \n

    Parameters

    Overrides: dr.layout.startMonitoringSubview

    Calls stopMonitoringSubview for all views. ...

    Calls stopMonitoringSubview for all views. Used by Layout\nimplementations when a change occurs to the layout that requires\nrefreshing all the subview monitoring.

    \n

    Returns

    • void
      \n
    Provides a default implementation that calls update when the\nvisibility of a subview changes. ...

    Provides a default implementation that calls update when the\nvisibility of a subview changes.

    \n

    Parameters

    Overrides: dr.layout.stopMonitoringSubview

    Updates the layout. ...

    Updates the layout. Subclasses should call canUpdate to check lock state\nbefore doing anything.

    \n

    Returns

    • void
      \n
    ( attribute, value ) : void
    Called if the collapseparent attribute is true. ...

    Called if the collapseparent attribute is true. Subclasses should\nimplement this if they want to modify the parent view.

    \n

    Parameters

    • attribute : String

      The name of the attribute to update.

      \n
    • value : *

      The value to set on the parent.

      \n

    Returns

    • void
      \n
    ( count, view, attribute, value ) : *
    Called for each subview in the layout. ...

    Called for each subview in the layout.

    \n

    Parameters

    • count : Number

      The number of subviews that have been layed out\n including the current one. i.e. count will be 1 for the first\n subview layed out.

      \n
    • view : dr.view

      The subview being layed out.

      \n
    • attribute : String

      The name of the attribute to update.

      \n
    • value : *

      The value to set on the subview.

      \n

    Returns

    • *

      The value to use for the next subview.

      \n
    Defined By

    Events

    Fired when this node and all its children are about to be destroyed ...

    Fired when this node and all its children are about to be destroyed

    \n

    Parameters

    Fired when this node and all its children are completely initialized ...

    Fired when this node and all its children are completely initialized

    \n

    Parameters

    Fired when this node's subnodes array has changed ...

    Fired when this node's subnodes array has changed

    \n

    Parameters

    Fired when a subnode is added to this node. ...

    Fired when a subnode is added to this node.

    \n

    Parameters

    Fired when a subnode is removed from this node. ...

    Fired when a subnode is removed from this node.

    \n

    Parameters

    ","meta":{}}); \ No newline at end of file diff --git a/docs/api/output/dr.art.js b/docs/api/output/dr.art.js new file mode 100644 index 00000000..9ff3fd5e --- /dev/null +++ b/docs/api/output/dr.art.js @@ -0,0 +1 @@ +Ext.data.JsonP.dr_art({"tagname":"class","name":"dr.art","autodetected":{},"files":[{"filename":"classdocs.js","href":"classdocs.html#dr-art"}],"extends":"dr.view","members":[{"name":"animationcurve","tagname":"attribute","owner":"dr.art","id":"attribute-animationcurve","meta":{}},{"name":"animationspeed","tagname":"attribute","owner":"dr.art","id":"attribute-animationspeed","meta":{}},{"name":"bgcolor","tagname":"attribute","owner":"dr.view","id":"attribute-bgcolor","meta":{}},{"name":"border","tagname":"attribute","owner":"dr.view","id":"attribute-border","meta":{}},{"name":"bordercolor","tagname":"attribute","owner":"dr.view","id":"attribute-bordercolor","meta":{}},{"name":"borderstyle","tagname":"attribute","owner":"dr.view","id":"attribute-borderstyle","meta":{}},{"name":"clickable","tagname":"attribute","owner":"dr.view","id":"attribute-clickable","meta":{}},{"name":"clip","tagname":"attribute","owner":"dr.view","id":"attribute-clip","meta":{}},{"name":"height","tagname":"attribute","owner":"dr.view","id":"attribute-height","meta":{}},{"name":"id","tagname":"attribute","owner":"dr.node","id":"attribute-id","meta":{}},{"name":"inline","tagname":"attribute","owner":"dr.art","id":"attribute-inline","meta":{}},{"name":"name","tagname":"attribute","owner":"dr.node","id":"attribute-name","meta":{}},{"name":"padding","tagname":"attribute","owner":"dr.view","id":"attribute-padding","meta":{}},{"name":"path","tagname":"attribute","owner":"dr.art","id":"attribute-path","meta":{}},{"name":"scriptincludes","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludes","meta":{}},{"name":"scriptincludeserror","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludeserror","meta":{}},{"name":"scrollable","tagname":"attribute","owner":"dr.view","id":"attribute-scrollable","meta":{}},{"name":"src","tagname":"attribute","owner":"dr.art","id":"attribute-src","meta":{}},{"name":"stretches","tagname":"attribute","owner":"dr.art","id":"attribute-stretches","meta":{}},{"name":"visible","tagname":"attribute","owner":"dr.view","id":"attribute-visible","meta":{}},{"name":"width","tagname":"attribute","owner":"dr.view","id":"attribute-width","meta":{}},{"name":"x","tagname":"attribute","owner":"dr.view","id":"attribute-x","meta":{}},{"name":"y","tagname":"attribute","owner":"dr.view","id":"attribute-y","meta":{}},{"name":"ignorelayout","tagname":"property","owner":"dr.view","id":"property-ignorelayout","meta":{}},{"name":"inited","tagname":"property","owner":"dr.node","id":"property-inited","meta":{"readonly":true}},{"name":"layouts","tagname":"property","owner":"dr.view","id":"property-layouts","meta":{"readonly":true}},{"name":"subnodes","tagname":"property","owner":"dr.node","id":"property-subnodes","meta":{"readonly":true}},{"name":"subviews","tagname":"property","owner":"dr.view","id":"property-subviews","meta":{"readonly":true}},{"name":"animate","tagname":"method","owner":"dr.view","id":"method-animate","meta":{"chainable":true}},{"name":"destroy","tagname":"method","owner":"dr.node","id":"method-destroy","meta":{}},{"name":"doLayoutAdded","tagname":"method","owner":"dr.view","id":"method-doLayoutAdded","meta":{}},{"name":"doLayoutRemoved","tagname":"method","owner":"dr.view","id":"method-doLayoutRemoved","meta":{}},{"name":"doSubnodeAdded","tagname":"method","owner":"dr.view","id":"method-doSubnodeAdded","meta":{}},{"name":"doSubnodeRemoved","tagname":"method","owner":"dr.view","id":"method-doSubnodeRemoved","meta":{}},{"name":"doSubviewAdded","tagname":"method","owner":"dr.view","id":"method-doSubviewAdded","meta":{}},{"name":"doSubviewRemoved","tagname":"method","owner":"dr.view","id":"method-doSubviewRemoved","meta":{}},{"name":"sendEvent","tagname":"method","owner":"Eventable","id":"method-sendEvent","meta":{"chainable":true}},{"name":"setAttribute","tagname":"method","owner":"Eventable","id":"method-setAttribute","meta":{"chainable":true}},{"name":"setAttributes","tagname":"method","owner":"Eventable","id":"method-setAttributes","meta":{"chainable":true}},{"name":"layoutAdded","tagname":"event","owner":"dr.view","id":"event-layoutAdded","meta":{}},{"name":"layoutRemoved","tagname":"event","owner":"dr.view","id":"event-layoutRemoved","meta":{}},{"name":"onclick","tagname":"event","owner":"dr.view","id":"event-onclick","meta":{}},{"name":"ondestroy","tagname":"event","owner":"dr.node","id":"event-ondestroy","meta":{}},{"name":"oninit","tagname":"event","owner":"dr.node","id":"event-oninit","meta":{}},{"name":"onlayouts","tagname":"event","owner":"dr.view","id":"event-onlayouts","meta":{}},{"name":"onmousedown","tagname":"event","owner":"dr.view","id":"event-onmousedown","meta":{}},{"name":"onmouseout","tagname":"event","owner":"dr.view","id":"event-onmouseout","meta":{}},{"name":"onmouseover","tagname":"event","owner":"dr.view","id":"event-onmouseover","meta":{}},{"name":"onmouseup","tagname":"event","owner":"dr.view","id":"event-onmouseup","meta":{}},{"name":"onready","tagname":"event","owner":"dr.art","id":"event-onready","meta":{}},{"name":"onsubnodes","tagname":"event","owner":"dr.node","id":"event-onsubnodes","meta":{}},{"name":"onsubviews","tagname":"event","owner":"dr.view","id":"event-onsubviews","meta":{}},{"name":"ontween","tagname":"event","owner":"dr.art","id":"event-ontween","meta":{}},{"name":"subnodeAdded","tagname":"event","owner":"dr.node","id":"event-subnodeAdded","meta":{}},{"name":"subnodeRemoved","tagname":"event","owner":"dr.node","id":"event-subnodeRemoved","meta":{}},{"name":"subviewAdded","tagname":"event","owner":"dr.view","id":"event-subviewAdded","meta":{}},{"name":"subviewRemoved","tagname":"event","owner":"dr.view","id":"event-subviewRemoved","meta":{}}],"alternateClassNames":[],"aliases":{},"id":"class-dr.art","short_doc":"Vector graphics support using svg. ...","component":false,"superclasses":["Module","Eventable","dr.node","dr.view"],"subclasses":[],"mixedInto":[],"mixins":[],"parentMixins":[],"requires":[],"uses":[],"html":"

    Hierarchy

    Files

    Vector graphics support using svg.

    \n\n

    This example shows how to load an existing svg

    \n\n
    <art width=\"100\" height=\"100\" src=\"/images/siemens-clock.svg\"></art>\n
    \n\n

    Paths within an svg can be selected using the path attribute

    \n\n
    <art width=\"100\" height=\"100\" src=\"/images/cursorshapes.svg\" path=\"0\"></art>\n
    \n\n

    Attributes are automatically passed through to the SVG. Here, the fill color is changed

    \n\n
    <art width=\"100\" height=\"100\" src=\"/images/cursorshapes.svg\" path=\"0\" fill=\"coral\"></art>\n
    \n\n

    Setting the path attribute animates between paths. This example animates when the mouse is clicked

    \n\n
    <art width=\"100\" height=\"100\" src=\"/images/cursorshapes.svg\" path=\"0\" fill=\"coral\">\n  <handler event=\"onclick\">\n    this.setAttribute('path', this.path ^ 1);\n  </handler>\n</art>\n
    \n\n

    By default, the SVG's aspect ratio is preserved. Set the stretches attribute to true to change this behavior.

    \n\n
    <art width=\"200\" height=\"100\" src=\"/images/cursorshapes.svg\" path=\"0\" fill=\"coral\" stretches=\"true\">\n  <handler event=\"onclick\">\n    this.setAttribute('path', this.path ^ 1);\n    this.animate({width: (this.width == 200 ? 100 : 200)});\n  </handler>\n</art>\n
    \n
    Defined By

    Attributes

    : \"linear\"/\"easeout\"/\"easein\"/\"easeinout\"/\"backin\"/\"backout\"/\"elastic\"/\"bounce\"
    The name of the curve to use when animating between paths ...

    The name of the curve to use when animating between paths

    \n

    Defaults to: "linear"

    The number of milliseconds to use when animating between paths ...

    The number of milliseconds to use when animating between paths

    \n

    Defaults to: 400

    Sets this view's background color

    \n

    Sets this view's background color

    \n

    Sets this view's border width

    \n

    Sets this view's border width

    \n

    Sets this view's border color

    \n

    Sets this view's border color

    \n

    Sets this view's border style (can be any css border-style value)

    \n

    Sets this view's border style (can be any css border-style value)

    \n
    If true, this view recieves mouse events. ...

    If true, this view recieves mouse events. Automatically set to true when an onclick/mouse* event is registered for this view.

    \n

    Defaults to: false

    If true, this view clips to its bounds ...

    If true, this view clips to its bounds

    \n

    Defaults to: false

    This view's height ...

    This view's height

    \n

    Defaults to: 0

    Gives this node a global ID, which can be looked up in the global window object. ...

    Gives this node a global ID, which can be looked up in the global window object.\nTake care to not override builtin globals, or override your own instances!

    \n
    : Boolean
    Set to true if the svg contents is found inline, as a comment ...

    Set to true if the svg contents is found inline, as a comment

    \n

    Defaults to: false

    Names this node in its parent scope so it can be referred to later.

    \n

    Names this node in its parent scope so it can be referred to later.

    \n

    Sets this view's padding

    \n

    Sets this view's padding

    \n
    : String|Number
    The svg path element to display. ...

    The svg path element to display. Can either be the name of the <g> element containing the path or a 0-based index.

    \n
    A comma separated list of URLs to javascript includes required as dependencies. ...

    A comma separated list of URLs to javascript includes required as dependencies. Useful if you need to ensure a third party library is available.

    \n

    An error to show if scriptincludes fail to load

    \n

    An error to show if scriptincludes fail to load

    \n
    If true, this view clips to its bounds and provides scrolling to see content that overflows the bounds ...

    If true, this view clips to its bounds and provides scrolling to see content that overflows the bounds

    \n

    Defaults to: false

    : String

    The svg contents to load

    \n

    The svg contents to load

    \n
    : Boolean

    [stretches=false]\nSet to true to stretch the svg to fill the view.

    \n

    [stretches=false]\nSet to true to stretch the svg to fill the view.

    \n
    If false, this view is invisible ...

    If false, this view is invisible

    \n

    Defaults to: true

    This view's width ...

    This view's width

    \n

    Defaults to: 0

    This view's x position ...

    This view's x position

    \n

    Defaults to: 0

    This view's y position ...

    This view's y position

    \n

    Defaults to: 0

    Defined By

    Properties

    If true, layouts should ignore this view

    \n

    If true, layouts should ignore this view

    \n
    : Booleanreadonly

    True when this node and all its children are completely initialized

    \n

    True when this node and all its children are completely initialized

    \n
    An array of this views's layouts. ...

    An array of this views's layouts. Only defined when needed.

    \n
    An array of this node's child nodes ...

    An array of this node's child nodes

    \n

    Defaults to: []

    An array of this views's child views

    \n

    An array of this views's child views

    \n
    Defined By

    Methods

    ( obj, Number ) : dr.viewchainable
    Animates this view's attribute(s) ...

    Animates this view's attribute(s)

    \n

    Parameters

    • obj : Object

      A hash of attribute names and values to animate to

      \n
    • Number : Object

      duration The duration of the animation in milliseconds

      \n

    Returns

    Destroys this node ...

    Destroys this node

    \n
    Called when a layout is added to this view. ...

    Called when a layout is added to this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to add a layout. Instead call setParent.

    \n

    Parameters

    • layout : dr.layout

      The layout that was added.

      \n

    Returns

    • void
      \n
    Called when a layout is removed from this view. ...

    Called when a layout is removed from this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to remove a layout. Instead call _removeFromParent.

    \n

    Parameters

    • layout : dr.layout

      The layout that was removed.

      \n

    Returns

    • void
      \n
    Calls doSubviewAdded/doLayoutAdded if the added subnode is a view or\nlayout respectively. ...

    Calls doSubviewAdded/doLayoutAdded if the added subnode is a view or\nlayout respectively. Subclasses should call super.

    \n

    Parameters

    • node : Object

    Overrides: dr.node.doSubnodeAdded

    Calls doSubviewRemoved/doLayoutRemoved if the removed subnode is a view or\nlayout respectively. ...

    Calls doSubviewRemoved/doLayoutRemoved if the removed subnode is a view or\nlayout respectively. Subclasses should call super.

    \n

    Parameters

    • node : Object

    Overrides: dr.node.doSubnodeRemoved

    Called when a subview is added to this view. ...

    Called when a subview is added to this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to add a subview. Instead call setParent.

    \n

    Parameters

    • sv : dr.view

      The subview that was added.

      \n

    Returns

    • void
      \n
    Called when a subview is removed from this view. ...

    Called when a subview is removed from this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to remove a subview. Instead call _removeFromParent.

    \n

    Parameters

    • sv : dr.view

      The subview that was removed.

      \n

    Returns

    • void
      \n
    ( name, value ) : Eventablechainable
    Sends an event ...

    Sends an event

    \n

    Parameters

    • name : String

      the name of the event to send

      \n
    • value : Object

      the value to send with the event

      \n

    Returns

    Sets an attribute, calls a setter if there is one, then sends an event with the new value ...

    Sets an attribute, calls a setter if there is one, then sends an event with the new value

    \n

    Parameters

    • name : String

      the name of the attribute to set

      \n
    • value : Object

      the value to set to

      \n

    Returns

    Calls setAttribute for each name/value pair in the attributes object ...

    Calls setAttribute for each name/value pair in the attributes object

    \n

    Parameters

    • attributes : Object

      An object of name/value pairs to be set

      \n

    Returns

    Defined By

    Events

    Fired when a layout is added to this view. ...

    Fired when a layout is added to this view.

    \n

    Parameters

    Fired when a layout is removed from this view. ...

    Fired when a layout is removed from this view.

    \n

    Parameters

    Fired when this view is clicked ...

    Fired when this view is clicked

    \n

    Parameters

    Fired when this node and all its children are about to be destroyed ...

    Fired when this node and all its children are about to be destroyed

    \n

    Parameters

    Fired when this node and all its children are completely initialized ...

    Fired when this node and all its children are completely initialized

    \n

    Parameters

    Fired when this views's layouts array has changed ...

    Fired when this views's layouts array has changed

    \n

    Parameters

    Fired when the mouse goes down on this view ...

    Fired when the mouse goes down on this view

    \n

    Parameters

    Fired when the mouse moves off this view ...

    Fired when the mouse moves off this view

    \n

    Parameters

    Fired when the mouse moves over this view ...

    Fired when the mouse moves over this view

    \n

    Parameters

    Fired when the mouse goes up on this view ...

    Fired when the mouse goes up on this view

    \n

    Parameters

    Fired when the art is loaded and ready ...

    Fired when the art is loaded and ready

    \n
    Fired when this node's subnodes array has changed ...

    Fired when this node's subnodes array has changed

    \n

    Parameters

    Fired when this views's subviews array has changed ...

    Fired when this views's subviews array has changed

    \n

    Parameters

    Fired when the art has animated its path to the next position ...

    Fired when the art has animated its path to the next position

    \n
    Fired when a subnode is added to this node. ...

    Fired when a subnode is added to this node.

    \n

    Parameters

    Fired when a subnode is removed from this node. ...

    Fired when a subnode is removed from this node.

    \n

    Parameters

    Fired when a subview is added to this view. ...

    Fired when a subview is added to this view.

    \n

    Parameters

    Fired when a subview is removed from this view. ...

    Fired when a subview is removed from this view.

    \n

    Parameters

    ","meta":{}}); \ No newline at end of file diff --git a/docs/api/output/dr.attribute.js b/docs/api/output/dr.attribute.js new file mode 100644 index 00000000..c49d0667 --- /dev/null +++ b/docs/api/output/dr.attribute.js @@ -0,0 +1 @@ +Ext.data.JsonP.dr_attribute({"tagname":"class","name":"dr.attribute","autodetected":{},"files":[{"filename":"layout.js","href":"layout.html#dr-attribute"}],"members":[{"name":"name","tagname":"attribute","owner":"dr.attribute","id":"attribute-name","meta":{"required":true}},{"name":"type","tagname":"attribute","owner":"dr.attribute","id":"attribute-type","meta":{"required":true}},{"name":"value","tagname":"attribute","owner":"dr.attribute","id":"attribute-value","meta":{"required":true}},{"name":"visible","tagname":"attribute","owner":"dr.attribute","id":"attribute-visible","meta":{}}],"alternateClassNames":[],"aliases":{},"id":"class-dr.attribute","short_doc":"Adds a variable to a node, view, class or other class instance. ...","component":false,"superclasses":[],"subclasses":[],"mixedInto":[],"mixins":[],"parentMixins":[],"requires":[],"uses":[],"html":"

    Files

    Adds a variable to a node, view, class or other class instance. Attributes can only be created with the <attribute></attribute> tag syntax.

    \n\n

    Attributes allow classes to declare new variables with a specific type and default value.

    \n\n

    Attributes automatically send events when their value changes.

    \n\n

    Here we create a new class with a custom attribute representing a person's mood, along with two instances. One instance has the default mood of 'happy', the other sets the mood attribute to 'sad'. Note there's nothing visible in this example yet:

    \n\n
    <class name=\"person\">\n  <attribute name=\"mood\" type=\"string\" value=\"happy\"></attribute>\n</class>\n\n<person></person>\n<person mood=\"sad\"></person>\n
    \n\n

    Let's had a handler to make our color change with the mood. Whenever the mood attribute changes, the color changes with it:

    \n\n
    <class name=\"person\" width=\"100\" height=\"100\">\n  <attribute name=\"mood\" type=\"string\" value=\"happy\"></attribute>\n  <handler event=\"onmood\" args=\"mood\">\n    var color = 'orange';\n    if (mood !== 'happy') {\n      color = 'blue'\n    }\n    this.setAttribute('bgcolor', color);\n  </handler>\n</class>\n\n<spacedlayout></spacedlayout>\n<person></person>\n<person mood=\"sad\"></person>\n
    \n\n

    You can add as many attributes as you like to a class. Here, we add a numeric attribute for size, which changes the height and width attributes via a constraint:

    \n\n
    <class name=\"person\" width=\"${this.size}\" height=\"${this.size}\">\n  <attribute name=\"mood\" type=\"string\" value=\"happy\"></attribute>\n  <handler event=\"onmood\" args=\"mood\">\n    var color = 'orange';\n    if (mood !== 'happy') {\n      color = 'blue'\n    }\n    this.setAttribute('bgcolor', color);\n  </handler>\n  <attribute name=\"size\" type=\"number\" value=\"20\"></attribute>\n</class>\n\n<spacedlayout></spacedlayout>\n<person></person>\n<person mood=\"sad\" size=\"50\"></person>\n
    \n

    Attributes

    Defined By

    Required attributes

    dr.attribute
    view source
    : Stringrequired

    The name of the attribute

    \n

    The name of the attribute

    \n
    dr.attribute
    view source
    : \"string\"/\"number\"/\"boolean\"/\"json\"required
    The type of the attribute. ...

    The type of the attribute. Used to convert from a string to an appropriate representation of the type.

    \n

    Defaults to: string

    dr.attribute
    view source
    : Stringrequired

    The initial value for the attribute

    \n

    The initial value for the attribute

    \n
    Defined By

    Optional attributes

    dr.attribute
    view source
    : Boolean
    Set to false if an attribute shouldn't affect a view's visual appearence ...

    Set to false if an attribute shouldn't affect a view's visual appearence

    \n

    Defaults to: true

    ","meta":{}}); \ No newline at end of file diff --git a/docs/api/output/dr.audioplayer.js b/docs/api/output/dr.audioplayer.js new file mode 100644 index 00000000..ef60b9d5 --- /dev/null +++ b/docs/api/output/dr.audioplayer.js @@ -0,0 +1 @@ +Ext.data.JsonP.dr_audioplayer({"tagname":"class","name":"dr.audioplayer","autodetected":{},"files":[{"filename":"classdocs.js","href":"classdocs.html#dr-audioplayer"}],"extends":"dr.node","members":[{"name":"duration","tagname":"attribute","owner":"dr.audioplayer","id":"attribute-duration","meta":{"readonly":true}},{"name":"fft","tagname":"attribute","owner":"dr.audioplayer","id":"attribute-fft","meta":{"readonly":true}},{"name":"fftsize","tagname":"attribute","owner":"dr.audioplayer","id":"attribute-fftsize","meta":{}},{"name":"fftsmoothing","tagname":"attribute","owner":"dr.audioplayer","id":"attribute-fftsmoothing","meta":{}},{"name":"id","tagname":"attribute","owner":"dr.node","id":"attribute-id","meta":{}},{"name":"loaded","tagname":"attribute","owner":"dr.audioplayer","id":"attribute-loaded","meta":{"readonly":true}},{"name":"loadprogress","tagname":"attribute","owner":"dr.audioplayer","id":"attribute-loadprogress","meta":{"readonly":true}},{"name":"loop","tagname":"attribute","owner":"dr.audioplayer","id":"attribute-loop","meta":{}},{"name":"name","tagname":"attribute","owner":"dr.node","id":"attribute-name","meta":{}},{"name":"paused","tagname":"attribute","owner":"dr.audioplayer","id":"attribute-paused","meta":{}},{"name":"playing","tagname":"attribute","owner":"dr.audioplayer","id":"attribute-playing","meta":{}},{"name":"scriptincludes","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludes","meta":{}},{"name":"scriptincludeserror","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludeserror","meta":{}},{"name":"time","tagname":"attribute","owner":"dr.audioplayer","id":"attribute-time","meta":{"readonly":true}},{"name":"url","tagname":"attribute","owner":"dr.audioplayer","id":"attribute-url","meta":{}},{"name":"inited","tagname":"property","owner":"dr.node","id":"property-inited","meta":{"readonly":true}},{"name":"subnodes","tagname":"property","owner":"dr.node","id":"property-subnodes","meta":{"readonly":true}},{"name":"destroy","tagname":"method","owner":"dr.node","id":"method-destroy","meta":{}},{"name":"doSubnodeAdded","tagname":"method","owner":"dr.node","id":"method-doSubnodeAdded","meta":{}},{"name":"doSubnodeRemoved","tagname":"method","owner":"dr.node","id":"method-doSubnodeRemoved","meta":{}},{"name":"sendEvent","tagname":"method","owner":"Eventable","id":"method-sendEvent","meta":{"chainable":true}},{"name":"setAttribute","tagname":"method","owner":"Eventable","id":"method-setAttribute","meta":{"chainable":true}},{"name":"setAttributes","tagname":"method","owner":"Eventable","id":"method-setAttributes","meta":{"chainable":true}},{"name":"ondestroy","tagname":"event","owner":"dr.node","id":"event-ondestroy","meta":{}},{"name":"oninit","tagname":"event","owner":"dr.node","id":"event-oninit","meta":{}},{"name":"onsubnodes","tagname":"event","owner":"dr.node","id":"event-onsubnodes","meta":{}},{"name":"subnodeAdded","tagname":"event","owner":"dr.node","id":"event-subnodeAdded","meta":{}},{"name":"subnodeRemoved","tagname":"event","owner":"dr.node","id":"event-subnodeRemoved","meta":{}}],"alternateClassNames":[],"aliases":{},"id":"class-dr.audioplayer","short_doc":"audioplayer wraps the web audio APIs to provide a declarative interface to play audio. ...","component":false,"superclasses":["Module","Eventable","dr.node"],"subclasses":[],"mixedInto":[],"mixins":[],"parentMixins":[],"requires":[],"uses":[],"html":"

    Hierarchy

    Files

    audioplayer wraps the web audio APIs to provide a declarative interface to play audio.

    \n\n

    This example shows how to load and play an mp3 audio file from the server:

    \n\n
    <audioplayer url=\"/music/YACHT_-_09_-_Im_In_Love_With_A_Ripper_Party_Mix_Instrumental.mp3\" playing=\"true\"></audioplayer>\n
    \n
    Defined By

    Attributes

    dr.audioplayer
    view source
    : Numberreadonly

    The duration in seconds.

    \n

    The duration in seconds.

    \n
    dr.audioplayer
    view source
    : Number[]readonly

    An array of numbers representing the FFT analysis of the audio as it's playing.

    \n

    An array of numbers representing the FFT analysis of the audio as it's playing.

    \n
    dr.audioplayer
    view source
    : Number
    The number of fft frames to use when setting fft. ...

    The number of fft frames to use when setting fft. Must be a non-zero power of two in the range 32 to 2048.

    \n
    dr.audioplayer
    view source
    : Number
    The amount of smoothing to apply to the FFT analysis. ...

    The amount of smoothing to apply to the FFT analysis. A value from 0 -> 1 where 0 represents no time averaging with the last FFT analysis frame.

    \n

    Defaults to: 0.8

    Gives this node a global ID, which can be looked up in the global window object. ...

    Gives this node a global ID, which can be looked up in the global window object.\nTake care to not override builtin globals, or override your own instances!

    \n
    dr.audioplayer
    view source
    : Booleanreadonly

    If true, the audio is done loading

    \n

    If true, the audio is done loading

    \n
    dr.audioplayer
    view source
    : Numberreadonly

    A Number between 0 and 1 representing load progress

    \n

    A Number between 0 and 1 representing load progress

    \n
    dr.audioplayer
    view source
    : Boolean

    If true, the audio will play continuously.

    \n

    If true, the audio will play continuously.

    \n

    Names this node in its parent scope so it can be referred to later.

    \n

    Names this node in its parent scope so it can be referred to later.

    \n
    dr.audioplayer
    view source
    : Boolean

    If true, the audio is paused.

    \n

    If true, the audio is paused.

    \n
    dr.audioplayer
    view source
    : Boolean

    If true, the audio is playing.

    \n

    If true, the audio is playing.

    \n
    A comma separated list of URLs to javascript includes required as dependencies. ...

    A comma separated list of URLs to javascript includes required as dependencies. Useful if you need to ensure a third party library is available.

    \n

    An error to show if scriptincludes fail to load

    \n

    An error to show if scriptincludes fail to load

    \n
    dr.audioplayer
    view source
    : Numberreadonly

    The number of seconds the file has played, with 0 being the start.

    \n

    The number of seconds the file has played, with 0 being the start.

    \n
    dr.audioplayer
    view source
    : String

    The URL to an audio file to play

    \n

    The URL to an audio file to play

    \n
    Defined By

    Properties

    : Booleanreadonly

    True when this node and all its children are completely initialized

    \n

    True when this node and all its children are completely initialized

    \n
    An array of this node's child nodes ...

    An array of this node's child nodes

    \n

    Defaults to: []

    Defined By

    Methods

    Destroys this node ...

    Destroys this node

    \n
    Called when a subnode is added to this node. ...

    Called when a subnode is added to this node. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to add a subnode. Instead call setParent.

    \n

    Parameters

    • node : dr.node

      The subnode that was added.

      \n

    Returns

    • void
      \n
    Called when a subnode is removed from this node. ...

    Called when a subnode is removed from this node. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to remove a subnode. Instead call _removeFromParent.

    \n

    Parameters

    • node : dr.node

      The subnode that was removed.

      \n

    Returns

    • void
      \n
    ( name, value ) : Eventablechainable
    Sends an event ...

    Sends an event

    \n

    Parameters

    • name : String

      the name of the event to send

      \n
    • value : Object

      the value to send with the event

      \n

    Returns

    Sets an attribute, calls a setter if there is one, then sends an event with the new value ...

    Sets an attribute, calls a setter if there is one, then sends an event with the new value

    \n

    Parameters

    • name : String

      the name of the attribute to set

      \n
    • value : Object

      the value to set to

      \n

    Returns

    Calls setAttribute for each name/value pair in the attributes object ...

    Calls setAttribute for each name/value pair in the attributes object

    \n

    Parameters

    • attributes : Object

      An object of name/value pairs to be set

      \n

    Returns

    Defined By

    Events

    Fired when this node and all its children are about to be destroyed ...

    Fired when this node and all its children are about to be destroyed

    \n

    Parameters

    Fired when this node and all its children are completely initialized ...

    Fired when this node and all its children are completely initialized

    \n

    Parameters

    Fired when this node's subnodes array has changed ...

    Fired when this node's subnodes array has changed

    \n

    Parameters

    Fired when a subnode is added to this node. ...

    Fired when a subnode is added to this node.

    \n

    Parameters

    Fired when a subnode is removed from this node. ...

    Fired when a subnode is removed from this node.

    \n

    Parameters

    ","meta":{}}); \ No newline at end of file diff --git a/docs/api/output/dr.bitmap.js b/docs/api/output/dr.bitmap.js new file mode 100644 index 00000000..f7612a11 --- /dev/null +++ b/docs/api/output/dr.bitmap.js @@ -0,0 +1 @@ +Ext.data.JsonP.dr_bitmap({"tagname":"class","name":"dr.bitmap","autodetected":{},"files":[{"filename":"classdocs.js","href":"classdocs.html#dr-bitmap"}],"extends":"dr.view","members":[{"name":"bgcolor","tagname":"attribute","owner":"dr.view","id":"attribute-bgcolor","meta":{}},{"name":"border","tagname":"attribute","owner":"dr.view","id":"attribute-border","meta":{}},{"name":"bordercolor","tagname":"attribute","owner":"dr.view","id":"attribute-bordercolor","meta":{}},{"name":"borderstyle","tagname":"attribute","owner":"dr.view","id":"attribute-borderstyle","meta":{}},{"name":"clickable","tagname":"attribute","owner":"dr.view","id":"attribute-clickable","meta":{}},{"name":"clip","tagname":"attribute","owner":"dr.view","id":"attribute-clip","meta":{}},{"name":"height","tagname":"attribute","owner":"dr.view","id":"attribute-height","meta":{}},{"name":"id","tagname":"attribute","owner":"dr.node","id":"attribute-id","meta":{}},{"name":"name","tagname":"attribute","owner":"dr.node","id":"attribute-name","meta":{}},{"name":"padding","tagname":"attribute","owner":"dr.view","id":"attribute-padding","meta":{}},{"name":"scriptincludes","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludes","meta":{}},{"name":"scriptincludeserror","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludeserror","meta":{}},{"name":"scrollable","tagname":"attribute","owner":"dr.view","id":"attribute-scrollable","meta":{}},{"name":"src","tagname":"attribute","owner":"dr.bitmap","id":"attribute-src","meta":{}},{"name":"visible","tagname":"attribute","owner":"dr.view","id":"attribute-visible","meta":{}},{"name":"width","tagname":"attribute","owner":"dr.view","id":"attribute-width","meta":{}},{"name":"x","tagname":"attribute","owner":"dr.view","id":"attribute-x","meta":{}},{"name":"y","tagname":"attribute","owner":"dr.view","id":"attribute-y","meta":{}},{"name":"ignorelayout","tagname":"property","owner":"dr.view","id":"property-ignorelayout","meta":{}},{"name":"inited","tagname":"property","owner":"dr.node","id":"property-inited","meta":{"readonly":true}},{"name":"layouts","tagname":"property","owner":"dr.view","id":"property-layouts","meta":{"readonly":true}},{"name":"subnodes","tagname":"property","owner":"dr.node","id":"property-subnodes","meta":{"readonly":true}},{"name":"subviews","tagname":"property","owner":"dr.view","id":"property-subviews","meta":{"readonly":true}},{"name":"animate","tagname":"method","owner":"dr.view","id":"method-animate","meta":{"chainable":true}},{"name":"destroy","tagname":"method","owner":"dr.node","id":"method-destroy","meta":{}},{"name":"doLayoutAdded","tagname":"method","owner":"dr.view","id":"method-doLayoutAdded","meta":{}},{"name":"doLayoutRemoved","tagname":"method","owner":"dr.view","id":"method-doLayoutRemoved","meta":{}},{"name":"doSubnodeAdded","tagname":"method","owner":"dr.view","id":"method-doSubnodeAdded","meta":{}},{"name":"doSubnodeRemoved","tagname":"method","owner":"dr.view","id":"method-doSubnodeRemoved","meta":{}},{"name":"doSubviewAdded","tagname":"method","owner":"dr.view","id":"method-doSubviewAdded","meta":{}},{"name":"doSubviewRemoved","tagname":"method","owner":"dr.view","id":"method-doSubviewRemoved","meta":{}},{"name":"sendEvent","tagname":"method","owner":"Eventable","id":"method-sendEvent","meta":{"chainable":true}},{"name":"setAttribute","tagname":"method","owner":"Eventable","id":"method-setAttribute","meta":{"chainable":true}},{"name":"setAttributes","tagname":"method","owner":"Eventable","id":"method-setAttributes","meta":{"chainable":true}},{"name":"layoutAdded","tagname":"event","owner":"dr.view","id":"event-layoutAdded","meta":{}},{"name":"layoutRemoved","tagname":"event","owner":"dr.view","id":"event-layoutRemoved","meta":{}},{"name":"onclick","tagname":"event","owner":"dr.view","id":"event-onclick","meta":{}},{"name":"ondestroy","tagname":"event","owner":"dr.node","id":"event-ondestroy","meta":{}},{"name":"onerror","tagname":"event","owner":"dr.bitmap","id":"event-onerror","meta":{}},{"name":"oninit","tagname":"event","owner":"dr.node","id":"event-oninit","meta":{}},{"name":"onlayouts","tagname":"event","owner":"dr.view","id":"event-onlayouts","meta":{}},{"name":"onload","tagname":"event","owner":"dr.bitmap","id":"event-onload","meta":{}},{"name":"onmousedown","tagname":"event","owner":"dr.view","id":"event-onmousedown","meta":{}},{"name":"onmouseout","tagname":"event","owner":"dr.view","id":"event-onmouseout","meta":{}},{"name":"onmouseover","tagname":"event","owner":"dr.view","id":"event-onmouseover","meta":{}},{"name":"onmouseup","tagname":"event","owner":"dr.view","id":"event-onmouseup","meta":{}},{"name":"onsubnodes","tagname":"event","owner":"dr.node","id":"event-onsubnodes","meta":{}},{"name":"onsubviews","tagname":"event","owner":"dr.view","id":"event-onsubviews","meta":{}},{"name":"subnodeAdded","tagname":"event","owner":"dr.node","id":"event-subnodeAdded","meta":{}},{"name":"subnodeRemoved","tagname":"event","owner":"dr.node","id":"event-subnodeRemoved","meta":{}},{"name":"subviewAdded","tagname":"event","owner":"dr.view","id":"event-subviewAdded","meta":{}},{"name":"subviewRemoved","tagname":"event","owner":"dr.view","id":"event-subviewRemoved","meta":{}}],"alternateClassNames":[],"aliases":{},"id":"class-dr.bitmap","short_doc":"Loads an image from a URL. ...","component":false,"superclasses":["Module","Eventable","dr.node","dr.view"],"subclasses":[],"mixedInto":[],"mixins":[],"parentMixins":[],"requires":[],"uses":[],"html":"

    Hierarchy

    Files

    Loads an image from a URL.

    \n\n
    <bitmap src=\"../api-examples-resources/shasta.jpg\" width=\"230\" height=\"161\"></bitmap>\n
    \n
    Defined By

    Attributes

    Sets this view's background color

    \n

    Sets this view's background color

    \n

    Sets this view's border width

    \n

    Sets this view's border width

    \n

    Sets this view's border color

    \n

    Sets this view's border color

    \n

    Sets this view's border style (can be any css border-style value)

    \n

    Sets this view's border style (can be any css border-style value)

    \n
    If true, this view recieves mouse events. ...

    If true, this view recieves mouse events. Automatically set to true when an onclick/mouse* event is registered for this view.

    \n

    Defaults to: false

    If true, this view clips to its bounds ...

    If true, this view clips to its bounds

    \n

    Defaults to: false

    This view's height ...

    This view's height

    \n

    Defaults to: 0

    Gives this node a global ID, which can be looked up in the global window object. ...

    Gives this node a global ID, which can be looked up in the global window object.\nTake care to not override builtin globals, or override your own instances!

    \n

    Names this node in its parent scope so it can be referred to later.

    \n

    Names this node in its parent scope so it can be referred to later.

    \n

    Sets this view's padding

    \n

    Sets this view's padding

    \n
    A comma separated list of URLs to javascript includes required as dependencies. ...

    A comma separated list of URLs to javascript includes required as dependencies. Useful if you need to ensure a third party library is available.

    \n

    An error to show if scriptincludes fail to load

    \n

    An error to show if scriptincludes fail to load

    \n
    If true, this view clips to its bounds and provides scrolling to see content that overflows the bounds ...

    If true, this view clips to its bounds and provides scrolling to see content that overflows the bounds

    \n

    Defaults to: false

    dr.bitmap
    view source
    : String

    The bitmap URL to load

    \n

    The bitmap URL to load

    \n
    If false, this view is invisible ...

    If false, this view is invisible

    \n

    Defaults to: true

    This view's width ...

    This view's width

    \n

    Defaults to: 0

    This view's x position ...

    This view's x position

    \n

    Defaults to: 0

    This view's y position ...

    This view's y position

    \n

    Defaults to: 0

    Defined By

    Properties

    If true, layouts should ignore this view

    \n

    If true, layouts should ignore this view

    \n
    : Booleanreadonly

    True when this node and all its children are completely initialized

    \n

    True when this node and all its children are completely initialized

    \n
    An array of this views's layouts. ...

    An array of this views's layouts. Only defined when needed.

    \n
    An array of this node's child nodes ...

    An array of this node's child nodes

    \n

    Defaults to: []

    An array of this views's child views

    \n

    An array of this views's child views

    \n
    Defined By

    Methods

    ( obj, Number ) : dr.viewchainable
    Animates this view's attribute(s) ...

    Animates this view's attribute(s)

    \n

    Parameters

    • obj : Object

      A hash of attribute names and values to animate to

      \n
    • Number : Object

      duration The duration of the animation in milliseconds

      \n

    Returns

    Destroys this node ...

    Destroys this node

    \n
    Called when a layout is added to this view. ...

    Called when a layout is added to this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to add a layout. Instead call setParent.

    \n

    Parameters

    • layout : dr.layout

      The layout that was added.

      \n

    Returns

    • void
      \n
    Called when a layout is removed from this view. ...

    Called when a layout is removed from this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to remove a layout. Instead call _removeFromParent.

    \n

    Parameters

    • layout : dr.layout

      The layout that was removed.

      \n

    Returns

    • void
      \n
    Calls doSubviewAdded/doLayoutAdded if the added subnode is a view or\nlayout respectively. ...

    Calls doSubviewAdded/doLayoutAdded if the added subnode is a view or\nlayout respectively. Subclasses should call super.

    \n

    Parameters

    • node : Object

    Overrides: dr.node.doSubnodeAdded

    Calls doSubviewRemoved/doLayoutRemoved if the removed subnode is a view or\nlayout respectively. ...

    Calls doSubviewRemoved/doLayoutRemoved if the removed subnode is a view or\nlayout respectively. Subclasses should call super.

    \n

    Parameters

    • node : Object

    Overrides: dr.node.doSubnodeRemoved

    Called when a subview is added to this view. ...

    Called when a subview is added to this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to add a subview. Instead call setParent.

    \n

    Parameters

    • sv : dr.view

      The subview that was added.

      \n

    Returns

    • void
      \n
    Called when a subview is removed from this view. ...

    Called when a subview is removed from this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to remove a subview. Instead call _removeFromParent.

    \n

    Parameters

    • sv : dr.view

      The subview that was removed.

      \n

    Returns

    • void
      \n
    ( name, value ) : Eventablechainable
    Sends an event ...

    Sends an event

    \n

    Parameters

    • name : String

      the name of the event to send

      \n
    • value : Object

      the value to send with the event

      \n

    Returns

    Sets an attribute, calls a setter if there is one, then sends an event with the new value ...

    Sets an attribute, calls a setter if there is one, then sends an event with the new value

    \n

    Parameters

    • name : String

      the name of the attribute to set

      \n
    • value : Object

      the value to set to

      \n

    Returns

    Calls setAttribute for each name/value pair in the attributes object ...

    Calls setAttribute for each name/value pair in the attributes object

    \n

    Parameters

    • attributes : Object

      An object of name/value pairs to be set

      \n

    Returns

    Defined By

    Events

    Fired when a layout is added to this view. ...

    Fired when a layout is added to this view.

    \n

    Parameters

    Fired when a layout is removed from this view. ...

    Fired when a layout is removed from this view.

    \n

    Parameters

    Fired when this view is clicked ...

    Fired when this view is clicked

    \n

    Parameters

    Fired when this node and all its children are about to be destroyed ...

    Fired when this node and all its children are about to be destroyed

    \n

    Parameters

    dr.bitmap
    view source
    ( )
    Fired when there is an error loading the bitmap ...

    Fired when there is an error loading the bitmap

    \n
    Fired when this node and all its children are completely initialized ...

    Fired when this node and all its children are completely initialized

    \n

    Parameters

    Fired when this views's layouts array has changed ...

    Fired when this views's layouts array has changed

    \n

    Parameters

    dr.bitmap
    view source
    ( size )
    Fired when the bitmap is loaded ...

    Fired when the bitmap is loaded

    \n

    Parameters

    • size : Object

      An object containing the width and height

      \n
    Fired when the mouse goes down on this view ...

    Fired when the mouse goes down on this view

    \n

    Parameters

    Fired when the mouse moves off this view ...

    Fired when the mouse moves off this view

    \n

    Parameters

    Fired when the mouse moves over this view ...

    Fired when the mouse moves over this view

    \n

    Parameters

    Fired when the mouse goes up on this view ...

    Fired when the mouse goes up on this view

    \n

    Parameters

    Fired when this node's subnodes array has changed ...

    Fired when this node's subnodes array has changed

    \n

    Parameters

    Fired when this views's subviews array has changed ...

    Fired when this views's subviews array has changed

    \n

    Parameters

    Fired when a subnode is added to this node. ...

    Fired when a subnode is added to this node.

    \n

    Parameters

    Fired when a subnode is removed from this node. ...

    Fired when a subnode is removed from this node.

    \n

    Parameters

    Fired when a subview is added to this view. ...

    Fired when a subview is added to this view.

    \n

    Parameters

    Fired when a subview is removed from this view. ...

    Fired when a subview is removed from this view.

    \n

    Parameters

    ","meta":{}}); \ No newline at end of file diff --git a/docs/api/output/dr.buttonbase.js b/docs/api/output/dr.buttonbase.js new file mode 100644 index 00000000..b31b6c58 --- /dev/null +++ b/docs/api/output/dr.buttonbase.js @@ -0,0 +1 @@ +Ext.data.JsonP.dr_buttonbase({"tagname":"class","name":"dr.buttonbase","autodetected":{},"files":[{"filename":"classdocs.js","href":"classdocs.html#dr-buttonbase"}],"extends":"dr.view","members":[{"name":"bgcolor","tagname":"attribute","owner":"dr.view","id":"attribute-bgcolor","meta":{}},{"name":"border","tagname":"attribute","owner":"dr.view","id":"attribute-border","meta":{}},{"name":"bordercolor","tagname":"attribute","owner":"dr.view","id":"attribute-bordercolor","meta":{}},{"name":"borderstyle","tagname":"attribute","owner":"dr.view","id":"attribute-borderstyle","meta":{}},{"name":"clickable","tagname":"attribute","owner":"dr.view","id":"attribute-clickable","meta":{}},{"name":"clip","tagname":"attribute","owner":"dr.view","id":"attribute-clip","meta":{}},{"name":"defaultcolor","tagname":"attribute","owner":"dr.buttonbase","id":"attribute-defaultcolor","meta":{}},{"name":"height","tagname":"attribute","owner":"dr.view","id":"attribute-height","meta":{}},{"name":"id","tagname":"attribute","owner":"dr.node","id":"attribute-id","meta":{}},{"name":"name","tagname":"attribute","owner":"dr.node","id":"attribute-name","meta":{}},{"name":"padding","tagname":"attribute","owner":"dr.buttonbase","id":"attribute-padding","meta":{}},{"name":"scriptincludes","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludes","meta":{}},{"name":"scriptincludeserror","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludeserror","meta":{}},{"name":"scrollable","tagname":"attribute","owner":"dr.view","id":"attribute-scrollable","meta":{}},{"name":"selectcolor","tagname":"attribute","owner":"dr.buttonbase","id":"attribute-selectcolor","meta":{}},{"name":"selected","tagname":"attribute","owner":"dr.buttonbase","id":"attribute-selected","meta":{}},{"name":"text","tagname":"attribute","owner":"dr.buttonbase","id":"attribute-text","meta":{}},{"name":"visible","tagname":"attribute","owner":"dr.view","id":"attribute-visible","meta":{}},{"name":"width","tagname":"attribute","owner":"dr.view","id":"attribute-width","meta":{}},{"name":"x","tagname":"attribute","owner":"dr.view","id":"attribute-x","meta":{}},{"name":"y","tagname":"attribute","owner":"dr.view","id":"attribute-y","meta":{}},{"name":"ignorelayout","tagname":"property","owner":"dr.view","id":"property-ignorelayout","meta":{}},{"name":"inited","tagname":"property","owner":"dr.node","id":"property-inited","meta":{"readonly":true}},{"name":"layouts","tagname":"property","owner":"dr.view","id":"property-layouts","meta":{"readonly":true}},{"name":"subnodes","tagname":"property","owner":"dr.node","id":"property-subnodes","meta":{"readonly":true}},{"name":"subviews","tagname":"property","owner":"dr.view","id":"property-subviews","meta":{"readonly":true}},{"name":"animate","tagname":"method","owner":"dr.view","id":"method-animate","meta":{"chainable":true}},{"name":"destroy","tagname":"method","owner":"dr.node","id":"method-destroy","meta":{}},{"name":"doLayoutAdded","tagname":"method","owner":"dr.view","id":"method-doLayoutAdded","meta":{}},{"name":"doLayoutRemoved","tagname":"method","owner":"dr.view","id":"method-doLayoutRemoved","meta":{}},{"name":"doSubnodeAdded","tagname":"method","owner":"dr.view","id":"method-doSubnodeAdded","meta":{}},{"name":"doSubnodeRemoved","tagname":"method","owner":"dr.view","id":"method-doSubnodeRemoved","meta":{}},{"name":"doSubviewAdded","tagname":"method","owner":"dr.view","id":"method-doSubviewAdded","meta":{}},{"name":"doSubviewRemoved","tagname":"method","owner":"dr.view","id":"method-doSubviewRemoved","meta":{}},{"name":"sendEvent","tagname":"method","owner":"Eventable","id":"method-sendEvent","meta":{"chainable":true}},{"name":"setAttribute","tagname":"method","owner":"Eventable","id":"method-setAttribute","meta":{"chainable":true}},{"name":"setAttributes","tagname":"method","owner":"Eventable","id":"method-setAttributes","meta":{"chainable":true}},{"name":"layoutAdded","tagname":"event","owner":"dr.view","id":"event-layoutAdded","meta":{}},{"name":"layoutRemoved","tagname":"event","owner":"dr.view","id":"event-layoutRemoved","meta":{}},{"name":"onclick","tagname":"event","owner":"dr.view","id":"event-onclick","meta":{}},{"name":"ondestroy","tagname":"event","owner":"dr.node","id":"event-ondestroy","meta":{}},{"name":"oninit","tagname":"event","owner":"dr.node","id":"event-oninit","meta":{}},{"name":"onlayouts","tagname":"event","owner":"dr.view","id":"event-onlayouts","meta":{}},{"name":"onmousedown","tagname":"event","owner":"dr.view","id":"event-onmousedown","meta":{}},{"name":"onmouseout","tagname":"event","owner":"dr.view","id":"event-onmouseout","meta":{}},{"name":"onmouseover","tagname":"event","owner":"dr.view","id":"event-onmouseover","meta":{}},{"name":"onmouseup","tagname":"event","owner":"dr.view","id":"event-onmouseup","meta":{}},{"name":"onselected","tagname":"event","owner":"dr.buttonbase","id":"event-onselected","meta":{}},{"name":"onsubnodes","tagname":"event","owner":"dr.node","id":"event-onsubnodes","meta":{}},{"name":"onsubviews","tagname":"event","owner":"dr.view","id":"event-onsubviews","meta":{}},{"name":"subnodeAdded","tagname":"event","owner":"dr.node","id":"event-subnodeAdded","meta":{}},{"name":"subnodeRemoved","tagname":"event","owner":"dr.node","id":"event-subnodeRemoved","meta":{}},{"name":"subviewAdded","tagname":"event","owner":"dr.view","id":"event-subviewAdded","meta":{}},{"name":"subviewRemoved","tagname":"event","owner":"dr.view","id":"event-subviewRemoved","meta":{}}],"alternateClassNames":[],"aliases":{},"id":"class-dr.buttonbase","short_doc":"Base class for button components. ...","component":false,"superclasses":["Module","Eventable","dr.node","dr.view"],"subclasses":["dr.checkbutton","dr.labelbutton"],"mixedInto":[],"mixins":[],"parentMixins":[],"requires":[],"uses":[],"html":"

    Hierarchy

    Subclasses

    Files

    Base class for button components. Buttons share common elements,\nincluding their ability to be selected, a visual element to display\ntheir state, and a default and selected color.\nThe visual element is a dr.view that shows the current state of the\nbutton. For example, in a labelbutton the entire button is the visual\nelement. For a checkbutton, the visual element is a square dr.view\nthat is inside the button.

    \n
    Defined By

    Attributes

    Sets this view's background color

    \n

    Sets this view's background color

    \n

    Sets this view's border width

    \n

    Sets this view's border width

    \n

    Sets this view's border color

    \n

    Sets this view's border color

    \n

    Sets this view's border style (can be any css border-style value)

    \n

    Sets this view's border style (can be any css border-style value)

    \n
    If true, this view recieves mouse events. ...

    If true, this view recieves mouse events. Automatically set to true when an onclick/mouse* event is registered for this view.

    \n

    Defaults to: false

    If true, this view clips to its bounds ...

    If true, this view clips to its bounds

    \n

    Defaults to: false

    dr.buttonbase
    view source
    : String
    The default color of the visual button element when not selected. ...

    The default color of the visual button element when not selected.

    \n

    Defaults to: "#808080"

    This view's height ...

    This view's height

    \n

    Defaults to: 0

    Gives this node a global ID, which can be looked up in the global window object. ...

    Gives this node a global ID, which can be looked up in the global window object.\nTake care to not override builtin globals, or override your own instances!

    \n

    Names this node in its parent scope so it can be referred to later.

    \n

    Names this node in its parent scope so it can be referred to later.

    \n
    dr.buttonbase
    view source
    : Number
    Amount of padding pixels around the button. ...

    Amount of padding pixels around the button.

    \n

    Defaults to: 3

    Overrides: dr.view.padding

    A comma separated list of URLs to javascript includes required as dependencies. ...

    A comma separated list of URLs to javascript includes required as dependencies. Useful if you need to ensure a third party library is available.

    \n

    An error to show if scriptincludes fail to load

    \n

    An error to show if scriptincludes fail to load

    \n
    If true, this view clips to its bounds and provides scrolling to see content that overflows the bounds ...

    If true, this view clips to its bounds and provides scrolling to see content that overflows the bounds

    \n

    Defaults to: false

    dr.buttonbase
    view source
    : String
    The selected color of the visual button element when selected. ...

    The selected color of the visual button element when selected.

    \n

    Defaults to: "#a0a0a0"

    dr.buttonbase
    view source
    : Boolean
    The current state of the button. ...

    The current state of the button.

    \n

    Defaults to: false

    dr.buttonbase
    view source
    : String
    Button text. ...

    Button text.

    \n

    Defaults to: ""

    If false, this view is invisible ...

    If false, this view is invisible

    \n

    Defaults to: true

    This view's width ...

    This view's width

    \n

    Defaults to: 0

    This view's x position ...

    This view's x position

    \n

    Defaults to: 0

    This view's y position ...

    This view's y position

    \n

    Defaults to: 0

    Defined By

    Properties

    If true, layouts should ignore this view

    \n

    If true, layouts should ignore this view

    \n
    : Booleanreadonly

    True when this node and all its children are completely initialized

    \n

    True when this node and all its children are completely initialized

    \n
    An array of this views's layouts. ...

    An array of this views's layouts. Only defined when needed.

    \n
    An array of this node's child nodes ...

    An array of this node's child nodes

    \n

    Defaults to: []

    An array of this views's child views

    \n

    An array of this views's child views

    \n
    Defined By

    Methods

    ( obj, Number ) : dr.viewchainable
    Animates this view's attribute(s) ...

    Animates this view's attribute(s)

    \n

    Parameters

    • obj : Object

      A hash of attribute names and values to animate to

      \n
    • Number : Object

      duration The duration of the animation in milliseconds

      \n

    Returns

    Destroys this node ...

    Destroys this node

    \n
    Called when a layout is added to this view. ...

    Called when a layout is added to this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to add a layout. Instead call setParent.

    \n

    Parameters

    • layout : dr.layout

      The layout that was added.

      \n

    Returns

    • void
      \n
    Called when a layout is removed from this view. ...

    Called when a layout is removed from this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to remove a layout. Instead call _removeFromParent.

    \n

    Parameters

    • layout : dr.layout

      The layout that was removed.

      \n

    Returns

    • void
      \n
    Calls doSubviewAdded/doLayoutAdded if the added subnode is a view or\nlayout respectively. ...

    Calls doSubviewAdded/doLayoutAdded if the added subnode is a view or\nlayout respectively. Subclasses should call super.

    \n

    Parameters

    • node : Object

    Overrides: dr.node.doSubnodeAdded

    Calls doSubviewRemoved/doLayoutRemoved if the removed subnode is a view or\nlayout respectively. ...

    Calls doSubviewRemoved/doLayoutRemoved if the removed subnode is a view or\nlayout respectively. Subclasses should call super.

    \n

    Parameters

    • node : Object

    Overrides: dr.node.doSubnodeRemoved

    Called when a subview is added to this view. ...

    Called when a subview is added to this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to add a subview. Instead call setParent.

    \n

    Parameters

    • sv : dr.view

      The subview that was added.

      \n

    Returns

    • void
      \n
    Called when a subview is removed from this view. ...

    Called when a subview is removed from this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to remove a subview. Instead call _removeFromParent.

    \n

    Parameters

    • sv : dr.view

      The subview that was removed.

      \n

    Returns

    • void
      \n
    ( name, value ) : Eventablechainable
    Sends an event ...

    Sends an event

    \n

    Parameters

    • name : String

      the name of the event to send

      \n
    • value : Object

      the value to send with the event

      \n

    Returns

    Sets an attribute, calls a setter if there is one, then sends an event with the new value ...

    Sets an attribute, calls a setter if there is one, then sends an event with the new value

    \n

    Parameters

    • name : String

      the name of the attribute to set

      \n
    • value : Object

      the value to set to

      \n

    Returns

    Calls setAttribute for each name/value pair in the attributes object ...

    Calls setAttribute for each name/value pair in the attributes object

    \n

    Parameters

    • attributes : Object

      An object of name/value pairs to be set

      \n

    Returns

    Defined By

    Events

    Fired when a layout is added to this view. ...

    Fired when a layout is added to this view.

    \n

    Parameters

    Fired when a layout is removed from this view. ...

    Fired when a layout is removed from this view.

    \n

    Parameters

    Fired when this view is clicked ...

    Fired when this view is clicked

    \n

    Parameters

    Fired when this node and all its children are about to be destroyed ...

    Fired when this node and all its children are about to be destroyed

    \n

    Parameters

    Fired when this node and all its children are completely initialized ...

    Fired when this node and all its children are completely initialized

    \n

    Parameters

    Fired when this views's layouts array has changed ...

    Fired when this views's layouts array has changed

    \n

    Parameters

    Fired when the mouse goes down on this view ...

    Fired when the mouse goes down on this view

    \n

    Parameters

    Fired when the mouse moves off this view ...

    Fired when the mouse moves off this view

    \n

    Parameters

    Fired when the mouse moves over this view ...

    Fired when the mouse moves over this view

    \n

    Parameters

    Fired when the mouse goes up on this view ...

    Fired when the mouse goes up on this view

    \n

    Parameters

    dr.buttonbase
    view source
    ( view )
    Fired when the state of the button changes. ...

    Fired when the state of the button changes.

    \n

    Parameters

    Fired when this node's subnodes array has changed ...

    Fired when this node's subnodes array has changed

    \n

    Parameters

    Fired when this views's subviews array has changed ...

    Fired when this views's subviews array has changed

    \n

    Parameters

    Fired when a subnode is added to this node. ...

    Fired when a subnode is added to this node.

    \n

    Parameters

    Fired when a subnode is removed from this node. ...

    Fired when a subnode is removed from this node.

    \n

    Parameters

    Fired when a subview is added to this view. ...

    Fired when a subview is added to this view.

    \n

    Parameters

    Fired when a subview is removed from this view. ...

    Fired when a subview is removed from this view.

    \n

    Parameters

    ","meta":{}}); \ No newline at end of file diff --git a/docs/api/output/dr.checkbutton.js b/docs/api/output/dr.checkbutton.js new file mode 100644 index 00000000..b42ad3a3 --- /dev/null +++ b/docs/api/output/dr.checkbutton.js @@ -0,0 +1 @@ +Ext.data.JsonP.dr_checkbutton({"tagname":"class","name":"dr.checkbutton","autodetected":{},"files":[{"filename":"classdocs.js","href":"classdocs.html#dr-checkbutton"}],"extends":"dr.buttonbase","members":[{"name":"bgcolor","tagname":"attribute","owner":"dr.view","id":"attribute-bgcolor","meta":{}},{"name":"border","tagname":"attribute","owner":"dr.view","id":"attribute-border","meta":{}},{"name":"bordercolor","tagname":"attribute","owner":"dr.view","id":"attribute-bordercolor","meta":{}},{"name":"borderstyle","tagname":"attribute","owner":"dr.view","id":"attribute-borderstyle","meta":{}},{"name":"clickable","tagname":"attribute","owner":"dr.view","id":"attribute-clickable","meta":{}},{"name":"clip","tagname":"attribute","owner":"dr.view","id":"attribute-clip","meta":{}},{"name":"defaultcolor","tagname":"attribute","owner":"dr.buttonbase","id":"attribute-defaultcolor","meta":{}},{"name":"height","tagname":"attribute","owner":"dr.view","id":"attribute-height","meta":{}},{"name":"id","tagname":"attribute","owner":"dr.node","id":"attribute-id","meta":{}},{"name":"name","tagname":"attribute","owner":"dr.node","id":"attribute-name","meta":{}},{"name":"padding","tagname":"attribute","owner":"dr.buttonbase","id":"attribute-padding","meta":{}},{"name":"scriptincludes","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludes","meta":{}},{"name":"scriptincludeserror","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludeserror","meta":{}},{"name":"scrollable","tagname":"attribute","owner":"dr.view","id":"attribute-scrollable","meta":{}},{"name":"selectcolor","tagname":"attribute","owner":"dr.buttonbase","id":"attribute-selectcolor","meta":{}},{"name":"selected","tagname":"attribute","owner":"dr.buttonbase","id":"attribute-selected","meta":{}},{"name":"text","tagname":"attribute","owner":"dr.buttonbase","id":"attribute-text","meta":{}},{"name":"visible","tagname":"attribute","owner":"dr.view","id":"attribute-visible","meta":{}},{"name":"width","tagname":"attribute","owner":"dr.view","id":"attribute-width","meta":{}},{"name":"x","tagname":"attribute","owner":"dr.view","id":"attribute-x","meta":{}},{"name":"y","tagname":"attribute","owner":"dr.view","id":"attribute-y","meta":{}},{"name":"ignorelayout","tagname":"property","owner":"dr.view","id":"property-ignorelayout","meta":{}},{"name":"inited","tagname":"property","owner":"dr.node","id":"property-inited","meta":{"readonly":true}},{"name":"layouts","tagname":"property","owner":"dr.view","id":"property-layouts","meta":{"readonly":true}},{"name":"subnodes","tagname":"property","owner":"dr.node","id":"property-subnodes","meta":{"readonly":true}},{"name":"subviews","tagname":"property","owner":"dr.view","id":"property-subviews","meta":{"readonly":true}},{"name":"animate","tagname":"method","owner":"dr.view","id":"method-animate","meta":{"chainable":true}},{"name":"destroy","tagname":"method","owner":"dr.node","id":"method-destroy","meta":{}},{"name":"doLayoutAdded","tagname":"method","owner":"dr.view","id":"method-doLayoutAdded","meta":{}},{"name":"doLayoutRemoved","tagname":"method","owner":"dr.view","id":"method-doLayoutRemoved","meta":{}},{"name":"doSubnodeAdded","tagname":"method","owner":"dr.view","id":"method-doSubnodeAdded","meta":{}},{"name":"doSubnodeRemoved","tagname":"method","owner":"dr.view","id":"method-doSubnodeRemoved","meta":{}},{"name":"doSubviewAdded","tagname":"method","owner":"dr.view","id":"method-doSubviewAdded","meta":{}},{"name":"doSubviewRemoved","tagname":"method","owner":"dr.view","id":"method-doSubviewRemoved","meta":{}},{"name":"sendEvent","tagname":"method","owner":"Eventable","id":"method-sendEvent","meta":{"chainable":true}},{"name":"setAttribute","tagname":"method","owner":"Eventable","id":"method-setAttribute","meta":{"chainable":true}},{"name":"setAttributes","tagname":"method","owner":"Eventable","id":"method-setAttributes","meta":{"chainable":true}},{"name":"layoutAdded","tagname":"event","owner":"dr.view","id":"event-layoutAdded","meta":{}},{"name":"layoutRemoved","tagname":"event","owner":"dr.view","id":"event-layoutRemoved","meta":{}},{"name":"onclick","tagname":"event","owner":"dr.view","id":"event-onclick","meta":{}},{"name":"ondestroy","tagname":"event","owner":"dr.node","id":"event-ondestroy","meta":{}},{"name":"oninit","tagname":"event","owner":"dr.node","id":"event-oninit","meta":{}},{"name":"onlayouts","tagname":"event","owner":"dr.view","id":"event-onlayouts","meta":{}},{"name":"onmousedown","tagname":"event","owner":"dr.view","id":"event-onmousedown","meta":{}},{"name":"onmouseout","tagname":"event","owner":"dr.view","id":"event-onmouseout","meta":{}},{"name":"onmouseover","tagname":"event","owner":"dr.view","id":"event-onmouseover","meta":{}},{"name":"onmouseup","tagname":"event","owner":"dr.view","id":"event-onmouseup","meta":{}},{"name":"onselected","tagname":"event","owner":"dr.buttonbase","id":"event-onselected","meta":{}},{"name":"onsubnodes","tagname":"event","owner":"dr.node","id":"event-onsubnodes","meta":{}},{"name":"onsubviews","tagname":"event","owner":"dr.view","id":"event-onsubviews","meta":{}},{"name":"subnodeAdded","tagname":"event","owner":"dr.node","id":"event-subnodeAdded","meta":{}},{"name":"subnodeRemoved","tagname":"event","owner":"dr.node","id":"event-subnodeRemoved","meta":{}},{"name":"subviewAdded","tagname":"event","owner":"dr.view","id":"event-subviewAdded","meta":{}},{"name":"subviewRemoved","tagname":"event","owner":"dr.view","id":"event-subviewRemoved","meta":{}}],"alternateClassNames":[],"aliases":{},"id":"class-dr.checkbutton","short_doc":"Button class consisting of text and a visual element to show the\ncurrent state of the component. ...","component":false,"superclasses":["Module","Eventable","dr.node","dr.view","dr.buttonbase"],"subclasses":[],"mixedInto":[],"mixins":[],"parentMixins":[],"requires":[],"uses":[],"html":"

    Hierarchy

    Files

    Button class consisting of text and a visual element to show the\ncurrent state of the component. The state of the\nbutton changes each time the button is clicked. The select property\nholds the current state of the button. The onselected event\nis generated when the button is the selected state.

    \n\n
    <spacedlayout axis=\"y\"></spacedlayout>\n\n<checkbutton text=\"pink\" selectcolor=\"pink\" defaultcolor=\"lightgrey\" bgcolor=\"white\"></checkbutton>\n<checkbutton text=\"blue\" selectcolor=\"lightblue\" defaultcolor=\"lightgrey\" bgcolor=\"white\"></checkbutton>\n<checkbutton text=\"green\" selectcolor=\"lightgreen\" defaultcolor=\"lightgrey\" bgcolor=\"white\"></checkbutton>\n
    \n\n

    Here we listen for the onselected event on a checkbox and print the value that is passed to the handler.

    \n\n
    <spacedlayout axis=\"y\"></spacedlayout>\n\n<checkbutton text=\"green\" selectcolor=\"lightgreen\" defaultcolor=\"lightgrey\" bgcolor=\"white\">\n  <handler event=\"onselected\" args=\"value\">\n    displayselected.setAttribute('text', value);\n  </handler>\n</checkbutton>\n\n<view>\n  <spacedlayout></spacedlayout>\n  <text text=\"Selected:\"></text>\n  <text id=\"displayselected\"></text>\n</view>\n
    \n
    Defined By

    Attributes

    Sets this view's background color

    \n

    Sets this view's background color

    \n

    Sets this view's border width

    \n

    Sets this view's border width

    \n

    Sets this view's border color

    \n

    Sets this view's border color

    \n

    Sets this view's border style (can be any css border-style value)

    \n

    Sets this view's border style (can be any css border-style value)

    \n
    If true, this view recieves mouse events. ...

    If true, this view recieves mouse events. Automatically set to true when an onclick/mouse* event is registered for this view.

    \n

    Defaults to: false

    If true, this view clips to its bounds ...

    If true, this view clips to its bounds

    \n

    Defaults to: false

    The default color of the visual button element when not selected. ...

    The default color of the visual button element when not selected.

    \n

    Defaults to: "#808080"

    This view's height ...

    This view's height

    \n

    Defaults to: 0

    Gives this node a global ID, which can be looked up in the global window object. ...

    Gives this node a global ID, which can be looked up in the global window object.\nTake care to not override builtin globals, or override your own instances!

    \n

    Names this node in its parent scope so it can be referred to later.

    \n

    Names this node in its parent scope so it can be referred to later.

    \n
    Amount of padding pixels around the button. ...

    Amount of padding pixels around the button.

    \n

    Defaults to: 3

    Overrides: dr.view.padding

    A comma separated list of URLs to javascript includes required as dependencies. ...

    A comma separated list of URLs to javascript includes required as dependencies. Useful if you need to ensure a third party library is available.

    \n

    An error to show if scriptincludes fail to load

    \n

    An error to show if scriptincludes fail to load

    \n
    If true, this view clips to its bounds and provides scrolling to see content that overflows the bounds ...

    If true, this view clips to its bounds and provides scrolling to see content that overflows the bounds

    \n

    Defaults to: false

    The selected color of the visual button element when selected. ...

    The selected color of the visual button element when selected.

    \n

    Defaults to: "#a0a0a0"

    The current state of the button. ...

    The current state of the button.

    \n

    Defaults to: false

    Button text. ...

    Button text.

    \n

    Defaults to: ""

    If false, this view is invisible ...

    If false, this view is invisible

    \n

    Defaults to: true

    This view's width ...

    This view's width

    \n

    Defaults to: 0

    This view's x position ...

    This view's x position

    \n

    Defaults to: 0

    This view's y position ...

    This view's y position

    \n

    Defaults to: 0

    Defined By

    Properties

    If true, layouts should ignore this view

    \n

    If true, layouts should ignore this view

    \n
    : Booleanreadonly

    True when this node and all its children are completely initialized

    \n

    True when this node and all its children are completely initialized

    \n
    An array of this views's layouts. ...

    An array of this views's layouts. Only defined when needed.

    \n
    An array of this node's child nodes ...

    An array of this node's child nodes

    \n

    Defaults to: []

    An array of this views's child views

    \n

    An array of this views's child views

    \n
    Defined By

    Methods

    ( obj, Number ) : dr.viewchainable
    Animates this view's attribute(s) ...

    Animates this view's attribute(s)

    \n

    Parameters

    • obj : Object

      A hash of attribute names and values to animate to

      \n
    • Number : Object

      duration The duration of the animation in milliseconds

      \n

    Returns

    Destroys this node ...

    Destroys this node

    \n
    Called when a layout is added to this view. ...

    Called when a layout is added to this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to add a layout. Instead call setParent.

    \n

    Parameters

    • layout : dr.layout

      The layout that was added.

      \n

    Returns

    • void
      \n
    Called when a layout is removed from this view. ...

    Called when a layout is removed from this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to remove a layout. Instead call _removeFromParent.

    \n

    Parameters

    • layout : dr.layout

      The layout that was removed.

      \n

    Returns

    • void
      \n
    Calls doSubviewAdded/doLayoutAdded if the added subnode is a view or\nlayout respectively. ...

    Calls doSubviewAdded/doLayoutAdded if the added subnode is a view or\nlayout respectively. Subclasses should call super.

    \n

    Parameters

    • node : Object

    Overrides: dr.node.doSubnodeAdded

    Calls doSubviewRemoved/doLayoutRemoved if the removed subnode is a view or\nlayout respectively. ...

    Calls doSubviewRemoved/doLayoutRemoved if the removed subnode is a view or\nlayout respectively. Subclasses should call super.

    \n

    Parameters

    • node : Object

    Overrides: dr.node.doSubnodeRemoved

    Called when a subview is added to this view. ...

    Called when a subview is added to this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to add a subview. Instead call setParent.

    \n

    Parameters

    • sv : dr.view

      The subview that was added.

      \n

    Returns

    • void
      \n
    Called when a subview is removed from this view. ...

    Called when a subview is removed from this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to remove a subview. Instead call _removeFromParent.

    \n

    Parameters

    • sv : dr.view

      The subview that was removed.

      \n

    Returns

    • void
      \n
    ( name, value ) : Eventablechainable
    Sends an event ...

    Sends an event

    \n

    Parameters

    • name : String

      the name of the event to send

      \n
    • value : Object

      the value to send with the event

      \n

    Returns

    Sets an attribute, calls a setter if there is one, then sends an event with the new value ...

    Sets an attribute, calls a setter if there is one, then sends an event with the new value

    \n

    Parameters

    • name : String

      the name of the attribute to set

      \n
    • value : Object

      the value to set to

      \n

    Returns

    Calls setAttribute for each name/value pair in the attributes object ...

    Calls setAttribute for each name/value pair in the attributes object

    \n

    Parameters

    • attributes : Object

      An object of name/value pairs to be set

      \n

    Returns

    Defined By

    Events

    Fired when a layout is added to this view. ...

    Fired when a layout is added to this view.

    \n

    Parameters

    Fired when a layout is removed from this view. ...

    Fired when a layout is removed from this view.

    \n

    Parameters

    Fired when this view is clicked ...

    Fired when this view is clicked

    \n

    Parameters

    Fired when this node and all its children are about to be destroyed ...

    Fired when this node and all its children are about to be destroyed

    \n

    Parameters

    Fired when this node and all its children are completely initialized ...

    Fired when this node and all its children are completely initialized

    \n

    Parameters

    Fired when this views's layouts array has changed ...

    Fired when this views's layouts array has changed

    \n

    Parameters

    Fired when the mouse goes down on this view ...

    Fired when the mouse goes down on this view

    \n

    Parameters

    Fired when the mouse moves off this view ...

    Fired when the mouse moves off this view

    \n

    Parameters

    Fired when the mouse moves over this view ...

    Fired when the mouse moves over this view

    \n

    Parameters

    Fired when the mouse goes up on this view ...

    Fired when the mouse goes up on this view

    \n

    Parameters

    Fired when the state of the button changes. ...

    Fired when the state of the button changes.

    \n

    Parameters

    Fired when this node's subnodes array has changed ...

    Fired when this node's subnodes array has changed

    \n

    Parameters

    Fired when this views's subviews array has changed ...

    Fired when this views's subviews array has changed

    \n

    Parameters

    Fired when a subnode is added to this node. ...

    Fired when a subnode is added to this node.

    \n

    Parameters

    Fired when a subnode is removed from this node. ...

    Fired when a subnode is removed from this node.

    \n

    Parameters

    Fired when a subview is added to this view. ...

    Fired when a subview is added to this view.

    \n

    Parameters

    Fired when a subview is removed from this view. ...

    Fired when a subview is removed from this view.

    \n

    Parameters

    ","meta":{}}); \ No newline at end of file diff --git a/docs/api/output/dr.class.js b/docs/api/output/dr.class.js new file mode 100644 index 00000000..e25efb4e --- /dev/null +++ b/docs/api/output/dr.class.js @@ -0,0 +1 @@ +Ext.data.JsonP.dr_class({"tagname":"class","name":"dr.class","autodetected":{},"files":[{"filename":"layout.js","href":"layout.html#dr-class"}],"members":[{"name":"extends","tagname":"attribute","owner":"dr.class","id":"attribute-extends","meta":{}},{"name":"name","tagname":"attribute","owner":"dr.class","id":"attribute-name","meta":{"required":true}},{"name":"type","tagname":"attribute","owner":"dr.class","id":"attribute-type","meta":{}}],"alternateClassNames":[],"aliases":{},"id":"class-dr.class","short_doc":"Allows new tags to be created. ...","component":false,"superclasses":[],"subclasses":[],"mixedInto":[],"mixins":[],"parentMixins":[],"requires":[],"uses":[],"html":"

    Files

    Allows new tags to be created. Classes only be created with the <class></class> tag syntax.

    \n\n

    Classes can extend any other class, and they extend dr.view by default.

    \n\n

    Once declared, classes invoked with the declarative syntax, e.g. <classname></classname>.

    \n\n

    If a class can't be found in the document, dreem will automatically attempt to load it from the classes/* directory.

    \n\n

    Like views and nodes, classes can contain methods, handlers, setters, constraints, attributes and other view, node or class instances.

    \n\n

    Here is a class called 'tile' that extends dr.view. It sets the bgcolor, width, and height attributes. An instance of tile is created using declarative syntax.

    \n\n
    <class name=\"tile\" extends=\"view\" bgcolor=\"thistle\" width=\"100\" height=\"100\"></class>\n\n<tile></tile>\n
    \n\n

    Now we'll extend the tile class with a class called 'labeltile', which contains a label inside of the box. We'll declare one each of tile and labeltile, and position them with a spacedlayout.

    \n\n
    <class name=\"tile\" extends=\"view\" bgcolor=\"thistle\" width=\"100\" height=\"100\"></class>\n\n<class name=\"labeltile\" extends=\"tile\">\n  <text text=\"Tile\"></text>\n</class>\n\n<spacedlayout></spacedlayout>\n<tile></tile>\n<labeltile></labeltile>\n
    \n\n

    Attributes that are declared inside of a class definition can be set when the instance is declared. Here we bind the label text to the value of an attribute called label.

    \n\n
    <class name=\"tile\" extends=\"view\" bgcolor=\"thistle\" width=\"100\" height=\"100\"></class>\n\n<class name=\"labeltile\" extends=\"tile\">\n  <attribute name=\"label\" type=\"string\" value=\"\"></attribute>\n  <text text=\"${this.parent.label}\"></text>\n</class>\n\n<spacedlayout></spacedlayout>\n<tile></tile>\n<labeltile label=\"The Tile\"></labeltile>\n
    \n

    Attributes

    Defined By

    Required attributes

    dr.class
    view source
    : Stringrequired

    The name of the new tag.

    \n

    The name of the new tag.

    \n
    Defined By

    Optional attributes

    dr.class
    view source
    : String
    The name of a class that should be extended. ...

    The name of a class that should be extended.

    \n

    Defaults to: view

    dr.class
    view source
    : \"js\"/\"coffee\"
    The default compiler to use for methods, setters and handlers. ...

    The default compiler to use for methods, setters and handlers. Either 'js' or 'coffee'

    \n

    Defaults to: js

    ","meta":{}}); \ No newline at end of file diff --git a/docs/api/output/dr.constantlayout.js b/docs/api/output/dr.constantlayout.js new file mode 100644 index 00000000..4df46962 --- /dev/null +++ b/docs/api/output/dr.constantlayout.js @@ -0,0 +1 @@ +Ext.data.JsonP.dr_constantlayout({"tagname":"class","name":"dr.constantlayout","autodetected":{},"files":[{"filename":"classdocs.js","href":"classdocs.html#dr-constantlayout"}],"extends":"dr.layout","members":[{"name":"attribute","tagname":"attribute","owner":"dr.constantlayout","id":"attribute-attribute","meta":{}},{"name":"id","tagname":"attribute","owner":"dr.node","id":"attribute-id","meta":{}},{"name":"name","tagname":"attribute","owner":"dr.node","id":"attribute-name","meta":{}},{"name":"scriptincludes","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludes","meta":{}},{"name":"scriptincludeserror","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludeserror","meta":{}},{"name":"value","tagname":"attribute","owner":"dr.constantlayout","id":"attribute-value","meta":{}},{"name":"inited","tagname":"property","owner":"dr.node","id":"property-inited","meta":{"readonly":true}},{"name":"subnodes","tagname":"property","owner":"dr.node","id":"property-subnodes","meta":{"readonly":true}},{"name":"addSubview","tagname":"method","owner":"dr.layout","id":"method-addSubview","meta":{}},{"name":"canUpdate","tagname":"method","owner":"dr.layout","id":"method-canUpdate","meta":{}},{"name":"destroy","tagname":"method","owner":"dr.node","id":"method-destroy","meta":{}},{"name":"doSubnodeAdded","tagname":"method","owner":"dr.node","id":"method-doSubnodeAdded","meta":{}},{"name":"doSubnodeRemoved","tagname":"method","owner":"dr.node","id":"method-doSubnodeRemoved","meta":{}},{"name":"ignore","tagname":"method","owner":"dr.layout","id":"method-ignore","meta":{}},{"name":"removeSubview","tagname":"method","owner":"dr.layout","id":"method-removeSubview","meta":{}},{"name":"sendEvent","tagname":"method","owner":"Eventable","id":"method-sendEvent","meta":{"chainable":true}},{"name":"setAttribute","tagname":"method","owner":"Eventable","id":"method-setAttribute","meta":{"chainable":true}},{"name":"setAttributes","tagname":"method","owner":"Eventable","id":"method-setAttributes","meta":{"chainable":true}},{"name":"startMonitoringAllSubviews","tagname":"method","owner":"dr.layout","id":"method-startMonitoringAllSubviews","meta":{}},{"name":"startMonitoringSubview","tagname":"method","owner":"dr.layout","id":"method-startMonitoringSubview","meta":{}},{"name":"stopMonitoringAllSubviews","tagname":"method","owner":"dr.layout","id":"method-stopMonitoringAllSubviews","meta":{}},{"name":"stopMonitoringSubview","tagname":"method","owner":"dr.layout","id":"method-stopMonitoringSubview","meta":{}},{"name":"update","tagname":"method","owner":"dr.layout","id":"method-update","meta":{}},{"name":"ondestroy","tagname":"event","owner":"dr.node","id":"event-ondestroy","meta":{}},{"name":"oninit","tagname":"event","owner":"dr.node","id":"event-oninit","meta":{}},{"name":"onsubnodes","tagname":"event","owner":"dr.node","id":"event-onsubnodes","meta":{}},{"name":"subnodeAdded","tagname":"event","owner":"dr.node","id":"event-subnodeAdded","meta":{}},{"name":"subnodeRemoved","tagname":"event","owner":"dr.node","id":"event-subnodeRemoved","meta":{}}],"alternateClassNames":[],"aliases":{},"id":"class-dr.constantlayout","short_doc":"A layout that sets the target attribute name to the target value for\neach subview. ...","component":false,"superclasses":["Module","Eventable","dr.node","dr.layout"],"subclasses":["dr.variablelayout"],"mixedInto":[],"mixins":[],"parentMixins":[],"requires":[],"uses":[],"html":"

    Hierarchy

    Subclasses

    Files

    A layout that sets the target attribute name to the target value for\neach subview.

    \n\n
    <constantlayout attribute=\"y\" value=\"10\"></constantlayout>\n\n<view width=\"100\" height=\"25\" bgcolor=\"lightpink\"></view>\n<view width=\"100\" height=\"25\" bgcolor=\"plum\"></view>\n<view width=\"100\" height=\"25\" bgcolor=\"lightblue\"></view>\n
    \n
    Defined By

    Attributes

    dr.constantlayout
    view source
    : String
    The name of the attribute to update on each subview. ...

    The name of the attribute to update on each subview.

    \n

    Defaults to: x

    Gives this node a global ID, which can be looked up in the global window object. ...

    Gives this node a global ID, which can be looked up in the global window object.\nTake care to not override builtin globals, or override your own instances!

    \n

    Names this node in its parent scope so it can be referred to later.

    \n

    Names this node in its parent scope so it can be referred to later.

    \n
    A comma separated list of URLs to javascript includes required as dependencies. ...

    A comma separated list of URLs to javascript includes required as dependencies. Useful if you need to ensure a third party library is available.

    \n

    An error to show if scriptincludes fail to load

    \n

    An error to show if scriptincludes fail to load

    \n
    dr.constantlayout
    view source
    : *
    The value to set the attribute to. ...

    The value to set the attribute to.

    \n

    Defaults to: 0

    Defined By

    Properties

    : Booleanreadonly

    True when this node and all its children are completely initialized

    \n

    True when this node and all its children are completely initialized

    \n
    An array of this node's child nodes ...

    An array of this node's child nodes

    \n

    Defaults to: []

    Defined By

    Methods

    Adds the provided view to the subviews array of this layout. ...

    Adds the provided view to the subviews array of this layout.

    \n

    Parameters

    • view : dr.view

      The view to add to this layout.

      \n

    Returns

    • void
      \n
    Checks if the layout is locked or not. ...

    Checks if the layout is locked or not. Should be called by the\n\"update\" method of each layout to check if it is OK to do the update.

    \n

    Returns

    • boolean

      true if not locked, false otherwise.

      \n
    Destroys this node ...

    Destroys this node

    \n
    Called when a subnode is added to this node. ...

    Called when a subnode is added to this node. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to add a subnode. Instead call setParent.

    \n

    Parameters

    • node : dr.node

      The subnode that was added.

      \n

    Returns

    • void
      \n
    Called when a subnode is removed from this node. ...

    Called when a subnode is removed from this node. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to remove a subnode. Instead call _removeFromParent.

    \n

    Parameters

    • node : dr.node

      The subnode that was removed.

      \n

    Returns

    • void
      \n
    ( view ) : boolean
    Checks if a subview can be added to this Layout or not. ...

    Checks if a subview can be added to this Layout or not. The default\nimplementation returns the 'ignorelayout' attributes of the subview.

    \n

    Parameters

    Returns

    • boolean

      True means the subview will be skipped, false otherwise.

      \n
    Removes the provided View from the subviews array of this Layout. ...

    Removes the provided View from the subviews array of this Layout.

    \n

    Parameters

    • view : dr.view

      The view to remove from this layout.

      \n

    Returns

    • number

      the index of the removed subview or -1 if not removed.

      \n
    ( name, value ) : Eventablechainable
    Sends an event ...

    Sends an event

    \n

    Parameters

    • name : String

      the name of the event to send

      \n
    • value : Object

      the value to send with the event

      \n

    Returns

    Sets an attribute, calls a setter if there is one, then sends an event with the new value ...

    Sets an attribute, calls a setter if there is one, then sends an event with the new value

    \n

    Parameters

    • name : String

      the name of the attribute to set

      \n
    • value : Object

      the value to set to

      \n

    Returns

    Calls setAttribute for each name/value pair in the attributes object ...

    Calls setAttribute for each name/value pair in the attributes object

    \n

    Parameters

    • attributes : Object

      An object of name/value pairs to be set

      \n

    Returns

    Calls startMonitoringSubview for all views. ...

    Calls startMonitoringSubview for all views. Used by layout\nimplementations when a change occurs to the layout that requires\nrefreshing all the subview monitoring.

    \n

    Returns

    • void
      \n
    Subclasses should implement this method to start listening to\nevents from the subview that should trigger the update ...

    Subclasses should implement this method to start listening to\nevents from the subview that should trigger the update method.

    \n

    Parameters

    • view : dr.view

      The view to start monitoring for changes.

      \n

    Returns

    • void
      \n
    Calls stopMonitoringSubview for all views. ...

    Calls stopMonitoringSubview for all views. Used by Layout\nimplementations when a change occurs to the layout that requires\nrefreshing all the subview monitoring.

    \n

    Returns

    • void
      \n
    Subclasses should implement this method to stop listening to\nevents from the subview that would trigger the update me...

    Subclasses should implement this method to stop listening to\nevents from the subview that would trigger the update method. This\nshould remove all listeners that were setup in startMonitoringSubview.

    \n

    Parameters

    • view : dr.view

      The view to stop monitoring for changes.

      \n

    Returns

    • void
      \n
    Updates the layout. ...

    Updates the layout. Subclasses should call canUpdate to check lock state\nbefore doing anything.

    \n

    Returns

    • void
      \n
    Defined By

    Events

    Fired when this node and all its children are about to be destroyed ...

    Fired when this node and all its children are about to be destroyed

    \n

    Parameters

    Fired when this node and all its children are completely initialized ...

    Fired when this node and all its children are completely initialized

    \n

    Parameters

    Fired when this node's subnodes array has changed ...

    Fired when this node's subnodes array has changed

    \n

    Parameters

    Fired when a subnode is added to this node. ...

    Fired when a subnode is added to this node.

    \n

    Parameters

    Fired when a subnode is removed from this node. ...

    Fired when a subnode is removed from this node.

    \n

    Parameters

    ","meta":{}}); \ No newline at end of file diff --git a/docs/api/output/dr.dataset.js b/docs/api/output/dr.dataset.js new file mode 100644 index 00000000..15b0a36e --- /dev/null +++ b/docs/api/output/dr.dataset.js @@ -0,0 +1 @@ +Ext.data.JsonP.dr_dataset({"tagname":"class","name":"dr.dataset","autodetected":{},"files":[{"filename":"classdocs.js","href":"classdocs.html#dr-dataset"}],"extends":"dr.node","members":[{"name":"id","tagname":"attribute","owner":"dr.node","id":"attribute-id","meta":{}},{"name":"name","tagname":"attribute","owner":"dr.dataset","id":"attribute-name","meta":{"required":true}},{"name":"scriptincludes","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludes","meta":{}},{"name":"scriptincludeserror","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludeserror","meta":{}},{"name":"url","tagname":"attribute","owner":"dr.dataset","id":"attribute-url","meta":{}},{"name":"data","tagname":"property","owner":"dr.dataset","id":"property-data","meta":{}},{"name":"inited","tagname":"property","owner":"dr.node","id":"property-inited","meta":{"readonly":true}},{"name":"subnodes","tagname":"property","owner":"dr.node","id":"property-subnodes","meta":{"readonly":true}},{"name":"destroy","tagname":"method","owner":"dr.node","id":"method-destroy","meta":{}},{"name":"doSubnodeAdded","tagname":"method","owner":"dr.node","id":"method-doSubnodeAdded","meta":{}},{"name":"doSubnodeRemoved","tagname":"method","owner":"dr.node","id":"method-doSubnodeRemoved","meta":{}},{"name":"sendEvent","tagname":"method","owner":"Eventable","id":"method-sendEvent","meta":{"chainable":true}},{"name":"setAttribute","tagname":"method","owner":"Eventable","id":"method-setAttribute","meta":{"chainable":true}},{"name":"setAttributes","tagname":"method","owner":"Eventable","id":"method-setAttributes","meta":{"chainable":true}},{"name":"ondestroy","tagname":"event","owner":"dr.node","id":"event-ondestroy","meta":{}},{"name":"oninit","tagname":"event","owner":"dr.node","id":"event-oninit","meta":{}},{"name":"onsubnodes","tagname":"event","owner":"dr.node","id":"event-onsubnodes","meta":{}},{"name":"subnodeAdded","tagname":"event","owner":"dr.node","id":"event-subnodeAdded","meta":{}},{"name":"subnodeRemoved","tagname":"event","owner":"dr.node","id":"event-subnodeRemoved","meta":{}}],"alternateClassNames":[],"aliases":{},"id":"class-dr.dataset","short_doc":"Datasets hold onto a set of JSON data, either inline or loaded from a URL. ...","component":false,"superclasses":["Module","Eventable","dr.node"],"subclasses":[],"mixedInto":[],"mixins":[],"parentMixins":[],"requires":[],"uses":[],"html":"

    Hierarchy

    Files

    Datasets hold onto a set of JSON data, either inline or loaded from a URL.\nThey are used with lz.replicator for data binding.

    \n\n

    This example shows how to create a dataset with inline JSON data, and use a replicator to show values inside. Inline datasets are useful for prototyping, especially when your backend server isn't ready yet:

    \n\n
    <dataset name=\"example\">\n {\n   \"store\": {\n     \"book\": [\n       {\n         \"category\": \"reference\",\n         \"author\": \"Nigel Rees\",\n         \"title\": \"Sayings of the Century\",\n         \"price\": 8.95\n       },\n       {\n         \"category\": \"fiction\",\n         \"author\": \"Evelyn Waugh\",\n         \"title\": \"Sword of Honour\",\n         \"price\": 12.99\n       },\n       {\n         \"category\": \"fiction\",\n         \"author\": \"Herman Melville\",\n         \"title\": \"Moby Dick\",\n         \"isbn\": \"0-553-21311-3\",\n         \"price\": 8.99\n       },\n       {\n         \"category\": \"fiction\",\n         \"author\": \"J. R. R. Tolkien\",\n         \"title\": \"The Lord of the Rings\",\n         \"isbn\": \"0-395-19395-8\",\n         \"price\": 22.99\n       }\n     ],\n     \"bicycle\": {\n       \"color\": \"red\",\n       \"price\": 19.95\n     }\n   }\n }\n</dataset>\n<spacedlayout></spacedlayout>\n<replicator classname=\"text\" datapath=\"$example/store/book[*]/title\"></replicator>\n
    \n\n

    Data can be loaded from a URL when your backend server is ready, or reloaded to show changes over time:

    \n\n
    <dataset name=\"example\" url=\"/example.json\"></dataset>\n<spacedlayout></spacedlayout>\n<replicator classname=\"text\" datapath=\"$example/store/book[*]/title\"></replicator>\n
    \n

    Attributes

    Defined By

    Required attributes

    dr.dataset
    view source
    : Stringrequired

    The name of the dataset

    \n

    The name of the dataset

    \n

    Overrides: dr.node.name

    Defined By

    Optional attributes

    Gives this node a global ID, which can be looked up in the global window object. ...

    Gives this node a global ID, which can be looked up in the global window object.\nTake care to not override builtin globals, or override your own instances!

    \n
    A comma separated list of URLs to javascript includes required as dependencies. ...

    A comma separated list of URLs to javascript includes required as dependencies. Useful if you need to ensure a third party library is available.

    \n

    An error to show if scriptincludes fail to load

    \n

    An error to show if scriptincludes fail to load

    \n
    dr.dataset
    view source
    : String

    The url to load JSON data from.

    \n

    The url to load JSON data from.

    \n
    Defined By

    Properties

    dr.dataset
    view source
    : Object

    The data inside the dataset

    \n

    The data inside the dataset

    \n
    : Booleanreadonly

    True when this node and all its children are completely initialized

    \n

    True when this node and all its children are completely initialized

    \n
    An array of this node's child nodes ...

    An array of this node's child nodes

    \n

    Defaults to: []

    Defined By

    Methods

    Destroys this node ...

    Destroys this node

    \n
    Called when a subnode is added to this node. ...

    Called when a subnode is added to this node. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to add a subnode. Instead call setParent.

    \n

    Parameters

    • node : dr.node

      The subnode that was added.

      \n

    Returns

    • void
      \n
    Called when a subnode is removed from this node. ...

    Called when a subnode is removed from this node. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to remove a subnode. Instead call _removeFromParent.

    \n

    Parameters

    • node : dr.node

      The subnode that was removed.

      \n

    Returns

    • void
      \n
    ( name, value ) : Eventablechainable
    Sends an event ...

    Sends an event

    \n

    Parameters

    • name : String

      the name of the event to send

      \n
    • value : Object

      the value to send with the event

      \n

    Returns

    Sets an attribute, calls a setter if there is one, then sends an event with the new value ...

    Sets an attribute, calls a setter if there is one, then sends an event with the new value

    \n

    Parameters

    • name : String

      the name of the attribute to set

      \n
    • value : Object

      the value to set to

      \n

    Returns

    Calls setAttribute for each name/value pair in the attributes object ...

    Calls setAttribute for each name/value pair in the attributes object

    \n

    Parameters

    • attributes : Object

      An object of name/value pairs to be set

      \n

    Returns

    Defined By

    Events

    Fired when this node and all its children are about to be destroyed ...

    Fired when this node and all its children are about to be destroyed

    \n

    Parameters

    Fired when this node and all its children are completely initialized ...

    Fired when this node and all its children are completely initialized

    \n

    Parameters

    Fired when this node's subnodes array has changed ...

    Fired when this node's subnodes array has changed

    \n

    Parameters

    Fired when a subnode is added to this node. ...

    Fired when a subnode is added to this node.

    \n

    Parameters

    Fired when a subnode is removed from this node. ...

    Fired when a subnode is removed from this node.

    \n

    Parameters

    ","meta":{}}); \ No newline at end of file diff --git a/docs/api/output/dr.dragstate.js b/docs/api/output/dr.dragstate.js new file mode 100644 index 00000000..b8499ed5 --- /dev/null +++ b/docs/api/output/dr.dragstate.js @@ -0,0 +1 @@ +Ext.data.JsonP.dr_dragstate({"tagname":"class","name":"dr.dragstate","autodetected":{},"files":[{"filename":"classdocs.js","href":"classdocs.html#dr-dragstate"}],"extends":"dr.state","members":[{"name":"applied","tagname":"attribute","owner":"dr.state","id":"attribute-applied","meta":{}},{"name":"dragaxis","tagname":"attribute","owner":"dr.dragstate","id":"attribute-dragaxis","meta":{}},{"name":"id","tagname":"attribute","owner":"dr.node","id":"attribute-id","meta":{}},{"name":"name","tagname":"attribute","owner":"dr.node","id":"attribute-name","meta":{}},{"name":"scriptincludes","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludes","meta":{}},{"name":"scriptincludeserror","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludeserror","meta":{}},{"name":"inited","tagname":"property","owner":"dr.node","id":"property-inited","meta":{"readonly":true}},{"name":"subnodes","tagname":"property","owner":"dr.node","id":"property-subnodes","meta":{"readonly":true}},{"name":"destroy","tagname":"method","owner":"dr.node","id":"method-destroy","meta":{}},{"name":"doSubnodeAdded","tagname":"method","owner":"dr.node","id":"method-doSubnodeAdded","meta":{}},{"name":"doSubnodeRemoved","tagname":"method","owner":"dr.node","id":"method-doSubnodeRemoved","meta":{}},{"name":"sendEvent","tagname":"method","owner":"Eventable","id":"method-sendEvent","meta":{"chainable":true}},{"name":"setAttribute","tagname":"method","owner":"Eventable","id":"method-setAttribute","meta":{"chainable":true}},{"name":"setAttributes","tagname":"method","owner":"Eventable","id":"method-setAttributes","meta":{"chainable":true}},{"name":"onapplied","tagname":"event","owner":"dr.state","id":"event-onapplied","meta":{}},{"name":"ondestroy","tagname":"event","owner":"dr.node","id":"event-ondestroy","meta":{}},{"name":"oninit","tagname":"event","owner":"dr.node","id":"event-oninit","meta":{}},{"name":"onsubnodes","tagname":"event","owner":"dr.node","id":"event-onsubnodes","meta":{}},{"name":"subnodeAdded","tagname":"event","owner":"dr.node","id":"event-subnodeAdded","meta":{}},{"name":"subnodeRemoved","tagname":"event","owner":"dr.node","id":"event-subnodeRemoved","meta":{}}],"alternateClassNames":[],"aliases":{},"id":"class-dr.dragstate","short_doc":"Allows views to be dragged by the mouse. ...","component":false,"superclasses":["Module","Eventable","dr.node","dr.state"],"subclasses":[],"mixedInto":[],"mixins":[],"parentMixins":[],"requires":[],"uses":[],"html":"

    Hierarchy

    Files

    Allows views to be dragged by the mouse.

    \n\n

    Here is a view that contains a dragstate. The dragstate is applied when the mouse is down in the view, and then removed when the mouse is up. You can modify the attributes of the draggable view by setting them inside the dragstate, like we do here with bgcolor.

    \n\n
    <view width=\"100\" height=\"100\" bgcolor=\"plum\">\n  <attribute name=\"mouseIsDown\" type=\"boolean\" value=\"false\"></attribute>\n  <handler event=\"onmousedown\">\n    this.setAttribute('mouseIsDown', true);\n  </handler>\n  <handler event=\"onmouseup\">\n    this.setAttribute('mouseIsDown', false);\n  </handler>\n  <dragstate applied=\"${this.parent.mouseIsDown}\">\n    <attribute name=\"bgcolor\" type=\"string\" value=\"purple\"></attribute>\n  </dragstate>\n</view>\n
    \n\n

    To constrain the motion of the element to either the x or y axis set the dragaxis property. Here the same purple square can only move horizontally.

    \n\n
    <view width=\"100\" height=\"100\" bgcolor=\"plum\">\n  <attribute name=\"mouseIsDown\" type=\"boolean\" value=\"false\"></attribute>\n  <handler event=\"onmousedown\">\n    this.setAttribute('mouseIsDown', true);\n  </handler>\n  <handler event=\"onmouseup\">\n    this.setAttribute('mouseIsDown', false);\n  </handler>\n  <dragstate applied=\"${this.parent.mouseIsDown}\" dragaxis=\"x\">\n    <attribute name=\"bgcolor\" type=\"string\" value=\"purple\"></attribute>\n  </dragstate>\n</view>\n
    \n
    Defined By

    Attributes

    If true, the state is applied. ...

    If true, the state is applied.

    \n

    Defaults to: false

    dr.dragstate
    view source
    : \"x\"/\"y\"/\"both\"
    The axes to drag on. ...

    The axes to drag on.

    \n

    Defaults to: "both"

    Gives this node a global ID, which can be looked up in the global window object. ...

    Gives this node a global ID, which can be looked up in the global window object.\nTake care to not override builtin globals, or override your own instances!

    \n

    Names this node in its parent scope so it can be referred to later.

    \n

    Names this node in its parent scope so it can be referred to later.

    \n
    A comma separated list of URLs to javascript includes required as dependencies. ...

    A comma separated list of URLs to javascript includes required as dependencies. Useful if you need to ensure a third party library is available.

    \n

    An error to show if scriptincludes fail to load

    \n

    An error to show if scriptincludes fail to load

    \n
    Defined By

    Properties

    : Booleanreadonly

    True when this node and all its children are completely initialized

    \n

    True when this node and all its children are completely initialized

    \n
    An array of this node's child nodes ...

    An array of this node's child nodes

    \n

    Defaults to: []

    Defined By

    Methods

    Destroys this node ...

    Destroys this node

    \n
    Called when a subnode is added to this node. ...

    Called when a subnode is added to this node. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to add a subnode. Instead call setParent.

    \n

    Parameters

    • node : dr.node

      The subnode that was added.

      \n

    Returns

    • void
      \n
    Called when a subnode is removed from this node. ...

    Called when a subnode is removed from this node. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to remove a subnode. Instead call _removeFromParent.

    \n

    Parameters

    • node : dr.node

      The subnode that was removed.

      \n

    Returns

    • void
      \n
    ( name, value ) : Eventablechainable
    Sends an event ...

    Sends an event

    \n

    Parameters

    • name : String

      the name of the event to send

      \n
    • value : Object

      the value to send with the event

      \n

    Returns

    Sets an attribute, calls a setter if there is one, then sends an event with the new value ...

    Sets an attribute, calls a setter if there is one, then sends an event with the new value

    \n

    Parameters

    • name : String

      the name of the attribute to set

      \n
    • value : Object

      the value to set to

      \n

    Returns

    Calls setAttribute for each name/value pair in the attributes object ...

    Calls setAttribute for each name/value pair in the attributes object

    \n

    Parameters

    • attributes : Object

      An object of name/value pairs to be set

      \n

    Returns

    Defined By

    Events

    Fired when the state has been applied or unapplied. ...

    Fired when the state has been applied or unapplied. Onapplied handlers run in the scope of the state itself, see dragstate for an example.

    \n

    Parameters

    • applied : Boolean

      If true, the state was applied.

      \n
    Fired when this node and all its children are about to be destroyed ...

    Fired when this node and all its children are about to be destroyed

    \n

    Parameters

    Fired when this node and all its children are completely initialized ...

    Fired when this node and all its children are completely initialized

    \n

    Parameters

    Fired when this node's subnodes array has changed ...

    Fired when this node's subnodes array has changed

    \n

    Parameters

    Fired when a subnode is added to this node. ...

    Fired when a subnode is added to this node.

    \n

    Parameters

    Fired when a subnode is removed from this node. ...

    Fired when a subnode is removed from this node.

    \n

    Parameters

    ","meta":{}}); \ No newline at end of file diff --git a/docs/api/output/dr.gyro.js b/docs/api/output/dr.gyro.js new file mode 100644 index 00000000..3c40afbf --- /dev/null +++ b/docs/api/output/dr.gyro.js @@ -0,0 +1 @@ +Ext.data.JsonP.dr_gyro({"tagname":"class","name":"dr.gyro","autodetected":{},"files":[{"filename":"classdocs.js","href":"classdocs.html#dr-gyro"}],"extends":"dr.node","members":[{"name":"alpha","tagname":"attribute","owner":"dr.gyro","id":"attribute-alpha","meta":{}},{"name":"beta","tagname":"attribute","owner":"dr.gyro","id":"attribute-beta","meta":{}},{"name":"compass","tagname":"attribute","owner":"dr.gyro","id":"attribute-compass","meta":{}},{"name":"compassaccuracy","tagname":"attribute","owner":"dr.gyro","id":"attribute-compassaccuracy","meta":{}},{"name":"gamma","tagname":"attribute","owner":"dr.gyro","id":"attribute-gamma","meta":{}},{"name":"id","tagname":"attribute","owner":"dr.node","id":"attribute-id","meta":{}},{"name":"name","tagname":"attribute","owner":"dr.node","id":"attribute-name","meta":{}},{"name":"scriptincludes","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludes","meta":{}},{"name":"scriptincludeserror","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludeserror","meta":{}},{"name":"x","tagname":"attribute","owner":"dr.gyro","id":"attribute-x","meta":{}},{"name":"y","tagname":"attribute","owner":"dr.gyro","id":"attribute-y","meta":{}},{"name":"z","tagname":"attribute","owner":"dr.gyro","id":"attribute-z","meta":{}},{"name":"inited","tagname":"property","owner":"dr.node","id":"property-inited","meta":{"readonly":true}},{"name":"subnodes","tagname":"property","owner":"dr.node","id":"property-subnodes","meta":{"readonly":true}},{"name":"destroy","tagname":"method","owner":"dr.node","id":"method-destroy","meta":{}},{"name":"doSubnodeAdded","tagname":"method","owner":"dr.node","id":"method-doSubnodeAdded","meta":{}},{"name":"doSubnodeRemoved","tagname":"method","owner":"dr.node","id":"method-doSubnodeRemoved","meta":{}},{"name":"sendEvent","tagname":"method","owner":"Eventable","id":"method-sendEvent","meta":{"chainable":true}},{"name":"setAttribute","tagname":"method","owner":"Eventable","id":"method-setAttribute","meta":{"chainable":true}},{"name":"setAttributes","tagname":"method","owner":"Eventable","id":"method-setAttributes","meta":{"chainable":true}},{"name":"ondestroy","tagname":"event","owner":"dr.node","id":"event-ondestroy","meta":{}},{"name":"oninit","tagname":"event","owner":"dr.node","id":"event-oninit","meta":{}},{"name":"onsubnodes","tagname":"event","owner":"dr.node","id":"event-onsubnodes","meta":{}},{"name":"subnodeAdded","tagname":"event","owner":"dr.node","id":"event-subnodeAdded","meta":{}},{"name":"subnodeRemoved","tagname":"event","owner":"dr.node","id":"event-subnodeRemoved","meta":{}}],"alternateClassNames":[],"aliases":{},"id":"class-dr.gyro","short_doc":"Receives gyroscope and compass data where available. ...","component":false,"superclasses":["Module","Eventable","dr.node"],"subclasses":[],"mixedInto":[],"mixins":[],"parentMixins":[],"requires":[],"uses":[],"html":"

    Hierarchy

    Files

    Defined By

    Attributes

    : Number
    (readonly)\nThe gyro alpha value rotating around the z axis ...

    (readonly)\nThe gyro alpha value rotating around the z axis

    \n

    Defaults to: 0

    : Number
    (readonly)\nThe gyro beta value rotating around the x axis ...

    (readonly)\nThe gyro beta value rotating around the x axis

    \n

    Defaults to: 0

    : Number
    (readonly)\nThe compass orientation, see https://developer.apple.com/library/safari/documentation/SafariDOMAdditions/R...
    (readonly)\nThe compass accuracy, see https://developer.apple.com/library/safari/documentation/SafariDOMAdditions/Refe...
    : Number
    (readonly)\nThe gyro gamma value rotating around the y axis ...

    (readonly)\nThe gyro gamma value rotating around the y axis

    \n

    Defaults to: 0

    Gives this node a global ID, which can be looked up in the global window object. ...

    Gives this node a global ID, which can be looked up in the global window object.\nTake care to not override builtin globals, or override your own instances!

    \n

    Names this node in its parent scope so it can be referred to later.

    \n

    Names this node in its parent scope so it can be referred to later.

    \n
    A comma separated list of URLs to javascript includes required as dependencies. ...

    A comma separated list of URLs to javascript includes required as dependencies. Useful if you need to ensure a third party library is available.

    \n

    An error to show if scriptincludes fail to load

    \n

    An error to show if scriptincludes fail to load

    \n
    : Number
    (readonly)\nThe accelerometer x value ...

    (readonly)\nThe accelerometer x value

    \n

    Defaults to: 0

    : Number
    (readonly)\nThe accelerometer y value ...

    (readonly)\nThe accelerometer y value

    \n

    Defaults to: 0

    : Number
    (readonly)\nThe accelerometer z value ...

    (readonly)\nThe accelerometer z value

    \n

    Defaults to: 0

    Defined By

    Properties

    : Booleanreadonly

    True when this node and all its children are completely initialized

    \n

    True when this node and all its children are completely initialized

    \n
    An array of this node's child nodes ...

    An array of this node's child nodes

    \n

    Defaults to: []

    Defined By

    Methods

    Destroys this node ...

    Destroys this node

    \n
    Called when a subnode is added to this node. ...

    Called when a subnode is added to this node. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to add a subnode. Instead call setParent.

    \n

    Parameters

    • node : dr.node

      The subnode that was added.

      \n

    Returns

    • void
      \n
    Called when a subnode is removed from this node. ...

    Called when a subnode is removed from this node. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to remove a subnode. Instead call _removeFromParent.

    \n

    Parameters

    • node : dr.node

      The subnode that was removed.

      \n

    Returns

    • void
      \n
    ( name, value ) : Eventablechainable
    Sends an event ...

    Sends an event

    \n

    Parameters

    • name : String

      the name of the event to send

      \n
    • value : Object

      the value to send with the event

      \n

    Returns

    Sets an attribute, calls a setter if there is one, then sends an event with the new value ...

    Sets an attribute, calls a setter if there is one, then sends an event with the new value

    \n

    Parameters

    • name : String

      the name of the attribute to set

      \n
    • value : Object

      the value to set to

      \n

    Returns

    Calls setAttribute for each name/value pair in the attributes object ...

    Calls setAttribute for each name/value pair in the attributes object

    \n

    Parameters

    • attributes : Object

      An object of name/value pairs to be set

      \n

    Returns

    Defined By

    Events

    Fired when this node and all its children are about to be destroyed ...

    Fired when this node and all its children are about to be destroyed

    \n

    Parameters

    Fired when this node and all its children are completely initialized ...

    Fired when this node and all its children are completely initialized

    \n

    Parameters

    Fired when this node's subnodes array has changed ...

    Fired when this node's subnodes array has changed

    \n

    Parameters

    Fired when a subnode is added to this node. ...

    Fired when a subnode is added to this node.

    \n

    Parameters

    Fired when a subnode is removed from this node. ...

    Fired when a subnode is removed from this node.

    \n

    Parameters

    ","meta":{}}); \ No newline at end of file diff --git a/docs/api/output/dr.handler.js b/docs/api/output/dr.handler.js new file mode 100644 index 00000000..bcc59aa3 --- /dev/null +++ b/docs/api/output/dr.handler.js @@ -0,0 +1 @@ +Ext.data.JsonP.dr_handler({"tagname":"class","name":"dr.handler","autodetected":{},"files":[{"filename":"layout.js","href":"layout.html#dr-handler"}],"members":[{"name":"args","tagname":"attribute","owner":"dr.handler","id":"attribute-args","meta":{}},{"name":"event","tagname":"attribute","owner":"dr.handler","id":"attribute-event","meta":{"required":true}},{"name":"method","tagname":"attribute","owner":"dr.handler","id":"attribute-method","meta":{}},{"name":"reference","tagname":"attribute","owner":"dr.handler","id":"attribute-reference","meta":{}},{"name":"type","tagname":"attribute","owner":"dr.handler","id":"attribute-type","meta":{}}],"alternateClassNames":[],"aliases":{},"id":"class-dr.handler","short_doc":"Declares a handler in a node, view, class or other class instance. ...","component":false,"superclasses":[],"subclasses":[],"mixedInto":[],"mixins":[],"parentMixins":[],"requires":[],"uses":[],"html":"

    Files

    Declares a handler in a node, view, class or other class instance. Handlers can only be created with the <handler></handler> tag syntax.

    \n\n

    Handlers are called when an event fires with new value, if available.

    \n\n

    Here is a simple handler that listens for an onx event in the local scope. The handler runs when x changes:

    \n\n
    <handler event=\"onx\">\n  // do something now that x has changed\n</handler>\n
    \n\n

    When a handler uses the args attribute, it can recieve the value that changed:

    \n\n

    Sometimes it's nice to use a single method to respond to multiple events:

    \n\n
    <handler event=\"onx\" method=\"handlePosition\"></handler>\n<handler event=\"ony\" method=\"handlePosition\"></handler>\n<method name=\"handlePosition\">\n  // do something now that x or y have changed\n</method>\n
    \n\n

    When a handler uses the args attribute, it can receive the value that changed:

    \n\n
    <handler event=\"onwidth\" args=\"widthValue\">\n   exampleLabel.setAttribute(\"text\", \"Parent view received width value of \" + widthValue)\n</handler>\n\n<text id=\"exampleLabel\" x=\"50\" y=\"5\" text=\"no value yet\" color=\"coral\" outline=\"1px dotted coral\" padding=\"10px\"></text>\n<text x=\"50\" y=\"${exampleLabel.y + exampleLabel.height + 20}\" text=\"no value yet\" color=\"white\" bgcolor=\"#DDAA00\" padding=\"10px\">\n  <handler event=\"onwidth\" args=\"wValue\">\n     this.setAttribute(\"text\", \"This label received width value of \" + wValue)\n  </handler>\n</text>\n
    \n\n

    It's also possible to listen for events on another scope. This handler listens for onidle events on dr.idle instead of the local scope:

    \n\n
    <handler event=\"onidle\" args=\"time\" reference=\"dr.idle\">\n  exampleLabel.setAttribute('text', 'received time from dr.idle.onidle: ' + Math.round(time));\n</handler>\n<text id=\"exampleLabel\" x=\"50\" y=\"5\" text=\"no value yet\" color=\"coral\" outline=\"1px dotted coral\" padding=\"10px\"></text>\n
    \n

    Attributes

    Defined By

    Required attributes

    dr.handler
    view source
    : Stringrequired
    The name of the event to listen for, e.g. ...

    The name of the event to listen for, e.g. 'onwidth'.

    \n
    Defined By

    Optional attributes

    dr.handler
    view source
    : String[]

    A comma separated list of method arguments.

    \n

    A comma separated list of method arguments.

    \n
    dr.handler
    view source
    : String
    If set, the handler call a local method. ...

    If set, the handler call a local method. Useful when multiple handlers need to do the same thing.

    \n
    dr.handler
    view source
    : String

    If set, the handler will listen for an event in another scope.

    \n

    If set, the handler will listen for an event in another scope.

    \n
    dr.handler
    view source
    : \"js\"/\"coffee\"
    The compiler to use for this method. ...

    The compiler to use for this method. Inherits from the immediate class if unspecified.

    \n
    ","meta":{}}); \ No newline at end of file diff --git a/docs/api/output/dr.idle.js b/docs/api/output/dr.idle.js new file mode 100644 index 00000000..4b23162e --- /dev/null +++ b/docs/api/output/dr.idle.js @@ -0,0 +1 @@ +Ext.data.JsonP.dr_idle({"tagname":"class","name":"dr.idle","autodetected":{},"files":[{"filename":"layout.js","href":"layout.html#dr-idle"}],"extends":"Eventable","members":[{"name":"sendEvent","tagname":"method","owner":"Eventable","id":"method-sendEvent","meta":{"chainable":true}},{"name":"setAttribute","tagname":"method","owner":"Eventable","id":"method-setAttribute","meta":{"chainable":true}},{"name":"setAttributes","tagname":"method","owner":"Eventable","id":"method-setAttributes","meta":{"chainable":true}},{"name":"onidle","tagname":"event","owner":"dr.idle","id":"event-onidle","meta":{}}],"alternateClassNames":[],"aliases":{},"id":"class-dr.idle","short_doc":"Sends onidle events when the application is active and idle. ...","component":false,"superclasses":["Module","Eventable"],"subclasses":[],"mixedInto":[],"mixins":[],"parentMixins":[],"requires":[],"uses":[],"html":"

    Hierarchy

    Files

    Sends onidle events when the application is active and idle.

    \n\n
    <handler event=\"onidle\" reference=\"dr.idle\" args=\"idleStatus\">\n  milis.setAttribute('text', idleStatus);\n</handler>\n\n<spacedlayout></spacedlayout>\n<text text=\"Miliseconds since app started: \"></text>\n<text id=\"milis\"></text>\n
    \n
    Defined By

    Methods

    ( name, value ) : Eventablechainable
    Sends an event ...

    Sends an event

    \n

    Parameters

    • name : String

      the name of the event to send

      \n
    • value : Object

      the value to send with the event

      \n

    Returns

    Sets an attribute, calls a setter if there is one, then sends an event with the new value ...

    Sets an attribute, calls a setter if there is one, then sends an event with the new value

    \n

    Parameters

    • name : String

      the name of the attribute to set

      \n
    • value : Object

      the value to set to

      \n

    Returns

    Calls setAttribute for each name/value pair in the attributes object ...

    Calls setAttribute for each name/value pair in the attributes object

    \n

    Parameters

    • attributes : Object

      An object of name/value pairs to be set

      \n

    Returns

    Defined By

    Events

    ( time )
    Fired when the application is active and idle. ...

    Fired when the application is active and idle.

    \n

    Parameters

    • time : Number

      The number of milliseconds since the application started

      \n
    ","meta":{}}); \ No newline at end of file diff --git a/docs/api/output/dr.inputtext.js b/docs/api/output/dr.inputtext.js new file mode 100644 index 00000000..757fe17e --- /dev/null +++ b/docs/api/output/dr.inputtext.js @@ -0,0 +1 @@ +Ext.data.JsonP.dr_inputtext({"tagname":"class","name":"dr.inputtext","autodetected":{},"files":[{"filename":"layout.js","href":"layout.html#dr-inputtext"}],"extends":"dr.view","members":[{"name":"bgcolor","tagname":"attribute","owner":"dr.view","id":"attribute-bgcolor","meta":{}},{"name":"border","tagname":"attribute","owner":"dr.view","id":"attribute-border","meta":{}},{"name":"bordercolor","tagname":"attribute","owner":"dr.view","id":"attribute-bordercolor","meta":{}},{"name":"borderstyle","tagname":"attribute","owner":"dr.view","id":"attribute-borderstyle","meta":{}},{"name":"clickable","tagname":"attribute","owner":"dr.view","id":"attribute-clickable","meta":{}},{"name":"clip","tagname":"attribute","owner":"dr.view","id":"attribute-clip","meta":{}},{"name":"height","tagname":"attribute","owner":"dr.view","id":"attribute-height","meta":{}},{"name":"id","tagname":"attribute","owner":"dr.node","id":"attribute-id","meta":{}},{"name":"multiline","tagname":"attribute","owner":"dr.inputtext","id":"attribute-multiline","meta":{}},{"name":"name","tagname":"attribute","owner":"dr.node","id":"attribute-name","meta":{}},{"name":"padding","tagname":"attribute","owner":"dr.view","id":"attribute-padding","meta":{}},{"name":"scriptincludes","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludes","meta":{}},{"name":"scriptincludeserror","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludeserror","meta":{}},{"name":"scrollable","tagname":"attribute","owner":"dr.view","id":"attribute-scrollable","meta":{}},{"name":"text","tagname":"attribute","owner":"dr.inputtext","id":"attribute-text","meta":{}},{"name":"visible","tagname":"attribute","owner":"dr.view","id":"attribute-visible","meta":{}},{"name":"width","tagname":"attribute","owner":"dr.inputtext","id":"attribute-width","meta":{}},{"name":"x","tagname":"attribute","owner":"dr.view","id":"attribute-x","meta":{}},{"name":"y","tagname":"attribute","owner":"dr.view","id":"attribute-y","meta":{}},{"name":"ignorelayout","tagname":"property","owner":"dr.view","id":"property-ignorelayout","meta":{}},{"name":"inited","tagname":"property","owner":"dr.node","id":"property-inited","meta":{"readonly":true}},{"name":"layouts","tagname":"property","owner":"dr.view","id":"property-layouts","meta":{"readonly":true}},{"name":"subnodes","tagname":"property","owner":"dr.node","id":"property-subnodes","meta":{"readonly":true}},{"name":"subviews","tagname":"property","owner":"dr.view","id":"property-subviews","meta":{"readonly":true}},{"name":"animate","tagname":"method","owner":"dr.view","id":"method-animate","meta":{"chainable":true}},{"name":"destroy","tagname":"method","owner":"dr.node","id":"method-destroy","meta":{}},{"name":"doLayoutAdded","tagname":"method","owner":"dr.view","id":"method-doLayoutAdded","meta":{}},{"name":"doLayoutRemoved","tagname":"method","owner":"dr.view","id":"method-doLayoutRemoved","meta":{}},{"name":"doSubnodeAdded","tagname":"method","owner":"dr.view","id":"method-doSubnodeAdded","meta":{}},{"name":"doSubnodeRemoved","tagname":"method","owner":"dr.view","id":"method-doSubnodeRemoved","meta":{}},{"name":"doSubviewAdded","tagname":"method","owner":"dr.view","id":"method-doSubviewAdded","meta":{}},{"name":"doSubviewRemoved","tagname":"method","owner":"dr.view","id":"method-doSubviewRemoved","meta":{}},{"name":"sendEvent","tagname":"method","owner":"Eventable","id":"method-sendEvent","meta":{"chainable":true}},{"name":"setAttribute","tagname":"method","owner":"Eventable","id":"method-setAttribute","meta":{"chainable":true}},{"name":"setAttributes","tagname":"method","owner":"Eventable","id":"method-setAttributes","meta":{"chainable":true}},{"name":"layoutAdded","tagname":"event","owner":"dr.view","id":"event-layoutAdded","meta":{}},{"name":"layoutRemoved","tagname":"event","owner":"dr.view","id":"event-layoutRemoved","meta":{}},{"name":"onclick","tagname":"event","owner":"dr.view","id":"event-onclick","meta":{}},{"name":"ondestroy","tagname":"event","owner":"dr.node","id":"event-ondestroy","meta":{}},{"name":"oninit","tagname":"event","owner":"dr.node","id":"event-oninit","meta":{}},{"name":"onlayouts","tagname":"event","owner":"dr.view","id":"event-onlayouts","meta":{}},{"name":"onmousedown","tagname":"event","owner":"dr.view","id":"event-onmousedown","meta":{}},{"name":"onmouseout","tagname":"event","owner":"dr.view","id":"event-onmouseout","meta":{}},{"name":"onmouseover","tagname":"event","owner":"dr.view","id":"event-onmouseover","meta":{}},{"name":"onmouseup","tagname":"event","owner":"dr.view","id":"event-onmouseup","meta":{}},{"name":"onsubnodes","tagname":"event","owner":"dr.node","id":"event-onsubnodes","meta":{}},{"name":"onsubviews","tagname":"event","owner":"dr.view","id":"event-onsubviews","meta":{}},{"name":"subnodeAdded","tagname":"event","owner":"dr.node","id":"event-subnodeAdded","meta":{}},{"name":"subnodeRemoved","tagname":"event","owner":"dr.node","id":"event-subnodeRemoved","meta":{}},{"name":"subviewAdded","tagname":"event","owner":"dr.view","id":"event-subviewAdded","meta":{}},{"name":"subviewRemoved","tagname":"event","owner":"dr.view","id":"event-subviewRemoved","meta":{}}],"alternateClassNames":[],"aliases":{},"id":"class-dr.inputtext","short_doc":"Provides an editable input text field. ...","component":false,"superclasses":["Module","Eventable","dr.node","dr.view"],"subclasses":[],"mixedInto":[],"mixins":[],"parentMixins":[],"requires":[],"uses":[],"html":"

    Hierarchy

    Files

    Provides an editable input text field.

    \n\n
    <spacedlayout axis=\"y\"></spacedlayout>\n\n<text text=\"Enter your name\"></text>\n\n<inputtext id=\"nameinput\" bgcolor=\"white\" border=\"1px solid lightgrey\" width=\"200\"></inputtext>\n\n<labelbutton text=\"submit\">\n  <handler event=\"onclick\">\n    welcome.setAttribute('text', 'Welcome ' + nameinput.text);\n  </handler>\n</labelbutton>\n\n<text id=\"welcome\"></text>\n
    \n\n

    It's possible to listen for an onchange event to find out when the user changed the inputtext value:

    \n\n
    <inputtext id=\"nameinput\" bgcolor=\"white\" border=\"1px solid lightgrey\" width=\"200\" onchange=\"console.log('onchange', this.text)\"></inputtext>\n
    \n
    Defined By

    Attributes

    Sets this view's background color

    \n

    Sets this view's background color

    \n

    Sets this view's border width

    \n

    Sets this view's border width

    \n

    Sets this view's border color

    \n

    Sets this view's border color

    \n

    Sets this view's border style (can be any css border-style value)

    \n

    Sets this view's border style (can be any css border-style value)

    \n
    If true, this view recieves mouse events. ...

    If true, this view recieves mouse events. Automatically set to true when an onclick/mouse* event is registered for this view.

    \n

    Defaults to: false

    If true, this view clips to its bounds ...

    If true, this view clips to its bounds

    \n

    Defaults to: false

    This view's height ...

    This view's height

    \n

    Defaults to: 0

    Gives this node a global ID, which can be looked up in the global window object. ...

    Gives this node a global ID, which can be looked up in the global window object.\nTake care to not override builtin globals, or override your own instances!

    \n
    dr.inputtext
    view source
    : Boolean
    Set to true to show multi-line text. ...

    Set to true to show multi-line text.

    \n

    Defaults to: false

    Names this node in its parent scope so it can be referred to later.

    \n

    Names this node in its parent scope so it can be referred to later.

    \n

    Sets this view's padding

    \n

    Sets this view's padding

    \n
    A comma separated list of URLs to javascript includes required as dependencies. ...

    A comma separated list of URLs to javascript includes required as dependencies. Useful if you need to ensure a third party library is available.

    \n

    An error to show if scriptincludes fail to load

    \n

    An error to show if scriptincludes fail to load

    \n
    If true, this view clips to its bounds and provides scrolling to see content that overflows the bounds ...

    If true, this view clips to its bounds and provides scrolling to see content that overflows the bounds

    \n

    Defaults to: false

    dr.inputtext
    view source
    : String

    The text inside this input text field

    \n

    The text inside this input text field

    \n
    If false, this view is invisible ...

    If false, this view is invisible

    \n

    Defaults to: true

    dr.inputtext
    view source
    : Number
    The width of this input text field ...

    The width of this input text field

    \n

    Defaults to: 100

    Overrides: dr.view.width

    This view's x position ...

    This view's x position

    \n

    Defaults to: 0

    This view's y position ...

    This view's y position

    \n

    Defaults to: 0

    Defined By

    Properties

    If true, layouts should ignore this view

    \n

    If true, layouts should ignore this view

    \n
    : Booleanreadonly

    True when this node and all its children are completely initialized

    \n

    True when this node and all its children are completely initialized

    \n
    An array of this views's layouts. ...

    An array of this views's layouts. Only defined when needed.

    \n
    An array of this node's child nodes ...

    An array of this node's child nodes

    \n

    Defaults to: []

    An array of this views's child views

    \n

    An array of this views's child views

    \n
    Defined By

    Methods

    ( obj, Number ) : dr.viewchainable
    Animates this view's attribute(s) ...

    Animates this view's attribute(s)

    \n

    Parameters

    • obj : Object

      A hash of attribute names and values to animate to

      \n
    • Number : Object

      duration The duration of the animation in milliseconds

      \n

    Returns

    Destroys this node ...

    Destroys this node

    \n
    Called when a layout is added to this view. ...

    Called when a layout is added to this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to add a layout. Instead call setParent.

    \n

    Parameters

    • layout : dr.layout

      The layout that was added.

      \n

    Returns

    • void
      \n
    Called when a layout is removed from this view. ...

    Called when a layout is removed from this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to remove a layout. Instead call _removeFromParent.

    \n

    Parameters

    • layout : dr.layout

      The layout that was removed.

      \n

    Returns

    • void
      \n
    Calls doSubviewAdded/doLayoutAdded if the added subnode is a view or\nlayout respectively. ...

    Calls doSubviewAdded/doLayoutAdded if the added subnode is a view or\nlayout respectively. Subclasses should call super.

    \n

    Parameters

    • node : Object

    Overrides: dr.node.doSubnodeAdded

    Calls doSubviewRemoved/doLayoutRemoved if the removed subnode is a view or\nlayout respectively. ...

    Calls doSubviewRemoved/doLayoutRemoved if the removed subnode is a view or\nlayout respectively. Subclasses should call super.

    \n

    Parameters

    • node : Object

    Overrides: dr.node.doSubnodeRemoved

    Called when a subview is added to this view. ...

    Called when a subview is added to this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to add a subview. Instead call setParent.

    \n

    Parameters

    • sv : dr.view

      The subview that was added.

      \n

    Returns

    • void
      \n
    Called when a subview is removed from this view. ...

    Called when a subview is removed from this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to remove a subview. Instead call _removeFromParent.

    \n

    Parameters

    • sv : dr.view

      The subview that was removed.

      \n

    Returns

    • void
      \n
    ( name, value ) : Eventablechainable
    Sends an event ...

    Sends an event

    \n

    Parameters

    • name : String

      the name of the event to send

      \n
    • value : Object

      the value to send with the event

      \n

    Returns

    Sets an attribute, calls a setter if there is one, then sends an event with the new value ...

    Sets an attribute, calls a setter if there is one, then sends an event with the new value

    \n

    Parameters

    • name : String

      the name of the attribute to set

      \n
    • value : Object

      the value to set to

      \n

    Returns

    Calls setAttribute for each name/value pair in the attributes object ...

    Calls setAttribute for each name/value pair in the attributes object

    \n

    Parameters

    • attributes : Object

      An object of name/value pairs to be set

      \n

    Returns

    Defined By

    Events

    Fired when a layout is added to this view. ...

    Fired when a layout is added to this view.

    \n

    Parameters

    Fired when a layout is removed from this view. ...

    Fired when a layout is removed from this view.

    \n

    Parameters

    Fired when this view is clicked ...

    Fired when this view is clicked

    \n

    Parameters

    Fired when this node and all its children are about to be destroyed ...

    Fired when this node and all its children are about to be destroyed

    \n

    Parameters

    Fired when this node and all its children are completely initialized ...

    Fired when this node and all its children are completely initialized

    \n

    Parameters

    Fired when this views's layouts array has changed ...

    Fired when this views's layouts array has changed

    \n

    Parameters

    Fired when the mouse goes down on this view ...

    Fired when the mouse goes down on this view

    \n

    Parameters

    Fired when the mouse moves off this view ...

    Fired when the mouse moves off this view

    \n

    Parameters

    Fired when the mouse moves over this view ...

    Fired when the mouse moves over this view

    \n

    Parameters

    Fired when the mouse goes up on this view ...

    Fired when the mouse goes up on this view

    \n

    Parameters

    Fired when this node's subnodes array has changed ...

    Fired when this node's subnodes array has changed

    \n

    Parameters

    Fired when this views's subviews array has changed ...

    Fired when this views's subviews array has changed

    \n

    Parameters

    Fired when a subnode is added to this node. ...

    Fired when a subnode is added to this node.

    \n

    Parameters

    Fired when a subnode is removed from this node. ...

    Fired when a subnode is removed from this node.

    \n

    Parameters

    Fired when a subview is added to this view. ...

    Fired when a subview is added to this view.

    \n

    Parameters

    Fired when a subview is removed from this view. ...

    Fired when a subview is removed from this view.

    \n

    Parameters

    ","meta":{}}); \ No newline at end of file diff --git a/docs/api/output/dr.js b/docs/api/output/dr.js new file mode 100644 index 00000000..b6e0aabb --- /dev/null +++ b/docs/api/output/dr.js @@ -0,0 +1 @@ +Ext.data.JsonP.dr({"tagname":"class","name":"dr","autodetected":{},"files":[{"filename":"layout.js","href":"layout.html#dr"}],"members":[{"name":"initElements","tagname":"method","owner":"dr","id":"method-initElements","meta":{}},{"name":"writeCSS","tagname":"method","owner":"dr","id":"method-writeCSS","meta":{}}],"alternateClassNames":[],"aliases":{},"id":"class-dr","short_doc":"Holds builtin and user-created classes and public APIs. ...","component":false,"superclasses":[],"subclasses":[],"mixedInto":[],"mixins":[],"parentMixins":[],"requires":[],"uses":[],"html":"

    Files

    Holds builtin and user-created classes and public APIs.

    \n\n

    All classes listed here can be invoked with the declarative syntax, e.g. <node></node> or <view></view>

    \n
    Defined By

    Methods

    Initializes all top-level views found in the document. ...

    Initializes all top-level views found in the document. Called automatically when the page loads, but can be called manually as needed.

    \n
    Writes generic dreem-specific CSS to the document. ...

    Writes generic dreem-specific CSS to the document. Should only be called once.

    \n
    ","meta":{}}); \ No newline at end of file diff --git a/docs/api/output/dr.keyboard.js b/docs/api/output/dr.keyboard.js new file mode 100644 index 00000000..a425b333 --- /dev/null +++ b/docs/api/output/dr.keyboard.js @@ -0,0 +1 @@ +Ext.data.JsonP.dr_keyboard({"tagname":"class","name":"dr.keyboard","autodetected":{},"files":[{"filename":"layout.js","href":"layout.html#dr-keyboard"}],"extends":"Eventable","members":[{"name":"sendEvent","tagname":"method","owner":"Eventable","id":"method-sendEvent","meta":{"chainable":true}},{"name":"setAttribute","tagname":"method","owner":"Eventable","id":"method-setAttribute","meta":{"chainable":true}},{"name":"setAttributes","tagname":"method","owner":"Eventable","id":"method-setAttributes","meta":{"chainable":true}},{"name":"onchange","tagname":"event","owner":"dr.keyboard","id":"event-onchange","meta":{}},{"name":"onkeydown","tagname":"event","owner":"dr.keyboard","id":"event-onkeydown","meta":{}},{"name":"onkeys","tagname":"event","owner":"dr.keyboard","id":"event-onkeys","meta":{}},{"name":"onkeyup","tagname":"event","owner":"dr.keyboard","id":"event-onkeyup","meta":{}},{"name":"onselect","tagname":"event","owner":"dr.keyboard","id":"event-onselect","meta":{}}],"alternateClassNames":[],"aliases":{},"id":"class-dr.keyboard","short_doc":"Sends keyboard events. ...","component":false,"superclasses":["Module","Eventable"],"subclasses":[],"mixedInto":[],"mixins":[],"parentMixins":[],"requires":[],"uses":[],"html":"

    Hierarchy

    Module
    Eventable
    dr.keyboard

    Files

    Sends keyboard events.

    \n\n

    You might want to track specific keyboard events when text is being entered into an input box. In this example we listen for the enter key and display the value.

    \n\n
    <spacedlayout axis=\"y\" spacing=\"25\"></spacedlayout>\n<inputtext id=\"nameinput\" bgcolor=\"lightgrey\"></inputtext>\n<text id=\"keycode\" text=\"Key Code:\"></text>\n<text id=\"entered\"></text>\n\n<handler event=\"onkeyup\" args=\"keys\" reference=\"dr.keyboard\">\n  keycode.setAttribute('text', 'Key Code: ' + keys.keyCode);\n  if (keys.keyCode == 13) {\n    entered.setAttribute('text', 'You entered: ' + nameinput.text);\n    nameinput.setAttribute('text', '');\n  }\n</handler>\n
    \n
    Defined By

    Methods

    ( name, value ) : Eventablechainable
    Sends an event ...

    Sends an event

    \n

    Parameters

    • name : String

      the name of the event to send

      \n
    • value : Object

      the value to send with the event

      \n

    Returns

    Sets an attribute, calls a setter if there is one, then sends an event with the new value ...

    Sets an attribute, calls a setter if there is one, then sends an event with the new value

    \n

    Parameters

    • name : String

      the name of the attribute to set

      \n
    • value : Object

      the value to set to

      \n

    Returns

    Calls setAttribute for each name/value pair in the attributes object ...

    Calls setAttribute for each name/value pair in the attributes object

    \n

    Parameters

    • attributes : Object

      An object of name/value pairs to be set

      \n

    Returns

    Defined By

    Events

    dr.keyboard
    view source
    ( view )
    Fired when an inputtext has changed ...

    Fired when an inputtext has changed

    \n

    Parameters

    • view : dr.view

      The view that fired the event

      \n
    dr.keyboard
    view source
    ( keys )
    Fired when a key goes down ...

    Fired when a key goes down

    \n

    Parameters

    • keys : Object

      An object representing the keyboard state, including shiftKey, allocation, ctrlKey, metaKey, keyCode and type

      \n
    dr.keyboard
    view source
    ( keys )
    Fired when a key is pressed on the keyboard ...

    Fired when a key is pressed on the keyboard

    \n

    Parameters

    • keys : Object

      An object representing the keyboard state, including shiftKey, allocation, ctrlKey, metaKey, keyCode and type

      \n
    dr.keyboard
    view source
    ( keys )
    Fired when a key goes up ...

    Fired when a key goes up

    \n

    Parameters

    • keys : Object

      An object representing the keyboard state, including shiftKey, allocation, ctrlKey, metaKey, keyCode and type

      \n
    dr.keyboard
    view source
    ( view )
    Fired when text is selected ...

    Fired when text is selected

    \n

    Parameters

    • view : dr.view

      The view that fired the event

      \n
    ","meta":{}}); \ No newline at end of file diff --git a/docs/api/output/dr.labelbutton.js b/docs/api/output/dr.labelbutton.js new file mode 100644 index 00000000..fddbb674 --- /dev/null +++ b/docs/api/output/dr.labelbutton.js @@ -0,0 +1 @@ +Ext.data.JsonP.dr_labelbutton({"tagname":"class","name":"dr.labelbutton","autodetected":{},"files":[{"filename":"classdocs.js","href":"classdocs.html#dr-labelbutton"}],"extends":"dr.buttonbase","members":[{"name":"bgcolor","tagname":"attribute","owner":"dr.view","id":"attribute-bgcolor","meta":{}},{"name":"border","tagname":"attribute","owner":"dr.view","id":"attribute-border","meta":{}},{"name":"bordercolor","tagname":"attribute","owner":"dr.view","id":"attribute-bordercolor","meta":{}},{"name":"borderstyle","tagname":"attribute","owner":"dr.view","id":"attribute-borderstyle","meta":{}},{"name":"clickable","tagname":"attribute","owner":"dr.view","id":"attribute-clickable","meta":{}},{"name":"clip","tagname":"attribute","owner":"dr.view","id":"attribute-clip","meta":{}},{"name":"defaultcolor","tagname":"attribute","owner":"dr.buttonbase","id":"attribute-defaultcolor","meta":{}},{"name":"height","tagname":"attribute","owner":"dr.view","id":"attribute-height","meta":{}},{"name":"id","tagname":"attribute","owner":"dr.node","id":"attribute-id","meta":{}},{"name":"name","tagname":"attribute","owner":"dr.node","id":"attribute-name","meta":{}},{"name":"padding","tagname":"attribute","owner":"dr.buttonbase","id":"attribute-padding","meta":{}},{"name":"scriptincludes","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludes","meta":{}},{"name":"scriptincludeserror","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludeserror","meta":{}},{"name":"scrollable","tagname":"attribute","owner":"dr.view","id":"attribute-scrollable","meta":{}},{"name":"selectcolor","tagname":"attribute","owner":"dr.buttonbase","id":"attribute-selectcolor","meta":{}},{"name":"selected","tagname":"attribute","owner":"dr.buttonbase","id":"attribute-selected","meta":{}},{"name":"text","tagname":"attribute","owner":"dr.buttonbase","id":"attribute-text","meta":{}},{"name":"visible","tagname":"attribute","owner":"dr.view","id":"attribute-visible","meta":{}},{"name":"width","tagname":"attribute","owner":"dr.view","id":"attribute-width","meta":{}},{"name":"x","tagname":"attribute","owner":"dr.view","id":"attribute-x","meta":{}},{"name":"y","tagname":"attribute","owner":"dr.view","id":"attribute-y","meta":{}},{"name":"ignorelayout","tagname":"property","owner":"dr.view","id":"property-ignorelayout","meta":{}},{"name":"inited","tagname":"property","owner":"dr.node","id":"property-inited","meta":{"readonly":true}},{"name":"layouts","tagname":"property","owner":"dr.view","id":"property-layouts","meta":{"readonly":true}},{"name":"subnodes","tagname":"property","owner":"dr.node","id":"property-subnodes","meta":{"readonly":true}},{"name":"subviews","tagname":"property","owner":"dr.view","id":"property-subviews","meta":{"readonly":true}},{"name":"animate","tagname":"method","owner":"dr.view","id":"method-animate","meta":{"chainable":true}},{"name":"destroy","tagname":"method","owner":"dr.node","id":"method-destroy","meta":{}},{"name":"doLayoutAdded","tagname":"method","owner":"dr.view","id":"method-doLayoutAdded","meta":{}},{"name":"doLayoutRemoved","tagname":"method","owner":"dr.view","id":"method-doLayoutRemoved","meta":{}},{"name":"doSubnodeAdded","tagname":"method","owner":"dr.view","id":"method-doSubnodeAdded","meta":{}},{"name":"doSubnodeRemoved","tagname":"method","owner":"dr.view","id":"method-doSubnodeRemoved","meta":{}},{"name":"doSubviewAdded","tagname":"method","owner":"dr.view","id":"method-doSubviewAdded","meta":{}},{"name":"doSubviewRemoved","tagname":"method","owner":"dr.view","id":"method-doSubviewRemoved","meta":{}},{"name":"sendEvent","tagname":"method","owner":"Eventable","id":"method-sendEvent","meta":{"chainable":true}},{"name":"setAttribute","tagname":"method","owner":"Eventable","id":"method-setAttribute","meta":{"chainable":true}},{"name":"setAttributes","tagname":"method","owner":"Eventable","id":"method-setAttributes","meta":{"chainable":true}},{"name":"layoutAdded","tagname":"event","owner":"dr.view","id":"event-layoutAdded","meta":{}},{"name":"layoutRemoved","tagname":"event","owner":"dr.view","id":"event-layoutRemoved","meta":{}},{"name":"onclick","tagname":"event","owner":"dr.view","id":"event-onclick","meta":{}},{"name":"ondestroy","tagname":"event","owner":"dr.node","id":"event-ondestroy","meta":{}},{"name":"oninit","tagname":"event","owner":"dr.node","id":"event-oninit","meta":{}},{"name":"onlayouts","tagname":"event","owner":"dr.view","id":"event-onlayouts","meta":{}},{"name":"onmousedown","tagname":"event","owner":"dr.view","id":"event-onmousedown","meta":{}},{"name":"onmouseout","tagname":"event","owner":"dr.view","id":"event-onmouseout","meta":{}},{"name":"onmouseover","tagname":"event","owner":"dr.view","id":"event-onmouseover","meta":{}},{"name":"onmouseup","tagname":"event","owner":"dr.view","id":"event-onmouseup","meta":{}},{"name":"onselected","tagname":"event","owner":"dr.buttonbase","id":"event-onselected","meta":{}},{"name":"onsubnodes","tagname":"event","owner":"dr.node","id":"event-onsubnodes","meta":{}},{"name":"onsubviews","tagname":"event","owner":"dr.view","id":"event-onsubviews","meta":{}},{"name":"subnodeAdded","tagname":"event","owner":"dr.node","id":"event-subnodeAdded","meta":{}},{"name":"subnodeRemoved","tagname":"event","owner":"dr.node","id":"event-subnodeRemoved","meta":{}},{"name":"subviewAdded","tagname":"event","owner":"dr.view","id":"event-subviewAdded","meta":{}},{"name":"subviewRemoved","tagname":"event","owner":"dr.view","id":"event-subviewRemoved","meta":{}}],"alternateClassNames":[],"aliases":{},"id":"class-dr.labelbutton","short_doc":"Button class consisting of text centered in a view. ...","component":false,"superclasses":["Module","Eventable","dr.node","dr.view","dr.buttonbase"],"subclasses":["dr.labeltoggle"],"mixedInto":[],"mixins":[],"parentMixins":[],"requires":[],"uses":[],"html":"

    Hierarchy

    Subclasses

    Files

    Button class consisting of text centered in a view. The onclick event\nis generated when the button is clicked. The visual state of the\nbutton changes during onmousedown/onmouseup.

    \n\n
    <spacedlayout axis=\"y\"></spacedlayout>\n\n<labelbutton text=\"click me\" defaultcolor=\"plum\" selectcolor=\"orchid\">\n  <handler event=\"onclick\">\n    hello.setAttribute('text', 'Hello Universe!');\n  </handler>\n</labelbutton>\n\n<text id=\"hello\"></text>\n
    \n
    Defined By

    Attributes

    Sets this view's background color

    \n

    Sets this view's background color

    \n

    Sets this view's border width

    \n

    Sets this view's border width

    \n

    Sets this view's border color

    \n

    Sets this view's border color

    \n

    Sets this view's border style (can be any css border-style value)

    \n

    Sets this view's border style (can be any css border-style value)

    \n
    If true, this view recieves mouse events. ...

    If true, this view recieves mouse events. Automatically set to true when an onclick/mouse* event is registered for this view.

    \n

    Defaults to: false

    If true, this view clips to its bounds ...

    If true, this view clips to its bounds

    \n

    Defaults to: false

    The default color of the visual button element when not selected. ...

    The default color of the visual button element when not selected.

    \n

    Defaults to: "#808080"

    This view's height ...

    This view's height

    \n

    Defaults to: 0

    Gives this node a global ID, which can be looked up in the global window object. ...

    Gives this node a global ID, which can be looked up in the global window object.\nTake care to not override builtin globals, or override your own instances!

    \n

    Names this node in its parent scope so it can be referred to later.

    \n

    Names this node in its parent scope so it can be referred to later.

    \n
    Amount of padding pixels around the button. ...

    Amount of padding pixels around the button.

    \n

    Defaults to: 3

    Overrides: dr.view.padding

    A comma separated list of URLs to javascript includes required as dependencies. ...

    A comma separated list of URLs to javascript includes required as dependencies. Useful if you need to ensure a third party library is available.

    \n

    An error to show if scriptincludes fail to load

    \n

    An error to show if scriptincludes fail to load

    \n
    If true, this view clips to its bounds and provides scrolling to see content that overflows the bounds ...

    If true, this view clips to its bounds and provides scrolling to see content that overflows the bounds

    \n

    Defaults to: false

    The selected color of the visual button element when selected. ...

    The selected color of the visual button element when selected.

    \n

    Defaults to: "#a0a0a0"

    The current state of the button. ...

    The current state of the button.

    \n

    Defaults to: false

    Button text. ...

    Button text.

    \n

    Defaults to: ""

    If false, this view is invisible ...

    If false, this view is invisible

    \n

    Defaults to: true

    This view's width ...

    This view's width

    \n

    Defaults to: 0

    This view's x position ...

    This view's x position

    \n

    Defaults to: 0

    This view's y position ...

    This view's y position

    \n

    Defaults to: 0

    Defined By

    Properties

    If true, layouts should ignore this view

    \n

    If true, layouts should ignore this view

    \n
    : Booleanreadonly

    True when this node and all its children are completely initialized

    \n

    True when this node and all its children are completely initialized

    \n
    An array of this views's layouts. ...

    An array of this views's layouts. Only defined when needed.

    \n
    An array of this node's child nodes ...

    An array of this node's child nodes

    \n

    Defaults to: []

    An array of this views's child views

    \n

    An array of this views's child views

    \n
    Defined By

    Methods

    ( obj, Number ) : dr.viewchainable
    Animates this view's attribute(s) ...

    Animates this view's attribute(s)

    \n

    Parameters

    • obj : Object

      A hash of attribute names and values to animate to

      \n
    • Number : Object

      duration The duration of the animation in milliseconds

      \n

    Returns

    Destroys this node ...

    Destroys this node

    \n
    Called when a layout is added to this view. ...

    Called when a layout is added to this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to add a layout. Instead call setParent.

    \n

    Parameters

    • layout : dr.layout

      The layout that was added.

      \n

    Returns

    • void
      \n
    Called when a layout is removed from this view. ...

    Called when a layout is removed from this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to remove a layout. Instead call _removeFromParent.

    \n

    Parameters

    • layout : dr.layout

      The layout that was removed.

      \n

    Returns

    • void
      \n
    Calls doSubviewAdded/doLayoutAdded if the added subnode is a view or\nlayout respectively. ...

    Calls doSubviewAdded/doLayoutAdded if the added subnode is a view or\nlayout respectively. Subclasses should call super.

    \n

    Parameters

    • node : Object

    Overrides: dr.node.doSubnodeAdded

    Calls doSubviewRemoved/doLayoutRemoved if the removed subnode is a view or\nlayout respectively. ...

    Calls doSubviewRemoved/doLayoutRemoved if the removed subnode is a view or\nlayout respectively. Subclasses should call super.

    \n

    Parameters

    • node : Object

    Overrides: dr.node.doSubnodeRemoved

    Called when a subview is added to this view. ...

    Called when a subview is added to this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to add a subview. Instead call setParent.

    \n

    Parameters

    • sv : dr.view

      The subview that was added.

      \n

    Returns

    • void
      \n
    Called when a subview is removed from this view. ...

    Called when a subview is removed from this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to remove a subview. Instead call _removeFromParent.

    \n

    Parameters

    • sv : dr.view

      The subview that was removed.

      \n

    Returns

    • void
      \n
    ( name, value ) : Eventablechainable
    Sends an event ...

    Sends an event

    \n

    Parameters

    • name : String

      the name of the event to send

      \n
    • value : Object

      the value to send with the event

      \n

    Returns

    Sets an attribute, calls a setter if there is one, then sends an event with the new value ...

    Sets an attribute, calls a setter if there is one, then sends an event with the new value

    \n

    Parameters

    • name : String

      the name of the attribute to set

      \n
    • value : Object

      the value to set to

      \n

    Returns

    Calls setAttribute for each name/value pair in the attributes object ...

    Calls setAttribute for each name/value pair in the attributes object

    \n

    Parameters

    • attributes : Object

      An object of name/value pairs to be set

      \n

    Returns

    Defined By

    Events

    Fired when a layout is added to this view. ...

    Fired when a layout is added to this view.

    \n

    Parameters

    Fired when a layout is removed from this view. ...

    Fired when a layout is removed from this view.

    \n

    Parameters

    Fired when this view is clicked ...

    Fired when this view is clicked

    \n

    Parameters

    Fired when this node and all its children are about to be destroyed ...

    Fired when this node and all its children are about to be destroyed

    \n

    Parameters

    Fired when this node and all its children are completely initialized ...

    Fired when this node and all its children are completely initialized

    \n

    Parameters

    Fired when this views's layouts array has changed ...

    Fired when this views's layouts array has changed

    \n

    Parameters

    Fired when the mouse goes down on this view ...

    Fired when the mouse goes down on this view

    \n

    Parameters

    Fired when the mouse moves off this view ...

    Fired when the mouse moves off this view

    \n

    Parameters

    Fired when the mouse moves over this view ...

    Fired when the mouse moves over this view

    \n

    Parameters

    Fired when the mouse goes up on this view ...

    Fired when the mouse goes up on this view

    \n

    Parameters

    Fired when the state of the button changes. ...

    Fired when the state of the button changes.

    \n

    Parameters

    Fired when this node's subnodes array has changed ...

    Fired when this node's subnodes array has changed

    \n

    Parameters

    Fired when this views's subviews array has changed ...

    Fired when this views's subviews array has changed

    \n

    Parameters

    Fired when a subnode is added to this node. ...

    Fired when a subnode is added to this node.

    \n

    Parameters

    Fired when a subnode is removed from this node. ...

    Fired when a subnode is removed from this node.

    \n

    Parameters

    Fired when a subview is added to this view. ...

    Fired when a subview is added to this view.

    \n

    Parameters

    Fired when a subview is removed from this view. ...

    Fired when a subview is removed from this view.

    \n

    Parameters

    ","meta":{}}); \ No newline at end of file diff --git a/docs/api/output/dr.labeltoggle.js b/docs/api/output/dr.labeltoggle.js new file mode 100644 index 00000000..cd64a128 --- /dev/null +++ b/docs/api/output/dr.labeltoggle.js @@ -0,0 +1 @@ +Ext.data.JsonP.dr_labeltoggle({"tagname":"class","name":"dr.labeltoggle","autodetected":{},"files":[{"filename":"classdocs.js","href":"classdocs.html#dr-labeltoggle"}],"extends":"dr.labelbutton","members":[{"name":"bgcolor","tagname":"attribute","owner":"dr.view","id":"attribute-bgcolor","meta":{}},{"name":"border","tagname":"attribute","owner":"dr.view","id":"attribute-border","meta":{}},{"name":"bordercolor","tagname":"attribute","owner":"dr.view","id":"attribute-bordercolor","meta":{}},{"name":"borderstyle","tagname":"attribute","owner":"dr.view","id":"attribute-borderstyle","meta":{}},{"name":"clickable","tagname":"attribute","owner":"dr.view","id":"attribute-clickable","meta":{}},{"name":"clip","tagname":"attribute","owner":"dr.view","id":"attribute-clip","meta":{}},{"name":"defaultcolor","tagname":"attribute","owner":"dr.buttonbase","id":"attribute-defaultcolor","meta":{}},{"name":"height","tagname":"attribute","owner":"dr.view","id":"attribute-height","meta":{}},{"name":"id","tagname":"attribute","owner":"dr.node","id":"attribute-id","meta":{}},{"name":"name","tagname":"attribute","owner":"dr.node","id":"attribute-name","meta":{}},{"name":"padding","tagname":"attribute","owner":"dr.buttonbase","id":"attribute-padding","meta":{}},{"name":"scriptincludes","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludes","meta":{}},{"name":"scriptincludeserror","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludeserror","meta":{}},{"name":"scrollable","tagname":"attribute","owner":"dr.view","id":"attribute-scrollable","meta":{}},{"name":"selectcolor","tagname":"attribute","owner":"dr.buttonbase","id":"attribute-selectcolor","meta":{}},{"name":"selected","tagname":"attribute","owner":"dr.buttonbase","id":"attribute-selected","meta":{}},{"name":"text","tagname":"attribute","owner":"dr.buttonbase","id":"attribute-text","meta":{}},{"name":"visible","tagname":"attribute","owner":"dr.view","id":"attribute-visible","meta":{}},{"name":"width","tagname":"attribute","owner":"dr.view","id":"attribute-width","meta":{}},{"name":"x","tagname":"attribute","owner":"dr.view","id":"attribute-x","meta":{}},{"name":"y","tagname":"attribute","owner":"dr.view","id":"attribute-y","meta":{}},{"name":"ignorelayout","tagname":"property","owner":"dr.view","id":"property-ignorelayout","meta":{}},{"name":"inited","tagname":"property","owner":"dr.node","id":"property-inited","meta":{"readonly":true}},{"name":"layouts","tagname":"property","owner":"dr.view","id":"property-layouts","meta":{"readonly":true}},{"name":"subnodes","tagname":"property","owner":"dr.node","id":"property-subnodes","meta":{"readonly":true}},{"name":"subviews","tagname":"property","owner":"dr.view","id":"property-subviews","meta":{"readonly":true}},{"name":"animate","tagname":"method","owner":"dr.view","id":"method-animate","meta":{"chainable":true}},{"name":"destroy","tagname":"method","owner":"dr.node","id":"method-destroy","meta":{}},{"name":"doLayoutAdded","tagname":"method","owner":"dr.view","id":"method-doLayoutAdded","meta":{}},{"name":"doLayoutRemoved","tagname":"method","owner":"dr.view","id":"method-doLayoutRemoved","meta":{}},{"name":"doSubnodeAdded","tagname":"method","owner":"dr.view","id":"method-doSubnodeAdded","meta":{}},{"name":"doSubnodeRemoved","tagname":"method","owner":"dr.view","id":"method-doSubnodeRemoved","meta":{}},{"name":"doSubviewAdded","tagname":"method","owner":"dr.view","id":"method-doSubviewAdded","meta":{}},{"name":"doSubviewRemoved","tagname":"method","owner":"dr.view","id":"method-doSubviewRemoved","meta":{}},{"name":"sendEvent","tagname":"method","owner":"Eventable","id":"method-sendEvent","meta":{"chainable":true}},{"name":"setAttribute","tagname":"method","owner":"Eventable","id":"method-setAttribute","meta":{"chainable":true}},{"name":"setAttributes","tagname":"method","owner":"Eventable","id":"method-setAttributes","meta":{"chainable":true}},{"name":"layoutAdded","tagname":"event","owner":"dr.view","id":"event-layoutAdded","meta":{}},{"name":"layoutRemoved","tagname":"event","owner":"dr.view","id":"event-layoutRemoved","meta":{}},{"name":"onclick","tagname":"event","owner":"dr.view","id":"event-onclick","meta":{}},{"name":"ondestroy","tagname":"event","owner":"dr.node","id":"event-ondestroy","meta":{}},{"name":"oninit","tagname":"event","owner":"dr.node","id":"event-oninit","meta":{}},{"name":"onlayouts","tagname":"event","owner":"dr.view","id":"event-onlayouts","meta":{}},{"name":"onmousedown","tagname":"event","owner":"dr.view","id":"event-onmousedown","meta":{}},{"name":"onmouseout","tagname":"event","owner":"dr.view","id":"event-onmouseout","meta":{}},{"name":"onmouseover","tagname":"event","owner":"dr.view","id":"event-onmouseover","meta":{}},{"name":"onmouseup","tagname":"event","owner":"dr.view","id":"event-onmouseup","meta":{}},{"name":"onselected","tagname":"event","owner":"dr.buttonbase","id":"event-onselected","meta":{}},{"name":"onsubnodes","tagname":"event","owner":"dr.node","id":"event-onsubnodes","meta":{}},{"name":"onsubviews","tagname":"event","owner":"dr.view","id":"event-onsubviews","meta":{}},{"name":"subnodeAdded","tagname":"event","owner":"dr.node","id":"event-subnodeAdded","meta":{}},{"name":"subnodeRemoved","tagname":"event","owner":"dr.node","id":"event-subnodeRemoved","meta":{}},{"name":"subviewAdded","tagname":"event","owner":"dr.view","id":"event-subviewAdded","meta":{}},{"name":"subviewRemoved","tagname":"event","owner":"dr.view","id":"event-subviewRemoved","meta":{}}],"alternateClassNames":[],"aliases":{},"id":"class-dr.labeltoggle","short_doc":"Button class consisting of text centered in a view. ...","component":false,"superclasses":["Module","Eventable","dr.node","dr.view","dr.buttonbase","dr.labelbutton"],"subclasses":[],"mixedInto":[],"mixins":[],"parentMixins":[],"requires":[],"uses":[],"html":"

    Hierarchy

    Files

    Button class consisting of text centered in a view. The state of the\nbutton changes each time the button is clicked. The select property\nholds the current state of the button. The onselected event\nis generated when the button is the selected state.

    \n\n
    <spacedlayout axis=\"y\"></spacedlayout>\n\n<labeltoggle id=\"toggle\" text=\"Click me to toggle\" defaultcolor=\"plum\" selectcolor=\"orchid\"></labeltoggle>\n\n<text text=\"${toggle.selected ? 'selected' : 'not selected'}\"></text>\n
    \n
    Defined By

    Attributes

    Sets this view's background color

    \n

    Sets this view's background color

    \n

    Sets this view's border width

    \n

    Sets this view's border width

    \n

    Sets this view's border color

    \n

    Sets this view's border color

    \n

    Sets this view's border style (can be any css border-style value)

    \n

    Sets this view's border style (can be any css border-style value)

    \n
    If true, this view recieves mouse events. ...

    If true, this view recieves mouse events. Automatically set to true when an onclick/mouse* event is registered for this view.

    \n

    Defaults to: false

    If true, this view clips to its bounds ...

    If true, this view clips to its bounds

    \n

    Defaults to: false

    The default color of the visual button element when not selected. ...

    The default color of the visual button element when not selected.

    \n

    Defaults to: "#808080"

    This view's height ...

    This view's height

    \n

    Defaults to: 0

    Gives this node a global ID, which can be looked up in the global window object. ...

    Gives this node a global ID, which can be looked up in the global window object.\nTake care to not override builtin globals, or override your own instances!

    \n

    Names this node in its parent scope so it can be referred to later.

    \n

    Names this node in its parent scope so it can be referred to later.

    \n
    Amount of padding pixels around the button. ...

    Amount of padding pixels around the button.

    \n

    Defaults to: 3

    Overrides: dr.view.padding

    A comma separated list of URLs to javascript includes required as dependencies. ...

    A comma separated list of URLs to javascript includes required as dependencies. Useful if you need to ensure a third party library is available.

    \n

    An error to show if scriptincludes fail to load

    \n

    An error to show if scriptincludes fail to load

    \n
    If true, this view clips to its bounds and provides scrolling to see content that overflows the bounds ...

    If true, this view clips to its bounds and provides scrolling to see content that overflows the bounds

    \n

    Defaults to: false

    The selected color of the visual button element when selected. ...

    The selected color of the visual button element when selected.

    \n

    Defaults to: "#a0a0a0"

    The current state of the button. ...

    The current state of the button.

    \n

    Defaults to: false

    Button text. ...

    Button text.

    \n

    Defaults to: ""

    If false, this view is invisible ...

    If false, this view is invisible

    \n

    Defaults to: true

    This view's width ...

    This view's width

    \n

    Defaults to: 0

    This view's x position ...

    This view's x position

    \n

    Defaults to: 0

    This view's y position ...

    This view's y position

    \n

    Defaults to: 0

    Defined By

    Properties

    If true, layouts should ignore this view

    \n

    If true, layouts should ignore this view

    \n
    : Booleanreadonly

    True when this node and all its children are completely initialized

    \n

    True when this node and all its children are completely initialized

    \n
    An array of this views's layouts. ...

    An array of this views's layouts. Only defined when needed.

    \n
    An array of this node's child nodes ...

    An array of this node's child nodes

    \n

    Defaults to: []

    An array of this views's child views

    \n

    An array of this views's child views

    \n
    Defined By

    Methods

    ( obj, Number ) : dr.viewchainable
    Animates this view's attribute(s) ...

    Animates this view's attribute(s)

    \n

    Parameters

    • obj : Object

      A hash of attribute names and values to animate to

      \n
    • Number : Object

      duration The duration of the animation in milliseconds

      \n

    Returns

    Destroys this node ...

    Destroys this node

    \n
    Called when a layout is added to this view. ...

    Called when a layout is added to this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to add a layout. Instead call setParent.

    \n

    Parameters

    • layout : dr.layout

      The layout that was added.

      \n

    Returns

    • void
      \n
    Called when a layout is removed from this view. ...

    Called when a layout is removed from this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to remove a layout. Instead call _removeFromParent.

    \n

    Parameters

    • layout : dr.layout

      The layout that was removed.

      \n

    Returns

    • void
      \n
    Calls doSubviewAdded/doLayoutAdded if the added subnode is a view or\nlayout respectively. ...

    Calls doSubviewAdded/doLayoutAdded if the added subnode is a view or\nlayout respectively. Subclasses should call super.

    \n

    Parameters

    • node : Object

    Overrides: dr.node.doSubnodeAdded

    Calls doSubviewRemoved/doLayoutRemoved if the removed subnode is a view or\nlayout respectively. ...

    Calls doSubviewRemoved/doLayoutRemoved if the removed subnode is a view or\nlayout respectively. Subclasses should call super.

    \n

    Parameters

    • node : Object

    Overrides: dr.node.doSubnodeRemoved

    Called when a subview is added to this view. ...

    Called when a subview is added to this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to add a subview. Instead call setParent.

    \n

    Parameters

    • sv : dr.view

      The subview that was added.

      \n

    Returns

    • void
      \n
    Called when a subview is removed from this view. ...

    Called when a subview is removed from this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to remove a subview. Instead call _removeFromParent.

    \n

    Parameters

    • sv : dr.view

      The subview that was removed.

      \n

    Returns

    • void
      \n
    ( name, value ) : Eventablechainable
    Sends an event ...

    Sends an event

    \n

    Parameters

    • name : String

      the name of the event to send

      \n
    • value : Object

      the value to send with the event

      \n

    Returns

    Sets an attribute, calls a setter if there is one, then sends an event with the new value ...

    Sets an attribute, calls a setter if there is one, then sends an event with the new value

    \n

    Parameters

    • name : String

      the name of the attribute to set

      \n
    • value : Object

      the value to set to

      \n

    Returns

    Calls setAttribute for each name/value pair in the attributes object ...

    Calls setAttribute for each name/value pair in the attributes object

    \n

    Parameters

    • attributes : Object

      An object of name/value pairs to be set

      \n

    Returns

    Defined By

    Events

    Fired when a layout is added to this view. ...

    Fired when a layout is added to this view.

    \n

    Parameters

    Fired when a layout is removed from this view. ...

    Fired when a layout is removed from this view.

    \n

    Parameters

    Fired when this view is clicked ...

    Fired when this view is clicked

    \n

    Parameters

    Fired when this node and all its children are about to be destroyed ...

    Fired when this node and all its children are about to be destroyed

    \n

    Parameters

    Fired when this node and all its children are completely initialized ...

    Fired when this node and all its children are completely initialized

    \n

    Parameters

    Fired when this views's layouts array has changed ...

    Fired when this views's layouts array has changed

    \n

    Parameters

    Fired when the mouse goes down on this view ...

    Fired when the mouse goes down on this view

    \n

    Parameters

    Fired when the mouse moves off this view ...

    Fired when the mouse moves off this view

    \n

    Parameters

    Fired when the mouse moves over this view ...

    Fired when the mouse moves over this view

    \n

    Parameters

    Fired when the mouse goes up on this view ...

    Fired when the mouse goes up on this view

    \n

    Parameters

    Fired when the state of the button changes. ...

    Fired when the state of the button changes.

    \n

    Parameters

    Fired when this node's subnodes array has changed ...

    Fired when this node's subnodes array has changed

    \n

    Parameters

    Fired when this views's subviews array has changed ...

    Fired when this views's subviews array has changed

    \n

    Parameters

    Fired when a subnode is added to this node. ...

    Fired when a subnode is added to this node.

    \n

    Parameters

    Fired when a subnode is removed from this node. ...

    Fired when a subnode is removed from this node.

    \n

    Parameters

    Fired when a subview is added to this view. ...

    Fired when a subview is added to this view.

    \n

    Parameters

    Fired when a subview is removed from this view. ...

    Fired when a subview is removed from this view.

    \n

    Parameters

    ","meta":{}}); \ No newline at end of file diff --git a/docs/api/output/dr.layout.js b/docs/api/output/dr.layout.js new file mode 100644 index 00000000..9954d510 --- /dev/null +++ b/docs/api/output/dr.layout.js @@ -0,0 +1 @@ +Ext.data.JsonP.dr_layout({"tagname":"class","name":"dr.layout","autodetected":{},"files":[{"filename":"layout.js","href":"layout.html#dr-layout"}],"extends":"dr.node","members":[{"name":"id","tagname":"attribute","owner":"dr.node","id":"attribute-id","meta":{}},{"name":"name","tagname":"attribute","owner":"dr.node","id":"attribute-name","meta":{}},{"name":"scriptincludes","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludes","meta":{}},{"name":"scriptincludeserror","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludeserror","meta":{}},{"name":"inited","tagname":"property","owner":"dr.node","id":"property-inited","meta":{"readonly":true}},{"name":"subnodes","tagname":"property","owner":"dr.node","id":"property-subnodes","meta":{"readonly":true}},{"name":"addSubview","tagname":"method","owner":"dr.layout","id":"method-addSubview","meta":{}},{"name":"canUpdate","tagname":"method","owner":"dr.layout","id":"method-canUpdate","meta":{}},{"name":"destroy","tagname":"method","owner":"dr.node","id":"method-destroy","meta":{}},{"name":"doSubnodeAdded","tagname":"method","owner":"dr.node","id":"method-doSubnodeAdded","meta":{}},{"name":"doSubnodeRemoved","tagname":"method","owner":"dr.node","id":"method-doSubnodeRemoved","meta":{}},{"name":"ignore","tagname":"method","owner":"dr.layout","id":"method-ignore","meta":{}},{"name":"removeSubview","tagname":"method","owner":"dr.layout","id":"method-removeSubview","meta":{}},{"name":"sendEvent","tagname":"method","owner":"Eventable","id":"method-sendEvent","meta":{"chainable":true}},{"name":"setAttribute","tagname":"method","owner":"Eventable","id":"method-setAttribute","meta":{"chainable":true}},{"name":"setAttributes","tagname":"method","owner":"Eventable","id":"method-setAttributes","meta":{"chainable":true}},{"name":"startMonitoringAllSubviews","tagname":"method","owner":"dr.layout","id":"method-startMonitoringAllSubviews","meta":{}},{"name":"startMonitoringSubview","tagname":"method","owner":"dr.layout","id":"method-startMonitoringSubview","meta":{}},{"name":"stopMonitoringAllSubviews","tagname":"method","owner":"dr.layout","id":"method-stopMonitoringAllSubviews","meta":{}},{"name":"stopMonitoringSubview","tagname":"method","owner":"dr.layout","id":"method-stopMonitoringSubview","meta":{}},{"name":"update","tagname":"method","owner":"dr.layout","id":"method-update","meta":{}},{"name":"ondestroy","tagname":"event","owner":"dr.node","id":"event-ondestroy","meta":{}},{"name":"oninit","tagname":"event","owner":"dr.node","id":"event-oninit","meta":{}},{"name":"onsubnodes","tagname":"event","owner":"dr.node","id":"event-onsubnodes","meta":{}},{"name":"subnodeAdded","tagname":"event","owner":"dr.node","id":"event-subnodeAdded","meta":{}},{"name":"subnodeRemoved","tagname":"event","owner":"dr.node","id":"event-subnodeRemoved","meta":{}}],"alternateClassNames":[],"aliases":{},"id":"class-dr.layout","short_doc":"The base class for all layouts. ...","component":false,"superclasses":["Module","Eventable","dr.node"],"subclasses":["dr.constantlayout","dr.shrinktofit"],"mixedInto":[],"mixins":[],"parentMixins":[],"requires":[],"uses":[],"html":"

    Hierarchy

    Subclasses

    Files

    The base class for all layouts.

    \n\n

    When a new layout is added, it will automatically create and add itself to a layouts array in its parent. In addition, an onlayouts event is fired in the parent when the layouts array changes. This allows the parent to access the layout(s) later.

    \n\n

    Here is a view that contains both a spacedlayout and a shrinktofit.

    \n\n
    <spacedlayout axis=\"y\"></spacedlayout>\n<view bgcolor=\"oldlace\">\n  <shrinktofit axis=\"both\"></shrinktofit>\n\n  <spacedlayout></spacedlayout>\n\n  <view width=\"50\" height=\"50\" bgcolor=\"lightpink\" opacity=\".3\"></view>\n  <view width=\"50\" height=\"50\" bgcolor=\"plum\" opacity=\".3\"></view>\n  <view width=\"50\" height=\"50\" bgcolor=\"lightblue\" opacity=\".3\"></view>\n\n  <handler event=\"onlayouts\" args=\"layouts\">\n    output.setAttribute('text', output.text||'' + \"New layout added: \" + layouts[layouts.length-1].$tagname + \"\\n\");\n  </handler>\n</view>\n\n<text id=\"output\" multiline=\"true\" width=\"300\"></text>\n
    \n
    Defined By

    Attributes

    Gives this node a global ID, which can be looked up in the global window object. ...

    Gives this node a global ID, which can be looked up in the global window object.\nTake care to not override builtin globals, or override your own instances!

    \n

    Names this node in its parent scope so it can be referred to later.

    \n

    Names this node in its parent scope so it can be referred to later.

    \n
    A comma separated list of URLs to javascript includes required as dependencies. ...

    A comma separated list of URLs to javascript includes required as dependencies. Useful if you need to ensure a third party library is available.

    \n

    An error to show if scriptincludes fail to load

    \n

    An error to show if scriptincludes fail to load

    \n
    Defined By

    Properties

    : Booleanreadonly

    True when this node and all its children are completely initialized

    \n

    True when this node and all its children are completely initialized

    \n
    An array of this node's child nodes ...

    An array of this node's child nodes

    \n

    Defaults to: []

    Defined By

    Methods

    dr.layout
    view source
    ( view ) : void
    Adds the provided view to the subviews array of this layout. ...

    Adds the provided view to the subviews array of this layout.

    \n

    Parameters

    • view : dr.view

      The view to add to this layout.

      \n

    Returns

    • void
      \n
    dr.layout
    view source
    ( ) : boolean
    Checks if the layout is locked or not. ...

    Checks if the layout is locked or not. Should be called by the\n\"update\" method of each layout to check if it is OK to do the update.

    \n

    Returns

    • boolean

      true if not locked, false otherwise.

      \n
    Destroys this node ...

    Destroys this node

    \n
    Called when a subnode is added to this node. ...

    Called when a subnode is added to this node. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to add a subnode. Instead call setParent.

    \n

    Parameters

    • node : dr.node

      The subnode that was added.

      \n

    Returns

    • void
      \n
    Called when a subnode is removed from this node. ...

    Called when a subnode is removed from this node. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to remove a subnode. Instead call _removeFromParent.

    \n

    Parameters

    • node : dr.node

      The subnode that was removed.

      \n

    Returns

    • void
      \n
    dr.layout
    view source
    ( view ) : boolean
    Checks if a subview can be added to this Layout or not. ...

    Checks if a subview can be added to this Layout or not. The default\nimplementation returns the 'ignorelayout' attributes of the subview.

    \n

    Parameters

    Returns

    • boolean

      True means the subview will be skipped, false otherwise.

      \n
    dr.layout
    view source
    ( view ) : number
    Removes the provided View from the subviews array of this Layout. ...

    Removes the provided View from the subviews array of this Layout.

    \n

    Parameters

    • view : dr.view

      The view to remove from this layout.

      \n

    Returns

    • number

      the index of the removed subview or -1 if not removed.

      \n
    ( name, value ) : Eventablechainable
    Sends an event ...

    Sends an event

    \n

    Parameters

    • name : String

      the name of the event to send

      \n
    • value : Object

      the value to send with the event

      \n

    Returns

    Sets an attribute, calls a setter if there is one, then sends an event with the new value ...

    Sets an attribute, calls a setter if there is one, then sends an event with the new value

    \n

    Parameters

    • name : String

      the name of the attribute to set

      \n
    • value : Object

      the value to set to

      \n

    Returns

    Calls setAttribute for each name/value pair in the attributes object ...

    Calls setAttribute for each name/value pair in the attributes object

    \n

    Parameters

    • attributes : Object

      An object of name/value pairs to be set

      \n

    Returns

    Calls startMonitoringSubview for all views. ...

    Calls startMonitoringSubview for all views. Used by layout\nimplementations when a change occurs to the layout that requires\nrefreshing all the subview monitoring.

    \n

    Returns

    • void
      \n
    dr.layout
    view source
    ( view ) : void
    Subclasses should implement this method to start listening to\nevents from the subview that should trigger the update ...

    Subclasses should implement this method to start listening to\nevents from the subview that should trigger the update method.

    \n

    Parameters

    • view : dr.view

      The view to start monitoring for changes.

      \n

    Returns

    • void
      \n
    Calls stopMonitoringSubview for all views. ...

    Calls stopMonitoringSubview for all views. Used by Layout\nimplementations when a change occurs to the layout that requires\nrefreshing all the subview monitoring.

    \n

    Returns

    • void
      \n
    dr.layout
    view source
    ( view ) : void
    Subclasses should implement this method to stop listening to\nevents from the subview that would trigger the update me...

    Subclasses should implement this method to stop listening to\nevents from the subview that would trigger the update method. This\nshould remove all listeners that were setup in startMonitoringSubview.

    \n

    Parameters

    • view : dr.view

      The view to stop monitoring for changes.

      \n

    Returns

    • void
      \n
    dr.layout
    view source
    ( ) : void
    Updates the layout. ...

    Updates the layout. Subclasses should call canUpdate to check lock state\nbefore doing anything.

    \n

    Returns

    • void
      \n
    Defined By

    Events

    Fired when this node and all its children are about to be destroyed ...

    Fired when this node and all its children are about to be destroyed

    \n

    Parameters

    Fired when this node and all its children are completely initialized ...

    Fired when this node and all its children are completely initialized

    \n

    Parameters

    Fired when this node's subnodes array has changed ...

    Fired when this node's subnodes array has changed

    \n

    Parameters

    Fired when a subnode is added to this node. ...

    Fired when a subnode is added to this node.

    \n

    Parameters

    Fired when a subnode is removed from this node. ...

    Fired when a subnode is removed from this node.

    \n

    Parameters

    ","meta":{}}); \ No newline at end of file diff --git a/docs/api/output/dr.logger.js b/docs/api/output/dr.logger.js new file mode 100644 index 00000000..b60db10b --- /dev/null +++ b/docs/api/output/dr.logger.js @@ -0,0 +1 @@ +Ext.data.JsonP.dr_logger({"tagname":"class","name":"dr.logger","autodetected":{},"files":[{"filename":"classdocs.js","href":"classdocs.html#dr-logger"}],"extends":"dr.node","members":[{"name":"id","tagname":"attribute","owner":"dr.node","id":"attribute-id","meta":{}},{"name":"name","tagname":"attribute","owner":"dr.node","id":"attribute-name","meta":{}},{"name":"scriptincludes","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludes","meta":{}},{"name":"scriptincludeserror","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludeserror","meta":{}},{"name":"inited","tagname":"property","owner":"dr.node","id":"property-inited","meta":{"readonly":true}},{"name":"subnodes","tagname":"property","owner":"dr.node","id":"property-subnodes","meta":{"readonly":true}},{"name":"destroy","tagname":"method","owner":"dr.node","id":"method-destroy","meta":{}},{"name":"doSubnodeAdded","tagname":"method","owner":"dr.node","id":"method-doSubnodeAdded","meta":{}},{"name":"doSubnodeRemoved","tagname":"method","owner":"dr.node","id":"method-doSubnodeRemoved","meta":{}},{"name":"sendEvent","tagname":"method","owner":"Eventable","id":"method-sendEvent","meta":{"chainable":true}},{"name":"setAttribute","tagname":"method","owner":"Eventable","id":"method-setAttribute","meta":{"chainable":true}},{"name":"setAttributes","tagname":"method","owner":"Eventable","id":"method-setAttributes","meta":{"chainable":true}},{"name":"ondestroy","tagname":"event","owner":"dr.node","id":"event-ondestroy","meta":{}},{"name":"oninit","tagname":"event","owner":"dr.node","id":"event-oninit","meta":{}},{"name":"onsubnodes","tagname":"event","owner":"dr.node","id":"event-onsubnodes","meta":{}},{"name":"subnodeAdded","tagname":"event","owner":"dr.node","id":"event-subnodeAdded","meta":{}},{"name":"subnodeRemoved","tagname":"event","owner":"dr.node","id":"event-subnodeRemoved","meta":{}}],"alternateClassNames":[],"aliases":{},"id":"class-dr.logger","short_doc":"Logs all attribute setting behavior\n\nThis example shows how to log all setAttribute() calls for a replicator to conso...","component":false,"superclasses":["Module","Eventable","dr.node"],"subclasses":[],"mixedInto":[],"mixins":[],"parentMixins":[],"requires":[],"uses":[],"html":"

    Hierarchy

    Files

    Logs all attribute setting behavior

    \n\n

    This example shows how to log all setAttribute() calls for a replicator to console.log():

    \n\n
    <dataset name=\"topmovies\" url=\"/top_movies.json\"></dataset>\n<replicator datapath=\"$topmovies/searchResponse/results[*]/movie[take(/releaseYear,/duration,/rating)]\" classname=\"logger\"></replicator>\n
    \n
    Defined By

    Attributes

    Gives this node a global ID, which can be looked up in the global window object. ...

    Gives this node a global ID, which can be looked up in the global window object.\nTake care to not override builtin globals, or override your own instances!

    \n

    Names this node in its parent scope so it can be referred to later.

    \n

    Names this node in its parent scope so it can be referred to later.

    \n
    A comma separated list of URLs to javascript includes required as dependencies. ...

    A comma separated list of URLs to javascript includes required as dependencies. Useful if you need to ensure a third party library is available.

    \n

    An error to show if scriptincludes fail to load

    \n

    An error to show if scriptincludes fail to load

    \n
    Defined By

    Properties

    : Booleanreadonly

    True when this node and all its children are completely initialized

    \n

    True when this node and all its children are completely initialized

    \n
    An array of this node's child nodes ...

    An array of this node's child nodes

    \n

    Defaults to: []

    Defined By

    Methods

    Destroys this node ...

    Destroys this node

    \n
    Called when a subnode is added to this node. ...

    Called when a subnode is added to this node. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to add a subnode. Instead call setParent.

    \n

    Parameters

    • node : dr.node

      The subnode that was added.

      \n

    Returns

    • void
      \n
    Called when a subnode is removed from this node. ...

    Called when a subnode is removed from this node. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to remove a subnode. Instead call _removeFromParent.

    \n

    Parameters

    • node : dr.node

      The subnode that was removed.

      \n

    Returns

    • void
      \n
    ( name, value ) : Eventablechainable
    Sends an event ...

    Sends an event

    \n

    Parameters

    • name : String

      the name of the event to send

      \n
    • value : Object

      the value to send with the event

      \n

    Returns

    Sets an attribute, calls a setter if there is one, then sends an event with the new value ...

    Sets an attribute, calls a setter if there is one, then sends an event with the new value

    \n

    Parameters

    • name : String

      the name of the attribute to set

      \n
    • value : Object

      the value to set to

      \n

    Returns

    Calls setAttribute for each name/value pair in the attributes object ...

    Calls setAttribute for each name/value pair in the attributes object

    \n

    Parameters

    • attributes : Object

      An object of name/value pairs to be set

      \n

    Returns

    Defined By

    Events

    Fired when this node and all its children are about to be destroyed ...

    Fired when this node and all its children are about to be destroyed

    \n

    Parameters

    Fired when this node and all its children are completely initialized ...

    Fired when this node and all its children are completely initialized

    \n

    Parameters

    Fired when this node's subnodes array has changed ...

    Fired when this node's subnodes array has changed

    \n

    Parameters

    Fired when a subnode is added to this node. ...

    Fired when a subnode is added to this node.

    \n

    Parameters

    Fired when a subnode is removed from this node. ...

    Fired when a subnode is removed from this node.

    \n

    Parameters

    ","meta":{}}); \ No newline at end of file diff --git a/docs/api/output/dr.method.js b/docs/api/output/dr.method.js new file mode 100644 index 00000000..a2ca8fa5 --- /dev/null +++ b/docs/api/output/dr.method.js @@ -0,0 +1 @@ +Ext.data.JsonP.dr_method({"tagname":"class","name":"dr.method","autodetected":{},"files":[{"filename":"layout.js","href":"layout.html#dr-method"}],"members":[{"name":"args","tagname":"attribute","owner":"dr.method","id":"attribute-args","meta":{}},{"name":"name","tagname":"attribute","owner":"dr.method","id":"attribute-name","meta":{"required":true}},{"name":"type","tagname":"attribute","owner":"dr.method","id":"attribute-type","meta":{}}],"alternateClassNames":[],"aliases":{},"id":"class-dr.method","short_doc":"Declares a member function in a node, view, class or other class instance. ...","component":false,"superclasses":[],"subclasses":[],"mixedInto":[],"mixins":[],"parentMixins":[],"requires":[],"uses":[],"html":"

    Files

    Declares a member function in a node, view, class or other class instance. Methods can only be created with the <method></method> tag syntax.

    \n\n

    If a method overrides an existing method, any existing (super) method(s) will be called first automatically.

    \n\n

    Let's define a method called changeColor in a view that sets the background color to pink.

    \n\n
    <view id=\"square\" width=\"100\" height=\"100\">\n  <method name=\"changeColor\">\n    this.setAttribute('bgcolor', 'pink');\n  </method>\n</view>\n\n<handler event=\"oninit\">\n  square.changeColor();\n</handler>\n
    \n\n

    Here we define the changeColor method in a class called square. We create an instance of the class and call the method on the intance.

    \n\n
    <class name=\"square\" width=\"100\" height=\"100\">\n  <method name=\"changeColor\">\n    this.setAttribute('bgcolor', 'pink');\n  </method>\n</class>\n\n<square id=\"square1\"></square>\n\n<handler event=\"oninit\">\n  square1.changeColor();\n</handler>\n
    \n\n

    Now we'll subclass the square class with a bluesquare class, and override the changeColor method to color the square blue. We also add an inner square who's color is set in the changeColor method of the square superclass. Notice that the color of this square is set when the method is called on the subclass.

    \n\n
    <class name=\"square\" width=\"100\" height=\"100\">\n  <view name=\"inner\" width=\"25\" height=\"25\"></view>\n  <method name=\"changeColor\">\n    this.inner.setAttribute('bgcolor', 'green');\n    this.setAttribute('bgcolor', 'pink');\n  </method>\n</class>\n\n<class name=\"bluesquare\" extends=\"square\">\n  <method name=\"changeColor\">\n    this.setAttribute('bgcolor', 'blue');\n  </method>\n</class>\n\n<spacedlayout></spacedlayout>\n\n<square id=\"square1\"></square>\n<bluesquare id=\"square2\"></bluesquare>\n\n<handler event=\"oninit\">\n  square1.changeColor();\n  square2.changeColor();\n</handler>\n
    \n

    Attributes

    Defined By

    Required attributes

    dr.method
    view source
    : Stringrequired

    The name of the method.

    \n

    The name of the method.

    \n
    Defined By

    Optional attributes

    dr.method
    view source
    : String[]

    A comma separated list of method arguments.

    \n

    A comma separated list of method arguments.

    \n
    dr.method
    view source
    : \"js\"/\"coffee\"
    The compiler to use for this method. ...

    The compiler to use for this method. Inherits from the immediate class if unspecified.

    \n
    ","meta":{}}); \ No newline at end of file diff --git a/docs/api/output/dr.mouse.js b/docs/api/output/dr.mouse.js new file mode 100644 index 00000000..9c6493fa --- /dev/null +++ b/docs/api/output/dr.mouse.js @@ -0,0 +1 @@ +Ext.data.JsonP.dr_mouse({"tagname":"class","name":"dr.mouse","autodetected":{},"files":[{"filename":"layout.js","href":"layout.html#dr-mouse"}],"extends":"Eventable","members":[{"name":"x","tagname":"property","owner":"dr.mouse","id":"property-x","meta":{"readonly":true}},{"name":"y","tagname":"property","owner":"dr.mouse","id":"property-y","meta":{"readonly":true}},{"name":"sendEvent","tagname":"method","owner":"Eventable","id":"method-sendEvent","meta":{"chainable":true}},{"name":"setAttribute","tagname":"method","owner":"Eventable","id":"method-setAttribute","meta":{"chainable":true}},{"name":"setAttributes","tagname":"method","owner":"Eventable","id":"method-setAttributes","meta":{"chainable":true}},{"name":"onclick","tagname":"event","owner":"dr.mouse","id":"event-onclick","meta":{}},{"name":"onmousedown","tagname":"event","owner":"dr.mouse","id":"event-onmousedown","meta":{}},{"name":"onmousemove","tagname":"event","owner":"dr.mouse","id":"event-onmousemove","meta":{}},{"name":"onmouseout","tagname":"event","owner":"dr.mouse","id":"event-onmouseout","meta":{}},{"name":"onmouseover","tagname":"event","owner":"dr.mouse","id":"event-onmouseover","meta":{}},{"name":"onmouseup","tagname":"event","owner":"dr.mouse","id":"event-onmouseup","meta":{}},{"name":"onx","tagname":"event","owner":"dr.mouse","id":"event-onx","meta":{}},{"name":"ony","tagname":"event","owner":"dr.mouse","id":"event-ony","meta":{}}],"alternateClassNames":[],"aliases":{},"id":"class-dr.mouse","short_doc":"Sends mouse events. ...","component":false,"superclasses":["Module","Eventable"],"subclasses":[],"mixedInto":[],"mixins":[],"parentMixins":[],"requires":[],"uses":[],"html":"

    Hierarchy

    Files

    Sends mouse events. Often used to listen to onmouseover/x/y events to follow the mouse position.

    \n\n

    Here we attach events handlers to the onx and ony events of dr.mouse, and set the x,y coordinates of a square view so it follows the mouse.

    \n\n
    <view id=\"mousetracker\" width=\"20\" height=\"20\" bgcolor=\"MediumTurquoise\"></view>\n\n<handler event=\"onx\" args=\"x\" reference=\"dr.mouse\">\n  mousetracker.setAttribute('x', x);\n</handler>\n\n<handler event=\"ony\" args=\"y\" reference=\"dr.mouse\">\n  mousetracker.setAttribute('y', y);\n</handler>\n
    \n
    Defined By

    Properties

    dr.mouse
    view source
    : Numberreadonly

    The x coordinate of the mouse

    \n

    The x coordinate of the mouse

    \n
    dr.mouse
    view source
    : Numberreadonly

    The y coordinate of the mouse

    \n

    The y coordinate of the mouse

    \n
    Defined By

    Methods

    ( name, value ) : Eventablechainable
    Sends an event ...

    Sends an event

    \n

    Parameters

    • name : String

      the name of the event to send

      \n
    • value : Object

      the value to send with the event

      \n

    Returns

    Sets an attribute, calls a setter if there is one, then sends an event with the new value ...

    Sets an attribute, calls a setter if there is one, then sends an event with the new value

    \n

    Parameters

    • name : String

      the name of the attribute to set

      \n
    • value : Object

      the value to set to

      \n

    Returns

    Calls setAttribute for each name/value pair in the attributes object ...

    Calls setAttribute for each name/value pair in the attributes object

    \n

    Parameters

    • attributes : Object

      An object of name/value pairs to be set

      \n

    Returns

    Defined By

    Events

    dr.mouse
    view source
    ( view )
    Fired when the mouse is clicked ...

    Fired when the mouse is clicked

    \n

    Parameters

    dr.mouse
    view source
    ( view )
    Fired when the mouse goes down on a view ...

    Fired when the mouse goes down on a view

    \n

    Parameters

    dr.mouse
    view source
    ( coordinates )
    Fired when the mouse moves ...

    Fired when the mouse moves

    \n

    Parameters

    • coordinates : Object

      The x and y coordinates of the mouse

      \n
    dr.mouse
    view source
    ( view )
    Fired when the mouse moves off a view ...

    Fired when the mouse moves off a view

    \n

    Parameters

    dr.mouse
    view source
    ( view )
    Fired when the mouse moves over a view ...

    Fired when the mouse moves over a view

    \n

    Parameters

    dr.mouse
    view source
    ( view )
    Fired when the mouse goes up on a view ...

    Fired when the mouse goes up on a view

    \n

    Parameters

    dr.mouse
    view source
    ( x )
    Fired when the mouse moves in the x axis ...

    Fired when the mouse moves in the x axis

    \n

    Parameters

    • x : Number

      The x coordinate of the mouse

      \n
    dr.mouse
    view source
    ( y )
    Fired when the mouse moves in the y axis ...

    Fired when the mouse moves in the y axis

    \n

    Parameters

    • y : Number

      The y coordinate of the mouse

      \n
    ","meta":{}}); \ No newline at end of file diff --git a/docs/api/output/dr.node.js b/docs/api/output/dr.node.js new file mode 100644 index 00000000..aebb582a --- /dev/null +++ b/docs/api/output/dr.node.js @@ -0,0 +1 @@ +Ext.data.JsonP.dr_node({"tagname":"class","name":"dr.node","autodetected":{},"files":[{"filename":"layout.js","href":"layout.html#dr-node"}],"extends":"Eventable","members":[{"name":"id","tagname":"attribute","owner":"dr.node","id":"attribute-id","meta":{}},{"name":"name","tagname":"attribute","owner":"dr.node","id":"attribute-name","meta":{}},{"name":"scriptincludes","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludes","meta":{}},{"name":"scriptincludeserror","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludeserror","meta":{}},{"name":"inited","tagname":"property","owner":"dr.node","id":"property-inited","meta":{"readonly":true}},{"name":"subnodes","tagname":"property","owner":"dr.node","id":"property-subnodes","meta":{"readonly":true}},{"name":"destroy","tagname":"method","owner":"dr.node","id":"method-destroy","meta":{}},{"name":"doSubnodeAdded","tagname":"method","owner":"dr.node","id":"method-doSubnodeAdded","meta":{}},{"name":"doSubnodeRemoved","tagname":"method","owner":"dr.node","id":"method-doSubnodeRemoved","meta":{}},{"name":"sendEvent","tagname":"method","owner":"Eventable","id":"method-sendEvent","meta":{"chainable":true}},{"name":"setAttribute","tagname":"method","owner":"Eventable","id":"method-setAttribute","meta":{"chainable":true}},{"name":"setAttributes","tagname":"method","owner":"Eventable","id":"method-setAttributes","meta":{"chainable":true}},{"name":"ondestroy","tagname":"event","owner":"dr.node","id":"event-ondestroy","meta":{}},{"name":"oninit","tagname":"event","owner":"dr.node","id":"event-oninit","meta":{}},{"name":"onsubnodes","tagname":"event","owner":"dr.node","id":"event-onsubnodes","meta":{}},{"name":"subnodeAdded","tagname":"event","owner":"dr.node","id":"event-subnodeAdded","meta":{}},{"name":"subnodeRemoved","tagname":"event","owner":"dr.node","id":"event-subnodeRemoved","meta":{}}],"alternateClassNames":[],"aliases":{},"id":"class-dr.node","short_doc":"The nonvisual base class for everything in dreem. ...","component":false,"superclasses":["Module","Eventable"],"subclasses":["dr.audioplayer","dr.dataset","dr.gyro","dr.layout","dr.logger","dr.replicator","dr.shim","dr.state","dr.touch","dr.view"],"mixedInto":[],"mixins":[],"parentMixins":[],"requires":[],"uses":[],"html":"

    Hierarchy

    Subclasses

    Files

    The nonvisual base class for everything in dreem. Handles parent/child relationships between tags.

    \n\n

    Nodes can contain methods, handlers, setters, constraints, attributes and other node instances.

    \n\n

    Here we define a data node that contains movie data.

    \n\n
    <node id=\"data\">\n  <node>\n    <attribute name=\"title\" type=\"string\" value=\"Bill and Teds Excellent Adventure\"></attribute>\n    <attribute name=\"type\" type=\"string\" value=\"movie\"></attribute>\n    <attribute name=\"year\" type=\"string\" value=\"1989\"></attribute>\n    <attribute name=\"length\" type=\"number\" value=\"89\"></attribute>\n  </node>\n  <node>\n    <attribute name=\"title\" type=\"string\" value=\"Waynes World\"></attribute>\n    <attribute name=\"type\" type=\"string\" value=\"movie\"></attribute>\n    <attribute name=\"year\" type=\"string\" value=\"1992\"></attribute>\n    <attribute name=\"length\" type=\"number\" value=\"94\"></attribute>\n  </node>\n</node>\n
    \n\n

    This node defines a set of math helper methods. The node provides a tidy container for these related utility functions.

    \n\n
    <node id=\"utils\">\n  <method name=\"add\" args=\"a,b\">\n    return a+b;\n  </method>\n  <method name=\"subtract\" args=\"a,b\">\n    return a-b;\n  </method>\n</node>\n
    \n\n

    You can also create a sub-class of node to contain non visual functionality. Here is an example of an inches to metric conversion class that is instantiated with the inches value and can convert it to either cm or m.

    \n\n
    <class name=\"inchesconverter\" extends=\"node\">\n  <attribute name=\"inchesval\" type=\"number\" value=\"0\"></attribute>\n\n  <method name=\"centimetersval\">\n    return this.inchesval*2.54;\n  </method>\n\n  <method name=\"metersval\">\n    return (this.inchesval*2.54)/100;\n  </method>\n</class>\n\n<inchesconverter id=\"conv\" inchesval=\"2\"></inchesconverter>\n\n<spacedlayout axis=\"y\"></spacedlayout>\n<text text=\"${conv.inchesval + ' inches'}\"></text>\n<text text=\"${conv.centimetersval() + ' cm'}\"></text>\n<text text=\"${conv.metersval() + ' m'}\"></text>\n
    \n
    Defined By

    Attributes

    : String
    Gives this node a global ID, which can be looked up in the global window object. ...

    Gives this node a global ID, which can be looked up in the global window object.\nTake care to not override builtin globals, or override your own instances!

    \n
    : String

    Names this node in its parent scope so it can be referred to later.

    \n

    Names this node in its parent scope so it can be referred to later.

    \n
    A comma separated list of URLs to javascript includes required as dependencies. ...

    A comma separated list of URLs to javascript includes required as dependencies. Useful if you need to ensure a third party library is available.

    \n

    An error to show if scriptincludes fail to load

    \n

    An error to show if scriptincludes fail to load

    \n
    Defined By

    Properties

    : Booleanreadonly

    True when this node and all its children are completely initialized

    \n

    True when this node and all its children are completely initialized

    \n
    : dr.node[]readonly
    An array of this node's child nodes ...

    An array of this node's child nodes

    \n

    Defaults to: []

    Defined By

    Methods

    Destroys this node ...

    Destroys this node

    \n
    ( node ) : void
    Called when a subnode is added to this node. ...

    Called when a subnode is added to this node. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to add a subnode. Instead call setParent.

    \n

    Parameters

    • node : dr.node

      The subnode that was added.

      \n

    Returns

    • void
      \n
    ( node ) : void
    Called when a subnode is removed from this node. ...

    Called when a subnode is removed from this node. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to remove a subnode. Instead call _removeFromParent.

    \n

    Parameters

    • node : dr.node

      The subnode that was removed.

      \n

    Returns

    • void
      \n
    ( name, value ) : Eventablechainable
    Sends an event ...

    Sends an event

    \n

    Parameters

    • name : String

      the name of the event to send

      \n
    • value : Object

      the value to send with the event

      \n

    Returns

    Sets an attribute, calls a setter if there is one, then sends an event with the new value ...

    Sets an attribute, calls a setter if there is one, then sends an event with the new value

    \n

    Parameters

    • name : String

      the name of the attribute to set

      \n
    • value : Object

      the value to set to

      \n

    Returns

    Calls setAttribute for each name/value pair in the attributes object ...

    Calls setAttribute for each name/value pair in the attributes object

    \n

    Parameters

    • attributes : Object

      An object of name/value pairs to be set

      \n

    Returns

    Defined By

    Events

    ( node )
    Fired when this node and all its children are about to be destroyed ...

    Fired when this node and all its children are about to be destroyed

    \n

    Parameters

    ( node )
    Fired when this node and all its children are completely initialized ...

    Fired when this node and all its children are completely initialized

    \n

    Parameters

    ( node )
    Fired when this node's subnodes array has changed ...

    Fired when this node's subnodes array has changed

    \n

    Parameters

    Fired when a subnode is added to this node. ...

    Fired when a subnode is added to this node.

    \n

    Parameters

    Fired when a subnode is removed from this node. ...

    Fired when a subnode is removed from this node.

    \n

    Parameters

    ","meta":{}}); \ No newline at end of file diff --git a/docs/api/output/dr.rangeslider.js b/docs/api/output/dr.rangeslider.js new file mode 100644 index 00000000..a8d60f3b --- /dev/null +++ b/docs/api/output/dr.rangeslider.js @@ -0,0 +1 @@ +Ext.data.JsonP.dr_rangeslider({"tagname":"class","name":"dr.rangeslider","autodetected":{},"files":[{"filename":"classdocs.js","href":"classdocs.html#dr-rangeslider"}],"extends":"dr.view","members":[{"name":"axis","tagname":"attribute","owner":"dr.rangeslider","id":"attribute-axis","meta":{}},{"name":"bgcolor","tagname":"attribute","owner":"dr.view","id":"attribute-bgcolor","meta":{}},{"name":"border","tagname":"attribute","owner":"dr.view","id":"attribute-border","meta":{}},{"name":"bordercolor","tagname":"attribute","owner":"dr.view","id":"attribute-bordercolor","meta":{}},{"name":"borderstyle","tagname":"attribute","owner":"dr.view","id":"attribute-borderstyle","meta":{}},{"name":"clickable","tagname":"attribute","owner":"dr.view","id":"attribute-clickable","meta":{}},{"name":"clip","tagname":"attribute","owner":"dr.view","id":"attribute-clip","meta":{}},{"name":"exclusive","tagname":"attribute","owner":"dr.rangeslider","id":"attribute-exclusive","meta":{}},{"name":"height","tagname":"attribute","owner":"dr.view","id":"attribute-height","meta":{}},{"name":"highselectcolor","tagname":"attribute","owner":"dr.rangeslider","id":"attribute-highselectcolor","meta":{}},{"name":"highvalue","tagname":"attribute","owner":"dr.rangeslider","id":"attribute-highvalue","meta":{}},{"name":"id","tagname":"attribute","owner":"dr.node","id":"attribute-id","meta":{}},{"name":"invert","tagname":"attribute","owner":"dr.rangeslider","id":"attribute-invert","meta":{}},{"name":"lowselectcolor","tagname":"attribute","owner":"dr.rangeslider","id":"attribute-lowselectcolor","meta":{}},{"name":"lowvalue","tagname":"attribute","owner":"dr.rangeslider","id":"attribute-lowvalue","meta":{}},{"name":"maxlowvalue","tagname":"attribute","owner":"dr.rangeslider","id":"attribute-maxlowvalue","meta":{}},{"name":"maxvalue","tagname":"attribute","owner":"dr.rangeslider","id":"attribute-maxvalue","meta":{}},{"name":"minhighvalue","tagname":"attribute","owner":"dr.rangeslider","id":"attribute-minhighvalue","meta":{}},{"name":"minvalue","tagname":"attribute","owner":"dr.rangeslider","id":"attribute-minvalue","meta":{}},{"name":"name","tagname":"attribute","owner":"dr.node","id":"attribute-name","meta":{}},{"name":"padding","tagname":"attribute","owner":"dr.view","id":"attribute-padding","meta":{}},{"name":"scriptincludes","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludes","meta":{}},{"name":"scriptincludeserror","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludeserror","meta":{}},{"name":"scrollable","tagname":"attribute","owner":"dr.view","id":"attribute-scrollable","meta":{}},{"name":"visible","tagname":"attribute","owner":"dr.view","id":"attribute-visible","meta":{}},{"name":"width","tagname":"attribute","owner":"dr.view","id":"attribute-width","meta":{}},{"name":"x","tagname":"attribute","owner":"dr.view","id":"attribute-x","meta":{}},{"name":"y","tagname":"attribute","owner":"dr.view","id":"attribute-y","meta":{}},{"name":"ignorelayout","tagname":"property","owner":"dr.view","id":"property-ignorelayout","meta":{}},{"name":"inited","tagname":"property","owner":"dr.node","id":"property-inited","meta":{"readonly":true}},{"name":"layouts","tagname":"property","owner":"dr.view","id":"property-layouts","meta":{"readonly":true}},{"name":"subnodes","tagname":"property","owner":"dr.node","id":"property-subnodes","meta":{"readonly":true}},{"name":"subviews","tagname":"property","owner":"dr.view","id":"property-subviews","meta":{"readonly":true}},{"name":"animate","tagname":"method","owner":"dr.view","id":"method-animate","meta":{"chainable":true}},{"name":"changeHighValue","tagname":"method","owner":"dr.rangeslider","id":"method-changeHighValue","meta":{}},{"name":"changeLowValue","tagname":"method","owner":"dr.rangeslider","id":"method-changeLowValue","meta":{}},{"name":"destroy","tagname":"method","owner":"dr.node","id":"method-destroy","meta":{}},{"name":"doLayoutAdded","tagname":"method","owner":"dr.view","id":"method-doLayoutAdded","meta":{}},{"name":"doLayoutRemoved","tagname":"method","owner":"dr.view","id":"method-doLayoutRemoved","meta":{}},{"name":"doSubnodeAdded","tagname":"method","owner":"dr.view","id":"method-doSubnodeAdded","meta":{}},{"name":"doSubnodeRemoved","tagname":"method","owner":"dr.view","id":"method-doSubnodeRemoved","meta":{}},{"name":"doSubviewAdded","tagname":"method","owner":"dr.view","id":"method-doSubviewAdded","meta":{}},{"name":"doSubviewRemoved","tagname":"method","owner":"dr.view","id":"method-doSubviewRemoved","meta":{}},{"name":"sendEvent","tagname":"method","owner":"Eventable","id":"method-sendEvent","meta":{"chainable":true}},{"name":"setAttribute","tagname":"method","owner":"Eventable","id":"method-setAttribute","meta":{"chainable":true}},{"name":"setAttributes","tagname":"method","owner":"Eventable","id":"method-setAttributes","meta":{"chainable":true}},{"name":"layoutAdded","tagname":"event","owner":"dr.view","id":"event-layoutAdded","meta":{}},{"name":"layoutRemoved","tagname":"event","owner":"dr.view","id":"event-layoutRemoved","meta":{}},{"name":"onclick","tagname":"event","owner":"dr.view","id":"event-onclick","meta":{}},{"name":"ondestroy","tagname":"event","owner":"dr.node","id":"event-ondestroy","meta":{}},{"name":"oninit","tagname":"event","owner":"dr.node","id":"event-oninit","meta":{}},{"name":"onlayouts","tagname":"event","owner":"dr.view","id":"event-onlayouts","meta":{}},{"name":"onmousedown","tagname":"event","owner":"dr.view","id":"event-onmousedown","meta":{}},{"name":"onmouseout","tagname":"event","owner":"dr.view","id":"event-onmouseout","meta":{}},{"name":"onmouseover","tagname":"event","owner":"dr.view","id":"event-onmouseover","meta":{}},{"name":"onmouseup","tagname":"event","owner":"dr.view","id":"event-onmouseup","meta":{}},{"name":"onsubnodes","tagname":"event","owner":"dr.node","id":"event-onsubnodes","meta":{}},{"name":"onsubviews","tagname":"event","owner":"dr.view","id":"event-onsubviews","meta":{}},{"name":"subnodeAdded","tagname":"event","owner":"dr.node","id":"event-subnodeAdded","meta":{}},{"name":"subnodeRemoved","tagname":"event","owner":"dr.node","id":"event-subnodeRemoved","meta":{}},{"name":"subviewAdded","tagname":"event","owner":"dr.view","id":"event-subviewAdded","meta":{}},{"name":"subviewRemoved","tagname":"event","owner":"dr.view","id":"event-subviewRemoved","meta":{}}],"alternateClassNames":[],"aliases":{},"id":"class-dr.rangeslider","short_doc":"An input component whose upper and lower bounds are changed via mouse clicks or drags. ...","component":false,"superclasses":["Module","Eventable","dr.node","dr.view"],"subclasses":[],"mixedInto":[],"mixins":[],"parentMixins":[],"requires":[],"uses":[],"html":"

    Hierarchy

    Files

    An input component whose upper and lower bounds are changed via mouse clicks or drags.

    \n\n
    <rangeslider name=\"range\" width=\"300\" height=\"40\" x=\"10\" y=\"30\" lowselectcolor=\"#00CCFF\" highselectcolor=\"#FFCCFF\" outline=\"2px dashed #00CCFF\"\n             lowvalue=\"30\"\n             highvalue=\"70\">\n</rangeslider>\n\n<text name=\"rangeLabel\" color=\"white\" height=\"40\"\n      y=\"${this.parent.range.y + (this.parent.range.height / 2) - (this.height / 2)}\"\n      x=\"${(this.parent.range.lowvalue * 3) + (((this.parent.range.highvalue * 3) - (this.parent.range.lowvalue * 3)) / 2) - (this.width / 2)}\"\n      text=\"${Math.round(this.parent.range.lowvalue) + ' ~ ' + Math.round(this.parent.range.highvalue)}\"></text>\n
    \n\n

    A range slider highlights the inclusive values by default, however this behavior can be reversed with exclusive=\"true\".\nThe following example demonstrates an exclusive-valued, inverted (range goes from high to low) horizontal slider.

    \n\n
    <rangeslider name=\"range\" width=\"400\" x=\"10\" y=\"30\" lowselectcolor=\"#AACCFF\" highselectcolor=\"#FFAACC\"\"\n             height=\"30\"\n             lowvalue=\"45\"\n             highvalue=\"55\"\n             invert=\"true\"\n             exclusive=\"true\">\n</rangeslider>\n\n<text name=\"highRangeLabel\" color=\"#666\" height=\"20\"\n      y=\"${this.parent.range.y + (this.parent.range.height / 2) - (this.height / 2)}\"\n      x=\"${(((this.parent.range.maxvalue * 4) - (this.parent.range.highvalue * 4)) / 2) - (this.width / 2)}\"\n      text=\"${this.parent.range.maxvalue + ' ~ ' + Math.round(this.parent.range.highvalue)}\"></text>\n\n<text name=\"lowRangeLabel\" color=\"#666\" height=\"20\"\n      y=\"${this.parent.range.y + (this.parent.range.height / 2) - (this.height / 2)}\"\n      x=\"${(this.parent.range.width - (this.parent.range.lowvalue * 4)) + (((this.parent.range.lowvalue * 4) - (this.parent.range.minvalue * 4)) / 2) - (this.width / 2)}\"\n      text=\"${Math.round(this.parent.range.lowvalue) + ' ~ ' + this.parent.range.minvalue}\"></text>\n
    \n
    Defined By

    Attributes

    dr.rangeslider
    view source
    : \"x\"/\"y\"
    The axis to track on ...

    The axis to track on

    \n

    Defaults to: x

    Sets this view's background color

    \n

    Sets this view's background color

    \n

    Sets this view's border width

    \n

    Sets this view's border width

    \n

    Sets this view's border color

    \n

    Sets this view's border color

    \n

    Sets this view's border style (can be any css border-style value)

    \n

    Sets this view's border style (can be any css border-style value)

    \n
    If true, this view recieves mouse events. ...

    If true, this view recieves mouse events. Automatically set to true when an onclick/mouse* event is registered for this view.

    \n

    Defaults to: false

    If true, this view clips to its bounds ...

    If true, this view clips to its bounds

    \n

    Defaults to: false

    dr.rangeslider
    view source
    : Boolean
    Set to true to highlight the outer (exclusive) values of the range, false to select the inner (inclusive) values. ...

    Set to true to highlight the outer (exclusive) values of the range, false to select the inner (inclusive) values.

    \n

    Defaults to: false

    This view's height ...

    This view's height

    \n

    Defaults to: 0

    dr.rangeslider
    view source
    : String
    The selected color of the upper bound slider. ...

    The selected color of the upper bound slider.

    \n

    Defaults to: "#a0a0a0"

    dr.rangeslider
    view source
    : Number
    The current value of the right slider. ...

    The current value of the right slider.\nUse changeHighValue() to range check the number and set the value.

    \n

    Defaults to: 50

    Gives this node a global ID, which can be looked up in the global window object. ...

    Gives this node a global ID, which can be looked up in the global window object.\nTake care to not override builtin globals, or override your own instances!

    \n
    dr.rangeslider
    view source
    : Boolean
    Set to false to have the scale run lower to higher, true to run higher to lower. ...

    Set to false to have the scale run lower to higher, true to run higher to lower.

    \n

    Defaults to: false

    dr.rangeslider
    view source
    : String
    The selected color of the lower bound slider. ...

    The selected color of the lower bound slider.

    \n

    Defaults to: "#a0a0a0"

    dr.rangeslider
    view source
    : Number
    The current value of the left slider. ...

    The current value of the left slider.\nUse changeLowValue() to range check the number and set the value.

    \n

    Defaults to: 50

    dr.rangeslider
    view source
    : Number
    The maximum value of the lower bound slider ...

    The maximum value of the lower bound slider

    \n

    Defaults to: 100

    dr.rangeslider
    view source
    : Number
    The maximum value of the slider ...

    The maximum value of the slider

    \n

    Defaults to: 100

    dr.rangeslider
    view source
    : Number
    The minimum value of the right slider ...

    The minimum value of the right slider

    \n

    Defaults to: 0

    dr.rangeslider
    view source
    : Number
    The minimum value of the slider ...

    The minimum value of the slider

    \n

    Defaults to: 0

    Names this node in its parent scope so it can be referred to later.

    \n

    Names this node in its parent scope so it can be referred to later.

    \n

    Sets this view's padding

    \n

    Sets this view's padding

    \n
    A comma separated list of URLs to javascript includes required as dependencies. ...

    A comma separated list of URLs to javascript includes required as dependencies. Useful if you need to ensure a third party library is available.

    \n

    An error to show if scriptincludes fail to load

    \n

    An error to show if scriptincludes fail to load

    \n
    If true, this view clips to its bounds and provides scrolling to see content that overflows the bounds ...

    If true, this view clips to its bounds and provides scrolling to see content that overflows the bounds

    \n

    Defaults to: false

    If false, this view is invisible ...

    If false, this view is invisible

    \n

    Defaults to: true

    This view's width ...

    This view's width

    \n

    Defaults to: 0

    This view's x position ...

    This view's x position

    \n

    Defaults to: 0

    This view's y position ...

    This view's y position

    \n

    Defaults to: 0

    Defined By

    Properties

    If true, layouts should ignore this view

    \n

    If true, layouts should ignore this view

    \n
    : Booleanreadonly

    True when this node and all its children are completely initialized

    \n

    True when this node and all its children are completely initialized

    \n
    An array of this views's layouts. ...

    An array of this views's layouts. Only defined when needed.

    \n
    An array of this node's child nodes ...

    An array of this node's child nodes

    \n

    Defaults to: []

    An array of this views's child views

    \n

    An array of this views's child views

    \n
    Defined By

    Methods

    ( obj, Number ) : dr.viewchainable
    Animates this view's attribute(s) ...

    Animates this view's attribute(s)

    \n

    Parameters

    • obj : Object

      A hash of attribute names and values to animate to

      \n
    • Number : Object

      duration The duration of the animation in milliseconds

      \n

    Returns

    dr.rangeslider
    view source
    ( v )
    Given a new value for the slider position, constrain the value\nbetween minvalue or minhighvalue (whichever is higher)...

    Given a new value for the slider position, constrain the value\nbetween minvalue or minhighvalue (whichever is higher) and maxvalue and then calls setAttribute.

    \n

    Parameters

    • v : Number

      The new value of the component.

      \n
    dr.rangeslider
    view source
    ( v )
    Given a new value for the slider position, constrain the value\nbetween minvalue and maxvalue or maxlowvalue (whicheve...

    Given a new value for the slider position, constrain the value\nbetween minvalue and maxvalue or maxlowvalue (whichever is lower) and then calls setAttribute.

    \n

    Parameters

    • v : Number

      The new value of the component.

      \n
    Destroys this node ...

    Destroys this node

    \n
    Called when a layout is added to this view. ...

    Called when a layout is added to this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to add a layout. Instead call setParent.

    \n

    Parameters

    • layout : dr.layout

      The layout that was added.

      \n

    Returns

    • void
      \n
    Called when a layout is removed from this view. ...

    Called when a layout is removed from this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to remove a layout. Instead call _removeFromParent.

    \n

    Parameters

    • layout : dr.layout

      The layout that was removed.

      \n

    Returns

    • void
      \n
    Calls doSubviewAdded/doLayoutAdded if the added subnode is a view or\nlayout respectively. ...

    Calls doSubviewAdded/doLayoutAdded if the added subnode is a view or\nlayout respectively. Subclasses should call super.

    \n

    Parameters

    • node : Object

    Overrides: dr.node.doSubnodeAdded

    Calls doSubviewRemoved/doLayoutRemoved if the removed subnode is a view or\nlayout respectively. ...

    Calls doSubviewRemoved/doLayoutRemoved if the removed subnode is a view or\nlayout respectively. Subclasses should call super.

    \n

    Parameters

    • node : Object

    Overrides: dr.node.doSubnodeRemoved

    Called when a subview is added to this view. ...

    Called when a subview is added to this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to add a subview. Instead call setParent.

    \n

    Parameters

    • sv : dr.view

      The subview that was added.

      \n

    Returns

    • void
      \n
    Called when a subview is removed from this view. ...

    Called when a subview is removed from this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to remove a subview. Instead call _removeFromParent.

    \n

    Parameters

    • sv : dr.view

      The subview that was removed.

      \n

    Returns

    • void
      \n
    ( name, value ) : Eventablechainable
    Sends an event ...

    Sends an event

    \n

    Parameters

    • name : String

      the name of the event to send

      \n
    • value : Object

      the value to send with the event

      \n

    Returns

    Sets an attribute, calls a setter if there is one, then sends an event with the new value ...

    Sets an attribute, calls a setter if there is one, then sends an event with the new value

    \n

    Parameters

    • name : String

      the name of the attribute to set

      \n
    • value : Object

      the value to set to

      \n

    Returns

    Calls setAttribute for each name/value pair in the attributes object ...

    Calls setAttribute for each name/value pair in the attributes object

    \n

    Parameters

    • attributes : Object

      An object of name/value pairs to be set

      \n

    Returns

    Defined By

    Events

    Fired when a layout is added to this view. ...

    Fired when a layout is added to this view.

    \n

    Parameters

    Fired when a layout is removed from this view. ...

    Fired when a layout is removed from this view.

    \n

    Parameters

    Fired when this view is clicked ...

    Fired when this view is clicked

    \n

    Parameters

    Fired when this node and all its children are about to be destroyed ...

    Fired when this node and all its children are about to be destroyed

    \n

    Parameters

    Fired when this node and all its children are completely initialized ...

    Fired when this node and all its children are completely initialized

    \n

    Parameters

    Fired when this views's layouts array has changed ...

    Fired when this views's layouts array has changed

    \n

    Parameters

    Fired when the mouse goes down on this view ...

    Fired when the mouse goes down on this view

    \n

    Parameters

    Fired when the mouse moves off this view ...

    Fired when the mouse moves off this view

    \n

    Parameters

    Fired when the mouse moves over this view ...

    Fired when the mouse moves over this view

    \n

    Parameters

    Fired when the mouse goes up on this view ...

    Fired when the mouse goes up on this view

    \n

    Parameters

    Fired when this node's subnodes array has changed ...

    Fired when this node's subnodes array has changed

    \n

    Parameters

    Fired when this views's subviews array has changed ...

    Fired when this views's subviews array has changed

    \n

    Parameters

    Fired when a subnode is added to this node. ...

    Fired when a subnode is added to this node.

    \n

    Parameters

    Fired when a subnode is removed from this node. ...

    Fired when a subnode is removed from this node.

    \n

    Parameters

    Fired when a subview is added to this view. ...

    Fired when a subview is added to this view.

    \n

    Parameters

    Fired when a subview is removed from this view. ...

    Fired when a subview is removed from this view.

    \n

    Parameters

    ","meta":{}}); \ No newline at end of file diff --git a/docs/api/output/dr.replicator.js b/docs/api/output/dr.replicator.js new file mode 100644 index 00000000..c7e31c79 --- /dev/null +++ b/docs/api/output/dr.replicator.js @@ -0,0 +1 @@ +Ext.data.JsonP.dr_replicator({"tagname":"class","name":"dr.replicator","autodetected":{},"files":[{"filename":"classdocs.js","href":"classdocs.html#dr-replicator"}],"extends":"dr.node","members":[{"name":"classname","tagname":"attribute","owner":"dr.replicator","id":"attribute-classname","meta":{"required":true}},{"name":"data","tagname":"attribute","owner":"dr.replicator","id":"attribute-data","meta":{}},{"name":"datapath","tagname":"attribute","owner":"dr.replicator","id":"attribute-datapath","meta":{}},{"name":"filterexpression","tagname":"attribute","owner":"dr.replicator","id":"attribute-filterexpression","meta":{}},{"name":"id","tagname":"attribute","owner":"dr.node","id":"attribute-id","meta":{}},{"name":"name","tagname":"attribute","owner":"dr.node","id":"attribute-name","meta":{}},{"name":"pooling","tagname":"attribute","owner":"dr.replicator","id":"attribute-pooling","meta":{}},{"name":"scriptincludes","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludes","meta":{}},{"name":"scriptincludeserror","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludeserror","meta":{}},{"name":"sortasc","tagname":"attribute","owner":"dr.replicator","id":"attribute-sortasc","meta":{}},{"name":"sortfield","tagname":"attribute","owner":"dr.replicator","id":"attribute-sortfield","meta":{}},{"name":"inited","tagname":"property","owner":"dr.node","id":"property-inited","meta":{"readonly":true}},{"name":"subnodes","tagname":"property","owner":"dr.node","id":"property-subnodes","meta":{"readonly":true}},{"name":"destroy","tagname":"method","owner":"dr.node","id":"method-destroy","meta":{}},{"name":"doSubnodeAdded","tagname":"method","owner":"dr.node","id":"method-doSubnodeAdded","meta":{}},{"name":"doSubnodeRemoved","tagname":"method","owner":"dr.node","id":"method-doSubnodeRemoved","meta":{}},{"name":"filterfunction","tagname":"method","owner":"dr.replicator","id":"method-filterfunction","meta":{"abstract":true}},{"name":"refresh","tagname":"method","owner":"dr.replicator","id":"method-refresh","meta":{}},{"name":"sendEvent","tagname":"method","owner":"Eventable","id":"method-sendEvent","meta":{"chainable":true}},{"name":"setAttribute","tagname":"method","owner":"Eventable","id":"method-setAttribute","meta":{"chainable":true}},{"name":"setAttributes","tagname":"method","owner":"Eventable","id":"method-setAttributes","meta":{"chainable":true}},{"name":"ondestroy","tagname":"event","owner":"dr.node","id":"event-ondestroy","meta":{}},{"name":"oninit","tagname":"event","owner":"dr.node","id":"event-oninit","meta":{}},{"name":"onsubnodes","tagname":"event","owner":"dr.node","id":"event-onsubnodes","meta":{}},{"name":"subnodeAdded","tagname":"event","owner":"dr.node","id":"event-subnodeAdded","meta":{}},{"name":"subnodeRemoved","tagname":"event","owner":"dr.node","id":"event-subnodeRemoved","meta":{}}],"alternateClassNames":[],"aliases":{},"id":"class-dr.replicator","short_doc":"Handles replication and data binding. ...","component":false,"superclasses":["Module","Eventable","dr.node"],"subclasses":[],"mixedInto":[],"mixins":[],"parentMixins":[],"requires":[],"uses":[],"html":"

    Hierarchy

    Files

    Handles replication and data binding.

    \n\n

    This example shows the replicator to creating four text instances, each corresponding to an item in the data attribute:

    \n\n
    <spacedlayout></spacedlayout>\n<replicator classname=\"text\" data=\"[1,2,3,4]\"></replicator>\n
    \n\n

    Changing the data attribute to a new array causes the replicator to create a new text for each item:

    \n\n
    <spacedlayout></spacedlayout>\n<text onclick=\"repl.setAttribute('data', [5,6,7,8]);\">Click to change data</text>\n<replicator id=\"repl\" classname=\"text\" data=\"[1,2,3,4]\"></replicator>\n
    \n\n

    This example uses a filterexpression to filter the data to only numbers. Clicking changes filterexpression to show only non-numbers in the data:

    \n\n
    <spacedlayout></spacedlayout>\n<text onclick=\"repl.setAttribute('filterexpression', '[^\\\\d]');\">Click to change filter</text>\n<replicator id=\"repl\" classname=\"text\" data=\"['a',1,'b',2,'c',3,4,5]\" filterexpression=\"\\d\"></replicator>\n
    \n\n

    Replicators can be used to look up datapath expressions to values in JSON data in a dr.dataset. This example looks up the color of the bicycle in the dr.dataset named bikeshop:

    \n\n
    <dataset name=\"bikeshop\">\n {\n   \"bicycle\": {\n     \"color\": \"red\",\n     \"price\": 19.95\n   }\n }\n</dataset>\n<replicator classname=\"text\" datapath=\"$bikeshop/bicycle/color\"></replicator>\n
    \n\n

    Matching one or more items will cause the replicator to create multiple copies:

    \n\n
    <dataset name=\"bikeshop\">\n {\n   \"bicycle\": [\n     {\n      \"color\": \"red\",\n      \"price\": 19.95\n     },\n     {\n      \"color\": \"green\",\n      \"price\": 29.95\n     },\n     {\n      \"color\": \"blue\",\n      \"price\": 59.95\n     }\n   ]\n }\n</dataset>\n<spacedlayout></spacedlayout>\n<replicator classname=\"text\" datapath=\"$bikeshop/bicycle[*]/color\"></replicator>\n
    \n\n

    It's possible to select a single item on from the array using an array index. This selects the second item:

    \n\n
    <dataset name=\"bikeshop\">\n {\n   \"bicycle\": [\n     {\n      \"color\": \"red\",\n      \"price\": 19.95\n     },\n     {\n      \"color\": \"green\",\n      \"price\": 29.95\n     },\n     {\n      \"color\": \"blue\",\n      \"price\": 59.95\n     }\n   ]\n }\n</dataset>\n<spacedlayout></spacedlayout>\n<replicator classname=\"text\" datapath=\"$bikeshop/bicycle[1]/color\"></replicator>\n
    \n\n

    It's also possible to replicate a range of items in the array with the [start,end,stepsize] operator. This replicates every other item:

    \n\n
    <dataset name=\"bikeshop\">\n {\n   \"bicycle\": [\n     {\n      \"color\": \"red\",\n      \"price\": 19.95\n     },\n     {\n      \"color\": \"green\",\n      \"price\": 29.95\n     },\n     {\n      \"color\": \"blue\",\n      \"price\": 59.95\n     }\n   ]\n }\n</dataset>\n<spacedlayout></spacedlayout>\n<replicator classname=\"text\" datapath=\"$bikeshop/bicycle[0,3,2]/color\"></replicator>\n
    \n\n

    Sometimes it's necessary to have complete control and flexibility over filtering and transforming results. Adding a [@] operator to the end of your datapath causes filterfunction to be called for each result. This example shows bike colors for bikes with a price greater than 20, in reverse order:

    \n\n
    <dataset name=\"bikeshop\">\n {\n   \"bicycle\": [\n     {\n      \"color\": \"red\",\n      \"price\": 19.95\n     },\n     {\n      \"color\": \"green\",\n      \"price\": 29.95\n     },\n     {\n      \"color\": \"blue\",\n      \"price\": 59.95\n     }\n   ]\n }\n</dataset>\n<spacedlayout></spacedlayout>\n<replicator classname=\"text\" datapath=\"$bikeshop/bicycle[*][@]\">\n  <method name=\"filterfunction\" args=\"obj, accum\">\n    // add the color to the beginning of the results if the price is greater than 20\n    if (obj.price > 20)\n      accum.unshift(obj.color);\n    return accum\n  </method>\n</replicator>\n
    \n\n

    See https://github.com/flitbit/json-path for more details.

    \n

    Attributes

    Defined By

    Required attributes

    dr.replicator
    view source
    : Stringrequired

    The name of the class to be replicated.

    \n

    The name of the class to be replicated.

    \n
    Defined By

    Optional attributes

    dr.replicator
    view source
    : Array
    The list of items to replicate. ...

    The list of items to replicate. If datapath is set, it is converted to an array and stored here.

    \n

    Defaults to: []

    dr.replicator
    view source
    : String
    The datapath expression to be replicated. ...

    The datapath expression to be replicated.\nSee https://github.com/flitbit/json-path for details.

    \n
    dr.replicator
    view source
    : String
    If defined, data will be filtered against a regular expression. ...

    If defined, data will be filtered against a regular expression.

    \n

    Defaults to: ""

    Gives this node a global ID, which can be looked up in the global window object. ...

    Gives this node a global ID, which can be looked up in the global window object.\nTake care to not override builtin globals, or override your own instances!

    \n

    Names this node in its parent scope so it can be referred to later.

    \n

    Names this node in its parent scope so it can be referred to later.

    \n
    dr.replicator
    view source
    : Boolean
    If true, reuse views when replicating. ...

    If true, reuse views when replicating.

    \n

    Defaults to: false

    A comma separated list of URLs to javascript includes required as dependencies. ...

    A comma separated list of URLs to javascript includes required as dependencies. Useful if you need to ensure a third party library is available.

    \n

    An error to show if scriptincludes fail to load

    \n

    An error to show if scriptincludes fail to load

    \n
    dr.replicator
    view source
    : Boolean
    If true, sort ascending. ...

    If true, sort ascending.

    \n

    Defaults to: true

    dr.replicator
    view source
    : String
    The field in the data to use for sorting. ...

    The field in the data to use for sorting. Only sort then this

    \n

    Defaults to: ""

    Defined By

    Properties

    : Booleanreadonly

    True when this node and all its children are completely initialized

    \n

    True when this node and all its children are completely initialized

    \n
    An array of this node's child nodes ...

    An array of this node's child nodes

    \n

    Defaults to: []

    Defined By

    Methods

    Destroys this node ...

    Destroys this node

    \n
    Called when a subnode is added to this node. ...

    Called when a subnode is added to this node. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to add a subnode. Instead call setParent.

    \n

    Parameters

    • node : dr.node

      The subnode that was added.

      \n

    Returns

    • void
      \n
    Called when a subnode is removed from this node. ...

    Called when a subnode is removed from this node. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to remove a subnode. Instead call _removeFromParent.

    \n

    Parameters

    • node : dr.node

      The subnode that was removed.

      \n

    Returns

    • void
      \n
    dr.replicator
    view source
    ( obj, accum ) : Object[]abstract
    Called to filter data. ...

    Called to filter data.

    \n

    Parameters

    • obj : Object

      An individual item to be processed.

      \n
    • accum : Object[]

      The array of items that have been accumulated. To keep a processed item, it must be added to the accum array.

      \n

    Returns

    • Object[]

      The accum array. Must be returned otherwise results will be lost.

      \n
    dr.replicator
    view source
    ( )
    Refreshes the dataset manually ...

    Refreshes the dataset manually

    \n
    ( name, value ) : Eventablechainable
    Sends an event ...

    Sends an event

    \n

    Parameters

    • name : String

      the name of the event to send

      \n
    • value : Object

      the value to send with the event

      \n

    Returns

    Sets an attribute, calls a setter if there is one, then sends an event with the new value ...

    Sets an attribute, calls a setter if there is one, then sends an event with the new value

    \n

    Parameters

    • name : String

      the name of the attribute to set

      \n
    • value : Object

      the value to set to

      \n

    Returns

    Calls setAttribute for each name/value pair in the attributes object ...

    Calls setAttribute for each name/value pair in the attributes object

    \n

    Parameters

    • attributes : Object

      An object of name/value pairs to be set

      \n

    Returns

    Defined By

    Events

    Fired when this node and all its children are about to be destroyed ...

    Fired when this node and all its children are about to be destroyed

    \n

    Parameters

    Fired when this node and all its children are completely initialized ...

    Fired when this node and all its children are completely initialized

    \n

    Parameters

    Fired when this node's subnodes array has changed ...

    Fired when this node's subnodes array has changed

    \n

    Parameters

    Fired when a subnode is added to this node. ...

    Fired when a subnode is added to this node.

    \n

    Parameters

    Fired when a subnode is removed from this node. ...

    Fired when a subnode is removed from this node.

    \n

    Parameters

    ","meta":{}}); \ No newline at end of file diff --git a/docs/api/output/dr.resizelayout.js b/docs/api/output/dr.resizelayout.js new file mode 100644 index 00000000..98c975e7 --- /dev/null +++ b/docs/api/output/dr.resizelayout.js @@ -0,0 +1 @@ +Ext.data.JsonP.dr_resizelayout({"tagname":"class","name":"dr.resizelayout","autodetected":{},"files":[{"filename":"classdocs.js","href":"classdocs.html#dr-resizelayout"}],"extends":"dr.spacedlayout","members":[{"name":"attribute","tagname":"attribute","owner":"dr.constantlayout","id":"attribute-attribute","meta":{}},{"name":"axis","tagname":"attribute","owner":"dr.spacedlayout","id":"attribute-axis","meta":{}},{"name":"collapseparent","tagname":"attribute","owner":"dr.variablelayout","id":"attribute-collapseparent","meta":{}},{"name":"id","tagname":"attribute","owner":"dr.node","id":"attribute-id","meta":{}},{"name":"inset","tagname":"attribute","owner":"dr.spacedlayout","id":"attribute-inset","meta":{}},{"name":"name","tagname":"attribute","owner":"dr.node","id":"attribute-name","meta":{}},{"name":"outset","tagname":"attribute","owner":"dr.spacedlayout","id":"attribute-outset","meta":{}},{"name":"reverse","tagname":"attribute","owner":"dr.variablelayout","id":"attribute-reverse","meta":{}},{"name":"scriptincludes","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludes","meta":{}},{"name":"scriptincludeserror","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludeserror","meta":{}},{"name":"spacing","tagname":"attribute","owner":"dr.spacedlayout","id":"attribute-spacing","meta":{}},{"name":"value","tagname":"attribute","owner":"dr.constantlayout","id":"attribute-value","meta":{}},{"name":"inited","tagname":"property","owner":"dr.node","id":"property-inited","meta":{"readonly":true}},{"name":"subnodes","tagname":"property","owner":"dr.node","id":"property-subnodes","meta":{"readonly":true}},{"name":"addSubview","tagname":"method","owner":"dr.layout","id":"method-addSubview","meta":{}},{"name":"canUpdate","tagname":"method","owner":"dr.layout","id":"method-canUpdate","meta":{}},{"name":"destroy","tagname":"method","owner":"dr.node","id":"method-destroy","meta":{}},{"name":"doAfterUpdate","tagname":"method","owner":"dr.variablelayout","id":"method-doAfterUpdate","meta":{}},{"name":"doBeforeUpdate","tagname":"method","owner":"dr.variablelayout","id":"method-doBeforeUpdate","meta":{}},{"name":"doSubnodeAdded","tagname":"method","owner":"dr.node","id":"method-doSubnodeAdded","meta":{}},{"name":"doSubnodeRemoved","tagname":"method","owner":"dr.node","id":"method-doSubnodeRemoved","meta":{}},{"name":"ignore","tagname":"method","owner":"dr.layout","id":"method-ignore","meta":{}},{"name":"removeSubview","tagname":"method","owner":"dr.layout","id":"method-removeSubview","meta":{}},{"name":"sendEvent","tagname":"method","owner":"Eventable","id":"method-sendEvent","meta":{"chainable":true}},{"name":"setAttribute","tagname":"method","owner":"Eventable","id":"method-setAttribute","meta":{"chainable":true}},{"name":"setAttributes","tagname":"method","owner":"Eventable","id":"method-setAttributes","meta":{"chainable":true}},{"name":"skipSubview","tagname":"method","owner":"dr.variablelayout","id":"method-skipSubview","meta":{}},{"name":"startMonitoringAllSubviews","tagname":"method","owner":"dr.layout","id":"method-startMonitoringAllSubviews","meta":{}},{"name":"startMonitoringSubview","tagname":"method","owner":"dr.variablelayout","id":"method-startMonitoringSubview","meta":{}},{"name":"stopMonitoringAllSubviews","tagname":"method","owner":"dr.layout","id":"method-stopMonitoringAllSubviews","meta":{}},{"name":"stopMonitoringSubview","tagname":"method","owner":"dr.variablelayout","id":"method-stopMonitoringSubview","meta":{}},{"name":"update","tagname":"method","owner":"dr.layout","id":"method-update","meta":{}},{"name":"updateParent","tagname":"method","owner":"dr.variablelayout","id":"method-updateParent","meta":{}},{"name":"updateSubview","tagname":"method","owner":"dr.variablelayout","id":"method-updateSubview","meta":{}},{"name":"ondestroy","tagname":"event","owner":"dr.node","id":"event-ondestroy","meta":{}},{"name":"oninit","tagname":"event","owner":"dr.node","id":"event-oninit","meta":{}},{"name":"onsubnodes","tagname":"event","owner":"dr.node","id":"event-onsubnodes","meta":{}},{"name":"subnodeAdded","tagname":"event","owner":"dr.node","id":"event-subnodeAdded","meta":{}},{"name":"subnodeRemoved","tagname":"event","owner":"dr.node","id":"event-subnodeRemoved","meta":{}}],"alternateClassNames":[],"aliases":{},"id":"class-dr.resizelayout","short_doc":"Resizes one or more views to fill in any remaining space. ...","component":false,"superclasses":["Module","Eventable","dr.node","dr.layout","dr.constantlayout","dr.variablelayout","dr.spacedlayout"],"subclasses":[],"mixedInto":[],"mixins":[],"parentMixins":[],"requires":[],"uses":[],"html":"

    Hierarchy

    Files

    Resizes one or more views to fill in any remaining space.

    \n\n
    <resizelayout spacing=\"2\" inset=\"5\" outset=\"5\">\n</resizelayout>\n\n<view height=\"25\" bgcolor=\"lightpink\"></view>\n<view height=\"35\" bgcolor=\"plum\" layouthint=\"1\"></view>\n<view height=\"15\" bgcolor=\"lightblue\"></view>\n
    \n
    Defined By

    Attributes

    The name of the attribute to update on each subview. ...

    The name of the attribute to update on each subview.

    \n

    Defaults to: x

    The orientation of the layout. ...

    The orientation of the layout. Supported values are 'x' and 'y'.\nA value of 'x' will orient the views horizontally and a value of 'y'\nwill orient them vertically.

    \n

    Defaults to: 'x'

    If true the updateParent method will be called. ...

    If true the updateParent method will be called. The updateParent method\nwill typically resize the parent to fit the newly layed out child views.

    \n

    Defaults to: false

    Gives this node a global ID, which can be looked up in the global window object. ...

    Gives this node a global ID, which can be looked up in the global window object.\nTake care to not override builtin globals, or override your own instances!

    \n
    Space before the first view. ...

    Space before the first view.

    \n

    Defaults to: 0

    Names this node in its parent scope so it can be referred to later.

    \n

    Names this node in its parent scope so it can be referred to later.

    \n
    Space after the last view. ...

    Space after the last view. Only used when collapseparent is true.

    \n

    Defaults to: 0

    If true the layout will position the items in the opposite order. ...

    If true the layout will position the items in the opposite order. For\nexample, right to left instead of left to right.

    \n

    Defaults to: false

    A comma separated list of URLs to javascript includes required as dependencies. ...

    A comma separated list of URLs to javascript includes required as dependencies. Useful if you need to ensure a third party library is available.

    \n

    An error to show if scriptincludes fail to load

    \n

    An error to show if scriptincludes fail to load

    \n
    The spacing between views. ...

    The spacing between views.

    \n

    Defaults to: 0

    The value to set the attribute to. ...

    The value to set the attribute to.

    \n

    Defaults to: 0

    Defined By

    Properties

    : Booleanreadonly

    True when this node and all its children are completely initialized

    \n

    True when this node and all its children are completely initialized

    \n
    An array of this node's child nodes ...

    An array of this node's child nodes

    \n

    Defaults to: []

    Defined By

    Methods

    Adds the provided view to the subviews array of this layout. ...

    Adds the provided view to the subviews array of this layout.

    \n

    Parameters

    • view : dr.view

      The view to add to this layout.

      \n

    Returns

    • void
      \n
    Checks if the layout is locked or not. ...

    Checks if the layout is locked or not. Should be called by the\n\"update\" method of each layout to check if it is OK to do the update.

    \n

    Returns

    • boolean

      true if not locked, false otherwise.

      \n
    Destroys this node ...

    Destroys this node

    \n
    Called by update after any processing is done but before the optional\ncollapsing of parent is done. ...

    Called by update after any processing is done but before the optional\ncollapsing of parent is done. Gives subviews a chance to do any\nspecial teardown after update is processed.

    \n

    Returns

    • void
      \n
    Called by update before any processing is done. ...

    Called by update before any processing is done. Gives subviews a\nchance to do any special setup before update is processed.

    \n

    Returns

    • void
      \n
    Called when a subnode is added to this node. ...

    Called when a subnode is added to this node. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to add a subnode. Instead call setParent.

    \n

    Parameters

    • node : dr.node

      The subnode that was added.

      \n

    Returns

    • void
      \n
    Called when a subnode is removed from this node. ...

    Called when a subnode is removed from this node. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to remove a subnode. Instead call _removeFromParent.

    \n

    Parameters

    • node : dr.node

      The subnode that was removed.

      \n

    Returns

    • void
      \n
    ( view ) : boolean
    Checks if a subview can be added to this Layout or not. ...

    Checks if a subview can be added to this Layout or not. The default\nimplementation returns the 'ignorelayout' attributes of the subview.

    \n

    Parameters

    Returns

    • boolean

      True means the subview will be skipped, false otherwise.

      \n
    Removes the provided View from the subviews array of this Layout. ...

    Removes the provided View from the subviews array of this Layout.

    \n

    Parameters

    • view : dr.view

      The view to remove from this layout.

      \n

    Returns

    • number

      the index of the removed subview or -1 if not removed.

      \n
    ( name, value ) : Eventablechainable
    Sends an event ...

    Sends an event

    \n

    Parameters

    • name : String

      the name of the event to send

      \n
    • value : Object

      the value to send with the event

      \n

    Returns

    Sets an attribute, calls a setter if there is one, then sends an event with the new value ...

    Sets an attribute, calls a setter if there is one, then sends an event with the new value

    \n

    Parameters

    • name : String

      the name of the attribute to set

      \n
    • value : Object

      the value to set to

      \n

    Returns

    Calls setAttribute for each name/value pair in the attributes object ...

    Calls setAttribute for each name/value pair in the attributes object

    \n

    Parameters

    • attributes : Object

      An object of name/value pairs to be set

      \n

    Returns

    Called for each subview in the layout to determine if the view should\nbe updated or not. ...

    Called for each subview in the layout to determine if the view should\nbe updated or not. The default implementation returns true if the\nsubview is not visible.

    \n

    Parameters

    • view : dr.view

      The subview to check.

      \n

    Returns

    • Boolean

      True if the subview should be skipped during\n layout updates.

      \n
    Calls startMonitoringSubview for all views. ...

    Calls startMonitoringSubview for all views. Used by layout\nimplementations when a change occurs to the layout that requires\nrefreshing all the subview monitoring.

    \n

    Returns

    • void
      \n
    Provides a default implementation that calls update when the\nvisibility of a subview changes. ...

    Provides a default implementation that calls update when the\nvisibility of a subview changes.

    \n

    Parameters

    Overrides: dr.layout.startMonitoringSubview

    Calls stopMonitoringSubview for all views. ...

    Calls stopMonitoringSubview for all views. Used by Layout\nimplementations when a change occurs to the layout that requires\nrefreshing all the subview monitoring.

    \n

    Returns

    • void
      \n
    Provides a default implementation that calls update when the\nvisibility of a subview changes. ...

    Provides a default implementation that calls update when the\nvisibility of a subview changes.

    \n

    Parameters

    Overrides: dr.layout.stopMonitoringSubview

    Updates the layout. ...

    Updates the layout. Subclasses should call canUpdate to check lock state\nbefore doing anything.

    \n

    Returns

    • void
      \n
    ( attribute, value ) : void
    Called if the collapseparent attribute is true. ...

    Called if the collapseparent attribute is true. Subclasses should\nimplement this if they want to modify the parent view.

    \n

    Parameters

    • attribute : String

      The name of the attribute to update.

      \n
    • value : *

      The value to set on the parent.

      \n

    Returns

    • void
      \n
    ( count, view, attribute, value ) : *
    Called for each subview in the layout. ...

    Called for each subview in the layout.

    \n

    Parameters

    • count : Number

      The number of subviews that have been layed out\n including the current one. i.e. count will be 1 for the first\n subview layed out.

      \n
    • view : dr.view

      The subview being layed out.

      \n
    • attribute : String

      The name of the attribute to update.

      \n
    • value : *

      The value to set on the subview.

      \n

    Returns

    • *

      The value to use for the next subview.

      \n
    Defined By

    Events

    Fired when this node and all its children are about to be destroyed ...

    Fired when this node and all its children are about to be destroyed

    \n

    Parameters

    Fired when this node and all its children are completely initialized ...

    Fired when this node and all its children are completely initialized

    \n

    Parameters

    Fired when this node's subnodes array has changed ...

    Fired when this node's subnodes array has changed

    \n

    Parameters

    Fired when a subnode is added to this node. ...

    Fired when a subnode is added to this node.

    \n

    Parameters

    Fired when a subnode is removed from this node. ...

    Fired when a subnode is removed from this node.

    \n

    Parameters

    ","meta":{}}); \ No newline at end of file diff --git a/docs/api/output/dr.shim.js b/docs/api/output/dr.shim.js new file mode 100644 index 00000000..e355f0d2 --- /dev/null +++ b/docs/api/output/dr.shim.js @@ -0,0 +1 @@ +Ext.data.JsonP.dr_shim({"tagname":"class","name":"dr.shim","autodetected":{},"files":[{"filename":"classdocs.js","href":"classdocs.html#dr-shim"}],"extends":"dr.node","members":[{"name":"connected","tagname":"attribute","owner":"dr.shim","id":"attribute-connected","meta":{}},{"name":"id","tagname":"attribute","owner":"dr.node","id":"attribute-id","meta":{}},{"name":"name","tagname":"attribute","owner":"dr.node","id":"attribute-name","meta":{}},{"name":"pingtime","tagname":"attribute","owner":"dr.shim","id":"attribute-pingtime","meta":{}},{"name":"scriptincludes","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludes","meta":{}},{"name":"scriptincludeserror","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludeserror","meta":{}},{"name":"websockets","tagname":"attribute","owner":"dr.shim","id":"attribute-websockets","meta":{}},{"name":"inited","tagname":"property","owner":"dr.node","id":"property-inited","meta":{"readonly":true}},{"name":"subnodes","tagname":"property","owner":"dr.node","id":"property-subnodes","meta":{"readonly":true}},{"name":"destroy","tagname":"method","owner":"dr.node","id":"method-destroy","meta":{}},{"name":"doSubnodeAdded","tagname":"method","owner":"dr.node","id":"method-doSubnodeAdded","meta":{}},{"name":"doSubnodeRemoved","tagname":"method","owner":"dr.node","id":"method-doSubnodeRemoved","meta":{}},{"name":"send","tagname":"method","owner":"dr.shim","id":"method-send","meta":{}},{"name":"sendEvent","tagname":"method","owner":"Eventable","id":"method-sendEvent","meta":{"chainable":true}},{"name":"setAttribute","tagname":"method","owner":"Eventable","id":"method-setAttribute","meta":{"chainable":true}},{"name":"setAttributes","tagname":"method","owner":"Eventable","id":"method-setAttributes","meta":{"chainable":true}},{"name":"ondestroy","tagname":"event","owner":"dr.node","id":"event-ondestroy","meta":{}},{"name":"oninit","tagname":"event","owner":"dr.node","id":"event-oninit","meta":{}},{"name":"onsubnodes","tagname":"event","owner":"dr.node","id":"event-onsubnodes","meta":{}},{"name":"subnodeAdded","tagname":"event","owner":"dr.node","id":"event-subnodeAdded","meta":{}},{"name":"subnodeRemoved","tagname":"event","owner":"dr.node","id":"event-subnodeRemoved","meta":{}}],"alternateClassNames":[],"aliases":{},"id":"class-dr.shim","short_doc":"Connects to the shared event bus. ...","component":false,"superclasses":["Module","Eventable","dr.node"],"subclasses":[],"mixedInto":[],"mixins":[],"parentMixins":[],"requires":[],"uses":[],"html":"

    Hierarchy

    Files

    Connects to the shared event bus. When data is sent with a given type, a corresponding event is sent. For example, send('blah', {}) sends data with the 'blah' type, other shims will receive the object via an 'onblah' event.

    \n
    Defined By

    Attributes

    : Boolean
    (readonly)\nIf true, we are connected to the server ...

    (readonly)\nIf true, we are connected to the server

    \n

    Defaults to: false

    Gives this node a global ID, which can be looked up in the global window object. ...

    Gives this node a global ID, which can be looked up in the global window object.\nTake care to not override builtin globals, or override your own instances!

    \n

    Names this node in its parent scope so it can be referred to later.

    \n

    Names this node in its parent scope so it can be referred to later.

    \n
    : Number
    The frequency used to reconnect to the server ...

    The frequency used to reconnect to the server

    \n

    Defaults to: 1000

    A comma separated list of URLs to javascript includes required as dependencies. ...

    A comma separated list of URLs to javascript includes required as dependencies. Useful if you need to ensure a third party library is available.

    \n

    An error to show if scriptincludes fail to load

    \n

    An error to show if scriptincludes fail to load

    \n
    : Boolean
    If true, use websockets to connect to the server ...

    If true, use websockets to connect to the server

    \n

    Defaults to: false

    Defined By

    Properties

    : Booleanreadonly

    True when this node and all its children are completely initialized

    \n

    True when this node and all its children are completely initialized

    \n
    An array of this node's child nodes ...

    An array of this node's child nodes

    \n

    Defaults to: []

    Defined By

    Methods

    Destroys this node ...

    Destroys this node

    \n
    Called when a subnode is added to this node. ...

    Called when a subnode is added to this node. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to add a subnode. Instead call setParent.

    \n

    Parameters

    • node : dr.node

      The subnode that was added.

      \n

    Returns

    • void
      \n
    Called when a subnode is removed from this node. ...

    Called when a subnode is removed from this node. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to remove a subnode. Instead call _removeFromParent.

    \n

    Parameters

    • node : dr.node

      The subnode that was removed.

      \n

    Returns

    • void
      \n
    ( type, data )
    Sends some data over the event bus. ...

    Sends some data over the event bus.

    \n

    Parameters

    • type : String

      The type of event to be sent.

      \n
    • data : Object

      The data to be sent.

      \n
    ( name, value ) : Eventablechainable
    Sends an event ...

    Sends an event

    \n

    Parameters

    • name : String

      the name of the event to send

      \n
    • value : Object

      the value to send with the event

      \n

    Returns

    Sets an attribute, calls a setter if there is one, then sends an event with the new value ...

    Sets an attribute, calls a setter if there is one, then sends an event with the new value

    \n

    Parameters

    • name : String

      the name of the attribute to set

      \n
    • value : Object

      the value to set to

      \n

    Returns

    Calls setAttribute for each name/value pair in the attributes object ...

    Calls setAttribute for each name/value pair in the attributes object

    \n

    Parameters

    • attributes : Object

      An object of name/value pairs to be set

      \n

    Returns

    Defined By

    Events

    Fired when this node and all its children are about to be destroyed ...

    Fired when this node and all its children are about to be destroyed

    \n

    Parameters

    Fired when this node and all its children are completely initialized ...

    Fired when this node and all its children are completely initialized

    \n

    Parameters

    Fired when this node's subnodes array has changed ...

    Fired when this node's subnodes array has changed

    \n

    Parameters

    Fired when a subnode is added to this node. ...

    Fired when a subnode is added to this node.

    \n

    Parameters

    Fired when a subnode is removed from this node. ...

    Fired when a subnode is removed from this node.

    \n

    Parameters

    ","meta":{}}); \ No newline at end of file diff --git a/docs/api/output/dr.shrinktofit.js b/docs/api/output/dr.shrinktofit.js new file mode 100644 index 00000000..49bd5f19 --- /dev/null +++ b/docs/api/output/dr.shrinktofit.js @@ -0,0 +1 @@ +Ext.data.JsonP.dr_shrinktofit({"tagname":"class","name":"dr.shrinktofit","autodetected":{},"files":[{"filename":"classdocs.js","href":"classdocs.html#dr-shrinktofit"}],"extends":"dr.layout","members":[{"name":"axis","tagname":"attribute","owner":"dr.shrinktofit","id":"attribute-axis","meta":{}},{"name":"id","tagname":"attribute","owner":"dr.node","id":"attribute-id","meta":{}},{"name":"name","tagname":"attribute","owner":"dr.node","id":"attribute-name","meta":{}},{"name":"scriptincludes","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludes","meta":{}},{"name":"scriptincludeserror","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludeserror","meta":{}},{"name":"xpad","tagname":"attribute","owner":"dr.shrinktofit","id":"attribute-xpad","meta":{}},{"name":"ypad","tagname":"attribute","owner":"dr.shrinktofit","id":"attribute-ypad","meta":{}},{"name":"inited","tagname":"property","owner":"dr.node","id":"property-inited","meta":{"readonly":true}},{"name":"subnodes","tagname":"property","owner":"dr.node","id":"property-subnodes","meta":{"readonly":true}},{"name":"__updateMonitoringSubview","tagname":"method","owner":"dr.shrinktofit","id":"method-__updateMonitoringSubview","meta":{"private":true}},{"name":"addSubview","tagname":"method","owner":"dr.layout","id":"method-addSubview","meta":{}},{"name":"canUpdate","tagname":"method","owner":"dr.layout","id":"method-canUpdate","meta":{}},{"name":"destroy","tagname":"method","owner":"dr.node","id":"method-destroy","meta":{}},{"name":"doSubnodeAdded","tagname":"method","owner":"dr.node","id":"method-doSubnodeAdded","meta":{}},{"name":"doSubnodeRemoved","tagname":"method","owner":"dr.node","id":"method-doSubnodeRemoved","meta":{}},{"name":"ignore","tagname":"method","owner":"dr.layout","id":"method-ignore","meta":{}},{"name":"removeSubview","tagname":"method","owner":"dr.layout","id":"method-removeSubview","meta":{}},{"name":"sendEvent","tagname":"method","owner":"Eventable","id":"method-sendEvent","meta":{"chainable":true}},{"name":"setAttribute","tagname":"method","owner":"Eventable","id":"method-setAttribute","meta":{"chainable":true}},{"name":"setAttributes","tagname":"method","owner":"Eventable","id":"method-setAttributes","meta":{"chainable":true}},{"name":"startMonitoringAllSubviews","tagname":"method","owner":"dr.layout","id":"method-startMonitoringAllSubviews","meta":{}},{"name":"startMonitoringSubview","tagname":"method","owner":"dr.layout","id":"method-startMonitoringSubview","meta":{}},{"name":"stopMonitoringAllSubviews","tagname":"method","owner":"dr.layout","id":"method-stopMonitoringAllSubviews","meta":{}},{"name":"stopMonitoringSubview","tagname":"method","owner":"dr.layout","id":"method-stopMonitoringSubview","meta":{}},{"name":"update","tagname":"method","owner":"dr.layout","id":"method-update","meta":{}},{"name":"ondestroy","tagname":"event","owner":"dr.node","id":"event-ondestroy","meta":{}},{"name":"oninit","tagname":"event","owner":"dr.node","id":"event-oninit","meta":{}},{"name":"onsubnodes","tagname":"event","owner":"dr.node","id":"event-onsubnodes","meta":{}},{"name":"subnodeAdded","tagname":"event","owner":"dr.node","id":"event-subnodeAdded","meta":{}},{"name":"subnodeRemoved","tagname":"event","owner":"dr.node","id":"event-subnodeRemoved","meta":{}}],"alternateClassNames":[],"aliases":{},"id":"class-dr.shrinktofit","short_doc":"A special \"layout\" that resizes the parent to fit the children\nrather than laying out the children. ...","component":false,"superclasses":["Module","Eventable","dr.node","dr.layout"],"subclasses":[],"mixedInto":[],"mixins":[],"parentMixins":[],"requires":[],"uses":[],"html":"

    Hierarchy

    Files

    A special \"layout\" that resizes the parent to fit the children\nrather than laying out the children.

    \n\n

    Here is a view that contains three sub views that are positioned with a spacedlayout. The parent view has a grey background color. Notice that the subviews are visible because they overflow the parent view, but the parent view itself takes up no space.

    \n\n
    <view bgcolor=\"darkgrey\">\n  <spacedlayout axis=\"y\"></spacedlayout>\n\n  <view width=\"100\" height=\"25\" bgcolor=\"lightpink\" opacity=\".3\"></view>\n  <view width=\"100\" height=\"25\" bgcolor=\"plum\" opacity=\".3\"></view>\n  <view width=\"100\" height=\"25\" bgcolor=\"lightblue\" opacity=\".3\"></view>\n</view>\n
    \n\n

    Now we'll add a shrinktofit to the parent view. Notice that now the parent view does take up space, and you can see it through the semi-transparent subviews.

    \n\n
    <view bgcolor=\"darkgrey\">\n  <shrinktofit axis=\"both\" xpad=\"5\" ypad=\"10\"></shrinktofit>\n\n  <spacedlayout axis=\"y\"></spacedlayout>\n\n  <view width=\"100\" height=\"25\" bgcolor=\"lightpink\" opacity=\".3\"></view>\n  <view width=\"100\" height=\"25\" bgcolor=\"plum\" opacity=\".3\"></view>\n  <view width=\"100\" height=\"25\" bgcolor=\"lightblue\" opacity=\".3\"></view>\n</view>\n
    \n
    Defined By

    Attributes

    dr.shrinktofit
    view source
    : String
    The axis along which to resize this view to fit its children. ...

    The axis along which to resize this view to fit its children.\nSupported values are 'x', 'y' and 'both'.

    \n

    Defaults to: x

    Gives this node a global ID, which can be looked up in the global window object. ...

    Gives this node a global ID, which can be looked up in the global window object.\nTake care to not override builtin globals, or override your own instances!

    \n

    Names this node in its parent scope so it can be referred to later.

    \n

    Names this node in its parent scope so it can be referred to later.

    \n
    A comma separated list of URLs to javascript includes required as dependencies. ...

    A comma separated list of URLs to javascript includes required as dependencies. Useful if you need to ensure a third party library is available.

    \n

    An error to show if scriptincludes fail to load

    \n

    An error to show if scriptincludes fail to load

    \n
    dr.shrinktofit
    view source
    : Number
    Additional space added on the child extent along the x-axis. ...

    Additional space added on the child extent along the x-axis.

    \n

    Defaults to: 0

    dr.shrinktofit
    view source
    : Number
    Additional space added on the child extent along the y-axis. ...

    Additional space added on the child extent along the y-axis.

    \n

    Defaults to: 0

    Defined By

    Properties

    : Booleanreadonly

    True when this node and all its children are completely initialized

    \n

    True when this node and all its children are completely initialized

    \n
    An array of this node's child nodes ...

    An array of this node's child nodes

    \n

    Defaults to: []

    Defined By

    Methods

    dr.shrinktofit
    view source
    ( view, func ) : voidprivate
    Wrapped by startMonitoringSubview and stopMonitoringSubview. ...

    Wrapped by startMonitoringSubview and stopMonitoringSubview.

    \n

    Parameters

    Returns

    • void
      \n
    Adds the provided view to the subviews array of this layout. ...

    Adds the provided view to the subviews array of this layout.

    \n

    Parameters

    • view : dr.view

      The view to add to this layout.

      \n

    Returns

    • void
      \n
    Checks if the layout is locked or not. ...

    Checks if the layout is locked or not. Should be called by the\n\"update\" method of each layout to check if it is OK to do the update.

    \n

    Returns

    • boolean

      true if not locked, false otherwise.

      \n
    Destroys this node ...

    Destroys this node

    \n
    Called when a subnode is added to this node. ...

    Called when a subnode is added to this node. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to add a subnode. Instead call setParent.

    \n

    Parameters

    • node : dr.node

      The subnode that was added.

      \n

    Returns

    • void
      \n
    Called when a subnode is removed from this node. ...

    Called when a subnode is removed from this node. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to remove a subnode. Instead call _removeFromParent.

    \n

    Parameters

    • node : dr.node

      The subnode that was removed.

      \n

    Returns

    • void
      \n
    ( view ) : boolean
    Checks if a subview can be added to this Layout or not. ...

    Checks if a subview can be added to this Layout or not. The default\nimplementation returns the 'ignorelayout' attributes of the subview.

    \n

    Parameters

    Returns

    • boolean

      True means the subview will be skipped, false otherwise.

      \n
    Removes the provided View from the subviews array of this Layout. ...

    Removes the provided View from the subviews array of this Layout.

    \n

    Parameters

    • view : dr.view

      The view to remove from this layout.

      \n

    Returns

    • number

      the index of the removed subview or -1 if not removed.

      \n
    ( name, value ) : Eventablechainable
    Sends an event ...

    Sends an event

    \n

    Parameters

    • name : String

      the name of the event to send

      \n
    • value : Object

      the value to send with the event

      \n

    Returns

    Sets an attribute, calls a setter if there is one, then sends an event with the new value ...

    Sets an attribute, calls a setter if there is one, then sends an event with the new value

    \n

    Parameters

    • name : String

      the name of the attribute to set

      \n
    • value : Object

      the value to set to

      \n

    Returns

    Calls setAttribute for each name/value pair in the attributes object ...

    Calls setAttribute for each name/value pair in the attributes object

    \n

    Parameters

    • attributes : Object

      An object of name/value pairs to be set

      \n

    Returns

    Calls startMonitoringSubview for all views. ...

    Calls startMonitoringSubview for all views. Used by layout\nimplementations when a change occurs to the layout that requires\nrefreshing all the subview monitoring.

    \n

    Returns

    • void
      \n
    Subclasses should implement this method to start listening to\nevents from the subview that should trigger the update ...

    Subclasses should implement this method to start listening to\nevents from the subview that should trigger the update method.

    \n

    Parameters

    • view : dr.view

      The view to start monitoring for changes.

      \n

    Returns

    • void
      \n
    Calls stopMonitoringSubview for all views. ...

    Calls stopMonitoringSubview for all views. Used by Layout\nimplementations when a change occurs to the layout that requires\nrefreshing all the subview monitoring.

    \n

    Returns

    • void
      \n
    Subclasses should implement this method to stop listening to\nevents from the subview that would trigger the update me...

    Subclasses should implement this method to stop listening to\nevents from the subview that would trigger the update method. This\nshould remove all listeners that were setup in startMonitoringSubview.

    \n

    Parameters

    • view : dr.view

      The view to stop monitoring for changes.

      \n

    Returns

    • void
      \n
    Updates the layout. ...

    Updates the layout. Subclasses should call canUpdate to check lock state\nbefore doing anything.

    \n

    Returns

    • void
      \n
    Defined By

    Events

    Fired when this node and all its children are about to be destroyed ...

    Fired when this node and all its children are about to be destroyed

    \n

    Parameters

    Fired when this node and all its children are completely initialized ...

    Fired when this node and all its children are completely initialized

    \n

    Parameters

    Fired when this node's subnodes array has changed ...

    Fired when this node's subnodes array has changed

    \n

    Parameters

    Fired when a subnode is added to this node. ...

    Fired when a subnode is added to this node.

    \n

    Parameters

    Fired when a subnode is removed from this node. ...

    Fired when a subnode is removed from this node.

    \n

    Parameters

    ","meta":{}}); \ No newline at end of file diff --git a/docs/api/output/dr.slider.js b/docs/api/output/dr.slider.js new file mode 100644 index 00000000..2d610d7d --- /dev/null +++ b/docs/api/output/dr.slider.js @@ -0,0 +1 @@ +Ext.data.JsonP.dr_slider({"tagname":"class","name":"dr.slider","autodetected":{},"files":[{"filename":"classdocs.js","href":"classdocs.html#dr-slider"}],"extends":"dr.view","members":[{"name":"axis","tagname":"attribute","owner":"dr.slider","id":"attribute-axis","meta":{}},{"name":"bgcolor","tagname":"attribute","owner":"dr.view","id":"attribute-bgcolor","meta":{}},{"name":"border","tagname":"attribute","owner":"dr.view","id":"attribute-border","meta":{}},{"name":"bordercolor","tagname":"attribute","owner":"dr.view","id":"attribute-bordercolor","meta":{}},{"name":"borderstyle","tagname":"attribute","owner":"dr.view","id":"attribute-borderstyle","meta":{}},{"name":"clickable","tagname":"attribute","owner":"dr.view","id":"attribute-clickable","meta":{}},{"name":"clip","tagname":"attribute","owner":"dr.view","id":"attribute-clip","meta":{}},{"name":"height","tagname":"attribute","owner":"dr.view","id":"attribute-height","meta":{}},{"name":"id","tagname":"attribute","owner":"dr.node","id":"attribute-id","meta":{}},{"name":"invert","tagname":"attribute","owner":"dr.slider","id":"attribute-invert","meta":{}},{"name":"maxvalue","tagname":"attribute","owner":"dr.slider","id":"attribute-maxvalue","meta":{}},{"name":"minvalue","tagname":"attribute","owner":"dr.slider","id":"attribute-minvalue","meta":{}},{"name":"name","tagname":"attribute","owner":"dr.node","id":"attribute-name","meta":{}},{"name":"padding","tagname":"attribute","owner":"dr.view","id":"attribute-padding","meta":{}},{"name":"scriptincludes","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludes","meta":{}},{"name":"scriptincludeserror","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludeserror","meta":{}},{"name":"scrollable","tagname":"attribute","owner":"dr.view","id":"attribute-scrollable","meta":{}},{"name":"selectcolor","tagname":"attribute","owner":"dr.slider","id":"attribute-selectcolor","meta":{}},{"name":"value","tagname":"attribute","owner":"dr.slider","id":"attribute-value","meta":{}},{"name":"visible","tagname":"attribute","owner":"dr.view","id":"attribute-visible","meta":{}},{"name":"width","tagname":"attribute","owner":"dr.view","id":"attribute-width","meta":{}},{"name":"x","tagname":"attribute","owner":"dr.view","id":"attribute-x","meta":{}},{"name":"y","tagname":"attribute","owner":"dr.view","id":"attribute-y","meta":{}},{"name":"ignorelayout","tagname":"property","owner":"dr.view","id":"property-ignorelayout","meta":{}},{"name":"inited","tagname":"property","owner":"dr.node","id":"property-inited","meta":{"readonly":true}},{"name":"layouts","tagname":"property","owner":"dr.view","id":"property-layouts","meta":{"readonly":true}},{"name":"subnodes","tagname":"property","owner":"dr.node","id":"property-subnodes","meta":{"readonly":true}},{"name":"subviews","tagname":"property","owner":"dr.view","id":"property-subviews","meta":{"readonly":true}},{"name":"animate","tagname":"method","owner":"dr.view","id":"method-animate","meta":{"chainable":true}},{"name":"changeValue","tagname":"method","owner":"dr.slider","id":"method-changeValue","meta":{}},{"name":"destroy","tagname":"method","owner":"dr.node","id":"method-destroy","meta":{}},{"name":"doLayoutAdded","tagname":"method","owner":"dr.view","id":"method-doLayoutAdded","meta":{}},{"name":"doLayoutRemoved","tagname":"method","owner":"dr.view","id":"method-doLayoutRemoved","meta":{}},{"name":"doSubnodeAdded","tagname":"method","owner":"dr.view","id":"method-doSubnodeAdded","meta":{}},{"name":"doSubnodeRemoved","tagname":"method","owner":"dr.view","id":"method-doSubnodeRemoved","meta":{}},{"name":"doSubviewAdded","tagname":"method","owner":"dr.view","id":"method-doSubviewAdded","meta":{}},{"name":"doSubviewRemoved","tagname":"method","owner":"dr.view","id":"method-doSubviewRemoved","meta":{}},{"name":"sendEvent","tagname":"method","owner":"Eventable","id":"method-sendEvent","meta":{"chainable":true}},{"name":"setAttribute","tagname":"method","owner":"Eventable","id":"method-setAttribute","meta":{"chainable":true}},{"name":"setAttributes","tagname":"method","owner":"Eventable","id":"method-setAttributes","meta":{"chainable":true}},{"name":"layoutAdded","tagname":"event","owner":"dr.view","id":"event-layoutAdded","meta":{}},{"name":"layoutRemoved","tagname":"event","owner":"dr.view","id":"event-layoutRemoved","meta":{}},{"name":"onclick","tagname":"event","owner":"dr.view","id":"event-onclick","meta":{}},{"name":"ondestroy","tagname":"event","owner":"dr.node","id":"event-ondestroy","meta":{}},{"name":"oninit","tagname":"event","owner":"dr.node","id":"event-oninit","meta":{}},{"name":"onlayouts","tagname":"event","owner":"dr.view","id":"event-onlayouts","meta":{}},{"name":"onmousedown","tagname":"event","owner":"dr.view","id":"event-onmousedown","meta":{}},{"name":"onmouseout","tagname":"event","owner":"dr.view","id":"event-onmouseout","meta":{}},{"name":"onmouseover","tagname":"event","owner":"dr.view","id":"event-onmouseover","meta":{}},{"name":"onmouseup","tagname":"event","owner":"dr.view","id":"event-onmouseup","meta":{}},{"name":"onsubnodes","tagname":"event","owner":"dr.node","id":"event-onsubnodes","meta":{}},{"name":"onsubviews","tagname":"event","owner":"dr.view","id":"event-onsubviews","meta":{}},{"name":"subnodeAdded","tagname":"event","owner":"dr.node","id":"event-subnodeAdded","meta":{}},{"name":"subnodeRemoved","tagname":"event","owner":"dr.node","id":"event-subnodeRemoved","meta":{}},{"name":"subviewAdded","tagname":"event","owner":"dr.view","id":"event-subviewAdded","meta":{}},{"name":"subviewRemoved","tagname":"event","owner":"dr.view","id":"event-subviewRemoved","meta":{}}],"alternateClassNames":[],"aliases":{},"id":"class-dr.slider","short_doc":"An input component whose state is changed when the mouse is dragged. ...","component":false,"superclasses":["Module","Eventable","dr.node","dr.view"],"subclasses":[],"mixedInto":[],"mixins":[],"parentMixins":[],"requires":[],"uses":[],"html":"

    Hierarchy

    Files

    An input component whose state is changed when the mouse is dragged.

    \n\n
    <slider name=\"hslide\" y=\"5\" width=\"250\" height=\"10\" value=\"50\" bgcolor=\"#808080\"></slider>\n
    \n\n

    Slider with a label:

    \n\n
    <spacedlayout spacing=\"8\"></spacedlayout>\n<slider name=\"hslide\" y=\"5\" width=\"250\" height=\"10\" value=\"50\" bgcolor=\"#808080\"></slider>\n<text text=\"${Math.round(this.parent.hslide.value)}\" y=\"${this.parent.hslide.y + (this.parent.hslide.height-this.height)/2}\"></text>\n
    \n
    Defined By

    Attributes

    dr.slider
    view source
    : \"x\"/\"y\"
    The axis to track on ...

    The axis to track on

    \n

    Defaults to: x

    Sets this view's background color

    \n

    Sets this view's background color

    \n

    Sets this view's border width

    \n

    Sets this view's border width

    \n

    Sets this view's border color

    \n

    Sets this view's border color

    \n

    Sets this view's border style (can be any css border-style value)

    \n

    Sets this view's border style (can be any css border-style value)

    \n
    If true, this view recieves mouse events. ...

    If true, this view recieves mouse events. Automatically set to true when an onclick/mouse* event is registered for this view.

    \n

    Defaults to: false

    If true, this view clips to its bounds ...

    If true, this view clips to its bounds

    \n

    Defaults to: false

    This view's height ...

    This view's height

    \n

    Defaults to: 0

    Gives this node a global ID, which can be looked up in the global window object. ...

    Gives this node a global ID, which can be looked up in the global window object.\nTake care to not override builtin globals, or override your own instances!

    \n
    dr.slider
    view source
    : Boolean
    Set to true to invert the direction of the slider. ...

    Set to true to invert the direction of the slider.

    \n

    Defaults to: false

    dr.slider
    view source
    : Number
    The maximum value of the slider ...

    The maximum value of the slider

    \n

    Defaults to: 100

    dr.slider
    view source
    : Number
    The minimum value of the slider ...

    The minimum value of the slider

    \n

    Defaults to: 0

    Names this node in its parent scope so it can be referred to later.

    \n

    Names this node in its parent scope so it can be referred to later.

    \n

    Sets this view's padding

    \n

    Sets this view's padding

    \n
    A comma separated list of URLs to javascript includes required as dependencies. ...

    A comma separated list of URLs to javascript includes required as dependencies. Useful if you need to ensure a third party library is available.

    \n

    An error to show if scriptincludes fail to load

    \n

    An error to show if scriptincludes fail to load

    \n
    If true, this view clips to its bounds and provides scrolling to see content that overflows the bounds ...

    If true, this view clips to its bounds and provides scrolling to see content that overflows the bounds

    \n

    Defaults to: false

    dr.slider
    view source
    : String
    The selected color of the slider. ...

    The selected color of the slider.

    \n

    Defaults to: "#a0a0a0"

    dr.slider
    view source
    : Number
    The current value of the slider. ...

    The current value of the slider.\nUse changeValue() to range check the number and set the value.

    \n

    Defaults to: 0

    If false, this view is invisible ...

    If false, this view is invisible

    \n

    Defaults to: true

    This view's width ...

    This view's width

    \n

    Defaults to: 0

    This view's x position ...

    This view's x position

    \n

    Defaults to: 0

    This view's y position ...

    This view's y position

    \n

    Defaults to: 0

    Defined By

    Properties

    If true, layouts should ignore this view

    \n

    If true, layouts should ignore this view

    \n
    : Booleanreadonly

    True when this node and all its children are completely initialized

    \n

    True when this node and all its children are completely initialized

    \n
    An array of this views's layouts. ...

    An array of this views's layouts. Only defined when needed.

    \n
    An array of this node's child nodes ...

    An array of this node's child nodes

    \n

    Defaults to: []

    An array of this views's child views

    \n

    An array of this views's child views

    \n
    Defined By

    Methods

    ( obj, Number ) : dr.viewchainable
    Animates this view's attribute(s) ...

    Animates this view's attribute(s)

    \n

    Parameters

    • obj : Object

      A hash of attribute names and values to animate to

      \n
    • Number : Object

      duration The duration of the animation in milliseconds

      \n

    Returns

    Given a new value for the slider position, constrain the value\nbetween minvalue and maxvalue and then calls setAttrib...

    Given a new value for the slider position, constrain the value\nbetween minvalue and maxvalue and then calls setAttribute.

    \n

    Parameters

    • v : Number

      The new value of the component.

      \n
    Destroys this node ...

    Destroys this node

    \n
    Called when a layout is added to this view. ...

    Called when a layout is added to this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to add a layout. Instead call setParent.

    \n

    Parameters

    • layout : dr.layout

      The layout that was added.

      \n

    Returns

    • void
      \n
    Called when a layout is removed from this view. ...

    Called when a layout is removed from this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to remove a layout. Instead call _removeFromParent.

    \n

    Parameters

    • layout : dr.layout

      The layout that was removed.

      \n

    Returns

    • void
      \n
    Calls doSubviewAdded/doLayoutAdded if the added subnode is a view or\nlayout respectively. ...

    Calls doSubviewAdded/doLayoutAdded if the added subnode is a view or\nlayout respectively. Subclasses should call super.

    \n

    Parameters

    • node : Object

    Overrides: dr.node.doSubnodeAdded

    Calls doSubviewRemoved/doLayoutRemoved if the removed subnode is a view or\nlayout respectively. ...

    Calls doSubviewRemoved/doLayoutRemoved if the removed subnode is a view or\nlayout respectively. Subclasses should call super.

    \n

    Parameters

    • node : Object

    Overrides: dr.node.doSubnodeRemoved

    Called when a subview is added to this view. ...

    Called when a subview is added to this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to add a subview. Instead call setParent.

    \n

    Parameters

    • sv : dr.view

      The subview that was added.

      \n

    Returns

    • void
      \n
    Called when a subview is removed from this view. ...

    Called when a subview is removed from this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to remove a subview. Instead call _removeFromParent.

    \n

    Parameters

    • sv : dr.view

      The subview that was removed.

      \n

    Returns

    • void
      \n
    ( name, value ) : Eventablechainable
    Sends an event ...

    Sends an event

    \n

    Parameters

    • name : String

      the name of the event to send

      \n
    • value : Object

      the value to send with the event

      \n

    Returns

    Sets an attribute, calls a setter if there is one, then sends an event with the new value ...

    Sets an attribute, calls a setter if there is one, then sends an event with the new value

    \n

    Parameters

    • name : String

      the name of the attribute to set

      \n
    • value : Object

      the value to set to

      \n

    Returns

    Calls setAttribute for each name/value pair in the attributes object ...

    Calls setAttribute for each name/value pair in the attributes object

    \n

    Parameters

    • attributes : Object

      An object of name/value pairs to be set

      \n

    Returns

    Defined By

    Events

    Fired when a layout is added to this view. ...

    Fired when a layout is added to this view.

    \n

    Parameters

    Fired when a layout is removed from this view. ...

    Fired when a layout is removed from this view.

    \n

    Parameters

    Fired when this view is clicked ...

    Fired when this view is clicked

    \n

    Parameters

    Fired when this node and all its children are about to be destroyed ...

    Fired when this node and all its children are about to be destroyed

    \n

    Parameters

    Fired when this node and all its children are completely initialized ...

    Fired when this node and all its children are completely initialized

    \n

    Parameters

    Fired when this views's layouts array has changed ...

    Fired when this views's layouts array has changed

    \n

    Parameters

    Fired when the mouse goes down on this view ...

    Fired when the mouse goes down on this view

    \n

    Parameters

    Fired when the mouse moves off this view ...

    Fired when the mouse moves off this view

    \n

    Parameters

    Fired when the mouse moves over this view ...

    Fired when the mouse moves over this view

    \n

    Parameters

    Fired when the mouse goes up on this view ...

    Fired when the mouse goes up on this view

    \n

    Parameters

    Fired when this node's subnodes array has changed ...

    Fired when this node's subnodes array has changed

    \n

    Parameters

    Fired when this views's subviews array has changed ...

    Fired when this views's subviews array has changed

    \n

    Parameters

    Fired when a subnode is added to this node. ...

    Fired when a subnode is added to this node.

    \n

    Parameters

    Fired when a subnode is removed from this node. ...

    Fired when a subnode is removed from this node.

    \n

    Parameters

    Fired when a subview is added to this view. ...

    Fired when a subview is added to this view.

    \n

    Parameters

    Fired when a subview is removed from this view. ...

    Fired when a subview is removed from this view.

    \n

    Parameters

    ","meta":{}}); \ No newline at end of file diff --git a/docs/api/output/dr.spacedlayout.js b/docs/api/output/dr.spacedlayout.js new file mode 100644 index 00000000..47d72bbb --- /dev/null +++ b/docs/api/output/dr.spacedlayout.js @@ -0,0 +1 @@ +Ext.data.JsonP.dr_spacedlayout({"tagname":"class","name":"dr.spacedlayout","autodetected":{},"files":[{"filename":"classdocs.js","href":"classdocs.html#dr-spacedlayout"}],"extends":"dr.variablelayout","members":[{"name":"attribute","tagname":"attribute","owner":"dr.constantlayout","id":"attribute-attribute","meta":{}},{"name":"axis","tagname":"attribute","owner":"dr.spacedlayout","id":"attribute-axis","meta":{}},{"name":"collapseparent","tagname":"attribute","owner":"dr.variablelayout","id":"attribute-collapseparent","meta":{}},{"name":"id","tagname":"attribute","owner":"dr.node","id":"attribute-id","meta":{}},{"name":"inset","tagname":"attribute","owner":"dr.spacedlayout","id":"attribute-inset","meta":{}},{"name":"name","tagname":"attribute","owner":"dr.node","id":"attribute-name","meta":{}},{"name":"outset","tagname":"attribute","owner":"dr.spacedlayout","id":"attribute-outset","meta":{}},{"name":"reverse","tagname":"attribute","owner":"dr.variablelayout","id":"attribute-reverse","meta":{}},{"name":"scriptincludes","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludes","meta":{}},{"name":"scriptincludeserror","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludeserror","meta":{}},{"name":"spacing","tagname":"attribute","owner":"dr.spacedlayout","id":"attribute-spacing","meta":{}},{"name":"value","tagname":"attribute","owner":"dr.constantlayout","id":"attribute-value","meta":{}},{"name":"inited","tagname":"property","owner":"dr.node","id":"property-inited","meta":{"readonly":true}},{"name":"subnodes","tagname":"property","owner":"dr.node","id":"property-subnodes","meta":{"readonly":true}},{"name":"addSubview","tagname":"method","owner":"dr.layout","id":"method-addSubview","meta":{}},{"name":"canUpdate","tagname":"method","owner":"dr.layout","id":"method-canUpdate","meta":{}},{"name":"destroy","tagname":"method","owner":"dr.node","id":"method-destroy","meta":{}},{"name":"doAfterUpdate","tagname":"method","owner":"dr.variablelayout","id":"method-doAfterUpdate","meta":{}},{"name":"doBeforeUpdate","tagname":"method","owner":"dr.variablelayout","id":"method-doBeforeUpdate","meta":{}},{"name":"doSubnodeAdded","tagname":"method","owner":"dr.node","id":"method-doSubnodeAdded","meta":{}},{"name":"doSubnodeRemoved","tagname":"method","owner":"dr.node","id":"method-doSubnodeRemoved","meta":{}},{"name":"ignore","tagname":"method","owner":"dr.layout","id":"method-ignore","meta":{}},{"name":"removeSubview","tagname":"method","owner":"dr.layout","id":"method-removeSubview","meta":{}},{"name":"sendEvent","tagname":"method","owner":"Eventable","id":"method-sendEvent","meta":{"chainable":true}},{"name":"setAttribute","tagname":"method","owner":"Eventable","id":"method-setAttribute","meta":{"chainable":true}},{"name":"setAttributes","tagname":"method","owner":"Eventable","id":"method-setAttributes","meta":{"chainable":true}},{"name":"skipSubview","tagname":"method","owner":"dr.variablelayout","id":"method-skipSubview","meta":{}},{"name":"startMonitoringAllSubviews","tagname":"method","owner":"dr.layout","id":"method-startMonitoringAllSubviews","meta":{}},{"name":"startMonitoringSubview","tagname":"method","owner":"dr.variablelayout","id":"method-startMonitoringSubview","meta":{}},{"name":"stopMonitoringAllSubviews","tagname":"method","owner":"dr.layout","id":"method-stopMonitoringAllSubviews","meta":{}},{"name":"stopMonitoringSubview","tagname":"method","owner":"dr.variablelayout","id":"method-stopMonitoringSubview","meta":{}},{"name":"update","tagname":"method","owner":"dr.layout","id":"method-update","meta":{}},{"name":"updateParent","tagname":"method","owner":"dr.variablelayout","id":"method-updateParent","meta":{}},{"name":"updateSubview","tagname":"method","owner":"dr.variablelayout","id":"method-updateSubview","meta":{}},{"name":"ondestroy","tagname":"event","owner":"dr.node","id":"event-ondestroy","meta":{}},{"name":"oninit","tagname":"event","owner":"dr.node","id":"event-oninit","meta":{}},{"name":"onsubnodes","tagname":"event","owner":"dr.node","id":"event-onsubnodes","meta":{}},{"name":"subnodeAdded","tagname":"event","owner":"dr.node","id":"event-subnodeAdded","meta":{}},{"name":"subnodeRemoved","tagname":"event","owner":"dr.node","id":"event-subnodeRemoved","meta":{}}],"alternateClassNames":[],"aliases":{},"id":"class-dr.spacedlayout","short_doc":"A variableLayout that positions views along an axis using an inset,\noutset and spacing value. ...","component":false,"superclasses":["Module","Eventable","dr.node","dr.layout","dr.constantlayout","dr.variablelayout"],"subclasses":["dr.resizelayout"],"mixedInto":[],"mixins":[],"parentMixins":[],"requires":[],"uses":[],"html":"

    Hierarchy

    Subclasses

    Files

    A variableLayout that positions views along an axis using an inset,\noutset and spacing value.

    \n\n
    <spacedlayout axis=\"y\" spacing=\"2\" inset=\"5\" outset=\"5\">\n</spacedlayout>\n\n<view width=\"100\" height=\"25\" bgcolor=\"lightpink\"></view>\n<view width=\"100\" height=\"35\" bgcolor=\"plum\"></view>\n<view width=\"100\" height=\"15\" bgcolor=\"lightblue\"></view>\n
    \n
    Defined By

    Attributes

    The name of the attribute to update on each subview. ...

    The name of the attribute to update on each subview.

    \n

    Defaults to: x

    dr.spacedlayout
    view source
    : String
    The orientation of the layout. ...

    The orientation of the layout. Supported values are 'x' and 'y'.\nA value of 'x' will orient the views horizontally and a value of 'y'\nwill orient them vertically.

    \n

    Defaults to: 'x'

    If true the updateParent method will be called. ...

    If true the updateParent method will be called. The updateParent method\nwill typically resize the parent to fit the newly layed out child views.

    \n

    Defaults to: false

    Gives this node a global ID, which can be looked up in the global window object. ...

    Gives this node a global ID, which can be looked up in the global window object.\nTake care to not override builtin globals, or override your own instances!

    \n
    dr.spacedlayout
    view source
    : Number
    Space before the first view. ...

    Space before the first view.

    \n

    Defaults to: 0

    Names this node in its parent scope so it can be referred to later.

    \n

    Names this node in its parent scope so it can be referred to later.

    \n
    dr.spacedlayout
    view source
    : Number
    Space after the last view. ...

    Space after the last view. Only used when collapseparent is true.

    \n

    Defaults to: 0

    If true the layout will position the items in the opposite order. ...

    If true the layout will position the items in the opposite order. For\nexample, right to left instead of left to right.

    \n

    Defaults to: false

    A comma separated list of URLs to javascript includes required as dependencies. ...

    A comma separated list of URLs to javascript includes required as dependencies. Useful if you need to ensure a third party library is available.

    \n

    An error to show if scriptincludes fail to load

    \n

    An error to show if scriptincludes fail to load

    \n
    dr.spacedlayout
    view source
    : Number
    The spacing between views. ...

    The spacing between views.

    \n

    Defaults to: 0

    The value to set the attribute to. ...

    The value to set the attribute to.

    \n

    Defaults to: 0

    Defined By

    Properties

    : Booleanreadonly

    True when this node and all its children are completely initialized

    \n

    True when this node and all its children are completely initialized

    \n
    An array of this node's child nodes ...

    An array of this node's child nodes

    \n

    Defaults to: []

    Defined By

    Methods

    Adds the provided view to the subviews array of this layout. ...

    Adds the provided view to the subviews array of this layout.

    \n

    Parameters

    • view : dr.view

      The view to add to this layout.

      \n

    Returns

    • void
      \n
    Checks if the layout is locked or not. ...

    Checks if the layout is locked or not. Should be called by the\n\"update\" method of each layout to check if it is OK to do the update.

    \n

    Returns

    • boolean

      true if not locked, false otherwise.

      \n
    Destroys this node ...

    Destroys this node

    \n
    Called by update after any processing is done but before the optional\ncollapsing of parent is done. ...

    Called by update after any processing is done but before the optional\ncollapsing of parent is done. Gives subviews a chance to do any\nspecial teardown after update is processed.

    \n

    Returns

    • void
      \n
    Called by update before any processing is done. ...

    Called by update before any processing is done. Gives subviews a\nchance to do any special setup before update is processed.

    \n

    Returns

    • void
      \n
    Called when a subnode is added to this node. ...

    Called when a subnode is added to this node. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to add a subnode. Instead call setParent.

    \n

    Parameters

    • node : dr.node

      The subnode that was added.

      \n

    Returns

    • void
      \n
    Called when a subnode is removed from this node. ...

    Called when a subnode is removed from this node. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to remove a subnode. Instead call _removeFromParent.

    \n

    Parameters

    • node : dr.node

      The subnode that was removed.

      \n

    Returns

    • void
      \n
    ( view ) : boolean
    Checks if a subview can be added to this Layout or not. ...

    Checks if a subview can be added to this Layout or not. The default\nimplementation returns the 'ignorelayout' attributes of the subview.

    \n

    Parameters

    Returns

    • boolean

      True means the subview will be skipped, false otherwise.

      \n
    Removes the provided View from the subviews array of this Layout. ...

    Removes the provided View from the subviews array of this Layout.

    \n

    Parameters

    • view : dr.view

      The view to remove from this layout.

      \n

    Returns

    • number

      the index of the removed subview or -1 if not removed.

      \n
    ( name, value ) : Eventablechainable
    Sends an event ...

    Sends an event

    \n

    Parameters

    • name : String

      the name of the event to send

      \n
    • value : Object

      the value to send with the event

      \n

    Returns

    Sets an attribute, calls a setter if there is one, then sends an event with the new value ...

    Sets an attribute, calls a setter if there is one, then sends an event with the new value

    \n

    Parameters

    • name : String

      the name of the attribute to set

      \n
    • value : Object

      the value to set to

      \n

    Returns

    Calls setAttribute for each name/value pair in the attributes object ...

    Calls setAttribute for each name/value pair in the attributes object

    \n

    Parameters

    • attributes : Object

      An object of name/value pairs to be set

      \n

    Returns

    Called for each subview in the layout to determine if the view should\nbe updated or not. ...

    Called for each subview in the layout to determine if the view should\nbe updated or not. The default implementation returns true if the\nsubview is not visible.

    \n

    Parameters

    • view : dr.view

      The subview to check.

      \n

    Returns

    • Boolean

      True if the subview should be skipped during\n layout updates.

      \n
    Calls startMonitoringSubview for all views. ...

    Calls startMonitoringSubview for all views. Used by layout\nimplementations when a change occurs to the layout that requires\nrefreshing all the subview monitoring.

    \n

    Returns

    • void
      \n
    Provides a default implementation that calls update when the\nvisibility of a subview changes. ...

    Provides a default implementation that calls update when the\nvisibility of a subview changes.

    \n

    Parameters

    Overrides: dr.layout.startMonitoringSubview

    Calls stopMonitoringSubview for all views. ...

    Calls stopMonitoringSubview for all views. Used by Layout\nimplementations when a change occurs to the layout that requires\nrefreshing all the subview monitoring.

    \n

    Returns

    • void
      \n
    Provides a default implementation that calls update when the\nvisibility of a subview changes. ...

    Provides a default implementation that calls update when the\nvisibility of a subview changes.

    \n

    Parameters

    Overrides: dr.layout.stopMonitoringSubview

    Updates the layout. ...

    Updates the layout. Subclasses should call canUpdate to check lock state\nbefore doing anything.

    \n

    Returns

    • void
      \n
    ( attribute, value ) : void
    Called if the collapseparent attribute is true. ...

    Called if the collapseparent attribute is true. Subclasses should\nimplement this if they want to modify the parent view.

    \n

    Parameters

    • attribute : String

      The name of the attribute to update.

      \n
    • value : *

      The value to set on the parent.

      \n

    Returns

    • void
      \n
    ( count, view, attribute, value ) : *
    Called for each subview in the layout. ...

    Called for each subview in the layout.

    \n

    Parameters

    • count : Number

      The number of subviews that have been layed out\n including the current one. i.e. count will be 1 for the first\n subview layed out.

      \n
    • view : dr.view

      The subview being layed out.

      \n
    • attribute : String

      The name of the attribute to update.

      \n
    • value : *

      The value to set on the subview.

      \n

    Returns

    • *

      The value to use for the next subview.

      \n
    Defined By

    Events

    Fired when this node and all its children are about to be destroyed ...

    Fired when this node and all its children are about to be destroyed

    \n

    Parameters

    Fired when this node and all its children are completely initialized ...

    Fired when this node and all its children are completely initialized

    \n

    Parameters

    Fired when this node's subnodes array has changed ...

    Fired when this node's subnodes array has changed

    \n

    Parameters

    Fired when a subnode is added to this node. ...

    Fired when a subnode is added to this node.

    \n

    Parameters

    Fired when a subnode is removed from this node. ...

    Fired when a subnode is removed from this node.

    \n

    Parameters

    ","meta":{}}); \ No newline at end of file diff --git a/docs/api/output/dr.state.js b/docs/api/output/dr.state.js new file mode 100644 index 00000000..8c747d20 --- /dev/null +++ b/docs/api/output/dr.state.js @@ -0,0 +1 @@ +Ext.data.JsonP.dr_state({"tagname":"class","name":"dr.state","autodetected":{},"files":[{"filename":"layout.js","href":"layout.html#dr-state"}],"extends":"dr.node","members":[{"name":"applied","tagname":"attribute","owner":"dr.state","id":"attribute-applied","meta":{}},{"name":"id","tagname":"attribute","owner":"dr.node","id":"attribute-id","meta":{}},{"name":"name","tagname":"attribute","owner":"dr.node","id":"attribute-name","meta":{}},{"name":"scriptincludes","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludes","meta":{}},{"name":"scriptincludeserror","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludeserror","meta":{}},{"name":"inited","tagname":"property","owner":"dr.node","id":"property-inited","meta":{"readonly":true}},{"name":"subnodes","tagname":"property","owner":"dr.node","id":"property-subnodes","meta":{"readonly":true}},{"name":"destroy","tagname":"method","owner":"dr.node","id":"method-destroy","meta":{}},{"name":"doSubnodeAdded","tagname":"method","owner":"dr.node","id":"method-doSubnodeAdded","meta":{}},{"name":"doSubnodeRemoved","tagname":"method","owner":"dr.node","id":"method-doSubnodeRemoved","meta":{}},{"name":"sendEvent","tagname":"method","owner":"Eventable","id":"method-sendEvent","meta":{"chainable":true}},{"name":"setAttribute","tagname":"method","owner":"Eventable","id":"method-setAttribute","meta":{"chainable":true}},{"name":"setAttributes","tagname":"method","owner":"Eventable","id":"method-setAttributes","meta":{"chainable":true}},{"name":"onapplied","tagname":"event","owner":"dr.state","id":"event-onapplied","meta":{}},{"name":"ondestroy","tagname":"event","owner":"dr.node","id":"event-ondestroy","meta":{}},{"name":"oninit","tagname":"event","owner":"dr.node","id":"event-oninit","meta":{}},{"name":"onsubnodes","tagname":"event","owner":"dr.node","id":"event-onsubnodes","meta":{}},{"name":"subnodeAdded","tagname":"event","owner":"dr.node","id":"event-subnodeAdded","meta":{}},{"name":"subnodeRemoved","tagname":"event","owner":"dr.node","id":"event-subnodeRemoved","meta":{}}],"alternateClassNames":[],"aliases":{},"id":"class-dr.state","short_doc":"Allows a group of attributes, methods, handlers and instances to be removed and applied as a group. ...","component":false,"superclasses":["Module","Eventable","dr.node"],"subclasses":["dr.dragstate"],"mixedInto":[],"mixins":[],"parentMixins":[],"requires":[],"uses":[],"html":"

    Hierarchy

    Subclasses

    Files

    Allows a group of attributes, methods, handlers and instances to be removed and applied as a group.

    \n\n

    Like views and nodes, states can contain methods, handlers, setters, constraints, attributes and other view, node or class instances.

    \n\n

    Currently, states must end with the string 'state' in their name to work properly.

    \n\n
    <spacedlayout axis=\"y\"></spacedlayout>\n<view id=\"square\" width=\"100\" height=\"100\" bgcolor=\"lightgrey\">\n  <attribute name=\"ispink\" type=\"boolean\" value=\"false\"></attribute>\n  <state name=\"pinkstate\" applied=\"${this.parent.ispink}\">\n    <attribute name=\"bgcolor\" value=\"pink\" type=\"string\"></attribute>\n  </state>\n</view>\n<labelbutton text=\"pinkify!\">\n  <handler event=\"onclick\">\n    square.setAttribute('ispink', true);\n  </handler>\n</labelbutton>\n
    \n
    Defined By

    Attributes

    dr.state
    view source
    : Boolean
    If true, the state is applied. ...

    If true, the state is applied.

    \n

    Defaults to: false

    Gives this node a global ID, which can be looked up in the global window object. ...

    Gives this node a global ID, which can be looked up in the global window object.\nTake care to not override builtin globals, or override your own instances!

    \n

    Names this node in its parent scope so it can be referred to later.

    \n

    Names this node in its parent scope so it can be referred to later.

    \n
    A comma separated list of URLs to javascript includes required as dependencies. ...

    A comma separated list of URLs to javascript includes required as dependencies. Useful if you need to ensure a third party library is available.

    \n

    An error to show if scriptincludes fail to load

    \n

    An error to show if scriptincludes fail to load

    \n
    Defined By

    Properties

    : Booleanreadonly

    True when this node and all its children are completely initialized

    \n

    True when this node and all its children are completely initialized

    \n
    An array of this node's child nodes ...

    An array of this node's child nodes

    \n

    Defaults to: []

    Defined By

    Methods

    Destroys this node ...

    Destroys this node

    \n
    Called when a subnode is added to this node. ...

    Called when a subnode is added to this node. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to add a subnode. Instead call setParent.

    \n

    Parameters

    • node : dr.node

      The subnode that was added.

      \n

    Returns

    • void
      \n
    Called when a subnode is removed from this node. ...

    Called when a subnode is removed from this node. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to remove a subnode. Instead call _removeFromParent.

    \n

    Parameters

    • node : dr.node

      The subnode that was removed.

      \n

    Returns

    • void
      \n
    ( name, value ) : Eventablechainable
    Sends an event ...

    Sends an event

    \n

    Parameters

    • name : String

      the name of the event to send

      \n
    • value : Object

      the value to send with the event

      \n

    Returns

    Sets an attribute, calls a setter if there is one, then sends an event with the new value ...

    Sets an attribute, calls a setter if there is one, then sends an event with the new value

    \n

    Parameters

    • name : String

      the name of the attribute to set

      \n
    • value : Object

      the value to set to

      \n

    Returns

    Calls setAttribute for each name/value pair in the attributes object ...

    Calls setAttribute for each name/value pair in the attributes object

    \n

    Parameters

    • attributes : Object

      An object of name/value pairs to be set

      \n

    Returns

    Defined By

    Events

    dr.state
    view source
    ( applied )
    Fired when the state has been applied or unapplied. ...

    Fired when the state has been applied or unapplied. Onapplied handlers run in the scope of the state itself, see dragstate for an example.

    \n

    Parameters

    • applied : Boolean

      If true, the state was applied.

      \n
    Fired when this node and all its children are about to be destroyed ...

    Fired when this node and all its children are about to be destroyed

    \n

    Parameters

    Fired when this node and all its children are completely initialized ...

    Fired when this node and all its children are completely initialized

    \n

    Parameters

    Fired when this node's subnodes array has changed ...

    Fired when this node's subnodes array has changed

    \n

    Parameters

    Fired when a subnode is added to this node. ...

    Fired when a subnode is added to this node.

    \n

    Parameters

    Fired when a subnode is removed from this node. ...

    Fired when a subnode is removed from this node.

    \n

    Parameters

    ","meta":{}}); \ No newline at end of file diff --git a/docs/api/output/dr.stats.js b/docs/api/output/dr.stats.js new file mode 100644 index 00000000..4d8d5aee --- /dev/null +++ b/docs/api/output/dr.stats.js @@ -0,0 +1 @@ +Ext.data.JsonP.dr_stats({"tagname":"class","name":"dr.stats","autodetected":{},"files":[{"filename":"classdocs.js","href":"classdocs.html#dr-stats"}],"extends":"dr.view","members":[{"name":"bgcolor","tagname":"attribute","owner":"dr.view","id":"attribute-bgcolor","meta":{}},{"name":"border","tagname":"attribute","owner":"dr.view","id":"attribute-border","meta":{}},{"name":"bordercolor","tagname":"attribute","owner":"dr.view","id":"attribute-bordercolor","meta":{}},{"name":"borderstyle","tagname":"attribute","owner":"dr.view","id":"attribute-borderstyle","meta":{}},{"name":"clickable","tagname":"attribute","owner":"dr.view","id":"attribute-clickable","meta":{}},{"name":"clip","tagname":"attribute","owner":"dr.view","id":"attribute-clip","meta":{}},{"name":"height","tagname":"attribute","owner":"dr.view","id":"attribute-height","meta":{}},{"name":"id","tagname":"attribute","owner":"dr.node","id":"attribute-id","meta":{}},{"name":"name","tagname":"attribute","owner":"dr.node","id":"attribute-name","meta":{}},{"name":"padding","tagname":"attribute","owner":"dr.view","id":"attribute-padding","meta":{}},{"name":"scriptincludes","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludes","meta":{}},{"name":"scriptincludeserror","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludeserror","meta":{}},{"name":"scrollable","tagname":"attribute","owner":"dr.view","id":"attribute-scrollable","meta":{}},{"name":"visible","tagname":"attribute","owner":"dr.view","id":"attribute-visible","meta":{}},{"name":"width","tagname":"attribute","owner":"dr.view","id":"attribute-width","meta":{}},{"name":"x","tagname":"attribute","owner":"dr.view","id":"attribute-x","meta":{}},{"name":"y","tagname":"attribute","owner":"dr.view","id":"attribute-y","meta":{}},{"name":"ignorelayout","tagname":"property","owner":"dr.view","id":"property-ignorelayout","meta":{}},{"name":"inited","tagname":"property","owner":"dr.node","id":"property-inited","meta":{"readonly":true}},{"name":"layouts","tagname":"property","owner":"dr.view","id":"property-layouts","meta":{"readonly":true}},{"name":"subnodes","tagname":"property","owner":"dr.node","id":"property-subnodes","meta":{"readonly":true}},{"name":"subviews","tagname":"property","owner":"dr.view","id":"property-subviews","meta":{"readonly":true}},{"name":"animate","tagname":"method","owner":"dr.view","id":"method-animate","meta":{"chainable":true}},{"name":"destroy","tagname":"method","owner":"dr.node","id":"method-destroy","meta":{}},{"name":"doLayoutAdded","tagname":"method","owner":"dr.view","id":"method-doLayoutAdded","meta":{}},{"name":"doLayoutRemoved","tagname":"method","owner":"dr.view","id":"method-doLayoutRemoved","meta":{}},{"name":"doSubnodeAdded","tagname":"method","owner":"dr.view","id":"method-doSubnodeAdded","meta":{}},{"name":"doSubnodeRemoved","tagname":"method","owner":"dr.view","id":"method-doSubnodeRemoved","meta":{}},{"name":"doSubviewAdded","tagname":"method","owner":"dr.view","id":"method-doSubviewAdded","meta":{}},{"name":"doSubviewRemoved","tagname":"method","owner":"dr.view","id":"method-doSubviewRemoved","meta":{}},{"name":"sendEvent","tagname":"method","owner":"Eventable","id":"method-sendEvent","meta":{"chainable":true}},{"name":"setAttribute","tagname":"method","owner":"Eventable","id":"method-setAttribute","meta":{"chainable":true}},{"name":"setAttributes","tagname":"method","owner":"Eventable","id":"method-setAttributes","meta":{"chainable":true}},{"name":"layoutAdded","tagname":"event","owner":"dr.view","id":"event-layoutAdded","meta":{}},{"name":"layoutRemoved","tagname":"event","owner":"dr.view","id":"event-layoutRemoved","meta":{}},{"name":"onclick","tagname":"event","owner":"dr.view","id":"event-onclick","meta":{}},{"name":"ondestroy","tagname":"event","owner":"dr.node","id":"event-ondestroy","meta":{}},{"name":"oninit","tagname":"event","owner":"dr.node","id":"event-oninit","meta":{}},{"name":"onlayouts","tagname":"event","owner":"dr.view","id":"event-onlayouts","meta":{}},{"name":"onmousedown","tagname":"event","owner":"dr.view","id":"event-onmousedown","meta":{}},{"name":"onmouseout","tagname":"event","owner":"dr.view","id":"event-onmouseout","meta":{}},{"name":"onmouseover","tagname":"event","owner":"dr.view","id":"event-onmouseover","meta":{}},{"name":"onmouseup","tagname":"event","owner":"dr.view","id":"event-onmouseup","meta":{}},{"name":"onsubnodes","tagname":"event","owner":"dr.node","id":"event-onsubnodes","meta":{}},{"name":"onsubviews","tagname":"event","owner":"dr.view","id":"event-onsubviews","meta":{}},{"name":"subnodeAdded","tagname":"event","owner":"dr.node","id":"event-subnodeAdded","meta":{}},{"name":"subnodeRemoved","tagname":"event","owner":"dr.node","id":"event-subnodeRemoved","meta":{}},{"name":"subviewAdded","tagname":"event","owner":"dr.view","id":"event-subviewAdded","meta":{}},{"name":"subviewRemoved","tagname":"event","owner":"dr.view","id":"event-subviewRemoved","meta":{}}],"alternateClassNames":[],"aliases":{},"id":"class-dr.stats","short_doc":"wraps the three.js stats control which shows framerate over time\n\nThis example shows how use the stats control to mon...","component":false,"superclasses":["Module","Eventable","dr.node","dr.view"],"subclasses":[],"mixedInto":[],"mixins":[],"parentMixins":[],"requires":[],"uses":[],"html":"

    Hierarchy

    Files

    wraps the three.js stats control which shows framerate over time

    \n\n

    This example shows how use the stats control to monitor framerate:

    \n\n
    <stats></stats>\n
    \n
    Defined By

    Attributes

    Sets this view's background color

    \n

    Sets this view's background color

    \n

    Sets this view's border width

    \n

    Sets this view's border width

    \n

    Sets this view's border color

    \n

    Sets this view's border color

    \n

    Sets this view's border style (can be any css border-style value)

    \n

    Sets this view's border style (can be any css border-style value)

    \n
    If true, this view recieves mouse events. ...

    If true, this view recieves mouse events. Automatically set to true when an onclick/mouse* event is registered for this view.

    \n

    Defaults to: false

    If true, this view clips to its bounds ...

    If true, this view clips to its bounds

    \n

    Defaults to: false

    This view's height ...

    This view's height

    \n

    Defaults to: 0

    Gives this node a global ID, which can be looked up in the global window object. ...

    Gives this node a global ID, which can be looked up in the global window object.\nTake care to not override builtin globals, or override your own instances!

    \n

    Names this node in its parent scope so it can be referred to later.

    \n

    Names this node in its parent scope so it can be referred to later.

    \n

    Sets this view's padding

    \n

    Sets this view's padding

    \n
    A comma separated list of URLs to javascript includes required as dependencies. ...

    A comma separated list of URLs to javascript includes required as dependencies. Useful if you need to ensure a third party library is available.

    \n

    An error to show if scriptincludes fail to load

    \n

    An error to show if scriptincludes fail to load

    \n
    If true, this view clips to its bounds and provides scrolling to see content that overflows the bounds ...

    If true, this view clips to its bounds and provides scrolling to see content that overflows the bounds

    \n

    Defaults to: false

    If false, this view is invisible ...

    If false, this view is invisible

    \n

    Defaults to: true

    This view's width ...

    This view's width

    \n

    Defaults to: 0

    This view's x position ...

    This view's x position

    \n

    Defaults to: 0

    This view's y position ...

    This view's y position

    \n

    Defaults to: 0

    Defined By

    Properties

    If true, layouts should ignore this view

    \n

    If true, layouts should ignore this view

    \n
    : Booleanreadonly

    True when this node and all its children are completely initialized

    \n

    True when this node and all its children are completely initialized

    \n
    An array of this views's layouts. ...

    An array of this views's layouts. Only defined when needed.

    \n
    An array of this node's child nodes ...

    An array of this node's child nodes

    \n

    Defaults to: []

    An array of this views's child views

    \n

    An array of this views's child views

    \n
    Defined By

    Methods

    ( obj, Number ) : dr.viewchainable
    Animates this view's attribute(s) ...

    Animates this view's attribute(s)

    \n

    Parameters

    • obj : Object

      A hash of attribute names and values to animate to

      \n
    • Number : Object

      duration The duration of the animation in milliseconds

      \n

    Returns

    Destroys this node ...

    Destroys this node

    \n
    Called when a layout is added to this view. ...

    Called when a layout is added to this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to add a layout. Instead call setParent.

    \n

    Parameters

    • layout : dr.layout

      The layout that was added.

      \n

    Returns

    • void
      \n
    Called when a layout is removed from this view. ...

    Called when a layout is removed from this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to remove a layout. Instead call _removeFromParent.

    \n

    Parameters

    • layout : dr.layout

      The layout that was removed.

      \n

    Returns

    • void
      \n
    Calls doSubviewAdded/doLayoutAdded if the added subnode is a view or\nlayout respectively. ...

    Calls doSubviewAdded/doLayoutAdded if the added subnode is a view or\nlayout respectively. Subclasses should call super.

    \n

    Parameters

    • node : Object

    Overrides: dr.node.doSubnodeAdded

    Calls doSubviewRemoved/doLayoutRemoved if the removed subnode is a view or\nlayout respectively. ...

    Calls doSubviewRemoved/doLayoutRemoved if the removed subnode is a view or\nlayout respectively. Subclasses should call super.

    \n

    Parameters

    • node : Object

    Overrides: dr.node.doSubnodeRemoved

    Called when a subview is added to this view. ...

    Called when a subview is added to this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to add a subview. Instead call setParent.

    \n

    Parameters

    • sv : dr.view

      The subview that was added.

      \n

    Returns

    • void
      \n
    Called when a subview is removed from this view. ...

    Called when a subview is removed from this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to remove a subview. Instead call _removeFromParent.

    \n

    Parameters

    • sv : dr.view

      The subview that was removed.

      \n

    Returns

    • void
      \n
    ( name, value ) : Eventablechainable
    Sends an event ...

    Sends an event

    \n

    Parameters

    • name : String

      the name of the event to send

      \n
    • value : Object

      the value to send with the event

      \n

    Returns

    Sets an attribute, calls a setter if there is one, then sends an event with the new value ...

    Sets an attribute, calls a setter if there is one, then sends an event with the new value

    \n

    Parameters

    • name : String

      the name of the attribute to set

      \n
    • value : Object

      the value to set to

      \n

    Returns

    Calls setAttribute for each name/value pair in the attributes object ...

    Calls setAttribute for each name/value pair in the attributes object

    \n

    Parameters

    • attributes : Object

      An object of name/value pairs to be set

      \n

    Returns

    Defined By

    Events

    Fired when a layout is added to this view. ...

    Fired when a layout is added to this view.

    \n

    Parameters

    Fired when a layout is removed from this view. ...

    Fired when a layout is removed from this view.

    \n

    Parameters

    Fired when this view is clicked ...

    Fired when this view is clicked

    \n

    Parameters

    Fired when this node and all its children are about to be destroyed ...

    Fired when this node and all its children are about to be destroyed

    \n

    Parameters

    Fired when this node and all its children are completely initialized ...

    Fired when this node and all its children are completely initialized

    \n

    Parameters

    Fired when this views's layouts array has changed ...

    Fired when this views's layouts array has changed

    \n

    Parameters

    Fired when the mouse goes down on this view ...

    Fired when the mouse goes down on this view

    \n

    Parameters

    Fired when the mouse moves off this view ...

    Fired when the mouse moves off this view

    \n

    Parameters

    Fired when the mouse moves over this view ...

    Fired when the mouse moves over this view

    \n

    Parameters

    Fired when the mouse goes up on this view ...

    Fired when the mouse goes up on this view

    \n

    Parameters

    Fired when this node's subnodes array has changed ...

    Fired when this node's subnodes array has changed

    \n

    Parameters

    Fired when this views's subviews array has changed ...

    Fired when this views's subviews array has changed

    \n

    Parameters

    Fired when a subnode is added to this node. ...

    Fired when a subnode is added to this node.

    \n

    Parameters

    Fired when a subnode is removed from this node. ...

    Fired when a subnode is removed from this node.

    \n

    Parameters

    Fired when a subview is added to this view. ...

    Fired when a subview is added to this view.

    \n

    Parameters

    Fired when a subview is removed from this view. ...

    Fired when a subview is removed from this view.

    \n

    Parameters

    ","meta":{}}); \ No newline at end of file diff --git a/docs/api/output/dr.text.js b/docs/api/output/dr.text.js new file mode 100644 index 00000000..9137d09a --- /dev/null +++ b/docs/api/output/dr.text.js @@ -0,0 +1 @@ +Ext.data.JsonP.dr_text({"tagname":"class","name":"dr.text","autodetected":{},"files":[{"filename":"layout.js","href":"layout.html#dr-text"}],"extends":"dr.view","members":[{"name":"bgcolor","tagname":"attribute","owner":"dr.view","id":"attribute-bgcolor","meta":{}},{"name":"border","tagname":"attribute","owner":"dr.view","id":"attribute-border","meta":{}},{"name":"bordercolor","tagname":"attribute","owner":"dr.view","id":"attribute-bordercolor","meta":{}},{"name":"borderstyle","tagname":"attribute","owner":"dr.view","id":"attribute-borderstyle","meta":{}},{"name":"clickable","tagname":"attribute","owner":"dr.view","id":"attribute-clickable","meta":{}},{"name":"clip","tagname":"attribute","owner":"dr.view","id":"attribute-clip","meta":{}},{"name":"height","tagname":"attribute","owner":"dr.view","id":"attribute-height","meta":{}},{"name":"id","tagname":"attribute","owner":"dr.node","id":"attribute-id","meta":{}},{"name":"multiline","tagname":"attribute","owner":"dr.text","id":"attribute-multiline","meta":{}},{"name":"name","tagname":"attribute","owner":"dr.node","id":"attribute-name","meta":{}},{"name":"padding","tagname":"attribute","owner":"dr.view","id":"attribute-padding","meta":{}},{"name":"resize","tagname":"attribute","owner":"dr.text","id":"attribute-resize","meta":{}},{"name":"scriptincludes","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludes","meta":{}},{"name":"scriptincludeserror","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludeserror","meta":{}},{"name":"scrollable","tagname":"attribute","owner":"dr.view","id":"attribute-scrollable","meta":{}},{"name":"text","tagname":"attribute","owner":"dr.text","id":"attribute-text","meta":{}},{"name":"visible","tagname":"attribute","owner":"dr.view","id":"attribute-visible","meta":{}},{"name":"width","tagname":"attribute","owner":"dr.view","id":"attribute-width","meta":{}},{"name":"x","tagname":"attribute","owner":"dr.view","id":"attribute-x","meta":{}},{"name":"y","tagname":"attribute","owner":"dr.view","id":"attribute-y","meta":{}},{"name":"ignorelayout","tagname":"property","owner":"dr.view","id":"property-ignorelayout","meta":{}},{"name":"inited","tagname":"property","owner":"dr.node","id":"property-inited","meta":{"readonly":true}},{"name":"layouts","tagname":"property","owner":"dr.view","id":"property-layouts","meta":{"readonly":true}},{"name":"subnodes","tagname":"property","owner":"dr.node","id":"property-subnodes","meta":{"readonly":true}},{"name":"subviews","tagname":"property","owner":"dr.view","id":"property-subviews","meta":{"readonly":true}},{"name":"animate","tagname":"method","owner":"dr.view","id":"method-animate","meta":{"chainable":true}},{"name":"destroy","tagname":"method","owner":"dr.node","id":"method-destroy","meta":{}},{"name":"doLayoutAdded","tagname":"method","owner":"dr.view","id":"method-doLayoutAdded","meta":{}},{"name":"doLayoutRemoved","tagname":"method","owner":"dr.view","id":"method-doLayoutRemoved","meta":{}},{"name":"doSubnodeAdded","tagname":"method","owner":"dr.view","id":"method-doSubnodeAdded","meta":{}},{"name":"doSubnodeRemoved","tagname":"method","owner":"dr.view","id":"method-doSubnodeRemoved","meta":{}},{"name":"doSubviewAdded","tagname":"method","owner":"dr.view","id":"method-doSubviewAdded","meta":{}},{"name":"doSubviewRemoved","tagname":"method","owner":"dr.view","id":"method-doSubviewRemoved","meta":{}},{"name":"format","tagname":"method","owner":"dr.text","id":"method-format","meta":{}},{"name":"sendEvent","tagname":"method","owner":"Eventable","id":"method-sendEvent","meta":{"chainable":true}},{"name":"setAttribute","tagname":"method","owner":"Eventable","id":"method-setAttribute","meta":{"chainable":true}},{"name":"setAttributes","tagname":"method","owner":"Eventable","id":"method-setAttributes","meta":{"chainable":true}},{"name":"layoutAdded","tagname":"event","owner":"dr.view","id":"event-layoutAdded","meta":{}},{"name":"layoutRemoved","tagname":"event","owner":"dr.view","id":"event-layoutRemoved","meta":{}},{"name":"onclick","tagname":"event","owner":"dr.view","id":"event-onclick","meta":{}},{"name":"ondestroy","tagname":"event","owner":"dr.node","id":"event-ondestroy","meta":{}},{"name":"oninit","tagname":"event","owner":"dr.node","id":"event-oninit","meta":{}},{"name":"onlayouts","tagname":"event","owner":"dr.view","id":"event-onlayouts","meta":{}},{"name":"onmousedown","tagname":"event","owner":"dr.view","id":"event-onmousedown","meta":{}},{"name":"onmouseout","tagname":"event","owner":"dr.view","id":"event-onmouseout","meta":{}},{"name":"onmouseover","tagname":"event","owner":"dr.view","id":"event-onmouseover","meta":{}},{"name":"onmouseup","tagname":"event","owner":"dr.view","id":"event-onmouseup","meta":{}},{"name":"onsubnodes","tagname":"event","owner":"dr.node","id":"event-onsubnodes","meta":{}},{"name":"onsubviews","tagname":"event","owner":"dr.view","id":"event-onsubviews","meta":{}},{"name":"subnodeAdded","tagname":"event","owner":"dr.node","id":"event-subnodeAdded","meta":{}},{"name":"subnodeRemoved","tagname":"event","owner":"dr.node","id":"event-subnodeRemoved","meta":{}},{"name":"subviewAdded","tagname":"event","owner":"dr.view","id":"event-subviewAdded","meta":{}},{"name":"subviewRemoved","tagname":"event","owner":"dr.view","id":"event-subviewRemoved","meta":{}}],"alternateClassNames":[],"aliases":{},"id":"class-dr.text","short_doc":"Text component that supports single and multi-line text. ...","component":false,"superclasses":["Module","Eventable","dr.node","dr.view"],"subclasses":[],"mixedInto":[],"mixins":[],"parentMixins":[],"requires":[],"uses":[],"html":"

    Hierarchy

    Files

    Text component that supports single and multi-line text.

    \n\n

    The text component can be fixed size, or sized to fit the size of the text.

    \n\n
    <text text=\"Hello World!\" bgcolor=\"red\"></text>\n
    \n\n

    Here is a multiline text

    \n\n
    <text multiline=\"true\" text=\"Lorem ipsum dolor sit amet, consectetur adipiscing elit\"></text>\n
    \n\n

    You might want to set the value of a text element based on the value of other attributes via a constraint. Here we set the value by concatenating three attributes together.

    \n\n
    <attribute name=\"firstName\" type=\"string\" value=\"Lumpy\"></attribute>\n<attribute name=\"middleName\" type=\"string\" value=\"Space\"></attribute>\n<attribute name=\"lastName\" type=\"string\" value=\"Princess\"></attribute>\n\n<text text=\"${this.parent.firstName + ' ' + this.parent.middleName + ' ' + this.parent.lastName}\" color=\"hotpink\"></text>\n
    \n\n

    Constraints can contain more complex JavaScript code

    \n\n
    <attribute name=\"firstName\" type=\"string\" value=\"Lumpy\"></attribute>\n<attribute name=\"middleName\" type=\"string\" value=\"Space\"></attribute>\n<attribute name=\"lastName\" type=\"string\" value=\"Princess\"></attribute>\n\n<text text=\"${this.parent.firstName.charAt(0) + ' ' + this.parent.middleName.charAt(0) + ' ' + this.parent.lastName.charAt(0)}\" color=\"hotpink\"></text>\n
    \n\n

    We can simplify this by using a method to return the concatenation and constraining the text value to the return value of the method

    \n\n
    <attribute name=\"firstName\" type=\"string\" value=\"Lumpy\"></attribute>\n<attribute name=\"middleName\" type=\"string\" value=\"Space\"></attribute>\n<attribute name=\"lastName\" type=\"string\" value=\"Princess\"></attribute>\n\n<method name=\"initials\">\n  return this.firstName.charAt(0) + ' ' + this.middleName.charAt(0) + ' ' + this.lastName.charAt(0);\n</method>\n\n<text text=\"${this.parent.initials()}\" color=\"hotpink\"></text>\n
    \n\n

    You can override the format method to provide custom formatting for text elements. Here is a subclass of text, timetext, with the format method overridden to convert the text given in seconds into a formatted string.

    \n\n
    <class name=\"timetext\" extends=\"text\">\n  <method name=\"format\" args=\"seconds\">\n    var minutes = Math.floor(seconds / 60);\n    var seconds = Math.floor(seconds) - minutes * 60;\n    if (seconds < 10) {\n      seconds = '0' + seconds;\n    }\n    return minutes + ':' + seconds;\n  </method>\n</class>\n\n<timetext text=\"240\"></timetext>\n
    \n
    Defined By

    Attributes

    Sets this view's background color

    \n

    Sets this view's background color

    \n

    Sets this view's border width

    \n

    Sets this view's border width

    \n

    Sets this view's border color

    \n

    Sets this view's border color

    \n

    Sets this view's border style (can be any css border-style value)

    \n

    Sets this view's border style (can be any css border-style value)

    \n
    If true, this view recieves mouse events. ...

    If true, this view recieves mouse events. Automatically set to true when an onclick/mouse* event is registered for this view.

    \n

    Defaults to: false

    If true, this view clips to its bounds ...

    If true, this view clips to its bounds

    \n

    Defaults to: false

    This view's height ...

    This view's height

    \n

    Defaults to: 0

    Gives this node a global ID, which can be looked up in the global window object. ...

    Gives this node a global ID, which can be looked up in the global window object.\nTake care to not override builtin globals, or override your own instances!

    \n
    : Boolean
    Set to true to show multi-line text. ...

    Set to true to show multi-line text.

    \n

    Defaults to: false

    Names this node in its parent scope so it can be referred to later.

    \n

    Names this node in its parent scope so it can be referred to later.

    \n

    Sets this view's padding

    \n

    Sets this view's padding

    \n
    : Boolean
    By default, the text component is sized to the size of the text. ...

    By default, the text component is sized to the size of the text.\nBy setting resize=false, the component size is not modified\nwhen the text changes.

    \n

    Defaults to: true

    A comma separated list of URLs to javascript includes required as dependencies. ...

    A comma separated list of URLs to javascript includes required as dependencies. Useful if you need to ensure a third party library is available.

    \n

    An error to show if scriptincludes fail to load

    \n

    An error to show if scriptincludes fail to load

    \n
    If true, this view clips to its bounds and provides scrolling to see content that overflows the bounds ...

    If true, this view clips to its bounds and provides scrolling to see content that overflows the bounds

    \n

    Defaults to: false

    : String
    Component text. ...

    Component text.

    \n

    Defaults to: ""

    If false, this view is invisible ...

    If false, this view is invisible

    \n

    Defaults to: true

    This view's width ...

    This view's width

    \n

    Defaults to: 0

    This view's x position ...

    This view's x position

    \n

    Defaults to: 0

    This view's y position ...

    This view's y position

    \n

    Defaults to: 0

    Defined By

    Properties

    If true, layouts should ignore this view

    \n

    If true, layouts should ignore this view

    \n
    : Booleanreadonly

    True when this node and all its children are completely initialized

    \n

    True when this node and all its children are completely initialized

    \n
    An array of this views's layouts. ...

    An array of this views's layouts. Only defined when needed.

    \n
    An array of this node's child nodes ...

    An array of this node's child nodes

    \n

    Defaults to: []

    An array of this views's child views

    \n

    An array of this views's child views

    \n
    Defined By

    Methods

    ( obj, Number ) : dr.viewchainable
    Animates this view's attribute(s) ...

    Animates this view's attribute(s)

    \n

    Parameters

    • obj : Object

      A hash of attribute names and values to animate to

      \n
    • Number : Object

      duration The duration of the animation in milliseconds

      \n

    Returns

    Destroys this node ...

    Destroys this node

    \n
    Called when a layout is added to this view. ...

    Called when a layout is added to this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to add a layout. Instead call setParent.

    \n

    Parameters

    • layout : dr.layout

      The layout that was added.

      \n

    Returns

    • void
      \n
    Called when a layout is removed from this view. ...

    Called when a layout is removed from this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to remove a layout. Instead call _removeFromParent.

    \n

    Parameters

    • layout : dr.layout

      The layout that was removed.

      \n

    Returns

    • void
      \n
    Calls doSubviewAdded/doLayoutAdded if the added subnode is a view or\nlayout respectively. ...

    Calls doSubviewAdded/doLayoutAdded if the added subnode is a view or\nlayout respectively. Subclasses should call super.

    \n

    Parameters

    • node : Object

    Overrides: dr.node.doSubnodeAdded

    Calls doSubviewRemoved/doLayoutRemoved if the removed subnode is a view or\nlayout respectively. ...

    Calls doSubviewRemoved/doLayoutRemoved if the removed subnode is a view or\nlayout respectively. Subclasses should call super.

    \n

    Parameters

    • node : Object

    Overrides: dr.node.doSubnodeRemoved

    Called when a subview is added to this view. ...

    Called when a subview is added to this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to add a subview. Instead call setParent.

    \n

    Parameters

    • sv : dr.view

      The subview that was added.

      \n

    Returns

    • void
      \n
    Called when a subview is removed from this view. ...

    Called when a subview is removed from this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to remove a subview. Instead call _removeFromParent.

    \n

    Parameters

    • sv : dr.view

      The subview that was removed.

      \n

    Returns

    • void
      \n
    ( str ) : String
    Format the text to be displayed. ...

    Format the text to be displayed. The default behavior is to\nreturn the text intact. Override to change formatting.

    \n

    Parameters

    • str : String

      The current value of the text component.

      \n

    Returns

    • String

      The formated string to display in the component.

      \n
    ( name, value ) : Eventablechainable
    Sends an event ...

    Sends an event

    \n

    Parameters

    • name : String

      the name of the event to send

      \n
    • value : Object

      the value to send with the event

      \n

    Returns

    Sets an attribute, calls a setter if there is one, then sends an event with the new value ...

    Sets an attribute, calls a setter if there is one, then sends an event with the new value

    \n

    Parameters

    • name : String

      the name of the attribute to set

      \n
    • value : Object

      the value to set to

      \n

    Returns

    Calls setAttribute for each name/value pair in the attributes object ...

    Calls setAttribute for each name/value pair in the attributes object

    \n

    Parameters

    • attributes : Object

      An object of name/value pairs to be set

      \n

    Returns

    Defined By

    Events

    Fired when a layout is added to this view. ...

    Fired when a layout is added to this view.

    \n

    Parameters

    Fired when a layout is removed from this view. ...

    Fired when a layout is removed from this view.

    \n

    Parameters

    Fired when this view is clicked ...

    Fired when this view is clicked

    \n

    Parameters

    Fired when this node and all its children are about to be destroyed ...

    Fired when this node and all its children are about to be destroyed

    \n

    Parameters

    Fired when this node and all its children are completely initialized ...

    Fired when this node and all its children are completely initialized

    \n

    Parameters

    Fired when this views's layouts array has changed ...

    Fired when this views's layouts array has changed

    \n

    Parameters

    Fired when the mouse goes down on this view ...

    Fired when the mouse goes down on this view

    \n

    Parameters

    Fired when the mouse moves off this view ...

    Fired when the mouse moves off this view

    \n

    Parameters

    Fired when the mouse moves over this view ...

    Fired when the mouse moves over this view

    \n

    Parameters

    Fired when the mouse goes up on this view ...

    Fired when the mouse goes up on this view

    \n

    Parameters

    Fired when this node's subnodes array has changed ...

    Fired when this node's subnodes array has changed

    \n

    Parameters

    Fired when this views's subviews array has changed ...

    Fired when this views's subviews array has changed

    \n

    Parameters

    Fired when a subnode is added to this node. ...

    Fired when a subnode is added to this node.

    \n

    Parameters

    Fired when a subnode is removed from this node. ...

    Fired when a subnode is removed from this node.

    \n

    Parameters

    Fired when a subview is added to this view. ...

    Fired when a subview is added to this view.

    \n

    Parameters

    Fired when a subview is removed from this view. ...

    Fired when a subview is removed from this view.

    \n

    Parameters

    ","meta":{}}); \ No newline at end of file diff --git a/docs/api/output/dr.touch.js b/docs/api/output/dr.touch.js new file mode 100644 index 00000000..e5be2a32 --- /dev/null +++ b/docs/api/output/dr.touch.js @@ -0,0 +1 @@ +Ext.data.JsonP.dr_touch({"tagname":"class","name":"dr.touch","autodetected":{},"files":[{"filename":"classdocs.js","href":"classdocs.html#dr-touch"}],"extends":"dr.node","members":[{"name":"id","tagname":"attribute","owner":"dr.node","id":"attribute-id","meta":{}},{"name":"name","tagname":"attribute","owner":"dr.node","id":"attribute-name","meta":{}},{"name":"scriptincludes","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludes","meta":{}},{"name":"scriptincludeserror","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludeserror","meta":{}},{"name":"touches","tagname":"attribute","owner":"dr.touch","id":"attribute-touches","meta":{}},{"name":"x","tagname":"attribute","owner":"dr.touch","id":"attribute-x","meta":{}},{"name":"y","tagname":"attribute","owner":"dr.touch","id":"attribute-y","meta":{}},{"name":"inited","tagname":"property","owner":"dr.node","id":"property-inited","meta":{"readonly":true}},{"name":"subnodes","tagname":"property","owner":"dr.node","id":"property-subnodes","meta":{"readonly":true}},{"name":"destroy","tagname":"method","owner":"dr.node","id":"method-destroy","meta":{}},{"name":"doSubnodeAdded","tagname":"method","owner":"dr.node","id":"method-doSubnodeAdded","meta":{}},{"name":"doSubnodeRemoved","tagname":"method","owner":"dr.node","id":"method-doSubnodeRemoved","meta":{}},{"name":"sendEvent","tagname":"method","owner":"Eventable","id":"method-sendEvent","meta":{"chainable":true}},{"name":"setAttribute","tagname":"method","owner":"Eventable","id":"method-setAttribute","meta":{"chainable":true}},{"name":"setAttributes","tagname":"method","owner":"Eventable","id":"method-setAttributes","meta":{"chainable":true}},{"name":"ondestroy","tagname":"event","owner":"dr.node","id":"event-ondestroy","meta":{}},{"name":"oninit","tagname":"event","owner":"dr.node","id":"event-oninit","meta":{}},{"name":"onsubnodes","tagname":"event","owner":"dr.node","id":"event-onsubnodes","meta":{}},{"name":"subnodeAdded","tagname":"event","owner":"dr.node","id":"event-subnodeAdded","meta":{}},{"name":"subnodeRemoved","tagname":"event","owner":"dr.node","id":"event-subnodeRemoved","meta":{}}],"alternateClassNames":[],"aliases":{},"id":"class-dr.touch","component":false,"superclasses":["Module","Eventable","dr.node"],"subclasses":[],"mixedInto":[],"mixins":[],"parentMixins":[],"requires":[],"uses":[],"html":"

    Hierarchy

    Files

    Receives touch and multitouch data where available.

    \n
    Defined By

    Attributes

    Gives this node a global ID, which can be looked up in the global window object. ...

    Gives this node a global ID, which can be looked up in the global window object.\nTake care to not override builtin globals, or override your own instances!

    \n

    Names this node in its parent scope so it can be referred to later.

    \n

    Names this node in its parent scope so it can be referred to later.

    \n
    A comma separated list of URLs to javascript includes required as dependencies. ...

    A comma separated list of URLs to javascript includes required as dependencies. Useful if you need to ensure a third party library is available.

    \n

    An error to show if scriptincludes fail to load

    \n

    An error to show if scriptincludes fail to load

    \n
    dr.touch
    view source
    : Object[]
    (readonly)\nAn array of x/y coordinates for all fingers, where available. ...

    (readonly)\nAn array of x/y coordinates for all fingers, where available. See https://developer.mozilla.org/en-US/docs/Web/Guide/Events/Touch_events for more details

    \n
    dr.touch
    view source
    : Number
    (readonly)\nThe touch x value for the first finger. ...

    (readonly)\nThe touch x value for the first finger.

    \n

    Defaults to: 0

    dr.touch
    view source
    : Number
    (readonly)\nThe touch y value for the first finger. ...

    (readonly)\nThe touch y value for the first finger.

    \n

    Defaults to: 0

    Defined By

    Properties

    : Booleanreadonly

    True when this node and all its children are completely initialized

    \n

    True when this node and all its children are completely initialized

    \n
    An array of this node's child nodes ...

    An array of this node's child nodes

    \n

    Defaults to: []

    Defined By

    Methods

    Destroys this node ...

    Destroys this node

    \n
    Called when a subnode is added to this node. ...

    Called when a subnode is added to this node. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to add a subnode. Instead call setParent.

    \n

    Parameters

    • node : dr.node

      The subnode that was added.

      \n

    Returns

    • void
      \n
    Called when a subnode is removed from this node. ...

    Called when a subnode is removed from this node. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to remove a subnode. Instead call _removeFromParent.

    \n

    Parameters

    • node : dr.node

      The subnode that was removed.

      \n

    Returns

    • void
      \n
    ( name, value ) : Eventablechainable
    Sends an event ...

    Sends an event

    \n

    Parameters

    • name : String

      the name of the event to send

      \n
    • value : Object

      the value to send with the event

      \n

    Returns

    Sets an attribute, calls a setter if there is one, then sends an event with the new value ...

    Sets an attribute, calls a setter if there is one, then sends an event with the new value

    \n

    Parameters

    • name : String

      the name of the attribute to set

      \n
    • value : Object

      the value to set to

      \n

    Returns

    Calls setAttribute for each name/value pair in the attributes object ...

    Calls setAttribute for each name/value pair in the attributes object

    \n

    Parameters

    • attributes : Object

      An object of name/value pairs to be set

      \n

    Returns

    Defined By

    Events

    Fired when this node and all its children are about to be destroyed ...

    Fired when this node and all its children are about to be destroyed

    \n

    Parameters

    Fired when this node and all its children are completely initialized ...

    Fired when this node and all its children are completely initialized

    \n

    Parameters

    Fired when this node's subnodes array has changed ...

    Fired when this node's subnodes array has changed

    \n

    Parameters

    Fired when a subnode is added to this node. ...

    Fired when a subnode is added to this node.

    \n

    Parameters

    Fired when a subnode is removed from this node. ...

    Fired when a subnode is removed from this node.

    \n

    Parameters

    ","meta":{}}); \ No newline at end of file diff --git a/docs/api/output/dr.variablelayout.js b/docs/api/output/dr.variablelayout.js new file mode 100644 index 00000000..a253a13b --- /dev/null +++ b/docs/api/output/dr.variablelayout.js @@ -0,0 +1 @@ +Ext.data.JsonP.dr_variablelayout({"tagname":"class","name":"dr.variablelayout","autodetected":{},"files":[{"filename":"classdocs.js","href":"classdocs.html#dr-variablelayout"}],"extends":"dr.constantlayout","members":[{"name":"attribute","tagname":"attribute","owner":"dr.constantlayout","id":"attribute-attribute","meta":{}},{"name":"collapseparent","tagname":"attribute","owner":"dr.variablelayout","id":"attribute-collapseparent","meta":{}},{"name":"id","tagname":"attribute","owner":"dr.node","id":"attribute-id","meta":{}},{"name":"name","tagname":"attribute","owner":"dr.node","id":"attribute-name","meta":{}},{"name":"reverse","tagname":"attribute","owner":"dr.variablelayout","id":"attribute-reverse","meta":{}},{"name":"scriptincludes","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludes","meta":{}},{"name":"scriptincludeserror","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludeserror","meta":{}},{"name":"value","tagname":"attribute","owner":"dr.constantlayout","id":"attribute-value","meta":{}},{"name":"inited","tagname":"property","owner":"dr.node","id":"property-inited","meta":{"readonly":true}},{"name":"subnodes","tagname":"property","owner":"dr.node","id":"property-subnodes","meta":{"readonly":true}},{"name":"addSubview","tagname":"method","owner":"dr.layout","id":"method-addSubview","meta":{}},{"name":"canUpdate","tagname":"method","owner":"dr.layout","id":"method-canUpdate","meta":{}},{"name":"destroy","tagname":"method","owner":"dr.node","id":"method-destroy","meta":{}},{"name":"doAfterUpdate","tagname":"method","owner":"dr.variablelayout","id":"method-doAfterUpdate","meta":{}},{"name":"doBeforeUpdate","tagname":"method","owner":"dr.variablelayout","id":"method-doBeforeUpdate","meta":{}},{"name":"doSubnodeAdded","tagname":"method","owner":"dr.node","id":"method-doSubnodeAdded","meta":{}},{"name":"doSubnodeRemoved","tagname":"method","owner":"dr.node","id":"method-doSubnodeRemoved","meta":{}},{"name":"ignore","tagname":"method","owner":"dr.layout","id":"method-ignore","meta":{}},{"name":"removeSubview","tagname":"method","owner":"dr.layout","id":"method-removeSubview","meta":{}},{"name":"sendEvent","tagname":"method","owner":"Eventable","id":"method-sendEvent","meta":{"chainable":true}},{"name":"setAttribute","tagname":"method","owner":"Eventable","id":"method-setAttribute","meta":{"chainable":true}},{"name":"setAttributes","tagname":"method","owner":"Eventable","id":"method-setAttributes","meta":{"chainable":true}},{"name":"skipSubview","tagname":"method","owner":"dr.variablelayout","id":"method-skipSubview","meta":{}},{"name":"startMonitoringAllSubviews","tagname":"method","owner":"dr.layout","id":"method-startMonitoringAllSubviews","meta":{}},{"name":"startMonitoringSubview","tagname":"method","owner":"dr.variablelayout","id":"method-startMonitoringSubview","meta":{}},{"name":"stopMonitoringAllSubviews","tagname":"method","owner":"dr.layout","id":"method-stopMonitoringAllSubviews","meta":{}},{"name":"stopMonitoringSubview","tagname":"method","owner":"dr.variablelayout","id":"method-stopMonitoringSubview","meta":{}},{"name":"update","tagname":"method","owner":"dr.layout","id":"method-update","meta":{}},{"name":"updateParent","tagname":"method","owner":"dr.variablelayout","id":"method-updateParent","meta":{}},{"name":"updateSubview","tagname":"method","owner":"dr.variablelayout","id":"method-updateSubview","meta":{}},{"name":"ondestroy","tagname":"event","owner":"dr.node","id":"event-ondestroy","meta":{}},{"name":"oninit","tagname":"event","owner":"dr.node","id":"event-oninit","meta":{}},{"name":"onsubnodes","tagname":"event","owner":"dr.node","id":"event-onsubnodes","meta":{}},{"name":"subnodeAdded","tagname":"event","owner":"dr.node","id":"event-subnodeAdded","meta":{}},{"name":"subnodeRemoved","tagname":"event","owner":"dr.node","id":"event-subnodeRemoved","meta":{}}],"alternateClassNames":[],"aliases":{},"id":"class-dr.variablelayout","short_doc":"Allows for variation based on the index and subview. ...","component":false,"superclasses":["Module","Eventable","dr.node","dr.layout","dr.constantlayout"],"subclasses":["dr.alignlayout","dr.spacedlayout","dr.wrappinglayout"],"mixedInto":[],"mixins":[],"parentMixins":[],"requires":[],"uses":[],"html":"

    Hierarchy

    Subclasses

    Files

    Allows for variation based on the index and subview. An updateSubview\nmethod is provided that can be overriden to provide variable behavior.

    \n\n
    <variablelayout attribute=\"x\" value=\"10\">\n</variablelayout>\n\n<view width=\"100\" height=\"25\" bgcolor=\"lightpink\"></view>\n<view width=\"100\" height=\"25\" bgcolor=\"plum\"></view>\n<view width=\"100\" height=\"25\" bgcolor=\"lightblue\"></view>\n
    \n
    Defined By

    Attributes

    The name of the attribute to update on each subview. ...

    The name of the attribute to update on each subview.

    \n

    Defaults to: x

    dr.variablelayout
    view source
    : boolean
    If true the updateParent method will be called. ...

    If true the updateParent method will be called. The updateParent method\nwill typically resize the parent to fit the newly layed out child views.

    \n

    Defaults to: false

    Gives this node a global ID, which can be looked up in the global window object. ...

    Gives this node a global ID, which can be looked up in the global window object.\nTake care to not override builtin globals, or override your own instances!

    \n

    Names this node in its parent scope so it can be referred to later.

    \n

    Names this node in its parent scope so it can be referred to later.

    \n
    dr.variablelayout
    view source
    : boolean
    If true the layout will position the items in the opposite order. ...

    If true the layout will position the items in the opposite order. For\nexample, right to left instead of left to right.

    \n

    Defaults to: false

    A comma separated list of URLs to javascript includes required as dependencies. ...

    A comma separated list of URLs to javascript includes required as dependencies. Useful if you need to ensure a third party library is available.

    \n

    An error to show if scriptincludes fail to load

    \n

    An error to show if scriptincludes fail to load

    \n
    The value to set the attribute to. ...

    The value to set the attribute to.

    \n

    Defaults to: 0

    Defined By

    Properties

    : Booleanreadonly

    True when this node and all its children are completely initialized

    \n

    True when this node and all its children are completely initialized

    \n
    An array of this node's child nodes ...

    An array of this node's child nodes

    \n

    Defaults to: []

    Defined By

    Methods

    Adds the provided view to the subviews array of this layout. ...

    Adds the provided view to the subviews array of this layout.

    \n

    Parameters

    • view : dr.view

      The view to add to this layout.

      \n

    Returns

    • void
      \n
    Checks if the layout is locked or not. ...

    Checks if the layout is locked or not. Should be called by the\n\"update\" method of each layout to check if it is OK to do the update.

    \n

    Returns

    • boolean

      true if not locked, false otherwise.

      \n
    Destroys this node ...

    Destroys this node

    \n
    dr.variablelayout
    view source
    ( ) : void
    Called by update after any processing is done but before the optional\ncollapsing of parent is done. ...

    Called by update after any processing is done but before the optional\ncollapsing of parent is done. Gives subviews a chance to do any\nspecial teardown after update is processed.

    \n

    Returns

    • void
      \n
    dr.variablelayout
    view source
    ( ) : void
    Called by update before any processing is done. ...

    Called by update before any processing is done. Gives subviews a\nchance to do any special setup before update is processed.

    \n

    Returns

    • void
      \n
    Called when a subnode is added to this node. ...

    Called when a subnode is added to this node. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to add a subnode. Instead call setParent.

    \n

    Parameters

    • node : dr.node

      The subnode that was added.

      \n

    Returns

    • void
      \n
    Called when a subnode is removed from this node. ...

    Called when a subnode is removed from this node. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to remove a subnode. Instead call _removeFromParent.

    \n

    Parameters

    • node : dr.node

      The subnode that was removed.

      \n

    Returns

    • void
      \n
    ( view ) : boolean
    Checks if a subview can be added to this Layout or not. ...

    Checks if a subview can be added to this Layout or not. The default\nimplementation returns the 'ignorelayout' attributes of the subview.

    \n

    Parameters

    Returns

    • boolean

      True means the subview will be skipped, false otherwise.

      \n
    Removes the provided View from the subviews array of this Layout. ...

    Removes the provided View from the subviews array of this Layout.

    \n

    Parameters

    • view : dr.view

      The view to remove from this layout.

      \n

    Returns

    • number

      the index of the removed subview or -1 if not removed.

      \n
    ( name, value ) : Eventablechainable
    Sends an event ...

    Sends an event

    \n

    Parameters

    • name : String

      the name of the event to send

      \n
    • value : Object

      the value to send with the event

      \n

    Returns

    Sets an attribute, calls a setter if there is one, then sends an event with the new value ...

    Sets an attribute, calls a setter if there is one, then sends an event with the new value

    \n

    Parameters

    • name : String

      the name of the attribute to set

      \n
    • value : Object

      the value to set to

      \n

    Returns

    Calls setAttribute for each name/value pair in the attributes object ...

    Calls setAttribute for each name/value pair in the attributes object

    \n

    Parameters

    • attributes : Object

      An object of name/value pairs to be set

      \n

    Returns

    dr.variablelayout
    view source
    ( view ) : Boolean
    Called for each subview in the layout to determine if the view should\nbe updated or not. ...

    Called for each subview in the layout to determine if the view should\nbe updated or not. The default implementation returns true if the\nsubview is not visible.

    \n

    Parameters

    • view : dr.view

      The subview to check.

      \n

    Returns

    • Boolean

      True if the subview should be skipped during\n layout updates.

      \n
    Calls startMonitoringSubview for all views. ...

    Calls startMonitoringSubview for all views. Used by layout\nimplementations when a change occurs to the layout that requires\nrefreshing all the subview monitoring.

    \n

    Returns

    • void
      \n
    dr.variablelayout
    view source
    ( view )
    Provides a default implementation that calls update when the\nvisibility of a subview changes. ...

    Provides a default implementation that calls update when the\nvisibility of a subview changes.

    \n

    Parameters

    Overrides: dr.layout.startMonitoringSubview

    Calls stopMonitoringSubview for all views. ...

    Calls stopMonitoringSubview for all views. Used by Layout\nimplementations when a change occurs to the layout that requires\nrefreshing all the subview monitoring.

    \n

    Returns

    • void
      \n
    dr.variablelayout
    view source
    ( view )
    Provides a default implementation that calls update when the\nvisibility of a subview changes. ...

    Provides a default implementation that calls update when the\nvisibility of a subview changes.

    \n

    Parameters

    Overrides: dr.layout.stopMonitoringSubview

    Updates the layout. ...

    Updates the layout. Subclasses should call canUpdate to check lock state\nbefore doing anything.

    \n

    Returns

    • void
      \n
    dr.variablelayout
    view source
    ( attribute, value ) : void
    Called if the collapseparent attribute is true. ...

    Called if the collapseparent attribute is true. Subclasses should\nimplement this if they want to modify the parent view.

    \n

    Parameters

    • attribute : String

      The name of the attribute to update.

      \n
    • value : *

      The value to set on the parent.

      \n

    Returns

    • void
      \n
    dr.variablelayout
    view source
    ( count, view, attribute, value ) : *
    Called for each subview in the layout. ...

    Called for each subview in the layout.

    \n

    Parameters

    • count : Number

      The number of subviews that have been layed out\n including the current one. i.e. count will be 1 for the first\n subview layed out.

      \n
    • view : dr.view

      The subview being layed out.

      \n
    • attribute : String

      The name of the attribute to update.

      \n
    • value : *

      The value to set on the subview.

      \n

    Returns

    • *

      The value to use for the next subview.

      \n
    Defined By

    Events

    Fired when this node and all its children are about to be destroyed ...

    Fired when this node and all its children are about to be destroyed

    \n

    Parameters

    Fired when this node and all its children are completely initialized ...

    Fired when this node and all its children are completely initialized

    \n

    Parameters

    Fired when this node's subnodes array has changed ...

    Fired when this node's subnodes array has changed

    \n

    Parameters

    Fired when a subnode is added to this node. ...

    Fired when a subnode is added to this node.

    \n

    Parameters

    Fired when a subnode is removed from this node. ...

    Fired when a subnode is removed from this node.

    \n

    Parameters

    ","meta":{}}); \ No newline at end of file diff --git a/docs/api/output/dr.view.js b/docs/api/output/dr.view.js new file mode 100644 index 00000000..6dfd4148 --- /dev/null +++ b/docs/api/output/dr.view.js @@ -0,0 +1 @@ +Ext.data.JsonP.dr_view({"tagname":"class","name":"dr.view","autodetected":{},"files":[{"filename":"layout.js","href":"layout.html#dr-view"}],"aside":[{"tagname":"aside","type":"guide","name":"constraints"}],"extends":"dr.node","members":[{"name":"bgcolor","tagname":"attribute","owner":"dr.view","id":"attribute-bgcolor","meta":{}},{"name":"border","tagname":"attribute","owner":"dr.view","id":"attribute-border","meta":{}},{"name":"bordercolor","tagname":"attribute","owner":"dr.view","id":"attribute-bordercolor","meta":{}},{"name":"borderstyle","tagname":"attribute","owner":"dr.view","id":"attribute-borderstyle","meta":{}},{"name":"clickable","tagname":"attribute","owner":"dr.view","id":"attribute-clickable","meta":{}},{"name":"clip","tagname":"attribute","owner":"dr.view","id":"attribute-clip","meta":{}},{"name":"height","tagname":"attribute","owner":"dr.view","id":"attribute-height","meta":{}},{"name":"id","tagname":"attribute","owner":"dr.node","id":"attribute-id","meta":{}},{"name":"name","tagname":"attribute","owner":"dr.node","id":"attribute-name","meta":{}},{"name":"padding","tagname":"attribute","owner":"dr.view","id":"attribute-padding","meta":{}},{"name":"scriptincludes","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludes","meta":{}},{"name":"scriptincludeserror","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludeserror","meta":{}},{"name":"scrollable","tagname":"attribute","owner":"dr.view","id":"attribute-scrollable","meta":{}},{"name":"visible","tagname":"attribute","owner":"dr.view","id":"attribute-visible","meta":{}},{"name":"width","tagname":"attribute","owner":"dr.view","id":"attribute-width","meta":{}},{"name":"x","tagname":"attribute","owner":"dr.view","id":"attribute-x","meta":{}},{"name":"y","tagname":"attribute","owner":"dr.view","id":"attribute-y","meta":{}},{"name":"ignorelayout","tagname":"property","owner":"dr.view","id":"property-ignorelayout","meta":{}},{"name":"inited","tagname":"property","owner":"dr.node","id":"property-inited","meta":{"readonly":true}},{"name":"layouts","tagname":"property","owner":"dr.view","id":"property-layouts","meta":{"readonly":true}},{"name":"subnodes","tagname":"property","owner":"dr.node","id":"property-subnodes","meta":{"readonly":true}},{"name":"subviews","tagname":"property","owner":"dr.view","id":"property-subviews","meta":{"readonly":true}},{"name":"animate","tagname":"method","owner":"dr.view","id":"method-animate","meta":{"chainable":true}},{"name":"destroy","tagname":"method","owner":"dr.node","id":"method-destroy","meta":{}},{"name":"doLayoutAdded","tagname":"method","owner":"dr.view","id":"method-doLayoutAdded","meta":{}},{"name":"doLayoutRemoved","tagname":"method","owner":"dr.view","id":"method-doLayoutRemoved","meta":{}},{"name":"doSubnodeAdded","tagname":"method","owner":"dr.view","id":"method-doSubnodeAdded","meta":{}},{"name":"doSubnodeRemoved","tagname":"method","owner":"dr.view","id":"method-doSubnodeRemoved","meta":{}},{"name":"doSubviewAdded","tagname":"method","owner":"dr.view","id":"method-doSubviewAdded","meta":{}},{"name":"doSubviewRemoved","tagname":"method","owner":"dr.view","id":"method-doSubviewRemoved","meta":{}},{"name":"sendEvent","tagname":"method","owner":"Eventable","id":"method-sendEvent","meta":{"chainable":true}},{"name":"setAttribute","tagname":"method","owner":"Eventable","id":"method-setAttribute","meta":{"chainable":true}},{"name":"setAttributes","tagname":"method","owner":"Eventable","id":"method-setAttributes","meta":{"chainable":true}},{"name":"layoutAdded","tagname":"event","owner":"dr.view","id":"event-layoutAdded","meta":{}},{"name":"layoutRemoved","tagname":"event","owner":"dr.view","id":"event-layoutRemoved","meta":{}},{"name":"onclick","tagname":"event","owner":"dr.view","id":"event-onclick","meta":{}},{"name":"ondestroy","tagname":"event","owner":"dr.node","id":"event-ondestroy","meta":{}},{"name":"oninit","tagname":"event","owner":"dr.node","id":"event-oninit","meta":{}},{"name":"onlayouts","tagname":"event","owner":"dr.view","id":"event-onlayouts","meta":{}},{"name":"onmousedown","tagname":"event","owner":"dr.view","id":"event-onmousedown","meta":{}},{"name":"onmouseout","tagname":"event","owner":"dr.view","id":"event-onmouseout","meta":{}},{"name":"onmouseover","tagname":"event","owner":"dr.view","id":"event-onmouseover","meta":{}},{"name":"onmouseup","tagname":"event","owner":"dr.view","id":"event-onmouseup","meta":{}},{"name":"onsubnodes","tagname":"event","owner":"dr.node","id":"event-onsubnodes","meta":{}},{"name":"onsubviews","tagname":"event","owner":"dr.view","id":"event-onsubviews","meta":{}},{"name":"subnodeAdded","tagname":"event","owner":"dr.node","id":"event-subnodeAdded","meta":{}},{"name":"subnodeRemoved","tagname":"event","owner":"dr.node","id":"event-subnodeRemoved","meta":{}},{"name":"subviewAdded","tagname":"event","owner":"dr.view","id":"event-subviewAdded","meta":{}},{"name":"subviewRemoved","tagname":"event","owner":"dr.view","id":"event-subviewRemoved","meta":{}}],"alternateClassNames":[],"aliases":{},"id":"class-dr.view","short_doc":"The visual base class for everything in dreem. ...","component":false,"superclasses":["Module","Eventable","dr.node"],"subclasses":["dr.ace","dr.art","dr.bitmap","dr.buttonbase","dr.inputtext","dr.rangeslider","dr.slider","dr.stats","dr.text","dr.webpage"],"mixedInto":[],"mixins":[],"parentMixins":[],"requires":[],"uses":[],"html":"

    Hierarchy

    Subclasses

    Files

    \n

    The visual base class for everything in dreem. Views extend dr.node to add the ability to set and animate visual attributes, and interact with the mouse.

    \n\n

    Views are positioned inside their parent according to their x and y coordinates.

    \n\n

    Views can contain methods, handlers, setters, constraints, attributes and other view, node or class instances.

    \n\n

    Views can be easily converted to reusable classes/tags by changing their outermost <view> tags to <class> and adding a name attribute.

    \n\n

    Views support a number of builtin attributes. Setting attributes that aren't listed explicitly will pass through to the underlying Sprite implementation.

    \n\n

    Views currently integrate with jQuery, so any changes made to their CSS via jQuery will automatically cause them to update.

    \n\n

    Note that dreem apps must be contained inside a top-level <view></view> tag.

    \n\n

    The following example shows a pink view that contains a smaller blue view offset 10 pixels from the top and 10 from the left.

    \n\n
    <view width=\"200\" height=\"100\" bgcolor=\"lightpink\">\n\n  <view width=\"50\" height=\"50\" x=\"10\" y=\"10\" bgcolor=\"lightblue\"></view>\n\n</view>\n
    \n\n

    Here the blue view is wider than its parent pink view, and because the clip attribute of the parent is set to false it extends beyond the parents bounds.

    \n\n
    <view width=\"200\" height=\"100\" bgcolor=\"lightpink\" clip=\"false\">\n\n  <view width=\"250\" height=\"50\" x=\"10\" y=\"10\" bgcolor=\"lightblue\"></view>\n\n</view>\n
    \n\n

    Now we set the clip attribute on the parent view to true, causing the overflowing child view to be clipped at its parent's boundary.

    \n\n
    <view width=\"200\" height=\"100\" bgcolor=\"lightpink\" clip=\"true\">\n\n  <view width=\"250\" height=\"50\" x=\"10\" y=\"10\" bgcolor=\"lightblue\"></view>\n\n</view>\n
    \n\n

    Here we demonstrate how unsupported attributes are passed to the underlying sprite system. We make the child view semi-transparent by setting opacity. Although this is not in the list of supported attributes it is still applied.

    \n\n
    <view width=\"200\" height=\"100\" bgcolor=\"lightpink\">\n\n  <view width=\"250\" height=\"50\" x=\"10\" y=\"10\" bgcolor=\"lightblue\" opacity=\".5\"></view>\n\n</view>\n
    \n\n

    It is convenient to constrain a view's size and position to attributes of its parent view. Here we'll position the inner view so that its inset by 10 pixels in its parent.

    \n\n
    <view width=\"200\" height=\"100\" bgcolor=\"lightpink\">\n\n  <view width=\"${this.parent.width-this.inset*2}\" height=\"${this.parent.height-this.inset*2}\" x=\"${this.inset}\" y=\"${this.inset}\" bgcolor=\"lightblue\">\n    <attribute name=\"inset\" type=\"number\" value=\"10\"></attribute>\n  </view>\n\n</view>\n
    \n
    Defined By

    Attributes

    : String

    Sets this view's background color

    \n

    Sets this view's background color

    \n
    : Number

    Sets this view's border width

    \n

    Sets this view's border width

    \n
    : String

    Sets this view's border color

    \n

    Sets this view's border color

    \n
    : String

    Sets this view's border style (can be any css border-style value)

    \n

    Sets this view's border style (can be any css border-style value)

    \n
    : Boolean
    If true, this view recieves mouse events. ...

    If true, this view recieves mouse events. Automatically set to true when an onclick/mouse* event is registered for this view.

    \n

    Defaults to: false

    : Boolean
    If true, this view clips to its bounds ...

    If true, this view clips to its bounds

    \n

    Defaults to: false

    : Number
    This view's height ...

    This view's height

    \n

    Defaults to: 0

    Gives this node a global ID, which can be looked up in the global window object. ...

    Gives this node a global ID, which can be looked up in the global window object.\nTake care to not override builtin globals, or override your own instances!

    \n

    Names this node in its parent scope so it can be referred to later.

    \n

    Names this node in its parent scope so it can be referred to later.

    \n
    : Number

    Sets this view's padding

    \n

    Sets this view's padding

    \n
    A comma separated list of URLs to javascript includes required as dependencies. ...

    A comma separated list of URLs to javascript includes required as dependencies. Useful if you need to ensure a third party library is available.

    \n

    An error to show if scriptincludes fail to load

    \n

    An error to show if scriptincludes fail to load

    \n
    : Boolean
    If true, this view clips to its bounds and provides scrolling to see content that overflows the bounds ...

    If true, this view clips to its bounds and provides scrolling to see content that overflows the bounds

    \n

    Defaults to: false

    : Boolean
    If false, this view is invisible ...

    If false, this view is invisible

    \n

    Defaults to: true

    : Number
    This view's width ...

    This view's width

    \n

    Defaults to: 0

    : Number
    This view's x position ...

    This view's x position

    \n

    Defaults to: 0

    : Number
    This view's y position ...

    This view's y position

    \n

    Defaults to: 0

    Defined By

    Properties

    : Boolean

    If true, layouts should ignore this view

    \n

    If true, layouts should ignore this view

    \n
    : Booleanreadonly

    True when this node and all its children are completely initialized

    \n

    True when this node and all its children are completely initialized

    \n
    : dr.layout[]readonly
    An array of this views's layouts. ...

    An array of this views's layouts. Only defined when needed.

    \n
    An array of this node's child nodes ...

    An array of this node's child nodes

    \n

    Defaults to: []

    : dr.view[]readonly

    An array of this views's child views

    \n

    An array of this views's child views

    \n
    Defined By

    Methods

    ( obj, Number ) : dr.viewchainable
    Animates this view's attribute(s) ...

    Animates this view's attribute(s)

    \n

    Parameters

    • obj : Object

      A hash of attribute names and values to animate to

      \n
    • Number : Object

      duration The duration of the animation in milliseconds

      \n

    Returns

    Destroys this node ...

    Destroys this node

    \n
    ( layout ) : void
    Called when a layout is added to this view. ...

    Called when a layout is added to this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to add a layout. Instead call setParent.

    \n

    Parameters

    • layout : dr.layout

      The layout that was added.

      \n

    Returns

    • void
      \n
    ( layout ) : void
    Called when a layout is removed from this view. ...

    Called when a layout is removed from this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to remove a layout. Instead call _removeFromParent.

    \n

    Parameters

    • layout : dr.layout

      The layout that was removed.

      \n

    Returns

    • void
      \n
    Calls doSubviewAdded/doLayoutAdded if the added subnode is a view or\nlayout respectively. ...

    Calls doSubviewAdded/doLayoutAdded if the added subnode is a view or\nlayout respectively. Subclasses should call super.

    \n

    Parameters

    • node : Object

    Overrides: dr.node.doSubnodeAdded

    Calls doSubviewRemoved/doLayoutRemoved if the removed subnode is a view or\nlayout respectively. ...

    Calls doSubviewRemoved/doLayoutRemoved if the removed subnode is a view or\nlayout respectively. Subclasses should call super.

    \n

    Parameters

    • node : Object

    Overrides: dr.node.doSubnodeRemoved

    ( sv ) : void
    Called when a subview is added to this view. ...

    Called when a subview is added to this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to add a subview. Instead call setParent.

    \n

    Parameters

    • sv : dr.view

      The subview that was added.

      \n

    Returns

    • void
      \n
    ( sv ) : void
    Called when a subview is removed from this view. ...

    Called when a subview is removed from this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to remove a subview. Instead call _removeFromParent.

    \n

    Parameters

    • sv : dr.view

      The subview that was removed.

      \n

    Returns

    • void
      \n
    ( name, value ) : Eventablechainable
    Sends an event ...

    Sends an event

    \n

    Parameters

    • name : String

      the name of the event to send

      \n
    • value : Object

      the value to send with the event

      \n

    Returns

    Sets an attribute, calls a setter if there is one, then sends an event with the new value ...

    Sets an attribute, calls a setter if there is one, then sends an event with the new value

    \n

    Parameters

    • name : String

      the name of the attribute to set

      \n
    • value : Object

      the value to set to

      \n

    Returns

    Calls setAttribute for each name/value pair in the attributes object ...

    Calls setAttribute for each name/value pair in the attributes object

    \n

    Parameters

    • attributes : Object

      An object of name/value pairs to be set

      \n

    Returns

    Defined By

    Events

    ( layout )
    Fired when a layout is added to this view. ...

    Fired when a layout is added to this view.

    \n

    Parameters

    ( layout )
    Fired when a layout is removed from this view. ...

    Fired when a layout is removed from this view.

    \n

    Parameters

    ( view )
    Fired when this view is clicked ...

    Fired when this view is clicked

    \n

    Parameters

    Fired when this node and all its children are about to be destroyed ...

    Fired when this node and all its children are about to be destroyed

    \n

    Parameters

    Fired when this node and all its children are completely initialized ...

    Fired when this node and all its children are completely initialized

    \n

    Parameters

    ( view )
    Fired when this views's layouts array has changed ...

    Fired when this views's layouts array has changed

    \n

    Parameters

    ( view )
    Fired when the mouse goes down on this view ...

    Fired when the mouse goes down on this view

    \n

    Parameters

    ( view )
    Fired when the mouse moves off this view ...

    Fired when the mouse moves off this view

    \n

    Parameters

    ( view )
    Fired when the mouse moves over this view ...

    Fired when the mouse moves over this view

    \n

    Parameters

    ( view )
    Fired when the mouse goes up on this view ...

    Fired when the mouse goes up on this view

    \n

    Parameters

    Fired when this node's subnodes array has changed ...

    Fired when this node's subnodes array has changed

    \n

    Parameters

    ( view )
    Fired when this views's subviews array has changed ...

    Fired when this views's subviews array has changed

    \n

    Parameters

    Fired when a subnode is added to this node. ...

    Fired when a subnode is added to this node.

    \n

    Parameters

    Fired when a subnode is removed from this node. ...

    Fired when a subnode is removed from this node.

    \n

    Parameters

    Fired when a subview is added to this view. ...

    Fired when a subview is added to this view.

    \n

    Parameters

    Fired when a subview is removed from this view. ...

    Fired when a subview is removed from this view.

    \n

    Parameters

    ","meta":{}}); \ No newline at end of file diff --git a/docs/api/output/dr.webpage.js b/docs/api/output/dr.webpage.js new file mode 100644 index 00000000..1b023d36 --- /dev/null +++ b/docs/api/output/dr.webpage.js @@ -0,0 +1 @@ +Ext.data.JsonP.dr_webpage({"tagname":"class","name":"dr.webpage","autodetected":{},"files":[{"filename":"classdocs.js","href":"classdocs.html#dr-webpage"}],"extends":"dr.view","members":[{"name":"bgcolor","tagname":"attribute","owner":"dr.view","id":"attribute-bgcolor","meta":{}},{"name":"border","tagname":"attribute","owner":"dr.view","id":"attribute-border","meta":{}},{"name":"bordercolor","tagname":"attribute","owner":"dr.view","id":"attribute-bordercolor","meta":{}},{"name":"borderstyle","tagname":"attribute","owner":"dr.view","id":"attribute-borderstyle","meta":{}},{"name":"clickable","tagname":"attribute","owner":"dr.view","id":"attribute-clickable","meta":{}},{"name":"clip","tagname":"attribute","owner":"dr.view","id":"attribute-clip","meta":{}},{"name":"contents","tagname":"attribute","owner":"dr.webpage","id":"attribute-contents","meta":{}},{"name":"height","tagname":"attribute","owner":"dr.view","id":"attribute-height","meta":{}},{"name":"id","tagname":"attribute","owner":"dr.node","id":"attribute-id","meta":{}},{"name":"name","tagname":"attribute","owner":"dr.node","id":"attribute-name","meta":{}},{"name":"padding","tagname":"attribute","owner":"dr.view","id":"attribute-padding","meta":{}},{"name":"scriptincludes","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludes","meta":{}},{"name":"scriptincludeserror","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludeserror","meta":{}},{"name":"scrollable","tagname":"attribute","owner":"dr.view","id":"attribute-scrollable","meta":{}},{"name":"scrolling","tagname":"attribute","owner":"dr.webpage","id":"attribute-scrolling","meta":{}},{"name":"src","tagname":"attribute","owner":"dr.webpage","id":"attribute-src","meta":{}},{"name":"visible","tagname":"attribute","owner":"dr.view","id":"attribute-visible","meta":{}},{"name":"width","tagname":"attribute","owner":"dr.view","id":"attribute-width","meta":{}},{"name":"x","tagname":"attribute","owner":"dr.view","id":"attribute-x","meta":{}},{"name":"y","tagname":"attribute","owner":"dr.view","id":"attribute-y","meta":{}},{"name":"ignorelayout","tagname":"property","owner":"dr.view","id":"property-ignorelayout","meta":{}},{"name":"inited","tagname":"property","owner":"dr.node","id":"property-inited","meta":{"readonly":true}},{"name":"layouts","tagname":"property","owner":"dr.view","id":"property-layouts","meta":{"readonly":true}},{"name":"subnodes","tagname":"property","owner":"dr.node","id":"property-subnodes","meta":{"readonly":true}},{"name":"subviews","tagname":"property","owner":"dr.view","id":"property-subviews","meta":{"readonly":true}},{"name":"animate","tagname":"method","owner":"dr.view","id":"method-animate","meta":{"chainable":true}},{"name":"destroy","tagname":"method","owner":"dr.node","id":"method-destroy","meta":{}},{"name":"doLayoutAdded","tagname":"method","owner":"dr.view","id":"method-doLayoutAdded","meta":{}},{"name":"doLayoutRemoved","tagname":"method","owner":"dr.view","id":"method-doLayoutRemoved","meta":{}},{"name":"doSubnodeAdded","tagname":"method","owner":"dr.view","id":"method-doSubnodeAdded","meta":{}},{"name":"doSubnodeRemoved","tagname":"method","owner":"dr.view","id":"method-doSubnodeRemoved","meta":{}},{"name":"doSubviewAdded","tagname":"method","owner":"dr.view","id":"method-doSubviewAdded","meta":{}},{"name":"doSubviewRemoved","tagname":"method","owner":"dr.view","id":"method-doSubviewRemoved","meta":{}},{"name":"sendEvent","tagname":"method","owner":"Eventable","id":"method-sendEvent","meta":{"chainable":true}},{"name":"setAttribute","tagname":"method","owner":"Eventable","id":"method-setAttribute","meta":{"chainable":true}},{"name":"setAttributes","tagname":"method","owner":"Eventable","id":"method-setAttributes","meta":{"chainable":true}},{"name":"layoutAdded","tagname":"event","owner":"dr.view","id":"event-layoutAdded","meta":{}},{"name":"layoutRemoved","tagname":"event","owner":"dr.view","id":"event-layoutRemoved","meta":{}},{"name":"onclick","tagname":"event","owner":"dr.view","id":"event-onclick","meta":{}},{"name":"ondestroy","tagname":"event","owner":"dr.node","id":"event-ondestroy","meta":{}},{"name":"oninit","tagname":"event","owner":"dr.node","id":"event-oninit","meta":{}},{"name":"onlayouts","tagname":"event","owner":"dr.view","id":"event-onlayouts","meta":{}},{"name":"onmousedown","tagname":"event","owner":"dr.view","id":"event-onmousedown","meta":{}},{"name":"onmouseout","tagname":"event","owner":"dr.view","id":"event-onmouseout","meta":{}},{"name":"onmouseover","tagname":"event","owner":"dr.view","id":"event-onmouseover","meta":{}},{"name":"onmouseup","tagname":"event","owner":"dr.view","id":"event-onmouseup","meta":{}},{"name":"onsubnodes","tagname":"event","owner":"dr.node","id":"event-onsubnodes","meta":{}},{"name":"onsubviews","tagname":"event","owner":"dr.view","id":"event-onsubviews","meta":{}},{"name":"subnodeAdded","tagname":"event","owner":"dr.node","id":"event-subnodeAdded","meta":{}},{"name":"subnodeRemoved","tagname":"event","owner":"dr.node","id":"event-subnodeRemoved","meta":{}},{"name":"subviewAdded","tagname":"event","owner":"dr.view","id":"event-subviewAdded","meta":{}},{"name":"subviewRemoved","tagname":"event","owner":"dr.view","id":"event-subviewRemoved","meta":{}}],"alternateClassNames":[],"aliases":{},"id":"class-dr.webpage","short_doc":"iframe component for embedding dreem code or html in a dreem application. ...","component":false,"superclasses":["Module","Eventable","dr.node","dr.view"],"subclasses":[],"mixedInto":[],"mixins":[],"parentMixins":[],"requires":[],"uses":[],"html":"

    Hierarchy

    Files

    iframe component for embedding dreem code or html in a dreem application.\nThe size of the iframe matches the width/height of the view when the\ncomponent is created. The iframe component can show a web page by\nusing the src attribute, or to show dynamic content using the\ncontents attribute.

    \n\n

    This example shows how to display a web page in an iframe. The\ncontents of the iframe are not editable:

    \n\n
    <webpage src=\"http://en.wikipedia.org/wiki/San_Francisco\" width=\"300\" height=\"140\"></webpage>\n
    \n\n

    To make the web page clickable, and to add scrolling:

    \n\n
    <webpage src=\"http://en.wikipedia.org/wiki/San_Francisco\" width=\"300\" height=\"140\" scrolling=\"true\" clickable=\"true\"></webpage>\n
    \n\n

    The content of the iframe can also be dynamically generated, including\nadding Dreem code:

    \n\n
    <webpage width=\"300\" height=\"140\" contents=\"Hello\"></webpage>\n
    \n
    Defined By

    Attributes

    Sets this view's background color

    \n

    Sets this view's background color

    \n

    Sets this view's border width

    \n

    Sets this view's border width

    \n

    Sets this view's border color

    \n

    Sets this view's border color

    \n

    Sets this view's border style (can be any css border-style value)

    \n

    Sets this view's border style (can be any css border-style value)

    \n
    If true, this view recieves mouse events. ...

    If true, this view recieves mouse events. Automatically set to true when an onclick/mouse* event is registered for this view.

    \n

    Defaults to: false

    If true, this view clips to its bounds ...

    If true, this view clips to its bounds

    \n

    Defaults to: false

    dr.webpage
    view source
    : String
    string to write into the iframe body. ...

    string to write into the iframe body. This is dreem/html code\nthat is written inside the iframe's body tag. If you want to display\nstatic web pages, specify the src attribute, but do not use contents.

    \n

    Defaults to: ""

    This view's height ...

    This view's height

    \n

    Defaults to: 0

    Gives this node a global ID, which can be looked up in the global window object. ...

    Gives this node a global ID, which can be looked up in the global window object.\nTake care to not override builtin globals, or override your own instances!

    \n

    Names this node in its parent scope so it can be referred to later.

    \n

    Names this node in its parent scope so it can be referred to later.

    \n

    Sets this view's padding

    \n

    Sets this view's padding

    \n
    A comma separated list of URLs to javascript includes required as dependencies. ...

    A comma separated list of URLs to javascript includes required as dependencies. Useful if you need to ensure a third party library is available.

    \n

    An error to show if scriptincludes fail to load

    \n

    An error to show if scriptincludes fail to load

    \n
    If true, this view clips to its bounds and provides scrolling to see content that overflows the bounds ...

    If true, this view clips to its bounds and provides scrolling to see content that overflows the bounds

    \n

    Defaults to: false

    dr.webpage
    view source
    : Boolean
    Controls scrollbar display in the iframe. ...

    Controls scrollbar display in the iframe.

    \n

    Defaults to: "false"

    dr.webpage
    view source
    : String
    url to load inside the iframe. ...

    url to load inside the iframe. By default, a file is loaded that has\nan empty body but includes the libraries needed to support Dreem code.

    \n

    Defaults to: "/iframe_stub.html"

    If false, this view is invisible ...

    If false, this view is invisible

    \n

    Defaults to: true

    This view's width ...

    This view's width

    \n

    Defaults to: 0

    This view's x position ...

    This view's x position

    \n

    Defaults to: 0

    This view's y position ...

    This view's y position

    \n

    Defaults to: 0

    Defined By

    Properties

    If true, layouts should ignore this view

    \n

    If true, layouts should ignore this view

    \n
    : Booleanreadonly

    True when this node and all its children are completely initialized

    \n

    True when this node and all its children are completely initialized

    \n
    An array of this views's layouts. ...

    An array of this views's layouts. Only defined when needed.

    \n
    An array of this node's child nodes ...

    An array of this node's child nodes

    \n

    Defaults to: []

    An array of this views's child views

    \n

    An array of this views's child views

    \n
    Defined By

    Methods

    ( obj, Number ) : dr.viewchainable
    Animates this view's attribute(s) ...

    Animates this view's attribute(s)

    \n

    Parameters

    • obj : Object

      A hash of attribute names and values to animate to

      \n
    • Number : Object

      duration The duration of the animation in milliseconds

      \n

    Returns

    Destroys this node ...

    Destroys this node

    \n
    Called when a layout is added to this view. ...

    Called when a layout is added to this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to add a layout. Instead call setParent.

    \n

    Parameters

    • layout : dr.layout

      The layout that was added.

      \n

    Returns

    • void
      \n
    Called when a layout is removed from this view. ...

    Called when a layout is removed from this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to remove a layout. Instead call _removeFromParent.

    \n

    Parameters

    • layout : dr.layout

      The layout that was removed.

      \n

    Returns

    • void
      \n
    Calls doSubviewAdded/doLayoutAdded if the added subnode is a view or\nlayout respectively. ...

    Calls doSubviewAdded/doLayoutAdded if the added subnode is a view or\nlayout respectively. Subclasses should call super.

    \n

    Parameters

    • node : Object

    Overrides: dr.node.doSubnodeAdded

    Calls doSubviewRemoved/doLayoutRemoved if the removed subnode is a view or\nlayout respectively. ...

    Calls doSubviewRemoved/doLayoutRemoved if the removed subnode is a view or\nlayout respectively. Subclasses should call super.

    \n

    Parameters

    • node : Object

    Overrides: dr.node.doSubnodeRemoved

    Called when a subview is added to this view. ...

    Called when a subview is added to this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to add a subview. Instead call setParent.

    \n

    Parameters

    • sv : dr.view

      The subview that was added.

      \n

    Returns

    • void
      \n
    Called when a subview is removed from this view. ...

    Called when a subview is removed from this view. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to remove a subview. Instead call _removeFromParent.

    \n

    Parameters

    • sv : dr.view

      The subview that was removed.

      \n

    Returns

    • void
      \n
    ( name, value ) : Eventablechainable
    Sends an event ...

    Sends an event

    \n

    Parameters

    • name : String

      the name of the event to send

      \n
    • value : Object

      the value to send with the event

      \n

    Returns

    Sets an attribute, calls a setter if there is one, then sends an event with the new value ...

    Sets an attribute, calls a setter if there is one, then sends an event with the new value

    \n

    Parameters

    • name : String

      the name of the attribute to set

      \n
    • value : Object

      the value to set to

      \n

    Returns

    Calls setAttribute for each name/value pair in the attributes object ...

    Calls setAttribute for each name/value pair in the attributes object

    \n

    Parameters

    • attributes : Object

      An object of name/value pairs to be set

      \n

    Returns

    Defined By

    Events

    Fired when a layout is added to this view. ...

    Fired when a layout is added to this view.

    \n

    Parameters

    Fired when a layout is removed from this view. ...

    Fired when a layout is removed from this view.

    \n

    Parameters

    Fired when this view is clicked ...

    Fired when this view is clicked

    \n

    Parameters

    Fired when this node and all its children are about to be destroyed ...

    Fired when this node and all its children are about to be destroyed

    \n

    Parameters

    Fired when this node and all its children are completely initialized ...

    Fired when this node and all its children are completely initialized

    \n

    Parameters

    Fired when this views's layouts array has changed ...

    Fired when this views's layouts array has changed

    \n

    Parameters

    Fired when the mouse goes down on this view ...

    Fired when the mouse goes down on this view

    \n

    Parameters

    Fired when the mouse moves off this view ...

    Fired when the mouse moves off this view

    \n

    Parameters

    Fired when the mouse moves over this view ...

    Fired when the mouse moves over this view

    \n

    Parameters

    Fired when the mouse goes up on this view ...

    Fired when the mouse goes up on this view

    \n

    Parameters

    Fired when this node's subnodes array has changed ...

    Fired when this node's subnodes array has changed

    \n

    Parameters

    Fired when this views's subviews array has changed ...

    Fired when this views's subviews array has changed

    \n

    Parameters

    Fired when a subnode is added to this node. ...

    Fired when a subnode is added to this node.

    \n

    Parameters

    Fired when a subnode is removed from this node. ...

    Fired when a subnode is removed from this node.

    \n

    Parameters

    Fired when a subview is added to this view. ...

    Fired when a subview is added to this view.

    \n

    Parameters

    Fired when a subview is removed from this view. ...

    Fired when a subview is removed from this view.

    \n

    Parameters

    ","meta":{}}); \ No newline at end of file diff --git a/docs/api/output/dr.window.js b/docs/api/output/dr.window.js new file mode 100644 index 00000000..4c3926ae --- /dev/null +++ b/docs/api/output/dr.window.js @@ -0,0 +1 @@ +Ext.data.JsonP.dr_window({"tagname":"class","name":"dr.window","autodetected":{},"files":[{"filename":"layout.js","href":"layout.html#dr-window"}],"extends":"Eventable","members":[{"name":"sendEvent","tagname":"method","owner":"Eventable","id":"method-sendEvent","meta":{"chainable":true}},{"name":"setAttribute","tagname":"method","owner":"Eventable","id":"method-setAttribute","meta":{"chainable":true}},{"name":"setAttributes","tagname":"method","owner":"Eventable","id":"method-setAttributes","meta":{"chainable":true}},{"name":"onheight","tagname":"event","owner":"dr.window","id":"event-onheight","meta":{}},{"name":"onvisible","tagname":"event","owner":"dr.window","id":"event-onvisible","meta":{}},{"name":"onwidth","tagname":"event","owner":"dr.window","id":"event-onwidth","meta":{}}],"alternateClassNames":[],"aliases":{},"id":"class-dr.window","short_doc":"Sends window resize events. ...","component":false,"superclasses":["Module","Eventable"],"subclasses":[],"mixedInto":[],"mixins":[],"parentMixins":[],"requires":[],"uses":[],"html":"

    Hierarchy

    Files

    Sends window resize events. Often used to dynamically reposition views as the window size changes.

    \n\n
    <handler event=\"onwidth\" reference=\"dr.window\" args=\"newWidth\">\n  //adjust views\n</handler>\n\n<handler event=\"onheight\" reference=\"dr.window\" args=\"newHeight\">\n  //adjust views\n</handler>\n
    \n
    Defined By

    Methods

    ( name, value ) : Eventablechainable
    Sends an event ...

    Sends an event

    \n

    Parameters

    • name : String

      the name of the event to send

      \n
    • value : Object

      the value to send with the event

      \n

    Returns

    Sets an attribute, calls a setter if there is one, then sends an event with the new value ...

    Sets an attribute, calls a setter if there is one, then sends an event with the new value

    \n

    Parameters

    • name : String

      the name of the attribute to set

      \n
    • value : Object

      the value to set to

      \n

    Returns

    Calls setAttribute for each name/value pair in the attributes object ...

    Calls setAttribute for each name/value pair in the attributes object

    \n

    Parameters

    • attributes : Object

      An object of name/value pairs to be set

      \n

    Returns

    Defined By

    Events

    dr.window
    view source
    ( height )
    Fired when the window resizes ...

    Fired when the window resizes

    \n

    Parameters

    • height : Number

      The height of the window

      \n
    dr.window
    view source
    ( visible )
    Fired when the window visibility changes ...

    Fired when the window visibility changes

    \n

    Parameters

    • visible : Boolean

      True if the window is currently visible

      \n
    dr.window
    view source
    ( width )
    Fired when the window resizes ...

    Fired when the window resizes

    \n

    Parameters

    • width : Number

      The width of the window

      \n
    ","meta":{}}); \ No newline at end of file diff --git a/docs/api/output/dr.wrappinglayout.js b/docs/api/output/dr.wrappinglayout.js new file mode 100644 index 00000000..f525af99 --- /dev/null +++ b/docs/api/output/dr.wrappinglayout.js @@ -0,0 +1 @@ +Ext.data.JsonP.dr_wrappinglayout({"tagname":"class","name":"dr.wrappinglayout","autodetected":{},"files":[{"filename":"classdocs.js","href":"classdocs.html#dr-wrappinglayout"}],"extends":"dr.variablelayout","members":[{"name":"attribute","tagname":"attribute","owner":"dr.constantlayout","id":"attribute-attribute","meta":{}},{"name":"axis","tagname":"attribute","owner":"dr.wrappinglayout","id":"attribute-axis","meta":{}},{"name":"collapseparent","tagname":"attribute","owner":"dr.variablelayout","id":"attribute-collapseparent","meta":{}},{"name":"id","tagname":"attribute","owner":"dr.node","id":"attribute-id","meta":{}},{"name":"inset","tagname":"attribute","owner":"dr.wrappinglayout","id":"attribute-inset","meta":{}},{"name":"lineinset","tagname":"attribute","owner":"dr.wrappinglayout","id":"attribute-lineinset","meta":{}},{"name":"lineoutset","tagname":"attribute","owner":"dr.wrappinglayout","id":"attribute-lineoutset","meta":{}},{"name":"linespacing","tagname":"attribute","owner":"dr.wrappinglayout","id":"attribute-linespacing","meta":{}},{"name":"name","tagname":"attribute","owner":"dr.node","id":"attribute-name","meta":{}},{"name":"outset","tagname":"attribute","owner":"dr.wrappinglayout","id":"attribute-outset","meta":{}},{"name":"reverse","tagname":"attribute","owner":"dr.variablelayout","id":"attribute-reverse","meta":{}},{"name":"scriptincludes","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludes","meta":{}},{"name":"scriptincludeserror","tagname":"attribute","owner":"dr.node","id":"attribute-scriptincludeserror","meta":{}},{"name":"spacing","tagname":"attribute","owner":"dr.wrappinglayout","id":"attribute-spacing","meta":{}},{"name":"value","tagname":"attribute","owner":"dr.constantlayout","id":"attribute-value","meta":{}},{"name":"inited","tagname":"property","owner":"dr.node","id":"property-inited","meta":{"readonly":true}},{"name":"subnodes","tagname":"property","owner":"dr.node","id":"property-subnodes","meta":{"readonly":true}},{"name":"addSubview","tagname":"method","owner":"dr.layout","id":"method-addSubview","meta":{}},{"name":"canUpdate","tagname":"method","owner":"dr.layout","id":"method-canUpdate","meta":{}},{"name":"destroy","tagname":"method","owner":"dr.node","id":"method-destroy","meta":{}},{"name":"doAfterUpdate","tagname":"method","owner":"dr.variablelayout","id":"method-doAfterUpdate","meta":{}},{"name":"doBeforeUpdate","tagname":"method","owner":"dr.variablelayout","id":"method-doBeforeUpdate","meta":{}},{"name":"doSubnodeAdded","tagname":"method","owner":"dr.node","id":"method-doSubnodeAdded","meta":{}},{"name":"doSubnodeRemoved","tagname":"method","owner":"dr.node","id":"method-doSubnodeRemoved","meta":{}},{"name":"ignore","tagname":"method","owner":"dr.layout","id":"method-ignore","meta":{}},{"name":"removeSubview","tagname":"method","owner":"dr.layout","id":"method-removeSubview","meta":{}},{"name":"sendEvent","tagname":"method","owner":"Eventable","id":"method-sendEvent","meta":{"chainable":true}},{"name":"setAttribute","tagname":"method","owner":"Eventable","id":"method-setAttribute","meta":{"chainable":true}},{"name":"setAttributes","tagname":"method","owner":"Eventable","id":"method-setAttributes","meta":{"chainable":true}},{"name":"skipSubview","tagname":"method","owner":"dr.variablelayout","id":"method-skipSubview","meta":{}},{"name":"startMonitoringAllSubviews","tagname":"method","owner":"dr.layout","id":"method-startMonitoringAllSubviews","meta":{}},{"name":"startMonitoringSubview","tagname":"method","owner":"dr.variablelayout","id":"method-startMonitoringSubview","meta":{}},{"name":"stopMonitoringAllSubviews","tagname":"method","owner":"dr.layout","id":"method-stopMonitoringAllSubviews","meta":{}},{"name":"stopMonitoringSubview","tagname":"method","owner":"dr.variablelayout","id":"method-stopMonitoringSubview","meta":{}},{"name":"update","tagname":"method","owner":"dr.layout","id":"method-update","meta":{}},{"name":"updateParent","tagname":"method","owner":"dr.variablelayout","id":"method-updateParent","meta":{}},{"name":"updateSubview","tagname":"method","owner":"dr.variablelayout","id":"method-updateSubview","meta":{}},{"name":"ondestroy","tagname":"event","owner":"dr.node","id":"event-ondestroy","meta":{}},{"name":"oninit","tagname":"event","owner":"dr.node","id":"event-oninit","meta":{}},{"name":"onsubnodes","tagname":"event","owner":"dr.node","id":"event-onsubnodes","meta":{}},{"name":"subnodeAdded","tagname":"event","owner":"dr.node","id":"event-subnodeAdded","meta":{}},{"name":"subnodeRemoved","tagname":"event","owner":"dr.node","id":"event-subnodeRemoved","meta":{}}],"alternateClassNames":[],"aliases":{},"id":"class-dr.wrappinglayout","short_doc":"An extension of VariableLayout that positions views along an axis using\nan inset, outset and spacing value. ...","component":false,"superclasses":["Module","Eventable","dr.node","dr.layout","dr.constantlayout","dr.variablelayout"],"subclasses":[],"mixedInto":[],"mixins":[],"parentMixins":[],"requires":[],"uses":[],"html":"

    Hierarchy

    Files

    An extension of VariableLayout that positions views along an axis using\nan inset, outset and spacing value. Views will be wrapped when they\noverflow the available space.

    \n\n

    Supported Layout Hints:\n break:string Will force the subview to start a new line/column.

    \n\n
    <wrappinglayout axis=\"y\" spacing=\"2\" inset=\"5\" outset=\"5\" lineinset=\"10\" linespacing=\"5\" lineoutset=\"10\">\n</wrappinglayout>\n\n<view width=\"100\" height=\"25\" bgcolor=\"lightpink\"></view>\n<view width=\"100\" height=\"35\" bgcolor=\"plum\"></view>\n<view width=\"100\" height=\"15\" bgcolor=\"lightblue\"></view>\n
    \n
    Defined By

    Attributes

    The name of the attribute to update on each subview. ...

    The name of the attribute to update on each subview.

    \n

    Defaults to: x

    dr.wrappinglayout
    view source
    : String
    The orientation of the layout. ...

    The orientation of the layout. Supported values are 'x' and 'y'.\nA value of 'x' will orient the views horizontally and a value of 'y'\nwill orient them vertically.

    \n

    Defaults to: 'x'

    If true the updateParent method will be called. ...

    If true the updateParent method will be called. The updateParent method\nwill typically resize the parent to fit the newly layed out child views.

    \n

    Defaults to: false

    Gives this node a global ID, which can be looked up in the global window object. ...

    Gives this node a global ID, which can be looked up in the global window object.\nTake care to not override builtin globals, or override your own instances!

    \n
    dr.wrappinglayout
    view source
    : Number
    Space before the first view. ...

    Space before the first view.

    \n

    Defaults to: 0

    dr.wrappinglayout
    view source
    : Number
    Space before the first line of views. ...

    Space before the first line of views.

    \n

    Defaults to: 0

    dr.wrappinglayout
    view source
    : Number
    Space after the last line of views. ...

    Space after the last line of views. Only used when collapseparent is true.

    \n

    Defaults to: 0

    dr.wrappinglayout
    view source
    : Number
    The spacing between each line of views. ...

    The spacing between each line of views.

    \n

    Defaults to: 0

    Names this node in its parent scope so it can be referred to later.

    \n

    Names this node in its parent scope so it can be referred to later.

    \n
    dr.wrappinglayout
    view source
    : Number
    Space after the last view. ...

    Space after the last view.

    \n

    Defaults to: 0

    If true the layout will position the items in the opposite order. ...

    If true the layout will position the items in the opposite order. For\nexample, right to left instead of left to right.

    \n

    Defaults to: false

    A comma separated list of URLs to javascript includes required as dependencies. ...

    A comma separated list of URLs to javascript includes required as dependencies. Useful if you need to ensure a third party library is available.

    \n

    An error to show if scriptincludes fail to load

    \n

    An error to show if scriptincludes fail to load

    \n
    dr.wrappinglayout
    view source
    : Number
    The spacing between views. ...

    The spacing between views.

    \n

    Defaults to: 0

    The value to set the attribute to. ...

    The value to set the attribute to.

    \n

    Defaults to: 0

    Defined By

    Properties

    : Booleanreadonly

    True when this node and all its children are completely initialized

    \n

    True when this node and all its children are completely initialized

    \n
    An array of this node's child nodes ...

    An array of this node's child nodes

    \n

    Defaults to: []

    Defined By

    Methods

    Adds the provided view to the subviews array of this layout. ...

    Adds the provided view to the subviews array of this layout.

    \n

    Parameters

    • view : dr.view

      The view to add to this layout.

      \n

    Returns

    • void
      \n
    Checks if the layout is locked or not. ...

    Checks if the layout is locked or not. Should be called by the\n\"update\" method of each layout to check if it is OK to do the update.

    \n

    Returns

    • boolean

      true if not locked, false otherwise.

      \n
    Destroys this node ...

    Destroys this node

    \n
    Called by update after any processing is done but before the optional\ncollapsing of parent is done. ...

    Called by update after any processing is done but before the optional\ncollapsing of parent is done. Gives subviews a chance to do any\nspecial teardown after update is processed.

    \n

    Returns

    • void
      \n
    Called by update before any processing is done. ...

    Called by update before any processing is done. Gives subviews a\nchance to do any special setup before update is processed.

    \n

    Returns

    • void
      \n
    Called when a subnode is added to this node. ...

    Called when a subnode is added to this node. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to add a subnode. Instead call setParent.

    \n

    Parameters

    • node : dr.node

      The subnode that was added.

      \n

    Returns

    • void
      \n
    Called when a subnode is removed from this node. ...

    Called when a subnode is removed from this node. Provides a hook for\nsubclasses. No need for subclasses to call super. Do not call this\nmethod to remove a subnode. Instead call _removeFromParent.

    \n

    Parameters

    • node : dr.node

      The subnode that was removed.

      \n

    Returns

    • void
      \n
    ( view ) : boolean
    Checks if a subview can be added to this Layout or not. ...

    Checks if a subview can be added to this Layout or not. The default\nimplementation returns the 'ignorelayout' attributes of the subview.

    \n

    Parameters

    Returns

    • boolean

      True means the subview will be skipped, false otherwise.

      \n
    Removes the provided View from the subviews array of this Layout. ...

    Removes the provided View from the subviews array of this Layout.

    \n

    Parameters

    • view : dr.view

      The view to remove from this layout.

      \n

    Returns

    • number

      the index of the removed subview or -1 if not removed.

      \n
    ( name, value ) : Eventablechainable
    Sends an event ...

    Sends an event

    \n

    Parameters

    • name : String

      the name of the event to send

      \n
    • value : Object

      the value to send with the event

      \n

    Returns

    Sets an attribute, calls a setter if there is one, then sends an event with the new value ...

    Sets an attribute, calls a setter if there is one, then sends an event with the new value

    \n

    Parameters

    • name : String

      the name of the attribute to set

      \n
    • value : Object

      the value to set to

      \n

    Returns

    Calls setAttribute for each name/value pair in the attributes object ...

    Calls setAttribute for each name/value pair in the attributes object

    \n

    Parameters

    • attributes : Object

      An object of name/value pairs to be set

      \n

    Returns

    Called for each subview in the layout to determine if the view should\nbe updated or not. ...

    Called for each subview in the layout to determine if the view should\nbe updated or not. The default implementation returns true if the\nsubview is not visible.

    \n

    Parameters

    • view : dr.view

      The subview to check.

      \n

    Returns

    • Boolean

      True if the subview should be skipped during\n layout updates.

      \n
    Calls startMonitoringSubview for all views. ...

    Calls startMonitoringSubview for all views. Used by layout\nimplementations when a change occurs to the layout that requires\nrefreshing all the subview monitoring.

    \n

    Returns

    • void
      \n
    Provides a default implementation that calls update when the\nvisibility of a subview changes. ...

    Provides a default implementation that calls update when the\nvisibility of a subview changes.

    \n

    Parameters

    Overrides: dr.layout.startMonitoringSubview

    Calls stopMonitoringSubview for all views. ...

    Calls stopMonitoringSubview for all views. Used by Layout\nimplementations when a change occurs to the layout that requires\nrefreshing all the subview monitoring.

    \n

    Returns

    • void
      \n
    Provides a default implementation that calls update when the\nvisibility of a subview changes. ...

    Provides a default implementation that calls update when the\nvisibility of a subview changes.

    \n

    Parameters

    Overrides: dr.layout.stopMonitoringSubview

    Updates the layout. ...

    Updates the layout. Subclasses should call canUpdate to check lock state\nbefore doing anything.

    \n

    Returns

    • void
      \n
    ( attribute, value ) : void
    Called if the collapseparent attribute is true. ...

    Called if the collapseparent attribute is true. Subclasses should\nimplement this if they want to modify the parent view.

    \n

    Parameters

    • attribute : String

      The name of the attribute to update.

      \n
    • value : *

      The value to set on the parent.

      \n

    Returns

    • void
      \n
    ( count, view, attribute, value ) : *
    Called for each subview in the layout. ...

    Called for each subview in the layout.

    \n

    Parameters

    • count : Number

      The number of subviews that have been layed out\n including the current one. i.e. count will be 1 for the first\n subview layed out.

      \n
    • view : dr.view

      The subview being layed out.

      \n
    • attribute : String

      The name of the attribute to update.

      \n
    • value : *

      The value to set on the subview.

      \n

    Returns

    • *

      The value to use for the next subview.

      \n
    Defined By

    Events

    Fired when this node and all its children are about to be destroyed ...

    Fired when this node and all its children are about to be destroyed

    \n

    Parameters

    Fired when this node and all its children are completely initialized ...

    Fired when this node and all its children are completely initialized

    \n

    Parameters

    Fired when this node's subnodes array has changed ...

    Fired when this node's subnodes array has changed

    \n

    Parameters

    Fired when a subnode is added to this node. ...

    Fired when a subnode is added to this node.

    \n

    Parameters

    Fired when a subnode is removed from this node. ...

    Fired when a subnode is removed from this node.

    \n

    Parameters

    ","meta":{}}); \ No newline at end of file diff --git a/docs/api/resources/css/app-4689d2a5522dcd3c9e9923ca59c33f27.css b/docs/api/resources/css/app-4689d2a5522dcd3c9e9923ca59c33f27.css new file mode 100644 index 00000000..7634c378 --- /dev/null +++ b/docs/api/resources/css/app-4689d2a5522dcd3c9e9923ca59c33f27.css @@ -0,0 +1 @@ +html,body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0}table{border-collapse:collapse;border-spacing:0}fieldset,img{border:0}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal}li{list-style:none}caption,th{text-align:left}h1,h2,h3,h4,h5,h6{font-size:100%}q:before,q:after{content:""}abbr,acronym{border:0;font-variant:normal}sup{vertical-align:text-top}sub{vertical-align:text-bottom}input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit}*:focus{outline:0}.x-border-box,.x-border-box *{box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;-webkit-box-sizing:border-box}.x-body{color:black;font-size:12px;font-family:Helvetica Neue,Arial,sans-serif}.x-rtl{direction:rtl}.x-ltr{direction:ltr}.x-clear{overflow:hidden;clear:both;font-size:0;line-height:0;display:table}.x-strict .x-ie7 .x-clear{height:0;width:0}.x-layer{position:absolute!important;overflow:hidden;zoom:1}.x-shim{position:absolute;left:0;top:0;overflow:hidden;filter:alpha(opacity=0);opacity:0}.x-hide-display{display:none!important}.x-hide-visibility{visibility:hidden!important}.x-item-disabled .x-form-item-label,.x-item-disabled .x-form-field,.x-item-disabled .x-form-cb-label,.x-item-disabled .x-form-trigger{filter:alpha(opacity=30);opacity:.3}.x-ie6 .x-item-disabled{filter:none}.x-hidden,.x-hide-offsets{display:block!important;visibility:hidden!important;position:absolute!important;left:-10000px!important;top:-10000px!important}.x-hide-nosize{height:0!important;width:0!important}.x-masked-relative{position:relative}.x-ie6 .x-masked select,.x-ie6.x-body-masked select{visibility:hidden!important}.x-css-shadow{position:absolute;-webkit-border-radius:5px 5px;-moz-border-radius:5px 5px;-ms-border-radius:5px 5px;-o-border-radius:5px 5px;border-radius:5px 5px}.x-ie-shadow{background-color:#777;display:none;position:absolute;overflow:hidden;zoom:1}.x-box-tl{background:transparent no-repeat 0 0;zoom:1}.x-box-tc{height:8px;background:transparent repeat-x 0 0;overflow:hidden}.x-box-tr{background:transparent no-repeat right -8px}.x-box-ml{background:transparent repeat-y 0;padding-left:4px;overflow:hidden;zoom:1}.x-box-mc{background:repeat-x 0 -16px;padding:4px 10px}.x-box-mc h3{margin:0 0 4px 0;zoom:1}.x-box-mr{background:transparent repeat-y right;padding-right:4px;overflow:hidden}.x-box-bl{background:transparent no-repeat 0 -16px;zoom:1}.x-box-bc{background:transparent repeat-x 0 -8px;height:8px;overflow:hidden}.x-box-br{background:transparent no-repeat right -24px}.x-box-tl,.x-box-bl{padding-left:8px;overflow:hidden}.x-box-tr,.x-box-br{padding-right:8px;overflow:hidden}.x-box-tl{background-image:url('../../extjs/resources/themes/images/default/box/corners.gif')}.x-box-tc{background-image:url('../../extjs/resources/themes/images/default/box/tb.gif')}.x-box-tr{background-image:url('../../extjs/resources/themes/images/default/box/corners.gif')}.x-box-ml{background-image:url('../../extjs/resources/themes/images/default/box/l.gif')}.x-box-mc{background-color:#eee;background-image:url('../../extjs/resources/themes/images/default/box/tb.gif');font-family:"Myriad Pro","Myriad Web","Tahoma","Helvetica","Arial",sans-serif;color:#393939;font-size:15px}.x-box-mc h3{font-size:18px;font-weight:bold}.x-box-mr{background-image:url('../../extjs/resources/themes/images/default/box/r.gif')}.x-box-bl{background-image:url('../../extjs/resources/themes/images/default/box/corners.gif')}.x-box-bc{background-image:url('../../extjs/resources/themes/images/default/box/tb.gif')}.x-box-br{background-image:url('../../extjs/resources/themes/images/default/box/corners.gif')}.x-box-blue .x-box-bl,.x-box-blue .x-box-br,.x-box-blue .x-box-tl,.x-box-blue .x-box-tr{background-image:url('../../extjs/resources/themes/images/default/box/corners-blue.gif')}.x-box-blue .x-box-bc,.x-box-blue .x-box-mc,.x-box-blue .x-box-tc{background-image:url('../../extjs/resources/themes/images/default/box/tb-blue.gif')}.x-box-blue .x-box-mc{background-color:#c3daf9}.x-box-blue .x-box-mc h3{color:#17385b}.x-box-blue .x-box-ml{background-image:url('../../extjs/resources/themes/images/default/box/l-blue.gif')}.x-box-blue .x-box-mr{background-image:url('../../extjs/resources/themes/images/default/box/r-blue.gif')}.x-container{zoom:1}.x-container:before{content:"";clear:both;display:table}table.x-container:before,tbody.x-container:before,tr.x-container:before{display:none}.x-focus-element{position:absolute;top:-10px;left:-10px;width:0;height:0}.x-focus-frame{position:absolute;left:0;top:0;z-index:100000000;width:0;height:0}.x-focus-frame-top,.x-focus-frame-bottom,.x-focus-frame-left,.x-focus-frame-right{position:absolute;top:0;left:0}.x-focus-frame-top,.x-focus-frame-bottom{border-top:solid 2px #15428b;height:2px}.x-focus-frame-left,.x-focus-frame-right{border-left:solid 2px #15428b;width:2px}.x-mask{z-index:100;position:absolute;top:0;left:0;filter:alpha(opacity=50);opacity:.5;width:100%;height:100%;zoom:1;background:#ccc}.x-mask-msg{z-index:20001;position:absolute;top:0;left:0;padding:2px;border:1px solid;border-color:#bfbfbf;background:#fdfdfd}.x-mask-msg div{padding:5px 10px 5px 25px;background-image:url('../../extjs/resources/themes/images/default/grid/loading.gif');background-repeat:no-repeat;background-position:5px center;cursor:wait;border:1px solid #d0d0d0;background-color:#eee;color:#222;font:normal 11px Helvetica Neue,Arial,sans-serif}.x-boundlist{border-width:1px;border-style:solid;border-color:#e2cfcf;background:white}.x-boundlist .x-toolbar{border-width:1px 0 0 0}.x-strict .x-ie6 .x-boundlist-list-ct,.x-strict .x-ie7 .x-boundlist-list-ct{position:relative}.x-boundlist-item{padding:2px;user-select:none;-o-user-select:none;-ms-user-select:none;-moz-user-select:-moz-none;-webkit-user-select:none;cursor:default;cursor:pointer;cursor:hand;position:relative;border-width:1px;border-style:dotted;border-color:white}.x-boundlist-selected{background:#f0f0f0;border-color:#cfc9c9}.x-boundlist-item-over{background:#fdfdfd;border-color:#dbd7d6}.x-boundlist-floating{border-top-width:0}.x-boundlist-above{border-top-width:1px;border-bottom-width:1px}.x-btn{display:inline-block;zoom:1;*display:inline;position:relative;cursor:pointer;cursor:hand;white-space:nowrap;vertical-align:middle;background-repeat:no-repeat}.x-btn *{cursor:pointer;cursor:hand}.x-btn em{background-repeat:no-repeat}.x-btn em a{text-decoration:none;display:block;color:inherit;width:100%;zoom:1}.x-btn button{width:100%;display:block;margin:0;padding:0;border:0;background:0;outline:0 none;overflow:hidden;vertical-align:bottom;-webkit-appearance:none}.x-btn button::-moz-focus-inner{border:0;padding:0}.x-btn .x-btn-inner{display:block;white-space:nowrap;background-color:transparent;background-repeat:no-repeat;background-position:left center;overflow:hidden}.x-btn .x-btn-left .x-btn-inner{text-align:left}.x-btn .x-btn-center .x-btn-inner{text-align:center}.x-btn .x-btn-right .x-btn-inner{text-align:right}.x-btn-disabled span{filter:alpha(opacity=50);opacity:.5}.x-ie6 .x-btn-disabled span,.x-ie7 .x-btn-disabled span{filter:none}.x-ie7 .x-btn-disabled,.x-ie8 .x-btn-disabled{filter:none}.x-ie6 .x-btn-disabled .x-btn-icon,.x-ie7 .x-btn-disabled .x-btn-icon,.x-ie8 .x-btn-disabled .x-btn-icon{filter:alpha(opacity=60);opacity:.6}.x-ie9 .x-btn button{overflow:visible!important}* html .x-ie .x-btn button{width:1px}.x-ie .x-btn button{overflow-x:visible;vertical-align:baseline}.x-strict .x-ie6 .x-btn .x-frame-mc,.x-strict .x-ie7 .x-btn .x-frame-mc{height:100%}.x-btn .x-frame-mc{vertical-align:middle;white-space:nowrap;cursor:pointer}.x-btn-noicon .x-frame-mc{text-align:center}.x-btn-icon-text-left .x-btn-icon{background-position:left center}.x-btn-icon-text-right .x-btn-icon{background-position:right center}.x-btn-icon-text-top .x-btn-icon{background-position:center top}.x-btn-icon-text-bottom .x-btn-icon{background-position:center bottom}.x-btn button,.x-btn a{position:relative}.x-btn button .x-btn-icon,.x-btn a .x-btn-icon{position:absolute;background-repeat:no-repeat}.x-btn-arrow-right{background:transparent no-repeat right center;padding-right:12px}.x-btn-arrow-right .x-btn-inner{padding-right:0!important}.x-toolbar .x-btn-arrow-right{padding-right:12px}.x-btn-arrow-bottom{background:transparent no-repeat center bottom;padding-bottom:12px}.x-btn-arrow{background-image:url('../../extjs/resources/themes/images/default/button/arrow.gif');display:block}.x-btn-split-right,.x-btn-over .x-btn-split-right{background:transparent no-repeat right center;background-image:url('../../extjs/resources/themes/images/default/button/s-arrow.gif');padding-right:14px!important}.x-btn-split-bottom,.x-btn-over .x-btn-split-bottom{background:transparent no-repeat center bottom;background-image:url('../../extjs/resources/themes/images/default/button/s-arrow-b.gif');padding-bottom:14px}.x-toolbar .x-btn-split-right{background-image:url('../../extjs/resources/themes/images/default/button/s-arrow-noline.gif');padding-right:12px!important}.x-toolbar .x-btn-split-bottom{background-image:url('../../extjs/resources/themes/images/default/button/s-arrow-b-noline.gif')}.x-btn-split{display:block}.x-item-disabled,.x-item-disabled *{cursor:default}.x-cycle-fixed-width .x-btn-inner{text-align:inherit}.x-btn-over .x-btn-split-right{background-image:url('../../extjs/resources/themes/images/default/button/s-arrow-o.gif')}.x-btn-over .x-btn-split-bottom{background-image:url('../../extjs/resources/themes/images/default/button/s-arrow-bo.gif')}.x-btn-default-small{border-color:#d1d1d1}.x-btn-default-small{-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px;padding:2px 2px 2px 2px;border-width:1px;border-style:solid;background-image:none;background-color:white;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,#fff),color-stop(48%,#f9f9f9),color-stop(52%,#e2e2e2),color-stop(100%,#e7e7e7));background-image:-webkit-linear-gradient(top,#fff,#f9f9f9 48%,#e2e2e2 52%,#e7e7e7);background-image:-moz-linear-gradient(top,#fff,#f9f9f9 48%,#e2e2e2 52%,#e7e7e7);background-image:-o-linear-gradient(top,#fff,#f9f9f9 48%,#e2e2e2 52%,#e7e7e7);background-image:linear-gradient(top,#fff,#f9f9f9 48%,#e2e2e2 52%,#e7e7e7)}.x-nlg .x-btn-default-small-mc{background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-small-bg.gif');background-color:white}.x-nbr .x-btn-default-small{padding:0!important;border-width:0!important;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0;background-color:transparent;background-position:1100303px 1000303px}.x-nbr .x-btn-default-small-tl,.x-nbr .x-btn-default-small-bl,.x-nbr .x-btn-default-small-tr,.x-nbr .x-btn-default-small-br,.x-nbr .x-btn-default-small-tc,.x-nbr .x-btn-default-small-bc,.x-nbr .x-btn-default-small-ml,.x-nbr .x-btn-default-small-mr{zoom:1;background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-small-corners.gif')}.x-nbr .x-btn-default-small-ml,.x-nbr .x-btn-default-small-mr{zoom:1;background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-small-sides.gif');background-position:0 0}.x-nbr .x-btn-default-small-mc{padding:0}.x-strict .x-ie7 .x-btn-default-small-tl,.x-strict .x-ie7 .x-btn-default-small-bl{position:relative;right:0}.x-btn-default-small .x-btn-inner{font-size:11px;font-weight:normal;font-family:Helvetica Neue,Arial,sans-serif;color:#333;background-repeat:no-repeat;padding:0 4px}.x-btn-default-small-icon button,.x-btn-default-small-icon a,.x-btn-default-small-icon .x-btn-inner,.x-btn-default-small-noicon button,.x-btn-default-small-noicon a,.x-btn-default-small-noicon .x-btn-inner{height:16px;line-height:16px}.x-btn-default-small-icon button,.x-btn-default-small-icon a{padding:0}.x-btn-default-small-icon .x-btn-inner{width:16px;padding:0}.x-btn-default-small-icon .x-btn-icon{width:16px;height:16px;top:0;left:0;bottom:0;right:0}.x-btn-default-small-icon-text-left button,.x-btn-default-small-icon-text-left a{height:16px}.x-btn-default-small-icon-text-left .x-btn-inner{height:16px;line-height:16px;padding-left:20px}.x-btn-default-small-icon-text-left .x-btn-icon{width:16px;height:auto;top:0;left:0;bottom:0;right:auto}.x-ie6 .x-btn-default-small-icon-text-left .x-btn-icon,.x-quirks .x-btn-default-small-icon-text-left .x-btn-icon{height:16px}.x-btn-default-small-icon-text-right button,.x-btn-default-small-icon-text-right a{height:16px}.x-btn-default-small-icon-text-right .x-btn-inner{height:16px;line-height:16px;padding-right:20px!important}.x-btn-default-small-icon-text-right .x-btn-icon{width:16px;height:auto;top:0;left:auto;bottom:0;right:0}.x-ie6 .x-btn-default-small-icon-text-right .x-btn-icon,.x-quirks .x-btn-default-small-icon-text-right .x-btn-icon{height:16px}.x-btn-default-small-icon-text-top .x-btn-inner{padding-top:20px}.x-btn-default-small-icon-text-top .x-btn-icon{width:auto;height:16px;top:0;left:0;bottom:auto;right:0}.x-ie6 .x-btn-default-small-icon-text-top .x-btn-icon,.x-quirks .x-ie .x-btn-default-small-icon-text-top .x-btn-icon{width:16px}.x-btn-default-small-icon-text-bottom .x-btn-inner{padding-bottom:20px}.x-btn-default-small-icon-text-bottom .x-btn-icon{width:auto;height:16px;top:auto;left:0;bottom:0;right:0}.x-ie6 .x-btn-default-small-icon-text-bottom .x-btn-icon,.x-quirks .x-ie .x-btn-default-small-icon-text-bottom .x-btn-icon{width:16px}.x-btn-default-small-over{border-color:#e4dad9;background-image:none;background-color:white;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,#fff),color-stop(48%,#fcf7f7),color-stop(52%,#eae5e5),color-stop(100%,#efe8e8));background-image:-webkit-linear-gradient(top,#fff,#fcf7f7 48%,#eae5e5 52%,#efe8e8);background-image:-moz-linear-gradient(top,#fff,#fcf7f7 48%,#eae5e5 52%,#efe8e8);background-image:-o-linear-gradient(top,#fff,#fcf7f7 48%,#eae5e5 52%,#efe8e8);background-image:linear-gradient(top,#fff,#fcf7f7 48%,#eae5e5 52%,#efe8e8)}.x-btn-default-small-focus{border-color:#e4dad9;background-image:none;background-color:white;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,#fff),color-stop(48%,#fcf7f7),color-stop(52%,#eae5e5),color-stop(100%,#efe8e8));background-image:-webkit-linear-gradient(top,#fff,#fcf7f7 48%,#eae5e5 52%,#efe8e8);background-image:-moz-linear-gradient(top,#fff,#fcf7f7 48%,#eae5e5 52%,#efe8e8);background-image:-o-linear-gradient(top,#fff,#fcf7f7 48%,#eae5e5 52%,#efe8e8);background-image:linear-gradient(top,#fff,#fcf7f7 48%,#eae5e5 52%,#efe8e8)}.x-btn-default-small-menu-active,.x-btn-default-small-pressed{border-color:#d5cfcf;background-image:none;background-color:#e0e0e0;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,#e0e0e0),color-stop(48%,#e5e5e5),color-stop(52%,#e4c3c5),color-stop(100%,#e7cbcc));background-image:-webkit-linear-gradient(top,#e0e0e0,#e5e5e5 48%,#e4c3c5 52%,#e7cbcc);background-image:-moz-linear-gradient(top,#e0e0e0,#e5e5e5 48%,#e4c3c5 52%,#e7cbcc);background-image:-o-linear-gradient(top,#e0e0e0,#e5e5e5 48%,#e4c3c5 52%,#e7cbcc);background-image:linear-gradient(top,#e0e0e0,#e5e5e5 48%,#e4c3c5 52%,#e7cbcc)}.x-btn-default-small-disabled{border-color:#e9e9e9;background-image:none;background-color:white;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,#fff),color-stop(48%,#f9f9f9),color-stop(52%,#e2e2e2),color-stop(100%,#e7e7e7));background-image:-webkit-linear-gradient(top,#fff,#f9f9f9 48%,#e2e2e2 52%,#e7e7e7);background-image:-moz-linear-gradient(top,#fff,#f9f9f9 48%,#e2e2e2 52%,#e7e7e7);background-image:-o-linear-gradient(top,#fff,#f9f9f9 48%,#e2e2e2 52%,#e7e7e7);background-image:linear-gradient(top,#fff,#f9f9f9 48%,#e2e2e2 52%,#e7e7e7)}.x-btn-default-small-disabled .x-btn-inner{color:#333!important}.x-ie .x-btn-default-small-disabled .x-btn-inner{color:#595959!important}.x-ie6 .x-btn-default-small-disabled .x-btn-inner{color:#8c8c8c!important}.x-nbr .x-btn-default-small-over .x-frame-tl,.x-nbr .x-btn-default-small-over .x-frame-bl,.x-nbr .x-btn-default-small-over .x-frame-tr,.x-nbr .x-btn-default-small-over .x-frame-br,.x-nbr .x-btn-default-small-over .x-frame-tc,.x-nbr .x-btn-default-small-over .x-frame-bc{background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-small-over-corners.gif')}.x-nbr .x-btn-default-small-over .x-frame-ml,.x-nbr .x-btn-default-small-over .x-frame-mr{background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-small-over-sides.gif')}.x-nbr .x-btn-default-small-over .x-frame-mc{background-color:white;background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-small-over-bg.gif')}.x-nbr .x-btn-default-small-focus .x-frame-tl,.x-nbr .x-btn-default-small-focus .x-frame-bl,.x-nbr .x-btn-default-small-focus .x-frame-tr,.x-nbr .x-btn-default-small-focus .x-frame-br,.x-nbr .x-btn-default-small-focus .x-frame-tc,.x-nbr .x-btn-default-small-focus .x-frame-bc{background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-small-focus-corners.gif')}.x-nbr .x-btn-default-small-focus .x-frame-ml,.x-nbr .x-btn-default-small-focus .x-frame-mr{background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-small-focus-sides.gif')}.x-nbr .x-btn-default-small-focus .x-frame-mc{background-color:white;background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-small-focus-bg.gif')}.x-nbr .x-btn-default-small-menu-active .x-frame-tl,.x-nbr .x-btn-default-small-menu-active .x-frame-bl,.x-nbr .x-btn-default-small-menu-active .x-frame-tr,.x-nbr .x-btn-default-small-menu-active .x-frame-br,.x-nbr .x-btn-default-small-menu-active .x-frame-tc,.x-nbr .x-btn-default-small-menu-active .x-frame-bc,.x-nbr .x-btn-default-small-pressed .x-frame-tl,.x-nbr .x-btn-default-small-pressed .x-frame-bl,.x-nbr .x-btn-default-small-pressed .x-frame-tr,.x-nbr .x-btn-default-small-pressed .x-frame-br,.x-nbr .x-btn-default-small-pressed .x-frame-tc,.x-nbr .x-btn-default-small-pressed .x-frame-bc{background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-small-pressed-corners.gif')}.x-nbr .x-btn-default-small-menu-active .x-frame-ml,.x-nbr .x-btn-default-small-menu-active .x-frame-mr,.x-nbr .x-btn-default-small-pressed .x-frame-ml,.x-nbr .x-btn-default-small-pressed .x-frame-mr{background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-small-pressed-sides.gif')}.x-nbr .x-btn-default-small-menu-active .x-frame-mc,.x-nbr .x-btn-default-small-pressed .x-frame-mc{background-color:#e0e0e0;background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-small-pressed-bg.gif')}.x-nbr .x-btn-default-small-disabled .x-frame-tl,.x-nbr .x-btn-default-small-disabled .x-frame-bl,.x-nbr .x-btn-default-small-disabled .x-frame-tr,.x-nbr .x-btn-default-small-disabled .x-frame-br,.x-nbr .x-btn-default-small-disabled .x-frame-tc,.x-nbr .x-btn-default-small-disabled .x-frame-bc{background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-small-disabled-corners.gif')}.x-nbr .x-btn-default-small-disabled .x-frame-ml,.x-nbr .x-btn-default-small-disabled .x-frame-mr{background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-small-disabled-sides.gif')}.x-nbr .x-btn-default-small-disabled .x-frame-mc{background-color:white;background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-small-disabled-bg.gif')}.x-nlg .x-btn-default-small{background-repeat:repeat-x;background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-small-bg.gif')}.x-nlg .x-btn-default-small-over{background-repeat:repeat-x;background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-small-over-bg.gif')}.x-nlg .x-btn-default-small-focus{background-repeat:repeat-x;background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-small-focus-bg.gif')}.x-nlg .x-btn-default-small-menu-active,.x-nlg .x-btn-default-small-pressed{background-repeat:repeat-x;background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-small-pressed-bg.gif')}.x-nlg .x-btn-default-small-disabled{background-repeat:repeat-x;background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-small-disabled-bg.gif')}.x-btn-default-medium{border-color:#d1d1d1}.x-btn-default-medium{-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px;padding:3px 3px 3px 3px;border-width:1px;border-style:solid;background-image:none;background-color:white;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,#fff),color-stop(48%,#f9f9f9),color-stop(52%,#e2e2e2),color-stop(100%,#e7e7e7));background-image:-webkit-linear-gradient(top,#fff,#f9f9f9 48%,#e2e2e2 52%,#e7e7e7);background-image:-moz-linear-gradient(top,#fff,#f9f9f9 48%,#e2e2e2 52%,#e7e7e7);background-image:-o-linear-gradient(top,#fff,#f9f9f9 48%,#e2e2e2 52%,#e7e7e7);background-image:linear-gradient(top,#fff,#f9f9f9 48%,#e2e2e2 52%,#e7e7e7)}.x-nlg .x-btn-default-medium-mc{background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-medium-bg.gif');background-color:white}.x-nbr .x-btn-default-medium{padding:0!important;border-width:0!important;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0;background-color:transparent;background-position:1100303px 1000303px}.x-nbr .x-btn-default-medium-tl,.x-nbr .x-btn-default-medium-bl,.x-nbr .x-btn-default-medium-tr,.x-nbr .x-btn-default-medium-br,.x-nbr .x-btn-default-medium-tc,.x-nbr .x-btn-default-medium-bc,.x-nbr .x-btn-default-medium-ml,.x-nbr .x-btn-default-medium-mr{zoom:1;background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-medium-corners.gif')}.x-nbr .x-btn-default-medium-ml,.x-nbr .x-btn-default-medium-mr{zoom:1;background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-medium-sides.gif');background-position:0 0}.x-nbr .x-btn-default-medium-mc{padding:1px 1px 1px 1px}.x-strict .x-ie7 .x-btn-default-medium-tl,.x-strict .x-ie7 .x-btn-default-medium-bl{position:relative;right:0}.x-btn-default-medium .x-btn-inner{font-size:11px;font-weight:normal;font-family:Helvetica Neue,Arial,sans-serif;color:#333;background-repeat:no-repeat;padding:0 3px}.x-btn-default-medium-icon button,.x-btn-default-medium-icon a,.x-btn-default-medium-icon .x-btn-inner,.x-btn-default-medium-noicon button,.x-btn-default-medium-noicon a,.x-btn-default-medium-noicon .x-btn-inner{height:24px;line-height:24px}.x-btn-default-medium-icon button,.x-btn-default-medium-icon a{padding:0}.x-btn-default-medium-icon .x-btn-inner{width:24px;padding:0}.x-btn-default-medium-icon .x-btn-icon{width:24px;height:24px;top:0;left:0;bottom:0;right:0}.x-btn-default-medium-icon-text-left button,.x-btn-default-medium-icon-text-left a{height:24px}.x-btn-default-medium-icon-text-left .x-btn-inner{height:24px;line-height:24px;padding-left:28px}.x-btn-default-medium-icon-text-left .x-btn-icon{width:24px;height:auto;top:0;left:0;bottom:0;right:auto}.x-ie6 .x-btn-default-medium-icon-text-left .x-btn-icon,.x-quirks .x-btn-default-medium-icon-text-left .x-btn-icon{height:24px}.x-btn-default-medium-icon-text-right button,.x-btn-default-medium-icon-text-right a{height:24px}.x-btn-default-medium-icon-text-right .x-btn-inner{height:24px;line-height:24px;padding-right:28px!important}.x-btn-default-medium-icon-text-right .x-btn-icon{width:24px;height:auto;top:0;left:auto;bottom:0;right:0}.x-ie6 .x-btn-default-medium-icon-text-right .x-btn-icon,.x-quirks .x-btn-default-medium-icon-text-right .x-btn-icon{height:24px}.x-btn-default-medium-icon-text-top .x-btn-inner{padding-top:28px}.x-btn-default-medium-icon-text-top .x-btn-icon{width:auto;height:24px;top:0;left:0;bottom:auto;right:0}.x-ie6 .x-btn-default-medium-icon-text-top .x-btn-icon,.x-quirks .x-ie .x-btn-default-medium-icon-text-top .x-btn-icon{width:24px}.x-btn-default-medium-icon-text-bottom .x-btn-inner{padding-bottom:28px}.x-btn-default-medium-icon-text-bottom .x-btn-icon{width:auto;height:24px;top:auto;left:0;bottom:0;right:0}.x-ie6 .x-btn-default-medium-icon-text-bottom .x-btn-icon,.x-quirks .x-ie .x-btn-default-medium-icon-text-bottom .x-btn-icon{width:24px}.x-btn-default-medium-over{border-color:#e4dad9;background-image:none;background-color:white;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,#fff),color-stop(48%,#fcf7f7),color-stop(52%,#eae5e5),color-stop(100%,#efe8e8));background-image:-webkit-linear-gradient(top,#fff,#fcf7f7 48%,#eae5e5 52%,#efe8e8);background-image:-moz-linear-gradient(top,#fff,#fcf7f7 48%,#eae5e5 52%,#efe8e8);background-image:-o-linear-gradient(top,#fff,#fcf7f7 48%,#eae5e5 52%,#efe8e8);background-image:linear-gradient(top,#fff,#fcf7f7 48%,#eae5e5 52%,#efe8e8)}.x-btn-default-medium-focus{border-color:#e4dad9;background-image:none;background-color:white;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,#fff),color-stop(48%,#fcf7f7),color-stop(52%,#eae5e5),color-stop(100%,#efe8e8));background-image:-webkit-linear-gradient(top,#fff,#fcf7f7 48%,#eae5e5 52%,#efe8e8);background-image:-moz-linear-gradient(top,#fff,#fcf7f7 48%,#eae5e5 52%,#efe8e8);background-image:-o-linear-gradient(top,#fff,#fcf7f7 48%,#eae5e5 52%,#efe8e8);background-image:linear-gradient(top,#fff,#fcf7f7 48%,#eae5e5 52%,#efe8e8)}.x-btn-default-medium-menu-active,.x-btn-default-medium-pressed{border-color:#d5cfcf;background-image:none;background-color:#e0e0e0;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,#e0e0e0),color-stop(48%,#e5e5e5),color-stop(52%,#e4c3c5),color-stop(100%,#e7cbcc));background-image:-webkit-linear-gradient(top,#e0e0e0,#e5e5e5 48%,#e4c3c5 52%,#e7cbcc);background-image:-moz-linear-gradient(top,#e0e0e0,#e5e5e5 48%,#e4c3c5 52%,#e7cbcc);background-image:-o-linear-gradient(top,#e0e0e0,#e5e5e5 48%,#e4c3c5 52%,#e7cbcc);background-image:linear-gradient(top,#e0e0e0,#e5e5e5 48%,#e4c3c5 52%,#e7cbcc)}.x-btn-default-medium-disabled{border-color:#e9e9e9;background-image:none;background-color:white;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,#fff),color-stop(48%,#f9f9f9),color-stop(52%,#e2e2e2),color-stop(100%,#e7e7e7));background-image:-webkit-linear-gradient(top,#fff,#f9f9f9 48%,#e2e2e2 52%,#e7e7e7);background-image:-moz-linear-gradient(top,#fff,#f9f9f9 48%,#e2e2e2 52%,#e7e7e7);background-image:-o-linear-gradient(top,#fff,#f9f9f9 48%,#e2e2e2 52%,#e7e7e7);background-image:linear-gradient(top,#fff,#f9f9f9 48%,#e2e2e2 52%,#e7e7e7)}.x-btn-default-medium-disabled .x-btn-inner{color:#333!important}.x-ie .x-btn-default-medium-disabled .x-btn-inner{color:#595959!important}.x-ie6 .x-btn-default-medium-disabled .x-btn-inner{color:#8c8c8c!important}.x-nbr .x-btn-default-medium-over .x-frame-tl,.x-nbr .x-btn-default-medium-over .x-frame-bl,.x-nbr .x-btn-default-medium-over .x-frame-tr,.x-nbr .x-btn-default-medium-over .x-frame-br,.x-nbr .x-btn-default-medium-over .x-frame-tc,.x-nbr .x-btn-default-medium-over .x-frame-bc{background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-medium-over-corners.gif')}.x-nbr .x-btn-default-medium-over .x-frame-ml,.x-nbr .x-btn-default-medium-over .x-frame-mr{background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-medium-over-sides.gif')}.x-nbr .x-btn-default-medium-over .x-frame-mc{background-color:white;background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-medium-over-bg.gif')}.x-nbr .x-btn-default-medium-focus .x-frame-tl,.x-nbr .x-btn-default-medium-focus .x-frame-bl,.x-nbr .x-btn-default-medium-focus .x-frame-tr,.x-nbr .x-btn-default-medium-focus .x-frame-br,.x-nbr .x-btn-default-medium-focus .x-frame-tc,.x-nbr .x-btn-default-medium-focus .x-frame-bc{background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-medium-focus-corners.gif')}.x-nbr .x-btn-default-medium-focus .x-frame-ml,.x-nbr .x-btn-default-medium-focus .x-frame-mr{background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-medium-focus-sides.gif')}.x-nbr .x-btn-default-medium-focus .x-frame-mc{background-color:white;background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-medium-focus-bg.gif')}.x-nbr .x-btn-default-medium-menu-active .x-frame-tl,.x-nbr .x-btn-default-medium-menu-active .x-frame-bl,.x-nbr .x-btn-default-medium-menu-active .x-frame-tr,.x-nbr .x-btn-default-medium-menu-active .x-frame-br,.x-nbr .x-btn-default-medium-menu-active .x-frame-tc,.x-nbr .x-btn-default-medium-menu-active .x-frame-bc,.x-nbr .x-btn-default-medium-pressed .x-frame-tl,.x-nbr .x-btn-default-medium-pressed .x-frame-bl,.x-nbr .x-btn-default-medium-pressed .x-frame-tr,.x-nbr .x-btn-default-medium-pressed .x-frame-br,.x-nbr .x-btn-default-medium-pressed .x-frame-tc,.x-nbr .x-btn-default-medium-pressed .x-frame-bc{background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-medium-pressed-corners.gif')}.x-nbr .x-btn-default-medium-menu-active .x-frame-ml,.x-nbr .x-btn-default-medium-menu-active .x-frame-mr,.x-nbr .x-btn-default-medium-pressed .x-frame-ml,.x-nbr .x-btn-default-medium-pressed .x-frame-mr{background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-medium-pressed-sides.gif')}.x-nbr .x-btn-default-medium-menu-active .x-frame-mc,.x-nbr .x-btn-default-medium-pressed .x-frame-mc{background-color:#e0e0e0;background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-medium-pressed-bg.gif')}.x-nbr .x-btn-default-medium-disabled .x-frame-tl,.x-nbr .x-btn-default-medium-disabled .x-frame-bl,.x-nbr .x-btn-default-medium-disabled .x-frame-tr,.x-nbr .x-btn-default-medium-disabled .x-frame-br,.x-nbr .x-btn-default-medium-disabled .x-frame-tc,.x-nbr .x-btn-default-medium-disabled .x-frame-bc{background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-medium-disabled-corners.gif')}.x-nbr .x-btn-default-medium-disabled .x-frame-ml,.x-nbr .x-btn-default-medium-disabled .x-frame-mr{background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-medium-disabled-sides.gif')}.x-nbr .x-btn-default-medium-disabled .x-frame-mc{background-color:white;background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-medium-disabled-bg.gif')}.x-nlg .x-btn-default-medium{background-repeat:repeat-x;background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-medium-bg.gif')}.x-nlg .x-btn-default-medium-over{background-repeat:repeat-x;background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-medium-over-bg.gif')}.x-nlg .x-btn-default-medium-focus{background-repeat:repeat-x;background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-medium-focus-bg.gif')}.x-nlg .x-btn-default-medium-menu-active,.x-nlg .x-btn-default-medium-pressed{background-repeat:repeat-x;background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-medium-pressed-bg.gif')}.x-nlg .x-btn-default-medium-disabled{background-repeat:repeat-x;background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-medium-disabled-bg.gif')}.x-btn-default-large{border-color:#d1d1d1}.x-btn-default-large{-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px;padding:3px 3px 3px 3px;border-width:1px;border-style:solid;background-image:none;background-color:white;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,#fff),color-stop(48%,#f9f9f9),color-stop(52%,#e2e2e2),color-stop(100%,#e7e7e7));background-image:-webkit-linear-gradient(top,#fff,#f9f9f9 48%,#e2e2e2 52%,#e7e7e7);background-image:-moz-linear-gradient(top,#fff,#f9f9f9 48%,#e2e2e2 52%,#e7e7e7);background-image:-o-linear-gradient(top,#fff,#f9f9f9 48%,#e2e2e2 52%,#e7e7e7);background-image:linear-gradient(top,#fff,#f9f9f9 48%,#e2e2e2 52%,#e7e7e7)}.x-nlg .x-btn-default-large-mc{background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-large-bg.gif');background-color:white}.x-nbr .x-btn-default-large{padding:0!important;border-width:0!important;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0;background-color:transparent;background-position:1100303px 1000303px}.x-nbr .x-btn-default-large-tl,.x-nbr .x-btn-default-large-bl,.x-nbr .x-btn-default-large-tr,.x-nbr .x-btn-default-large-br,.x-nbr .x-btn-default-large-tc,.x-nbr .x-btn-default-large-bc,.x-nbr .x-btn-default-large-ml,.x-nbr .x-btn-default-large-mr{zoom:1;background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-large-corners.gif')}.x-nbr .x-btn-default-large-ml,.x-nbr .x-btn-default-large-mr{zoom:1;background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-large-sides.gif');background-position:0 0}.x-nbr .x-btn-default-large-mc{padding:1px 1px 1px 1px}.x-strict .x-ie7 .x-btn-default-large-tl,.x-strict .x-ie7 .x-btn-default-large-bl{position:relative;right:0}.x-btn-default-large .x-btn-inner{font-size:11px;font-weight:normal;font-family:Helvetica Neue,Arial,sans-serif;color:#333;background-repeat:no-repeat;padding:0 3px}.x-btn-default-large-icon button,.x-btn-default-large-icon a,.x-btn-default-large-icon .x-btn-inner,.x-btn-default-large-noicon button,.x-btn-default-large-noicon a,.x-btn-default-large-noicon .x-btn-inner{height:32px;line-height:32px}.x-btn-default-large-icon button,.x-btn-default-large-icon a{padding:0}.x-btn-default-large-icon .x-btn-inner{width:32px;padding:0}.x-btn-default-large-icon .x-btn-icon{width:32px;height:32px;top:0;left:0;bottom:0;right:0}.x-btn-default-large-icon-text-left button,.x-btn-default-large-icon-text-left a{height:32px}.x-btn-default-large-icon-text-left .x-btn-inner{height:32px;line-height:32px;padding-left:36px}.x-btn-default-large-icon-text-left .x-btn-icon{width:32px;height:auto;top:0;left:0;bottom:0;right:auto}.x-ie6 .x-btn-default-large-icon-text-left .x-btn-icon,.x-quirks .x-btn-default-large-icon-text-left .x-btn-icon{height:32px}.x-btn-default-large-icon-text-right button,.x-btn-default-large-icon-text-right a{height:32px}.x-btn-default-large-icon-text-right .x-btn-inner{height:32px;line-height:32px;padding-right:36px!important}.x-btn-default-large-icon-text-right .x-btn-icon{width:32px;height:auto;top:0;left:auto;bottom:0;right:0}.x-ie6 .x-btn-default-large-icon-text-right .x-btn-icon,.x-quirks .x-btn-default-large-icon-text-right .x-btn-icon{height:32px}.x-btn-default-large-icon-text-top .x-btn-inner{padding-top:36px}.x-btn-default-large-icon-text-top .x-btn-icon{width:auto;height:32px;top:0;left:0;bottom:auto;right:0}.x-ie6 .x-btn-default-large-icon-text-top .x-btn-icon,.x-quirks .x-ie .x-btn-default-large-icon-text-top .x-btn-icon{width:32px}.x-btn-default-large-icon-text-bottom .x-btn-inner{padding-bottom:36px}.x-btn-default-large-icon-text-bottom .x-btn-icon{width:auto;height:32px;top:auto;left:0;bottom:0;right:0}.x-ie6 .x-btn-default-large-icon-text-bottom .x-btn-icon,.x-quirks .x-ie .x-btn-default-large-icon-text-bottom .x-btn-icon{width:32px}.x-btn-default-large-over{border-color:#e4dad9;background-image:none;background-color:white;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,#fff),color-stop(48%,#fcf7f7),color-stop(52%,#eae5e5),color-stop(100%,#efe8e8));background-image:-webkit-linear-gradient(top,#fff,#fcf7f7 48%,#eae5e5 52%,#efe8e8);background-image:-moz-linear-gradient(top,#fff,#fcf7f7 48%,#eae5e5 52%,#efe8e8);background-image:-o-linear-gradient(top,#fff,#fcf7f7 48%,#eae5e5 52%,#efe8e8);background-image:linear-gradient(top,#fff,#fcf7f7 48%,#eae5e5 52%,#efe8e8)}.x-btn-default-large-focus{border-color:#e4dad9;background-image:none;background-color:white;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,#fff),color-stop(48%,#fcf7f7),color-stop(52%,#eae5e5),color-stop(100%,#efe8e8));background-image:-webkit-linear-gradient(top,#fff,#fcf7f7 48%,#eae5e5 52%,#efe8e8);background-image:-moz-linear-gradient(top,#fff,#fcf7f7 48%,#eae5e5 52%,#efe8e8);background-image:-o-linear-gradient(top,#fff,#fcf7f7 48%,#eae5e5 52%,#efe8e8);background-image:linear-gradient(top,#fff,#fcf7f7 48%,#eae5e5 52%,#efe8e8)}.x-btn-default-large-menu-active,.x-btn-default-large-pressed{border-color:#d5cfcf;background-image:none;background-color:#e0e0e0;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,#e0e0e0),color-stop(48%,#e5e5e5),color-stop(52%,#e4c3c5),color-stop(100%,#e7cbcc));background-image:-webkit-linear-gradient(top,#e0e0e0,#e5e5e5 48%,#e4c3c5 52%,#e7cbcc);background-image:-moz-linear-gradient(top,#e0e0e0,#e5e5e5 48%,#e4c3c5 52%,#e7cbcc);background-image:-o-linear-gradient(top,#e0e0e0,#e5e5e5 48%,#e4c3c5 52%,#e7cbcc);background-image:linear-gradient(top,#e0e0e0,#e5e5e5 48%,#e4c3c5 52%,#e7cbcc)}.x-btn-default-large-disabled{border-color:#e9e9e9;background-image:none;background-color:white;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,#fff),color-stop(48%,#f9f9f9),color-stop(52%,#e2e2e2),color-stop(100%,#e7e7e7));background-image:-webkit-linear-gradient(top,#fff,#f9f9f9 48%,#e2e2e2 52%,#e7e7e7);background-image:-moz-linear-gradient(top,#fff,#f9f9f9 48%,#e2e2e2 52%,#e7e7e7);background-image:-o-linear-gradient(top,#fff,#f9f9f9 48%,#e2e2e2 52%,#e7e7e7);background-image:linear-gradient(top,#fff,#f9f9f9 48%,#e2e2e2 52%,#e7e7e7)}.x-btn-default-large-disabled .x-btn-inner{color:#333!important}.x-ie .x-btn-default-large-disabled .x-btn-inner{color:#595959!important}.x-ie6 .x-btn-default-large-disabled .x-btn-inner{color:#8c8c8c!important}.x-nbr .x-btn-default-large-over .x-frame-tl,.x-nbr .x-btn-default-large-over .x-frame-bl,.x-nbr .x-btn-default-large-over .x-frame-tr,.x-nbr .x-btn-default-large-over .x-frame-br,.x-nbr .x-btn-default-large-over .x-frame-tc,.x-nbr .x-btn-default-large-over .x-frame-bc{background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-large-over-corners.gif')}.x-nbr .x-btn-default-large-over .x-frame-ml,.x-nbr .x-btn-default-large-over .x-frame-mr{background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-large-over-sides.gif')}.x-nbr .x-btn-default-large-over .x-frame-mc{background-color:white;background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-large-over-bg.gif')}.x-nbr .x-btn-default-large-focus .x-frame-tl,.x-nbr .x-btn-default-large-focus .x-frame-bl,.x-nbr .x-btn-default-large-focus .x-frame-tr,.x-nbr .x-btn-default-large-focus .x-frame-br,.x-nbr .x-btn-default-large-focus .x-frame-tc,.x-nbr .x-btn-default-large-focus .x-frame-bc{background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-large-focus-corners.gif')}.x-nbr .x-btn-default-large-focus .x-frame-ml,.x-nbr .x-btn-default-large-focus .x-frame-mr{background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-large-focus-sides.gif')}.x-nbr .x-btn-default-large-focus .x-frame-mc{background-color:white;background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-large-focus-bg.gif')}.x-nbr .x-btn-default-large-menu-active .x-frame-tl,.x-nbr .x-btn-default-large-menu-active .x-frame-bl,.x-nbr .x-btn-default-large-menu-active .x-frame-tr,.x-nbr .x-btn-default-large-menu-active .x-frame-br,.x-nbr .x-btn-default-large-menu-active .x-frame-tc,.x-nbr .x-btn-default-large-menu-active .x-frame-bc,.x-nbr .x-btn-default-large-pressed .x-frame-tl,.x-nbr .x-btn-default-large-pressed .x-frame-bl,.x-nbr .x-btn-default-large-pressed .x-frame-tr,.x-nbr .x-btn-default-large-pressed .x-frame-br,.x-nbr .x-btn-default-large-pressed .x-frame-tc,.x-nbr .x-btn-default-large-pressed .x-frame-bc{background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-large-pressed-corners.gif')}.x-nbr .x-btn-default-large-menu-active .x-frame-ml,.x-nbr .x-btn-default-large-menu-active .x-frame-mr,.x-nbr .x-btn-default-large-pressed .x-frame-ml,.x-nbr .x-btn-default-large-pressed .x-frame-mr{background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-large-pressed-sides.gif')}.x-nbr .x-btn-default-large-menu-active .x-frame-mc,.x-nbr .x-btn-default-large-pressed .x-frame-mc{background-color:#e0e0e0;background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-large-pressed-bg.gif')}.x-nbr .x-btn-default-large-disabled .x-frame-tl,.x-nbr .x-btn-default-large-disabled .x-frame-bl,.x-nbr .x-btn-default-large-disabled .x-frame-tr,.x-nbr .x-btn-default-large-disabled .x-frame-br,.x-nbr .x-btn-default-large-disabled .x-frame-tc,.x-nbr .x-btn-default-large-disabled .x-frame-bc{background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-large-disabled-corners.gif')}.x-nbr .x-btn-default-large-disabled .x-frame-ml,.x-nbr .x-btn-default-large-disabled .x-frame-mr{background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-large-disabled-sides.gif')}.x-nbr .x-btn-default-large-disabled .x-frame-mc{background-color:white;background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-large-disabled-bg.gif')}.x-nlg .x-btn-default-large{background-repeat:repeat-x;background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-large-bg.gif')}.x-nlg .x-btn-default-large-over{background-repeat:repeat-x;background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-large-over-bg.gif')}.x-nlg .x-btn-default-large-focus{background-repeat:repeat-x;background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-large-focus-bg.gif')}.x-nlg .x-btn-default-large-menu-active,.x-nlg .x-btn-default-large-pressed{background-repeat:repeat-x;background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-large-pressed-bg.gif')}.x-nlg .x-btn-default-large-disabled{background-repeat:repeat-x;background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-large-disabled-bg.gif')}.x-btn-default-toolbar-small{border-color:transparent}.x-btn-default-toolbar-small{-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px;padding:2px 2px 2px 2px;border-width:1px;border-style:solid;background-color:transparent}.x-nlg .x-btn-default-toolbar-small-mc{background-color:transparent}.x-nbr .x-btn-default-toolbar-small{padding:0!important;border-width:0!important;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0;background-color:transparent;background-position:1100303px 1000303px}.x-nbr .x-btn-default-toolbar-small-tl,.x-nbr .x-btn-default-toolbar-small-bl,.x-nbr .x-btn-default-toolbar-small-tr,.x-nbr .x-btn-default-toolbar-small-br,.x-nbr .x-btn-default-toolbar-small-tc,.x-nbr .x-btn-default-toolbar-small-bc,.x-nbr .x-btn-default-toolbar-small-ml,.x-nbr .x-btn-default-toolbar-small-mr{zoom:1}.x-nbr .x-btn-default-toolbar-small-ml,.x-nbr .x-btn-default-toolbar-small-mr{zoom:1}.x-nbr .x-btn-default-toolbar-small-mc{padding:0}.x-strict .x-ie7 .x-btn-default-toolbar-small-tl,.x-strict .x-ie7 .x-btn-default-toolbar-small-bl{position:relative;right:0}.x-btn-default-toolbar-small .x-btn-inner{font-size:11px;font-weight:normal;font-family:Helvetica Neue,Arial,sans-serif;color:#333;background-repeat:no-repeat;padding:0 4px}.x-btn-default-toolbar-small-icon button,.x-btn-default-toolbar-small-icon a,.x-btn-default-toolbar-small-icon .x-btn-inner,.x-btn-default-toolbar-small-noicon button,.x-btn-default-toolbar-small-noicon a,.x-btn-default-toolbar-small-noicon .x-btn-inner{height:16px;line-height:16px}.x-btn-default-toolbar-small-icon button,.x-btn-default-toolbar-small-icon a{padding:0}.x-btn-default-toolbar-small-icon .x-btn-inner{width:16px;padding:0}.x-btn-default-toolbar-small-icon .x-btn-icon{width:16px;height:16px;top:0;left:0;bottom:0;right:0}.x-btn-default-toolbar-small-icon-text-left button,.x-btn-default-toolbar-small-icon-text-left a{height:16px}.x-btn-default-toolbar-small-icon-text-left .x-btn-inner{height:16px;line-height:16px;padding-left:20px}.x-btn-default-toolbar-small-icon-text-left .x-btn-icon{width:16px;height:auto;top:0;left:0;bottom:0;right:auto}.x-ie6 .x-btn-default-toolbar-small-icon-text-left .x-btn-icon,.x-quirks .x-btn-default-toolbar-small-icon-text-left .x-btn-icon{height:16px}.x-btn-default-toolbar-small-icon-text-right button,.x-btn-default-toolbar-small-icon-text-right a{height:16px}.x-btn-default-toolbar-small-icon-text-right .x-btn-inner{height:16px;line-height:16px;padding-right:20px!important}.x-btn-default-toolbar-small-icon-text-right .x-btn-icon{width:16px;height:auto;top:0;left:auto;bottom:0;right:0}.x-ie6 .x-btn-default-toolbar-small-icon-text-right .x-btn-icon,.x-quirks .x-btn-default-toolbar-small-icon-text-right .x-btn-icon{height:16px}.x-btn-default-toolbar-small-icon-text-top .x-btn-inner{padding-top:20px}.x-btn-default-toolbar-small-icon-text-top .x-btn-icon{width:auto;height:16px;top:0;left:0;bottom:auto;right:0}.x-ie6 .x-btn-default-toolbar-small-icon-text-top .x-btn-icon,.x-quirks .x-ie .x-btn-default-toolbar-small-icon-text-top .x-btn-icon{width:16px}.x-btn-default-toolbar-small-icon-text-bottom .x-btn-inner{padding-bottom:20px}.x-btn-default-toolbar-small-icon-text-bottom .x-btn-icon{width:auto;height:16px;top:auto;left:0;bottom:0;right:0}.x-ie6 .x-btn-default-toolbar-small-icon-text-bottom .x-btn-icon,.x-quirks .x-ie .x-btn-default-toolbar-small-icon-text-bottom .x-btn-icon{width:16px}.x-btn-default-toolbar-small-over{border-color:#bbb;background-image:none;background-color:white;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,#fff),color-stop(48%,#fcf7f7),color-stop(52%,#eae5e5),color-stop(100%,#efe8e8));background-image:-webkit-linear-gradient(top,#fff,#fcf7f7 48%,#eae5e5 52%,#efe8e8);background-image:-moz-linear-gradient(top,#fff,#fcf7f7 48%,#eae5e5 52%,#efe8e8);background-image:-o-linear-gradient(top,#fff,#fcf7f7 48%,#eae5e5 52%,#efe8e8);background-image:linear-gradient(top,#fff,#fcf7f7 48%,#eae5e5 52%,#efe8e8)}.x-btn-default-toolbar-small-focus{border-color:#bbb;background-image:none;background-color:white;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,#fff),color-stop(48%,#fcf7f7),color-stop(52%,#eae5e5),color-stop(100%,#efe8e8));background-image:-webkit-linear-gradient(top,#fff,#fcf7f7 48%,#eae5e5 52%,#efe8e8);background-image:-moz-linear-gradient(top,#fff,#fcf7f7 48%,#eae5e5 52%,#efe8e8);background-image:-o-linear-gradient(top,#fff,#fcf7f7 48%,#eae5e5 52%,#efe8e8);background-image:linear-gradient(top,#fff,#fcf7f7 48%,#eae5e5 52%,#efe8e8)}.x-btn-default-toolbar-small-menu-active,.x-btn-default-toolbar-small-pressed{border-color:#b1b1b1;background-image:none;background-color:#e3e3e3;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,#e3e3e3),color-stop(48%,#e9e9e9),color-stop(52%,#e6c8c9),color-stop(100%,#e9d0d1));background-image:-webkit-linear-gradient(top,#e3e3e3,#e9e9e9 48%,#e6c8c9 52%,#e9d0d1);background-image:-moz-linear-gradient(top,#e3e3e3,#e9e9e9 48%,#e6c8c9 52%,#e9d0d1);background-image:-o-linear-gradient(top,#e3e3e3,#e9e9e9 48%,#e6c8c9 52%,#e9d0d1);background-image:linear-gradient(top,#e3e3e3,#e9e9e9 48%,#e6c8c9 52%,#e9d0d1)}.x-btn-default-toolbar-small-disabled{background-image:none;background-color:transparent}.x-btn-default-toolbar-small-disabled .x-btn-inner{color:#333!important}.x-ie .x-btn-default-toolbar-small-disabled .x-btn-inner{color:#595959!important}.x-ie6 .x-btn-default-toolbar-small-disabled .x-btn-inner{color:#8c8c8c!important}.x-nbr .x-btn-default-toolbar-small-over .x-frame-tl,.x-nbr .x-btn-default-toolbar-small-over .x-frame-bl,.x-nbr .x-btn-default-toolbar-small-over .x-frame-tr,.x-nbr .x-btn-default-toolbar-small-over .x-frame-br,.x-nbr .x-btn-default-toolbar-small-over .x-frame-tc,.x-nbr .x-btn-default-toolbar-small-over .x-frame-bc{background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-toolbar-small-over-corners.gif')}.x-nbr .x-btn-default-toolbar-small-over .x-frame-ml,.x-nbr .x-btn-default-toolbar-small-over .x-frame-mr{background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-toolbar-small-over-sides.gif')}.x-nbr .x-btn-default-toolbar-small-over .x-frame-mc{background-color:white;background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-toolbar-small-over-bg.gif')}.x-nbr .x-btn-default-toolbar-small-focus .x-frame-tl,.x-nbr .x-btn-default-toolbar-small-focus .x-frame-bl,.x-nbr .x-btn-default-toolbar-small-focus .x-frame-tr,.x-nbr .x-btn-default-toolbar-small-focus .x-frame-br,.x-nbr .x-btn-default-toolbar-small-focus .x-frame-tc,.x-nbr .x-btn-default-toolbar-small-focus .x-frame-bc{background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-toolbar-small-focus-corners.gif')}.x-nbr .x-btn-default-toolbar-small-focus .x-frame-ml,.x-nbr .x-btn-default-toolbar-small-focus .x-frame-mr{background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-toolbar-small-focus-sides.gif')}.x-nbr .x-btn-default-toolbar-small-focus .x-frame-mc{background-color:white;background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-toolbar-small-focus-bg.gif')}.x-nbr .x-btn-default-toolbar-small-menu-active .x-frame-tl,.x-nbr .x-btn-default-toolbar-small-menu-active .x-frame-bl,.x-nbr .x-btn-default-toolbar-small-menu-active .x-frame-tr,.x-nbr .x-btn-default-toolbar-small-menu-active .x-frame-br,.x-nbr .x-btn-default-toolbar-small-menu-active .x-frame-tc,.x-nbr .x-btn-default-toolbar-small-menu-active .x-frame-bc,.x-nbr .x-btn-default-toolbar-small-pressed .x-frame-tl,.x-nbr .x-btn-default-toolbar-small-pressed .x-frame-bl,.x-nbr .x-btn-default-toolbar-small-pressed .x-frame-tr,.x-nbr .x-btn-default-toolbar-small-pressed .x-frame-br,.x-nbr .x-btn-default-toolbar-small-pressed .x-frame-tc,.x-nbr .x-btn-default-toolbar-small-pressed .x-frame-bc{background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-toolbar-small-pressed-corners.gif')}.x-nbr .x-btn-default-toolbar-small-menu-active .x-frame-ml,.x-nbr .x-btn-default-toolbar-small-menu-active .x-frame-mr,.x-nbr .x-btn-default-toolbar-small-pressed .x-frame-ml,.x-nbr .x-btn-default-toolbar-small-pressed .x-frame-mr{background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-toolbar-small-pressed-sides.gif')}.x-nbr .x-btn-default-toolbar-small-menu-active .x-frame-mc,.x-nbr .x-btn-default-toolbar-small-pressed .x-frame-mc{background-color:#e3e3e3;background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-toolbar-small-pressed-bg.gif')}.x-nbr .x-btn-default-toolbar-small-disabled .x-frame-tl,.x-nbr .x-btn-default-toolbar-small-disabled .x-frame-bl,.x-nbr .x-btn-default-toolbar-small-disabled .x-frame-tr,.x-nbr .x-btn-default-toolbar-small-disabled .x-frame-br,.x-nbr .x-btn-default-toolbar-small-disabled .x-frame-tc,.x-nbr .x-btn-default-toolbar-small-disabled .x-frame-bc{background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-toolbar-small-disabled-corners.gif')}.x-nbr .x-btn-default-toolbar-small-disabled .x-frame-ml,.x-nbr .x-btn-default-toolbar-small-disabled .x-frame-mr{background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-toolbar-small-disabled-sides.gif')}.x-nbr .x-btn-default-toolbar-small-disabled .x-frame-mc{background-color:transparent}.x-nlg .x-btn-default-toolbar-small-over{background-repeat:repeat-x;background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-toolbar-small-over-bg.gif')}.x-nlg .x-btn-default-toolbar-small-focus{background-repeat:repeat-x;background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-toolbar-small-focus-bg.gif')}.x-nlg .x-btn-default-toolbar-small-menu-active,.x-nlg .x-btn-default-toolbar-small-pressed{background-repeat:repeat-x;background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-toolbar-small-pressed-bg.gif')}.x-btn-default-toolbar-medium{border-color:transparent}.x-btn-default-toolbar-medium{-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px;padding:3px 3px 3px 3px;border-width:1px;border-style:solid;background-color:transparent}.x-nlg .x-btn-default-toolbar-medium-mc{background-color:transparent}.x-nbr .x-btn-default-toolbar-medium{padding:0!important;border-width:0!important;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0;background-color:transparent;background-position:1100303px 1000303px}.x-nbr .x-btn-default-toolbar-medium-tl,.x-nbr .x-btn-default-toolbar-medium-bl,.x-nbr .x-btn-default-toolbar-medium-tr,.x-nbr .x-btn-default-toolbar-medium-br,.x-nbr .x-btn-default-toolbar-medium-tc,.x-nbr .x-btn-default-toolbar-medium-bc,.x-nbr .x-btn-default-toolbar-medium-ml,.x-nbr .x-btn-default-toolbar-medium-mr{zoom:1}.x-nbr .x-btn-default-toolbar-medium-ml,.x-nbr .x-btn-default-toolbar-medium-mr{zoom:1}.x-nbr .x-btn-default-toolbar-medium-mc{padding:1px 1px 1px 1px}.x-strict .x-ie7 .x-btn-default-toolbar-medium-tl,.x-strict .x-ie7 .x-btn-default-toolbar-medium-bl{position:relative;right:0}.x-btn-default-toolbar-medium .x-btn-inner{font-size:11px;font-weight:normal;font-family:Helvetica Neue,Arial,sans-serif;color:#333;background-repeat:no-repeat;padding:0 3px}.x-btn-default-toolbar-medium-icon button,.x-btn-default-toolbar-medium-icon a,.x-btn-default-toolbar-medium-icon .x-btn-inner,.x-btn-default-toolbar-medium-noicon button,.x-btn-default-toolbar-medium-noicon a,.x-btn-default-toolbar-medium-noicon .x-btn-inner{height:24px;line-height:24px}.x-btn-default-toolbar-medium-icon button,.x-btn-default-toolbar-medium-icon a{padding:0}.x-btn-default-toolbar-medium-icon .x-btn-inner{width:24px;padding:0}.x-btn-default-toolbar-medium-icon .x-btn-icon{width:24px;height:24px;top:0;left:0;bottom:0;right:0}.x-btn-default-toolbar-medium-icon-text-left button,.x-btn-default-toolbar-medium-icon-text-left a{height:24px}.x-btn-default-toolbar-medium-icon-text-left .x-btn-inner{height:24px;line-height:24px;padding-left:28px}.x-btn-default-toolbar-medium-icon-text-left .x-btn-icon{width:24px;height:auto;top:0;left:0;bottom:0;right:auto}.x-ie6 .x-btn-default-toolbar-medium-icon-text-left .x-btn-icon,.x-quirks .x-btn-default-toolbar-medium-icon-text-left .x-btn-icon{height:24px}.x-btn-default-toolbar-medium-icon-text-right button,.x-btn-default-toolbar-medium-icon-text-right a{height:24px}.x-btn-default-toolbar-medium-icon-text-right .x-btn-inner{height:24px;line-height:24px;padding-right:28px!important}.x-btn-default-toolbar-medium-icon-text-right .x-btn-icon{width:24px;height:auto;top:0;left:auto;bottom:0;right:0}.x-ie6 .x-btn-default-toolbar-medium-icon-text-right .x-btn-icon,.x-quirks .x-btn-default-toolbar-medium-icon-text-right .x-btn-icon{height:24px}.x-btn-default-toolbar-medium-icon-text-top .x-btn-inner{padding-top:28px}.x-btn-default-toolbar-medium-icon-text-top .x-btn-icon{width:auto;height:24px;top:0;left:0;bottom:auto;right:0}.x-ie6 .x-btn-default-toolbar-medium-icon-text-top .x-btn-icon,.x-quirks .x-ie .x-btn-default-toolbar-medium-icon-text-top .x-btn-icon{width:24px}.x-btn-default-toolbar-medium-icon-text-bottom .x-btn-inner{padding-bottom:28px}.x-btn-default-toolbar-medium-icon-text-bottom .x-btn-icon{width:auto;height:24px;top:auto;left:0;bottom:0;right:0}.x-ie6 .x-btn-default-toolbar-medium-icon-text-bottom .x-btn-icon,.x-quirks .x-ie .x-btn-default-toolbar-medium-icon-text-bottom .x-btn-icon{width:24px}.x-btn-default-toolbar-medium-over{border-color:#bbb;background-image:none;background-color:white;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,#fff),color-stop(48%,#fcf7f7),color-stop(52%,#eae5e5),color-stop(100%,#efe8e8));background-image:-webkit-linear-gradient(top,#fff,#fcf7f7 48%,#eae5e5 52%,#efe8e8);background-image:-moz-linear-gradient(top,#fff,#fcf7f7 48%,#eae5e5 52%,#efe8e8);background-image:-o-linear-gradient(top,#fff,#fcf7f7 48%,#eae5e5 52%,#efe8e8);background-image:linear-gradient(top,#fff,#fcf7f7 48%,#eae5e5 52%,#efe8e8)}.x-btn-default-toolbar-medium-focus{border-color:#bbb;background-image:none;background-color:white;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,#fff),color-stop(48%,#fcf7f7),color-stop(52%,#eae5e5),color-stop(100%,#efe8e8));background-image:-webkit-linear-gradient(top,#fff,#fcf7f7 48%,#eae5e5 52%,#efe8e8);background-image:-moz-linear-gradient(top,#fff,#fcf7f7 48%,#eae5e5 52%,#efe8e8);background-image:-o-linear-gradient(top,#fff,#fcf7f7 48%,#eae5e5 52%,#efe8e8);background-image:linear-gradient(top,#fff,#fcf7f7 48%,#eae5e5 52%,#efe8e8)}.x-btn-default-toolbar-medium-menu-active,.x-btn-default-toolbar-medium-pressed{border-color:#b1b1b1;background-image:none;background-color:#e3e3e3;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,#e3e3e3),color-stop(48%,#e9e9e9),color-stop(52%,#e6c8c9),color-stop(100%,#e9d0d1));background-image:-webkit-linear-gradient(top,#e3e3e3,#e9e9e9 48%,#e6c8c9 52%,#e9d0d1);background-image:-moz-linear-gradient(top,#e3e3e3,#e9e9e9 48%,#e6c8c9 52%,#e9d0d1);background-image:-o-linear-gradient(top,#e3e3e3,#e9e9e9 48%,#e6c8c9 52%,#e9d0d1);background-image:linear-gradient(top,#e3e3e3,#e9e9e9 48%,#e6c8c9 52%,#e9d0d1)}.x-btn-default-toolbar-medium-disabled{background-image:none;background-color:transparent}.x-btn-default-toolbar-medium-disabled .x-btn-inner{color:#333!important}.x-ie .x-btn-default-toolbar-medium-disabled .x-btn-inner{color:#595959!important}.x-ie6 .x-btn-default-toolbar-medium-disabled .x-btn-inner{color:#8c8c8c!important}.x-nbr .x-btn-default-toolbar-medium-over .x-frame-tl,.x-nbr .x-btn-default-toolbar-medium-over .x-frame-bl,.x-nbr .x-btn-default-toolbar-medium-over .x-frame-tr,.x-nbr .x-btn-default-toolbar-medium-over .x-frame-br,.x-nbr .x-btn-default-toolbar-medium-over .x-frame-tc,.x-nbr .x-btn-default-toolbar-medium-over .x-frame-bc{background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-toolbar-medium-over-corners.gif')}.x-nbr .x-btn-default-toolbar-medium-over .x-frame-ml,.x-nbr .x-btn-default-toolbar-medium-over .x-frame-mr{background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-toolbar-medium-over-sides.gif')}.x-nbr .x-btn-default-toolbar-medium-over .x-frame-mc{background-color:white;background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-toolbar-medium-over-bg.gif')}.x-nbr .x-btn-default-toolbar-medium-focus .x-frame-tl,.x-nbr .x-btn-default-toolbar-medium-focus .x-frame-bl,.x-nbr .x-btn-default-toolbar-medium-focus .x-frame-tr,.x-nbr .x-btn-default-toolbar-medium-focus .x-frame-br,.x-nbr .x-btn-default-toolbar-medium-focus .x-frame-tc,.x-nbr .x-btn-default-toolbar-medium-focus .x-frame-bc{background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-toolbar-medium-focus-corners.gif')}.x-nbr .x-btn-default-toolbar-medium-focus .x-frame-ml,.x-nbr .x-btn-default-toolbar-medium-focus .x-frame-mr{background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-toolbar-medium-focus-sides.gif')}.x-nbr .x-btn-default-toolbar-medium-focus .x-frame-mc{background-color:white;background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-toolbar-medium-focus-bg.gif')}.x-nbr .x-btn-default-toolbar-medium-menu-active .x-frame-tl,.x-nbr .x-btn-default-toolbar-medium-menu-active .x-frame-bl,.x-nbr .x-btn-default-toolbar-medium-menu-active .x-frame-tr,.x-nbr .x-btn-default-toolbar-medium-menu-active .x-frame-br,.x-nbr .x-btn-default-toolbar-medium-menu-active .x-frame-tc,.x-nbr .x-btn-default-toolbar-medium-menu-active .x-frame-bc,.x-nbr .x-btn-default-toolbar-medium-pressed .x-frame-tl,.x-nbr .x-btn-default-toolbar-medium-pressed .x-frame-bl,.x-nbr .x-btn-default-toolbar-medium-pressed .x-frame-tr,.x-nbr .x-btn-default-toolbar-medium-pressed .x-frame-br,.x-nbr .x-btn-default-toolbar-medium-pressed .x-frame-tc,.x-nbr .x-btn-default-toolbar-medium-pressed .x-frame-bc{background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-toolbar-medium-pressed-corners.gif')}.x-nbr .x-btn-default-toolbar-medium-menu-active .x-frame-ml,.x-nbr .x-btn-default-toolbar-medium-menu-active .x-frame-mr,.x-nbr .x-btn-default-toolbar-medium-pressed .x-frame-ml,.x-nbr .x-btn-default-toolbar-medium-pressed .x-frame-mr{background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-toolbar-medium-pressed-sides.gif')}.x-nbr .x-btn-default-toolbar-medium-menu-active .x-frame-mc,.x-nbr .x-btn-default-toolbar-medium-pressed .x-frame-mc{background-color:#e3e3e3;background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-toolbar-medium-pressed-bg.gif')}.x-nbr .x-btn-default-toolbar-medium-disabled .x-frame-tl,.x-nbr .x-btn-default-toolbar-medium-disabled .x-frame-bl,.x-nbr .x-btn-default-toolbar-medium-disabled .x-frame-tr,.x-nbr .x-btn-default-toolbar-medium-disabled .x-frame-br,.x-nbr .x-btn-default-toolbar-medium-disabled .x-frame-tc,.x-nbr .x-btn-default-toolbar-medium-disabled .x-frame-bc{background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-toolbar-medium-disabled-corners.gif')}.x-nbr .x-btn-default-toolbar-medium-disabled .x-frame-ml,.x-nbr .x-btn-default-toolbar-medium-disabled .x-frame-mr{background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-toolbar-medium-disabled-sides.gif')}.x-nbr .x-btn-default-toolbar-medium-disabled .x-frame-mc{background-color:transparent}.x-nlg .x-btn-default-toolbar-medium-over{background-repeat:repeat-x;background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-toolbar-medium-over-bg.gif')}.x-nlg .x-btn-default-toolbar-medium-focus{background-repeat:repeat-x;background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-toolbar-medium-focus-bg.gif')}.x-nlg .x-btn-default-toolbar-medium-menu-active,.x-nlg .x-btn-default-toolbar-medium-pressed{background-repeat:repeat-x;background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-toolbar-medium-pressed-bg.gif')}.x-btn-default-toolbar-large{border-color:transparent}.x-btn-default-toolbar-large{-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px;padding:3px 3px 3px 3px;border-width:1px;border-style:solid;background-color:transparent}.x-nlg .x-btn-default-toolbar-large-mc{background-color:transparent}.x-nbr .x-btn-default-toolbar-large{padding:0!important;border-width:0!important;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0;background-color:transparent;background-position:1100303px 1000303px}.x-nbr .x-btn-default-toolbar-large-tl,.x-nbr .x-btn-default-toolbar-large-bl,.x-nbr .x-btn-default-toolbar-large-tr,.x-nbr .x-btn-default-toolbar-large-br,.x-nbr .x-btn-default-toolbar-large-tc,.x-nbr .x-btn-default-toolbar-large-bc,.x-nbr .x-btn-default-toolbar-large-ml,.x-nbr .x-btn-default-toolbar-large-mr{zoom:1}.x-nbr .x-btn-default-toolbar-large-ml,.x-nbr .x-btn-default-toolbar-large-mr{zoom:1}.x-nbr .x-btn-default-toolbar-large-mc{padding:1px 1px 1px 1px}.x-strict .x-ie7 .x-btn-default-toolbar-large-tl,.x-strict .x-ie7 .x-btn-default-toolbar-large-bl{position:relative;right:0}.x-btn-default-toolbar-large .x-btn-inner{font-size:11px;font-weight:normal;font-family:Helvetica Neue,Arial,sans-serif;color:#333;background-repeat:no-repeat;padding:0 3px}.x-btn-default-toolbar-large-icon button,.x-btn-default-toolbar-large-icon a,.x-btn-default-toolbar-large-icon .x-btn-inner,.x-btn-default-toolbar-large-noicon button,.x-btn-default-toolbar-large-noicon a,.x-btn-default-toolbar-large-noicon .x-btn-inner{height:32px;line-height:32px}.x-btn-default-toolbar-large-icon button,.x-btn-default-toolbar-large-icon a{padding:0}.x-btn-default-toolbar-large-icon .x-btn-inner{width:32px;padding:0}.x-btn-default-toolbar-large-icon .x-btn-icon{width:32px;height:32px;top:0;left:0;bottom:0;right:0}.x-btn-default-toolbar-large-icon-text-left button,.x-btn-default-toolbar-large-icon-text-left a{height:32px}.x-btn-default-toolbar-large-icon-text-left .x-btn-inner{height:32px;line-height:32px;padding-left:36px}.x-btn-default-toolbar-large-icon-text-left .x-btn-icon{width:32px;height:auto;top:0;left:0;bottom:0;right:auto}.x-ie6 .x-btn-default-toolbar-large-icon-text-left .x-btn-icon,.x-quirks .x-btn-default-toolbar-large-icon-text-left .x-btn-icon{height:32px}.x-btn-default-toolbar-large-icon-text-right button,.x-btn-default-toolbar-large-icon-text-right a{height:32px}.x-btn-default-toolbar-large-icon-text-right .x-btn-inner{height:32px;line-height:32px;padding-right:36px!important}.x-btn-default-toolbar-large-icon-text-right .x-btn-icon{width:32px;height:auto;top:0;left:auto;bottom:0;right:0}.x-ie6 .x-btn-default-toolbar-large-icon-text-right .x-btn-icon,.x-quirks .x-btn-default-toolbar-large-icon-text-right .x-btn-icon{height:32px}.x-btn-default-toolbar-large-icon-text-top .x-btn-inner{padding-top:36px}.x-btn-default-toolbar-large-icon-text-top .x-btn-icon{width:auto;height:32px;top:0;left:0;bottom:auto;right:0}.x-ie6 .x-btn-default-toolbar-large-icon-text-top .x-btn-icon,.x-quirks .x-ie .x-btn-default-toolbar-large-icon-text-top .x-btn-icon{width:32px}.x-btn-default-toolbar-large-icon-text-bottom .x-btn-inner{padding-bottom:36px}.x-btn-default-toolbar-large-icon-text-bottom .x-btn-icon{width:auto;height:32px;top:auto;left:0;bottom:0;right:0}.x-ie6 .x-btn-default-toolbar-large-icon-text-bottom .x-btn-icon,.x-quirks .x-ie .x-btn-default-toolbar-large-icon-text-bottom .x-btn-icon{width:32px}.x-btn-default-toolbar-large-over{border-color:#bbb;background-image:none;background-color:white;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,#fff),color-stop(48%,#fcf7f7),color-stop(52%,#eae5e5),color-stop(100%,#efe8e8));background-image:-webkit-linear-gradient(top,#fff,#fcf7f7 48%,#eae5e5 52%,#efe8e8);background-image:-moz-linear-gradient(top,#fff,#fcf7f7 48%,#eae5e5 52%,#efe8e8);background-image:-o-linear-gradient(top,#fff,#fcf7f7 48%,#eae5e5 52%,#efe8e8);background-image:linear-gradient(top,#fff,#fcf7f7 48%,#eae5e5 52%,#efe8e8)}.x-btn-default-toolbar-large-focus{border-color:#bbb;background-image:none;background-color:white;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,#fff),color-stop(48%,#fcf7f7),color-stop(52%,#eae5e5),color-stop(100%,#efe8e8));background-image:-webkit-linear-gradient(top,#fff,#fcf7f7 48%,#eae5e5 52%,#efe8e8);background-image:-moz-linear-gradient(top,#fff,#fcf7f7 48%,#eae5e5 52%,#efe8e8);background-image:-o-linear-gradient(top,#fff,#fcf7f7 48%,#eae5e5 52%,#efe8e8);background-image:linear-gradient(top,#fff,#fcf7f7 48%,#eae5e5 52%,#efe8e8)}.x-btn-default-toolbar-large-menu-active,.x-btn-default-toolbar-large-pressed{border-color:#b1b1b1;background-image:none;background-color:#e3e3e3;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,#e3e3e3),color-stop(48%,#e9e9e9),color-stop(52%,#e6c8c9),color-stop(100%,#e9d0d1));background-image:-webkit-linear-gradient(top,#e3e3e3,#e9e9e9 48%,#e6c8c9 52%,#e9d0d1);background-image:-moz-linear-gradient(top,#e3e3e3,#e9e9e9 48%,#e6c8c9 52%,#e9d0d1);background-image:-o-linear-gradient(top,#e3e3e3,#e9e9e9 48%,#e6c8c9 52%,#e9d0d1);background-image:linear-gradient(top,#e3e3e3,#e9e9e9 48%,#e6c8c9 52%,#e9d0d1)}.x-btn-default-toolbar-large-disabled{background-image:none;background-color:transparent}.x-btn-default-toolbar-large-disabled .x-btn-inner{color:#333!important}.x-ie .x-btn-default-toolbar-large-disabled .x-btn-inner{color:#595959!important}.x-ie6 .x-btn-default-toolbar-large-disabled .x-btn-inner{color:#8c8c8c!important}.x-nbr .x-btn-default-toolbar-large-over .x-frame-tl,.x-nbr .x-btn-default-toolbar-large-over .x-frame-bl,.x-nbr .x-btn-default-toolbar-large-over .x-frame-tr,.x-nbr .x-btn-default-toolbar-large-over .x-frame-br,.x-nbr .x-btn-default-toolbar-large-over .x-frame-tc,.x-nbr .x-btn-default-toolbar-large-over .x-frame-bc{background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-toolbar-large-over-corners.gif')}.x-nbr .x-btn-default-toolbar-large-over .x-frame-ml,.x-nbr .x-btn-default-toolbar-large-over .x-frame-mr{background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-toolbar-large-over-sides.gif')}.x-nbr .x-btn-default-toolbar-large-over .x-frame-mc{background-color:white;background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-toolbar-large-over-bg.gif')}.x-nbr .x-btn-default-toolbar-large-focus .x-frame-tl,.x-nbr .x-btn-default-toolbar-large-focus .x-frame-bl,.x-nbr .x-btn-default-toolbar-large-focus .x-frame-tr,.x-nbr .x-btn-default-toolbar-large-focus .x-frame-br,.x-nbr .x-btn-default-toolbar-large-focus .x-frame-tc,.x-nbr .x-btn-default-toolbar-large-focus .x-frame-bc{background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-toolbar-large-focus-corners.gif')}.x-nbr .x-btn-default-toolbar-large-focus .x-frame-ml,.x-nbr .x-btn-default-toolbar-large-focus .x-frame-mr{background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-toolbar-large-focus-sides.gif')}.x-nbr .x-btn-default-toolbar-large-focus .x-frame-mc{background-color:white;background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-toolbar-large-focus-bg.gif')}.x-nbr .x-btn-default-toolbar-large-menu-active .x-frame-tl,.x-nbr .x-btn-default-toolbar-large-menu-active .x-frame-bl,.x-nbr .x-btn-default-toolbar-large-menu-active .x-frame-tr,.x-nbr .x-btn-default-toolbar-large-menu-active .x-frame-br,.x-nbr .x-btn-default-toolbar-large-menu-active .x-frame-tc,.x-nbr .x-btn-default-toolbar-large-menu-active .x-frame-bc,.x-nbr .x-btn-default-toolbar-large-pressed .x-frame-tl,.x-nbr .x-btn-default-toolbar-large-pressed .x-frame-bl,.x-nbr .x-btn-default-toolbar-large-pressed .x-frame-tr,.x-nbr .x-btn-default-toolbar-large-pressed .x-frame-br,.x-nbr .x-btn-default-toolbar-large-pressed .x-frame-tc,.x-nbr .x-btn-default-toolbar-large-pressed .x-frame-bc{background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-toolbar-large-pressed-corners.gif')}.x-nbr .x-btn-default-toolbar-large-menu-active .x-frame-ml,.x-nbr .x-btn-default-toolbar-large-menu-active .x-frame-mr,.x-nbr .x-btn-default-toolbar-large-pressed .x-frame-ml,.x-nbr .x-btn-default-toolbar-large-pressed .x-frame-mr{background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-toolbar-large-pressed-sides.gif')}.x-nbr .x-btn-default-toolbar-large-menu-active .x-frame-mc,.x-nbr .x-btn-default-toolbar-large-pressed .x-frame-mc{background-color:#e3e3e3;background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-toolbar-large-pressed-bg.gif')}.x-nbr .x-btn-default-toolbar-large-disabled .x-frame-tl,.x-nbr .x-btn-default-toolbar-large-disabled .x-frame-bl,.x-nbr .x-btn-default-toolbar-large-disabled .x-frame-tr,.x-nbr .x-btn-default-toolbar-large-disabled .x-frame-br,.x-nbr .x-btn-default-toolbar-large-disabled .x-frame-tc,.x-nbr .x-btn-default-toolbar-large-disabled .x-frame-bc{background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-toolbar-large-disabled-corners.gif')}.x-nbr .x-btn-default-toolbar-large-disabled .x-frame-ml,.x-nbr .x-btn-default-toolbar-large-disabled .x-frame-mr{background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-toolbar-large-disabled-sides.gif')}.x-nbr .x-btn-default-toolbar-large-disabled .x-frame-mc{background-color:transparent}.x-nlg .x-btn-default-toolbar-large-over{background-repeat:repeat-x;background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-toolbar-large-over-bg.gif')}.x-nlg .x-btn-default-toolbar-large-focus{background-repeat:repeat-x;background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-toolbar-large-focus-bg.gif')}.x-nlg .x-btn-default-toolbar-large-menu-active,.x-nlg .x-btn-default-toolbar-large-pressed{background-repeat:repeat-x;background-image:url('../../extjs/resources/themes/images/default/btn/btn-default-toolbar-large-pressed-bg.gif')}.x-btn-default-toolbar-small-disabled,.x-btn-default-toolbar-medium-disabled,.x-btn-default-toolbar-large-disabled{border-color:transparent;background-image:none;background:transparent}.x-btn-group{position:relative;overflow:hidden}.x-btn-group-body{position:relative;zoom:1;padding:0 1px}.x-btn-group-body .x-table-layout-cell{vertical-align:top}.x-btn-group-header-text{white-space:nowrap}.x-btn-group-default-framed{-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px;padding:1px 1px 1px 1px;border-width:1px;border-style:solid;background-color:#f3f3f3}.x-nlg .x-btn-group-default-framed-mc{background-color:#f3f3f3}.x-nbr .x-btn-group-default-framed{padding:0!important;border-width:0!important;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0;background-color:transparent;background-position:1000202px 1000202px}.x-nbr .x-btn-group-default-framed-tl,.x-nbr .x-btn-group-default-framed-bl,.x-nbr .x-btn-group-default-framed-tr,.x-nbr .x-btn-group-default-framed-br,.x-nbr .x-btn-group-default-framed-tc,.x-nbr .x-btn-group-default-framed-bc,.x-nbr .x-btn-group-default-framed-ml,.x-nbr .x-btn-group-default-framed-mr{zoom:1;background-image:url('../../extjs/resources/themes/images/default/btn-group/btn-group-default-framed-corners.gif')}.x-nbr .x-btn-group-default-framed-ml,.x-nbr .x-btn-group-default-framed-mr{zoom:1;background-image:url('../../extjs/resources/themes/images/default/btn-group/btn-group-default-framed-sides.gif');background-position:0 0;background-repeat:repeat-y}.x-nbr .x-btn-group-default-framed-mc{padding:0}.x-strict .x-ie7 .x-btn-group-default-framed-tl,.x-strict .x-ie7 .x-btn-group-default-framed-bl{position:relative;right:0}.x-btn-group-default-framed{border-color:#dadada;-webkit-box-shadow:white 0 1px 0 0 inset,white 0 -1px 0 0 inset,white -1px 0 0 0 inset,white 1px 0 0 0 inset;-moz-box-shadow:white 0 1px 0 0 inset,white 0 -1px 0 0 inset,white -1px 0 0 0 inset,white 1px 0 0 0 inset;box-shadow:white 0 1px 0 0 inset,white 0 -1px 0 0 inset,white -1px 0 0 0 inset,white 1px 0 0 0 inset}.x-btn-group-header-default-framed{margin:2px 2px 0 2px}.x-btn-group-header-body-default-framed{padding:1px 0;background:#edebeb;-moz-border-radius-topleft:2px;-webkit-border-top-left-radius:2px;border-top-left-radius:2px;-moz-border-radius-topright:2px;-webkit-border-top-right-radius:2px;border-top-right-radius:2px}.x-btn-group-header-text-default-framed{font:normal 11px Helvetica Neue,Arial,sans-serif;color:#878787}.x-datepicker{border:1px solid #5a5352;background-color:white;position:relative}.x-datepicker a{-moz-outline:0 none;outline:0 none;color:#745351;text-decoration:none;border-width:0}.x-datepicker-inner,.x-datepicker-inner td,.x-datepicker-inner th{border-collapse:separate}.x-datepicker-header{position:relative;height:26px;background-image:none;background-color:#626262;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,#6a6969),color-stop(100%,#585857));background-image:-webkit-linear-gradient(top,#6a6969,#585857);background-image:-moz-linear-gradient(top,#6a6969,#585857);background-image:-o-linear-gradient(top,#6a6969,#585857);background-image:linear-gradient(top,#6a6969,#585857)}.x-datepicker-prev,.x-datepicker-next{position:absolute;top:5px;width:18px}.x-datepicker-prev a,.x-datepicker-next a{display:block;width:16px;height:16px;background-position:top;background-repeat:no-repeat;cursor:pointer;text-decoration:none!important;filter:alpha(opacity=70);opacity:.7}.x-datepicker-prev a:hover,.x-datepicker-next a:hover{filter:alpha(opacity=100);opacity:1}.x-datepicker-next{right:5px}.x-datepicker-next a{background-image:url('../../extjs/resources/themes/images/default/shared/right-btn.gif')}.x-datepicker-prev{left:5px}.x-datepicker-prev a{background-image:url('../../extjs/resources/themes/images/default/shared/left-btn.gif')}.x-item-disabled .x-datepicker-prev a:hover,.x-item-disabled .x-datepicker-next a:hover{filter:alpha(opacity=60);opacity:.6}.x-datepicker-month{padding-top:3px}.x-datepicker-month .x-btn,.x-datepicker-month button,.x-datepicker-month .x-btn-tc,.x-datepicker-month .x-btn-tl,.x-datepicker-month .x-btn-tr,.x-datepicker-month .x-btn-mc,.x-datepicker-month .x-btn-ml,.x-datepicker-month .x-btn-mr,.x-datepicker-month .x-btn-bc,.x-datepicker-month .x-btn-bl,.x-datepicker-month .x-btn-br{background:transparent!important;border-width:0!important}.x-datepicker-month span{color:#fff!important}.x-datepicker-month .x-btn-split-right{background-image:url('../../extjs/resources/themes/images/default/button/s-arrow-light.gif');padding-right:12px}.x-datepicker-next{text-align:right}.x-datepicker-month{text-align:center}.x-datepicker-month button{color:white!important}table.x-datepicker-inner{width:100%;table-layout:fixed}table.x-datepicker-inner th{width:25px;height:19px;padding:0;color:#5b5b5b;font:normal 10px Helvetica Neue,Arial,sans-serif;text-align:right;border-bottom:1px solid #ebe0e0;border-collapse:separate;background-image:none;background-color:white;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,#fff),color-stop(100%,#f7f3f3));background-image:-webkit-linear-gradient(top,#fff,#f7f3f3);background-image:-moz-linear-gradient(top,#fff,#f7f3f3);background-image:-o-linear-gradient(top,#fff,#f7f3f3);background-image:linear-gradient(top,#fff,#f7f3f3);cursor:default}table.x-datepicker-inner th span{display:block;padding-right:7px}table.x-datepicker-inner tr{height:20px}table.x-datepicker-inner td{border:1px solid;height:17px;border-color:white;text-align:right;padding:0}table.x-datepicker-inner a{padding-right:4px;display:block;zoom:1;font:normal 11px Helvetica Neue,Arial,sans-serif;color:black;text-decoration:none;text-align:right}table.x-datepicker-inner .x-datepicker-active{cursor:pointer;color:black}table.x-datepicker-inner .x-datepicker-selected a{background:repeat-x left top;background-color:#f9f9f9;border:1px solid #cdc8c8}table.x-datepicker-inner .x-datepicker-selected span{font-weight:bold}table.x-datepicker-inner .x-datepicker-today a{border:1px solid;border-color:darkred}table.x-datepicker-inner .x-datepicker-prevday a,table.x-datepicker-inner .x-datepicker-nextday a{text-decoration:none!important;color:#aaa}table.x-datepicker-inner a:hover,table.x-datepicker-inner .x-datepicker-disabled a:hover{text-decoration:none!important;color:#000;background-color:white}table.x-datepicker-inner .x-datepicker-disabled a{cursor:default;background-color:#eee;color:#bbb}.x-datepicker-footer,.x-monthpicker-buttons{position:relative;border-top:1px solid #ebe0e0;background-image:none;background-color:white;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,#fcfcfc),color-stop(49%,#f3f3f3),color-stop(51%,#ededed),color-stop(100%,#efefef));background-image:-webkit-linear-gradient(top,#fcfcfc,#f3f3f3 49%,#ededed 51%,#efefef);background-image:-moz-linear-gradient(top,#fcfcfc,#f3f3f3 49%,#ededed 51%,#efefef);background-image:-o-linear-gradient(top,#fcfcfc,#f3f3f3 49%,#ededed 51%,#efefef);background-image:linear-gradient(top,#fcfcfc,#f3f3f3 49%,#ededed 51%,#efefef);text-align:center}.x-datepicker-footer .x-btn,.x-monthpicker-buttons .x-btn{position:relative;margin:4px}.x-item-disabled .x-datepicker-inner a:hover{background:0}.x-datepicker .x-monthpicker{position:absolute;left:0;top:0}.x-monthpicker{border:1px solid #5a5352;background-color:white}.x-monthpicker-months,.x-monthpicker-years{float:left;height:167px;width:88px}.x-monthpicker-item{float:left;margin:4px 0 5px 0;font:normal 11px Helvetica Neue,Arial,sans-serif;text-align:center;vertical-align:middle;height:18px;width:43px;border:0 none}.x-monthpicker-item a{display:block;margin:0 5px;text-decoration:none;color:#745351;border:1px solid white;line-height:17px}.x-monthpicker-item a:hover{background-color:white}.x-monthpicker-item a.x-monthpicker-selected{background-color:white;border:1px solid #cdc8c8}.x-monthpicker-months{border-right:1px solid #5a5352;width:87px}.x-monthpicker-years .x-monthpicker-item{width:44px}.x-monthpicker-yearnav{height:28px}.x-monthpicker-yearnav button{background-image:url('../../extjs/resources/themes/images/default/tools/tool-sprites.gif');height:15px;width:15px;padding:0;margin:6px 12px 5px 15px;border:0;outline:0 none}.x-monthpicker-yearnav button::-moz-focus-inner{border:0;padding:0}.x-monthpicker-yearnav-next{background-position:0 -120px}.x-monthpicker-yearnav-next-over{cursor:pointer;cursor:hand;background-position:-15px -120px}.x-monthpicker-yearnav-prev{background-position:0 -105px}.x-monthpicker-yearnav-prev-over{cursor:pointer;cursor:hand;background-position:-15px -105px}.x-monthpicker-small .x-monthpicker-item{margin:2px 0 2px 0}.x-monthpicker-small .x-monthpicker-yearnav{height:23px}.x-monthpicker-small .x-monthpicker-months,.x-monthpicker-small .x-monthpicker-years{height:136px}.x-quirks .x-ie7 .x-monthpicker-buttons .x-btn,.x-quirks .x-ie8 .x-monthpicker-buttons .x-btn{margin-top:2px}.x-quirks .x-monthpicker-small .x-monthpicker-yearnav button{margin-top:3px;margin-bottom:3px}.x-ie6 .x-monthpicker-small .x-monthpicker-yearnav button{margin-top:3px;margin-bottom:3px}.x-nlg .x-datepicker-header{background-image:url('../../extjs/resources/themes/images/default/datepicker/datepicker-header-bg.gif');background-repeat:repeat-x;background-position:top left}.x-nlg .x-datepicker-footer,.x-nlg .x-monthpicker-buttons{background-image:url('../../extjs/resources/themes/images/default/datepicker/datepicker-footer-bg.gif');background-repeat:repeat-x;background-position:top left}.x-color-picker{width:144px;height:90px;cursor:pointer}.x-color-picker a{border:1px solid #fff;float:left;padding:2px;text-decoration:none;-moz-outline:0 none;outline:0 none;cursor:pointer}.x-color-picker a:hover,.x-color-picker a.x-color-picker-selected{border-color:#8bb8f3;background-color:#deecfd}.x-color-picker em{display:block;border:1px solid #aca899}.x-color-picker em span{cursor:pointer;display:block;height:10px;width:10px;line-height:10px}.x-menu-body{user-select:none;-o-user-select:none;-ms-user-select:none;-moz-user-select:-moz-none;-webkit-user-select:none;cursor:default;background:#f0f0f0!important;padding:2px}.x-menu-item .x-form-text{user-select:text;-webkit-user-select:text;-o-user-select:text;-ie-user-select:text;-moz-user-select:text;-ie-user-select:text}.x-menu-icon-separator{position:absolute;top:0;left:27px;z-index:0;border-left:solid 1px #e0e0e0;background-color:white;width:2px;overflow:hidden}.x-menu-plain .x-menu-icon-separator{display:none}.x-menu-focus{display:block;position:absolute;top:-10px;left:-10px;width:0;height:0}.x-menu-item{white-space:nowrap;overflow:hidden;z-index:1}.x-menu-item-cmp{margin-bottom:1px}.x-menu-item-link{display:block;margin:1px;padding:6px 2px 3px 32px;text-decoration:none!important;line-height:16px;cursor:default}.x-opera .x-menu-item-link{position:relative}.x-menu-item-icon{width:16px;height:16px;position:absolute;top:5px;left:4px;background:no-repeat center center}.x-menu-item-icon-right{width:16px;height:16px;position:absolute;top:6px;right:4px;background:no-repeat center center}.x-menu-item-text{font-size:11px;color:#222}.x-menu-item-checked .x-menu-item-icon{background-image:url('../../extjs/resources/themes/images/default/menu/checked.gif')}.x-menu-item-checked .x-menu-group-icon{background-image:url('../../extjs/resources/themes/images/default/menu/group-checked.gif')}.x-menu-item-unchecked .x-menu-item-icon{background-image:url('../../extjs/resources/themes/images/default/menu/unchecked.gif')}.x-menu-item-unchecked .x-menu-group-icon{background-image:none}.x-menu-item-separator{height:2px;border-top:solid 1px #e0e0e0;background-color:white;margin:2px 0;overflow:hidden}.x-menu-item-arrow{position:absolute;width:12px;height:9px;top:9px;right:0;background:no-repeat center center;background-image:url('../../extjs/resources/themes/images/default/menu/menu-parent.gif')}.x-menu-item-indent{margin-left:31px}.x-menu-item-active{cursor:pointer}.x-menu-item-active .x-menu-item-link{background-image:none;background-color:#fdfcfc;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,#fff),color-stop(100%,#f6efef));background-image:-webkit-linear-gradient(top,#fff,#f6efef);background-image:-moz-linear-gradient(top,#fff,#f6efef);background-image:-o-linear-gradient(top,#fff,#f6efef);background-image:linear-gradient(top,#fff,#f6efef);margin:0;border:1px solid #e8dbdb;cursor:pointer;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px}.x-menu-item-disabled{filter:alpha(opacity=50);opacity:.5}.x-ie .x-menu-item-disabled .x-menu-item-icon{filter:alpha(opacity=50);opacity:.5}.x-ie .x-menu-item-disabled .x-menu-item-text{background-color:transparent}.x-strict .x-ie7m .x-ie .x-menu-icon-separator{width:1px}.x-strict .x-ie7m .x-ie .x-menu-item-separator{height:1px}.x-ie6 .x-menu-item-link,.x-ie7 .x-menu-item-link,.x-quirks .x-ie8 .x-menu-item-link{padding-bottom:2px}.x-nlg .x-menu-item-active .x-menu-item-link{background:#fdfcfc repeat-x left top;background-image:url('../../extjs/resources/themes/images/default/menu/menu-item-active-bg.gif')}.x-menu-date-item{border-color:#99bbe8}.x-panel .x-grid-body{background:white;border-color:#bfbfbf;border-style:solid;border-width:1px;border-top-color:#c5c5c5}.x-panel .x-grid-header-ct-hidden{visibility:hidden}.x-grid-empty{padding:10px;color:gray;font:normal 11px tahoma,arial,helvetica,sans-serif}.x-grid-header-hidden .x-grid-body{border-top-color:#bfbfbf!important}.x-grid-view{overflow:hidden;position:relative}.x-grid-table{table-layout:fixed;border-collapse:separate}.x-autowidth-table table.x-grid-table{table-layout:auto;width:auto!important}.x-grid-row .x-grid-table{border-collapse:collapse}.x-grid-locked .x-grid-inner-locked{border-width:0 1px 0 0!important;border-style:solid}.x-grid-header-ct{cursor:default;zoom:1;padding:0;border:1px solid #bfbfbf;border-bottom-color:#c5c5c5;background-image:none;background-color:#c5c5c5;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,#f9f9f9),color-stop(100%,#e3e4e6));background-image:-webkit-linear-gradient(top,#f9f9f9,#e3e4e6);background-image:-moz-linear-gradient(top,#f9f9f9,#e3e4e6);background-image:-o-linear-gradient(top,#f9f9f9,#e3e4e6);background-image:linear-gradient(top,#f9f9f9,#e3e4e6)}.x-accordion-item .x-grid-header-ct{border-width:0 0 1px 0!important}.x-column-header{padding:0;position:absolute;overflow:hidden;border-right:1px solid #c5c5c5;border-left:0 none;border-top:0 none;border-bottom:0 none;text-shadow:0 1px 0 rgba(255,255,255,0.3);font:normal 11px Helvetica Neue,Arial,sans-serif;background-image:none;background-color:#c5c5c5;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,#f9f9f9),color-stop(100%,#e3e4e6));background-image:-webkit-linear-gradient(top,#f9f9f9,#e3e4e6);background-image:-moz-linear-gradient(top,#f9f9f9,#e3e4e6);background-image:-o-linear-gradient(top,#f9f9f9,#e3e4e6);background-image:linear-gradient(top,#f9f9f9,#e3e4e6)}.x-group-header{padding:0;border-left-width:0}.x-group-sub-header{background:transparent;border-top:1px solid #c5c5c5;border-left-width:0}.x-column-header-inner{zoom:1;position:relative;white-space:nowrap;line-height:15px;padding:3px 6px 4px}.x-column-header-inner .x-column-header-text{white-space:nowrap}.x-column-header-over,.x-column-header-sort-ASC,.x-column-header-sort-DESC{border-left-color:#eadbdb;border-right-color:#eadbdb;background-image:none;background-color:#eadbdb;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,#fff),color-stop(39%,#fff),color-stop(40%,#fdfcfc),color-stop(100%,#fdfcfc));background-image:-webkit-linear-gradient(top,#fff,#fff 39%,#fdfcfc 40%,#fdfcfc);background-image:-moz-linear-gradient(top,#fff,#fff 39%,#fdfcfc 40%,#fdfcfc);background-image:-o-linear-gradient(top,#fff,#fff 39%,#fdfcfc 40%,#fdfcfc);background-image:linear-gradient(top,#fff,#fff 39%,#fdfcfc 40%,#fdfcfc)}.x-nlg .x-grid-header-ct,.x-nlg .x-column-header{background:repeat-x 0 top;background-image:url('../../extjs/resources/themes/images/default/grid/column-header-bg.gif')}.x-nlg .x-column-header-over,.x-nlg .x-column-header-sort-ASC,.x-nlg .x-column-header-sort-DESC{background:#ebf3fd repeat-x 0 top;background-image:url('../../extjs/resources/themes/images/default/grid/column-header-over-bg.gif')}.x-column-header-trigger{display:none;height:100%;width:14px;background:no-repeat left center;background-color:#c3daf9;background-image:url('../../extjs/resources/themes/images/default/grid/grid3-hd-btn.gif');position:absolute;right:0;top:0;z-index:2;cursor:pointer}.x-column-header-over .x-column-header-trigger,.x-column-header-open .x-column-header-trigger{display:block}.x-column-header-align-right{text-align:right}.x-column-header-align-right .x-column-header-text{padding-right:.5ex;margin-right:6px}.x-column-header-align-center{text-align:center}.x-column-header-align-left{text-align:left}.x-column-header-sort-ASC .x-column-header-text{padding-right:16px;background:no-repeat right 6px;background-image:url('../../extjs/resources/themes/images/default/grid/sort_asc.gif')}.x-column-header-sort-DESC .x-column-header-text{padding-right:16px;background:no-repeat right 6px;background-image:url('../../extjs/resources/themes/images/default/grid/sort_desc.gif')}.x-grid-row{vertical-align:top}.x-grid-row .x-grid-cell{font:normal 11px/15px Helvetica Neue,Arial,sans-serif;background-color:white;border-color:#ededed;border-style:solid;border-top-color:#fafafa;border-width:0}.x-grid-with-row-lines .x-grid-cell{border-width:1px 0}.x-grid-rowwrap-div{border-width:1px 0;border-color:#ededed;border-style:solid;border-top-color:#fafafa;overflow:hidden}.x-grid-row-alt .x-grid-cell,.x-grid-row-alt .x-grid-rowwrap-div{background-color:#fafafa}.x-grid-row-over .x-grid-cell,.x-grid-row-over .x-grid-rowwrap-div{border-color:#ddd;background-color:#efefef}.x-grid-row-focused .x-grid-cell,.x-grid-row-focused .x-grid-rowwrap-div{border-color:#ddd;background-color:#efefef}.x-grid-row-selected .x-grid-cell,.x-grid-row-selected .x-grid-rowwrap-div{border-style:dotted;border-color:#dbd7d6;background-color:#d9e8fb!important}.x-grid-rowwrap-div .x-grid-cell,.x-grid-rowwrap-div .x-grid-cell-inner{border-width:0;background:transparent}.x-grid-row-body-hidden{display:none}.x-grid-rowbody{font:normal 11px/13px Helvetica Neue,Arial,sans-serif;padding:4px}.x-grid-rowbody p{margin:5px 5px 10px 5px}.x-grid-cell{overflow:hidden}.x-grid-cell-inner{overflow:hidden;-o-text-overflow:ellipsis;text-overflow:ellipsis;padding:2px 6px 3px;white-space:nowrap}.x-grid-with-row-lines .x-grid-cell-inner{line-height:13px;padding-bottom:4px}.x-action-col-cell .x-grid-cell-inner{line-height:0;padding:2px}.x-action-col-cell .x-item-disabled{filter:alpha(opacity=30);opacity:.3}.x-grid-with-row-lines .x-action-col-cell .x-grid-cell-inner{padding-top:1px}.x-grid-row .x-grid-cell-special{padding:0;border-right:1px solid #e3e3e3;background-image:none;background-color:#f6f6f6;background-image:-webkit-gradient(linear,0% 50%,100% 50%,color-stop(0%,#f6f6f6),color-stop(100%,#e9e9e9));background-image:-webkit-linear-gradient(left,#f6f6f6,#e9e9e9);background-image:-moz-linear-gradient(left,#f6f6f6,#e9e9e9);background-image:-o-linear-gradient(left,#f6f6f6,#e9e9e9);background-image:linear-gradient(left,#f6f6f6,#e9e9e9)}.x-grid-row .x-grid-cell-row-checker{vertical-align:middle}.x-ie6 .x-grid-header-row,.x-ie7 .x-grid-header-row,.x-quirks .x-ie8 .x-grid-header-row{position:absolute}.x-grid-row-selected .x-grid-cell-special{border-right:1px solid #eadbdb;background-image:none;background-color:#d9e8fb;background-image:-webkit-gradient(linear,0% 50%,100% 50%,color-stop(0%,#d9e8fb),color-stop(100%,#c2daf9));background-image:-webkit-linear-gradient(left,#d9e8fb,#c2daf9);background-image:-moz-linear-gradient(left,#d9e8fb,#c2daf9);background-image:-o-linear-gradient(left,#d9e8fb,#c2daf9);background-image:linear-gradient(left,#d9e8fb,#c2daf9)}.x-grid-dirty-cell{background-image:url('../../extjs/resources/themes/images/default/grid/dirty.gif');background-position:0 0;background-repeat:no-repeat}.x-grid-cell-selected{background-color:#b8cfee!important}.x-nlg .x-grid-cell-special{background-repeat:repeat-y;background-position:top right}.x-nlg .x-grid-row .x-grid-cell-special,.x-nlg .x-grid-row-over .x-grid-cell-special{background-image:url('../../extjs/resources/themes/images/default/grid/cell-special-bg.gif')}.x-nlg .x-grid-row-focused .x-grid-cell-special,.x-nlg .x-grid-row-selected .x-grid-cell-special{background-image:url('../../extjs/resources/themes/images/default/grid/cell-special-selected-bg.gif')}.x-grid-with-col-lines .x-grid-cell{padding-right:0;border-right:1px solid #e3e3e3}.x-property-grid .x-grid-row .x-grid-property-name .x-grid-cell-inner,.x-property-grid .x-grid-row-over .x-grid-property-name .x-grid-cell-inner{padding-left:12px;background-image:url('../../extjs/resources/themes/images/default/grid/property-cell-bg.gif');background-repeat:no-repeat;background-position:-16px 2px}.x-grid-with-row-lines.x-property-grid .x-grid-row .x-grid-property-name .x-grid-cell-inner,.x-grid-with-row-lines.x-property-grid .x-grid-row-over .x-grid-property-name .x-grid-cell-inner{background-position:-16px 1px}.x-quirks .x-ie .x-grid-row .x-grid-property-name .x-grid-cell-inner{background-position:-16px 2px}.x-unselectable{user-select:none;-o-user-select:none;-ms-user-select:none;-moz-user-select:-moz-none;-webkit-user-select:none;cursor:default}.x-grid-row-body-hidden{display:none}.x-grid-group-collapsed{display:none}.x-grid-view .x-grid-td-expander{vertical-align:top}.x-grid-td-expander{background:repeat-y right transparent}.x-grid-view .x-grid-td-expander .x-grid-cell-inner{padding:0!important}.x-grid-row-expander{background-image:url('../../extjs/resources/themes/images/default/grid/group-collapse.gif');background-color:transparent;width:9px;height:13px;margin-left:3px;background-repeat:no-repeat;background-position:0 -2px}.x-grid-row-collapsed .x-grid-row-expander{background-image:url('../../extjs/resources/themes/images/default/grid/group-expand.gif')}.x-grid-resize-marker{position:absolute;z-index:5;top:0;width:1px;background-color:#0f0f0f}.col-move-top,.col-move-bottom{width:9px;height:9px;position:absolute;top:0;line-height:0;font-size:0;overflow:hidden;z-index:20000;background:no-repeat left top transparent}.col-move-top{background-image:url('../../extjs/resources/themes/images/default/grid/col-move-top.gif')}.col-move-bottom{background-image:url('../../extjs/resources/themes/images/default/grid/col-move-bottom.gif')}.x-tbar-page-number{width:30px}.x-grid-group,.x-grid-group-body,.x-grid-group-hd{zoom:1}.x-grid-group-hd{padding-top:6px}.x-grid-group-hd .x-grid-cell-inner{padding:10px 4px 4px 4px;background:white;border-width:0 0 2px 0;border-style:solid;border-color:#d6d0d0;cursor:pointer}.x-grid-group-hd-collapsible .x-grid-group-title{background:transparent no-repeat 0 -1px;background-image:url('../../extjs/resources/themes/images/default/grid/group-collapse.gif');padding:0 0 0 14px}.x-grid-group-title{color:#7e7e7e;font:bold 11px Helvetica Neue,Arial,sans-serif}.x-grid-group-hd-collapsed .x-grid-group-title{background-image:url('../../extjs/resources/themes/images/default/grid/group-expand.gif')}.x-grid-group-collapsed .x-grid-group-body{display:none}.x-grid-group-collapsed .x-grid-group-title{background-image:url('../../extjs/resources/themes/images/default/grid/group-expand.gif')}.x-group-by-icon{background-image:url('../../extjs/resources/themes/images/default/grid/group-by.gif')}.x-show-groups-icon{background-image:url('../../extjs/resources/themes/images/default/grid/group-by.gif')}.x-column-header-checkbox .x-column-header-inner{padding:0}.x-grid-cell-special .x-grid-cell-inner{padding-left:4px;padding-right:4px}.x-grid-row-checker,.x-column-header-checkbox .x-column-header-text{height:14px;width:14px;line-height:0;background-image:url('../../extjs/resources/themes/images/default/grid/unchecked.gif');background-position:-1px -1px;background-repeat:no-repeat;background-color:transparent}.x-column-header-checkbox .x-column-header-text{display:block;margin:0 5px}.x-quirks .x-ie .x-grid-row-checker,.x-quirks .x-ie .x-column-header-checkbox .x-column-header-text,.x-ie7m .x-grid-row-checker,.x-ie7m .x-column-header-checkbox .x-column-header-text{line-height:14px}.x-grid-hd-checker-on .x-column-header-text{background-image:url('../../extjs/resources/themes/images/default/grid/checked.gif')}.x-grid-cell-row-checker .x-grid-cell-inner{padding-top:4px;padding-bottom:2px;line-height:14px}.x-grid-with-row-lines .x-grid-cell-row-checker .x-grid-cell-inner{padding-top:3px}.x-grid-row-checker{margin-left:1px;background-position:50% -2px}.x-grid-row-selected .x-grid-row-checker,.x-grid-row-checked .x-grid-row-checker{background-image:url('../../extjs/resources/themes/images/default/grid/checked.gif')}.x-tbar-page-first{background-image:url('../../extjs/resources/themes/images/default/grid/page-first.gif')!important}.x-tbar-loading{background-image:url('../../extjs/resources/themes/images/default/grid/refresh.gif')!important}.x-tbar-page-last{background-image:url('../../extjs/resources/themes/images/default/grid/page-last.gif')!important}.x-tbar-page-next{background-image:url('../../extjs/resources/themes/images/default/grid/page-next.gif')!important}.x-tbar-page-prev{background-image:url('../../extjs/resources/themes/images/default/grid/page-prev.gif')!important}.x-item-disabled .x-tbar-loading{background-image:url('../../extjs/resources/themes/images/default/grid/refresh-disabled.gif')!important}.x-item-disabled .x-tbar-page-first{background-image:url('../../extjs/resources/themes/images/default/grid/page-first-disabled.gif')!important}.x-item-disabled .x-tbar-page-last{background-image:url('../../extjs/resources/themes/images/default/grid/page-last-disabled.gif')!important}.x-item-disabled .x-tbar-page-next{background-image:url('../../extjs/resources/themes/images/default/grid/page-next-disabled.gif')!important}.x-item-disabled .x-tbar-page-prev{background-image:url('../../extjs/resources/themes/images/default/grid/page-prev-disabled.gif')!important}.x-hmenu-sort-asc .x-menu-item-icon{background-image:url('../../extjs/resources/themes/images/default/grid/hmenu-asc.gif')}.x-hmenu-sort-desc .x-menu-item-icon{background-image:url('../../extjs/resources/themes/images/default/grid/hmenu-desc.gif')}.x-hmenu-lock .x-menu-item-icon{background-image:url('../../extjs/resources/themes/images/default/grid/hmenu-lock.gif')}.x-hmenu-unlock .x-menu-item-icon{background-image:url('../../extjs/resources/themes/images/default/grid/hmenu-unlock.gif')}.x-group-by-icon{background-image:url('../../extjs/resources/themes/images/default/grid/group-by.gif')}.x-cols-icon .x-menu-item-icon{background-image:url('../../extjs/resources/themes/images/default/grid/columns.gif')}.x-show-groups-icon{background-image:url('../../extjs/resources/themes/images/default/grid/group-by.gif')}.x-grid-drop-indicator{position:absolute;height:1px;line-height:0;background-color:#77bc71;overflow:visible}.x-grid-drop-indicator .x-grid-drop-indicator-left{position:absolute;top:-8px;left:-12px;background-image:url('../../extjs/resources/themes/images/default/grid/dd-insert-arrow-right.png');height:16px;width:16px}.x-grid-drop-indicator .x-grid-drop-indicator-right{position:absolute;top:-8px;right:-11px;background-image:url('../../extjs/resources/themes/images/default/grid/dd-insert-arrow-left.png');height:16px;width:16px}.x-ie6 .x-grid-drop-indicator-left{background-image:url('../../extjs/resources/themes/images/default/grid/dd-insert-arrow-right.gif')}.x-ie6 .x-grid-drop-indicator-right{background-image:url('../../extjs/resources/themes/images/default/grid/dd-insert-arrow-left.gif')}.x-grid-editor .x-form-text{padding:0 4px}.x-grid-editor .x-form-cb-wrap{padding-top:3px}.x-grid-row-editor{position:absolute!important;z-index:1;zoom:1;overflow:visible!important}.x-grid-row-editor .x-form-text{padding:0 2px}.x-grid-row-editor .x-form-cb-wrap{padding-top:0}.x-grid-row-editor .x-form-checkbox{margin-left:-4px}.x-grid-row-editor .x-form-display-field{font:normal 11px/15px Helvetica Neue,Arial,sans-serif;padding-top:0;padding-left:2px}.x-grid-row-editor .x-panel-body{background-color:white;border-top:1px solid #bfbfbf!important;border-bottom:1px solid #bfbfbf!important}.x-grid-editor .x-form-cb-wrap,.x-grid-row-editor .x-form-cb-wrap{text-align:center}.x-grid-editor .x-form-trigger,.x-grid-row-editor .x-form-trigger{height:19px}.x-grid-editor .x-form-trigger-wrap .x-form-spinner-up,.x-grid-editor .x-form-trigger-wrap .x-form-spinner-down,.x-grid-row-editor .x-form-trigger-wrap .x-form-spinner-up,.x-grid-row-editor .x-form-trigger-wrap .x-form-spinner-down{background-image:url('../../extjs/resources/themes/images/default/form/spinner-small.gif');height:10px!important}.x-grid-editor .x-form-text,.x-grid-row-editor .x-form-text{font:normal 11px/15px Helvetica Neue,Arial,sans-serif;height:18px}.x-border-box .x-grid-editor .x-form-trigger,.x-border-box .x-grid-row-editor .x-form-trigger{height:20px}.x-border-box .x-grid-editor .x-form-text,.x-border-box .x-grid-row-editor .x-form-text{height:20px;padding-bottom:1px}.x-ie .x-grid-editor .x-form-text{padding-left:5px}.x-ie .x-grid-row-editor .x-form-text{padding-left:3px}.x-ie8m .x-grid-editor .x-form-text,.x-ie8m .x-grid-row-editor .x-form-text{padding-top:1px}.x-strict .x-ie6 .x-grid-editor .x-form-text,.x-strict .x-ie6 .x-grid-row-editor .x-form-text,.x-strict .x-ie7 .x-grid-editor .x-form-text,.x-strict .x-ie7 .x-grid-row-editor .x-form-text{height:17px}.x-quirks .x-ie9 .x-grid-editor .x-form-text,.x-quirks .x-ie9 .x-grid-row-editor .x-form-text{line-height:17px}.x-opera .x-grid-editor .x-form-text{padding-left:5px}.x-opera .x-grid-row-editor .x-form-text{padding-left:3px}.x-grid-row-editor-buttons{background-color:white;position:absolute;bottom:-31px;padding:4px;height:32px}.x-strict .x-ie7m .x-grid-row-editor-buttons{width:192px;height:24px}.x-grid-row-editor-buttons-ml,.x-grid-row-editor-buttons-mr,.x-grid-row-editor-buttons-bl,.x-grid-row-editor-buttons-br,.x-grid-row-editor-buttons-bc{position:absolute;overflow:hidden}.x-grid-row-editor-buttons-bl,.x-grid-row-editor-buttons-br{width:4px;height:4px;bottom:0;background-image:url('../../extjs/resources/themes/images/default/panel/panel-default-framed-corners.gif')}.x-grid-row-editor-buttons-bl{left:0;background-position:0 -16px}.x-grid-row-editor-buttons-br{right:0;background-position:0 -20px}.x-grid-row-editor-buttons-bc{position:absolute;left:4px;bottom:0;width:192px;height:1px;background-color:#bfbfbf}.x-grid-row-editor-buttons-ml,.x-grid-row-editor-buttons-mr{height:27px;width:1px;top:1px;background-color:#bfbfbf}.x-grid-row-editor-buttons-ml{left:0}.x-grid-row-editor-buttons-mr{background-position:0 -20px;right:0}.x-grid-row-editor-errors ul{margin-left:5px}.x-grid-row-editor-errors li{list-style:disc;margin-left:15px}.x-webkit *:focus{outline:none!important}.x-form-item{vertical-align:top;table-layout:fixed}.x-autocontainer-form-item,.x-anchor-form-item,.x-vbox-form-item,.x-checkboxgroup-form-item,.x-table-form-item{margin-bottom:5px}.x-form-layout-table{border-collapse:separate;border-spacing:0 2px}.x-form-item-body{position:relative}.x-form-form-item td{border-top:1px solid transparent}.x-ie6 .x-form-layout-table{border-collapse:collapse;border-spacing:0}.x-ie6 .x-form-form-item td{border-top-width:0}.x-ie6 td.x-form-item-pad{height:5px}.x-editor .x-form-item-body{padding-bottom:0}.x-form-item-label{display:block;padding:3px 0 0;font-size:12px;user-select:none;-o-user-select:none;-ms-user-select:none;-moz-user-select:-moz-none;-webkit-user-select:none;cursor:default}.x-form-item-label-top{display:block;zoom:1;padding:0 0 5px 0}.x-form-item-label-right{text-align:right}.x-form-invalid-under{padding:2px 2px 2px 18px;color:#c0272b;font:normal 11px Helvetica Neue,Arial,sans-serif;line-height:16px;background:no-repeat 0 2px;background-image:url('../../extjs/resources/themes/images/default/form/exclamation.gif')}.x-form-invalid-icon{width:18px;height:14px;background:no-repeat center center;background-image:url('../../extjs/resources/themes/images/default/form/exclamation.gif');overflow:hidden}.x-form-invalid-icon ul{display:block;width:18px}.x-form-invalid-icon ul li{display:none}.x-lbl-top-err-icon{margin-bottom:4px}.x-form-field,.x-form-display-field{margin:0;font:normal 12px Helvetica Neue,Arial,sans-serif;color:black}.x-form-item-hidden{margin:0}.x-form-text,textarea.x-form-field{padding:1px 3px;background:repeat-x 0 0;border:1px solid;background-color:white;background-image:url('../../extjs/resources/themes/images/default/form/text-bg.gif');border-color:#b5b8c8}.x-form-text{height:18px;line-height:15px;vertical-align:top}.x-ie8m .x-form-text{line-height:15px}.x-border-box .x-form-text{height:22px}textarea.x-form-field{color:black;overflow:auto;height:auto;line-height:normal;background:repeat-x 0 0;background-color:white;background-image:url('../../extjs/resources/themes/images/default/form/text-bg.gif');resize:none}.x-border-box textarea.x-form-field{height:auto}.x-safari.x-mac textarea.x-form-field{margin-bottom:-2px}.x-form-focus,textarea.x-form-focus{border-color:#bebebe}.x-form-invalid-field,textarea.x-form-invalid-field{background-color:white;background-image:url('../../extjs/resources/themes/images/default/grid/invalid_line.gif');background-repeat:repeat-x;background-position:bottom;border-color:#c30}.x-form-item{font:normal 12px Helvetica Neue,Arial,sans-serif}.x-form-empty-field,textarea.x-form-empty-field{color:gray}.x-webkit .x-form-empty-field{line-height:15px}.x-form-display-field{padding-top:3px}.x-quirks .x-ie9p .x-form-text,.x-ie7m .x-form-text{margin-top:-1px;margin-bottom:-1px}.x-ie .x-form-file{height:23px;line-height:18px;vertical-align:middle}.x-field-default-toolbar .x-form-text{height:16px}.x-border-box .x-field-default-toolbar .x-form-text{height:20px}.x-field-default-toolbar .x-form-item-label-left{padding-left:4px}.x-fieldset{border:1px solid #b5b8c8;padding:10px;margin-bottom:10px;display:block;position:relative}.x-ie .x-fieldset{padding-top:0}.x-ie .x-fieldset .x-fieldset-body{padding-top:10px}.x-fieldset-header-checkbox{line-height:14px}.x-fieldset-header{font:11px/14px bold Helvetica Neue,Arial,sans-serif;color:#745351;padding:0 3px 1px;overflow:hidden}.x-fieldset-header .x-fieldset-header-text{float:left;padding:1px 0}.x-fieldset-header .x-fieldset-header-text-collapsible{cursor:pointer}.x-fieldset-header .x-form-item,.x-fieldset-header .x-tool{float:left;margin:1px 0 0 0}.x-fieldset-header .x-form-cb-wrap{padding:1px 0;font-size:0;line-height:0}.x-fieldset-with-title .x-fieldset-header-checkbox,.x-fieldset-with-title .x-tool{margin-right:3px}.x-webkit .x-fieldset-header{-webkit-padding-start:3px;-webkit-padding-end:3px}.x-opera .x-fieldset-with-legend{margin-top:-1px}.x-opera.x-mac .x-fieldset-header-text{padding:2px 0 0}.x-strict .x-ie8 .x-fieldset-header{margin-bottom:-1px}.x-strict .x-ie8 .x-fieldset-header .x-tool,.x-strict .x-ie8 .x-fieldset-header .x-fieldset-header-text,.x-strict .x-ie8 .x-fieldset-header .x-fieldset-header-checkbox{position:relative;top:-1px}.x-quirks .x-ie .x-fieldset-header,.x-ie8m .x-fieldset-header{padding-left:1px;padding-right:1px}.x-fieldset-collapsed .x-fieldset-body{display:none}.x-fieldset-collapsed{padding-bottom:0!important;border-width:1px 1px 0 1px!important;border-left-color:transparent!important;border-right-color:transparent!important}.x-ie6 .x-fieldset-collapsed{border-width:1px 0 0 0!important;padding-bottom:0!important;margin-left:1px;margin-right:1px}.x-ie .x-fieldset-bwrap{zoom:1}.x-ie .x-fieldset-noborder legend{position:relative;margin-bottom:23px}.x-ie .x-fieldset-noborder legend span{position:absolute;left:16px}.x-fieldset{overflow:hidden}.x-fieldset-bwrap{overflow:hidden;zoom:1}.x-fieldset-body{overflow:hidden}.x-form-file-wrap .x-form-text{color:#777}.x-form-file-wrap .x-form-file-btn{overflow:hidden}.x-form-file-wrap .x-form-file-input{position:absolute;top:-4px;right:-2px;height:30px;filter:alpha(opacity=0);opacity:0;font-size:100px}.x-form-cb-wrap{padding-top:3px}.x-form-checkbox,.x-form-radio{vertical-align:-1px;width:13px;height:13px;background:no-repeat;background-image:url('../../extjs/resources/themes/images/default/form/checkbox.gif');overflow:hidden;padding:0;border:0}.x-form-checkbox::-moz-focus-inner,.x-form-radio::-moz-focus-inner{padding:0;border:0}.x-nbr.x-ie .x-form-checkbox,.x-nbr.x-ie .x-form-radio{font-size:0}.x-form-cb-checked .x-form-checkbox,.x-form-cb-checked .x-form-radio{background-position:0 -13px}.x-form-cb-focus{background-position:-13px 0}.x-form-cb-checked .x-form-cb-focus{background-position:-13px -13px}.x-form-radio{background-image:url('../../extjs/resources/themes/images/default/form/radio.gif')}.x-form-cb-label-before{margin-right:4px}.x-form-cb-label-after{margin-left:4px}.x-form-checkboxgroup-body{padding:1px 4px 1px 4px}.x-form-invalid .x-form-checkboxgroup-body{border:1px solid #c30!important;background:transparent repeat-x bottom;background-image:url('../../extjs/resources/themes/images/default/grid/invalid_line.gif');padding:1px 3px 0 3px}.x-check-group-alt{background:#f2f2f2;border-top:1px dotted #d1d1d1;border-bottom:1px dotted #d1d1d1}.x-form-check-group-label{color:#333;border-bottom:1px solid #333;margin:0 30px 5px 0;padding:2px}.x-form-trigger-wrap{vertical-align:top}.x-form-trigger{background-image:url('../../extjs/resources/themes/images/default/form/trigger.gif');background-position:0 0;width:17px;height:21px;border-bottom:1px solid #b5b8c8;cursor:pointer;cursor:hand;overflow:hidden}.x-border-box .x-form-trigger{height:22px}.x-field-default-toolbar .x-form-trigger{height:19px}.x-border-box .x-field-default-toolbar .x-form-trigger{height:20px}.x-form-trigger-over{background-position:-17px 0;border-bottom-color:#bebebe}.x-form-trigger-wrap-focus .x-form-trigger{background-position:-51px 0;border-bottom-color:#bebebe}.x-form-trigger-wrap-focus .x-form-trigger-over{background-position:-68px 0}.x-form-trigger-click,.x-form-trigger-wrap-focus .x-form-trigger-click{background-position:-34px 0}.x-form-trigger-icon{height:16px;background-repeat:no-repeat;background-position:7px 6px}.x-pickerfield-open .x-form-field{-moz-border-radius-bottomleft:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;-moz-border-radius-bottomright:0;-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0}.x-pickerfield-open-above .x-form-field{-moz-border-radius-bottomleft:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;-moz-border-radius-topleft:0;-webkit-border-top-left-radius:0;border-top-left-radius:0;-moz-border-radius-topright:0;-webkit-border-top-right-radius:0;border-top-right-radius:0}.x-form-arrow-trigger .x-form-trigger-icon{background-image:url('../../extjs/resources/themes/images/default/boundlist/trigger-arrow.png')}.x-form-date-trigger{background-image:url('../../extjs/resources/themes/images/default/form/date-trigger.gif')}.x-form-trigger-wrap .x-form-spinner-up,.x-form-trigger-wrap .x-form-spinner-down{background-image:url('../../extjs/resources/themes/images/default/form/spinner.gif');width:17px!important;height:11px!important;font-size:0;border-bottom:0}.x-form-trigger-wrap .x-form-spinner-down{background-position:0 -11px}.x-form-trigger-wrap-focus .x-form-spinner-down{background-position:-51px -11px}.x-form-trigger-wrap .x-form-spinner-down-over{background-position:-17px -11px}.x-form-trigger-wrap-focus .x-form-spinner-down-over{background-position:-68px -11px}.x-form-trigger-wrap .x-form-spinner-down-click{background-position:-34px -11px}.x-field-default-toolbar .x-form-trigger-wrap .x-form-spinner-up,.x-field-default-toolbar .x-form-trigger-wrap .x-form-spinner-down{background-image:url('../../extjs/resources/themes/images/default/form/spinner-small.gif');height:10px!important}.x-field-default-toolbar .x-form-trigger-wrap .x-form-spinner-down{background-position:0 -10px}.x-field-default-toolbar .x-form-trigger-wrap-focus .x-form-spinner-down{background-position:-51px -10px}.x-field-default-toolbar .x-form-trigger-wrap .x-form-spinner-down-over{background-position:-17px -10px}.x-field-default-toolbar .x-form-trigger-wrap-focus .x-form-spinner-down-over{background-position:-68px -10px}.x-field-default-toolbar .x-form-trigger-wrap .x-form-spinner-down-click{background-position:-34px -10px}.x-trigger-noedit{cursor:pointer;cursor:hand}.x-item-disabled .x-trigger-noedit,.x-item-disabled .x-form-trigger{cursor:auto}.x-form-clear-trigger{background-image:url('../../extjs/resources/themes/images/default/form/clear-trigger.gif')}.x-form-search-trigger{background-image:url('../../extjs/resources/themes/images/default/form/search-trigger.gif')}.x-quirks .prefixie6 .x-form-trigger-input-cell{height:22px}.x-quirks .prefixie6 .x-field-default-toolbar .x-form-trigger-input-cell{height:20px}.x-html-editor-wrap{border:1px solid #b5b8c8}.x-html-editor-wrap .x-toolbar{border-top-width:0;border-left-width:0;border-right-width:0}.x-html-editor-wrap textarea{background-color:white}.x-html-editor-tb .x-btn-text{background:transparent no-repeat;background-image:url('../../extjs/resources/themes/images/default/editor/tb-sprite.gif')}.x-html-editor-tb .x-edit-bold,.x-menu-item img.x-edit-bold{background-position:0 0;background-image:url('../../extjs/resources/themes/images/default/editor/tb-sprite.gif')}.x-html-editor-tb .x-edit-italic,.x-menu-item img.x-edit-italic{background-position:-16px 0;background-image:url('../../extjs/resources/themes/images/default/editor/tb-sprite.gif')}.x-html-editor-tb .x-edit-underline,.x-menu-item img.x-edit-underline{background-position:-32px 0;background-image:url('../../extjs/resources/themes/images/default/editor/tb-sprite.gif')}.x-html-editor-tb .x-edit-forecolor,.x-menu-item img.x-edit-forecolor{background-position:-160px 0;background-image:url('../../extjs/resources/themes/images/default/editor/tb-sprite.gif')}.x-html-editor-tb .x-edit-backcolor,.x-menu-item img.x-edit-backcolor{background-position:-176px 0;background-image:url('../../extjs/resources/themes/images/default/editor/tb-sprite.gif')}.x-html-editor-tb .x-edit-justifyleft,.x-menu-item img.x-edit-justifyleft{background-position:-112px 0;background-image:url('../../extjs/resources/themes/images/default/editor/tb-sprite.gif')}.x-html-editor-tb .x-edit-justifycenter,.x-menu-item img.x-edit-justifycenter{background-position:-128px 0;background-image:url('../../extjs/resources/themes/images/default/editor/tb-sprite.gif')}.x-html-editor-tb .x-edit-justifyright,.x-menu-item img.x-edit-justifyright{background-position:-144px 0;background-image:url('../../extjs/resources/themes/images/default/editor/tb-sprite.gif')}.x-html-editor-tb .x-edit-insertorderedlist,.x-menu-item img.x-edit-insertorderedlist{background-position:-80px 0;background-image:url('../../extjs/resources/themes/images/default/editor/tb-sprite.gif')}.x-html-editor-tb .x-edit-insertunorderedlist,.x-menu-item img.x-edit-insertunorderedlist{background-position:-96px 0;background-image:url('../../extjs/resources/themes/images/default/editor/tb-sprite.gif')}.x-html-editor-tb .x-edit-increasefontsize,.x-menu-item img.x-edit-increasefontsize{background-position:-48px 0;background-image:url('../../extjs/resources/themes/images/default/editor/tb-sprite.gif')}.x-html-editor-tb .x-edit-decreasefontsize,.x-menu-item img.x-edit-decreasefontsize{background-position:-64px 0;background-image:url('../../extjs/resources/themes/images/default/editor/tb-sprite.gif')}.x-html-editor-tb .x-edit-sourceedit,.x-menu-item img.x-edit-sourceedit{background-position:-192px 0;background-image:url('../../extjs/resources/themes/images/default/editor/tb-sprite.gif')}.x-html-editor-tb .x-edit-createlink,.x-menu-item img.x-edit-createlink{background-position:-208px 0;background-image:url('../../extjs/resources/themes/images/default/editor/tb-sprite.gif')}.x-html-editor-tip .x-tip-bd .x-tip-bd-inner{padding:5px;padding-bottom:1px}.x-html-editor-tb .x-toolbar{position:static!important}.x-html-editor-tb .x-font-select{font-size:11px}.x-html-editor-wrap textarea{border:0;padding:3px 2px;overflow:auto}.x-panel,.x-plain{overflow:hidden;position:relative}.x-ie .x-panel-header,.x-ie .x-panel-header-tl,.x-ie .x-panel-header-tc,.x-ie .x-panel-header-tr,.x-ie .x-panel-header-ml,.x-ie .x-panel-header-mc,.x-ie .x-panel-header-mr,.x-ie .x-panel-header-bl,.x-ie .x-panel-header-bc,.x-ie .x-panel-header-br{zoom:1}.x-ie8 td.x-frame-mc{vertical-align:top}.x-panel-header-horizontal{padding:3px 5px 4px}.x-panel-header-vertical{padding:5px 4px}.x-panel-header-icon,.x-window-header-icon{width:16px;height:16px;background-repeat:no-repeat;background-position:0 0;vertical-align:middle;margin-right:4px}.x-vertical .x-panel-header-icon,.x-vertical .x-window-header-icon{margin:0 0 4px}.x-panel-header-draggable,.x-panel-header-draggable .x-panel-header-text,.x-window-header-draggable,.x-window-header-draggable .x-window-header-text{cursor:move}.x-panel-ghost,.x-window-ghost{filter:alpha(opacity=65);opacity:.65;cursor:move}.x-panel-header-horizontal .x-panel-header-body,.x-panel-header-horizontal .x-window-header-body,.x-panel-header-horizontal .x-btn-group-header-body,.x-window-header-horizontal .x-panel-header-body,.x-window-header-horizontal .x-window-header-body,.x-window-header-horizontal .x-btn-group-header-body,.x-btn-group-header-horizontal .x-panel-header-body,.x-btn-group-header-horizontal .x-window-header-body,.x-btn-group-header-horizontal .x-btn-group-header-body{width:100%}.x-panel-header-vertical .x-panel-header-body,.x-panel-header-vertical .x-window-header-body,.x-panel-header-vertical .x-btn-group-header-body,.x-window-header-vertical .x-panel-header-body,.x-window-header-vertical .x-window-header-body,.x-window-header-vertical .x-btn-group-header-body,.x-btn-group-header-vertical .x-panel-header-body,.x-btn-group-header-vertical .x-window-header-body,.x-btn-group-header-vertical .x-btn-group-header-body{height:100%}.x-panel-header-text-container{overflow:hidden;-o-text-overflow:ellipsis;text-overflow:ellipsis}.x-panel-header-text{user-select:none;-o-user-select:none;-ms-user-select:none;-moz-user-select:-moz-none;-webkit-user-select:none;cursor:default;white-space:nowrap}.x-panel-header-left .x-vml-base,.x-panel-header-right .x-vml-base{left:-3px!important}.x-panel-body{overflow:hidden;position:relative;font-size:13px}.x-panel-header-vertical .x-surface{padding-left:1px}.x-opera .x-panel-header-vertical .x-surface,.x-strict .x-ie9 .x-panel-header-vertical .x-surface{padding-left:2px}.x-panel-collapsed .x-panel-header-collapsed-border-top{border-bottom-width:1px!important}.x-panel-collapsed .x-panel-header-collapsed-border-right{border-left-width:1px!important}.x-panel-collapsed .x-panel-header-collapsed-border-bottom{border-top-width:1px!important}.x-panel-collapsed .x-panel-header-collapsed-border-left{border-right-width:1px!important}.x-nlg .x-panel-header-vertical .x-frame-mc{background-repeat:repeat-y}.x-panel-default{border-color:#bfbfbf}.x-panel-header-default{font-size:11px;border-color:#bfbfbf;border-width:1px;border-style:solid;background-image:none;background-color:#f2f1f1;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,#fbfafa),color-stop(45%,#f3f2f2),color-stop(46%,#e0dcdc),color-stop(50%,#e0dcdc),color-stop(51%,#e7e4e4),color-stop(100%,#f2f1f1));background-image:-webkit-linear-gradient(top,#fbfafa,#f3f2f2 45%,#e0dcdc 46%,#e0dcdc 50%,#e7e4e4 51%,#f2f1f1);background-image:-moz-linear-gradient(top,#fbfafa,#f3f2f2 45%,#e0dcdc 46%,#e0dcdc 50%,#e7e4e4 51%,#f2f1f1);background-image:-o-linear-gradient(top,#fbfafa,#f3f2f2 45%,#e0dcdc 46%,#e0dcdc 50%,#e7e4e4 51%,#f2f1f1);background-image:linear-gradient(top,#fbfafa,#f3f2f2 45%,#e0dcdc 46%,#e0dcdc 50%,#e7e4e4 51%,#f2f1f1);-webkit-box-shadow:white 0 1px 0 0 inset;-moz-box-shadow:white 0 1px 0 0 inset;box-shadow:white 0 1px 0 0 inset}.x-nlg .x-panel-header-default-top{background-image:url('../../extjs/resources/themes/images/default/panel-header/panel-header-default-top-bg.gif')}.x-nlg .x-panel-header-default-bottom{background-image:url('../../extjs/resources/themes/images/default/panel-header/panel-header-default-bottom-bg.gif')}.x-nlg .x-panel-header-default-left{background-image:url('../../extjs/resources/themes/images/default/panel-header/panel-header-default-left-bg.gif')}.x-nlg .x-panel-header-default-right{background-image:url('../../extjs/resources/themes/images/default/panel-header/panel-header-default-right-bg.gif')}.x-nlg .x-panel-header-default-right{background-position:top right}.x-nlg .x-panel-header-default-bottom{background-position:bottom left}.x-panel-header-text-default{color:#7e3737;font-size:11px;font-weight:bold;font-family:Helvetica Neue,Arial,sans-serif;line-height:17px}.x-panel-body-default{background:white;border-color:#bfbfbf;color:black;border-width:1px;border-style:solid}.x-panel-collapsed .x-window-header-default,.x-panel-collapsed .x-panel-header-default{border-color:#bfbfbf}.x-panel-header-default-vertical{border-color:#bfbfbf}.x-panel-header-default-left,.x-panel-header-default-right{background-image:none;background-color:#f2f1f1;background-image:-webkit-gradient(linear,100% 50%,0% 50%,color-stop(0%,#fbfafa),color-stop(45%,#f3f2f2),color-stop(46%,#e0dcdc),color-stop(50%,#e0dcdc),color-stop(51%,#e7e4e4),color-stop(100%,#f2f1f1));background-image:-webkit-linear-gradient(right,#fbfafa,#f3f2f2 45%,#e0dcdc 46%,#e0dcdc 50%,#e7e4e4 51%,#f2f1f1);background-image:-moz-linear-gradient(right,#fbfafa,#f3f2f2 45%,#e0dcdc 46%,#e0dcdc 50%,#e7e4e4 51%,#f2f1f1);background-image:-o-linear-gradient(right,#fbfafa,#f3f2f2 45%,#e0dcdc 46%,#e0dcdc 50%,#e7e4e4 51%,#f2f1f1);background-image:linear-gradient(right,#fbfafa,#f3f2f2 45%,#e0dcdc 46%,#e0dcdc 50%,#e7e4e4 51%,#f2f1f1)}.x-panel-header-default-top{-webkit-box-shadow:white 0 1px 0 0 inset;-moz-box-shadow:white 0 1px 0 0 inset;box-shadow:white 0 1px 0 0 inset}.x-panel-header-default-right{-webkit-box-shadow:white -1px 0 0 0 inset;-moz-box-shadow:white -1px 0 0 0 inset;box-shadow:white -1px 0 0 0 inset}.x-panel-header-default-bottom{-webkit-box-shadow:white 0 -1px 0 0 inset;-moz-box-shadow:white 0 -1px 0 0 inset;box-shadow:white 0 -1px 0 0 inset}.x-panel-header-default-left{-webkit-box-shadow:white 1px 0 0 0 inset;-moz-box-shadow:white 1px 0 0 0 inset;box-shadow:white 1px 0 0 0 inset}.x-panel-header-default-right-tc,.x-panel-header-default-right-mc,.x-panel-header-default-right-bc{background-position:right 0}.x-panel-header-default-bottom-tc,.x-panel-header-default-bottom-mc,.x-panel-header-default-bottom-bc{background-position:0 bottom}.x-panel-default-framed{border-color:#bfbfbf}.x-panel-header-default-framed{font-size:11px;border-color:#bfbfbf;border-width:1px;border-style:solid;background-image:none;background-color:#f2f1f1;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,#fbfafa),color-stop(45%,#f3f2f2),color-stop(46%,#e0dcdc),color-stop(50%,#e0dcdc),color-stop(51%,#e7e4e4),color-stop(100%,#f2f1f1));background-image:-webkit-linear-gradient(top,#fbfafa,#f3f2f2 45%,#e0dcdc 46%,#e0dcdc 50%,#e7e4e4 51%,#f2f1f1);background-image:-moz-linear-gradient(top,#fbfafa,#f3f2f2 45%,#e0dcdc 46%,#e0dcdc 50%,#e7e4e4 51%,#f2f1f1);background-image:-o-linear-gradient(top,#fbfafa,#f3f2f2 45%,#e0dcdc 46%,#e0dcdc 50%,#e7e4e4 51%,#f2f1f1);background-image:linear-gradient(top,#fbfafa,#f3f2f2 45%,#e0dcdc 46%,#e0dcdc 50%,#e7e4e4 51%,#f2f1f1);-webkit-box-shadow:white 0 1px 0 0 inset;-moz-box-shadow:white 0 1px 0 0 inset;box-shadow:white 0 1px 0 0 inset}.x-nlg .x-panel-header-default-framed-top{background-image:url('../../extjs/resources/themes/images/default/panel-header/panel-header-default-framed-top-bg.gif')}.x-nlg .x-panel-header-default-framed-bottom{background-image:url('../../extjs/resources/themes/images/default/panel-header/panel-header-default-framed-bottom-bg.gif')}.x-nlg .x-panel-header-default-framed-left{background-image:url('../../extjs/resources/themes/images/default/panel-header/panel-header-default-framed-left-bg.gif')}.x-nlg .x-panel-header-default-framed-right{background-image:url('../../extjs/resources/themes/images/default/panel-header/panel-header-default-framed-right-bg.gif')}.x-nlg .x-panel-header-default-framed-right{background-position:top right}.x-nlg .x-panel-header-default-framed-bottom{background-position:bottom left}.x-nbr .x-panel-header-default-framed{background-image:none}.x-strict .x-ie9 .x-panel-header-default-framed-top,.x-nlg.x-opera .x-panel-header-default-framed-top,.x-nlg.x-safari .x-panel-header-default-framed-top{background-image:url('../../extjs/resources/themes/images/default/panel-header/panel-header-default-top-bg.gif')}.x-strict .x-ie9 .x-panel-header-default-framed-bottom,.x-nlg.x-opera .x-panel-header-default-framed-bottom,.x-nlg.x-safari .x-panel-header-default-framed-bottom{background-image:url('../../extjs/resources/themes/images/default/panel-header/panel-header-default-bottom-bg.gif')}.x-strict .x-ie9 .x-panel-header-default-framed-left,.x-nlg.x-opera .x-panel-header-default-framed-left,.x-nlg.x-safari .x-panel-header-default-framed-left{background-image:url('../../extjs/resources/themes/images/default/panel-header/panel-header-default-left-bg.gif')}.x-strict .x-ie9 .x-panel-header-default-framed-right,.x-nlg.x-opera .x-panel-header-default-framed-right,.x-nlg.x-safari .x-panel-header-default-framed-right{background-image:url('../../extjs/resources/themes/images/default/panel-header/panel-header-default-right-bg.gif')}.x-panel-header-text-default-framed{color:#7e3737;font-size:11px;font-weight:bold;font-family:Helvetica Neue,Arial,sans-serif;line-height:17px}.x-panel-body-default-framed{background:#fdfdfd;border-color:#bfbfbf;color:black;border-width:0;border-style:solid}.x-panel-collapsed .x-window-header-default-framed,.x-panel-collapsed .x-panel-header-default-framed{border-color:#bfbfbf}.x-panel-header-default-framed-vertical{border-color:#bfbfbf}.x-panel-header-default-framed-left,.x-panel-header-default-framed-right{background-image:none;background-color:#f2f1f1;background-image:-webkit-gradient(linear,100% 50%,0% 50%,color-stop(0%,#fbfafa),color-stop(45%,#f3f2f2),color-stop(46%,#e0dcdc),color-stop(50%,#e0dcdc),color-stop(51%,#e7e4e4),color-stop(100%,#f2f1f1));background-image:-webkit-linear-gradient(right,#fbfafa,#f3f2f2 45%,#e0dcdc 46%,#e0dcdc 50%,#e7e4e4 51%,#f2f1f1);background-image:-moz-linear-gradient(right,#fbfafa,#f3f2f2 45%,#e0dcdc 46%,#e0dcdc 50%,#e7e4e4 51%,#f2f1f1);background-image:-o-linear-gradient(right,#fbfafa,#f3f2f2 45%,#e0dcdc 46%,#e0dcdc 50%,#e7e4e4 51%,#f2f1f1);background-image:linear-gradient(right,#fbfafa,#f3f2f2 45%,#e0dcdc 46%,#e0dcdc 50%,#e7e4e4 51%,#f2f1f1)}.x-panel-default-framed{-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px;padding:4px 4px 4px 4px;border-width:1px;border-style:solid;background-color:#fdfdfd}.x-nlg .x-panel-default-framed-mc{background-color:#fdfdfd}.x-nbr .x-panel-default-framed{padding:0!important;border-width:0!important;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0;background-color:transparent;background-position:1000404px 1000404px}.x-nbr .x-panel-default-framed-tl,.x-nbr .x-panel-default-framed-bl,.x-nbr .x-panel-default-framed-tr,.x-nbr .x-panel-default-framed-br,.x-nbr .x-panel-default-framed-tc,.x-nbr .x-panel-default-framed-bc,.x-nbr .x-panel-default-framed-ml,.x-nbr .x-panel-default-framed-mr{zoom:1;background-image:url('../../extjs/resources/themes/images/default/panel/panel-default-framed-corners.gif')}.x-nbr .x-panel-default-framed-ml,.x-nbr .x-panel-default-framed-mr{zoom:1;background-image:url('../../extjs/resources/themes/images/default/panel/panel-default-framed-sides.gif');background-position:0 0;background-repeat:repeat-y}.x-nbr .x-panel-default-framed-mc{padding:1px 1px 1px 1px}.x-strict .x-ie7 .x-panel-default-framed-tl,.x-strict .x-ie7 .x-panel-default-framed-bl{position:relative;right:0}.x-panel-header-default-framed-top{-moz-border-radius-topleft:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topright:4px;-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-bottomright:0;-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0;-moz-border-radius-bottomleft:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;padding:3px 5px 4px 5px;border-width:1px 1px 0 1px;border-style:solid;background-image:none;background-color:#f2f1f1;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,#fbfafa),color-stop(45%,#f3f2f2),color-stop(46%,#e0dcdc),color-stop(50%,#e0dcdc),color-stop(51%,#e7e4e4),color-stop(100%,#f2f1f1));background-image:-webkit-linear-gradient(top,#fbfafa,#f3f2f2 45%,#e0dcdc 46%,#e0dcdc 50%,#e7e4e4 51%,#f2f1f1);background-image:-moz-linear-gradient(top,#fbfafa,#f3f2f2 45%,#e0dcdc 46%,#e0dcdc 50%,#e7e4e4 51%,#f2f1f1);background-image:-o-linear-gradient(top,#fbfafa,#f3f2f2 45%,#e0dcdc 46%,#e0dcdc 50%,#e7e4e4 51%,#f2f1f1);background-image:linear-gradient(top,#fbfafa,#f3f2f2 45%,#e0dcdc 46%,#e0dcdc 50%,#e7e4e4 51%,#f2f1f1)}.x-nlg .x-panel-header-default-framed-top-mc{background-image:url('../../extjs/resources/themes/images/default/panel-header/panel-header-default-framed-top-bg.gif');background-color:#f2f1f1}.x-nbr .x-panel-header-default-framed-top{padding:0!important;border-width:0!important;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0;background-color:transparent;background-position:1000404px 1000000px}.x-nbr .x-panel-header-default-framed-top-tl,.x-nbr .x-panel-header-default-framed-top-bl,.x-nbr .x-panel-header-default-framed-top-tr,.x-nbr .x-panel-header-default-framed-top-br,.x-nbr .x-panel-header-default-framed-top-tc,.x-nbr .x-panel-header-default-framed-top-bc,.x-nbr .x-panel-header-default-framed-top-ml,.x-nbr .x-panel-header-default-framed-top-mr{zoom:1;background-image:url('../../extjs/resources/themes/images/default/panel-header/panel-header-default-framed-top-corners.gif')}.x-nbr .x-panel-header-default-framed-top-ml,.x-nbr .x-panel-header-default-framed-top-mr{zoom:1;background-image:url('../../extjs/resources/themes/images/default/panel-header/panel-header-default-framed-top-sides.gif');background-position:0 0}.x-nbr .x-panel-header-default-framed-top-mc{padding:0 2px 4px 2px}.x-strict .x-ie7 .x-panel-header-default-framed-top-tl,.x-strict .x-ie7 .x-panel-header-default-framed-top-bl{position:relative;right:0}.x-panel-header-default-framed-right{-moz-border-radius-topleft:0;-webkit-border-top-left-radius:0;border-top-left-radius:0;-moz-border-radius-topright:4px;-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-bottomright:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-bottomleft:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;padding:5px 4px 5px 4px;border-width:1px 1px 1px 0;border-style:solid;background-image:none;background-color:#f2f1f1;background-image:-webkit-gradient(linear,100% 50%,0% 50%,color-stop(0%,#fbfafa),color-stop(45%,#f3f2f2),color-stop(46%,#e0dcdc),color-stop(50%,#e0dcdc),color-stop(51%,#e7e4e4),color-stop(100%,#f2f1f1));background-image:-webkit-linear-gradient(right,#fbfafa,#f3f2f2 45%,#e0dcdc 46%,#e0dcdc 50%,#e7e4e4 51%,#f2f1f1);background-image:-moz-linear-gradient(right,#fbfafa,#f3f2f2 45%,#e0dcdc 46%,#e0dcdc 50%,#e7e4e4 51%,#f2f1f1);background-image:-o-linear-gradient(right,#fbfafa,#f3f2f2 45%,#e0dcdc 46%,#e0dcdc 50%,#e7e4e4 51%,#f2f1f1);background-image:linear-gradient(right,#fbfafa,#f3f2f2 45%,#e0dcdc 46%,#e0dcdc 50%,#e7e4e4 51%,#f2f1f1)}.x-nlg .x-panel-header-default-framed-right-mc{background-image:url('../../extjs/resources/themes/images/default/panel-header/panel-header-default-framed-right-bg.gif');background-color:#f2f1f1}.x-nbr .x-panel-header-default-framed-right{padding:0!important;border-width:0!important;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0;background-color:transparent;background-position:1000004px 1100400px}.x-nbr .x-panel-header-default-framed-right-tl,.x-nbr .x-panel-header-default-framed-right-bl,.x-nbr .x-panel-header-default-framed-right-tr,.x-nbr .x-panel-header-default-framed-right-br,.x-nbr .x-panel-header-default-framed-right-tc,.x-nbr .x-panel-header-default-framed-right-bc,.x-nbr .x-panel-header-default-framed-right-ml,.x-nbr .x-panel-header-default-framed-right-mr{zoom:1;background-image:url('../../extjs/resources/themes/images/default/panel-header/panel-header-default-framed-right-corners.gif')}.x-nbr .x-panel-header-default-framed-right-tc,.x-nbr .x-panel-header-default-framed-right-bc{zoom:1;background-image:url('../../extjs/resources/themes/images/default/panel-header/panel-header-default-framed-right-sides.gif');background-position:0 0;background-repeat:repeat-x}.x-nbr .x-panel-header-default-framed-right-mc{padding:2px 1px 2px 4px}.x-strict .x-ie7 .x-panel-header-default-framed-right-tl,.x-strict .x-ie7 .x-panel-header-default-framed-right-bl{position:relative;right:0}.x-panel-header-default-framed-bottom{-moz-border-radius-topleft:0;-webkit-border-top-left-radius:0;border-top-left-radius:0;-moz-border-radius-topright:0;-webkit-border-top-right-radius:0;border-top-right-radius:0;-moz-border-radius-bottomright:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-bottomleft:4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;padding:3px 5px 4px 5px;border-width:0 1px 1px 1px;border-style:solid;background-image:none;background-color:#f2f1f1;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,#fbfafa),color-stop(45%,#f3f2f2),color-stop(46%,#e0dcdc),color-stop(50%,#e0dcdc),color-stop(51%,#e7e4e4),color-stop(100%,#f2f1f1));background-image:-webkit-linear-gradient(top,#fbfafa,#f3f2f2 45%,#e0dcdc 46%,#e0dcdc 50%,#e7e4e4 51%,#f2f1f1);background-image:-moz-linear-gradient(top,#fbfafa,#f3f2f2 45%,#e0dcdc 46%,#e0dcdc 50%,#e7e4e4 51%,#f2f1f1);background-image:-o-linear-gradient(top,#fbfafa,#f3f2f2 45%,#e0dcdc 46%,#e0dcdc 50%,#e7e4e4 51%,#f2f1f1);background-image:linear-gradient(top,#fbfafa,#f3f2f2 45%,#e0dcdc 46%,#e0dcdc 50%,#e7e4e4 51%,#f2f1f1)}.x-nlg .x-panel-header-default-framed-bottom-mc{background-image:url('../../extjs/resources/themes/images/default/panel-header/panel-header-default-framed-bottom-bg.gif');background-color:#f2f1f1}.x-nbr .x-panel-header-default-framed-bottom{padding:0!important;border-width:0!important;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0;background-color:transparent;background-position:1000000px 1000404px}.x-nbr .x-panel-header-default-framed-bottom-tl,.x-nbr .x-panel-header-default-framed-bottom-bl,.x-nbr .x-panel-header-default-framed-bottom-tr,.x-nbr .x-panel-header-default-framed-bottom-br,.x-nbr .x-panel-header-default-framed-bottom-tc,.x-nbr .x-panel-header-default-framed-bottom-bc,.x-nbr .x-panel-header-default-framed-bottom-ml,.x-nbr .x-panel-header-default-framed-bottom-mr{zoom:1;background-image:url('../../extjs/resources/themes/images/default/panel-header/panel-header-default-framed-bottom-corners.gif')}.x-nbr .x-panel-header-default-framed-bottom-ml,.x-nbr .x-panel-header-default-framed-bottom-mr{zoom:1;background-image:url('../../extjs/resources/themes/images/default/panel-header/panel-header-default-framed-bottom-sides.gif');background-position:0 0}.x-nbr .x-panel-header-default-framed-bottom-mc{padding:3px 2px 1px 2px}.x-strict .x-ie7 .x-panel-header-default-framed-bottom-tl,.x-strict .x-ie7 .x-panel-header-default-framed-bottom-bl{position:relative;right:0}.x-panel-header-default-framed-left{-moz-border-radius-topleft:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topright:0;-webkit-border-top-right-radius:0;border-top-right-radius:0;-moz-border-radius-bottomright:0;-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0;-moz-border-radius-bottomleft:4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;padding:5px 4px 5px 4px;border-width:1px 0 1px 1px;border-style:solid;background-image:none;background-color:#f2f1f1;background-image:-webkit-gradient(linear,100% 50%,0% 50%,color-stop(0%,#fbfafa),color-stop(45%,#f3f2f2),color-stop(46%,#e0dcdc),color-stop(50%,#e0dcdc),color-stop(51%,#e7e4e4),color-stop(100%,#f2f1f1));background-image:-webkit-linear-gradient(right,#fbfafa,#f3f2f2 45%,#e0dcdc 46%,#e0dcdc 50%,#e7e4e4 51%,#f2f1f1);background-image:-moz-linear-gradient(right,#fbfafa,#f3f2f2 45%,#e0dcdc 46%,#e0dcdc 50%,#e7e4e4 51%,#f2f1f1);background-image:-o-linear-gradient(right,#fbfafa,#f3f2f2 45%,#e0dcdc 46%,#e0dcdc 50%,#e7e4e4 51%,#f2f1f1);background-image:linear-gradient(right,#fbfafa,#f3f2f2 45%,#e0dcdc 46%,#e0dcdc 50%,#e7e4e4 51%,#f2f1f1)}.x-nlg .x-panel-header-default-framed-left-mc{background-image:url('../../extjs/resources/themes/images/default/panel-header/panel-header-default-framed-left-bg.gif');background-color:#f2f1f1}.x-nbr .x-panel-header-default-framed-left{padding:0!important;border-width:0!important;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0;background-color:transparent;background-position:1000400px 1100004px}.x-nbr .x-panel-header-default-framed-left-tl,.x-nbr .x-panel-header-default-framed-left-bl,.x-nbr .x-panel-header-default-framed-left-tr,.x-nbr .x-panel-header-default-framed-left-br,.x-nbr .x-panel-header-default-framed-left-tc,.x-nbr .x-panel-header-default-framed-left-bc,.x-nbr .x-panel-header-default-framed-left-ml,.x-nbr .x-panel-header-default-framed-left-mr{zoom:1;background-image:url('../../extjs/resources/themes/images/default/panel-header/panel-header-default-framed-left-corners.gif')}.x-nbr .x-panel-header-default-framed-left-tc,.x-nbr .x-panel-header-default-framed-left-bc{zoom:1;background-image:url('../../extjs/resources/themes/images/default/panel-header/panel-header-default-framed-left-sides.gif');background-position:0 0;background-repeat:repeat-x}.x-nbr .x-panel-header-default-framed-left-mc{padding:2px 4px 2px 1px}.x-strict .x-ie7 .x-panel-header-default-framed-left-tl,.x-strict .x-ie7 .x-panel-header-default-framed-left-bl{position:relative;right:0}.x-panel-header-default-framed-top{-webkit-box-shadow:white 0 1px 0 0 inset,white -1px 0 0 0 inset,white 1px 0 0 0 inset;-moz-box-shadow:white 0 1px 0 0 inset,white -1px 0 0 0 inset,white 1px 0 0 0 inset;box-shadow:white 0 1px 0 0 inset,white -1px 0 0 0 inset,white 1px 0 0 0 inset}.x-panel-header-default-framed-right{-webkit-box-shadow:white 0 1px 0 0 inset,white 0 -1px 0 0 inset,white -1px 0 0 0 inset;-moz-box-shadow:white 0 1px 0 0 inset,white 0 -1px 0 0 inset,white -1px 0 0 0 inset;box-shadow:white 0 1px 0 0 inset,white 0 -1px 0 0 inset,white -1px 0 0 0 inset}.x-panel-header-default-framed-bottom{-webkit-box-shadow:white 0 -1px 0 0 inset,white -1px 0 0 0 inset,white 1px 0 0 0 inset;-moz-box-shadow:white 0 -1px 0 0 inset,white -1px 0 0 0 inset,white 1px 0 0 0 inset;box-shadow:white 0 -1px 0 0 inset,white -1px 0 0 0 inset,white 1px 0 0 0 inset}.x-panel-header-default-framed-left{-webkit-box-shadow:white 0 1px 0 0 inset,white 0 -1px 0 0 inset,white 1px 0 0 0 inset;-moz-box-shadow:white 0 1px 0 0 inset,white 0 -1px 0 0 inset,white 1px 0 0 0 inset;box-shadow:white 0 1px 0 0 inset,white 0 -1px 0 0 inset,white 1px 0 0 0 inset}.x-panel .x-panel-header-default-framed-top{border-bottom-width:1px!important}.x-panel .x-panel-header-default-framed-right{border-left-width:1px!important}.x-panel .x-panel-header-default-framed-bottom{border-top-width:1px!important}.x-panel .x-panel-header-default-framed-left{border-right-width:1px!important}.x-panel-header-default-framed-collapsed{-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px}.x-panel-header-default-framed-collapsed-top{-moz-border-radius-topleft:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topright:4px;-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-bottomright:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-bottomleft:4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;padding:3px 5px 4px 5px;border-width:1px;border-style:solid;background-image:none;background-color:#f2f1f1;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,#fbfafa),color-stop(45%,#f3f2f2),color-stop(46%,#e0dcdc),color-stop(50%,#e0dcdc),color-stop(51%,#e7e4e4),color-stop(100%,#f2f1f1));background-image:-webkit-linear-gradient(top,#fbfafa,#f3f2f2 45%,#e0dcdc 46%,#e0dcdc 50%,#e7e4e4 51%,#f2f1f1);background-image:-moz-linear-gradient(top,#fbfafa,#f3f2f2 45%,#e0dcdc 46%,#e0dcdc 50%,#e7e4e4 51%,#f2f1f1);background-image:-o-linear-gradient(top,#fbfafa,#f3f2f2 45%,#e0dcdc 46%,#e0dcdc 50%,#e7e4e4 51%,#f2f1f1);background-image:linear-gradient(top,#fbfafa,#f3f2f2 45%,#e0dcdc 46%,#e0dcdc 50%,#e7e4e4 51%,#f2f1f1)}.x-nlg .x-panel-header-default-framed-collapsed-top-mc{background-image:url('../../extjs/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-top-bg.gif');background-color:#f2f1f1}.x-nbr .x-panel-header-default-framed-collapsed-top{padding:0!important;border-width:0!important;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0;background-color:transparent;background-position:1000404px 1000404px}.x-nbr .x-panel-header-default-framed-collapsed-top-tl,.x-nbr .x-panel-header-default-framed-collapsed-top-bl,.x-nbr .x-panel-header-default-framed-collapsed-top-tr,.x-nbr .x-panel-header-default-framed-collapsed-top-br,.x-nbr .x-panel-header-default-framed-collapsed-top-tc,.x-nbr .x-panel-header-default-framed-collapsed-top-bc,.x-nbr .x-panel-header-default-framed-collapsed-top-ml,.x-nbr .x-panel-header-default-framed-collapsed-top-mr{zoom:1;background-image:url('../../extjs/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-top-corners.gif')}.x-nbr .x-panel-header-default-framed-collapsed-top-ml,.x-nbr .x-panel-header-default-framed-collapsed-top-mr{zoom:1;background-image:url('../../extjs/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-top-sides.gif');background-position:0 0}.x-nbr .x-panel-header-default-framed-collapsed-top-mc{padding:0 2px 1px 2px}.x-strict .x-ie7 .x-panel-header-default-framed-collapsed-top-tl,.x-strict .x-ie7 .x-panel-header-default-framed-collapsed-top-bl{position:relative;right:0}.x-panel-header-default-framed-collapsed-right{-moz-border-radius-topleft:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topright:4px;-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-bottomright:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-bottomleft:4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;padding:5px 4px 5px 4px;border-width:1px;border-style:solid;background-image:none;background-color:#f2f1f1;background-image:-webkit-gradient(linear,100% 50%,0% 50%,color-stop(0%,#fbfafa),color-stop(45%,#f3f2f2),color-stop(46%,#e0dcdc),color-stop(50%,#e0dcdc),color-stop(51%,#e7e4e4),color-stop(100%,#f2f1f1));background-image:-webkit-linear-gradient(right,#fbfafa,#f3f2f2 45%,#e0dcdc 46%,#e0dcdc 50%,#e7e4e4 51%,#f2f1f1);background-image:-moz-linear-gradient(right,#fbfafa,#f3f2f2 45%,#e0dcdc 46%,#e0dcdc 50%,#e7e4e4 51%,#f2f1f1);background-image:-o-linear-gradient(right,#fbfafa,#f3f2f2 45%,#e0dcdc 46%,#e0dcdc 50%,#e7e4e4 51%,#f2f1f1);background-image:linear-gradient(right,#fbfafa,#f3f2f2 45%,#e0dcdc 46%,#e0dcdc 50%,#e7e4e4 51%,#f2f1f1)}.x-nlg .x-panel-header-default-framed-collapsed-right-mc{background-image:url('../../extjs/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-right-bg.gif');background-color:#f2f1f1}.x-nbr .x-panel-header-default-framed-collapsed-right{padding:0!important;border-width:0!important;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0;background-color:transparent;background-position:1000404px 1100404px}.x-nbr .x-panel-header-default-framed-collapsed-right-tl,.x-nbr .x-panel-header-default-framed-collapsed-right-bl,.x-nbr .x-panel-header-default-framed-collapsed-right-tr,.x-nbr .x-panel-header-default-framed-collapsed-right-br,.x-nbr .x-panel-header-default-framed-collapsed-right-tc,.x-nbr .x-panel-header-default-framed-collapsed-right-bc,.x-nbr .x-panel-header-default-framed-collapsed-right-ml,.x-nbr .x-panel-header-default-framed-collapsed-right-mr{zoom:1;background-image:url('../../extjs/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-right-corners.gif')}.x-nbr .x-panel-header-default-framed-collapsed-right-tc,.x-nbr .x-panel-header-default-framed-collapsed-right-bc{zoom:1;background-image:url('../../extjs/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-right-sides.gif');background-position:0 0;background-repeat:repeat-x}.x-nbr .x-panel-header-default-framed-collapsed-right-mc{padding:2px 1px 2px 1px}.x-strict .x-ie7 .x-panel-header-default-framed-collapsed-right-tl,.x-strict .x-ie7 .x-panel-header-default-framed-collapsed-right-bl{position:relative;right:0}.x-panel-header-default-framed-collapsed-bottom{-moz-border-radius-topleft:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topright:4px;-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-bottomright:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-bottomleft:4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;padding:3px 5px 4px 5px;border-width:1px;border-style:solid;background-image:none;background-color:#f2f1f1;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,#fbfafa),color-stop(45%,#f3f2f2),color-stop(46%,#e0dcdc),color-stop(50%,#e0dcdc),color-stop(51%,#e7e4e4),color-stop(100%,#f2f1f1));background-image:-webkit-linear-gradient(top,#fbfafa,#f3f2f2 45%,#e0dcdc 46%,#e0dcdc 50%,#e7e4e4 51%,#f2f1f1);background-image:-moz-linear-gradient(top,#fbfafa,#f3f2f2 45%,#e0dcdc 46%,#e0dcdc 50%,#e7e4e4 51%,#f2f1f1);background-image:-o-linear-gradient(top,#fbfafa,#f3f2f2 45%,#e0dcdc 46%,#e0dcdc 50%,#e7e4e4 51%,#f2f1f1);background-image:linear-gradient(top,#fbfafa,#f3f2f2 45%,#e0dcdc 46%,#e0dcdc 50%,#e7e4e4 51%,#f2f1f1)}.x-nlg .x-panel-header-default-framed-collapsed-bottom-mc{background-image:url('../../extjs/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-bottom-bg.gif');background-color:#f2f1f1}.x-nbr .x-panel-header-default-framed-collapsed-bottom{padding:0!important;border-width:0!important;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0;background-color:transparent;background-position:1000404px 1000404px}.x-nbr .x-panel-header-default-framed-collapsed-bottom-tl,.x-nbr .x-panel-header-default-framed-collapsed-bottom-bl,.x-nbr .x-panel-header-default-framed-collapsed-bottom-tr,.x-nbr .x-panel-header-default-framed-collapsed-bottom-br,.x-nbr .x-panel-header-default-framed-collapsed-bottom-tc,.x-nbr .x-panel-header-default-framed-collapsed-bottom-bc,.x-nbr .x-panel-header-default-framed-collapsed-bottom-ml,.x-nbr .x-panel-header-default-framed-collapsed-bottom-mr{zoom:1;background-image:url('../../extjs/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-bottom-corners.gif')}.x-nbr .x-panel-header-default-framed-collapsed-bottom-ml,.x-nbr .x-panel-header-default-framed-collapsed-bottom-mr{zoom:1;background-image:url('../../extjs/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-bottom-sides.gif');background-position:0 0}.x-nbr .x-panel-header-default-framed-collapsed-bottom-mc{padding:0 2px 1px 2px}.x-strict .x-ie7 .x-panel-header-default-framed-collapsed-bottom-tl,.x-strict .x-ie7 .x-panel-header-default-framed-collapsed-bottom-bl{position:relative;right:0}.x-panel-header-default-framed-collapsed-left{-moz-border-radius-topleft:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topright:4px;-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-bottomright:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-bottomleft:4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;padding:5px 4px 5px 4px;border-width:1px;border-style:solid;background-image:none;background-color:#f2f1f1;background-image:-webkit-gradient(linear,100% 50%,0% 50%,color-stop(0%,#fbfafa),color-stop(45%,#f3f2f2),color-stop(46%,#e0dcdc),color-stop(50%,#e0dcdc),color-stop(51%,#e7e4e4),color-stop(100%,#f2f1f1));background-image:-webkit-linear-gradient(right,#fbfafa,#f3f2f2 45%,#e0dcdc 46%,#e0dcdc 50%,#e7e4e4 51%,#f2f1f1);background-image:-moz-linear-gradient(right,#fbfafa,#f3f2f2 45%,#e0dcdc 46%,#e0dcdc 50%,#e7e4e4 51%,#f2f1f1);background-image:-o-linear-gradient(right,#fbfafa,#f3f2f2 45%,#e0dcdc 46%,#e0dcdc 50%,#e7e4e4 51%,#f2f1f1);background-image:linear-gradient(right,#fbfafa,#f3f2f2 45%,#e0dcdc 46%,#e0dcdc 50%,#e7e4e4 51%,#f2f1f1)}.x-nlg .x-panel-header-default-framed-collapsed-left-mc{background-image:url('../../extjs/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-left-bg.gif');background-color:#f2f1f1}.x-nbr .x-panel-header-default-framed-collapsed-left{padding:0!important;border-width:0!important;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0;background-color:transparent;background-position:1000404px 1100404px}.x-nbr .x-panel-header-default-framed-collapsed-left-tl,.x-nbr .x-panel-header-default-framed-collapsed-left-bl,.x-nbr .x-panel-header-default-framed-collapsed-left-tr,.x-nbr .x-panel-header-default-framed-collapsed-left-br,.x-nbr .x-panel-header-default-framed-collapsed-left-tc,.x-nbr .x-panel-header-default-framed-collapsed-left-bc,.x-nbr .x-panel-header-default-framed-collapsed-left-ml,.x-nbr .x-panel-header-default-framed-collapsed-left-mr{zoom:1;background-image:url('../../extjs/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-left-corners.gif')}.x-nbr .x-panel-header-default-framed-collapsed-left-tc,.x-nbr .x-panel-header-default-framed-collapsed-left-bc{zoom:1;background-image:url('../../extjs/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-left-sides.gif');background-position:0 0;background-repeat:repeat-x}.x-nbr .x-panel-header-default-framed-collapsed-left-mc{padding:2px 1px 2px 1px}.x-strict .x-ie7 .x-panel-header-default-framed-collapsed-left-tl,.x-strict .x-ie7 .x-panel-header-default-framed-collapsed-left-bl{position:relative;right:0}.x-panel-header-default-framed-right-tc,.x-panel-header-default-framed-right-mc,.x-panel-header-default-framed-right-bc{background-position:right 0}.x-panel-header-default-framed-bottom-tc,.x-panel-header-default-framed-bottom-mc,.x-panel-header-default-framed-bottom-bc{background-position:0 bottom}.x-panel-header-plain,.x-panel-body-plain{border:0;padding:0}.x-tip{position:absolute;overflow:visible;border-color:#b9b9b9}.x-tip .x-tip-header .x-box-item{padding:3px 3px 0}.x-tip .x-tip-header .x-tool{padding:0 1px 0 0!important}.x-tip{-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px;padding:2px 2px 2px 2px;border-width:1px;border-style:solid;background-color:white}.x-nlg .x-tip-mc{background-color:white}.x-nbr .x-tip{padding:0!important;border-width:0!important;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0;background-color:transparent;background-position:1100303px 1000303px}.x-nbr .x-tip-tl,.x-nbr .x-tip-bl,.x-nbr .x-tip-tr,.x-nbr .x-tip-br,.x-nbr .x-tip-tc,.x-nbr .x-tip-bc,.x-nbr .x-tip-ml,.x-nbr .x-tip-mr{zoom:1;background-image:url('../../extjs/resources/themes/images/default/tip/tip-corners.gif')}.x-nbr .x-tip-ml,.x-nbr .x-tip-mr{zoom:1;background-image:url('../../extjs/resources/themes/images/default/tip/tip-sides.gif');background-position:0 0;background-repeat:repeat-y}.x-nbr .x-tip-mc{padding:0}.x-strict .x-ie7 .x-tip-tl,.x-strict .x-ie7 .x-tip-bl{position:relative;right:0}.x-tip-header-text{user-select:none;-o-user-select:none;-ms-user-select:none;-moz-user-select:-moz-none;-webkit-user-select:none;cursor:default;color:#444;font-size:11px;font-weight:bold}.x-tip-header-draggable .x-tip-header-text{cursor:move}.x-tip-body,.x-form-invalid-tip-body{overflow:hidden;position:relative;padding:3px}.x-tip-header,.x-tip-body,.x-form-invalid-tip-body{color:#444;font-size:11px;font-weight:normal}.x-tip-header a,.x-tip-body a,.x-form-invalid-tip-body a{color:#2a2a2a}.x-tip-anchor{position:absolute;overflow:hidden;height:0;width:0;border-style:solid;border-width:5px;border-color:#b9b9b9;zoom:1}.x-border-box .x-tip-anchor{width:10px;height:10px}.x-tip-anchor-top{border-top-color:transparent;border-left-color:transparent;border-right-color:transparent;_border-top-color:pink;_border-left-color:pink;_border-right-color:pink;_filter:chroma(color=pink)}.x-tip-anchor-bottom{border-bottom-color:transparent;border-left-color:transparent;border-right-color:transparent;_border-bottom-color:pink;_border-left-color:pink;_border-right-color:pink;_filter:chroma(color=pink)}.x-tip-anchor-left{border-top-color:transparent;border-bottom-color:transparent;border-left-color:transparent;_border-top-color:pink;_border-bottom-color:pink;_border-left-color:pink;_filter:chroma(color=pink)}.x-tip-anchor-right{border-top-color:transparent;border-bottom-color:transparent;border-right-color:transparent;_border-top-color:pink;_border-bottom-color:pink;_border-right-color:pink;_filter:chroma(color=pink)}.x-form-invalid-tip{border-color:#a1311f;-webkit-box-shadow:#d87166 0 1px 0 0 inset,#d87166 0 -1px 0 0 inset,#d87166 -1px 0 0 0 inset,#d87166 1px 0 0 0 inset;-moz-box-shadow:#d87166 0 1px 0 0 inset,#d87166 0 -1px 0 0 inset,#d87166 -1px 0 0 0 inset,#d87166 1px 0 0 0 inset;box-shadow:#d87166 0 1px 0 0 inset,#d87166 0 -1px 0 0 inset,#d87166 -1px 0 0 0 inset,#d87166 1px 0 0 0 inset}.x-form-invalid-tip-body{background:1px 1px no-repeat;background-image:url('../../extjs/resources/themes/images/default/form/exclamation.gif');padding-left:22px}.x-form-invalid-tip-body li{margin-bottom:4px}.x-form-invalid-tip-body li.last{margin-bottom:0}.x-form-invalid-tip-default{-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;-o-border-radius:5px;border-radius:5px;padding:4px 4px 4px 4px;border-width:1px;border-style:solid;background-color:white}.x-nlg .x-form-invalid-tip-default-mc{background-color:white}.x-nbr .x-form-invalid-tip-default{padding:0!important;border-width:0!important;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0;background-color:transparent;background-position:1100505px 1000505px}.x-nbr .x-form-invalid-tip-default-tl,.x-nbr .x-form-invalid-tip-default-bl,.x-nbr .x-form-invalid-tip-default-tr,.x-nbr .x-form-invalid-tip-default-br,.x-nbr .x-form-invalid-tip-default-tc,.x-nbr .x-form-invalid-tip-default-bc,.x-nbr .x-form-invalid-tip-default-ml,.x-nbr .x-form-invalid-tip-default-mr{zoom:1;background-image:url('../../extjs/resources/themes/images/default/form-invalid-tip/form-invalid-tip-default-corners.gif')}.x-nbr .x-form-invalid-tip-default-ml,.x-nbr .x-form-invalid-tip-default-mr{zoom:1;background-image:url('../../extjs/resources/themes/images/default/form-invalid-tip/form-invalid-tip-default-sides.gif');background-position:0 0;background-repeat:repeat-y}.x-nbr .x-form-invalid-tip-default-mc{padding:0}.x-strict .x-ie7 .x-form-invalid-tip-default-tl,.x-strict .x-ie7 .x-form-invalid-tip-default-bl{position:relative;right:0}.x-slider{zoom:1}.x-slider-inner{position:relative;left:0;top:0;overflow:visible;zoom:1}.x-slider-focus{position:absolute;left:0;top:0;width:1px;height:1px;line-height:1px;font-size:1px;-moz-outline:0 none;outline:0 none;user-select:none;-o-user-select:none;-ms-user-select:none;-moz-user-select:-moz-none;-webkit-user-select:none;cursor:default;display:block;overflow:hidden}.x-slider-horz{padding-left:7px;background:transparent no-repeat 0 -24px;width:100%}.x-slider-horz .x-slider-end{padding-right:7px;zoom:1;background:transparent no-repeat right -46px}.x-slider-horz .x-slider-inner{background:transparent repeat-x 0 -2px;height:18px}.x-slider-horz .x-slider-thumb{width:14px;height:15px;margin-left:-7px;position:absolute;left:0;top:1px;background:transparent no-repeat 0 0}.x-slider-horz .x-slider-thumb-over{background-position:-14px -15px}.x-slider-horz .x-slider-thumb-drag{background-position:-28px -30px}.x-slider-vert{padding-top:7px;background:transparent no-repeat -44px 0}.x-slider-vert .x-slider-end{padding-bottom:7px;zoom:1;background:transparent no-repeat -22px bottom;width:22px}.x-slider-vert .x-slider-inner{background:transparent repeat-y 0 0;width:22px}.x-slider-vert .x-slider-thumb{width:15px;height:14px;margin-bottom:-7px;position:absolute;left:3px;bottom:0;background:transparent no-repeat 0 0}.x-slider-vert .x-slider-thumb-over{background-position:-15px -14px}.x-slider-vert .x-slider-thumb-drag{background-position:-30px -28px}.x-slider-horz,.x-slider-horz .x-slider-end,.x-slider-horz .x-slider-inner{background-image:url('../../extjs/resources/themes/images/default/slider/slider-bg.png')}.x-slider-horz .x-slider-thumb{background-image:url('../../extjs/resources/themes/images/default/slider/slider-thumb.png')}.x-slider-vert,.x-slider-vert .x-slider-end,.x-slider-vert .x-slider-inner{background-image:url('../../extjs/resources/themes/images/default/slider/slider-v-bg.png')}.x-slider-vert .x-slider-thumb{background-image:url('../../extjs/resources/themes/images/default/slider/slider-v-thumb.png')}.x-ie6 .x-slider-horz,.x-ie6 .x-slider-horz .x-slider-end,.x-ie6 .x-slider-horz .x-slider-inner{background-image:url('../../extjs/resources/themes/images/default/slider/slider-bg.gif')}.x-ie6 .x-slider-horz .x-slider-thumb{background-image:url('../../extjs/resources/themes/images/default/slider/slider-thumb.gif')}.x-ie6 .x-slider-vert,.x-ie6 .x-slider-vert .x-slider-end,.x-ie6 .x-slider-vert .x-slider-inner{background-image:url('../../extjs/resources/themes/images/default/slider/slider-v-bg.gif')}.x-ie6 .x-slider-vert .x-slider-thumb{background-image:url('../../extjs/resources/themes/images/default/slider/slider-v-thumb.gif')}.x-progress{position:relative;border-width:1px;border-style:solid;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0;overflow:hidden;height:20px}.x-progress-bar{height:18px;overflow:hidden;position:absolute;width:0;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0;border-right:1px solid;border-top:1px solid}.x-progress-text{overflow:hidden;position:absolute;padding:0 5px;height:18px;font-weight:bold;font-size:11px;line-height:16px;text-align:center}.x-progress-text-back{padding-top:1px}.x-strict .x-ie7m .x-progress{height:18px}.x-progress-default{border-color:#adadad}.x-progress-default .x-progress-bar{border-right-color:#adadad;border-top-color:#ececec;background-image:none;background-color:#c1b7b7;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,#e5e0e0),color-stop(50%,#cdc4c4),color-stop(51%,#c1b7b7),color-stop(100%,#b6a9a9));background-image:-webkit-linear-gradient(top,#e5e0e0,#cdc4c4 50%,#c1b7b7 51%,#b6a9a9);background-image:-moz-linear-gradient(top,#e5e0e0,#cdc4c4 50%,#c1b7b7 51%,#b6a9a9);background-image:-o-linear-gradient(top,#e5e0e0,#cdc4c4 50%,#c1b7b7 51%,#b6a9a9);background-image:linear-gradient(top,#e5e0e0,#cdc4c4 50%,#c1b7b7 51%,#b6a9a9)}.x-progress-default .x-progress-text{color:white}.x-progress-default .x-progress-text-back{color:#7a7a7a}.x-nlg .x-progress-default .x-progress-bar{background:repeat-x;background-image:url('../../extjs/resources/themes/images/default/progress/progress-default-bg.gif')}.x-toolbar{font-size:11px;border:1px solid;padding:2px 0 2px 2px}.x-toolbar .x-form-item-label{font-size:11px;line-height:15px}.x-toolbar .x-toolbar-item{margin:0 2px 0 0}.x-toolbar .x-toolbar-text{margin-left:4px;margin-right:6px;white-space:nowrap;color:#4c4c4c;line-height:16px;font-family:Helvetica Neue,Arial,sans-serif;font-size:11px;font-weight:normal}.x-toolbar .x-toolbar-separator{display:block;font-size:1px;overflow:hidden;cursor:default;border:0}.x-toolbar .x-toolbar-separator-horizontal{margin:0 3px 0 2px;height:14px;width:0;border-left:1px solid #ffbdbe;border-right:1px solid white}.x-quirks .x-ie .x-toolbar .x-toolbar-separator-horizontal{width:2px}.x-toolbar-footer{background:transparent;border:0 none;margin-top:3px;padding:2px 0 2px 6px}.x-toolbar-footer .x-box-inner{border-width:0}.x-toolbar-footer .x-toolbar-item{margin:0 6px 0 0}.x-toolbar-vertical{padding:2px 2px 0 2px}.x-toolbar-vertical .x-toolbar-item{margin:0 0 2px 0}.x-toolbar-vertical .x-toolbar-text{margin-top:4px;margin-bottom:6px}.x-toolbar-vertical .x-toolbar-separator-vertical{margin:2px 5px 3px 5px;height:0;width:10px;line-height:0;border-top:1px solid #ffbdbe;border-bottom:1px solid white}.x-toolbar-scroller{padding-left:0}.x-toolbar-spacer{width:2px}.x-toolbar-more-icon{background-image:url('../../extjs/resources/themes/images/default/toolbar/more.gif')!important;background-position:2px center!important;background-repeat:no-repeat}.x-toolbar-default{border-color:#bfbfbf;background-image:none;background-color:#e9e9e9;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,#f1f1f1),color-stop(100%,#e9e9e9));background-image:-webkit-linear-gradient(top,#f1f1f1,#e9e9e9);background-image:-moz-linear-gradient(top,#f1f1f1,#e9e9e9);background-image:-o-linear-gradient(top,#f1f1f1,#e9e9e9);background-image:linear-gradient(top,#f1f1f1,#e9e9e9)}.x-nlg .x-toolbar-default{background-image:url('../../extjs/resources/themes/images/default/toolbar/toolbar-default-bg.gif')!important;background-repeat:repeat-x}.x-toolbar-plain{border:0}.x-window{outline:0;overflow:hidden}.x-window .x-window-wrap{position:relative}.x-window-body{position:relative;border-style:solid;overflow:hidden}.x-window-maximized .x-window-wrap .x-window-header{-moz-border-radius:0!important;-webkit-border-radius:0!important;-o-border-radius:0!important;-ms-border-radius:0!important;-khtml-border-radius:0!important;border-radius:0!important}.x-window-header-top{margin-bottom:-2px}.x-window-header-body-horizontal{margin-top:-1px}.x-window-header-bottom{margin-top:-1px;margin-bottom:-1px}.x-window-header-left{margin-right:-1px}.x-window-header-right{margin-left:-1px}.x-window-header-vertical .x-surface{padding-left:1px}.x-window-collapsed .x-window-header-vertical{-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;-o-border-radius:5px;border-radius:5px}.x-window-collapsed .x-window-header-horizontal{-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;-o-border-radius:5px;border-radius:5px}.x-window-collapsed .x-window-header-left{padding-right:5px!important;margin-right:0}.x-window-collapsed .x-window-header-right{padding-left:5px!important;margin-left:0}.x-window-collapsed .x-window-header-top{padding-bottom:5px!important;margin-bottom:-1px}.x-window-collapsed .x-window-header-bottom{padding-top:5px!important;margin-top:0}.x-window-header-left .x-vml-base,.x-window-header-right .x-vml-base{left:-3px!important}.x-opera .x-window-header-vertical .x-surface,.x-strict .x-ie9 .x-window-header-vertical .x-surface{padding-left:2px}.x-window-header-text-container{overflow:hidden;-o-text-overflow:ellipsis;text-overflow:ellipsis}.x-window-header-text{user-select:none;-o-user-select:none;-ms-user-select:none;-moz-user-select:-moz-none;-webkit-user-select:none;cursor:default;white-space:nowrap}.x-window-default{border-color:#c6c6c6;-webkit-border-radius:5px 5px;-moz-border-radius:5px 5px;-ms-border-radius:5px 5px;-o-border-radius:5px 5px;border-radius:5px 5px;-webkit-box-shadow:white 0 1px 0 0 inset,white 0 -1px 0 0 inset,white -1px 0 0 0 inset,white 1px 0 0 0 inset;-moz-box-shadow:white 0 1px 0 0 inset,white 0 -1px 0 0 inset,white -1px 0 0 0 inset,white 1px 0 0 0 inset;box-shadow:white 0 1px 0 0 inset,white 0 -1px 0 0 inset,white -1px 0 0 0 inset,white 1px 0 0 0 inset}.x-window-default{-moz-border-radius-topleft:5px;-webkit-border-top-left-radius:5px;border-top-left-radius:5px;-moz-border-radius-topright:5px;-webkit-border-top-right-radius:5px;border-top-right-radius:5px;-moz-border-radius-bottomright:5px;-webkit-border-bottom-right-radius:5px;border-bottom-right-radius:5px;-moz-border-radius-bottomleft:5px;-webkit-border-bottom-left-radius:5px;border-bottom-left-radius:5px;padding:4px 4px 4px 4px;border-width:1px;border-style:solid;background-color:#ededed}.x-nlg .x-window-default-mc{background-color:#ededed}.x-nbr .x-window-default{padding:0!important;border-width:0!important;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0;background-color:transparent;background-position:1000505px 1000505px}.x-nbr .x-window-default-tl,.x-nbr .x-window-default-bl,.x-nbr .x-window-default-tr,.x-nbr .x-window-default-br,.x-nbr .x-window-default-tc,.x-nbr .x-window-default-bc,.x-nbr .x-window-default-ml,.x-nbr .x-window-default-mr{zoom:1;background-image:url('../../extjs/resources/themes/images/default/window/window-default-corners.gif')}.x-nbr .x-window-default-ml,.x-nbr .x-window-default-mr{zoom:1;background-image:url('../../extjs/resources/themes/images/default/window/window-default-sides.gif');background-position:0 0;background-repeat:repeat-y}.x-nbr .x-window-default-mc{padding:0}.x-strict .x-ie7 .x-window-default-tl,.x-strict .x-ie7 .x-window-default-bl{position:relative;right:0}.x-window-body-default{border-color:#d6d0d0;border-width:1px;background:#fdfdfd;color:black}.x-window-header-default{font-size:11px;border-color:#c6c6c6;zoom:1}.x-window-header-text-default{color:#7e373a;font-weight:bold;line-height:17px;font-family:Helvetica Neue,Arial,sans-serif;font-size:11px}.x-window-header-default-top{-moz-border-radius-topleft:5px;-webkit-border-top-left-radius:5px;border-top-left-radius:5px;-moz-border-radius-topright:5px;-webkit-border-top-right-radius:5px;border-top-right-radius:5px;-moz-border-radius-bottomright:0;-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0;-moz-border-radius-bottomleft:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;padding:4px 5px 0 5px;border-width:1px 1px 0 1px;border-style:solid;background-color:#ededed}.x-nlg .x-window-header-default-top-mc{background-color:#ededed}.x-nbr .x-window-header-default-top{padding:0!important;border-width:0!important;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0;background-color:transparent;background-position:1000505px 1000000px}.x-nbr .x-window-header-default-top-tl,.x-nbr .x-window-header-default-top-bl,.x-nbr .x-window-header-default-top-tr,.x-nbr .x-window-header-default-top-br,.x-nbr .x-window-header-default-top-tc,.x-nbr .x-window-header-default-top-bc,.x-nbr .x-window-header-default-top-ml,.x-nbr .x-window-header-default-top-mr{zoom:1;background-image:url('../../extjs/resources/themes/images/default/window-header/window-header-default-top-corners.gif')}.x-nbr .x-window-header-default-top-ml,.x-nbr .x-window-header-default-top-mr{zoom:1;background-image:url('../../extjs/resources/themes/images/default/window-header/window-header-default-top-sides.gif');background-position:0 0;background-repeat:repeat-y}.x-nbr .x-window-header-default-top-mc{padding:0 1px 0 1px}.x-strict .x-ie7 .x-window-header-default-top-tl,.x-strict .x-ie7 .x-window-header-default-top-bl{position:relative;right:0}.x-window-header-default-right{-moz-border-radius-topleft:0;-webkit-border-top-left-radius:0;border-top-left-radius:0;-moz-border-radius-topright:5px;-webkit-border-top-right-radius:5px;border-top-right-radius:5px;-moz-border-radius-bottomright:5px;-webkit-border-bottom-right-radius:5px;border-bottom-right-radius:5px;-moz-border-radius-bottomleft:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;padding:5px 4px 5px 0;border-width:1px 1px 1px 0;border-style:solid;background-color:#ededed}.x-nlg .x-window-header-default-right-mc{background-color:#ededed}.x-nbr .x-window-header-default-right{padding:0!important;border-width:0!important;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0;background-color:transparent;background-position:1000005px 1000500px}.x-nbr .x-window-header-default-right-tl,.x-nbr .x-window-header-default-right-bl,.x-nbr .x-window-header-default-right-tr,.x-nbr .x-window-header-default-right-br,.x-nbr .x-window-header-default-right-tc,.x-nbr .x-window-header-default-right-bc,.x-nbr .x-window-header-default-right-ml,.x-nbr .x-window-header-default-right-mr{zoom:1;background-image:url('../../extjs/resources/themes/images/default/window-header/window-header-default-right-corners.gif')}.x-nbr .x-window-header-default-right-ml,.x-nbr .x-window-header-default-right-mr{zoom:1;background-image:url('../../extjs/resources/themes/images/default/window-header/window-header-default-right-sides.gif');background-position:0 0;background-repeat:repeat-y}.x-nbr .x-window-header-default-right-mc{padding:1px 0 1px 0}.x-strict .x-ie7 .x-window-header-default-right-tl,.x-strict .x-ie7 .x-window-header-default-right-bl{position:relative;right:0}.x-window-header-default-bottom{-moz-border-radius-topleft:0;-webkit-border-top-left-radius:0;border-top-left-radius:0;-moz-border-radius-topright:0;-webkit-border-top-right-radius:0;border-top-right-radius:0;-moz-border-radius-bottomright:5px;-webkit-border-bottom-right-radius:5px;border-bottom-right-radius:5px;-moz-border-radius-bottomleft:5px;-webkit-border-bottom-left-radius:5px;border-bottom-left-radius:5px;padding:0 5px 4px 5px;border-width:0 1px 1px 1px;border-style:solid;background-color:#ededed}.x-nlg .x-window-header-default-bottom-mc{background-color:#ededed}.x-nbr .x-window-header-default-bottom{padding:0!important;border-width:0!important;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0;background-color:transparent;background-position:1000000px 1000505px}.x-nbr .x-window-header-default-bottom-tl,.x-nbr .x-window-header-default-bottom-bl,.x-nbr .x-window-header-default-bottom-tr,.x-nbr .x-window-header-default-bottom-br,.x-nbr .x-window-header-default-bottom-tc,.x-nbr .x-window-header-default-bottom-bc,.x-nbr .x-window-header-default-bottom-ml,.x-nbr .x-window-header-default-bottom-mr{zoom:1;background-image:url('../../extjs/resources/themes/images/default/window-header/window-header-default-bottom-corners.gif')}.x-nbr .x-window-header-default-bottom-ml,.x-nbr .x-window-header-default-bottom-mr{zoom:1;background-image:url('../../extjs/resources/themes/images/default/window-header/window-header-default-bottom-sides.gif');background-position:0 0;background-repeat:repeat-y}.x-nbr .x-window-header-default-bottom-mc{padding:0 1px 0 1px}.x-strict .x-ie7 .x-window-header-default-bottom-tl,.x-strict .x-ie7 .x-window-header-default-bottom-bl{position:relative;right:0}.x-window-header-default-left{-moz-border-radius-topleft:5px;-webkit-border-top-left-radius:5px;border-top-left-radius:5px;-moz-border-radius-topright:0;-webkit-border-top-right-radius:0;border-top-right-radius:0;-moz-border-radius-bottomright:0;-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0;-moz-border-radius-bottomleft:5px;-webkit-border-bottom-left-radius:5px;border-bottom-left-radius:5px;padding:5px 0 5px 4px;border-width:1px 0 1px 1px;border-style:solid;background-color:#ededed}.x-nlg .x-window-header-default-left-mc{background-color:#ededed}.x-nbr .x-window-header-default-left{padding:0!important;border-width:0!important;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0;background-color:transparent;background-position:1000500px 1000005px}.x-nbr .x-window-header-default-left-tl,.x-nbr .x-window-header-default-left-bl,.x-nbr .x-window-header-default-left-tr,.x-nbr .x-window-header-default-left-br,.x-nbr .x-window-header-default-left-tc,.x-nbr .x-window-header-default-left-bc,.x-nbr .x-window-header-default-left-ml,.x-nbr .x-window-header-default-left-mr{zoom:1;background-image:url('../../extjs/resources/themes/images/default/window-header/window-header-default-left-corners.gif')}.x-nbr .x-window-header-default-left-ml,.x-nbr .x-window-header-default-left-mr{zoom:1;background-image:url('../../extjs/resources/themes/images/default/window-header/window-header-default-left-sides.gif');background-position:0 0;background-repeat:repeat-y}.x-nbr .x-window-header-default-left-mc{padding:1px 0 1px 0}.x-strict .x-ie7 .x-window-header-default-left-tl,.x-strict .x-ie7 .x-window-header-default-left-bl{position:relative;right:0}.x-window-header-default-collapsed-top{-moz-border-radius-topleft:5px;-webkit-border-top-left-radius:5px;border-top-left-radius:5px;-moz-border-radius-topright:5px;-webkit-border-top-right-radius:5px;border-top-right-radius:5px;-moz-border-radius-bottomright:5px;-webkit-border-bottom-right-radius:5px;border-bottom-right-radius:5px;-moz-border-radius-bottomleft:5px;-webkit-border-bottom-left-radius:5px;border-bottom-left-radius:5px;padding:4px 5px 4px 5px;border-width:1px;border-style:solid;background-color:#ededed}.x-nlg .x-window-header-default-collapsed-top-mc{background-color:#ededed}.x-nbr .x-window-header-default-collapsed-top{padding:0!important;border-width:0!important;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0;background-color:transparent;background-position:1000505px 1000505px}.x-nbr .x-window-header-default-collapsed-top-tl,.x-nbr .x-window-header-default-collapsed-top-bl,.x-nbr .x-window-header-default-collapsed-top-tr,.x-nbr .x-window-header-default-collapsed-top-br,.x-nbr .x-window-header-default-collapsed-top-tc,.x-nbr .x-window-header-default-collapsed-top-bc,.x-nbr .x-window-header-default-collapsed-top-ml,.x-nbr .x-window-header-default-collapsed-top-mr{zoom:1;background-image:url('../../extjs/resources/themes/images/default/window-header/window-header-default-collapsed-top-corners.gif')}.x-nbr .x-window-header-default-collapsed-top-ml,.x-nbr .x-window-header-default-collapsed-top-mr{zoom:1;background-image:url('../../extjs/resources/themes/images/default/window-header/window-header-default-collapsed-top-sides.gif');background-position:0 0;background-repeat:repeat-y}.x-nbr .x-window-header-default-collapsed-top-mc{padding:0 1px 0 1px}.x-strict .x-ie7 .x-window-header-default-collapsed-top-tl,.x-strict .x-ie7 .x-window-header-default-collapsed-top-bl{position:relative;right:0}.x-window-header-default-collapsed-right{-moz-border-radius-topleft:5px;-webkit-border-top-left-radius:5px;border-top-left-radius:5px;-moz-border-radius-topright:5px;-webkit-border-top-right-radius:5px;border-top-right-radius:5px;-moz-border-radius-bottomright:5px;-webkit-border-bottom-right-radius:5px;border-bottom-right-radius:5px;-moz-border-radius-bottomleft:5px;-webkit-border-bottom-left-radius:5px;border-bottom-left-radius:5px;padding:5px 4px 5px 4px;border-width:1px;border-style:solid;background-color:#ededed}.x-nlg .x-window-header-default-collapsed-right-mc{background-color:#ededed}.x-nbr .x-window-header-default-collapsed-right{padding:0!important;border-width:0!important;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0;background-color:transparent;background-position:1000505px 1000505px}.x-nbr .x-window-header-default-collapsed-right-tl,.x-nbr .x-window-header-default-collapsed-right-bl,.x-nbr .x-window-header-default-collapsed-right-tr,.x-nbr .x-window-header-default-collapsed-right-br,.x-nbr .x-window-header-default-collapsed-right-tc,.x-nbr .x-window-header-default-collapsed-right-bc,.x-nbr .x-window-header-default-collapsed-right-ml,.x-nbr .x-window-header-default-collapsed-right-mr{zoom:1;background-image:url('../../extjs/resources/themes/images/default/window-header/window-header-default-collapsed-right-corners.gif')}.x-nbr .x-window-header-default-collapsed-right-ml,.x-nbr .x-window-header-default-collapsed-right-mr{zoom:1;background-image:url('../../extjs/resources/themes/images/default/window-header/window-header-default-collapsed-right-sides.gif');background-position:0 0;background-repeat:repeat-y}.x-nbr .x-window-header-default-collapsed-right-mc{padding:1px 0 1px 0}.x-strict .x-ie7 .x-window-header-default-collapsed-right-tl,.x-strict .x-ie7 .x-window-header-default-collapsed-right-bl{position:relative;right:0}.x-window-header-default-collapsed-bottom{-moz-border-radius-topleft:5px;-webkit-border-top-left-radius:5px;border-top-left-radius:5px;-moz-border-radius-topright:5px;-webkit-border-top-right-radius:5px;border-top-right-radius:5px;-moz-border-radius-bottomright:5px;-webkit-border-bottom-right-radius:5px;border-bottom-right-radius:5px;-moz-border-radius-bottomleft:5px;-webkit-border-bottom-left-radius:5px;border-bottom-left-radius:5px;padding:4px 5px 4px 5px;border-width:1px;border-style:solid;background-color:#ededed}.x-nlg .x-window-header-default-collapsed-bottom-mc{background-color:#ededed}.x-nbr .x-window-header-default-collapsed-bottom{padding:0!important;border-width:0!important;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0;background-color:transparent;background-position:1000505px 1000505px}.x-nbr .x-window-header-default-collapsed-bottom-tl,.x-nbr .x-window-header-default-collapsed-bottom-bl,.x-nbr .x-window-header-default-collapsed-bottom-tr,.x-nbr .x-window-header-default-collapsed-bottom-br,.x-nbr .x-window-header-default-collapsed-bottom-tc,.x-nbr .x-window-header-default-collapsed-bottom-bc,.x-nbr .x-window-header-default-collapsed-bottom-ml,.x-nbr .x-window-header-default-collapsed-bottom-mr{zoom:1;background-image:url('../../extjs/resources/themes/images/default/window-header/window-header-default-collapsed-bottom-corners.gif')}.x-nbr .x-window-header-default-collapsed-bottom-ml,.x-nbr .x-window-header-default-collapsed-bottom-mr{zoom:1;background-image:url('../../extjs/resources/themes/images/default/window-header/window-header-default-collapsed-bottom-sides.gif');background-position:0 0;background-repeat:repeat-y}.x-nbr .x-window-header-default-collapsed-bottom-mc{padding:0 1px 0 1px}.x-strict .x-ie7 .x-window-header-default-collapsed-bottom-tl,.x-strict .x-ie7 .x-window-header-default-collapsed-bottom-bl{position:relative;right:0}.x-window-header-default-collapsed-left{-moz-border-radius-topleft:5px;-webkit-border-top-left-radius:5px;border-top-left-radius:5px;-moz-border-radius-topright:5px;-webkit-border-top-right-radius:5px;border-top-right-radius:5px;-moz-border-radius-bottomright:5px;-webkit-border-bottom-right-radius:5px;border-bottom-right-radius:5px;-moz-border-radius-bottomleft:5px;-webkit-border-bottom-left-radius:5px;border-bottom-left-radius:5px;padding:5px 4px 5px 4px;border-width:1px;border-style:solid;background-color:#ededed}.x-nlg .x-window-header-default-collapsed-left-mc{background-color:#ededed}.x-nbr .x-window-header-default-collapsed-left{padding:0!important;border-width:0!important;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0;background-color:transparent;background-position:1000505px 1000505px}.x-nbr .x-window-header-default-collapsed-left-tl,.x-nbr .x-window-header-default-collapsed-left-bl,.x-nbr .x-window-header-default-collapsed-left-tr,.x-nbr .x-window-header-default-collapsed-left-br,.x-nbr .x-window-header-default-collapsed-left-tc,.x-nbr .x-window-header-default-collapsed-left-bc,.x-nbr .x-window-header-default-collapsed-left-ml,.x-nbr .x-window-header-default-collapsed-left-mr{zoom:1;background-image:url('../../extjs/resources/themes/images/default/window-header/window-header-default-collapsed-left-corners.gif')}.x-nbr .x-window-header-default-collapsed-left-ml,.x-nbr .x-window-header-default-collapsed-left-mr{zoom:1;background-image:url('../../extjs/resources/themes/images/default/window-header/window-header-default-collapsed-left-sides.gif');background-position:0 0;background-repeat:repeat-y}.x-nbr .x-window-header-default-collapsed-left-mc{padding:1px 0 1px 0}.x-strict .x-ie7 .x-window-header-default-collapsed-left-tl,.x-strict .x-ie7 .x-window-header-default-collapsed-left-bl{position:relative;right:0}.x-window-header-default-top{-webkit-box-shadow:white 0 1px 0 0 inset,white -1px 0 0 0 inset,white 1px 0 0 0 inset;-moz-box-shadow:white 0 1px 0 0 inset,white -1px 0 0 0 inset,white 1px 0 0 0 inset;box-shadow:white 0 1px 0 0 inset,white -1px 0 0 0 inset,white 1px 0 0 0 inset}.x-window-header-default-right{-webkit-box-shadow:white 0 1px 0 0 inset,white 0 -1px 0 0 inset,white -1px 0 0 0 inset;-moz-box-shadow:white 0 1px 0 0 inset,white 0 -1px 0 0 inset,white -1px 0 0 0 inset;box-shadow:white 0 1px 0 0 inset,white 0 -1px 0 0 inset,white -1px 0 0 0 inset}.x-window-header-default-bottom{-webkit-box-shadow:white 0 -1px 0 0 inset,white -1px 0 0 0 inset,white 1px 0 0 0 inset;-moz-box-shadow:white 0 -1px 0 0 inset,white -1px 0 0 0 inset,white 1px 0 0 0 inset;box-shadow:white 0 -1px 0 0 inset,white -1px 0 0 0 inset,white 1px 0 0 0 inset}.x-window-header-default-left{-webkit-box-shadow:white 0 1px 0 0 inset,white 0 -1px 0 0 inset,white 1px 0 0 0 inset;-moz-box-shadow:white 0 1px 0 0 inset,white 0 -1px 0 0 inset,white 1px 0 0 0 inset;box-shadow:white 0 1px 0 0 inset,white 0 -1px 0 0 inset,white 1px 0 0 0 inset}.x-window-body-plain{background:transparent}.x-message-box .x-window-body{background-color:#ededed;border:0}.x-message-box .x-progress-wrap{margin-top:4px}.x-message-box-icon{width:47px;height:32px}.x-message-box-info,.x-message-box-warning,.x-message-box-question,.x-message-box-error{background:transparent no-repeat top left}.x-message-box .x-msg-box-wait{background-image:url('../../extjs/resources/themes/images/default/shared/blue-loading.gif')}.x-message-box-info{background-image:url('../../extjs/resources/themes/images/default/shared/icon-info.gif')}.x-message-box-warning{background-image:url('../../extjs/resources/themes/images/default/shared/icon-warning.gif')}.x-message-box-question{background-image:url('../../extjs/resources/themes/images/default/shared/icon-question.gif')}.x-message-box-error{background-image:url('../../extjs/resources/themes/images/default/shared/icon-error.gif')}.x-tab-bar{position:relative;background-color:transparent;background-image:none;background-color:#efefef;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,#fcfbfb),color-stop(100%,#efefef));background-image:-webkit-linear-gradient(top,#fcfbfb,#efefef);background-image:-moz-linear-gradient(top,#fcfbfb,#efefef);background-image:-o-linear-gradient(top,#fcfbfb,#efefef);background-image:linear-gradient(top,#fcfbfb,#efefef);font-size:11px}.x-nlg .x-tab-bar{background-image:url('../../extjs/resources/themes/images/default/tab-bar/tab-bar-default-bg.gif')}.x-tab-bar-default-plain,.x-nlg .x-tab-bar-default-plain{background:transparent none}.x-tab-bar-body{border-style:solid;border-color:#bfbfbf;position:relative;z-index:2;zoom:1}.x-tab-bar-top .x-tab-bar-body{height:20px;border-width:1px 1px 0;padding:1px 0 3px}.x-tab-bar-top .x-tab-bar-strip{top:22px;border-width:1px 1px 0;height:2px}.x-border-box .x-tab-bar-top .x-tab-bar-body{height:25px}.x-border-box .x-tab-bar-top .x-tab-bar-strip{height:3px}.x-tab-bar-top .x-tab-bar-body-default-plain{height:20px;border-width:0;padding:0 0 2px}.x-tab-bar-top .x-tab-bar-strip-default-plain{top:20px;border-width:1px 1px 0 1px;height:2px}.x-border-box .x-tab-bar-top .x-tab-bar-body-default-plain{height:22px}.x-border-box .x-tab-bar-top .x-tab-bar-strip-default-plain{height:3px}.x-tab-bar-bottom .x-tab-bar-body{height:20px;border-width:0 1px 1px;padding:3px 0 1px}.x-tab-bar-bottom .x-tab-bar-body .x-box-inner{position:relative;top:-1px}.x-tab-bar-bottom .x-tab-bar-body .x-box-scroller,.x-tab-bar-bottom .x-tab-bar-body .x-box-scroller-left,.x-tab-bar-bottom .x-tab-bar-body .x-box-scroller-right{height:22px}.x-tab-bar-bottom .x-tab-bar-strip{top:0;border-width:0 1px 1px 1px;height:2px}.x-border-box .x-tab-bar-bottom .x-tab-bar-body{height:25px}.x-border-box .x-tab-bar-bottom .x-tab-bar-strip{height:3px}.x-tab-bar-bottom .x-tab-bar-body-default-plain{height:20px;border-width:0;padding:3px 0 0}.x-tab-bar-bottom .x-tab-bar-body-default-plain .x-box-inner{position:relative;top:-1px}.x-tab-bar-bottom .x-tab-bar-body-default-plain .x-box-scroller,.x-tab-bar-bottom .x-tab-bar-body-default-plain .x-box-scroller-left,.x-tab-bar-bottom .x-tab-bar-body-default-plain .x-box-scroller-right{height:21px}.x-tab-bar-bottom .x-tab-bar-strip-default-plain{top:0;border-width:0 1px 1px 1px;height:2px}.x-border-box .x-tab-bar-bottom .x-tab-bar-body-default-plain{height:23px}.x-border-box .x-tab-bar-bottom .x-tab-bar-strip-default-plain{height:3px}.x-tab-bar-strip-default,.x-tab-bar-strip-default-plain{font-size:0;line-height:0;position:absolute;z-index:1;border-style:solid;overflow:hidden;border-color:#bfbfbf;background-color:#e9e9e9;zoom:1}.x-tab-default-top{-moz-border-radius-topleft:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topright:4px;-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-bottomright:0;-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0;-moz-border-radius-bottomleft:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;padding:3px 3px 0 3px;border-width:1px 1px 0 1px;border-style:solid;background-image:none;background-color:#e9e9e9;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,#dcdcdc),color-stop(25%,#e3e3e3),color-stop(45%,#e9e9e9));background-image:-webkit-linear-gradient(top,#dcdcdc,#e3e3e3 25%,#e9e9e9 45%);background-image:-moz-linear-gradient(top,#dcdcdc,#e3e3e3 25%,#e9e9e9 45%);background-image:-o-linear-gradient(top,#dcdcdc,#e3e3e3 25%,#e9e9e9 45%);background-image:linear-gradient(top,#dcdcdc,#e3e3e3 25%,#e9e9e9 45%)}.x-nlg .x-tab-default-top-mc{background-image:url('../../extjs/resources/themes/images/default/tab/tab-default-top-bg.gif');background-color:#e9e9e9}.x-nbr .x-tab-default-top{padding:0!important;border-width:0!important;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0;background-color:transparent;background-position:1100404px 1000000px}.x-nbr .x-tab-default-top-tl,.x-nbr .x-tab-default-top-bl,.x-nbr .x-tab-default-top-tr,.x-nbr .x-tab-default-top-br,.x-nbr .x-tab-default-top-tc,.x-nbr .x-tab-default-top-bc,.x-nbr .x-tab-default-top-ml,.x-nbr .x-tab-default-top-mr{zoom:1;background-image:url('../../extjs/resources/themes/images/default/tab/tab-default-top-corners.gif')}.x-nbr .x-tab-default-top-ml,.x-nbr .x-tab-default-top-mr{zoom:1;background-image:url('../../extjs/resources/themes/images/default/tab/tab-default-top-sides.gif');background-position:0 0}.x-nbr .x-tab-default-top-mc{padding:0}.x-strict .x-ie7 .x-tab-default-top-tl,.x-strict .x-ie7 .x-tab-default-top-bl{position:relative;right:0}.x-tab-default-bottom{-moz-border-radius-topleft:0;-webkit-border-top-left-radius:0;border-top-left-radius:0;-moz-border-radius-topright:0;-webkit-border-top-right-radius:0;border-top-right-radius:0;-moz-border-radius-bottomright:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-bottomleft:4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;padding:0 3px 3px 3px;border-width:0 1px 1px 1px;border-style:solid;background-image:none;background-color:#e9e9e9;background-image:-webkit-gradient(linear,50% 100%,50% 0,color-stop(0%,#dcdcdc),color-stop(25%,#e3e3e3),color-stop(45%,#e9e9e9));background-image:-webkit-linear-gradient(bottom,#dcdcdc,#e3e3e3 25%,#e9e9e9 45%);background-image:-moz-linear-gradient(bottom,#dcdcdc,#e3e3e3 25%,#e9e9e9 45%);background-image:-o-linear-gradient(bottom,#dcdcdc,#e3e3e3 25%,#e9e9e9 45%);background-image:linear-gradient(bottom,#dcdcdc,#e3e3e3 25%,#e9e9e9 45%)}.x-nlg .x-tab-default-bottom-mc{background-image:url('../../extjs/resources/themes/images/default/tab/tab-default-bottom-bg.gif');background-color:#e9e9e9}.x-nbr .x-tab-default-bottom{padding:0!important;border-width:0!important;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0;background-color:transparent;background-position:1100000px 1000404px}.x-nbr .x-tab-default-bottom-tl,.x-nbr .x-tab-default-bottom-bl,.x-nbr .x-tab-default-bottom-tr,.x-nbr .x-tab-default-bottom-br,.x-nbr .x-tab-default-bottom-tc,.x-nbr .x-tab-default-bottom-bc,.x-nbr .x-tab-default-bottom-ml,.x-nbr .x-tab-default-bottom-mr{zoom:1;background-image:url('../../extjs/resources/themes/images/default/tab/tab-default-bottom-corners.gif')}.x-nbr .x-tab-default-bottom-ml,.x-nbr .x-tab-default-bottom-mr{zoom:1;background-image:url('../../extjs/resources/themes/images/default/tab/tab-default-bottom-sides.gif');background-position:0 0}.x-nbr .x-tab-default-bottom-mc{padding:0}.x-strict .x-ie7 .x-tab-default-bottom-tl,.x-strict .x-ie7 .x-tab-default-bottom-bl{position:relative;right:0}.x-tab{z-index:1;margin:0 0 0 2px;display:inline-block;zoom:1;*display:inline;white-space:nowrap;height:20px;border-color:#b4b4b4;cursor:pointer;cursor:hand}.x-tab button{cursor:pointer;cursor:hand}.x-tab em{display:block;padding:0 6px;line-height:1px}.x-tab button{background:0;border:0;padding:0;margin:0;-webkit-appearance:none;font-size:11px;font-weight:bold;font-family:Helvetica Neue,Arial,sans-serif;color:#6e6e6e;outline:0 none;overflow-x:visible}.x-tab button::-moz-focus-inner{border:0;padding:0}.x-tab button .x-tab-inner{background-color:transparent;background-repeat:no-repeat;background-position:0 -2px;display:block;text-align:center;white-space:nowrap;text-overflow:ellipsis;-o-text-overflow:ellipsis;overflow:hidden}.x-tab img{display:none}.x-border-box .x-tab-default-top{height:21px}.x-border-box .x-tab-default-bottom{height:21px}* html .x-ie .x-tab button{width:1px}.x-strict .x-ie6 .x-tab .x-frame-mc,.x-strict .x-ie7 .x-tab .x-frame-mc{height:100%}.x-ie .x-tab-active button:active{position:relative;top:-1px;left:-1px}.x-tab-default-top{-webkit-box-shadow:white 0 1px 0 0 inset,white -1px 0 0 0 inset,white 1px 0 0 0 inset;-moz-box-shadow:white 0 1px 0 0 inset,white -1px 0 0 0 inset,white 1px 0 0 0 inset;box-shadow:white 0 1px 0 0 inset,white -1px 0 0 0 inset,white 1px 0 0 0 inset;border-bottom:1px solid #bfbfbf!important}.x-tab-default-top em{padding-bottom:3px}.x-tab-default-top button,.x-tab-default-top .x-tab-inner{height:13px;line-height:13px}.x-safari4 .x-tab-default-top .x-tab-inner,.x-safari5_0 .x-tab-default-top .x-tab-inner{line-height:11px}.x-nbr .x-tab-default-top{border-bottom-width:1px!important}.x-tab-default-top-active{border-bottom-color:#e9e9e9!important}.x-tab-default-bottom{-webkit-box-shadow:white 0 -1px 0 0 inset,white -1px 0 0 0 inset,white 1px 0 0 0 inset;-moz-box-shadow:white 0 -1px 0 0 inset,white -1px 0 0 0 inset,white 1px 0 0 0 inset;box-shadow:white 0 -1px 0 0 inset,white -1px 0 0 0 inset,white 1px 0 0 0 inset;border-top:1px solid #bfbfbf!important;-webkit-box-shadow:white 0 -1px 0 0 inset,white -1px 0 0 0 inset,white 1px 0 0 0 inset;-moz-box-shadow:white 0 -1px 0 0 inset,white -1px 0 0 0 inset,white 1px 0 0 0 inset;box-shadow:white 0 -1px 0 0 inset,white -1px 0 0 0 inset,white 1px 0 0 0 inset}.x-tab-default-bottom em{padding-top:3px}.x-tab-default-bottom button,.x-tab-default-bottom .x-tab-inner{height:13px;line-height:13px}.x-nbr .x-tab-default-bottom{border-top-width:1px!important}.x-tab-default-bottom-active{border-top-color:#e9e9e9!important}.x-tab-default-disabled{cursor:default;border-color:#e9e6e6;background-image:none;background-color:white;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,#fff),color-stop(100%,#fff));background-image:-webkit-linear-gradient(top,#fff,#fff);background-image:-moz-linear-gradient(top,#fff,#fff);background-image:-o-linear-gradient(top,#fff,#fff);background-image:linear-gradient(top,#fff,#fff)}.x-tab-default-disabled button{color:#c3b3b3!important}.x-tab-icon-text-left .x-tab-inner{padding-left:20px}.x-tab button{position:relative}.x-tab-icon{position:absolute;background-repeat:no-repeat;background-position:0 -1px;top:0;left:0;right:auto;bottom:0;width:18px;height:18px}.x-strict .x-ie8 .x-tab button,.x-strict .x-ie9 .x-tab button{overflow-y:visible}.x-tab-default-disabled .x-tab-icon{filter:alpha(opacity=50);opacity:.5}.x-tab-noicon .x-tab-icon{display:none}.x-tab-top-over{background-image:none;background-color:#f1eded;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,#e6e5e5),color-stop(25%,#ede9e9),color-stop(45%,#f1eded));background-image:-webkit-linear-gradient(top,#e6e5e5,#ede9e9 25%,#f1eded 45%);background-image:-moz-linear-gradient(top,#e6e5e5,#ede9e9 25%,#f1eded 45%);background-image:-o-linear-gradient(top,#e6e5e5,#ede9e9 25%,#f1eded 45%);background-image:linear-gradient(top,#e6e5e5,#ede9e9 25%,#f1eded 45%)}.x-tab-bottom-over{background-image:none;background-color:#f1eded;background-image:-webkit-gradient(linear,50% 100%,50% 0,color-stop(0%,#e6e5e5),color-stop(25%,#ede9e9),color-stop(45%,#f1eded));background-image:-webkit-linear-gradient(bottom,#e6e5e5,#ede9e9 25%,#f1eded 45%);background-image:-moz-linear-gradient(bottom,#e6e5e5,#ede9e9 25%,#f1eded 45%);background-image:-o-linear-gradient(bottom,#e6e5e5,#ede9e9 25%,#f1eded 45%);background-image:linear-gradient(bottom,#e6e5e5,#ede9e9 25%,#f1eded 45%)}.x-tab-active{z-index:3}.x-tab-active button{color:#633434}.x-tab-top-active{background-image:none;background-color:#e9e9e9;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,#fbfbfb),color-stop(25%,#f5f5f5),color-stop(45%,#e9e9e9));background-image:-webkit-linear-gradient(top,#fbfbfb,#f5f5f5 25%,#e9e9e9 45%);background-image:-moz-linear-gradient(top,#fbfbfb,#f5f5f5 25%,#e9e9e9 45%);background-image:-o-linear-gradient(top,#fbfbfb,#f5f5f5 25%,#e9e9e9 45%);background-image:linear-gradient(top,#fbfbfb,#f5f5f5 25%,#e9e9e9 45%)}.x-tab-bottom-active{background-image:none;background-color:#e9e9e9;background-image:-webkit-gradient(linear,50% 100%,50% 0,color-stop(0%,#fbfbfb),color-stop(25%,#f5f5f5),color-stop(45%,#e9e9e9));background-image:-webkit-linear-gradient(bottom,#fbfbfb,#f5f5f5 25%,#e9e9e9 45%);background-image:-moz-linear-gradient(bottom,#fbfbfb,#f5f5f5 25%,#e9e9e9 45%);background-image:-o-linear-gradient(bottom,#fbfbfb,#f5f5f5 25%,#e9e9e9 45%);background-image:linear-gradient(bottom,#fbfbfb,#f5f5f5 25%,#e9e9e9 45%)}.x-tab-disabled{border-color:#e9e6e6}.x-tab-disabled button{color:#c3b3b3}.x-tab-top-disabled{background-image:none;background:transparent;background-image:none;background-color:white;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,#fff),color-stop(100%,#fff));background-image:-webkit-linear-gradient(top,#fff,#fff);background-image:-moz-linear-gradient(top,#fff,#fff);background-image:-o-linear-gradient(top,#fff,#fff);background-image:linear-gradient(top,#fff,#fff)}.x-tab-bottom-disabled{background-image:none;background:transparent;background-image:none;background-color:white;background-image:-webkit-gradient(linear,50% 100%,50% 0,color-stop(0%,#fff),color-stop(100%,#fff));background-image:-webkit-linear-gradient(bottom,#fff,#fff);background-image:-moz-linear-gradient(bottom,#fff,#fff);background-image:-o-linear-gradient(bottom,#fff,#fff);background-image:linear-gradient(bottom,#fff,#fff)}.x-nlg .x-tab-top{background-image:url('../../extjs/resources/themes/images/default/tab/tab-default-top-bg.gif')}.x-nlg .x-tab-bottom{background-image:url('../../extjs/resources/themes/images/default/tab/tab-default-bottom-bg.gif')}.x-nlg .x-tab-top-over{background-image:url('../../extjs/resources/themes/images/default/tab/tab-default-top-over-bg.gif')}.x-nlg .x-tab-bottom-over{background-image:url('../../extjs/resources/themes/images/default/tab/tab-default-bottom-over-bg.gif')}.x-nlg .x-tab-top-active{background-image:url('../../extjs/resources/themes/images/default/tab/tab-default-top-active-bg.gif')}.x-nlg .x-tab-bottom-active{background-image:url('../../extjs/resources/themes/images/default/tab/tab-default-bottom-active-bg.gif')}.x-nlg .x-tab-top-disabled{background-image:url('../../extjs/resources/themes/images/default/tab/tab-default-top-disabled-bg.gif')!important}.x-nlg .x-tab-bottom-disabled{background-image:url('../../extjs/resources/themes/images/default/tab/tab-default-bottom-disabled-bg.gif')!important}.x-tab-closable em{padding-right:14px}.x-tab-close-btn{position:absolute;top:2px;right:2px;width:11px;height:11px;font-size:0;line-height:0;text-indent:-999px;background:no-repeat;background-image:url('../../extjs/resources/themes/images/default/tab/tab-default-close.gif');filter:alpha(opacity=60);opacity:.6}.x-nbr .x-tab-close-btn{top:0;right:0}a.x-tab-close-btn:hover{filter:alpha(opacity=100);opacity:1}.x-tab-default-disabled a.x-tab-close-btn{filter:alpha(opacity=30);opacity:.3}.x-nbr .x-tab-top-over .x-frame-tl,.x-nbr .x-tab-top-over .x-frame-bl,.x-nbr .x-tab-top-over .x-frame-tr,.x-nbr .x-tab-top-over .x-frame-br,.x-nbr .x-tab-top-over .x-frame-tc,.x-nbr .x-tab-top-over .x-frame-bc{background-image:url('../../extjs/resources/themes/images/default/tab/tab-default-top-over-corners.gif')}.x-nbr .x-tab-top-over .x-frame-ml,.x-nbr .x-tab-top-over .x-frame-mr{background-image:url('../../extjs/resources/themes/images/default/tab/tab-default-top-over-sides.gif')}.x-nbr .x-tab-top-over .x-frame-mc{background-color:#f1eded;background-repeat:repeat-x;background-image:url('../../extjs/resources/themes/images/default/tab/tab-default-top-over-bg.gif')}.x-nbr .x-tab-bottom-over .x-frame-tl,.x-nbr .x-tab-bottom-over .x-frame-bl,.x-nbr .x-tab-bottom-over .x-frame-tr,.x-nbr .x-tab-bottom-over .x-frame-br,.x-nbr .x-tab-bottom-over .x-frame-tc,.x-nbr .x-tab-bottom-over .x-frame-bc{background-image:url('../../extjs/resources/themes/images/default/tab/tab-default-bottom-over-corners.gif')}.x-nbr .x-tab-bottom-over .x-frame-ml,.x-nbr .x-tab-bottom-over .x-frame-mr{background-image:url('../../extjs/resources/themes/images/default/tab/tab-default-bottom-over-sides.gif')}.x-nbr .x-tab-bottom-over .x-frame-mc{background-color:#f1eded;background-repeat:repeat-x;background-image:url('../../extjs/resources/themes/images/default/tab/tab-default-bottom-over-bg.gif')}.x-nbr .x-tab-top-active .x-frame-tl,.x-nbr .x-tab-top-active .x-frame-bl,.x-nbr .x-tab-top-active .x-frame-tr,.x-nbr .x-tab-top-active .x-frame-br,.x-nbr .x-tab-top-active .x-frame-tc,.x-nbr .x-tab-top-active .x-frame-bc{background-image:url('../../extjs/resources/themes/images/default/tab/tab-default-top-active-corners.gif')}.x-nbr .x-tab-top-active .x-frame-ml,.x-nbr .x-tab-top-active .x-frame-mr{background-image:url('../../extjs/resources/themes/images/default/tab/tab-default-top-active-sides.gif')}.x-nbr .x-tab-top-active .x-frame-mc{background-color:#e9e9e9;background-repeat:repeat-x;background-image:url('../../extjs/resources/themes/images/default/tab/tab-default-top-active-bg.gif')}.x-nbr .x-tab-bottom-active .x-frame-tl,.x-nbr .x-tab-bottom-active .x-frame-bl,.x-nbr .x-tab-bottom-active .x-frame-tr,.x-nbr .x-tab-bottom-active .x-frame-br,.x-nbr .x-tab-bottom-active .x-frame-tc,.x-nbr .x-tab-bottom-active .x-frame-bc{background-image:url('../../extjs/resources/themes/images/default/tab/tab-default-bottom-active-corners.gif')}.x-nbr .x-tab-bottom-active .x-frame-ml,.x-nbr .x-tab-bottom-active .x-frame-mr{background-image:url('../../extjs/resources/themes/images/default/tab/tab-default-bottom-active-sides.gif')}.x-nbr .x-tab-bottom-active .x-frame-mc{background-color:#e9e9e9;background-repeat:repeat-x;background-image:url('../../extjs/resources/themes/images/default/tab/tab-default-bottom-active-bg.gif')}.x-nbr .x-tab-top-disabled .x-frame-tl,.x-nbr .x-tab-top-disabled .x-frame-bl,.x-nbr .x-tab-top-disabled .x-frame-tr,.x-nbr .x-tab-top-disabled .x-frame-br,.x-nbr .x-tab-top-disabled .x-frame-tc,.x-nbr .x-tab-top-disabled .x-frame-bc{background-image:url('../../extjs/resources/themes/images/default/tab/tab-default-top-disabled-corners.gif')}.x-nbr .x-tab-top-disabled .x-frame-ml,.x-nbr .x-tab-top-disabled .x-frame-mr{background-image:url('../../extjs/resources/themes/images/default/tab/tab-default-top-disabled-sides.gif')}.x-nbr .x-tab-top-disabled .x-frame-mc{background-repeat:repeat-x;background-image:url('../../extjs/resources/themes/images/default/tab/tab-default-top-disabled-bg.gif')}.x-nbr .x-tab-bottom-disabled .x-frame-tl,.x-nbr .x-tab-bottom-disabled .x-frame-bl,.x-nbr .x-tab-bottom-disabled .x-frame-tr,.x-nbr .x-tab-bottom-disabled .x-frame-br,.x-nbr .x-tab-bottom-disabled .x-frame-tc,.x-nbr .x-tab-bottom-disabled .x-frame-bc{background-image:url('../../extjs/resources/themes/images/default/tab/tab-default-bottom-disabled-corners.gif')}.x-nbr .x-tab-bottom-disabled .x-frame-ml,.x-nbr .x-tab-bottom-disabled .x-frame-mr{background-image:url('../../extjs/resources/themes/images/default/tab/tab-default-bottom-disabled-sides.gif')}.x-nbr .x-tab-bottom-disabled .x-frame-mc{background-repeat:repeat-x;background-image:url('../../extjs/resources/themes/images/default/tab/tab-default-bottom-disabled-bg.gif')}.x-autowidth-table table.x-grid-table{table-layout:auto;width:auto!important}.x-tree-no-lines .x-tree-elbow{background-color:transparent}.x-tree-no-lines .x-tree-elbow-end{background-color:transparent}.x-tree-no-lines .x-tree-elbow-line{background-color:transparent}.x-tree-arrows .x-tree-elbow-plus{background:transparent no-repeat 0 0}.x-tree-arrows .x-tree-elbow-end-plus{background:transparent no-repeat 0 0}.x-tree-arrows .x-tree-elbow-end-minus{background:transparent no-repeat -16px 0}.x-tree-arrows .x-tree-elbow-minus{background:transparent no-repeat -16px 0}.x-tree-arrows .x-tree-elbow{background-color:transparent!important}.x-tree-arrows .x-tree-elbow-end{background-color:transparent!important}.x-tree-arrows .x-tree-elbow-line{background-color:transparent!important}.x-tree-arrows .x-tree-expander-over .x-tree-elbow-plus,.x-tree-arrows .x-tree-expander-over .x-tree-elbow-end-plus{background-position:-32px 0}.x-tree-arrows .x-tree-expander-over .x-tree-elbow-minus,.x-tree-arrows .x-tree-expander-over .x-tree-elbow-end-minus{background-position:-48px 0}.x-tree-arrows .x-grid-tree-node-expanded .x-tree-elbow-plus,.x-tree-arrows .x-grid-tree-node-expanded .x-tree-elbow-end-plus{background-position:-16px 0}.x-tree-arrows .x-grid-tree-node-expanded .x-tree-expander-over .x-tree-elbow-plus,.x-tree-arrows .x-grid-tree-node-expanded .x-tree-expander-over .x-tree-elbow-end-plus{background-position:-48px 0}.x-tree-elbow-plus,.x-tree-elbow-minus,.x-tree-elbow-end-plus,.x-tree-elbow-end-minus{cursor:pointer}.x-tree-lines .x-tree-elbow{background-image:url('../../extjs/resources/themes/images/default/tree/elbow.gif')}.x-tree-lines .x-tree-elbow-end{background-image:url('../../extjs/resources/themes/images/default/tree/elbow-end.gif')}.x-tree-lines .x-tree-elbow-plus{background-image:url('../../extjs/resources/themes/images/default/tree/elbow-plus.gif')}.x-tree-lines .x-tree-elbow-end-plus{background-image:url('../../extjs/resources/themes/images/default/tree/elbow-end-plus.gif')}.x-tree-lines .x-grid-tree-node-expanded .x-tree-elbow-plus{background-image:url('../../extjs/resources/themes/images/default/tree/elbow-minus.gif')}.x-tree-lines .x-grid-tree-node-expanded .x-tree-elbow-end-plus{background-image:url('../../extjs/resources/themes/images/default/tree/elbow-end-minus.gif')}.x-tree-lines .x-tree-elbow-line{background-image:url('../../extjs/resources/themes/images/default/tree/elbow-line.gif')}.x-tree-no-lines .x-tree-elbow-plus,.x-tree-no-lines .x-tree-elbow-end-plus{background-image:url('../../extjs/resources/themes/images/default/tree/elbow-plus-nl.gif')}.x-tree-no-lines .x-grid-tree-node-expanded .x-tree-elbow-plus,.x-tree-no-lines .x-grid-tree-node-expanded .x-tree-elbow-end-plus{background-image:url('../../extjs/resources/themes/images/default/tree/elbow-end-minus-nl.gif')}.x-tree-arrows .x-tree-elbow-plus,.x-tree-arrows .x-tree-elbow-minus,.x-tree-arrows .x-tree-elbow-end-plus,.x-tree-arrows .x-tree-elbow-end-minus{background-image:url('../../extjs/resources/themes/images/default/tree/arrows.gif')}.x-tree-icon{margin:2px 3px 0 0}.x-grid-with-row-lines .x-tree-icon{margin-top:1px}.x-tree-elbow,.x-tree-elbow-end,.x-tree-elbow-plus,.x-tree-elbow-end-plus,.x-tree-elbow-empty,.x-tree-elbow-line{height:20px;width:16px}.x-grid-with-row-lines .x-tree-elbow,.x-grid-with-row-lines .x-tree-elbow-end,.x-grid-with-row-lines .x-tree-elbow-plus,.x-grid-with-row-lines .x-tree-elbow-end-plus,.x-grid-with-row-lines .x-tree-elbow-empty,.x-grid-with-row-lines .x-tree-elbow-line{height:19px;background-position:0 -1px}.x-tree-icon-leaf{width:16px;background-image:url('../../extjs/resources/themes/images/default/tree/leaf.gif')}.x-tree-icon-parent{width:16px;background-image:url('../../extjs/resources/themes/images/default/tree/folder.gif')}.x-grid-tree-node-expanded .x-tree-icon-parent{background-image:url('../../extjs/resources/themes/images/default/tree/folder-open.gif')}.x-grid-rowbody{padding:0}.x-grid-cell-treecolumn .x-grid-cell-inner{padding:0;line-height:19px}.x-grid-with-row-lines .x-grid-cell-treecolumn .x-grid-cell-inner{line-height:17px}.x-tree-panel .x-grid-cell-inner{cursor:pointer}.x-tree-panel .x-grid-cell-inner img{display:inline-block;vertical-align:top}.x-ie .x-tree-panel .x-tree-elbow,.x-ie .x-tree-panel .x-tree-elbow-end,.x-ie .x-tree-panel .x-tree-elbow-plus,.x-ie .x-tree-panel .x-tree-elbow-end-plus,.x-ie .x-tree-panel .x-tree-elbow-empty,.x-ie .x-tree-panel .x-tree-elbow-line{vertical-align:-6px}.x-grid-editor-on-text-node .x-form-text{padding-left:1px;padding-right:1px}.x-ie .x-grid-editor-on-text-node .x-form-text{padding-left:2px;padding-right:2px}.x-opera .x-grid-editor-on-text-node .x-form-text{padding-left:2px;padding-right:2px}.x-tree-checkbox{margin:4px 3px 0 0;display:inline-block;vertical-align:top;width:13px;height:13px;background:no-repeat;background-image:url('../../extjs/resources/themes/images/default/form/checkbox.gif');overflow:hidden;padding:0;border:0}.x-tree-checkbox::-moz-focus-inner{padding:0;border:0}.x-grid-with-row-lines .x-tree-checkbox{margin-top:3px}.x-tree-checkbox-checked{background-position:0 -13px}.x-tree-drop-ok-append .x-dd-drop-icon{background-image:url('../../extjs/resources/themes/images/default/tree/drop-append.gif')}.x-tree-drop-ok-above .x-dd-drop-icon{background-image:url('../../extjs/resources/themes/images/default/tree/drop-above.gif')}.x-tree-drop-ok-below .x-dd-drop-icon{background-image:url('../../extjs/resources/themes/images/default/tree/drop-below.gif')}.x-tree-drop-ok-between .x-dd-drop-icon{background-image:url('../../extjs/resources/themes/images/default/tree/drop-between.gif')}.x-grid-tree-loading .x-tree-icon{background-image:url('../../extjs/resources/themes/images/default/tree/loading.gif')}.x-tree-ddindicator{height:1px;border-width:1px 0 0;border-style:dotted;border-color:green}.x-grid-tree-loading span{font-style:italic;color:#444}.x-tree-animator-wrap{overflow:hidden}.x-surface{display:-moz-inline-stack;display:inline-block;vertical-align:middle;*vertical-align:auto;zoom:1;*display:inline;overflow:hidden}.rvml{behavior:url(#default#VML)}.x-surface tspan{user-select:none;-o-user-select:none;-ms-user-select:none;-moz-user-select:-moz-none;-webkit-user-select:none;cursor:default}.x-vml-sprite{position:absolute;left:0;top:0;width:1px;height:1px}.x-vml-group{position:absolute;left:0;top:0;width:1000px;height:1000px}.x-vml-measure-span{position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;display:inline}.x-vml-base{position:relative;top:0;left:0;overflow:hidden;display:inline-block}.x-vml-base{position:relative;top:0;left:0;overflow:hidden;display:inline-block}svg,vml{overflow:hidden}.x-viewport,.x-viewport body{margin:0;padding:0;border:0 none;overflow:hidden;height:100%;position:static}.x-dd-drag-proxy{z-index:1000000!important}.x-dd-drag-repair .x-dd-drag-ghost{filter:alpha(opacity=60);opacity:.6}.x-dd-drag-repair .x-dd-drop-icon{display:none}.x-dd-drag-ghost{filter:alpha(opacity=85);opacity:.85;padding:5px;padding-left:20px;white-space:nowrap;color:#000;font:normal 11px Helvetica Neue,Arial,sans-serif;border:1px solid;border-color:#ddd #bbb #bbb #ddd;background-color:#fff}.x-dd-drop-icon{position:absolute;top:3px;left:3px;display:block;width:16px;height:16px;background-color:transparent;background-position:center;background-repeat:no-repeat;z-index:1}.x-view-selector{position:absolute;left:0;top:0;width:0;background-color:#c3daf9;border:1px dotted #39b;filter:alpha(opacity=50);opacity:.5;zoom:1}.x-dd-drop-nodrop .x-dd-drop-icon{background-image:url('../../extjs/resources/themes/images/default/dd/drop-no.gif')}.x-dd-drop-ok .x-dd-drop-icon{background-image:url('../../extjs/resources/themes/images/default/dd/drop-yes.gif')}.x-dd-drop-ok-add .x-dd-drop-icon{background-image:url('../../extjs/resources/themes/images/default/dd/drop-add.gif')}.x-resizable-handle{position:absolute;z-index:100;font-size:1px;line-height:6px;overflow:hidden;zoom:1;filter:alpha(opacity=0);opacity:0;background-color:#fff}.x-collapsed .x-resizable-handle{display:none}.x-resizable-handle-east{width:6px;height:100%;right:0;top:0}.x-resizable-over .x-resizable-handle-east{cursor:e-resize}.x-resizable-handle-south{width:100%;height:6px;left:0;bottom:0}.x-resizable-over .x-resizable-handle-south{cursor:s-resize}.x-resizable-handle-west{width:6px;height:100%;left:0;top:0}.x-resizable-over .x-resizable-handle-west{cursor:w-resize}.x-resizable-handle-north{width:100%;height:6px;left:0;top:0}.x-resizable-over .x-resizable-handle-north{cursor:n-resize}.x-resizable-handle-southeast{width:6px;height:6px;right:0;bottom:0;z-index:101}.x-resizable-over .x-resizable-handle-southeast{cursor:se-resize}.x-resizable-handle-northwest{width:6px;height:6px;left:0;top:0;z-index:101}.x-resizable-over .x-resizable-handle-northwest{cursor:nw-resize}.x-resizable-handle-northeast{width:6px;height:6px;right:0;top:0;z-index:101}.x-resizable-over .x-resizable-handle-northeast{cursor:ne-resize}.x-resizable-handle-southwest{width:6px;height:6px;left:0;bottom:0;z-index:101}.x-resizable-over .x-resizable-handle-southwest{cursor:sw-resize}.x-ie .x-resizable-handle-east{margin-right:-1px}.x-ie .x-resizable-handle-south{margin-bottom:-1px}.x-resizable-over .x-resizable-handle,.x-resizable-pinned .x-resizable-handle{filter:alpha(opacity=100);opacity:1}.x-window .x-window-handle{filter:alpha(opacity=0);opacity:0}.x-window-collapsed .x-window-handle{display:none}.x-resizable-proxy{border:1px dashed #3b5a82;position:absolute;left:0;top:0;overflow:hidden;z-index:50000}.x-resizable-overlay{position:absolute;left:0;top:0;width:100%;height:100%;display:none;z-index:200000;background-color:#fff;filter:alpha(opacity=0);opacity:0}.x-resizable-over .x-resizable-handle-east,.x-resizable-over .x-resizable-handle-west,.x-resizable-pinned .x-resizable-handle-east,.x-resizable-pinned .x-resizable-handle-west{background-position:left;background-image:url('../../extjs/resources/themes/images/default/sizer/e-handle.gif')}.x-resizable-over .x-resizable-handle-south,.x-resizable-over .x-resizable-handle-north,.x-resizable-pinned .x-resizable-handle-south,.x-resizable-pinned .x-resizable-handle-north{background-position:top;background-image:url('../../extjs/resources/themes/images/default/sizer/s-handle.gif')}.x-resizable-over .x-resizable-handle-southeast,.x-resizable-pinned .x-resizable-handle-southeast{background-position:top left;background-image:url('../../extjs/resources/themes/images/default/sizer/se-handle.gif')}.x-resizable-over .x-resizable-handle-northwest,.x-resizable-pinned .x-resizable-handle-northwest{background-position:bottom right;background-image:url('../../extjs/resources/themes/images/default/sizer/nw-handle.gif')}.x-resizable-over .x-resizable-handle-northeast,.x-resizable-pinned .x-resizable-handle-northeast{background-position:bottom left;background-image:url('../../extjs/resources/themes/images/default/sizer/ne-handle.gif')}.x-resizable-over .x-resizable-handle-southwest,.x-resizable-pinned .x-resizable-handle-southwest{background-position:top right;background-image:url('../../extjs/resources/themes/images/default/sizer/sw-handle.gif')}.x-splitter .x-collapse-el{position:absolute;cursor:pointer;background-color:transparent;background-repeat:no-repeat!important}.x-layout-split-left,.x-layout-split-right{top:50%;margin-top:-17px;width:5px;height:35px}.x-layout-split-top,.x-layout-split-bottom{left:50%;width:35px;height:5px;margin-left:-17px}.x-layout-split-left{background:no-repeat top right;background-image:url('../../extjs/resources/themes/images/default/util/splitter/mini-left.gif')}.x-layout-split-right{background:no-repeat top left;background-image:url('../../extjs/resources/themes/images/default/util/splitter/mini-right.gif')}.x-layout-split-top{background:no-repeat top left;background-image:url('../../extjs/resources/themes/images/default/util/splitter/mini-top.gif')}.x-layout-split-bottom{background:no-repeat top left;background-image:url('../../extjs/resources/themes/images/default/util/splitter/mini-bottom.gif')}.x-splitter-collapsed .x-layout-split-left{background:no-repeat top left;background-image:url('../../extjs/resources/themes/images/default/util/splitter/mini-right.gif')}.x-splitter-collapsed .x-layout-split-right{background:no-repeat top right;background-image:url('../../extjs/resources/themes/images/default/util/splitter/mini-left.gif')}.x-splitter-collapsed .x-layout-split-top{background:no-repeat top left;background-image:url('../../extjs/resources/themes/images/default/util/splitter/mini-bottom.gif')}.x-splitter-collapsed .x-layout-split-bottom{background:no-repeat top left;background-image:url('../../extjs/resources/themes/images/default/util/splitter/mini-top.gif')}.x-splitter-horizontal{cursor:e-resize;cursor:row-resize;font-size:1px}.x-splitter-vertical{cursor:e-resize;cursor:col-resize;font-size:1px}.x-splitter-collapsed,.x-splitter-horizontal-noresize,.x-splitter-vertical-noresize{cursor:default}.x-splitter-active{z-index:4;font-size:1px;background-color:#b4b4b4;filter:alpha(opacity=80);opacity:.8}.x-splitter-active .x-collapse-el{filter:alpha(opacity=30);opacity:.3}.x-proxy-el{position:absolute;background:#b4b4b4;filter:alpha(opacity=80);opacity:.8}.x-docked{position:absolute!important;z-index:1}.x-docked-top{border-bottom-width:0!important}.x-docked-bottom{border-top-width:0!important}.x-docked-left{border-right-width:0!important}.x-docked-right{border-left-width:0!important}.x-docked-noborder-top{border-top-width:0!important}.x-docked-noborder-right{border-right-width:0!important}.x-docked-noborder-bottom{border-bottom-width:0!important}.x-docked-noborder-left{border-left-width:0!important}.x-box-inner{overflow:hidden;zoom:1;position:relative;left:0;top:0}.x-box-item{position:absolute!important;left:0;top:0}.x-rtl .x-box-item{right:0;left:auto}.x-box-layout-ct,.x-border-layout-ct{overflow:hidden;zoom:1}.x-border-layout-ct{background-color:#fdfdfd;position:relative}.x-overflow-hidden{overflow:hidden!important}.x-inline-children>*{display:inline-block!important}.x-abs-layout-ct{position:relative}.x-abs-layout-item{position:absolute!important}.x-fit-item{position:relative}.x-border-region-slide-in{z-index:5}.x-region-collapsed-placeholder{z-index:4}.x-accordion-hd .x-panel-header-text{color:black;font-weight:normal}.x-accordion-hd{background:#fbfafa!important;-webkit-box-shadow:inset 0 0 0 0 #fbfafa;-moz-box-shadow:inset 0 0 0 0 #fbfafa;box-shadow:inset 0 0 0 0 #fbfafa}.x-accordion-hd .x-tool-collapse-top,.x-accordion-hd .x-tool-collapse-right,.x-accordion-hd .x-tool-collapse-bottom,.x-accordion-hd .x-tool-collapse-left{background-position:0 -255px}.x-accordion-hd .x-tool-expand-top,.x-accordion-hd .x-tool-expand-right,.x-accordion-hd .x-tool-expand-bottom,.x-accordion-hd .x-tool-expand-left{background-position:0 -240px}.x-accordion-hd .x-tool-over .x-tool-collapse-top,.x-accordion-hd .x-tool-over .x-tool-collapse-right,.x-accordion-hd .x-tool-over .x-tool-collapse-bottom,.x-accordion-hd .x-tool-over .x-tool-collapse-left{background-position:-15px -255px}.x-accordion-hd .x-tool-over .x-tool-expand-top,.x-accordion-hd .x-tool-over .x-tool-expand-right,.x-accordion-hd .x-tool-over .x-tool-expand-bottom,.x-accordion-hd .x-tool-over .x-tool-expand-left{background-position:-15px -240px}.x-accordion-hd{border-width:1px 0 1px 0!important;padding:4px 5px 5px 5px;border-top-color:white!important}.x-accordion-body{border-width:0!important}.x-accordion-hd-sibling-expanded{border-top-color:#bfbfbf!important;-webkit-box-shadow:inset 0 1px 0 0 white;-moz-box-shadow:inset 0 1px 0 0 white;box-shadow:inset 0 1px 0 0 white}.x-accordion-hd-last-collapsed{border-bottom-color:#fbfafa!important}.x-frame-tl,.x-frame-tr,.x-frame-tc,.x-frame-bl,.x-frame-br,.x-frame-bc{overflow:hidden;background-repeat:no-repeat}.x-frame-tc,.x-frame-bc{background-repeat:repeat-x}.x-frame-mc{position:relative;background-repeat:repeat-x;overflow:hidden}.x-box-scroller-left{float:left;height:100%;z-index:5}.x-box-scroller-left .x-toolbar-scroll-left,.x-box-scroller-left .x-tabbar-scroll-left{width:18px;position:relative;cursor:pointer;height:20px;background:transparent no-repeat -18px 0;background-image:url('../../extjs/resources/themes/images/default/tab-bar/scroll-left.gif')}.x-box-scroller-left .x-toolbar-scroll-left-hover{background-position:0 0}.x-box-scroller-left .x-toolbar-scroll-left-disabled,.x-box-scroller-left .x-tabbar-scroll-left-disabled{background-position:-18px 0;filter:alpha(opacity=50);opacity:.5;cursor:default}.x-box-scroller-left .x-toolbar-scroll-left{background-image:url('../../extjs/resources/themes/images/default/toolbar/scroll-left.gif');background-position:-14px 0}.x-box-scroller-left .x-toolbar-scroll-left-hover{background-position:0 0}.x-box-scroller-left .x-toolbar-scroll-left-disabled{background-position:-14px 0}.x-box-scroller-left .x-toolbar-scroll-left{width:14px;height:22px;border-bottom:1px solid #8db2e3}.x-horizontal-box-overflow-body{float:left}.x-box-scroller-right{float:right;height:100%;z-index:5}.x-box-scroller-right .x-toolbar-scroll-right,.x-box-scroller-right .x-tabbar-scroll-right{width:18px;position:relative;cursor:pointer;height:20px;background:transparent no-repeat 0 0;background-image:url('../../extjs/resources/themes/images/default/tab-bar/scroll-right.gif')}.x-box-scroller-right .x-toolbar-scroll-right-hover{background-position:-18px 0}.x-box-scroller-right .x-toolbar-scroll-right-disabled,.x-box-scroller-right .x-tabbar-scroll-right-disabled{background-position:0 0;filter:alpha(opacity=50);opacity:.5;cursor:default}.x-box-scroller-right .x-toolbar-scroll-right{background-image:url('../../extjs/resources/themes/images/default/toolbar/scroll-right.gif')}.x-box-scroller-right .x-toolbar-scroll-right-hover{background-position:-14px 0}.x-box-scroller-right .x-toolbar-scroll-right-disabled{background-position:0 0}.x-box-scroller-right .x-toolbar-scroll-right{width:14px;height:22px;border-bottom:1px solid #8db2e3}.x-box-scroller-top .x-box-scroller{line-height:0;font-size:0}.x-box-scroller-top .x-menu-scroll-top{background:transparent no-repeat center center;background-image:url('../../extjs/resources/themes/images/default/layout/mini-top.gif');height:8px;cursor:pointer}.x-box-scroller-bottom .x-box-scroller{line-height:0;font-size:0}.x-box-scroller-bottom .x-menu-scroll-bottom{background:transparent no-repeat center center;background-image:url('../../extjs/resources/themes/images/default/layout/mini-bottom.gif');height:8px;cursor:pointer}.x-box-menu-right{float:right;padding-right:2px}.x-column{float:left}.x-ie6 .x-column{display:inline}.x-quirks .x-ie .x-form-layout-table,.x-quirks .x-ie .x-form-layout-table tbody tr.x-form-item{position:relative}.x-tool{height:15px}.x-tool img{overflow:hidden;width:15px;height:15px;cursor:pointer;background-color:transparent;background-repeat:no-repeat;background-image:url('../../extjs/resources/themes/images/default/tools/tool-sprites.gif');margin:0}.x-panel-header-horizontal .x-tool,.x-window-header-horizontal .x-tool{margin-left:2px}.x-panel-header-vertical .x-tool,.x-window-header-vertical .x-tool{margin-top:2px}.x-panel-header-vertical .x-tool-top,.x-window-header-vertical .x-tool-top{margin:0 0 4px}.x-tool-placeholder{visibility:hidden}.x-tool-toggle{background-position:0 -60px}.x-tool-over .x-tool-toggle{background-position:-15px -60px}.x-panel-collapsed .x-tool-toggle,.x-fieldset-collapsed .x-tool-toggle{background-position:0 -75px}.x-panel-collapsed .x-tool-over .x-tool-toggle,.x-fieldset-collapsed .x-tool-over .x-tool-toggle{background-position:-15px -75px}.x-tool-close{background-position:0 0}.x-tool-minimize{background-position:0 -15px}.x-tool-maximize{background-position:0 -30px}.x-tool-restore{background-position:0 -45px}.x-tool-gear{background-position:0 -90px}.x-tool-prev{background-position:0 -105px}.x-tool-next{background-position:0 -120px}.x-tool-pin{background-position:0 -135px}.x-tool-unpin{background-position:0 -150px}.x-tool-right{background-position:0 -165px}.x-tool-left{background-position:0 -180px}.x-tool-help{background-position:0 -300px}.x-tool-save{background-position:0 -285px}.x-tool-search{background-position:0 -270px}.x-tool-minus{background-position:0 -255px}.x-tool-plus{background-position:0 -240px}.x-tool-refresh{background-position:0 -225px}.x-tool-up{background-position:0 -210px}.x-tool-down{background-position:0 -195px}.x-tool-collapse{background-position:0 -345px}.x-tool-expand{background-position:0 -330px}.x-tool-print{background-position:0 -315px}.x-tool-expand-bottom,.x-tool-collapse-bottom{background-position:0 -195px}.x-tool-expand-top,.x-tool-collapse-top{background-position:0 -210px}.x-tool-expand-left,.x-tool-collapse-left{background-position:0 -180px}.x-tool-expand-right,.x-tool-collapse-right{background-position:0 -165px}.x-tool-over .x-tool-close{background-position:-15px 0}.x-tool-over .x-tool-minimize{background-position:-15px -15px}.x-tool-over .x-tool-maximize{background-position:-15px -30px}.x-tool-over .x-tool-restore{background-position:-15px -45px}.x-tool-over .x-tool-gear{background-position:-15px -90px}.x-tool-over .x-tool-prev{background-position:-15px -105px}.x-tool-over .x-tool-next{background-position:-15px -120px}.x-tool-over .x-tool-pin{background-position:-15px -135px}.x-tool-over .x-tool-unpin{background-position:-15px -150px}.x-tool-over .x-tool-right{background-position:-15px -165px}.x-tool-over .x-tool-left{background-position:-15px -180px}.x-tool-over .x-tool-down{background-position:-15px -195px}.x-tool-over .x-tool-up{background-position:-15px -210px}.x-tool-over .x-tool-refresh{background-position:-15px -225px}.x-tool-over .x-tool-plus{background-position:-15px -240px}.x-tool-over .x-tool-minus{background-position:-15px -255px}.x-tool-over .x-tool-search{background-position:-15px -270px}.x-tool-over .x-tool-save{background-position:-15px -285px}.x-tool-over .x-tool-help{background-position:-15px -300px}.x-tool-over .x-tool-print{background-position:-15px -315px}.x-tool-over .x-tool-expand{background-position:-15px -330px}.x-tool-over .x-tool-collapse{background-position:-15px -345px}.x-tool-over .x-tool-expand-bottom,.x-tool-over .x-tool-collapse-bottom{background-position:-15px -195px}.x-tool-over .x-tool-expand-top,.x-tool-over .x-tool-collapse-top{background-position:-15px -210px}.x-tool-over .x-tool-expand-left,.x-tool-over .x-tool-collapse-left{background-position:-15px -180px}.x-tool-over .x-tool-expand-right,.x-tool-over .x-tool-collapse-right{background-position:-15px -165px}.x-horizontal-scroller-present .x-grid-body{border-bottom-width:0}.x-vertical-scroller-present .x-grid-body{border-right-width:0}.x-scroller{overflow:hidden}.x-scroller-vertical{border:1px solid #bfbfbf;border-top-color:#c5c5c5}.x-scroller-horizontal{border:1px solid #bfbfbf}.x-vertical-scroller-present .x-scroller-horizontal{border-right-width:0}.x-scroller-ct{overflow:hidden;position:absolute;margin:0;padding:0;border:0;left:0;top:0;box-sizing:content-box!important;-ms-box-sizing:content-box!important;-moz-box-sizing:content-box!important;-webkit-box-sizing:content-box!important}.x-scroller-vertical .x-scroller-ct{overflow-y:scroll}.x-scroller-horizontal .x-scroller-ct{overflow-x:scroll}.x-html html,.x-html address,.x-html blockquote,.x-html body,.x-html dd,.x-html div,.x-html dl,.x-html dt,.x-html fieldset,.x-html form,.x-html frame,.x-html frameset,.x-html h1,.x-html h2,.x-html h3,.x-html h4,.x-html h5,.x-html h6,.x-html noframes,.x-html ol,.x-html p,.x-html ul,.x-html center,.x-html dir,.x-html hr,.x-html menu,.x-html pre{display:block}.x-html li{display:list-item;list-style:disc}.x-html head{display:none}.x-html table{display:table}.x-html tr{display:table-row}.x-html thead{display:table-header-group}.x-html tbody{display:table-row-group}.x-html tfoot{display:table-footer-group}.x-html col{display:table-column}.x-html colgroup{display:table-column-group}.x-html td,.x-html th{display:table-cell}.x-html caption{display:table-caption}.x-html th{font-weight:bolder;text-align:center}.x-html caption{text-align:center}.x-html body{margin:8px}.x-html h1{font-size:2em;margin:.67em 0}.x-html h2{font-size:1.5em;margin:.75em 0}.x-html h3{font-size:1.17em;margin:.83em 0}.x-html h4,.x-html p,.x-html blockquote,.x-html ul,.x-html fieldset,.x-html form,.x-html ol,.x-html dl,.x-html dir,.x-html menu{margin:1.12em 0}.x-html h5{font-size:.83em;margin:1.5em 0}.x-html h6{font-size:.75em;margin:1.67em 0}.x-html h1,.x-html h2,.x-html h3,.x-html h4,.x-html h5,.x-html h6,.x-html b,.x-html strong{font-weight:bolder}.x-html blockquote{margin-left:40px;margin-right:40px}.x-html i,.x-html cite,.x-html em,.x-html var,.x-html address{font-style:italic}.x-html pre,.x-html tt,.x-html code,.x-html kbd,.x-html samp{font-family:monospace}.x-html pre{white-space:pre}.x-html button,.x-html textarea,.x-html input,.x-html select{display:inline-block}.x-html big{font-size:1.17em}.x-html small,.x-html sub,.x-html sup{font-size:.83em}.x-html sub{vertical-align:sub}.x-html sup{vertical-align:super}.x-html table{border-spacing:2px}.x-html thead,.x-html tbody,.x-html tfoot{vertical-align:middle}.x-html td,.x-html th{vertical-align:inherit}.x-html s,.x-html strike,.x-html del{text-decoration:line-through}.x-html hr{border:1px inset}.x-html ol,.x-html ul,.x-html dir,.x-html menu,.x-html dd{margin-left:40px}.x-html ul,.x-html menu,.x-html dir{list-style-type:disc}.x-html ol{list-style-type:decimal}.x-html ol ul,.x-html ul ol,.x-html ul ul,.x-html ol ol{margin-top:0;margin-bottom:0}.x-html u,.x-html ins{text-decoration:underline}.x-html br:before{content:"\A"}.x-html :before,.x-html :after{white-space:pre-line}.x-html center{text-align:center}.x-html :link,.x-html :visited{text-decoration:underline}.x-html :focus{outline:invert dotted thin}.x-html BDO[DIR="ltr"]{direction:ltr;unicode-bidi:bidi-override}.x-html BDO[DIR="rtl"]{direction:rtl;unicode-bidi:bidi-override}.x-nlg .x-toolbar-default{background-image:none!important}.x-nlg .x-btn-default-toolbar-small-focus,.x-nlg .x-btn-default-toolbar-small-over,.x-nlg .x-btn-default-toolbar-small-pressed{background-image:none}html{color:#000;background:#FFF}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td{margin:0;padding:0}table{border-collapse:collapse;border-spacing:0}fieldset,img{border:0}address,caption,cite,code,dfn,em,strong,th,var,optgroup{font-style:inherit;font-weight:inherit}del,ins{text-decoration:none}li{list-style:none}caption,th{text-align:left}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal}q:before,q:after{content:''}abbr,acronym{border:0;font-variant:normal}sup{vertical-align:baseline}sub{vertical-align:baseline}legend{color:#000}input,button,textarea,select,optgroup,option{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit}input,button,textarea,select{*font-size:100%}body{font:13px/1.231 HelveticaNeue,helvetica,arial,clean,sans-serif!important;*font-size:small;*font:x-small}select,input,button,textarea,button{font:99% HelveticaNeue,helvetica,arial,clean,sans-serif}table{font-size:inherit;font:100%}pre,code,kbd,samp,tt{font-family:monospace;*font-size:108%;line-height:100%}html{height:100%}body{-webkit-font-smoothing:antialiased;font:13px/1.231 "Helvetica Neue","Helvetica","Arial","Lucida Grande",sans-serif;color:#484848;background:#f8f8f8;min-height:100%}a:link{color:#083772;text-decoration:none}a:link:hover{color:#0464bb}pre,code,kbd,samp,tt{font-family:"Menlo","Courier New","Courier",monospace}.iScroll ::-webkit-scrollbar,.iScroll::-webkit-scrollbar{width:6px;height:9px}.iScroll ::-webkit-scrollbar-button:start:decrement,.iScroll ::-webkit-scrollbar-button:end:increment,.iScroll::-webkit-scrollbar-button:start:decrement,.iScroll::-webkit-scrollbar-button:end:increment{display:block;height:0;background-color:transparent}.iScroll ::-webkit-scrollbar-track-piece,.iScroll::-webkit-scrollbar-track-piece{margin:10px 0;-webkit-border-radius:0;-webkit-border-bottom-right-radius:4px;-webkit-border-bottom-left-radius:4px}.iScroll ::-webkit-scrollbar-thumb:vertical,.iScroll::-webkit-scrollbar-thumb:vertical{height:50px;background-color:rgba(0,0,0,0.12);-webkit-border-radius:4px}.iScroll ::-webkit-scrollbar-thumb:horizontal,.iScroll::-webkit-scrollbar-thumb:horizontal{width:50px;background-color:rgba(0,0,0,0.12);-webkit-border-radius:4px}#treecontainer .iScroll ::-webkit-scrollbar-thumb:vertical,#treecontainer .iScroll::-webkit-scrollbar-thumb:vertical{height:50px;background-color:rgba(0,0,0,0.06);-webkit-border-radius:4px}@media print{h1,h2,h3,h4,h5,h6{page-break-after:avoid}.logo{padding:0}.logo a{color:#000;font-size:1.4em}.members .member a.side{display:none}.members .member{padding:5px}.members h3.members-title{padding:5px}}#loading{position:absolute;top:50%;width:100%;margin-top:-70px}#loading .title{font-family:"Exo",sans-serif;font-size:2em;color:gray;text-align:center;white-space:nowrap;display:block}#loading .logo{background:url(../images/loading.gif) no-repeat center;display:block;height:120px}#north-region{background:#074e7c;background:-webkit-gradient(linear,left top,left bottom,from(#074e7c),to(#095f93));background:-moz-linear-gradient(top,#074e7c,#095f93)}#north-region .dropdown{padding-right:15px;background:url(../images/down-arr.png) no-repeat bottom right}#header-content{background:url(../images/logo.png) 0 0 no-repeat;color:#fff;font-family:"Helvetica Neue","Helvetica","Arial","Lucida Grande",sans-serif;line-height:20px;margin:10px 0 0 8px;padding-left:21px;font-size:1.1em;white-space:nowrap}#header-content a{color:#fff}#header-content strong{font-weight:bold;padding-right:3px}#loginContainer{text-align:right;color:#fff;line-height:25px}#loginContainer div{padding-left:10px;float:right}#loginContainer img.avatar{-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px}#loginContainer .register{font-weight:bold}#loginContainer a{color:#fff}.loginForm .username,.loginForm .password{width:100px;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px;border:0;padding:2px 3px;margin-right:10px}.loginForm .submit{padding:2px 7px 2px 7px;-webkit-box-shadow:#b3f33d 0 1px 0 0 inset;-moz-box-shadow:#b3f33d 0 1px 0 0 inset;box-shadow:#b3f33d 0 1px 0 0 inset;color:#fff;text-shadow:rgba(0,0,0,0.3) 0 -1px 0;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px;cursor:pointer;border:1px solid #264901;background:#91c632;background:-webkit-gradient(linear,left top,left bottom,from(#91c632),to(#519700));background:-moz-linear-gradient(top,#91c632,#519700)}.loginForm .submit:hover{background:#74b61e;background:-webkit-gradient(linear,left top,left bottom,from(#74b61e),to(#3d7e00));background:-moz-linear-gradient(top,#74b61e,#3d7e00)}.loginForm .submit.disabled{border-color:#707070;cursor:auto;background:#bbb;background:-webkit-gradient(linear,left top,left bottom,from(#bbb),to(#9c9c9c));background:-moz-linear-gradient(top,#bbb,#9c9c9c);-webkit-box-shadow:#d7d7d7 0 1px 0 0 inset;-moz-box-shadow:#d7d7d7 0 1px 0 0 inset;box-shadow:#d7d7d7 0 1px 0 0 inset}.loginForm label{margin-right:10px}.search{background:url(../images/search-box.png) no-repeat;padding:2px 0 0 25px}.search .x-panel-body-default{border:0;background:0}.search .x-form-text{border:0;background:0}#search-field .reset{background:url(../images/x.png) no-repeat;width:16px;height:16px;border:0;margin:2px 0 0 14px}#search-dropdown{border-style:solid;border-color:#bfbfbf;border-width:1px 1px 0 1px;background:white;position:absolute;width:190px;top:18px;left:23px;z-index:5}#search-dropdown .item,#search-dropdown .footer{position:relative;display:block;cursor:pointer;overflow:hidden;padding:5px 5px 5px 30px;border-width:0 0 1px 0;border-style:solid;border-color:#bfbfbf;color:#605f5f}#search-dropdown .item .title,#search-dropdown .item .class,#search-dropdown .footer .title,#search-dropdown .footer .class{white-space:pre}#search-dropdown .item .title strong,#search-dropdown .item .class strong,#search-dropdown .footer .title strong,#search-dropdown .footer .class strong{background:rgba(0,0,0,0.1);color:black}#search-dropdown .item .title,#search-dropdown .footer .title{font-weight:bold;overflow:hidden;text-overflow:ellipsis}#search-dropdown .item .title.private,#search-dropdown .footer .title.private{color:gray}#search-dropdown .item .title.removed,#search-dropdown .footer .title.removed{color:gray;text-decoration:line-through}#search-dropdown .item .class,#search-dropdown .footer .class{font-size:.85em;overflow:hidden;text-overflow:ellipsis}#search-dropdown .icon{position:absolute;float:left;top:6px;left:4px;width:18px;height:18px}#search-dropdown .icon-pkg{background:url(../images/icons.png) no-repeat 0 0}#search-dropdown .icon-class{background:url(../images/icons.png) no-repeat 0 -40px}#search-dropdown .icon-singleton{background:url(../images/icons.png) no-repeat 0 -80px}#search-dropdown .icon-subclass{background:url(../images/icons.png) no-repeat 0 -120px}#search-dropdown .icon-component{background:url(../images/icons.png) no-repeat 0 -160px}#search-dropdown .icon-guide{background:url(../images/icons.png) no-repeat 0 -360px}#search-dropdown .icon-video{background:url(../images/icons.png) no-repeat 0 -400px}#search-dropdown .icon-example{background:url(../images/icons.png) no-repeat 0 -440px}#search-dropdown .icon-class-redirect{background:url(../images/icons.png) no-repeat 0 -560px}#search-dropdown .icon-singleton-redirect{background:url(../images/icons.png) no-repeat 0 -600px}#search-dropdown .icon-component-redirect{background:url(../images/icons.png) no-repeat 0 -640px}#search-dropdown .meta{position:absolute;top:6px;right:4px}#search-dropdown .meta .signature span{font-size:.6em;text-transform:uppercase;font-weight:bold;padding:0 .5em;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px}#search-dropdown .item.x-item-selected{background-color:#ffa}#search-dropdown .item.x-view-over{background-color:#ffa}#search-dropdown .footer{cursor:auto;text-align:right;font-size:.85em}#search-dropdown .footer a{padding:0 .5em}#footer{background:#f8f8f8;color:gray;text-align:right;font-size:10px;padding-top:3px;padding-right:40px;border-color:#ebebeb;border-width:0 1px 0 0!important;border-style:solid}#footer a{color:gray}#footer #footer-content{display:block!important}.doctabs{padding-left:10px;height:19px;position:relative}.doctabs .icon-pkg{background:url(../images/icons.png) no-repeat 0 0}.doctabs .icon-class{background:url(../images/icons.png) no-repeat 0 -40px}.doctabs .icon-singleton{background:url(../images/icons.png) no-repeat 0 -80px}.doctabs .icon-subclass{background:url(../images/icons.png) no-repeat 0 -120px}.doctabs .icon-component{background:url(../images/icons.png) no-repeat 0 -160px}.doctabs .icon-guide{background:url(../images/icons.png) no-repeat 0 -360px}.doctabs .icon-video{background:url(../images/icons.png) no-repeat 0 -400px}.doctabs .icon-example{background:url(../images/icons.png) no-repeat 0 -440px}.doctabs .icon-class-redirect{background:url(../images/icons.png) no-repeat 0 -560px}.doctabs .icon-singleton-redirect{background:url(../images/icons.png) no-repeat 0 -600px}.doctabs .icon-component-redirect{background:url(../images/icons.png) no-repeat 0 -640px}.doctabs .doctab{position:relative;display:block;float:left;overflow:hidden;top:0;margin-left:-8px;cursor:pointer;height:28px}.doctabs .doctab .l{position:absolute;top:0;left:0;width:9px;height:29px;background:url(../images/tabs.png) no-repeat -8px -141px;z-index:3}.doctabs .doctab .r{position:absolute;right:0;top:0;width:26px;height:29px;background:url(../images/tabs.png) no-repeat 0 -239px;z-index:5}.doctabs .doctab .m{z-index:5;position:relative;padding:6px 3px 0 6px;margin:0 7px;background:url(../images/tabs.png) repeat-x 0 -173px;height:29px;overflow:hidden;white-space:nowrap;text-shadow:1px 1px 0 rgba(255,255,255,0.5);font-family:"Helvetica Neue","Helvetica","Arial","Lucida Grande",sans-serif;font-weight:bold;font-size:11px}.doctabs .doctab .m span,.doctabs .doctab .m a{padding-bottom:5px;line-height:16px;display:block;color:#2e3841;white-space:nowrap;overflow:hidden;float:left}.doctabs .doctab .m a.ov-tab{overflow:hidden;padding:0 14px 0 17px}.doctabs .doctab .m a.ov-tab-text{overflow:hidden}.doctabs .doctab .m a.main-tab{overflow:hidden;padding:0 14px 0 17px;width:140px}.doctabs .doctab .m span.icn{display:block;position:absolute;left:3px;padding-left:15px;padding-bottom:0}.doctabs .doctab a.close{position:absolute;width:11px;height:11px;top:8px;right:9px;z-index:6;background:url(../images/tabs.png) no-repeat -8px -111px!important}.doctabs .doctab a.close.ovr{background:url(../images/tabs.png) no-repeat -8px -123px!important}.doctabs .doctab.highlight{border-width:0}.doctabs .doctab.highlight .l{background:url(../images/tabs.png) no-repeat -9px -271px}.doctabs .doctab.highlight .r{background:url(../images/tabs.png) no-repeat -9px -335px;width:10px}.doctabs .doctab.highlight .m{background:url(../images/tabs.png) repeat-x 0 -303px}.doctabs .doctab.active{border-width:0}.doctabs .doctab.active .l{background:url(../images/tabs.png) no-repeat -9px -369px;z-index:6;width:13px}.doctabs .doctab.active .r{background:url(../images/tabs.png) no-repeat 3px -479px;z-index:5;width:28px}.doctabs .doctab.active .m{background:url(../images/tabs.png) repeat-x 0 -405px;z-index:5}.doctabs .doctab.overview .m{z-index:6}.doctabs .doctab.index .m a{background:url(../images/tabs.png) no-repeat 1px 1px;padding-left:16px;padding-right:12px;padding-bottom:20px}.doctabs .doctab.classes .m a{background:url(../images/tabs.png) no-repeat 2px -20px;padding-left:16px;padding-right:12px}.doctabs .doctab.guides .m a{background:url(../images/tabs.png) no-repeat 3px -55px;padding-left:16px;padding-right:12px}.doctabs .doctab.videos .m a{background:url(../images/tabs.png) no-repeat 2px -38px;padding-left:16px;padding-right:12px}.doctabs .doctab.examples .m a{background:url(../images/tabs.png) no-repeat 1px -93px;padding-left:16px;padding-right:12px}.doctabs .doctab.comments .m a{background:url(../images/tabs.png) no-repeat 2px -72px;padding-left:16px;padding-right:12px}.doctabs .tab-overflow{position:absolute;right:5px;top:8px}.doctabs .tab-overflow button{cursor:pointer;display:block;width:14px;height:20px;background:url(../images/tabs.png) no-repeat -7px -513px;border:0}.tab-menu .x-menu-item-link{padding-top:5px}.tab-menu .overflow{background:#e3e3e3}.tab-menu .close-all{background:#e3e3e3;border-top:1px dotted #aaa;font-weight:bold}.tab-menu .close-all a .x-menu-item-text{color:#666}.tab-menu .x-menu-item-icon.close{background:url(../images/x12.png) no-repeat 4px 4px}.class-overview .x-toolbar.member-links{border-radius:2px;border-color:#e4e4e4;padding:5px;border-width:1px!important}.class-overview .x-toolbar.member-links .hover-menu-button{background-position:0 -1px}.member-filter{height:20px;border-style:solid;border-color:#bebebe;border-width:1px;margin-left:-1px;background:white url("../images/text-bg.gif") repeat-x 0 0}.member-filter .x-form-trigger.reset{background:url(../images/x12.png) no-repeat 2px 3px;padding:0;margin:0;border:0}.member-filter input{background:transparent;border:0}.expand-all-members{background:url(../images/expandcollapse.png) no-repeat -12px 2px}.collapse-all-members{background:url(../images/expandcollapse.png) no-repeat 2px 2px}.hover-menu-button{padding-left:20px;cursor:pointer}.hover-menu-button sup{font-size:.8em;position:relative;top:-4px}.hover-menu{font-size:12px;position:absolute;padding:5px 15px 10px;background:#eaeaea;z-index:8;top:21px;border:1px solid #e4e4e4;border-top:1px solid #eaeaea;left:-16px;-moz-border-radius-bottomleft:5px;-webkit-border-bottom-left-radius:5px;border-bottom-left-radius:5px;-moz-border-radius-bottomright:5px;-webkit-border-bottom-right-radius:5px;border-bottom-right-radius:5px}.hover-menu table{width:100%}.hover-menu td{vertical-align:top}.hover-menu .item{position:relative}.hover-menu a{display:block;position:relative;padding:2px 30px 2px 0;color:#0464bb;white-space:nowrap}.hover-menu a:hover{color:#083772;text-decoration:underline}.hover-menu a .signature span{font-size:.6em;text-transform:uppercase;font-weight:bold;padding:0 .5em;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px}.hover-menu a{font-family:Helvetica,Arial,clean,sans-serif;font-size:12px}#treecontainer{background:#f8f8f8;border:0;background:-moz-linear-gradient(top,white 0,#f8f8f8 10px);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,white),color-stop(10px,#f8f8f8));background:-webkit-linear-gradient(top,white 0,#f8f8f8 10px);background:-o-linear-gradient(top,white 0,#f8f8f8 5px);background:-ms-linear-gradient(top,white 0,#f8f8f8 5px);background:linear-gradient(top,#fff 0,#f8f8f8 5px)}#treecontainer a{color:#000}#treecontainer .x-grid-cell{background:0}#treecontainer .x-grid-cell-inner{font-family:"Helvetica Neue","Helvetica","Arial","Lucida Grande",sans-serif;font-size:13px;position:relative;-webkit-transition:background-color .15s linear;-moz-transition:background-color .15s linear;-o-transition:background-color .15s linear}#treecontainer .x-grid-cell-inner .icon-pkg{background:url(../images/icons.png) no-repeat 0 0}#treecontainer .x-grid-cell-inner .icon-class{background:url(../images/icons.png) no-repeat 0 -40px}#treecontainer .x-grid-cell-inner .icon-singleton{background:url(../images/icons.png) no-repeat 0 -80px}#treecontainer .x-grid-cell-inner .icon-subclass{background:url(../images/icons.png) no-repeat 0 -120px}#treecontainer .x-grid-cell-inner .icon-component{background:url(../images/icons.png) no-repeat 0 -160px}#treecontainer .x-grid-cell-inner .icon-guide{background:url(../images/icons.png) no-repeat 0 -360px}#treecontainer .x-grid-cell-inner .icon-video{background:url(../images/icons.png) no-repeat 0 -400px}#treecontainer .x-grid-cell-inner .icon-example{background:url(../images/icons.png) no-repeat 0 -440px}#treecontainer .x-grid-cell-inner .icon-class-redirect{background:url(../images/icons.png) no-repeat 0 -560px}#treecontainer .x-grid-cell-inner .icon-singleton-redirect{background:url(../images/icons.png) no-repeat 0 -600px}#treecontainer .x-grid-cell-inner .icon-component-redirect{background:url(../images/icons.png) no-repeat 0 -640px}#treecontainer .private .x-grid-cell-inner,#treecontainer .private .x-grid-cell-inner a{color:#666}#treecontainer .x-grid-row-over .x-grid-cell-inner{-webkit-transition:background-color .15s linear;-moz-transition:background-color .15s linear;-o-transition:background-color .15s linear}#treecontainer .x-panel-body{border-color:#d4d4d4;background:#f8f8f8}.x-scroller-vertical{border:0}.x-tree-arrows .x-tree-elbow-plus,.x-tree-arrows .x-tree-elbow-minus,.x-tree-arrows .x-tree-elbow-end-plus,.x-tree-arrows .x-tree-elbow-end-minus{background:url("../images/arrows.png") no-repeat 2px 1px}.x-tree-arrows .x-tree-expander-over .x-tree-elbow-plus,.x-tree-arrows .x-tree-expander-over .x-tree-elbow-end-plus{background-position:2px 1px}.x-tree-arrows .x-grid-tree-node-expanded .x-tree-elbow-plus,.x-tree-arrows .x-grid-tree-node-expanded .x-tree-elbow-end-plus{background-position:-12px 1px}.x-tree-arrows .x-grid-tree-node-expanded .x-tree-expander-over .x-tree-elbow-plus,.x-tree-arrows .x-grid-tree-node-expanded .x-tree-expander-over .x-tree-elbow-end-plus{background-position:-12px 1px}#tree-container .x-grid-cell-inner{font-family:Helvetica,Arial,clean,sans-serif;font-size:12px}#treecontainer>.x-panel-body{background:transparent;border-color:#ebebeb;border-width:0 1px 0 0!important}.x-resizable-over .x-resizable-handle-east{cursor:col-resize}.x-resizable-handle-east{width:6px}.x-resizable-over .x-resizable-handle-east,.x-resizable-over .x-resizable-handle-west,.x-resizable-pinned .x-resizable-handle-east,.x-resizable-pinned .x-resizable-handle-west{background:0;border:solid #bbb;border-width:0 1px 0 0}.cls-grouping button,.cls-private-cb{font-size:11px;color:#4d4d4d;font-weight:bold;-webkit-font-smoothing:antialiased}.cls-grouping{padding:5px 0 2px 0;text-align:center}.cls-grouping button{display:inline-block;float:left;margin:0 3px;padding:1px 13px 2px 13px;border:1px solid transparent;cursor:pointer;background:transparent}.cls-grouping button.selected{color:#fff;border:1px solid #727a81;background-color:#646b72;background:#646b72;background:-webkit-gradient(linear,left top,left bottom,from(#646b72),to(#8d949b));background:-moz-linear-gradient(top,#646b72,#8d949b);-webkit-box-shadow:#5b6167 0 0 1px 0 inset;-moz-box-shadow:#5b6167 0 0 1px 0 inset;box-shadow:#5b6167 0 0 1px 0 inset;-webkit-border-radius:10px;-moz-border-radius:10px;-ms-border-radius:10px;-o-border-radius:10px;border-radius:10px;text-shadow:1px 1px 0 rgba(0,0,0,0.35)}.thumb-list{padding:2px}.thumb-list dd{cursor:pointer;float:left;height:100px;margin:10px;width:300px;zoom:1;line-height:1em}.thumb-list dd.over{background:#f5fde3 url(../images/sample-over.gif) no-repeat}.thumb-list dd .thumb{float:left;height:90px;margin:5px 0 0 5px;width:120px}.thumb-list dd .thumb img{border:1px solid #ddd;max-height:88px;max-width:118px;margin:auto}.thumb-list dd div{float:left;margin-left:10px;width:160px}.thumb-list dd h4{color:#555;font-size:11px;font-weight:bold;padding:3px 0}.thumb-list dd h4 span.new-sample{color:red}.thumb-list dd h4 span.updated-sample{color:blue}.thumb-list dd p{color:#777;font-size:13px}.thumb-list h2{border-bottom:2px solid #99bbe8;cursor:pointer;padding-top:6px}.thumb-list h2 div{background:transparent url(../images/group-expand-sprite.gif) no-repeat 2px -45px;color:#3764a0;padding:4px 4px 4px 17px}.thumb-list .collapsed h2 div{background-position:2px 5px}.thumb-list .collapsed dl{display:none}.touch-examples-ui .thumb-list dd .thumb{border:1px solid #ddd;background:white;background:-webkit-gradient(linear,left top,left bottom,from(white),to(#f9f9f9));background:-moz-linear-gradient(top,white,#f9f9f9)}.touch-examples-ui .thumb-list dd .thumb img{border:0;margin:7px 0 0 22px}.class-categories h1.top{margin-bottom:12px}.class-categories .notice{background-color:#ffc;text-align:center;color:#434343;font-weight:bold;padding:8px 0;margin:0 20px 15px 0;-webkit-border-radius:8px;-moz-border-radius:8px;-ms-border-radius:8px;-o-border-radius:8px;border-radius:8px}.class-categories .section{-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;-o-border-radius:5px;border-radius:5px;background-color:#f7f7f7;border:1px solid #ebebeb;padding:20px 10px 20px 20px;margin:0 10px 20px 0;clear:both}.class-categories .section .left-column{float:left;width:250px}.class-categories .section .middle-column{float:left;width:280px}.class-categories .section .right-column{float:left}.class-categories .section .links{margin-left:1.5em}.class-categories .section .links .new-class{-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px;padding:0 .5em;background:#f5d833;position:relative;top:-2px;font-size:7px}#failure{padding:1em}#failure h1{padding:10px 0;font-family:"Exo",sans-serif;margin-bottom:16px;font-size:2em;color:#66ab16}#failure p{margin:0 0 .8em}#center-container h1{font-family:"Exo",sans-serif;padding-bottom:5px;padding-top:2px;border-bottom:1px #f1f1f1;font-size:2em;color:#66ab16}#center-container h1 .class-source-link{color:#66ab16;margin-left:-3px;padding:.1em 0 .4em 2.3em}#center-container h1.class .class-source-link{background:url(../images/class-m.png) no-repeat 0 -5px}#center-container h1.component .class-source-link{background:url(../images/component-m.png) no-repeat 0 -5px}#center-container h1.singleton .class-source-link{background:url(../images/singleton-m.png) no-repeat 0 -5px}#center-container h1 .xtype,#center-container h1 .enum,#center-container h1 .singleton{color:#929292;letter-spacing:0;margin-left:10px;font-size:.5em}#center-container h1 .class-source-tip{font-size:.5em;position:absolute;top:35px;left:100px;color:#fff;-webkit-transition:color .2s linear;-moz-transition:color .2s linear;-o-transition:color .2s linear}#center-container h1 .class-source-tip.hover{color:#929292}#center-container h1 .signature span{font-weight:bold;text-transform:uppercase;font-size:.4em;letter-spacing:2px;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px;margin-left:2px;margin-right:0;padding:0 5px}#center-container .guide-container table{font-size:.9em}#center-container .guide-container table th{background-color:#eee;font-weight:bold;text-align:center;color:#333;padding:1px 2px}#center-container .guide-container table td{padding:3px}#center-container .print{background:url(../images/print.png) no-repeat;position:absolute;right:0;top:5px;display:block;text-indent:-9999px;width:32px;height:32px}#center-container .print.guide{right:15px;top:15px}.card-panel{line-height:1.5em}.card-panel h3{font-size:1.2em;padding:1em 0 .4em 0;font-weight:normal}#welcomeindex .markdown{margin:2em;color:#484848}#welcomeindex .markdown p{margin-bottom:1em}#welcomeindex .markdown h1{color:#66ab16;font-family:"Exo",sans-serif;font-size:2em}#welcomeindex .markdown h2{font-family:"Helvetica Neue","Helvetica","Arial","Lucida Grande",sans-serif;letter-spacing:-1px;line-height:20px;border-bottom:1px solid #f1f1f1;font-size:20px;font-weight:bold;color:#314e64;margin:30px 0 15px;padding-bottom:5px}#welcomeindex .markdown h3{font-weight:bold;color:#314e64;margin-top:.5em;padding-top:16px;font-size:16px;line-height:16px;margin-bottom:4px}#welcomeindex .markdown h3{font-weight:bold;font-size:1.1em}#welcomeindex .markdown h4,#welcomeindex .markdown h5,#welcomeindex .markdown h6{font-weight:bold}#welcomeindex .markdown ul{margin:0 0 1em 2em}#welcomeindex .markdown ul li{list-style:disc outside}#welcomeindex .markdown ol{margin:0 0 1em 2em}#welcomeindex .markdown ol li{list-style:decimal outside}#welcomeindex .markdown em{font-style:italic}#welcomeindex .markdown strong{font-weight:bold}#welcomeindex .markdown pre{background-color:#f7f7f7;border:solid 1px #e8e8e8;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;-o-border-radius:5px;border-radius:5px;color:#314e64;font-family:"Menlo","Courier New","Courier",monospace;padding:10px 12px;margin:10px 0 14px 0;overflow-x:auto;overflow-y:hidden}.class-overview .x-panel-body,.guide-container .x-panel-body,.comments-index .x-panel-body{min-height:100px;color:#484848}.class-overview .x-panel-body .clr,.guide-container .x-panel-body .clr,.comments-index .x-panel-body .clr{clear:both}.class-overview .x-panel-body p,.class-overview .x-panel-body ul,.class-overview .x-panel-body ol,.guide-container .x-panel-body p,.guide-container .x-panel-body ul,.guide-container .x-panel-body ol,.comments-index .x-panel-body p,.comments-index .x-panel-body ul,.comments-index .x-panel-body ol{max-width:900px}.class-overview .x-panel-body p,.guide-container .x-panel-body p,.comments-index .x-panel-body p{padding:0;margin:0 0 1em}.class-overview .x-panel-body p:last-child,.guide-container .x-panel-body p:last-child,.comments-index .x-panel-body p:last-child{margin:0}.class-overview .x-panel-body ul,.guide-container .x-panel-body ul,.comments-index .x-panel-body ul{margin:0 0 1em 2em}.class-overview .x-panel-body ul li,.guide-container .x-panel-body ul li,.comments-index .x-panel-body ul li{list-style:disc outside}.class-overview .x-panel-body ol,.guide-container .x-panel-body ol,.comments-index .x-panel-body ol{margin:0 0 1em 2em}.class-overview .x-panel-body ol li,.guide-container .x-panel-body ol li,.comments-index .x-panel-body ol li{list-style:decimal outside}.class-overview .x-panel-body em,.guide-container .x-panel-body em,.comments-index .x-panel-body em{font-style:italic}.class-overview .x-panel-body strong,.guide-container .x-panel-body strong,.comments-index .x-panel-body strong{font-weight:bold}.class-overview .x-panel-body kbd,.guide-container .x-panel-body kbd,.comments-index .x-panel-body kbd{border:1px solid #aaa;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px;-webkit-box-shadow:1px 2px 2px #ddd;-moz-box-shadow:1px 2px 2px #ddd;box-shadow:1px 2px 2px #ddd;background-color:#f9f9f9;padding:1px 3px;font-size:.85em}.class-overview .x-panel-body h3,.guide-container .x-panel-body h3,.comments-index .x-panel-body h3{font-weight:bold;font-size:1.1em}.class-overview .x-panel-body h4,.class-overview .x-panel-body h5,.class-overview .x-panel-body h6,.guide-container .x-panel-body h4,.guide-container .x-panel-body h5,.guide-container .x-panel-body h6,.comments-index .x-panel-body h4,.comments-index .x-panel-body h5,.comments-index .x-panel-body h6{font-weight:bold}.class-overview .x-panel-body table,.guide-container .x-panel-body table,.comments-index .x-panel-body table{margin-bottom:10px}.class-overview .x-panel-body table tr:first-child td,.guide-container .x-panel-body table tr:first-child td,.comments-index .x-panel-body table tr:first-child td{color:#000;font-weight:bold}.class-overview .x-panel-body table td,.guide-container .x-panel-body table td,.comments-index .x-panel-body table td{color:#484848;padding:2px 20px 2px 0}.class-overview .x-panel-body blockquote,.guide-container .x-panel-body blockquote,.comments-index .x-panel-body blockquote{padding-left:1em;border-left:solid 1em #e8e8e8}.class-overview .x-panel-body pre.notpretty,.class-overview .x-panel-body pre.prettyprint,.guide-container .x-panel-body pre.notpretty,.guide-container .x-panel-body pre.prettyprint,.comments-index .x-panel-body pre.notpretty,.comments-index .x-panel-body pre.prettyprint{background-color:#f7f7f7;border:solid 1px #e8e8e8;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;-o-border-radius:5px;border-radius:5px;color:#314e64;font-family:"Menlo","Courier New","Courier",monospace;padding:10px 12px;line-height:1.3em;margin:10px 0 14px 0;max-width:900px;overflow-x:auto;overflow-y:hidden}.class-overview .x-panel-body pre.notpretty code,.class-overview .x-panel-body pre.prettyprint code,.guide-container .x-panel-body pre.notpretty code,.guide-container .x-panel-body pre.prettyprint code,.comments-index .x-panel-body pre.notpretty code,.comments-index .x-panel-body pre.prettyprint code{font-family:"Menlo","Courier New","Courier",monospace}.class-overview .x-panel-body pre.notpretty i,.class-overview .x-panel-body pre.notpretty em,.class-overview .x-panel-body pre.prettyprint i,.class-overview .x-panel-body pre.prettyprint em,.guide-container .x-panel-body pre.notpretty i,.guide-container .x-panel-body pre.notpretty em,.guide-container .x-panel-body pre.prettyprint i,.guide-container .x-panel-body pre.prettyprint em,.comments-index .x-panel-body pre.notpretty i,.comments-index .x-panel-body pre.notpretty em,.comments-index .x-panel-body pre.prettyprint i,.comments-index .x-panel-body pre.prettyprint em{font-style:normal}.class-overview .hierarchy,.class-overview .aside{-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;-o-border-radius:5px;border-radius:5px;background-color:#f7f7f7;border:1px solid #ebebeb;padding:0 15px 15px 10px;float:right;clear:right;margin:0 0 10px 60px;color:#484848;font-size:12px}.class-overview .hierarchy h4{font-family:"Helvetica Neue","Helvetica","Arial","Lucida Grande",sans-serif;font-size:90%;padding:11px 0 5px 0;text-transform:uppercase;color:#999}.class-overview .hierarchy .dependency,.class-overview .hierarchy .alternate-class-name{padding:0 0 0 12px;margin-top:3px}.class-overview .hierarchy .alternate-class-name{color:#484848}.class-overview .hierarchy .subclass{background:url(../images/elbow-end.gif) no-repeat -5px 0;margin-top:3px;padding:0 0 0 12px}.class-overview .hierarchy .subclass.first-child{background:0;padding-left:15px}.class-overview .aside{width:180px}.class-overview .aside h4{margin:4px 0;font-size:larger;color:#526c83;padding-left:22px}.class-overview .aside img{width:50px;float:left;margin-right:10px}.class-overview .aside.guide h4{background:url(../images/tabs.png) no-repeat -5px -55px}.class-overview .aside.video h4{background:url(../images/tabs.png) no-repeat -6px -38px}.class-overview .aside.example h4{background:url(../images/tabs.png) no-repeat -7px -93px}#center-container .doc-contents h1,#center-container .doc-contents h2{font-family:"Helvetica Neue","Helvetica","Arial","Lucida Grande",sans-serif;letter-spacing:-1px;line-height:20px;border-bottom:1px solid #f1f1f1;font-size:20px;font-weight:bold;color:#314e64;margin:30px 0 15px;padding-bottom:5px;letter-spacing:0}#center-container .doc-contents h3{font-weight:bold;color:#314e64;margin-top:.5em;padding-top:16px;font-size:16px;line-height:16px;margin-bottom:4px}.class-overview .signature span{font-weight:bold;text-transform:uppercase;font-size:.7em;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px;margin-left:5px;padding:0 3px}.class-overview .new-keyword{margin-left:0;margin-right:3px;color:#083772}.class-overview .cfgGroup{margin:10px 0 3px 0}.members{color:#444;padding-top:10px;clear:both;first-child-padding-top:0}.members h1,.members h2{font-family:"Helvetica Neue","Helvetica","Arial","Lucida Grande",sans-serif;letter-spacing:-1px;line-height:20px;border-bottom:1px solid #f1f1f1;font-size:20px;font-weight:bold;color:#314e64;margin:30px 0 15px;padding-bottom:5px;font-size:14px;margin:15px 0 5px}.members .pre{font-family:"Menlo","Courier New","Courier",monospace;font-size:.9em}.members .definedBy{float:right;padding:0 20px 0 0;font-weight:bold;color:#666}.members .subsection .definedBy{padding-top:0}.members h3.pa{padding:10px 0 5px 0}.members .members-section,.members .comments-section{margin-bottom:40px}.members h3.members-title{margin:20px 0 5px 0;padding:0 0 0 25px;font-size:1.3em;font-weight:bold}.members h4.members-subtitle{padding-left:25px;margin:10px 0 7px 0}.members ul ul{list-style:circle;margin-top:1em}.members .sub-desc{margin:.5em 0 1em}.members .description .short p{margin:0}.members a{text-decoration:none}.members .member{position:relative;min-height:2.5em;border-style:solid;border-color:#e0e0e0;border-width:0 0 1px 0;padding:10px 22px}.members .member.open>a.side.toggleComments,.members .member.open>a.side.expandable{background:#ebf3fe}.members .member.open>a.side.toggleComments span,.members .member.open>a.side.expandable span{background:url(../images/member-expanded.gif) no-repeat 2px 12px}.members .member a.side{display:block;position:absolute;top:0;left:0;bottom:0;cursor:default!important}.members .member a.side span{display:block;width:15px;height:30px}.members .member a.side.expandable,.members .member a.side.toggleComments{cursor:pointer}.members .member a.side.expandable span,.members .member a.side.toggleComments span{background:url(../images/member-collapsed.gif) no-repeat 3px 13px}.members .member a.side.expandable:hover span,.members .member a.side.toggleComments:hover span{background:url(../images/member-hover.gif) no-repeat 3px 13px}.members .member.first-child{border-width:1px 0}.members .member .long{display:none}.members .member .meta{float:right;text-align:right}.members .member .defined-in,.members .member .view-source{font-family:"Helvetica","Arial",sans-serif;font-size:.9em}.members .member a.defined-in{color:#888}.members .member a.defined-in:hover{color:#0464bb}.members .member a.view-source{color:rgba(0,0,0,0);-webkit-transition:color .2s linear;-moz-transition:color .2s linear;-o-transition:color .2s linear;font-size:.9em}.members .member a.view-source:hover{-webkit-transition:color .2s linear;-moz-transition:color .2s linear;-o-transition:color .2s linear;color:#0464bb}.members .member:hover a.view-source{color:gray;-webkit-transition:color .2s linear;-moz-transition:color .2s linear;-o-transition:color .2s linear}.members .member.open a.side.expandable{background:#ebf3fe;background:-webkit-gradient(linear,left top,right top,from(#ebf3fe),to(#d9e8fc));background:-moz-linear-gradient(left,#ebf3fe,#d9e8fc)}.members .member.open a.side.expandable span{background:url(../images/member-expanded.gif) no-repeat 1px 2px}.members .member.open .short{display:none}.members .member.open .long{display:block}.members .member .name{font-weight:bold}.members .member .title{padding-bottom:3px}#center-container .guide-container{padding:10px;font-size:14px}#center-container .guide-container .toc{float:right;background-color:#f7f7f7;border:solid 1px #e8e8e8;padding:10px 20px;margin:0 14px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;-o-border-radius:5px;border-radius:5px}#center-container .guide-container h1{background:url(../images/doc-m.png) no-repeat -5px -5px;padding:10px 0 10px 55px;font-family:"Exo",sans-serif;margin-bottom:16px;font-size:2em;color:#66ab16}#center-container .guide-container h2{font-family:"Helvetica Neue","Helvetica","Arial","Lucida Grande",sans-serif;letter-spacing:-1px;line-height:20px;border-bottom:1px solid #f1f1f1;font-size:20px;font-weight:bold;color:#314e64;margin:30px 0 15px;padding-bottom:5px}#center-container .guide-container h3{font-weight:bold;color:#314e64;margin-top:.5em;padding-top:16px;font-size:16px;line-height:16px;margin-bottom:4px}#center-container .guide-container hr{display:none}p.screenshot img{display:block;margin:0 auto}p.screenshot span{display:block;text-align:center;font-size:smaller}#video object,#video p,#video h1{margin:15px}#exampleindex,#videoindex,#guideindex,#classindex{padding:15px 10px 10px 10px}.x-panel-body-default{border-width:0}pre.inline-example{margin-top:0}.inline-example-tb{background:none!important;border:0}.inline-example-tb .x-btn table{margin:0}.inline-example-tb .x-btn table td{padding:0}.inline-example-tb .x-btn button{display:inline-block}.inline-example-tb span.x-btn-inner{line-height:16px}.inline-example-tb .active span.x-btn-inner{color:#57a7dc}.inline-example-tb span.x-btn-icon{background:url(../images/example-icons.png) no-repeat;filter:alpha(opacity=60);opacity:.6}.inline-example-tb span.x-btn-icon.code{background-position:-2px -17px}.inline-example-tb span.x-btn-icon.preview{background-position:-3px -63px}.inline-example-tb span.x-btn-icon.copy{background-position:-2px -86px}.inline-example-tb .active span.x-btn-icon{background:url(../images/example-icons.png) no-repeat;filter:alpha(opacity=100);opacity:1}.inline-example-tb .active span.x-btn-icon.code{background-position:-30px -17px}.inline-example-tb .active span.x-btn-icon.preview{background-position:-31px -63px}.inline-example-tb .active span.x-btn-icon.copy{background-position:-30px -86px}.inline-example-editor{border:0}.inline-example-editor .x-panel-body{border:solid 1px #e8e8e8;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;-o-border-radius:5px;border-radius:5px;padding:5px 15px!important;background:#f7f7f7}.inline-example-editor .CodeMirror-scroll{height:auto}.inline-example-editor .CodeMirror pre{line-height:1.3em}.inline-example-cmp{margin-bottom:10px;padding-right:25px}.tablet.landscape{padding:83px 87px;background:url(../images/tablet-l.jpg) no-repeat}.tablet.portrait{padding:87px 80px;background:url(../images/tablet-p.jpg) no-repeat}.phone.landscape{padding:22px 79px;width:637px;height:367px;background:url(../images/phone-l.jpg) no-repeat}.phone.portrait{padding:78px 25px;width:368px;height:637px;background:url(../images/phone-p.jpg) no-repeat}.miniphone.landscape{padding:79px 22px 6px 25px;width:368px;height:303px;background:url(../images/phone-small-p.jpg) no-repeat}.miniphone.portrait{padding:22px 6px 25px 79px;width:303px;height:368px;background:url(../images/phone-small-l.jpg) no-repeat}.example-container h1{padding:15px 0!important}.example-toolbar{height:35px;padding:7px 5px;width:100%;border-radius:2px;border-color:#e4e4e4;border-width:1px!important;border-style:solid;background:#f1f1f1;background:-webkit-gradient(linear,left top,left bottom,from(#f1f1f1),to(#e9e9e9));background:-moz-linear-gradient(top,#f1f1f1,#e9e9e9);-webkit-box-shadow:rgba(255,255,255,0.5) 0 1px 0 0 inset;-moz-box-shadow:rgba(255,255,255,0.5) 0 1px 0 0 inset;box-shadow:rgba(255,255,255,0.5) 0 1px 0 0 inset}.example-toolbar .separator{border-left:1px solid #ccc;margin:0 10px;display:inline-block;float:left;width:1px}.example-toolbar .new-window{float:right}.comment-btn{background:url(../images/comment-bubble.png) no-repeat;color:#fff;text-align:center;line-height:16px;height:20px;text-shadow:1px 1px 0 #58b0e0;font-weight:bold;cursor:pointer}.comment-counter-small{cursor:pointer;background:url(../images/comment-bubble.png) no-repeat 2px -55px;padding-left:21px;font-weight:normal;font-size:11px}#center-container .comments-large-expander{clear:both}#center-container .comments-large-expander .comments-expander.open>a.side.toggleComments,#center-container .comments-large-expander .comments-expander.open>a.side.expandable{background:#ebf3fe}#center-container .comments-large-expander .comments-expander.open>a.side.toggleComments span,#center-container .comments-large-expander .comments-expander.open>a.side.expandable span{background:url(../images/member-expanded.gif) no-repeat 2px 12px}#center-container .comments-large-expander .comments-expander a.side{display:block;position:absolute;top:0;left:0;bottom:0;cursor:default!important}#center-container .comments-large-expander .comments-expander a.side span{display:block;width:15px;height:30px}#center-container .comments-large-expander .comments-expander a.side.expandable,#center-container .comments-large-expander .comments-expander a.side.toggleComments{cursor:pointer}#center-container .comments-large-expander .comments-expander a.side.expandable span,#center-container .comments-large-expander .comments-expander a.side.toggleComments span{background:url(../images/member-collapsed.gif) no-repeat 3px 13px}#center-container .comments-large-expander .comments-expander a.side.expandable:hover span,#center-container .comments-large-expander .comments-expander a.side.toggleComments:hover span{background:url(../images/member-hover.gif) no-repeat 3px 13px}#center-container .comments-large-expander .comments-expander.open>a.side.toggleComments.drop-target-hover{background:#94b773}#center-container .comments-large-expander h3.icon-comment{padding:0 0 5px 25px;margin:30px 0 5px 0;background:url(../images/comment-bubble.png) no-repeat 1px -26px}.comments-expander{color:#484848;border-width:1px 0;border-style:solid;border-color:#e0e0e0;position:relative;padding:0 0 10px 25px}.comments-expander.open>a.side.toggleComments.drop-target-hover{background:#94b773}.comments-expander.open{min-height:40px}.comments-expander .loading{font-weight:bold;background:url(../images/ajax-loader.gif) no-repeat 0 9px;padding:8px 0 0 25px}.comments-expander .name{padding:10px 0 0 0;display:block;font-weight:normal!important}.auth-form form{position:relative;display:inline-block}.auth-form form .username,.auth-form form .password{border:1px solid #bbb}.auth-form .before-text{display:inline-block;line-height:22px;margin:10px 10px 1px 4px;font-weight:bold}form.commentForm{position:relative;border:1px solid #c7d1d9;padding:10px 15px 15px 15px;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px;background:#ecf5fc;margin:10px 55px 0 0}form.commentForm.newComment{margin:20px 55px 10px 5px}form.commentForm .subscribe{margin-right:5px;color:#444}form.commentForm .subscribe .sep{color:#aaa}form.commentForm .subscribe input{color:#000;margin-right:5px;margin-left:5px}form.commentForm .com-meta{position:relative;margin-top:8px;text-align:right}form.commentForm .com-meta .toggleCommentGuide{font-weight:bold}form.commentForm img{-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px;position:absolute;left:0;margin-right:10px}form.commentForm .form-author{font-weight:normal;line-height:25px;position:absolute;left:35px;margin-bottom:10px}form.commentForm .CodeMirror,form.commentForm textarea{border:1px solid #ccc;background:#fff;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px;width:100%;padding:3px;border:auto}form.commentForm .CodeMirror .CodeMirror-scroll,form.commentForm textarea{height:auto;min-height:8em}form.commentForm input.sub{-webkit-box-shadow:#b3f33d 0 1px 0 0 inset;-moz-box-shadow:#b3f33d 0 1px 0 0 inset;box-shadow:#b3f33d 0 1px 0 0 inset;color:#fff;text-shadow:rgba(0,0,0,0.3) 0 -1px 0;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px;cursor:pointer;border:1px solid #264901;background:#91c632;background:-webkit-gradient(linear,left top,left bottom,from(#91c632),to(#519700));background:-moz-linear-gradient(top,#91c632,#519700);font-weight:bold;width:120px;margin-left:20px;padding:5px 8px;font-size:12px}form.commentForm input.sub:hover{background:#74b61e;background:-webkit-gradient(linear,left top,left bottom,from(#74b61e),to(#3d7e00));background:-moz-linear-gradient(top,#74b61e,#3d7e00)}form.commentForm input.sub.disabled{border-color:#707070;cursor:auto;background:#bbb;background:-webkit-gradient(linear,left top,left bottom,from(#bbb),to(#9c9c9c));background:-moz-linear-gradient(top,#bbb,#9c9c9c);-webkit-box-shadow:#d7d7d7 0 1px 0 0 inset;-moz-box-shadow:#d7d7d7 0 1px 0 0 inset;box-shadow:#d7d7d7 0 1px 0 0 inset}form.commentForm .commentGuideTxt{border-top:1px solid #c7d1d9;margin-top:15px;padding-top:10px}form.commentForm .commentGuideTxt .markdown.preview{float:left;width:310px}form.commentForm .commentGuideTxt .markdown.preview pre{border:0;padding:0;margin:0;line-height:1.5em;background:transparent}form.commentForm .commentGuideTxt .markdown.result{margin-left:320px;width:260px}form.commentForm .commentGuideTxt .markdown{background:#fff;padding:20px;position:relative;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;-o-border-radius:5px;border-radius:5px}form.commentForm .commentGuideTxt .markdown h4{position:absolute;top:0;right:0;padding:5px 10px;background:rgba(0,0,0,0.05)}form.commentForm .commentGuideTxt code{padding-left:5px}form.commentForm .commentGuideTxt ul{margin-top:5px}.comment{padding-top:10px;padding-left:2px}.comment.drop-target-hover{background:#94b773}.comment:hover>.com-meta>.top-right>.command,.comment:hover>.com-meta>.top-right>.vote,.comment:hover>.comments-replies-expander>.replies-button{-webkit-transition:opacity .2s linear;-moz-transition:opacity .2s linear;-o-transition:opacity .2s linear;filter:alpha(opacity=100);opacity:1}.comment .target{color:#666;font-size:90%;font-weight:normal}.comment .com-meta{position:relative;text-size:13px}.comment .com-meta img{-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px}.comment .com-meta img.drag-handle{cursor:all-scroll}.comment .com-meta .author{position:absolute;left:40px;font-weight:bold;top:2px;font-size:14px}.comment .com-meta .author.moderator{color:#3d7e00}.comment .com-meta .top-right{position:absolute;right:20px;top:0}.comment .com-meta .top-right .command,.comment .com-meta .top-right .time{display:inline-block;margin-left:10px}.comment .com-meta .top-right .tag{-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px;padding:0 1em;font-weight:bold;color:white;background:#484848;position:relative}.comment .com-meta .top-right .tag a{color:#484848;position:absolute;top:-5px;right:-5px;background:white;width:13px;height:13px;text-align:center;line-height:7px;border:2px solid #484848;-webkit-border-radius:7px;-moz-border-radius:7px;-ms-border-radius:7px;-o-border-radius:7px;border-radius:7px}.comment .com-meta .top-right .tag a:hover{border-color:red;color:red}.comment .com-meta .top-right .add-tag{color:#999;background:white;width:13px;height:13px;text-align:center;text-indent:-1px;line-height:9px;border:2px solid #999;-webkit-border-radius:7px;-moz-border-radius:7px;-ms-border-radius:7px;-o-border-radius:7px;border-radius:7px;filter:alpha(opacity=0);opacity:0;-webkit-transition:opacity .2s linear;-moz-transition:opacity .2s linear;-o-transition:opacity .2s linear}.comment .com-meta .top-right .add-tag:hover{border-color:#3d7e00;color:#3d7e00}.comment .com-meta .top-right .editComment,.comment .com-meta .top-right .deleteComment,.comment .com-meta .top-right .readComment{color:#999;filter:alpha(opacity=0);opacity:0;-webkit-transition:opacity .2s linear;-moz-transition:opacity .2s linear;-o-transition:opacity .2s linear}.comment .com-meta .top-right .readComment.read{color:white;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px;background:#3d7e00;font-weight:bold;padding:0 1em;filter:alpha(opacity=50);opacity:.5}.comment .com-meta .top-right .time{color:#999;text-align:right;width:90px}.comment .com-meta .vote{position:absolute;left:2px;top:33px}.comment .com-meta .vote .voteCommentUp{position:absolute;display:block;width:20px;height:18px;background:url(../images/vote-arrows.png) no-repeat}.comment .com-meta .vote .voteCommentUp.selected{filter:alpha(opacity=40);opacity:.4;background-position:-22px 0}.comment .com-meta .vote .voteCommentUp:hover,.comment .com-meta .vote .voteCommentUp.selected:hover{filter:alpha(opacity=100);opacity:1;background-position:-22px 0}.comment .com-meta .vote .voteCommentDown{position:absolute;display:block;width:20px;height:18px;top:36px;background:url(../images/vote-arrows.png) no-repeat 0 -35px}.comment .com-meta .vote .voteCommentDown.selected{background-position:-22px -35px;filter:alpha(opacity=40);opacity:.4}.comment .com-meta .vote .voteCommentDown:hover,.comment .com-meta .vote .voteCommentDown.selected:hover{filter:alpha(opacity=100);opacity:1;background-position:-22px -35px}.comment .com-meta .vote .score{position:absolute;font-weight:bold;width:20px;top:15px;color:#aaa;text-align:center;font-size:16px}.comment .content{min-height:65px;padding:0 0 30px 40px;border-bottom:1px solid #eee}.comment .comments-replies-expander .replies-button{position:relative;top:-20px;height:0;display:block;padding-left:40px;font-weight:bold;filter:alpha(opacity=0);opacity:0;-webkit-transition:opacity .2s linear;-moz-transition:opacity .2s linear;-o-transition:opacity .2s linear;color:#94b773}.comment .comments-replies-expander .replies-button.with-replies{filter:alpha(opacity=100);opacity:1}.comment .comments-replies-expander .replies-button:hover{color:#3d7e00}.comment .comments-replies-expander .comments-list-with-form{padding-left:1em;border-left:1em solid #ebf3fe}.comment .deleted-comment{text-align:center;background:#ffd76e;border:1px solid #e1ba53;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px;font-weight:bold}.comments-tageditor{padding-top:10px}.comments-tageditor-boundlist .x-boundlist-item-over{background:#94b773}#commentindex{padding:5px}#commentindex .comments-full-list .comments-list{margin:0 auto;max-width:1000px}#commentindex .comments-full-list .x-mask{opacity:.9;background:white url(../images/ajax-loader.gif) no-repeat center}.recent-comments-pager{display:block;padding:10px 0 5px 35px;position:relative;color:gray}.recent-comments-pager span{display:block;position:absolute;left:0;top:5px;width:27px;height:28px;background:url(../images/comment.png) no-repeat 0 -25px}.recent-comments-pager:hover span{background-position:-59px -25px}.comments-header-menu h1 a{margin-right:1em;color:gray}.comments-header-menu h1 a:hover{filter:alpha(opacity=70);opacity:.7}.comments-header-menu h1 a.selected{color:#66ab16}.comments-users .x-panel-body .users-list ul,.comments-users .x-panel-body .users-list li{margin:0;padding:0;list-style:none}.comments-users .x-panel-body .users-list li{height:30px;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px;cursor:pointer}.comments-users .x-panel-body .users-list li:hover{background:#eee}.comments-users .x-panel-body .users-list li.x-item-selected{background:#94b773}.comments-users .x-panel-body .users-list .score{display:block;float:left;width:40px;padding:0 5px;line-height:30px;font-weight:bold;color:#aaa;text-align:center;font-size:16px}.comments-users .x-panel-body .users-list img{-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px;display:block;float:left;margin-top:2px;margin-right:10px}.comments-users .x-panel-body .users-list .username{line-height:30px;font-weight:bold}.comments-users .x-panel-body .users-list .username.moderator{color:#3d7e00}.comments-users .x-panel-body .users-list .x-item-selected .score{color:#484848}.comments-users .x-panel-body .users-list .x-item-selected .username.moderator{color:#083772}.comments-toplist .x-panel-body .top-list ul,.comments-toplist .x-panel-body .top-list li{margin:0;padding:0;list-style:none}.comments-toplist .x-panel-body .top-list li{height:30px;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px;cursor:pointer}.comments-toplist .x-panel-body .top-list li:hover{background:#eee}.comments-toplist .x-panel-body .top-list li.x-item-selected{background:#94b773}.comments-toplist .x-panel-body .top-list .score{display:block;float:left;width:40px;padding:0 5px;line-height:30px;font-weight:bold;color:#aaa;text-align:center;font-size:16px}.comments-toplist .x-panel-body .top-list .x-item-selected .score{color:#484848}.comments-toplist .x-panel-body .top-list .text{float:left;width:250px;overflow:hidden;line-height:30px;font-weight:bold}.comments-filter-field table{border-style:solid;border-color:#bebebe;border-width:1px;background:white url("../images/text-bg.gif") repeat-x 0 0}.comments-filter-field .x-form-trigger.reset{background:url(../images/x12.png) no-repeat 2px 3px;padding:0;margin:0;border:0}.comments-filter-field input{background:transparent;border:0}#extjs-welcome{-webkit-font-smoothing:antialiased;color:#434343;font:14px/1.4em "Helvetica Neue","Helvetica","Arial","Lucida Grande",sans-serif}#extjs-welcome .logo{background:url(../images/logo-screen-noglow.png) no-repeat;width:155px;height:72px;margin:0 0 0 -13px;position:relative;z-index:99}#extjs-welcome .logo a{display:block;width:100%;height:100%;text-indent:-9999px}#extjs-welcome a{color:#126499}#extjs-welcome ul{font-size:13px;margin-bottom:1em;margin-left:18px}#extjs-welcome ul li{list-style:square}#extjs-welcome h1,#extjs-welcome h2{text-rendering:optimizeLegibility;text-shadow:rgba(255,255,255,0.8) 0 1px 1px}#extjs-welcome h2{color:#314e64;line-height:1.0em;margin-top:60px;margin-bottom:8px;font-size:25px;font-weight:normal;font-family:"Exo",sans-serif;font-weight:normal}#extjs-welcome h2 strong{font-size:1.2em;color:#4c8e0e}#extjs-welcome h3{font-size:16px;line-height:20px;margin-bottom:4px;margin-top:1em;font-weight:bold;color:#314e64;padding:0}#extjs-welcome p{margin-bottom:1em}#extjs-welcome p.intro{color:#314e64;font-size:16px;line-height:22px}#extjs-welcome .auto_columns{width:100%}#extjs-welcome .auto_columns::after{clear:both;content:'.';display:block;height:0;visibility:hidden}#extjs-welcome .auto_columns .auto_columns p{font-size:13px;line-height:16px}#extjs-welcome .two .column{width:48%;padding-right:2%;float:left;position:relative;box-sizing:content-box}#extjs-welcome a.button-link{font-family:"Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;border-color:#274807!important;background:#4c8e0e url(../images/link-green-standard.png) 0 0 repeat-x;color:white;-webkit-background-clip:padding-box;border:1px solid #477a09;font-size:15px;font-weight:bold;line-height:1.0em;padding:6px 8px 9px;text-decoration:none;text-shadow:rgba(0,0,0,0.3) 0 -1px 0;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px;display:inline-block}#extjs-welcome a.button-link:active{position:relative;top:1px}#extjs-welcome a.button-link:hover,#extjs-welcome a.button-link:focus,#extjs-welcome a.button-link:active{background:#38690a url(../images/link-green-standard-over.png) 0 0 repeat-x}#extjs-welcome a.more-icon{background:url(../images/more.png) no-repeat right center;font-size:12px;font-weight:bold;padding-right:16px}#extjs-welcome .button-group a{margin-right:12px}#extjs-welcome .right{padding-top:140px;overflow:hidden}#extjs-welcome .content{margin:0 auto;text-align:left;width:900px;padding-top:30px}#extjs-welcome section{padding:36px 18px;background:white url(../images/welcome-bg-js4.gif) left bottom no-repeat;min-height:300px;position:relative}#extjs-welcome .meta{color:#8f8f8f}#extjs-welcome .inline-social{text-indent:-9999px;margin-top:6px}#extjs-welcome .inline-social li{display:block;float:right;margin-bottom:8px}#extjs-welcome .inline-social li a{color:#314e64;display:block;line-height:1.0em;width:16px;height:16px;margin-right:4px;background-position:top left;background-repeat:no-repeat}#extjs-welcome .inline-social li a.facebook{background:url(../images/facebook-16.png) no-repeat}#extjs-welcome .inline-social li a.linkedin{background:url(../images/linkedin-16.png) no-repeat}#extjs-welcome .inline-social li a.tumblr{background:url(../images/tumblr-16.png) no-repeat}#extjs-welcome .inline-social li a.twitter{background:url(../images/twitter-16.png) no-repeat}#extjs-welcome .inline-social li a.vimeo{background:url(../images/vimeo-16.png) no-repeat}#extjs-welcome .inline-social li a.rss{background:url(../images/rss-16.png) no-repeat}#extjs-welcome .feature-img{position:absolute;right:20px;top:-100px}#extjs-welcome footer{color:#b9d4e7;padding:8px 18px;font-size:13px}#extjs-welcome .news{width:860px;margin:20px auto}#extjs-welcome .news h1{padding-bottom:15px}#extjs-welcome .news .l{float:left;width:450px}#extjs-welcome .news .r{margin-left:470px}#extjs-welcome .news .item{padding-bottom:3px}#extjs-welcome .news .date{color:#666;font-size:.8em;width:90px;display:block;float:left;font-family:"Menlo","Courier New","Courier",monospace}.doc-test-ready{font-weight:bold;color:#333}.doc-test-failure{font-weight:bold;color:red}.doc-test-success{font-weight:bold;color:green}.signature span{color:white;background-color:#aaa}.rounded-box{border:1px solid #999;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;-o-border-radius:5px;border-radius:5px;padding:10px 50px}.CodeMirror{line-height:1em;font-family:monospace}.CodeMirror-scroll{overflow:auto;height:300px;position:relative;outline:0}.CodeMirror-gutter{position:absolute;left:0;top:0;z-index:10;background-color:#f7f7f7;border-right:1px solid #eee;min-width:2em;height:100%}.CodeMirror-gutter-text{color:#aaa;text-align:right;padding:.4em .2em .4em .4em;white-space:pre!important}.CodeMirror-lines{padding:.4em;white-space:pre}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;-o-border-radius:0;border-radius:0;border-width:0;margin:0;padding:0;background:transparent;font-family:inherit;font-size:inherit;padding:0;margin:0;white-space:pre;word-wrap:normal;line-height:inherit}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-wrap .CodeMirror-scroll{overflow-x:hidden}.CodeMirror textarea{outline:none!important}.CodeMirror pre.CodeMirror-cursor{z-index:10;position:absolute;visibility:hidden;border-left:1px solid black;border-right:0;width:0}.CodeMirror-focused pre.CodeMirror-cursor{visibility:visible}div.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused div.CodeMirror-selected{background:#d7d4f0}.CodeMirror-searching{background:#ffa;background:rgba(255,255,0,.4)}.cm-s-default span.cm-keyword{color:#708}.cm-s-default span.cm-atom{color:#219}.cm-s-default span.cm-number{color:#164}.cm-s-default span.cm-def{color:#00f}.cm-s-default span.cm-variable{color:black}.cm-s-default span.cm-variable-2{color:#05a}.cm-s-default span.cm-variable-3{color:#085}.cm-s-default span.cm-property{color:black}.cm-s-default span.cm-operator{color:black}.cm-s-default span.cm-comment{color:#a50}.cm-s-default span.cm-string{color:#a11}.cm-s-default span.cm-string-2{color:#f50}.cm-s-default span.cm-meta{color:#555}.cm-s-default span.cm-error{color:#f00}.cm-s-default span.cm-qualifier{color:#555}.cm-s-default span.cm-builtin{color:#30a}.cm-s-default span.cm-bracket{color:#cc7}.cm-s-default span.cm-tag{color:#170}.cm-s-default span.cm-attribute{color:#00c}.cm-s-default span.cm-header{color:#a0a}.cm-s-default span.cm-quote{color:#090}.cm-s-default span.cm-hr{color:#999}.cm-s-default span.cm-link{color:#00c}span.cm-header,span.cm-strong{font-weight:bold}span.cm-em{font-style:italic}span.cm-emstrong{font-style:italic;font-weight:bold}span.cm-link{text-decoration:underline}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} \ No newline at end of file diff --git a/docs/api/resources/images/ajax-loader.gif b/docs/api/resources/images/ajax-loader.gif new file mode 100644 index 00000000..e14a0487 Binary files /dev/null and b/docs/api/resources/images/ajax-loader.gif differ diff --git a/docs/api/resources/images/arrows.png b/docs/api/resources/images/arrows.png new file mode 100644 index 00000000..499d088e Binary files /dev/null and b/docs/api/resources/images/arrows.png differ diff --git a/docs/api/resources/images/class-m.png b/docs/api/resources/images/class-m.png new file mode 100644 index 00000000..c8e8c63f Binary files /dev/null and b/docs/api/resources/images/class-m.png differ diff --git a/docs/api/resources/images/comment-bubble.png b/docs/api/resources/images/comment-bubble.png new file mode 100644 index 00000000..b092c31f Binary files /dev/null and b/docs/api/resources/images/comment-bubble.png differ diff --git a/docs/api/resources/images/comment.png b/docs/api/resources/images/comment.png new file mode 100644 index 00000000..5bf3391e Binary files /dev/null and b/docs/api/resources/images/comment.png differ diff --git a/docs/api/resources/images/component-m.png b/docs/api/resources/images/component-m.png new file mode 100644 index 00000000..e002685d Binary files /dev/null and b/docs/api/resources/images/component-m.png differ diff --git a/docs/api/resources/images/default-guide.png b/docs/api/resources/images/default-guide.png new file mode 100644 index 00000000..a8f9f7a0 Binary files /dev/null and b/docs/api/resources/images/default-guide.png differ diff --git a/docs/api/resources/images/doc-m.png b/docs/api/resources/images/doc-m.png new file mode 100644 index 00000000..c1b8639d Binary files /dev/null and b/docs/api/resources/images/doc-m.png differ diff --git a/docs/api/resources/images/down-arr.png b/docs/api/resources/images/down-arr.png new file mode 100644 index 00000000..2b9e3ffb Binary files /dev/null and b/docs/api/resources/images/down-arr.png differ diff --git a/docs/api/resources/images/elbow-end.gif b/docs/api/resources/images/elbow-end.gif new file mode 100644 index 00000000..f24ddee7 Binary files /dev/null and b/docs/api/resources/images/elbow-end.gif differ diff --git a/docs/api/resources/images/example-icons.png b/docs/api/resources/images/example-icons.png new file mode 100644 index 00000000..8db4ee09 Binary files /dev/null and b/docs/api/resources/images/example-icons.png differ diff --git a/docs/api/resources/images/expandcollapse.png b/docs/api/resources/images/expandcollapse.png new file mode 100644 index 00000000..e2cf2dda Binary files /dev/null and b/docs/api/resources/images/expandcollapse.png differ diff --git a/docs/api/resources/images/group-expand-sprite.gif b/docs/api/resources/images/group-expand-sprite.gif new file mode 100644 index 00000000..9c1653b4 Binary files /dev/null and b/docs/api/resources/images/group-expand-sprite.gif differ diff --git a/docs/api/resources/images/header.png b/docs/api/resources/images/header.png new file mode 100644 index 00000000..93b09bc7 Binary files /dev/null and b/docs/api/resources/images/header.png differ diff --git a/docs/api/resources/images/hero-extjs4-alt.png b/docs/api/resources/images/hero-extjs4-alt.png new file mode 100644 index 00000000..ef319124 Binary files /dev/null and b/docs/api/resources/images/hero-extjs4-alt.png differ diff --git a/docs/api/resources/images/icons.png b/docs/api/resources/images/icons.png new file mode 100644 index 00000000..e6199cea Binary files /dev/null and b/docs/api/resources/images/icons.png differ diff --git a/docs/api/resources/images/link-green-standard-over.png b/docs/api/resources/images/link-green-standard-over.png new file mode 100644 index 00000000..0f08df25 Binary files /dev/null and b/docs/api/resources/images/link-green-standard-over.png differ diff --git a/docs/api/resources/images/link-green-standard.png b/docs/api/resources/images/link-green-standard.png new file mode 100644 index 00000000..e7512aad Binary files /dev/null and b/docs/api/resources/images/link-green-standard.png differ diff --git a/docs/api/resources/images/loading.gif b/docs/api/resources/images/loading.gif new file mode 100644 index 00000000..ea83910a Binary files /dev/null and b/docs/api/resources/images/loading.gif differ diff --git a/docs/api/resources/images/logo-screen-noglow.png b/docs/api/resources/images/logo-screen-noglow.png new file mode 100644 index 00000000..33862682 Binary files /dev/null and b/docs/api/resources/images/logo-screen-noglow.png differ diff --git a/docs/api/resources/images/logo.png b/docs/api/resources/images/logo.png new file mode 100644 index 00000000..9d413c85 Binary files /dev/null and b/docs/api/resources/images/logo.png differ diff --git a/docs/api/resources/images/member-collapsed.gif b/docs/api/resources/images/member-collapsed.gif new file mode 100644 index 00000000..16bce1d3 Binary files /dev/null and b/docs/api/resources/images/member-collapsed.gif differ diff --git a/docs/api/resources/images/member-expanded.gif b/docs/api/resources/images/member-expanded.gif new file mode 100644 index 00000000..d72c132c Binary files /dev/null and b/docs/api/resources/images/member-expanded.gif differ diff --git a/docs/api/resources/images/member-hover.gif b/docs/api/resources/images/member-hover.gif new file mode 100644 index 00000000..9b533908 Binary files /dev/null and b/docs/api/resources/images/member-hover.gif differ diff --git a/docs/api/resources/images/more.png b/docs/api/resources/images/more.png new file mode 100644 index 00000000..a270ab4a Binary files /dev/null and b/docs/api/resources/images/more.png differ diff --git a/docs/api/resources/images/phone-l.jpg b/docs/api/resources/images/phone-l.jpg new file mode 100644 index 00000000..004a88ce Binary files /dev/null and b/docs/api/resources/images/phone-l.jpg differ diff --git a/docs/api/resources/images/phone-p.jpg b/docs/api/resources/images/phone-p.jpg new file mode 100644 index 00000000..58a99b75 Binary files /dev/null and b/docs/api/resources/images/phone-p.jpg differ diff --git a/docs/api/resources/images/phone-small-l.jpg b/docs/api/resources/images/phone-small-l.jpg new file mode 100644 index 00000000..e4eaac2d Binary files /dev/null and b/docs/api/resources/images/phone-small-l.jpg differ diff --git a/docs/api/resources/images/phone-small-p.jpg b/docs/api/resources/images/phone-small-p.jpg new file mode 100644 index 00000000..244e5537 Binary files /dev/null and b/docs/api/resources/images/phone-small-p.jpg differ diff --git a/docs/api/resources/images/print.png b/docs/api/resources/images/print.png new file mode 100644 index 00000000..f19d9a60 Binary files /dev/null and b/docs/api/resources/images/print.png differ diff --git a/docs/api/resources/images/sample-over.gif b/docs/api/resources/images/sample-over.gif new file mode 100644 index 00000000..612ee1c5 Binary files /dev/null and b/docs/api/resources/images/sample-over.gif differ diff --git a/docs/api/resources/images/search-box.png b/docs/api/resources/images/search-box.png new file mode 100644 index 00000000..1d287158 Binary files /dev/null and b/docs/api/resources/images/search-box.png differ diff --git a/docs/api/resources/images/singleton-m.png b/docs/api/resources/images/singleton-m.png new file mode 100644 index 00000000..212e7007 Binary files /dev/null and b/docs/api/resources/images/singleton-m.png differ diff --git a/docs/api/resources/images/tablet-l.jpg b/docs/api/resources/images/tablet-l.jpg new file mode 100644 index 00000000..a8552d57 Binary files /dev/null and b/docs/api/resources/images/tablet-l.jpg differ diff --git a/docs/api/resources/images/tablet-p.jpg b/docs/api/resources/images/tablet-p.jpg new file mode 100644 index 00000000..ecbec6cf Binary files /dev/null and b/docs/api/resources/images/tablet-p.jpg differ diff --git a/docs/api/resources/images/tabs.png b/docs/api/resources/images/tabs.png new file mode 100644 index 00000000..b0795df9 Binary files /dev/null and b/docs/api/resources/images/tabs.png differ diff --git a/docs/api/resources/images/text-bg.gif b/docs/api/resources/images/text-bg.gif new file mode 100644 index 00000000..4179607c Binary files /dev/null and b/docs/api/resources/images/text-bg.gif differ diff --git a/docs/api/resources/images/vote-arrows.png b/docs/api/resources/images/vote-arrows.png new file mode 100644 index 00000000..bb94c7c9 Binary files /dev/null and b/docs/api/resources/images/vote-arrows.png differ diff --git a/docs/api/resources/images/welcome-bg-js4.gif b/docs/api/resources/images/welcome-bg-js4.gif new file mode 100644 index 00000000..8bb706d7 Binary files /dev/null and b/docs/api/resources/images/welcome-bg-js4.gif differ diff --git a/docs/api/resources/images/x.png b/docs/api/resources/images/x.png new file mode 100644 index 00000000..2e519722 Binary files /dev/null and b/docs/api/resources/images/x.png differ diff --git a/docs/api/resources/images/x12.png b/docs/api/resources/images/x12.png new file mode 100644 index 00000000..a729b48e Binary files /dev/null and b/docs/api/resources/images/x12.png differ diff --git a/docs/api/resources/prettify/prettify.css b/docs/api/resources/prettify/prettify.css new file mode 100644 index 00000000..d44b3a22 --- /dev/null +++ b/docs/api/resources/prettify/prettify.css @@ -0,0 +1 @@ +.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} \ No newline at end of file diff --git a/docs/api/resources/prettify/prettify.js b/docs/api/resources/prettify/prettify.js new file mode 100644 index 00000000..7b990496 --- /dev/null +++ b/docs/api/resources/prettify/prettify.js @@ -0,0 +1,30 @@ +!function(){var q=null;window.PR_SHOULD_USE_CONTINUATION=!0; +(function(){function S(a){function d(e){var b=e.charCodeAt(0);if(b!==92)return b;var a=e.charAt(1);return(b=r[a])?b:"0"<=a&&a<="7"?parseInt(e.substring(1),8):a==="u"||a==="x"?parseInt(e.substring(2),16):e.charCodeAt(1)}function g(e){if(e<32)return(e<16?"\\x0":"\\x")+e.toString(16);e=String.fromCharCode(e);return e==="\\"||e==="-"||e==="]"||e==="^"?"\\"+e:e}function b(e){var b=e.substring(1,e.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),e=[],a= +b[0]==="^",c=["["];a&&c.push("^");for(var a=a?1:0,f=b.length;a122||(l<65||h>90||e.push([Math.max(65,h)|32,Math.min(l,90)|32]),l<97||h>122||e.push([Math.max(97,h)&-33,Math.min(l,122)&-33]))}}e.sort(function(e,a){return e[0]-a[0]||a[1]-e[1]});b=[];f=[];for(a=0;ah[0]&&(h[1]+1>h[0]&&c.push("-"),c.push(g(h[1])));c.push("]");return c.join("")}function s(e){for(var a=e.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),c=a.length,d=[],f=0,h=0;f=2&&e==="["?a[f]=b(l):e!=="\\"&&(a[f]=l.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return a.join("")}for(var x=0,m=!1,j=!1,k=0,c=a.length;k=5&&"lang-"===w.substring(0,5))&&!(t&&typeof t[1]==="string"))f=!1,w="src";f||(r[z]=w)}h=c;c+=z.length;if(f){f=t[1];var l=z.indexOf(f),B=l+f.length;t[2]&&(B=z.length-t[2].length,l=B-f.length);w=w.substring(5);H(j+h,z.substring(0,l),g,k);H(j+h+l,f,I(w,f),k);H(j+h+B,z.substring(B),g,k)}else k.push(j+h,w)}a.g=k}var b={},s;(function(){for(var g=a.concat(d),j=[],k={},c=0,i=g.length;c=0;)b[n.charAt(e)]=r;r=r[1];n=""+r;k.hasOwnProperty(n)||(j.push(r),k[n]=q)}j.push(/[\S\s]/);s=S(j)})();var x=d.length;return g}function v(a){var d=[],g=[];a.tripleQuotedStrings?d.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?d.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/, +q,"'\"`"]):d.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&g.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var b=a.hashComments;b&&(a.cStyleComments?(b>1?d.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):d.push(["com",/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),g.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,q])):d.push(["com", +/^#[^\n\r]*/,q,"#"]));a.cStyleComments&&(g.push(["com",/^\/\/[^\n\r]*/,q]),g.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));if(b=a.regexLiterals){var s=(b=b>1?"":"\n\r")?".":"[\\S\\s]";g.push(["lang-regex",RegExp("^(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*("+("/(?=[^/*"+b+"])(?:[^/\\x5B\\x5C"+b+"]|\\x5C"+s+"|\\x5B(?:[^\\x5C\\x5D"+b+"]|\\x5C"+ +s+")*(?:\\x5D|$))+/")+")")])}(b=a.types)&&g.push(["typ",b]);b=(""+a.keywords).replace(/^ | $/g,"");b.length&&g.push(["kwd",RegExp("^(?:"+b.replace(/[\s,]+/g,"|")+")\\b"),q]);d.push(["pln",/^\s+/,q," \r\n\t\u00a0"]);b="^.[^\\s\\w.$@'\"`/\\\\]*";a.regexLiterals&&(b+="(?!s*/)");g.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/, +q],["pun",RegExp(b),q]);return C(d,g)}function J(a,d,g){function b(a){var c=a.nodeType;if(c==1&&!x.test(a.className))if("br"===a.nodeName)s(a),a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)b(a);else if((c==3||c==4)&&g){var d=a.nodeValue,i=d.match(m);if(i)c=d.substring(0,i.index),a.nodeValue=c,(d=d.substring(i.index+i[0].length))&&a.parentNode.insertBefore(j.createTextNode(d),a.nextSibling),s(a),c||a.parentNode.removeChild(a)}}function s(a){function b(a,c){var d= +c?a.cloneNode(!1):a,e=a.parentNode;if(e){var e=b(e,1),g=a.nextSibling;e.appendChild(d);for(var i=g;i;i=g)g=i.nextSibling,e.appendChild(i)}return d}for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),d;(d=a.parentNode)&&d.nodeType===1;)a=d;c.push(a)}for(var x=/(?:^|\s)nocode(?:\s|$)/,m=/\r\n?|\n/,j=a.ownerDocument,k=j.createElement("li");a.firstChild;)k.appendChild(a.firstChild);for(var c=[k],i=0;i=0;){var b=d[g];F.hasOwnProperty(b)?D.console&&console.warn("cannot override language handler %s",b):F[b]=a}}function I(a,d){if(!a||!F.hasOwnProperty(a))a=/^\s*=l&&(b+=2);g>=B&&(r+=2)}}finally{if(f)f.style.display=h}}catch(u){D.console&&console.log(u&&u.stack||u)}}var D=window,y=["break,continue,do,else,for,if,return,while"],E=[[y,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"], +"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],M=[E,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],N=[E,"abstract,assert,boolean,byte,extends,final,finally,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"], +O=[N,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,internal,into,is,let,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var,virtual,where"],E=[E,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],P=[y,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"], +Q=[y,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],W=[y,"as,assert,const,copy,drop,enum,extern,fail,false,fn,impl,let,log,loop,match,mod,move,mut,priv,pub,pure,ref,self,static,struct,true,trait,type,unsafe,use"],y=[y,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],R=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)\b/, +V=/\S/,X=v({keywords:[M,O,E,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",P,Q,y],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),F={};p(X,["default-code"]);p(C([],[["pln",/^[^]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-", +/^]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);p(C([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/], +["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css",/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);p(C([],[["atv",/^[\S\s]+/]]),["uq.val"]);p(v({keywords:M,hashComments:!0,cStyleComments:!0,types:R}),["c","cc","cpp","cxx","cyc","m"]);p(v({keywords:"null,true,false"}),["json"]);p(v({keywords:O,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:R}), +["cs"]);p(v({keywords:N,cStyleComments:!0}),["java"]);p(v({keywords:y,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]);p(v({keywords:P,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]);p(v({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]);p(v({keywords:Q, +hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]);p(v({keywords:E,cStyleComments:!0,regexLiterals:!0}),["javascript","js"]);p(v({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);p(v({keywords:W,cStyleComments:!0,multilineStrings:!0}),["rc","rs","rust"]); +p(C([],[["str",/^[\S\s]+/]]),["regex"]);var Y=D.PR={createSimpleLexer:C,registerLangHandler:p,sourceDecorator:v,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ",prettyPrintOne:D.prettyPrintOne=function(a,d,g){var b=document.createElement("div");b.innerHTML="
    "+a+"
    ";b=b.firstChild;g&&J(b,g,!0);K({h:d,j:g,c:b,i:1}); +return b.innerHTML},prettyPrint:D.prettyPrint=function(a,d){function g(){for(var b=D.PR_SHOULD_USE_CONTINUATION?c.now()+250:Infinity;i + + + + The source code + + + + + + +
    /**
    +     * @class dr.ace {UI Components}
    +     * @extends dr.view
    +     * Ace editor component.
    +     *
    +     *     @example
    +     *     <ace id="editor" width="500" text='Hello World'></ace>
    +     *
    +     * The initial text can also be included inline, and include dreem code.
    +     *
    +     *     @example wide
    +     *     <ace id="editor" width="500"><view width="100%" height="100%" bgcolor="thistle"></view></ace>
    +     *
    +     */
    +/**
    +        * @attribute {string} [theme='ace/theme/chrome']
    +        * Specify the ace theme to use.
    +        */
    +/**
    +        * @attribute {string} [mode='ace/mode/dr']
    +        * Specify the ace mode to use.
    +        */
    +/**
    +        * @attribute {String} [text=""]
    +        * Initial text for the ace editor.
    +        */
    +/**
    +        * @event ontext
    +        * Fired when the contents of the ace entry changes
    +        * @param {dr.ace} view The dr.ace that fired the event
    +        */
    +/**
    +        * @attribute {Number} [pausedelay=500]
    +        * Time (msec) after user entry stops to fire onpausedelay event.
    +        * 0 will disable this option.
    +        */
    +/**
    +        * @event onpausedelay
    +        * Fired when user entries stops for a period of time.
    +        * @param {dr.ace} view The dr.ace that fired the event
    +        */
    +/**
    +      * @class dr.alignlayout {Layout}
    +      * @extends dr.variablelayout
    +      * A variablelayout that aligns each view vertically or horizontally
    +      * relative to all the other views.
    +      *
    +      *     @example
    +      *     <alignlayout align="middle" collapseparent="true">
    +      *     </alignlayout>
    +      *
    +      *     <view width="100" height="35" bgcolor="plum"></view>
    +      *     <view width="100" height="25" bgcolor="lightpink"></view>
    +      *     <view width="100" height="15" bgcolor="lightblue"></view>
    +      */
    +/**
    +    * @attribute {String} [align='middle']
    +    * Determines which way the views are aligned. Supported values are 
    +    * 'left', 'center', 'right' and 'top', 'middle' and 'bottom'.
    +    */
    +/**
    +    * @method doBeforeUpdate
    +    * Determine the maximum subview width/height according to the alignment.
    +    */
    +/**
    +     * @class dr.art {UI Components}
    +     * @extends dr.view
    +     * Vector graphics support using svg.
    +     *
    +     * This example shows how to load an existing svg
    +     *
    +     *     @example
    +     *     <art width="100" height="100" src="/images/siemens-clock.svg"></art>
    +     *
    +     * Paths within an svg can be selected using the path attribute
    +     *
    +     *     @example
    +     *     <art width="100" height="100" src="/images/cursorshapes.svg" path="0"></art>
    +     *
    +     * Attributes are automatically passed through to the SVG. Here, the fill color is changed
    +     *
    +     *     @example
    +     *     <art width="100" height="100" src="/images/cursorshapes.svg" path="0" fill="coral"></art>
    +     *
    +     * Setting the path attribute animates between paths. This example animates when the mouse is clicked
    +     *
    +     *     @example
    +     *     <art width="100" height="100" src="/images/cursorshapes.svg" path="0" fill="coral">
    +     *       <handler event="onclick">
    +     *         this.setAttribute('path', this.path ^ 1);
    +     *       </handler>
    +     *     </art>
    +     *
    +     * By default, the SVG's aspect ratio is preserved. Set the stretches attribute to true to change this behavior.
    +     *
    +     *     @example
    +     *     <art width="200" height="100" src="/images/cursorshapes.svg" path="0" fill="coral" stretches="true">
    +     *       <handler event="onclick">
    +     *         this.setAttribute('path', this.path ^ 1);
    +     *         this.animate({width: (this.width == 200 ? 100 : 200)});
    +     *       </handler>
    +     *     </art>
    +     *
    +     */
    +/**
    +        * @attribute {Boolean} [inline=false]
    +        * Set to true if the svg contents is found inline, as a comment
    +        */
    +/**
    +        * @attribute {Boolean} stretches [stretches=false]
    +        * Set to true to stretch the svg to fill the view.
    +        */
    +/**
    +        * @attribute {String} src
    +        * The svg contents to load
    +        */
    +/**
    +        * @attribute {String|Number} path
    +        * The svg path element to display. Can either be the name of the &lt;g&gt; element containing the path or a 0-based index.
    +        */
    +/**
    +        * @attribute {Number} [animationspeed=400]
    +        * The number of milliseconds to use when animating between paths
    +        */
    +/**
    +        * @attribute {"linear"/"easeout"/"easein"/"easeinout"/"backin"/"backout"/"elastic"/"bounce"} [animationcurve="linear"]
    +        * The name of the curve to use when animating between paths
    +        */
    +/**
    +        * @event onready
    +        * Fired when the art is loaded and ready
    +        */
    +/**
    +        * @event ontween
    +        * Fired when the art has animated its path to the next position
    +        */
    +/**
    +     * @class dr.audioplayer {UI Components}
    +     * @extends dr.node
    +     * audioplayer wraps the web audio APIs to provide a declarative interface to play audio.
    +     *
    +     * This example shows how to load and play an mp3 audio file from the server:
    +     *
    +     *     @example
    +     *     <audioplayer url="/music/YACHT_-_09_-_Im_In_Love_With_A_Ripper_Party_Mix_Instrumental.mp3" playing="true"></audioplayer>
    +     */
    +/**
    +        * @attribute {String} url
    +        * The URL to an audio file to play
    +        */
    +/**
    +        * @attribute {Number} loadprogress
    +        * @readonly
    +        * A Number between 0 and 1 representing load progress
    +        */
    +/**
    +        * @attribute {Boolean} loaded
    +        * @readonly
    +        * If true, the audio is done loading
    +        */
    +/**
    +        * @attribute {Boolean} playing
    +        * If true, the audio is playing.
    +        */
    +/**
    +        * @attribute {Boolean} paused
    +        * If true, the audio is paused.
    +        */
    +/**
    +        * @attribute {Boolean} loop
    +        * If true, the audio will play continuously.
    +        */
    +/**
    +        * @attribute {Number} time
    +        * @readonly
    +        * The number of seconds the file has played, with 0 being the start.
    +        */
    +/**
    +        * @attribute {Number} duration
    +        * @readonly
    +        * The duration in seconds.
    +        */
    +/**
    +        * @attribute {Number} fftsize
    +        * The number of fft frames to use when setting {@link #fft fft}. Must be a non-zero power of two in the range 32 to 2048.
    +        */
    +/**
    +        * @attribute {Number} [fftsmoothing=0.8]
    +        * The amount of smoothing to apply to the FFT analysis. A value from 0 -> 1 where 0 represents no time averaging with the last FFT analysis frame.
    +        */
    +/**
    +        * @attribute {Number[]} fft
    +        * @readonly
    +        * An array of numbers representing the FFT analysis of the audio as it's playing.
    +        */
    +/**
    +     * @class dr.bitmap {UI Components}
    +     * @extends dr.view
    +     * Loads an image from a URL.
    +     *
    +     *     @example
    +     *     <bitmap src="../api-examples-resources/shasta.jpg" width="230" height="161"></bitmap>
    +     */
    +/**
    +        * @attribute {String} src
    +        * The bitmap URL to load
    +        */
    +/**
    +             * @event onload 
    +             * Fired when the bitmap is loaded
    +             * @param {Object} size An object containing the width and height
    +             */
    +/**
    +             * @event onerror 
    +             * Fired when there is an error loading the bitmap
    +             */
    +/**
    +     * @class dr.buttonbase {UI Components}
    +     * @extends dr.view
    +     * Base class for button components. Buttons share common elements, 
    +     * including their ability to be selected, a visual element to display
    +     * their state, and a default and selected color.
    +     * The visual element is a dr.view that shows the current state of the
    +     * button. For example, in a labelbutton the entire button is the visual
    +     * element. For a checkbutton, the visual element is a square dr.view
    +     * that is inside the button.
    +     */
    +/**
    +        * @attribute {Number} [padding=3]
    +        * Amount of padding pixels around the button.
    +        */
    +/**
    +        * @attribute {String} [defaultcolor="#808080"]
    +        * The default color of the visual button element when not selected.
    +        */
    +/**
    +        * @attribute {String} [selectcolor="#a0a0a0"]
    +        * The selected color of the visual button element when selected.
    +        */
    +/**
    +        * @attribute {Boolean} [selected=false]
    +        * The current state of the button.
    +        */
    +/**
    +        * @event onselected
    +        * Fired when the state of the button changes.
    +        * @param {dr.buttonbase} view The dr.buttonbase that fired the event
    +        */
    +/**
    +        * @attribute {String} [text=""]
    +        * Button text.
    +        */
    +/**
    +     * @class dr.checkbutton {UI Components}
    +     * @extends dr.buttonbase
    +     * Button class consisting of text and a visual element to show the
    +     * current state of the component. The state of the
    +     * button changes each time the button is clicked. The select property
    +     * holds the current state of the button. The onselected event
    +     * is generated when the button is the selected state.
    +     *
    +     *     @example
    +     *     <spacedlayout axis="y"></spacedlayout>
    +     *
    +     *     <checkbutton text="pink" selectcolor="pink" defaultcolor="lightgrey" bgcolor="white"></checkbutton>
    +     *     <checkbutton text="blue" selectcolor="lightblue" defaultcolor="lightgrey" bgcolor="white"></checkbutton>
    +     *     <checkbutton text="green" selectcolor="lightgreen" defaultcolor="lightgrey" bgcolor="white"></checkbutton>
    +     *
    +     * Here we listen for the onselected event on a checkbox and print the value that is passed to the handler.
    +     *
    +     *     @example
    +     *     <spacedlayout axis="y"></spacedlayout>
    +     *
    +     *     <checkbutton text="green" selectcolor="lightgreen" defaultcolor="lightgrey" bgcolor="white">
    +     *       <handler event="onselected" args="value">
    +     *         displayselected.setAttribute('text', value);
    +     *       </handler>
    +     *     </checkbutton>
    +     *
    +     *     <view>
    +     *       <spacedlayout></spacedlayout>
    +     *       <text text="Selected:"></text>
    +     *       <text id="displayselected"></text>
    +     *     </view>
    +     *
    +     */
    +/**
    +      * @class dr.constantlayout {Layout}
    +      * @extends dr.layout
    +      * A layout that sets the target attribute name to the target value for 
    +      * each subview.
    +      *
    +      *     @example
    +      *     <constantlayout attribute="y" value="10"></constantlayout>
    +      *
    +      *     <view width="100" height="25" bgcolor="lightpink"></view>
    +      *     <view width="100" height="25" bgcolor="plum"></view>
    +      *     <view width="100" height="25" bgcolor="lightblue"></view>
    +      */
    +/**
    +    * @attribute {String} [attribute=x]
    +    * The name of the attribute to update on each subview.
    +    */
    +/**
    +    * @attribute {*} [value=0]
    +    * The value to set the attribute to.
    +    */
    +/**
    +     * @class dr.dataset {Data}
    +     * @extends dr.node
    +     * Datasets hold onto a set of JSON data, either inline or loaded from a URL.
    +     * They are used with lz.replicator for data binding.
    +     *
    +     * This example shows how to create a dataset with inline JSON data, and use a replicator to show values inside. Inline datasets are useful for prototyping, especially when your backend server isn't ready yet:
    +     *
    +     *     @example wide
    +     *     <dataset name="example">
    +     *      {
    +     *        "store": {
    +     *          "book": [
    +     *            {
    +     *              "category": "reference",
    +     *              "author": "Nigel Rees",
    +     *              "title": "Sayings of the Century",
    +     *              "price": 8.95
    +     *            },
    +     *            {
    +     *              "category": "fiction",
    +     *              "author": "Evelyn Waugh",
    +     *              "title": "Sword of Honour",
    +     *              "price": 12.99
    +     *            },
    +     *            {
    +     *              "category": "fiction",
    +     *              "author": "Herman Melville",
    +     *              "title": "Moby Dick",
    +     *              "isbn": "0-553-21311-3",
    +     *              "price": 8.99
    +     *            },
    +     *            {
    +     *              "category": "fiction",
    +     *              "author": "J. R. R. Tolkien",
    +     *              "title": "The Lord of the Rings",
    +     *              "isbn": "0-395-19395-8",
    +     *              "price": 22.99
    +     *            }
    +     *          ],
    +     *          "bicycle": {
    +     *            "color": "red",
    +     *            "price": 19.95
    +     *          }
    +     *        }
    +     *      }
    +     *     </dataset>
    +     *     <spacedlayout></spacedlayout>
    +     *     <replicator classname="text" datapath="$example/store/book[*]/title"></replicator>
    +     *
    +     * Data can be loaded from a URL when your backend server is ready, or reloaded to show changes over time:
    +     *
    +     *     @example wide
    +     *     <dataset name="example" url="/example.json"></dataset>
    +     *     <spacedlayout></spacedlayout>
    +     *     <replicator classname="text" datapath="$example/store/book[*]/title"></replicator>
    +     */
    +/**
    +        * @attribute {String} name (required)
    +        * The name of the dataset
    +        */
    +/**
    +        * @property {Object} data
    +        * The data inside the dataset
    +        */
    +/**
    +        * @attribute {String} url
    +        * The url to load JSON data from.
    +        */
    +/**
    +     * @class dr.dragstate {UI Components}
    +     * @extends dr.state
    +     * Allows views to be dragged by the mouse.
    +     *
    +     * Here is a view that contains a dragstate. The dragstate is applied when the mouse is down in the view, and then removed when the mouse is up. You can modify the attributes of the draggable view by setting them inside the dragstate, like we do here with bgcolor.
    +     *
    +     *     @example
    +     *     <view width="100" height="100" bgcolor="plum">
    +     *       <attribute name="mouseIsDown" type="boolean" value="false"></attribute>
    +     *       <handler event="onmousedown">
    +     *         this.setAttribute('mouseIsDown', true);
    +     *       </handler>
    +     *       <handler event="onmouseup">
    +     *         this.setAttribute('mouseIsDown', false);
    +     *       </handler>
    +     *       <dragstate applied="${this.parent.mouseIsDown}">
    +     *         <attribute name="bgcolor" type="string" value="purple"></attribute>
    +     *       </dragstate>
    +     *     </view>
    +     *
    +     * To constrain the motion of the element to either the x or y axis set the dragaxis property. Here the same purple square can only move horizontally.
    +     *
    +     *     @example
    +     *     <view width="100" height="100" bgcolor="plum">
    +     *       <attribute name="mouseIsDown" type="boolean" value="false"></attribute>
    +     *       <handler event="onmousedown">
    +     *         this.setAttribute('mouseIsDown', true);
    +     *       </handler>
    +     *       <handler event="onmouseup">
    +     *         this.setAttribute('mouseIsDown', false);
    +     *       </handler>
    +     *       <dragstate applied="${this.parent.mouseIsDown}" dragaxis="x">
    +     *         <attribute name="bgcolor" type="string" value="purple"></attribute>
    +     *       </dragstate>
    +     *     </view>
    +     */
    +/**
    +        * @attribute {"x"/"y"/"both"} [dragaxis="both"]
    +        * The axes to drag on.
    +        */
    +/**
    +     * @class dr.gyro {Input}
    +     * @extends dr.node
    +     * Receives gyroscope and compass data where available. See [https://w3c.github.io/deviceorientation/spec-source-orientation.html#deviceorientation](https://w3c.github.io/deviceorientation/spec-source-orientation.html#deviceorientation) and [https://developer.apple.com/library/safari/documentation/SafariDOMAdditions/Reference/DeviceOrientationEventClassRef/DeviceOrientationEvent/DeviceOrientationEvent.html](https://developer.apple.com/library/safari/documentation/SafariDOMAdditions/Reference/DeviceOrientationEventClassRef/DeviceOrientationEvent/DeviceOrientationEvent.html) for details.
    +     */
    +/**
    +        * @attribute {Number} [x=0] (readonly)
    +        * The accelerometer x value
    +        */
    +/**
    +        * @attribute {Number} [y=0] (readonly)
    +        * The accelerometer y value
    +        */
    +/**
    +        * @attribute {Number} [z=0] (readonly)
    +        * The accelerometer z value
    +        */
    +/**
    +        * @attribute {Number} [alpha=0] (readonly)
    +        * The gyro alpha value rotating around the z axis
    +        */
    +/**
    +        * @attribute {Number} [beta=0] (readonly)
    +        * The gyro beta value rotating around the x axis
    +        */
    +/**
    +        * @attribute {Number} [gamma=0] (readonly)
    +        * The gyro gamma value rotating around the y axis
    +        */
    +/**
    +        * @attribute {Number} [compass=0] (readonly)
    +        * The compass orientation, see [https://developer.apple.com/library/safari/documentation/SafariDOMAdditions/Reference/DeviceOrientationEventClassRef/DeviceOrientationEvent/DeviceOrientationEvent.html](https://developer.apple.com/library/safari/documentation/SafariDOMAdditions/Reference/DeviceOrientationEventClassRef/DeviceOrientationEvent/DeviceOrientationEvent.html) for details.
    +        */
    +/**
    +        * @attribute {Number} [compassaccuracy=0] (readonly)
    +        * The compass accuracy, see [https://developer.apple.com/library/safari/documentation/SafariDOMAdditions/Reference/DeviceOrientationEventClassRef/DeviceOrientationEvent/DeviceOrientationEvent.html](https://developer.apple.com/library/safari/documentation/SafariDOMAdditions/Reference/DeviceOrientationEventClassRef/DeviceOrientationEvent/DeviceOrientationEvent.html) for details.
    +        */
    +/**
    +     * @class dr.labelbutton {UI Components}
    +     * @extends dr.buttonbase
    +     * Button class consisting of text centered in a view. The onclick event
    +     * is generated when the button is clicked. The visual state of the 
    +     * button changes during onmousedown/onmouseup.
    +     *
    +     *     @example
    +     *     <spacedlayout axis="y"></spacedlayout>
    +     *
    +     *     <labelbutton text="click me" defaultcolor="plum" selectcolor="orchid">
    +     *       <handler event="onclick">
    +     *         hello.setAttribute('text', 'Hello Universe!');
    +     *       </handler>
    +     *     </labelbutton>
    +     *
    +     *     <text id="hello"></text>
    +     */
    +/**
    +     * @class dr.labeltoggle {UI Components}
    +     * @extends dr.labelbutton
    +     * Button class consisting of text centered in a view. The state of the
    +     * button changes each time the button is clicked. The select property
    +     * holds the current state of the button. The onselected event
    +     * is generated when the button is the selected state.
    +     *
    +     *     @example
    +     *     <spacedlayout axis="y"></spacedlayout>
    +     *
    +     *     <labeltoggle id="toggle" text="Click me to toggle" defaultcolor="plum" selectcolor="orchid"></labeltoggle>
    +     *
    +     *     <text text="${toggle.selected ? 'selected' : 'not selected'}"></text>
    +     */
    +/**
    +     * @class dr.logger {Util}
    +     * @extends dr.node
    +     * Logs all attribute setting behavior
    +     *
    +     * This example shows how to log all setAttribute() calls for a replicator to console.log():
    +     *
    +     *     @example
    +     *     <dataset name="topmovies" url="/top_movies.json"></dataset>
    +     *     <replicator datapath="$topmovies/searchResponse/results[*]/movie[take(/releaseYear,/duration,/rating)]" classname="logger"></replicator>
    +     */
    +/**
    +   * @class dr.rangeslider {UI Components}
    +   * @extends dr.view
    +   * An input component whose upper and lower bounds are changed via mouse clicks or drags.
    +   *
    +   *     @example
    +   *
    +   *     <rangeslider name="range" width="300" height="40" x="10" y="30" lowselectcolor="#00CCFF" highselectcolor="#FFCCFF" outline="2px dashed #00CCFF"
    +   *                  lowvalue="30"
    +   *                  highvalue="70">
    +   *     </rangeslider>
    +   *
    +   *     <text name="rangeLabel" color="white" height="40"
    +   *           y="${this.parent.range.y + (this.parent.range.height / 2) - (this.height / 2)}"
    +   *           x="${(this.parent.range.lowvalue * 3) + (((this.parent.range.highvalue * 3) - (this.parent.range.lowvalue * 3)) / 2) - (this.width / 2)}"
    +   *           text="${Math.round(this.parent.range.lowvalue) + ' ~ ' + Math.round(this.parent.range.highvalue)}"></text>
    +   *
    +   *
    +   * A range slider highlights the inclusive values by default, however this behavior can be reversed with `exclusive="true"`.
    +   * The following example demonstrates an exclusive-valued, inverted (range goes from high to low) horizontal slider.
    +   *
    +   *     @example
    +   *
    +   *     <rangeslider name="range" width="400" x="10" y="30" lowselectcolor="#AACCFF" highselectcolor="#FFAACC""
    +   *                  height="30"
    +   *                  lowvalue="45"
    +   *                  highvalue="55"
    +   *                  invert="true"
    +   *                  exclusive="true">
    +   *     </rangeslider>
    +   *
    +   *     <text name="highRangeLabel" color="#666" height="20"
    +   *           y="${this.parent.range.y + (this.parent.range.height / 2) - (this.height / 2)}"
    +   *           x="${(((this.parent.range.maxvalue * 4) - (this.parent.range.highvalue * 4)) / 2) - (this.width / 2)}"
    +   *           text="${this.parent.range.maxvalue + ' ~ ' + Math.round(this.parent.range.highvalue)}"></text>
    +   *
    +   *     <text name="lowRangeLabel" color="#666" height="20"
    +   *           y="${this.parent.range.y + (this.parent.range.height / 2) - (this.height / 2)}"
    +   *           x="${(this.parent.range.width - (this.parent.range.lowvalue * 4)) + (((this.parent.range.lowvalue * 4) - (this.parent.range.minvalue * 4)) / 2) - (this.width / 2)}"
    +   *           text="${Math.round(this.parent.range.lowvalue) + ' ~ ' + this.parent.range.minvalue}"></text>
    +   *
    +   */
    +/**
    +      * @attribute {Number} [minvalue=0]
    +      * The minimum value of the slider
    +      */
    +/**
    +    * @attribute {Number} [minhighvalue=0]
    +    * The minimum value of the right slider
    +    */
    +/**
    +      * @attribute {Number} [maxvalue=100]
    +      * The maximum value of the slider
    +      */
    +/**
    +      * @attribute {Number} [maxlowvalue=100]
    +      * The maximum value of the lower bound slider
    +      */
    +/**
    +      * @attribute {"x"/"y"} [axis=x]
    +      * The axis to track on
    +      */
    +/**
    +      * @attribute {Boolean} [invert=false]
    +      * Set to false to have the scale run lower to higher, true to run higher to lower.
    +      */
    +/**
    +      * @attribute {Boolean} [exclusive=false]
    +      * Set to true to highlight the outer (exclusive) values of the range, false to select the inner (inclusive) values.
    +      */
    +/**
    +      * @attribute {Number} [lowvalue=50]
    +      * The current value of the left slider.
    +      * Use changeLowValue() to range check the number and set the value.
    +      */
    +/**
    +      * @attribute {Number} [highvalue=50]
    +      * The current value of the right slider.
    +      * Use changeHighValue() to range check the number and set the value.
    +      */
    +/**
    +      * @method changeLowValue
    +      * Given a new value for the slider position, constrain the value
    +      * between minvalue and maxvalue or maxlowvalue (whichever is lower) and then calls setAttribute.
    +      * @param {Number} v The new value of the component.
    +      */
    +/**
    +      * @method changeHighValue
    +      * Given a new value for the slider position, constrain the value
    +      * between minvalue or minhighvalue (whichever is higher) and maxvalue and then calls setAttribute.
    +      * @param {Number} v The new value of the component.
    +      */
    +/**
    +      * @attribute {String} [lowselectcolor="#a0a0a0"]
    +      * The selected color of the lower bound slider.
    +      */
    +/**
    +      * @attribute {String} [highselectcolor="#a0a0a0"]
    +      * The selected color of the upper bound slider.
    +      */
    +/**
    +     * @class dr.replicator {Data}
    +     * @extends dr.node
    +     * Handles replication and data binding.
    +     *
    +     * This example shows the replicator to creating four text instances, each corresponding to an item in the data attribute:
    +     *
    +     *     @example
    +     *     <spacedlayout></spacedlayout>
    +     *     <replicator classname="text" data="[1,2,3,4]"></replicator>
    +     *
    +     * Changing the data attribute to a new array causes the replicator to create a new text for each item:
    +     *
    +     *     @example
    +     *     <spacedlayout></spacedlayout>
    +     *     <text onclick="repl.setAttribute('data', [5,6,7,8]);">Click to change data</text>
    +     *     <replicator id="repl" classname="text" data="[1,2,3,4]"></replicator>
    +     *
    +     * This example uses a {@link #filterexpression filterexpression} to filter the data to only numbers. Clicking changes {@link #filterexpression filterexpression} to show only non-numbers in the data:
    +     *
    +     *     @example
    +     *     <spacedlayout></spacedlayout>
    +     *     <text onclick="repl.setAttribute('filterexpression', '[^\\d]');">Click to change filter</text>
    +     *     <replicator id="repl" classname="text" data="['a',1,'b',2,'c',3,4,5]" filterexpression="\d"></replicator>
    +     *
    +     * Replicators can be used to look up {@link #datapath datapath} expressions to values in JSON data in a dr.dataset. This example looks up the color of the bicycle in the dr.dataset named bikeshop:
    +     *
    +     *     @example
    +     *     <dataset name="bikeshop">
    +     *      {
    +     *        "bicycle": {
    +     *          "color": "red",
    +     *          "price": 19.95
    +     *        }
    +     *      }
    +     *     </dataset>
    +     *     <replicator classname="text" datapath="$bikeshop/bicycle/color"></replicator>
    +     *
    +     * Matching one or more items will cause the replicator to create multiple copies:
    +     *
    +     *     @example
    +     *     <dataset name="bikeshop">
    +     *      {
    +     *        "bicycle": [
    +     *          {
    +     *           "color": "red",
    +     *           "price": 19.95
    +     *          },
    +     *          {
    +     *           "color": "green",
    +     *           "price": 29.95
    +     *          },
    +     *          {
    +     *           "color": "blue",
    +     *           "price": 59.95
    +     *          }
    +     *        ]
    +     *      }
    +     *     </dataset>
    +     *     <spacedlayout></spacedlayout>
    +     *     <replicator classname="text" datapath="$bikeshop/bicycle[*]/color"></replicator>
    +     *
    +     * It's possible to select a single item on from the array using an array index. This selects the second item:
    +     *
    +     *     @example
    +     *     <dataset name="bikeshop">
    +     *      {
    +     *        "bicycle": [
    +     *          {
    +     *           "color": "red",
    +     *           "price": 19.95
    +     *          },
    +     *          {
    +     *           "color": "green",
    +     *           "price": 29.95
    +     *          },
    +     *          {
    +     *           "color": "blue",
    +     *           "price": 59.95
    +     *          }
    +     *        ]
    +     *      }
    +     *     </dataset>
    +     *     <spacedlayout></spacedlayout>
    +     *     <replicator classname="text" datapath="$bikeshop/bicycle[1]/color"></replicator>
    +     *
    +     * It's also possible to replicate a range of items in the array with the [start,end,stepsize] operator. This replicates every other item:
    +     *
    +     *     @example
    +     *     <dataset name="bikeshop">
    +     *      {
    +     *        "bicycle": [
    +     *          {
    +     *           "color": "red",
    +     *           "price": 19.95
    +     *          },
    +     *          {
    +     *           "color": "green",
    +     *           "price": 29.95
    +     *          },
    +     *          {
    +     *           "color": "blue",
    +     *           "price": 59.95
    +     *          }
    +     *        ]
    +     *      }
    +     *     </dataset>
    +     *     <spacedlayout></spacedlayout>
    +     *     <replicator classname="text" datapath="$bikeshop/bicycle[0,3,2]/color"></replicator>
    +     *
    +     * Sometimes it's necessary to have complete control and flexibility over filtering and transforming results. Adding a [@] operator to the end of your datapath causes {@link #filterfunction filterfunction} to be called for each result. This example shows bike colors for bikes with a price greater than 20, in reverse order:
    +     *
    +     *     @example
    +     *     <dataset name="bikeshop">
    +     *      {
    +     *        "bicycle": [
    +     *          {
    +     *           "color": "red",
    +     *           "price": 19.95
    +     *          },
    +     *          {
    +     *           "color": "green",
    +     *           "price": 29.95
    +     *          },
    +     *          {
    +     *           "color": "blue",
    +     *           "price": 59.95
    +     *          }
    +     *        ]
    +     *      }
    +     *     </dataset>
    +     *     <spacedlayout></spacedlayout>
    +     *     <replicator classname="text" datapath="$bikeshop/bicycle[*][@]">
    +     *       <method name="filterfunction" args="obj, accum">
    +     *         // add the color to the beginning of the results if the price is greater than 20
    +     *         if (obj.price > 20)
    +     *           accum.unshift(obj.color);
    +     *         return accum
    +     *       </method>
    +     *     </replicator>
    +     *
    +     * See [https://github.com/flitbit/json-path](https://github.com/flitbit/json-path) for more details.
    +     */
    +/**
    +        * @attribute {Boolean} [pooling=false]
    +        * If true, reuse views when replicating.
    +        */
    +/**
    +        * @attribute {Array} [data=[]]
    +        * The list of items to replicate. If {@link #datapath datapath} is set, it is converted to an array and stored here.
    +        */
    +/**
    +        * @attribute {String} classname (required)
    +        * The name of the class to be replicated.
    +        */
    +/**
    +        * @attribute {String} datapath
    +        * The datapath expression to be replicated.
    +        * See [https://github.com/flitbit/json-path](https://github.com/flitbit/json-path) for details.
    +        */
    +/**
    +        * @attribute {String} [sortfield=""]
    +        * The field in the data to use for sorting. Only sort then this 
    +        */
    +/**
    +        * @attribute {Boolean} [sortasc=true]
    +        * If true, sort ascending.
    +        */
    +/**
    +        * @attribute {String} [filterexpression=""]
    +        * If defined, data will be filtered against a [regular expression](https://developer.mozilla.org/en/docs/Web/JavaScript/Guide/Regular_Expressions). 
    +        */
    +/**
    +        * @method refresh
    +        * Refreshes the dataset manually
    +        */
    +/**
    +        * @method filterfunction
    +        * @abstract
    +        * Called to filter data.
    +        * @param obj An individual item to be processed.
    +        * @param {Object[]} accum The array of items that have been accumulated. To keep a processed item, it must be added to the accum array.
    +        * @returns {Object[]} The accum array. Must be returned otherwise results will be lost.
    +        */
    +/**
    +      * @class dr.resizelayout {Layout}
    +      * @extends dr.spacedlayout
    +      * Resizes one or more views to fill in any remaining space.
    +      *
    +      *     @example
    +      *     <resizelayout spacing="2" inset="5" outset="5">
    +      *     </resizelayout>
    +      *
    +      *     <view height="25" bgcolor="lightpink"></view>
    +      *     <view height="35" bgcolor="plum" layouthint="1"></view>
    +      *     <view height="15" bgcolor="lightblue"></view>
    +      */
    +/**
    +     * @class dr.shim {Util}
    +     * @extends dr.node
    +     * Connects to the shared event bus. When data is sent with a given type, a corresponding event is sent. For example, send('blah', {}) sends data with the 'blah' type, other shims will receive the object via an 'onblah' event.
    +     */
    +/**
    +        * @attribute {Boolean} [connected=false] (readonly)
    +        * If true, we are connected to the server
    +        */
    +/**
    +        * @attribute {Number} [pingtime=1000]
    +        * The frequency used to reconnect to the server
    +        */
    +/**
    +        * @attribute {Boolean} [websockets=false]
    +        * If true, use websockets to connect to the server
    +        */
    +/**
    +        * @method send
    +        * Sends some data over the event bus.
    +        * @param {String} type The type of event to be sent.
    +        * @param {Object} data The data to be sent.
    +        */
    +/**
    +      * @class dr.shrinktofit {Layout}
    +      * @extends dr.layout
    +      * A special "layout" that resizes the parent to fit the children 
    +      * rather than laying out the children.
    +      *
    +      *
    +      * Here is a view that contains three sub views that are positioned with a spacedlayout. The parent view has a grey background color. Notice that the subviews are visible because they overflow the parent view, but the parent view itself takes up no space.
    +      *
    +      *     @example
    +      *     <view bgcolor="darkgrey">
    +      *       <spacedlayout axis="y"></spacedlayout>
    +      *
    +      *       <view width="100" height="25" bgcolor="lightpink" opacity=".3"></view>
    +      *       <view width="100" height="25" bgcolor="plum" opacity=".3"></view>
    +      *       <view width="100" height="25" bgcolor="lightblue" opacity=".3"></view>
    +      *     </view>
    +      *
    +      * Now we'll add a shrinktofit to the parent view. Notice that now the parent view does take up space, and you can see it through the semi-transparent subviews.
    +      *
    +      *     @example
    +      *     <view bgcolor="darkgrey">
    +      *       <shrinktofit axis="both" xpad="5" ypad="10"></shrinktofit>
    +      *
    +      *       <spacedlayout axis="y"></spacedlayout>
    +      *
    +      *       <view width="100" height="25" bgcolor="lightpink" opacity=".3"></view>
    +      *       <view width="100" height="25" bgcolor="plum" opacity=".3"></view>
    +      *       <view width="100" height="25" bgcolor="lightblue" opacity=".3"></view>
    +      *     </view>
    +      */
    +/**
    +    * @attribute {String} [axis=x]
    +    * The axis along which to resize this view to fit its children. 
    +    * Supported values are 'x', 'y' and 'both'.
    +    */
    +/**
    +    * @attribute {Number} [xpad=0]
    +    * Additional space added on the child extent along the x-axis.
    +    */
    +/**
    +    * @attribute {Number} [ypad=0]
    +    * Additional space added on the child extent along the y-axis.
    +    */
    +/**
    +    * @method __updateMonitoringSubview 
    +    * Wrapped by startMonitoringSubview and stopMonitoringSubview.
    +    * @param {dr.view} view
    +    * @param {Function} func
    +    * @return {void}
    +    * @private
    +    */
    +/**
    +     * @class dr.slider {UI Components}
    +     * @extends dr.view
    +     * An input component whose state is changed when the mouse is dragged.
    +     *
    +     *     @example
    +     *
    +     *     <slider name="hslide" y="5" width="250" height="10" value="50" bgcolor="#808080"></slider>
    +     * Slider with a label:
    +     *
    +     *     @example
    +     *     
    +     *     <spacedlayout spacing="8"></spacedlayout>
    +     *     <slider name="hslide" y="5" width="250" height="10" value="50" bgcolor="#808080"></slider>
    +     *     <text text="${Math.round(this.parent.hslide.value)}" y="${this.parent.hslide.y + (this.parent.hslide.height-this.height)/2}"></text>
    +     */
    +/**
    +        * @attribute {Number} [minvalue=0]
    +        * The minimum value of the slider
    +        */
    +/**
    +        * @attribute {Number} [maxvalue=100]
    +        * The maximum value of the slider
    +        */
    +/**
    +        * @attribute {"x"/"y"} [axis=x]
    +        * The axis to track on
    +        */
    +/**
    +        * @attribute {Boolean} [invert=false]
    +        * Set to true to invert the direction of the slider.
    +        */
    +/**
    +        * @attribute {Number} [value=0]
    +        * The current value of the slider.
    +        * Use changeValue() to range check the number and set the value.
    +        */
    +/**
    +        * @method changeValue
    +        * Given a new value for the slider position, constrain the value
    +        * between minvalue and maxvalue and then calls setAttribute.
    +        * @param {Number} v The new value of the component.
    +        */
    +/**
    +        * @attribute {String} [selectcolor="#a0a0a0"]
    +        * The selected color of the slider.
    +        */
    +/**
    +      * @class dr.spacedlayout {Layout}
    +      * @extends dr.variablelayout
    +      * A variableLayout that positions views along an axis using an inset, 
    +      * outset and spacing value.
    +      *
    +      *     @example
    +      *     <spacedlayout axis="y" spacing="2" inset="5" outset="5">
    +      *     </spacedlayout>
    +      *
    +      *     <view width="100" height="25" bgcolor="lightpink"></view>
    +      *     <view width="100" height="35" bgcolor="plum"></view>
    +      *     <view width="100" height="15" bgcolor="lightblue"></view>
    +      */
    +/**
    +    * @attribute {Number} [spacing=0]
    +    * The spacing between views.
    +    */
    +/**
    +    * @attribute {Number} [outset=0]
    +    * Space after the last view. Only used when collapseparent is true.
    +    */
    +/**
    +    * @attribute {Number} [inset=0]
    +    * Space before the first view.
    +    */
    +/**
    +    * @attribute {String} [axis='x']
    +    * The orientation of the layout. Supported values are 'x' and 'y'.
    +    * A value of 'x' will orient the views horizontally and a value of 'y'
    +    * will orient them vertically.
    +    */
    +/**
    +     * @class dr.stats {Util}
    +     * @extends dr.view
    +     * wraps the three.js stats control which shows framerate over time
    +     *
    +     * This example shows how use the stats control to monitor framerate:
    +     *
    +     *     @example
    +     *     <stats></stats>
    +     */
    +/**
    +     * @class dr.touch {Input}
    +     * @extends dr.node
    +     * Receives touch and multitouch data where available.
    +     */
    +/**
    +        * @attribute {Number} [x=0] (readonly)
    +        * The touch x value for the first finger.
    +        */
    +/**
    +        * @attribute {Number} [y=0] (readonly)
    +        * The touch y value for the first finger.
    +        */
    +/**
    +        * @attribute {Object[]} touches (readonly)
    +        * An array of x/y coordinates for all fingers, where available. See [https://developer.mozilla.org/en-US/docs/Web/Guide/Events/Touch_events](https://developer.mozilla.org/en-US/docs/Web/Guide/Events/Touch_events) for more details
    +        */
    +/**
    +      * @class dr.variablelayout {Layout}
    +      * @extends dr.constantlayout
    +      * Allows for variation based on the index and subview. An updateSubview 
    +      * method is provided that can be overriden to provide variable behavior.
    +      *
    +      *     @example
    +      *     <variablelayout attribute="x" value="10">
    +      *     </variablelayout>
    +      *
    +      *     <view width="100" height="25" bgcolor="lightpink"></view>
    +      *     <view width="100" height="25" bgcolor="plum"></view>
    +      *     <view width="100" height="25" bgcolor="lightblue"></view>
    +      */
    +/**
    +    * @attribute {boolean} [collapseparent=false]
    +    * If true the updateParent method will be called. The updateParent method 
    +    * will typically resize the parent to fit the newly layed out child views.
    +    */
    +/**
    +    * @attribute {boolean} [reverse=false]
    +    * If true the layout will position the items in the opposite order. For 
    +    * example, right to left instead of left to right.
    +    */
    +/**
    +    * @method doBeforeUpdate
    +    * Called by update before any processing is done. Gives subviews a
    +    * chance to do any special setup before update is processed.
    +    * @return {void}
    +    */
    +/**
    +    * @method doAfterUpdate
    +    * Called by update after any processing is done but before the optional
    +    * collapsing of parent is done. Gives subviews a chance to do any 
    +    * special teardown after update is processed.
    +    * @return {void}
    +    */
    +/**
    +    * @method startMonitoringSubview
    +    * Provides a default implementation that calls update when the
    +    * visibility of a subview changes.
    +    * @param {dr.view} view
    +    */
    +/**
    +    * @method stopMonitoringSubview
    +    * Provides a default implementation that calls update when the
    +    * visibility of a subview changes.
    +    * @param {dr.view} view
    +    */
    +/**
    +    * @method updateSubview
    +    * Called for each subview in the layout.
    +    * @param {Number} count The number of subviews that have been layed out
    +    *   including the current one. i.e. count will be 1 for the first
    +    *   subview layed out.
    +    * @param {dr.view} view The subview being layed out.
    +    * @param {String} attribute The name of the attribute to update.
    +    * @param {*} value The value to set on the subview.
    +    * @return {*} The value to use for the next subview.
    +    */
    +/**
    +    * @method skipSubview
    +    * Called for each subview in the layout to determine if the view should
    +    * be updated or not. The default implementation returns true if the 
    +    * subview is not visible.
    +    * @param {dr.view} view The subview to check.
    +    * @return {Boolean} True if the subview should be skipped during 
    +    *   layout updates.
    +    */
    +/**
    +    * @method updateParent
    +    * Called if the collapseparent attribute is true. Subclasses should 
    +    * implement this if they want to modify the parent view.
    +    * @param {String} attribute The name of the attribute to update.
    +    * @param {*} value The value to set on the parent.
    +    * @return {void}
    +    */
    +/**
    +     * @class dr.webpage {UI Components}
    +     * @extends dr.view
    +     * iframe component for embedding dreem code or html in a dreem application.
    +     * The size of the iframe matches the width/height of the view when the
    +     * component is created. The iframe component can show a web page by
    +     * using the src attribute, or to show dynamic content using the
    +     * contents attribute.
    +     *
    +     * This example shows how to display a web page in an iframe. The 
    +     * contents of the iframe are not editable:
    +     *
    +     *     @example
    +     *     <webpage src="http://en.wikipedia.org/wiki/San_Francisco" width="300" height="140"></webpage>
    +     *
    +     * To make the web page clickable, and to add scrolling:
    +     *
    +     *     @example
    +     *     <webpage src="http://en.wikipedia.org/wiki/San_Francisco" width="300" height="140" scrolling="true" clickable="true"></webpage>
    +     *
    +     * The content of the iframe can also be dynamically generated, including
    +     * adding Dreem code:
    +     *
    +     *     @example
    +     *     <webpage width="300" height="140" contents="Hello"></webpage>
    +     *
    +     */
    +/**
    +        * @attribute {String} [src="/iframe_stub.html"]
    +        * url to load inside the iframe. By default, a file is loaded that has
    +        * an empty body but includes the libraries needed to support Dreem code.
    +        */
    +/**
    +        * @attribute {Boolean} [scrolling="false"]
    +        * Controls scrollbar display in the iframe.
    +        */
    +/**
    +        * @attribute {String} [contents=""]
    +        * string to write into the iframe body. This is dreem/html code
    +        * that is written inside the iframe's body tag. If you want to display
    +        * static web pages, specify the src attribute, but do not use contents.
    +        */
    +/**
    +      * @class dr.wrappinglayout {Layout}
    +      * @extends dr.variablelayout
    +      * An extension of VariableLayout that positions views along an axis using
    +      * an inset, outset and spacing value. Views will be wrapped when they
    +      * overflow the available space.
    +      *
    +      * Supported Layout Hints:
    +      *   break:string Will force the subview to start a new line/column.
    +      *
    +      *     @example
    +      *     <wrappinglayout axis="y" spacing="2" inset="5" outset="5" lineinset="10" linespacing="5" lineoutset="10">
    +      *     </wrappinglayout>
    +      *
    +      *     <view width="100" height="25" bgcolor="lightpink"></view>
    +      *     <view width="100" height="35" bgcolor="plum"></view>
    +      *     <view width="100" height="15" bgcolor="lightblue"></view>
    +      */
    +/**
    +    * @attribute {Number} [spacing=0]
    +    * The spacing between views.
    +    */
    +/**
    +    * @attribute {Number} [outset=0]
    +    * Space after the last view.
    +    */
    +/**
    +    * @attribute {Number} [inset=0]
    +    * Space before the first view.
    +    */
    +/**
    +    * @attribute {Number} [linespacing=0]
    +    * The spacing between each line of views.
    +    */
    +/**
    +    * @attribute {Number} [lineoutset=0]
    +    * Space after the last line of views. Only used when collapseparent is true.
    +    */
    +/**
    +    * @attribute {Number} [lineinset=0]
    +    * Space before the first line of views.
    +    */
    +/**
    +    * @attribute {String} [axis='x']
    +    * The orientation of the layout. Supported values are 'x' and 'y'.
    +    * A value of 'x' will orient the views horizontally and a value of 'y'
    +    * will orient them vertically.
    +    */
    +
    + + diff --git a/docs/api/source/layout.html b/docs/api/source/layout.html new file mode 100644 index 00000000..4381953b --- /dev/null +++ b/docs/api/source/layout.html @@ -0,0 +1,4202 @@ + + + + + The source code + + + + + + +
    // Generated by CoffeeScript 1.8.0
    +
    +/*
    + * The MIT License (MIT)
    + * 
    + * Copyright ( c ) 2014 Teem2 LLC
    + * 
    + * Permission is hereby granted, free of charge, to any person obtaining a copy
    + * of this software and associated documentation files (the "Software"), to deal
    + * in the Software without restriction, including without limitation the rights
    + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    + * copies of the Software, and to permit persons to whom the Software is
    + * furnished to do so, subject to the following conditions:
    + * 
    + * The above copyright notice and this permission notice shall be included in all
    + * copies or substantial portions of the Software.
    + * 
    + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    + * SOFTWARE.
    + */
    +
    +(function() {
    +  var hackstyle,
    +    __slice = [].slice,
    +    __hasProp = {}.hasOwnProperty,
    +    __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
    +    __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; },
    +    __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
    +
    +  hackstyle = (function() {
    +    var origstyle, stylemap, styletap;
    +    stylemap = {
    +      left: 'x',
    +      top: 'y',
    +      'background-color': 'bgcolor'
    +    };
    +    origstyle = $.style;
    +    styletap = function(elem, name, value) {
    +      var returnval, view;
    +      returnval = origstyle.apply(this, arguments);
    +      name = stylemap[name] || name;
    +      view = elem.$view;
    +      if (view[name] !== value) {
    +        view.setAttribute(name, value, true);
    +      }
    +      return returnval;
    +    };
    +    return function(active) {
    +      if (active) {
    +        return $.style = styletap;
    +      } else {
    +        return $.style = origstyle;
    +      }
    +    };
    +  })();
    +
    +  window.dr = (function() {
    +    var Class, Eventable, Events, Idle, InputText, Keyboard, Layout, Module, Mouse, Node, Sprite, StartEventable, State, Text, View, Window, capabilities, compiler, constraintScopes, debug, dom, exports, fcamelCase, hiddenAttributes, idle, ignoredAttributes, mixOf, moduleKeywords, mouseEvents, otherstyles, querystring, rdashAlpha, showWarnings, ss, ss2, stylemap, test, triggerlock, warnings, _initConstraints;
    +    mixOf = function() {
    +      var Mixed, base, i, method, mixin, mixins, name, _i, _ref;
    +      base = arguments[0], mixins = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
    +      Mixed = (function(_super) {
    +        __extends(Mixed, _super);
    +
    +        function Mixed() {
    +          return Mixed.__super__.constructor.apply(this, arguments);
    +        }
    +
    +        return Mixed;
    +
    +      })(base);
    +      for (i = _i = mixins.length - 1; _i >= 0; i = _i += -1) {
    +        mixin = mixins[i];
    +        _ref = mixin.prototype;
    +        for (name in _ref) {
    +          method = _ref[name];
    +          Mixed.prototype[name] = method;
    +        }
    +      }
    +      return Mixed;
    +    };
    +
    +    /**
    +     * @class Events
    +     * @private
    +     * A lightweight event system, used internally.
    +     */
    +    triggerlock = null;
    +    Events = {
    +
    +      /**
    +       * Binds an event to the current scope
    +       * @param {String} ev the name of the event
    +       * @param {Function} callback called when the event is fired
    +       */
    +      bind: function(ev, callback) {
    +        var evs, name, _base, _i, _len;
    +        evs = ev.split(' ');
    +        if (!(this.hasOwnProperty('events') && this.events)) {
    +          this.events = {};
    +        }
    +        for (_i = 0, _len = evs.length; _i < _len; _i++) {
    +          name = evs[_i];
    +          (_base = this.events)[name] || (_base[name] = []);
    +          this.events[name].push(callback);
    +        }
    +        return this;
    +      },
    +
    +      /**
    +       * Binds an event to the current scope, automatically unbinds when the event fires
    +       * @param {String} ev the name of the event
    +       * @param {Function} callback called when the event is fired
    +       */
    +      one: function(ev, callback) {
    +        this.bind(ev, function() {
    +          this.unbind(ev, arguments.callee);
    +          return callback.apply(this, arguments);
    +        });
    +        return this;
    +      },
    +
    +      /**
    +       * Fires an event
    +       * @param {String} ev the name of the event to fire
    +       */
    +      trigger: function() {
    +        var args, callback, ev, list, _i, _len, _ref;
    +        ev = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
    +        list = this.hasOwnProperty('events') && ((_ref = this.events) != null ? _ref[ev] : void 0);
    +        if (!list) {
    +          return;
    +        }
    +        if (triggerlock && triggerlock.scope === this && triggerlock.ev === ev) {
    +          return this;
    +        }
    +        if (!triggerlock) {
    +          triggerlock = {
    +            ev: ev,
    +            scope: this
    +          };
    +        }
    +        for (_i = 0, _len = list.length; _i < _len; _i++) {
    +          callback = list[_i];
    +          if (callback.apply(this, args) === false) {
    +            break;
    +          }
    +        }
    +        triggerlock = null;
    +        return this;
    +      },
    +
    +      /**
    +       * Listens for an event on a specific scope
    +       * @param {Object} obj scope to listen for events on
    +       * @param {String} ev the name of the event
    +       * @param {Function} callback called when the event is fired
    +       */
    +      listenTo: function(obj, ev, callback) {
    +        obj.bind(ev, callback);
    +        this.listeningTo || (this.listeningTo = []);
    +        this.listeningTo.push({
    +          obj: obj,
    +          ev: ev,
    +          callback: callback
    +        });
    +        return this;
    +      },
    +
    +      /**
    +       * Only listens for an event one time
    +       * @param {Object} obj scope to listen for events on
    +       * @param {String} ev the name of the event
    +       * @param {Function} callback called when the event is fired
    +       */
    +      listenToOnce: function(obj, ev, callback) {
    +        var listeningToOnce;
    +        listeningToOnce = this.listeningToOnce || (this.listeningToOnce = []);
    +        listeningToOnce.push(obj);
    +        obj.one(ev, function() {
    +          var idx;
    +          idx = listeningToOnce.indexOf(obj);
    +          if (idx !== -1) {
    +            listeningToOnce.splice(idx, 1);
    +          }
    +          return callback.apply(this, arguments);
    +        });
    +        return this;
    +      },
    +
    +      /**
    +       * Stops listening for an event on a given scope
    +       * @param {Object} obj scope to listen for events on
    +       * @param {String} ev the name of the event
    +       * @param {Function} callback called when the event would have been fired
    +       */
    +      stopListening: function(obj, ev, callback) {
    +        var idx, index, listeningTo, val, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2;
    +        if (obj) {
    +          obj.unbind(ev, callback);
    +          _ref = [this.listeningTo, this.listeningToOnce];
    +          for (_i = 0, _len = _ref.length; _i < _len; _i++) {
    +            listeningTo = _ref[_i];
    +            if (!listeningTo) {
    +              continue;
    +            }
    +            idx = listeningTo.indexOf(obj);
    +            if (idx > -1) {
    +              listeningTo.splice(idx, 1);
    +            } else {
    +              for (index = _j = 0, _len1 = listeningTo.length; _j < _len1; index = ++_j) {
    +                val = listeningTo[index];
    +                if (obj === val.obj && ev === val.ev && callback === val.callback) {
    +                  listeningTo.splice(index, 1);
    +                  break;
    +                }
    +              }
    +            }
    +          }
    +        } else {
    +          _ref1 = this.listeningTo;
    +          for (_k = 0, _len2 = _ref1.length; _k < _len2; _k++) {
    +            _ref2 = _ref1[_k], obj = _ref2.obj, ev = _ref2.ev, callback = _ref2.callback;
    +            obj.unbind(ev, callback);
    +          }
    +          this.listeningTo = void 0;
    +        }
    +        return this;
    +      },
    +
    +      /**
    +       * Stops listening for an event on the current scope
    +       * @param {String} ev the name of the event
    +       * @param {Function} callback called when the event would have been fired
    +       */
    +      unbind: function(ev, callback) {
    +        var cb, evs, i, list, name, _i, _j, _len, _len1, _ref;
    +        if (!ev) {
    +          this.events = {};
    +          return this;
    +        }
    +        evs = ev.split(' ');
    +        for (_i = 0, _len = evs.length; _i < _len; _i++) {
    +          name = evs[_i];
    +          list = (_ref = this.events) != null ? _ref[name] : void 0;
    +          if (!list) {
    +            continue;
    +          }
    +          if (!callback) {
    +            delete this.events[name];
    +            continue;
    +          }
    +          for (i = _j = 0, _len1 = list.length; _j < _len1; i = ++_j) {
    +            cb = list[i];
    +            if (!(cb === callback)) {
    +              continue;
    +            }
    +            list = list.slice();
    +            list.splice(i, 1);
    +            this.events[name] = list;
    +            break;
    +          }
    +        }
    +        return this;
    +      }
    +    };
    +
    +    /**
    +     * @class Module
    +     * @private
    +     * Adds basic mixin support.
    +     */
    +    moduleKeywords = ['included', 'extended'];
    +    Module = (function() {
    +      function Module() {}
    +
    +
    +      /**
    +       * Includes a mixin in the current scope
    +       * @param {Object} obj the object to be mixed in
    +       */
    +
    +      Module.include = function(obj) {
    +        var key, value, _ref;
    +        if (!obj) {
    +          throw new Error('include(obj) requires obj');
    +        }
    +        for (key in obj) {
    +          value = obj[key];
    +          if (__indexOf.call(moduleKeywords, key) < 0) {
    +            this.prototype[key] = value;
    +          }
    +        }
    +        if ((_ref = obj.included) != null) {
    +          _ref.call(this, obj);
    +        }
    +        return this;
    +      };
    +
    +      return Module;
    +
    +    })();
    +
    +    /**
    +     * @class Eventable {Core Dreem}
    +     * @extends Module
    +     * The baseclass used by everything in dreem. Adds higher level event APIs.
    +     */
    +    Eventable = (function(_super) {
    +
    +      /**
    +       * @method include
    +       * @hide
    +       */
    +      var eventlock, typemappings;
    +
    +      __extends(Eventable, _super);
    +
    +      function Eventable() {
    +        return Eventable.__super__.constructor.apply(this, arguments);
    +      }
    +
    +      Eventable.include(Events);
    +
    +      typemappings = {
    +        number: parseFloat,
    +        boolean: function(val) {
    +          if (typeof val === 'string') {
    +            return val === 'true';
    +          } else {
    +            return !!val;
    +          }
    +        },
    +        string: function(val) {
    +          return val + '';
    +        },
    +        json: function(val) {
    +          return JSON.parse(val);
    +        },
    +        expression: function(val) {
    +          if (typeof val !== 'string') {
    +            return val;
    +          }
    +          return eval(val);
    +        }
    +      };
    +
    +      eventlock = {};
    +
    +      Eventable.prototype._coerceType = function(name, value, type) {
    +        type || (type = this.types[name]);
    +        if (type) {
    +          if (!typemappings[type]) {
    +            showWarnings(["Invalid type '" + type + "' for attribute '" + name + "', must be one of: " + (Object.keys(typemappings).join(', '))]);
    +            return;
    +          }
    +          value = typemappings[type](value);
    +        } else if (value == null) {
    +          value = '';
    +        }
    +        return value;
    +      };
    +
    +      Eventable.prototype._setDefaults = function(attributes, defaults) {
    +        var key, value, _results;
    +        if (defaults == null) {
    +          defaults = {};
    +        }
    +        _results = [];
    +        for (key in defaults) {
    +          value = defaults[key];
    +          if (!(key in attributes)) {
    +            _results.push(attributes[key] = defaults[key]);
    +          } else {
    +            _results.push(void 0);
    +          }
    +        }
    +        return _results;
    +      };
    +
    +
    +      /**
    +       * Sets an attribute, calls a setter if there is one, then sends an event with the new value
    +       * @param {String} name the name of the attribute to set
    +       * @param value the value to set to
    +       */
    +
    +      Eventable.prototype.setAttribute = function(name, value, skipcoercion) {
    +        var _name;
    +        if (!skipcoercion) {
    +          value = this._coerceType(name, value);
    +        }
    +        if (typeof this[_name = "set_" + name] === "function") {
    +          this[_name](value);
    +        }
    +        this[name] = value;
    +        this.sendEvent(name, value);
    +        return this;
    +      };
    +
    +
    +      /**
    +       * Sends an event
    +       * @param {String} name the name of the event to send
    +       * @param value the value to send with the event
    +       */
    +
    +      Eventable.prototype.sendEvent = function(name, value) {
    +        var _ref;
    +        if ((_ref = this.events) != null ? _ref[name] : void 0) {
    +          this.trigger(name, value, this);
    +        }
    +        return this;
    +      };
    +
    +
    +      /**
    +       * Calls setAttribute for each name/value pair in the attributes object
    +       * @param {Object} attributes An object of name/value pairs to be set
    +       */
    +
    +      Eventable.prototype.setAttributes = function(attributes) {
    +        var name, value;
    +        for (name in attributes) {
    +          value = attributes[name];
    +          this.setAttribute(name, value);
    +        }
    +        return this;
    +      };
    +
    +      return Eventable;
    +
    +    })(Module);
    +    capabilities = {
    +      localStorage: (function() {
    +        var e, mod;
    +        mod = 'dr';
    +        try {
    +          localStorage.setItem(mod, mod);
    +          localStorage.removeItem(mod);
    +          return true;
    +        } catch (_error) {
    +          e = _error;
    +          return false;
    +        }
    +      })(),
    +      touch: 'ontouchstart' in window || 'onmsgesturechange' in window,
    +      camelcss: navigator.userAgent.toLowerCase().indexOf('firefox') > -1
    +    };
    +    querystring = window.location.search;
    +    debug = querystring.indexOf('debug') > 0;
    +    test = querystring.indexOf('test') > 0;
    +    compiler = (function() {
    +      var cacheData, cacheKey, compile, compileCache, compiledebug, exports, findBindings, nocache, scriptCache, strict, transform, usecache;
    +      nocache = querystring.indexOf('nocache') > 0;
    +      strict = querystring.indexOf('strict') > 0;
    +      if (!nocache) {
    +        usecache = capabilities.localStorage;
    +      }
    +      cacheKey = "dreemcache";
    +      cacheData = localStorage.getItem(cacheKey);
    +      if (usecache && cacheData && cacheData.length < 5000000) {
    +        compileCache = JSON.parse(cacheData);
    +      } else {
    +        localStorage.clear();
    +        compileCache = {
    +          bindings: {},
    +          script: {
    +            coffee: {}
    +          }
    +        };
    +        if (usecache) {
    +          localStorage[cacheKey] = JSON.stringify(compileCache);
    +        }
    +      }
    +      window.addEventListener('unload', function() {
    +        if (usecache) {
    +          return localStorage[cacheKey] = JSON.stringify(compileCache);
    +        }
    +      });
    +      findBindings = (function() {
    +        var bindingCache, propertyBindings, scopes;
    +        bindingCache = compileCache.bindings;
    +        scopes = null;
    +        propertyBindings = {
    +          MemberExpression: function(n) {
    +            var name;
    +            name = n.property.name;
    +            n = n.object;
    +            scopes.push({
    +              binding: acorn.stringify(n),
    +              property: name
    +            });
    +            return true;
    +          }
    +        };
    +        return function(expression) {
    +          var ast;
    +          if (usecache && expression in bindingCache) {
    +            return bindingCache[expression];
    +          }
    +          ast = acorn.parse(expression);
    +          scopes = [];
    +          acorn.walkDown(ast, propertyBindings);
    +          return bindingCache[expression] = scopes;
    +        };
    +      })();
    +      transform = (function() {
    +        var coffeeCache, compilers;
    +        coffeeCache = compileCache.script.coffee;
    +        compilers = {
    +          coffee: function(script) {
    +            var error;
    +            if (usecache && script in coffeeCache) {
    +              return coffeeCache[script];
    +            }
    +            if (!window.CoffeeScript) {
    +              console.warn('missing coffee-script.js include');
    +              return;
    +            }
    +            try {
    +              if (script) {
    +                return coffeeCache[script] = CoffeeScript.compile(script, {
    +                  bare: true
    +                });
    +              }
    +            } catch (_error) {
    +              error = _error;
    +              return showWarnings(["error " + error + " compiling script\r\n" + script]);
    +            }
    +          }
    +        };
    +        return function(script, name) {
    +          if (script == null) {
    +            script = '';
    +          }
    +          if (!(name in compilers)) {
    +            return script;
    +          }
    +          return compilers[name](script);
    +        };
    +      })();
    +      scriptCache = {};
    +      compiledebug = function(script, args, name) {
    +        var argstring, e, func, key;
    +        if (script == null) {
    +          script = '';
    +        }
    +        if (args == null) {
    +          args = [];
    +        }
    +        if (name == null) {
    +          name = '';
    +        }
    +        argstring = args.join();
    +        key = script + argstring + name;
    +        if (key in scriptCache) {
    +          return scriptCache[key];
    +        }
    +        try {
    +          if (strict) {
    +            script = "\"use strict\"\n" + script;
    +          }
    +          if (name) {
    +            func = new Function("return function " + name + "(" + argstring + "){" + script + "}")();
    +          } else {
    +            func = new Function(args, script);
    +          }
    +          return scriptCache[key] = func;
    +        } catch (_error) {
    +          e = _error;
    +          return console.error('failed to compile', e.toString(), args, script);
    +        }
    +      };
    +      compile = function(script, args, name) {
    +        var argstring, key;
    +        if (script == null) {
    +          script = '';
    +        }
    +        if (args == null) {
    +          args = [];
    +        }
    +        if (name == null) {
    +          name = '';
    +        }
    +        argstring = args.join();
    +        key = script + argstring + name;
    +        if (key in scriptCache) {
    +          return scriptCache[key];
    +        }
    +        return scriptCache[key] = new Function(args, script);
    +      };
    +      return exports = {
    +        compile: debug ? compiledebug : compile,
    +        transform: transform,
    +        findBindings: findBindings
    +      };
    +    })();
    +    constraintScopes = [];
    +    _initConstraints = function() {
    +      var constraint, _i, _len;
    +      for (_i = 0, _len = constraintScopes.length; _i < _len; _i++) {
    +        constraint = constraintScopes[_i];
    +        constraint._bindConstraints();
    +      }
    +      return constraintScopes = [];
    +    };
    +
    +    /**
    +     * @class dr.node {Core Dreem}
    +     * @extends Eventable
    +     * The nonvisual base class for everything in dreem. Handles parent/child relationships between tags.
    +     *
    +     * Nodes can contain methods, handlers, setters, [constraints](#!/guide/constraints), attributes and other node instances.
    +     *
    +     * Here we define a data node that contains movie data.
    +     *
    +     *     <node id="data">
    +     *       <node>
    +     *         <attribute name="title" type="string" value="Bill and Teds Excellent Adventure"></attribute>
    +     *         <attribute name="type" type="string" value="movie"></attribute>
    +     *         <attribute name="year" type="string" value="1989"></attribute>
    +     *         <attribute name="length" type="number" value="89"></attribute>
    +     *       </node>
    +     *       <node>
    +     *         <attribute name="title" type="string" value="Waynes World"></attribute>
    +     *         <attribute name="type" type="string" value="movie"></attribute>
    +     *         <attribute name="year" type="string" value="1992"></attribute>
    +     *         <attribute name="length" type="number" value="94"></attribute>
    +     *       </node>
    +     *     </node>
    +     *
    +     * This node defines a set of math helper methods. The node provides a tidy container for these related utility functions.
    +     *
    +     *     <node id="utils">
    +     *       <method name="add" args="a,b">
    +     *         return a+b;
    +     *       </method>
    +     *       <method name="subtract" args="a,b">
    +     *         return a-b;
    +     *       </method>
    +     *     </node>
    +     *
    +     * You can also create a sub-class of node to contain non visual functionality. Here is an example of an inches to metric conversion class that is instantiated with the inches value and can convert it to either cm or m.
    +     *
    +     *     @example
    +     *
    +     *     <class name="inchesconverter" extends="node">
    +     *       <attribute name="inchesval" type="number" value="0"></attribute>
    +     *
    +     *       <method name="centimetersval">
    +     *         return this.inchesval*2.54;
    +     *       </method>
    +     *
    +     *       <method name="metersval">
    +     *         return (this.inchesval*2.54)/100;
    +     *       </method>
    +     *     </class>
    +     *
    +     *     <inchesconverter id="conv" inchesval="2"></inchesconverter>
    +     *
    +     *     <spacedlayout axis="y"></spacedlayout>
    +     *     <text text="${conv.inchesval + ' inches'}"></text>
    +     *     <text text="${conv.centimetersval() + ' cm'}"></text>
    +     *     <text text="${conv.metersval() + ' m'}"></text>
    +     *
    +     *
    +     */
    +    Node = (function(_super) {
    +
    +      /**
    +       * @attribute {String} name
    +       * Names this node in its parent scope so it can be referred to later.
    +       */
    +
    +      /**
    +       * @attribute {String} id
    +       * Gives this node a global ID, which can be looked up in the global window object.
    +       * Take care to not override builtin globals, or override your own instances!
    +       */
    +
    +      /**
    +       * @attribute {String} scriptincludes
    +       * A comma separated list of URLs to javascript includes required as dependencies. Useful if you need to ensure a third party library is available.
    +       */
    +
    +      /**
    +       * @attribute {String} scriptincludeserror
    +       * An error to show if scriptincludes fail to load
    +       */
    +      var earlyattributes, lateattributes, matchConstraint, _eventCallback, _installMethod;
    +
    +      __extends(Node, _super);
    +
    +      matchConstraint = /\${(.+)}/;
    +
    +      earlyattributes = ['name', 'parent'];
    +
    +      lateattributes = ['data'];
    +
    +      function Node(el, attributes) {
    +        var args, deferbindings, ev, method, name, parent, reference, script, skiponinit, value, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2;
    +        if (attributes == null) {
    +          attributes = {};
    +        }
    +
    +        /**
    +         * @property {dr.node[]} subnodes
    +         * @readonly
    +         * An array of this node's child nodes
    +         */
    +        this.subnodes = [];
    +        this.types = (_ref = attributes.$types) != null ? _ref : {};
    +        delete attributes.$types;
    +        skiponinit = attributes.$skiponinit;
    +        delete attributes.$skiponinit;
    +        deferbindings = attributes.$deferbindings;
    +        delete attributes.$deferbindings;
    +
    +        /*
    +         * @property {String} $textcontent
    +         * @readonly
    +         * Contains the textual contents of this node, if any
    +         */
    +        if (el != null ? el.textContent : void 0) {
    +          attributes.$textcontent = el.textContent;
    +        }
    +        if (attributes.$methods) {
    +          this.installMethods(attributes.$methods, attributes.$tagname);
    +          delete attributes.$methods;
    +        }
    +        if (attributes.$handlers) {
    +          this.installHandlers(attributes.$handlers, attributes.$tagname);
    +          _ref1 = attributes.$handlers;
    +          for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
    +            _ref2 = _ref1[_i], ev = _ref2.ev, name = _ref2.name, script = _ref2.script, args = _ref2.args, reference = _ref2.reference, method = _ref2.method;
    +            ev = ev.substr(2);
    +            if (__indexOf.call(mouseEvents, ev) >= 0) {
    +              if (attributes.clickable !== "false") {
    +                attributes.clickable = true;
    +              }
    +            }
    +          }
    +          delete attributes.$handlers;
    +        }
    +        if (!deferbindings) {
    +          this._bindHandlers();
    +        }
    +        for (_j = 0, _len1 = earlyattributes.length; _j < _len1; _j++) {
    +          name = earlyattributes[_j];
    +          if (name in attributes) {
    +            this.setAttribute(name, attributes[name]);
    +          }
    +        }
    +        for (name in attributes) {
    +          value = attributes[name];
    +          if (__indexOf.call(lateattributes, name) >= 0 || __indexOf.call(earlyattributes, name) >= 0) {
    +            continue;
    +          }
    +          this.bindAttribute(name, value, attributes.$tagname);
    +        }
    +        parent = this.parent;
    +        if (parent && parent instanceof Node) {
    +
    +          /**
    +           * @event onsubnodes
    +           * Fired when this node's subnodes array has changed
    +           * @param {dr.node} node The dr.node that fired the event
    +           */
    +
    +          /**
    +           * @event subnodeAdded
    +           * Fired when a subnode is added to this node.
    +           * @param {dr.node} node The dr.node that was added
    +           */
    +          parent.sendEvent('subnodes', this);
    +          parent.sendEvent('subnodeAdded', this);
    +          parent.doSubnodeAdded(this);
    +        }
    +        for (_k = 0, _len2 = lateattributes.length; _k < _len2; _k++) {
    +          name = lateattributes[_k];
    +          if (name in attributes) {
    +            this.bindAttribute(name, attributes[name], attributes.$tagname);
    +          }
    +        }
    +        if (this.constraints) {
    +          constraintScopes.push(this);
    +        }
    +        if (!deferbindings) {
    +          this._bindHandlers(true);
    +        }
    +
    +        /**
    +         * @event oninit
    +         * Fired when this node and all its children are completely initialized
    +         * @param {dr.node} node The dr.node that fired the event
    +         */
    +
    +        /**
    +         * @property {Boolean} inited
    +         * @readonly
    +         * True when this node and all its children are completely initialized
    +         */
    +        if (!skiponinit) {
    +          if (!this.inited) {
    +            this.inited = true;
    +            this.sendEvent('init', this);
    +          }
    +        }
    +      }
    +
    +      Node.prototype.installMethods = function(methods, tagname, scope, callbackscope) {
    +        var allocation, args, invokeSuper, method, methodlist, name, _i, _len, _ref;
    +        if (scope == null) {
    +          scope = this;
    +        }
    +        if (callbackscope == null) {
    +          callbackscope = this;
    +        }
    +        for (name in methods) {
    +          methodlist = methods[name];
    +          for (_i = 0, _len = methodlist.length; _i < _len; _i++) {
    +            _ref = methodlist[_i], method = _ref.method, args = _ref.args, allocation = _ref.allocation, invokeSuper = _ref.invokeSuper;
    +            _installMethod(scope, name, compiler.compile(method, args, "" + tagname + "$" + name).bind(callbackscope), allocation, invokeSuper);
    +          }
    +        }
    +      };
    +
    +      Node.prototype.installHandlers = function(handlers, tagname, scope) {
    +        var args, ev, handler, handlerobj, method, name, reference, script, _i, _len;
    +        if (scope == null) {
    +          scope = this;
    +        }
    +        if (this.handlers == null) {
    +          this.handlers = [];
    +        }
    +        if (this.latehandlers == null) {
    +          this.latehandlers = [];
    +        }
    +        for (_i = 0, _len = handlers.length; _i < _len; _i++) {
    +          handler = handlers[_i];
    +          ev = handler.ev, name = handler.name, script = handler.script, args = handler.args, reference = handler.reference, method = handler.method;
    +          ev = ev.substr(2);
    +          if (method) {
    +            handler.callback = scope[method];
    +          } else {
    +            handler.callback = _eventCallback(ev, script, scope, tagname, args);
    +          }
    +          handlerobj = {
    +            scope: this,
    +            ev: ev,
    +            name: name,
    +            callback: handler.callback,
    +            reference: reference
    +          };
    +          if (reference) {
    +            this.latehandlers.push(handlerobj);
    +          } else {
    +            this.handlers.push(handlerobj);
    +          }
    +        }
    +      };
    +
    +      Node.prototype.removeHandlers = function(handlers, tagname, scope) {
    +        var args, ev, handler, method, name, reference, refeval, script, _i, _len;
    +        if (scope == null) {
    +          scope = this;
    +        }
    +        for (_i = 0, _len = handlers.length; _i < _len; _i++) {
    +          handler = handlers[_i];
    +          ev = handler.ev, name = handler.name, script = handler.script, args = handler.args, reference = handler.reference, method = handler.method;
    +          ev = ev.substr(2);
    +          if (reference != null) {
    +            refeval = this._valueLookup(reference)();
    +            scope.stopListening(refeval, ev, handler.callback);
    +          } else {
    +            scope.unbind(ev, handler.callback);
    +          }
    +        }
    +      };
    +
    +      Node.prototype.bindAttribute = function(name, value, tagname) {
    +        var constraint;
    +        if (value) {
    +          constraint = typeof value.match === "function" ? value.match(matchConstraint) : void 0;
    +        }
    +        if (constraint) {
    +          return this._applyConstraint(name, constraint[1]);
    +        } else if (name.indexOf('on') === 0) {
    +          name = name.substr(2);
    +          return this.bind(name, _eventCallback(name, value, this, tagname));
    +        } else {
    +          return this.setAttribute(name, value);
    +        }
    +      };
    +
    +      Node.prototype.initConstraints = function() {
    +        _initConstraints();
    +        return this;
    +      };
    +
    +      _eventCallback = function(name, script, scope, tagname, fnargs) {
    +        var js;
    +        if (tagname == null) {
    +          tagname = '';
    +        }
    +        if (fnargs == null) {
    +          fnargs = ['value'];
    +        }
    +        js = compiler.compile(script, fnargs, "" + tagname + "$on" + name);
    +        return function() {
    +          var args;
    +          if (arguments.length) {
    +            args = arguments;
    +          } else if (name in scope) {
    +            args = [scope[name]];
    +          } else {
    +            args = [];
    +          }
    +          return js.apply(scope, args);
    +        };
    +      };
    +
    +      _installMethod = function(scope, methodname, method, allocation, invokeSuper) {
    +        var meth, supr;
    +        if (methodname in scope) {
    +          supr = scope[methodname];
    +          meth = method;
    +          return scope[methodname] = function() {
    +            var prevOwn, prevValue, retval;
    +            if (invokeSuper === 'after') {
    +              retval = meth.apply(scope, arguments);
    +              supr.apply(scope, arguments);
    +            } else if (invokeSuper === 'inside') {
    +              prevValue = scope['super'];
    +              prevOwn = scope.hasOwnProperty('super');
    +              scope['super'] = function(args) {
    +                return supr.apply(scope, args);
    +              };
    +              retval = meth.apply(scope, arguments);
    +              if (prevOwn) {
    +                scope['super'] = prevValue;
    +              } else {
    +                delete scope.callSuper;
    +              }
    +            } else {
    +              supr.apply(scope, arguments);
    +              retval = meth.apply(scope, arguments);
    +            }
    +            return retval;
    +          };
    +        } else {
    +          return scope[methodname] = method;
    +        }
    +      };
    +
    +      Node.prototype._applyConstraint = function(property, expression) {
    +        var bindexpression, bindings, scope, scopes, _i, _len;
    +        if (this.constraints == null) {
    +          this.constraints = {};
    +        }
    +        this.constraints[property] = {
    +          expression: expression,
    +          bindings: {}
    +        };
    +        bindings = this.constraints[property].bindings;
    +        scopes = compiler.findBindings(expression);
    +        for (_i = 0, _len = scopes.length; _i < _len; _i++) {
    +          scope = scopes[_i];
    +          bindexpression = scope.binding;
    +          if (bindings[bindexpression] == null) {
    +            bindings[bindexpression] = [];
    +          }
    +          bindings[bindexpression].push(scope);
    +        }
    +      };
    +
    +      Node.prototype._valueLookup = function(bindexpression) {
    +        return compiler.compile('return ' + bindexpression).bind(this);
    +      };
    +
    +      Node.prototype._bindConstraints = function() {
    +        var bindexpression, binding, bindinglist, bindings, boundref, constraint, expression, fn, name, property, _i, _len, _ref;
    +        _ref = this.constraints;
    +        for (name in _ref) {
    +          constraint = _ref[name];
    +          bindings = constraint.bindings, expression = constraint.expression;
    +          fn = this._valueLookup(expression);
    +          constraint = this._constraintCallback(name, fn);
    +          for (bindexpression in bindings) {
    +            bindinglist = bindings[bindexpression];
    +            boundref = this._valueLookup(bindexpression)();
    +            if (!boundref) {
    +              showWarnings(["Could not bind constraint " + bindexpression]);
    +              continue;
    +            }
    +            if (boundref == null) {
    +              boundref = boundref.$view;
    +            }
    +            for (_i = 0, _len = bindinglist.length; _i < _len; _i++) {
    +              binding = bindinglist[_i];
    +              property = binding.property;
    +              if (typeof boundref.bind === "function") {
    +                boundref.bind(property, constraint);
    +              }
    +            }
    +          }
    +          this.setAttribute(name, fn());
    +        }
    +      };
    +
    +      Node.prototype._bindHandlers = function(isLate) {
    +        var binding, bindings, callback, defer, ev, name, reference, refeval, scope, _i, _len;
    +        bindings = isLate ? this.latehandlers : this.handlers;
    +        if (!bindings) {
    +          return;
    +        }
    +        defer = [];
    +        for (_i = 0, _len = bindings.length; _i < _len; _i++) {
    +          binding = bindings[_i];
    +          scope = binding.scope, name = binding.name, ev = binding.ev, callback = binding.callback, reference = binding.reference;
    +          if (reference) {
    +            refeval = this._valueLookup(reference)();
    +            if (refeval instanceof Eventable) {
    +              scope.listenTo(refeval, ev, callback);
    +            } else {
    +              defer.push(binding);
    +              continue;
    +            }
    +          } else {
    +            scope.bind(ev, callback);
    +            if (ev in scope) {
    +              scope.sendEvent(ev, scope[ev]);
    +            }
    +          }
    +        }
    +        if (defer.length) {
    +          if (isLate) {
    +            this.latehandlers = defer;
    +          } else {
    +            this.handlers = defer;
    +          }
    +          setTimeout((function(_this) {
    +            return function() {
    +              return _this._bindHandlers(isLate);
    +            };
    +          })(this), 0);
    +          return;
    +        }
    +        if (isLate) {
    +          this.latehandlers = [];
    +        } else {
    +          this.handlers = [];
    +        }
    +      };
    +
    +      Node.prototype._constraintCallback = function(name, fn) {
    +        return (function constraintCallback(){;
    +        this.setAttribute(name, fn());
    +        return }).bind(this);
    +      };
    +
    +      Node.prototype.set_parent = function(parent) {
    +        if (parent instanceof Node) {
    +          if (this.name) {
    +            parent[this.name] = this;
    +          }
    +          return parent.subnodes.push(this);
    +        }
    +      };
    +
    +      Node.prototype.set_name = function(name) {
    +        if (this.parent && name) {
    +          return this.parent[name] = this;
    +        }
    +      };
    +
    +      Node.prototype.set_id = function(id) {
    +        return window[id] = this;
    +      };
    +
    +      Node.prototype._removeFromParent = function(name) {
    +        var arr, index, removedNode;
    +        if (!this.parent) {
    +          return;
    +        }
    +        arr = this.parent[name];
    +        index = arr.indexOf(this);
    +        if (index !== -1) {
    +          removedNode = arr[index];
    +          arr.splice(index, 1);
    +          this.parent.sendEvent(name, removedNode);
    +          if (name === 'subnodes') {
    +
    +            /**
    +             * @event subnodeRemoved
    +             * Fired when a subnode is removed from this node.
    +             * @param {dr.node} node The dr.node that was removed
    +             */
    +            this.parent.sendEvent('subnodeRemoved', removedNode);
    +            this.parent.doSubnodeRemoved(removedNode);
    +          }
    +        }
    +      };
    +
    +      Node.prototype._findParents = function(name, value) {
    +        var out, p;
    +        out = [];
    +        p = this;
    +        while (p) {
    +          if (name in p && p[name] === value) {
    +            out.push(p);
    +          }
    +          p = p.parent;
    +        }
    +        return out;
    +      };
    +
    +      Node.prototype._findInParents = function(name) {
    +        var p;
    +        p = this.parent;
    +        while (p) {
    +          if (name in p) {
    +            return p[name];
    +          }
    +          p = p.parent;
    +        }
    +      };
    +
    +
    +      /**
    +       * Called when a subnode is added to this node. Provides a hook for
    +       * subclasses. No need for subclasses to call super. Do not call this
    +       * method to add a subnode. Instead call setParent.
    +       * @param {dr.node} node The subnode that was added.
    +       * @return {void}
    +       */
    +
    +      Node.prototype.doSubnodeAdded = function(node) {};
    +
    +
    +      /**
    +       * Called when a subnode is removed from this node. Provides a hook for
    +       * subclasses. No need for subclasses to call super. Do not call this
    +       * method to remove a subnode. Instead call _removeFromParent.
    +       * @param {dr.node} node The subnode that was removed.
    +       * @return {void}
    +       */
    +
    +      Node.prototype.doSubnodeRemoved = function(node) {};
    +
    +
    +      /**
    +       * @method destroy
    +       * Destroys this node
    +       */
    +
    +
    +      /**
    +       * @ignore
    +       */
    +
    +      Node.prototype.destroy = function(skipevents) {
    +
    +        /**
    +         * @event ondestroy
    +         * Fired when this node and all its children are about to be destroyed
    +         * @param {dr.node} node The dr.node that fired the event
    +         */
    +        var subnode, _i, _len, _ref, _ref1;
    +        this.sendEvent('destroy', this);
    +        if (this.listeningTo) {
    +          this.stopListening();
    +        }
    +        this.unbind();
    +        if (((_ref = this.parent) != null ? _ref[this.name] : void 0) === this) {
    +          delete this.parent[this.name];
    +        }
    +        _ref1 = this.subnodes;
    +        for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
    +          subnode = _ref1[_i];
    +          if (subnode != null) {
    +            subnode.destroy(true);
    +          }
    +        }
    +        if (!skipevents) {
    +          return this._removeFromParent('subnodes');
    +        }
    +      };
    +
    +      return Node;
    +
    +    })(Eventable);
    +    stylemap = {
    +      x: 'left',
    +      y: 'top',
    +      bgcolor: 'backgroundColor',
    +      visible: 'display'
    +    };
    +
    +    /**
    +     * @class Sprite
    +     * @private
    +     * Abstracts the underlying visual primitives (currently HTML) from dreem's view system.
    +     */
    +    Sprite = (function() {
    +      var noop, styleval;
    +
    +      noop = function() {};
    +
    +      styleval = {
    +        display: function(isVisible) {
    +          if (isVisible) {
    +            return '';
    +          } else {
    +            return 'none';
    +          }
    +        },
    +        cursor: function(clickable) {
    +          if (clickable) {
    +            return 'pointer';
    +          } else {
    +            return '';
    +          }
    +        }
    +      };
    +
    +      function Sprite(jqel, view, tagname) {
    +        if (tagname == null) {
    +          tagname = 'div';
    +        }
    +        this.handle = __bind(this.handle, this);
    +        this.animate = __bind(this.animate, this);
    +        if (jqel == null) {
    +          this.el = document.createElement(tagname);
    +          this.el.$init = true;
    +        } else if (jqel instanceof HTMLElement) {
    +          this.el = jqel;
    +        }
    +        this.el.$view = view;
    +        this.el.setAttribute('class', 'sprite');
    +      }
    +
    +      Sprite.prototype.setStyle = function(name, value, internal, el) {
    +        if (el == null) {
    +          el = this.el;
    +        }
    +        if (value == null) {
    +          value = '';
    +        }
    +        if (name in stylemap) {
    +          name = stylemap[name];
    +        }
    +        if (name in styleval) {
    +          value = styleval[name](value);
    +        }
    +        return el.style[name] = value;
    +      };
    +
    +      Sprite.prototype.set_parent = function(parent) {
    +        if (parent instanceof Sprite) {
    +          parent = parent.el;
    +        }
    +        return parent.appendChild(this.el);
    +      };
    +
    +      Sprite.prototype.set_id = function(id) {
    +        return this.el.setAttribute('id', id);
    +      };
    +
    +      Sprite.prototype.animate = function() {
    +        var name, value, _ref;
    +        if (this.jqel == null) {
    +          this.jqel = $(this.el);
    +        }
    +        _ref = arguments[0];
    +        for (name in _ref) {
    +          value = _ref[name];
    +          if (name in stylemap) {
    +            arguments[0][stylemap[name]] = value;
    +            delete arguments[0][name];
    +          }
    +        }
    +        return this.jqel.animate.apply(this.jqel, arguments);
    +      };
    +
    +      Sprite.prototype.set_clickable = function(clickable) {
    +        this.__clickable = clickable;
    +        this.__updatePointerEvents();
    +        return this.setStyle('cursor', clickable, true);
    +      };
    +
    +      Sprite.prototype.set_clip = function(clip) {
    +        this.__clip = clip;
    +        return this.__updateOverflow();
    +      };
    +
    +      Sprite.prototype.set_scrollable = function(scrollable) {
    +        this.__scrollable = scrollable;
    +        this.__updateOverflow();
    +        return this.__updatePointerEvents();
    +      };
    +
    +      Sprite.prototype.__updateOverflow = function() {
    +        return this.setStyle('overflow', this.__scrollable ? 'auto' : this.__clip ? 'hidden' : '', true);
    +      };
    +
    +      Sprite.prototype.__updatePointerEvents = function() {
    +        return this.setStyle('pointer-events', this.__clickable || this.__scrollable ? 'auto' : 'none', true);
    +      };
    +
    +      Sprite.prototype.destroy = function() {
    +        this.el.parentNode.removeChild(this.el);
    +        return this.el = this.jqel = null;
    +      };
    +
    +      Sprite.prototype.setText = function(txt) {
    +        if (txt != null) {
    +          return this.el.innerHTML = txt;
    +        }
    +      };
    +
    +      Sprite.prototype.getText = function(textOnly) {
    +        if (textOnly) {
    +          return this.el.innerText;
    +        } else {
    +          return this.el.innerHTML;
    +        }
    +      };
    +
    +      Sprite.prototype.value = function(value) {
    +        if (!this.input) {
    +          return;
    +        }
    +        if (value != null) {
    +          return this.input.value = value;
    +        } else {
    +          return this.input.value;
    +        }
    +      };
    +
    +      Sprite.prototype.measureTextSize = function(multiline, width, resize) {
    +        if (multiline) {
    +          this.setStyle('width', width, true);
    +          this.setStyle('height', 'auto', true);
    +          this.setStyle('whiteSpace', 'normal', true);
    +        } else {
    +          if (resize) {
    +            this.setStyle('width', 'auto', true);
    +            this.setStyle('height', 'auto', true);
    +          }
    +          this.setStyle('whiteSpace', '', true);
    +        }
    +        return {
    +          width: this.el.clientWidth,
    +          height: this.el.clientHeight
    +        };
    +      };
    +
    +      Sprite.prototype.handle = function(event) {
    +        var view;
    +        view = event.target.$view;
    +        if (!view) {
    +          return;
    +        }
    +        return view.sendEvent(event.type, view);
    +      };
    +
    +      Sprite.prototype.createTextElement = function() {
    +        return this.el.setAttribute('class', 'sprite sprite-text noselect');
    +      };
    +
    +      Sprite.prototype.createInputtextElement = function(text, multiline, width, height) {
    +        var input;
    +        this.el.setAttribute('class', 'sprite noselect');
    +        if (multiline) {
    +          input = document.createElement('textarea');
    +        } else {
    +          input = document.createElement('input');
    +          input.setAttribute('type', 'text');
    +        }
    +        input.setAttribute('value', text);
    +        input.setAttribute('class', 'sprite-inputtext');
    +        if (width) {
    +          this.setStyle('width', width, true, input);
    +        }
    +        if (height) {
    +          this.setStyle('height', height, true, input);
    +        }
    +        this.el.appendChild(input);
    +        input.$view = this.el.$view;
    +        $(input).on('focus blur', this.handle);
    +        return this.input = input;
    +      };
    +
    +      Sprite.prototype.getInputtextHeight = function() {
    +        var borderH, h, paddingH;
    +        h = parseInt($(this.input).css('height'));
    +        borderH = parseInt($(this.el).css('border-top-width')) + parseInt($(this.el).css('border-bottom-width'));
    +        paddingH = parseInt($(this.el).css('padding-top')) + parseInt($(this.el).css('padding-bottom'));
    +        return h + borderH + paddingH;
    +      };
    +
    +      Sprite.prototype.getAbsolute = function() {
    +        var pos;
    +        if (this.jqel == null) {
    +          this.jqel = $(this.el);
    +        }
    +        pos = this.jqel.offset();
    +        return {
    +          x: pos.left - window.pageXOffset,
    +          y: pos.top - window.pageYOffset
    +        };
    +      };
    +
    +      Sprite.prototype.set_class = function(classname) {
    +        return this.el.setAttribute('class', classname);
    +      };
    +
    +      return Sprite;
    +
    +    })();
    +    if (capabilities.camelcss) {
    +      ss = Sprite.prototype.setStyle;
    +      fcamelCase = function(all, letter) {
    +        return letter.toUpperCase();
    +      };
    +      rdashAlpha = /-([\da-z])/gi;
    +      Sprite.prototype.setStyle = function(name, value, internal, el) {
    +        if (el == null) {
    +          el = this.el;
    +        }
    +        if (name.match(rdashAlpha)) {
    +          name = name.replace(rdashAlpha, fcamelCase);
    +        }
    +        return ss(name, value, internal, el);
    +      };
    +    }
    +    if (debug) {
    +      otherstyles = ['width', 'height', 'background-color'];
    +      ss2 = Sprite.prototype.setStyle;
    +      Sprite.prototype.setStyle = function(name, value, internal, el) {
    +        if (el == null) {
    +          el = this.el;
    +        }
    +        if (!internal && !(name in stylemap) && !(__indexOf.call(otherstyles, name) >= 0)) {
    +          console.warn("Setting unknown CSS property " + name + " = " + value + " on ", this.el.$view, stylemap, internal);
    +        }
    +        return ss2(name, value, internal, el);
    +      };
    +    }
    +    ignoredAttributes = {
    +      parent: true,
    +      id: true,
    +      name: true,
    +      "extends": true,
    +      type: true,
    +      scriptincludes: true
    +    };
    +
    +    /**
    +     * @aside guide constraints
    +     * @class dr.view {UI Components}
    +     * @extends dr.node
    +     * The visual base class for everything in dreem. Views extend dr.node to add the ability to set and animate visual attributes, and interact with the mouse.
    +     *
    +     * Views are positioned inside their parent according to their x and y coordinates.
    +     *
    +     * Views can contain methods, handlers, setters, constraints, attributes and other view, node or class instances.
    +     *
    +     * Views can be easily converted to reusable classes/tags by changing their outermost &lt;view> tags to &lt;class> and adding a name attribute.
    +     *
    +     * Views support a number of builtin attributes. Setting attributes that aren't listed explicitly will pass through to the underlying Sprite implementation.
    +     *
    +     * Views currently integrate with jQuery, so any changes made to their CSS via jQuery will automatically cause them to update.
    +     *
    +     * Note that dreem apps must be contained inside a top-level &lt;view>&lt;/view> tag.
    +     *
    +     * The following example shows a pink view that contains a smaller blue view offset 10 pixels from the top and 10 from the left.
    +     *
    +     *     @example
    +     *     <view width="200" height="100" bgcolor="lightpink">
    +     *
    +     *       <view width="50" height="50" x="10" y="10" bgcolor="lightblue"></view>
    +     *
    +     *     </view>
    +     *
    +     * Here the blue view is wider than its parent pink view, and because the clip attribute of the parent is set to false it extends beyond the parents bounds.
    +     *
    +     *     @example
    +     *     <view width="200" height="100" bgcolor="lightpink" clip="false">
    +     *
    +     *       <view width="250" height="50" x="10" y="10" bgcolor="lightblue"></view>
    +     *
    +     *     </view>
    +     *
    +     * Now we set the clip attribute on the parent view to true, causing the overflowing child view to be clipped at its parent's boundary.
    +     *
    +     *     @example
    +     *     <view width="200" height="100" bgcolor="lightpink" clip="true">
    +     *
    +     *       <view width="250" height="50" x="10" y="10" bgcolor="lightblue"></view>
    +     *
    +     *     </view>
    +     *
    +     * Here we demonstrate how unsupported attributes are passed to the underlying sprite system. We make the child view semi-transparent by setting opacity. Although this is not in the list of supported attributes it is still applied.
    +     *
    +     *     @example
    +     *     <view width="200" height="100" bgcolor="lightpink">
    +     *
    +     *       <view width="250" height="50" x="10" y="10" bgcolor="lightblue" opacity=".5"></view>
    +     *
    +     *     </view>
    +     *
    +     * It is convenient to [constrain](#!/guide/constraints) a view's size and position to attributes of its parent view. Here we'll position the inner view so that its inset by 10 pixels in its parent.
    +     *
    +     *     @example
    +     *     <view width="200" height="100" bgcolor="lightpink">
    +     *
    +     *       <view width="${this.parent.width-this.inset*2}" height="${this.parent.height-this.inset*2}" x="${this.inset}" y="${this.inset}" bgcolor="lightblue">
    +     *         <attribute name="inset" type="number" value="10"></attribute>
    +     *       </view>
    +     *
    +     *     </view>
    +     */
    +    View = (function(_super) {
    +      __extends(View, _super);
    +
    +
    +      /**
    +       * @attribute {Number} [x=0]
    +       * This view's x position
    +       */
    +
    +
    +      /**
    +       * @attribute {Number} [y=0]
    +       * This view's y position
    +       */
    +
    +
    +      /**
    +       * @attribute {Number} [width=0]
    +       * This view's width
    +       */
    +
    +
    +      /**
    +       * @attribute {Number} [height=0]
    +       * This view's height
    +       */
    +
    +
    +      /**
    +       * @attribute {Boolean} [clickable=false]
    +       * If true, this view recieves mouse events. Automatically set to true when an onclick/mouse* event is registered for this view.
    +       */
    +
    +
    +      /**
    +       * @attribute {Boolean} [clip=false]
    +       * If true, this view clips to its bounds
    +       */
    +
    +
    +      /**
    +       * @attribute {Boolean} [scrollable=false]
    +       * If true, this view clips to its bounds and provides scrolling to see content that overflows the bounds
    +       */
    +
    +
    +      /**
    +       * @attribute {Boolean} [visible=true]
    +       * If false, this view is invisible
    +       */
    +
    +
    +      /**
    +       * @attribute {String} bgcolor
    +       * Sets this view's background color
    +       */
    +
    +
    +      /**
    +       * @attribute {String} bordercolor
    +       * Sets this view's border color
    +       */
    +
    +
    +      /**
    +       * @attribute {String} borderstyle
    +       * Sets this view's border style (can be any css border-style value)
    +       */
    +
    +
    +      /**
    +       * @attribute {Number} border
    +       * Sets this view's border width
    +       */
    +
    +
    +      /**
    +       * @attribute {Number} padding
    +       * Sets this view's padding
    +       */
    +
    +
    +      /**
    +       * @event onclick
    +       * Fired when this view is clicked
    +       * @param {dr.view} view The dr.view that fired the event
    +       */
    +
    +
    +      /**
    +       * @event onmouseover
    +       * Fired when the mouse moves over this view
    +       * @param {dr.view} view The dr.view that fired the event
    +       */
    +
    +
    +      /**
    +       * @event onmouseout
    +       * Fired when the mouse moves off this view
    +       * @param {dr.view} view The dr.view that fired the event
    +       */
    +
    +
    +      /**
    +       * @event onmousedown
    +       * Fired when the mouse goes down on this view
    +       * @param {dr.view} view The dr.view that fired the event
    +       */
    +
    +
    +      /**
    +       * @event onmouseup
    +       * Fired when the mouse goes up on this view
    +       * @param {dr.view} view The dr.view that fired the event
    +       */
    +
    +      function View(el, attributes) {
    +        var defaults, key, type, types, _ref;
    +        if (attributes == null) {
    +          attributes = {};
    +        }
    +
    +        /**
    +         * @property {dr.view[]} subviews
    +         * @readonly
    +         * An array of this views's child views
    +         */
    +
    +        /**
    +         * @event onsubviews
    +         * Fired when this views's subviews array has changed
    +         * @param {dr.view} view The dr.view that fired the event
    +         */
    +
    +        /**
    +         * @property {dr.layout[]} layouts
    +         * @readonly
    +         * An array of this views's layouts. Only defined when needed.
    +         */
    +
    +        /**
    +         * @event onlayouts
    +         * Fired when this views's layouts array has changed
    +         * @param {dr.layout} view The dr.layout that fired the event
    +         */
    +
    +        /**
    +         * @property {Boolean} ignorelayout
    +         * If true, layouts should ignore this view
    +         */
    +        this.subviews = [];
    +        types = {
    +          x: 'number',
    +          y: 'number',
    +          width: 'number',
    +          height: 'number',
    +          clickable: 'boolean',
    +          clip: 'boolean',
    +          scrollable: 'boolean',
    +          visible: 'boolean',
    +          'border': 'number',
    +          padding: 'number'
    +        };
    +        defaults = {
    +          x: 0,
    +          y: 0,
    +          width: 0,
    +          height: 0,
    +          clickable: false,
    +          clip: false,
    +          scrollable: false,
    +          visible: true,
    +          bordercolor: 'transparent',
    +          borderstyle: 'solid',
    +          border: 0,
    +          padding: 0
    +        };
    +        _ref = attributes.$types;
    +        for (key in _ref) {
    +          type = _ref[key];
    +          types[key] = type;
    +        }
    +        attributes.$types = types;
    +        this._setDefaults(attributes, defaults);
    +        if (this._isPercent(attributes['width'])) {
    +          attributes['width'] = this._sizeConstraint(attributes['width'], "width");
    +        }
    +        if (this._isPercent(attributes['height'])) {
    +          attributes['height'] = this._sizeConstraint(attributes['height'], "height");
    +        }
    +        if (attributes['parent'].padding) {
    +          attributes['x'] += attributes['parent'].padding;
    +          attributes['y'] += attributes['parent'].padding;
    +        }
    +        attributes['border-width'] = attributes['border'];
    +        delete attributes['border'];
    +        attributes['border-color'] = attributes['bordercolor'];
    +        attributes['border-style'] = attributes['borderstyle'];
    +        if ('padding-left' in attributes) {
    +          attributes['padding-left'] = attributes['padding'];
    +        }
    +        if ('padding-right' in attributes) {
    +          attributes['padding-right'] = attributes['padding'];
    +        }
    +        if ('padding-top' in attributes) {
    +          attributes['padding-top'] = attributes['padding'];
    +        }
    +        if ('padding-bottom' in attributes) {
    +          attributes['padding-bottom'] = attributes['padding'];
    +        }
    +        if (el instanceof View) {
    +          el = el.sprite;
    +        }
    +        this._createSprite(el, attributes);
    +        View.__super__.constructor.apply(this, arguments);
    +      }
    +
    +      View.prototype._isPercent = function(value) {
    +        return typeof value === 'string' && value.indexOf('%') > -1;
    +      };
    +
    +      View.prototype.innerSize = function(percent, dim) {
    +        return (this[dim] * parseInt(percent) / 100.0) - this['border-width'] * 2 - this.padding * 2;
    +      };
    +
    +      View.prototype._sizeConstraint = function(percent, dim) {
    +        return "${this.parent.innerSize ? this.parent.innerSize('" + percent + "', '" + dim + "') : $(this.parent)." + dim + "()}";
    +      };
    +
    +      View.prototype._createSprite = function(el, attributes) {
    +        return this.sprite = new Sprite(el, this, attributes.$tagname);
    +      };
    +
    +      View.prototype.setAttribute = function(name, value, skipstyle) {
    +        value = this._coerceType(name, value);
    +        if (!(skipstyle || name in ignoredAttributes || name in hiddenAttributes || this[name] === value)) {
    +          this.sprite.setStyle(name, value);
    +        }
    +        return View.__super__.setAttribute.call(this, name, value, true);
    +      };
    +
    +      View.prototype.set_clickable = function(clickable) {
    +        return this.sprite.set_clickable(clickable);
    +      };
    +
    +      View.prototype.set_parent = function(parent) {
    +        View.__super__.set_parent.apply(this, arguments);
    +        if (parent instanceof View) {
    +          parent.subviews.push(this);
    +          parent.sendEvent('subviews', this);
    +          parent = parent.sprite;
    +        }
    +        return this.sprite.set_parent(parent);
    +      };
    +
    +      View.prototype.set_id = function(id) {
    +        View.__super__.set_id.apply(this, arguments);
    +        return this.sprite.set_id(id);
    +      };
    +
    +
    +      /**
    +       * Animates this view's attribute(s)
    +       * @param {Object} obj A hash of attribute names and values to animate to
    +       * @param Number duration The duration of the animation in milliseconds
    +       */
    +
    +      View.prototype.animate = function() {
    +        this.sprite.animate.apply(this, arguments);
    +        return this;
    +      };
    +
    +      View.prototype.set_clip = function(clip) {
    +        return this.sprite.set_clip(clip);
    +      };
    +
    +      View.prototype.set_scrollable = function(scrollable) {
    +        return this.sprite.set_scrollable(scrollable);
    +      };
    +
    +
    +      /**
    +       * Calls doSubviewAdded/doLayoutAdded if the added subnode is a view or
    +       * layout respectively. Subclasses should call super.
    +       */
    +
    +      View.prototype.doSubnodeAdded = function(node) {
    +        if (node instanceof View) {
    +
    +          /**
    +           * @event subviewAdded
    +           * Fired when a subview is added to this view.
    +           * @param {dr.view} view The dr.view that was added
    +           */
    +          this.sendEvent('subviewAdded', node);
    +          return this.doSubviewAdded(node);
    +        } else if (node instanceof Layout) {
    +
    +          /**
    +           * @event layoutAdded
    +           * Fired when a layout is added to this view.
    +           * @param {dr.layout} layout The dr.layout that was added
    +           */
    +          this.sendEvent('layoutAdded', node);
    +          return this.doLayoutAdded(node);
    +        }
    +      };
    +
    +
    +      /**
    +       * Calls doSubviewRemoved/doLayoutRemoved if the removed subnode is a view or
    +       * layout respectively. Subclasses should call super.
    +       */
    +
    +      View.prototype.doSubnodeRemoved = function(node) {
    +        if (node instanceof View) {
    +
    +          /**
    +           * @event subviewRemoved
    +           * Fired when a subview is removed from this view.
    +           * @param {dr.view} view The dr.view that was removed
    +           */
    +          this.sendEvent('subviewRemoved', node);
    +          return this.doSubviewRemoved(node);
    +        } else if (node instanceof Layout) {
    +
    +          /**
    +           * @event layoutRemoved
    +           * Fired when a layout is removed from this view.
    +           * @param {dr.layout} layout The dr.layout that was removed
    +           */
    +          this.sendEvent('layoutRemoved', node);
    +          return this.doLayoutRemoved(node);
    +        }
    +      };
    +
    +
    +      /**
    +       * Called when a subview is added to this view. Provides a hook for
    +       * subclasses. No need for subclasses to call super. Do not call this
    +       * method to add a subview. Instead call setParent.
    +       * @param {dr.view} sv The subview that was added.
    +       * @return {void}
    +       */
    +
    +      View.prototype.doSubviewAdded = function(sv) {};
    +
    +
    +      /**
    +       * Called when a subview is removed from this view. Provides a hook for
    +       * subclasses. No need for subclasses to call super. Do not call this
    +       * method to remove a subview. Instead call _removeFromParent.
    +       * @param {dr.view} sv The subview that was removed.
    +       * @return {void}
    +       */
    +
    +      View.prototype.doSubviewRemoved = function(sv) {};
    +
    +
    +      /**
    +       * Called when a layout is added to this view. Provides a hook for
    +       * subclasses. No need for subclasses to call super. Do not call this
    +       * method to add a layout. Instead call setParent.
    +       * @param {dr.layout} layout The layout that was added.
    +       * @return {void}
    +       */
    +
    +      View.prototype.doLayoutAdded = function(layout) {};
    +
    +
    +      /**
    +       * Called when a layout is removed from this view. Provides a hook for
    +       * subclasses. No need for subclasses to call super. Do not call this
    +       * method to remove a layout. Instead call _removeFromParent.
    +       * @param {dr.layout} layout The layout that was removed.
    +       * @return {void}
    +       */
    +
    +      View.prototype.doLayoutRemoved = function(layout) {};
    +
    +      View.prototype.destroy = function(skipevents) {
    +        View.__super__.destroy.apply(this, arguments);
    +        if (!skipevents) {
    +          this._removeFromParent('subviews');
    +        }
    +        this.sprite.destroy();
    +        return this.sprite = null;
    +      };
    +
    +      View.prototype.getAbsolute = function() {
    +        return this.sprite.getAbsolute();
    +      };
    +
    +      View.prototype.set_class = function(classname) {
    +        return this.sprite.set_class(classname);
    +      };
    +
    +      return View;
    +
    +    })(Node);
    +
    +    /**
    +     * @class dr.inputtext {UI Components, Input}
    +     * @extends dr.view
    +     * Provides an editable input text field.
    +     *
    +     *     @example
    +     *     <spacedlayout axis="y"></spacedlayout>
    +     *
    +     *     <text text="Enter your name"></text>
    +     *
    +     *     <inputtext id="nameinput" bgcolor="white" border="1px solid lightgrey" width="200"></inputtext>
    +     *
    +     *     <labelbutton text="submit">
    +     *       <handler event="onclick">
    +     *         welcome.setAttribute('text', 'Welcome ' + nameinput.text);
    +     *       </handler>
    +     *     </labelbutton>
    +     *
    +     *     <text id="welcome"></text>
    +     *
    +     * It's possible to listen for an onchange event to find out when the user changed the inputtext value:
    +     *
    +     *     @example
    +     *     <inputtext id="nameinput" bgcolor="white" border="1px solid lightgrey" width="200" onchange="console.log('onchange', this.text)"></inputtext>
    +     *
    +     */
    +    InputText = (function(_super) {
    +      __extends(InputText, _super);
    +
    +
    +      /**
    +       * @attribute {Boolean} [multiline=false]
    +       * Set to true to show multi-line text.
    +       */
    +
    +
    +      /**
    +       * @attribute {String} text
    +       * The text inside this input text field
    +       */
    +
    +
    +      /**
    +       * @attribute {Number} [width=100]
    +       * The width of this input text field
    +       */
    +
    +      function InputText(el, attributes) {
    +        var defaults, key, type, types, _ref;
    +        if (attributes == null) {
    +          attributes = {};
    +        }
    +        types = {
    +          multiline: 'boolean'
    +        };
    +        defaults = {
    +          clickable: true,
    +          multiline: false,
    +          width: 100
    +        };
    +        _ref = attributes.$types;
    +        for (key in _ref) {
    +          type = _ref[key];
    +          types[key] = type;
    +        }
    +        attributes.$types = types;
    +        this._setDefaults(attributes, defaults);
    +        InputText.__super__.constructor.apply(this, arguments);
    +        if (!this.height) {
    +          this.setAttribute('height', this.sprite.getInputtextHeight());
    +        }
    +        this.listenTo(this, 'change', this._handleChange);
    +        this.listenTo(this, 'width', function(w) {
    +          return this.sprite.setStyle('width', this.innerSize('100%', 'width'), true, this.sprite.input);
    +        });
    +        this.listenTo(this, 'height', function(h) {
    +          return this.sprite.setStyle('height', this.innerSize('100%', 'height'), true, this.sprite.input);
    +        });
    +        this.listenTo(this, 'click', function() {
    +          return this.sprite.input.focus();
    +        });
    +      }
    +
    +      InputText.prototype._createSprite = function(el, attributes) {
    +        var b, h, multiline, p, w;
    +        InputText.__super__._createSprite.apply(this, arguments);
    +        attributes.text || (attributes.text = this.sprite.getText(true));
    +        this.sprite.setText('');
    +        multiline = this._coerceType('multiline', attributes.multiline, 'boolean');
    +        p = attributes['padding'] || 0;
    +        b = attributes['border-width'] || 0;
    +        w = attributes.width - p * 2 - b * 2;
    +        h = attributes.height - p * 2 - b * 2;
    +        return this.sprite.createInputtextElement('', multiline, w, h);
    +      };
    +
    +      InputText.prototype._handleChange = function() {
    +        var newdata;
    +        if (!this.replicator) {
    +          return;
    +        }
    +        newdata = this.text;
    +        if (typeof this.data === 'number') {
    +          if (parseFloat(newdata) + '' === newdata) {
    +            newdata = parseFloat(newdata);
    +          }
    +        } else if (typeof this.data === 'boolean') {
    +          if (newdata === 'true') {
    +            newdata = true;
    +          } else if (newdata === 'false') {
    +            newdata = false;
    +          }
    +        }
    +        return this.replicator.updateData(newdata);
    +      };
    +
    +      InputText.prototype.set_data = function(d) {
    +        return this.setAttribute('text', d, true);
    +      };
    +
    +      InputText.prototype.set_text = function(text) {
    +        return this.sprite.value(text);
    +      };
    +
    +      return InputText;
    +
    +    })(View);
    +
    +    /**
    +     * @class dr.text {UI Components}
    +     * @extends dr.view
    +     * Text component that supports single and multi-line text.
    +     *
    +     * The text component can be fixed size, or sized to fit the size of the text.
    +     *
    +     *     @example
    +     *     <text text="Hello World!" bgcolor="red"></text>
    +     *
    +     * Here is a multiline text
    +     *
    +     *     @example
    +     *     <text multiline="true" text="Lorem ipsum dolor sit amet, consectetur adipiscing elit"></text>
    +     *
    +     * You might want to set the value of a text element based on the value of other attributes via a constraint. Here we set the value by concatenating three attributes together.
    +     *
    +     *     @example
    +     *     <attribute name="firstName" type="string" value="Lumpy"></attribute>
    +     *     <attribute name="middleName" type="string" value="Space"></attribute>
    +     *     <attribute name="lastName" type="string" value="Princess"></attribute>
    +     *
    +     *     <text text="${this.parent.firstName + ' ' + this.parent.middleName + ' ' + this.parent.lastName}" color="hotpink"></text>
    +     *
    +     * Constraints can contain more complex JavaScript code
    +     *
    +     *     @example
    +     *     <attribute name="firstName" type="string" value="Lumpy"></attribute>
    +     *     <attribute name="middleName" type="string" value="Space"></attribute>
    +     *     <attribute name="lastName" type="string" value="Princess"></attribute>
    +     *
    +     *     <text text="${this.parent.firstName.charAt(0) + ' ' + this.parent.middleName.charAt(0) + ' ' + this.parent.lastName.charAt(0)}" color="hotpink"></text>
    +     *
    +     * We can simplify this by using a method to return the concatenation and constraining the text value to the return value of the method
    +     *
    +     *     @example
    +     *     <attribute name="firstName" type="string" value="Lumpy"></attribute>
    +     *     <attribute name="middleName" type="string" value="Space"></attribute>
    +     *     <attribute name="lastName" type="string" value="Princess"></attribute>
    +     *
    +     *     <method name="initials">
    +     *       return this.firstName.charAt(0) + ' ' + this.middleName.charAt(0) + ' ' + this.lastName.charAt(0);
    +     *     </method>
    +     *
    +     *     <text text="${this.parent.initials()}" color="hotpink"></text>
    +     *
    +     * You can override the format method to provide custom formatting for text elements. Here is a subclass of text, timetext, with the format method overridden to convert the text given in seconds into a formatted string.
    +     *
    +     *     @example
    +     *     <class name="timetext" extends="text">
    +     *       <method name="format" args="seconds">
    +     *         var minutes = Math.floor(seconds / 60);
    +     *         var seconds = Math.floor(seconds) - minutes * 60;
    +     *         if (seconds < 10) {
    +     *           seconds = '0' + seconds;
    +     *         }
    +     *         return minutes + ':' + seconds;
    +     *       </method>
    +     *     </class>
    +     *
    +     *     <timetext text="240"></timetext>
    +     *
    +     */
    +    Text = (function(_super) {
    +      __extends(Text, _super);
    +
    +
    +      /**
    +       * @attribute {Boolean} [multiline=false]
    +       * Set to true to show multi-line text.
    +       */
    +
    +
    +      /**
    +       * @attribute {Boolean} [resize=true]
    +       * By default, the text component is sized to the size of the text.
    +       * By setting resize=false, the component size is not modified
    +       * when the text changes.
    +       */
    +
    +
    +      /**
    +       * @attribute {String} [text=""]
    +       * Component text.
    +       */
    +
    +      function Text(el, attributes) {
    +        var defaults, key, type, types, _ref;
    +        if (attributes == null) {
    +          attributes = {};
    +        }
    +        types = {
    +          resize: 'boolean',
    +          multiline: 'boolean'
    +        };
    +        defaults = {
    +          resize: true,
    +          multiline: false
    +        };
    +        _ref = attributes.$types;
    +        for (key in _ref) {
    +          type = _ref[key];
    +          types[key] = type;
    +        }
    +        attributes.$types = types;
    +        this._setDefaults(attributes, defaults);
    +        if ('width' in attributes) {
    +          this._initialwidth = attributes.width;
    +        }
    +        this.listenTo(this, 'multiline', this.updateSize);
    +        this.listenTo(this, 'resize', this.updateSize);
    +        this.listenTo(this, 'init', this.updateSize);
    +        Text.__super__.constructor.apply(this, arguments);
    +      }
    +
    +      Text.prototype._createSprite = function(el, attributes) {
    +        Text.__super__._createSprite.apply(this, arguments);
    +        attributes.text || (attributes.text = this.sprite.getText(true));
    +        return this.sprite.createTextElement();
    +      };
    +
    +
    +      /**
    +       * @method format
    +       * Format the text to be displayed. The default behavior is to
    +       * return the text intact. Override to change formatting.
    +       * @param {String} str The current value of the text component.
    +       * @return {String} The formated string to display in the component.
    +       *
    +       */
    +
    +      Text.prototype.format = function(str) {
    +        return str;
    +      };
    +
    +      Text.prototype.updateSize = function() {
    +        var parent, parents, size, width, _i, _j, _len, _len1;
    +        if (!this.inited) {
    +          return;
    +        }
    +        width = this.multiline ? this._initialwidth : this.width;
    +        size = this.sprite.measureTextSize(this.multiline, width, this.resize);
    +        if (size.width === 0 && size.height === 0) {
    +          parents = this._findParents('visible', false);
    +          for (_i = 0, _len = parents.length; _i < _len; _i++) {
    +            parent = parents[_i];
    +            parent.sprite.el.style.display = '';
    +          }
    +          size = this.sprite.measureTextSize(this.multiline, width, this.resize);
    +          for (_j = 0, _len1 = parents.length; _j < _len1; _j++) {
    +            parent = parents[_j];
    +            parent.sprite.el.style.display = 'none';
    +          }
    +        }
    +        this.setAttribute('width', size.width, true);
    +        return this.setAttribute('height', size.height, true);
    +      };
    +
    +      Text.prototype.set_data = function(d) {
    +        return this.setAttribute('text', d, true);
    +      };
    +
    +      Text.prototype.set_text = function(text) {
    +        if (text !== this.text) {
    +          this.sprite.setText(this.format(text));
    +          return this.updateSize();
    +        }
    +      };
    +
    +      return Text;
    +
    +    })(View);
    +    warnings = [];
    +    showWarnings = function(data) {
    +      var out, pre;
    +      warnings = warnings.concat(data);
    +      out = data.join('\n');
    +      pre = document.createElement('pre');
    +      pre.setAttribute('class', 'warnings');
    +      pre.textContent = out;
    +      document.body.insertBefore(pre, document.body.firstChild);
    +      return console.error(out);
    +    };
    +    hiddenAttributes = {
    +      text: true,
    +      $tagname: true,
    +      data: true,
    +      replicator: true,
    +      "class": true,
    +      clip: true,
    +      clickable: true,
    +      scrollable: true,
    +      $textcontent: true,
    +      resize: true,
    +      multiline: true,
    +      ignorelayout: true
    +    };
    +    dom = (function() {
    +      var builtinTags, checkRequiredAttributes, exports, findAutoIncludes, flattenattributes, getChildren, htmlDecode, initAllElements, initElement, initFromElement, processSpecialTags, requiredAttributes, sendInit, specialtags, writeCSS;
    +      getChildren = function(el) {
    +        var child, _i, _len, _ref, _ref1, _results;
    +        _ref = el.childNodes;
    +        _results = [];
    +        for (_i = 0, _len = _ref.length; _i < _len; _i++) {
    +          child = _ref[_i];
    +          if (child.nodeType === 1 && (_ref1 = child.localName, __indexOf.call(specialtags, _ref1) >= 0)) {
    +            _results.push(child);
    +          }
    +        }
    +        return _results;
    +      };
    +      flattenattributes = function(namednodemap) {
    +        var attributes, i, _i, _len;
    +        attributes = {};
    +        for (_i = 0, _len = namednodemap.length; _i < _len; _i++) {
    +          i = namednodemap[_i];
    +          attributes[i.name] = i.value;
    +        }
    +        return attributes;
    +      };
    +      sendInit = function() {
    +        var event;
    +        event = document.createEvent('Event');
    +        event.initEvent('dreeminit', true, true);
    +        return window.dispatchEvent(event);
    +      };
    +      initFromElement = function(el) {
    +        el.style.display = 'none';
    +        return findAutoIncludes(el, function() {
    +          el.style.display = null;
    +          initElement(el);
    +          _initConstraints();
    +          window.DREEM_INITED = true;
    +          return sendInit();
    +        });
    +      };
    +      findAutoIncludes = function(parentel, finalcallback) {
    +        var fileloaded, filereloader, filerequests, findIncludeURLs, findMissingClasses, includedScripts, inlineclasses, jqel, loadInclude, loadIncludes, loadScript, loadqueue, scriptloading, validator;
    +        jqel = $(parentel);
    +        includedScripts = {};
    +        loadqueue = [];
    +        scriptloading = false;
    +        loadScript = function(url, cb, error) {
    +          var appendScript, appendcallback;
    +          if (url in includedScripts) {
    +            return;
    +          }
    +          includedScripts[url] = true;
    +          if (scriptloading) {
    +            loadqueue.push(url, error);
    +            return url;
    +          }
    +          appendScript = function(url, cb, error) {
    +            var script;
    +            if (error == null) {
    +              error = 'failed to load scriptinclude ' + url;
    +            }
    +            scriptloading = url;
    +            script = document.createElement('script');
    +            script.type = 'text/javascript';
    +            $('head').append(script);
    +            script.onload = cb;
    +            script.onerror = function(err) {
    +              console.error(error, err);
    +              return cb();
    +            };
    +            return script.src = url;
    +          };
    +          appendcallback = function() {
    +            scriptloading = false;
    +            if (loadqueue.length === 0) {
    +              return cb();
    +            } else {
    +              return appendScript(loadqueue.shift(), appendcallback, loadqueue.shift());
    +            }
    +          };
    +          return appendScript(url, appendcallback, error);
    +        };
    +        inlineclasses = {};
    +        filerequests = [];
    +        fileloaded = {};
    +        loadInclude = function(url, el) {
    +          var prom;
    +          if (url in fileloaded) {
    +            return;
    +          }
    +          fileloaded[url] = el;
    +          prom = $.get(url);
    +          prom.url = url;
    +          prom.el = el;
    +          return filerequests.push(prom);
    +        };
    +        findMissingClasses = function(names) {
    +          var el, name, out, _i, _len, _ref, _ref1, _ref2;
    +          if (names == null) {
    +            names = {};
    +          }
    +          _ref = jqel.find('*');
    +          for (_i = 0, _len = _ref.length; _i < _len; _i++) {
    +            el = _ref[_i];
    +            name = el.localName;
    +            if (name === 'class') {
    +              if (el.attributes["extends"]) {
    +                names[el.attributes["extends"].value] = el;
    +              }
    +              inlineclasses[(_ref1 = el.attributes.name) != null ? _ref1.value : void 0] = true;
    +            } else if (name === 'replicator') {
    +              names[name] = el;
    +              names[el.attributes.classname.value] = el;
    +            } else {
    +              if (_ref2 = el.parentNode.localName, __indexOf.call(specialtags, _ref2) < 0) {
    +                names[name] = el;
    +              }
    +            }
    +          }
    +          out = {};
    +          for (name in names) {
    +            el = names[name];
    +            if (!(name in dr || name in fileloaded || __indexOf.call(specialtags, name) >= 0 || name in inlineclasses || __indexOf.call(builtinTags, name) >= 0)) {
    +              out[name] = el;
    +            }
    +          }
    +          return out;
    +        };
    +        findIncludeURLs = function(urls) {
    +          var el, url, _i, _len, _ref;
    +          if (urls == null) {
    +            urls = {};
    +          }
    +          _ref = jqel.find('include');
    +          for (_i = 0, _len = _ref.length; _i < _len; _i++) {
    +            el = _ref[_i];
    +            url = el.attributes.href.value;
    +            el.parentNode.removeChild(el);
    +            urls[url] = el;
    +          }
    +          return urls;
    +        };
    +        loadIncludes = function(callback) {
    +          var el, url, _ref;
    +          _ref = findIncludeURLs();
    +          for (url in _ref) {
    +            el = _ref[url];
    +            loadInclude(url, el);
    +          }
    +          return $.when.apply($, filerequests).done(function() {
    +            var args, html, includeRE, name, xhr, _i, _len, _ref1;
    +            args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
    +            if (filerequests.length === 1) {
    +              args = [args];
    +            }
    +            filerequests = [];
    +            includeRE = /<[\/]*library>/gi;
    +            for (_i = 0, _len = args.length; _i < _len; _i++) {
    +              xhr = args[_i];
    +              html = xhr[0].replace(includeRE, '');
    +              jqel.prepend(html);
    +            }
    +            _ref1 = findMissingClasses();
    +            for (name in _ref1) {
    +              el = _ref1[name];
    +              fileloaded[name] = true;
    +              loadInclude("/classes/" + name + ".dre", el);
    +            }
    +            return $.when.apply($, filerequests).done(function() {
    +              var args, includes, oneurl, _j, _len1;
    +              args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
    +              if (filerequests.length === 1) {
    +                args = [args];
    +              }
    +              filerequests = [];
    +              for (_j = 0, _len1 = args.length; _j < _len1; _j++) {
    +                xhr = args[_j];
    +                jqel.prepend(xhr[0]);
    +                if (debug) {
    +                  jqel.contents().each(function() {
    +                    if (this.nodeType === 8) {
    +                      return $(this).remove();
    +                    }
    +                  });
    +                }
    +              }
    +              includes = findMissingClasses(findIncludeURLs());
    +              if (Object.keys(includes).length > 0) {
    +                loadIncludes(callback);
    +                return;
    +              }
    +              oneurl = '/lib/one_base.js';
    +              return $.ajax({
    +                dataType: "script",
    +                cache: true,
    +                url: oneurl
    +              }).done(function() {
    +                var scriptloaded, _k, _l, _len2, _len3, _ref2, _ref3, _ref4;
    +                ONE.base_.call(Eventable.prototype);
    +                Eventable.prototype.enumfalse(Eventable.prototype.keys());
    +                Node.prototype.enumfalse(Node.prototype.keys());
    +                View.prototype.enumfalse(View.prototype.keys());
    +                Layout.prototype.enumfalse(Layout.prototype.keys());
    +                scriptloaded = false;
    +                _ref2 = jqel.find('[scriptincludes]');
    +                for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) {
    +                  el = _ref2[_k];
    +                  _ref3 = el.attributes.scriptincludes.value.split(',');
    +                  for (_l = 0, _len3 = _ref3.length; _l < _len3; _l++) {
    +                    url = _ref3[_l];
    +                    scriptloaded = loadScript(url.trim(), callback, (_ref4 = el.attributes.scriptincludeserror) != null ? _ref4.value.toString() : void 0);
    +                  }
    +                }
    +                if (!scriptloaded) {
    +                  return callback();
    +                }
    +              }).fail(function() {
    +                return console.warn("failed to load " + oneurl);
    +              });
    +            }).fail(function() {
    +              var args, _j, _len1;
    +              args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
    +              if (args.length === 1) {
    +                args = [args];
    +              }
    +              for (_j = 0, _len1 = args.length; _j < _len1; _j++) {
    +                xhr = args[_j];
    +                showWarnings(["failed to load " + xhr.url + " for element " + xhr.el.outerHTML]);
    +              }
    +            });
    +          }).fail(function() {
    +            var args, xhr, _i, _len;
    +            args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
    +            if (args.length === 1) {
    +              args = [args];
    +            }
    +            for (_i = 0, _len = args.length; _i < _len; _i++) {
    +              xhr = args[_i];
    +              showWarnings(["failed to load " + xhr.url + " for element " + xhr.el.outerHTML]);
    +            }
    +          });
    +        };
    +        filereloader = function() {
    +          return $.ajax({
    +            url: '/watchfile/',
    +            datatype: 'text',
    +            data: {
    +              url: window.location.pathname
    +            },
    +            success: function(data) {
    +              if (data === window.location.pathname) {
    +                return window.location.reload();
    +              }
    +            }
    +          }).done(function(data) {
    +            return filereloader();
    +          });
    +        };
    +        validator = function() {
    +          return $.ajax({
    +            url: '/validate/',
    +            data: {
    +              url: window.location.pathname
    +            },
    +            success: function(data) {
    +              if (data.length) {
    +                showWarnings(data);
    +              }
    +              return filereloader();
    +            },
    +            error: function(err) {
    +              return console.warn('Validation requires the Teem server');
    +            }
    +          }).always(finalcallback);
    +        };
    +        return loadIncludes(test ? finalcallback : validator);
    +      };
    +      specialtags = ['handler', 'method', 'attribute', 'setter', 'include'];
    +      builtinTags = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'command', 'datalist', 'dd', 'del', 'details', 'dfn', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'image', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'map', 'mark', 'menu', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr'];
    +      requiredAttributes = {
    +        "class": {
    +          "name": 1
    +        },
    +        "method": {
    +          "name": 1
    +        },
    +        "setter": {
    +          "name": 1
    +        },
    +        "handler": {
    +          "event": 1
    +        },
    +        "attribute": {
    +          "name": 1,
    +          "type": 1,
    +          "value": 1
    +        },
    +        "dataset": {
    +          "name": 1
    +        },
    +        "replicator": {
    +          "classname": 1
    +        }
    +      };
    +      checkRequiredAttributes = function(tagname, attributes, tag, parenttag) {
    +        var attrname, error;
    +        if (tagname in requiredAttributes) {
    +          for (attrname in requiredAttributes[tagname]) {
    +            if (!(attrname in attributes)) {
    +              error = "" + tagname + "." + attrname + " must be defined on " + tag.outerHTML;
    +              if (parenttag) {
    +                error = error + (" inside " + parenttag.outerHTML);
    +              }
    +              showWarnings([error]);
    +            }
    +          }
    +        }
    +        return error;
    +      };
    +      initElement = function(el, parent) {
    +        var attr, attributes, checkChildren, child, children, event, eventname, isClass, isState, li, skiponinit, tagname, _i, _j, _len, _len1;
    +        if (el.$init) {
    +          return;
    +        }
    +        el.$init = true;
    +        tagname = el.localName;
    +        if (__indexOf.call(specialtags, tagname) >= 0) {
    +          return;
    +        }
    +        if (!tagname in dr) {
    +          if (__indexOf.call(builtinTags, tagname) < 0) {
    +            console.warn('could not find class for tag', tagname, el);
    +          }
    +          return;
    +        } else if (__indexOf.call(builtinTags, tagname) >= 0) {
    +          if (tagname !== 'input') {
    +            console.warn('refusing to create a class that would overwrite the builtin tag', tagname);
    +          }
    +          return;
    +        }
    +        attributes = flattenattributes(el.attributes);
    +        checkRequiredAttributes(tagname, attributes, el);
    +        attributes.$tagname = tagname;
    +        for (_i = 0, _len = mouseEvents.length; _i < _len; _i++) {
    +          event = mouseEvents[_i];
    +          eventname = 'on' + event;
    +          if (eventname in attributes) {
    +            if (attributes.clickable !== false) {
    +              attributes.clickable = true;
    +            }
    +            el.removeAttribute(eventname);
    +          }
    +        }
    +        for (attr in attributes) {
    +          if (attr.indexOf('on') === 0) {
    +            el.removeAttribute(attr);
    +          }
    +        }
    +        if (parent == null) {
    +          parent = el.parentNode;
    +        }
    +        if (parent != null) {
    +          attributes.parent = parent;
    +        }
    +        li = tagname.lastIndexOf('state');
    +        isState = li > -1 && li === tagname.length - 5;
    +        isClass = tagname === 'class';
    +        if (!(isClass || isState)) {
    +          dom.processSpecialTags(el, attributes, attributes.type);
    +        }
    +        children = (function() {
    +          var _j, _len1, _ref, _results;
    +          _ref = el.childNodes;
    +          _results = [];
    +          for (_j = 0, _len1 = _ref.length; _j < _len1; _j++) {
    +            child = _ref[_j];
    +            if (child.nodeType === 1) {
    +              _results.push(child);
    +            }
    +          }
    +          return _results;
    +        })();
    +        attributes.$skiponinit = skiponinit = children.length > 0;
    +        if (typeof dr[tagname] === 'function') {
    +          parent = new dr[tagname](el, attributes);
    +        } else {
    +          showWarnings(["Unrecognized class " + tagname + " " + el.outerHTML]);
    +          return;
    +        }
    +        if (!(children.length > 0)) {
    +          return;
    +        }
    +        if (!(isClass || isState)) {
    +          children = (function() {
    +            var _j, _len1, _ref, _results;
    +            _ref = el.childNodes;
    +            _results = [];
    +            for (_j = 0, _len1 = _ref.length; _j < _len1; _j++) {
    +              child = _ref[_j];
    +              if (child.nodeType === 1) {
    +                _results.push(child);
    +              }
    +            }
    +            return _results;
    +          })();
    +          for (_j = 0, _len1 = children.length; _j < _len1; _j++) {
    +            child = children[_j];
    +            initElement(child, parent);
    +          }
    +          if (!parent.inited) {
    +            checkChildren = function() {
    +              var _k, _len2;
    +              for (_k = 0, _len2 = children.length; _k < _len2; _k++) {
    +                child = children[_k];
    +                if (!child.inited && child.localName === !'class') {
    +                  setTimeout(checkChildren, 0);
    +                  return;
    +                }
    +              }
    +              parent.inited = true;
    +              parent.sendEvent('init', parent);
    +            };
    +            setTimeout(checkChildren, 0);
    +          }
    +        }
    +      };
    +      writeCSS = function() {
    +        var style;
    +        style = document.createElement('style');
    +        style.type = 'text/css';
    +        style.innerHTML = '.sprite{ position: absolute; pointer-events: none; padding: 0; margin: 0; box-sizing:border-box;} .sprite-text{ width: auto; height; auto; white-space: nowrap;  padding: 0; margin: 0;} .sprite-inputtext{border: none; outline: none; background-color:transparent; resize:none;} .hidden{ display: none; } .noselect{ -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;} method { display: none; } handler { display: none; } setter { display: none; } class { display:none } node { display:none } dataset { display:none } .warnings {font-size: 14px; background-color: pink; margin: 0;}';
    +        return document.getElementsByTagName('head')[0].appendChild(style);
    +      };
    +      initAllElements = function(selector) {
    +        var el, _i, _len;
    +        if (selector == null) {
    +          selector = $('view').not('view view');
    +        }
    +        for (_i = 0, _len = selector.length; _i < _len; _i++) {
    +          el = selector[_i];
    +          initFromElement(el);
    +        }
    +      };
    +      htmlDecode = function(input) {
    +        var child, e, out, _i, _len, _ref;
    +        e = document.createElement('div');
    +        e.innerHTML = input;
    +        out = '';
    +        _ref = e.childNodes;
    +        for (_i = 0, _len = _ref.length; _i < _len; _i++) {
    +          child = _ref[_i];
    +          if ((child.nodeValue != null) && (child.nodeType === 3 || child.nodeType === 8)) {
    +            out += child.nodeValue;
    +          } else {
    +            return;
    +          }
    +        }
    +        return out;
    +      };
    +      processSpecialTags = function(el, classattributes, defaulttype) {
    +        var args, attributes, child, children, handler, name, script, tagname, type, _base, _base1, _i, _len, _name, _ref, _ref1;
    +        if (classattributes.$types == null) {
    +          classattributes.$types = {};
    +        }
    +        if (classattributes.$methods == null) {
    +          classattributes.$methods = {};
    +        }
    +        if (classattributes.$handlers == null) {
    +          classattributes.$handlers = [];
    +        }
    +        children = getChildren(el);
    +        for (_i = 0, _len = children.length; _i < _len; _i++) {
    +          child = children[_i];
    +          attributes = flattenattributes(child.attributes);
    +          tagname = child.localName;
    +          args = ((_ref = attributes.args) != null ? _ref : '').split();
    +          script = htmlDecode(child.innerHTML);
    +          if (script == null) {
    +            console.warn('Invalid tag', name, child);
    +          }
    +          type = (_ref1 = attributes.type) != null ? _ref1 : defaulttype;
    +          name = attributes.name;
    +          checkRequiredAttributes(tagname, attributes, child, el);
    +          switch (tagname) {
    +            case 'handler':
    +              handler = {
    +                name: name,
    +                ev: attributes.event,
    +                script: compiler.transform(script, type),
    +                args: args,
    +                reference: attributes.reference,
    +                method: attributes.method
    +              };
    +              classattributes.$handlers.push(handler);
    +              break;
    +            case 'method':
    +              if ((_base = classattributes.$methods)[name] == null) {
    +                _base[name] = [];
    +              }
    +              classattributes.$methods[name].push({
    +                method: compiler.transform(script, type),
    +                args: args,
    +                allocation: attributes.allocation,
    +                invokeSuper: attributes.invokesuper
    +              });
    +              break;
    +            case 'setter':
    +              name = name.toLowerCase();
    +              if ((_base1 = classattributes.$methods)[_name = 'set_' + name] == null) {
    +                _base1[_name] = [];
    +              }
    +              classattributes.$methods['set_' + name].push({
    +                method: compiler.transform(script, type),
    +                args: args,
    +                allocation: attributes.allocation,
    +                invokeSuper: attributes.invokesuper
    +              });
    +              break;
    +            case 'attribute':
    +              name = name.toLowerCase();
    +              classattributes[name] = attributes.value;
    +              classattributes.$types[name] = attributes.type;
    +              if ('visual' in attributes) {
    +                hiddenAttributes[name] = attributes.visual === 'false';
    +              }
    +          }
    +        }
    +        return children;
    +      };
    +      return exports = {
    +        initAllElements: initAllElements,
    +        initElement: initElement,
    +        processSpecialTags: processSpecialTags,
    +        writeCSS: writeCSS
    +      };
    +
    +      /**
    +         * @class dr.state {Core Dreem}
    +         * @extends dr.node
    +         * Allows a group of attributes, methods, handlers and instances to be removed and applied as a group.
    +         * 
    +         * Like views and nodes, states can contain methods, handlers, setters, constraints, attributes and other view, node or class instances.
    +         *
    +         * Currently, states must end with the string 'state' in their name to work properly.
    +         *
    +         *     @example
    +         *     <spacedlayout axis="y"></spacedlayout>
    +         *     <view id="square" width="100" height="100" bgcolor="lightgrey">
    +         *       <attribute name="ispink" type="boolean" value="false"></attribute>
    +         *       <state name="pinkstate" applied="${this.parent.ispink}">
    +         *         <attribute name="bgcolor" value="pink" type="string"></attribute>
    +         *       </state>
    +         *     </view>
    +         *     <labelbutton text="pinkify!">
    +         *       <handler event="onclick">
    +         *         square.setAttribute('ispink', true);
    +         *       </handler>
    +         *     </labelbutton>
    +         *
    +       */
    +    })();
    +    State = (function(_super) {
    +      __extends(State, _super);
    +
    +      function State(el, attributes) {
    +        var child, compilertype, handler, instancebody, name, oldbody, processedChildren, value, _i, _j, _len, _len1, _ref, _ref1;
    +        if (attributes == null) {
    +          attributes = {};
    +        }
    +        this.skipattributes = ['parent', 'types', 'applyattributes', 'applied', 'skipattributes', 'stateattributes'];
    +        this.stateattributes = attributes;
    +        this.applyattributes = {};
    +        this.applied = false;
    +        compilertype = attributes.type;
    +        processedChildren = dom.processSpecialTags(el, attributes, compilertype);
    +        oldbody = el.innerHTML.trim();
    +        for (_i = 0, _len = processedChildren.length; _i < _len; _i++) {
    +          child = processedChildren[_i];
    +          child.parentNode.removeChild(child);
    +        }
    +        instancebody = el.innerHTML.trim();
    +        if (oldbody) {
    +          el.innerHTML = oldbody;
    +        }
    +        this.types = (_ref = attributes.$types) != null ? _ref : {};
    +        this.setAttribute('parent', attributes.parent);
    +        this.installMethods(attributes.$methods, this.parent.$tagname, this, this.parent);
    +        if (attributes.name) {
    +          this.setAttribute('name', attributes.name);
    +          this.skipattributes.push('name');
    +        }
    +        if (attributes.applied) {
    +          this.bindAttribute('applied', attributes.applied, 'state');
    +        }
    +        _ref1 = attributes.$handlers;
    +        for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
    +          handler = _ref1[_j];
    +          if (handler.ev === 'onapplied') {
    +            this.installHandlers([handler], 'state', this);
    +            this._bindHandlers();
    +          }
    +        }
    +        for (name in attributes) {
    +          value = attributes[name];
    +          if (!(__indexOf.call(this.skipattributes, name) >= 0 || name.charAt(0) === '$')) {
    +            this.applyattributes[name] = value;
    +            this.setAttribute(name, value);
    +          }
    +        }
    +        if (this.constraints) {
    +          this._bindConstraints();
    +          this.skipattributes.push('constraints');
    +        }
    +        if (this.events) {
    +          this.skipattributes.push('events');
    +        }
    +        if (this.handlers) {
    +          this.skipattributes.push('handlers');
    +        }
    +        if (this.latehandlers) {
    +          this.skipattributes.push('latehandlers');
    +        }
    +        this.enumfalse(this.skipattributes);
    +        this.enumfalse(this.keys);
    +      }
    +
    +
    +      /**
    +       * @event onapplied 
    +       * Fired when the state has been applied or unapplied. Onapplied handlers run in the scope of the state itself, see dragstate for an example.
    +       * @param {Boolean} applied If true, the state was applied.
    +       */
    +
    +
    +      /**
    +       * @attribute {Boolean} [applied=false]
    +       * If true, the state is applied.
    +       */
    +
    +      State.prototype.set_applied = function(applied) {
    +        var name, parentname, val;
    +        if (!this.parent) {
    +          return;
    +        }
    +        if (this.applied === applied) {
    +          return;
    +        }
    +        this.applied = applied;
    +        if (applied) {
    +          this.parent.learn(this);
    +          if (this.stateattributes.$handlers) {
    +            this.parent.installHandlers(this.stateattributes.$handlers, this.parent.$tagname, this.parent);
    +            this.parent._bindHandlers();
    +            this.parent._bindHandlers(true);
    +          }
    +        } else {
    +          this.parent.forget(this);
    +          if (this.stateattributes.$handlers) {
    +            this.parent.removeHandlers(this.stateattributes.$handlers, this.parent.$tagname, this.parent);
    +          }
    +        }
    +        parentname = this.parent.$tagname;
    +        for (name in this.applyattributes) {
    +          val = this.parent[name];
    +          if (val === void 0) {
    +            continue;
    +          }
    +          this.parent[name] = !val;
    +          this.parent.bindAttribute(name, val, parentname);
    +        }
    +      };
    +
    +      State.prototype.apply = function() {
    +        if (!this.applied) {
    +          return this.setAttribute('applied', true);
    +        }
    +      };
    +
    +      State.prototype.remove = function() {
    +        if (this.applied) {
    +          return this.setAttribute('applied', false);
    +        }
    +      };
    +
    +      return State;
    +
    +    })(Node);
    +
    +    /**
    +     * @class dr.class {Core Dreem}
    +     * Allows new tags to be created. Classes only be created with the &lt;class>&lt;/class> tag syntax. 
    +     * 
    +     * Classes can extend any other class, and they extend dr.view by default. 
    +     * 
    +     * Once declared, classes invoked with the declarative syntax, e.g. &lt;classname>&lt;/classname>.
    +     * 
    +     * If a class can't be found in the document, dreem will automatically attempt to load it from the classes/* directory.
    +     *
    +     * Like views and nodes, classes can contain methods, handlers, setters, constraints, attributes and other view, node or class instances.
    +     *
    +     * Here is a class called 'tile' that extends dr.view. It sets the bgcolor, width, and height attributes. An instance of tile is created using declarative syntax.
    +     *
    +     *     @example
    +     *     <class name="tile" extends="view" bgcolor="thistle" width="100" height="100"></class>
    +     *
    +     *     <tile></tile>
    +     *
    +     * Now we'll extend the tile class with a class called 'labeltile', which contains a label inside of the box. We'll declare one each of tile and labeltile, and position them with a spacedlayout.
    +     *
    +     *     @example
    +     *     <class name="tile" extends="view" bgcolor="thistle" width="100" height="100"></class>
    +     *
    +     *     <class name="labeltile" extends="tile">
    +     *       <text text="Tile"></text>
    +     *     </class>
    +     *
    +     *     <spacedlayout></spacedlayout>
    +     *     <tile></tile>
    +     *     <labeltile></labeltile>
    +     *
    +     * Attributes that are declared inside of a class definition can be set when the instance is declared. Here we bind the label text to the value of an attribute called label.
    +     *
    +     *     @example
    +     *     <class name="tile" extends="view" bgcolor="thistle" width="100" height="100"></class>
    +     *
    +     *     <class name="labeltile" extends="tile">
    +     *       <attribute name="label" type="string" value=""></attribute>
    +     *       <text text="${this.parent.label}"></text>
    +     *     </class>
    +     *
    +     *     <spacedlayout></spacedlayout>
    +     *     <tile></tile>
    +     *     <labeltile label="The Tile"></labeltile>
    +     *
    +     */
    +    Class = (function() {
    +
    +      /**
    +       * @attribute {String} name (required)
    +       * The name of the new tag.
    +       */
    +
    +      /**
    +       * @attribute {String} [extends=view] 
    +       * The name of a class that should be extended.
    +       */
    +
    +      /**
    +       * @attribute {"js"/"coffee"} [type=js] 
    +       * The default compiler to use for methods, setters and handlers. Either 'js' or 'coffee'
    +       */
    +      var clone;
    +
    +      clone = function(obj) {
    +        var name, newobj, val;
    +        newobj = {};
    +        for (name in obj) {
    +          val = obj[name];
    +          newobj[name] = val;
    +        }
    +        return newobj;
    +      };
    +
    +      function Class(el, classattributes) {
    +        var child, compilertype, extend, haschildren, ignored, instancebody, name, oldbody, processedChildren, _i, _len;
    +        if (classattributes == null) {
    +          classattributes = {};
    +        }
    +        name = (classattributes.name ? classattributes.name.toLowerCase() : classattributes.name);
    +        extend = classattributes["extends"] != null ? classattributes["extends"] : classattributes["extends"] = 'view';
    +        compilertype = classattributes.type;
    +        for (ignored in ignoredAttributes) {
    +          delete classattributes[ignored];
    +        }
    +        processedChildren = dom.processSpecialTags(el, classattributes, compilertype);
    +        oldbody = el.innerHTML.trim();
    +        for (_i = 0, _len = processedChildren.length; _i < _len; _i++) {
    +          child = processedChildren[_i];
    +          child.parentNode.removeChild(child);
    +        }
    +        haschildren = ((function() {
    +          var _j, _len1, _ref, _results;
    +          _ref = el.childNodes;
    +          _results = [];
    +          for (_j = 0, _len1 = _ref.length; _j < _len1; _j++) {
    +            child = _ref[_j];
    +            if (child.nodeType === 1) {
    +              _results.push(child);
    +            }
    +          }
    +          return _results;
    +        })()).length > 0;
    +        instancebody = el.innerHTML.trim();
    +        if (oldbody) {
    +          el.innerHTML = oldbody;
    +        }
    +        if (name in dr) {
    +          console.warn('overwriting class', name);
    +        }
    +        dr[name] = function(instanceel, instanceattributes) {
    +          var attributes, checkChildren, children, key, parent, propname, sendInit, val, value, viewel, _j, _len1, _ref;
    +          attributes = clone(classattributes);
    +          for (key in instanceattributes) {
    +            value = instanceattributes[key];
    +            if ((key === '$methods' || key === '$types') && key in attributes) {
    +              attributes[key] = clone(attributes[key]);
    +              for (propname in value) {
    +                val = value[propname];
    +                if (key === '$methods' && attributes[key][propname]) {
    +                  attributes[key][propname] = attributes[key][propname].concat(val);
    +                } else {
    +                  attributes[key][propname] = val;
    +                }
    +              }
    +            } else if (key === '$handlers' && key in attributes) {
    +              attributes[key] = attributes[key].concat(value);
    +            } else {
    +              attributes[key] = value;
    +            }
    +          }
    +          if (!(extend in dr)) {
    +            console.warn('could not find class for tag', extend);
    +            return;
    +          }
    +          if (attributes.$tagname === 'class' || !attributes.$tagname) {
    +            attributes.$tagname = name;
    +          }
    +          attributes.$skiponinit = true;
    +          attributes.$deferbindings = haschildren;
    +          parent = new dr[extend](instanceel, attributes);
    +          viewel = (_ref = parent.sprite) != null ? _ref.el : void 0;
    +          if (instanceel) {
    +            if (!viewel) {
    +              instanceel.setAttribute('class', 'hidden');
    +            }
    +          }
    +          if (instancebody && viewel) {
    +            if (viewel.innerHTML) {
    +              viewel.innerHTML = instancebody + viewel.innerHTML;
    +            } else {
    +              viewel.innerHTML = instancebody;
    +            }
    +            children = (function() {
    +              var _j, _len1, _ref1, _results;
    +              _ref1 = viewel.childNodes;
    +              _results = [];
    +              for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
    +                child = _ref1[_j];
    +                if (child.nodeType === 1) {
    +                  _results.push(child);
    +                }
    +              }
    +              return _results;
    +            })();
    +            for (_j = 0, _len1 = children.length; _j < _len1; _j++) {
    +              child = children[_j];
    +              dom.initElement(child, parent);
    +            }
    +          }
    +          sendInit = function() {
    +            if (parent.inited) {
    +              return;
    +            }
    +            parent._bindHandlers();
    +            parent._bindHandlers(true);
    +            parent.inited = true;
    +            return parent.sendEvent('init', parent);
    +          };
    +          if (children != null ? children.length : void 0) {
    +            checkChildren = function() {
    +              var _k, _len2;
    +              for (_k = 0, _len2 = children.length; _k < _len2; _k++) {
    +                child = children[_k];
    +                if (!child.inited && child.localName === !'class') {
    +                  setTimeout(checkChildren, 0);
    +                  return;
    +                }
    +              }
    +              return sendInit();
    +            };
    +            setTimeout(checkChildren, 0);
    +          } else {
    +            sendInit();
    +          }
    +          return parent;
    +        };
    +      }
    +
    +      return Class;
    +
    +    })();
    +
    +    /**
    +     * @class dr.layout {Layout}
    +     * @extends dr.node
    +     * The base class for all layouts. 
    +     *
    +     * When a new layout is added, it will automatically create and add itself to a layouts array in its parent. In addition, an onlayouts event is fired in the parent when the layouts array changes. This allows the parent to access the layout(s) later.
    +     *
    +     * Here is a view that contains both a spacedlayout and a shrinktofit.
    +     *
    +     *     @example
    +     *     <spacedlayout axis="y"></spacedlayout>
    +     *     <view bgcolor="oldlace">
    +     *       <shrinktofit axis="both"></shrinktofit>
    +     *
    +     *       <spacedlayout></spacedlayout>
    +     *
    +     *       <view width="50" height="50" bgcolor="lightpink" opacity=".3"></view>
    +     *       <view width="50" height="50" bgcolor="plum" opacity=".3"></view>
    +     *       <view width="50" height="50" bgcolor="lightblue" opacity=".3"></view>
    +     *
    +     *       <handler event="onlayouts" args="layouts">
    +     *         output.setAttribute('text', output.text||'' + "New layout added: " + layouts[layouts.length-1].$tagname + "\n");
    +     *       </handler>
    +     *     </view>
    +     *
    +     *     <text id="output" multiline="true" width="300"></text>
    +     *
    +     *
    +     */
    +    Layout = (function(_super) {
    +      __extends(Layout, _super);
    +
    +      function Layout(el, attributes) {
    +        var subview, subviews, _base, _i, _len;
    +        if (attributes == null) {
    +          attributes = {};
    +        }
    +        this.locked = true;
    +        this.subviews = [];
    +        Layout.__super__.constructor.apply(this, arguments);
    +        this.listenTo(this.parent, 'subviewAdded', this.addSubview.bind(this));
    +        this.listenTo(this.parent, 'subviewRemoved', this.removeSubview.bind(this));
    +        this.listenTo(this.parent, 'init', this.update);
    +        if ((_base = this.parent).layouts == null) {
    +          _base.layouts = [];
    +        }
    +        this.parent.layouts.push(this);
    +        subviews = this.parent.subviews;
    +        if (subviews) {
    +          for (_i = 0, _len = subviews.length; _i < _len; _i++) {
    +            subview = subviews[_i];
    +            this.addSubview(subview);
    +          }
    +        }
    +        this.locked = false;
    +        this.update();
    +      }
    +
    +      Layout.prototype.destroy = function(skipevents) {
    +        this.locked = true;
    +        Layout.__super__.destroy.apply(this, arguments);
    +        if (!skipevents) {
    +          return this._removeFromParent('layouts');
    +        }
    +      };
    +
    +
    +      /**
    +       * Adds the provided view to the subviews array of this layout.
    +       * @param {dr.view} view The view to add to this layout.
    +       * @return {void}
    +       */
    +
    +      Layout.prototype.addSubview = function(view) {
    +        if (this.ignore(view)) {
    +          return;
    +        }
    +        this.subviews.push(view);
    +        this.startMonitoringSubview(view);
    +        if (!this.locked) {
    +          return this.update();
    +        }
    +      };
    +
    +
    +      /**
    +       * Removes the provided View from the subviews array of this Layout.
    +       * @param {dr.view} view The view to remove from this layout.
    +       * @return {number} the index of the removed subview or -1 if not removed.
    +       */
    +
    +      Layout.prototype.removeSubview = function(view) {
    +        var idx;
    +        if (this.ignore(view)) {
    +          return -1;
    +        }
    +        idx = this.subviews.indexOf(view);
    +        if (idx !== -1) {
    +          this.stopMonitoringSubview(view);
    +          this.subviews.splice(idx, 1);
    +          if (!this.locked) {
    +            this.update();
    +          }
    +        }
    +        return idx;
    +      };
    +
    +
    +      /**
    +       * Checks if a subview can be added to this Layout or not. The default 
    +       * implementation returns the 'ignorelayout' attributes of the subview.
    +       * @param {dr.view} view The view to check.
    +       * @return {boolean} True means the subview will be skipped, false otherwise.
    +       */
    +
    +      Layout.prototype.ignore = function(view) {
    +        return view.ignorelayout;
    +      };
    +
    +
    +      /**
    +       * Subclasses should implement this method to start listening to
    +       * events from the subview that should trigger the update method.
    +       * @param {dr.view} view The view to start monitoring for changes.
    +       * @return {void}
    +       */
    +
    +      Layout.prototype.startMonitoringSubview = function(view) {};
    +
    +
    +      /**
    +       * Calls startMonitoringSubview for all views. Used by layout 
    +       * implementations when a change occurs to the layout that requires
    +       * refreshing all the subview monitoring.
    +       * @return {void}
    +       */
    +
    +      Layout.prototype.startMonitoringAllSubviews = function() {
    +        var i, svs, _results;
    +        svs = this.subviews;
    +        i = svs.length;
    +        _results = [];
    +        while (i) {
    +          _results.push(this.startMonitoringSubview(svs[--i]));
    +        }
    +        return _results;
    +      };
    +
    +
    +      /**
    +       * Subclasses should implement this method to stop listening to
    +       * events from the subview that would trigger the update method. This
    +       * should remove all listeners that were setup in startMonitoringSubview.
    +       * @param {dr.view} view The view to stop monitoring for changes.
    +       * @return {void}
    +       */
    +
    +      Layout.prototype.stopMonitoringSubview = function(view) {};
    +
    +
    +      /**
    +       * Calls stopMonitoringSubview for all views. Used by Layout 
    +       * implementations when a change occurs to the layout that requires
    +       * refreshing all the subview monitoring.
    +       * @return {void}
    +       */
    +
    +      Layout.prototype.stopMonitoringAllSubviews = function() {
    +        var i, svs, _results;
    +        svs = this.subviews;
    +        i = svs.length;
    +        _results = [];
    +        while (i) {
    +          _results.push(this.stopMonitoringSubview(svs[--i]));
    +        }
    +        return _results;
    +      };
    +
    +
    +      /**
    +       * Checks if the layout is locked or not. Should be called by the
    +       * "update" method of each layout to check if it is OK to do the update.
    +       * @return {boolean} true if not locked, false otherwise.
    +       */
    +
    +      Layout.prototype.canUpdate = function() {
    +        return !this.locked && this.parent.inited;
    +      };
    +
    +
    +      /**
    +       * Updates the layout. Subclasses should call canUpdate to check lock state
    +       * before doing anything.
    +       * @return {void}
    +       */
    +
    +      Layout.prototype.update = function() {};
    +
    +      return Layout;
    +
    +    })(Node);
    +    idle = (function() {
    +      var doTick, requestAnimationFrame, tickEvents, ticking;
    +      requestAnimationFrame = (function() {
    +        return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(callback, element) {
    +          return window.setTimeout(callback, 1000 / 60);
    +        };
    +      })();
    +      ticking = false;
    +      tickEvents = [];
    +      doTick = function(time) {
    +        var key;
    +        for (key in tickEvents) {
    +          if (tickEvents[key]) {
    +            tickEvents[key](time);
    +            tickEvents[key] = null;
    +          }
    +        }
    +        return ticking = false;
    +      };
    +      return function(key, callback) {
    +        if (!ticking) {
    +          requestAnimationFrame(doTick);
    +        }
    +        ticking = true;
    +        return tickEvents[key] = callback;
    +      };
    +    })();
    +    StartEventable = (function(_super) {
    +      __extends(StartEventable, _super);
    +
    +      function StartEventable() {
    +        this.stopEvent = __bind(this.stopEvent, this);
    +        this.startEvent = __bind(this.startEvent, this);
    +        return StartEventable.__super__.constructor.apply(this, arguments);
    +      }
    +
    +      StartEventable.prototype.bind = function(ev, callback) {
    +        StartEventable.__super__.bind.apply(this, arguments);
    +        if (this.startEventTest()) {
    +          return this.startEvent();
    +        }
    +      };
    +
    +      StartEventable.prototype.unbind = function(ev, callback) {
    +        StartEventable.__super__.unbind.apply(this, arguments);
    +        if (!this.startEventTest()) {
    +          return this.stopEvent();
    +        }
    +      };
    +
    +      StartEventable.prototype.startEvent = function(event) {
    +        if (this.eventStarted) {
    +          return;
    +        }
    +        return this.eventStarted = true;
    +      };
    +
    +      StartEventable.prototype.stopEvent = function(event) {
    +        if (!this.eventStarted) {
    +          return;
    +        }
    +        return this.eventStarted = false;
    +      };
    +
    +      return StartEventable;
    +
    +    })(Eventable);
    +
    +    /**
    +     * @class dr.idle {Util}
    +     * @extends Eventable
    +     * Sends onidle events when the application is active and idle.
    +     *
    +     *     @example
    +     *     <handler event="onidle" reference="dr.idle" args="idleStatus">
    +     *       milis.setAttribute('text', idleStatus);
    +     *     </handler>
    +     *
    +     *     <spacedlayout></spacedlayout>
    +     *     <text text="Miliseconds since app started: "></text>
    +     *     <text id="milis"></text>
    +     */
    +    Idle = (function(_super) {
    +      __extends(Idle, _super);
    +
    +      function Idle() {
    +        this.sender = __bind(this.sender, this);
    +        this.startEvent = __bind(this.startEvent, this);
    +        return Idle.__super__.constructor.apply(this, arguments);
    +      }
    +
    +      Idle.prototype.startEventTest = function() {
    +        var start, _ref;
    +        start = (_ref = this.events['idle']) != null ? _ref.length : void 0;
    +        if (start) {
    +          return start;
    +        }
    +      };
    +
    +      Idle.prototype.startEvent = function(event) {
    +        Idle.__super__.startEvent.apply(this, arguments);
    +        return idle(1, this.sender);
    +      };
    +
    +      Idle.prototype.sender = function(time) {
    +
    +        /**
    +         * @event onidle 
    +         * Fired when the application is active and idle.
    +         * @param {Number} time The number of milliseconds since the application started
    +         */
    +        this.sendEvent('idle', time);
    +        return setTimeout((function(_this) {
    +          return function() {
    +            return idle(1, _this.sender);
    +          };
    +        })(this), 0);
    +      };
    +
    +      return Idle;
    +
    +    })(StartEventable);
    +    mouseEvents = ['click', 'mouseover', 'mouseout', 'mousedown', 'mouseup'];
    +
    +    /**
    +     * @class dr.mouse {Input}
    +     * @extends Eventable
    +     * Sends mouse events. Often used to listen to onmouseover/x/y events to follow the mouse position.
    +     *
    +     * Here we attach events handlers to the onx and ony events of dr.mouse, and set the x,y coordinates of a square view so it follows the mouse.
    +     *
    +     *     @example
    +     *     <view id="mousetracker" width="20" height="20" bgcolor="MediumTurquoise"></view>
    +     *
    +     *     <handler event="onx" args="x" reference="dr.mouse">
    +     *       mousetracker.setAttribute('x', x);
    +     *     </handler>
    +     *
    +     *     <handler event="ony" args="y" reference="dr.mouse">
    +     *       mousetracker.setAttribute('y', y);
    +     *     </handler>
    +     *
    +     *
    +     */
    +    Mouse = (function(_super) {
    +      var lastTouchDown, lastTouchOver, skipEvent;
    +
    +      __extends(Mouse, _super);
    +
    +
    +      /**
    +       * @event onclick 
    +       * Fired when the mouse is clicked
    +       * @param {dr.view} view The dr.view that fired the event
    +       */
    +
    +
    +      /**
    +       * @event onmouseover 
    +       * Fired when the mouse moves over a view
    +       * @param {dr.view} view The dr.view that fired the event
    +       */
    +
    +
    +      /**
    +       * @event onmouseout 
    +       * Fired when the mouse moves off a view
    +       * @param {dr.view} view The dr.view that fired the event
    +       */
    +
    +
    +      /**
    +       * @event onmousedown 
    +       * Fired when the mouse goes down on a view
    +       * @param {dr.view} view The dr.view that fired the event
    +       */
    +
    +
    +      /**
    +       * @event onmouseup 
    +       * Fired when the mouse goes up on a view
    +       * @param {dr.view} view The dr.view that fired the event
    +       */
    +
    +      function Mouse() {
    +        this.sender = __bind(this.sender, this);
    +        this.handle = __bind(this.handle, this);
    +        this.touchHandler = __bind(this.touchHandler, this);
    +        this.x = 0;
    +        this.y = 0;
    +        this.docSelector = $(document);
    +        this.docSelector.on(mouseEvents.join(' '), this.handle);
    +        this.docSelector.on("mousemove", this.handle).one("mouseout", this.stopEvent);
    +        if (capabilities.touch) {
    +          document.addEventListener('touchstart', this.touchHandler, true);
    +          document.addEventListener('touchmove', this.touchHandler, true);
    +          document.addEventListener('touchend', this.touchHandler, true);
    +          document.addEventListener('touchcancel', this.touchHandler, true);
    +        }
    +      }
    +
    +      skipEvent = function(e) {
    +        if (e.stopPropagation) {
    +          e.stopPropagation();
    +        }
    +        if (e.preventDefault) {
    +          e.preventDefault();
    +        }
    +        e.cancelBubble = true;
    +        e.returnValue = false;
    +        return false;
    +      };
    +
    +      Mouse.prototype.startEventTest = function() {
    +        var _ref, _ref1, _ref2;
    +        return ((_ref = this.events['mousemove']) != null ? _ref.length : void 0) || ((_ref1 = this.events['x']) != null ? _ref1.length : void 0) || ((_ref2 = this.events['y']) != null ? _ref2.length : void 0);
    +      };
    +
    +      Mouse.prototype.sendMouseEvent = function(type, first) {
    +        var simulatedEvent;
    +        simulatedEvent = document.createEvent('MouseEvent');
    +        simulatedEvent.initMouseEvent(type, true, true, window, 1, first.pageX, first.pageY, first.clientX, first.clientY, false, false, false, false, 0, null);
    +        first.target.dispatchEvent(simulatedEvent);
    +        if (first.target.$view) {
    +          if (!(first.target.$view instanceof InputText)) {
    +            return skipEvent(event);
    +          }
    +        }
    +      };
    +
    +      lastTouchDown = null;
    +
    +      lastTouchOver = null;
    +
    +      Mouse.prototype.touchHandler = function(event) {
    +        var first, over, touches;
    +        touches = event.changedTouches;
    +        first = touches[0];
    +        switch (event.type) {
    +          case 'touchstart':
    +            this.sendMouseEvent('mouseover', first);
    +            this.sendMouseEvent('mousedown', first);
    +            return lastTouchDown = first.target;
    +          case 'touchmove':
    +            over = document.elementFromPoint(first.pageX - window.pageXOffset, first.pageY - window.pageYOffset);
    +            if (over && over.$view) {
    +              if (lastTouchOver && lastTouchOver !== over) {
    +                this.handle({
    +                  target: lastTouchOver,
    +                  type: 'mouseout'
    +                });
    +              }
    +              lastTouchOver = over;
    +              this.handle({
    +                target: over,
    +                type: 'mouseover'
    +              });
    +            }
    +            return this.sendMouseEvent('mousemove', first);
    +          case 'touchend':
    +            this.sendMouseEvent('mouseup', first);
    +            if (lastTouchDown === first.target) {
    +              this.sendMouseEvent('click', first);
    +              return lastTouchDown = null;
    +            }
    +        }
    +      };
    +
    +      Mouse.prototype.handle = function(event) {
    +        var type, view;
    +        view = event.target.$view;
    +        type = event.type;
    +        if (view) {
    +          if (type === 'mousedown') {
    +            this._lastMouseDown = view;
    +            if (!(view instanceof InputText)) {
    +              skipEvent(event);
    +            }
    +          }
    +        }
    +        if (type === 'mouseup' && this._lastMouseDown && this._lastMouseDown !== view) {
    +          this.sendEvent('mouseup', this._lastMouseDown);
    +          this._lastMouseDown.sendEvent('mouseup', this._lastMouseDown);
    +          this.sendEvent('mouseupoutside', this._lastMouseDown);
    +          this._lastMouseDown.sendEvent('mouseupoutside', this._lastMouseDown);
    +          this._lastMouseDown = null;
    +          return;
    +        } else if (view) {
    +          view.sendEvent(type, view);
    +        }
    +
    +        /**
    +         * @property {Number} x
    +         * @readonly
    +         * The x coordinate of the mouse
    +         */
    +        this.x = event.pageX;
    +
    +        /**
    +         * @property {Number} y
    +         * @readonly
    +         * The y coordinate of the mouse
    +         */
    +        this.y = event.pageY;
    +        if (this.eventStarted && type === 'mousemove') {
    +          return idle(0, this.sender);
    +        } else {
    +          return this.sendEvent(type, view);
    +        }
    +      };
    +
    +      Mouse.prototype.sender = function() {
    +
    +        /**
    +         * @event onmousemove 
    +         * Fired when the mouse moves
    +         * @param {Object} coordinates The x and y coordinates of the mouse
    +         */
    +        this.sendEvent("mousemove", {
    +          x: this.x,
    +          y: this.y
    +        });
    +
    +        /**
    +         * @event onx 
    +         * Fired when the mouse moves in the x axis
    +         * @param {Number} x The x coordinate of the mouse
    +         */
    +        this.sendEvent('x', this.x);
    +
    +        /**
    +         * @event ony 
    +         * Fired when the mouse moves in the y axis
    +         * @param {Number} y The y coordinate of the mouse
    +         */
    +        return this.sendEvent('y', this.y);
    +      };
    +
    +      Mouse.prototype.handleDocEvent = function(event) {
    +        if (event && event.target !== document) {
    +          return;
    +        }
    +        if (this.eventStarted) {
    +          return this.docSelector.on("mousemove", this.handle).one("mouseout", this.stopEvent);
    +        } else {
    +          return this.docSelector.on("mousemove", this.handle).one("mouseout", this.startEvent);
    +        }
    +      };
    +
    +      return Mouse;
    +
    +    })(StartEventable);
    +
    +    /**
    +     * @class dr.window {Util}
    +     * @extends Eventable
    +     * Sends window resize events. Often used to dynamically reposition views as the window size changes.
    +     *
    +     *     <handler event="onwidth" reference="dr.window" args="newWidth">
    +     *       //adjust views
    +     *     </handler>
    +     *
    +     *     <handler event="onheight" reference="dr.window" args="newHeight">
    +     *       //adjust views
    +     *     </handler>
    +     *
    +     *
    +     */
    +    Window = (function(_super) {
    +      __extends(Window, _super);
    +
    +      function Window() {
    +        this.handle = __bind(this.handle, this);
    +        var handleVisibilityChange, hidden, visibilityChange;
    +        window.addEventListener('resize', this.handle, false);
    +        this.visible = true;
    +        if (document.hidden != null) {
    +          hidden = "hidden";
    +          visibilityChange = "visibilitychange";
    +        } else if (document.mozHidden != null) {
    +          hidden = "mozHidden";
    +          visibilityChange = "mozvisibilitychange";
    +        } else if (document.msHidden != null) {
    +          hidden = "msHidden";
    +          visibilityChange = "msvisibilitychange";
    +        } else if (document.webkitHidden != null) {
    +          hidden = "webkitHidden";
    +          visibilityChange = "webkitvisibilitychange";
    +        }
    +        handleVisibilityChange = (function(_this) {
    +          return function() {
    +            _this.visible = document[hidden];
    +
    +            /**
    +             * @event onvisible 
    +             * Fired when the window visibility changes
    +             * @param {Boolean} visible True if the window is currently visible
    +             */
    +            return _this.sendEvent('visible', _this.visible);
    +          };
    +        })(this);
    +        document.addEventListener(visibilityChange, handleVisibilityChange, false);
    +        this.handle();
    +      }
    +
    +      Window.prototype.startEventTest = function() {
    +        var _ref, _ref1;
    +        return ((_ref = this.events['width']) != null ? _ref.length : void 0) || ((_ref1 = this.events['height']) != null ? _ref1.length : void 0);
    +      };
    +
    +      Window.prototype.handle = function(event) {
    +        this.width = window.innerWidth;
    +
    +        /**
    +         * @event onwidth 
    +         * Fired when the window resizes
    +         * @param {Number} width The width of the window
    +         */
    +        this.sendEvent('width', this.width);
    +        this.height = window.innerHeight;
    +
    +        /**
    +         * @event onheight 
    +         * Fired when the window resizes
    +         * @param {Number} height The height of the window
    +         */
    +        return this.sendEvent('height', this.height);
    +      };
    +
    +      return Window;
    +
    +    })(StartEventable);
    +
    +    /**
    +     * @class dr.keyboard {Input}
    +     * @extends Eventable
    +     * Sends keyboard events.
    +     *
    +     * You might want to track specific keyboard events when text is being entered into an input box. In this example we listen for the enter key and display the value.
    +     *
    +     *     @example
    +     *     <spacedlayout axis="y" spacing="25"></spacedlayout>
    +     *     <inputtext id="nameinput" bgcolor="lightgrey"></inputtext>
    +     *     <text id="keycode" text="Key Code:"></text>
    +     *     <text id="entered"></text>
    +     *
    +     *     <handler event="onkeyup" args="keys" reference="dr.keyboard">
    +     *       keycode.setAttribute('text', 'Key Code: ' + keys.keyCode);
    +     *       if (keys.keyCode == 13) {
    +     *         entered.setAttribute('text', 'You entered: ' + nameinput.text);
    +     *         nameinput.setAttribute('text', '');
    +     *       }
    +     *     </handler>
    +     */
    +    Keyboard = (function(_super) {
    +      var keyboardEvents, keys;
    +
    +      __extends(Keyboard, _super);
    +
    +      keyboardEvents = ['select', 'keyup', 'keydown', 'change'];
    +
    +      keys = {
    +        shiftKey: false,
    +        altKey: false,
    +        ctrlKey: false,
    +        metaKey: false,
    +        keyCode: 0
    +      };
    +
    +      function Keyboard() {
    +        this.handle = __bind(this.handle, this);
    +        $(document).on(keyboardEvents.join(' '), this.handle);
    +      }
    +
    +      Keyboard.prototype.handle = function(event) {
    +        var key, out, target, type, value;
    +        target = event.target.$view;
    +        type = event.type;
    +        if (type !== 'select') {
    +          for (key in keys) {
    +            value = keys[key];
    +            keys[key] = event[key];
    +          }
    +        }
    +        keys.type = type;
    +        if (target) {
    +          target.sendEvent(type, keys);
    +          if (type === 'keydown' || type === 'keyup' || type === 'blur' || type === 'change') {
    +            value = event.target.value;
    +            if (target.text !== value) {
    +              target.text = value;
    +              target.sendEvent('text', value);
    +            }
    +          }
    +        }
    +        out = type === 'select' ? target : keys;
    +
    +        /**
    +         * @event onselect 
    +         * Fired when text is selected
    +         * @param {dr.view} view The view that fired the event
    +         */
    +
    +        /**
    +         * @event onchange 
    +         * Fired when an inputtext has changed
    +         * @param {dr.view} view The view that fired the event
    +         */
    +
    +        /**
    +         * @event onkeydown 
    +         * Fired when a key goes down
    +         * @param {Object} keys An object representing the keyboard state, including shiftKey, allocation, ctrlKey, metaKey, keyCode and type
    +         */
    +
    +        /**
    +         * @event onkeyup 
    +         * Fired when a key goes up
    +         * @param {Object} keys An object representing the keyboard state, including shiftKey, allocation, ctrlKey, metaKey, keyCode and type
    +         */
    +        this.sendEvent(type, out);
    +
    +        /**
    +         * @event onkeys 
    +         * Fired when a key is pressed on the keyboard
    +         * @param {Object} keys An object representing the keyboard state, including shiftKey, allocation, ctrlKey, metaKey, keyCode and type
    +         */
    +        if (type !== 'select') {
    +          return this.sendEvent('keys', out);
    +        }
    +      };
    +
    +      return Keyboard;
    +
    +    })(Eventable);
    +
    +    /**
    +     * @class dr {Core Dreem}
    +     * Holds builtin and user-created classes and public APIs.
    +     * 
    +     * All classes listed here can be invoked with the declarative syntax, e.g. &lt;node>&lt;/node> or &lt;view>&lt;/view>
    +     */
    +    return exports = {
    +      view: View,
    +      text: Text,
    +      inputtext: InputText,
    +      "class": Class,
    +      node: Node,
    +      mouse: new Mouse(),
    +      keyboard: new Keyboard(),
    +      window: new Window(),
    +      layout: Layout,
    +      idle: new Idle(),
    +      state: State,
    +
    +      /**
    +       * @method initElements
    +       * Initializes all top-level views found in the document. Called automatically when the page loads, but can be called manually as needed.
    +       */
    +      initElements: dom.initAllElements,
    +
    +      /**
    +       * @method writeCSS
    +       * Writes generic dreem-specific CSS to the document. Should only be called once.
    +       */
    +      writeCSS: dom.writeCSS
    +    };
    +
    +    /**
    +     * @class dr.method {Core Dreem}
    +     * Declares a member function in a node, view, class or other class instance. Methods can only be created with the &lt;method>&lt;/method> tag syntax.
    +     * 
    +     * If a method overrides an existing method, any existing (super) method(s) will be called first automatically.
    +     *
    +     * Let's define a method called changeColor in a view that sets the background color to pink.
    +     *
    +     *     @example
    +     *
    +     *     <view id="square" width="100" height="100">
    +     *       <method name="changeColor">
    +     *         this.setAttribute('bgcolor', 'pink');
    +     *       </method>
    +     *     </view>
    +     *
    +     *     <handler event="oninit">
    +     *       square.changeColor();
    +     *     </handler>
    +     *
    +     * Here we define the changeColor method in a class called square. We create an instance of the class and call the method on the intance.
    +     *
    +     *     @example
    +     *     <class name="square" width="100" height="100">
    +     *       <method name="changeColor">
    +     *         this.setAttribute('bgcolor', 'pink');
    +     *       </method>
    +     *     </class>
    +     *
    +     *     <square id="square1"></square>
    +     *
    +     *     <handler event="oninit">
    +     *       square1.changeColor();
    +     *     </handler>
    +     *
    +     * Now we'll subclass the square class with a bluesquare class, and override the changeColor method to color the square blue. We also add an inner square who's color is set in the changeColor method of the square superclass. Notice that the color of this square is set when the method is called on the subclass.
    +     *
    +     *     @example
    +     *     <class name="square" width="100" height="100">
    +     *       <view name="inner" width="25" height="25"></view>
    +     *       <method name="changeColor">
    +     *         this.inner.setAttribute('bgcolor', 'green');
    +     *         this.setAttribute('bgcolor', 'pink');
    +     *       </method>
    +     *     </class>
    +     *
    +     *     <class name="bluesquare" extends="square">
    +     *       <method name="changeColor">
    +     *         this.setAttribute('bgcolor', 'blue');
    +     *       </method>
    +     *     </class>
    +     *
    +     *     <spacedlayout></spacedlayout>
    +     *
    +     *     <square id="square1"></square>
    +     *     <bluesquare id="square2"></bluesquare>
    +     *
    +     *     <handler event="oninit">
    +     *       square1.changeColor();
    +     *       square2.changeColor();
    +     *     </handler>
    +     *
    +     */
    +
    +    /**
    +     * @attribute {String} name (required)
    +     * The name of the method.
    +     */
    +
    +    /**
    +     * @attribute {String[]} args
    +     * A comma separated list of method arguments.
    +     */
    +
    +    /**
    +     * @attribute {"js"/"coffee"} type 
    +     * The compiler to use for this method. Inherits from the immediate class if unspecified.
    +     */
    +
    +    /**
    +     * @class dr.setter
    +     * Declares a setter in a node, view, class or other class instance. Setters can only be created with the &lt;setter>&lt;/setter> tag syntax.
    +     *
    +     * Setters allow the default behavior of attribute changes to be changed.
    +     * 
    +     * Like dr.method, if a setter overrides an existing setter any existing (super) setter(s) will be called first automatically.
    +     * @ignore
    +     */
    +
    +    /**
    +     * @attribute {String} name (required)
    +     * The name of the method.
    +     */
    +
    +    /**
    +     * @attribute {String[]} args
    +     * A comma separated list of method arguments.
    +     */
    +
    +    /**
    +     * @attribute {"js"/"coffee"} type 
    +     * The compiler to use for this method. Inherits from the immediate class if unspecified.
    +     */
    +
    +    /**
    +     * @class dr.handler {Core Dreem}
    +     * Declares a handler in a node, view, class or other class instance. Handlers can only be created with the `<handler></handler>` tag syntax.
    +     *
    +     * Handlers are called when an event fires with new value, if available.
    +     *
    +     * Here is a simple handler that listens for an onx event in the local scope. The handler runs when x changes:
    +     *
    +     *     <handler event="onx">
    +     *       // do something now that x has changed
    +     *     </handler>
    +     *
    +     * When a handler uses the args attribute, it can recieve the value that changed:
    +     *
    +     * Sometimes it's nice to use a single method to respond to multiple events:
    +     *
    +     *     <handler event="onx" method="handlePosition"></handler>
    +     *     <handler event="ony" method="handlePosition"></handler>
    +     *     <method name="handlePosition">
    +     *       // do something now that x or y have changed
    +     *     </method>
    +     *
    +     *
    +     * When a handler uses the args attribute, it can receive the value that changed:
    +     *
    +     *     @example
    +     *
    +     *     <handler event="onwidth" args="widthValue">
    +     *        exampleLabel.setAttribute("text", "Parent view received width value of " + widthValue)
    +     *     </handler>
    +     *
    +     *     <text id="exampleLabel" x="50" y="5" text="no value yet" color="coral" outline="1px dotted coral" padding="10px"></text>
    +     *     <text x="50" y="${exampleLabel.y + exampleLabel.height + 20}" text="no value yet" color="white" bgcolor="#DDAA00" padding="10px">
    +     *       <handler event="onwidth" args="wValue">
    +     *          this.setAttribute("text", "This label received width value of " + wValue)
    +     *       </handler>
    +     *     </text>
    +     *
    +     *
    +     * It's also possible to listen for events on another scope. This handler listens for onidle events on dr.idle instead of the local scope:
    +     *
    +     *     @example
    +     *
    +     *     <handler event="onidle" args="time" reference="dr.idle">
    +     *       exampleLabel.setAttribute('text', 'received time from dr.idle.onidle: ' + Math.round(time));
    +     *     </handler>
    +     *     <text id="exampleLabel" x="50" y="5" text="no value yet" color="coral" outline="1px dotted coral" padding="10px"></text>
    +     *
    +     *
    +     */
    +
    +    /**
    +     * @attribute {String} event (required)
    +     * The name of the event to listen for, e.g. 'onwidth'.
    +     */
    +
    +    /**
    +     * @attribute {String} reference
    +     * If set, the handler will listen for an event in another scope.
    +     */
    +
    +    /**
    +     * @attribute {String} method
    +     * If set, the handler call a local method. Useful when multiple handlers need to do the same thing.
    +     */
    +
    +    /**
    +     * @attribute {String[]} args
    +     * A comma separated list of method arguments.
    +     */
    +
    +    /**
    +     * @attribute {"js"/"coffee"} type 
    +     * The compiler to use for this method. Inherits from the immediate class if unspecified.
    +     */
    +
    +    /**
    +     * @class dr.attribute {Core Dreem}
    +     * Adds a variable to a node, view, class or other class instance. Attributes can only be created with the &lt;attribute>&lt;/attribute> tag syntax.
    +     * 
    +     * Attributes allow classes to declare new variables with a specific type and default value. 
    +     *
    +     * Attributes automatically send events when their value changes.
    +     *
    +     * Here we create a new class with a custom attribute representing a person's mood, along with two instances. One instance has the default mood of 'happy', the other sets the mood attribute to 'sad'. Note there's nothing visible in this example yet:
    +     *
    +     *     <class name="person">
    +     *       <attribute name="mood" type="string" value="happy"></attribute>
    +     *     </class>
    +     *
    +     *     <person></person>
    +     *     <person mood="sad"></person>
    +     *
    +     * Let's had a handler to make our color change with the mood. Whenever the mood attribute changes, the color changes with it:
    +     *
    +     *     @example
    +     *     <class name="person" width="100" height="100">
    +     *       <attribute name="mood" type="string" value="happy"></attribute>
    +     *       <handler event="onmood" args="mood">
    +     *         var color = 'orange';
    +     *         if (mood !== 'happy') {
    +     *           color = 'blue'
    +     *         }
    +     *         this.setAttribute('bgcolor', color);
    +     *       </handler>
    +     *     </class>
    +     * 
    +     *     <spacedlayout></spacedlayout>
    +     *     <person></person>
    +     *     <person mood="sad"></person>
    +     *
    +     * You can add as many attributes as you like to a class. Here, we add a numeric attribute for size, which changes the height and width attributes via a constraint:
    +     *
    +     *     @example
    +     *     <class name="person" width="${this.size}" height="${this.size}">
    +     *       <attribute name="mood" type="string" value="happy"></attribute>
    +     *       <handler event="onmood" args="mood">
    +     *         var color = 'orange';
    +     *         if (mood !== 'happy') {
    +     *           color = 'blue'
    +     *         }
    +     *         this.setAttribute('bgcolor', color);
    +     *       </handler>
    +     *       <attribute name="size" type="number" value="20"></attribute>
    +     *     </class>
    +     * 
    +     *     <spacedlayout></spacedlayout>
    +     *     <person></person>
    +     *     <person mood="sad" size="50"></person>
    +     */
    +
    +    /**
    +     * @attribute {String} name (required)
    +     * The name of the attribute
    +     */
    +
    +    /**
    +     * @attribute {"string"/"number"/"boolean"/"json"} [type=string] (required)
    +     * The type of the attribute. Used to convert from a string to an appropriate representation of the type.
    +     */
    +
    +    /**
    +     * @attribute {String} value (required)
    +     * The initial value for the attribute
    +     */
    +
    +    /**
    +     * @attribute {Boolean} [visible=true]
    +     * Set to false if an attribute shouldn't affect a view's visual appearence
    +     */
    +  })();
    +
    +  dr.writeCSS();
    +
    +  $(window).on('load', function() {
    +    dr.initElements();
    +    return hackstyle(true);
    +  });
    +
    +}).call(this);
    +
    +//# sourceMappingURL=layout.js.map
    +
    + + diff --git a/docs/api/styles-7db15577398814fbd56ff70520f45e51.css b/docs/api/styles-7db15577398814fbd56ff70520f45e51.css new file mode 100644 index 00000000..da32aaf9 --- /dev/null +++ b/docs/api/styles-7db15577398814fbd56ff70520f45e51.css @@ -0,0 +1,129 @@ +.signature .chainable { background-color: #00aa00 } + .signature .deprecated { + background-color: #aa0000; + } + .deprecated-box { + border: 2px solid #aa0000; + } + .deprecated-box strong { + color: white; + background-color: #aa0000; + } + .deprecated-tag-box { + text-align: center; + color: #600; + background-color: #fee; + } + .deprecated-tag-box strong { + text-transform: uppercase; + border-radius: 2px; + padding: 0 3px; + } + + .enum-box { + color: #060; + background-color: #efe; + text-align: center; + } + + .signature .experimental { + color: #a00; + border: 1px dashed #a00; + background-color: #fee; + } + .experimental-box { + border: 2px dashed #ccc; + } + .experimental-box strong { + margin: 0 3px; + border: 2px dashed #a00; + color: #a00; + } + .deprecated-tag-box { + text-align: center; + color: #600; + background-color: #fee; + } + .deprecated-tag-box strong { + text-transform: uppercase; + border-radius: 2px; + padding: 0 3px; + } + + .signature .new { + color: #484848; + background-color: #F5D833; + } + +.preventable-box { text-align: center } + .signature .private { + background-color: #FD6B1B; /* orange */ + } + .private-box { + background-color: #fee; + text-align: center; + color: #600; + margin-bottom: 1em; + } + +.signature .protected { background-color: #9B86FC } + .signature .removed { + color: #aa0000; + background-color: transparent; + border: 1px solid #aa0000; + text-decoration: line-through; + } + .removed-box { + border: 2px solid #aa0000; + } + .removed-box strong { + color: #aa0000; + border: 2px solid #aa0000; + background-color: transparent; + text-decoration: line-through; + } + .deprecated-tag-box { + text-align: center; + color: #600; + background-color: #fee; + } + .deprecated-tag-box strong { + text-transform: uppercase; + border-radius: 2px; + padding: 0 3px; + } + +.signature .required { background-color: #484848 } +.signature .static { background-color: #484848 } + .template-box { + text-align: center; + background-color: #eee; + } +#search-dropdown .icon-attribute { background-image: url(member-icons/attribute.png); background-repeat: no-repeat; } +.members .members-section .icon-attribute { background-image: url(member-icons/attribute.png); background-repeat: no-repeat; } +.members .comments-section .icon-attribute { background-image: url(member-icons/attribute.png); background-repeat: no-repeat; } +.class-overview .x-toolbar.member-links .icon-attribute { background-image: url(member-icons/attribute.png); background-repeat: no-repeat; } +#search-dropdown .icon-cfg { background-image: url(member-icons/cfg.png); background-repeat: no-repeat; } +.members .members-section .icon-cfg { background-image: url(member-icons/cfg.png); background-repeat: no-repeat; } +.members .comments-section .icon-cfg { background-image: url(member-icons/cfg.png); background-repeat: no-repeat; } +.class-overview .x-toolbar.member-links .icon-cfg { background-image: url(member-icons/cfg.png); background-repeat: no-repeat; } +#search-dropdown .icon-property { background-image: url(member-icons/property.png); background-repeat: no-repeat; } +.members .members-section .icon-property { background-image: url(member-icons/property.png); background-repeat: no-repeat; } +.members .comments-section .icon-property { background-image: url(member-icons/property.png); background-repeat: no-repeat; } +.class-overview .x-toolbar.member-links .icon-property { background-image: url(member-icons/property.png); background-repeat: no-repeat; } +#search-dropdown .icon-method { background-image: url(member-icons/method.png); background-repeat: no-repeat; } +.members .members-section .icon-method { background-image: url(member-icons/method.png); background-repeat: no-repeat; } +.members .comments-section .icon-method { background-image: url(member-icons/method.png); background-repeat: no-repeat; } +.class-overview .x-toolbar.member-links .icon-method { background-image: url(member-icons/method.png); background-repeat: no-repeat; } +#search-dropdown .icon-event { background-image: url(member-icons/event.png); background-repeat: no-repeat; } +.members .members-section .icon-event { background-image: url(member-icons/event.png); background-repeat: no-repeat; } +.members .comments-section .icon-event { background-image: url(member-icons/event.png); background-repeat: no-repeat; } +.class-overview .x-toolbar.member-links .icon-event { background-image: url(member-icons/event.png); background-repeat: no-repeat; } +#search-dropdown .icon-css_var { background-image: url(member-icons/css_var.png); background-repeat: no-repeat; } +.members .members-section .icon-css_var { background-image: url(member-icons/css_var.png); background-repeat: no-repeat; } +.members .comments-section .icon-css_var { background-image: url(member-icons/css_var.png); background-repeat: no-repeat; } +.class-overview .x-toolbar.member-links .icon-css_var { background-image: url(member-icons/css_var.png); background-repeat: no-repeat; } +#search-dropdown .icon-css_mixin { background-image: url(member-icons/css_mixin.png); background-repeat: no-repeat; } +.members .members-section .icon-css_mixin { background-image: url(member-icons/css_mixin.png); background-repeat: no-repeat; } +.members .comments-section .icon-css_mixin { background-image: url(member-icons/css_mixin.png); background-repeat: no-repeat; } +.class-overview .x-toolbar.member-links .icon-css_mixin { background-image: url(member-icons/css_mixin.png); background-repeat: no-repeat; } \ No newline at end of file diff --git a/docs/categories.json b/docs/categories.json new file mode 100644 index 00000000..dc0fdc0d --- /dev/null +++ b/docs/categories.json @@ -0,0 +1 @@ +[{"name":"Dreem Classes","groups":[{"name":"All Classes","classes":["Eventable","dr","dr.*"]},{"name":"Core Dreem","classes":["Eventable","dr","dr.attribute","dr.class","dr.handler","dr.method","dr.node","dr.state"]},{"name":"UI Components","classes":["dr.ace","dr.art","dr.audioplayer","dr.bitmap","dr.buttonbase","dr.checkbutton","dr.dragstate","dr.inputtext","dr.labelbutton","dr.labeltoggle","dr.rangeslider","dr.slider","dr.text","dr.view","dr.webpage"]},{"name":"Input","classes":["dr.gyro","dr.inputtext","dr.keyboard","dr.mouse","dr.touch"]},{"name":"Layout","classes":["dr.alignlayout","dr.constantlayout","dr.layout","dr.resizelayout","dr.shrinktofit","dr.spacedlayout","dr.variablelayout","dr.wrappinglayout"]},{"name":"Util","classes":["dr.idle","dr.logger","dr.shim","dr.stats","dr.window"]},{"name":"Data","classes":["dr.dataset","dr.replicator"]}]}] \ No newline at end of file diff --git a/docs/din10/default.dre b/docs/din10/default.dre new file mode 100644 index 00000000..4ac24640 --- /dev/null +++ b/docs/din10/default.dre @@ -0,0 +1,25 @@ +/** Default example for the docviewer. */ + + + + diff --git a/docs/din10/intro_1_5.dre b/docs/din10/intro_1_5.dre new file mode 100644 index 00000000..ecbf8106 --- /dev/null +++ b/docs/din10/intro_1_5.dre @@ -0,0 +1,26 @@ +/** Example 1. Hello World example. */ + + + + + \ No newline at end of file diff --git a/docs/din10/intro_2_5.dre b/docs/din10/intro_2_5.dre new file mode 100644 index 00000000..8b5eb864 --- /dev/null +++ b/docs/din10/intro_2_5.dre @@ -0,0 +1,29 @@ +/** Example 2.Animate the size of the box. */ + + + + this.animate({width:200, height:200}); + + + + \ No newline at end of file diff --git a/docs/din10/intro_3_5.dre b/docs/din10/intro_3_5.dre new file mode 100644 index 00000000..ba3ecd0c --- /dev/null +++ b/docs/din10/intro_3_5.dre @@ -0,0 +1,46 @@ +/** Example 3. + Animate the size of the box, and keep the text centered. + The handleResize() method centers the text component within its parent view. + handleResize() is attached to the onwidth and onheight events. + */ + + + + + this.animate({width:200, height:200}); + + + + + + if (!this.inited) return; + + var x = (this.width - this.mytext.width)/2; + var y = (this.height - this.mytext.height)/2; + this.mytext.setAttribute('x', x); + this.mytext.setAttribute('y', y); + + + + + \ No newline at end of file diff --git a/docs/din10/intro_4_5.dre b/docs/din10/intro_4_5.dre new file mode 100644 index 00000000..13d17653 --- /dev/null +++ b/docs/din10/intro_4_5.dre @@ -0,0 +1,34 @@ +/** Example 4. + Using constraints, animate the size of the box, and keep the text centered. + The x and y position of the text component isconstrained to be centered + within its parent view. + */ + + + + + this.animate({width:200, height:200}); + + + + \ No newline at end of file diff --git a/docs/din10/intro_5_5.dre b/docs/din10/intro_5_5.dre new file mode 100644 index 00000000..efc00fd8 --- /dev/null +++ b/docs/din10/intro_5_5.dre @@ -0,0 +1,46 @@ +/** Example 5. + Applications can also be written with coffeescript syntax. This shows the + animation example of example 3 using coffeescript syntax. This also + demonstrates setting multiple attributes at the same time, using 'set' + instead of 'setAttribute' + */ + + + + + @animate({width:200, height:200}) + + + + + + return if !@inited + + x = (@width - @mytext.width)/2 + y = (@height - @mytext.height)/2 + @mytext.setAttributes({x:x, y:y}) + + + + + \ No newline at end of file diff --git a/docs/din10/text.dre b/docs/din10/text.dre new file mode 100644 index 00000000..0cca70b7 --- /dev/null +++ b/docs/din10/text.dre @@ -0,0 +1,26 @@ +/** Simple example that shows two text strings. */ + + + + + \ No newline at end of file diff --git a/docs/examples/ace_example.html b/docs/examples/ace_example.html new file mode 100644 index 00000000..55cc2210 --- /dev/null +++ b/docs/examples/ace_example.html @@ -0,0 +1,60 @@ + + + ace Example + + + + + + + + + + + + + + + + + + diff --git a/docs/guides.json b/docs/guides.json new file mode 100644 index 00000000..9caa03c8 --- /dev/null +++ b/docs/guides.json @@ -0,0 +1 @@ +[{"title":"Dreem Guides","items":[{"name":"constraints","url":"guides/constraints","title":"Dynamically Constraining Attributes with JavaScript Expressions","description":"This introduction to attribute constraints and explains how to get started using them in Dreem."},{"name":"subclassing","url":"guides/subclassing","title":"Subclassing in Dreem","description":"This introduction to the object model and class hierarchy of Dreem."}]}] \ No newline at end of file diff --git a/docs/guides/constraints/README.md b/docs/guides/constraints/README.md new file mode 100644 index 00000000..1646c764 --- /dev/null +++ b/docs/guides/constraints/README.md @@ -0,0 +1,90 @@ +# Dynamically Constraining Attributes with JavaScript Expressions + +[//]: # This introduction to attribute constraints and explains how to get started using them in Dreem. + +The attributes of {@link dr.node} tags (and any subclass of {@link dr.node}, such as {@link dr.view}) don't have to be declared at runtime. Instead, they can be generated dynamically in a number of ways with with JavaScript expressions. + +It is often convenient to constrain the size of {@link dr.view subviews} to fit within the bounds of their parent, so that you don't have to calculate exact sizes by hand. This is very easy to accomplish using the `${inline javascript}` syntax For example, if you needed to create two columns and ensure that they fit within a parent view, regardless of it's size, you could accomplish this by ensuring the width of each column is proportional to the number of columns that are being added (i.e. `parent.width / parent.subviews.length`): + + @example + + + + + + + + + + +This works well, but would be a bit cumbersome to continue to use as more columns are added. To DRY up your code, you can define methods in the views themselves, and then use those new methods to constrain other attributes. + + @example + + + + return this.width / this.subviews.length; + + + + return this.columnWidth() * this.subviews.indexOf(column); + + + + + + + + + + + + + +Dynamic attributes are not limited to geometery, any attribute that can be set via javascript is settable in this way. For example, You might want to set the value of a text element based on the value of other attributes. Here we set the value by concatenating three attributes together. + + @example + + + + + + + +Of course arbitrarily complex Javascript is available: + + @example + + + +And methods can be used to set attributes in any {@link dr.node} tag, not just views: + + @example + + return this.firstName.charAt(0) + ' ' + this.middleName.charAt(0) + ' ' + this.lastName.charAt(0); + + + + diff --git a/docs/guides/subclassing/README.md b/docs/guides/subclassing/README.md new file mode 100644 index 00000000..012b1125 --- /dev/null +++ b/docs/guides/subclassing/README.md @@ -0,0 +1,7 @@ +# Subclassing in Dreem + +[//]: # This introduction to the object model and class hierarchy of Dreem. + + +inheritance + diff --git a/docs/index.html b/docs/index.html new file mode 100755 index 00000000..eb110785 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,217 @@ + + + + + Dreem in 10 + + + + + + + + + + + + + + + + + + + + + + + + + + + //topview = this.parent.parent.parent; + topview = $('view').not('view view')[0].$view; + page = topview.next_page; + if (page) window.location.hash = page; + + + + + + //topview = this.parent.parent.parent; + topview = $('view').not('view view')[0].$view; + page = topview.prev_page; + if (page) window.location.hash = page; + + + + + + + + + + // This fires after inactivity. + var topview = $('view').not('view view')[0].$view; + topview.execute(); + + + + + + + + + // Parse the page name to see what buttons to show (lesson_X_Y) + var topview = $('view').not('view view')[0].$view; + this.prev_page = null; + this.next_page = null; + elements = page.split('_', 3); + if (elements.length == 3) { + page0 = parseInt(elements[1]); + page1 = parseInt(elements[2]); + + viz = false; + if (page0 > 1) { + elements[1] = page0 - 1; + this.prev_page = elements.join('_'); + viz = true; + } + topview.lesson.lesson_buttons.prev.setAttribute('visible', viz); + + viz = false; + if (page0 < page1) { + elements[1] = page0 + 1; + this.next_page = elements.join('_'); + viz = true; + } + topview.lesson.lesson_buttons.next.setAttribute('visible', viz); + } + else { + // Page does not follow format of (lesson_X_Y). Remove navigation. + topview.lesson.lesson_buttons.prev.setAttribute('visible', false); + topview.lesson.lesson_buttons.next.setAttribute('visible', false); + } + + var description = ''; + var code = contents; + var p0 = contents.indexOf('/**'); + if (p0 >= 0) { + var p1 = contents.indexOf('*/', p0); + if (p1 >= 0) { + description = contents.substr(p0+3, p1-(p0+3)); + + // The code starts at the first newline after the description + code = contents.substr(p1+2); + p0 = code.indexOf('\n'); + if (p0 >= 0) + code = code.substr(p0+1); + } + } + + this.lesson.description.setAttribute('text', description); + this.editor.setAttribute('text', code); + + + + + + var $this = this; + + // Retrieve this page, or use the default if missing + var lesson = 'din10'; + url = "/docs/" + lesson + "/" + page + ".dre"; + $.ajax({ + type: 'GET', + url: url, + success: function(data) { + $this.showLesson(data, page); + }, + error: function() { + page = 'intro_1_5.dre' + url = "/docs/" + lesson + "/" + page + ".dre"; + $.get(url, function(data) { $this.showLesson(data, page);}); + } + }); + + + + + prefix = '<view id="all" width="600" height="600" clip="true">'; + + // setTimeout added for Firefox + postfix = + ['</view>', + '<script>$(function(){setTimeout(function(){window.frames[0].dr.initElements()}, 0);});</script>'].join('\n'); + + contents = this.editor.text; + fullcontents = prefix + contents + postfix; + fullcontents = fullcontents.replace('<', '<'); + this.renderFrame.setAttribute('contents', fullcontents); + + + + + // Page to show comes from the hash attribute. If the page is missing, + // a default page is shown. + var page = $(location).attr('hash').replace('#',''); + if (!page) page = 'intro_1_5'; + + this.renderPage (page); + + + + // Show the desired page from the hash value + this.renderHash(); + + // Listen for onhashchange to change pages + var $this = this; + $(window).bind('hashchange', function() { + $this.renderHash(); + }); + + + + + + diff --git a/docs/jquery-2.1.1.min.js b/docs/jquery-2.1.1.min.js new file mode 100644 index 00000000..e5ace116 --- /dev/null +++ b/docs/jquery-2.1.1.min.js @@ -0,0 +1,4 @@ +/*! jQuery v2.1.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ +!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.1",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",N="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=N.replace("w","w#"),P="\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+M+"*\\]",Q=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|.*)\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="
    ",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="",a.querySelectorAll("[msallowclip^='']").length&&q.push("[*^$]="+M+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+Math.random()}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b) +},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthx",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h]*)\/>/gi,bb=/<([\w:]+)/,cb=/<|&#?\w+;/,db=/<(?:script|style|link)/i,eb=/checked\s*(?:[^=]|=\s*.checked.)/i,fb=/^$|\/(?:java|ecma)script/i,gb=/^true\/(.*)/,hb=/^\s*\s*$/g,ib={option:[1,""],thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]};ib.optgroup=ib.option,ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead,ib.th=ib.td;function jb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function kb(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function lb(a){var b=gb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function mb(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function nb(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=ob(h),f=ob(a),d=0,e=f.length;e>d;d++)pb(f[d],g[d]);if(b)if(c)for(f=f||ob(a),g=g||ob(h),d=0,e=f.length;e>d;d++)nb(f[d],g[d]);else nb(a,h);return g=ob(h,"script"),g.length>0&&mb(g,!i&&ob(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(cb.test(e)){f=f||k.appendChild(b.createElement("div")),g=(bb.exec(e)||["",""])[1].toLowerCase(),h=ib[g]||ib._default,f.innerHTML=h[1]+e.replace(ab,"<$1>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=ob(k.appendChild(e),"script"),i&&mb(f),c)){j=0;while(e=f[j++])fb.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(ob(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&mb(ob(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(ob(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!db.test(a)&&!ib[(bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ab,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ob(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(ob(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&eb.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(ob(c,"script"),kb),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,ob(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,lb),j=0;g>j;j++)h=f[j],fb.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(hb,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qb,rb={};function sb(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function tb(a){var b=l,c=rb[a];return c||(c=sb(a,b),"none"!==c&&c||(qb=(qb||n("${2}\n\ +snippet iframe.\n\ + ${3}\n\ +snippet iframe#\n\ + ${3}\n\ +snippet img\n\ + \"${2}\"${3}\n\ +snippet img.\n\ + \"${3}\"${4}\n\ +snippet img#\n\ + \"${3}\"${4}\n\ +snippet input\n\ + ${5}\n\ +snippet input.\n\ + ${6}\n\ +snippet input:text\n\ + ${4}\n\ +snippet input:submit\n\ + ${4}\n\ +snippet input:hidden\n\ + ${4}\n\ +snippet input:button\n\ + ${4}\n\ +snippet input:image\n\ + ${5}\n\ +snippet input:checkbox\n\ + ${3}\n\ +snippet input:radio\n\ + ${3}\n\ +snippet input:color\n\ + ${4}\n\ +snippet input:date\n\ + ${4}\n\ +snippet input:datetime\n\ + ${4}\n\ +snippet input:datetime-local\n\ + ${4}\n\ +snippet input:email\n\ + ${4}\n\ +snippet input:file\n\ + ${4}\n\ +snippet input:month\n\ + ${4}\n\ +snippet input:number\n\ + ${4}\n\ +snippet input:password\n\ + ${4}\n\ +snippet input:range\n\ + ${4}\n\ +snippet input:reset\n\ + ${4}\n\ +snippet input:search\n\ + ${4}\n\ +snippet input:time\n\ + ${4}\n\ +snippet input:url\n\ + ${4}\n\ +snippet input:week\n\ + ${4}\n\ +snippet ins\n\ + ${1}\n\ +snippet kbd\n\ + ${1}\n\ +snippet keygen\n\ + ${1}\n\ +snippet label\n\ + \n\ +snippet label:i\n\ + \n\ + ${7}\n\ +snippet label:s\n\ + \n\ + \n\ +snippet legend\n\ + ${1}\n\ +snippet legend+\n\ + ${1}\n\ +snippet li\n\ +
  • ${1}
  • \n\ +snippet li.\n\ +
  • ${2}
  • \n\ +snippet li+\n\ +
  • ${1}
  • \n\ + li+${2}\n\ +snippet lia\n\ +
  • ${1}
  • \n\ +snippet lia+\n\ +
  • ${1}
  • \n\ + lia+${3}\n\ +snippet link\n\ + ${5}\n\ +snippet link:atom\n\ + ${2}\n\ +snippet link:css\n\ + ${4}\n\ +snippet link:favicon\n\ + ${2}\n\ +snippet link:rss\n\ + ${2}\n\ +snippet link:touch\n\ + ${2}\n\ +snippet map\n\ + \n\ + ${2}\n\ + \n\ +snippet map.\n\ + \n\ + ${3}\n\ + \n\ +snippet map#\n\ + \n\ + ${3}\n\ + \n\ +snippet map+\n\ + \n\ + \"${5}\"${6}\n\ + ${7}\n\ +snippet mark\n\ + ${1}\n\ +snippet menu\n\ + \n\ + ${1}\n\ + \n\ +snippet menu:c\n\ + \n\ + ${1}\n\ + \n\ +snippet menu:t\n\ + \n\ + ${1}\n\ + \n\ +snippet meta\n\ + ${3}\n\ +snippet meta:compat\n\ + ${3}\n\ +snippet meta:refresh\n\ + ${3}\n\ +snippet meta:utf\n\ + ${3}\n\ +snippet meter\n\ + ${1}\n\ +snippet nav\n\ + \n\ +snippet nav.\n\ + \n\ +snippet nav#\n\ + \n\ +snippet noscript\n\ + \n\ +snippet object\n\ + \n\ + ${3}\n\ + ${4}\n\ +# Embed QT Movie\n\ +snippet movie\n\ + \n\ + \n\ + \n\ + \n\ + \n\ + ${6}\n\ +snippet ol\n\ +
      \n\ + ${1}\n\ +
    \n\ +snippet ol.\n\ +
      \n\ + ${2}\n\ +
    \n\ +snippet ol#\n\ +
      \n\ + ${2}\n\ +
    \n\ +snippet ol+\n\ +
      \n\ +
    1. ${1}
    2. \n\ + li+${2}\n\ +
    \n\ +snippet opt\n\ + \n\ +snippet opt+\n\ + \n\ + opt+${3}\n\ +snippet optt\n\ + \n\ +snippet optgroup\n\ + \n\ + \n\ + opt+${3}\n\ + \n\ +snippet output\n\ + ${1}\n\ +snippet p\n\ +

    ${1}

    \n\ +snippet param\n\ + ${3}\n\ +snippet pre\n\ +
    \n\
    +		${1}\n\
    +	
    \n\ +snippet progress\n\ + ${1}\n\ +snippet q\n\ + ${1}\n\ +snippet rp\n\ + ${1}\n\ +snippet rt\n\ + ${1}\n\ +snippet ruby\n\ + \n\ + ${1}\n\ + \n\ +snippet s\n\ + ${1}\n\ +snippet samp\n\ + \n\ + ${1}\n\ + \n\ +snippet script\n\ + \n\ +snippet scriptsrc\n\ + \n\ +snippet section\n\ +
    \n\ + ${1}\n\ +
    \n\ +snippet section.\n\ +
    \n\ + ${2}\n\ +
    \n\ +snippet section#\n\ +
    \n\ + ${2}\n\ +
    \n\ +snippet select\n\ + \n\ +snippet select.\n\ + \n\ +snippet select+\n\ + \n\ +snippet small\n\ + ${1}\n\ +snippet source\n\ + \n\ +snippet span\n\ + ${1}\n\ +snippet strong\n\ + ${1}\n\ +snippet style\n\ + \n\ +snippet sub\n\ + ${1}\n\ +snippet summary\n\ + \n\ + ${1}\n\ + \n\ +snippet sup\n\ + ${1}\n\ +snippet table\n\ + \n\ + ${2}\n\ +
    \n\ +snippet table.\n\ + \n\ + ${3}\n\ +
    \n\ +snippet table#\n\ + \n\ + ${3}\n\ +
    \n\ +snippet tbody\n\ + \n\ + ${1}\n\ + \n\ +snippet td\n\ + ${1}\n\ +snippet td.\n\ + ${2}\n\ +snippet td#\n\ + ${2}\n\ +snippet td+\n\ + ${1}\n\ + td+${2}\n\ +snippet textarea\n\ + ${6}\n\ +snippet tfoot\n\ + \n\ + ${1}\n\ + \n\ +snippet th\n\ + ${1}\n\ +snippet th.\n\ + ${2}\n\ +snippet th#\n\ + ${2}\n\ +snippet th+\n\ + ${1}\n\ + th+${2}\n\ +snippet thead\n\ + \n\ + ${1}\n\ + \n\ +snippet time\n\ + \n\ +snippet title\n\ + ${1:`substitute(Filename('', 'Page Title'), '^.', '\\u&', '')`}\n\ +snippet tr\n\ + \n\ + ${1}\n\ + \n\ +snippet tr+\n\ + \n\ + ${1}\n\ + td+${2}\n\ + \n\ +snippet track\n\ + ${5}${6}\n\ +snippet ul\n\ +
      \n\ + ${1}\n\ +
    \n\ +snippet ul.\n\ +
      \n\ + ${2}\n\ +
    \n\ +snippet ul#\n\ +
      \n\ + ${2}\n\ +
    \n\ +snippet ul+\n\ +
      \n\ +
    • ${1}
    • \n\ + li+${2}\n\ +
    \n\ +snippet var\n\ + ${1}\n\ +snippet video\n\ + ${8}\n\ +snippet wbr\n\ + ${1}\n\ +"; +exports.scope = "html"; + +}); diff --git a/lib/ace/src-noconflict/snippets/html_ruby.js b/lib/ace/src-noconflict/snippets/html_ruby.js new file mode 100644 index 00000000..83676f79 --- /dev/null +++ b/lib/ace/src-noconflict/snippets/html_ruby.js @@ -0,0 +1,7 @@ +ace.define("ace/snippets/html_ruby",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "html_ruby"; + +}); diff --git a/lib/ace/src-noconflict/snippets/ini.js b/lib/ace/src-noconflict/snippets/ini.js new file mode 100644 index 00000000..ad9bf52f --- /dev/null +++ b/lib/ace/src-noconflict/snippets/ini.js @@ -0,0 +1,7 @@ +ace.define("ace/snippets/ini",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "ini"; + +}); diff --git a/lib/ace/src-noconflict/snippets/io.js b/lib/ace/src-noconflict/snippets/io.js new file mode 100644 index 00000000..431002b4 --- /dev/null +++ b/lib/ace/src-noconflict/snippets/io.js @@ -0,0 +1,69 @@ +ace.define("ace/snippets/io",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippets = [ + { + "content": "assertEquals(${1:expected}, ${2:expr})", + "name": "assertEquals", + "scope": "io", + "tabTrigger": "ae" + }, + { + "content": "${1:${2:newValue} := ${3:Object} }clone do(\n\t$0\n)", + "name": "clone do", + "scope": "io", + "tabTrigger": "cdo" + }, + { + "content": "docSlot(\"${1:slotName}\", \"${2:documentation}\")", + "name": "docSlot", + "scope": "io", + "tabTrigger": "ds" + }, + { + "content": "(${1:header,}\n\t${2:body}\n)$0", + "keyEquivalent": "@(", + "name": "Indented Bracketed Line", + "scope": "io", + "tabTrigger": "(" + }, + { + "content": "\n\t$0\n", + "keyEquivalent": "\r", + "name": "Special: Return Inside Empty Parenthesis", + "scope": "io meta.empty-parenthesis.io, io meta.comma-parenthesis.io" + }, + { + "content": "${1:methodName} := method(${2:args,}\n\t$0\n)", + "name": "method", + "scope": "io", + "tabTrigger": "m" + }, + { + "content": "newSlot(\"${1:slotName}\", ${2:defaultValue}, \"${3:docString}\")$0", + "name": "newSlot", + "scope": "io", + "tabTrigger": "ns" + }, + { + "content": "${1:name} := Object clone do(\n\t$0\n)", + "name": "Object clone do", + "scope": "io", + "tabTrigger": "ocdo" + }, + { + "content": "test${1:SomeFeature} := method(\n\t$0\n)", + "name": "testMethod", + "scope": "io", + "tabTrigger": "ts" + }, + { + "content": "${1:Something}Test := ${2:UnitTest} clone do(\n\t$0\n)", + "name": "UnitTest", + "scope": "io", + "tabTrigger": "ut" + } +]; +exports.scope = "io"; + +}); diff --git a/lib/ace/src-noconflict/snippets/jack.js b/lib/ace/src-noconflict/snippets/jack.js new file mode 100644 index 00000000..eca7f293 --- /dev/null +++ b/lib/ace/src-noconflict/snippets/jack.js @@ -0,0 +1,7 @@ +ace.define("ace/snippets/jack",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "jack"; + +}); diff --git a/lib/ace/src-noconflict/snippets/jade.js b/lib/ace/src-noconflict/snippets/jade.js new file mode 100644 index 00000000..f516d0c0 --- /dev/null +++ b/lib/ace/src-noconflict/snippets/jade.js @@ -0,0 +1,7 @@ +ace.define("ace/snippets/jade",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "jade"; + +}); diff --git a/lib/ace/src-noconflict/snippets/java.js b/lib/ace/src-noconflict/snippets/java.js new file mode 100644 index 00000000..e8c57c69 --- /dev/null +++ b/lib/ace/src-noconflict/snippets/java.js @@ -0,0 +1,241 @@ +ace.define("ace/snippets/java",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText = "## Access Modifiers\n\ +snippet po\n\ + protected\n\ +snippet pu\n\ + public\n\ +snippet pr\n\ + private\n\ +##\n\ +## Annotations\n\ +snippet before\n\ + @Before\n\ + static void ${1:intercept}(${2:args}) { ${3} }\n\ +snippet mm\n\ + @ManyToMany\n\ + ${1}\n\ +snippet mo\n\ + @ManyToOne\n\ + ${1}\n\ +snippet om\n\ + @OneToMany${1:(cascade=CascadeType.ALL)}\n\ + ${2}\n\ +snippet oo\n\ + @OneToOne\n\ + ${1}\n\ +##\n\ +## Basic Java packages and import\n\ +snippet im\n\ + import\n\ +snippet j.b\n\ + java.beans.\n\ +snippet j.i\n\ + java.io.\n\ +snippet j.m\n\ + java.math.\n\ +snippet j.n\n\ + java.net.\n\ +snippet j.u\n\ + java.util.\n\ +##\n\ +## Class\n\ +snippet cl\n\ + class ${1:`Filename(\"\", \"untitled\")`} ${2}\n\ +snippet in\n\ + interface ${1:`Filename(\"\", \"untitled\")`} ${2:extends Parent}${3}\n\ +snippet tc\n\ + public class ${1:`Filename()`} extends ${2:TestCase}\n\ +##\n\ +## Class Enhancements\n\ +snippet ext\n\ + extends \n\ +snippet imp\n\ + implements\n\ +##\n\ +## Comments\n\ +snippet /*\n\ +##\n\ +## Constants\n\ +snippet co\n\ + static public final ${1:String} ${2:var} = ${3};${4}\n\ +snippet cos\n\ + static public final String ${1:var} = \"${2}\";${3}\n\ +##\n\ +## Control Statements\n\ +snippet case\n\ + case ${1}:\n\ + ${2}\n\ +snippet def\n\ + default:\n\ + ${2}\n\ +snippet el\n\ + else\n\ +snippet elif\n\ + else if (${1}) ${2}\n\ +snippet if\n\ + if (${1}) ${2}\n\ +snippet sw\n\ + switch (${1}) {\n\ + ${2}\n\ + }\n\ +##\n\ +## Create a Method\n\ +snippet m\n\ + ${1:void} ${2:method}(${3}) ${4:throws }${5}\n\ +##\n\ +## Create a Variable\n\ +snippet v\n\ + ${1:String} ${2:var}${3: = null}${4};${5}\n\ +##\n\ +## Enhancements to Methods, variables, classes, etc.\n\ +snippet ab\n\ + abstract\n\ +snippet fi\n\ + final\n\ +snippet st\n\ + static\n\ +snippet sy\n\ + synchronized\n\ +##\n\ +## Error Methods\n\ +snippet err\n\ + System.err.print(\"${1:Message}\");\n\ +snippet errf\n\ + System.err.printf(\"${1:Message}\", ${2:exception});\n\ +snippet errln\n\ + System.err.println(\"${1:Message}\");\n\ +##\n\ +## Exception Handling\n\ +snippet as\n\ + assert ${1:test} : \"${2:Failure message}\";${3}\n\ +snippet ca\n\ + catch(${1:Exception} ${2:e}) ${3}\n\ +snippet thr\n\ + throw\n\ +snippet ths\n\ + throws\n\ +snippet try\n\ + try {\n\ + ${3}\n\ + } catch(${1:Exception} ${2:e}) {\n\ + }\n\ +snippet tryf\n\ + try {\n\ + ${3}\n\ + } catch(${1:Exception} ${2:e}) {\n\ + } finally {\n\ + }\n\ +##\n\ +## Find Methods\n\ +snippet findall\n\ + List<${1:listName}> ${2:items} = ${1}.findAll();${3}\n\ +snippet findbyid\n\ + ${1:var} ${2:item} = ${1}.findById(${3});${4}\n\ +##\n\ +## Javadocs\n\ +snippet /**\n\ +snippet @au\n\ + @author `system(\"grep \\`id -un\\` /etc/passwd | cut -d \\\":\\\" -f5 | cut -d \\\",\\\" -f1\")`\n\ +snippet @br\n\ + @brief ${1:Description}\n\ +snippet @fi\n\ + @file ${1:`Filename()`}.java\n\ +snippet @pa\n\ + @param ${1:param}\n\ +snippet @re\n\ + @return ${1:param}\n\ +##\n\ +## Logger Methods\n\ +snippet debug\n\ + Logger.debug(${1:param});${2}\n\ +snippet error\n\ + Logger.error(${1:param});${2}\n\ +snippet info\n\ + Logger.info(${1:param});${2}\n\ +snippet warn\n\ + Logger.warn(${1:param});${2}\n\ +##\n\ +## Loops\n\ +snippet enfor\n\ + for (${1} : ${2}) ${3}\n\ +snippet for\n\ + for (${1}; ${2}; ${3}) ${4}\n\ +snippet wh\n\ + while (${1}) ${2}\n\ +##\n\ +## Main method\n\ +snippet main\n\ + public static void main (String[] args) {\n\ + ${1:/* code */}\n\ + }\n\ +##\n\ +## Print Methods\n\ +snippet print\n\ + System.out.print(\"${1:Message}\");\n\ +snippet printf\n\ + System.out.printf(\"${1:Message}\", ${2:args});\n\ +snippet println\n\ + System.out.println(${1});\n\ +##\n\ +## Render Methods\n\ +snippet ren\n\ + render(${1:param});${2}\n\ +snippet rena\n\ + renderArgs.put(\"${1}\", ${2});${3}\n\ +snippet renb\n\ + renderBinary(${1:param});${2}\n\ +snippet renj\n\ + renderJSON(${1:param});${2}\n\ +snippet renx\n\ + renderXml(${1:param});${2}\n\ +##\n\ +## Setter and Getter Methods\n\ +snippet set\n\ + ${1:public} void set${3:}(${2:String} ${4:}){\n\ + this.$4 = $4;\n\ + }\n\ +snippet get\n\ + ${1:public} ${2:String} get${3:}(){\n\ + return this.${4:};\n\ + }\n\ +##\n\ +## Terminate Methods or Loops\n\ +snippet re\n\ + return\n\ +snippet br\n\ + break;\n\ +##\n\ +## Test Methods\n\ +snippet t\n\ + public void test${1:Name}() throws Exception {\n\ + ${2}\n\ + }\n\ +snippet test\n\ + @Test\n\ + public void test${1:Name}() throws Exception {\n\ + ${2}\n\ + }\n\ +##\n\ +## Utils\n\ +snippet Sc\n\ + Scanner\n\ +##\n\ +## Miscellaneous\n\ +snippet action\n\ + public static void ${1:index}(${2:args}) { ${3} }\n\ +snippet rnf\n\ + notFound(${1:param});${2}\n\ +snippet rnfin\n\ + notFoundIfNull(${1:param});${2}\n\ +snippet rr\n\ + redirect(${1:param});${2}\n\ +snippet ru\n\ + unauthorized(${1:param});${2}\n\ +snippet unless\n\ + (unless=${1:param});${2}\n\ +"; +exports.scope = "java"; + +}); diff --git a/lib/ace/src-noconflict/snippets/javascript.js b/lib/ace/src-noconflict/snippets/javascript.js new file mode 100644 index 00000000..c6f1876f --- /dev/null +++ b/lib/ace/src-noconflict/snippets/javascript.js @@ -0,0 +1,189 @@ +ace.define("ace/snippets/javascript",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText = "# Prototype\n\ +snippet proto\n\ + ${1:class_name}.prototype.${2:method_name} = function(${3:first_argument}) {\n\ + ${4:// body...}\n\ + };\n\ +# Function\n\ +snippet fun\n\ + function ${1?:function_name}(${2:argument}) {\n\ + ${3:// body...}\n\ + }\n\ +# Anonymous Function\n\ +regex /((=)\\s*|(:)\\s*|(\\()|\\b)/f/(\\))?/\n\ +snippet f\n\ + function${M1?: ${1:functionName}}($2) {\n\ + ${0:$TM_SELECTED_TEXT}\n\ + }${M2?;}${M3?,}${M4?)}\n\ +# Immediate function\n\ +trigger \\(?f\\(\n\ +endTrigger \\)?\n\ +snippet f(\n\ + (function(${1}) {\n\ + ${0:${TM_SELECTED_TEXT:/* code */}}\n\ + }(${1}));\n\ +# if\n\ +snippet if\n\ + if (${1:true}) {\n\ + ${0}\n\ + }\n\ +# if ... else\n\ +snippet ife\n\ + if (${1:true}) {\n\ + ${2}\n\ + } else {\n\ + ${0}\n\ + }\n\ +# tertiary conditional\n\ +snippet ter\n\ + ${1:/* condition */} ? ${2:a} : ${3:b}\n\ +# switch\n\ +snippet switch\n\ + switch (${1:expression}) {\n\ + case '${3:case}':\n\ + ${4:// code}\n\ + break;\n\ + ${5}\n\ + default:\n\ + ${2:// code}\n\ + }\n\ +# case\n\ +snippet case\n\ + case '${1:case}':\n\ + ${2:// code}\n\ + break;\n\ + ${3}\n\ +\n\ +# while (...) {...}\n\ +snippet wh\n\ + while (${1:/* condition */}) {\n\ + ${0:/* code */}\n\ + }\n\ +# try\n\ +snippet try\n\ + try {\n\ + ${0:/* code */}\n\ + } catch (e) {}\n\ +# do...while\n\ +snippet do\n\ + do {\n\ + ${2:/* code */}\n\ + } while (${1:/* condition */});\n\ +# Object Method\n\ +snippet :f\n\ +regex /([,{[])|^\\s*/:f/\n\ + ${1:method_name}: function(${2:attribute}) {\n\ + ${0}\n\ + }${3:,}\n\ +# setTimeout function\n\ +snippet setTimeout\n\ +regex /\\b/st|timeout|setTimeo?u?t?/\n\ + setTimeout(function() {${3:$TM_SELECTED_TEXT}}, ${1:10});\n\ +# Get Elements\n\ +snippet gett\n\ + getElementsBy${1:TagName}('${2}')${3}\n\ +# Get Element\n\ +snippet get\n\ + getElementBy${1:Id}('${2}')${3}\n\ +# console.log (Firebug)\n\ +snippet cl\n\ + console.log(${1});\n\ +# return\n\ +snippet ret\n\ + return ${1:result}\n\ +# for (property in object ) { ... }\n\ +snippet fori\n\ + for (var ${1:prop} in ${2:Things}) {\n\ + ${0:$2[$1]}\n\ + }\n\ +# hasOwnProperty\n\ +snippet has\n\ + hasOwnProperty(${1})\n\ +# docstring\n\ +snippet /**\n\ +snippet @par\n\ +regex /^\\s*\\*\\s*/@(para?m?)?/\n\ + @param {${1:type}} ${2:name} ${3:description}\n\ +snippet @ret\n\ + @return {${1:type}} ${2:description}\n\ +# JSON.parse\n\ +snippet jsonp\n\ + JSON.parse(${1:jstr});\n\ +# JSON.stringify\n\ +snippet jsons\n\ + JSON.stringify(${1:object});\n\ +# self-defining function\n\ +snippet sdf\n\ + var ${1:function_name} = function(${2:argument}) {\n\ + ${3:// initial code ...}\n\ +\n\ + $1 = function($2) {\n\ + ${4:// main code}\n\ + };\n\ + }\n\ +# singleton\n\ +snippet sing\n\ + function ${1:Singleton} (${2:argument}) {\n\ + var instance;\n\ + $1 = function $1($2) {\n\ + return instance;\n\ + };\n\ + $1.prototype = this;\n\ + instance = new $1();\n\ + instance.constructor = $1;\n\ +\n\ + ${3:// code ...}\n\ +\n\ + return instance;\n\ + }\n\ +# class\n\ +snippet class\n\ +regex /^\\s*/clas{0,2}/\n\ + var ${1:class} = function(${20}) {\n\ + $40$0\n\ + };\n\ + \n\ + (function() {\n\ + ${60:this.prop = \"\"}\n\ + }).call(${1:class}.prototype);\n\ + \n\ + exports.${1:class} = ${1:class};\n\ +# \n\ +snippet for-\n\ + for (var ${1:i} = ${2:Things}.length; ${1:i}--; ) {\n\ + ${0:${2:Things}[${1:i}];}\n\ + }\n\ +# for (...) {...}\n\ +snippet for\n\ + for (var ${1:i} = 0; $1 < ${2:Things}.length; $1++) {\n\ + ${3:$2[$1]}$0\n\ + }\n\ +# for (...) {...} (Improved Native For-Loop)\n\ +snippet forr\n\ + for (var ${1:i} = ${2:Things}.length - 1; $1 >= 0; $1--) {\n\ + ${3:$2[$1]}$0\n\ + }\n\ +\n\ +\n\ +#modules\n\ +snippet def\n\ + ace.define(function(require, exports, module) {\n\ + \"use strict\";\n\ + var ${1/.*\\///} = require(\"${1}\");\n\ + \n\ + $TM_SELECTED_TEXT\n\ + });\n\ +snippet req\n\ +guard ^\\s*\n\ + var ${1/.*\\///} = require(\"${1}\");\n\ + $0\n\ +snippet requ\n\ +guard ^\\s*\n\ + var ${1/.*\\/(.)/\\u$1/} = require(\"${1}\").${1/.*\\/(.)/\\u$1/};\n\ + $0\n\ +"; +exports.scope = "javascript"; + +}); diff --git a/lib/ace/src-noconflict/snippets/json.js b/lib/ace/src-noconflict/snippets/json.js new file mode 100644 index 00000000..cc02e651 --- /dev/null +++ b/lib/ace/src-noconflict/snippets/json.js @@ -0,0 +1,7 @@ +ace.define("ace/snippets/json",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "json"; + +}); diff --git a/lib/ace/src-noconflict/snippets/jsoniq.js b/lib/ace/src-noconflict/snippets/jsoniq.js new file mode 100644 index 00000000..9c5eaf61 --- /dev/null +++ b/lib/ace/src-noconflict/snippets/jsoniq.js @@ -0,0 +1,68 @@ +ace.define("ace/snippets/jsoniq",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText = "snippet for\n\ + for $${1:item} in ${2:expr}\n\ +snippet return\n\ + return ${1:expr}\n\ +snippet import\n\ + import module namespace ${1:ns} = \"${2:http://www.example.com/}\";\n\ +snippet some\n\ + some $${1:varname} in ${2:expr} satisfies ${3:expr}\n\ +snippet every\n\ + every $${1:varname} in ${2:expr} satisfies ${3:expr}\n\ +snippet if\n\ + if(${1:true}) then ${2:expr} else ${3:true}\n\ +snippet switch\n\ + switch(${1:\"foo\"})\n\ + case ${2:\"foo\"}\n\ + return ${3:true}\n\ + default return ${4:false}\n\ +snippet try\n\ + try { ${1:expr} } catch ${2:*} { ${3:expr} }\n\ +snippet tumbling\n\ + for tumbling window $${1:varname} in ${2:expr}\n\ + start at $${3:start} when ${4:expr}\n\ + end at $${5:end} when ${6:expr}\n\ + return ${7:expr}\n\ +snippet sliding\n\ + for sliding window $${1:varname} in ${2:expr}\n\ + start at $${3:start} when ${4:expr}\n\ + end at $${5:end} when ${6:expr}\n\ + return ${7:expr}\n\ +snippet let\n\ + let $${1:varname} := ${2:expr}\n\ +snippet group\n\ + group by $${1:varname} := ${2:expr}\n\ +snippet order\n\ + order by ${1:expr} ${2:descending}\n\ +snippet stable\n\ + stable order by ${1:expr}\n\ +snippet count\n\ + count $${1:varname}\n\ +snippet ordered\n\ + ordered { ${1:expr} }\n\ +snippet unordered\n\ + unordered { ${1:expr} }\n\ +snippet treat \n\ + treat as ${1:expr}\n\ +snippet castable\n\ + castable as ${1:atomicType}\n\ +snippet cast\n\ + cast as ${1:atomicType}\n\ +snippet typeswitch\n\ + typeswitch(${1:expr})\n\ + case ${2:type} return ${3:expr}\n\ + default return ${4:expr}\n\ +snippet var\n\ + declare variable $${1:varname} := ${2:expr};\n\ +snippet fn\n\ + declare function ${1:ns}:${2:name}(){\n\ + ${3:expr}\n\ + };\n\ +snippet module\n\ + module namespace ${1:ns} = \"${2:http://www.example.com}\";\n\ +"; +exports.scope = "jsoniq"; + +}); diff --git a/lib/ace/src-noconflict/snippets/jsp.js b/lib/ace/src-noconflict/snippets/jsp.js new file mode 100644 index 00000000..6428e5be --- /dev/null +++ b/lib/ace/src-noconflict/snippets/jsp.js @@ -0,0 +1,106 @@ +ace.define("ace/snippets/jsp",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText = "snippet @page\n\ + <%@page contentType=\"text/html\" pageEncoding=\"UTF-8\"%>\n\ +snippet jstl\n\ + <%@ taglib uri=\"http://java.sun.com/jsp/jstl/core\" prefix=\"c\" %>\n\ + <%@ taglib uri=\"http://java.sun.com/jsp/jstl/functions\" prefix=\"fn\" %>\n\ +snippet jstl:c\n\ + <%@ taglib uri=\"http://java.sun.com/jsp/jstl/core\" prefix=\"c\" %>\n\ +snippet jstl:fn\n\ + <%@ taglib uri=\"http://java.sun.com/jsp/jstl/functions\" prefix=\"fn\" %>\n\ +snippet cpath\n\ + ${pageContext.request.contextPath}\n\ +snippet cout\n\ + \n\ +snippet cset\n\ + \n\ +snippet cremove\n\ + \n\ +snippet ccatch\n\ + \n\ +snippet cif\n\ + \n\ + ${2}\n\ + \n\ +snippet cchoose\n\ + \n\ + ${1}\n\ + \n\ +snippet cwhen\n\ + \n\ + ${2}\n\ + \n\ +snippet cother\n\ + \n\ + ${1}\n\ + \n\ +snippet cfore\n\ + \n\ + ${4:}\n\ + \n\ +snippet cfort\n\ + ${2:item1,item2,item3}\n\ + \n\ + ${5:}\n\ + \n\ +snippet cparam\n\ + \n\ +snippet cparam+\n\ + \n\ + cparam+${3}\n\ +snippet cimport\n\ + \n\ +snippet cimport+\n\ + \n\ + \n\ + cparam+${4}\n\ + \n\ +snippet curl\n\ + \n\ + ${3}\n\ +snippet curl+\n\ + \n\ + \n\ + cparam+${6}\n\ + \n\ + ${3}\n\ +snippet credirect\n\ + \n\ +snippet contains\n\ + ${fn:contains(${1:string}, ${2:substr})}\n\ +snippet contains:i\n\ + ${fn:containsIgnoreCase(${1:string}, ${2:substr})}\n\ +snippet endswith\n\ + ${fn:endsWith(${1:string}, ${2:suffix})}\n\ +snippet escape\n\ + ${fn:escapeXml(${1:string})}\n\ +snippet indexof\n\ + ${fn:indexOf(${1:string}, ${2:substr})}\n\ +snippet join\n\ + ${fn:join(${1:collection}, ${2:delims})}\n\ +snippet length\n\ + ${fn:length(${1:collection_or_string})}\n\ +snippet replace\n\ + ${fn:replace(${1:string}, ${2:substr}, ${3:replace})}\n\ +snippet split\n\ + ${fn:split(${1:string}, ${2:delims})}\n\ +snippet startswith\n\ + ${fn:startsWith(${1:string}, ${2:prefix})}\n\ +snippet substr\n\ + ${fn:substring(${1:string}, ${2:begin}, ${3:end})}\n\ +snippet substr:a\n\ + ${fn:substringAfter(${1:string}, ${2:substr})}\n\ +snippet substr:b\n\ + ${fn:substringBefore(${1:string}, ${2:substr})}\n\ +snippet lc\n\ + ${fn:toLowerCase(${1:string})}\n\ +snippet uc\n\ + ${fn:toUpperCase(${1:string})}\n\ +snippet trim\n\ + ${fn:trim(${1:string})}\n\ +"; +exports.scope = "jsp"; + +}); diff --git a/lib/ace/src-noconflict/snippets/jsx.js b/lib/ace/src-noconflict/snippets/jsx.js new file mode 100644 index 00000000..9f39a943 --- /dev/null +++ b/lib/ace/src-noconflict/snippets/jsx.js @@ -0,0 +1,7 @@ +ace.define("ace/snippets/jsx",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "jsx"; + +}); diff --git a/lib/ace/src-noconflict/snippets/julia.js b/lib/ace/src-noconflict/snippets/julia.js new file mode 100644 index 00000000..e81370f7 --- /dev/null +++ b/lib/ace/src-noconflict/snippets/julia.js @@ -0,0 +1,7 @@ +ace.define("ace/snippets/julia",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "julia"; + +}); diff --git a/lib/ace/src-noconflict/snippets/latex.js b/lib/ace/src-noconflict/snippets/latex.js new file mode 100644 index 00000000..e6fe7612 --- /dev/null +++ b/lib/ace/src-noconflict/snippets/latex.js @@ -0,0 +1,7 @@ +ace.define("ace/snippets/latex",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "latex"; + +}); diff --git a/lib/ace/src-noconflict/snippets/less.js b/lib/ace/src-noconflict/snippets/less.js new file mode 100644 index 00000000..148aa0cd --- /dev/null +++ b/lib/ace/src-noconflict/snippets/less.js @@ -0,0 +1,7 @@ +ace.define("ace/snippets/less",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "less"; + +}); diff --git a/lib/ace/src-noconflict/snippets/liquid.js b/lib/ace/src-noconflict/snippets/liquid.js new file mode 100644 index 00000000..c7f708dc --- /dev/null +++ b/lib/ace/src-noconflict/snippets/liquid.js @@ -0,0 +1,7 @@ +ace.define("ace/snippets/liquid",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "liquid"; + +}); diff --git a/lib/ace/src-noconflict/snippets/lisp.js b/lib/ace/src-noconflict/snippets/lisp.js new file mode 100644 index 00000000..410b807f --- /dev/null +++ b/lib/ace/src-noconflict/snippets/lisp.js @@ -0,0 +1,7 @@ +ace.define("ace/snippets/lisp",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "lisp"; + +}); diff --git a/lib/ace/src-noconflict/snippets/livescript.js b/lib/ace/src-noconflict/snippets/livescript.js new file mode 100644 index 00000000..37ea1c14 --- /dev/null +++ b/lib/ace/src-noconflict/snippets/livescript.js @@ -0,0 +1,7 @@ +ace.define("ace/snippets/livescript",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "livescript"; + +}); diff --git a/lib/ace/src-noconflict/snippets/logiql.js b/lib/ace/src-noconflict/snippets/logiql.js new file mode 100644 index 00000000..77943f3a --- /dev/null +++ b/lib/ace/src-noconflict/snippets/logiql.js @@ -0,0 +1,7 @@ +ace.define("ace/snippets/logiql",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "logiql"; + +}); diff --git a/lib/ace/src-noconflict/snippets/lsl.js b/lib/ace/src-noconflict/snippets/lsl.js new file mode 100644 index 00000000..2bd9ab0d --- /dev/null +++ b/lib/ace/src-noconflict/snippets/lsl.js @@ -0,0 +1,1073 @@ +ace.define("ace/snippets/lsl",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText = "snippet @\n\ + @${1:label};\n\ +snippet CAMERA_ACTIVE\n\ + CAMERA_ACTIVE, ${1:integer isActive}, $0\n\ +snippet CAMERA_BEHINDNESS_ANGLE\n\ + CAMERA_BEHINDNESS_ANGLE, ${1:float degrees}, $0\n\ +snippet CAMERA_BEHINDNESS_LAG\n\ + CAMERA_BEHINDNESS_LAG, ${1:float seconds}, $0\n\ +snippet CAMERA_DISTANCE\n\ + CAMERA_DISTANCE, ${1:float meters}, $0\n\ +snippet CAMERA_FOCUS\n\ + CAMERA_FOCUS, ${1:vector position}, $0\n\ +snippet CAMERA_FOCUS_LAG\n\ + CAMERA_FOCUS_LAG, ${1:float seconds}, $0\n\ +snippet CAMERA_FOCUS_LOCKED\n\ + CAMERA_FOCUS_LOCKED, ${1:integer isLocked}, $0\n\ +snippet CAMERA_FOCUS_OFFSET\n\ + CAMERA_FOCUS_OFFSET, ${1:vector meters}, $0\n\ +snippet CAMERA_FOCUS_THRESHOLD\n\ + CAMERA_FOCUS_THRESHOLD, ${1:float meters}, $0\n\ +snippet CAMERA_PITCH\n\ + CAMERA_PITCH, ${1:float degrees}, $0\n\ +snippet CAMERA_POSITION\n\ + CAMERA_POSITION, ${1:vector position}, $0\n\ +snippet CAMERA_POSITION_LAG\n\ + CAMERA_POSITION_LAG, ${1:float seconds}, $0\n\ +snippet CAMERA_POSITION_LOCKED\n\ + CAMERA_POSITION_LOCKED, ${1:integer isLocked}, $0\n\ +snippet CAMERA_POSITION_THRESHOLD\n\ + CAMERA_POSITION_THRESHOLD, ${1:float meters}, $0\n\ +snippet CHARACTER_AVOIDANCE_MODE\n\ + CHARACTER_AVOIDANCE_MODE, ${1:integer flags}, $0\n\ +snippet CHARACTER_DESIRED_SPEED\n\ + CHARACTER_DESIRED_SPEED, ${1:float speed}, $0\n\ +snippet CHARACTER_DESIRED_TURN_SPEED\n\ + CHARACTER_DESIRED_TURN_SPEED, ${1:float speed}, $0\n\ +snippet CHARACTER_LENGTH\n\ + CHARACTER_LENGTH, ${1:float length}, $0\n\ +snippet CHARACTER_MAX_TURN_RADIUS\n\ + CHARACTER_MAX_TURN_RADIUS, ${1:float radius}, $0\n\ +snippet CHARACTER_ORIENTATION\n\ + CHARACTER_ORIENTATION, ${1:integer orientation}, $0\n\ +snippet CHARACTER_RADIUS\n\ + CHARACTER_RADIUS, ${1:float radius}, $0\n\ +snippet CHARACTER_STAY_WITHIN_PARCEL\n\ + CHARACTER_STAY_WITHIN_PARCEL, ${1:boolean stay}, $0\n\ +snippet CHARACTER_TYPE\n\ + CHARACTER_TYPE, ${1:integer type}, $0\n\ +snippet HTTP_BODY_MAXLENGTH\n\ + HTTP_BODY_MAXLENGTH, ${1:integer length}, $0\n\ +snippet HTTP_CUSTOM_HEADER\n\ + HTTP_CUSTOM_HEADER, ${1:string name}, ${2:string value}, $0\n\ +snippet HTTP_METHOD\n\ + HTTP_METHOD, ${1:string method}, $0\n\ +snippet HTTP_MIMETYPE\n\ + HTTP_MIMETYPE, ${1:string mimeType}, $0\n\ +snippet HTTP_PRAGMA_NO_CACHE\n\ + HTTP_PRAGMA_NO_CACHE, ${1:integer send_header}, $0\n\ +snippet HTTP_VERBOSE_THROTTLE\n\ + HTTP_VERBOSE_THROTTLE, ${1:integer noisy}, $0\n\ +snippet HTTP_VERIFY_CERT\n\ + HTTP_VERIFY_CERT, ${1:integer verify}, $0\n\ +snippet RC_DATA_FLAGS\n\ + RC_DATA_FLAGS, ${1:integer flags}, $0\n\ +snippet RC_DETECT_PHANTOM\n\ + RC_DETECT_PHANTOM, ${1:integer dectedPhantom}, $0\n\ +snippet RC_MAX_HITS\n\ + RC_MAX_HITS, ${1:integer maxHits}, $0\n\ +snippet RC_REJECT_TYPES\n\ + RC_REJECT_TYPES, ${1:integer filterMask}, $0\n\ +snippet at_rot_target\n\ + at_rot_target(${1:integer handle}, ${2:rotation targetrot}, ${3:rotation ourrot})\n\ + {\n\ + $0\n\ + }\n\ +snippet at_target\n\ + at_target(${1:integer tnum}, ${2:vector targetpos}, ${3:vector ourpos})\n\ + {\n\ + $0\n\ + }\n\ +snippet attach\n\ + attach(${1:key id})\n\ + {\n\ + $0\n\ + }\n\ +snippet changed\n\ + changed(${1:integer change})\n\ + {\n\ + $0\n\ + }\n\ +snippet collision\n\ + collision(${1:integer index})\n\ + {\n\ + $0\n\ + }\n\ +snippet collision_end\n\ + collision_end(${1:integer index})\n\ + {\n\ + $0\n\ + }\n\ +snippet collision_start\n\ + collision_start(${1:integer index})\n\ + {\n\ + $0\n\ + }\n\ +snippet control\n\ + control(${1:key id}, ${2:integer level}, ${3:integer edge})\n\ + {\n\ + $0\n\ + }\n\ +snippet dataserver\n\ + dataserver(${1:key query_id}, ${2:string data})\n\ + {\n\ + $0\n\ + }\n\ +snippet do\n\ + do\n\ + {\n\ + $0\n\ + }\n\ + while (${1:condition});\n\ +snippet else\n\ + else\n\ + {\n\ + $0\n\ + }\n\ +snippet email\n\ + email(${1:string time}, ${2:string address}, ${3:string subject}, ${4:string message}, ${5:integer num_left})\n\ + {\n\ + $0\n\ + }\n\ +snippet experience_permissions\n\ + experience_permissions(${1:key agent_id})\n\ + {\n\ + $0\n\ + }\n\ +snippet experience_permissions_denied\n\ + experience_permissions_denied(${1:key agent_id}, ${2:integer reason})\n\ + {\n\ + $0\n\ + }\n\ +snippet for\n\ + for (${1:start}; ${3:condition}; ${3:step})\n\ + {\n\ + $0\n\ + }\n\ +snippet http_request\n\ + http_request(${1:key request_id}, ${2:string method}, ${3:string body})\n\ + {\n\ + $0\n\ + }\n\ +snippet http_response\n\ + http_response(${1:key request_id}, ${2:integer status}, ${3:list metadata}, ${4:string body})\n\ + {\n\ + $0\n\ + }\n\ +snippet if\n\ + if (${1:condition})\n\ + {\n\ + $0\n\ + }\n\ +snippet jump\n\ + jump ${1:label};\n\ +snippet land_collision\n\ + land_collision(${1:vector pos})\n\ + {\n\ + $0\n\ + }\n\ +snippet land_collision_end\n\ + land_collision_end(${1:vector pos})\n\ + {\n\ + $0\n\ + }\n\ +snippet land_collision_start\n\ + land_collision_start(${1:vector pos})\n\ + {\n\ + $0\n\ + }\n\ +snippet link_message\n\ + link_message(${1:integer sender_num}, ${2:integer num}, ${3:string str}, ${4:key id})\n\ + {\n\ + $0\n\ + }\n\ +snippet listen\n\ + listen(${1:integer channel}, ${2:string name}, ${3:key id}, ${4:string message})\n\ + {\n\ + $0\n\ + }\n\ +snippet llAbs\n\ + llAbs(${1:integer val})\n\ +snippet llAcos\n\ + llAcos(${1:float val})\n\ +snippet llAddToLandBanList\n\ + llAddToLandBanList(${1:key agent}, ${2:float hours});\n\ +snippet llAddToLandPassList\n\ + llAddToLandPassList(${1:key agent}, ${2:float hours});\n\ +snippet llAdjustSoundVolume\n\ + llAdjustSoundVolume(${1:float volume});\n\ +snippet llAgentInExperience\n\ + llAgentInExperience(${1:key agent})\n\ +snippet llAllowInventoryDrop\n\ + llAllowInventoryDrop(${1:integer add});\n\ +snippet llAngleBetween\n\ + llAngleBetween(${1:rotation a}, ${2:rotation b})\n\ +snippet llApplyImpulse\n\ + llApplyImpulse(${1:vector force}, ${2:integer local});\n\ +snippet llApplyRotationalImpulse\n\ + llApplyRotationalImpulse(${1:vector force}, ${2:integer local});\n\ +snippet llAsin\n\ + llAsin(${1:float val})\n\ +snippet llAtan2\n\ + llAtan2(${1:float y}, ${2:float x})\n\ +snippet llAttachToAvatar\n\ + llAttachToAvatar(${1:integer attach_point});\n\ +snippet llAttachToAvatarTemp\n\ + llAttachToAvatarTemp(${1:integer attach_point});\n\ +snippet llAvatarOnLinkSitTarget\n\ + llAvatarOnLinkSitTarget(${1:integer link})\n\ +snippet llAvatarOnSitTarget\n\ + llAvatarOnSitTarget()\n\ +snippet llAxes2Rot\n\ + llAxes2Rot(${1:vector fwd}, ${2:vector left}, ${3:vector up})\n\ +snippet llAxisAngle2Rot\n\ + llAxisAngle2Rot(${1:vector axis}, ${2:float angle})\n\ +snippet llBase64ToInteger\n\ + llBase64ToInteger(${1:string str})\n\ +snippet llBase64ToString\n\ + llBase64ToString(${1:string str})\n\ +snippet llBreakAllLinks\n\ + llBreakAllLinks();\n\ +snippet llBreakLink\n\ + llBreakLink(${1:integer link});\n\ +snippet llCastRay\n\ + llCastRay(${1:vector start}, ${2:vector end}, ${3:list options});\n\ +snippet llCeil\n\ + llCeil(${1:float val})\n\ +snippet llClearCameraParams\n\ + llClearCameraParams();\n\ +snippet llClearLinkMedia\n\ + llClearLinkMedia(${1:integer link}, ${2:integer face});\n\ +snippet llClearPrimMedia\n\ + llClearPrimMedia(${1:integer face});\n\ +snippet llCloseRemoteDataChannel\n\ + llCloseRemoteDataChannel(${1:key channel});\n\ +snippet llCollisionFilter\n\ + llCollisionFilter(${1:string name}, ${2:key id}, ${3:integer accept});\n\ +snippet llCollisionSound\n\ + llCollisionSound(${1:string impact_sound}, ${2:float impact_volume});\n\ +snippet llCos\n\ + llCos(${1:float theta})\n\ +snippet llCreateCharacter\n\ + llCreateCharacter(${1:list options});\n\ +snippet llCreateKeyValue\n\ + llCreateKeyValue(${1:string k})\n\ +snippet llCreateLink\n\ + llCreateLink(${1:key target}, ${2:integer parent});\n\ +snippet llCSV2List\n\ + llCSV2List(${1:string src})\n\ +snippet llDataSizeKeyValue\n\ + llDataSizeKeyValue()\n\ +snippet llDeleteCharacter\n\ + llDeleteCharacter();\n\ +snippet llDeleteKeyValue\n\ + llDeleteKeyValue(${1:string k})\n\ +snippet llDeleteSubList\n\ + llDeleteSubList(${1:list src}, ${2:integer start}, ${3:integer end})\n\ +snippet llDeleteSubString\n\ + llDeleteSubString(${1:string src}, ${2:integer start}, ${3:integer end})\n\ +snippet llDetachFromAvatar\n\ + llDetachFromAvatar();\n\ +snippet llDetectedGrab\n\ + llDetectedGrab(${1:integer number})\n\ +snippet llDetectedGroup\n\ + llDetectedGroup(${1:integer number})\n\ +snippet llDetectedKey\n\ + llDetectedKey(${1:integer number})\n\ +snippet llDetectedLinkNumber\n\ + llDetectedLinkNumber(${1:integer number})\n\ +snippet llDetectedName\n\ + llDetectedName(${1:integer number})\n\ +snippet llDetectedOwner\n\ + llDetectedOwner(${1:integer number})\n\ +snippet llDetectedPos\n\ + llDetectedPosl(${1:integer number})\n\ +snippet llDetectedRot\n\ + llDetectedRot(${1:integer number})\n\ +snippet llDetectedTouchBinormal\n\ + llDetectedTouchBinormal(${1:integer number})\n\ +snippet llDetectedTouchFace\n\ + llDetectedTouchFace(${1:integer number})\n\ +snippet llDetectedTouchNormal\n\ + llDetectedTouchNormal(${1:integer number})\n\ +snippet llDetectedTouchPos\n\ + llDetectedTouchPos(${1:integer number})\n\ +snippet llDetectedTouchST\n\ + llDetectedTouchST(${1:integer number})\n\ +snippet llDetectedTouchUV\n\ + llDetectedTouchUV(${1:integer number})\n\ +snippet llDetectedType\n\ + llDetectedType(${1:integer number})\n\ +snippet llDetectedVel\n\ + llDetectedVel(${1:integer number})\n\ +snippet llDialog\n\ + llDialog(${1:key agent}, ${2:string message}, ${3:list buttons}, ${4:integer channel});\n\ +snippet llDie\n\ + llDie();\n\ +snippet llDumpList2String\n\ + llDumpList2String(${1:list src}, ${2:string separator})\n\ +snippet llEdgeOfWorld\n\ + llEdgeOfWorld(${1:vector pos}, ${2:vector dir})\n\ +snippet llEjectFromLand\n\ + llEjectFromLand(${1:key agent});\n\ +snippet llEmail\n\ + llEmail(${1:string address}, ${2:string subject}, ${3:string message});\n\ +snippet llEscapeURL\n\ + llEscapeURL(${1:string url})\n\ +snippet llEuler2Rot\n\ + llEuler2Rot(${1:vector v})\n\ +snippet llExecCharacterCmd\n\ + llExecCharacterCmd(${1:integer command}, ${2:list options});\n\ +snippet llEvade\n\ + llEvade(${1:key target}, ${2:list options});\n\ +snippet llFabs\n\ + llFabs(${1:float val})\n\ +snippet llFleeFrom\n\ + llFleeFrom(${1:vector position}, ${2:float distance}, ${3:list options});\n\ +snippet llFloor\n\ + llFloor(${1:float val})\n\ +snippet llForceMouselook\n\ + llForceMouselook(${1:integer mouselook});\n\ +snippet llFrand\n\ + llFrand(${1:float mag})\n\ +snippet llGenerateKey\n\ + llGenerateKey()\n\ +snippet llGetAccel\n\ + llGetAccel()\n\ +snippet llGetAgentInfo\n\ + llGetAgentInfo(${1:key id})\n\ +snippet llGetAgentLanguage\n\ + llGetAgentLanguage(${1:key agent})\n\ +snippet llGetAgentList\n\ + llGetAgentList(${1:integer scope}, ${2:list options})\n\ +snippet llGetAgentSize\n\ + llGetAgentSize(${1:key agent})\n\ +snippet llGetAlpha\n\ + llGetAlpha(${1:integer face})\n\ +snippet llGetAndResetTime\n\ + llGetAndResetTime()\n\ +snippet llGetAnimation\n\ + llGetAnimation(${1:key id})\n\ +snippet llGetAnimationList\n\ + llGetAnimationList(${1:key agent})\n\ +snippet llGetAnimationOverride\n\ + llGetAnimationOverride(${1:string anim_state})\n\ +snippet llGetAttached\n\ + llGetAttached()\n\ +snippet llGetBoundingBox\n\ + llGetBoundingBox(${1:key object})\n\ +snippet llGetCameraPos\n\ + llGetCameraPos()\n\ +snippet llGetCameraRot\n\ + llGetCameraRot()\n\ +snippet llGetCenterOfMass\n\ + llGetCenterOfMass()\n\ +snippet llGetClosestNavPoint\n\ + llGetClosestNavPoint(${1:vector point}, ${2:list options})\n\ +snippet llGetColor\n\ + llGetColor(${1:integer face})\n\ +snippet llGetCreator\n\ + llGetCreator()\n\ +snippet llGetDate\n\ + llGetDate()\n\ +snippet llGetDisplayName\n\ + llGetDisplayName(${1:key id})\n\ +snippet llGetEnergy\n\ + llGetEnergy()\n\ +snippet llGetEnv\n\ + llGetEnv(${1:string name})\n\ +snippet llGetExperienceDetails\n\ + llGetExperienceDetails(${1:key experience_id})\n\ +snippet llGetExperienceErrorMessage\n\ + llGetExperienceErrorMessage(${1:integer error})\n\ +snippet llGetForce\n\ + llGetForce()\n\ +snippet llGetFreeMemory\n\ + llGetFreeMemory()\n\ +snippet llGetFreeURLs\n\ + llGetFreeURLs()\n\ +snippet llGetGeometricCenter\n\ + llGetGeometricCenter()\n\ +snippet llGetGMTclock\n\ + llGetGMTclock()\n\ +snippet llGetHTTPHeader\n\ + llGetHTTPHeader(${1:key request_id}, ${2:string header})\n\ +snippet llGetInventoryCreator\n\ + llGetInventoryCreator(${1:string item})\n\ +snippet llGetInventoryKey\n\ + llGetInventoryKey(${1:string name})\n\ +snippet llGetInventoryName\n\ + llGetInventoryName(${1:integer type}, ${2:integer number})\n\ +snippet llGetInventoryNumber\n\ + llGetInventoryNumber(${1:integer type})\n\ +snippet llGetInventoryPermMask\n\ + llGetInventoryPermMask(${1:string item}, ${2:integer mask})\n\ +snippet llGetInventoryType\n\ + llGetInventoryType(${1:string name})\n\ +snippet llGetKey\n\ + llGetKey()\n\ +snippet llGetLandOwnerAt\n\ + llGetLandOwnerAt(${1:vector pos})\n\ +snippet llGetLinkKey\n\ + llGetLinkKey(${1:integer link})\n\ +snippet llGetLinkMedia\n\ + llGetLinkMedia(${1:integer link}, ${2:integer face}, ${3:list params})\n\ +snippet llGetLinkName\n\ + llGetLinkName(${1:integer link})\n\ +snippet llGetLinkNumber\n\ + llGetLinkNumber()\n\ +snippet llGetLinkNumberOfSides\n\ + llGetLinkNumberOfSides(${1:integer link})\n\ +snippet llGetLinkPrimitiveParams\n\ + llGetLinkPrimitiveParams(${1:integer link}, ${2:list params})\n\ +snippet llGetListEntryType\n\ + llGetListEntryType(${1:list src}, ${2:integer index})\n\ +snippet llGetListLength\n\ + llGetListLength(${1:list src})\n\ +snippet llGetLocalPos\n\ + llGetLocalPos()\n\ +snippet llGetLocalRot\n\ + llGetLocalRot()\n\ +snippet llGetMass\n\ + llGetMass()\n\ +snippet llGetMassMKS\n\ + llGetMassMKS()\n\ +snippet llGetMaxScaleFactor\n\ + llGetMaxScaleFactor()\n\ +snippet llGetMemoryLimit\n\ + llGetMemoryLimit()\n\ +snippet llGetMinScaleFactor\n\ + llGetMinScaleFactor()\n\ +snippet llGetNextEmail\n\ + llGetNextEmail(${1:string address}, ${2:string subject});\n\ +snippet llGetNotecardLine\n\ + llGetNotecardLine(${1:string name}, ${2:integer line})\n\ +snippet llGetNumberOfNotecardLines\n\ + llGetNumberOfNotecardLines(${1:string name})\n\ +snippet llGetNumberOfPrims\n\ + llGetNumberOfPrims()\n\ +snippet llGetNumberOfSides\n\ + llGetNumberOfSides()\n\ +snippet llGetObjectDesc\n\ + llGetObjectDesc()\n\ +snippet llGetObjectDetails\n\ + llGetObjectDetails(${1:key id}, ${2:list params})\n\ +snippet llGetObjectMass\n\ + llGetObjectMass(${1:key id})\n\ +snippet llGetObjectName\n\ + llGetObjectName()\n\ +snippet llGetObjectPermMask\n\ + llGetObjectPermMask(${1:integer mask})\n\ +snippet llGetObjectPrimCount\n\ + llGetObjectPrimCount(${1:key prim})\n\ +snippet llGetOmega\n\ + llGetOmega()\n\ +snippet llGetOwner\n\ + llGetOwner()\n\ +snippet llGetOwnerKey\n\ + llGetOwnerKey(${1:key id})\n\ +snippet llGetParcelDetails\n\ + llGetParcelDetails(${1:vector pos}, ${2:list params})\n\ +snippet llGetParcelFlags\n\ + llGetParcelFlags(${1:vector pos})\n\ +snippet llGetParcelMaxPrims\n\ + llGetParcelMaxPrims(${1:vector pos}, ${2:integer sim_wide})\n\ +snippet llGetParcelMusicURL\n\ + llGetParcelMusicURL()\n\ +snippet llGetParcelPrimCount\n\ + llGetParcelPrimCount(${1:vector pos}, ${2:integer category}, ${3:integer sim_wide})\n\ +snippet llGetParcelPrimOwners\n\ + llGetParcelPrimOwners(${1:vector pos})\n\ +snippet llGetPermissions\n\ + llGetPermissions()\n\ +snippet llGetPermissionsKey\n\ + llGetPermissionsKey()\n\ +snippet llGetPhysicsMaterial\n\ + llGetPhysicsMaterial()\n\ +snippet llGetPos\n\ + llGetPos()\n\ +snippet llGetPrimitiveParams\n\ + llGetPrimitiveParams(${1:list params})\n\ +snippet llGetPrimMediaParams\n\ + llGetPrimMediaParams(${1:integer face}, ${2:list params})\n\ +snippet llGetRegionAgentCount\n\ + llGetRegionAgentCount()\n\ +snippet llGetRegionCorner\n\ + llGetRegionCorner()\n\ +snippet llGetRegionFlags\n\ + llGetRegionFlags()\n\ +snippet llGetRegionFPS\n\ + llGetRegionFPS()\n\ +snippet llGetRegionName\n\ + llGetRegionName()\n\ +snippet llGetRegionTimeDilation\n\ + llGetRegionTimeDilation()\n\ +snippet llGetRootPosition\n\ + llGetRootPosition()\n\ +snippet llGetRootRotation\n\ + llGetRootRotation()\n\ +snippet llGetRot\n\ + llGetRot()\n\ +snippet llGetScale\n\ + llGetScale()\n\ +snippet llGetScriptName\n\ + llGetScriptName()\n\ +snippet llGetScriptState\n\ + llGetScriptState(${1:string script})\n\ +snippet llGetSimStats\n\ + llGetSimStats(${1:integer stat_type})\n\ +snippet llGetSimulatorHostname\n\ + llGetSimulatorHostname()\n\ +snippet llGetSPMaxMemory\n\ + llGetSPMaxMemory()\n\ +snippet llGetStartParameter\n\ + llGetStartParameter()\n\ +snippet llGetStaticPath\n\ + llGetStaticPath(${1:vector start}, ${2:vector end}, ${3:float radius}, ${4:list params})\n\ +snippet llGetStatus\n\ + llGetStatus(${1:integer status})\n\ +snippet llGetSubString\n\ + llGetSubString(${1:string src}, ${2:integer start}, ${3:integer end})\n\ +snippet llGetSunDirection\n\ + llGetSunDirection()\n\ +snippet llGetTexture\n\ + llGetTexture(${1:integer face})\n\ +snippet llGetTextureOffset\n\ + llGetTextureOffset(${1:integer face})\n\ +snippet llGetTextureRot\n\ + llGetTextureRot(${1:integer face})\n\ +snippet llGetTextureScale\n\ + llGetTextureScale(${1:integer face})\n\ +snippet llGetTime\n\ + llGetTime()\n\ +snippet llGetTimeOfDay\n\ + llGetTimeOfDay()\n\ +snippet llGetTimestamp\n\ + llGetTimestamp()\n\ +snippet llGetTorque\n\ + llGetTorque()\n\ +snippet llGetUnixTime\n\ + llGetUnixTime()\n\ +snippet llGetUsedMemory\n\ + llGetUsedMemory()\n\ +snippet llGetUsername\n\ + llGetUsername(${1:key id})\n\ +snippet llGetVel\n\ + llGetVel()\n\ +snippet llGetWallclock\n\ + llGetWallclock()\n\ +snippet llGiveInventory\n\ + llGiveInventory(${1:key destination}, ${2:string inventory});\n\ +snippet llGiveInventoryList\n\ + llGiveInventoryList(${1:key target}, ${2:string folder}, ${3:list inventory});\n\ +snippet llGiveMoney\n\ + llGiveMoney(${1:key destination}, ${2:integer amount})\n\ +snippet llGround\n\ + llGround(${1:vector offset})\n\ +snippet llGroundContour\n\ + llGroundContour(${1:vector offset})\n\ +snippet llGroundNormal\n\ + llGroundNormal(${1:vector offset})\n\ +snippet llGroundRepel\n\ + llGroundRepel(${1:float height}, ${2:integer water}, ${3:float tau});\n\ +snippet llGroundSlope\n\ + llGroundSlope(${1:vector offset})\n\ +snippet llHTTPRequest\n\ + llHTTPRequest(${1:string url}, ${2:list parameters}, ${3:string body})\n\ +snippet llHTTPResponse\n\ + llHTTPResponse(${1:key request_id}, ${2:integer status}, ${3:string body});\n\ +snippet llInsertString\n\ + llInsertString(${1:string dst}, ${2:integer pos}, ${3:string src})\n\ +snippet llInstantMessage\n\ + llInstantMessage(${1:key user}, ${2:string message});\n\ +snippet llIntegerToBase64\n\ + llIntegerToBase64(${1:integer number})\n\ +snippet llJson2List\n\ + llJson2List(${1:string json})\n\ +snippet llJsonGetValue\n\ + llJsonGetValue(${1:string json}, ${2:list specifiers})\n\ +snippet llJsonSetValue\n\ + llJsonSetValue(${1:string json}, ${2:list specifiers}, ${3:string newValue})\n\ +snippet llJsonValueType\n\ + llJsonValueType(${1:string json}, ${2:list specifiers})\n\ +snippet llKey2Name\n\ + llKey2Name(${1:key id})\n\ +snippet llKeyCountKeyValue\n\ + llKeyCountKeyValue()\n\ +snippet llKeysKeyValue\n\ + llKeysKeyValue(${1:integer first}, ${2:integer count})\n\ +snippet llLinkParticleSystem\n\ + llLinkParticleSystem(${1:integer link}, ${2:list rules});\n\ +snippet llLinkSitTarget\n\ + llLinkSitTarget(${1:integer link}, ${2:vector offset}, ${3:rotation rot});\n\ +snippet llList2CSV\n\ + llList2CSV(${1:list src})\n\ +snippet llList2Float\n\ + llList2Float(${1:list src}, ${2:integer index})\n\ +snippet llList2Integer\n\ + llList2Integer(${1:list src}, ${2:integer index})\n\ +snippet llList2Json\n\ + llList2Json(${1:string type}, ${2:list values})\n\ +snippet llList2Key\n\ + llList2Key(${1:list src}, ${2:integer index})\n\ +snippet llList2List\n\ + llList2List(${1:list src}, ${2:integer start}, ${3:integer end})\n\ +snippet llList2ListStrided\n\ + llList2ListStrided(${1:list src}, ${2:integer start}, ${3:integer end}, ${4:integer stride})\n\ +snippet llList2Rot\n\ + llList2Rot(${1:list src}, ${2:integer index})\n\ +snippet llList2String\n\ + llList2String(${1:list src}, ${2:integer index})\n\ +snippet llList2Vector\n\ + llList2Vector(${1:list src}, ${2:integer index})\n\ +snippet llListen\n\ + llListen(${1:integer channel}, ${2:string name}, ${3:key id}, ${4:string msg})\n\ +snippet llListenControl\n\ + llListenControl(${1:integer handle}, ${2:integer active});\n\ +snippet llListenRemove\n\ + llListenRemove(${1:integer handle});\n\ +snippet llListFindList\n\ + llListFindList(${1:list src}, ${2:list test})\n\ +snippet llListInsertList\n\ + llListInsertList(${1:list dest}, ${2:list src}, ${3:integer start})\n\ +snippet llListRandomize\n\ + llListRandomize(${1:list src}, ${2:integer stride})\n\ +snippet llListReplaceList\n\ + llListReplaceList(${1:list dest}, ${2:list src}, ${3:integer start}, ${4:integer end})\n\ +snippet llListSort\n\ + llListSort(${1:list src}, ${2:integer stride}, ${3:integer ascending})\n\ +snippet llListStatistics\n\ + llListStatistics(${1:integer operation}, ${2:list src})\n\ +snippet llLoadURL\n\ + llLoadURL(${1:key agent}, ${2:string message}, ${3:string url});\n\ +snippet llLog\n\ + llLog(${1:float val})\n\ +snippet llLog10\n\ + llLog10(${1:float val})\n\ +snippet llLookAt\n\ + llLookAt(${1:vector target}, ${2:float strength}, ${3:float damping});\n\ +snippet llLoopSound\n\ + llLoopSound(${1:string sound}, ${2:float volume});\n\ +snippet llLoopSoundMaster\n\ + llLoopSoundMaster(${1:string sound}, ${2:float volume});\n\ +snippet llLoopSoundSlave\n\ + llLoopSoundSlave(${1:string sound}, ${2:float volume});\n\ +snippet llManageEstateAccess\n\ + llManageEstateAccess(${1:integer action}, ${2:key agent})\n\ +snippet llMapDestination\n\ + llMapDestination(${1:string simname}, ${2:vector pos}, ${3:vector look_at});\n\ +snippet llMD5String\n\ + llMD5String(${1:string src}, ${2:integer nonce})\n\ +snippet llMessageLinked\n\ + llMessageLinked(${1:integer link}, ${2:integer num}, ${3:string str}, ${4:key id});\n\ +snippet llMinEventDelay\n\ + llMinEventDelay(${1:float delay});\n\ +snippet llModifyLand\n\ + llModifyLand(${1:integer action}, ${2:integer brush});\n\ +snippet llModPow\n\ + llModPow(${1:integer a}, ${2:integer b}, ${3:integer c})\n\ +snippet llMoveToTarget\n\ + llMoveToTarget(${1:vector target}, ${2:float tau});\n\ +snippet llNavigateTo\n\ + llNavigateTo(${1:vector pos}, ${2:list options});\n\ +snippet llOffsetTexture\n\ + llOffsetTexture(${1:float u}, ${2:float v}, ${3:integer face});\n\ +snippet llOpenRemoteDataChannel\n\ + llOpenRemoteDataChannel();\n\ +snippet llOverMyLand\n\ + llOverMyLand(${1:key id})\n\ +snippet llOwnerSay\n\ + llOwnerSay(${1:string msg});\n\ +snippet llParcelMediaCommandList\n\ + llParcelMediaCommandList(${1:list commandList});\n\ +snippet llParcelMediaQuery\n\ + llParcelMediaQuery(${1:list query})\n\ +snippet llParseString2List\n\ + llParseString2List(${1:string src}, ${2:list separators}, ${3:list spacers})\n\ +snippet llParseStringKeepNulls\n\ + llParseStringKeepNulls(${1:string src}, ${2:list separators}, ${3:list spacers})\n\ +snippet llParticleSystem\n\ + llParticleSystem(${1:list rules});\n\ +snippet llPassCollisions\n\ + llPassCollisions(${1:integer pass});\n\ +snippet llPassTouches\n\ + llPassTouches(${1:integer pass});\n\ +snippet llPatrolPoints\n\ + llPatrolPoints(${1:list patrolPoints}, ${2:list options});\n\ +snippet llPlaySound\n\ + llPlaySound(${1:string sound}, ${2:float volume});\n\ +snippet llPlaySoundSlave\n\ + llPlaySoundSlave(${1:string sound}, ${2:float volume});\n\ +snippet llPow\n\ + llPow(${1:float base}, ${2:float exponent})\n\ +snippet llPreloadSound\n\ + llPreloadSound(${1:string sound});\n\ +snippet llPursue\n\ + llPursue(${1:key target}, ${2:list options});\n\ +snippet llPushObject\n\ + llPushObject(${1:key target}, ${2:vector impulse}, ${3:vector ang_impulse}, ${4:integer local});\n\ +snippet llReadKeyValue\n\ + llReadKeyValue(${1:string k})\n\ +snippet llRegionSay\n\ + llRegionSay(${1:integer channel}, ${2:string msg});\n\ +snippet llRegionSayTo\n\ + llRegionSayTo(${1:key target}, ${2:integer channel}, ${3:string msg});\n\ +snippet llReleaseControls\n\ + llReleaseControls();\n\ +snippet llReleaseURL\n\ + llReleaseURL(${1:string url});\n\ +snippet llRemoteDataReply\n\ + llRemoteDataReply(${1:key channel}, ${2:key message_id}, ${3:string sdata}, ${4:integer idata});\n\ +snippet llRemoteLoadScriptPin\n\ + llRemoteLoadScriptPin(${1:key target}, ${2:string name}, ${3:integer pin}, ${4:integer running}, ${5:integer start_param});\n\ +snippet llRemoveFromLandBanList\n\ + llRemoveFromLandBanList(${1:key agent});\n\ +snippet llRemoveFromLandPassList\n\ + llRemoveFromLandPassList(${1:key agent});\n\ +snippet llRemoveInventory\n\ + llRemoveInventory(${1:string item});\n\ +snippet llRemoveVehicleFlags\n\ + llRemoveVehicleFlags(${1:integer flags});\n\ +snippet llRequestAgentData\n\ + llRequestAgentData(${1:key id}, ${2:integer data})\n\ +snippet llRequestDisplayName\n\ + llRequestDisplayName(${1:key id})\n\ +snippet llRequestExperiencePermissions\n\ + llRequestExperiencePermissions(${1:key agent}, ${2:string name})\n\ +snippet llRequestInventoryData\n\ + llRequestInventoryData(${1:string name})\n\ +snippet llRequestPermissions\n\ + llRequestPermissions(${1:key agent}, ${2:integer permissions})\n\ +snippet llRequestSecureURL\n\ + llRequestSecureURL()\n\ +snippet llRequestSimulatorData\n\ + llRequestSimulatorData(${1:string region}, ${2:integer data})\n\ +snippet llRequestURL\n\ + llRequestURL()\n\ +snippet llRequestUsername\n\ + llRequestUsername(${1:key id})\n\ +snippet llResetAnimationOverride\n\ + llResetAnimationOverride(${1:string anim_state});\n\ +snippet llResetLandBanList\n\ + llResetLandBanList();\n\ +snippet llResetLandPassList\n\ + llResetLandPassList();\n\ +snippet llResetOtherScript\n\ + llResetOtherScript(${1:string name});\n\ +snippet llResetScript\n\ + llResetScript();\n\ +snippet llResetTime\n\ + llResetTime();\n\ +snippet llReturnObjectsByID\n\ + llReturnObjectsByID(${1:list objects})\n\ +snippet llReturnObjectsByOwner\n\ + llReturnObjectsByOwner(${1:key owner}, ${2:integer scope})\n\ +snippet llRezAtRoot\n\ + llRezAtRoot(${1:string inventory}, ${2:vector position}, ${3:vector velocity}, ${4:rotation rot}, ${5:integer param});\n\ +snippet llRezObject\n\ + llRezObject(${1:string inventory}, ${2:vector pos}, ${3:vector vel}, ${4:rotation rot}, ${5:integer param});\n\ +snippet llRot2Angle\n\ + llRot2Angle(${1:rotation rot})\n\ +snippet llRot2Axis\n\ + llRot2Axis(${1:rotation rot})\n\ +snippet llRot2Euler\n\ + llRot2Euler(${1:rotation quat})\n\ +snippet llRot2Fwd\n\ + llRot2Fwd(${1:rotation q})\n\ +snippet llRot2Left\n\ + llRot2Left(${1:rotation q})\n\ +snippet llRot2Up\n\ + llRot2Up(${1:rotation q})\n\ +snippet llRotateTexture\n\ + llRotateTexture(${1:float angle}, ${2:integer face});\n\ +snippet llRotBetween\n\ + llRotBetween(${1:vector start}, ${2:vector end})\n\ +snippet llRotLookAt\n\ + llRotLookAt(${1:rotation target_direction}, ${2:float strength}, ${3:float damping});\n\ +snippet llRotTarget\n\ + llRotTarget(${1:rotation rot}, ${2:float error})\n\ +snippet llRotTargetRemove\n\ + llRotTargetRemove(${1:integer handle});\n\ +snippet llRound\n\ + llRound(${1:float val})\n\ +snippet llSameGroup\n\ + llSameGroup(${1:key group})\n\ +snippet llSay\n\ + llSay(${1:integer channel}, ${2:string msg});\n\ +snippet llScaleByFactor\n\ + llScaleByFactor(${1:float scaling_factor})\n\ +snippet llScaleTexture\n\ + llScaleTexture(${1:float u}, ${2:float v}, ${3:integer face});\n\ +snippet llScriptDanger\n\ + llScriptDanger(${1:vector pos})\n\ +snippet llScriptProfiler\n\ + llScriptProfiler(${1:integer flags});\n\ +snippet llSendRemoteData\n\ + llSendRemoteData(${1:key channel}, ${2:string dest}, ${3:integer idata}, ${4:string sdata})\n\ +snippet llSensor\n\ + llSensor(${1:string name}, ${2:key id}, ${3:integer type}, ${4:float range}, ${5:float arc});\n\ +snippet llSensorRepeat\n\ + llSensorRepeat(${1:string name}, ${2:key id}, ${3:integer type}, ${4:float range}, ${5:float arc}, ${6:float rate});\n\ +snippet llSetAlpha\n\ + llSetAlpha(${1:float alpha}, ${2:integer face});\n\ +snippet llSetAngularVelocity\n\ + llSetAngularVelocity(${1:vector force}, ${2:integer local});\n\ +snippet llSetAnimationOverride\n\ + llSetAnimationOverride(${1:string anim_state}, ${2:string anim})\n\ +snippet llSetBuoyancy\n\ + llSetBuoyancy(${1:float buoyancy});\n\ +snippet llSetCameraAtOffset\n\ + llSetCameraAtOffset(${1:vector offset});\n\ +snippet llSetCameraEyeOffset\n\ + llSetCameraEyeOffset(${1:vector offset});\n\ +snippet llSetCameraParams\n\ + llSetCameraParams(${1:list rules});\n\ +snippet llSetClickAction\n\ + llSetClickAction(${1:integer action});\n\ +snippet llSetColor\n\ + llSetColor(${1:vector color}, ${2:integer face});\n\ +snippet llSetContentType\n\ + llSetContentType(${1:key request_id}, ${2:integer content_type});\n\ +snippet llSetDamage\n\ + llSetDamage(${1:float damage});\n\ +snippet llSetForce\n\ + llSetForce(${1:vector force}, ${2:integer local});\n\ +snippet llSetForceAndTorque\n\ + llSetForceAndTorque(${1:vector force}, ${2:vector torque}, ${3:integer local});\n\ +snippet llSetHoverHeight\n\ + llSetHoverHeight(${1:float height}, ${2:integer water}, ${3:float tau});\n\ +snippet llSetKeyframedMotion\n\ + llSetKeyframedMotion(${1:list keyframes}, ${2:list options});\n\ +snippet llSetLinkAlpha\n\ + llSetLinkAlpha(${1:integer link}, ${2:float alpha}, ${3:integer face});\n\ +snippet llSetLinkCamera\n\ + llSetLinkCamera(${1:integer link}, ${2:vector eye}, ${3:vector at});\n\ +snippet llSetLinkColor\n\ + llSetLinkColor(${1:integer link}, ${2:vector color}, ${3:integer face});\n\ +snippet llSetLinkMedia\n\ + llSetLinkMedia(${1:integer link}, ${2:integer face}, ${3:list params});\n\ +snippet llSetLinkPrimitiveParams\n\ + llSetLinkPrimitiveParams(${1:integer link}, ${2:list rules});\n\ +snippet llSetLinkPrimitiveParamsFast\n\ + llSetLinkPrimitiveParamsFast(${1:integer link}, ${2:list rules});\n\ +snippet llSetLinkTexture\n\ + llSetLinkTexture(${1:integer link}, ${2:string texture}, ${3:integer face});\n\ +snippet llSetLinkTextureAnim\n\ + llSetLinkTextureAnim(${1:integer link}, ${2:integer mode}, ${3:integer face}, ${4:integer sizex}, ${5:integer sizey}, ${6:float start}, ${7:float length}, ${8:float rate});\n\ +snippet llSetLocalRot\n\ + llSetLocalRot(${1:rotation rot});\n\ +snippet llSetMemoryLimit\n\ + llSetMemoryLimit(${1:integer limit})\n\ +snippet llSetObjectDesc\n\ + llSetObjectDesc(${1:string description});\n\ +snippet llSetObjectName\n\ + llSetObjectName(${1:string name});\n\ +snippet llSetParcelMusicURL\n\ + llSetParcelMusicURL(${1:string url});\n\ +snippet llSetPayPrice\n\ + llSetPayPrice(${1:integer price}, [${2:integer price_button_a}, ${3:integer price_button_b}, ${4:integer price_button_c}, ${5:integer price_button_d}]);\n\ +snippet llSetPhysicsMaterial\n\ + llSetPhysicsMaterial(${1:integer mask}, ${2:float gravity_multiplier}, ${3:float restitution}, ${4:float friction}, ${5:float density});\n\ +snippet llSetPos\n\ + llSetPos(${1:vector pos});\n\ +snippet llSetPrimitiveParams\n\ + llSetPrimitiveParams(${1:list rules});\n\ +snippet llSetPrimMediaParams\n\ + llSetPrimMediaParams(${1:integer face}, ${2:list params});\n\ +snippet llSetRegionPos\n\ + llSetRegionPos(${1:vector position})\n\ +snippet llSetRemoteScriptAccessPin\n\ + llSetRemoteScriptAccessPin(${1:integer pin});\n\ +snippet llSetRot\n\ + llSetRot(${1:rotation rot});\n\ +snippet llSetScale\n\ + llSetScale(${1:vector size});\n\ +snippet llSetScriptState\n\ + llSetScriptState(${1:string name}, ${2:integer run});\n\ +snippet llSetSitText\n\ + llSetSitText(${1:string text});\n\ +snippet llSetSoundQueueing\n\ + llSetSoundQueueing(${1:integer queue});\n\ +snippet llSetSoundRadius\n\ + llSetSoundRadius(${1:float radius});\n\ +snippet llSetStatus\n\ + llSetStatus(${1:integer status}, ${2:integer value});\n\ +snippet llSetText\n\ + llSetText(${1:string text}, ${2:vector color}, ${3:float alpha});\n\ +snippet llSetTexture\n\ + llSetTexture(${1:string texture}, ${2:integer face});\n\ +snippet llSetTextureAnim\n\ + llSetTextureAnim(${1:integer mode}, ${2:integer face}, ${3:integer sizex}, ${4:integer sizey}, ${5:float start}, ${6:float length}, ${7:float rate});\n\ +snippet llSetTimerEvent\n\ + llSetTimerEvent(${1:float sec});\n\ +snippet llSetTorque\n\ + llSetTorque(${1:vector torque}, ${2:integer local});\n\ +snippet llSetTouchText\n\ + llSetTouchText(${1:string text});\n\ +snippet llSetVehicleFlags\n\ + llSetVehicleFlags(${1:integer flags});\n\ +snippet llSetVehicleFloatParam\n\ + llSetVehicleFloatParam(${1:integer param}, ${2:float value});\n\ +snippet llSetVehicleRotationParam\n\ + llSetVehicleRotationParam(${1:integer param}, ${2:rotation rot});\n\ +snippet llSetVehicleType\n\ + llSetVehicleType(${1:integer type});\n\ +snippet llSetVehicleVectorParam\n\ + llSetVehicleVectorParam(${1:integer param}, ${2:vector vec});\n\ +snippet llSetVelocity\n\ + llSetVelocity(${1:vector force}, ${2:integer local});\n\ +snippet llSHA1String\n\ + llSHA1String(${1:string src})\n\ +snippet llShout\n\ + llShout(${1:integer channel}, ${2:string msg});\n\ +snippet llSin\n\ + llSin(${1:float theta})\n\ +snippet llSitTarget\n\ + llSitTarget(${1:vector offset}, ${2:rotation rot});\n\ +snippet llSleep\n\ + llSleep(${1:float sec});\n\ +snippet llSqrt\n\ + llSqrt(${1:float val})\n\ +snippet llStartAnimation\n\ + llStartAnimation(${1:string anim});\n\ +snippet llStopAnimation\n\ + llStopAnimation(${1:string anim});\n\ +snippet llStopHover\n\ + llStopHover();\n\ +snippet llStopLookAt\n\ + llStopLookAt();\n\ +snippet llStopMoveToTarget\n\ + llStopMoveToTarget();\n\ +snippet llStopSound\n\ + llStopSound();\n\ +snippet llStringLength\n\ + llStringLength(${1:string str})\n\ +snippet llStringToBase64\n\ + llStringToBase64(${1:string str})\n\ +snippet llStringTrim\n\ + llStringTrim(${1:string src}, ${2:integer type})\n\ +snippet llSubStringIndex\n\ + llSubStringIndex(${1:string source}, ${2:string pattern})\n\ +snippet llTakeControls\n\ + llTakeControls(${1:integer controls}, ${2:integer accept}, ${3:integer pass_on});\n\ +snippet llTan\n\ + llTan(${1:float theta})\n\ +snippet llTarget\n\ + llTarget(${1:vector position}, ${2:float range})\n\ +snippet llTargetOmega\n\ + llTargetOmega(${1:vector axis}, ${2:float spinrate}, ${3:float gain});\n\ +snippet llTargetRemove\n\ + llTargetRemove(${1:integer handle});\n\ +snippet llTeleportAgent\n\ + llTeleportAgent(${1:key agent}, ${2:string landmark}, ${3:vector position}, ${4:vector look_at});\n\ +snippet llTeleportAgentGlobalCoords\n\ + llTeleportAgentGlobalCoords(${1:key agent}, ${2:vector global_coordinates}, ${3:vector region_coordinates}, ${4:vector look_at});\n\ +snippet llTeleportAgentHome\n\ + llTeleportAgentHome(${1:key agent});\n\ +snippet llTextBox\n\ + llTextBox(${1:key agent}, ${2:string message}, ${3:integer channel});\n\ +snippet llToLower\n\ + llToLower(${1:string src})\n\ +snippet llToUpper\n\ + llToUpper(${1:string src})\n\ +snippet llTransferLindenDollars\n\ + llTransferLindenDollars(${1:key destination}, ${2:integer amount})\n\ +snippet llTriggerSound\n\ + llTriggerSound(${1:string sound}, ${2:float volume});\n\ +snippet llTriggerSoundLimited\n\ + llTriggerSoundLimited(${1:string sound}, ${2:float volume}, ${3:vector top_north_east}, ${4:vector bottom_south_west});\n\ +snippet llUnescapeURL\n\ + llUnescapeURL(${1:string url})\n\ +snippet llUnSit\n\ + llUnSit(${1:key id});\n\ +snippet llUpdateCharacter\n\ + llUpdateCharacter(${1:list options})\n\ +snippet llUpdateKeyValue\n\ + llUpdateKeyValue(${1:string k}, ${2:string v}, ${3:integer checked}, ${4:string ov})\n\ +snippet llVecDist\n\ + llVecDist(${1:vector vec_a}, ${2:vector vec_b})\n\ +snippet llVecMag\n\ + llVecMag(${1:vector vec})\n\ +snippet llVecNorm\n\ + llVecNorm(${1:vector vec})\n\ +snippet llVolumeDetect\n\ + llVolumeDetect(${1:integer detect});\n\ +snippet llWanderWithin\n\ + llWanderWithin(${1:vector origin}, ${2:vector dist}, ${3:list options});\n\ +snippet llWater\n\ + llWater(${1:vector offset});\n\ +snippet llWhisper\n\ + llWhisper(${1:integer channel}, ${2:string msg});\n\ +snippet llWind\n\ + llWind(${1:vector offset});\n\ +snippet llXorBase64\n\ + llXorBase64(${1:string str1}, ${2:string str2})\n\ +snippet money\n\ + money(${1:key id}, ${2:integer amount})\n\ + {\n\ + $0\n\ + }\n\ +snippet object_rez\n\ + object_rez(${1:key id})\n\ + {\n\ + $0\n\ + }\n\ +snippet on_rez\n\ + on_rez(${1:integer start_param})\n\ + {\n\ + $0\n\ + }\n\ +snippet path_update\n\ + path_update(${1:integer type}, ${2:list reserved})\n\ + {\n\ + $0\n\ + }\n\ +snippet remote_data\n\ + remote_data(${1:integer event_type}, ${2:key channel}, ${3:key message_id}, ${4:string sender}, ${5:integer idata}, ${6:string sdata})\n\ + {\n\ + $0\n\ + }\n\ +snippet run_time_permissions\n\ + run_time_permissions(${1:integer perm})\n\ + {\n\ + $0\n\ + }\n\ +snippet sensor\n\ + sensor(${1:integer index})\n\ + {\n\ + $0\n\ + }\n\ +snippet state\n\ + state ${1:name}\n\ +snippet touch\n\ + touch(${1:integer index})\n\ + {\n\ + $0\n\ + }\n\ +snippet touch_end\n\ + touch_end(${1:integer index})\n\ + {\n\ + $0\n\ + }\n\ +snippet touch_start\n\ + touch_start(${1:integer index})\n\ + {\n\ + $0\n\ + }\n\ +snippet transaction_result\n\ + transaction_result(${1:key id}, ${2:integer success}, ${3:string data})\n\ + {\n\ + $0\n\ + }\n\ +snippet while\n\ + while (${1:condition})\n\ + {\n\ + $0\n\ + }\n\ +"; +exports.scope = "lsl"; + +}); diff --git a/lib/ace/src-noconflict/snippets/lua.js b/lib/ace/src-noconflict/snippets/lua.js new file mode 100644 index 00000000..c369b648 --- /dev/null +++ b/lib/ace/src-noconflict/snippets/lua.js @@ -0,0 +1,28 @@ +ace.define("ace/snippets/lua",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText = "snippet #!\n\ + #!/usr/bin/env lua\n\ + $1\n\ +snippet local\n\ + local ${1:x} = ${2:1}\n\ +snippet fun\n\ + function ${1:fname}(${2:...})\n\ + ${3:-- body}\n\ + end\n\ +snippet for\n\ + for ${1:i}=${2:1},${3:10} do\n\ + ${4:print(i)}\n\ + end\n\ +snippet forp\n\ + for ${1:i},${2:v} in pairs(${3:table_name}) do\n\ + ${4:-- body}\n\ + end\n\ +snippet fori\n\ + for ${1:i},${2:v} in ipairs(${3:table_name}) do\n\ + ${4:-- body}\n\ + end\n\ +"; +exports.scope = "lua"; + +}); diff --git a/lib/ace/src-noconflict/snippets/luapage.js b/lib/ace/src-noconflict/snippets/luapage.js new file mode 100644 index 00000000..f1bcf091 --- /dev/null +++ b/lib/ace/src-noconflict/snippets/luapage.js @@ -0,0 +1,7 @@ +ace.define("ace/snippets/luapage",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "luapage"; + +}); diff --git a/lib/ace/src-noconflict/snippets/lucene.js b/lib/ace/src-noconflict/snippets/lucene.js new file mode 100644 index 00000000..8795919e --- /dev/null +++ b/lib/ace/src-noconflict/snippets/lucene.js @@ -0,0 +1,7 @@ +ace.define("ace/snippets/lucene",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "lucene"; + +}); diff --git a/lib/ace/src-noconflict/snippets/makefile.js b/lib/ace/src-noconflict/snippets/makefile.js new file mode 100644 index 00000000..6c02e0d6 --- /dev/null +++ b/lib/ace/src-noconflict/snippets/makefile.js @@ -0,0 +1,11 @@ +ace.define("ace/snippets/makefile",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText = "snippet ifeq\n\ + ifeq (${1:cond0},${2:cond1})\n\ + ${3:code}\n\ + endif\n\ +"; +exports.scope = "makefile"; + +}); diff --git a/lib/ace/src-noconflict/snippets/markdown.js b/lib/ace/src-noconflict/snippets/markdown.js new file mode 100644 index 00000000..d05f16b9 --- /dev/null +++ b/lib/ace/src-noconflict/snippets/markdown.js @@ -0,0 +1,95 @@ +ace.define("ace/snippets/markdown",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText = "# Markdown\n\ +\n\ +# Includes octopress (http://octopress.org/) snippets\n\ +\n\ +snippet [\n\ + [${1:text}](http://${2:address} \"${3:title}\")\n\ +snippet [*\n\ + [${1:link}](${2:`@*`} \"${3:title}\")${4}\n\ +\n\ +snippet [:\n\ + [${1:id}]: http://${2:url} \"${3:title}\"\n\ +snippet [:*\n\ + [${1:id}]: ${2:`@*`} \"${3:title}\"\n\ +\n\ +snippet ![\n\ + ![${1:alttext}](${2:/images/image.jpg} \"${3:title}\")\n\ +snippet ![*\n\ + ![${1:alt}](${2:`@*`} \"${3:title}\")${4}\n\ +\n\ +snippet ![:\n\ + ![${1:id}]: ${2:url} \"${3:title}\"\n\ +snippet ![:*\n\ + ![${1:id}]: ${2:`@*`} \"${3:title}\"\n\ +\n\ +snippet ===\n\ +regex /^/=+/=*//\n\ + ${PREV_LINE/./=/g}\n\ + \n\ + ${0}\n\ +snippet ---\n\ +regex /^/-+/-*//\n\ + ${PREV_LINE/./-/g}\n\ + \n\ + ${0}\n\ +snippet blockquote\n\ + {% blockquote %}\n\ + ${1:quote}\n\ + {% endblockquote %}\n\ +\n\ +snippet blockquote-author\n\ + {% blockquote ${1:author}, ${2:title} %}\n\ + ${3:quote}\n\ + {% endblockquote %}\n\ +\n\ +snippet blockquote-link\n\ + {% blockquote ${1:author} ${2:URL} ${3:link_text} %}\n\ + ${4:quote}\n\ + {% endblockquote %}\n\ +\n\ +snippet bt-codeblock-short\n\ + ```\n\ + ${1:code_snippet}\n\ + ```\n\ +\n\ +snippet bt-codeblock-full\n\ + ``` ${1:language} ${2:title} ${3:URL} ${4:link_text}\n\ + ${5:code_snippet}\n\ + ```\n\ +\n\ +snippet codeblock-short\n\ + {% codeblock %}\n\ + ${1:code_snippet}\n\ + {% endcodeblock %}\n\ +\n\ +snippet codeblock-full\n\ + {% codeblock ${1:title} lang:${2:language} ${3:URL} ${4:link_text} %}\n\ + ${5:code_snippet}\n\ + {% endcodeblock %}\n\ +\n\ +snippet gist-full\n\ + {% gist ${1:gist_id} ${2:filename} %}\n\ +\n\ +snippet gist-short\n\ + {% gist ${1:gist_id} %}\n\ +\n\ +snippet img\n\ + {% img ${1:class} ${2:URL} ${3:width} ${4:height} ${5:title_text} ${6:alt_text} %}\n\ +\n\ +snippet youtube\n\ + {% youtube ${1:video_id} %}\n\ +\n\ +# The quote should appear only once in the text. It is inherently part of it.\n\ +# See http://octopress.org/docs/plugins/pullquote/ for more info.\n\ +\n\ +snippet pullquote\n\ + {% pullquote %}\n\ + ${1:text} {\" ${2:quote} \"} ${3:text}\n\ + {% endpullquote %}\n\ +"; +exports.scope = "markdown"; + +}); diff --git a/lib/ace/src-noconflict/snippets/matlab.js b/lib/ace/src-noconflict/snippets/matlab.js new file mode 100644 index 00000000..ce298c3f --- /dev/null +++ b/lib/ace/src-noconflict/snippets/matlab.js @@ -0,0 +1,7 @@ +ace.define("ace/snippets/matlab",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "matlab"; + +}); diff --git a/lib/ace/src-noconflict/snippets/mel.js b/lib/ace/src-noconflict/snippets/mel.js new file mode 100644 index 00000000..537cc25b --- /dev/null +++ b/lib/ace/src-noconflict/snippets/mel.js @@ -0,0 +1,7 @@ +ace.define("ace/snippets/mel",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "mel"; + +}); diff --git a/lib/ace/src-noconflict/snippets/mushcode.js b/lib/ace/src-noconflict/snippets/mushcode.js new file mode 100644 index 00000000..1f0fe24e --- /dev/null +++ b/lib/ace/src-noconflict/snippets/mushcode.js @@ -0,0 +1,7 @@ +ace.define("ace/snippets/mushcode",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "mushcode"; + +}); diff --git a/lib/ace/src-noconflict/snippets/mysql.js b/lib/ace/src-noconflict/snippets/mysql.js new file mode 100644 index 00000000..bfb3a42c --- /dev/null +++ b/lib/ace/src-noconflict/snippets/mysql.js @@ -0,0 +1,7 @@ +ace.define("ace/snippets/mysql",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "mysql"; + +}); diff --git a/lib/ace/src-noconflict/snippets/nix.js b/lib/ace/src-noconflict/snippets/nix.js new file mode 100644 index 00000000..4fb6e704 --- /dev/null +++ b/lib/ace/src-noconflict/snippets/nix.js @@ -0,0 +1,7 @@ +ace.define("ace/snippets/nix",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "nix"; + +}); diff --git a/lib/ace/src-noconflict/snippets/objectivec.js b/lib/ace/src-noconflict/snippets/objectivec.js new file mode 100644 index 00000000..f93e6ae9 --- /dev/null +++ b/lib/ace/src-noconflict/snippets/objectivec.js @@ -0,0 +1,7 @@ +ace.define("ace/snippets/objectivec",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "objectivec"; + +}); diff --git a/lib/ace/src-noconflict/snippets/ocaml.js b/lib/ace/src-noconflict/snippets/ocaml.js new file mode 100644 index 00000000..06e0940d --- /dev/null +++ b/lib/ace/src-noconflict/snippets/ocaml.js @@ -0,0 +1,7 @@ +ace.define("ace/snippets/ocaml",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "ocaml"; + +}); diff --git a/lib/ace/src-noconflict/snippets/pascal.js b/lib/ace/src-noconflict/snippets/pascal.js new file mode 100644 index 00000000..70aa2ee7 --- /dev/null +++ b/lib/ace/src-noconflict/snippets/pascal.js @@ -0,0 +1,7 @@ +ace.define("ace/snippets/pascal",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "pascal"; + +}); diff --git a/lib/ace/src-noconflict/snippets/perl.js b/lib/ace/src-noconflict/snippets/perl.js new file mode 100644 index 00000000..9f818432 --- /dev/null +++ b/lib/ace/src-noconflict/snippets/perl.js @@ -0,0 +1,354 @@ +ace.define("ace/snippets/perl",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText = "# #!/usr/bin/perl\n\ +snippet #!\n\ + #!/usr/bin/env perl\n\ +\n\ +# Hash Pointer\n\ +snippet .\n\ + =>\n\ +# Function\n\ +snippet sub\n\ + sub ${1:function_name} {\n\ + ${2:#body ...}\n\ + }\n\ +# Conditional\n\ +snippet if\n\ + if (${1}) {\n\ + ${2:# body...}\n\ + }\n\ +# Conditional if..else\n\ +snippet ife\n\ + if (${1}) {\n\ + ${2:# body...}\n\ + }\n\ + else {\n\ + ${3:# else...}\n\ + }\n\ +# Conditional if..elsif..else\n\ +snippet ifee\n\ + if (${1}) {\n\ + ${2:# body...}\n\ + }\n\ + elsif (${3}) {\n\ + ${4:# elsif...}\n\ + }\n\ + else {\n\ + ${5:# else...}\n\ + }\n\ +# Conditional One-line\n\ +snippet xif\n\ + ${1:expression} if ${2:condition};${3}\n\ +# Unless conditional\n\ +snippet unless\n\ + unless (${1}) {\n\ + ${2:# body...}\n\ + }\n\ +# Unless conditional One-line\n\ +snippet xunless\n\ + ${1:expression} unless ${2:condition};${3}\n\ +# Try/Except\n\ +snippet eval\n\ + local $@;\n\ + eval {\n\ + ${1:# do something risky...}\n\ + };\n\ + if (my $e = $@) {\n\ + ${2:# handle failure...}\n\ + }\n\ +# While Loop\n\ +snippet wh\n\ + while (${1}) {\n\ + ${2:# body...}\n\ + }\n\ +# While Loop One-line\n\ +snippet xwh\n\ + ${1:expression} while ${2:condition};${3}\n\ +# C-style For Loop\n\ +snippet cfor\n\ + for (my $${2:var} = 0; $$2 < ${1:count}; $$2${3:++}) {\n\ + ${4:# body...}\n\ + }\n\ +# For loop one-line\n\ +snippet xfor\n\ + ${1:expression} for @${2:array};${3}\n\ +# Foreach Loop\n\ +snippet for\n\ + foreach my $${1:x} (@${2:array}) {\n\ + ${3:# body...}\n\ + }\n\ +# Foreach Loop One-line\n\ +snippet fore\n\ + ${1:expression} foreach @${2:array};${3}\n\ +# Package\n\ +snippet package\n\ + package ${1:`substitute(Filename('', 'Page Title'), '^.', '\\u&', '')`};\n\ +\n\ + ${2}\n\ +\n\ + 1;\n\ +\n\ + __END__\n\ +# Package syntax perl >= 5.14\n\ +snippet packagev514\n\ + package ${1:`substitute(Filename('', 'Page Title'), '^.', '\\u&', '')`} ${2:0.99};\n\ +\n\ + ${3}\n\ +\n\ + 1;\n\ +\n\ + __END__\n\ +#moose\n\ +snippet moose\n\ + use Moose;\n\ + use namespace::autoclean;\n\ + ${1:#}BEGIN {extends '${2:ParentClass}'};\n\ +\n\ + ${3}\n\ +# parent\n\ +snippet parent\n\ + use parent qw(${1:Parent Class});\n\ +# Read File\n\ +snippet slurp\n\ + my $${1:var} = do { local $/; open my $file, '<', \"${2:file}\"; <$file> };\n\ + ${3}\n\ +# strict warnings\n\ +snippet strwar\n\ + use strict;\n\ + use warnings;\n\ +# older versioning with perlcritic bypass\n\ +snippet vers\n\ + ## no critic\n\ + our $VERSION = '${1:version}';\n\ + eval $VERSION;\n\ + ## use critic\n\ +# new 'switch' like feature\n\ +snippet switch\n\ + use feature 'switch';\n\ +\n\ +# Anonymous subroutine\n\ +snippet asub\n\ + sub {\n\ + ${1:# body }\n\ + }\n\ +\n\ +\n\ +\n\ +# Begin block\n\ +snippet begin\n\ + BEGIN {\n\ + ${1:# begin body}\n\ + }\n\ +\n\ +# call package function with some parameter\n\ +snippet pkgmv\n\ + __PACKAGE__->${1:package_method}(${2:var})\n\ +\n\ +# call package function without a parameter\n\ +snippet pkgm\n\ + __PACKAGE__->${1:package_method}()\n\ +\n\ +# call package \"get_\" function without a parameter\n\ +snippet pkget\n\ + __PACKAGE__->get_${1:package_method}()\n\ +\n\ +# call package function with a parameter\n\ +snippet pkgetv\n\ + __PACKAGE__->get_${1:package_method}(${2:var})\n\ +\n\ +# complex regex\n\ +snippet qrx\n\ + qr/\n\ + ${1:regex}\n\ + /xms\n\ +\n\ +#simpler regex\n\ +snippet qr/\n\ + qr/${1:regex}/x\n\ +\n\ +#given\n\ +snippet given\n\ + given ($${1:var}) {\n\ + ${2:# cases}\n\ + ${3:# default}\n\ + }\n\ +\n\ +# switch-like case\n\ +snippet when\n\ + when (${1:case}) {\n\ + ${2:# body}\n\ + }\n\ +\n\ +# hash slice\n\ +snippet hslice\n\ + @{ ${1:hash} }{ ${2:array} }\n\ +\n\ +\n\ +# map\n\ +snippet map\n\ + map { ${2: body } } ${1: @array } ;\n\ +\n\ +\n\ +\n\ +# Pod stub\n\ +snippet ppod\n\ + =head1 NAME\n\ +\n\ + ${1:ClassName} - ${2:ShortDesc}\n\ +\n\ + =head1 SYNOPSIS\n\ +\n\ + use $1;\n\ +\n\ + ${3:# synopsis...}\n\ +\n\ + =head1 DESCRIPTION\n\ +\n\ + ${4:# longer description...}\n\ +\n\ +\n\ + =head1 INTERFACE\n\ +\n\ +\n\ + =head1 DEPENDENCIES\n\ +\n\ +\n\ + =head1 SEE ALSO\n\ +\n\ +\n\ +# Heading for a subroutine stub\n\ +snippet psub\n\ + =head2 ${1:MethodName}\n\ +\n\ + ${2:Summary....}\n\ +\n\ +# Heading for inline subroutine pod\n\ +snippet psubi\n\ + =head2 ${1:MethodName}\n\ +\n\ + ${2:Summary...}\n\ +\n\ +\n\ + =cut\n\ +# inline documented subroutine\n\ +snippet subpod\n\ + =head2 $1\n\ +\n\ + Summary of $1\n\ +\n\ + =cut\n\ +\n\ + sub ${1:subroutine_name} {\n\ + ${2:# body...}\n\ + }\n\ +# Subroutine signature\n\ +snippet parg\n\ + =over 2\n\ +\n\ + =item\n\ + Arguments\n\ +\n\ +\n\ + =over 3\n\ +\n\ + =item\n\ + C<${1:DataStructure}>\n\ +\n\ + ${2:Sample}\n\ +\n\ +\n\ + =back\n\ +\n\ +\n\ + =item\n\ + Return\n\ +\n\ + =over 3\n\ +\n\ +\n\ + =item\n\ + C<${3:...return data}>\n\ +\n\ +\n\ + =back\n\ +\n\ +\n\ + =back\n\ +\n\ +\n\ +\n\ +# Moose has\n\ +snippet has\n\ + has ${1:attribute} => (\n\ + is => '${2:ro|rw}',\n\ + isa => '${3:Str|Int|HashRef|ArrayRef|etc}',\n\ + default => sub {\n\ + ${4:defaultvalue}\n\ + },\n\ + ${5:# other attributes}\n\ + );\n\ +\n\ +\n\ +# override\n\ +snippet override\n\ + override ${1:attribute} => sub {\n\ + ${2:# my $self = shift;};\n\ + ${3:# my ($self, $args) = @_;};\n\ + };\n\ +\n\ +\n\ +# use test classes\n\ +snippet tuse\n\ + use Test::More;\n\ + use Test::Deep; # (); # uncomment to stop prototype errors\n\ + use Test::Exception;\n\ +\n\ +# local test lib\n\ +snippet tlib\n\ + use lib qw{ ./t/lib };\n\ +\n\ +#test methods\n\ +snippet tmeths\n\ + $ENV{TEST_METHOD} = '${1:regex}';\n\ +\n\ +# runtestclass\n\ +snippet trunner\n\ + use ${1:test_class};\n\ + $1->runtests();\n\ +\n\ +# Test::Class-style test\n\ +snippet tsub\n\ + sub t${1:number}_${2:test_case} :Test(${3:num_of_tests}) {\n\ + my $self = shift;\n\ + ${4:# body}\n\ +\n\ + }\n\ +\n\ +# Test::Routine-style test\n\ +snippet trsub\n\ + test ${1:test_name} => { description => '${2:Description of test.}'} => sub {\n\ + my ($self) = @_;\n\ + ${3:# test code}\n\ + };\n\ +\n\ +#prep test method\n\ +snippet tprep\n\ + sub prep${1:number}_${2:test_case} :Test(startup) {\n\ + my $self = shift;\n\ + ${4:# body}\n\ + }\n\ +\n\ +# cause failures to print stack trace\n\ +snippet debug_trace\n\ + use Carp; # 'verbose';\n\ + # cloak \"die\"\n\ + # warn \"warning\"\n\ + $SIG{'__DIE__'} = sub {\n\ + require Carp; Carp::confess\n\ + };\n\ +\n\ +"; +exports.scope = "perl"; + +}); diff --git a/lib/ace/src-noconflict/snippets/pgsql.js b/lib/ace/src-noconflict/snippets/pgsql.js new file mode 100644 index 00000000..5914fe1d --- /dev/null +++ b/lib/ace/src-noconflict/snippets/pgsql.js @@ -0,0 +1,7 @@ +ace.define("ace/snippets/pgsql",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "pgsql"; + +}); diff --git a/lib/ace/src-noconflict/snippets/php.js b/lib/ace/src-noconflict/snippets/php.js new file mode 100644 index 00000000..1710b3ca --- /dev/null +++ b/lib/ace/src-noconflict/snippets/php.js @@ -0,0 +1,283 @@ +ace.define("ace/snippets/php",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText = "snippet \n\ +# this one is for php5.4\n\ +snippet \n\ +snippet ns\n\ + namespace ${1:Foo\\Bar\\Baz};\n\ + ${2}\n\ +snippet use\n\ + use ${1:Foo\\Bar\\Baz};\n\ + ${2}\n\ +snippet c\n\ + ${1:abstract }class ${2:$FILENAME}\n\ + {\n\ + ${3}\n\ + }\n\ +snippet i\n\ + interface ${1:$FILENAME}\n\ + {\n\ + ${2}\n\ + }\n\ +snippet t.\n\ + $this->${1}\n\ +snippet f\n\ + function ${1:foo}(${2:array }${3:$bar})\n\ + {\n\ + ${4}\n\ + }\n\ +# method\n\ +snippet m\n\ + ${1:abstract }${2:protected}${3: static} function ${4:foo}(${5:array }${6:$bar})\n\ + {\n\ + ${7}\n\ + }\n\ +# setter method\n\ +snippet sm \n\ + ${5:public} function set${6:$2}(${7:$2 }$$1)\n\ + {\n\ + $this->${8:$1} = $$1;\n\ + return $this;\n\ + }${9}\n\ +# getter method\n\ +snippet gm\n\ + ${3:public} function get${4:$2}()\n\ + {\n\ + return $this->${5:$1};\n\ + }${6}\n\ +#setter\n\ +snippet $s\n\ + ${1:$foo}->set${2:Bar}(${3});\n\ +#getter\n\ +snippet $g\n\ + ${1:$foo}->get${2:Bar}();\n\ +\n\ +# Tertiary conditional\n\ +snippet =?:\n\ + $${1:foo} = ${2:true} ? ${3:a} : ${4};\n\ +snippet ?:\n\ + ${1:true} ? ${2:a} : ${3}\n\ +\n\ +snippet C\n\ + $_COOKIE['${1:variable}']${2}\n\ +snippet E\n\ + $_ENV['${1:variable}']${2}\n\ +snippet F\n\ + $_FILES['${1:variable}']${2}\n\ +snippet G\n\ + $_GET['${1:variable}']${2}\n\ +snippet P\n\ + $_POST['${1:variable}']${2}\n\ +snippet R\n\ + $_REQUEST['${1:variable}']${2}\n\ +snippet S\n\ + $_SERVER['${1:variable}']${2}\n\ +snippet SS\n\ + $_SESSION['${1:variable}']${2}\n\ + \n\ +# the following are old ones\n\ +snippet inc\n\ + include '${1:file}';${2}\n\ +snippet inc1\n\ + include_once '${1:file}';${2}\n\ +snippet req\n\ + require '${1:file}';${2}\n\ +snippet req1\n\ + require_once '${1:file}';${2}\n\ +# Start Docblock\n\ +snippet /*\n\ +# Class - post doc\n\ +snippet doc_cp${5}\n\ +# Class Variable - post doc\n\ +snippet doc_vp${3}\n\ +# Class Variable\n\ +snippet doc_v\n\ + ${1:var} $${2};${5}\n\ +# Class\n\ +snippet doc_c\n\ + ${1:}class ${2:}\n\ + {\n\ + ${7}\n\ + } // END $1class $2\n\ +# Constant Definition - post doc\n\ +snippet doc_dp${2}\n\ +# Constant Definition\n\ +snippet doc_d\n\ + ace.define(${1}, ${2});${4}\n\ +# Function - post doc\n\ +snippet doc_fp${4}\n\ +# Function signature\n\ +snippet doc_s\n\ + ${1}function ${2}(${3});${7}\n\ +# Function\n\ +snippet doc_f\n\ + ${1}function ${2}(${3})\n\ + {${7}\n\ + }\n\ +# Header\n\ +snippet doc_h\n\ + \n\ +# Interface\n\ +snippet interface\n\ + interface ${1:$FILENAME}\n\ + {\n\ + ${5}\n\ + }\n\ +# class ...\n\ +snippet class\n\ + class ${2:$FILENAME}\n\ + {\n\ + ${3}\n\ + ${5:public} function ${6:__construct}(${7:argument})\n\ + {\n\ + ${8:// code...}\n\ + }\n\ + }\n\ +# ace.define(...)\n\ +snippet def\n\ + ace.define('${1}'${2});${3}\n\ +# defined(...)\n\ +snippet def?\n\ + ${1}defined('${2}')${3}\n\ +snippet wh\n\ + while (${1:/* condition */}) {\n\ + ${2:// code...}\n\ + }\n\ +# do ... while\n\ +snippet do\n\ + do {\n\ + ${2:// code... }\n\ + } while (${1:/* condition */});\n\ +snippet if\n\ + if (${1:/* condition */}) {\n\ + ${2:// code...}\n\ + }\n\ +snippet ifil\n\ + \n\ + ${2:}\n\ + \n\ +snippet ife\n\ + if (${1:/* condition */}) {\n\ + ${2:// code...}\n\ + } else {\n\ + ${3:// code...}\n\ + }\n\ + ${4}\n\ +snippet ifeil\n\ + \n\ + ${2:}\n\ + \n\ + ${3:}\n\ + \n\ + ${4}\n\ +snippet else\n\ + else {\n\ + ${1:// code...}\n\ + }\n\ +snippet elseif\n\ + elseif (${1:/* condition */}) {\n\ + ${2:// code...}\n\ + }\n\ +snippet switch\n\ + switch ($${1:variable}) {\n\ + case '${2:value}':\n\ + ${3:// code...}\n\ + break;\n\ + ${5}\n\ + default:\n\ + ${4:// code...}\n\ + break;\n\ + }\n\ +snippet case\n\ + case '${1:value}':\n\ + ${2:// code...}\n\ + break;${3}\n\ +snippet for\n\ + for ($${2:i} = 0; $$2 < ${1:count}; $$2${3:++}) {\n\ + ${4: // code...}\n\ + }\n\ +snippet foreach\n\ + foreach ($${1:variable} as $${2:value}) {\n\ + ${3:// code...}\n\ + }\n\ +snippet foreachil\n\ + \n\ + ${3:}\n\ + \n\ +snippet foreachk\n\ + foreach ($${1:variable} as $${2:key} => $${3:value}) {\n\ + ${4:// code...}\n\ + }\n\ +snippet foreachkil\n\ + $${3:value}): ?>\n\ + ${4:}\n\ + \n\ +# $... = array (...)\n\ +snippet array\n\ + $${1:arrayName} = array('${2}' => ${3});${4}\n\ +snippet try\n\ + try {\n\ + ${2}\n\ + } catch (${1:Exception} $e) {\n\ + }\n\ +# lambda with closure\n\ +snippet lambda\n\ + ${1:static }function (${2:args}) use (${3:&$x, $y /*put vars in scope (closure) */}) {\n\ + ${4}\n\ + };\n\ +# pre_dump();\n\ +snippet pd\n\ + echo '
    '; var_dump(${1}); echo '
    ';\n\ +# pre_dump(); die();\n\ +snippet pdd\n\ + echo '
    '; var_dump(${1}); echo '
    '; die(${2:});\n\ +snippet vd\n\ + var_dump(${1});\n\ +snippet vdd\n\ + var_dump(${1}); die(${2:});\n\ +snippet http_redirect\n\ + header (\"HTTP/1.1 301 Moved Permanently\"); \n\ + header (\"Location: \".URL); \n\ + exit();\n\ +# Getters & Setters\n\ +snippet gs\n\ + public function get${3:$2}()\n\ + {\n\ + return $this->${4:$1};\n\ + }\n\ + public function set$3(${7:$2 }$$1)\n\ + {\n\ + $this->$4 = $$1;\n\ + return $this;\n\ + }${8}\n\ +# anotation, get, and set, useful for doctrine\n\ +snippet ags\n\ + ${2:protected} $${3:foo};\n\ +\n\ + public function get${4:$3}()\n\ + {\n\ + return $this->$3;\n\ + }\n\ +\n\ + public function set$4(${5:$4 }$${6:$3})\n\ + {\n\ + $this->$3 = $$6;\n\ + return $this;\n\ + }\n\ +snippet rett\n\ + return true;\n\ +snippet retf\n\ + return false;\n\ +"; +exports.scope = "php"; + +}); diff --git a/lib/ace/src-noconflict/snippets/plain_text.js b/lib/ace/src-noconflict/snippets/plain_text.js new file mode 100644 index 00000000..24223a66 --- /dev/null +++ b/lib/ace/src-noconflict/snippets/plain_text.js @@ -0,0 +1,7 @@ +ace.define("ace/snippets/plain_text",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "plain_text"; + +}); diff --git a/lib/ace/src-noconflict/snippets/powershell.js b/lib/ace/src-noconflict/snippets/powershell.js new file mode 100644 index 00000000..a8e7310a --- /dev/null +++ b/lib/ace/src-noconflict/snippets/powershell.js @@ -0,0 +1,7 @@ +ace.define("ace/snippets/powershell",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "powershell"; + +}); diff --git a/lib/ace/src-noconflict/snippets/praat.js b/lib/ace/src-noconflict/snippets/praat.js new file mode 100644 index 00000000..dcf68267 --- /dev/null +++ b/lib/ace/src-noconflict/snippets/praat.js @@ -0,0 +1,7 @@ +ace.define("ace/snippets/praat",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "praat"; + +}); diff --git a/lib/ace/src-noconflict/snippets/prolog.js b/lib/ace/src-noconflict/snippets/prolog.js new file mode 100644 index 00000000..2d63cb83 --- /dev/null +++ b/lib/ace/src-noconflict/snippets/prolog.js @@ -0,0 +1,7 @@ +ace.define("ace/snippets/prolog",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "prolog"; + +}); diff --git a/lib/ace/src-noconflict/snippets/properties.js b/lib/ace/src-noconflict/snippets/properties.js new file mode 100644 index 00000000..44c1ada7 --- /dev/null +++ b/lib/ace/src-noconflict/snippets/properties.js @@ -0,0 +1,7 @@ +ace.define("ace/snippets/properties",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "properties"; + +}); diff --git a/lib/ace/src-noconflict/snippets/protobuf.js b/lib/ace/src-noconflict/snippets/protobuf.js new file mode 100644 index 00000000..d00d57af --- /dev/null +++ b/lib/ace/src-noconflict/snippets/protobuf.js @@ -0,0 +1,7 @@ +ace.define("ace/snippets/protobuf",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText = ""; +exports.scope = "protobuf"; + +}); diff --git a/lib/ace/src-noconflict/snippets/python.js b/lib/ace/src-noconflict/snippets/python.js new file mode 100644 index 00000000..182b3406 --- /dev/null +++ b/lib/ace/src-noconflict/snippets/python.js @@ -0,0 +1,165 @@ +ace.define("ace/snippets/python",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText = "snippet #!\n\ + #!/usr/bin/env python\n\ +snippet imp\n\ + import ${1:module}\n\ +snippet from\n\ + from ${1:package} import ${2:module}\n\ +# Module Docstring\n\ +snippet docs\n\ + '''\n\ + File: ${1:FILENAME:file_name}\n\ + Author: ${2:author}\n\ + Description: ${3}\n\ + '''\n\ +snippet wh\n\ + while ${1:condition}:\n\ + ${2:# TODO: write code...}\n\ +# dowh - does the same as do...while in other languages\n\ +snippet dowh\n\ + while True:\n\ + ${1:# TODO: write code...}\n\ + if ${2:condition}:\n\ + break\n\ +snippet with\n\ + with ${1:expr} as ${2:var}:\n\ + ${3:# TODO: write code...}\n\ +# New Class\n\ +snippet cl\n\ + class ${1:ClassName}(${2:object}):\n\ + \"\"\"${3:docstring for $1}\"\"\"\n\ + def __init__(self, ${4:arg}):\n\ + ${5:super($1, self).__init__()}\n\ + self.$4 = $4\n\ + ${6}\n\ +# New Function\n\ +snippet def\n\ + def ${1:fname}(${2:`indent('.') ? 'self' : ''`}):\n\ + \"\"\"${3:docstring for $1}\"\"\"\n\ + ${4:# TODO: write code...}\n\ +snippet deff\n\ + def ${1:fname}(${2:`indent('.') ? 'self' : ''`}):\n\ + ${3:# TODO: write code...}\n\ +# New Method\n\ +snippet defs\n\ + def ${1:mname}(self, ${2:arg}):\n\ + ${3:# TODO: write code...}\n\ +# New Property\n\ +snippet property\n\ + def ${1:foo}():\n\ + doc = \"${2:The $1 property.}\"\n\ + def fget(self):\n\ + ${3:return self._$1}\n\ + def fset(self, value):\n\ + ${4:self._$1 = value}\n\ +# Ifs\n\ +snippet if\n\ + if ${1:condition}:\n\ + ${2:# TODO: write code...}\n\ +snippet el\n\ + else:\n\ + ${1:# TODO: write code...}\n\ +snippet ei\n\ + elif ${1:condition}:\n\ + ${2:# TODO: write code...}\n\ +# For\n\ +snippet for\n\ + for ${1:item} in ${2:items}:\n\ + ${3:# TODO: write code...}\n\ +# Encodes\n\ +snippet cutf8\n\ + # -*- coding: utf-8 -*-\n\ +snippet clatin1\n\ + # -*- coding: latin-1 -*-\n\ +snippet cascii\n\ + # -*- coding: ascii -*-\n\ +# Lambda\n\ +snippet ld\n\ + ${1:var} = lambda ${2:vars} : ${3:action}\n\ +snippet .\n\ + self.\n\ +snippet try Try/Except\n\ + try:\n\ + ${1:# TODO: write code...}\n\ + except ${2:Exception}, ${3:e}:\n\ + ${4:raise $3}\n\ +snippet try Try/Except/Else\n\ + try:\n\ + ${1:# TODO: write code...}\n\ + except ${2:Exception}, ${3:e}:\n\ + ${4:raise $3}\n\ + else:\n\ + ${5:# TODO: write code...}\n\ +snippet try Try/Except/Finally\n\ + try:\n\ + ${1:# TODO: write code...}\n\ + except ${2:Exception}, ${3:e}:\n\ + ${4:raise $3}\n\ + finally:\n\ + ${5:# TODO: write code...}\n\ +snippet try Try/Except/Else/Finally\n\ + try:\n\ + ${1:# TODO: write code...}\n\ + except ${2:Exception}, ${3:e}:\n\ + ${4:raise $3}\n\ + else:\n\ + ${5:# TODO: write code...}\n\ + finally:\n\ + ${6:# TODO: write code...}\n\ +# if __name__ == '__main__':\n\ +snippet ifmain\n\ + if __name__ == '__main__':\n\ + ${1:main()}\n\ +# __magic__\n\ +snippet _\n\ + __${1:init}__${2}\n\ +# python debugger (pdb)\n\ +snippet pdb\n\ + import pdb; pdb.set_trace()\n\ +# ipython debugger (ipdb)\n\ +snippet ipdb\n\ + import ipdb; ipdb.set_trace()\n\ +# ipython debugger (pdbbb)\n\ +snippet pdbbb\n\ + import pdbpp; pdbpp.set_trace()\n\ +snippet pprint\n\ + import pprint; pprint.pprint(${1})${2}\n\ +snippet \"\n\ + \"\"\"\n\ + ${1:doc}\n\ + \"\"\"\n\ +# test function/method\n\ +snippet test\n\ + def test_${1:description}(${2:self}):\n\ + ${3:# TODO: write code...}\n\ +# test case\n\ +snippet testcase\n\ + class ${1:ExampleCase}(unittest.TestCase):\n\ + \n\ + def test_${2:description}(self):\n\ + ${3:# TODO: write code...}\n\ +snippet fut\n\ + from __future__ import ${1}\n\ +#getopt\n\ +snippet getopt\n\ + try:\n\ + # Short option syntax: \"hv:\"\n\ + # Long option syntax: \"help\" or \"verbose=\"\n\ + opts, args = getopt.getopt(sys.argv[1:], \"${1:short_options}\", [${2:long_options}])\n\ + \n\ + except getopt.GetoptError, err:\n\ + # Print debug info\n\ + print str(err)\n\ + ${3:error_action}\n\ +\n\ + for option, argument in opts:\n\ + if option in (\"-h\", \"--help\"):\n\ + ${4}\n\ + elif option in (\"-v\", \"--verbose\"):\n\ + verbose = argument\n\ +"; +exports.scope = "python"; + +}); diff --git a/lib/ace/src-noconflict/snippets/r.js b/lib/ace/src-noconflict/snippets/r.js new file mode 100644 index 00000000..3da4c911 --- /dev/null +++ b/lib/ace/src-noconflict/snippets/r.js @@ -0,0 +1,128 @@ +ace.define("ace/snippets/r",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText = "snippet #!\n\ + #!/usr/bin/env Rscript\n\ +\n\ +# includes\n\ +snippet lib\n\ + library(${1:package})\n\ +snippet req\n\ + require(${1:package})\n\ +snippet source\n\ + source('${1:file}')\n\ +\n\ +# conditionals\n\ +snippet if\n\ + if (${1:condition}) {\n\ + ${2:code}\n\ + }\n\ +snippet el\n\ + else {\n\ + ${1:code}\n\ + }\n\ +snippet ei\n\ + else if (${1:condition}) {\n\ + ${2:code}\n\ + }\n\ +\n\ +# functions\n\ +snippet fun\n\ + ${1:name} = function (${2:variables}) {\n\ + ${3:code}\n\ + }\n\ +snippet ret\n\ + return(${1:code})\n\ +\n\ +# dataframes, lists, etc\n\ +snippet df\n\ + ${1:name}[${2:rows}, ${3:cols}]\n\ +snippet c\n\ + c(${1:items})\n\ +snippet li\n\ + list(${1:items})\n\ +snippet mat\n\ + matrix(${1:data}, nrow=${2:rows}, ncol=${3:cols})\n\ +\n\ +# apply functions\n\ +snippet apply\n\ + apply(${1:array}, ${2:margin}, ${3:function})\n\ +snippet lapply\n\ + lapply(${1:list}, ${2:function})\n\ +snippet sapply\n\ + lapply(${1:list}, ${2:function})\n\ +snippet vapply\n\ + vapply(${1:list}, ${2:function}, ${3:type})\n\ +snippet mapply\n\ + mapply(${1:function}, ${2:...})\n\ +snippet tapply\n\ + tapply(${1:vector}, ${2:index}, ${3:function})\n\ +snippet rapply\n\ + rapply(${1:list}, ${2:function})\n\ +\n\ +# plyr functions\n\ +snippet dd\n\ + ddply(${1:frame}, ${2:variables}, ${3:function})\n\ +snippet dl\n\ + dlply(${1:frame}, ${2:variables}, ${3:function})\n\ +snippet da\n\ + daply(${1:frame}, ${2:variables}, ${3:function})\n\ +snippet d_\n\ + d_ply(${1:frame}, ${2:variables}, ${3:function})\n\ +\n\ +snippet ad\n\ + adply(${1:array}, ${2:margin}, ${3:function})\n\ +snippet al\n\ + alply(${1:array}, ${2:margin}, ${3:function})\n\ +snippet aa\n\ + aaply(${1:array}, ${2:margin}, ${3:function})\n\ +snippet a_\n\ + a_ply(${1:array}, ${2:margin}, ${3:function})\n\ +\n\ +snippet ld\n\ + ldply(${1:list}, ${2:function})\n\ +snippet ll\n\ + llply(${1:list}, ${2:function})\n\ +snippet la\n\ + laply(${1:list}, ${2:function})\n\ +snippet l_\n\ + l_ply(${1:list}, ${2:function})\n\ +\n\ +snippet md\n\ + mdply(${1:matrix}, ${2:function})\n\ +snippet ml\n\ + mlply(${1:matrix}, ${2:function})\n\ +snippet ma\n\ + maply(${1:matrix}, ${2:function})\n\ +snippet m_\n\ + m_ply(${1:matrix}, ${2:function})\n\ +\n\ +# plot functions\n\ +snippet pl\n\ + plot(${1:x}, ${2:y})\n\ +snippet ggp\n\ + ggplot(${1:data}, aes(${2:aesthetics}))\n\ +snippet img\n\ + ${1:(jpeg,bmp,png,tiff)}(filename=\"${2:filename}\", width=${3}, height=${4}, unit=\"${5}\")\n\ + ${6:plot}\n\ + dev.off()\n\ +\n\ +# statistical test functions\n\ +snippet fis\n\ + fisher.test(${1:x}, ${2:y})\n\ +snippet chi\n\ + chisq.test(${1:x}, ${2:y})\n\ +snippet tt\n\ + t.test(${1:x}, ${2:y})\n\ +snippet wil\n\ + wilcox.test(${1:x}, ${2:y})\n\ +snippet cor\n\ + cor.test(${1:x}, ${2:y})\n\ +snippet fte\n\ + var.test(${1:x}, ${2:y})\n\ +snippet kvt \n\ + kv.test(${1:x}, ${2:y})\n\ +"; +exports.scope = "r"; + +}); diff --git a/lib/ace/src-noconflict/snippets/rdoc.js b/lib/ace/src-noconflict/snippets/rdoc.js new file mode 100644 index 00000000..956de47a --- /dev/null +++ b/lib/ace/src-noconflict/snippets/rdoc.js @@ -0,0 +1,7 @@ +ace.define("ace/snippets/rdoc",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "rdoc"; + +}); diff --git a/lib/ace/src-noconflict/snippets/rhtml.js b/lib/ace/src-noconflict/snippets/rhtml.js new file mode 100644 index 00000000..e62ce87f --- /dev/null +++ b/lib/ace/src-noconflict/snippets/rhtml.js @@ -0,0 +1,7 @@ +ace.define("ace/snippets/rhtml",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "rhtml"; + +}); diff --git a/lib/ace/src-noconflict/snippets/ruby.js b/lib/ace/src-noconflict/snippets/ruby.js new file mode 100644 index 00000000..18bc409f --- /dev/null +++ b/lib/ace/src-noconflict/snippets/ruby.js @@ -0,0 +1,935 @@ +ace.define("ace/snippets/ruby",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText = "########################################\n\ +# Ruby snippets - for Rails, see below #\n\ +########################################\n\ +\n\ +# encoding for Ruby 1.9\n\ +snippet enc\n\ + # encoding: utf-8\n\ +\n\ +# #!/usr/bin/env ruby\n\ +snippet #!\n\ + #!/usr/bin/env ruby\n\ + # encoding: utf-8\n\ +\n\ +# New Block\n\ +snippet =b\n\ + =begin rdoc\n\ + ${1}\n\ + =end\n\ +snippet y\n\ + :yields: ${1:arguments}\n\ +snippet rb\n\ + #!/usr/bin/env ruby -wKU\n\ +snippet beg\n\ + begin\n\ + ${3}\n\ + rescue ${1:Exception} => ${2:e}\n\ + end\n\ +\n\ +snippet req require\n\ + require \"${1}\"${2}\n\ +snippet #\n\ + # =>\n\ +snippet end\n\ + __END__\n\ +snippet case\n\ + case ${1:object}\n\ + when ${2:condition}\n\ + ${3}\n\ + end\n\ +snippet when\n\ + when ${1:condition}\n\ + ${2}\n\ +snippet def\n\ + def ${1:method_name}\n\ + ${2}\n\ + end\n\ +snippet deft\n\ + def test_${1:case_name}\n\ + ${2}\n\ + end\n\ +snippet if\n\ + if ${1:condition}\n\ + ${2}\n\ + end\n\ +snippet ife\n\ + if ${1:condition}\n\ + ${2}\n\ + else\n\ + ${3}\n\ + end\n\ +snippet elsif\n\ + elsif ${1:condition}\n\ + ${2}\n\ +snippet unless\n\ + unless ${1:condition}\n\ + ${2}\n\ + end\n\ +snippet while\n\ + while ${1:condition}\n\ + ${2}\n\ + end\n\ +snippet for\n\ + for ${1:e} in ${2:c}\n\ + ${3}\n\ + end\n\ +snippet until\n\ + until ${1:condition}\n\ + ${2}\n\ + end\n\ +snippet cla class .. end\n\ + class ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`}\n\ + ${2}\n\ + end\n\ +snippet cla class .. initialize .. end\n\ + class ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`}\n\ + def initialize(${2:args})\n\ + ${3}\n\ + end\n\ + end\n\ +snippet cla class .. < ParentClass .. initialize .. end\n\ + class ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`} < ${2:ParentClass}\n\ + def initialize(${3:args})\n\ + ${4}\n\ + end\n\ + end\n\ +snippet cla ClassName = Struct .. do .. end\n\ + ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`} = Struct.new(:${2:attr_names}) do\n\ + def ${3:method_name}\n\ + ${4}\n\ + end\n\ + end\n\ +snippet cla class BlankSlate .. initialize .. end\n\ + class ${1:BlankSlate}\n\ + instance_methods.each { |meth| undef_method(meth) unless meth =~ /\\A__/ }\n\ + end\n\ +snippet cla class << self .. end\n\ + class << ${1:self}\n\ + ${2}\n\ + end\n\ +# class .. < DelegateClass .. initialize .. end\n\ +snippet cla-\n\ + class ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`} < DelegateClass(${2:ParentClass})\n\ + def initialize(${3:args})\n\ + super(${4:del_obj})\n\ +\n\ + ${5}\n\ + end\n\ + end\n\ +snippet mod module .. end\n\ + module ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`}\n\ + ${2}\n\ + end\n\ +snippet mod module .. module_function .. end\n\ + module ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`}\n\ + module_function\n\ +\n\ + ${2}\n\ + end\n\ +snippet mod module .. ClassMethods .. end\n\ + module ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`}\n\ + module ClassMethods\n\ + ${2}\n\ + end\n\ +\n\ + module InstanceMethods\n\ +\n\ + end\n\ +\n\ + def self.included(receiver)\n\ + receiver.extend ClassMethods\n\ + receiver.send :include, InstanceMethods\n\ + end\n\ + end\n\ +# attr_reader\n\ +snippet r\n\ + attr_reader :${1:attr_names}\n\ +# attr_writer\n\ +snippet w\n\ + attr_writer :${1:attr_names}\n\ +# attr_accessor\n\ +snippet rw\n\ + attr_accessor :${1:attr_names}\n\ +snippet atp\n\ + attr_protected :${1:attr_names}\n\ +snippet ata\n\ + attr_accessible :${1:attr_names}\n\ +# include Enumerable\n\ +snippet Enum\n\ + include Enumerable\n\ +\n\ + def each(&block)\n\ + ${1}\n\ + end\n\ +# include Comparable\n\ +snippet Comp\n\ + include Comparable\n\ +\n\ + def <=>(other)\n\ + ${1}\n\ + end\n\ +# extend Forwardable\n\ +snippet Forw-\n\ + extend Forwardable\n\ +# def self\n\ +snippet defs\n\ + def self.${1:class_method_name}\n\ + ${2}\n\ + end\n\ +# def method_missing\n\ +snippet defmm\n\ + def method_missing(meth, *args, &blk)\n\ + ${1}\n\ + end\n\ +snippet defd\n\ + def_delegator :${1:@del_obj}, :${2:del_meth}, :${3:new_name}\n\ +snippet defds\n\ + def_delegators :${1:@del_obj}, :${2:del_methods}\n\ +snippet am\n\ + alias_method :${1:new_name}, :${2:old_name}\n\ +snippet app\n\ + if __FILE__ == $PROGRAM_NAME\n\ + ${1}\n\ + end\n\ +# usage_if()\n\ +snippet usai\n\ + if ARGV.${1}\n\ + abort \"Usage: #{$PROGRAM_NAME} ${2:ARGS_GO_HERE}\"${3}\n\ + end\n\ +# usage_unless()\n\ +snippet usau\n\ + unless ARGV.${1}\n\ + abort \"Usage: #{$PROGRAM_NAME} ${2:ARGS_GO_HERE}\"${3}\n\ + end\n\ +snippet array\n\ + Array.new(${1:10}) { |${2:i}| ${3} }\n\ +snippet hash\n\ + Hash.new { |${1:hash}, ${2:key}| $1[$2] = ${3} }\n\ +snippet file File.foreach() { |line| .. }\n\ + File.foreach(${1:\"path/to/file\"}) { |${2:line}| ${3} }\n\ +snippet file File.read()\n\ + File.read(${1:\"path/to/file\"})${2}\n\ +snippet Dir Dir.global() { |file| .. }\n\ + Dir.glob(${1:\"dir/glob/*\"}) { |${2:file}| ${3} }\n\ +snippet Dir Dir[\"..\"]\n\ + Dir[${1:\"glob/**/*.rb\"}]${2}\n\ +snippet dir\n\ + Filename.dirname(__FILE__)\n\ +snippet deli\n\ + delete_if { |${1:e}| ${2} }\n\ +snippet fil\n\ + fill(${1:range}) { |${2:i}| ${3} }\n\ +# flatten_once()\n\ +snippet flao\n\ + inject(Array.new) { |${1:arr}, ${2:a}| $1.push(*$2)}${3}\n\ +snippet zip\n\ + zip(${1:enums}) { |${2:row}| ${3} }\n\ +# downto(0) { |n| .. }\n\ +snippet dow\n\ + downto(${1:0}) { |${2:n}| ${3} }\n\ +snippet ste\n\ + step(${1:2}) { |${2:n}| ${3} }\n\ +snippet tim\n\ + times { |${1:n}| ${2} }\n\ +snippet upt\n\ + upto(${1:1.0/0.0}) { |${2:n}| ${3} }\n\ +snippet loo\n\ + loop { ${1} }\n\ +snippet ea\n\ + each { |${1:e}| ${2} }\n\ +snippet ead\n\ + each do |${1:e}|\n\ + ${2}\n\ + end\n\ +snippet eab\n\ + each_byte { |${1:byte}| ${2} }\n\ +snippet eac- each_char { |chr| .. }\n\ + each_char { |${1:chr}| ${2} }\n\ +snippet eac- each_cons(..) { |group| .. }\n\ + each_cons(${1:2}) { |${2:group}| ${3} }\n\ +snippet eai\n\ + each_index { |${1:i}| ${2} }\n\ +snippet eaid\n\ + each_index do |${1:i}|\n\ + ${2}\n\ + end\n\ +snippet eak\n\ + each_key { |${1:key}| ${2} }\n\ +snippet eakd\n\ + each_key do |${1:key}|\n\ + ${2}\n\ + end\n\ +snippet eal\n\ + each_line { |${1:line}| ${2} }\n\ +snippet eald\n\ + each_line do |${1:line}|\n\ + ${2}\n\ + end\n\ +snippet eap\n\ + each_pair { |${1:name}, ${2:val}| ${3} }\n\ +snippet eapd\n\ + each_pair do |${1:name}, ${2:val}|\n\ + ${3}\n\ + end\n\ +snippet eas-\n\ + each_slice(${1:2}) { |${2:group}| ${3} }\n\ +snippet easd-\n\ + each_slice(${1:2}) do |${2:group}|\n\ + ${3}\n\ + end\n\ +snippet eav\n\ + each_value { |${1:val}| ${2} }\n\ +snippet eavd\n\ + each_value do |${1:val}|\n\ + ${2}\n\ + end\n\ +snippet eawi\n\ + each_with_index { |${1:e}, ${2:i}| ${3} }\n\ +snippet eawid\n\ + each_with_index do |${1:e},${2:i}|\n\ + ${3}\n\ + end\n\ +snippet reve\n\ + reverse_each { |${1:e}| ${2} }\n\ +snippet reved\n\ + reverse_each do |${1:e}|\n\ + ${2}\n\ + end\n\ +snippet inj\n\ + inject(${1:init}) { |${2:mem}, ${3:var}| ${4} }\n\ +snippet injd\n\ + inject(${1:init}) do |${2:mem}, ${3:var}|\n\ + ${4}\n\ + end\n\ +snippet map\n\ + map { |${1:e}| ${2} }\n\ +snippet mapd\n\ + map do |${1:e}|\n\ + ${2}\n\ + end\n\ +snippet mapwi-\n\ + enum_with_index.map { |${1:e}, ${2:i}| ${3} }\n\ +snippet sor\n\ + sort { |a, b| ${1} }\n\ +snippet sorb\n\ + sort_by { |${1:e}| ${2} }\n\ +snippet ran\n\ + sort_by { rand }\n\ +snippet all\n\ + all? { |${1:e}| ${2} }\n\ +snippet any\n\ + any? { |${1:e}| ${2} }\n\ +snippet cl\n\ + classify { |${1:e}| ${2} }\n\ +snippet col\n\ + collect { |${1:e}| ${2} }\n\ +snippet cold\n\ + collect do |${1:e}|\n\ + ${2}\n\ + end\n\ +snippet det\n\ + detect { |${1:e}| ${2} }\n\ +snippet detd\n\ + detect do |${1:e}|\n\ + ${2}\n\ + end\n\ +snippet fet\n\ + fetch(${1:name}) { |${2:key}| ${3} }\n\ +snippet fin\n\ + find { |${1:e}| ${2} }\n\ +snippet find\n\ + find do |${1:e}|\n\ + ${2}\n\ + end\n\ +snippet fina\n\ + find_all { |${1:e}| ${2} }\n\ +snippet finad\n\ + find_all do |${1:e}|\n\ + ${2}\n\ + end\n\ +snippet gre\n\ + grep(${1:/pattern/}) { |${2:match}| ${3} }\n\ +snippet sub\n\ + ${1:g}sub(${2:/pattern/}) { |${3:match}| ${4} }\n\ +snippet sca\n\ + scan(${1:/pattern/}) { |${2:match}| ${3} }\n\ +snippet scad\n\ + scan(${1:/pattern/}) do |${2:match}|\n\ + ${3}\n\ + end\n\ +snippet max\n\ + max { |a, b| ${1} }\n\ +snippet min\n\ + min { |a, b| ${1} }\n\ +snippet par\n\ + partition { |${1:e}| ${2} }\n\ +snippet pard\n\ + partition do |${1:e}|\n\ + ${2}\n\ + end\n\ +snippet rej\n\ + reject { |${1:e}| ${2} }\n\ +snippet rejd\n\ + reject do |${1:e}|\n\ + ${2}\n\ + end\n\ +snippet sel\n\ + select { |${1:e}| ${2} }\n\ +snippet seld\n\ + select do |${1:e}|\n\ + ${2}\n\ + end\n\ +snippet lam\n\ + lambda { |${1:args}| ${2} }\n\ +snippet doo\n\ + do\n\ + ${1}\n\ + end\n\ +snippet dov\n\ + do |${1:variable}|\n\ + ${2}\n\ + end\n\ +snippet :\n\ + :${1:key} => ${2:\"value\"}${3}\n\ +snippet ope\n\ + open(${1:\"path/or/url/or/pipe\"}, \"${2:w}\") { |${3:io}| ${4} }\n\ +# path_from_here()\n\ +snippet fpath\n\ + File.join(File.dirname(__FILE__), *%2[${1:rel path here}])${2}\n\ +# unix_filter {}\n\ +snippet unif\n\ + ARGF.each_line${1} do |${2:line}|\n\ + ${3}\n\ + end\n\ +# option_parse {}\n\ +snippet optp\n\ + require \"optparse\"\n\ +\n\ + options = {${1:default => \"args\"}}\n\ +\n\ + ARGV.options do |opts|\n\ + opts.banner = \"Usage: #{File.basename($PROGRAM_NAME)}\n\ +snippet opt\n\ + opts.on( \"-${1:o}\", \"--${2:long-option-name}\", ${3:String},\n\ + \"${4:Option description.}\") do |${5:opt}|\n\ + ${6}\n\ + end\n\ +snippet tc\n\ + require \"test/unit\"\n\ +\n\ + require \"${1:library_file_name}\"\n\ +\n\ + class Test${2:$1} < Test::Unit::TestCase\n\ + def test_${3:case_name}\n\ + ${4}\n\ + end\n\ + end\n\ +snippet ts\n\ + require \"test/unit\"\n\ +\n\ + require \"tc_${1:test_case_file}\"\n\ + require \"tc_${2:test_case_file}\"${3}\n\ +snippet as\n\ + assert ${1:test}, \"${2:Failure message.}\"${3}\n\ +snippet ase\n\ + assert_equal ${1:expected}, ${2:actual}${3}\n\ +snippet asne\n\ + assert_not_equal ${1:unexpected}, ${2:actual}${3}\n\ +snippet asid\n\ + assert_in_delta ${1:expected_float}, ${2:actual_float}, ${3:2 ** -20}${4}\n\ +snippet asio\n\ + assert_instance_of ${1:ExpectedClass}, ${2:actual_instance}${3}\n\ +snippet asko\n\ + assert_kind_of ${1:ExpectedKind}, ${2:actual_instance}${3}\n\ +snippet asn\n\ + assert_nil ${1:instance}${2}\n\ +snippet asnn\n\ + assert_not_nil ${1:instance}${2}\n\ +snippet asm\n\ + assert_match /${1:expected_pattern}/, ${2:actual_string}${3}\n\ +snippet asnm\n\ + assert_no_match /${1:unexpected_pattern}/, ${2:actual_string}${3}\n\ +snippet aso\n\ + assert_operator ${1:left}, :${2:operator}, ${3:right}${4}\n\ +snippet asr\n\ + assert_raise ${1:Exception} { ${2} }\n\ +snippet asrd\n\ + assert_raise ${1:Exception} do\n\ + ${2}\n\ + end\n\ +snippet asnr\n\ + assert_nothing_raised ${1:Exception} { ${2} }\n\ +snippet asnrd\n\ + assert_nothing_raised ${1:Exception} do\n\ + ${2}\n\ + end\n\ +snippet asrt\n\ + assert_respond_to ${1:object}, :${2:method}${3}\n\ +snippet ass assert_same(..)\n\ + assert_same ${1:expected}, ${2:actual}${3}\n\ +snippet ass assert_send(..)\n\ + assert_send [${1:object}, :${2:message}, ${3:args}]${4}\n\ +snippet asns\n\ + assert_not_same ${1:unexpected}, ${2:actual}${3}\n\ +snippet ast\n\ + assert_throws :${1:expected} { ${2} }\n\ +snippet astd\n\ + assert_throws :${1:expected} do\n\ + ${2}\n\ + end\n\ +snippet asnt\n\ + assert_nothing_thrown { ${1} }\n\ +snippet asntd\n\ + assert_nothing_thrown do\n\ + ${1}\n\ + end\n\ +snippet fl\n\ + flunk \"${1:Failure message.}\"${2}\n\ +# Benchmark.bmbm do .. end\n\ +snippet bm-\n\ + TESTS = ${1:10_000}\n\ + Benchmark.bmbm do |results|\n\ + ${2}\n\ + end\n\ +snippet rep\n\ + results.report(\"${1:name}:\") { TESTS.times { ${2} }}\n\ +# Marshal.dump(.., file)\n\ +snippet Md\n\ + File.open(${1:\"path/to/file.dump\"}, \"wb\") { |${2:file}| Marshal.dump(${3:obj}, $2) }${4}\n\ +# Mashal.load(obj)\n\ +snippet Ml\n\ + File.open(${1:\"path/to/file.dump\"}, \"rb\") { |${2:file}| Marshal.load($2) }${3}\n\ +# deep_copy(..)\n\ +snippet deec\n\ + Marshal.load(Marshal.dump(${1:obj_to_copy}))${2}\n\ +snippet Pn-\n\ + PStore.new(${1:\"file_name.pstore\"})${2}\n\ +snippet tra\n\ + transaction(${1:true}) { ${2} }\n\ +# xmlread(..)\n\ +snippet xml-\n\ + REXML::Document.new(File.read(${1:\"path/to/file\"}))${2}\n\ +# xpath(..) { .. }\n\ +snippet xpa\n\ + elements.each(${1:\"//Xpath\"}) do |${2:node}|\n\ + ${3}\n\ + end\n\ +# class_from_name()\n\ +snippet clafn\n\ + split(\"::\").inject(Object) { |par, const| par.const_get(const) }\n\ +# singleton_class()\n\ +snippet sinc\n\ + class << self; self end\n\ +snippet nam\n\ + namespace :${1:`Filename()`} do\n\ + ${2}\n\ + end\n\ +snippet tas\n\ + desc \"${1:Task description}\"\n\ + task :${2:task_name => [:dependent, :tasks]} do\n\ + ${3}\n\ + end\n\ +# block\n\ +snippet b\n\ + { |${1:var}| ${2} }\n\ +snippet begin\n\ + begin\n\ + raise 'A test exception.'\n\ + rescue Exception => e\n\ + puts e.message\n\ + puts e.backtrace.inspect\n\ + else\n\ + # other exception\n\ + ensure\n\ + # always executed\n\ + end\n\ +\n\ +#debugging\n\ +snippet debug\n\ + require 'ruby-debug'; debugger; true;\n\ +snippet pry\n\ + require 'pry'; binding.pry\n\ +\n\ +#############################################\n\ +# Rails snippets - for pure Ruby, see above #\n\ +#############################################\n\ +snippet art\n\ + assert_redirected_to ${1::action => \"${2:index}\"}\n\ +snippet artnp\n\ + assert_redirected_to ${1:parent}_${2:child}_path(${3:@$1}, ${4:@$2})\n\ +snippet artnpp\n\ + assert_redirected_to ${1:parent}_${2:child}_path(${3:@$1})\n\ +snippet artp\n\ + assert_redirected_to ${1:model}_path(${2:@$1})\n\ +snippet artpp\n\ + assert_redirected_to ${1:model}s_path\n\ +snippet asd\n\ + assert_difference \"${1:Model}.${2:count}\", $1 do\n\ + ${3}\n\ + end\n\ +snippet asnd\n\ + assert_no_difference \"${1:Model}.${2:count}\" do\n\ + ${3}\n\ + end\n\ +snippet asre\n\ + assert_response :${1:success}, @response.body${2}\n\ +snippet asrj\n\ + assert_rjs :${1:replace}, \"${2:dom id}\"\n\ +snippet ass assert_select(..)\n\ + assert_select '${1:path}', :${2:text} => '${3:inner_html' ${4:do}\n\ +snippet bf\n\ + before_filter :${1:method}\n\ +snippet bt\n\ + belongs_to :${1:association}\n\ +snippet crw\n\ + cattr_accessor :${1:attr_names}\n\ +snippet defcreate\n\ + def create\n\ + @${1:model_class_name} = ${2:ModelClassName}.new(params[:$1])\n\ +\n\ + respond_to do |wants|\n\ + if @$1.save\n\ + flash[:notice] = '$2 was successfully created.'\n\ + wants.html { redirect_to(@$1) }\n\ + wants.xml { render :xml => @$1, :status => :created, :location => @$1 }\n\ + else\n\ + wants.html { render :action => \"new\" }\n\ + wants.xml { render :xml => @$1.errors, :status => :unprocessable_entity }\n\ + end\n\ + end\n\ + end${3}\n\ +snippet defdestroy\n\ + def destroy\n\ + @${1:model_class_name} = ${2:ModelClassName}.find(params[:id])\n\ + @$1.destroy\n\ +\n\ + respond_to do |wants|\n\ + wants.html { redirect_to($1s_url) }\n\ + wants.xml { head :ok }\n\ + end\n\ + end${3}\n\ +snippet defedit\n\ + def edit\n\ + @${1:model_class_name} = ${2:ModelClassName}.find(params[:id])\n\ + end\n\ +snippet defindex\n\ + def index\n\ + @${1:model_class_name} = ${2:ModelClassName}.all\n\ +\n\ + respond_to do |wants|\n\ + wants.html # index.html.erb\n\ + wants.xml { render :xml => @$1s }\n\ + end\n\ + end${3}\n\ +snippet defnew\n\ + def new\n\ + @${1:model_class_name} = ${2:ModelClassName}.new\n\ +\n\ + respond_to do |wants|\n\ + wants.html # new.html.erb\n\ + wants.xml { render :xml => @$1 }\n\ + end\n\ + end${3}\n\ +snippet defshow\n\ + def show\n\ + @${1:model_class_name} = ${2:ModelClassName}.find(params[:id])\n\ +\n\ + respond_to do |wants|\n\ + wants.html # show.html.erb\n\ + wants.xml { render :xml => @$1 }\n\ + end\n\ + end${3}\n\ +snippet defupdate\n\ + def update\n\ + @${1:model_class_name} = ${2:ModelClassName}.find(params[:id])\n\ +\n\ + respond_to do |wants|\n\ + if @$1.update_attributes(params[:$1])\n\ + flash[:notice] = '$2 was successfully updated.'\n\ + wants.html { redirect_to(@$1) }\n\ + wants.xml { head :ok }\n\ + else\n\ + wants.html { render :action => \"edit\" }\n\ + wants.xml { render :xml => @$1.errors, :status => :unprocessable_entity }\n\ + end\n\ + end\n\ + end${3}\n\ +snippet flash\n\ + flash[:${1:notice}] = \"${2}\"\n\ +snippet habtm\n\ + has_and_belongs_to_many :${1:object}, :join_table => \"${2:table_name}\", :foreign_key => \"${3}_id\"${4}\n\ +snippet hm\n\ + has_many :${1:object}\n\ +snippet hmd\n\ + has_many :${1:other}s, :class_name => \"${2:$1}\", :foreign_key => \"${3:$1}_id\", :dependent => :destroy${4}\n\ +snippet hmt\n\ + has_many :${1:object}, :through => :${2:object}\n\ +snippet ho\n\ + has_one :${1:object}\n\ +snippet i18\n\ + I18n.t('${1:type.key}')${2}\n\ +snippet ist\n\ + <%= image_submit_tag(\"${1:agree.png}\", :id => \"${2:id}\"${3} %>\n\ +snippet log\n\ + Rails.logger.${1:debug} ${2}\n\ +snippet log2\n\ + RAILS_DEFAULT_LOGGER.${1:debug} ${2}\n\ +snippet logd\n\ + logger.debug { \"${1:message}\" }${2}\n\ +snippet loge\n\ + logger.error { \"${1:message}\" }${2}\n\ +snippet logf\n\ + logger.fatal { \"${1:message}\" }${2}\n\ +snippet logi\n\ + logger.info { \"${1:message}\" }${2}\n\ +snippet logw\n\ + logger.warn { \"${1:message}\" }${2}\n\ +snippet mapc\n\ + ${1:map}.${2:connect} '${3:controller/:action/:id}'\n\ +snippet mapca\n\ + ${1:map}.catch_all \"*${2:anything}\", :controller => \"${3:default}\", :action => \"${4:error}\"${5}\n\ +snippet mapr\n\ + ${1:map}.resource :${2:resource}\n\ +snippet maprs\n\ + ${1:map}.resources :${2:resource}\n\ +snippet mapwo\n\ + ${1:map}.with_options :${2:controller} => '${3:thing}' do |$3|\n\ + ${4}\n\ + end\n\ +snippet mbs\n\ + before_save :${1:method}\n\ +snippet mcht\n\ + change_table :${1:table_name} do |t|\n\ + ${2}\n\ + end\n\ +snippet mp\n\ + map(&:${1:id})\n\ +snippet mrw\n\ + mattr_accessor :${1:attr_names}\n\ +snippet oa\n\ + order(\"${1:field}\")\n\ +snippet od\n\ + order(\"${1:field} DESC\")\n\ +snippet pa\n\ + params[:${1:id}]${2}\n\ +snippet ra\n\ + render :action => \"${1:action}\"\n\ +snippet ral\n\ + render :action => \"${1:action}\", :layout => \"${2:layoutname}\"\n\ +snippet rest\n\ + respond_to do |wants|\n\ + wants.${1:html} { ${2} }\n\ + end\n\ +snippet rf\n\ + render :file => \"${1:filepath}\"\n\ +snippet rfu\n\ + render :file => \"${1:filepath}\", :use_full_path => ${2:false}\n\ +snippet ri\n\ + render :inline => \"${1:<%= 'hello' %>}\"\n\ +snippet ril\n\ + render :inline => \"${1:<%= 'hello' %>}\", :locals => { ${2::name} => \"${3:value}\"${4} }\n\ +snippet rit\n\ + render :inline => \"${1:<%= 'hello' %>}\", :type => ${2::rxml}\n\ +snippet rjson\n\ + render :json => ${1:text to render}\n\ +snippet rl\n\ + render :layout => \"${1:layoutname}\"\n\ +snippet rn\n\ + render :nothing => ${1:true}\n\ +snippet rns\n\ + render :nothing => ${1:true}, :status => ${2:401}\n\ +snippet rp\n\ + render :partial => \"${1:item}\"\n\ +snippet rpc\n\ + render :partial => \"${1:item}\", :collection => ${2:@$1s}\n\ +snippet rpl\n\ + render :partial => \"${1:item}\", :locals => { :${2:$1} => ${3:@$1}\n\ +snippet rpo\n\ + render :partial => \"${1:item}\", :object => ${2:@$1}\n\ +snippet rps\n\ + render :partial => \"${1:item}\", :status => ${2:500}\n\ +snippet rt\n\ + render :text => \"${1:text to render}\"\n\ +snippet rtl\n\ + render :text => \"${1:text to render}\", :layout => \"${2:layoutname}\"\n\ +snippet rtlt\n\ + render :text => \"${1:text to render}\", :layout => ${2:true}\n\ +snippet rts\n\ + render :text => \"${1:text to render}\", :status => ${2:401}\n\ +snippet ru\n\ + render :update do |${1:page}|\n\ + $1.${2}\n\ + end\n\ +snippet rxml\n\ + render :xml => ${1:text to render}\n\ +snippet sc\n\ + scope :${1:name}, :where(:@${2:field} => ${3:value})\n\ +snippet sl\n\ + scope :${1:name}, lambda do |${2:value}|\n\ + where(\"${3:field = ?}\", ${4:bind var})\n\ + end\n\ +snippet sha1\n\ + Digest::SHA1.hexdigest(${1:string})\n\ +snippet sweeper\n\ + class ${1:ModelClassName}Sweeper < ActionController::Caching::Sweeper\n\ + observe $1\n\ +\n\ + def after_save(${2:model_class_name})\n\ + expire_cache($2)\n\ + end\n\ +\n\ + def after_destroy($2)\n\ + expire_cache($2)\n\ + end\n\ +\n\ + def expire_cache($2)\n\ + expire_page\n\ + end\n\ + end\n\ +snippet tcb\n\ + t.boolean :${1:title}\n\ + ${2}\n\ +snippet tcbi\n\ + t.binary :${1:title}, :limit => ${2:2}.megabytes\n\ + ${3}\n\ +snippet tcd\n\ + t.decimal :${1:title}, :precision => ${2:10}, :scale => ${3:2}\n\ + ${4}\n\ +snippet tcda\n\ + t.date :${1:title}\n\ + ${2}\n\ +snippet tcdt\n\ + t.datetime :${1:title}\n\ + ${2}\n\ +snippet tcf\n\ + t.float :${1:title}\n\ + ${2}\n\ +snippet tch\n\ + t.change :${1:name}, :${2:string}, :${3:limit} => ${4:80}\n\ + ${5}\n\ +snippet tci\n\ + t.integer :${1:title}\n\ + ${2}\n\ +snippet tcl\n\ + t.integer :lock_version, :null => false, :default => 0\n\ + ${1}\n\ +snippet tcr\n\ + t.references :${1:taggable}, :polymorphic => { :default => '${2:Photo}' }\n\ + ${3}\n\ +snippet tcs\n\ + t.string :${1:title}\n\ + ${2}\n\ +snippet tct\n\ + t.text :${1:title}\n\ + ${2}\n\ +snippet tcti\n\ + t.time :${1:title}\n\ + ${2}\n\ +snippet tcts\n\ + t.timestamp :${1:title}\n\ + ${2}\n\ +snippet tctss\n\ + t.timestamps\n\ + ${1}\n\ +snippet va\n\ + validates_associated :${1:attribute}\n\ +snippet vao\n\ + validates_acceptance_of :${1:terms}\n\ +snippet vc\n\ + validates_confirmation_of :${1:attribute}\n\ +snippet ve\n\ + validates_exclusion_of :${1:attribute}, :in => ${2:%w( mov avi )}\n\ +snippet vf\n\ + validates_format_of :${1:attribute}, :with => /${2:regex}/\n\ +snippet vi\n\ + validates_inclusion_of :${1:attribute}, :in => %w(${2: mov avi })\n\ +snippet vl\n\ + validates_length_of :${1:attribute}, :within => ${2:3}..${3:20}\n\ +snippet vn\n\ + validates_numericality_of :${1:attribute}\n\ +snippet vpo\n\ + validates_presence_of :${1:attribute}\n\ +snippet vu\n\ + validates_uniqueness_of :${1:attribute}\n\ +snippet wants\n\ + wants.${1:js|xml|html} { ${2} }\n\ +snippet wc\n\ + where(${1:\"conditions\"}${2:, bind_var})\n\ +snippet wh\n\ + where(${1:field} => ${2:value})\n\ +snippet xdelete\n\ + xhr :delete, :${1:destroy}, :id => ${2:1}${3}\n\ +snippet xget\n\ + xhr :get, :${1:show}, :id => ${2:1}${3}\n\ +snippet xpost\n\ + xhr :post, :${1:create}, :${2:object} => { ${3} }\n\ +snippet xput\n\ + xhr :put, :${1:update}, :id => ${2:1}, :${3:object} => { ${4} }${5}\n\ +snippet test\n\ + test \"should ${1:do something}\" do\n\ + ${2}\n\ + end\n\ +#migrations\n\ +snippet mac\n\ + add_column :${1:table_name}, :${2:column_name}, :${3:data_type}\n\ +snippet mrc\n\ + remove_column :${1:table_name}, :${2:column_name}\n\ +snippet mrnc\n\ + rename_column :${1:table_name}, :${2:old_column_name}, :${3:new_column_name}\n\ +snippet mcc\n\ + change_column :${1:table}, :${2:column}, :${3:type}\n\ +snippet mccc\n\ + t.column :${1:title}, :${2:string}\n\ +snippet mct\n\ + create_table :${1:table_name} do |t|\n\ + t.column :${2:name}, :${3:type}\n\ + end\n\ +snippet migration\n\ + class ${1:class_name} < ActiveRecord::Migration\n\ + def self.up\n\ + ${2}\n\ + end\n\ +\n\ + def self.down\n\ + end\n\ + end\n\ +\n\ +snippet trc\n\ + t.remove :${1:column}\n\ +snippet tre\n\ + t.rename :${1:old_column_name}, :${2:new_column_name}\n\ + ${3}\n\ +snippet tref\n\ + t.references :${1:model}\n\ +\n\ +#rspec\n\ +snippet it\n\ + it \"${1:spec_name}\" do\n\ + ${2}\n\ + end\n\ +snippet itp\n\ + it \"${1:spec_name}\"\n\ + ${2}\n\ +snippet desc\n\ + describe ${1:class_name} do\n\ + ${2}\n\ + end\n\ +snippet cont\n\ + context \"${1:message}\" do\n\ + ${2}\n\ + end\n\ +snippet bef\n\ + before :${1:each} do\n\ + ${2}\n\ + end\n\ +snippet aft\n\ + after :${1:each} do\n\ + ${2}\n\ + end\n\ +"; +exports.scope = "ruby"; + +}); diff --git a/lib/ace/src-noconflict/snippets/rust.js b/lib/ace/src-noconflict/snippets/rust.js new file mode 100644 index 00000000..0411c63e --- /dev/null +++ b/lib/ace/src-noconflict/snippets/rust.js @@ -0,0 +1,7 @@ +ace.define("ace/snippets/rust",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "rust"; + +}); diff --git a/lib/ace/src-noconflict/snippets/sass.js b/lib/ace/src-noconflict/snippets/sass.js new file mode 100644 index 00000000..b9adc9d8 --- /dev/null +++ b/lib/ace/src-noconflict/snippets/sass.js @@ -0,0 +1,7 @@ +ace.define("ace/snippets/sass",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "sass"; + +}); diff --git a/lib/ace/src-noconflict/snippets/scad.js b/lib/ace/src-noconflict/snippets/scad.js new file mode 100644 index 00000000..998a98ac --- /dev/null +++ b/lib/ace/src-noconflict/snippets/scad.js @@ -0,0 +1,7 @@ +ace.define("ace/snippets/scad",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "scad"; + +}); diff --git a/lib/ace/src-noconflict/snippets/scala.js b/lib/ace/src-noconflict/snippets/scala.js new file mode 100644 index 00000000..4051d988 --- /dev/null +++ b/lib/ace/src-noconflict/snippets/scala.js @@ -0,0 +1,7 @@ +ace.define("ace/snippets/scala",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "scala"; + +}); diff --git a/lib/ace/src-noconflict/snippets/scheme.js b/lib/ace/src-noconflict/snippets/scheme.js new file mode 100644 index 00000000..202d0741 --- /dev/null +++ b/lib/ace/src-noconflict/snippets/scheme.js @@ -0,0 +1,7 @@ +ace.define("ace/snippets/scheme",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "scheme"; + +}); diff --git a/lib/ace/src-noconflict/snippets/scss.js b/lib/ace/src-noconflict/snippets/scss.js new file mode 100644 index 00000000..fbd98f74 --- /dev/null +++ b/lib/ace/src-noconflict/snippets/scss.js @@ -0,0 +1,7 @@ +ace.define("ace/snippets/scss",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "scss"; + +}); diff --git a/lib/ace/src-noconflict/snippets/sh.js b/lib/ace/src-noconflict/snippets/sh.js new file mode 100644 index 00000000..12074a66 --- /dev/null +++ b/lib/ace/src-noconflict/snippets/sh.js @@ -0,0 +1,90 @@ +ace.define("ace/snippets/sh",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText = "# Shebang. Executing bash via /usr/bin/env makes scripts more portable.\n\ +snippet #!\n\ + #!/usr/bin/env bash\n\ + \n\ +snippet if\n\ + if [[ ${1:condition} ]]; then\n\ + ${2:#statements}\n\ + fi\n\ +snippet elif\n\ + elif [[ ${1:condition} ]]; then\n\ + ${2:#statements}\n\ +snippet for\n\ + for (( ${2:i} = 0; $2 < ${1:count}; $2++ )); do\n\ + ${3:#statements}\n\ + done\n\ +snippet fori\n\ + for ${1:needle} in ${2:haystack} ; do\n\ + ${3:#statements}\n\ + done\n\ +snippet wh\n\ + while [[ ${1:condition} ]]; do\n\ + ${2:#statements}\n\ + done\n\ +snippet until\n\ + until [[ ${1:condition} ]]; do\n\ + ${2:#statements}\n\ + done\n\ +snippet case\n\ + case ${1:word} in\n\ + ${2:pattern})\n\ + ${3};;\n\ + esac\n\ +snippet go \n\ + while getopts '${1:o}' ${2:opts} \n\ + do \n\ + case $$2 in\n\ + ${3:o0})\n\ + ${4:#staments};;\n\ + esac\n\ + done\n\ +# Set SCRIPT_DIR variable to directory script is located.\n\ +snippet sdir\n\ + SCRIPT_DIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\"\n\ +# getopt\n\ +snippet getopt\n\ + __ScriptVersion=\"${1:version}\"\n\ +\n\ + #=== FUNCTION ================================================================\n\ + # NAME: usage\n\ + # DESCRIPTION: Display usage information.\n\ + #===============================================================================\n\ + function usage ()\n\ + {\n\ + cat <<- EOT\n\ +\n\ + Usage : $${0:0} [options] [--] \n\ +\n\ + Options: \n\ + -h|help Display this message\n\ + -v|version Display script version\n\ +\n\ + EOT\n\ + } # ---------- end of function usage ----------\n\ +\n\ + #-----------------------------------------------------------------------\n\ + # Handle command line arguments\n\ + #-----------------------------------------------------------------------\n\ +\n\ + while getopts \":hv\" opt\n\ + do\n\ + case $opt in\n\ +\n\ + h|help ) usage; exit 0 ;;\n\ +\n\ + v|version ) echo \"$${0:0} -- Version $__ScriptVersion\"; exit 0 ;;\n\ +\n\ + \\? ) echo -e \"\\n Option does not exist : $OPTARG\\n\"\n\ + usage; exit 1 ;;\n\ +\n\ + esac # --- end of case ---\n\ + done\n\ + shift $(($OPTIND-1))\n\ +\n\ +"; +exports.scope = "sh"; + +}); diff --git a/lib/ace/src-noconflict/snippets/sjs.js b/lib/ace/src-noconflict/snippets/sjs.js new file mode 100644 index 00000000..cf39a34e --- /dev/null +++ b/lib/ace/src-noconflict/snippets/sjs.js @@ -0,0 +1,7 @@ +ace.define("ace/snippets/sjs",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "sjs"; + +}); diff --git a/lib/ace/src-noconflict/snippets/smarty.js b/lib/ace/src-noconflict/snippets/smarty.js new file mode 100644 index 00000000..47319a25 --- /dev/null +++ b/lib/ace/src-noconflict/snippets/smarty.js @@ -0,0 +1,7 @@ +ace.define("ace/snippets/smarty",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "smarty"; + +}); diff --git a/lib/ace/src-noconflict/snippets/snippets.js b/lib/ace/src-noconflict/snippets/snippets.js new file mode 100644 index 00000000..b81605cc --- /dev/null +++ b/lib/ace/src-noconflict/snippets/snippets.js @@ -0,0 +1,16 @@ +ace.define("ace/snippets/snippets",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText = "# snippets for making snippets :)\n\ +snippet snip\n\ + snippet ${1:trigger}\n\ + ${2}\n\ +snippet msnip\n\ + snippet ${1:trigger} ${2:description}\n\ + ${3}\n\ +snippet v\n\ + {VISUAL}\n\ +"; +exports.scope = "snippets"; + +}); diff --git a/lib/ace/src-noconflict/snippets/soy_template.js b/lib/ace/src-noconflict/snippets/soy_template.js new file mode 100644 index 00000000..908f5fdf --- /dev/null +++ b/lib/ace/src-noconflict/snippets/soy_template.js @@ -0,0 +1,7 @@ +ace.define("ace/snippets/soy_template",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "soy_template"; + +}); diff --git a/lib/ace/src-noconflict/snippets/space.js b/lib/ace/src-noconflict/snippets/space.js new file mode 100644 index 00000000..302b84e0 --- /dev/null +++ b/lib/ace/src-noconflict/snippets/space.js @@ -0,0 +1,7 @@ +ace.define("ace/snippets/space",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "space"; + +}); diff --git a/lib/ace/src-noconflict/snippets/sql.js b/lib/ace/src-noconflict/snippets/sql.js new file mode 100644 index 00000000..1822126b --- /dev/null +++ b/lib/ace/src-noconflict/snippets/sql.js @@ -0,0 +1,33 @@ +ace.define("ace/snippets/sql",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText = "snippet tbl\n\ + create table ${1:table} (\n\ + ${2:columns}\n\ + );\n\ +snippet col\n\ + ${1:name} ${2:type} ${3:default ''} ${4:not null}\n\ +snippet ccol\n\ + ${1:name} varchar2(${2:size}) ${3:default ''} ${4:not null}\n\ +snippet ncol\n\ + ${1:name} number ${3:default 0} ${4:not null}\n\ +snippet dcol\n\ + ${1:name} date ${3:default sysdate} ${4:not null}\n\ +snippet ind\n\ + create index ${3:$1_$2} on ${1:table}(${2:column});\n\ +snippet uind\n\ + create unique index ${1:name} on ${2:table}(${3:column});\n\ +snippet tblcom\n\ + comment on table ${1:table} is '${2:comment}';\n\ +snippet colcom\n\ + comment on column ${1:table}.${2:column} is '${3:comment}';\n\ +snippet addcol\n\ + alter table ${1:table} add (${2:column} ${3:type});\n\ +snippet seq\n\ + create sequence ${1:name} start with ${2:1} increment by ${3:1} minvalue ${4:1};\n\ +snippet s*\n\ + select * from ${1:table}\n\ +"; +exports.scope = "sql"; + +}); diff --git a/lib/ace/src-noconflict/snippets/stylus.js b/lib/ace/src-noconflict/snippets/stylus.js new file mode 100644 index 00000000..5f700bae --- /dev/null +++ b/lib/ace/src-noconflict/snippets/stylus.js @@ -0,0 +1,7 @@ +ace.define("ace/snippets/stylus",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "stylus"; + +}); diff --git a/lib/ace/src-noconflict/snippets/svg.js b/lib/ace/src-noconflict/snippets/svg.js new file mode 100644 index 00000000..69a3408e --- /dev/null +++ b/lib/ace/src-noconflict/snippets/svg.js @@ -0,0 +1,7 @@ +ace.define("ace/snippets/svg",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "svg"; + +}); diff --git a/lib/ace/src-noconflict/snippets/tcl.js b/lib/ace/src-noconflict/snippets/tcl.js new file mode 100644 index 00000000..4d116da8 --- /dev/null +++ b/lib/ace/src-noconflict/snippets/tcl.js @@ -0,0 +1,99 @@ +ace.define("ace/snippets/tcl",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText = "# #!/usr/bin/env tclsh\n\ +snippet #!\n\ + #!/usr/bin/env tclsh\n\ + \n\ +# Process\n\ +snippet pro\n\ + proc ${1:function_name} {${2:args}} {\n\ + ${3:#body ...}\n\ + }\n\ +#xif\n\ +snippet xif\n\ + ${1:expr}? ${2:true} : ${3:false}\n\ +# Conditional\n\ +snippet if\n\ + if {${1}} {\n\ + ${2:# body...}\n\ + }\n\ +# Conditional if..else\n\ +snippet ife\n\ + if {${1}} {\n\ + ${2:# body...}\n\ + } else {\n\ + ${3:# else...}\n\ + }\n\ +# Conditional if..elsif..else\n\ +snippet ifee\n\ + if {${1}} {\n\ + ${2:# body...}\n\ + } elseif {${3}} {\n\ + ${4:# elsif...}\n\ + } else {\n\ + ${5:# else...}\n\ + }\n\ +# If catch then\n\ +snippet ifc\n\ + if { [catch {${1:#do something...}} ${2:err}] } {\n\ + ${3:# handle failure...}\n\ + }\n\ +# Catch\n\ +snippet catch\n\ + catch {${1}} ${2:err} ${3:options}\n\ +# While Loop\n\ +snippet wh\n\ + while {${1}} {\n\ + ${2:# body...}\n\ + }\n\ +# For Loop\n\ +snippet for\n\ + for {set ${2:var} 0} {$$2 < ${1:count}} {${3:incr} $2} {\n\ + ${4:# body...}\n\ + }\n\ +# Foreach Loop\n\ +snippet fore\n\ + foreach ${1:x} {${2:#list}} {\n\ + ${3:# body...}\n\ + }\n\ +# after ms script...\n\ +snippet af\n\ + after ${1:ms} ${2:#do something}\n\ +# after cancel id\n\ +snippet afc\n\ + after cancel ${1:id or script}\n\ +# after idle\n\ +snippet afi\n\ + after idle ${1:script}\n\ +# after info id\n\ +snippet afin\n\ + after info ${1:id}\n\ +# Expr\n\ +snippet exp\n\ + expr {${1:#expression here}}\n\ +# Switch\n\ +snippet sw\n\ + switch ${1:var} {\n\ + ${3:pattern 1} {\n\ + ${4:#do something}\n\ + }\n\ + default {\n\ + ${2:#do something}\n\ + }\n\ + }\n\ +# Case\n\ +snippet ca\n\ + ${1:pattern} {\n\ + ${2:#do something}\n\ + }${3}\n\ +# Namespace eval\n\ +snippet ns\n\ + namespace eval ${1:path} {${2:#script...}}\n\ +# Namespace current\n\ +snippet nsc\n\ + namespace current\n\ +"; +exports.scope = "tcl"; + +}); diff --git a/lib/ace/src-noconflict/snippets/tex.js b/lib/ace/src-noconflict/snippets/tex.js new file mode 100644 index 00000000..2bd3f103 --- /dev/null +++ b/lib/ace/src-noconflict/snippets/tex.js @@ -0,0 +1,197 @@ +ace.define("ace/snippets/tex",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText = "#PREAMBLE\n\ +#newcommand\n\ +snippet nc\n\ + \\newcommand{\\${1:cmd}}[${2:opt}]{${3:realcmd}}${4}\n\ +#usepackage\n\ +snippet up\n\ + \\usepackage[${1:[options}]{${2:package}}\n\ +#newunicodechar\n\ +snippet nuc\n\ + \\newunicodechar{${1}}{${2:\\ensuremath}${3:tex-substitute}}}\n\ +#DeclareMathOperator\n\ +snippet dmo\n\ + \\DeclareMathOperator{${1}}{${2}}\n\ +\n\ +#DOCUMENT\n\ +# \\begin{}...\\end{}\n\ +snippet begin\n\ + \\begin{${1:env}}\n\ + ${2}\n\ + \\end{$1}\n\ +# Tabular\n\ +snippet tab\n\ + \\begin{${1:tabular}}{${2:c}}\n\ + ${3}\n\ + \\end{$1}\n\ +snippet thm\n\ + \\begin[${1:author}]{${2:thm}}\n\ + ${3}\n\ + \\end{$1}\n\ +snippet center\n\ + \\begin{center}\n\ + ${1}\n\ + \\end{center}\n\ +# Align(ed)\n\ +snippet ali\n\ + \\begin{align${1:ed}}\n\ + ${2}\n\ + \\end{align$1}\n\ +# Gather(ed)\n\ +snippet gat\n\ + \\begin{gather${1:ed}}\n\ + ${2}\n\ + \\end{gather$1}\n\ +# Equation\n\ +snippet eq\n\ + \\begin{equation}\n\ + ${1}\n\ + \\end{equation}\n\ +# Equation\n\ +snippet eq*\n\ + \\begin{equation*}\n\ + ${1}\n\ + \\end{equation*}\n\ +# Unnumbered Equation\n\ +snippet \\\n\ + \\[\n\ + ${1}\n\ + \\]\n\ +# Enumerate\n\ +snippet enum\n\ + \\begin{enumerate}\n\ + \\item ${1}\n\ + \\end{enumerate}\n\ +# Itemize\n\ +snippet itemize\n\ + \\begin{itemize}\n\ + \\item ${1}\n\ + \\end{itemize}\n\ +# Description\n\ +snippet desc\n\ + \\begin{description}\n\ + \\item[${1}] ${2}\n\ + \\end{description}\n\ +# Matrix\n\ +snippet mat\n\ + \\begin{${1:p/b/v/V/B/small}matrix}\n\ + ${2}\n\ + \\end{$1matrix}\n\ +# Cases\n\ +snippet cas\n\ + \\begin{cases}\n\ + ${1:equation}, &\\text{ if }${2:case}\\\\\n\ + ${3}\n\ + \\end{cases}\n\ +# Split\n\ +snippet spl\n\ + \\begin{split}\n\ + ${1}\n\ + \\end{split}\n\ +# Part\n\ +snippet part\n\ + \\part{${1:part name}} % (fold)\n\ + \\label{prt:${2:$1}}\n\ + ${3}\n\ + % part $2 (end)\n\ +# Chapter\n\ +snippet cha\n\ + \\chapter{${1:chapter name}}\n\ + \\label{cha:${2:$1}}\n\ + ${3}\n\ +# Section\n\ +snippet sec\n\ + \\section{${1:section name}}\n\ + \\label{sec:${2:$1}}\n\ + ${3}\n\ +# Sub Section\n\ +snippet sub\n\ + \\subsection{${1:subsection name}}\n\ + \\label{sub:${2:$1}}\n\ + ${3}\n\ +# Sub Sub Section\n\ +snippet subs\n\ + \\subsubsection{${1:subsubsection name}}\n\ + \\label{ssub:${2:$1}}\n\ + ${3}\n\ +# Paragraph\n\ +snippet par\n\ + \\paragraph{${1:paragraph name}}\n\ + \\label{par:${2:$1}}\n\ + ${3}\n\ +# Sub Paragraph\n\ +snippet subp\n\ + \\subparagraph{${1:subparagraph name}}\n\ + \\label{subp:${2:$1}}\n\ + ${3}\n\ +#References\n\ +snippet itd\n\ + \\item[${1:description}] ${2:item}\n\ +snippet figure\n\ + ${1:Figure}~\\ref{${2:fig:}}${3}\n\ +snippet table\n\ + ${1:Table}~\\ref{${2:tab:}}${3}\n\ +snippet listing\n\ + ${1:Listing}~\\ref{${2:list}}${3}\n\ +snippet section\n\ + ${1:Section}~\\ref{${2:sec:}}${3}\n\ +snippet page\n\ + ${1:page}~\\pageref{${2}}${3}\n\ +snippet index\n\ + \\index{${1:index}}${2}\n\ +#Citations\n\ +snippet cite\n\ + \\cite[${1}]{${2}}${3}\n\ +snippet fcite\n\ + \\footcite[${1}]{${2}}${3}\n\ +#Formating text: italic, bold, underline, small capital, emphase ..\n\ +snippet it\n\ + \\textit{${1:text}}\n\ +snippet bf\n\ + \\textbf{${1:text}}\n\ +snippet under\n\ + \\underline{${1:text}}\n\ +snippet emp\n\ + \\emph{${1:text}}\n\ +snippet sc\n\ + \\textsc{${1:text}}\n\ +#Choosing font\n\ +snippet sf\n\ + \\textsf{${1:text}}\n\ +snippet rm\n\ + \\textrm{${1:text}}\n\ +snippet tt\n\ + \\texttt{${1:text}}\n\ +#misc\n\ +snippet ft\n\ + \\footnote{${1:text}}\n\ +snippet fig\n\ + \\begin{figure}\n\ + \\begin{center}\n\ + \\includegraphics[scale=${1}]{Figures/${2}}\n\ + \\end{center}\n\ + \\caption{${3}}\n\ + \\label{fig:${4}}\n\ + \\end{figure}\n\ +snippet tikz\n\ + \\begin{figure}\n\ + \\begin{center}\n\ + \\begin{tikzpicture}[scale=${1:1}]\n\ + ${2}\n\ + \\end{tikzpicture}\n\ + \\end{center}\n\ + \\caption{${3}}\n\ + \\label{fig:${4}}\n\ + \\end{figure}\n\ +#math\n\ +snippet stackrel\n\ + \\stackrel{${1:above}}{${2:below}} ${3}\n\ +snippet frac\n\ + \\frac{${1:num}}{${2:denom}}\n\ +snippet sum\n\ + \\sum^{${1:n}}_{${2:i=1}}{${3}}"; +exports.scope = "tex"; + +}); diff --git a/lib/ace/src-noconflict/snippets/text.js b/lib/ace/src-noconflict/snippets/text.js new file mode 100644 index 00000000..57b897bf --- /dev/null +++ b/lib/ace/src-noconflict/snippets/text.js @@ -0,0 +1,7 @@ +ace.define("ace/snippets/text",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "text"; + +}); diff --git a/lib/ace/src-noconflict/snippets/textile.js b/lib/ace/src-noconflict/snippets/textile.js new file mode 100644 index 00000000..a6fd711e --- /dev/null +++ b/lib/ace/src-noconflict/snippets/textile.js @@ -0,0 +1,37 @@ +ace.define("ace/snippets/textile",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText = "# Jekyll post header\n\ +snippet header\n\ + ---\n\ + title: ${1:title}\n\ + layout: post\n\ + date: ${2:date} ${3:hour:minute:second} -05:00\n\ + ---\n\ +\n\ +# Image\n\ +snippet img\n\ + !${1:url}(${2:title}):${3:link}!\n\ +\n\ +# Table\n\ +snippet |\n\ + |${1}|${2}\n\ +\n\ +# Link\n\ +snippet link\n\ + \"${1:link text}\":${2:url}\n\ +\n\ +# Acronym\n\ +snippet (\n\ + (${1:Expand acronym})${2}\n\ +\n\ +# Footnote\n\ +snippet fn\n\ + [${1:ref number}] ${3}\n\ +\n\ + fn$1. ${2:footnote}\n\ + \n\ +"; +exports.scope = "textile"; + +}); diff --git a/lib/ace/src-noconflict/snippets/toml.js b/lib/ace/src-noconflict/snippets/toml.js new file mode 100644 index 00000000..0c1a857b --- /dev/null +++ b/lib/ace/src-noconflict/snippets/toml.js @@ -0,0 +1,7 @@ +ace.define("ace/snippets/toml",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "toml"; + +}); diff --git a/lib/ace/src-noconflict/snippets/twig.js b/lib/ace/src-noconflict/snippets/twig.js new file mode 100644 index 00000000..ccc6073c --- /dev/null +++ b/lib/ace/src-noconflict/snippets/twig.js @@ -0,0 +1,7 @@ +ace.define("ace/snippets/twig",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "twig"; + +}); diff --git a/lib/ace/src-noconflict/snippets/typescript.js b/lib/ace/src-noconflict/snippets/typescript.js new file mode 100644 index 00000000..5f6217d0 --- /dev/null +++ b/lib/ace/src-noconflict/snippets/typescript.js @@ -0,0 +1,7 @@ +ace.define("ace/snippets/typescript",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "typescript"; + +}); diff --git a/lib/ace/src-noconflict/snippets/vala.js b/lib/ace/src-noconflict/snippets/vala.js new file mode 100644 index 00000000..3b493422 --- /dev/null +++ b/lib/ace/src-noconflict/snippets/vala.js @@ -0,0 +1,193 @@ +ace.define("ace/snippets/vala",["require","exports","module"], function(require, exports, module) { +"use strict"; +exports.snippets = [ + { + "content": "case ${1:condition}:\n\t$0\n\tbreak;\n", + "name": "case", + "scope": "vala", + "tabTrigger": "case" + }, + { + "content": "/**\n * ${6}\n */\n${1:public} class ${2:MethodName}${3: : GLib.Object} {\n\n\t/**\n\t * ${7}\n\t */\n\tpublic ${2}(${4}) {\n\t\t${5}\n\t}\n\n\t$0\n}", + "name": "class", + "scope": "vala", + "tabTrigger": "class" + }, + { + "content": "(${1}) => {\n\t${0}\n}\n", + "name": "closure", + "scope": "vala", + "tabTrigger": "=>" + }, + { + "content": "/*\n * $0\n */", + "name": "Comment (multiline)", + "scope": "vala", + "tabTrigger": "/*" + }, + { + "content": "Console.WriteLine($1);\n$0", + "name": "Console.WriteLine (writeline)", + "scope": "vala", + "tabTrigger": "writeline" + }, + { + "content": "[DBus(name = \"$0\")]", + "name": "DBus annotation", + "scope": "vala", + "tabTrigger": "[DBus" + }, + { + "content": "delegate ${1:void} ${2:DelegateName}($0);", + "name": "delegate", + "scope": "vala", + "tabTrigger": "delegate" + }, + { + "content": "do {\n\t$0\n} while ($1);\n", + "name": "do while", + "scope": "vala", + "tabTrigger": "dowhile" + }, + { + "content": "/**\n * $0\n */", + "name": "DocBlock", + "scope": "vala", + "tabTrigger": "/**" + }, + { + "content": "else if ($1) {\n\t$0\n}\n", + "name": "else if (elseif)", + "scope": "vala", + "tabTrigger": "elseif" + }, + { + "content": "else {\n\t$0\n}", + "name": "else", + "scope": "vala", + "tabTrigger": "else" + }, + { + "content": "enum {$1:EnumName} {\n\t$0\n}", + "name": "enum", + "scope": "vala", + "tabTrigger": "enum" + }, + { + "content": "public errordomain ${1:Error} {\n\t$0\n}", + "name": "error domain", + "scope": "vala", + "tabTrigger": "errordomain" + }, + { + "content": "for ($1;$2;$3) {\n\t$0\n}", + "name": "for", + "scope": "vala", + "tabTrigger": "for" + }, + { + "content": "foreach ($1 in $2) {\n\t$0\n}", + "name": "foreach", + "scope": "vala", + "tabTrigger": "foreach" + }, + { + "content": "Gee.ArrayList<${1:G}>($0);", + "name": "Gee.ArrayList", + "scope": "vala", + "tabTrigger": "ArrayList" + }, + { + "content": "Gee.HashMap<${1:K},${2:V}>($0);", + "name": "Gee.HashMap", + "scope": "vala", + "tabTrigger": "HashMap" + }, + { + "content": "Gee.HashSet<${1:G}>($0);", + "name": "Gee.HashSet", + "scope": "vala", + "tabTrigger": "HashSet" + }, + { + "content": "if ($1) {\n\t$0\n}", + "name": "if", + "scope": "vala", + "tabTrigger": "if" + }, + { + "content": "interface ${1:InterfaceName}{$2: : SuperInterface} {\n\t$0\n}", + "name": "interface", + "scope": "vala", + "tabTrigger": "interface" + }, + { + "content": "public static int main(string [] argv) {\n\t${0}\n\treturn 0;\n}", + "name": "Main function", + "scope": "vala", + "tabTrigger": "main" + }, + { + "content": "namespace $1 {\n\t$0\n}\n", + "name": "namespace (ns)", + "scope": "vala", + "tabTrigger": "ns" + }, + { + "content": "stdout.printf($0);", + "name": "printf", + "scope": "vala", + "tabTrigger": "printf" + }, + { + "content": "${1:public} ${2:Type} ${3:Name} {\n\tset {\n\t\t$0\n\t}\n\tget {\n\n\t}\n}", + "name": "property (prop)", + "scope": "vala", + "tabTrigger": "prop" + }, + { + "content": "${1:public} ${2:Type} ${3:Name} {\n\tget {\n\t\t$0\n\t}\n}", + "name": "read-only property (roprop)", + "scope": "vala", + "tabTrigger": "roprop" + }, + { + "content": "@\"${1:\\$var}\"", + "name": "String template (@)", + "scope": "vala", + "tabTrigger": "@" + }, + { + "content": "struct ${1:StructName} {\n\t$0\n}", + "name": "struct", + "scope": "vala", + "tabTrigger": "struct" + }, + { + "content": "switch ($1) {\n\t$0\n}", + "name": "switch", + "scope": "vala", + "tabTrigger": "switch" + }, + { + "content": "try {\n\t$2\n} catch (${1:Error} e) {\n\t$0\n}", + "name": "try/catch", + "scope": "vala", + "tabTrigger": "try" + }, + { + "content": "\"\"\"$0\"\"\";", + "name": "Verbatim string (\"\"\")", + "scope": "vala", + "tabTrigger": "verbatim" + }, + { + "content": "while ($1) {\n\t$0\n}", + "name": "while", + "scope": "vala", + "tabTrigger": "while" + } +]; +exports.scope = ""; + +}); diff --git a/lib/ace/src-noconflict/snippets/vbscript.js b/lib/ace/src-noconflict/snippets/vbscript.js new file mode 100644 index 00000000..38ca68fb --- /dev/null +++ b/lib/ace/src-noconflict/snippets/vbscript.js @@ -0,0 +1,7 @@ +ace.define("ace/snippets/vbscript",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "vbscript"; + +}); diff --git a/lib/ace/src-noconflict/snippets/velocity.js b/lib/ace/src-noconflict/snippets/velocity.js new file mode 100644 index 00000000..e2b12a45 --- /dev/null +++ b/lib/ace/src-noconflict/snippets/velocity.js @@ -0,0 +1,36 @@ +ace.define("ace/snippets/velocity",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText = "# macro\n\ +snippet #macro\n\ + #macro ( ${1:macroName} ${2:\\$var1, [\\$var2, ...]} )\n\ + ${3:## macro code}\n\ + #end\n\ +# foreach\n\ +snippet #foreach\n\ + #foreach ( ${1:\\$item} in ${2:\\$collection} )\n\ + ${3:## foreach code}\n\ + #end\n\ +# if\n\ +snippet #if\n\ + #if ( ${1:true} )\n\ + ${0}\n\ + #end\n\ +# if ... else\n\ +snippet #ife\n\ + #if ( ${1:true} )\n\ + ${2}\n\ + #else\n\ + ${0}\n\ + #end\n\ +#import\n\ +snippet #import\n\ + #import ( \"${1:path/to/velocity/format}\" )\n\ +# set\n\ +snippet #set\n\ + #set ( $${1:var} = ${0} )\n\ +"; +exports.scope = "velocity"; +exports.includeScopes = ["html", "javascript", "css"]; + +}); diff --git a/lib/ace/src-noconflict/snippets/verilog.js b/lib/ace/src-noconflict/snippets/verilog.js new file mode 100644 index 00000000..8103ff6f --- /dev/null +++ b/lib/ace/src-noconflict/snippets/verilog.js @@ -0,0 +1,7 @@ +ace.define("ace/snippets/verilog",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "verilog"; + +}); diff --git a/lib/ace/src-noconflict/snippets/vhdl.js b/lib/ace/src-noconflict/snippets/vhdl.js new file mode 100644 index 00000000..10d8ca09 --- /dev/null +++ b/lib/ace/src-noconflict/snippets/vhdl.js @@ -0,0 +1,7 @@ +ace.define("ace/snippets/vhdl",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "vhdl"; + +}); diff --git a/lib/ace/src-noconflict/snippets/xml.js b/lib/ace/src-noconflict/snippets/xml.js new file mode 100644 index 00000000..ee4b688a --- /dev/null +++ b/lib/ace/src-noconflict/snippets/xml.js @@ -0,0 +1,7 @@ +ace.define("ace/snippets/xml",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "xml"; + +}); diff --git a/lib/ace/src-noconflict/snippets/xquery.js b/lib/ace/src-noconflict/snippets/xquery.js new file mode 100644 index 00000000..c880abcf --- /dev/null +++ b/lib/ace/src-noconflict/snippets/xquery.js @@ -0,0 +1,68 @@ +ace.define("ace/snippets/xquery",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText = "snippet for\n\ + for $${1:item} in ${2:expr}\n\ +snippet return\n\ + return ${1:expr}\n\ +snippet import\n\ + import module namespace ${1:ns} = \"${2:http://www.example.com/}\";\n\ +snippet some\n\ + some $${1:varname} in ${2:expr} satisfies ${3:expr}\n\ +snippet every\n\ + every $${1:varname} in ${2:expr} satisfies ${3:expr}\n\ +snippet if\n\ + if(${1:true}) then ${2:expr} else ${3:true}\n\ +snippet switch\n\ + switch(${1:\"foo\"})\n\ + case ${2:\"foo\"}\n\ + return ${3:true}\n\ + default return ${4:false}\n\ +snippet try\n\ + try { ${1:expr} } catch ${2:*} { ${3:expr} }\n\ +snippet tumbling\n\ + for tumbling window $${1:varname} in ${2:expr}\n\ + start at $${3:start} when ${4:expr}\n\ + end at $${5:end} when ${6:expr}\n\ + return ${7:expr}\n\ +snippet sliding\n\ + for sliding window $${1:varname} in ${2:expr}\n\ + start at $${3:start} when ${4:expr}\n\ + end at $${5:end} when ${6:expr}\n\ + return ${7:expr}\n\ +snippet let\n\ + let $${1:varname} := ${2:expr}\n\ +snippet group\n\ + group by $${1:varname} := ${2:expr}\n\ +snippet order\n\ + order by ${1:expr} ${2:descending}\n\ +snippet stable\n\ + stable order by ${1:expr}\n\ +snippet count\n\ + count $${1:varname}\n\ +snippet ordered\n\ + ordered { ${1:expr} }\n\ +snippet unordered\n\ + unordered { ${1:expr} }\n\ +snippet treat \n\ + treat as ${1:expr}\n\ +snippet castable\n\ + castable as ${1:atomicType}\n\ +snippet cast\n\ + cast as ${1:atomicType}\n\ +snippet typeswitch\n\ + typeswitch(${1:expr})\n\ + case ${2:type} return ${3:expr}\n\ + default return ${4:expr}\n\ +snippet var\n\ + declare variable $${1:varname} := ${2:expr};\n\ +snippet fn\n\ + declare function ${1:ns}:${2:name}(){\n\ + ${3:expr}\n\ + };\n\ +snippet module\n\ + module namespace ${1:ns} = \"${2:http://www.example.com}\";\n\ +"; +exports.scope = "xquery"; + +}); diff --git a/lib/ace/src-noconflict/snippets/yaml.js b/lib/ace/src-noconflict/snippets/yaml.js new file mode 100644 index 00000000..1adceabe --- /dev/null +++ b/lib/ace/src-noconflict/snippets/yaml.js @@ -0,0 +1,7 @@ +ace.define("ace/snippets/yaml",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "yaml"; + +}); diff --git a/lib/ace/src-noconflict/theme-ambiance.js b/lib/ace/src-noconflict/theme-ambiance.js new file mode 100644 index 00000000..1e53ecd9 --- /dev/null +++ b/lib/ace/src-noconflict/theme-ambiance.js @@ -0,0 +1,182 @@ +ace.define("ace/theme/ambiance",["require","exports","module","ace/lib/dom"], function(require, exports, module) { + +exports.isDark = true; +exports.cssClass = "ace-ambiance"; +exports.cssText = ".ace-ambiance .ace_gutter {\ +background-color: #3d3d3d;\ +background-image: -moz-linear-gradient(left, #3D3D3D, #333);\ +background-image: -ms-linear-gradient(left, #3D3D3D, #333);\ +background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#3D3D3D), to(#333));\ +background-image: -webkit-linear-gradient(left, #3D3D3D, #333);\ +background-image: -o-linear-gradient(left, #3D3D3D, #333);\ +background-image: linear-gradient(left, #3D3D3D, #333);\ +background-repeat: repeat-x;\ +border-right: 1px solid #4d4d4d;\ +text-shadow: 0px 1px 1px #4d4d4d;\ +color: #222;\ +}\ +.ace-ambiance .ace_gutter-layer {\ +background: repeat left top;\ +}\ +.ace-ambiance .ace_gutter-active-line {\ +background-color: #3F3F3F;\ +}\ +.ace-ambiance .ace_fold-widget {\ +text-align: center;\ +}\ +.ace-ambiance .ace_fold-widget:hover {\ +color: #777;\ +}\ +.ace-ambiance .ace_fold-widget.ace_start,\ +.ace-ambiance .ace_fold-widget.ace_end,\ +.ace-ambiance .ace_fold-widget.ace_closed{\ +background: none;\ +border: none;\ +box-shadow: none;\ +}\ +.ace-ambiance .ace_fold-widget.ace_start:after {\ +content: '▾'\ +}\ +.ace-ambiance .ace_fold-widget.ace_end:after {\ +content: '▴'\ +}\ +.ace-ambiance .ace_fold-widget.ace_closed:after {\ +content: '‣'\ +}\ +.ace-ambiance .ace_print-margin {\ +border-left: 1px dotted #2D2D2D;\ +right: 0;\ +background: #262626;\ +}\ +.ace-ambiance .ace_scroller {\ +-webkit-box-shadow: inset 0 0 10px black;\ +-moz-box-shadow: inset 0 0 10px black;\ +-o-box-shadow: inset 0 0 10px black;\ +box-shadow: inset 0 0 10px black;\ +}\ +.ace-ambiance {\ +color: #E6E1DC;\ +background-color: #202020;\ +}\ +.ace-ambiance .ace_cursor {\ +border-left: 1px solid #7991E8;\ +}\ +.ace-ambiance .ace_overwrite-cursors .ace_cursor {\ +border: 1px solid #FFE300;\ +background: #766B13;\ +}\ +.ace-ambiance.normal-mode .ace_cursor-layer {\ +z-index: 0;\ +}\ +.ace-ambiance .ace_marker-layer .ace_selection {\ +background: rgba(221, 240, 255, 0.20);\ +}\ +.ace-ambiance .ace_marker-layer .ace_selected-word {\ +border-radius: 4px;\ +border: 8px solid #3f475d;\ +box-shadow: 0 0 4px black;\ +}\ +.ace-ambiance .ace_marker-layer .ace_step {\ +background: rgb(198, 219, 174);\ +}\ +.ace-ambiance .ace_marker-layer .ace_bracket {\ +margin: -1px 0 0 -1px;\ +border: 1px solid rgba(255, 255, 255, 0.25);\ +}\ +.ace-ambiance .ace_marker-layer .ace_active-line {\ +background: rgba(255, 255, 255, 0.031);\ +}\ +.ace-ambiance .ace_invisible {\ +color: #333;\ +}\ +.ace-ambiance .ace_paren {\ +color: #24C2C7;\ +}\ +.ace-ambiance .ace_keyword {\ +color: #cda869;\ +}\ +.ace-ambiance .ace_keyword.ace_operator {\ +color: #fa8d6a;\ +}\ +.ace-ambiance .ace_punctuation.ace_operator {\ +color: #fa8d6a;\ +}\ +.ace-ambiance .ace_identifier {\ +}\ +.ace-ambiance .ace-statement {\ +color: #cda869;\ +}\ +.ace-ambiance .ace_constant {\ +color: #CF7EA9;\ +}\ +.ace-ambiance .ace_constant.ace_language {\ +color: #CF7EA9;\ +}\ +.ace-ambiance .ace_constant.ace_library {\ +}\ +.ace-ambiance .ace_constant.ace_numeric {\ +color: #78CF8A;\ +}\ +.ace-ambiance .ace_invalid {\ +text-decoration: underline;\ +}\ +.ace-ambiance .ace_invalid.ace_illegal {\ +color:#F8F8F8;\ +background-color: rgba(86, 45, 86, 0.75);\ +}\ +.ace-ambiance .ace_invalid,\ +.ace-ambiance .ace_deprecated {\ +text-decoration: underline;\ +font-style: italic;\ +color: #D2A8A1;\ +}\ +.ace-ambiance .ace_support {\ +color: #9B859D;\ +}\ +.ace-ambiance .ace_support.ace_function {\ +color: #DAD085;\ +}\ +.ace-ambiance .ace_function.ace_buildin {\ +color: #9b859d;\ +}\ +.ace-ambiance .ace_string {\ +color: #8f9d6a;\ +}\ +.ace-ambiance .ace_string.ace_regexp {\ +color: #DAD085;\ +}\ +.ace-ambiance .ace_comment {\ +font-style: italic;\ +color: #555;\ +}\ +.ace-ambiance .ace_comment.ace_doc {\ +}\ +.ace-ambiance .ace_comment.ace_doc.ace_tag {\ +color: #666;\ +font-style: normal;\ +}\ +.ace-ambiance .ace_definition,\ +.ace-ambiance .ace_type {\ +color: #aac6e3;\ +}\ +.ace-ambiance .ace_variable {\ +color: #9999cc;\ +}\ +.ace-ambiance .ace_variable.ace_language {\ +color: #9b859d;\ +}\ +.ace-ambiance .ace_xml-pe {\ +color: #494949;\ +}\ +.ace-ambiance .ace_gutter-layer,\ +.ace-ambiance .ace_text-layer {\ +background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAQAAAAHUWYVAABFFUlEQVQYGbzBCeDVU/74/6fj9HIcx/FRHx9JCFmzMyGRURhLZIkUsoeRfUjS2FNDtr6WkMhO9sm+S8maJfu+Jcsg+/o/c+Z4z/t97/vezy3z+z8ekGlnYICG/o7gdk+wmSHZ1z4pJItqapjoKXWahm8NmV6eOTbWUOp6/6a/XIg6GQqmenJ2lDHyvCFZ2cBDbmtHA043VFhHwXxClWmeYAdLhV00Bd85go8VmaFCkbVkzlQENzfBDZ5gtN7HwF0KDrTwJ0dypSOzpaKCMwQHKTIreYIxlmhXTzTWkVm+LTynZhiSBT3RZQ7aGfjGEd3qyXQ1FDymqbKxpspERQN2MiRjNZlFFQXfCNFm9nM1zpAsoYjmtRTc5ajwuaXc5xrWskT97RaKzAGe5ARHhVUsDbjKklziiX5WROcJwSNCNI+9w1Jwv4Zb2r7lCMZ4oq5C0EdTx+2GzNuKpJ+iFf38JEWkHJn9DNF7mmBDITrWEg0VWL3pHU20tSZnuqWu+R3BtYa8XxV1HO7GyD32UkOpL/yDloINFTmvtId+nmAjxRw40VMwVKiwrKLE4bK5UOVntYwhOcSSXKrJHKPJedocpGjVz/ZMIbnYUPB10/eKCrs5apqpgVmWzBYWpmtKHecJPjaUuEgRDDaU0oZghCJ6zNMQ5ZhDYx05r5v2muQdM0EILtXUsaKiQX9WMEUotagQzFbUNN6NUPC2nm5pxEWGCjMc3GdJHjSU2kORLK/JGSrkfGEIjncU/CYUnOipoYemwj8tST9NsJmB7TUVXtbUtXATJVZXBMvYeTXJfobgJUPmGMP/yFaWonaa6BcFO3nqcIqCozSZoZoSr1g4zJOzuyGnxTEX3lUEJ7WcZgme8ddaWvWJo2AJR9DZU3CUIbhCSG6ybSwN6qtJVnCU2svDTP2ZInOw2cBTrqtQahtNZn9NcJ4l2NaSmSkkP1noZWnVwkLmdUPOwLZEwy2Z3S3R+4rIG9hcbpPXHFVWcQdZkn2FOta3cKWQnNRC5g1LsJah4GCzSVsKnCOY5OAFRTBekyyryeyilhFKva75r4Mc0aWanGEaThcy31s439KKxTzJYY5WTHPU1FtIHjQU3Oip4xlNzj/lBw23dYZVliQa7WAXf4shetcQfatI+jWRDBPmyNeW6A1P5kdDgyYJlba0BIM8BZu1JfrFwItyjcAMR3K0BWOIrtMEXyhyrlVEx3ui5dUBjmB/Q3CXW85R4mBD0s7B+4q5tKUjOlb9qqmhi5AZ6GFIC5HXtOobdYGlVdMVbNJ8toNTFcHxnoL+muBagcctjWnbNMuR00uI7nQESwg5q2qqrKWIfrNUmeQocY6HuyxJV02wj36w00yhpmUFenv4p6fUkZYqLyuinx2RGOjhCXYyJF84oiU00YMOOhhquNdfbOB7gU88pY4xJO8LVdp6/q2voeB4R04vIdhSE40xZObx1HGGJ/ja0LBthFInKaLPPFzuCaYaoj8JjPME8yoyxo6zlBqkiUZYgq00OYMswbWO5NGmq+xhipxHLRW29ARjNKXO0wRnear8XSg4XFPLKEPUS1GqvyLwiuBUoa7zpZ0l5xxFwWmWZC1H5h5FwU8eQ7K+g8UcVY6TMQreVQT/8uQ8Z+ALIXnSEa2pYZQneE9RZbSBNYXfWYJzW/h/4j4Dp1tYVcFIC5019Vyi4ThPqSFCzjGWaHQTBU8q6vrVwgxP9Lkm840imWKpcLCjYTtrKuwvsKSnrvHCXGkSMk9p6lhckfRpIeis+N2PiszT+mFLspyGleUhDwcLrZqmyeylxwjBcKHEapqkmyangyLZRVOijwOtCY5SsG5zL0OwlCJ4y5KznF3EUNDDrinwiyLZRzOXtlBbK5ITHFGLp8Q0R6ab6mS7enI2cFrxOyHvOCFaT1HThS1krjCwqWeurCkk+willhCC+RSZnRXBiZaC5RXRIZYKp2lyfrHwiKPKR0JDzrdU2EFgpidawlFDR6FgXUMNa+g1FY3bUQh2cLCwosRdnuQTS/S+JVrGLeWIvtQUvONJxlqSQYYKpwoN2kaocLjdVsis4Mk80ESF2YpSkzwldjHkjFCUutI/r+EHDU8oCs6yzL3PhWiEooZdFMkymlas4AcI3KmoMMNSQ3tHzjGWCrcJJdYyZC7QFGwjRL9p+MrRkAGWzIaWCn9W0F3TsK01c2ZvQw0byvxuQU0r1lM0qJO7wW0kRIMdDTtXEdzi4VIh+EoIHm0mWtAtpCixlabgn83fKTI7anJe9ST7WIK1DMGpQmYeA58ImV6ezOGOzK2Kgq01pd60cKWiUi9Lievb/0vIDPHQ05Kzt4ddPckQBQtoaurjyHnek/nKzpQLrVgKPjIkh2v4uyezpv+Xoo7fPFXaGFp1vaLKxQ4uUpQQS5VuQs7BCq4xRJv7fwpVvvFEB3j+620haOuocqMhWd6TTPAEx+mdFNGHdranFe95WrWmIvlY4F1Dle2ECgc6cto7SryuqGGGha0tFQ5V53migUKmg6XKAo4qS3mik+0OZpAhOLeZKicacgaYcyx5hypYQE02ZA4xi/pNhOQxR4klNKyqacj+mpxnLTnnGSo85++3ZCZq6lrZkXlGEX3o+C9FieccJbZWVFjC0Yo1FZnJhoYMFoI1hEZ9r6hwg75HwzBNhbZCdJEfJwTPGzJvaKImw1yYX1HDAmpXR+ZJQ/SmgqMNVQb5vgamGwLtt7VwvP7Qk1xpiM5x5Cyv93E06MZmgs0Nya2azIKOYKCGBQQW97RmhKNKF02JZqHEJ4o58qp7X5EcZmc56trXEqzjCBZ1MFGR87Ql2tSTs6CGxS05PTzRQorkbw7aKoKXFDXsYW42VJih/q+FP2BdTzDTwVqOYB13liM50vG7wy28qagyuIXMeQI/Oqq8bcn5wJI50xH00CRntyfpL1T4hydYpoXgNiFzoIUTDZnLNRzh4TBHwbYGDvZkxmlyJloyr6tRihpeUG94GnKtIznREF0tzJG/OOr73JBcrSh1k6WuTprgLU+mnSGnv6Zge0NNz+kTDdH8nuAuTdJDCNb21LCiIuqlYbqGzT3RAoZofQfjFazkqeNWdYaGvYTM001EW2oKPvVk1ldUGSgUtHFwjKM1h9jnFcmy5lChoLNaQMGGDsYbKixlaMBmmsx1QjCfflwTfO/gckW0ruZ3jugKR3R5W9hGUWqCgxuFgsuaCHorotGKzGaeZB9DMsaTnKCpMtwTvOzhYk0rdrArKCqcaWmVk1+F372ur1YkKxgatI8Qfe1gIX9wE9FgS8ESmuABIXnRUbCapcKe+nO7slClSZFzpV/LkLncEb1qiO42fS3R855Su2mCLh62t1SYZZYVmKwIHjREF2uihTzB20JOkz7dkxzYQnK0UOU494wh+VWRc6Un2kpTaVgLDFEkJ/uhzRcI0YKGgpGWOlocBU/a4fKoJ/pEaNV6jip3+Es9VXY078rGnmAdf7t9ylPXS34RBSuYPs1UecZTU78WanhBCHpZ5sAoTz0LGZKjPf9TRypqWEiTvOFglL1fCEY3wY/++rbk7C8bWebA6p6om6PgOL2kp44TFJlVNBXae2rqqdZztOJpT87GQsE9jqCPIe9VReZuQ/CIgacsyZdCpIScSYqcZk8r+nsyCzhyfhOqHGOIvrLknC8wTpFcaYiGC/RU1NRbUeUpocQOnkRpGOrIOcNRx+1uA0UrzhSSt+VyS3SJpnFWkzNDqOFGIWcfR86DnmARTQ1HKIL33ExPiemeOhYSSjzlSUZZuE4TveoJLnBUOFof6KiysCbnAEcZgcUNTDOwkqWu3RWtmGpZwlHhJENdZ3miGz0lJlsKnjbwqSHQjpxnFDlTLLwqJPMZMjd7KrzkSG7VsxXBZE+F8YZkb01Oe00yyRK9psh5SYh29ySPKBo2ylNht7ZkZnsKenjKNJu9PNEyZpaCHv4Kt6RQsLvAVp7M9kIimmCUwGeWqLMmGuIotYMmWNpSahkhZw9FqZsVnKJhsjAHvtHMsTM9fCI06Dx/u3vfUXCqfsKRc4oFY2jMsoo/7DJDwZ1CsIKnJu+J9ldkpmiCxQx1rWjI+T9FwcWWzOuaYH0Hj7klNRVWEQpmaqosakiGNTFHdjS/qnUdmf0NJW5xsL0HhimCCZZSRzmSPTXJQ4aaztAwtZnoabebJ+htCaZ7Cm535ByoqXKbX1WRc4Eh2MkRXWzImVc96Cj4VdOKVxR84VdQsIUM8Psoou2byVHyZFuq7O8otbSQ2UAoeEWTudATLGSpZzVLlXVkPU2Jc+27lsw2jmg5T5VhbeE3BT083K9WsTTkFU/Osi0rC5lRlpwRHUiesNS0sOvmqGML1aRbPAxTJD9ZKtxuob+hhl8cwYGWpJ8nub7t5p6coYbMovZ1BTdaKn1jYD6h4GFDNFyT/Kqe1XCXphXHOKLZmuRSRdBPEfVUXQzJm5YGPGGJdvAEr7hHNdGZnuBvrpciGmopOLf5N0uVMy0FfYToJk90uUCbJupaVpO53UJXR2bVpoU00V2KOo4zMFrBd0Jtz2pa0clT5Q5L8IpQ177mWQejPMEJhuQjS10ref6HHjdEhy1P1EYR7GtO0uSsKJQYLiTnG1rVScj5lyazpqWGl5uBbRWl7m6ixGOOnEsMJR7z8J0n6KMnCdxhiNYQCoZ6CmYLnO8omC3MkW3bktlPmEt/VQQHejL3+dOE5FlPdK/Mq8hZxxJtLyRrepLThYKbLZxkSb5W52vYxNOaOxUF0yxMUPwBTYqCzy01XayYK0sJyWBLqX0MwU5CzoymRzV0EjjeUeLgDpTo6ij42ZAzvD01dHUUTPLU96MdLbBME8nFBn7zJCMtJcZokn8YoqU0FS5WFKyniHobguMcmW8N0XkWZjkyN3hqOMtS08r+/xTBwpZSZ3qiVRX8SzMHHjfUNFjgHEPmY9PL3ykEzxkSre/1ZD6z/NuznuB0RcE1TWTm9zRgfUWVJiG6yrzgmWPXC8EAR4Wxhlad0ZbgQyEz3pG5RVEwwDJH2mgKpjcTiCOzn1lfUWANFbZ2BA8balnEweJC9J0iuaeZoI+ippFCztEKVvckR2iice1JvhVytrQwUAZpgsubCPaU7xUe9vWnaOpaSBEspalykhC9bUlOMpT42ZHca6hyrqKmw/wMR8H5ZmdFoBVJb03O4UL0tSNnvIeRmkrLWqrs78gcrEn2tpcboh0UPOW3UUR9PMk4T4nnNKWmCjlrefhCwxRNztfmIQVdDElvS4m1/WuOujoZCs5XVOjtKPGokJzsYCtFYoWonSPT21DheU/wWhM19FcElwqNGOsp9Q8N/cwXaiND1MmeL1Q5XROtYYgGeFq1aTMsoMmcrKjQrOFQTQ1fmBYhmW6o8Jkjc7iDJRTBIo5kgJD5yMEYA3srCg7VFKwiVJkmRCc5ohGOKhsYMn/XBLdo5taZjlb9YAlGWRimqbCsoY7HFAXLa5I1HPRxMMsQDHFkWtRNniqT9UEeNjcE7RUlrCJ4R2CSJuqlKHWvJXjAUNcITYkenuBRB84TbeepcqTj3zZyFJzgYQdHnqfgI0ddUwS6GqWpsKWhjq9cV0vBAEMN2znq+EBfIWT+pClYw5xsTlJU6GeIBsjGmmANTzJZiIYpgrM0Oa8ZMjd7NP87jxhqGOhJlnQtjuQpB+8aEE00wZFznSJPyHxgH3HkPOsJFvYk8zqCHzTs1BYOa4J3PFU+UVRZxlHDM4YavlNUuMoRveiZA2d7grMNc2g+RbSCEKzmgYsUmWmazFJyoiOZ4KnyhKOGRzWJa0+moyV4TVHDzn51Awtqaphfk/lRQ08FX1iiqxTB/kLwd0VynKfEvI6cd4XMV5bMhZ7gZUWVzYQ6Nm2BYzxJbw3bGthEUUMfgbGeorae6DxHtJoZ6alhZ0+ytiVoK1R4z5PTrOECT/SugseEOlb1MMNR4VRNcJy+V1Hg9ONClSZFZjdHlc6W6FBLdJja2MC5hhpu0DBYEY1TFGwiFAxRRCsYkiM9JRb0JNMVkW6CZYT/2EiTGWmo8k+h4FhDNE7BvppoTSFnmCV5xZKzvcCdDo7VVPnIU+I+Rc68juApC90MwcFCsJ5hDqxgScYKreruyQwTqrzoqDCmhWi4IbhB0Yrt3RGa6GfDv52rKXWhh28dyZaWUvcZeMTBaZoSGyiCtRU5J8iviioHaErs7Jkj61syVzTTgOcUOQ8buFBTYWdL5g3T4qlpe0+wvD63heAXRfCCIed9RbCsp2CiI7raUOYOTU13N8PNHvpaGvayo4a3LLT1lDrVEPT2zLUlheB1R+ZTRfKWJ+dcocLJfi11vyJ51lLqJ0WD7tRwryezjiV5W28uJO9qykzX8JDe2lHl/9oyBwa2UMfOngpXCixvKdXTk3wrsKmiVYdZIqsoWEERjbcUNDuiaQomGoIbFdEHmsyWnuR+IeriKDVLnlawlyNHKwKlSU631PKep8J4Q+ayjkSLKYLhalNHlYvttb6fHm0p6OApsZ4l2VfdqZkjuysy6ysKLlckf1KUutCTs39bmCgEyyoasIWlVaMF7mgmWtBT8Kol5xpH9IGllo8cJdopcvZ2sImlDmMIbtDk3KIpeNiS08lQw11NFPTwVFlPP6pJ2gvRfI7gQUfmNAtf6Gs0wQxDsKGlVBdF8rCa3jzdwMaGHOsItrZk7hAyOzpK9VS06j5F49b0VNGOOfKs3lDToMsMBe9ZWtHFEgxTJLs7qrygKZjUnmCYoeAqeU6jqWuLJup4WghOdvCYJnrSkSzoyRkm5M2StQwVltPkfCAk58tET/CSg+8MUecmotMEnhBKfWBIZsg2ihruMJQaoIm+tkTLKEqspMh00w95gvFCQRtDwTT1gVDDSEVdlwqZfxoQRbK0g+tbiBZxzKlpnpypejdDwTaeOvorMk/IJE10h9CqRe28hhLbe0pMsdSwv4ZbhKivo2BjDWfL8UKJgeavwlwb5KlwhyE4u4XkGE2ytZCznKLCDZZq42VzT8HLCrpruFbIfOIINmh/qCdZ1ZBc65kLHR1Bkyf5zn6pN3SvGKIlFNGplhrO9QSXanLOMQTLCa0YJCRrCZm/CZmrLTm7WzCK4GJDiWUdFeYx1LCFg3NMd0XmCuF3Y5rITLDUsYS9zoHVzwnJoYpSTQoObyEzr4cFBNqYTopoaU/wkyLZ2lPhX/5Y95ulxGTV7KjhWrOZgl8MyUUafjYraNjNU1N3IWcjT5WzWqjwtoarHSUObGYO3GCJZpsBlnJGPd6ZYLyl1GdCA2625IwwJDP8GUKymbzuyPlZlvTUsaUh5zFDhRWFzPKKZLAlWdcQbObgF9tOqOsmB1dqcqYJmWstFbZRRI9poolmqiLnU0POvxScpah2iSL5UJNzgScY5+AuIbpO0YD3NCW+dLMszFSdFCWGqG6eVq2uYVNDdICGD6W7EPRWZEY5gpsE9rUkS3mijzzJnm6UpUFXG1hCUeVoS5WfNcFpblELL2qqrCvMvRfd45oalvKU2tiQ6ePJOVMRXase9iTtLJztPxJKLWpo2CRDcJwn2sWSLKIO1WQWNTCvpVUvOZhgSC40JD0dOctaSqzkCRbXsKlb11Oip6PCJ0IwSJM31j3akRxlP7Rwn6aGaUL0qiLnJkvB3xWZ2+Q1TfCwpQH3G0o92UzmX4o/oJNQMMSQc547wVHhdk+VCw01DFYEnTxzZKAm74QmeNNR1w6WzEhNK15VJzuCdxQ53dRUDws5KvwgBMOEgpcVNe0hZI6RXT1Jd0cyj5nsaEAHgVmGaJIlWdsc5Ui2ElrRR6jrRAttNMEAIWrTDFubkZaok7/AkzfIwfuWVq0jHzuCK4QabtLUMVPB3kJ0oyHTSVFlqMALilJf2Rf8k5aaHtMfayocLBS8L89oKoxpJvnAkDPa0qp5DAUTHKWmCcnthlou8iCKaFFLHWcINd1nyIwXqrSxMNmSs6KmoL2QrKuWtlQ5V0120xQ5vRyZS1rgFkWwhiOwiuQbR0OOVhQM9iS3tiXp4RawRPMp5tDletOOBL95MpM01dZTBM9pkn5qF010rIeHFcFZhmSGpYpTsI6nwhqe5C9ynhlpp5ophuRb6WcJFldkVnVEwwxVfrVkvnWUuNLCg5bgboFHPDlDPDmnK7hUrWiIbjadDclujlZcaokOFup4Ri1kacV6jmrrK1hN9bGwpKEBQ4Q6DvIUXOmo6U5LqQM6EPyiKNjVkPnJkDPNEaxhiFay5ExW1NXVUGqcpYYdPcGiCq7z/TSlbhL4pplWXKd7NZO5QQFrefhRQW/NHOsqcIglc4UhWklR8K0QzbAw08CBDnpbgqXdeD/QUsM4RZXDFBW6WJKe/mFPdH0LtBgiq57wFLzlyQzz82qYx5D5WJP5yVJDW01BfyHnS6HKO/reZqId1WGa4Hkh2kWodJ8i6KoIPlAj2hPt76CzXsVR6koPRzWTfKqIentatYpQw2me4AA3y1Kind3SwoOKZDcFXTwl9tWU6mfgRk9d71sKtlNwrjnYw5tC5n5LdKiGry3JKNlHEd3oaMCFHrazBPMp/uNJ+V7IudcSbeOIdjUEdwl0VHCOZo5t6YluEuaC9mQeMgSfOyKnYGFHcIeQ84yQWbuJYJpZw5CzglDH7gKnWqqM9ZTaXcN0TeYhR84eQtJT76JJ1lREe7WnnvsMmRc9FQ7SBBM9mV3lCUdmHk/S2RAMt0QjFNFqQpWjDPQ01DXWUdDBkXziKPjGEP3VP+zIWU2t7im41FOloyWzn/L6dkUy3VLDaZ6appgDLHPjJEsyvJngWEPUyVBiAaHCTEXwrLvSEbV1e1gKJniicWorC1MUrVjB3uDhJE/wgSOzk1DXpk0k73qCM8xw2UvD5kJmDUfOomqMpWCkJRlvKXGmoeBm18USjVIk04SClxTB6YrgLAPLWYK9HLUt5cmc0vYES8GnTeRc6skZbQkWdxRsIcyBRzx1DbTk9FbU0caTPOgJHhJKnOGIVhQqvKmo0llRw9sabrZkDtdg3PqaKi9oatjY8B+G371paMg6+mZFNNtQ04mWBq3rYLOmtWWQp8KJnpy9DdFensyjdqZ+yY40VJlH8wcdLzC8PZnvHMFUTZUrDTkLyQaGus5X5LzpYAf3i+e/ZlhqGqWhh6Ou6xTR9Z6oi5AZZtp7Mj2EEm8oSpxiYZCHU/1fbGdNNNRRoZMhmilEb2gqHOEJDtXkHK/JnG6IrvbPCwV3NhONVdS1thBMs1T4QOBcTWa2IzhMk2nW5Kyn9tXUtpv9RsG2msxk+ZsQzRQacJncpgke0+T8y5Fzj8BiGo7XlJjaTIlpQs7KFjpqGnKuoyEPeIKnFMkZHvopgh81ySxNFWvJWcKRs70j2FOT012IllEEO1n4pD1513Yg2ssQPOThOkvyrqHUdEXOSEsihmBbTbKX1kLBPWqWkLOqJbjB3GBIZmoa8qWl4CG/iZ7oiA72ZL7TJNeZUY7kFQftDcHHluBzRbCegzMtrRjVQpX2lgoPKKLJAkcbMl01XK2p7yhL8pCBbQ3BN2avJgKvttcrWDK3CiUOVxQ8ZP+pqXKyIxnmBymCg5vJjNfkPK4+c8cIfK8ocVt7kmfd/I5SR1hKvCzUtb+lhgc00ZaO6CyhIQP1Uv4yIZjload72PXX0OIJvnFU+0Zf6MhsJwTfW0r0UwQfW4LNLZl5HK261JCZ4qnBaAreVAS3WrjV0LBnNDUNNDToCEeFfwgcb4gOEqLRhirWkexrCEYKVV711DLYEE1XBEsp5tpTGjorkomKYF9FDXv7fR3BGwbettSxnyL53MBPjsxDZjMh+VUW9NRxq1DhVk+FSxQcaGjV9Pawv6eGByw5qzoy7xk4RsOShqjJwWKe/1pEEfzkobeD/dQJmpqedcyBTy2sr4nGNRH0c0SPWTLrqAc0OQcb/gemKgqucQT7ySWKCn2EUotoCvpZct7RO2sy/QW0IWcXd7pQRQyZVwT2USRO87uhjioTLKV2brpMUcMQRbKH/N2T+UlTpaMls6cmc6CCNy3JdYYSUzzJQ4oSD3oKLncULOiJvjBEC2oqnCJkJluCYy2ZQ5so9YYlZ1VLlQU1mXEW1jZERwj/MUSRc24TdexlqLKfQBtDTScJUV8FszXBEY5ktpD5Ur9hYB4Nb1iikw3JoYpkKX+RodRKFt53MMuRnKSpY31PwYaGaILh3wxJGz9TkTPEETxoCWZrgvOlmyMzxFEwVJE5xZKzvyJ4WxEc16Gd4Xe3Weq4XH2jKRikqOkGQ87hQnC7wBmGYLAnesX3M+S87eFATauuN+Qcrh7xIxXJbUIdMw3JGE3ylCWzrieaqCn4zhGM19TQ3z1oH1AX+pWEqIc7wNGAkULBo/ZxRaV9NNyh4Br3rCHZzbzmSfawBL0dNRwpW1kK9mxPXR9povcdrGSZK9c2k0xwFGzjuniCtRSZCZ6ccZ7gaktmgAOtKbG/JnOkJrjcQTdFMsxRQ2cLY3WTIrlCw1eWKn8R6pvt4GFDso3QoL4a3nLk3G6JrtME3dSenpx7PNFTmga0EaJTLQ061sEeQoWXhSo9LTXsaSjoJQRXeZLtDclbCrYzfzHHeaKjHCVOUkQHO3JeEepr56mhiyaYYKjjNU+Fed1wS5VlhWSqI/hYUdDOkaxiKehoyOnrCV5yBHtbWFqTHCCwtpDcYolesVR5yUzTZBb3RNMd0d6WP+SvhuBmRcGxnuQzT95IC285cr41cLGQ6aJJhmi4TMGempxeimBRQw1tFKV+8jd6KuzoSTqqDxzRtpZkurvKEHxlqXKRIjjfUNNXQsNOsRScoWFLT+YeRZVD3GRN0MdQcKqQjHDMrdGGVu3iYJpQx3WGUvfbmxwFfR20WBq0oYY7LMFhhgYtr8jpaEnaOzjawWWaTP8mMr0t/EPDPoqcnxTBI5o58L7uoWnMrpoqPwgVrlAUWE+V+TQl9rawoyP6QGAlQw2TPRX+YSkxyBC8Z6jhHkXBgQL7WII3DVFnRfCrBfxewv9D6xsyjys4VkhWb9pUU627JllV0YDNHMku/ldNMMXDEo4aFnAkk4U6frNEU4XgZUPmEKHUl44KrzmYamjAbh0JFvGnaTLPu1s9jPCwjFpYiN7z1DTOk/nc07CfDFzmCf7i+bfNHXhDtLeBXzTBT5rkMvWOIxpl4EMh2LGJBu2syDnAEx2naEhHDWMMzPZEhygyS1mS5RTJr5ZkoKbEUoYqr2kqdDUE8ztK7OaIntJkFrIECwv8LJTaVx5XJE86go8dFeZ3FN3rjabCAYpoYEeC9zzJVULBbmZhDyd7ko09ydpNZ3nm2Kee4FPPXHnYEF1nqOFEC08LUVcDvYXkJHW8gTaKCk9YGOeIJhqiE4ToPEepdp7IWFjdwnWaufGMwJJCMtUTTBBK9BGCOy2tGGrJTHIwyEOzp6aPzNMOtlZkDvcEWpP5SVNhfkvDxhmSazTJXYrM9U1E0xwFVwqZQwzJxw6+kGGGUj2FglGGmnb1/G51udRSMNlTw6GGnCcUwVcOpmsqTHa06o72sw1RL02p9z0VbnMLOaIX3QKaYKSCFQzBKEUNHTSc48k53RH9wxGMtpQa5KjjW0W0n6XCCCG4yxNNdhQ4R4l1Ff+2sSd6UFHiIEOyqqFgT01mEUMD+joy75jPhOA+oVVLm309FR4yVOlp4RhLiScNmSmaYF5Pw0STrOIoWMSR2UkRXOMp+M4SHW8o8Zoi6OZgjKOaFar8zZDzkWzvKOjkKBjmCXby8JahhjXULY4KlzgKLvAwxVGhvyd4zxB1d9T0piazmKLCVZY5sKiD0y2ZSYrkUEPUbIk+dlQ4SJHTR50k1DPaUWIdTZW9NJwnJMOECgd7ou/MnppMJ02O1VT4Wsh85MnZzcFTngpXGKo84qmwgKbCL/orR/SzJ2crA+t6Mp94KvxJUeIbT3CQu1uIdlQEOzlKfS3UMcrTiFmOuroocrZrT2AcmamOKg8YomeEKm/rlT2sociMaybaUlFhuqHCM2qIJ+rg4EcDFymiDSxzaHdPcpE62pD5kyM5SBMoA1PaUtfIthS85ig1VPiPPYXgYEMNk4Qq7TXBgo7oT57gPUdwgCHzhIVFPFU6OYJzHAX9m5oNrVjeE61miDrqQ4VSa1oiURTsKHC0IfjNwU2WzK6eqK8jWln4g15TVBnqmDteCJ501PGAocJhhqjZdtBEB6lnhLreFJKxmlKbeGrqLiSThVIbCdGzloasa6lpMQXHCME2boLpJgT7yWaemu6wBONbqGNVRS0PKIL7LckbjmQtR7K8I5qtqel+T/ChJTNIKLjdUMNIRyvOEko9YYl2cwQveBikCNawJKcLBbc7+JM92mysNvd/Fqp8a0k6CNEe7cnZrxlW0wQXaXjaktnRwNOGZKYiONwS7a1JVheq3WgJHlQUGKHKmp4KAxXR/ULURcNgoa4zhKSLpZR3kxRRb0NmD0OFn+UCS7CzI1nbP6+o4x47QZE5xRCt3ZagnYcvmpYQktXdk5YKXTzBC57kKEe0VVuiSYqapssMS3C9p2CKkHOg8B8Pa8p5atrIw3qezIWanMGa5HRDNF6RM9wcacl0N+Q8Z8hsIkSnaIIdHRUOEebAPy1zbCkhM062FCJtif7PU+UtoVXzWKqM1PxXO8cfdruhFQ/a6x3JKYagvVDhQEtNiyiiSQ7OsuRsZUku0CRNDs4Sog6KKjsZgk2bYJqijgsEenoKeniinRXBn/U3lgpPdyDZynQx8IiioMnCep5Ky8mjGs6Wty0l1hUQTcNWswS3WRp2kCNZwJG8omG8JphPUaFbC8lEfabwP7VtM9yoaNCAjpR41VNhrD9LkbN722v0CoZMByFzhaW+MyzRYEWFDQwN2M4/JiT76PuljT3VU/A36eaIThb+R9oZGOAJ9tewkgGvqOMNRWYjT/Cwu99Q8LqDE4TgbLWxJ1jaDDAERsFOFrobgjUsBScaguXU8kKm2RL19tRypSHnHNlHiIZqgufs4opgQdVdwxBNNFBR6kVFqb8ogimOzB6a6HTzrlDHEpYaxjiiA4TMQobkDg2vejjfwJGWmnbVFAw3H3hq2NyQfG7hz4aC+w3BbwbesG0swYayvpAs6++Ri1Vfzx93mFChvyN5xVHTS+0p9aqCAxyZ6ZacZyw5+7uuQkFPR9DDk9NOiE7X1PCYJVjVUqq7JlrHwWALF5nfHNGjApdpqgzx5OwilDhCiDYTgnc9waGW4BdLNNUQvOtpzDOWHDH8D7TR/A/85KljEQu3NREc4Pl/6B1Hhc8Umb5CsKMmGC9EPcxoT2amwHNCmeOEnOPbklnMkbOgIvO5UMOpQrS9UGVdt6iH/fURjhI/WOpaW9OKLYRod6HCUEdOX000wpDZQ6hwg6LgZfOqo1RfT/CrJzjekXOGhpc1VW71ZLbXyyp+93ILbC1kPtIEYx0FIx1VDrLoVzXRKRYWk809yYlC9ImcrinxtabKnzRJk3lAU1OLEN1j2zrYzr2myHRXJFf4h4QKT1qSTzTB5+ZNTzTRkAxX8FcLV2uS8eoQQ2aAkFzvCM72sJIcJET3WPjRk5wi32uSS9rfZajpWEvj9hW42F4o5NytSXYy8IKHay10VYdrcl4SkqscrXpMwyGOgtkajheSxdQqmpxP1L3t4R5PqasFnrQEjytq6qgp9Y09Qx9o4S1FzhUCn1kyHSzBWLemoSGvOqLNhZyBjmCaAUYpMgt4Ck7wBBMMwWKWgjsUwTaGVsxWC1mYoKiyqqeGKYqonSIRQ3KIkHO0pmAxTdBHkbOvfllfr+AA+7gnc50huVKYK393FOyg7rbPO/izI7hE4CnHHHnJ0ogNPRUGeUpsrZZTBJcrovUcJe51BPsr6GkJdhCCsZ6aTtMEb2pqWkqeVtDXE/QVggsU/Nl86d9RMF3DxvZTA58agu810RWawCiSzzXBeU3MMW9oyJUedvNEvQyNu1f10BSMddR1vaLCYpYa/mGocLSiYDcLbQz8aMn5iyF4xBNMs1P0QEOV7o5gaWGuzSeLue4tt3ro7y4Tgm4G/mopdZgl6q0o6KzJWE3mMksNr3r+a6CbT8g5wZNzT9O7fi/zpaOmnz3BRoqos+tv9zMbdpxsqDBOEewtJLt7cg5wtKKbvldpSzRRCD43VFheCI7yZLppggMVBS/KMAdHODJvOwq2NQSbKKKPLdFWQs7Fqo+mpl01JXYRgq8dnGLhTiFzqmWsUMdpllZdbKlyvSdYxhI9YghOtxR8LgSLWHK62mGGVoxzBE8LNWzqH9CUesQzFy5RQzTc56mhi6fgXEWwpKfE5Z7M05ZgZUPmo6auiv8YKzDYwWBLMErIbKHJvOwIrvEdhOBcQ9JdU1NHQ7CXn2XIDFBKU2WAgcX9UAUzDXWd5alwuyJ41Z9rjKLCL4aCp4WarhPm2rH+SaHUYE001JDZ2ZAzXPjdMpZWvC9wmqIB2lLhQ01D5jO06hghWMndbM7yRJMsoCj1vYbnFQVrW9jak3OlEJ3s/96+p33dEPRV5GxiqaGjIthUU6FFEZyqCa5qJrpBdzSw95IUnOPIrCUUjRZQFrbw5PR0R1qiYx3cb6nrWUMrBmmiBQxVHtTew5ICP/ip6g4hed/Akob/32wvBHsIOX83cI8hGeNeNPCIkPmXe8fPKx84OMSRM1MTdXSwjCZ4S30jVGhvqTRak/OVhgGazHuOCud5onEO1lJr6ecVyaOK6H7zqlBlIaHE0oroCgfvGJIdPcmfLNGLjpz7hZwZQpUbFME0A1cIJa7VNORkgfsMBatbKgwwJM9bSvQXeNOvbIjelg6WWvo5kvbKaJJNHexkKNHL9xRyFlH8Ti2riB5wVPhUk7nGkJnoCe428LR/wRGdYIlmWebCyxou1rCk4g/ShugBDX0V0ZQWkh0dOVsagkM0yV6OoLd5ye+pRlsCr0n+KiQrGuq5yJDzrTAXHtLUMduTDBVKrSm3eHL+6ijxhFDX9Z5gVU/wliHYTMiMFpKLNMEywu80wd3meoFmt6VbRMPenhrOc6DVe4pgXU8DnnHakLOIIrlF4FZPIw6R+zxBP0dyq6OOZ4Q5sLKCcz084ok+VsMMyQhNZmmBgX5xIXOEJTmi7VsGTvMTNdHHhpzdbE8Du2oKxgvBqQKdDDnTFOylCFaxR1syz2iqrOI/FEpNc3C6f11/7+ASS6l2inq2ciTrCCzgyemrCL5SVPjQkdPZUmGy2c9Sw9FtR1sS30RmsKPCS4rkIC/2U0MduwucYolGaPjKEyhzmiPYXagyWbYz8LWBDdzRimAXzxx4z8K9hpzlhLq+NiQ97HuKorMUfK/OVvC2JfiHUPCQI/q7J2gjK+tTDNxkCc4TMssqCs4TGtLVwQihyoAWgj9bosU80XGW6Ac9TJGziaUh5+hnFcHOnlaM1iRn29NaqGENTTTSUHCH2tWTeV0osUhH6psuVLjRUmGWhm6OZEshGeNowABHcJ2Bpy2ZszRcKkRXd2QuKVEeXnbfaEq825FguqfgfE2whlChSRMdron+LATTPQ2Z369t4B9C5gs/ylzv+CMmepIDPclFQl13W0rspPd1JOcbghGOEutqCv5qacURQl3dDKyvyJlqKXGPgcM9FfawJAMVmdcspcYKOZc4GjDYkFlK05olNMHyHn4zFNykyOxt99RkHlfwmiHo60l2EKI+mhreEKp080Tbug08BVPcgoqC5zWt+NLDTZ7oNSF51N1qie7Va3uCCwyZbkINf/NED6jzOsBdZjFN8oqG3wxVunqCSYYKf3EdhJyf9YWGf7tRU2oH3VHgPr1fe5J9hOgHd7xQ0y7qBwXr23aGErP0cm64JVjZwsOGqL+mhNgZmhJLW2oY4UhedsyBgzrCKrq7BmcpNVhR6jBPq64Vgi+kn6XE68pp8J5/+0wRHGOpsKenQn9DZntPzjRLZpDAdD2fnSgkG9tmIXnUwQ6WVighs7Yi2MxQ0N3CqYaCXkJ0oyOztMDJjmSSpcpvlrk0RMMOjmArQ04PRV1DO1FwhCVaUVPpKUM03JK5SxPsIWRu8/CGHi8UHChiqGFDTbSRJWeYUDDcH6vJWUxR4k1FXbMUwV6e4AJFXS8oMqsZKqzvYQ9DDQdZckY4aGsIhtlubbd2r3j4QBMoTamdPZk7O/Bf62lacZwneNjQoGcdVU7zJOd7ghsUHOkosagic6cnWc8+4gg285R6zZP5s1/LUbCKIznTwK36PkdwlOrl4U1LwfdCCa+IrvFkmgw1PCAUXKWo0sURXWcI2muKJlgyFzhynCY4RBOsqCjoI1R5zREco0n2Vt09BQtYSizgKNHfUmUrQ5UOCh51BFcLmY7umhYqXKQomOop8bUnWNNQcIiBcYaC6xzMNOS8JQQfeqKBmmglB+97ok/lfk3ygaHSyZaCRTzRxQo6GzLfa2jWBPepw+UmT7SQEJyiyRkhBLMVOfcoMjcK0eZChfUNzFAUzCsEN5vP/X1uP/n/aoMX+K+nw/Hjr/9xOo7j7Pju61tLcgvJpTWXNbfN5jLpi6VfCOviTktKlFusQixdEKWmEBUKNaIpjZRSSOXSgzaaKLdabrm1/9nZ+/f+vd/vz/v9+Xy+zZ7PRorYoZqyLrCwQdEAixxVOEXNNnjX2nUSRlkqGmWowk8lxR50JPy9Bo6qJXaXwNvREBvnThPEPrewryLhcAnj5WE15Fqi8W7R1sAuEu86S4ENikItFN4xkv9Af4nXSnUVcLiA9xzesFpivRRVeFKtsMRaKBhuSbjOELnAUtlSQUpXgdfB4Z1oSbnFEetbQ0IrAe+Y+pqnDcEJFj6S8LDZzZHwY4e3XONNlARraomNEt2bkvGsosA3ioyHm+6jCMbI59wqt4eeara28IzEmyPgoRaUOEDhTVdEJhmCoTWfC0p8aNkCp0oYqih2iqGi4yXeMkOsn4LdLLnmKfh/YogjNsPebeFGR4m9BJHLzB61XQ3BtpISfS2FugsK9FAtLWX1dCRcrCnUp44CNzuCowUZmxSRgYaE6Za0W2u/E7CVXCiI/UOR8aAm1+OSyE3mOUcwyc1zBBeoX1kiKy0Zfxck1Gsyulti11i83QTBF5Kg3pDQThFMVHiPSlK+0cSedng/VaS8bOZbtsBcTcZAR8JP5KeqQ1OYKAi20njdNNRpgnsU//K+JnaXJaGTomr7aYIphoRn9aeShJWKEq9LcozSF7QleEfDI5LYm5bgVkFkRwVDBCVu0DDIkGupo8TZBq+/pMQURYErJQmPKGKjNDkWOLx7Jd5QizdUweIaKrlP7SwJDhZvONjLkOsBBX9UpGxnydhXkfBLQ8IxgojQbLFnJf81JytSljclYYyEFyx0kVBvKWOFJmONpshGAcsduQY5giVNCV51eOdJYo/pLhbvM0uDHSevNKRcrKZIqnCtJeEsO95RoqcgGK4ocZcho1tTYtcZvH41pNQ7vA0WrhIfOSraIIntIAi+NXWCErdbkvrWwjRLrt0NKUdL6KSOscTOdMSOUtBHwL6OLA0vNSdynaWQEnCpIvKaIrJJEbvHkmuNhn6OjM8VkSGSqn1uYJCGHnq9I3aLhNME3t6GjIkO7xrNFumpyTNX/NrwX7CrIRiqqWijI9JO4d1iieykyfiposQIQ8YjjsjlBh6oHWbwRjgYJQn2NgSnNycmJAk3NiXhx44Sxykihxm8ybUwT1OVKySc7vi3OXVkdBJ4AyXBeksDXG0IhgtYY0lY5ahCD0ehborIk5aUWRJviMA7Xt5kyRjonrXENkm8yYqgs8VzgrJmClK20uMM3jRJ0FiQICQF9hdETlLQWRIb5ki6WDfWRPobvO6a4GP5mcOrNzDFELtTkONLh9dXE8xypEg7z8A9jkhrQ6Fhjlg/QVktJXxt4WXzT/03Q8IaQWSqIuEvloQ2mqC9Jfi7wRul4RX3pSPlzpoVlmCtI2jvKHCFhjcM3sN6lqF6HxnKelLjXWbwrpR4xzuCrTUZx2qq9oAh8p6ixCUGr78g8oyjRAtB5CZFwi80VerVpI0h+IeBxa6Zg6kWvpDHaioYYuEsRbDC3eOmC2JvGYLeioxGknL2UATNJN6hmtj1DlpLvDVmocYbrGCVJKOrg4X6DgddLA203BKMFngdJJFtFd7vJLm6KEpc5yjQrkk7M80SGe34X24nSex1Ra5Omgb71JKyg8SrU3i/kARKwWpH0kOGhKkObyfd0ZGjvyXlAkVZ4xRbYJ2irFMkFY1SwyWxr2oo4zlNiV+7zmaweFpT4kR3kaDAFW6xpSqzJay05FtYR4HmZhc9UxKbbfF2V8RG1MBmSaE+kmC6JnaRXK9gsiXhJHl/U0qM0WTcbyhwkYIvFGwjSbjfwhiJt8ZSQU+Bd5+marPMOkVkD0muxYLIfEuhh60x/J92itguihJSEMySVPQnTewnEm+620rTQEMsOfo4/kP/0ARvWjitlpSX7GxBgcMEsd3EEeYWvdytd+Saawi6aCIj1CkGb6Aj9rwhx16Cf3vAwFy5pyLhVonXzy51FDpdEblbkdJbUcEPDEFzQ8qNmhzzLTmmKWKbFCXeEuRabp6rxbvAtLF442QjQ+wEA9eL1xSR7Q0JXzlSHjJ4exq89yR0laScJ/FW6z4a73pFMEfDiRZvuvijIt86RaSFOl01riV2mD1UEvxGk/Geg5aWwGki1zgKPG9J2U8PEg8qYvMsZeytiTRXBMslCU8JSlxi8EabjwUldlDNLfzTUmCgxWsjqWCOHavYAqsknKFIO0yQ61VL5AVFxk6WhEaCAkdJgt9aSkzXlKNX2jEa79waYuc7gq0N3GDJGCBhoiTXUEPsdknCUE1CK0fwsiaylSF2uiDyO4XX3pFhNd7R4itFGc0k/ElBZwWvq+GC6szVeEoS/MZ+qylwpKNKv9Z469UOjqCjwlusicyTxG6VpNxcQ8IncoR4RhLbR+NdpGGmJWOcIzJGUuKPGpQg8rrG21dOMqQssJQ4RxH5jaUqnZuQ0F4Q+cjxLwPtpZbIAk3QTJHQWBE5S1BokoVtDd6lhqr9UpHSUxMcIYl9pojsb8h4SBOsMQcqvOWC2E8EVehqiJ1hrrAEbQxeK0NGZ0Gkq+guSRgniM23bIHVkqwx4hiHd7smaOyglyIyQuM978j4VS08J/A2G1KeMBRo4fBaSNhKUEZfQewVQ/C1I+MgfbEleEzCUw7mKXI0M3hd1EESVji8x5uQ41nxs1q4RMJCCXs7Iq9acpxn22oSDnQ/sJTxsCbHIYZiLyhY05TY0ZLIOQrGaSJDDN4t8pVaIrsqqFdEegtizc1iTew5Q4ayBDMUsQMkXocaYkc0hZua412siZ1rSXlR460zRJ5SlHGe5j801RLMlJTxtaOM3Q1pvxJ45zUlWFD7rsAbpfEm1JHxG0eh8w2R7QQVzBUw28FhFp5QZzq8t2rx2joqulYTWSuJdTYfWwqMFMcovFmSyJPNyLhE4E10pHzYjOC3huArRa571ZsGajQpQx38SBP5pyZB6lMU3khDnp0MBV51BE9o2E+TY5Ml2E8S7C0o6w1xvCZjf0HkVEHCzFoyNmqC+9wdcqN+Tp7jSDheE9ws8Y5V0NJCn2bk2tqSY4okdrEhx1iDN8cSudwepWmAGXKcJXK65H9to8jYQRH7SBF01ESUJdd0TayVInaWhLkOjlXE5irKGOnI6GSWGCJa482zBI9rCr0jyTVcEuzriC1vcr6mwFGSiqy5zMwxBH/TJHwjSPhL8+01kaaSUuMFKTcLEvaUePcrSmwn8DZrgikWb7CGPxkSjhQwrRk57tctmxLsb9sZvL9LSlyuSLlWkqOjwduo8b6Uv1DkmudIeFF2dHCgxVtk8dpIvHpBxhEOdhKk7OLIUSdJ+cSRY57B+0DgGUUlNfpthTfGkauzxrvTsUUaCVhlKeteTXCoJDCa2NOKhOmC4G1H8JBd4OBZReSRGkqcb/CO1PyLJTLB4j1q8JYaIutEjSLX8YKM+a6phdMsdLFUoV5RTm9JSkuDN8WcIon0NZMNZWh1q8C7SJEwV5HxrmnnTrf3KoJBlmCYI2ilSLlfEvlE4011NNgjgthzEua0oKK7JLE7HZHlEl60BLMVFewg4EWNt0ThrVNEVkkiTwpKXSWJzdRENgvKGq4IhjsiezgSFtsfCUq8qki5S1LRQeYQQ4nemmCkImWMw3tFUoUBZk4NOeZYEp4XRKTGa6wJjrWNHBVJR4m3FCnbuD6aak2WsMTh3SZImGCIPKNgsDpVwnsa70K31lCFJZYcwwSMFcQulGTsZuEaSdBXkPGZhu0FsdUO73RHjq8MPGGIfaGIbVTk6iuI3GFgucHrIQkmWSJdBd7BBu+uOryWAhY7+Lki9rK5wtEQzWwvtbqGhIMFwWRJsElsY4m9IIg9L6lCX0VklaPAYkfkZEGDnOWowlBJjtMUkcGK4Lg6EtoZInMUBVYLgn0UsdmCyCz7gIGHFfk+k1QwTh5We7A9x+IdJ6CvIkEagms0hR50eH9UnTQJ+2oiKyVlLFUE+8gBGu8MQ3CppUHesnjTHN4QB/UGPhCTHLFPHMFrCqa73gqObUJGa03wgbhHkrCfpEpzNLE7JDS25FMKhlhKKWKfCgqstLCPu1zBXy0J2ztwjtixBu8UTRn9LVtkmCN2iyFhtME70JHRQ1KVZXqKI/KNIKYMCYs1GUMEKbM1bKOI9LDXC7zbHS+bt+1MTWS9odA9DtrYtpbImQJ2VHh/lisEwaHqUk1kjKTAKknkBEXkbkdMGwq0dnhzLJF3NJH3JVwrqOB4Sca2hti75nmJN0WzxS6UxDYoEpxpa4htVlRjkYE7DZGzJVU72uC9IyhQL4i8YfGWSYLLNcHXloyz7QhNifmKSE9JgfGmuyLhc403Xm9vqcp6gXe3xuuv8F6VJNxkyTHEkHG2g0aKXL0MsXc1bGfgas2//dCONXiNLCX+5mB7eZIl1kHh7ajwpikyzlUUWOVOsjSQlsS+M0R+pPje/dzBXRZGO0rMtgQrLLG9VSu9n6CMXS3BhwYmSoIBhsjNBmZbgusE9BCPCP5triU4VhNbJfE+swSP27aayE8tuTpYYjtrYjMVGZdp2NpS1s6aBnKSHDsbKuplKbHM4a0wMFd/5/DmGyKrJSUaW4IBrqUhx0vyfzTBBLPIUcnZdrAkNsKR0sWRspumSns6Ch0v/qqIbBYUWKvPU/CFoyrDJGwSNFhbA/MlzKqjrO80hRbpKx0Jewsi/STftwGSlKc1JZyAzx05dhLEdnfQvhZOqiHWWEAHC7+30FuRcZUgaO5gpaIK+xsiHRUsqaPElTV40xQZQ107Q9BZE1nryDVGU9ZSQ47bmhBpLcYpUt7S+xuK/FiT8qKjwXYw5ypS2iuCv7q1gtgjhuBuB8LCFY5cUuCNtsQOFcT+4Ih9JX+k8Ea6v0iCIRZOtCT0Et00JW5UeC85Cg0ScK0k411HcG1zKtre3SeITBRk7WfwDhEvaYLTHP9le0m8By0JDwn4TlLW/aJOvGHxdjYUes+ScZigCkYQdNdEOhkiezgShqkx8ueKjI8lDfK2oNiOFvrZH1hS+tk7NV7nOmLHicGWEgubkXKdwdtZknCLJXaCpkrjZBtLZFsDP9CdxWsSr05Sxl6CMmoFbCOgryX40uDtamB7SVmXW4Ihlgpmq+00tBKUUa83WbjLUNkzDmY7cow1JDygyPGlhgGKYKz4vcV7QBNbJIgM11TUqZaMdwTeSguH6rOaw1JRKzaaGyxVm2EJ/uCIrVWUcZUkcp2grMsEjK+DMwS59jQk3Kd6SEq1d0S6uVmO4Bc1lDXTUcHjluCXEq+1OlBDj1pi9zgiXxnKuE0SqTXwhqbETW6RggMEnGl/q49UT2iCzgJvRwVXS2K/d6+ZkyUl7jawSVLit46EwxVljDZwoSQ20sDBihztHfk2yA8NVZghiXwrYHQdfKAOtzsayjhY9bY0yE2CWEeJ9xfzO423xhL5syS2TFJofO2pboHob0nY4GiAgRrvGQEDa/FWSsoaaYl0syRsEt3kWoH3B01shCXhTUWe9w3Bt44SC9QCh3eShQctwbaK2ApLroGCMlZrYqvlY3qYhM0aXpFkPOuoqJ3Dm6fxXrGwVF9gCWZagjPqznfkuMKQ8DPTQRO8ZqG1hPGKEm9IgpGW4DZDgTNriTxvFiq+Lz+0cKfp4wj6OCK9JSnzNSn9LFU7UhKZZMnYwcJ8s8yRsECScK4j5UOB95HFO0CzhY4xJxuCix0lDlEUeMdS6EZBkTsUkZ4K74dugyTXS7aNgL8aqjDfkCE0ZbwkCXpaWCKhl8P7VD5jxykivSyxyZrYERbe168LYu9ZYh86IkscgVLE7tWPKmJv11CgoyJltMEbrohtVAQfO4ImltiHEroYEs7RxAarVpY8AwXMcMReFOTYWe5iiLRQxJ5Q8DtJ8LQhWOhIeFESPGsILhbNDRljNbHzNRlTFbk2S3L0NOS6V1KFJYKUbSTcIIhM0wQ/s2TM0SRMNcQmSap3jCH4yhJZKSkwyRHpYYgsFeQ4U7xoCB7VVOExhXepo9ABBsYbvGWKXPME3lyH95YioZ0gssQRWWbI+FaSMkXijZXwgiTlYdPdkNLaETxlyDVIwqeaEus0aTcYcg0RVOkpR3CSJqIddK+90JCxzsDVloyrFd5ZAr4TBKfaWa6boEA7C7s6EpYaeFPjveooY72mjIccLHJ9HUwVlDhKkmutJDJBwnp1rvulJZggKDRfbXAkvC/4l3ozQOG9a8lxjx0i7nV4jSXc7vhe3OwIxjgSHjdEhhsif9YkPGlus3iLFDnWOFhtCZbJg0UbQcIaR67JjthoCyMEZRwhiXWyxO5QxI6w5NhT4U1WsJvDO60J34fW9hwzwlKij6ZAW9ne4L0s8C6XeBMEkd/LQy1VucBRot6QMlbivaBhoBgjqGiCJNhsqVp/S2SsG6DIONCR0dXhvWbJ+MRRZJkkuEjgDXJjFQW6SSL7GXK8Z2CZg7cVsbWGoKmEpzQ5elpiy8Ryg7dMkLLUEauzeO86CuwlSOlgYLojZWeJ9xM3S1PWfEfKl5ISLQ0MEKR8YOB2QfCxJBjrKPCN4f9MkaSsqoVXJBmP7EpFZ9UQfOoOFwSzBN4MQ8LsGrymlipcJQhmy0GaQjPqCHaXRwuCZwRbqK2Fg9wlClZqYicrIgMdZfxTQ0c7TBIbrChxmuzoKG8XRaSrIhhiyNFJkrC7oIAWMEOQa5aBekPCRknCo4IKPrYkvCDI8aYmY7WFtprgekcJZ3oLIqssCSMtFbQTJKwXYy3BY5oCh2iKPCpJOE+zRdpYgi6O2KmOAgvVCYaU4ySRek1sgyFhJ403QFHiVEmJHwtybO1gs8Hr5+BETQX3War0qZngYGgtVZtoqd6vFSk/UwdZElYqyjrF4HXUeFspIi9IGKf4j92pKGAdCYMVsbcV3kRF0N+R8LUd5PCsIGWoxDtBkCI0nKofdJQxT+LtZflvuc8Q3CjwWkq8KwUpHzkK/NmSsclCL0nseQdj5FRH5CNHSgtLiW80Of5HU9Hhlsga9bnBq3fEVltKfO5IaSTmGjjc4J0otcP7QsJUSQM8pEj5/wCuUuC2DWz8AAAAAElFTkSuQmCC\");\ +}\ +.ace-ambiance .ace_indent-guide {\ +background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNQUFD4z6Crq/sfAAuYAuYl+7lfAAAAAElFTkSuQmCC\") right repeat-y;\ +}"; + +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass); + +}); diff --git a/lib/ace/src-noconflict/theme-chaos.js b/lib/ace/src-noconflict/theme-chaos.js new file mode 100644 index 00000000..97ec7fbd --- /dev/null +++ b/lib/ace/src-noconflict/theme-chaos.js @@ -0,0 +1,156 @@ +ace.define("ace/theme/chaos",["require","exports","module","ace/lib/dom"], function(require, exports, module) { + +exports.isDark = true; +exports.cssClass = "ace-chaos"; +exports.cssText = ".ace-chaos .ace_gutter {\ +background: #141414;\ +color: #595959;\ +border-right: 1px solid #282828;\ +}\ +.ace-chaos .ace_gutter-cell.ace_warning {\ +background-image: none;\ +background: #FC0;\ +border-left: none;\ +padding-left: 0;\ +color: #000;\ +}\ +.ace-chaos .ace_gutter-cell.ace_error {\ +background-position: -6px center;\ +background-image: none;\ +background: #F10;\ +border-left: none;\ +padding-left: 0;\ +color: #000;\ +}\ +.ace-chaos .ace_print-margin {\ +border-left: 1px solid #555;\ +right: 0;\ +background: #1D1D1D;\ +}\ +.ace-chaos {\ +background-color: #161616;\ +color: #E6E1DC;\ +}\ +.ace-chaos .ace_cursor {\ +border-left: 2px solid #FFFFFF;\ +}\ +.ace-chaos .ace_cursor.ace_overwrite {\ +border-left: 0px;\ +border-bottom: 1px solid #FFFFFF;\ +}\ +.ace-chaos .ace_marker-layer .ace_selection {\ +background: #494836;\ +}\ +.ace-chaos .ace_marker-layer .ace_step {\ +background: rgb(198, 219, 174);\ +}\ +.ace-chaos .ace_marker-layer .ace_bracket {\ +margin: -1px 0 0 -1px;\ +border: 1px solid #FCE94F;\ +}\ +.ace-chaos .ace_marker-layer .ace_active-line {\ +background: #333;\ +}\ +.ace-chaos .ace_gutter-active-line {\ +background-color: #222;\ +}\ +.ace-chaos .ace_invisible {\ +color: #404040;\ +}\ +.ace-chaos .ace_keyword {\ +color:#00698F;\ +}\ +.ace-chaos .ace_keyword.ace_operator {\ +color:#FF308F;\ +}\ +.ace-chaos .ace_constant {\ +color:#1EDAFB;\ +}\ +.ace-chaos .ace_constant.ace_language {\ +color:#FDC251;\ +}\ +.ace-chaos .ace_constant.ace_library {\ +color:#8DFF0A;\ +}\ +.ace-chaos .ace_constant.ace_numeric {\ +color:#58C554;\ +}\ +.ace-chaos .ace_invalid {\ +color:#FFFFFF;\ +background-color:#990000;\ +}\ +.ace-chaos .ace_invalid.ace_deprecated {\ +color:#FFFFFF;\ +background-color:#990000;\ +}\ +.ace-chaos .ace_support {\ +color: #999;\ +}\ +.ace-chaos .ace_support.ace_function {\ +color:#00AEEF;\ +}\ +.ace-chaos .ace_function {\ +color:#00AEEF;\ +}\ +.ace-chaos .ace_string {\ +color:#58C554;\ +}\ +.ace-chaos .ace_comment {\ +color:#555;\ +font-style:italic;\ +padding-bottom: 0px;\ +}\ +.ace-chaos .ace_variable {\ +color:#997744;\ +}\ +.ace-chaos .ace_meta.ace_tag {\ +color:#BE53E6;\ +}\ +.ace-chaos .ace_entity.ace_other.ace_attribute-name {\ +color:#FFFF89;\ +}\ +.ace-chaos .ace_markup.ace_underline {\ +text-decoration: underline;\ +}\ +.ace-chaos .ace_fold-widget {\ +text-align: center;\ +}\ +.ace-chaos .ace_fold-widget:hover {\ +color: #777;\ +}\ +.ace-chaos .ace_fold-widget.ace_start,\ +.ace-chaos .ace_fold-widget.ace_end,\ +.ace-chaos .ace_fold-widget.ace_closed{\ +background: none;\ +border: none;\ +box-shadow: none;\ +}\ +.ace-chaos .ace_fold-widget.ace_start:after {\ +content: '▾'\ +}\ +.ace-chaos .ace_fold-widget.ace_end:after {\ +content: '▴'\ +}\ +.ace-chaos .ace_fold-widget.ace_closed:after {\ +content: '‣'\ +}\ +.ace-chaos .ace_indent-guide {\ +border-right:1px dotted #333;\ +margin-right:-1px;\ +}\ +.ace-chaos .ace_fold { \ +background: #222; \ +border-radius: 3px; \ +color: #7AF; \ +border: none; \ +}\ +.ace-chaos .ace_fold:hover {\ +background: #CCC; \ +color: #000;\ +}\ +"; + +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass); + +}); diff --git a/lib/ace/src-noconflict/theme-chrome.js b/lib/ace/src-noconflict/theme-chrome.js new file mode 100644 index 00000000..83742aa4 --- /dev/null +++ b/lib/ace/src-noconflict/theme-chrome.js @@ -0,0 +1,128 @@ +ace.define("ace/theme/chrome",["require","exports","module","ace/lib/dom"], function(require, exports, module) { + +exports.isDark = false; +exports.cssClass = "ace-chrome"; +exports.cssText = ".ace-chrome .ace_gutter {\ +background: #ebebeb;\ +color: #333;\ +overflow : hidden;\ +}\ +.ace-chrome .ace_print-margin {\ +width: 1px;\ +background: #e8e8e8;\ +}\ +.ace-chrome {\ +background-color: #FFFFFF;\ +color: black;\ +}\ +.ace-chrome .ace_cursor {\ +color: black;\ +}\ +.ace-chrome .ace_invisible {\ +color: rgb(191, 191, 191);\ +}\ +.ace-chrome .ace_constant.ace_buildin {\ +color: rgb(88, 72, 246);\ +}\ +.ace-chrome .ace_constant.ace_language {\ +color: rgb(88, 92, 246);\ +}\ +.ace-chrome .ace_constant.ace_library {\ +color: rgb(6, 150, 14);\ +}\ +.ace-chrome .ace_invalid {\ +background-color: rgb(153, 0, 0);\ +color: white;\ +}\ +.ace-chrome .ace_fold {\ +}\ +.ace-chrome .ace_support.ace_function {\ +color: rgb(60, 76, 114);\ +}\ +.ace-chrome .ace_support.ace_constant {\ +color: rgb(6, 150, 14);\ +}\ +.ace-chrome .ace_support.ace_type,\ +.ace-chrome .ace_support.ace_class\ +.ace-chrome .ace_support.ace_other {\ +color: rgb(109, 121, 222);\ +}\ +.ace-chrome .ace_variable.ace_parameter {\ +font-style:italic;\ +color:#FD971F;\ +}\ +.ace-chrome .ace_keyword.ace_operator {\ +color: rgb(104, 118, 135);\ +}\ +.ace-chrome .ace_comment {\ +color: #236e24;\ +}\ +.ace-chrome .ace_comment.ace_doc {\ +color: #236e24;\ +}\ +.ace-chrome .ace_comment.ace_doc.ace_tag {\ +color: #236e24;\ +}\ +.ace-chrome .ace_constant.ace_numeric {\ +color: rgb(0, 0, 205);\ +}\ +.ace-chrome .ace_variable {\ +color: rgb(49, 132, 149);\ +}\ +.ace-chrome .ace_xml-pe {\ +color: rgb(104, 104, 91);\ +}\ +.ace-chrome .ace_entity.ace_name.ace_function {\ +color: #0000A2;\ +}\ +.ace-chrome .ace_heading {\ +color: rgb(12, 7, 255);\ +}\ +.ace-chrome .ace_list {\ +color:rgb(185, 6, 144);\ +}\ +.ace-chrome .ace_marker-layer .ace_selection {\ +background: rgb(181, 213, 255);\ +}\ +.ace-chrome .ace_marker-layer .ace_step {\ +background: rgb(252, 255, 0);\ +}\ +.ace-chrome .ace_marker-layer .ace_stack {\ +background: rgb(164, 229, 101);\ +}\ +.ace-chrome .ace_marker-layer .ace_bracket {\ +margin: -1px 0 0 -1px;\ +border: 1px solid rgb(192, 192, 192);\ +}\ +.ace-chrome .ace_marker-layer .ace_active-line {\ +background: rgba(0, 0, 0, 0.07);\ +}\ +.ace-chrome .ace_gutter-active-line {\ +background-color : #dcdcdc;\ +}\ +.ace-chrome .ace_marker-layer .ace_selected-word {\ +background: rgb(250, 250, 255);\ +border: 1px solid rgb(200, 200, 250);\ +}\ +.ace-chrome .ace_storage,\ +.ace-chrome .ace_keyword,\ +.ace-chrome .ace_meta.ace_tag {\ +color: rgb(147, 15, 128);\ +}\ +.ace-chrome .ace_string.ace_regex {\ +color: rgb(255, 0, 0)\ +}\ +.ace-chrome .ace_string {\ +color: #1A1AA6;\ +}\ +.ace-chrome .ace_entity.ace_other.ace_attribute-name {\ +color: #994409;\ +}\ +.ace-chrome .ace_indent-guide {\ +background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\ +}\ +"; + +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass); +}); diff --git a/lib/ace/src-noconflict/theme-clouds.js b/lib/ace/src-noconflict/theme-clouds.js new file mode 100644 index 00000000..1fa12d65 --- /dev/null +++ b/lib/ace/src-noconflict/theme-clouds.js @@ -0,0 +1,96 @@ +ace.define("ace/theme/clouds",["require","exports","module","ace/lib/dom"], function(require, exports, module) { + +exports.isDark = false; +exports.cssClass = "ace-clouds"; +exports.cssText = ".ace-clouds .ace_gutter {\ +background: #ebebeb;\ +color: #333\ +}\ +.ace-clouds .ace_print-margin {\ +width: 1px;\ +background: #e8e8e8\ +}\ +.ace-clouds {\ +background-color: #FFFFFF;\ +color: #000000\ +}\ +.ace-clouds .ace_cursor {\ +color: #000000\ +}\ +.ace-clouds .ace_marker-layer .ace_selection {\ +background: #BDD5FC\ +}\ +.ace-clouds.ace_multiselect .ace_selection.ace_start {\ +box-shadow: 0 0 3px 0px #FFFFFF;\ +border-radius: 2px\ +}\ +.ace-clouds .ace_marker-layer .ace_step {\ +background: rgb(255, 255, 0)\ +}\ +.ace-clouds .ace_marker-layer .ace_bracket {\ +margin: -1px 0 0 -1px;\ +border: 1px solid #BFBFBF\ +}\ +.ace-clouds .ace_marker-layer .ace_active-line {\ +background: #FFFBD1\ +}\ +.ace-clouds .ace_gutter-active-line {\ +background-color : #dcdcdc\ +}\ +.ace-clouds .ace_marker-layer .ace_selected-word {\ +border: 1px solid #BDD5FC\ +}\ +.ace-clouds .ace_invisible {\ +color: #BFBFBF\ +}\ +.ace-clouds .ace_keyword,\ +.ace-clouds .ace_meta,\ +.ace-clouds .ace_support.ace_constant.ace_property-value {\ +color: #AF956F\ +}\ +.ace-clouds .ace_keyword.ace_operator {\ +color: #484848\ +}\ +.ace-clouds .ace_keyword.ace_other.ace_unit {\ +color: #96DC5F\ +}\ +.ace-clouds .ace_constant.ace_language {\ +color: #39946A\ +}\ +.ace-clouds .ace_constant.ace_numeric {\ +color: #46A609\ +}\ +.ace-clouds .ace_constant.ace_character.ace_entity {\ +color: #BF78CC\ +}\ +.ace-clouds .ace_invalid {\ +background-color: #FF002A\ +}\ +.ace-clouds .ace_fold {\ +background-color: #AF956F;\ +border-color: #000000\ +}\ +.ace-clouds .ace_storage,\ +.ace-clouds .ace_support.ace_class,\ +.ace-clouds .ace_support.ace_function,\ +.ace-clouds .ace_support.ace_other,\ +.ace-clouds .ace_support.ace_type {\ +color: #C52727\ +}\ +.ace-clouds .ace_string {\ +color: #5D90CD\ +}\ +.ace-clouds .ace_comment {\ +color: #BCC8BA\ +}\ +.ace-clouds .ace_entity.ace_name.ace_tag,\ +.ace-clouds .ace_entity.ace_other.ace_attribute-name {\ +color: #606060\ +}\ +.ace-clouds .ace_indent-guide {\ +background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y\ +}"; + +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass); +}); diff --git a/lib/ace/src-noconflict/theme-clouds_midnight.js b/lib/ace/src-noconflict/theme-clouds_midnight.js new file mode 100644 index 00000000..d7b9d8ef --- /dev/null +++ b/lib/ace/src-noconflict/theme-clouds_midnight.js @@ -0,0 +1,97 @@ +ace.define("ace/theme/clouds_midnight",["require","exports","module","ace/lib/dom"], function(require, exports, module) { + +exports.isDark = true; +exports.cssClass = "ace-clouds-midnight"; +exports.cssText = ".ace-clouds-midnight .ace_gutter {\ +background: #232323;\ +color: #929292\ +}\ +.ace-clouds-midnight .ace_print-margin {\ +width: 1px;\ +background: #232323\ +}\ +.ace-clouds-midnight {\ +background-color: #191919;\ +color: #929292\ +}\ +.ace-clouds-midnight .ace_cursor {\ +color: #7DA5DC\ +}\ +.ace-clouds-midnight .ace_marker-layer .ace_selection {\ +background: #000000\ +}\ +.ace-clouds-midnight.ace_multiselect .ace_selection.ace_start {\ +box-shadow: 0 0 3px 0px #191919;\ +border-radius: 2px\ +}\ +.ace-clouds-midnight .ace_marker-layer .ace_step {\ +background: rgb(102, 82, 0)\ +}\ +.ace-clouds-midnight .ace_marker-layer .ace_bracket {\ +margin: -1px 0 0 -1px;\ +border: 1px solid #BFBFBF\ +}\ +.ace-clouds-midnight .ace_marker-layer .ace_active-line {\ +background: rgba(215, 215, 215, 0.031)\ +}\ +.ace-clouds-midnight .ace_gutter-active-line {\ +background-color: rgba(215, 215, 215, 0.031)\ +}\ +.ace-clouds-midnight .ace_marker-layer .ace_selected-word {\ +border: 1px solid #000000\ +}\ +.ace-clouds-midnight .ace_invisible {\ +color: #BFBFBF\ +}\ +.ace-clouds-midnight .ace_keyword,\ +.ace-clouds-midnight .ace_meta,\ +.ace-clouds-midnight .ace_support.ace_constant.ace_property-value {\ +color: #927C5D\ +}\ +.ace-clouds-midnight .ace_keyword.ace_operator {\ +color: #4B4B4B\ +}\ +.ace-clouds-midnight .ace_keyword.ace_other.ace_unit {\ +color: #366F1A\ +}\ +.ace-clouds-midnight .ace_constant.ace_language {\ +color: #39946A\ +}\ +.ace-clouds-midnight .ace_constant.ace_numeric {\ +color: #46A609\ +}\ +.ace-clouds-midnight .ace_constant.ace_character.ace_entity {\ +color: #A165AC\ +}\ +.ace-clouds-midnight .ace_invalid {\ +color: #FFFFFF;\ +background-color: #E92E2E\ +}\ +.ace-clouds-midnight .ace_fold {\ +background-color: #927C5D;\ +border-color: #929292\ +}\ +.ace-clouds-midnight .ace_storage,\ +.ace-clouds-midnight .ace_support.ace_class,\ +.ace-clouds-midnight .ace_support.ace_function,\ +.ace-clouds-midnight .ace_support.ace_other,\ +.ace-clouds-midnight .ace_support.ace_type {\ +color: #E92E2E\ +}\ +.ace-clouds-midnight .ace_string {\ +color: #5D90CD\ +}\ +.ace-clouds-midnight .ace_comment {\ +color: #3C403B\ +}\ +.ace-clouds-midnight .ace_entity.ace_name.ace_tag,\ +.ace-clouds-midnight .ace_entity.ace_other.ace_attribute-name {\ +color: #606060\ +}\ +.ace-clouds-midnight .ace_indent-guide {\ +background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHB3d/8PAAOIAdULw8qMAAAAAElFTkSuQmCC) right repeat-y\ +}"; + +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass); +}); diff --git a/lib/ace/src-noconflict/theme-cobalt.js b/lib/ace/src-noconflict/theme-cobalt.js new file mode 100644 index 00000000..396eb017 --- /dev/null +++ b/lib/ace/src-noconflict/theme-cobalt.js @@ -0,0 +1,113 @@ +ace.define("ace/theme/cobalt",["require","exports","module","ace/lib/dom"], function(require, exports, module) { + +exports.isDark = true; +exports.cssClass = "ace-cobalt"; +exports.cssText = ".ace-cobalt .ace_gutter {\ +background: #011e3a;\ +color: #fff\ +}\ +.ace-cobalt .ace_print-margin {\ +width: 1px;\ +background: #011e3a\ +}\ +.ace-cobalt {\ +background-color: #002240;\ +color: #FFFFFF\ +}\ +.ace-cobalt .ace_cursor {\ +color: #FFFFFF\ +}\ +.ace-cobalt .ace_marker-layer .ace_selection {\ +background: rgba(179, 101, 57, 0.75)\ +}\ +.ace-cobalt.ace_multiselect .ace_selection.ace_start {\ +box-shadow: 0 0 3px 0px #002240;\ +border-radius: 2px\ +}\ +.ace-cobalt .ace_marker-layer .ace_step {\ +background: rgb(127, 111, 19)\ +}\ +.ace-cobalt .ace_marker-layer .ace_bracket {\ +margin: -1px 0 0 -1px;\ +border: 1px solid rgba(255, 255, 255, 0.15)\ +}\ +.ace-cobalt .ace_marker-layer .ace_active-line {\ +background: rgba(0, 0, 0, 0.35)\ +}\ +.ace-cobalt .ace_gutter-active-line {\ +background-color: rgba(0, 0, 0, 0.35)\ +}\ +.ace-cobalt .ace_marker-layer .ace_selected-word {\ +border: 1px solid rgba(179, 101, 57, 0.75)\ +}\ +.ace-cobalt .ace_invisible {\ +color: rgba(255, 255, 255, 0.15)\ +}\ +.ace-cobalt .ace_keyword,\ +.ace-cobalt .ace_meta {\ +color: #FF9D00\ +}\ +.ace-cobalt .ace_constant,\ +.ace-cobalt .ace_constant.ace_character,\ +.ace-cobalt .ace_constant.ace_character.ace_escape,\ +.ace-cobalt .ace_constant.ace_other {\ +color: #FF628C\ +}\ +.ace-cobalt .ace_invalid {\ +color: #F8F8F8;\ +background-color: #800F00\ +}\ +.ace-cobalt .ace_support {\ +color: #80FFBB\ +}\ +.ace-cobalt .ace_support.ace_constant {\ +color: #EB939A\ +}\ +.ace-cobalt .ace_fold {\ +background-color: #FF9D00;\ +border-color: #FFFFFF\ +}\ +.ace-cobalt .ace_support.ace_function {\ +color: #FFB054\ +}\ +.ace-cobalt .ace_storage {\ +color: #FFEE80\ +}\ +.ace-cobalt .ace_entity {\ +color: #FFDD00\ +}\ +.ace-cobalt .ace_string {\ +color: #3AD900\ +}\ +.ace-cobalt .ace_string.ace_regexp {\ +color: #80FFC2\ +}\ +.ace-cobalt .ace_comment {\ +font-style: italic;\ +color: #0088FF\ +}\ +.ace-cobalt .ace_heading,\ +.ace-cobalt .ace_markup.ace_heading {\ +color: #C8E4FD;\ +background-color: #001221\ +}\ +.ace-cobalt .ace_list,\ +.ace-cobalt .ace_markup.ace_list {\ +background-color: #130D26\ +}\ +.ace-cobalt .ace_variable {\ +color: #CCCCCC\ +}\ +.ace-cobalt .ace_variable.ace_language {\ +color: #FF80E1\ +}\ +.ace-cobalt .ace_meta.ace_tag {\ +color: #9EFFFF\ +}\ +.ace-cobalt .ace_indent-guide {\ +background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHCLSvkPAAP3AgSDTRd4AAAAAElFTkSuQmCC) right repeat-y\ +}"; + +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass); +}); diff --git a/lib/ace/src-noconflict/theme-crimson_editor.js b/lib/ace/src-noconflict/theme-crimson_editor.js new file mode 100644 index 00000000..a1885525 --- /dev/null +++ b/lib/ace/src-noconflict/theme-crimson_editor.js @@ -0,0 +1,118 @@ +ace.define("ace/theme/crimson_editor",["require","exports","module","ace/lib/dom"], function(require, exports, module) { +exports.isDark = false; +exports.cssText = ".ace-crimson-editor .ace_gutter {\ +background: #ebebeb;\ +color: #333;\ +overflow : hidden;\ +}\ +.ace-crimson-editor .ace_gutter-layer {\ +width: 100%;\ +text-align: right;\ +}\ +.ace-crimson-editor .ace_print-margin {\ +width: 1px;\ +background: #e8e8e8;\ +}\ +.ace-crimson-editor {\ +background-color: #FFFFFF;\ +color: rgb(64, 64, 64);\ +}\ +.ace-crimson-editor .ace_cursor {\ +color: black;\ +}\ +.ace-crimson-editor .ace_invisible {\ +color: rgb(191, 191, 191);\ +}\ +.ace-crimson-editor .ace_identifier {\ +color: black;\ +}\ +.ace-crimson-editor .ace_keyword {\ +color: blue;\ +}\ +.ace-crimson-editor .ace_constant.ace_buildin {\ +color: rgb(88, 72, 246);\ +}\ +.ace-crimson-editor .ace_constant.ace_language {\ +color: rgb(255, 156, 0);\ +}\ +.ace-crimson-editor .ace_constant.ace_library {\ +color: rgb(6, 150, 14);\ +}\ +.ace-crimson-editor .ace_invalid {\ +text-decoration: line-through;\ +color: rgb(224, 0, 0);\ +}\ +.ace-crimson-editor .ace_fold {\ +}\ +.ace-crimson-editor .ace_support.ace_function {\ +color: rgb(192, 0, 0);\ +}\ +.ace-crimson-editor .ace_support.ace_constant {\ +color: rgb(6, 150, 14);\ +}\ +.ace-crimson-editor .ace_support.ace_type,\ +.ace-crimson-editor .ace_support.ace_class {\ +color: rgb(109, 121, 222);\ +}\ +.ace-crimson-editor .ace_keyword.ace_operator {\ +color: rgb(49, 132, 149);\ +}\ +.ace-crimson-editor .ace_string {\ +color: rgb(128, 0, 128);\ +}\ +.ace-crimson-editor .ace_comment {\ +color: rgb(76, 136, 107);\ +}\ +.ace-crimson-editor .ace_comment.ace_doc {\ +color: rgb(0, 102, 255);\ +}\ +.ace-crimson-editor .ace_comment.ace_doc.ace_tag {\ +color: rgb(128, 159, 191);\ +}\ +.ace-crimson-editor .ace_constant.ace_numeric {\ +color: rgb(0, 0, 64);\ +}\ +.ace-crimson-editor .ace_variable {\ +color: rgb(0, 64, 128);\ +}\ +.ace-crimson-editor .ace_xml-pe {\ +color: rgb(104, 104, 91);\ +}\ +.ace-crimson-editor .ace_marker-layer .ace_selection {\ +background: rgb(181, 213, 255);\ +}\ +.ace-crimson-editor .ace_marker-layer .ace_step {\ +background: rgb(252, 255, 0);\ +}\ +.ace-crimson-editor .ace_marker-layer .ace_stack {\ +background: rgb(164, 229, 101);\ +}\ +.ace-crimson-editor .ace_marker-layer .ace_bracket {\ +margin: -1px 0 0 -1px;\ +border: 1px solid rgb(192, 192, 192);\ +}\ +.ace-crimson-editor .ace_marker-layer .ace_active-line {\ +background: rgb(232, 242, 254);\ +}\ +.ace-crimson-editor .ace_gutter-active-line {\ +background-color : #dcdcdc;\ +}\ +.ace-crimson-editor .ace_meta.ace_tag {\ +color:rgb(28, 2, 255);\ +}\ +.ace-crimson-editor .ace_marker-layer .ace_selected-word {\ +background: rgb(250, 250, 255);\ +border: 1px solid rgb(200, 200, 250);\ +}\ +.ace-crimson-editor .ace_string.ace_regex {\ +color: rgb(192, 0, 192);\ +}\ +.ace-crimson-editor .ace_indent-guide {\ +background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\ +}"; + +exports.cssClass = "ace-crimson-editor"; + +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass); +}); diff --git a/lib/ace/src-noconflict/theme-dawn.js b/lib/ace/src-noconflict/theme-dawn.js new file mode 100644 index 00000000..38c8f2bb --- /dev/null +++ b/lib/ace/src-noconflict/theme-dawn.js @@ -0,0 +1,109 @@ +ace.define("ace/theme/dawn",["require","exports","module","ace/lib/dom"], function(require, exports, module) { + +exports.isDark = false; +exports.cssClass = "ace-dawn"; +exports.cssText = ".ace-dawn .ace_gutter {\ +background: #ebebeb;\ +color: #333\ +}\ +.ace-dawn .ace_print-margin {\ +width: 1px;\ +background: #e8e8e8\ +}\ +.ace-dawn {\ +background-color: #F9F9F9;\ +color: #080808\ +}\ +.ace-dawn .ace_cursor {\ +color: #000000\ +}\ +.ace-dawn .ace_marker-layer .ace_selection {\ +background: rgba(39, 95, 255, 0.30)\ +}\ +.ace-dawn.ace_multiselect .ace_selection.ace_start {\ +box-shadow: 0 0 3px 0px #F9F9F9;\ +border-radius: 2px\ +}\ +.ace-dawn .ace_marker-layer .ace_step {\ +background: rgb(255, 255, 0)\ +}\ +.ace-dawn .ace_marker-layer .ace_bracket {\ +margin: -1px 0 0 -1px;\ +border: 1px solid rgba(75, 75, 126, 0.50)\ +}\ +.ace-dawn .ace_marker-layer .ace_active-line {\ +background: rgba(36, 99, 180, 0.12)\ +}\ +.ace-dawn .ace_gutter-active-line {\ +background-color : #dcdcdc\ +}\ +.ace-dawn .ace_marker-layer .ace_selected-word {\ +border: 1px solid rgba(39, 95, 255, 0.30)\ +}\ +.ace-dawn .ace_invisible {\ +color: rgba(75, 75, 126, 0.50)\ +}\ +.ace-dawn .ace_keyword,\ +.ace-dawn .ace_meta {\ +color: #794938\ +}\ +.ace-dawn .ace_constant,\ +.ace-dawn .ace_constant.ace_character,\ +.ace-dawn .ace_constant.ace_character.ace_escape,\ +.ace-dawn .ace_constant.ace_other {\ +color: #811F24\ +}\ +.ace-dawn .ace_invalid.ace_illegal {\ +text-decoration: underline;\ +font-style: italic;\ +color: #F8F8F8;\ +background-color: #B52A1D\ +}\ +.ace-dawn .ace_invalid.ace_deprecated {\ +text-decoration: underline;\ +font-style: italic;\ +color: #B52A1D\ +}\ +.ace-dawn .ace_support {\ +color: #691C97\ +}\ +.ace-dawn .ace_support.ace_constant {\ +color: #B4371F\ +}\ +.ace-dawn .ace_fold {\ +background-color: #794938;\ +border-color: #080808\ +}\ +.ace-dawn .ace_list,\ +.ace-dawn .ace_markup.ace_list,\ +.ace-dawn .ace_support.ace_function {\ +color: #693A17\ +}\ +.ace-dawn .ace_storage {\ +font-style: italic;\ +color: #A71D5D\ +}\ +.ace-dawn .ace_string {\ +color: #0B6125\ +}\ +.ace-dawn .ace_string.ace_regexp {\ +color: #CF5628\ +}\ +.ace-dawn .ace_comment {\ +font-style: italic;\ +color: #5A525F\ +}\ +.ace-dawn .ace_heading,\ +.ace-dawn .ace_markup.ace_heading {\ +color: #19356D\ +}\ +.ace-dawn .ace_variable {\ +color: #234A97\ +}\ +.ace-dawn .ace_indent-guide {\ +background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYLh/5+x/AAizA4hxNNsZAAAAAElFTkSuQmCC) right repeat-y\ +}"; + +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass); +}); diff --git a/lib/ace/src-noconflict/theme-dreamweaver.js b/lib/ace/src-noconflict/theme-dreamweaver.js new file mode 100644 index 00000000..632b1ea9 --- /dev/null +++ b/lib/ace/src-noconflict/theme-dreamweaver.js @@ -0,0 +1,141 @@ +ace.define("ace/theme/dreamweaver",["require","exports","module","ace/lib/dom"], function(require, exports, module) { +exports.isDark = false; +exports.cssClass = "ace-dreamweaver"; +exports.cssText = ".ace-dreamweaver .ace_gutter {\ +background: #e8e8e8;\ +color: #333;\ +}\ +.ace-dreamweaver .ace_print-margin {\ +width: 1px;\ +background: #e8e8e8;\ +}\ +.ace-dreamweaver {\ +background-color: #FFFFFF;\ +color: black;\ +}\ +.ace-dreamweaver .ace_fold {\ +background-color: #757AD8;\ +}\ +.ace-dreamweaver .ace_cursor {\ +color: black;\ +}\ +.ace-dreamweaver .ace_invisible {\ +color: rgb(191, 191, 191);\ +}\ +.ace-dreamweaver .ace_storage,\ +.ace-dreamweaver .ace_keyword {\ +color: blue;\ +}\ +.ace-dreamweaver .ace_constant.ace_buildin {\ +color: rgb(88, 72, 246);\ +}\ +.ace-dreamweaver .ace_constant.ace_language {\ +color: rgb(88, 92, 246);\ +}\ +.ace-dreamweaver .ace_constant.ace_library {\ +color: rgb(6, 150, 14);\ +}\ +.ace-dreamweaver .ace_invalid {\ +background-color: rgb(153, 0, 0);\ +color: white;\ +}\ +.ace-dreamweaver .ace_support.ace_function {\ +color: rgb(60, 76, 114);\ +}\ +.ace-dreamweaver .ace_support.ace_constant {\ +color: rgb(6, 150, 14);\ +}\ +.ace-dreamweaver .ace_support.ace_type,\ +.ace-dreamweaver .ace_support.ace_class {\ +color: #009;\ +}\ +.ace-dreamweaver .ace_support.ace_php_tag {\ +color: #f00;\ +}\ +.ace-dreamweaver .ace_keyword.ace_operator {\ +color: rgb(104, 118, 135);\ +}\ +.ace-dreamweaver .ace_string {\ +color: #00F;\ +}\ +.ace-dreamweaver .ace_comment {\ +color: rgb(76, 136, 107);\ +}\ +.ace-dreamweaver .ace_comment.ace_doc {\ +color: rgb(0, 102, 255);\ +}\ +.ace-dreamweaver .ace_comment.ace_doc.ace_tag {\ +color: rgb(128, 159, 191);\ +}\ +.ace-dreamweaver .ace_constant.ace_numeric {\ +color: rgb(0, 0, 205);\ +}\ +.ace-dreamweaver .ace_variable {\ +color: #06F\ +}\ +.ace-dreamweaver .ace_xml-pe {\ +color: rgb(104, 104, 91);\ +}\ +.ace-dreamweaver .ace_entity.ace_name.ace_function {\ +color: #00F;\ +}\ +.ace-dreamweaver .ace_heading {\ +color: rgb(12, 7, 255);\ +}\ +.ace-dreamweaver .ace_list {\ +color:rgb(185, 6, 144);\ +}\ +.ace-dreamweaver .ace_marker-layer .ace_selection {\ +background: rgb(181, 213, 255);\ +}\ +.ace-dreamweaver .ace_marker-layer .ace_step {\ +background: rgb(252, 255, 0);\ +}\ +.ace-dreamweaver .ace_marker-layer .ace_stack {\ +background: rgb(164, 229, 101);\ +}\ +.ace-dreamweaver .ace_marker-layer .ace_bracket {\ +margin: -1px 0 0 -1px;\ +border: 1px solid rgb(192, 192, 192);\ +}\ +.ace-dreamweaver .ace_marker-layer .ace_active-line {\ +background: rgba(0, 0, 0, 0.07);\ +}\ +.ace-dreamweaver .ace_gutter-active-line {\ +background-color : #DCDCDC;\ +}\ +.ace-dreamweaver .ace_marker-layer .ace_selected-word {\ +background: rgb(250, 250, 255);\ +border: 1px solid rgb(200, 200, 250);\ +}\ +.ace-dreamweaver .ace_meta.ace_tag {\ +color:#009;\ +}\ +.ace-dreamweaver .ace_meta.ace_tag.ace_anchor {\ +color:#060;\ +}\ +.ace-dreamweaver .ace_meta.ace_tag.ace_form {\ +color:#F90;\ +}\ +.ace-dreamweaver .ace_meta.ace_tag.ace_image {\ +color:#909;\ +}\ +.ace-dreamweaver .ace_meta.ace_tag.ace_script {\ +color:#900;\ +}\ +.ace-dreamweaver .ace_meta.ace_tag.ace_style {\ +color:#909;\ +}\ +.ace-dreamweaver .ace_meta.ace_tag.ace_table {\ +color:#099;\ +}\ +.ace-dreamweaver .ace_string.ace_regex {\ +color: rgb(255, 0, 0)\ +}\ +.ace-dreamweaver .ace_indent-guide {\ +background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\ +}"; + +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass); +}); diff --git a/lib/ace/src-noconflict/theme-eclipse.js b/lib/ace/src-noconflict/theme-eclipse.js new file mode 100644 index 00000000..63aa334c --- /dev/null +++ b/lib/ace/src-noconflict/theme-eclipse.js @@ -0,0 +1,98 @@ +ace.define("ace/theme/eclipse",["require","exports","module","ace/lib/dom"], function(require, exports, module) { +"use strict"; + +exports.isDark = false; +exports.cssText = ".ace-eclipse .ace_gutter {\ +background: #ebebeb;\ +border-right: 1px solid rgb(159, 159, 159);\ +color: rgb(136, 136, 136);\ +}\ +.ace-eclipse .ace_print-margin {\ +width: 1px;\ +background: #ebebeb;\ +}\ +.ace-eclipse {\ +background-color: #FFFFFF;\ +color: black;\ +}\ +.ace-eclipse .ace_fold {\ +background-color: rgb(60, 76, 114);\ +}\ +.ace-eclipse .ace_cursor {\ +color: black;\ +}\ +.ace-eclipse .ace_storage,\ +.ace-eclipse .ace_keyword,\ +.ace-eclipse .ace_variable {\ +color: rgb(127, 0, 85);\ +}\ +.ace-eclipse .ace_constant.ace_buildin {\ +color: rgb(88, 72, 246);\ +}\ +.ace-eclipse .ace_constant.ace_library {\ +color: rgb(6, 150, 14);\ +}\ +.ace-eclipse .ace_function {\ +color: rgb(60, 76, 114);\ +}\ +.ace-eclipse .ace_string {\ +color: rgb(42, 0, 255);\ +}\ +.ace-eclipse .ace_comment {\ +color: rgb(113, 150, 130);\ +}\ +.ace-eclipse .ace_comment.ace_doc {\ +color: rgb(63, 95, 191);\ +}\ +.ace-eclipse .ace_comment.ace_doc.ace_tag {\ +color: rgb(127, 159, 191);\ +}\ +.ace-eclipse .ace_constant.ace_numeric {\ +color: darkblue;\ +}\ +.ace-eclipse .ace_tag {\ +color: rgb(25, 118, 116);\ +}\ +.ace-eclipse .ace_type {\ +color: rgb(127, 0, 127);\ +}\ +.ace-eclipse .ace_xml-pe {\ +color: rgb(104, 104, 91);\ +}\ +.ace-eclipse .ace_marker-layer .ace_selection {\ +background: rgb(181, 213, 255);\ +}\ +.ace-eclipse .ace_marker-layer .ace_bracket {\ +margin: -1px 0 0 -1px;\ +border: 1px solid rgb(192, 192, 192);\ +}\ +.ace-eclipse .ace_meta.ace_tag {\ +color:rgb(25, 118, 116);\ +}\ +.ace-eclipse .ace_invisible {\ +color: #ddd;\ +}\ +.ace-eclipse .ace_entity.ace_other.ace_attribute-name {\ +color:rgb(127, 0, 127);\ +}\ +.ace-eclipse .ace_marker-layer .ace_step {\ +background: rgb(255, 255, 0);\ +}\ +.ace-eclipse .ace_active-line {\ +background: rgb(232, 242, 254);\ +}\ +.ace-eclipse .ace_gutter-active-line {\ +background-color : #DADADA;\ +}\ +.ace-eclipse .ace_marker-layer .ace_selected-word {\ +border: 1px solid rgb(181, 213, 255);\ +}\ +.ace-eclipse .ace_indent-guide {\ +background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\ +}"; + +exports.cssClass = "ace-eclipse"; + +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass); +}); diff --git a/lib/ace/src-noconflict/theme-github.js b/lib/ace/src-noconflict/theme-github.js new file mode 100644 index 00000000..6c728166 --- /dev/null +++ b/lib/ace/src-noconflict/theme-github.js @@ -0,0 +1,98 @@ +ace.define("ace/theme/github",["require","exports","module","ace/lib/dom"], function(require, exports, module) { + +exports.isDark = false; +exports.cssClass = "ace-github"; +exports.cssText = "\ +.ace-github .ace_gutter {\ +background: #e8e8e8;\ +color: #AAA;\ +}\ +.ace-github {\ +background: #fff;\ +color: #000;\ +}\ +.ace-github .ace_keyword {\ +font-weight: bold;\ +}\ +.ace-github .ace_string {\ +color: #D14;\ +}\ +.ace-github .ace_variable.ace_class {\ +color: teal;\ +}\ +.ace-github .ace_constant.ace_numeric {\ +color: #099;\ +}\ +.ace-github .ace_constant.ace_buildin {\ +color: #0086B3;\ +}\ +.ace-github .ace_support.ace_function {\ +color: #0086B3;\ +}\ +.ace-github .ace_comment {\ +color: #998;\ +font-style: italic;\ +}\ +.ace-github .ace_variable.ace_language {\ +color: #0086B3;\ +}\ +.ace-github .ace_paren {\ +font-weight: bold;\ +}\ +.ace-github .ace_boolean {\ +font-weight: bold;\ +}\ +.ace-github .ace_string.ace_regexp {\ +color: #009926;\ +font-weight: normal;\ +}\ +.ace-github .ace_variable.ace_instance {\ +color: teal;\ +}\ +.ace-github .ace_constant.ace_language {\ +font-weight: bold;\ +}\ +.ace-github .ace_cursor {\ +color: black;\ +}\ +.ace-github .ace_marker-layer .ace_active-line {\ +background: rgb(255, 255, 204);\ +}\ +.ace-github .ace_marker-layer .ace_selection {\ +background: rgb(181, 213, 255);\ +}\ +.ace-github.ace_multiselect .ace_selection.ace_start {\ +box-shadow: 0 0 3px 0px white;\ +border-radius: 2px;\ +}\ +.ace-github.ace_nobold .ace_line > span {\ +font-weight: normal !important;\ +}\ +.ace-github .ace_marker-layer .ace_step {\ +background: rgb(252, 255, 0);\ +}\ +.ace-github .ace_marker-layer .ace_stack {\ +background: rgb(164, 229, 101);\ +}\ +.ace-github .ace_marker-layer .ace_bracket {\ +margin: -1px 0 0 -1px;\ +border: 1px solid rgb(192, 192, 192);\ +}\ +.ace-github .ace_gutter-active-line {\ +background-color : rgba(0, 0, 0, 0.07);\ +}\ +.ace-github .ace_marker-layer .ace_selected-word {\ +background: rgb(250, 250, 255);\ +border: 1px solid rgb(200, 200, 250);\ +}\ +.ace-github .ace_print-margin {\ +width: 1px;\ +background: #e8e8e8;\ +}\ +.ace-github .ace_indent-guide {\ +background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\ +}"; + + var dom = require("../lib/dom"); + dom.importCssString(exports.cssText, exports.cssClass); +}); diff --git a/lib/ace/src-noconflict/theme-idle_fingers.js b/lib/ace/src-noconflict/theme-idle_fingers.js new file mode 100644 index 00000000..42df21c7 --- /dev/null +++ b/lib/ace/src-noconflict/theme-idle_fingers.js @@ -0,0 +1,97 @@ +ace.define("ace/theme/idle_fingers",["require","exports","module","ace/lib/dom"], function(require, exports, module) { + +exports.isDark = true; +exports.cssClass = "ace-idle-fingers"; +exports.cssText = ".ace-idle-fingers .ace_gutter {\ +background: #3b3b3b;\ +color: #fff\ +}\ +.ace-idle-fingers .ace_print-margin {\ +width: 1px;\ +background: #3b3b3b\ +}\ +.ace-idle-fingers {\ +background-color: #323232;\ +color: #FFFFFF\ +}\ +.ace-idle-fingers .ace_cursor {\ +color: #91FF00\ +}\ +.ace-idle-fingers .ace_marker-layer .ace_selection {\ +background: rgba(90, 100, 126, 0.88)\ +}\ +.ace-idle-fingers.ace_multiselect .ace_selection.ace_start {\ +box-shadow: 0 0 3px 0px #323232;\ +border-radius: 2px\ +}\ +.ace-idle-fingers .ace_marker-layer .ace_step {\ +background: rgb(102, 82, 0)\ +}\ +.ace-idle-fingers .ace_marker-layer .ace_bracket {\ +margin: -1px 0 0 -1px;\ +border: 1px solid #404040\ +}\ +.ace-idle-fingers .ace_marker-layer .ace_active-line {\ +background: #353637\ +}\ +.ace-idle-fingers .ace_gutter-active-line {\ +background-color: #353637\ +}\ +.ace-idle-fingers .ace_marker-layer .ace_selected-word {\ +border: 1px solid rgba(90, 100, 126, 0.88)\ +}\ +.ace-idle-fingers .ace_invisible {\ +color: #404040\ +}\ +.ace-idle-fingers .ace_keyword,\ +.ace-idle-fingers .ace_meta {\ +color: #CC7833\ +}\ +.ace-idle-fingers .ace_constant,\ +.ace-idle-fingers .ace_constant.ace_character,\ +.ace-idle-fingers .ace_constant.ace_character.ace_escape,\ +.ace-idle-fingers .ace_constant.ace_other,\ +.ace-idle-fingers .ace_support.ace_constant {\ +color: #6C99BB\ +}\ +.ace-idle-fingers .ace_invalid {\ +color: #FFFFFF;\ +background-color: #FF0000\ +}\ +.ace-idle-fingers .ace_fold {\ +background-color: #CC7833;\ +border-color: #FFFFFF\ +}\ +.ace-idle-fingers .ace_support.ace_function {\ +color: #B83426\ +}\ +.ace-idle-fingers .ace_variable.ace_parameter {\ +font-style: italic\ +}\ +.ace-idle-fingers .ace_string {\ +color: #A5C261\ +}\ +.ace-idle-fingers .ace_string.ace_regexp {\ +color: #CCCC33\ +}\ +.ace-idle-fingers .ace_comment {\ +font-style: italic;\ +color: #BC9458\ +}\ +.ace-idle-fingers .ace_meta.ace_tag {\ +color: #FFE5BB\ +}\ +.ace-idle-fingers .ace_entity.ace_name {\ +color: #FFC66D\ +}\ +.ace-idle-fingers .ace_collab.ace_user1 {\ +color: #323232;\ +background-color: #FFF980\ +}\ +.ace-idle-fingers .ace_indent-guide {\ +background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMwMjLyZYiPj/8PAAreAwAI1+g0AAAAAElFTkSuQmCC) right repeat-y\ +}"; + +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass); +}); diff --git a/lib/ace/src-noconflict/theme-katzenmilch.js b/lib/ace/src-noconflict/theme-katzenmilch.js new file mode 100644 index 00000000..8bff2f12 --- /dev/null +++ b/lib/ace/src-noconflict/theme-katzenmilch.js @@ -0,0 +1,119 @@ +ace.define("ace/theme/katzenmilch",["require","exports","module","ace/lib/dom"], function(require, exports, module) { + +exports.isDark = false; +exports.cssClass = "ace-katzenmilch"; +exports.cssText = ".ace-katzenmilch .ace_gutter,\ +.ace-katzenmilch .ace_gutter {\ +background: #e8e8e8;\ +color: #333\ +}\ +.ace-katzenmilch .ace_print-margin {\ +width: 1px;\ +background: #e8e8e8\ +}\ +.ace-katzenmilch {\ +background-color: #f3f2f3;\ +color: rgba(15, 0, 9, 1.0)\ +}\ +.ace-katzenmilch .ace_cursor {\ +border-left: 2px solid #100011\ +}\ +.ace-katzenmilch .ace_overwrite-cursors .ace_cursor {\ +border-left: 0px;\ +border-bottom: 1px solid #100011\ +}\ +.ace-katzenmilch .ace_marker-layer .ace_selection {\ +background: rgba(100, 5, 208, 0.27)\ +}\ +.ace-katzenmilch.ace_multiselect .ace_selection.ace_start {\ +box-shadow: 0 0 3px 0px #f3f2f3;\ +border-radius: 2px\ +}\ +.ace-katzenmilch .ace_marker-layer .ace_step {\ +background: rgb(198, 219, 174)\ +}\ +.ace-katzenmilch .ace_marker-layer .ace_bracket {\ +margin: -1px 0 0 -1px;\ +border: 1px solid #000000\ +}\ +.ace-katzenmilch .ace_marker-layer .ace_active-line {\ +background: rgb(232, 242, 254)\ +}\ +.ace-katzenmilch .ace_gutter-active-line {\ +background-color: rgb(232, 242, 254)\ +}\ +.ace-katzenmilch .ace_marker-layer .ace_selected-word {\ +border: 1px solid rgba(100, 5, 208, 0.27)\ +}\ +.ace-katzenmilch .ace_fold {\ +background-color: rgba(2, 95, 73, 0.97);\ +border-color: rgba(15, 0, 9, 1.0)\ +}\ +.ace-katzenmilch .ace_keyword {\ +color: #674Aa8;\ +rbackground-color: rgba(163, 170, 216, 0.055)\ +}\ +.ace-katzenmilch .ace_constant.ace_language {\ +color: #7D7e52;\ +rbackground-color: rgba(189, 190, 130, 0.059)\ +}\ +.ace-katzenmilch .ace_constant.ace_numeric {\ +color: rgba(79, 130, 123, 0.93);\ +rbackground-color: rgba(119, 194, 187, 0.059)\ +}\ +.ace-katzenmilch .ace_constant.ace_character,\ +.ace-katzenmilch .ace_constant.ace_other {\ +color: rgba(2, 95, 105, 1.0);\ +rbackground-color: rgba(127, 34, 153, 0.063)\ +}\ +.ace-katzenmilch .ace_support.ace_function {\ +color: #9D7e62;\ +rbackground-color: rgba(189, 190, 130, 0.039)\ +}\ +.ace-katzenmilch .ace_support.ace_class {\ +color: rgba(239, 106, 167, 1.0);\ +rbackground-color: rgba(239, 106, 167, 0.063)\ +}\ +.ace-katzenmilch .ace_storage {\ +color: rgba(123, 92, 191, 1.0);\ +rbackground-color: rgba(139, 93, 223, 0.051)\ +}\ +.ace-katzenmilch .ace_invalid {\ +color: #DFDFD5;\ +rbackground-color: #CC1B27\ +}\ +.ace-katzenmilch .ace_string {\ +color: #5a5f9b;\ +rbackground-color: rgba(170, 175, 219, 0.035)\ +}\ +.ace-katzenmilch .ace_comment {\ +font-style: italic;\ +color: rgba(64, 79, 80, 0.67);\ +rbackground-color: rgba(95, 15, 255, 0.0078)\ +}\ +.ace-katzenmilch .ace_entity.ace_name.ace_function,\ +.ace-katzenmilch .ace_variable {\ +color: rgba(2, 95, 73, 0.97);\ +rbackground-color: rgba(34, 255, 73, 0.12)\ +}\ +.ace-katzenmilch .ace_variable.ace_language {\ +color: #316fcf;\ +rbackground-color: rgba(58, 175, 255, 0.039)\ +}\ +.ace-katzenmilch .ace_variable.ace_parameter {\ +font-style: italic;\ +color: rgba(51, 150, 159, 0.87);\ +rbackground-color: rgba(5, 214, 249, 0.043)\ +}\ +.ace-katzenmilch .ace_entity.ace_other.ace_attribute-name {\ +color: rgba(73, 70, 194, 0.93);\ +rbackground-color: rgba(73, 134, 194, 0.035)\ +}\ +.ace-katzenmilch .ace_entity.ace_name.ace_tag {\ +color: #3976a2;\ +rbackground-color: rgba(73, 166, 210, 0.039)\ +}"; + +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass); +}); diff --git a/lib/ace/src-noconflict/theme-kr.js b/lib/ace/src-noconflict/theme-kr.js new file mode 100644 index 00000000..27dff6e2 --- /dev/null +++ b/lib/ace/src-noconflict/theme-kr.js @@ -0,0 +1,105 @@ +ace.define("ace/theme/kr_theme",["require","exports","module","ace/lib/dom"], function(require, exports, module) { + +exports.isDark = true; +exports.cssClass = "ace-kr-theme"; +exports.cssText = ".ace-kr-theme .ace_gutter {\ +background: #1c1917;\ +color: #FCFFE0\ +}\ +.ace-kr-theme .ace_print-margin {\ +width: 1px;\ +background: #1c1917\ +}\ +.ace-kr-theme {\ +background-color: #0B0A09;\ +color: #FCFFE0\ +}\ +.ace-kr-theme .ace_cursor {\ +color: #FF9900\ +}\ +.ace-kr-theme .ace_marker-layer .ace_selection {\ +background: rgba(170, 0, 255, 0.45)\ +}\ +.ace-kr-theme.ace_multiselect .ace_selection.ace_start {\ +box-shadow: 0 0 3px 0px #0B0A09;\ +border-radius: 2px\ +}\ +.ace-kr-theme .ace_marker-layer .ace_step {\ +background: rgb(102, 82, 0)\ +}\ +.ace-kr-theme .ace_marker-layer .ace_bracket {\ +margin: -1px 0 0 -1px;\ +border: 1px solid rgba(255, 177, 111, 0.32)\ +}\ +.ace-kr-theme .ace_marker-layer .ace_active-line {\ +background: #38403D\ +}\ +.ace-kr-theme .ace_gutter-active-line {\ +background-color : #38403D\ +}\ +.ace-kr-theme .ace_marker-layer .ace_selected-word {\ +border: 1px solid rgba(170, 0, 255, 0.45)\ +}\ +.ace-kr-theme .ace_invisible {\ +color: rgba(255, 177, 111, 0.32)\ +}\ +.ace-kr-theme .ace_keyword,\ +.ace-kr-theme .ace_meta {\ +color: #949C8B\ +}\ +.ace-kr-theme .ace_constant,\ +.ace-kr-theme .ace_constant.ace_character,\ +.ace-kr-theme .ace_constant.ace_character.ace_escape,\ +.ace-kr-theme .ace_constant.ace_other {\ +color: rgba(210, 117, 24, 0.76)\ +}\ +.ace-kr-theme .ace_invalid {\ +color: #F8F8F8;\ +background-color: #A41300\ +}\ +.ace-kr-theme .ace_support {\ +color: #9FC28A\ +}\ +.ace-kr-theme .ace_support.ace_constant {\ +color: #C27E66\ +}\ +.ace-kr-theme .ace_fold {\ +background-color: #949C8B;\ +border-color: #FCFFE0\ +}\ +.ace-kr-theme .ace_support.ace_function {\ +color: #85873A\ +}\ +.ace-kr-theme .ace_storage {\ +color: #FFEE80\ +}\ +.ace-kr-theme .ace_string {\ +color: rgba(164, 161, 181, 0.8)\ +}\ +.ace-kr-theme .ace_string.ace_regexp {\ +color: rgba(125, 255, 192, 0.65)\ +}\ +.ace-kr-theme .ace_comment {\ +font-style: italic;\ +color: #706D5B\ +}\ +.ace-kr-theme .ace_variable {\ +color: #D1A796\ +}\ +.ace-kr-theme .ace_list,\ +.ace-kr-theme .ace_markup.ace_list {\ +background-color: #0F0040\ +}\ +.ace-kr-theme .ace_variable.ace_language {\ +color: #FF80E1\ +}\ +.ace-kr-theme .ace_meta.ace_tag {\ +color: #BABD9C\ +}\ +.ace-kr-theme .ace_indent-guide {\ +background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYFBXV/8PAAJoAXX4kT2EAAAAAElFTkSuQmCC) right repeat-y\ +}"; + +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass); +}); diff --git a/lib/ace/src-noconflict/theme-kr_theme.js b/lib/ace/src-noconflict/theme-kr_theme.js new file mode 100644 index 00000000..27dff6e2 --- /dev/null +++ b/lib/ace/src-noconflict/theme-kr_theme.js @@ -0,0 +1,105 @@ +ace.define("ace/theme/kr_theme",["require","exports","module","ace/lib/dom"], function(require, exports, module) { + +exports.isDark = true; +exports.cssClass = "ace-kr-theme"; +exports.cssText = ".ace-kr-theme .ace_gutter {\ +background: #1c1917;\ +color: #FCFFE0\ +}\ +.ace-kr-theme .ace_print-margin {\ +width: 1px;\ +background: #1c1917\ +}\ +.ace-kr-theme {\ +background-color: #0B0A09;\ +color: #FCFFE0\ +}\ +.ace-kr-theme .ace_cursor {\ +color: #FF9900\ +}\ +.ace-kr-theme .ace_marker-layer .ace_selection {\ +background: rgba(170, 0, 255, 0.45)\ +}\ +.ace-kr-theme.ace_multiselect .ace_selection.ace_start {\ +box-shadow: 0 0 3px 0px #0B0A09;\ +border-radius: 2px\ +}\ +.ace-kr-theme .ace_marker-layer .ace_step {\ +background: rgb(102, 82, 0)\ +}\ +.ace-kr-theme .ace_marker-layer .ace_bracket {\ +margin: -1px 0 0 -1px;\ +border: 1px solid rgba(255, 177, 111, 0.32)\ +}\ +.ace-kr-theme .ace_marker-layer .ace_active-line {\ +background: #38403D\ +}\ +.ace-kr-theme .ace_gutter-active-line {\ +background-color : #38403D\ +}\ +.ace-kr-theme .ace_marker-layer .ace_selected-word {\ +border: 1px solid rgba(170, 0, 255, 0.45)\ +}\ +.ace-kr-theme .ace_invisible {\ +color: rgba(255, 177, 111, 0.32)\ +}\ +.ace-kr-theme .ace_keyword,\ +.ace-kr-theme .ace_meta {\ +color: #949C8B\ +}\ +.ace-kr-theme .ace_constant,\ +.ace-kr-theme .ace_constant.ace_character,\ +.ace-kr-theme .ace_constant.ace_character.ace_escape,\ +.ace-kr-theme .ace_constant.ace_other {\ +color: rgba(210, 117, 24, 0.76)\ +}\ +.ace-kr-theme .ace_invalid {\ +color: #F8F8F8;\ +background-color: #A41300\ +}\ +.ace-kr-theme .ace_support {\ +color: #9FC28A\ +}\ +.ace-kr-theme .ace_support.ace_constant {\ +color: #C27E66\ +}\ +.ace-kr-theme .ace_fold {\ +background-color: #949C8B;\ +border-color: #FCFFE0\ +}\ +.ace-kr-theme .ace_support.ace_function {\ +color: #85873A\ +}\ +.ace-kr-theme .ace_storage {\ +color: #FFEE80\ +}\ +.ace-kr-theme .ace_string {\ +color: rgba(164, 161, 181, 0.8)\ +}\ +.ace-kr-theme .ace_string.ace_regexp {\ +color: rgba(125, 255, 192, 0.65)\ +}\ +.ace-kr-theme .ace_comment {\ +font-style: italic;\ +color: #706D5B\ +}\ +.ace-kr-theme .ace_variable {\ +color: #D1A796\ +}\ +.ace-kr-theme .ace_list,\ +.ace-kr-theme .ace_markup.ace_list {\ +background-color: #0F0040\ +}\ +.ace-kr-theme .ace_variable.ace_language {\ +color: #FF80E1\ +}\ +.ace-kr-theme .ace_meta.ace_tag {\ +color: #BABD9C\ +}\ +.ace-kr-theme .ace_indent-guide {\ +background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYFBXV/8PAAJoAXX4kT2EAAAAAElFTkSuQmCC) right repeat-y\ +}"; + +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass); +}); diff --git a/lib/ace/src-noconflict/theme-kuroir.js b/lib/ace/src-noconflict/theme-kuroir.js new file mode 100644 index 00000000..d824a80c --- /dev/null +++ b/lib/ace/src-noconflict/theme-kuroir.js @@ -0,0 +1,59 @@ +ace.define("ace/theme/kuroir",["require","exports","module","ace/lib/dom"], function(require, exports, module) { + +exports.isDark = false; +exports.cssClass = "ace-kuroir"; +exports.cssText = "\ +.ace-kuroir .ace_gutter {\ +background: #e8e8e8;\ +color: #333;\ +}\ +.ace-kuroir .ace_print-margin {\ +width: 1px;\ +background: #e8e8e8;\ +}\ +.ace-kuroir {\ +background-color: #E8E9E8;\ +color: #363636;\ +}\ +.ace-kuroir .ace_cursor {\ +color: #202020;\ +}\ +.ace-kuroir .ace_marker-layer .ace_selection {\ +background: rgba(245, 170, 0, 0.57);\ +}\ +.ace-kuroir.ace_multiselect .ace_selection.ace_start {\ +box-shadow: 0 0 3px 0px #E8E9E8;\ +border-radius: 2px;\ +}\ +.ace-kuroir .ace_marker-layer .ace_step {\ +background: rgb(198, 219, 174);\ +}\ +.ace-kuroir .ace_marker-layer .ace_bracket {\ +margin: -1px 0 0 -1px;\ +border: 1px solid rgba(0, 0, 0, 0.29);\ +}\ +.ace-kuroir .ace_marker-layer .ace_active-line {\ +background: rgba(203, 220, 47, 0.22);\ +}\ +.ace-kuroir .ace_gutter-active-line {\ +background-color: rgba(203, 220, 47, 0.22);\ +}\ +.ace-kuroir .ace_marker-layer .ace_selected-word {\ +border: 1px solid rgba(245, 170, 0, 0.57);\ +}\ +.ace-kuroir .ace_fold {\ +border-color: #363636;\ +}\ +.ace-kuroir .ace_constant{color:#CD6839;}.ace-kuroir .ace_constant.ace_numeric{color:#9A5925;}.ace-kuroir .ace_support{color:#104E8B;}.ace-kuroir .ace_support.ace_function{color:#005273;}.ace-kuroir .ace_support.ace_constant{color:#CF6A4C;}.ace-kuroir .ace_storage{color:#A52A2A;}.ace-kuroir .ace_invalid.ace_illegal{color:#FD1224;\ +background-color:rgba(255, 6, 0, 0.15);}.ace-kuroir .ace_invalid.ace_deprecated{text-decoration:underline;\ +font-style:italic;\ +color:#FD1732;\ +background-color:#E8E9E8;}.ace-kuroir .ace_string{color:#639300;}.ace-kuroir .ace_string.ace_regexp{color:#417E00;\ +background-color:#C9D4BE;}.ace-kuroir .ace_comment{color:rgba(148, 148, 148, 0.91);\ +background-color:rgba(220, 220, 220, 0.56);}.ace-kuroir .ace_variable{color:#009ACD;}.ace-kuroir .ace_meta.ace_tag{color:#005273;}.ace-kuroir .ace_markup.ace_heading{color:#B8012D;\ +background-color:rgba(191, 97, 51, 0.051);}.ace-kuroir .ace_markup.ace_list{color:#8F5B26;}\ +"; + +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass); +}); diff --git a/lib/ace/src-noconflict/theme-merbivore.js b/lib/ace/src-noconflict/theme-merbivore.js new file mode 100644 index 00000000..faa43ea8 --- /dev/null +++ b/lib/ace/src-noconflict/theme-merbivore.js @@ -0,0 +1,96 @@ +ace.define("ace/theme/merbivore",["require","exports","module","ace/lib/dom"], function(require, exports, module) { + +exports.isDark = true; +exports.cssClass = "ace-merbivore"; +exports.cssText = ".ace-merbivore .ace_gutter {\ +background: #202020;\ +color: #E6E1DC\ +}\ +.ace-merbivore .ace_print-margin {\ +width: 1px;\ +background: #555651\ +}\ +.ace-merbivore {\ +background-color: #161616;\ +color: #E6E1DC\ +}\ +.ace-merbivore .ace_cursor {\ +color: #FFFFFF\ +}\ +.ace-merbivore .ace_marker-layer .ace_selection {\ +background: #454545\ +}\ +.ace-merbivore.ace_multiselect .ace_selection.ace_start {\ +box-shadow: 0 0 3px 0px #161616;\ +border-radius: 2px\ +}\ +.ace-merbivore .ace_marker-layer .ace_step {\ +background: rgb(102, 82, 0)\ +}\ +.ace-merbivore .ace_marker-layer .ace_bracket {\ +margin: -1px 0 0 -1px;\ +border: 1px solid #404040\ +}\ +.ace-merbivore .ace_marker-layer .ace_active-line {\ +background: #333435\ +}\ +.ace-merbivore .ace_gutter-active-line {\ +background-color: #333435\ +}\ +.ace-merbivore .ace_marker-layer .ace_selected-word {\ +border: 1px solid #454545\ +}\ +.ace-merbivore .ace_invisible {\ +color: #404040\ +}\ +.ace-merbivore .ace_entity.ace_name.ace_tag,\ +.ace-merbivore .ace_keyword,\ +.ace-merbivore .ace_meta,\ +.ace-merbivore .ace_meta.ace_tag,\ +.ace-merbivore .ace_storage,\ +.ace-merbivore .ace_support.ace_function {\ +color: #FC6F09\ +}\ +.ace-merbivore .ace_constant,\ +.ace-merbivore .ace_constant.ace_character,\ +.ace-merbivore .ace_constant.ace_character.ace_escape,\ +.ace-merbivore .ace_constant.ace_other,\ +.ace-merbivore .ace_support.ace_type {\ +color: #1EDAFB\ +}\ +.ace-merbivore .ace_constant.ace_character.ace_escape {\ +color: #519F50\ +}\ +.ace-merbivore .ace_constant.ace_language {\ +color: #FDC251\ +}\ +.ace-merbivore .ace_constant.ace_library,\ +.ace-merbivore .ace_string,\ +.ace-merbivore .ace_support.ace_constant {\ +color: #8DFF0A\ +}\ +.ace-merbivore .ace_constant.ace_numeric {\ +color: #58C554\ +}\ +.ace-merbivore .ace_invalid {\ +color: #FFFFFF;\ +background-color: #990000\ +}\ +.ace-merbivore .ace_fold {\ +background-color: #FC6F09;\ +border-color: #E6E1DC\ +}\ +.ace-merbivore .ace_comment {\ +font-style: italic;\ +color: #AD2EA4\ +}\ +.ace-merbivore .ace_entity.ace_other.ace_attribute-name {\ +color: #FFFF89\ +}\ +.ace-merbivore .ace_indent-guide {\ +background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQFxf3ZXB1df0PAAdsAmERTkEHAAAAAElFTkSuQmCC) right repeat-y\ +}"; + +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass); +}); diff --git a/lib/ace/src-noconflict/theme-merbivore_soft.js b/lib/ace/src-noconflict/theme-merbivore_soft.js new file mode 100644 index 00000000..2adf44a5 --- /dev/null +++ b/lib/ace/src-noconflict/theme-merbivore_soft.js @@ -0,0 +1,97 @@ +ace.define("ace/theme/merbivore_soft",["require","exports","module","ace/lib/dom"], function(require, exports, module) { + +exports.isDark = true; +exports.cssClass = "ace-merbivore-soft"; +exports.cssText = ".ace-merbivore-soft .ace_gutter {\ +background: #262424;\ +color: #E6E1DC\ +}\ +.ace-merbivore-soft .ace_print-margin {\ +width: 1px;\ +background: #262424\ +}\ +.ace-merbivore-soft {\ +background-color: #1C1C1C;\ +color: #E6E1DC\ +}\ +.ace-merbivore-soft .ace_cursor {\ +color: #FFFFFF\ +}\ +.ace-merbivore-soft .ace_marker-layer .ace_selection {\ +background: #494949\ +}\ +.ace-merbivore-soft.ace_multiselect .ace_selection.ace_start {\ +box-shadow: 0 0 3px 0px #1C1C1C;\ +border-radius: 2px\ +}\ +.ace-merbivore-soft .ace_marker-layer .ace_step {\ +background: rgb(102, 82, 0)\ +}\ +.ace-merbivore-soft .ace_marker-layer .ace_bracket {\ +margin: -1px 0 0 -1px;\ +border: 1px solid #404040\ +}\ +.ace-merbivore-soft .ace_marker-layer .ace_active-line {\ +background: #333435\ +}\ +.ace-merbivore-soft .ace_gutter-active-line {\ +background-color: #333435\ +}\ +.ace-merbivore-soft .ace_marker-layer .ace_selected-word {\ +border: 1px solid #494949\ +}\ +.ace-merbivore-soft .ace_invisible {\ +color: #404040\ +}\ +.ace-merbivore-soft .ace_entity.ace_name.ace_tag,\ +.ace-merbivore-soft .ace_keyword,\ +.ace-merbivore-soft .ace_meta,\ +.ace-merbivore-soft .ace_meta.ace_tag,\ +.ace-merbivore-soft .ace_storage {\ +color: #FC803A\ +}\ +.ace-merbivore-soft .ace_constant,\ +.ace-merbivore-soft .ace_constant.ace_character,\ +.ace-merbivore-soft .ace_constant.ace_character.ace_escape,\ +.ace-merbivore-soft .ace_constant.ace_other,\ +.ace-merbivore-soft .ace_support.ace_type {\ +color: #68C1D8\ +}\ +.ace-merbivore-soft .ace_constant.ace_character.ace_escape {\ +color: #B3E5B4\ +}\ +.ace-merbivore-soft .ace_constant.ace_language {\ +color: #E1C582\ +}\ +.ace-merbivore-soft .ace_constant.ace_library,\ +.ace-merbivore-soft .ace_string,\ +.ace-merbivore-soft .ace_support.ace_constant {\ +color: #8EC65F\ +}\ +.ace-merbivore-soft .ace_constant.ace_numeric {\ +color: #7FC578\ +}\ +.ace-merbivore-soft .ace_invalid,\ +.ace-merbivore-soft .ace_invalid.ace_deprecated {\ +color: #FFFFFF;\ +background-color: #FE3838\ +}\ +.ace-merbivore-soft .ace_fold {\ +background-color: #FC803A;\ +border-color: #E6E1DC\ +}\ +.ace-merbivore-soft .ace_comment,\ +.ace-merbivore-soft .ace_meta {\ +font-style: italic;\ +color: #AC4BB8\ +}\ +.ace-merbivore-soft .ace_entity.ace_other.ace_attribute-name {\ +color: #EAF1A3\ +}\ +.ace-merbivore-soft .ace_indent-guide {\ +background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWOQkpLyZfD09PwPAAfYAnaStpHRAAAAAElFTkSuQmCC) right repeat-y\ +}"; + +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass); +}); diff --git a/lib/ace/src-noconflict/theme-mono_industrial.js b/lib/ace/src-noconflict/theme-mono_industrial.js new file mode 100644 index 00000000..277963b0 --- /dev/null +++ b/lib/ace/src-noconflict/theme-mono_industrial.js @@ -0,0 +1,108 @@ +ace.define("ace/theme/mono_industrial",["require","exports","module","ace/lib/dom"], function(require, exports, module) { + +exports.isDark = true; +exports.cssClass = "ace-mono-industrial"; +exports.cssText = ".ace-mono-industrial .ace_gutter {\ +background: #1d2521;\ +color: #C5C9C9\ +}\ +.ace-mono-industrial .ace_print-margin {\ +width: 1px;\ +background: #555651\ +}\ +.ace-mono-industrial {\ +background-color: #222C28;\ +color: #FFFFFF\ +}\ +.ace-mono-industrial .ace_cursor {\ +color: #FFFFFF\ +}\ +.ace-mono-industrial .ace_marker-layer .ace_selection {\ +background: rgba(145, 153, 148, 0.40)\ +}\ +.ace-mono-industrial.ace_multiselect .ace_selection.ace_start {\ +box-shadow: 0 0 3px 0px #222C28;\ +border-radius: 2px\ +}\ +.ace-mono-industrial .ace_marker-layer .ace_step {\ +background: rgb(102, 82, 0)\ +}\ +.ace-mono-industrial .ace_marker-layer .ace_bracket {\ +margin: -1px 0 0 -1px;\ +border: 1px solid rgba(102, 108, 104, 0.50)\ +}\ +.ace-mono-industrial .ace_marker-layer .ace_active-line {\ +background: rgba(12, 13, 12, 0.25)\ +}\ +.ace-mono-industrial .ace_gutter-active-line {\ +background-color: rgba(12, 13, 12, 0.25)\ +}\ +.ace-mono-industrial .ace_marker-layer .ace_selected-word {\ +border: 1px solid rgba(145, 153, 148, 0.40)\ +}\ +.ace-mono-industrial .ace_invisible {\ +color: rgba(102, 108, 104, 0.50)\ +}\ +.ace-mono-industrial .ace_string {\ +background-color: #151C19;\ +color: #FFFFFF\ +}\ +.ace-mono-industrial .ace_keyword,\ +.ace-mono-industrial .ace_meta {\ +color: #A39E64\ +}\ +.ace-mono-industrial .ace_constant,\ +.ace-mono-industrial .ace_constant.ace_character,\ +.ace-mono-industrial .ace_constant.ace_character.ace_escape,\ +.ace-mono-industrial .ace_constant.ace_numeric,\ +.ace-mono-industrial .ace_constant.ace_other {\ +color: #E98800\ +}\ +.ace-mono-industrial .ace_entity.ace_name.ace_function,\ +.ace-mono-industrial .ace_keyword.ace_operator,\ +.ace-mono-industrial .ace_variable {\ +color: #A8B3AB\ +}\ +.ace-mono-industrial .ace_invalid {\ +color: #FFFFFF;\ +background-color: rgba(153, 0, 0, 0.68)\ +}\ +.ace-mono-industrial .ace_support.ace_constant {\ +color: #C87500\ +}\ +.ace-mono-industrial .ace_fold {\ +background-color: #A8B3AB;\ +border-color: #FFFFFF\ +}\ +.ace-mono-industrial .ace_support.ace_function {\ +color: #588E60\ +}\ +.ace-mono-industrial .ace_entity.ace_name,\ +.ace-mono-industrial .ace_support.ace_class,\ +.ace-mono-industrial .ace_support.ace_type {\ +color: #5778B6\ +}\ +.ace-mono-industrial .ace_storage {\ +color: #C23B00\ +}\ +.ace-mono-industrial .ace_variable.ace_language,\ +.ace-mono-industrial .ace_variable.ace_parameter {\ +color: #648BD2\ +}\ +.ace-mono-industrial .ace_comment {\ +color: #666C68;\ +background-color: #151C19\ +}\ +.ace-mono-industrial .ace_entity.ace_other.ace_attribute-name {\ +color: #909993\ +}\ +.ace-mono-industrial .ace_entity.ace_name.ace_tag {\ +color: #A65EFF\ +}\ +.ace-mono-industrial .ace_indent-guide {\ +background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNQ1NbwZfALD/4PAAlTArlEC4r/AAAAAElFTkSuQmCC) right repeat-y\ +}"; + +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass); +}); diff --git a/lib/ace/src-noconflict/theme-monokai.js b/lib/ace/src-noconflict/theme-monokai.js new file mode 100644 index 00000000..13f328d2 --- /dev/null +++ b/lib/ace/src-noconflict/theme-monokai.js @@ -0,0 +1,106 @@ +ace.define("ace/theme/monokai",["require","exports","module","ace/lib/dom"], function(require, exports, module) { + +exports.isDark = true; +exports.cssClass = "ace-monokai"; +exports.cssText = ".ace-monokai .ace_gutter {\ +background: #2F3129;\ +color: #8F908A\ +}\ +.ace-monokai .ace_print-margin {\ +width: 1px;\ +background: #555651\ +}\ +.ace-monokai {\ +background-color: #272822;\ +color: #F8F8F2\ +}\ +.ace-monokai .ace_cursor {\ +color: #F8F8F0\ +}\ +.ace-monokai .ace_marker-layer .ace_selection {\ +background: #49483E\ +}\ +.ace-monokai.ace_multiselect .ace_selection.ace_start {\ +box-shadow: 0 0 3px 0px #272822;\ +border-radius: 2px\ +}\ +.ace-monokai .ace_marker-layer .ace_step {\ +background: rgb(102, 82, 0)\ +}\ +.ace-monokai .ace_marker-layer .ace_bracket {\ +margin: -1px 0 0 -1px;\ +border: 1px solid #49483E\ +}\ +.ace-monokai .ace_marker-layer .ace_active-line {\ +background: #202020\ +}\ +.ace-monokai .ace_gutter-active-line {\ +background-color: #272727\ +}\ +.ace-monokai .ace_marker-layer .ace_selected-word {\ +border: 1px solid #49483E\ +}\ +.ace-monokai .ace_invisible {\ +color: #52524d\ +}\ +.ace-monokai .ace_entity.ace_name.ace_tag,\ +.ace-monokai .ace_keyword,\ +.ace-monokai .ace_meta.ace_tag,\ +.ace-monokai .ace_storage {\ +color: #F92672\ +}\ +.ace-monokai .ace_punctuation,\ +.ace-monokai .ace_punctuation.ace_tag {\ +color: #fff\ +}\ +.ace-monokai .ace_constant.ace_character,\ +.ace-monokai .ace_constant.ace_language,\ +.ace-monokai .ace_constant.ace_numeric,\ +.ace-monokai .ace_constant.ace_other {\ +color: #AE81FF\ +}\ +.ace-monokai .ace_invalid {\ +color: #F8F8F0;\ +background-color: #F92672\ +}\ +.ace-monokai .ace_invalid.ace_deprecated {\ +color: #F8F8F0;\ +background-color: #AE81FF\ +}\ +.ace-monokai .ace_support.ace_constant,\ +.ace-monokai .ace_support.ace_function {\ +color: #66D9EF\ +}\ +.ace-monokai .ace_fold {\ +background-color: #A6E22E;\ +border-color: #F8F8F2\ +}\ +.ace-monokai .ace_storage.ace_type,\ +.ace-monokai .ace_support.ace_class,\ +.ace-monokai .ace_support.ace_type {\ +font-style: italic;\ +color: #66D9EF\ +}\ +.ace-monokai .ace_entity.ace_name.ace_function,\ +.ace-monokai .ace_entity.ace_other,\ +.ace-monokai .ace_entity.ace_other.ace_attribute-name,\ +.ace-monokai .ace_variable {\ +color: #A6E22E\ +}\ +.ace-monokai .ace_variable.ace_parameter {\ +font-style: italic;\ +color: #FD971F\ +}\ +.ace-monokai .ace_string {\ +color: #E6DB74\ +}\ +.ace-monokai .ace_comment {\ +color: #75715E\ +}\ +.ace-monokai .ace_indent-guide {\ +background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWPQ0FD0ZXBzd/wPAAjVAoxeSgNeAAAAAElFTkSuQmCC) right repeat-y\ +}"; + +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass); +}); diff --git a/lib/ace/src-noconflict/theme-pastel_on_dark.js b/lib/ace/src-noconflict/theme-pastel_on_dark.js new file mode 100644 index 00000000..f49e3aff --- /dev/null +++ b/lib/ace/src-noconflict/theme-pastel_on_dark.js @@ -0,0 +1,109 @@ +ace.define("ace/theme/pastel_on_dark",["require","exports","module","ace/lib/dom"], function(require, exports, module) { + +exports.isDark = true; +exports.cssClass = "ace-pastel-on-dark"; +exports.cssText = ".ace-pastel-on-dark .ace_gutter {\ +background: #353030;\ +color: #8F938F\ +}\ +.ace-pastel-on-dark .ace_print-margin {\ +width: 1px;\ +background: #353030\ +}\ +.ace-pastel-on-dark {\ +background-color: #2C2828;\ +color: #8F938F\ +}\ +.ace-pastel-on-dark .ace_cursor {\ +color: #A7A7A7\ +}\ +.ace-pastel-on-dark .ace_marker-layer .ace_selection {\ +background: rgba(221, 240, 255, 0.20)\ +}\ +.ace-pastel-on-dark.ace_multiselect .ace_selection.ace_start {\ +box-shadow: 0 0 3px 0px #2C2828;\ +border-radius: 2px\ +}\ +.ace-pastel-on-dark .ace_marker-layer .ace_step {\ +background: rgb(102, 82, 0)\ +}\ +.ace-pastel-on-dark .ace_marker-layer .ace_bracket {\ +margin: -1px 0 0 -1px;\ +border: 1px solid rgba(255, 255, 255, 0.25)\ +}\ +.ace-pastel-on-dark .ace_marker-layer .ace_active-line {\ +background: rgba(255, 255, 255, 0.031)\ +}\ +.ace-pastel-on-dark .ace_gutter-active-line {\ +background-color: rgba(255, 255, 255, 0.031)\ +}\ +.ace-pastel-on-dark .ace_marker-layer .ace_selected-word {\ +border: 1px solid rgba(221, 240, 255, 0.20)\ +}\ +.ace-pastel-on-dark .ace_invisible {\ +color: rgba(255, 255, 255, 0.25)\ +}\ +.ace-pastel-on-dark .ace_keyword,\ +.ace-pastel-on-dark .ace_meta {\ +color: #757aD8\ +}\ +.ace-pastel-on-dark .ace_constant,\ +.ace-pastel-on-dark .ace_constant.ace_character,\ +.ace-pastel-on-dark .ace_constant.ace_character.ace_escape,\ +.ace-pastel-on-dark .ace_constant.ace_other {\ +color: #4FB7C5\ +}\ +.ace-pastel-on-dark .ace_keyword.ace_operator {\ +color: #797878\ +}\ +.ace-pastel-on-dark .ace_constant.ace_character {\ +color: #AFA472\ +}\ +.ace-pastel-on-dark .ace_constant.ace_language {\ +color: #DE8E30\ +}\ +.ace-pastel-on-dark .ace_constant.ace_numeric {\ +color: #CCCCCC\ +}\ +.ace-pastel-on-dark .ace_invalid,\ +.ace-pastel-on-dark .ace_invalid.ace_illegal {\ +color: #F8F8F8;\ +background-color: rgba(86, 45, 86, 0.75)\ +}\ +.ace-pastel-on-dark .ace_invalid.ace_deprecated {\ +text-decoration: underline;\ +font-style: italic;\ +color: #D2A8A1\ +}\ +.ace-pastel-on-dark .ace_fold {\ +background-color: #757aD8;\ +border-color: #8F938F\ +}\ +.ace-pastel-on-dark .ace_support.ace_function {\ +color: #AEB2F8\ +}\ +.ace-pastel-on-dark .ace_string {\ +color: #66A968\ +}\ +.ace-pastel-on-dark .ace_string.ace_regexp {\ +color: #E9C062\ +}\ +.ace-pastel-on-dark .ace_comment {\ +color: #A6C6FF\ +}\ +.ace-pastel-on-dark .ace_variable {\ +color: #BEBF55\ +}\ +.ace-pastel-on-dark .ace_variable.ace_language {\ +color: #C1C144\ +}\ +.ace-pastel-on-dark .ace_xml-pe {\ +color: #494949\ +}\ +.ace-pastel-on-dark .ace_indent-guide {\ +background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYIiPj/8PAARgAh2NTMh8AAAAAElFTkSuQmCC) right repeat-y\ +}"; + +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass); +}); diff --git a/lib/ace/src-noconflict/theme-solarized_dark.js b/lib/ace/src-noconflict/theme-solarized_dark.js new file mode 100644 index 00000000..a8873069 --- /dev/null +++ b/lib/ace/src-noconflict/theme-solarized_dark.js @@ -0,0 +1,89 @@ +ace.define("ace/theme/solarized_dark",["require","exports","module","ace/lib/dom"], function(require, exports, module) { + +exports.isDark = true; +exports.cssClass = "ace-solarized-dark"; +exports.cssText = ".ace-solarized-dark .ace_gutter {\ +background: #01313f;\ +color: #d0edf7\ +}\ +.ace-solarized-dark .ace_print-margin {\ +width: 1px;\ +background: #33555E\ +}\ +.ace-solarized-dark {\ +background-color: #002B36;\ +color: #93A1A1\ +}\ +.ace-solarized-dark .ace_entity.ace_other.ace_attribute-name,\ +.ace-solarized-dark .ace_storage {\ +color: #93A1A1\ +}\ +.ace-solarized-dark .ace_cursor,\ +.ace-solarized-dark .ace_string.ace_regexp {\ +color: #D30102\ +}\ +.ace-solarized-dark .ace_marker-layer .ace_active-line,\ +.ace-solarized-dark .ace_marker-layer .ace_selection {\ +background: rgba(255, 255, 255, 0.1)\ +}\ +.ace-solarized-dark.ace_multiselect .ace_selection.ace_start {\ +box-shadow: 0 0 3px 0px #002B36;\ +border-radius: 2px\ +}\ +.ace-solarized-dark .ace_marker-layer .ace_step {\ +background: rgb(102, 82, 0)\ +}\ +.ace-solarized-dark .ace_marker-layer .ace_bracket {\ +margin: -1px 0 0 -1px;\ +border: 1px solid rgba(147, 161, 161, 0.50)\ +}\ +.ace-solarized-dark .ace_gutter-active-line {\ +background-color: #0d3440\ +}\ +.ace-solarized-dark .ace_marker-layer .ace_selected-word {\ +border: 1px solid #073642\ +}\ +.ace-solarized-dark .ace_invisible {\ +color: rgba(147, 161, 161, 0.50)\ +}\ +.ace-solarized-dark .ace_keyword,\ +.ace-solarized-dark .ace_meta,\ +.ace-solarized-dark .ace_support.ace_class,\ +.ace-solarized-dark .ace_support.ace_type {\ +color: #859900\ +}\ +.ace-solarized-dark .ace_constant.ace_character,\ +.ace-solarized-dark .ace_constant.ace_other {\ +color: #CB4B16\ +}\ +.ace-solarized-dark .ace_constant.ace_language {\ +color: #B58900\ +}\ +.ace-solarized-dark .ace_constant.ace_numeric {\ +color: #D33682\ +}\ +.ace-solarized-dark .ace_fold {\ +background-color: #268BD2;\ +border-color: #93A1A1\ +}\ +.ace-solarized-dark .ace_entity.ace_name.ace_function,\ +.ace-solarized-dark .ace_entity.ace_name.ace_tag,\ +.ace-solarized-dark .ace_support.ace_function,\ +.ace-solarized-dark .ace_variable,\ +.ace-solarized-dark .ace_variable.ace_language {\ +color: #268BD2\ +}\ +.ace-solarized-dark .ace_string {\ +color: #2AA198\ +}\ +.ace-solarized-dark .ace_comment {\ +font-style: italic;\ +color: #657B83\ +}\ +.ace-solarized-dark .ace_indent-guide {\ +background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNg0Db1ZVCxc/sPAAd4AlUHlLenAAAAAElFTkSuQmCC) right repeat-y\ +}"; + +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass); +}); diff --git a/lib/ace/src-noconflict/theme-solarized_light.js b/lib/ace/src-noconflict/theme-solarized_light.js new file mode 100644 index 00000000..73d89961 --- /dev/null +++ b/lib/ace/src-noconflict/theme-solarized_light.js @@ -0,0 +1,92 @@ +ace.define("ace/theme/solarized_light",["require","exports","module","ace/lib/dom"], function(require, exports, module) { + +exports.isDark = false; +exports.cssClass = "ace-solarized-light"; +exports.cssText = ".ace-solarized-light .ace_gutter {\ +background: #fbf1d3;\ +color: #333\ +}\ +.ace-solarized-light .ace_print-margin {\ +width: 1px;\ +background: #e8e8e8\ +}\ +.ace-solarized-light {\ +background-color: #FDF6E3;\ +color: #586E75\ +}\ +.ace-solarized-light .ace_cursor {\ +color: #000000\ +}\ +.ace-solarized-light .ace_marker-layer .ace_selection {\ +background: rgba(7, 54, 67, 0.09)\ +}\ +.ace-solarized-light.ace_multiselect .ace_selection.ace_start {\ +box-shadow: 0 0 3px 0px #FDF6E3;\ +border-radius: 2px\ +}\ +.ace-solarized-light .ace_marker-layer .ace_step {\ +background: rgb(255, 255, 0)\ +}\ +.ace-solarized-light .ace_marker-layer .ace_bracket {\ +margin: -1px 0 0 -1px;\ +border: 1px solid rgba(147, 161, 161, 0.50)\ +}\ +.ace-solarized-light .ace_marker-layer .ace_active-line {\ +background: #EEE8D5\ +}\ +.ace-solarized-light .ace_gutter-active-line {\ +background-color : #EDE5C1\ +}\ +.ace-solarized-light .ace_marker-layer .ace_selected-word {\ +border: 1px solid #073642\ +}\ +.ace-solarized-light .ace_invisible {\ +color: rgba(147, 161, 161, 0.50)\ +}\ +.ace-solarized-light .ace_keyword,\ +.ace-solarized-light .ace_meta,\ +.ace-solarized-light .ace_support.ace_class,\ +.ace-solarized-light .ace_support.ace_type {\ +color: #859900\ +}\ +.ace-solarized-light .ace_constant.ace_character,\ +.ace-solarized-light .ace_constant.ace_other {\ +color: #CB4B16\ +}\ +.ace-solarized-light .ace_constant.ace_language {\ +color: #B58900\ +}\ +.ace-solarized-light .ace_constant.ace_numeric {\ +color: #D33682\ +}\ +.ace-solarized-light .ace_fold {\ +background-color: #268BD2;\ +border-color: #586E75\ +}\ +.ace-solarized-light .ace_entity.ace_name.ace_function,\ +.ace-solarized-light .ace_entity.ace_name.ace_tag,\ +.ace-solarized-light .ace_support.ace_function,\ +.ace-solarized-light .ace_variable,\ +.ace-solarized-light .ace_variable.ace_language {\ +color: #268BD2\ +}\ +.ace-solarized-light .ace_storage {\ +color: #073642\ +}\ +.ace-solarized-light .ace_string {\ +color: #2AA198\ +}\ +.ace-solarized-light .ace_string.ace_regexp {\ +color: #D30102\ +}\ +.ace-solarized-light .ace_comment,\ +.ace-solarized-light .ace_entity.ace_other.ace_attribute-name {\ +color: #93A1A1\ +}\ +.ace-solarized-light .ace_indent-guide {\ +background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHjy8NJ/AAjgA5fzQUmBAAAAAElFTkSuQmCC) right repeat-y\ +}"; + +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass); +}); diff --git a/lib/ace/src-noconflict/theme-terminal.js b/lib/ace/src-noconflict/theme-terminal.js new file mode 100644 index 00000000..577ec496 --- /dev/null +++ b/lib/ace/src-noconflict/theme-terminal.js @@ -0,0 +1,115 @@ +ace.define("ace/theme/terminal",["require","exports","module","ace/lib/dom"], function(require, exports, module) { + +exports.isDark = true; +exports.cssClass = "ace-terminal-theme"; +exports.cssText = ".ace-terminal-theme .ace_gutter {\ +background: #1a0005;\ +color: steelblue\ +}\ +.ace-terminal-theme .ace_print-margin {\ +width: 1px;\ +background: #1a1a1a\ +}\ +.ace-terminal-theme {\ +background-color: black;\ +color: #DEDEDE\ +}\ +.ace-terminal-theme .ace_cursor {\ +color: #9F9F9F\ +}\ +.ace-terminal-theme .ace_marker-layer .ace_selection {\ +background: #424242\ +}\ +.ace-terminal-theme.ace_multiselect .ace_selection.ace_start {\ +box-shadow: 0 0 3px 0px black;\ +border-radius: 2px\ +}\ +.ace-terminal-theme .ace_marker-layer .ace_step {\ +background: rgb(0, 0, 0)\ +}\ +.ace-terminal-theme .ace_marker-layer .ace_bracket {\ +background: #090;\ +}\ +.ace-terminal-theme .ace_marker-layer .ace_bracket-start {\ +background: #090;\ +}\ +.ace-terminal-theme .ace_marker-layer .ace_bracket-unmatched {\ +margin: -1px 0 0 -1px;\ +border: 1px solid #900\ +}\ +.ace-terminal-theme .ace_marker-layer .ace_active-line {\ +background: #2A2A2A\ +}\ +.ace-terminal-theme .ace_gutter-active-line {\ +background-color: #2A112A\ +}\ +.ace-terminal-theme .ace_marker-layer .ace_selected-word {\ +border: 1px solid #424242\ +}\ +.ace-terminal-theme .ace_invisible {\ +color: #343434\ +}\ +.ace-terminal-theme .ace_keyword,\ +.ace-terminal-theme .ace_meta,\ +.ace-terminal-theme .ace_storage,\ +.ace-terminal-theme .ace_storage.ace_type,\ +.ace-terminal-theme .ace_support.ace_type {\ +color: tomato\ +}\ +.ace-terminal-theme .ace_keyword.ace_operator {\ +color: deeppink\ +}\ +.ace-terminal-theme .ace_constant.ace_character,\ +.ace-terminal-theme .ace_constant.ace_language,\ +.ace-terminal-theme .ace_constant.ace_numeric,\ +.ace-terminal-theme .ace_keyword.ace_other.ace_unit,\ +.ace-terminal-theme .ace_support.ace_constant,\ +.ace-terminal-theme .ace_variable.ace_parameter {\ +color: #E78C45\ +}\ +.ace-terminal-theme .ace_constant.ace_other {\ +color: gold\ +}\ +.ace-terminal-theme .ace_invalid {\ +color: yellow;\ +background-color: red\ +}\ +.ace-terminal-theme .ace_invalid.ace_deprecated {\ +color: #CED2CF;\ +background-color: #B798BF\ +}\ +.ace-terminal-theme .ace_fold {\ +background-color: #7AA6DA;\ +border-color: #DEDEDE\ +}\ +.ace-terminal-theme .ace_entity.ace_name.ace_function,\ +.ace-terminal-theme .ace_support.ace_function,\ +.ace-terminal-theme .ace_variable {\ +color: #7AA6DA\ +}\ +.ace-terminal-theme .ace_support.ace_class,\ +.ace-terminal-theme .ace_support.ace_type {\ +color: #E7C547\ +}\ +.ace-terminal-theme .ace_heading,\ +.ace-terminal-theme .ace_string {\ +color: #B9CA4A\ +}\ +.ace-terminal-theme .ace_entity.ace_name.ace_tag,\ +.ace-terminal-theme .ace_entity.ace_other.ace_attribute-name,\ +.ace-terminal-theme .ace_meta.ace_tag,\ +.ace-terminal-theme .ace_string.ace_regexp,\ +.ace-terminal-theme .ace_variable {\ +color: #D54E53\ +}\ +.ace-terminal-theme .ace_comment {\ +color: orangered\ +}\ +.ace-terminal-theme .ace_indent-guide {\ +background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYLBWV/8PAAK4AYnhiq+xAAAAAElFTkSuQmCC) right repeat-y;\ +}\ +"; + +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass); +}); diff --git a/lib/ace/src-noconflict/theme-textmate.js b/lib/ace/src-noconflict/theme-textmate.js new file mode 100644 index 00000000..7deba509 --- /dev/null +++ b/lib/ace/src-noconflict/theme-textmate.js @@ -0,0 +1,130 @@ +ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"], function(require, exports, module) { +"use strict"; + +exports.isDark = false; +exports.cssClass = "ace-tm"; +exports.cssText = ".ace-tm .ace_gutter {\ +background: #f0f0f0;\ +color: #333;\ +}\ +.ace-tm .ace_print-margin {\ +width: 1px;\ +background: #e8e8e8;\ +}\ +.ace-tm .ace_fold {\ +background-color: #6B72E6;\ +}\ +.ace-tm {\ +background-color: #FFFFFF;\ +color: black;\ +}\ +.ace-tm .ace_cursor {\ +color: black;\ +}\ +.ace-tm .ace_invisible {\ +color: rgb(191, 191, 191);\ +}\ +.ace-tm .ace_storage,\ +.ace-tm .ace_keyword {\ +color: blue;\ +}\ +.ace-tm .ace_constant {\ +color: rgb(197, 6, 11);\ +}\ +.ace-tm .ace_constant.ace_buildin {\ +color: rgb(88, 72, 246);\ +}\ +.ace-tm .ace_constant.ace_language {\ +color: rgb(88, 92, 246);\ +}\ +.ace-tm .ace_constant.ace_library {\ +color: rgb(6, 150, 14);\ +}\ +.ace-tm .ace_invalid {\ +background-color: rgba(255, 0, 0, 0.1);\ +color: red;\ +}\ +.ace-tm .ace_support.ace_function {\ +color: rgb(60, 76, 114);\ +}\ +.ace-tm .ace_support.ace_constant {\ +color: rgb(6, 150, 14);\ +}\ +.ace-tm .ace_support.ace_type,\ +.ace-tm .ace_support.ace_class {\ +color: rgb(109, 121, 222);\ +}\ +.ace-tm .ace_keyword.ace_operator {\ +color: rgb(104, 118, 135);\ +}\ +.ace-tm .ace_string {\ +color: rgb(3, 106, 7);\ +}\ +.ace-tm .ace_comment {\ +color: rgb(76, 136, 107);\ +}\ +.ace-tm .ace_comment.ace_doc {\ +color: rgb(0, 102, 255);\ +}\ +.ace-tm .ace_comment.ace_doc.ace_tag {\ +color: rgb(128, 159, 191);\ +}\ +.ace-tm .ace_constant.ace_numeric {\ +color: rgb(0, 0, 205);\ +}\ +.ace-tm .ace_variable {\ +color: rgb(49, 132, 149);\ +}\ +.ace-tm .ace_xml-pe {\ +color: rgb(104, 104, 91);\ +}\ +.ace-tm .ace_entity.ace_name.ace_function {\ +color: #0000A2;\ +}\ +.ace-tm .ace_heading {\ +color: rgb(12, 7, 255);\ +}\ +.ace-tm .ace_list {\ +color:rgb(185, 6, 144);\ +}\ +.ace-tm .ace_meta.ace_tag {\ +color:rgb(0, 22, 142);\ +}\ +.ace-tm .ace_string.ace_regex {\ +color: rgb(255, 0, 0)\ +}\ +.ace-tm .ace_marker-layer .ace_selection {\ +background: rgb(181, 213, 255);\ +}\ +.ace-tm.ace_multiselect .ace_selection.ace_start {\ +box-shadow: 0 0 3px 0px white;\ +border-radius: 2px;\ +}\ +.ace-tm .ace_marker-layer .ace_step {\ +background: rgb(252, 255, 0);\ +}\ +.ace-tm .ace_marker-layer .ace_stack {\ +background: rgb(164, 229, 101);\ +}\ +.ace-tm .ace_marker-layer .ace_bracket {\ +margin: -1px 0 0 -1px;\ +border: 1px solid rgb(192, 192, 192);\ +}\ +.ace-tm .ace_marker-layer .ace_active-line {\ +background: rgba(0, 0, 0, 0.07);\ +}\ +.ace-tm .ace_gutter-active-line {\ +background-color : #dcdcdc;\ +}\ +.ace-tm .ace_marker-layer .ace_selected-word {\ +background: rgb(250, 250, 255);\ +border: 1px solid rgb(200, 200, 250);\ +}\ +.ace-tm .ace_indent-guide {\ +background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\ +}\ +"; + +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass); +}); diff --git a/lib/ace/src-noconflict/theme-tomorrow.js b/lib/ace/src-noconflict/theme-tomorrow.js new file mode 100644 index 00000000..e44142b8 --- /dev/null +++ b/lib/ace/src-noconflict/theme-tomorrow.js @@ -0,0 +1,109 @@ +ace.define("ace/theme/tomorrow",["require","exports","module","ace/lib/dom"], function(require, exports, module) { + +exports.isDark = false; +exports.cssClass = "ace-tomorrow"; +exports.cssText = ".ace-tomorrow .ace_gutter {\ +background: #f6f6f6;\ +color: #4D4D4C\ +}\ +.ace-tomorrow .ace_print-margin {\ +width: 1px;\ +background: #f6f6f6\ +}\ +.ace-tomorrow {\ +background-color: #FFFFFF;\ +color: #4D4D4C\ +}\ +.ace-tomorrow .ace_cursor {\ +color: #AEAFAD\ +}\ +.ace-tomorrow .ace_marker-layer .ace_selection {\ +background: #D6D6D6\ +}\ +.ace-tomorrow.ace_multiselect .ace_selection.ace_start {\ +box-shadow: 0 0 3px 0px #FFFFFF;\ +border-radius: 2px\ +}\ +.ace-tomorrow .ace_marker-layer .ace_step {\ +background: rgb(255, 255, 0)\ +}\ +.ace-tomorrow .ace_marker-layer .ace_bracket {\ +margin: -1px 0 0 -1px;\ +border: 1px solid #D1D1D1\ +}\ +.ace-tomorrow .ace_marker-layer .ace_active-line {\ +background: #EFEFEF\ +}\ +.ace-tomorrow .ace_gutter-active-line {\ +background-color : #dcdcdc\ +}\ +.ace-tomorrow .ace_marker-layer .ace_selected-word {\ +border: 1px solid #D6D6D6\ +}\ +.ace-tomorrow .ace_invisible {\ +color: #D1D1D1\ +}\ +.ace-tomorrow .ace_keyword,\ +.ace-tomorrow .ace_meta,\ +.ace-tomorrow .ace_storage,\ +.ace-tomorrow .ace_storage.ace_type,\ +.ace-tomorrow .ace_support.ace_type {\ +color: #8959A8\ +}\ +.ace-tomorrow .ace_keyword.ace_operator {\ +color: #3E999F\ +}\ +.ace-tomorrow .ace_constant.ace_character,\ +.ace-tomorrow .ace_constant.ace_language,\ +.ace-tomorrow .ace_constant.ace_numeric,\ +.ace-tomorrow .ace_keyword.ace_other.ace_unit,\ +.ace-tomorrow .ace_support.ace_constant,\ +.ace-tomorrow .ace_variable.ace_parameter {\ +color: #F5871F\ +}\ +.ace-tomorrow .ace_constant.ace_other {\ +color: #666969\ +}\ +.ace-tomorrow .ace_invalid {\ +color: #FFFFFF;\ +background-color: #C82829\ +}\ +.ace-tomorrow .ace_invalid.ace_deprecated {\ +color: #FFFFFF;\ +background-color: #8959A8\ +}\ +.ace-tomorrow .ace_fold {\ +background-color: #4271AE;\ +border-color: #4D4D4C\ +}\ +.ace-tomorrow .ace_entity.ace_name.ace_function,\ +.ace-tomorrow .ace_support.ace_function,\ +.ace-tomorrow .ace_variable {\ +color: #4271AE\ +}\ +.ace-tomorrow .ace_support.ace_class,\ +.ace-tomorrow .ace_support.ace_type {\ +color: #C99E00\ +}\ +.ace-tomorrow .ace_heading,\ +.ace-tomorrow .ace_markup.ace_heading,\ +.ace-tomorrow .ace_string {\ +color: #718C00\ +}\ +.ace-tomorrow .ace_entity.ace_name.ace_tag,\ +.ace-tomorrow .ace_entity.ace_other.ace_attribute-name,\ +.ace-tomorrow .ace_meta.ace_tag,\ +.ace-tomorrow .ace_string.ace_regexp,\ +.ace-tomorrow .ace_variable {\ +color: #C82829\ +}\ +.ace-tomorrow .ace_comment {\ +color: #8E908C\ +}\ +.ace-tomorrow .ace_indent-guide {\ +background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bdu3f/BwAlfgctduB85QAAAABJRU5ErkJggg==) right repeat-y\ +}"; + +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass); +}); diff --git a/lib/ace/src-noconflict/theme-tomorrow_night.js b/lib/ace/src-noconflict/theme-tomorrow_night.js new file mode 100644 index 00000000..dacc007b --- /dev/null +++ b/lib/ace/src-noconflict/theme-tomorrow_night.js @@ -0,0 +1,109 @@ +ace.define("ace/theme/tomorrow_night",["require","exports","module","ace/lib/dom"], function(require, exports, module) { + +exports.isDark = true; +exports.cssClass = "ace-tomorrow-night"; +exports.cssText = ".ace-tomorrow-night .ace_gutter {\ +background: #25282c;\ +color: #C5C8C6\ +}\ +.ace-tomorrow-night .ace_print-margin {\ +width: 1px;\ +background: #25282c\ +}\ +.ace-tomorrow-night {\ +background-color: #1D1F21;\ +color: #C5C8C6\ +}\ +.ace-tomorrow-night .ace_cursor {\ +color: #AEAFAD\ +}\ +.ace-tomorrow-night .ace_marker-layer .ace_selection {\ +background: #373B41\ +}\ +.ace-tomorrow-night.ace_multiselect .ace_selection.ace_start {\ +box-shadow: 0 0 3px 0px #1D1F21;\ +border-radius: 2px\ +}\ +.ace-tomorrow-night .ace_marker-layer .ace_step {\ +background: rgb(102, 82, 0)\ +}\ +.ace-tomorrow-night .ace_marker-layer .ace_bracket {\ +margin: -1px 0 0 -1px;\ +border: 1px solid #4B4E55\ +}\ +.ace-tomorrow-night .ace_marker-layer .ace_active-line {\ +background: #282A2E\ +}\ +.ace-tomorrow-night .ace_gutter-active-line {\ +background-color: #282A2E\ +}\ +.ace-tomorrow-night .ace_marker-layer .ace_selected-word {\ +border: 1px solid #373B41\ +}\ +.ace-tomorrow-night .ace_invisible {\ +color: #4B4E55\ +}\ +.ace-tomorrow-night .ace_keyword,\ +.ace-tomorrow-night .ace_meta,\ +.ace-tomorrow-night .ace_storage,\ +.ace-tomorrow-night .ace_storage.ace_type,\ +.ace-tomorrow-night .ace_support.ace_type {\ +color: #B294BB\ +}\ +.ace-tomorrow-night .ace_keyword.ace_operator {\ +color: #8ABEB7\ +}\ +.ace-tomorrow-night .ace_constant.ace_character,\ +.ace-tomorrow-night .ace_constant.ace_language,\ +.ace-tomorrow-night .ace_constant.ace_numeric,\ +.ace-tomorrow-night .ace_keyword.ace_other.ace_unit,\ +.ace-tomorrow-night .ace_support.ace_constant,\ +.ace-tomorrow-night .ace_variable.ace_parameter {\ +color: #DE935F\ +}\ +.ace-tomorrow-night .ace_constant.ace_other {\ +color: #CED1CF\ +}\ +.ace-tomorrow-night .ace_invalid {\ +color: #CED2CF;\ +background-color: #DF5F5F\ +}\ +.ace-tomorrow-night .ace_invalid.ace_deprecated {\ +color: #CED2CF;\ +background-color: #B798BF\ +}\ +.ace-tomorrow-night .ace_fold {\ +background-color: #81A2BE;\ +border-color: #C5C8C6\ +}\ +.ace-tomorrow-night .ace_entity.ace_name.ace_function,\ +.ace-tomorrow-night .ace_support.ace_function,\ +.ace-tomorrow-night .ace_variable {\ +color: #81A2BE\ +}\ +.ace-tomorrow-night .ace_support.ace_class,\ +.ace-tomorrow-night .ace_support.ace_type {\ +color: #F0C674\ +}\ +.ace-tomorrow-night .ace_heading,\ +.ace-tomorrow-night .ace_markup.ace_heading,\ +.ace-tomorrow-night .ace_string {\ +color: #B5BD68\ +}\ +.ace-tomorrow-night .ace_entity.ace_name.ace_tag,\ +.ace-tomorrow-night .ace_entity.ace_other.ace_attribute-name,\ +.ace-tomorrow-night .ace_meta.ace_tag,\ +.ace-tomorrow-night .ace_string.ace_regexp,\ +.ace-tomorrow-night .ace_variable {\ +color: #CC6666\ +}\ +.ace-tomorrow-night .ace_comment {\ +color: #969896\ +}\ +.ace-tomorrow-night .ace_indent-guide {\ +background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHB3d/8PAAOIAdULw8qMAAAAAElFTkSuQmCC) right repeat-y\ +}"; + +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass); +}); diff --git a/lib/ace/src-noconflict/theme-tomorrow_night_blue.js b/lib/ace/src-noconflict/theme-tomorrow_night_blue.js new file mode 100644 index 00000000..a4491896 --- /dev/null +++ b/lib/ace/src-noconflict/theme-tomorrow_night_blue.js @@ -0,0 +1,107 @@ +ace.define("ace/theme/tomorrow_night_blue",["require","exports","module","ace/lib/dom"], function(require, exports, module) { + +exports.isDark = true; +exports.cssClass = "ace-tomorrow-night-blue"; +exports.cssText = ".ace-tomorrow-night-blue .ace_gutter {\ +background: #00204b;\ +color: #7388b5\ +}\ +.ace-tomorrow-night-blue .ace_print-margin {\ +width: 1px;\ +background: #00204b\ +}\ +.ace-tomorrow-night-blue {\ +background-color: #002451;\ +color: #FFFFFF\ +}\ +.ace-tomorrow-night-blue .ace_constant.ace_other,\ +.ace-tomorrow-night-blue .ace_cursor {\ +color: #FFFFFF\ +}\ +.ace-tomorrow-night-blue .ace_marker-layer .ace_selection {\ +background: #003F8E\ +}\ +.ace-tomorrow-night-blue.ace_multiselect .ace_selection.ace_start {\ +box-shadow: 0 0 3px 0px #002451;\ +border-radius: 2px\ +}\ +.ace-tomorrow-night-blue .ace_marker-layer .ace_step {\ +background: rgb(127, 111, 19)\ +}\ +.ace-tomorrow-night-blue .ace_marker-layer .ace_bracket {\ +margin: -1px 0 0 -1px;\ +border: 1px solid #404F7D\ +}\ +.ace-tomorrow-night-blue .ace_marker-layer .ace_active-line {\ +background: #00346E\ +}\ +.ace-tomorrow-night-blue .ace_gutter-active-line {\ +background-color: #022040\ +}\ +.ace-tomorrow-night-blue .ace_marker-layer .ace_selected-word {\ +border: 1px solid #003F8E\ +}\ +.ace-tomorrow-night-blue .ace_invisible {\ +color: #404F7D\ +}\ +.ace-tomorrow-night-blue .ace_keyword,\ +.ace-tomorrow-night-blue .ace_meta,\ +.ace-tomorrow-night-blue .ace_storage,\ +.ace-tomorrow-night-blue .ace_storage.ace_type,\ +.ace-tomorrow-night-blue .ace_support.ace_type {\ +color: #EBBBFF\ +}\ +.ace-tomorrow-night-blue .ace_keyword.ace_operator {\ +color: #99FFFF\ +}\ +.ace-tomorrow-night-blue .ace_constant.ace_character,\ +.ace-tomorrow-night-blue .ace_constant.ace_language,\ +.ace-tomorrow-night-blue .ace_constant.ace_numeric,\ +.ace-tomorrow-night-blue .ace_keyword.ace_other.ace_unit,\ +.ace-tomorrow-night-blue .ace_support.ace_constant,\ +.ace-tomorrow-night-blue .ace_variable.ace_parameter {\ +color: #FFC58F\ +}\ +.ace-tomorrow-night-blue .ace_invalid {\ +color: #FFFFFF;\ +background-color: #F99DA5\ +}\ +.ace-tomorrow-night-blue .ace_invalid.ace_deprecated {\ +color: #FFFFFF;\ +background-color: #EBBBFF\ +}\ +.ace-tomorrow-night-blue .ace_fold {\ +background-color: #BBDAFF;\ +border-color: #FFFFFF\ +}\ +.ace-tomorrow-night-blue .ace_entity.ace_name.ace_function,\ +.ace-tomorrow-night-blue .ace_support.ace_function,\ +.ace-tomorrow-night-blue .ace_variable {\ +color: #BBDAFF\ +}\ +.ace-tomorrow-night-blue .ace_support.ace_class,\ +.ace-tomorrow-night-blue .ace_support.ace_type {\ +color: #FFEEAD\ +}\ +.ace-tomorrow-night-blue .ace_heading,\ +.ace-tomorrow-night-blue .ace_markup.ace_heading,\ +.ace-tomorrow-night-blue .ace_string {\ +color: #D1F1A9\ +}\ +.ace-tomorrow-night-blue .ace_entity.ace_name.ace_tag,\ +.ace-tomorrow-night-blue .ace_entity.ace_other.ace_attribute-name,\ +.ace-tomorrow-night-blue .ace_meta.ace_tag,\ +.ace-tomorrow-night-blue .ace_string.ace_regexp,\ +.ace-tomorrow-night-blue .ace_variable {\ +color: #FF9DA4\ +}\ +.ace-tomorrow-night-blue .ace_comment {\ +color: #7285B7\ +}\ +.ace-tomorrow-night-blue .ace_indent-guide {\ +background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYJDzqfwPAANXAeNsiA+ZAAAAAElFTkSuQmCC) right repeat-y\ +}"; + +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass); +}); diff --git a/lib/ace/src-noconflict/theme-tomorrow_night_bright.js b/lib/ace/src-noconflict/theme-tomorrow_night_bright.js new file mode 100644 index 00000000..3fca5f39 --- /dev/null +++ b/lib/ace/src-noconflict/theme-tomorrow_night_bright.js @@ -0,0 +1,122 @@ +ace.define("ace/theme/tomorrow_night_bright",["require","exports","module","ace/lib/dom"], function(require, exports, module) { + +exports.isDark = true; +exports.cssClass = "ace-tomorrow-night-bright"; +exports.cssText = ".ace-tomorrow-night-bright .ace_gutter {\ +background: #1a1a1a;\ +color: #DEDEDE\ +}\ +.ace-tomorrow-night-bright .ace_print-margin {\ +width: 1px;\ +background: #1a1a1a\ +}\ +.ace-tomorrow-night-bright {\ +background-color: #000000;\ +color: #DEDEDE\ +}\ +.ace-tomorrow-night-bright .ace_cursor {\ +color: #9F9F9F\ +}\ +.ace-tomorrow-night-bright .ace_marker-layer .ace_selection {\ +background: #424242\ +}\ +.ace-tomorrow-night-bright.ace_multiselect .ace_selection.ace_start {\ +box-shadow: 0 0 3px 0px #000000;\ +border-radius: 2px\ +}\ +.ace-tomorrow-night-bright .ace_marker-layer .ace_step {\ +background: rgb(102, 82, 0)\ +}\ +.ace-tomorrow-night-bright .ace_marker-layer .ace_bracket {\ +margin: -1px 0 0 -1px;\ +border: 1px solid #888888\ +}\ +.ace-tomorrow-night-bright .ace_marker-layer .ace_highlight {\ +border: 1px solid rgb(110, 119, 0);\ +border-bottom: 0;\ +box-shadow: inset 0 -1px rgb(110, 119, 0);\ +margin: -1px 0 0 -1px;\ +background: rgba(255, 235, 0, 0.1);\ +}\ +.ace-tomorrow-night-bright .ace_marker-layer .ace_active-line {\ +background: #2A2A2A\ +}\ +.ace-tomorrow-night-bright .ace_gutter-active-line {\ +background-color: #2A2A2A\ +}\ +.ace-tomorrow-night-bright .ace_stack {\ +background-color: rgb(66, 90, 44)\ +}\ +.ace-tomorrow-night-bright .ace_marker-layer .ace_selected-word {\ +border: 1px solid #888888\ +}\ +.ace-tomorrow-night-bright .ace_invisible {\ +color: #343434\ +}\ +.ace-tomorrow-night-bright .ace_keyword,\ +.ace-tomorrow-night-bright .ace_meta,\ +.ace-tomorrow-night-bright .ace_storage,\ +.ace-tomorrow-night-bright .ace_storage.ace_type,\ +.ace-tomorrow-night-bright .ace_support.ace_type {\ +color: #C397D8\ +}\ +.ace-tomorrow-night-bright .ace_keyword.ace_operator {\ +color: #70C0B1\ +}\ +.ace-tomorrow-night-bright .ace_constant.ace_character,\ +.ace-tomorrow-night-bright .ace_constant.ace_language,\ +.ace-tomorrow-night-bright .ace_constant.ace_numeric,\ +.ace-tomorrow-night-bright .ace_keyword.ace_other.ace_unit,\ +.ace-tomorrow-night-bright .ace_support.ace_constant,\ +.ace-tomorrow-night-bright .ace_variable.ace_parameter {\ +color: #E78C45\ +}\ +.ace-tomorrow-night-bright .ace_constant.ace_other {\ +color: #EEEEEE\ +}\ +.ace-tomorrow-night-bright .ace_invalid {\ +color: #CED2CF;\ +background-color: #DF5F5F\ +}\ +.ace-tomorrow-night-bright .ace_invalid.ace_deprecated {\ +color: #CED2CF;\ +background-color: #B798BF\ +}\ +.ace-tomorrow-night-bright .ace_fold {\ +background-color: #7AA6DA;\ +border-color: #DEDEDE\ +}\ +.ace-tomorrow-night-bright .ace_entity.ace_name.ace_function,\ +.ace-tomorrow-night-bright .ace_support.ace_function,\ +.ace-tomorrow-night-bright .ace_variable {\ +color: #7AA6DA\ +}\ +.ace-tomorrow-night-bright .ace_support.ace_class,\ +.ace-tomorrow-night-bright .ace_support.ace_type {\ +color: #E7C547\ +}\ +.ace-tomorrow-night-bright .ace_heading,\ +.ace-tomorrow-night-bright .ace_markup.ace_heading,\ +.ace-tomorrow-night-bright .ace_string {\ +color: #B9CA4A\ +}\ +.ace-tomorrow-night-bright .ace_entity.ace_name.ace_tag,\ +.ace-tomorrow-night-bright .ace_entity.ace_other.ace_attribute-name,\ +.ace-tomorrow-night-bright .ace_meta.ace_tag,\ +.ace-tomorrow-night-bright .ace_string.ace_regexp,\ +.ace-tomorrow-night-bright .ace_variable {\ +color: #D54E53\ +}\ +.ace-tomorrow-night-bright .ace_comment {\ +color: #969896\ +}\ +.ace-tomorrow-night-bright .ace_c9searchresults.ace_keyword {\ +color: #C2C280;\ +}\ +.ace-tomorrow-night-bright .ace_indent-guide {\ +background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYFBXV/8PAAJoAXX4kT2EAAAAAElFTkSuQmCC) right repeat-y\ +}"; + +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass); +}); diff --git a/lib/ace/src-noconflict/theme-tomorrow_night_eighties.js b/lib/ace/src-noconflict/theme-tomorrow_night_eighties.js new file mode 100644 index 00000000..7e2e9d2a --- /dev/null +++ b/lib/ace/src-noconflict/theme-tomorrow_night_eighties.js @@ -0,0 +1,109 @@ +ace.define("ace/theme/tomorrow_night_eighties",["require","exports","module","ace/lib/dom"], function(require, exports, module) { + +exports.isDark = true; +exports.cssClass = "ace-tomorrow-night-eighties"; +exports.cssText = ".ace-tomorrow-night-eighties .ace_gutter {\ +background: #272727;\ +color: #CCC\ +}\ +.ace-tomorrow-night-eighties .ace_print-margin {\ +width: 1px;\ +background: #272727\ +}\ +.ace-tomorrow-night-eighties {\ +background-color: #2D2D2D;\ +color: #CCCCCC\ +}\ +.ace-tomorrow-night-eighties .ace_constant.ace_other,\ +.ace-tomorrow-night-eighties .ace_cursor {\ +color: #CCCCCC\ +}\ +.ace-tomorrow-night-eighties .ace_marker-layer .ace_selection {\ +background: #515151\ +}\ +.ace-tomorrow-night-eighties.ace_multiselect .ace_selection.ace_start {\ +box-shadow: 0 0 3px 0px #2D2D2D;\ +border-radius: 2px\ +}\ +.ace-tomorrow-night-eighties .ace_marker-layer .ace_step {\ +background: rgb(102, 82, 0)\ +}\ +.ace-tomorrow-night-eighties .ace_marker-layer .ace_bracket {\ +margin: -1px 0 0 -1px;\ +border: 1px solid #6A6A6A\ +}\ +.ace-tomorrow-night-bright .ace_stack {\ +background: rgb(66, 90, 44)\ +}\ +.ace-tomorrow-night-eighties .ace_marker-layer .ace_active-line {\ +background: #393939\ +}\ +.ace-tomorrow-night-eighties .ace_gutter-active-line {\ +background-color: #393939\ +}\ +.ace-tomorrow-night-eighties .ace_marker-layer .ace_selected-word {\ +border: 1px solid #515151\ +}\ +.ace-tomorrow-night-eighties .ace_invisible {\ +color: #6A6A6A\ +}\ +.ace-tomorrow-night-eighties .ace_keyword,\ +.ace-tomorrow-night-eighties .ace_meta,\ +.ace-tomorrow-night-eighties .ace_storage,\ +.ace-tomorrow-night-eighties .ace_storage.ace_type,\ +.ace-tomorrow-night-eighties .ace_support.ace_type {\ +color: #CC99CC\ +}\ +.ace-tomorrow-night-eighties .ace_keyword.ace_operator {\ +color: #66CCCC\ +}\ +.ace-tomorrow-night-eighties .ace_constant.ace_character,\ +.ace-tomorrow-night-eighties .ace_constant.ace_language,\ +.ace-tomorrow-night-eighties .ace_constant.ace_numeric,\ +.ace-tomorrow-night-eighties .ace_keyword.ace_other.ace_unit,\ +.ace-tomorrow-night-eighties .ace_support.ace_constant,\ +.ace-tomorrow-night-eighties .ace_variable.ace_parameter {\ +color: #F99157\ +}\ +.ace-tomorrow-night-eighties .ace_invalid {\ +color: #CDCDCD;\ +background-color: #F2777A\ +}\ +.ace-tomorrow-night-eighties .ace_invalid.ace_deprecated {\ +color: #CDCDCD;\ +background-color: #CC99CC\ +}\ +.ace-tomorrow-night-eighties .ace_fold {\ +background-color: #6699CC;\ +border-color: #CCCCCC\ +}\ +.ace-tomorrow-night-eighties .ace_entity.ace_name.ace_function,\ +.ace-tomorrow-night-eighties .ace_support.ace_function,\ +.ace-tomorrow-night-eighties .ace_variable {\ +color: #6699CC\ +}\ +.ace-tomorrow-night-eighties .ace_support.ace_class,\ +.ace-tomorrow-night-eighties .ace_support.ace_type {\ +color: #FFCC66\ +}\ +.ace-tomorrow-night-eighties .ace_heading,\ +.ace-tomorrow-night-eighties .ace_markup.ace_heading,\ +.ace-tomorrow-night-eighties .ace_string {\ +color: #99CC99\ +}\ +.ace-tomorrow-night-eighties .ace_comment {\ +color: #999999\ +}\ +.ace-tomorrow-night-eighties .ace_entity.ace_name.ace_tag,\ +.ace-tomorrow-night-eighties .ace_entity.ace_other.ace_attribute-name,\ +.ace-tomorrow-night-eighties .ace_meta.ace_tag,\ +.ace-tomorrow-night-eighties .ace_variable {\ +color: #F2777A\ +}\ +.ace-tomorrow-night-eighties .ace_indent-guide {\ +background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWPQ09NrYAgMjP4PAAtGAwchHMyAAAAAAElFTkSuQmCC) right repeat-y\ +}"; + +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass); +}); diff --git a/lib/ace/src-noconflict/theme-twilight.js b/lib/ace/src-noconflict/theme-twilight.js new file mode 100644 index 00000000..4a259731 --- /dev/null +++ b/lib/ace/src-noconflict/theme-twilight.js @@ -0,0 +1,110 @@ +ace.define("ace/theme/twilight",["require","exports","module","ace/lib/dom"], function(require, exports, module) { + +exports.isDark = true; +exports.cssClass = "ace-twilight"; +exports.cssText = ".ace-twilight .ace_gutter {\ +background: #232323;\ +color: #E2E2E2\ +}\ +.ace-twilight .ace_print-margin {\ +width: 1px;\ +background: #232323\ +}\ +.ace-twilight {\ +background-color: #141414;\ +color: #F8F8F8\ +}\ +.ace-twilight .ace_cursor {\ +color: #A7A7A7\ +}\ +.ace-twilight .ace_marker-layer .ace_selection {\ +background: rgba(221, 240, 255, 0.20)\ +}\ +.ace-twilight.ace_multiselect .ace_selection.ace_start {\ +box-shadow: 0 0 3px 0px #141414;\ +border-radius: 2px\ +}\ +.ace-twilight .ace_marker-layer .ace_step {\ +background: rgb(102, 82, 0)\ +}\ +.ace-twilight .ace_marker-layer .ace_bracket {\ +margin: -1px 0 0 -1px;\ +border: 1px solid rgba(255, 255, 255, 0.25)\ +}\ +.ace-twilight .ace_marker-layer .ace_active-line {\ +background: rgba(255, 255, 255, 0.031)\ +}\ +.ace-twilight .ace_gutter-active-line {\ +background-color: rgba(255, 255, 255, 0.031)\ +}\ +.ace-twilight .ace_marker-layer .ace_selected-word {\ +border: 1px solid rgba(221, 240, 255, 0.20)\ +}\ +.ace-twilight .ace_invisible {\ +color: rgba(255, 255, 255, 0.25)\ +}\ +.ace-twilight .ace_keyword,\ +.ace-twilight .ace_meta {\ +color: #CDA869\ +}\ +.ace-twilight .ace_constant,\ +.ace-twilight .ace_constant.ace_character,\ +.ace-twilight .ace_constant.ace_character.ace_escape,\ +.ace-twilight .ace_constant.ace_other,\ +.ace-twilight .ace_heading,\ +.ace-twilight .ace_markup.ace_heading,\ +.ace-twilight .ace_support.ace_constant {\ +color: #CF6A4C\ +}\ +.ace-twilight .ace_invalid.ace_illegal {\ +color: #F8F8F8;\ +background-color: rgba(86, 45, 86, 0.75)\ +}\ +.ace-twilight .ace_invalid.ace_deprecated {\ +text-decoration: underline;\ +font-style: italic;\ +color: #D2A8A1\ +}\ +.ace-twilight .ace_support {\ +color: #9B859D\ +}\ +.ace-twilight .ace_fold {\ +background-color: #AC885B;\ +border-color: #F8F8F8\ +}\ +.ace-twilight .ace_support.ace_function {\ +color: #DAD085\ +}\ +.ace-twilight .ace_list,\ +.ace-twilight .ace_markup.ace_list,\ +.ace-twilight .ace_storage {\ +color: #F9EE98\ +}\ +.ace-twilight .ace_entity.ace_name.ace_function,\ +.ace-twilight .ace_meta.ace_tag,\ +.ace-twilight .ace_variable {\ +color: #AC885B\ +}\ +.ace-twilight .ace_string {\ +color: #8F9D6A\ +}\ +.ace-twilight .ace_string.ace_regexp {\ +color: #E9C062\ +}\ +.ace-twilight .ace_comment {\ +font-style: italic;\ +color: #5F5A60\ +}\ +.ace-twilight .ace_variable {\ +color: #7587A6\ +}\ +.ace-twilight .ace_xml-pe {\ +color: #494949\ +}\ +.ace-twilight .ace_indent-guide {\ +background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y\ +}"; + +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass); +}); diff --git a/lib/ace/src-noconflict/theme-vibrant_ink.js b/lib/ace/src-noconflict/theme-vibrant_ink.js new file mode 100644 index 00000000..d362b84d --- /dev/null +++ b/lib/ace/src-noconflict/theme-vibrant_ink.js @@ -0,0 +1,95 @@ +ace.define("ace/theme/vibrant_ink",["require","exports","module","ace/lib/dom"], function(require, exports, module) { + +exports.isDark = true; +exports.cssClass = "ace-vibrant-ink"; +exports.cssText = ".ace-vibrant-ink .ace_gutter {\ +background: #1a1a1a;\ +color: #BEBEBE\ +}\ +.ace-vibrant-ink .ace_print-margin {\ +width: 1px;\ +background: #1a1a1a\ +}\ +.ace-vibrant-ink {\ +background-color: #0F0F0F;\ +color: #FFFFFF\ +}\ +.ace-vibrant-ink .ace_cursor {\ +color: #FFFFFF\ +}\ +.ace-vibrant-ink .ace_marker-layer .ace_selection {\ +background: #6699CC\ +}\ +.ace-vibrant-ink.ace_multiselect .ace_selection.ace_start {\ +box-shadow: 0 0 3px 0px #0F0F0F;\ +border-radius: 2px\ +}\ +.ace-vibrant-ink .ace_marker-layer .ace_step {\ +background: rgb(102, 82, 0)\ +}\ +.ace-vibrant-ink .ace_marker-layer .ace_bracket {\ +margin: -1px 0 0 -1px;\ +border: 1px solid #404040\ +}\ +.ace-vibrant-ink .ace_marker-layer .ace_active-line {\ +background: #333333\ +}\ +.ace-vibrant-ink .ace_gutter-active-line {\ +background-color: #333333\ +}\ +.ace-vibrant-ink .ace_marker-layer .ace_selected-word {\ +border: 1px solid #6699CC\ +}\ +.ace-vibrant-ink .ace_invisible {\ +color: #404040\ +}\ +.ace-vibrant-ink .ace_keyword,\ +.ace-vibrant-ink .ace_meta {\ +color: #FF6600\ +}\ +.ace-vibrant-ink .ace_constant,\ +.ace-vibrant-ink .ace_constant.ace_character,\ +.ace-vibrant-ink .ace_constant.ace_character.ace_escape,\ +.ace-vibrant-ink .ace_constant.ace_other {\ +color: #339999\ +}\ +.ace-vibrant-ink .ace_constant.ace_numeric {\ +color: #99CC99\ +}\ +.ace-vibrant-ink .ace_invalid,\ +.ace-vibrant-ink .ace_invalid.ace_deprecated {\ +color: #CCFF33;\ +background-color: #000000\ +}\ +.ace-vibrant-ink .ace_fold {\ +background-color: #FFCC00;\ +border-color: #FFFFFF\ +}\ +.ace-vibrant-ink .ace_entity.ace_name.ace_function,\ +.ace-vibrant-ink .ace_support.ace_function,\ +.ace-vibrant-ink .ace_variable {\ +color: #FFCC00\ +}\ +.ace-vibrant-ink .ace_variable.ace_parameter {\ +font-style: italic\ +}\ +.ace-vibrant-ink .ace_string {\ +color: #66FF00\ +}\ +.ace-vibrant-ink .ace_string.ace_regexp {\ +color: #44B4CC\ +}\ +.ace-vibrant-ink .ace_comment {\ +color: #9933CC\ +}\ +.ace-vibrant-ink .ace_entity.ace_other.ace_attribute-name {\ +font-style: italic;\ +color: #99CC99\ +}\ +.ace-vibrant-ink .ace_indent-guide {\ +background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYNDTc/oPAALPAZ7hxlbYAAAAAElFTkSuQmCC) right repeat-y\ +}"; + +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass); +}); diff --git a/lib/ace/src-noconflict/theme-xcode.js b/lib/ace/src-noconflict/theme-xcode.js new file mode 100644 index 00000000..f3b3753d --- /dev/null +++ b/lib/ace/src-noconflict/theme-xcode.js @@ -0,0 +1,89 @@ +ace.define("ace/theme/xcode",["require","exports","module","ace/lib/dom"], function(require, exports, module) { + +exports.isDark = false; +exports.cssClass = "ace-xcode"; +exports.cssText = "\ +.ace-xcode .ace_gutter {\ +background: #e8e8e8;\ +color: #333\ +}\ +.ace-xcode .ace_print-margin {\ +width: 1px;\ +background: #e8e8e8\ +}\ +.ace-xcode {\ +background-color: #FFFFFF;\ +color: #000000\ +}\ +.ace-xcode .ace_cursor {\ +color: #000000\ +}\ +.ace-xcode .ace_marker-layer .ace_selection {\ +background: #B5D5FF\ +}\ +.ace-xcode.ace_multiselect .ace_selection.ace_start {\ +box-shadow: 0 0 3px 0px #FFFFFF;\ +border-radius: 2px\ +}\ +.ace-xcode .ace_marker-layer .ace_step {\ +background: rgb(198, 219, 174)\ +}\ +.ace-xcode .ace_marker-layer .ace_bracket {\ +margin: -1px 0 0 -1px;\ +border: 1px solid #BFBFBF\ +}\ +.ace-xcode .ace_marker-layer .ace_active-line {\ +background: rgba(0, 0, 0, 0.071)\ +}\ +.ace-xcode .ace_gutter-active-line {\ +background-color: rgba(0, 0, 0, 0.071)\ +}\ +.ace-xcode .ace_marker-layer .ace_selected-word {\ +border: 1px solid #B5D5FF\ +}\ +.ace-xcode .ace_constant.ace_language,\ +.ace-xcode .ace_keyword,\ +.ace-xcode .ace_meta,\ +.ace-xcode .ace_variable.ace_language {\ +color: #C800A4\ +}\ +.ace-xcode .ace_invisible {\ +color: #BFBFBF\ +}\ +.ace-xcode .ace_constant.ace_character,\ +.ace-xcode .ace_constant.ace_other {\ +color: #275A5E\ +}\ +.ace-xcode .ace_constant.ace_numeric {\ +color: #3A00DC\ +}\ +.ace-xcode .ace_entity.ace_other.ace_attribute-name,\ +.ace-xcode .ace_support.ace_constant,\ +.ace-xcode .ace_support.ace_function {\ +color: #450084\ +}\ +.ace-xcode .ace_fold {\ +background-color: #C800A4;\ +border-color: #000000\ +}\ +.ace-xcode .ace_entity.ace_name.ace_tag,\ +.ace-xcode .ace_support.ace_class,\ +.ace-xcode .ace_support.ace_type {\ +color: #790EAD\ +}\ +.ace-xcode .ace_storage {\ +color: #C900A4\ +}\ +.ace-xcode .ace_string {\ +color: #DF0002\ +}\ +.ace-xcode .ace_comment {\ +color: #008E00\ +}\ +.ace-xcode .ace_indent-guide {\ +background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==) right repeat-y\ +}"; + +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass); +}); diff --git a/lib/ace/src-noconflict/worker-coffee.js b/lib/ace/src-noconflict/worker-coffee.js new file mode 100644 index 00000000..9c80abd1 --- /dev/null +++ b/lib/ace/src-noconflict/worker-coffee.js @@ -0,0 +1,7589 @@ +"no use strict"; +;(function(window) { +if (typeof window.window != "undefined" && window.document) { + return; +} + +window.console = function() { + var msgs = Array.prototype.slice.call(arguments, 0); + postMessage({type: "log", data: msgs}); +}; +window.console.error = +window.console.warn = +window.console.log = +window.console.trace = window.console; + +window.window = window; +window.ace = window; + +window.onerror = function(message, file, line, col, err) { + console.error("Worker " + (err ? err.stack : message)); +}; + +window.normalizeModule = function(parentId, moduleName) { + // normalize plugin requires + if (moduleName.indexOf("!") !== -1) { + var chunks = moduleName.split("!"); + return window.normalizeModule(parentId, chunks[0]) + "!" + window.normalizeModule(parentId, chunks[1]); + } + // normalize relative requires + if (moduleName.charAt(0) == ".") { + var base = parentId.split("/").slice(0, -1).join("/"); + moduleName = (base ? base + "/" : "") + moduleName; + + while(moduleName.indexOf(".") !== -1 && previous != moduleName) { + var previous = moduleName; + moduleName = moduleName.replace(/^\.\//, "").replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, ""); + } + } + + return moduleName; +}; + +window.require = function(parentId, id) { + if (!id) { + id = parentId; + parentId = null; + } + if (!id.charAt) + throw new Error("worker.js require() accepts only (parentId, id) as arguments"); + + id = window.normalizeModule(parentId, id); + + var module = window.require.modules[id]; + if (module) { + if (!module.initialized) { + module.initialized = true; + module.exports = module.factory().exports; + } + return module.exports; + } + + var chunks = id.split("/"); + if (!window.require.tlns) + return console.log("unable to load " + id); + chunks[0] = window.require.tlns[chunks[0]] || chunks[0]; + var path = chunks.join("/") + ".js"; + + window.require.id = id; + importScripts(path); + return window.require(parentId, id); +}; +window.require.modules = {}; +window.require.tlns = {}; + +window.define = function(id, deps, factory) { + if (arguments.length == 2) { + factory = deps; + if (typeof id != "string") { + deps = id; + id = window.require.id; + } + } else if (arguments.length == 1) { + factory = id; + deps = []; + id = window.require.id; + } + + if (!deps.length) + // If there is no dependencies, we inject 'require', 'exports' and + // 'module' as dependencies, to provide CommonJS compatibility. + deps = ['require', 'exports', 'module']; + + if (id.indexOf("text!") === 0) + return; + + var req = function(childId) { + return window.require(id, childId); + }; + + window.require.modules[id] = { + exports: {}, + factory: function() { + var module = this; + var returnExports = factory.apply(this, deps.map(function(dep) { + switch(dep) { + // Because 'require', 'exports' and 'module' aren't actual + // dependencies, we must handle them seperately. + case 'require': return req; + case 'exports': return module.exports; + case 'module': return module; + // But for all other dependencies, we can just go ahead and + // require them. + default: return req(dep); + } + })); + if (returnExports) + module.exports = returnExports; + return module; + } + }; +}; +window.define.amd = {}; + +window.initBaseUrls = function initBaseUrls(topLevelNamespaces) { + require.tlns = topLevelNamespaces; +}; + +window.initSender = function initSender() { + + var EventEmitter = window.require("ace/lib/event_emitter").EventEmitter; + var oop = window.require("ace/lib/oop"); + + var Sender = function() {}; + + (function() { + + oop.implement(this, EventEmitter); + + this.callback = function(data, callbackId) { + postMessage({ + type: "call", + id: callbackId, + data: data + }); + }; + + this.emit = function(name, data) { + postMessage({ + type: "event", + name: name, + data: data + }); + }; + + }).call(Sender.prototype); + + return new Sender(); +}; + +var main = window.main = null; +var sender = window.sender = null; + +window.onmessage = function(e) { + var msg = e.data; + if (msg.command) { + if (main[msg.command]) + main[msg.command].apply(main, msg.args); + else + throw new Error("Unknown command:" + msg.command); + } + else if (msg.init) { + initBaseUrls(msg.tlns); + require("ace/lib/es5-shim"); + sender = window.sender = initSender(); + var clazz = require(msg.module)[msg.classname]; + main = window.main = new clazz(sender); + } + else if (msg.event && sender) { + sender._signal(msg.event, msg.data); + } +}; +})(this); + +ace.define("ace/lib/oop",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.inherits = function(ctor, superCtor) { + ctor.super_ = superCtor; + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); +}; + +exports.mixin = function(obj, mixin) { + for (var key in mixin) { + obj[key] = mixin[key]; + } + return obj; +}; + +exports.implement = function(proto, mixin) { + exports.mixin(proto, mixin); +}; + +}); + +ace.define("ace/lib/event_emitter",["require","exports","module"], function(require, exports, module) { +"use strict"; + +var EventEmitter = {}; +var stopPropagation = function() { this.propagationStopped = true; }; +var preventDefault = function() { this.defaultPrevented = true; }; + +EventEmitter._emit = +EventEmitter._dispatchEvent = function(eventName, e) { + this._eventRegistry || (this._eventRegistry = {}); + this._defaultHandlers || (this._defaultHandlers = {}); + + var listeners = this._eventRegistry[eventName] || []; + var defaultHandler = this._defaultHandlers[eventName]; + if (!listeners.length && !defaultHandler) + return; + + if (typeof e != "object" || !e) + e = {}; + + if (!e.type) + e.type = eventName; + if (!e.stopPropagation) + e.stopPropagation = stopPropagation; + if (!e.preventDefault) + e.preventDefault = preventDefault; + + listeners = listeners.slice(); + for (var i=0; i [" + this.end.row + "/" + this.end.column + "]"); + }; + + this.contains = function(row, column) { + return this.compare(row, column) == 0; + }; + this.compareRange = function(range) { + var cmp, + end = range.end, + start = range.start; + + cmp = this.compare(end.row, end.column); + if (cmp == 1) { + cmp = this.compare(start.row, start.column); + if (cmp == 1) { + return 2; + } else if (cmp == 0) { + return 1; + } else { + return 0; + } + } else if (cmp == -1) { + return -2; + } else { + cmp = this.compare(start.row, start.column); + if (cmp == -1) { + return -1; + } else if (cmp == 1) { + return 42; + } else { + return 0; + } + } + }; + this.comparePoint = function(p) { + return this.compare(p.row, p.column); + }; + this.containsRange = function(range) { + return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0; + }; + this.intersects = function(range) { + var cmp = this.compareRange(range); + return (cmp == -1 || cmp == 0 || cmp == 1); + }; + this.isEnd = function(row, column) { + return this.end.row == row && this.end.column == column; + }; + this.isStart = function(row, column) { + return this.start.row == row && this.start.column == column; + }; + this.setStart = function(row, column) { + if (typeof row == "object") { + this.start.column = row.column; + this.start.row = row.row; + } else { + this.start.row = row; + this.start.column = column; + } + }; + this.setEnd = function(row, column) { + if (typeof row == "object") { + this.end.column = row.column; + this.end.row = row.row; + } else { + this.end.row = row; + this.end.column = column; + } + }; + this.inside = function(row, column) { + if (this.compare(row, column) == 0) { + if (this.isEnd(row, column) || this.isStart(row, column)) { + return false; + } else { + return true; + } + } + return false; + }; + this.insideStart = function(row, column) { + if (this.compare(row, column) == 0) { + if (this.isEnd(row, column)) { + return false; + } else { + return true; + } + } + return false; + }; + this.insideEnd = function(row, column) { + if (this.compare(row, column) == 0) { + if (this.isStart(row, column)) { + return false; + } else { + return true; + } + } + return false; + }; + this.compare = function(row, column) { + if (!this.isMultiLine()) { + if (row === this.start.row) { + return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0); + }; + } + + if (row < this.start.row) + return -1; + + if (row > this.end.row) + return 1; + + if (this.start.row === row) + return column >= this.start.column ? 0 : -1; + + if (this.end.row === row) + return column <= this.end.column ? 0 : 1; + + return 0; + }; + this.compareStart = function(row, column) { + if (this.start.row == row && this.start.column == column) { + return -1; + } else { + return this.compare(row, column); + } + }; + this.compareEnd = function(row, column) { + if (this.end.row == row && this.end.column == column) { + return 1; + } else { + return this.compare(row, column); + } + }; + this.compareInside = function(row, column) { + if (this.end.row == row && this.end.column == column) { + return 1; + } else if (this.start.row == row && this.start.column == column) { + return -1; + } else { + return this.compare(row, column); + } + }; + this.clipRows = function(firstRow, lastRow) { + if (this.end.row > lastRow) + var end = {row: lastRow + 1, column: 0}; + else if (this.end.row < firstRow) + var end = {row: firstRow, column: 0}; + + if (this.start.row > lastRow) + var start = {row: lastRow + 1, column: 0}; + else if (this.start.row < firstRow) + var start = {row: firstRow, column: 0}; + + return Range.fromPoints(start || this.start, end || this.end); + }; + this.extend = function(row, column) { + var cmp = this.compare(row, column); + + if (cmp == 0) + return this; + else if (cmp == -1) + var start = {row: row, column: column}; + else + var end = {row: row, column: column}; + + return Range.fromPoints(start || this.start, end || this.end); + }; + + this.isEmpty = function() { + return (this.start.row === this.end.row && this.start.column === this.end.column); + }; + this.isMultiLine = function() { + return (this.start.row !== this.end.row); + }; + this.clone = function() { + return Range.fromPoints(this.start, this.end); + }; + this.collapseRows = function() { + if (this.end.column == 0) + return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0) + else + return new Range(this.start.row, 0, this.end.row, 0) + }; + this.toScreenRange = function(session) { + var screenPosStart = session.documentToScreenPosition(this.start); + var screenPosEnd = session.documentToScreenPosition(this.end); + + return new Range( + screenPosStart.row, screenPosStart.column, + screenPosEnd.row, screenPosEnd.column + ); + }; + this.moveBy = function(row, column) { + this.start.row += row; + this.start.column += column; + this.end.row += row; + this.end.column += column; + }; + +}).call(Range.prototype); +Range.fromPoints = function(start, end) { + return new Range(start.row, start.column, end.row, end.column); +}; +Range.comparePoints = comparePoints; + +Range.comparePoints = function(p1, p2) { + return p1.row - p2.row || p1.column - p2.column; +}; + + +exports.Range = Range; +}); + +ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"], function(require, exports, module) { +"use strict"; + +var oop = require("./lib/oop"); +var EventEmitter = require("./lib/event_emitter").EventEmitter; + +var Anchor = exports.Anchor = function(doc, row, column) { + this.$onChange = this.onChange.bind(this); + this.attach(doc); + + if (typeof column == "undefined") + this.setPosition(row.row, row.column); + else + this.setPosition(row, column); +}; + +(function() { + + oop.implement(this, EventEmitter); + this.getPosition = function() { + return this.$clipPositionToDocument(this.row, this.column); + }; + this.getDocument = function() { + return this.document; + }; + this.$insertRight = false; + this.onChange = function(e) { + var delta = e.data; + var range = delta.range; + + if (range.start.row == range.end.row && range.start.row != this.row) + return; + + if (range.start.row > this.row) + return; + + if (range.start.row == this.row && range.start.column > this.column) + return; + + var row = this.row; + var column = this.column; + var start = range.start; + var end = range.end; + + if (delta.action === "insertText") { + if (start.row === row && start.column <= column) { + if (start.column === column && this.$insertRight) { + } else if (start.row === end.row) { + column += end.column - start.column; + } else { + column -= start.column; + row += end.row - start.row; + } + } else if (start.row !== end.row && start.row < row) { + row += end.row - start.row; + } + } else if (delta.action === "insertLines") { + if (start.row === row && column === 0 && this.$insertRight) { + } + else if (start.row <= row) { + row += end.row - start.row; + } + } else if (delta.action === "removeText") { + if (start.row === row && start.column < column) { + if (end.column >= column) + column = start.column; + else + column = Math.max(0, column - (end.column - start.column)); + + } else if (start.row !== end.row && start.row < row) { + if (end.row === row) + column = Math.max(0, column - end.column) + start.column; + row -= (end.row - start.row); + } else if (end.row === row) { + row -= end.row - start.row; + column = Math.max(0, column - end.column) + start.column; + } + } else if (delta.action == "removeLines") { + if (start.row <= row) { + if (end.row <= row) + row -= end.row - start.row; + else { + row = start.row; + column = 0; + } + } + } + + this.setPosition(row, column, true); + }; + this.setPosition = function(row, column, noClip) { + var pos; + if (noClip) { + pos = { + row: row, + column: column + }; + } else { + pos = this.$clipPositionToDocument(row, column); + } + + if (this.row == pos.row && this.column == pos.column) + return; + + var old = { + row: this.row, + column: this.column + }; + + this.row = pos.row; + this.column = pos.column; + this._signal("change", { + old: old, + value: pos + }); + }; + this.detach = function() { + this.document.removeEventListener("change", this.$onChange); + }; + this.attach = function(doc) { + this.document = doc || this.document; + this.document.on("change", this.$onChange); + }; + this.$clipPositionToDocument = function(row, column) { + var pos = {}; + + if (row >= this.document.getLength()) { + pos.row = Math.max(0, this.document.getLength() - 1); + pos.column = this.document.getLine(pos.row).length; + } + else if (row < 0) { + pos.row = 0; + pos.column = 0; + } + else { + pos.row = row; + pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column)); + } + + if (column < 0) + pos.column = 0; + + return pos; + }; + +}).call(Anchor.prototype); + +}); + +ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"], function(require, exports, module) { +"use strict"; + +var oop = require("./lib/oop"); +var EventEmitter = require("./lib/event_emitter").EventEmitter; +var Range = require("./range").Range; +var Anchor = require("./anchor").Anchor; + +var Document = function(text) { + this.$lines = []; + if (text.length === 0) { + this.$lines = [""]; + } else if (Array.isArray(text)) { + this._insertLines(0, text); + } else { + this.insert({row: 0, column:0}, text); + } +}; + +(function() { + + oop.implement(this, EventEmitter); + this.setValue = function(text) { + var len = this.getLength(); + this.remove(new Range(0, 0, len, this.getLine(len-1).length)); + this.insert({row: 0, column:0}, text); + }; + this.getValue = function() { + return this.getAllLines().join(this.getNewLineCharacter()); + }; + this.createAnchor = function(row, column) { + return new Anchor(this, row, column); + }; + if ("aaa".split(/a/).length === 0) + this.$split = function(text) { + return text.replace(/\r\n|\r/g, "\n").split("\n"); + }; + else + this.$split = function(text) { + return text.split(/\r\n|\r|\n/); + }; + + + this.$detectNewLine = function(text) { + var match = text.match(/^.*?(\r\n|\r|\n)/m); + this.$autoNewLine = match ? match[1] : "\n"; + this._signal("changeNewLineMode"); + }; + this.getNewLineCharacter = function() { + switch (this.$newLineMode) { + case "windows": + return "\r\n"; + case "unix": + return "\n"; + default: + return this.$autoNewLine || "\n"; + } + }; + + this.$autoNewLine = ""; + this.$newLineMode = "auto"; + this.setNewLineMode = function(newLineMode) { + if (this.$newLineMode === newLineMode) + return; + + this.$newLineMode = newLineMode; + this._signal("changeNewLineMode"); + }; + this.getNewLineMode = function() { + return this.$newLineMode; + }; + this.isNewLine = function(text) { + return (text == "\r\n" || text == "\r" || text == "\n"); + }; + this.getLine = function(row) { + return this.$lines[row] || ""; + }; + this.getLines = function(firstRow, lastRow) { + return this.$lines.slice(firstRow, lastRow + 1); + }; + this.getAllLines = function() { + return this.getLines(0, this.getLength()); + }; + this.getLength = function() { + return this.$lines.length; + }; + this.getTextRange = function(range) { + if (range.start.row == range.end.row) { + return this.getLine(range.start.row) + .substring(range.start.column, range.end.column); + } + var lines = this.getLines(range.start.row, range.end.row); + lines[0] = (lines[0] || "").substring(range.start.column); + var l = lines.length - 1; + if (range.end.row - range.start.row == l) + lines[l] = lines[l].substring(0, range.end.column); + return lines.join(this.getNewLineCharacter()); + }; + + this.$clipPosition = function(position) { + var length = this.getLength(); + if (position.row >= length) { + position.row = Math.max(0, length - 1); + position.column = this.getLine(length-1).length; + } else if (position.row < 0) + position.row = 0; + return position; + }; + this.insert = function(position, text) { + if (!text || text.length === 0) + return position; + + position = this.$clipPosition(position); + if (this.getLength() <= 1) + this.$detectNewLine(text); + + var lines = this.$split(text); + var firstLine = lines.splice(0, 1)[0]; + var lastLine = lines.length == 0 ? null : lines.splice(lines.length - 1, 1)[0]; + + position = this.insertInLine(position, firstLine); + if (lastLine !== null) { + position = this.insertNewLine(position); // terminate first line + position = this._insertLines(position.row, lines); + position = this.insertInLine(position, lastLine || ""); + } + return position; + }; + this.insertLines = function(row, lines) { + if (row >= this.getLength()) + return this.insert({row: row, column: 0}, "\n" + lines.join("\n")); + return this._insertLines(Math.max(row, 0), lines); + }; + this._insertLines = function(row, lines) { + if (lines.length == 0) + return {row: row, column: 0}; + while (lines.length > 0xF000) { + var end = this._insertLines(row, lines.slice(0, 0xF000)); + lines = lines.slice(0xF000); + row = end.row; + } + + var args = [row, 0]; + args.push.apply(args, lines); + this.$lines.splice.apply(this.$lines, args); + + var range = new Range(row, 0, row + lines.length, 0); + var delta = { + action: "insertLines", + range: range, + lines: lines + }; + this._signal("change", { data: delta }); + return range.end; + }; + this.insertNewLine = function(position) { + position = this.$clipPosition(position); + var line = this.$lines[position.row] || ""; + + this.$lines[position.row] = line.substring(0, position.column); + this.$lines.splice(position.row + 1, 0, line.substring(position.column, line.length)); + + var end = { + row : position.row + 1, + column : 0 + }; + + var delta = { + action: "insertText", + range: Range.fromPoints(position, end), + text: this.getNewLineCharacter() + }; + this._signal("change", { data: delta }); + + return end; + }; + this.insertInLine = function(position, text) { + if (text.length == 0) + return position; + + var line = this.$lines[position.row] || ""; + + this.$lines[position.row] = line.substring(0, position.column) + text + + line.substring(position.column); + + var end = { + row : position.row, + column : position.column + text.length + }; + + var delta = { + action: "insertText", + range: Range.fromPoints(position, end), + text: text + }; + this._signal("change", { data: delta }); + + return end; + }; + this.remove = function(range) { + if (!(range instanceof Range)) + range = Range.fromPoints(range.start, range.end); + range.start = this.$clipPosition(range.start); + range.end = this.$clipPosition(range.end); + + if (range.isEmpty()) + return range.start; + + var firstRow = range.start.row; + var lastRow = range.end.row; + + if (range.isMultiLine()) { + var firstFullRow = range.start.column == 0 ? firstRow : firstRow + 1; + var lastFullRow = lastRow - 1; + + if (range.end.column > 0) + this.removeInLine(lastRow, 0, range.end.column); + + if (lastFullRow >= firstFullRow) + this._removeLines(firstFullRow, lastFullRow); + + if (firstFullRow != firstRow) { + this.removeInLine(firstRow, range.start.column, this.getLine(firstRow).length); + this.removeNewLine(range.start.row); + } + } + else { + this.removeInLine(firstRow, range.start.column, range.end.column); + } + return range.start; + }; + this.removeInLine = function(row, startColumn, endColumn) { + if (startColumn == endColumn) + return; + + var range = new Range(row, startColumn, row, endColumn); + var line = this.getLine(row); + var removed = line.substring(startColumn, endColumn); + var newLine = line.substring(0, startColumn) + line.substring(endColumn, line.length); + this.$lines.splice(row, 1, newLine); + + var delta = { + action: "removeText", + range: range, + text: removed + }; + this._signal("change", { data: delta }); + return range.start; + }; + this.removeLines = function(firstRow, lastRow) { + if (firstRow < 0 || lastRow >= this.getLength()) + return this.remove(new Range(firstRow, 0, lastRow + 1, 0)); + return this._removeLines(firstRow, lastRow); + }; + + this._removeLines = function(firstRow, lastRow) { + var range = new Range(firstRow, 0, lastRow + 1, 0); + var removed = this.$lines.splice(firstRow, lastRow - firstRow + 1); + + var delta = { + action: "removeLines", + range: range, + nl: this.getNewLineCharacter(), + lines: removed + }; + this._signal("change", { data: delta }); + return removed; + }; + this.removeNewLine = function(row) { + var firstLine = this.getLine(row); + var secondLine = this.getLine(row+1); + + var range = new Range(row, firstLine.length, row+1, 0); + var line = firstLine + secondLine; + + this.$lines.splice(row, 2, line); + + var delta = { + action: "removeText", + range: range, + text: this.getNewLineCharacter() + }; + this._signal("change", { data: delta }); + }; + this.replace = function(range, text) { + if (!(range instanceof Range)) + range = Range.fromPoints(range.start, range.end); + if (text.length == 0 && range.isEmpty()) + return range.start; + if (text == this.getTextRange(range)) + return range.end; + + this.remove(range); + if (text) { + var end = this.insert(range.start, text); + } + else { + end = range.start; + } + + return end; + }; + this.applyDeltas = function(deltas) { + for (var i=0; i=0; i--) { + var delta = deltas[i]; + + var range = Range.fromPoints(delta.range.start, delta.range.end); + + if (delta.action == "insertLines") + this._removeLines(range.start.row, range.end.row - 1); + else if (delta.action == "insertText") + this.remove(range); + else if (delta.action == "removeLines") + this._insertLines(range.start.row, delta.lines); + else if (delta.action == "removeText") + this.insert(range.start, delta.text); + } + }; + this.indexToPosition = function(index, startRow) { + var lines = this.$lines || this.getAllLines(); + var newlineLength = this.getNewLineCharacter().length; + for (var i = startRow || 0, l = lines.length; i < l; i++) { + index -= lines[i].length + newlineLength; + if (index < 0) + return {row: i, column: index + lines[i].length + newlineLength}; + } + return {row: l-1, column: lines[l-1].length}; + }; + this.positionToIndex = function(pos, startRow) { + var lines = this.$lines || this.getAllLines(); + var newlineLength = this.getNewLineCharacter().length; + var index = 0; + var row = Math.min(pos.row, lines.length); + for (var i = startRow || 0; i < row; ++i) + index += lines[i].length + newlineLength; + + return index + pos.column; + }; + +}).call(Document.prototype); + +exports.Document = Document; +}); + +ace.define("ace/lib/lang",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.last = function(a) { + return a[a.length - 1]; +}; + +exports.stringReverse = function(string) { + return string.split("").reverse().join(""); +}; + +exports.stringRepeat = function (string, count) { + var result = ''; + while (count > 0) { + if (count & 1) + result += string; + + if (count >>= 1) + string += string; + } + return result; +}; + +var trimBeginRegexp = /^\s\s*/; +var trimEndRegexp = /\s\s*$/; + +exports.stringTrimLeft = function (string) { + return string.replace(trimBeginRegexp, ''); +}; + +exports.stringTrimRight = function (string) { + return string.replace(trimEndRegexp, ''); +}; + +exports.copyObject = function(obj) { + var copy = {}; + for (var key in obj) { + copy[key] = obj[key]; + } + return copy; +}; + +exports.copyArray = function(array){ + var copy = []; + for (var i=0, l=array.length; i= 0) { + levels += 1; + } else if (_ref1 = token[0], __indexOf.call(EXPRESSION_END, _ref1) >= 0) { + levels -= 1; + } + i += 1; + } + return i - 1; + }; + + Rewriter.prototype.removeLeadingNewlines = function() { + var i, tag, _i, _len, _ref; + _ref = this.tokens; + for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) { + tag = _ref[i][0]; + if (tag !== 'TERMINATOR') { + break; + } + } + if (i) { + return this.tokens.splice(0, i); + } + }; + + Rewriter.prototype.closeOpenCalls = function() { + var action, condition; + condition = function(token, i) { + var _ref; + return ((_ref = token[0]) === ')' || _ref === 'CALL_END') || token[0] === 'OUTDENT' && this.tag(i - 1) === ')'; + }; + action = function(token, i) { + return this.tokens[token[0] === 'OUTDENT' ? i - 1 : i][0] = 'CALL_END'; + }; + return this.scanTokens(function(token, i) { + if (token[0] === 'CALL_START') { + this.detectEnd(i + 1, condition, action); + } + return 1; + }); + }; + + Rewriter.prototype.closeOpenIndexes = function() { + var action, condition; + condition = function(token, i) { + var _ref; + return (_ref = token[0]) === ']' || _ref === 'INDEX_END'; + }; + action = function(token, i) { + return token[0] = 'INDEX_END'; + }; + return this.scanTokens(function(token, i) { + if (token[0] === 'INDEX_START') { + this.detectEnd(i + 1, condition, action); + } + return 1; + }); + }; + + Rewriter.prototype.matchTags = function() { + var fuzz, i, j, pattern, _i, _ref, _ref1; + i = arguments[0], pattern = 2 <= arguments.length ? __slice.call(arguments, 1) : []; + fuzz = 0; + for (j = _i = 0, _ref = pattern.length; 0 <= _ref ? _i < _ref : _i > _ref; j = 0 <= _ref ? ++_i : --_i) { + while (this.tag(i + j + fuzz) === 'HERECOMMENT') { + fuzz += 2; + } + if (pattern[j] == null) { + continue; + } + if (typeof pattern[j] === 'string') { + pattern[j] = [pattern[j]]; + } + if (_ref1 = this.tag(i + j + fuzz), __indexOf.call(pattern[j], _ref1) < 0) { + return false; + } + } + return true; + }; + + Rewriter.prototype.looksObjectish = function(j) { + return this.matchTags(j, '@', null, ':') || this.matchTags(j, null, ':'); + }; + + Rewriter.prototype.findTagsBackwards = function(i, tags) { + var backStack, _ref, _ref1, _ref2, _ref3, _ref4, _ref5; + backStack = []; + while (i >= 0 && (backStack.length || (_ref2 = this.tag(i), __indexOf.call(tags, _ref2) < 0) && ((_ref3 = this.tag(i), __indexOf.call(EXPRESSION_START, _ref3) < 0) || this.tokens[i].generated) && (_ref4 = this.tag(i), __indexOf.call(LINEBREAKS, _ref4) < 0))) { + if (_ref = this.tag(i), __indexOf.call(EXPRESSION_END, _ref) >= 0) { + backStack.push(this.tag(i)); + } + if ((_ref1 = this.tag(i), __indexOf.call(EXPRESSION_START, _ref1) >= 0) && backStack.length) { + backStack.pop(); + } + i -= 1; + } + return _ref5 = this.tag(i), __indexOf.call(tags, _ref5) >= 0; + }; + + Rewriter.prototype.addImplicitBracesAndParens = function() { + var stack; + stack = []; + return this.scanTokens(function(token, i, tokens) { + var endAllImplicitCalls, endImplicitCall, endImplicitObject, forward, inImplicit, inImplicitCall, inImplicitControl, inImplicitObject, nextTag, offset, prevTag, prevToken, s, sameLine, stackIdx, stackTag, stackTop, startIdx, startImplicitCall, startImplicitObject, startsLine, tag, _ref, _ref1, _ref2, _ref3, _ref4, _ref5; + tag = token[0]; + prevTag = (prevToken = i > 0 ? tokens[i - 1] : [])[0]; + nextTag = (i < tokens.length - 1 ? tokens[i + 1] : [])[0]; + stackTop = function() { + return stack[stack.length - 1]; + }; + startIdx = i; + forward = function(n) { + return i - startIdx + n; + }; + inImplicit = function() { + var _ref, _ref1; + return (_ref = stackTop()) != null ? (_ref1 = _ref[2]) != null ? _ref1.ours : void 0 : void 0; + }; + inImplicitCall = function() { + var _ref; + return inImplicit() && ((_ref = stackTop()) != null ? _ref[0] : void 0) === '('; + }; + inImplicitObject = function() { + var _ref; + return inImplicit() && ((_ref = stackTop()) != null ? _ref[0] : void 0) === '{'; + }; + inImplicitControl = function() { + var _ref; + return inImplicit && ((_ref = stackTop()) != null ? _ref[0] : void 0) === 'CONTROL'; + }; + startImplicitCall = function(j) { + var idx; + idx = j != null ? j : i; + stack.push([ + '(', idx, { + ours: true + } + ]); + tokens.splice(idx, 0, generate('CALL_START', '(')); + if (j == null) { + return i += 1; + } + }; + endImplicitCall = function() { + stack.pop(); + tokens.splice(i, 0, generate('CALL_END', ')')); + return i += 1; + }; + endAllImplicitCalls = function() { + while (inImplicitCall()) { + endImplicitCall(); + } + }; + startImplicitObject = function(j, startsLine) { + var idx; + if (startsLine == null) { + startsLine = true; + } + idx = j != null ? j : i; + stack.push([ + '{', idx, { + sameLine: true, + startsLine: startsLine, + ours: true + } + ]); + tokens.splice(idx, 0, generate('{', generate(new String('{')))); + if (j == null) { + return i += 1; + } + }; + endImplicitObject = function(j) { + j = j != null ? j : i; + stack.pop(); + tokens.splice(j, 0, generate('}', '}')); + return i += 1; + }; + if (inImplicitCall() && (tag === 'IF' || tag === 'TRY' || tag === 'FINALLY' || tag === 'CATCH' || tag === 'CLASS' || tag === 'SWITCH')) { + stack.push([ + 'CONTROL', i, { + ours: true + } + ]); + return forward(1); + } + if (tag === 'INDENT' && inImplicit()) { + if (prevTag !== '=>' && prevTag !== '->' && prevTag !== '[' && prevTag !== '(' && prevTag !== ',' && prevTag !== '{' && prevTag !== 'TRY' && prevTag !== 'ELSE' && prevTag !== '=') { + while (inImplicitCall()) { + endImplicitCall(); + } + } + if (inImplicitControl()) { + stack.pop(); + } + stack.push([tag, i]); + return forward(1); + } + if (__indexOf.call(EXPRESSION_START, tag) >= 0) { + stack.push([tag, i]); + return forward(1); + } + if (__indexOf.call(EXPRESSION_END, tag) >= 0) { + while (inImplicit()) { + if (inImplicitCall()) { + endImplicitCall(); + } else if (inImplicitObject()) { + endImplicitObject(); + } else { + stack.pop(); + } + } + stack.pop(); + } + if ((__indexOf.call(IMPLICIT_FUNC, tag) >= 0 && token.spaced && !token.stringEnd || tag === '?' && i > 0 && !tokens[i - 1].spaced) && (__indexOf.call(IMPLICIT_CALL, nextTag) >= 0 || __indexOf.call(IMPLICIT_UNSPACED_CALL, nextTag) >= 0 && !((_ref = tokens[i + 1]) != null ? _ref.spaced : void 0) && !((_ref1 = tokens[i + 1]) != null ? _ref1.newLine : void 0))) { + if (tag === '?') { + tag = token[0] = 'FUNC_EXIST'; + } + startImplicitCall(i + 1); + return forward(2); + } + if (__indexOf.call(IMPLICIT_FUNC, tag) >= 0 && this.matchTags(i + 1, 'INDENT', null, ':') && !this.findTagsBackwards(i, ['CLASS', 'EXTENDS', 'IF', 'CATCH', 'SWITCH', 'LEADING_WHEN', 'FOR', 'WHILE', 'UNTIL'])) { + startImplicitCall(i + 1); + stack.push(['INDENT', i + 2]); + return forward(3); + } + if (tag === ':') { + if (this.tag(i - 2) === '@') { + s = i - 2; + } else { + s = i - 1; + } + while (this.tag(s - 2) === 'HERECOMMENT') { + s -= 2; + } + startsLine = s === 0 || (_ref2 = this.tag(s - 1), __indexOf.call(LINEBREAKS, _ref2) >= 0) || tokens[s - 1].newLine; + if (stackTop()) { + _ref3 = stackTop(), stackTag = _ref3[0], stackIdx = _ref3[1]; + if ((stackTag === '{' || stackTag === 'INDENT' && this.tag(stackIdx - 1) === '{') && (startsLine || this.tag(s - 1) === ',' || this.tag(s - 1) === '{')) { + return forward(1); + } + } + startImplicitObject(s, !!startsLine); + return forward(2); + } + if (inImplicitCall() && __indexOf.call(CALL_CLOSERS, tag) >= 0) { + if (prevTag === 'OUTDENT') { + endImplicitCall(); + return forward(1); + } + if (prevToken.newLine) { + endAllImplicitCalls(); + return forward(1); + } + } + if (inImplicitObject() && __indexOf.call(LINEBREAKS, tag) >= 0) { + stackTop()[2].sameLine = false; + } + if (__indexOf.call(IMPLICIT_END, tag) >= 0) { + while (inImplicit()) { + _ref4 = stackTop(), stackTag = _ref4[0], stackIdx = _ref4[1], (_ref5 = _ref4[2], sameLine = _ref5.sameLine, startsLine = _ref5.startsLine); + if (inImplicitCall() && prevTag !== ',') { + endImplicitCall(); + } else if (inImplicitObject() && sameLine && !startsLine) { + endImplicitObject(); + } else if (inImplicitObject() && tag === 'TERMINATOR' && prevTag !== ',' && !(startsLine && this.looksObjectish(i + 1))) { + endImplicitObject(); + } else { + break; + } + } + } + if (tag === ',' && !this.looksObjectish(i + 1) && inImplicitObject() && (nextTag !== 'TERMINATOR' || !this.looksObjectish(i + 2))) { + offset = nextTag === 'OUTDENT' ? 1 : 0; + while (inImplicitObject()) { + endImplicitObject(i + offset); + } + } + return forward(1); + }); + }; + + Rewriter.prototype.addLocationDataToGeneratedTokens = function() { + return this.scanTokens(function(token, i, tokens) { + var column, line, nextLocation, prevLocation, _ref, _ref1; + if (token[2]) { + return 1; + } + if (!(token.generated || token.explicit)) { + return 1; + } + if (token[0] === '{' && (nextLocation = (_ref = tokens[i + 1]) != null ? _ref[2] : void 0)) { + line = nextLocation.first_line, column = nextLocation.first_column; + } else if (prevLocation = (_ref1 = tokens[i - 1]) != null ? _ref1[2] : void 0) { + line = prevLocation.last_line, column = prevLocation.last_column; + } else { + line = column = 0; + } + token[2] = { + first_line: line, + first_column: column, + last_line: line, + last_column: column + }; + return 1; + }); + }; + + Rewriter.prototype.normalizeLines = function() { + var action, condition, indent, outdent, starter; + starter = indent = outdent = null; + condition = function(token, i) { + var _ref, _ref1, _ref2, _ref3; + return token[1] !== ';' && (_ref = token[0], __indexOf.call(SINGLE_CLOSERS, _ref) >= 0) && !(token[0] === 'TERMINATOR' && (_ref1 = this.tag(i + 1), __indexOf.call(EXPRESSION_CLOSE, _ref1) >= 0)) && !(token[0] === 'ELSE' && starter !== 'THEN') && !(((_ref2 = token[0]) === 'CATCH' || _ref2 === 'FINALLY') && (starter === '->' || starter === '=>')) || (_ref3 = token[0], __indexOf.call(CALL_CLOSERS, _ref3) >= 0) && this.tokens[i - 1].newLine; + }; + action = function(token, i) { + return this.tokens.splice((this.tag(i - 1) === ',' ? i - 1 : i), 0, outdent); + }; + return this.scanTokens(function(token, i, tokens) { + var j, tag, _i, _ref, _ref1, _ref2; + tag = token[0]; + if (tag === 'TERMINATOR') { + if (this.tag(i + 1) === 'ELSE' && this.tag(i - 1) !== 'OUTDENT') { + tokens.splice.apply(tokens, [i, 1].concat(__slice.call(this.indentation()))); + return 1; + } + if (_ref = this.tag(i + 1), __indexOf.call(EXPRESSION_CLOSE, _ref) >= 0) { + tokens.splice(i, 1); + return 0; + } + } + if (tag === 'CATCH') { + for (j = _i = 1; _i <= 2; j = ++_i) { + if (!((_ref1 = this.tag(i + j)) === 'OUTDENT' || _ref1 === 'TERMINATOR' || _ref1 === 'FINALLY')) { + continue; + } + tokens.splice.apply(tokens, [i + j, 0].concat(__slice.call(this.indentation()))); + return 2 + j; + } + } + if (__indexOf.call(SINGLE_LINERS, tag) >= 0 && this.tag(i + 1) !== 'INDENT' && !(tag === 'ELSE' && this.tag(i + 1) === 'IF')) { + starter = tag; + _ref2 = this.indentation(true), indent = _ref2[0], outdent = _ref2[1]; + if (starter === 'THEN') { + indent.fromThen = true; + } + tokens.splice(i + 1, 0, indent); + this.detectEnd(i + 2, condition, action); + if (tag === 'THEN') { + tokens.splice(i, 1); + } + return 1; + } + return 1; + }); + }; + + Rewriter.prototype.tagPostfixConditionals = function() { + var action, condition, original; + original = null; + condition = function(token, i) { + var prevTag, tag; + tag = token[0]; + prevTag = this.tokens[i - 1][0]; + return tag === 'TERMINATOR' || (tag === 'INDENT' && __indexOf.call(SINGLE_LINERS, prevTag) < 0); + }; + action = function(token, i) { + if (token[0] !== 'INDENT' || (token.generated && !token.fromThen)) { + return original[0] = 'POST_' + original[0]; + } + }; + return this.scanTokens(function(token, i) { + if (token[0] !== 'IF') { + return 1; + } + original = token; + this.detectEnd(i + 1, condition, action); + return 1; + }); + }; + + Rewriter.prototype.indentation = function(implicit) { + var indent, outdent; + if (implicit == null) { + implicit = false; + } + indent = ['INDENT', 2]; + outdent = ['OUTDENT', 2]; + if (implicit) { + indent.generated = outdent.generated = true; + } + if (!implicit) { + indent.explicit = outdent.explicit = true; + } + return [indent, outdent]; + }; + + Rewriter.prototype.generate = generate; + + Rewriter.prototype.tag = function(i) { + var _ref; + return (_ref = this.tokens[i]) != null ? _ref[0] : void 0; + }; + + return Rewriter; + + })(); + + BALANCED_PAIRS = [['(', ')'], ['[', ']'], ['{', '}'], ['INDENT', 'OUTDENT'], ['CALL_START', 'CALL_END'], ['PARAM_START', 'PARAM_END'], ['INDEX_START', 'INDEX_END']]; + + exports.INVERSES = INVERSES = {}; + + EXPRESSION_START = []; + + EXPRESSION_END = []; + + for (_i = 0, _len = BALANCED_PAIRS.length; _i < _len; _i++) { + _ref = BALANCED_PAIRS[_i], left = _ref[0], rite = _ref[1]; + EXPRESSION_START.push(INVERSES[rite] = left); + EXPRESSION_END.push(INVERSES[left] = rite); + } + + EXPRESSION_CLOSE = ['CATCH', 'THEN', 'ELSE', 'FINALLY'].concat(EXPRESSION_END); + + IMPLICIT_FUNC = ['IDENTIFIER', 'SUPER', ')', 'CALL_END', ']', 'INDEX_END', '@', 'THIS']; + + IMPLICIT_CALL = ['IDENTIFIER', 'NUMBER', 'STRING', 'JS', 'REGEX', 'NEW', 'PARAM_START', 'CLASS', 'IF', 'TRY', 'SWITCH', 'THIS', 'BOOL', 'NULL', 'UNDEFINED', 'UNARY', 'SUPER', 'THROW', '@', '->', '=>', '[', '(', '{', '--', '++']; + + IMPLICIT_UNSPACED_CALL = ['+', '-']; + + IMPLICIT_END = ['POST_IF', 'FOR', 'WHILE', 'UNTIL', 'WHEN', 'BY', 'LOOP', 'TERMINATOR']; + + SINGLE_LINERS = ['ELSE', '->', '=>', 'TRY', 'FINALLY', 'THEN']; + + SINGLE_CLOSERS = ['TERMINATOR', 'CATCH', 'FINALLY', 'ELSE', 'OUTDENT', 'LEADING_WHEN']; + + LINEBREAKS = ['TERMINATOR', 'INDENT', 'OUTDENT']; + + CALL_CLOSERS = ['.', '?.', '::', '?::']; + + +}); + +ace.define("ace/mode/coffee/helpers",["require","exports","module"], function(require, exports, module) { + + var buildLocationData, extend, flatten, last, repeat, syntaxErrorToString, _ref; + + exports.starts = function(string, literal, start) { + return literal === string.substr(start, literal.length); + }; + + exports.ends = function(string, literal, back) { + var len; + len = literal.length; + return literal === string.substr(string.length - len - (back || 0), len); + }; + + exports.repeat = repeat = function(str, n) { + var res; + res = ''; + while (n > 0) { + if (n & 1) { + res += str; + } + n >>>= 1; + str += str; + } + return res; + }; + + exports.compact = function(array) { + var item, _i, _len, _results; + _results = []; + for (_i = 0, _len = array.length; _i < _len; _i++) { + item = array[_i]; + if (item) { + _results.push(item); + } + } + return _results; + }; + + exports.count = function(string, substr) { + var num, pos; + num = pos = 0; + if (!substr.length) { + return 1 / 0; + } + while (pos = 1 + string.indexOf(substr, pos)) { + num++; + } + return num; + }; + + exports.merge = function(options, overrides) { + return extend(extend({}, options), overrides); + }; + + extend = exports.extend = function(object, properties) { + var key, val; + for (key in properties) { + val = properties[key]; + object[key] = val; + } + return object; + }; + + exports.flatten = flatten = function(array) { + var element, flattened, _i, _len; + flattened = []; + for (_i = 0, _len = array.length; _i < _len; _i++) { + element = array[_i]; + if (element instanceof Array) { + flattened = flattened.concat(flatten(element)); + } else { + flattened.push(element); + } + } + return flattened; + }; + + exports.del = function(obj, key) { + var val; + val = obj[key]; + delete obj[key]; + return val; + }; + + exports.last = last = function(array, back) { + return array[array.length - (back || 0) - 1]; + }; + + exports.some = (_ref = Array.prototype.some) != null ? _ref : function(fn) { + var e, _i, _len; + for (_i = 0, _len = this.length; _i < _len; _i++) { + e = this[_i]; + if (fn(e)) { + return true; + } + } + return false; + }; + + exports.invertLiterate = function(code) { + var line, lines, maybe_code; + maybe_code = true; + lines = (function() { + var _i, _len, _ref1, _results; + _ref1 = code.split('\n'); + _results = []; + for (_i = 0, _len = _ref1.length; _i < _len; _i++) { + line = _ref1[_i]; + if (maybe_code && /^([ ]{4}|[ ]{0,3}\t)/.test(line)) { + _results.push(line); + } else if (maybe_code = /^\s*$/.test(line)) { + _results.push(line); + } else { + _results.push('# ' + line); + } + } + return _results; + })(); + return lines.join('\n'); + }; + + buildLocationData = function(first, last) { + if (!last) { + return first; + } else { + return { + first_line: first.first_line, + first_column: first.first_column, + last_line: last.last_line, + last_column: last.last_column + }; + } + }; + + exports.addLocationDataFn = function(first, last) { + return function(obj) { + if (((typeof obj) === 'object') && (!!obj['updateLocationDataIfMissing'])) { + obj.updateLocationDataIfMissing(buildLocationData(first, last)); + } + return obj; + }; + }; + + exports.locationDataToString = function(obj) { + var locationData; + if (("2" in obj) && ("first_line" in obj[2])) { + locationData = obj[2]; + } else if ("first_line" in obj) { + locationData = obj; + } + if (locationData) { + return ("" + (locationData.first_line + 1) + ":" + (locationData.first_column + 1) + "-") + ("" + (locationData.last_line + 1) + ":" + (locationData.last_column + 1)); + } else { + return "No location data"; + } + }; + + exports.baseFileName = function(file, stripExt, useWinPathSep) { + var parts, pathSep; + if (stripExt == null) { + stripExt = false; + } + if (useWinPathSep == null) { + useWinPathSep = false; + } + pathSep = useWinPathSep ? /\\|\// : /\//; + parts = file.split(pathSep); + file = parts[parts.length - 1]; + if (!(stripExt && file.indexOf('.') >= 0)) { + return file; + } + parts = file.split('.'); + parts.pop(); + if (parts[parts.length - 1] === 'coffee' && parts.length > 1) { + parts.pop(); + } + return parts.join('.'); + }; + + exports.isCoffee = function(file) { + return /\.((lit)?coffee|coffee\.md)$/.test(file); + }; + + exports.isLiterate = function(file) { + return /\.(litcoffee|coffee\.md)$/.test(file); + }; + + exports.throwSyntaxError = function(message, location) { + var error; + if (location.last_line == null) { + location.last_line = location.first_line; + } + if (location.last_column == null) { + location.last_column = location.first_column; + } + error = new SyntaxError(message); + error.location = location; + error.toString = syntaxErrorToString; + error.stack = error.toString(); + throw error; + }; + + exports.updateSyntaxError = function(error, code, filename) { + if (error.toString === syntaxErrorToString) { + error.code || (error.code = code); + error.filename || (error.filename = filename); + error.stack = error.toString(); + } + return error; + }; + + syntaxErrorToString = function() { + var codeLine, colorize, colorsEnabled, end, filename, first_column, first_line, last_column, last_line, marker, start, _ref1, _ref2; + if (!(this.code && this.location)) { + return Error.prototype.toString.call(this); + } + _ref1 = this.location, first_line = _ref1.first_line, first_column = _ref1.first_column, last_line = _ref1.last_line, last_column = _ref1.last_column; + if (last_line == null) { + last_line = first_line; + } + if (last_column == null) { + last_column = first_column; + } + filename = this.filename || '[stdin]'; + codeLine = this.code.split('\n')[first_line]; + start = first_column; + end = first_line === last_line ? last_column + 1 : codeLine.length; + marker = repeat(' ', start) + repeat('^', end - start); + if (typeof process !== "undefined" && process !== null) { + colorsEnabled = process.stdout.isTTY && !process.env.NODE_DISABLE_COLORS; + } + if ((_ref2 = this.colorful) != null ? _ref2 : colorsEnabled) { + colorize = function(str) { + return "\x1B[1;31m" + str + "\x1B[0m"; + }; + codeLine = codeLine.slice(0, start) + colorize(codeLine.slice(start, end)) + codeLine.slice(end); + marker = colorize(marker); + } + return "" + filename + ":" + (first_line + 1) + ":" + (first_column + 1) + ": error: " + this.message + "\n" + codeLine + "\n" + marker; + }; + + +}); + +ace.define("ace/mode/coffee/lexer",["require","exports","module","ace/mode/coffee/rewriter","ace/mode/coffee/helpers"], function(require, exports, module) { + + var BOM, BOOL, CALLABLE, CODE, COFFEE_ALIASES, COFFEE_ALIAS_MAP, COFFEE_KEYWORDS, COMMENT, COMPARE, COMPOUND_ASSIGN, HEREDOC, HEREDOC_ILLEGAL, HEREDOC_INDENT, HEREGEX, HEREGEX_OMIT, IDENTIFIER, INDEXABLE, INVERSES, JSTOKEN, JS_FORBIDDEN, JS_KEYWORDS, LINE_BREAK, LINE_CONTINUER, LOGIC, Lexer, MATH, MULTILINER, MULTI_DENT, NOT_REGEX, NOT_SPACED_REGEX, NUMBER, OPERATOR, REGEX, RELATION, RESERVED, Rewriter, SHIFT, SIMPLESTR, STRICT_PROSCRIBED, TRAILING_SPACES, UNARY, WHITESPACE, compact, count, invertLiterate, key, last, locationDataToString, repeat, starts, throwSyntaxError, _ref, _ref1, + __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; + + _ref = require('./rewriter'), Rewriter = _ref.Rewriter, INVERSES = _ref.INVERSES; + + _ref1 = require('./helpers'), count = _ref1.count, starts = _ref1.starts, compact = _ref1.compact, last = _ref1.last, repeat = _ref1.repeat, invertLiterate = _ref1.invertLiterate, locationDataToString = _ref1.locationDataToString, throwSyntaxError = _ref1.throwSyntaxError; + + exports.Lexer = Lexer = (function() { + function Lexer() {} + + Lexer.prototype.tokenize = function(code, opts) { + var consumed, i, tag, _ref2; + if (opts == null) { + opts = {}; + } + this.literate = opts.literate; + this.indent = 0; + this.baseIndent = 0; + this.indebt = 0; + this.outdebt = 0; + this.indents = []; + this.ends = []; + this.tokens = []; + this.chunkLine = opts.line || 0; + this.chunkColumn = opts.column || 0; + code = this.clean(code); + i = 0; + while (this.chunk = code.slice(i)) { + consumed = this.identifierToken() || this.commentToken() || this.whitespaceToken() || this.lineToken() || this.heredocToken() || this.stringToken() || this.numberToken() || this.regexToken() || this.jsToken() || this.literalToken(); + _ref2 = this.getLineAndColumnFromChunk(consumed), this.chunkLine = _ref2[0], this.chunkColumn = _ref2[1]; + i += consumed; + } + this.closeIndentation(); + if (tag = this.ends.pop()) { + this.error("missing " + tag); + } + if (opts.rewrite === false) { + return this.tokens; + } + return (new Rewriter).rewrite(this.tokens); + }; + + Lexer.prototype.clean = function(code) { + if (code.charCodeAt(0) === BOM) { + code = code.slice(1); + } + code = code.replace(/\r/g, '').replace(TRAILING_SPACES, ''); + if (WHITESPACE.test(code)) { + code = "\n" + code; + this.chunkLine--; + } + if (this.literate) { + code = invertLiterate(code); + } + return code; + }; + + Lexer.prototype.identifierToken = function() { + var colon, colonOffset, forcedIdentifier, id, idLength, input, match, poppedToken, prev, tag, tagToken, _ref2, _ref3, _ref4; + if (!(match = IDENTIFIER.exec(this.chunk))) { + return 0; + } + input = match[0], id = match[1], colon = match[2]; + idLength = id.length; + poppedToken = void 0; + if (id === 'own' && this.tag() === 'FOR') { + this.token('OWN', id); + return id.length; + } + forcedIdentifier = colon || (prev = last(this.tokens)) && (((_ref2 = prev[0]) === '.' || _ref2 === '?.' || _ref2 === '::' || _ref2 === '?::') || !prev.spaced && prev[0] === '@'); + tag = 'IDENTIFIER'; + if (!forcedIdentifier && (__indexOf.call(JS_KEYWORDS, id) >= 0 || __indexOf.call(COFFEE_KEYWORDS, id) >= 0)) { + tag = id.toUpperCase(); + if (tag === 'WHEN' && (_ref3 = this.tag(), __indexOf.call(LINE_BREAK, _ref3) >= 0)) { + tag = 'LEADING_WHEN'; + } else if (tag === 'FOR') { + this.seenFor = true; + } else if (tag === 'UNLESS') { + tag = 'IF'; + } else if (__indexOf.call(UNARY, tag) >= 0) { + tag = 'UNARY'; + } else if (__indexOf.call(RELATION, tag) >= 0) { + if (tag !== 'INSTANCEOF' && this.seenFor) { + tag = 'FOR' + tag; + this.seenFor = false; + } else { + tag = 'RELATION'; + if (this.value() === '!') { + poppedToken = this.tokens.pop(); + id = '!' + id; + } + } + } + } + if (__indexOf.call(JS_FORBIDDEN, id) >= 0) { + if (forcedIdentifier) { + tag = 'IDENTIFIER'; + id = new String(id); + id.reserved = true; + } else if (__indexOf.call(RESERVED, id) >= 0) { + this.error("reserved word \"" + id + "\""); + } + } + if (!forcedIdentifier) { + if (__indexOf.call(COFFEE_ALIASES, id) >= 0) { + id = COFFEE_ALIAS_MAP[id]; + } + tag = (function() { + switch (id) { + case '!': + return 'UNARY'; + case '==': + case '!=': + return 'COMPARE'; + case '&&': + case '||': + return 'LOGIC'; + case 'true': + case 'false': + return 'BOOL'; + case 'break': + case 'continue': + return 'STATEMENT'; + default: + return tag; + } + })(); + } + tagToken = this.token(tag, id, 0, idLength); + if (poppedToken) { + _ref4 = [poppedToken[2].first_line, poppedToken[2].first_column], tagToken[2].first_line = _ref4[0], tagToken[2].first_column = _ref4[1]; + } + if (colon) { + colonOffset = input.lastIndexOf(':'); + this.token(':', ':', colonOffset, colon.length); + } + return input.length; + }; + + Lexer.prototype.numberToken = function() { + var binaryLiteral, lexedLength, match, number, octalLiteral; + if (!(match = NUMBER.exec(this.chunk))) { + return 0; + } + number = match[0]; + if (/^0[BOX]/.test(number)) { + this.error("radix prefix '" + number + "' must be lowercase"); + } else if (/E/.test(number) && !/^0x/.test(number)) { + this.error("exponential notation '" + number + "' must be indicated with a lowercase 'e'"); + } else if (/^0\d*[89]/.test(number)) { + this.error("decimal literal '" + number + "' must not be prefixed with '0'"); + } else if (/^0\d+/.test(number)) { + this.error("octal literal '" + number + "' must be prefixed with '0o'"); + } + lexedLength = number.length; + if (octalLiteral = /^0o([0-7]+)/.exec(number)) { + number = '0x' + parseInt(octalLiteral[1], 8).toString(16); + } + if (binaryLiteral = /^0b([01]+)/.exec(number)) { + number = '0x' + parseInt(binaryLiteral[1], 2).toString(16); + } + this.token('NUMBER', number, 0, lexedLength); + return lexedLength; + }; + + Lexer.prototype.stringToken = function() { + var octalEsc, quote, string, trimmed; + switch (quote = this.chunk.charAt(0)) { + case "'": + string = SIMPLESTR.exec(this.chunk)[0]; + break; + case '"': + string = this.balancedString(this.chunk, '"'); + } + if (!string) { + return 0; + } + trimmed = this.removeNewlines(string.slice(1, -1)); + if (quote === '"' && 0 < string.indexOf('#{', 1)) { + this.interpolateString(trimmed, { + strOffset: 1, + lexedLength: string.length + }); + } else { + this.token('STRING', quote + this.escapeLines(trimmed) + quote, 0, string.length); + } + if (octalEsc = /^(?:\\.|[^\\])*\\(?:0[0-7]|[1-7])/.test(string)) { + this.error("octal escape sequences " + string + " are not allowed"); + } + return string.length; + }; + + Lexer.prototype.heredocToken = function() { + var doc, heredoc, match, quote; + if (!(match = HEREDOC.exec(this.chunk))) { + return 0; + } + heredoc = match[0]; + quote = heredoc.charAt(0); + doc = this.sanitizeHeredoc(match[2], { + quote: quote, + indent: null + }); + if (quote === '"' && 0 <= doc.indexOf('#{')) { + this.interpolateString(doc, { + heredoc: true, + strOffset: 3, + lexedLength: heredoc.length + }); + } else { + this.token('STRING', this.makeString(doc, quote, true), 0, heredoc.length); + } + return heredoc.length; + }; + + Lexer.prototype.commentToken = function() { + var comment, here, match; + if (!(match = this.chunk.match(COMMENT))) { + return 0; + } + comment = match[0], here = match[1]; + if (here) { + this.token('HERECOMMENT', this.sanitizeHeredoc(here, { + herecomment: true, + indent: repeat(' ', this.indent) + }), 0, comment.length); + } + return comment.length; + }; + + Lexer.prototype.jsToken = function() { + var match, script; + if (!(this.chunk.charAt(0) === '`' && (match = JSTOKEN.exec(this.chunk)))) { + return 0; + } + this.token('JS', (script = match[0]).slice(1, -1), 0, script.length); + return script.length; + }; + + Lexer.prototype.regexToken = function() { + var flags, length, match, prev, regex, _ref2, _ref3; + if (this.chunk.charAt(0) !== '/') { + return 0; + } + if (match = HEREGEX.exec(this.chunk)) { + length = this.heregexToken(match); + return length; + } + prev = last(this.tokens); + if (prev && (_ref2 = prev[0], __indexOf.call((prev.spaced ? NOT_REGEX : NOT_SPACED_REGEX), _ref2) >= 0)) { + return 0; + } + if (!(match = REGEX.exec(this.chunk))) { + return 0; + } + _ref3 = match, match = _ref3[0], regex = _ref3[1], flags = _ref3[2]; + if (regex.slice(0, 2) === '/*') { + this.error('regular expressions cannot begin with `*`'); + } + if (regex === '//') { + regex = '/(?:)/'; + } + this.token('REGEX', "" + regex + flags, 0, match.length); + return match.length; + }; + + Lexer.prototype.heregexToken = function(match) { + var body, flags, flagsOffset, heregex, plusToken, prev, re, tag, token, tokens, value, _i, _len, _ref2, _ref3, _ref4; + heregex = match[0], body = match[1], flags = match[2]; + if (0 > body.indexOf('#{')) { + re = this.escapeLines(body.replace(HEREGEX_OMIT, '$1$2').replace(/\//g, '\\/'), true); + if (re.match(/^\*/)) { + this.error('regular expressions cannot begin with `*`'); + } + this.token('REGEX', "/" + (re || '(?:)') + "/" + flags, 0, heregex.length); + return heregex.length; + } + this.token('IDENTIFIER', 'RegExp', 0, 0); + this.token('CALL_START', '(', 0, 0); + tokens = []; + _ref2 = this.interpolateString(body, { + regex: true + }); + for (_i = 0, _len = _ref2.length; _i < _len; _i++) { + token = _ref2[_i]; + tag = token[0], value = token[1]; + if (tag === 'TOKENS') { + tokens.push.apply(tokens, value); + } else if (tag === 'NEOSTRING') { + if (!(value = value.replace(HEREGEX_OMIT, '$1$2'))) { + continue; + } + value = value.replace(/\\/g, '\\\\'); + token[0] = 'STRING'; + token[1] = this.makeString(value, '"', true); + tokens.push(token); + } else { + this.error("Unexpected " + tag); + } + prev = last(this.tokens); + plusToken = ['+', '+']; + plusToken[2] = prev[2]; + tokens.push(plusToken); + } + tokens.pop(); + if (((_ref3 = tokens[0]) != null ? _ref3[0] : void 0) !== 'STRING') { + this.token('STRING', '""', 0, 0); + this.token('+', '+', 0, 0); + } + (_ref4 = this.tokens).push.apply(_ref4, tokens); + if (flags) { + flagsOffset = heregex.lastIndexOf(flags); + this.token(',', ',', flagsOffset, 0); + this.token('STRING', '"' + flags + '"', flagsOffset, flags.length); + } + this.token(')', ')', heregex.length - 1, 0); + return heregex.length; + }; + + Lexer.prototype.lineToken = function() { + var diff, indent, match, noNewlines, size; + if (!(match = MULTI_DENT.exec(this.chunk))) { + return 0; + } + indent = match[0]; + this.seenFor = false; + size = indent.length - 1 - indent.lastIndexOf('\n'); + noNewlines = this.unfinished(); + if (size - this.indebt === this.indent) { + if (noNewlines) { + this.suppressNewlines(); + } else { + this.newlineToken(0); + } + return indent.length; + } + if (size > this.indent) { + if (noNewlines) { + this.indebt = size - this.indent; + this.suppressNewlines(); + return indent.length; + } + if (!this.tokens.length) { + this.baseIndent = this.indent = size; + return indent.length; + } + diff = size - this.indent + this.outdebt; + this.token('INDENT', diff, indent.length - size, size); + this.indents.push(diff); + this.ends.push('OUTDENT'); + this.outdebt = this.indebt = 0; + } else if (size < this.baseIndent) { + this.error('missing indentation', indent.length); + } else { + this.indebt = 0; + this.outdentToken(this.indent - size, noNewlines, indent.length); + } + this.indent = size; + return indent.length; + }; + + Lexer.prototype.outdentToken = function(moveOut, noNewlines, outdentLength) { + var dent, len; + while (moveOut > 0) { + len = this.indents.length - 1; + if (this.indents[len] === void 0) { + moveOut = 0; + } else if (this.indents[len] === this.outdebt) { + moveOut -= this.outdebt; + this.outdebt = 0; + } else if (this.indents[len] < this.outdebt) { + this.outdebt -= this.indents[len]; + moveOut -= this.indents[len]; + } else { + dent = this.indents.pop() + this.outdebt; + moveOut -= dent; + this.outdebt = 0; + this.pair('OUTDENT'); + this.token('OUTDENT', dent, 0, outdentLength); + } + } + if (dent) { + this.outdebt -= moveOut; + } + while (this.value() === ';') { + this.tokens.pop(); + } + if (!(this.tag() === 'TERMINATOR' || noNewlines)) { + this.token('TERMINATOR', '\n', outdentLength, 0); + } + return this; + }; + + Lexer.prototype.whitespaceToken = function() { + var match, nline, prev; + if (!((match = WHITESPACE.exec(this.chunk)) || (nline = this.chunk.charAt(0) === '\n'))) { + return 0; + } + prev = last(this.tokens); + if (prev) { + prev[match ? 'spaced' : 'newLine'] = true; + } + if (match) { + return match[0].length; + } else { + return 0; + } + }; + + Lexer.prototype.newlineToken = function(offset) { + while (this.value() === ';') { + this.tokens.pop(); + } + if (this.tag() !== 'TERMINATOR') { + this.token('TERMINATOR', '\n', offset, 0); + } + return this; + }; + + Lexer.prototype.suppressNewlines = function() { + if (this.value() === '\\') { + this.tokens.pop(); + } + return this; + }; + + Lexer.prototype.literalToken = function() { + var match, prev, tag, value, _ref2, _ref3, _ref4, _ref5; + if (match = OPERATOR.exec(this.chunk)) { + value = match[0]; + if (CODE.test(value)) { + this.tagParameters(); + } + } else { + value = this.chunk.charAt(0); + } + tag = value; + prev = last(this.tokens); + if (value === '=' && prev) { + if (!prev[1].reserved && (_ref2 = prev[1], __indexOf.call(JS_FORBIDDEN, _ref2) >= 0)) { + this.error("reserved word \"" + (this.value()) + "\" can't be assigned"); + } + if ((_ref3 = prev[1]) === '||' || _ref3 === '&&') { + prev[0] = 'COMPOUND_ASSIGN'; + prev[1] += '='; + return value.length; + } + } + if (value === ';') { + this.seenFor = false; + tag = 'TERMINATOR'; + } else if (__indexOf.call(MATH, value) >= 0) { + tag = 'MATH'; + } else if (__indexOf.call(COMPARE, value) >= 0) { + tag = 'COMPARE'; + } else if (__indexOf.call(COMPOUND_ASSIGN, value) >= 0) { + tag = 'COMPOUND_ASSIGN'; + } else if (__indexOf.call(UNARY, value) >= 0) { + tag = 'UNARY'; + } else if (__indexOf.call(SHIFT, value) >= 0) { + tag = 'SHIFT'; + } else if (__indexOf.call(LOGIC, value) >= 0 || value === '?' && (prev != null ? prev.spaced : void 0)) { + tag = 'LOGIC'; + } else if (prev && !prev.spaced) { + if (value === '(' && (_ref4 = prev[0], __indexOf.call(CALLABLE, _ref4) >= 0)) { + if (prev[0] === '?') { + prev[0] = 'FUNC_EXIST'; + } + tag = 'CALL_START'; + } else if (value === '[' && (_ref5 = prev[0], __indexOf.call(INDEXABLE, _ref5) >= 0)) { + tag = 'INDEX_START'; + switch (prev[0]) { + case '?': + prev[0] = 'INDEX_SOAK'; + } + } + } + switch (value) { + case '(': + case '{': + case '[': + this.ends.push(INVERSES[value]); + break; + case ')': + case '}': + case ']': + this.pair(value); + } + this.token(tag, value); + return value.length; + }; + + Lexer.prototype.sanitizeHeredoc = function(doc, options) { + var attempt, herecomment, indent, match, _ref2; + indent = options.indent, herecomment = options.herecomment; + if (herecomment) { + if (HEREDOC_ILLEGAL.test(doc)) { + this.error("block comment cannot contain \"*/\", starting"); + } + if (doc.indexOf('\n') < 0) { + return doc; + } + } else { + while (match = HEREDOC_INDENT.exec(doc)) { + attempt = match[1]; + if (indent === null || (0 < (_ref2 = attempt.length) && _ref2 < indent.length)) { + indent = attempt; + } + } + } + if (indent) { + doc = doc.replace(RegExp("\\n" + indent, "g"), '\n'); + } + if (!herecomment) { + doc = doc.replace(/^\n/, ''); + } + return doc; + }; + + Lexer.prototype.tagParameters = function() { + var i, stack, tok, tokens; + if (this.tag() !== ')') { + return this; + } + stack = []; + tokens = this.tokens; + i = tokens.length; + tokens[--i][0] = 'PARAM_END'; + while (tok = tokens[--i]) { + switch (tok[0]) { + case ')': + stack.push(tok); + break; + case '(': + case 'CALL_START': + if (stack.length) { + stack.pop(); + } else if (tok[0] === '(') { + tok[0] = 'PARAM_START'; + return this; + } else { + return this; + } + } + } + return this; + }; + + Lexer.prototype.closeIndentation = function() { + return this.outdentToken(this.indent); + }; + + Lexer.prototype.balancedString = function(str, end) { + var continueCount, i, letter, match, prev, stack, _i, _ref2; + continueCount = 0; + stack = [end]; + for (i = _i = 1, _ref2 = str.length; 1 <= _ref2 ? _i < _ref2 : _i > _ref2; i = 1 <= _ref2 ? ++_i : --_i) { + if (continueCount) { + --continueCount; + continue; + } + switch (letter = str.charAt(i)) { + case '\\': + ++continueCount; + continue; + case end: + stack.pop(); + if (!stack.length) { + return str.slice(0, +i + 1 || 9e9); + } + end = stack[stack.length - 1]; + continue; + } + if (end === '}' && (letter === '"' || letter === "'")) { + stack.push(end = letter); + } else if (end === '}' && letter === '/' && (match = HEREGEX.exec(str.slice(i)) || REGEX.exec(str.slice(i)))) { + continueCount += match[0].length - 1; + } else if (end === '}' && letter === '{') { + stack.push(end = '}'); + } else if (end === '"' && prev === '#' && letter === '{') { + stack.push(end = '}'); + } + prev = letter; + } + return this.error("missing " + (stack.pop()) + ", starting"); + }; + + Lexer.prototype.interpolateString = function(str, options) { + var column, expr, heredoc, i, inner, interpolated, len, letter, lexedLength, line, locationToken, nested, offsetInChunk, pi, plusToken, popped, regex, rparen, strOffset, tag, token, tokens, value, _i, _len, _ref2, _ref3, _ref4; + if (options == null) { + options = {}; + } + heredoc = options.heredoc, regex = options.regex, offsetInChunk = options.offsetInChunk, strOffset = options.strOffset, lexedLength = options.lexedLength; + offsetInChunk = offsetInChunk || 0; + strOffset = strOffset || 0; + lexedLength = lexedLength || str.length; + tokens = []; + pi = 0; + i = -1; + while (letter = str.charAt(i += 1)) { + if (letter === '\\') { + i += 1; + continue; + } + if (!(letter === '#' && str.charAt(i + 1) === '{' && (expr = this.balancedString(str.slice(i + 1), '}')))) { + continue; + } + if (pi < i) { + tokens.push(this.makeToken('NEOSTRING', str.slice(pi, i), strOffset + pi)); + } + inner = expr.slice(1, -1); + if (inner.length) { + _ref2 = this.getLineAndColumnFromChunk(strOffset + i + 1), line = _ref2[0], column = _ref2[1]; + nested = new Lexer().tokenize(inner, { + line: line, + column: column, + rewrite: false + }); + popped = nested.pop(); + if (((_ref3 = nested[0]) != null ? _ref3[0] : void 0) === 'TERMINATOR') { + popped = nested.shift(); + } + if (len = nested.length) { + if (len > 1) { + nested.unshift(this.makeToken('(', '(', strOffset + i + 1, 0)); + nested.push(this.makeToken(')', ')', strOffset + i + 1 + inner.length, 0)); + } + tokens.push(['TOKENS', nested]); + } + } + i += expr.length; + pi = i + 1; + } + if ((i > pi && pi < str.length)) { + tokens.push(this.makeToken('NEOSTRING', str.slice(pi), strOffset + pi)); + } + if (regex) { + return tokens; + } + if (!tokens.length) { + return this.token('STRING', '""', offsetInChunk, lexedLength); + } + if (tokens[0][0] !== 'NEOSTRING') { + tokens.unshift(this.makeToken('NEOSTRING', '', offsetInChunk)); + } + if (interpolated = tokens.length > 1) { + this.token('(', '(', offsetInChunk, 0); + } + for (i = _i = 0, _len = tokens.length; _i < _len; i = ++_i) { + token = tokens[i]; + tag = token[0], value = token[1]; + if (i) { + if (i) { + plusToken = this.token('+', '+'); + } + locationToken = tag === 'TOKENS' ? value[0] : token; + plusToken[2] = { + first_line: locationToken[2].first_line, + first_column: locationToken[2].first_column, + last_line: locationToken[2].first_line, + last_column: locationToken[2].first_column + }; + } + if (tag === 'TOKENS') { + (_ref4 = this.tokens).push.apply(_ref4, value); + } else if (tag === 'NEOSTRING') { + token[0] = 'STRING'; + token[1] = this.makeString(value, '"', heredoc); + this.tokens.push(token); + } else { + this.error("Unexpected " + tag); + } + } + if (interpolated) { + rparen = this.makeToken(')', ')', offsetInChunk + lexedLength, 0); + rparen.stringEnd = true; + this.tokens.push(rparen); + } + return tokens; + }; + + Lexer.prototype.pair = function(tag) { + var size, wanted; + if (tag !== (wanted = last(this.ends))) { + if ('OUTDENT' !== wanted) { + this.error("unmatched " + tag); + } + this.indent -= size = last(this.indents); + this.outdentToken(size, true); + return this.pair(tag); + } + return this.ends.pop(); + }; + + Lexer.prototype.getLineAndColumnFromChunk = function(offset) { + var column, lineCount, lines, string; + if (offset === 0) { + return [this.chunkLine, this.chunkColumn]; + } + if (offset >= this.chunk.length) { + string = this.chunk; + } else { + string = this.chunk.slice(0, +(offset - 1) + 1 || 9e9); + } + lineCount = count(string, '\n'); + column = this.chunkColumn; + if (lineCount > 0) { + lines = string.split('\n'); + column = last(lines).length; + } else { + column += string.length; + } + return [this.chunkLine + lineCount, column]; + }; + + Lexer.prototype.makeToken = function(tag, value, offsetInChunk, length) { + var lastCharacter, locationData, token, _ref2, _ref3; + if (offsetInChunk == null) { + offsetInChunk = 0; + } + if (length == null) { + length = value.length; + } + locationData = {}; + _ref2 = this.getLineAndColumnFromChunk(offsetInChunk), locationData.first_line = _ref2[0], locationData.first_column = _ref2[1]; + lastCharacter = Math.max(0, length - 1); + _ref3 = this.getLineAndColumnFromChunk(offsetInChunk + lastCharacter), locationData.last_line = _ref3[0], locationData.last_column = _ref3[1]; + token = [tag, value, locationData]; + return token; + }; + + Lexer.prototype.token = function(tag, value, offsetInChunk, length) { + var token; + token = this.makeToken(tag, value, offsetInChunk, length); + this.tokens.push(token); + return token; + }; + + Lexer.prototype.tag = function(index, tag) { + var tok; + return (tok = last(this.tokens, index)) && (tag ? tok[0] = tag : tok[0]); + }; + + Lexer.prototype.value = function(index, val) { + var tok; + return (tok = last(this.tokens, index)) && (val ? tok[1] = val : tok[1]); + }; + + Lexer.prototype.unfinished = function() { + var _ref2; + return LINE_CONTINUER.test(this.chunk) || ((_ref2 = this.tag()) === '\\' || _ref2 === '.' || _ref2 === '?.' || _ref2 === '?::' || _ref2 === 'UNARY' || _ref2 === 'MATH' || _ref2 === '+' || _ref2 === '-' || _ref2 === 'SHIFT' || _ref2 === 'RELATION' || _ref2 === 'COMPARE' || _ref2 === 'LOGIC' || _ref2 === 'THROW' || _ref2 === 'EXTENDS'); + }; + + Lexer.prototype.removeNewlines = function(str) { + return str.replace(/^\s*\n\s*/, '').replace(/([^\\]|\\\\)\s*\n\s*$/, '$1'); + }; + + Lexer.prototype.escapeLines = function(str, heredoc) { + str = str.replace(/\\[^\S\n]*(\n|\\)\s*/g, function(escaped, character) { + if (character === '\n') { + return ''; + } else { + return escaped; + } + }); + if (heredoc) { + return str.replace(MULTILINER, '\\n'); + } else { + return str.replace(/\s*\n\s*/g, ' '); + } + }; + + Lexer.prototype.makeString = function(body, quote, heredoc) { + if (!body) { + return quote + quote; + } + body = body.replace(RegExp("\\\\(" + quote + "|\\\\)", "g"), function(match, contents) { + if (contents === quote) { + return contents; + } else { + return match; + } + }); + body = body.replace(RegExp("" + quote, "g"), '\\$&'); + return quote + this.escapeLines(body, heredoc) + quote; + }; + + Lexer.prototype.error = function(message, offset) { + var first_column, first_line, _ref2; + if (offset == null) { + offset = 0; + } + _ref2 = this.getLineAndColumnFromChunk(offset), first_line = _ref2[0], first_column = _ref2[1]; + return throwSyntaxError(message, { + first_line: first_line, + first_column: first_column + }); + }; + + return Lexer; + + })(); + + JS_KEYWORDS = ['true', 'false', 'null', 'this', 'new', 'delete', 'typeof', 'in', 'instanceof', 'return', 'throw', 'break', 'continue', 'debugger', 'if', 'else', 'switch', 'for', 'while', 'do', 'try', 'catch', 'finally', 'class', 'extends', 'super']; + + COFFEE_KEYWORDS = ['undefined', 'then', 'unless', 'until', 'loop', 'of', 'by', 'when']; + + COFFEE_ALIAS_MAP = { + and: '&&', + or: '||', + is: '==', + isnt: '!=', + not: '!', + yes: 'true', + no: 'false', + on: 'true', + off: 'false' + }; + + COFFEE_ALIASES = (function() { + var _results; + _results = []; + for (key in COFFEE_ALIAS_MAP) { + _results.push(key); + } + return _results; + })(); + + COFFEE_KEYWORDS = COFFEE_KEYWORDS.concat(COFFEE_ALIASES); + + RESERVED = ['case', 'default', 'function', 'var', 'void', 'with', 'const', 'let', 'enum', 'export', 'import', 'native', '__hasProp', '__extends', '__slice', '__bind', '__indexOf', 'implements', 'interface', 'package', 'private', 'protected', 'public', 'static', 'yield']; + + STRICT_PROSCRIBED = ['arguments', 'eval']; + + JS_FORBIDDEN = JS_KEYWORDS.concat(RESERVED).concat(STRICT_PROSCRIBED); + + exports.RESERVED = RESERVED.concat(JS_KEYWORDS).concat(COFFEE_KEYWORDS).concat(STRICT_PROSCRIBED); + + exports.STRICT_PROSCRIBED = STRICT_PROSCRIBED; + + BOM = 65279; + + IDENTIFIER = /^([$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)([^\n\S]*:(?!:))?/; + + NUMBER = /^0b[01]+|^0o[0-7]+|^0x[\da-f]+|^\d*\.?\d+(?:e[+-]?\d+)?/i; + + HEREDOC = /^("""|''')((?:\\[\s\S]|[^\\])*?)(?:\n[^\n\S]*)?\1/; + + OPERATOR = /^(?:[-=]>|[-+*\/%<>&|^!?=]=|>>>=?|([-+:])\1|([&|<>])\2=?|\?(\.|::)|\.{2,3})/; + + WHITESPACE = /^[^\n\S]+/; + + COMMENT = /^###([^#][\s\S]*?)(?:###[^\n\S]*|###$)|^(?:\s*#(?!##[^#]).*)+/; + + CODE = /^[-=]>/; + + MULTI_DENT = /^(?:\n[^\n\S]*)+/; + + SIMPLESTR = /^'[^\\']*(?:\\[\s\S][^\\']*)*'/; + + JSTOKEN = /^`[^\\`]*(?:\\.[^\\`]*)*`/; + + REGEX = /^(\/(?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/)([imgy]{0,4})(?!\w)/; + + HEREGEX = /^\/{3}((?:\\?[\s\S])+?)\/{3}([imgy]{0,4})(?!\w)/; + + HEREGEX_OMIT = /((?:\\\\)+)|\\(\s|\/)|\s+(?:#.*)?/g; + + MULTILINER = /\n/g; + + HEREDOC_INDENT = /\n+([^\n\S]*)/g; + + HEREDOC_ILLEGAL = /\*\//; + + LINE_CONTINUER = /^\s*(?:,|\??\.(?![.\d])|::)/; + + TRAILING_SPACES = /\s+$/; + + COMPOUND_ASSIGN = ['-=', '+=', '/=', '*=', '%=', '||=', '&&=', '?=', '<<=', '>>=', '>>>=', '&=', '^=', '|=']; + + UNARY = ['!', '~', 'NEW', 'TYPEOF', 'DELETE', 'DO']; + + LOGIC = ['&&', '||', '&', '|', '^']; + + SHIFT = ['<<', '>>', '>>>']; + + COMPARE = ['==', '!=', '<', '>', '<=', '>=']; + + MATH = ['*', '/', '%']; + + RELATION = ['IN', 'OF', 'INSTANCEOF']; + + BOOL = ['TRUE', 'FALSE']; + + NOT_REGEX = ['NUMBER', 'REGEX', 'BOOL', 'NULL', 'UNDEFINED', '++', '--']; + + NOT_SPACED_REGEX = NOT_REGEX.concat(')', '}', 'THIS', 'IDENTIFIER', 'STRING', ']'); + + CALLABLE = ['IDENTIFIER', 'STRING', 'REGEX', ')', ']', '}', '?', '::', '@', 'THIS', 'SUPER']; + + INDEXABLE = CALLABLE.concat('NUMBER', 'BOOL', 'NULL', 'UNDEFINED'); + + LINE_BREAK = ['INDENT', 'OUTDENT', 'TERMINATOR']; + + +}); + +ace.define("ace/mode/coffee/parser",["require","exports","module"], function(require, exports, module) { + +var parser = {trace: function trace() { }, +yy: {}, +symbols_: {"error":2,"Root":3,"Body":4,"Line":5,"TERMINATOR":6,"Expression":7,"Statement":8,"Return":9,"Comment":10,"STATEMENT":11,"Value":12,"Invocation":13,"Code":14,"Operation":15,"Assign":16,"If":17,"Try":18,"While":19,"For":20,"Switch":21,"Class":22,"Throw":23,"Block":24,"INDENT":25,"OUTDENT":26,"Identifier":27,"IDENTIFIER":28,"AlphaNumeric":29,"NUMBER":30,"STRING":31,"Literal":32,"JS":33,"REGEX":34,"DEBUGGER":35,"UNDEFINED":36,"NULL":37,"BOOL":38,"Assignable":39,"=":40,"AssignObj":41,"ObjAssignable":42,":":43,"ThisProperty":44,"RETURN":45,"HERECOMMENT":46,"PARAM_START":47,"ParamList":48,"PARAM_END":49,"FuncGlyph":50,"->":51,"=>":52,"OptComma":53,",":54,"Param":55,"ParamVar":56,"...":57,"Array":58,"Object":59,"Splat":60,"SimpleAssignable":61,"Accessor":62,"Parenthetical":63,"Range":64,"This":65,".":66,"?.":67,"::":68,"?::":69,"Index":70,"INDEX_START":71,"IndexValue":72,"INDEX_END":73,"INDEX_SOAK":74,"Slice":75,"{":76,"AssignList":77,"}":78,"CLASS":79,"EXTENDS":80,"OptFuncExist":81,"Arguments":82,"SUPER":83,"FUNC_EXIST":84,"CALL_START":85,"CALL_END":86,"ArgList":87,"THIS":88,"@":89,"[":90,"]":91,"RangeDots":92,"..":93,"Arg":94,"SimpleArgs":95,"TRY":96,"Catch":97,"FINALLY":98,"CATCH":99,"THROW":100,"(":101,")":102,"WhileSource":103,"WHILE":104,"WHEN":105,"UNTIL":106,"Loop":107,"LOOP":108,"ForBody":109,"FOR":110,"ForStart":111,"ForSource":112,"ForVariables":113,"OWN":114,"ForValue":115,"FORIN":116,"FOROF":117,"BY":118,"SWITCH":119,"Whens":120,"ELSE":121,"When":122,"LEADING_WHEN":123,"IfBlock":124,"IF":125,"POST_IF":126,"UNARY":127,"-":128,"+":129,"--":130,"++":131,"?":132,"MATH":133,"SHIFT":134,"COMPARE":135,"LOGIC":136,"RELATION":137,"COMPOUND_ASSIGN":138,"$accept":0,"$end":1}, +terminals_: {2:"error",6:"TERMINATOR",11:"STATEMENT",25:"INDENT",26:"OUTDENT",28:"IDENTIFIER",30:"NUMBER",31:"STRING",33:"JS",34:"REGEX",35:"DEBUGGER",36:"UNDEFINED",37:"NULL",38:"BOOL",40:"=",43:":",45:"RETURN",46:"HERECOMMENT",47:"PARAM_START",49:"PARAM_END",51:"->",52:"=>",54:",",57:"...",66:".",67:"?.",68:"::",69:"?::",71:"INDEX_START",73:"INDEX_END",74:"INDEX_SOAK",76:"{",78:"}",79:"CLASS",80:"EXTENDS",83:"SUPER",84:"FUNC_EXIST",85:"CALL_START",86:"CALL_END",88:"THIS",89:"@",90:"[",91:"]",93:"..",96:"TRY",98:"FINALLY",99:"CATCH",100:"THROW",101:"(",102:")",104:"WHILE",105:"WHEN",106:"UNTIL",108:"LOOP",110:"FOR",114:"OWN",116:"FORIN",117:"FOROF",118:"BY",119:"SWITCH",121:"ELSE",123:"LEADING_WHEN",125:"IF",126:"POST_IF",127:"UNARY",128:"-",129:"+",130:"--",131:"++",132:"?",133:"MATH",134:"SHIFT",135:"COMPARE",136:"LOGIC",137:"RELATION",138:"COMPOUND_ASSIGN"}, +productions_: [0,[3,0],[3,1],[4,1],[4,3],[4,2],[5,1],[5,1],[8,1],[8,1],[8,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[24,2],[24,3],[27,1],[29,1],[29,1],[32,1],[32,1],[32,1],[32,1],[32,1],[32,1],[32,1],[16,3],[16,4],[16,5],[41,1],[41,3],[41,5],[41,1],[42,1],[42,1],[42,1],[9,2],[9,1],[10,1],[14,5],[14,2],[50,1],[50,1],[53,0],[53,1],[48,0],[48,1],[48,3],[48,4],[48,6],[55,1],[55,2],[55,3],[56,1],[56,1],[56,1],[56,1],[60,2],[61,1],[61,2],[61,2],[61,1],[39,1],[39,1],[39,1],[12,1],[12,1],[12,1],[12,1],[12,1],[62,2],[62,2],[62,2],[62,2],[62,1],[62,1],[70,3],[70,2],[72,1],[72,1],[59,4],[77,0],[77,1],[77,3],[77,4],[77,6],[22,1],[22,2],[22,3],[22,4],[22,2],[22,3],[22,4],[22,5],[13,3],[13,3],[13,1],[13,2],[81,0],[81,1],[82,2],[82,4],[65,1],[65,1],[44,2],[58,2],[58,4],[92,1],[92,1],[64,5],[75,3],[75,2],[75,2],[75,1],[87,1],[87,3],[87,4],[87,4],[87,6],[94,1],[94,1],[95,1],[95,3],[18,2],[18,3],[18,4],[18,5],[97,3],[97,3],[97,2],[23,2],[63,3],[63,5],[103,2],[103,4],[103,2],[103,4],[19,2],[19,2],[19,2],[19,1],[107,2],[107,2],[20,2],[20,2],[20,2],[109,2],[109,2],[111,2],[111,3],[115,1],[115,1],[115,1],[115,1],[113,1],[113,3],[112,2],[112,2],[112,4],[112,4],[112,4],[112,6],[112,6],[21,5],[21,7],[21,4],[21,6],[120,1],[120,2],[122,3],[122,4],[124,3],[124,5],[17,1],[17,3],[17,3],[17,3],[15,2],[15,2],[15,2],[15,2],[15,2],[15,2],[15,2],[15,2],[15,3],[15,3],[15,3],[15,3],[15,3],[15,3],[15,3],[15,3],[15,5],[15,4],[15,3]], +performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) { + +var $0 = $$.length - 1; +switch (yystate) { +case 1:return this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Block); +break; +case 2:return this.$ = $$[$0]; +break; +case 3:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(yy.Block.wrap([$$[$0]])); +break; +case 4:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].push($$[$0])); +break; +case 5:this.$ = $$[$0-1]; +break; +case 6:this.$ = $$[$0]; +break; +case 7:this.$ = $$[$0]; +break; +case 8:this.$ = $$[$0]; +break; +case 9:this.$ = $$[$0]; +break; +case 10:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0])); +break; +case 11:this.$ = $$[$0]; +break; +case 12:this.$ = $$[$0]; +break; +case 13:this.$ = $$[$0]; +break; +case 14:this.$ = $$[$0]; +break; +case 15:this.$ = $$[$0]; +break; +case 16:this.$ = $$[$0]; +break; +case 17:this.$ = $$[$0]; +break; +case 18:this.$ = $$[$0]; +break; +case 19:this.$ = $$[$0]; +break; +case 20:this.$ = $$[$0]; +break; +case 21:this.$ = $$[$0]; +break; +case 22:this.$ = $$[$0]; +break; +case 23:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Block); +break; +case 24:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-1]); +break; +case 25:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0])); +break; +case 26:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0])); +break; +case 27:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0])); +break; +case 28:this.$ = $$[$0]; +break; +case 29:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0])); +break; +case 30:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0])); +break; +case 31:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0])); +break; +case 32:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Undefined); +break; +case 33:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Null); +break; +case 34:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Bool($$[$0])); +break; +case 35:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Assign($$[$0-2], $$[$0])); +break; +case 36:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Assign($$[$0-3], $$[$0])); +break; +case 37:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Assign($$[$0-4], $$[$0-1])); +break; +case 38:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); +break; +case 39:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Assign(yy.addLocationDataFn(_$[$0-2])(new yy.Value($$[$0-2])), $$[$0], 'object')); +break; +case 40:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Assign(yy.addLocationDataFn(_$[$0-4])(new yy.Value($$[$0-4])), $$[$0-1], 'object')); +break; +case 41:this.$ = $$[$0]; +break; +case 42:this.$ = $$[$0]; +break; +case 43:this.$ = $$[$0]; +break; +case 44:this.$ = $$[$0]; +break; +case 45:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Return($$[$0])); +break; +case 46:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Return); +break; +case 47:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Comment($$[$0])); +break; +case 48:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Code($$[$0-3], $$[$0], $$[$0-1])); +break; +case 49:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Code([], $$[$0], $$[$0-1])); +break; +case 50:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])('func'); +break; +case 51:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])('boundfunc'); +break; +case 52:this.$ = $$[$0]; +break; +case 53:this.$ = $$[$0]; +break; +case 54:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([]); +break; +case 55:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([$$[$0]]); +break; +case 56:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].concat($$[$0])); +break; +case 57:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-3].concat($$[$0])); +break; +case 58:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])($$[$0-5].concat($$[$0-2])); +break; +case 59:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Param($$[$0])); +break; +case 60:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Param($$[$0-1], null, true)); +break; +case 61:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Param($$[$0-2], $$[$0])); +break; +case 62:this.$ = $$[$0]; +break; +case 63:this.$ = $$[$0]; +break; +case 64:this.$ = $$[$0]; +break; +case 65:this.$ = $$[$0]; +break; +case 66:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Splat($$[$0-1])); +break; +case 67:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); +break; +case 68:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0-1].add($$[$0])); +break; +case 69:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Value($$[$0-1], [].concat($$[$0]))); +break; +case 70:this.$ = $$[$0]; +break; +case 71:this.$ = $$[$0]; +break; +case 72:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); +break; +case 73:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); +break; +case 74:this.$ = $$[$0]; +break; +case 75:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); +break; +case 76:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); +break; +case 77:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); +break; +case 78:this.$ = $$[$0]; +break; +case 79:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Access($$[$0])); +break; +case 80:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Access($$[$0], 'soak')); +break; +case 81:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])([yy.addLocationDataFn(_$[$0-1])(new yy.Access(new yy.Literal('prototype'))), yy.addLocationDataFn(_$[$0])(new yy.Access($$[$0]))]); +break; +case 82:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])([yy.addLocationDataFn(_$[$0-1])(new yy.Access(new yy.Literal('prototype'), 'soak')), yy.addLocationDataFn(_$[$0])(new yy.Access($$[$0]))]); +break; +case 83:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Access(new yy.Literal('prototype'))); +break; +case 84:this.$ = $$[$0]; +break; +case 85:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-1]); +break; +case 86:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(yy.extend($$[$0], { + soak: true + })); +break; +case 87:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Index($$[$0])); +break; +case 88:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Slice($$[$0])); +break; +case 89:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Obj($$[$0-2], $$[$0-3].generated)); +break; +case 90:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([]); +break; +case 91:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([$$[$0]]); +break; +case 92:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].concat($$[$0])); +break; +case 93:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-3].concat($$[$0])); +break; +case 94:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])($$[$0-5].concat($$[$0-2])); +break; +case 95:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Class); +break; +case 96:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Class(null, null, $$[$0])); +break; +case 97:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Class(null, $$[$0])); +break; +case 98:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Class(null, $$[$0-1], $$[$0])); +break; +case 99:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Class($$[$0])); +break; +case 100:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Class($$[$0-1], null, $$[$0])); +break; +case 101:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Class($$[$0-2], $$[$0])); +break; +case 102:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Class($$[$0-3], $$[$0-1], $$[$0])); +break; +case 103:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Call($$[$0-2], $$[$0], $$[$0-1])); +break; +case 104:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Call($$[$0-2], $$[$0], $$[$0-1])); +break; +case 105:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Call('super', [new yy.Splat(new yy.Literal('arguments'))])); +break; +case 106:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Call('super', $$[$0])); +break; +case 107:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(false); +break; +case 108:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(true); +break; +case 109:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])([]); +break; +case 110:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-2]); +break; +case 111:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value(new yy.Literal('this'))); +break; +case 112:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value(new yy.Literal('this'))); +break; +case 113:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Value(yy.addLocationDataFn(_$[$0-1])(new yy.Literal('this')), [yy.addLocationDataFn(_$[$0])(new yy.Access($$[$0]))], 'this')); +break; +case 114:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Arr([])); +break; +case 115:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Arr($$[$0-2])); +break; +case 116:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])('inclusive'); +break; +case 117:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])('exclusive'); +break; +case 118:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Range($$[$0-3], $$[$0-1], $$[$0-2])); +break; +case 119:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Range($$[$0-2], $$[$0], $$[$0-1])); +break; +case 120:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Range($$[$0-1], null, $$[$0])); +break; +case 121:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Range(null, $$[$0], $$[$0-1])); +break; +case 122:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Range(null, null, $$[$0])); +break; +case 123:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([$$[$0]]); +break; +case 124:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].concat($$[$0])); +break; +case 125:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-3].concat($$[$0])); +break; +case 126:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-2]); +break; +case 127:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])($$[$0-5].concat($$[$0-2])); +break; +case 128:this.$ = $$[$0]; +break; +case 129:this.$ = $$[$0]; +break; +case 130:this.$ = $$[$0]; +break; +case 131:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([].concat($$[$0-2], $$[$0])); +break; +case 132:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Try($$[$0])); +break; +case 133:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Try($$[$0-1], $$[$0][0], $$[$0][1])); +break; +case 134:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Try($$[$0-2], null, null, $$[$0])); +break; +case 135:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Try($$[$0-3], $$[$0-2][0], $$[$0-2][1], $$[$0])); +break; +case 136:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([$$[$0-1], $$[$0]]); +break; +case 137:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([yy.addLocationDataFn(_$[$0-1])(new yy.Value($$[$0-1])), $$[$0]]); +break; +case 138:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])([null, $$[$0]]); +break; +case 139:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Throw($$[$0])); +break; +case 140:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Parens($$[$0-1])); +break; +case 141:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Parens($$[$0-2])); +break; +case 142:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While($$[$0])); +break; +case 143:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.While($$[$0-2], { + guard: $$[$0] + })); +break; +case 144:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While($$[$0], { + invert: true + })); +break; +case 145:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.While($$[$0-2], { + invert: true, + guard: $$[$0] + })); +break; +case 146:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0-1].addBody($$[$0])); +break; +case 147:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0].addBody(yy.addLocationDataFn(_$[$0-1])(yy.Block.wrap([$$[$0-1]])))); +break; +case 148:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0].addBody(yy.addLocationDataFn(_$[$0-1])(yy.Block.wrap([$$[$0-1]])))); +break; +case 149:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])($$[$0]); +break; +case 150:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While(yy.addLocationDataFn(_$[$0-1])(new yy.Literal('true'))).addBody($$[$0])); +break; +case 151:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While(yy.addLocationDataFn(_$[$0-1])(new yy.Literal('true'))).addBody(yy.addLocationDataFn(_$[$0])(yy.Block.wrap([$$[$0]])))); +break; +case 152:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.For($$[$0-1], $$[$0])); +break; +case 153:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.For($$[$0-1], $$[$0])); +break; +case 154:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.For($$[$0], $$[$0-1])); +break; +case 155:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])({ + source: yy.addLocationDataFn(_$[$0])(new yy.Value($$[$0])) + }); +break; +case 156:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])((function () { + $$[$0].own = $$[$0-1].own; + $$[$0].name = $$[$0-1][0]; + $$[$0].index = $$[$0-1][1]; + return $$[$0]; + }())); +break; +case 157:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0]); +break; +case 158:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])((function () { + $$[$0].own = true; + return $$[$0]; + }())); +break; +case 159:this.$ = $$[$0]; +break; +case 160:this.$ = $$[$0]; +break; +case 161:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); +break; +case 162:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); +break; +case 163:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([$$[$0]]); +break; +case 164:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([$$[$0-2], $$[$0]]); +break; +case 165:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])({ + source: $$[$0] + }); +break; +case 166:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])({ + source: $$[$0], + object: true + }); +break; +case 167:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])({ + source: $$[$0-2], + guard: $$[$0] + }); +break; +case 168:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])({ + source: $$[$0-2], + guard: $$[$0], + object: true + }); +break; +case 169:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])({ + source: $$[$0-2], + step: $$[$0] + }); +break; +case 170:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])({ + source: $$[$0-4], + guard: $$[$0-2], + step: $$[$0] + }); +break; +case 171:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])({ + source: $$[$0-4], + step: $$[$0-2], + guard: $$[$0] + }); +break; +case 172:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Switch($$[$0-3], $$[$0-1])); +break; +case 173:this.$ = yy.addLocationDataFn(_$[$0-6], _$[$0])(new yy.Switch($$[$0-5], $$[$0-3], $$[$0-1])); +break; +case 174:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Switch(null, $$[$0-1])); +break; +case 175:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])(new yy.Switch(null, $$[$0-3], $$[$0-1])); +break; +case 176:this.$ = $$[$0]; +break; +case 177:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0-1].concat($$[$0])); +break; +case 178:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([[$$[$0-1], $$[$0]]]); +break; +case 179:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])([[$$[$0-2], $$[$0-1]]]); +break; +case 180:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0-1], $$[$0], { + type: $$[$0-2] + })); +break; +case 181:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])($$[$0-4].addElse(yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0-1], $$[$0], { + type: $$[$0-2] + })))); +break; +case 182:this.$ = $$[$0]; +break; +case 183:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].addElse($$[$0])); +break; +case 184:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0], yy.addLocationDataFn(_$[$0-2])(yy.Block.wrap([$$[$0-2]])), { + type: $$[$0-1], + statement: true + })); +break; +case 185:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0], yy.addLocationDataFn(_$[$0-2])(yy.Block.wrap([$$[$0-2]])), { + type: $$[$0-1], + statement: true + })); +break; +case 186:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op($$[$0-1], $$[$0])); +break; +case 187:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('-', $$[$0])); +break; +case 188:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('+', $$[$0])); +break; +case 189:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('--', $$[$0])); +break; +case 190:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('++', $$[$0])); +break; +case 191:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('--', $$[$0-1], null, true)); +break; +case 192:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('++', $$[$0-1], null, true)); +break; +case 193:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Existence($$[$0-1])); +break; +case 194:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op('+', $$[$0-2], $$[$0])); +break; +case 195:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op('-', $$[$0-2], $$[$0])); +break; +case 196:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[$0-2], $$[$0])); +break; +case 197:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[$0-2], $$[$0])); +break; +case 198:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[$0-2], $$[$0])); +break; +case 199:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[$0-2], $$[$0])); +break; +case 200:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])((function () { + if ($$[$0-1].charAt(0) === '!') { + return new yy.Op($$[$0-1].slice(1), $$[$0-2], $$[$0]).invert(); + } else { + return new yy.Op($$[$0-1], $$[$0-2], $$[$0]); + } + }())); +break; +case 201:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Assign($$[$0-2], $$[$0], $$[$0-1])); +break; +case 202:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Assign($$[$0-4], $$[$0-1], $$[$0-3])); +break; +case 203:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Assign($$[$0-3], $$[$0], $$[$0-2])); +break; +case 204:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Extends($$[$0-2], $$[$0])); +break; +} +}, +table: [{1:[2,1],3:1,4:2,5:3,7:4,8:5,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[3]},{1:[2,2],6:[1,72]},{1:[2,3],6:[2,3],26:[2,3],102:[2,3]},{1:[2,6],6:[2,6],26:[2,6],102:[2,6],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,7],6:[2,7],26:[2,7],102:[2,7],103:85,104:[1,63],106:[1,64],109:86,110:[1,66],111:67,126:[1,84]},{1:[2,11],6:[2,11],25:[2,11],26:[2,11],49:[2,11],54:[2,11],57:[2,11],62:88,66:[1,90],67:[1,91],68:[1,92],69:[1,93],70:94,71:[1,95],73:[2,11],74:[1,96],78:[2,11],81:87,84:[1,89],85:[2,107],86:[2,11],91:[2,11],93:[2,11],102:[2,11],104:[2,11],105:[2,11],106:[2,11],110:[2,11],118:[2,11],126:[2,11],128:[2,11],129:[2,11],132:[2,11],133:[2,11],134:[2,11],135:[2,11],136:[2,11],137:[2,11]},{1:[2,12],6:[2,12],25:[2,12],26:[2,12],49:[2,12],54:[2,12],57:[2,12],62:98,66:[1,90],67:[1,91],68:[1,92],69:[1,93],70:94,71:[1,95],73:[2,12],74:[1,96],78:[2,12],81:97,84:[1,89],85:[2,107],86:[2,12],91:[2,12],93:[2,12],102:[2,12],104:[2,12],105:[2,12],106:[2,12],110:[2,12],118:[2,12],126:[2,12],128:[2,12],129:[2,12],132:[2,12],133:[2,12],134:[2,12],135:[2,12],136:[2,12],137:[2,12]},{1:[2,13],6:[2,13],25:[2,13],26:[2,13],49:[2,13],54:[2,13],57:[2,13],73:[2,13],78:[2,13],86:[2,13],91:[2,13],93:[2,13],102:[2,13],104:[2,13],105:[2,13],106:[2,13],110:[2,13],118:[2,13],126:[2,13],128:[2,13],129:[2,13],132:[2,13],133:[2,13],134:[2,13],135:[2,13],136:[2,13],137:[2,13]},{1:[2,14],6:[2,14],25:[2,14],26:[2,14],49:[2,14],54:[2,14],57:[2,14],73:[2,14],78:[2,14],86:[2,14],91:[2,14],93:[2,14],102:[2,14],104:[2,14],105:[2,14],106:[2,14],110:[2,14],118:[2,14],126:[2,14],128:[2,14],129:[2,14],132:[2,14],133:[2,14],134:[2,14],135:[2,14],136:[2,14],137:[2,14]},{1:[2,15],6:[2,15],25:[2,15],26:[2,15],49:[2,15],54:[2,15],57:[2,15],73:[2,15],78:[2,15],86:[2,15],91:[2,15],93:[2,15],102:[2,15],104:[2,15],105:[2,15],106:[2,15],110:[2,15],118:[2,15],126:[2,15],128:[2,15],129:[2,15],132:[2,15],133:[2,15],134:[2,15],135:[2,15],136:[2,15],137:[2,15]},{1:[2,16],6:[2,16],25:[2,16],26:[2,16],49:[2,16],54:[2,16],57:[2,16],73:[2,16],78:[2,16],86:[2,16],91:[2,16],93:[2,16],102:[2,16],104:[2,16],105:[2,16],106:[2,16],110:[2,16],118:[2,16],126:[2,16],128:[2,16],129:[2,16],132:[2,16],133:[2,16],134:[2,16],135:[2,16],136:[2,16],137:[2,16]},{1:[2,17],6:[2,17],25:[2,17],26:[2,17],49:[2,17],54:[2,17],57:[2,17],73:[2,17],78:[2,17],86:[2,17],91:[2,17],93:[2,17],102:[2,17],104:[2,17],105:[2,17],106:[2,17],110:[2,17],118:[2,17],126:[2,17],128:[2,17],129:[2,17],132:[2,17],133:[2,17],134:[2,17],135:[2,17],136:[2,17],137:[2,17]},{1:[2,18],6:[2,18],25:[2,18],26:[2,18],49:[2,18],54:[2,18],57:[2,18],73:[2,18],78:[2,18],86:[2,18],91:[2,18],93:[2,18],102:[2,18],104:[2,18],105:[2,18],106:[2,18],110:[2,18],118:[2,18],126:[2,18],128:[2,18],129:[2,18],132:[2,18],133:[2,18],134:[2,18],135:[2,18],136:[2,18],137:[2,18]},{1:[2,19],6:[2,19],25:[2,19],26:[2,19],49:[2,19],54:[2,19],57:[2,19],73:[2,19],78:[2,19],86:[2,19],91:[2,19],93:[2,19],102:[2,19],104:[2,19],105:[2,19],106:[2,19],110:[2,19],118:[2,19],126:[2,19],128:[2,19],129:[2,19],132:[2,19],133:[2,19],134:[2,19],135:[2,19],136:[2,19],137:[2,19]},{1:[2,20],6:[2,20],25:[2,20],26:[2,20],49:[2,20],54:[2,20],57:[2,20],73:[2,20],78:[2,20],86:[2,20],91:[2,20],93:[2,20],102:[2,20],104:[2,20],105:[2,20],106:[2,20],110:[2,20],118:[2,20],126:[2,20],128:[2,20],129:[2,20],132:[2,20],133:[2,20],134:[2,20],135:[2,20],136:[2,20],137:[2,20]},{1:[2,21],6:[2,21],25:[2,21],26:[2,21],49:[2,21],54:[2,21],57:[2,21],73:[2,21],78:[2,21],86:[2,21],91:[2,21],93:[2,21],102:[2,21],104:[2,21],105:[2,21],106:[2,21],110:[2,21],118:[2,21],126:[2,21],128:[2,21],129:[2,21],132:[2,21],133:[2,21],134:[2,21],135:[2,21],136:[2,21],137:[2,21]},{1:[2,22],6:[2,22],25:[2,22],26:[2,22],49:[2,22],54:[2,22],57:[2,22],73:[2,22],78:[2,22],86:[2,22],91:[2,22],93:[2,22],102:[2,22],104:[2,22],105:[2,22],106:[2,22],110:[2,22],118:[2,22],126:[2,22],128:[2,22],129:[2,22],132:[2,22],133:[2,22],134:[2,22],135:[2,22],136:[2,22],137:[2,22]},{1:[2,8],6:[2,8],26:[2,8],102:[2,8],104:[2,8],106:[2,8],110:[2,8],126:[2,8]},{1:[2,9],6:[2,9],26:[2,9],102:[2,9],104:[2,9],106:[2,9],110:[2,9],126:[2,9]},{1:[2,10],6:[2,10],26:[2,10],102:[2,10],104:[2,10],106:[2,10],110:[2,10],126:[2,10]},{1:[2,74],6:[2,74],25:[2,74],26:[2,74],40:[1,99],49:[2,74],54:[2,74],57:[2,74],66:[2,74],67:[2,74],68:[2,74],69:[2,74],71:[2,74],73:[2,74],74:[2,74],78:[2,74],84:[2,74],85:[2,74],86:[2,74],91:[2,74],93:[2,74],102:[2,74],104:[2,74],105:[2,74],106:[2,74],110:[2,74],118:[2,74],126:[2,74],128:[2,74],129:[2,74],132:[2,74],133:[2,74],134:[2,74],135:[2,74],136:[2,74],137:[2,74]},{1:[2,75],6:[2,75],25:[2,75],26:[2,75],49:[2,75],54:[2,75],57:[2,75],66:[2,75],67:[2,75],68:[2,75],69:[2,75],71:[2,75],73:[2,75],74:[2,75],78:[2,75],84:[2,75],85:[2,75],86:[2,75],91:[2,75],93:[2,75],102:[2,75],104:[2,75],105:[2,75],106:[2,75],110:[2,75],118:[2,75],126:[2,75],128:[2,75],129:[2,75],132:[2,75],133:[2,75],134:[2,75],135:[2,75],136:[2,75],137:[2,75]},{1:[2,76],6:[2,76],25:[2,76],26:[2,76],49:[2,76],54:[2,76],57:[2,76],66:[2,76],67:[2,76],68:[2,76],69:[2,76],71:[2,76],73:[2,76],74:[2,76],78:[2,76],84:[2,76],85:[2,76],86:[2,76],91:[2,76],93:[2,76],102:[2,76],104:[2,76],105:[2,76],106:[2,76],110:[2,76],118:[2,76],126:[2,76],128:[2,76],129:[2,76],132:[2,76],133:[2,76],134:[2,76],135:[2,76],136:[2,76],137:[2,76]},{1:[2,77],6:[2,77],25:[2,77],26:[2,77],49:[2,77],54:[2,77],57:[2,77],66:[2,77],67:[2,77],68:[2,77],69:[2,77],71:[2,77],73:[2,77],74:[2,77],78:[2,77],84:[2,77],85:[2,77],86:[2,77],91:[2,77],93:[2,77],102:[2,77],104:[2,77],105:[2,77],106:[2,77],110:[2,77],118:[2,77],126:[2,77],128:[2,77],129:[2,77],132:[2,77],133:[2,77],134:[2,77],135:[2,77],136:[2,77],137:[2,77]},{1:[2,78],6:[2,78],25:[2,78],26:[2,78],49:[2,78],54:[2,78],57:[2,78],66:[2,78],67:[2,78],68:[2,78],69:[2,78],71:[2,78],73:[2,78],74:[2,78],78:[2,78],84:[2,78],85:[2,78],86:[2,78],91:[2,78],93:[2,78],102:[2,78],104:[2,78],105:[2,78],106:[2,78],110:[2,78],118:[2,78],126:[2,78],128:[2,78],129:[2,78],132:[2,78],133:[2,78],134:[2,78],135:[2,78],136:[2,78],137:[2,78]},{1:[2,105],6:[2,105],25:[2,105],26:[2,105],49:[2,105],54:[2,105],57:[2,105],66:[2,105],67:[2,105],68:[2,105],69:[2,105],71:[2,105],73:[2,105],74:[2,105],78:[2,105],82:100,84:[2,105],85:[1,101],86:[2,105],91:[2,105],93:[2,105],102:[2,105],104:[2,105],105:[2,105],106:[2,105],110:[2,105],118:[2,105],126:[2,105],128:[2,105],129:[2,105],132:[2,105],133:[2,105],134:[2,105],135:[2,105],136:[2,105],137:[2,105]},{6:[2,54],25:[2,54],27:105,28:[1,71],44:106,48:102,49:[2,54],54:[2,54],55:103,56:104,58:107,59:108,76:[1,68],89:[1,109],90:[1,110]},{24:111,25:[1,112]},{7:113,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:115,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:116,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{12:118,13:119,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:120,44:61,58:45,59:46,61:117,63:23,64:24,65:25,76:[1,68],83:[1,26],88:[1,56],89:[1,57],90:[1,55],101:[1,54]},{12:118,13:119,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:120,44:61,58:45,59:46,61:121,63:23,64:24,65:25,76:[1,68],83:[1,26],88:[1,56],89:[1,57],90:[1,55],101:[1,54]},{1:[2,71],6:[2,71],25:[2,71],26:[2,71],40:[2,71],49:[2,71],54:[2,71],57:[2,71],66:[2,71],67:[2,71],68:[2,71],69:[2,71],71:[2,71],73:[2,71],74:[2,71],78:[2,71],80:[1,125],84:[2,71],85:[2,71],86:[2,71],91:[2,71],93:[2,71],102:[2,71],104:[2,71],105:[2,71],106:[2,71],110:[2,71],118:[2,71],126:[2,71],128:[2,71],129:[2,71],130:[1,122],131:[1,123],132:[2,71],133:[2,71],134:[2,71],135:[2,71],136:[2,71],137:[2,71],138:[1,124]},{1:[2,182],6:[2,182],25:[2,182],26:[2,182],49:[2,182],54:[2,182],57:[2,182],73:[2,182],78:[2,182],86:[2,182],91:[2,182],93:[2,182],102:[2,182],104:[2,182],105:[2,182],106:[2,182],110:[2,182],118:[2,182],121:[1,126],126:[2,182],128:[2,182],129:[2,182],132:[2,182],133:[2,182],134:[2,182],135:[2,182],136:[2,182],137:[2,182]},{24:127,25:[1,112]},{24:128,25:[1,112]},{1:[2,149],6:[2,149],25:[2,149],26:[2,149],49:[2,149],54:[2,149],57:[2,149],73:[2,149],78:[2,149],86:[2,149],91:[2,149],93:[2,149],102:[2,149],104:[2,149],105:[2,149],106:[2,149],110:[2,149],118:[2,149],126:[2,149],128:[2,149],129:[2,149],132:[2,149],133:[2,149],134:[2,149],135:[2,149],136:[2,149],137:[2,149]},{24:129,25:[1,112]},{7:130,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,131],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,95],6:[2,95],12:118,13:119,24:132,25:[1,112],26:[2,95],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:120,44:61,49:[2,95],54:[2,95],57:[2,95],58:45,59:46,61:134,63:23,64:24,65:25,73:[2,95],76:[1,68],78:[2,95],80:[1,133],83:[1,26],86:[2,95],88:[1,56],89:[1,57],90:[1,55],91:[2,95],93:[2,95],101:[1,54],102:[2,95],104:[2,95],105:[2,95],106:[2,95],110:[2,95],118:[2,95],126:[2,95],128:[2,95],129:[2,95],132:[2,95],133:[2,95],134:[2,95],135:[2,95],136:[2,95],137:[2,95]},{7:135,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,46],6:[2,46],7:136,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,26:[2,46],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],102:[2,46],103:37,104:[2,46],106:[2,46],107:38,108:[1,65],109:39,110:[2,46],111:67,119:[1,40],124:35,125:[1,62],126:[2,46],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,47],6:[2,47],25:[2,47],26:[2,47],54:[2,47],78:[2,47],102:[2,47],104:[2,47],106:[2,47],110:[2,47],126:[2,47]},{1:[2,72],6:[2,72],25:[2,72],26:[2,72],40:[2,72],49:[2,72],54:[2,72],57:[2,72],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,72],74:[2,72],78:[2,72],84:[2,72],85:[2,72],86:[2,72],91:[2,72],93:[2,72],102:[2,72],104:[2,72],105:[2,72],106:[2,72],110:[2,72],118:[2,72],126:[2,72],128:[2,72],129:[2,72],132:[2,72],133:[2,72],134:[2,72],135:[2,72],136:[2,72],137:[2,72]},{1:[2,73],6:[2,73],25:[2,73],26:[2,73],40:[2,73],49:[2,73],54:[2,73],57:[2,73],66:[2,73],67:[2,73],68:[2,73],69:[2,73],71:[2,73],73:[2,73],74:[2,73],78:[2,73],84:[2,73],85:[2,73],86:[2,73],91:[2,73],93:[2,73],102:[2,73],104:[2,73],105:[2,73],106:[2,73],110:[2,73],118:[2,73],126:[2,73],128:[2,73],129:[2,73],132:[2,73],133:[2,73],134:[2,73],135:[2,73],136:[2,73],137:[2,73]},{1:[2,28],6:[2,28],25:[2,28],26:[2,28],49:[2,28],54:[2,28],57:[2,28],66:[2,28],67:[2,28],68:[2,28],69:[2,28],71:[2,28],73:[2,28],74:[2,28],78:[2,28],84:[2,28],85:[2,28],86:[2,28],91:[2,28],93:[2,28],102:[2,28],104:[2,28],105:[2,28],106:[2,28],110:[2,28],118:[2,28],126:[2,28],128:[2,28],129:[2,28],132:[2,28],133:[2,28],134:[2,28],135:[2,28],136:[2,28],137:[2,28]},{1:[2,29],6:[2,29],25:[2,29],26:[2,29],49:[2,29],54:[2,29],57:[2,29],66:[2,29],67:[2,29],68:[2,29],69:[2,29],71:[2,29],73:[2,29],74:[2,29],78:[2,29],84:[2,29],85:[2,29],86:[2,29],91:[2,29],93:[2,29],102:[2,29],104:[2,29],105:[2,29],106:[2,29],110:[2,29],118:[2,29],126:[2,29],128:[2,29],129:[2,29],132:[2,29],133:[2,29],134:[2,29],135:[2,29],136:[2,29],137:[2,29]},{1:[2,30],6:[2,30],25:[2,30],26:[2,30],49:[2,30],54:[2,30],57:[2,30],66:[2,30],67:[2,30],68:[2,30],69:[2,30],71:[2,30],73:[2,30],74:[2,30],78:[2,30],84:[2,30],85:[2,30],86:[2,30],91:[2,30],93:[2,30],102:[2,30],104:[2,30],105:[2,30],106:[2,30],110:[2,30],118:[2,30],126:[2,30],128:[2,30],129:[2,30],132:[2,30],133:[2,30],134:[2,30],135:[2,30],136:[2,30],137:[2,30]},{1:[2,31],6:[2,31],25:[2,31],26:[2,31],49:[2,31],54:[2,31],57:[2,31],66:[2,31],67:[2,31],68:[2,31],69:[2,31],71:[2,31],73:[2,31],74:[2,31],78:[2,31],84:[2,31],85:[2,31],86:[2,31],91:[2,31],93:[2,31],102:[2,31],104:[2,31],105:[2,31],106:[2,31],110:[2,31],118:[2,31],126:[2,31],128:[2,31],129:[2,31],132:[2,31],133:[2,31],134:[2,31],135:[2,31],136:[2,31],137:[2,31]},{1:[2,32],6:[2,32],25:[2,32],26:[2,32],49:[2,32],54:[2,32],57:[2,32],66:[2,32],67:[2,32],68:[2,32],69:[2,32],71:[2,32],73:[2,32],74:[2,32],78:[2,32],84:[2,32],85:[2,32],86:[2,32],91:[2,32],93:[2,32],102:[2,32],104:[2,32],105:[2,32],106:[2,32],110:[2,32],118:[2,32],126:[2,32],128:[2,32],129:[2,32],132:[2,32],133:[2,32],134:[2,32],135:[2,32],136:[2,32],137:[2,32]},{1:[2,33],6:[2,33],25:[2,33],26:[2,33],49:[2,33],54:[2,33],57:[2,33],66:[2,33],67:[2,33],68:[2,33],69:[2,33],71:[2,33],73:[2,33],74:[2,33],78:[2,33],84:[2,33],85:[2,33],86:[2,33],91:[2,33],93:[2,33],102:[2,33],104:[2,33],105:[2,33],106:[2,33],110:[2,33],118:[2,33],126:[2,33],128:[2,33],129:[2,33],132:[2,33],133:[2,33],134:[2,33],135:[2,33],136:[2,33],137:[2,33]},{1:[2,34],6:[2,34],25:[2,34],26:[2,34],49:[2,34],54:[2,34],57:[2,34],66:[2,34],67:[2,34],68:[2,34],69:[2,34],71:[2,34],73:[2,34],74:[2,34],78:[2,34],84:[2,34],85:[2,34],86:[2,34],91:[2,34],93:[2,34],102:[2,34],104:[2,34],105:[2,34],106:[2,34],110:[2,34],118:[2,34],126:[2,34],128:[2,34],129:[2,34],132:[2,34],133:[2,34],134:[2,34],135:[2,34],136:[2,34],137:[2,34]},{4:137,5:3,7:4,8:5,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,138],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:139,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,143],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],87:141,88:[1,56],89:[1,57],90:[1,55],91:[1,140],94:142,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,111],6:[2,111],25:[2,111],26:[2,111],49:[2,111],54:[2,111],57:[2,111],66:[2,111],67:[2,111],68:[2,111],69:[2,111],71:[2,111],73:[2,111],74:[2,111],78:[2,111],84:[2,111],85:[2,111],86:[2,111],91:[2,111],93:[2,111],102:[2,111],104:[2,111],105:[2,111],106:[2,111],110:[2,111],118:[2,111],126:[2,111],128:[2,111],129:[2,111],132:[2,111],133:[2,111],134:[2,111],135:[2,111],136:[2,111],137:[2,111]},{1:[2,112],6:[2,112],25:[2,112],26:[2,112],27:145,28:[1,71],49:[2,112],54:[2,112],57:[2,112],66:[2,112],67:[2,112],68:[2,112],69:[2,112],71:[2,112],73:[2,112],74:[2,112],78:[2,112],84:[2,112],85:[2,112],86:[2,112],91:[2,112],93:[2,112],102:[2,112],104:[2,112],105:[2,112],106:[2,112],110:[2,112],118:[2,112],126:[2,112],128:[2,112],129:[2,112],132:[2,112],133:[2,112],134:[2,112],135:[2,112],136:[2,112],137:[2,112]},{25:[2,50]},{25:[2,51]},{1:[2,67],6:[2,67],25:[2,67],26:[2,67],40:[2,67],49:[2,67],54:[2,67],57:[2,67],66:[2,67],67:[2,67],68:[2,67],69:[2,67],71:[2,67],73:[2,67],74:[2,67],78:[2,67],80:[2,67],84:[2,67],85:[2,67],86:[2,67],91:[2,67],93:[2,67],102:[2,67],104:[2,67],105:[2,67],106:[2,67],110:[2,67],118:[2,67],126:[2,67],128:[2,67],129:[2,67],130:[2,67],131:[2,67],132:[2,67],133:[2,67],134:[2,67],135:[2,67],136:[2,67],137:[2,67],138:[2,67]},{1:[2,70],6:[2,70],25:[2,70],26:[2,70],40:[2,70],49:[2,70],54:[2,70],57:[2,70],66:[2,70],67:[2,70],68:[2,70],69:[2,70],71:[2,70],73:[2,70],74:[2,70],78:[2,70],80:[2,70],84:[2,70],85:[2,70],86:[2,70],91:[2,70],93:[2,70],102:[2,70],104:[2,70],105:[2,70],106:[2,70],110:[2,70],118:[2,70],126:[2,70],128:[2,70],129:[2,70],130:[2,70],131:[2,70],132:[2,70],133:[2,70],134:[2,70],135:[2,70],136:[2,70],137:[2,70],138:[2,70]},{7:146,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:147,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:148,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:150,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:149,25:[1,112],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{27:155,28:[1,71],44:156,58:157,59:158,64:151,76:[1,68],89:[1,109],90:[1,55],113:152,114:[1,153],115:154},{112:159,116:[1,160],117:[1,161]},{6:[2,90],10:165,25:[2,90],27:166,28:[1,71],29:167,30:[1,69],31:[1,70],41:163,42:164,44:168,46:[1,44],54:[2,90],77:162,78:[2,90],89:[1,109]},{1:[2,26],6:[2,26],25:[2,26],26:[2,26],43:[2,26],49:[2,26],54:[2,26],57:[2,26],66:[2,26],67:[2,26],68:[2,26],69:[2,26],71:[2,26],73:[2,26],74:[2,26],78:[2,26],84:[2,26],85:[2,26],86:[2,26],91:[2,26],93:[2,26],102:[2,26],104:[2,26],105:[2,26],106:[2,26],110:[2,26],118:[2,26],126:[2,26],128:[2,26],129:[2,26],132:[2,26],133:[2,26],134:[2,26],135:[2,26],136:[2,26],137:[2,26]},{1:[2,27],6:[2,27],25:[2,27],26:[2,27],43:[2,27],49:[2,27],54:[2,27],57:[2,27],66:[2,27],67:[2,27],68:[2,27],69:[2,27],71:[2,27],73:[2,27],74:[2,27],78:[2,27],84:[2,27],85:[2,27],86:[2,27],91:[2,27],93:[2,27],102:[2,27],104:[2,27],105:[2,27],106:[2,27],110:[2,27],118:[2,27],126:[2,27],128:[2,27],129:[2,27],132:[2,27],133:[2,27],134:[2,27],135:[2,27],136:[2,27],137:[2,27]},{1:[2,25],6:[2,25],25:[2,25],26:[2,25],40:[2,25],43:[2,25],49:[2,25],54:[2,25],57:[2,25],66:[2,25],67:[2,25],68:[2,25],69:[2,25],71:[2,25],73:[2,25],74:[2,25],78:[2,25],80:[2,25],84:[2,25],85:[2,25],86:[2,25],91:[2,25],93:[2,25],102:[2,25],104:[2,25],105:[2,25],106:[2,25],110:[2,25],116:[2,25],117:[2,25],118:[2,25],126:[2,25],128:[2,25],129:[2,25],130:[2,25],131:[2,25],132:[2,25],133:[2,25],134:[2,25],135:[2,25],136:[2,25],137:[2,25],138:[2,25]},{1:[2,5],5:169,6:[2,5],7:4,8:5,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,26:[2,5],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],102:[2,5],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,193],6:[2,193],25:[2,193],26:[2,193],49:[2,193],54:[2,193],57:[2,193],73:[2,193],78:[2,193],86:[2,193],91:[2,193],93:[2,193],102:[2,193],104:[2,193],105:[2,193],106:[2,193],110:[2,193],118:[2,193],126:[2,193],128:[2,193],129:[2,193],132:[2,193],133:[2,193],134:[2,193],135:[2,193],136:[2,193],137:[2,193]},{7:170,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:171,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:172,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:173,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:174,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:175,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:176,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:177,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,148],6:[2,148],25:[2,148],26:[2,148],49:[2,148],54:[2,148],57:[2,148],73:[2,148],78:[2,148],86:[2,148],91:[2,148],93:[2,148],102:[2,148],104:[2,148],105:[2,148],106:[2,148],110:[2,148],118:[2,148],126:[2,148],128:[2,148],129:[2,148],132:[2,148],133:[2,148],134:[2,148],135:[2,148],136:[2,148],137:[2,148]},{1:[2,153],6:[2,153],25:[2,153],26:[2,153],49:[2,153],54:[2,153],57:[2,153],73:[2,153],78:[2,153],86:[2,153],91:[2,153],93:[2,153],102:[2,153],104:[2,153],105:[2,153],106:[2,153],110:[2,153],118:[2,153],126:[2,153],128:[2,153],129:[2,153],132:[2,153],133:[2,153],134:[2,153],135:[2,153],136:[2,153],137:[2,153]},{7:178,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,147],6:[2,147],25:[2,147],26:[2,147],49:[2,147],54:[2,147],57:[2,147],73:[2,147],78:[2,147],86:[2,147],91:[2,147],93:[2,147],102:[2,147],104:[2,147],105:[2,147],106:[2,147],110:[2,147],118:[2,147],126:[2,147],128:[2,147],129:[2,147],132:[2,147],133:[2,147],134:[2,147],135:[2,147],136:[2,147],137:[2,147]},{1:[2,152],6:[2,152],25:[2,152],26:[2,152],49:[2,152],54:[2,152],57:[2,152],73:[2,152],78:[2,152],86:[2,152],91:[2,152],93:[2,152],102:[2,152],104:[2,152],105:[2,152],106:[2,152],110:[2,152],118:[2,152],126:[2,152],128:[2,152],129:[2,152],132:[2,152],133:[2,152],134:[2,152],135:[2,152],136:[2,152],137:[2,152]},{82:179,85:[1,101]},{1:[2,68],6:[2,68],25:[2,68],26:[2,68],40:[2,68],49:[2,68],54:[2,68],57:[2,68],66:[2,68],67:[2,68],68:[2,68],69:[2,68],71:[2,68],73:[2,68],74:[2,68],78:[2,68],80:[2,68],84:[2,68],85:[2,68],86:[2,68],91:[2,68],93:[2,68],102:[2,68],104:[2,68],105:[2,68],106:[2,68],110:[2,68],118:[2,68],126:[2,68],128:[2,68],129:[2,68],130:[2,68],131:[2,68],132:[2,68],133:[2,68],134:[2,68],135:[2,68],136:[2,68],137:[2,68],138:[2,68]},{85:[2,108]},{27:180,28:[1,71]},{27:181,28:[1,71]},{1:[2,83],6:[2,83],25:[2,83],26:[2,83],27:182,28:[1,71],40:[2,83],49:[2,83],54:[2,83],57:[2,83],66:[2,83],67:[2,83],68:[2,83],69:[2,83],71:[2,83],73:[2,83],74:[2,83],78:[2,83],80:[2,83],84:[2,83],85:[2,83],86:[2,83],91:[2,83],93:[2,83],102:[2,83],104:[2,83],105:[2,83],106:[2,83],110:[2,83],118:[2,83],126:[2,83],128:[2,83],129:[2,83],130:[2,83],131:[2,83],132:[2,83],133:[2,83],134:[2,83],135:[2,83],136:[2,83],137:[2,83],138:[2,83]},{27:183,28:[1,71]},{1:[2,84],6:[2,84],25:[2,84],26:[2,84],40:[2,84],49:[2,84],54:[2,84],57:[2,84],66:[2,84],67:[2,84],68:[2,84],69:[2,84],71:[2,84],73:[2,84],74:[2,84],78:[2,84],80:[2,84],84:[2,84],85:[2,84],86:[2,84],91:[2,84],93:[2,84],102:[2,84],104:[2,84],105:[2,84],106:[2,84],110:[2,84],118:[2,84],126:[2,84],128:[2,84],129:[2,84],130:[2,84],131:[2,84],132:[2,84],133:[2,84],134:[2,84],135:[2,84],136:[2,84],137:[2,84],138:[2,84]},{7:185,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],57:[1,189],58:45,59:46,61:34,63:23,64:24,65:25,72:184,75:186,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],92:187,93:[1,188],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{70:190,71:[1,95],74:[1,96]},{82:191,85:[1,101]},{1:[2,69],6:[2,69],25:[2,69],26:[2,69],40:[2,69],49:[2,69],54:[2,69],57:[2,69],66:[2,69],67:[2,69],68:[2,69],69:[2,69],71:[2,69],73:[2,69],74:[2,69],78:[2,69],80:[2,69],84:[2,69],85:[2,69],86:[2,69],91:[2,69],93:[2,69],102:[2,69],104:[2,69],105:[2,69],106:[2,69],110:[2,69],118:[2,69],126:[2,69],128:[2,69],129:[2,69],130:[2,69],131:[2,69],132:[2,69],133:[2,69],134:[2,69],135:[2,69],136:[2,69],137:[2,69],138:[2,69]},{6:[1,193],7:192,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,194],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,106],6:[2,106],25:[2,106],26:[2,106],49:[2,106],54:[2,106],57:[2,106],66:[2,106],67:[2,106],68:[2,106],69:[2,106],71:[2,106],73:[2,106],74:[2,106],78:[2,106],84:[2,106],85:[2,106],86:[2,106],91:[2,106],93:[2,106],102:[2,106],104:[2,106],105:[2,106],106:[2,106],110:[2,106],118:[2,106],126:[2,106],128:[2,106],129:[2,106],132:[2,106],133:[2,106],134:[2,106],135:[2,106],136:[2,106],137:[2,106]},{7:197,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,143],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],86:[1,195],87:196,88:[1,56],89:[1,57],90:[1,55],94:142,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,52],25:[2,52],49:[1,198],53:200,54:[1,199]},{6:[2,55],25:[2,55],26:[2,55],49:[2,55],54:[2,55]},{6:[2,59],25:[2,59],26:[2,59],40:[1,202],49:[2,59],54:[2,59],57:[1,201]},{6:[2,62],25:[2,62],26:[2,62],40:[2,62],49:[2,62],54:[2,62],57:[2,62]},{6:[2,63],25:[2,63],26:[2,63],40:[2,63],49:[2,63],54:[2,63],57:[2,63]},{6:[2,64],25:[2,64],26:[2,64],40:[2,64],49:[2,64],54:[2,64],57:[2,64]},{6:[2,65],25:[2,65],26:[2,65],40:[2,65],49:[2,65],54:[2,65],57:[2,65]},{27:145,28:[1,71]},{7:197,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,143],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],87:141,88:[1,56],89:[1,57],90:[1,55],91:[1,140],94:142,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,49],6:[2,49],25:[2,49],26:[2,49],49:[2,49],54:[2,49],57:[2,49],73:[2,49],78:[2,49],86:[2,49],91:[2,49],93:[2,49],102:[2,49],104:[2,49],105:[2,49],106:[2,49],110:[2,49],118:[2,49],126:[2,49],128:[2,49],129:[2,49],132:[2,49],133:[2,49],134:[2,49],135:[2,49],136:[2,49],137:[2,49]},{4:204,5:3,7:4,8:5,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,26:[1,203],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,186],6:[2,186],25:[2,186],26:[2,186],49:[2,186],54:[2,186],57:[2,186],73:[2,186],78:[2,186],86:[2,186],91:[2,186],93:[2,186],102:[2,186],103:82,104:[2,186],105:[2,186],106:[2,186],109:83,110:[2,186],111:67,118:[2,186],126:[2,186],128:[2,186],129:[2,186],132:[1,73],133:[2,186],134:[2,186],135:[2,186],136:[2,186],137:[2,186]},{103:85,104:[1,63],106:[1,64],109:86,110:[1,66],111:67,126:[1,84]},{1:[2,187],6:[2,187],25:[2,187],26:[2,187],49:[2,187],54:[2,187],57:[2,187],73:[2,187],78:[2,187],86:[2,187],91:[2,187],93:[2,187],102:[2,187],103:82,104:[2,187],105:[2,187],106:[2,187],109:83,110:[2,187],111:67,118:[2,187],126:[2,187],128:[2,187],129:[2,187],132:[1,73],133:[2,187],134:[2,187],135:[2,187],136:[2,187],137:[2,187]},{1:[2,188],6:[2,188],25:[2,188],26:[2,188],49:[2,188],54:[2,188],57:[2,188],73:[2,188],78:[2,188],86:[2,188],91:[2,188],93:[2,188],102:[2,188],103:82,104:[2,188],105:[2,188],106:[2,188],109:83,110:[2,188],111:67,118:[2,188],126:[2,188],128:[2,188],129:[2,188],132:[1,73],133:[2,188],134:[2,188],135:[2,188],136:[2,188],137:[2,188]},{1:[2,189],6:[2,189],25:[2,189],26:[2,189],49:[2,189],54:[2,189],57:[2,189],66:[2,71],67:[2,71],68:[2,71],69:[2,71],71:[2,71],73:[2,189],74:[2,71],78:[2,189],84:[2,71],85:[2,71],86:[2,189],91:[2,189],93:[2,189],102:[2,189],104:[2,189],105:[2,189],106:[2,189],110:[2,189],118:[2,189],126:[2,189],128:[2,189],129:[2,189],132:[2,189],133:[2,189],134:[2,189],135:[2,189],136:[2,189],137:[2,189]},{62:88,66:[1,90],67:[1,91],68:[1,92],69:[1,93],70:94,71:[1,95],74:[1,96],81:87,84:[1,89],85:[2,107]},{62:98,66:[1,90],67:[1,91],68:[1,92],69:[1,93],70:94,71:[1,95],74:[1,96],81:97,84:[1,89],85:[2,107]},{66:[2,74],67:[2,74],68:[2,74],69:[2,74],71:[2,74],74:[2,74],84:[2,74],85:[2,74]},{1:[2,190],6:[2,190],25:[2,190],26:[2,190],49:[2,190],54:[2,190],57:[2,190],66:[2,71],67:[2,71],68:[2,71],69:[2,71],71:[2,71],73:[2,190],74:[2,71],78:[2,190],84:[2,71],85:[2,71],86:[2,190],91:[2,190],93:[2,190],102:[2,190],104:[2,190],105:[2,190],106:[2,190],110:[2,190],118:[2,190],126:[2,190],128:[2,190],129:[2,190],132:[2,190],133:[2,190],134:[2,190],135:[2,190],136:[2,190],137:[2,190]},{1:[2,191],6:[2,191],25:[2,191],26:[2,191],49:[2,191],54:[2,191],57:[2,191],73:[2,191],78:[2,191],86:[2,191],91:[2,191],93:[2,191],102:[2,191],104:[2,191],105:[2,191],106:[2,191],110:[2,191],118:[2,191],126:[2,191],128:[2,191],129:[2,191],132:[2,191],133:[2,191],134:[2,191],135:[2,191],136:[2,191],137:[2,191]},{1:[2,192],6:[2,192],25:[2,192],26:[2,192],49:[2,192],54:[2,192],57:[2,192],73:[2,192],78:[2,192],86:[2,192],91:[2,192],93:[2,192],102:[2,192],104:[2,192],105:[2,192],106:[2,192],110:[2,192],118:[2,192],126:[2,192],128:[2,192],129:[2,192],132:[2,192],133:[2,192],134:[2,192],135:[2,192],136:[2,192],137:[2,192]},{6:[1,207],7:205,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,206],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:208,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{24:209,25:[1,112],125:[1,210]},{1:[2,132],6:[2,132],25:[2,132],26:[2,132],49:[2,132],54:[2,132],57:[2,132],73:[2,132],78:[2,132],86:[2,132],91:[2,132],93:[2,132],97:211,98:[1,212],99:[1,213],102:[2,132],104:[2,132],105:[2,132],106:[2,132],110:[2,132],118:[2,132],126:[2,132],128:[2,132],129:[2,132],132:[2,132],133:[2,132],134:[2,132],135:[2,132],136:[2,132],137:[2,132]},{1:[2,146],6:[2,146],25:[2,146],26:[2,146],49:[2,146],54:[2,146],57:[2,146],73:[2,146],78:[2,146],86:[2,146],91:[2,146],93:[2,146],102:[2,146],104:[2,146],105:[2,146],106:[2,146],110:[2,146],118:[2,146],126:[2,146],128:[2,146],129:[2,146],132:[2,146],133:[2,146],134:[2,146],135:[2,146],136:[2,146],137:[2,146]},{1:[2,154],6:[2,154],25:[2,154],26:[2,154],49:[2,154],54:[2,154],57:[2,154],73:[2,154],78:[2,154],86:[2,154],91:[2,154],93:[2,154],102:[2,154],104:[2,154],105:[2,154],106:[2,154],110:[2,154],118:[2,154],126:[2,154],128:[2,154],129:[2,154],132:[2,154],133:[2,154],134:[2,154],135:[2,154],136:[2,154],137:[2,154]},{25:[1,214],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{120:215,122:216,123:[1,217]},{1:[2,96],6:[2,96],25:[2,96],26:[2,96],49:[2,96],54:[2,96],57:[2,96],73:[2,96],78:[2,96],86:[2,96],91:[2,96],93:[2,96],102:[2,96],104:[2,96],105:[2,96],106:[2,96],110:[2,96],118:[2,96],126:[2,96],128:[2,96],129:[2,96],132:[2,96],133:[2,96],134:[2,96],135:[2,96],136:[2,96],137:[2,96]},{7:218,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,99],6:[2,99],24:219,25:[1,112],26:[2,99],49:[2,99],54:[2,99],57:[2,99],66:[2,71],67:[2,71],68:[2,71],69:[2,71],71:[2,71],73:[2,99],74:[2,71],78:[2,99],80:[1,220],84:[2,71],85:[2,71],86:[2,99],91:[2,99],93:[2,99],102:[2,99],104:[2,99],105:[2,99],106:[2,99],110:[2,99],118:[2,99],126:[2,99],128:[2,99],129:[2,99],132:[2,99],133:[2,99],134:[2,99],135:[2,99],136:[2,99],137:[2,99]},{1:[2,139],6:[2,139],25:[2,139],26:[2,139],49:[2,139],54:[2,139],57:[2,139],73:[2,139],78:[2,139],86:[2,139],91:[2,139],93:[2,139],102:[2,139],103:82,104:[2,139],105:[2,139],106:[2,139],109:83,110:[2,139],111:67,118:[2,139],126:[2,139],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,45],6:[2,45],26:[2,45],102:[2,45],103:82,104:[2,45],106:[2,45],109:83,110:[2,45],111:67,126:[2,45],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[1,72],102:[1,221]},{4:222,5:3,7:4,8:5,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,128],25:[2,128],54:[2,128],57:[1,224],91:[2,128],92:223,93:[1,188],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,114],6:[2,114],25:[2,114],26:[2,114],40:[2,114],49:[2,114],54:[2,114],57:[2,114],66:[2,114],67:[2,114],68:[2,114],69:[2,114],71:[2,114],73:[2,114],74:[2,114],78:[2,114],84:[2,114],85:[2,114],86:[2,114],91:[2,114],93:[2,114],102:[2,114],104:[2,114],105:[2,114],106:[2,114],110:[2,114],116:[2,114],117:[2,114],118:[2,114],126:[2,114],128:[2,114],129:[2,114],132:[2,114],133:[2,114],134:[2,114],135:[2,114],136:[2,114],137:[2,114]},{6:[2,52],25:[2,52],53:225,54:[1,226],91:[2,52]},{6:[2,123],25:[2,123],26:[2,123],54:[2,123],86:[2,123],91:[2,123]},{7:197,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,143],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],87:227,88:[1,56],89:[1,57],90:[1,55],94:142,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,129],25:[2,129],26:[2,129],54:[2,129],86:[2,129],91:[2,129]},{1:[2,113],6:[2,113],25:[2,113],26:[2,113],40:[2,113],43:[2,113],49:[2,113],54:[2,113],57:[2,113],66:[2,113],67:[2,113],68:[2,113],69:[2,113],71:[2,113],73:[2,113],74:[2,113],78:[2,113],80:[2,113],84:[2,113],85:[2,113],86:[2,113],91:[2,113],93:[2,113],102:[2,113],104:[2,113],105:[2,113],106:[2,113],110:[2,113],116:[2,113],117:[2,113],118:[2,113],126:[2,113],128:[2,113],129:[2,113],130:[2,113],131:[2,113],132:[2,113],133:[2,113],134:[2,113],135:[2,113],136:[2,113],137:[2,113],138:[2,113]},{24:228,25:[1,112],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,142],6:[2,142],25:[2,142],26:[2,142],49:[2,142],54:[2,142],57:[2,142],73:[2,142],78:[2,142],86:[2,142],91:[2,142],93:[2,142],102:[2,142],103:82,104:[1,63],105:[1,229],106:[1,64],109:83,110:[1,66],111:67,118:[2,142],126:[2,142],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,144],6:[2,144],25:[2,144],26:[2,144],49:[2,144],54:[2,144],57:[2,144],73:[2,144],78:[2,144],86:[2,144],91:[2,144],93:[2,144],102:[2,144],103:82,104:[1,63],105:[1,230],106:[1,64],109:83,110:[1,66],111:67,118:[2,144],126:[2,144],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,150],6:[2,150],25:[2,150],26:[2,150],49:[2,150],54:[2,150],57:[2,150],73:[2,150],78:[2,150],86:[2,150],91:[2,150],93:[2,150],102:[2,150],104:[2,150],105:[2,150],106:[2,150],110:[2,150],118:[2,150],126:[2,150],128:[2,150],129:[2,150],132:[2,150],133:[2,150],134:[2,150],135:[2,150],136:[2,150],137:[2,150]},{1:[2,151],6:[2,151],25:[2,151],26:[2,151],49:[2,151],54:[2,151],57:[2,151],73:[2,151],78:[2,151],86:[2,151],91:[2,151],93:[2,151],102:[2,151],103:82,104:[1,63],105:[2,151],106:[1,64],109:83,110:[1,66],111:67,118:[2,151],126:[2,151],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,155],6:[2,155],25:[2,155],26:[2,155],49:[2,155],54:[2,155],57:[2,155],73:[2,155],78:[2,155],86:[2,155],91:[2,155],93:[2,155],102:[2,155],104:[2,155],105:[2,155],106:[2,155],110:[2,155],118:[2,155],126:[2,155],128:[2,155],129:[2,155],132:[2,155],133:[2,155],134:[2,155],135:[2,155],136:[2,155],137:[2,155]},{116:[2,157],117:[2,157]},{27:155,28:[1,71],44:156,58:157,59:158,76:[1,68],89:[1,109],90:[1,110],113:231,115:154},{54:[1,232],116:[2,163],117:[2,163]},{54:[2,159],116:[2,159],117:[2,159]},{54:[2,160],116:[2,160],117:[2,160]},{54:[2,161],116:[2,161],117:[2,161]},{54:[2,162],116:[2,162],117:[2,162]},{1:[2,156],6:[2,156],25:[2,156],26:[2,156],49:[2,156],54:[2,156],57:[2,156],73:[2,156],78:[2,156],86:[2,156],91:[2,156],93:[2,156],102:[2,156],104:[2,156],105:[2,156],106:[2,156],110:[2,156],118:[2,156],126:[2,156],128:[2,156],129:[2,156],132:[2,156],133:[2,156],134:[2,156],135:[2,156],136:[2,156],137:[2,156]},{7:233,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:234,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,52],25:[2,52],53:235,54:[1,236],78:[2,52]},{6:[2,91],25:[2,91],26:[2,91],54:[2,91],78:[2,91]},{6:[2,38],25:[2,38],26:[2,38],43:[1,237],54:[2,38],78:[2,38]},{6:[2,41],25:[2,41],26:[2,41],54:[2,41],78:[2,41]},{6:[2,42],25:[2,42],26:[2,42],43:[2,42],54:[2,42],78:[2,42]},{6:[2,43],25:[2,43],26:[2,43],43:[2,43],54:[2,43],78:[2,43]},{6:[2,44],25:[2,44],26:[2,44],43:[2,44],54:[2,44],78:[2,44]},{1:[2,4],6:[2,4],26:[2,4],102:[2,4]},{1:[2,194],6:[2,194],25:[2,194],26:[2,194],49:[2,194],54:[2,194],57:[2,194],73:[2,194],78:[2,194],86:[2,194],91:[2,194],93:[2,194],102:[2,194],103:82,104:[2,194],105:[2,194],106:[2,194],109:83,110:[2,194],111:67,118:[2,194],126:[2,194],128:[2,194],129:[2,194],132:[1,73],133:[1,76],134:[2,194],135:[2,194],136:[2,194],137:[2,194]},{1:[2,195],6:[2,195],25:[2,195],26:[2,195],49:[2,195],54:[2,195],57:[2,195],73:[2,195],78:[2,195],86:[2,195],91:[2,195],93:[2,195],102:[2,195],103:82,104:[2,195],105:[2,195],106:[2,195],109:83,110:[2,195],111:67,118:[2,195],126:[2,195],128:[2,195],129:[2,195],132:[1,73],133:[1,76],134:[2,195],135:[2,195],136:[2,195],137:[2,195]},{1:[2,196],6:[2,196],25:[2,196],26:[2,196],49:[2,196],54:[2,196],57:[2,196],73:[2,196],78:[2,196],86:[2,196],91:[2,196],93:[2,196],102:[2,196],103:82,104:[2,196],105:[2,196],106:[2,196],109:83,110:[2,196],111:67,118:[2,196],126:[2,196],128:[2,196],129:[2,196],132:[1,73],133:[2,196],134:[2,196],135:[2,196],136:[2,196],137:[2,196]},{1:[2,197],6:[2,197],25:[2,197],26:[2,197],49:[2,197],54:[2,197],57:[2,197],73:[2,197],78:[2,197],86:[2,197],91:[2,197],93:[2,197],102:[2,197],103:82,104:[2,197],105:[2,197],106:[2,197],109:83,110:[2,197],111:67,118:[2,197],126:[2,197],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[2,197],135:[2,197],136:[2,197],137:[2,197]},{1:[2,198],6:[2,198],25:[2,198],26:[2,198],49:[2,198],54:[2,198],57:[2,198],73:[2,198],78:[2,198],86:[2,198],91:[2,198],93:[2,198],102:[2,198],103:82,104:[2,198],105:[2,198],106:[2,198],109:83,110:[2,198],111:67,118:[2,198],126:[2,198],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[2,198],136:[2,198],137:[1,80]},{1:[2,199],6:[2,199],25:[2,199],26:[2,199],49:[2,199],54:[2,199],57:[2,199],73:[2,199],78:[2,199],86:[2,199],91:[2,199],93:[2,199],102:[2,199],103:82,104:[2,199],105:[2,199],106:[2,199],109:83,110:[2,199],111:67,118:[2,199],126:[2,199],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[2,199],137:[1,80]},{1:[2,200],6:[2,200],25:[2,200],26:[2,200],49:[2,200],54:[2,200],57:[2,200],73:[2,200],78:[2,200],86:[2,200],91:[2,200],93:[2,200],102:[2,200],103:82,104:[2,200],105:[2,200],106:[2,200],109:83,110:[2,200],111:67,118:[2,200],126:[2,200],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[2,200],136:[2,200],137:[2,200]},{1:[2,185],6:[2,185],25:[2,185],26:[2,185],49:[2,185],54:[2,185],57:[2,185],73:[2,185],78:[2,185],86:[2,185],91:[2,185],93:[2,185],102:[2,185],103:82,104:[1,63],105:[2,185],106:[1,64],109:83,110:[1,66],111:67,118:[2,185],126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,184],6:[2,184],25:[2,184],26:[2,184],49:[2,184],54:[2,184],57:[2,184],73:[2,184],78:[2,184],86:[2,184],91:[2,184],93:[2,184],102:[2,184],103:82,104:[1,63],105:[2,184],106:[1,64],109:83,110:[1,66],111:67,118:[2,184],126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,103],6:[2,103],25:[2,103],26:[2,103],49:[2,103],54:[2,103],57:[2,103],66:[2,103],67:[2,103],68:[2,103],69:[2,103],71:[2,103],73:[2,103],74:[2,103],78:[2,103],84:[2,103],85:[2,103],86:[2,103],91:[2,103],93:[2,103],102:[2,103],104:[2,103],105:[2,103],106:[2,103],110:[2,103],118:[2,103],126:[2,103],128:[2,103],129:[2,103],132:[2,103],133:[2,103],134:[2,103],135:[2,103],136:[2,103],137:[2,103]},{1:[2,79],6:[2,79],25:[2,79],26:[2,79],40:[2,79],49:[2,79],54:[2,79],57:[2,79],66:[2,79],67:[2,79],68:[2,79],69:[2,79],71:[2,79],73:[2,79],74:[2,79],78:[2,79],80:[2,79],84:[2,79],85:[2,79],86:[2,79],91:[2,79],93:[2,79],102:[2,79],104:[2,79],105:[2,79],106:[2,79],110:[2,79],118:[2,79],126:[2,79],128:[2,79],129:[2,79],130:[2,79],131:[2,79],132:[2,79],133:[2,79],134:[2,79],135:[2,79],136:[2,79],137:[2,79],138:[2,79]},{1:[2,80],6:[2,80],25:[2,80],26:[2,80],40:[2,80],49:[2,80],54:[2,80],57:[2,80],66:[2,80],67:[2,80],68:[2,80],69:[2,80],71:[2,80],73:[2,80],74:[2,80],78:[2,80],80:[2,80],84:[2,80],85:[2,80],86:[2,80],91:[2,80],93:[2,80],102:[2,80],104:[2,80],105:[2,80],106:[2,80],110:[2,80],118:[2,80],126:[2,80],128:[2,80],129:[2,80],130:[2,80],131:[2,80],132:[2,80],133:[2,80],134:[2,80],135:[2,80],136:[2,80],137:[2,80],138:[2,80]},{1:[2,81],6:[2,81],25:[2,81],26:[2,81],40:[2,81],49:[2,81],54:[2,81],57:[2,81],66:[2,81],67:[2,81],68:[2,81],69:[2,81],71:[2,81],73:[2,81],74:[2,81],78:[2,81],80:[2,81],84:[2,81],85:[2,81],86:[2,81],91:[2,81],93:[2,81],102:[2,81],104:[2,81],105:[2,81],106:[2,81],110:[2,81],118:[2,81],126:[2,81],128:[2,81],129:[2,81],130:[2,81],131:[2,81],132:[2,81],133:[2,81],134:[2,81],135:[2,81],136:[2,81],137:[2,81],138:[2,81]},{1:[2,82],6:[2,82],25:[2,82],26:[2,82],40:[2,82],49:[2,82],54:[2,82],57:[2,82],66:[2,82],67:[2,82],68:[2,82],69:[2,82],71:[2,82],73:[2,82],74:[2,82],78:[2,82],80:[2,82],84:[2,82],85:[2,82],86:[2,82],91:[2,82],93:[2,82],102:[2,82],104:[2,82],105:[2,82],106:[2,82],110:[2,82],118:[2,82],126:[2,82],128:[2,82],129:[2,82],130:[2,82],131:[2,82],132:[2,82],133:[2,82],134:[2,82],135:[2,82],136:[2,82],137:[2,82],138:[2,82]},{73:[1,238]},{57:[1,189],73:[2,87],92:239,93:[1,188],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{73:[2,88]},{7:240,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,73:[2,122],76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{11:[2,116],28:[2,116],30:[2,116],31:[2,116],33:[2,116],34:[2,116],35:[2,116],36:[2,116],37:[2,116],38:[2,116],45:[2,116],46:[2,116],47:[2,116],51:[2,116],52:[2,116],73:[2,116],76:[2,116],79:[2,116],83:[2,116],88:[2,116],89:[2,116],90:[2,116],96:[2,116],100:[2,116],101:[2,116],104:[2,116],106:[2,116],108:[2,116],110:[2,116],119:[2,116],125:[2,116],127:[2,116],128:[2,116],129:[2,116],130:[2,116],131:[2,116]},{11:[2,117],28:[2,117],30:[2,117],31:[2,117],33:[2,117],34:[2,117],35:[2,117],36:[2,117],37:[2,117],38:[2,117],45:[2,117],46:[2,117],47:[2,117],51:[2,117],52:[2,117],73:[2,117],76:[2,117],79:[2,117],83:[2,117],88:[2,117],89:[2,117],90:[2,117],96:[2,117],100:[2,117],101:[2,117],104:[2,117],106:[2,117],108:[2,117],110:[2,117],119:[2,117],125:[2,117],127:[2,117],128:[2,117],129:[2,117],130:[2,117],131:[2,117]},{1:[2,86],6:[2,86],25:[2,86],26:[2,86],40:[2,86],49:[2,86],54:[2,86],57:[2,86],66:[2,86],67:[2,86],68:[2,86],69:[2,86],71:[2,86],73:[2,86],74:[2,86],78:[2,86],80:[2,86],84:[2,86],85:[2,86],86:[2,86],91:[2,86],93:[2,86],102:[2,86],104:[2,86],105:[2,86],106:[2,86],110:[2,86],118:[2,86],126:[2,86],128:[2,86],129:[2,86],130:[2,86],131:[2,86],132:[2,86],133:[2,86],134:[2,86],135:[2,86],136:[2,86],137:[2,86],138:[2,86]},{1:[2,104],6:[2,104],25:[2,104],26:[2,104],49:[2,104],54:[2,104],57:[2,104],66:[2,104],67:[2,104],68:[2,104],69:[2,104],71:[2,104],73:[2,104],74:[2,104],78:[2,104],84:[2,104],85:[2,104],86:[2,104],91:[2,104],93:[2,104],102:[2,104],104:[2,104],105:[2,104],106:[2,104],110:[2,104],118:[2,104],126:[2,104],128:[2,104],129:[2,104],132:[2,104],133:[2,104],134:[2,104],135:[2,104],136:[2,104],137:[2,104]},{1:[2,35],6:[2,35],25:[2,35],26:[2,35],49:[2,35],54:[2,35],57:[2,35],73:[2,35],78:[2,35],86:[2,35],91:[2,35],93:[2,35],102:[2,35],103:82,104:[2,35],105:[2,35],106:[2,35],109:83,110:[2,35],111:67,118:[2,35],126:[2,35],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{7:241,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:242,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,109],6:[2,109],25:[2,109],26:[2,109],49:[2,109],54:[2,109],57:[2,109],66:[2,109],67:[2,109],68:[2,109],69:[2,109],71:[2,109],73:[2,109],74:[2,109],78:[2,109],84:[2,109],85:[2,109],86:[2,109],91:[2,109],93:[2,109],102:[2,109],104:[2,109],105:[2,109],106:[2,109],110:[2,109],118:[2,109],126:[2,109],128:[2,109],129:[2,109],132:[2,109],133:[2,109],134:[2,109],135:[2,109],136:[2,109],137:[2,109]},{6:[2,52],25:[2,52],53:243,54:[1,226],86:[2,52]},{6:[2,128],25:[2,128],26:[2,128],54:[2,128],57:[1,244],86:[2,128],91:[2,128],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{50:245,51:[1,58],52:[1,59]},{6:[2,53],25:[2,53],26:[2,53],27:105,28:[1,71],44:106,55:246,56:104,58:107,59:108,76:[1,68],89:[1,109],90:[1,110]},{6:[1,247],25:[1,248]},{6:[2,60],25:[2,60],26:[2,60],49:[2,60],54:[2,60]},{7:249,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,23],6:[2,23],25:[2,23],26:[2,23],49:[2,23],54:[2,23],57:[2,23],73:[2,23],78:[2,23],86:[2,23],91:[2,23],93:[2,23],98:[2,23],99:[2,23],102:[2,23],104:[2,23],105:[2,23],106:[2,23],110:[2,23],118:[2,23],121:[2,23],123:[2,23],126:[2,23],128:[2,23],129:[2,23],132:[2,23],133:[2,23],134:[2,23],135:[2,23],136:[2,23],137:[2,23]},{6:[1,72],26:[1,250]},{1:[2,201],6:[2,201],25:[2,201],26:[2,201],49:[2,201],54:[2,201],57:[2,201],73:[2,201],78:[2,201],86:[2,201],91:[2,201],93:[2,201],102:[2,201],103:82,104:[2,201],105:[2,201],106:[2,201],109:83,110:[2,201],111:67,118:[2,201],126:[2,201],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{7:251,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:252,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,204],6:[2,204],25:[2,204],26:[2,204],49:[2,204],54:[2,204],57:[2,204],73:[2,204],78:[2,204],86:[2,204],91:[2,204],93:[2,204],102:[2,204],103:82,104:[2,204],105:[2,204],106:[2,204],109:83,110:[2,204],111:67,118:[2,204],126:[2,204],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,183],6:[2,183],25:[2,183],26:[2,183],49:[2,183],54:[2,183],57:[2,183],73:[2,183],78:[2,183],86:[2,183],91:[2,183],93:[2,183],102:[2,183],104:[2,183],105:[2,183],106:[2,183],110:[2,183],118:[2,183],126:[2,183],128:[2,183],129:[2,183],132:[2,183],133:[2,183],134:[2,183],135:[2,183],136:[2,183],137:[2,183]},{7:253,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,133],6:[2,133],25:[2,133],26:[2,133],49:[2,133],54:[2,133],57:[2,133],73:[2,133],78:[2,133],86:[2,133],91:[2,133],93:[2,133],98:[1,254],102:[2,133],104:[2,133],105:[2,133],106:[2,133],110:[2,133],118:[2,133],126:[2,133],128:[2,133],129:[2,133],132:[2,133],133:[2,133],134:[2,133],135:[2,133],136:[2,133],137:[2,133]},{24:255,25:[1,112]},{24:258,25:[1,112],27:256,28:[1,71],59:257,76:[1,68]},{120:259,122:216,123:[1,217]},{26:[1,260],121:[1,261],122:262,123:[1,217]},{26:[2,176],121:[2,176],123:[2,176]},{7:264,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],95:263,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,97],6:[2,97],24:265,25:[1,112],26:[2,97],49:[2,97],54:[2,97],57:[2,97],73:[2,97],78:[2,97],86:[2,97],91:[2,97],93:[2,97],102:[2,97],103:82,104:[1,63],105:[2,97],106:[1,64],109:83,110:[1,66],111:67,118:[2,97],126:[2,97],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,100],6:[2,100],25:[2,100],26:[2,100],49:[2,100],54:[2,100],57:[2,100],73:[2,100],78:[2,100],86:[2,100],91:[2,100],93:[2,100],102:[2,100],104:[2,100],105:[2,100],106:[2,100],110:[2,100],118:[2,100],126:[2,100],128:[2,100],129:[2,100],132:[2,100],133:[2,100],134:[2,100],135:[2,100],136:[2,100],137:[2,100]},{7:266,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,140],6:[2,140],25:[2,140],26:[2,140],49:[2,140],54:[2,140],57:[2,140],66:[2,140],67:[2,140],68:[2,140],69:[2,140],71:[2,140],73:[2,140],74:[2,140],78:[2,140],84:[2,140],85:[2,140],86:[2,140],91:[2,140],93:[2,140],102:[2,140],104:[2,140],105:[2,140],106:[2,140],110:[2,140],118:[2,140],126:[2,140],128:[2,140],129:[2,140],132:[2,140],133:[2,140],134:[2,140],135:[2,140],136:[2,140],137:[2,140]},{6:[1,72],26:[1,267]},{7:268,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,66],11:[2,117],25:[2,66],28:[2,117],30:[2,117],31:[2,117],33:[2,117],34:[2,117],35:[2,117],36:[2,117],37:[2,117],38:[2,117],45:[2,117],46:[2,117],47:[2,117],51:[2,117],52:[2,117],54:[2,66],76:[2,117],79:[2,117],83:[2,117],88:[2,117],89:[2,117],90:[2,117],91:[2,66],96:[2,117],100:[2,117],101:[2,117],104:[2,117],106:[2,117],108:[2,117],110:[2,117],119:[2,117],125:[2,117],127:[2,117],128:[2,117],129:[2,117],130:[2,117],131:[2,117]},{6:[1,270],25:[1,271],91:[1,269]},{6:[2,53],7:197,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[2,53],26:[2,53],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],86:[2,53],88:[1,56],89:[1,57],90:[1,55],91:[2,53],94:272,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,52],25:[2,52],26:[2,52],53:273,54:[1,226]},{1:[2,180],6:[2,180],25:[2,180],26:[2,180],49:[2,180],54:[2,180],57:[2,180],73:[2,180],78:[2,180],86:[2,180],91:[2,180],93:[2,180],102:[2,180],104:[2,180],105:[2,180],106:[2,180],110:[2,180],118:[2,180],121:[2,180],126:[2,180],128:[2,180],129:[2,180],132:[2,180],133:[2,180],134:[2,180],135:[2,180],136:[2,180],137:[2,180]},{7:274,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:275,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{116:[2,158],117:[2,158]},{27:155,28:[1,71],44:156,58:157,59:158,76:[1,68],89:[1,109],90:[1,110],115:276},{1:[2,165],6:[2,165],25:[2,165],26:[2,165],49:[2,165],54:[2,165],57:[2,165],73:[2,165],78:[2,165],86:[2,165],91:[2,165],93:[2,165],102:[2,165],103:82,104:[2,165],105:[1,277],106:[2,165],109:83,110:[2,165],111:67,118:[1,278],126:[2,165],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,166],6:[2,166],25:[2,166],26:[2,166],49:[2,166],54:[2,166],57:[2,166],73:[2,166],78:[2,166],86:[2,166],91:[2,166],93:[2,166],102:[2,166],103:82,104:[2,166],105:[1,279],106:[2,166],109:83,110:[2,166],111:67,118:[2,166],126:[2,166],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[1,281],25:[1,282],78:[1,280]},{6:[2,53],10:165,25:[2,53],26:[2,53],27:166,28:[1,71],29:167,30:[1,69],31:[1,70],41:283,42:164,44:168,46:[1,44],78:[2,53],89:[1,109]},{7:284,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,285],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,85],6:[2,85],25:[2,85],26:[2,85],40:[2,85],49:[2,85],54:[2,85],57:[2,85],66:[2,85],67:[2,85],68:[2,85],69:[2,85],71:[2,85],73:[2,85],74:[2,85],78:[2,85],80:[2,85],84:[2,85],85:[2,85],86:[2,85],91:[2,85],93:[2,85],102:[2,85],104:[2,85],105:[2,85],106:[2,85],110:[2,85],118:[2,85],126:[2,85],128:[2,85],129:[2,85],130:[2,85],131:[2,85],132:[2,85],133:[2,85],134:[2,85],135:[2,85],136:[2,85],137:[2,85],138:[2,85]},{7:286,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,73:[2,120],76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{73:[2,121],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,36],6:[2,36],25:[2,36],26:[2,36],49:[2,36],54:[2,36],57:[2,36],73:[2,36],78:[2,36],86:[2,36],91:[2,36],93:[2,36],102:[2,36],103:82,104:[2,36],105:[2,36],106:[2,36],109:83,110:[2,36],111:67,118:[2,36],126:[2,36],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{26:[1,287],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[1,270],25:[1,271],86:[1,288]},{6:[2,66],25:[2,66],26:[2,66],54:[2,66],86:[2,66],91:[2,66]},{24:289,25:[1,112]},{6:[2,56],25:[2,56],26:[2,56],49:[2,56],54:[2,56]},{27:105,28:[1,71],44:106,55:290,56:104,58:107,59:108,76:[1,68],89:[1,109],90:[1,110]},{6:[2,54],25:[2,54],26:[2,54],27:105,28:[1,71],44:106,48:291,54:[2,54],55:103,56:104,58:107,59:108,76:[1,68],89:[1,109],90:[1,110]},{6:[2,61],25:[2,61],26:[2,61],49:[2,61],54:[2,61],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,24],6:[2,24],25:[2,24],26:[2,24],49:[2,24],54:[2,24],57:[2,24],73:[2,24],78:[2,24],86:[2,24],91:[2,24],93:[2,24],98:[2,24],99:[2,24],102:[2,24],104:[2,24],105:[2,24],106:[2,24],110:[2,24],118:[2,24],121:[2,24],123:[2,24],126:[2,24],128:[2,24],129:[2,24],132:[2,24],133:[2,24],134:[2,24],135:[2,24],136:[2,24],137:[2,24]},{26:[1,292],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,203],6:[2,203],25:[2,203],26:[2,203],49:[2,203],54:[2,203],57:[2,203],73:[2,203],78:[2,203],86:[2,203],91:[2,203],93:[2,203],102:[2,203],103:82,104:[2,203],105:[2,203],106:[2,203],109:83,110:[2,203],111:67,118:[2,203],126:[2,203],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{24:293,25:[1,112],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{24:294,25:[1,112]},{1:[2,134],6:[2,134],25:[2,134],26:[2,134],49:[2,134],54:[2,134],57:[2,134],73:[2,134],78:[2,134],86:[2,134],91:[2,134],93:[2,134],102:[2,134],104:[2,134],105:[2,134],106:[2,134],110:[2,134],118:[2,134],126:[2,134],128:[2,134],129:[2,134],132:[2,134],133:[2,134],134:[2,134],135:[2,134],136:[2,134],137:[2,134]},{24:295,25:[1,112]},{24:296,25:[1,112]},{1:[2,138],6:[2,138],25:[2,138],26:[2,138],49:[2,138],54:[2,138],57:[2,138],73:[2,138],78:[2,138],86:[2,138],91:[2,138],93:[2,138],98:[2,138],102:[2,138],104:[2,138],105:[2,138],106:[2,138],110:[2,138],118:[2,138],126:[2,138],128:[2,138],129:[2,138],132:[2,138],133:[2,138],134:[2,138],135:[2,138],136:[2,138],137:[2,138]},{26:[1,297],121:[1,298],122:262,123:[1,217]},{1:[2,174],6:[2,174],25:[2,174],26:[2,174],49:[2,174],54:[2,174],57:[2,174],73:[2,174],78:[2,174],86:[2,174],91:[2,174],93:[2,174],102:[2,174],104:[2,174],105:[2,174],106:[2,174],110:[2,174],118:[2,174],126:[2,174],128:[2,174],129:[2,174],132:[2,174],133:[2,174],134:[2,174],135:[2,174],136:[2,174],137:[2,174]},{24:299,25:[1,112]},{26:[2,177],121:[2,177],123:[2,177]},{24:300,25:[1,112],54:[1,301]},{25:[2,130],54:[2,130],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,98],6:[2,98],25:[2,98],26:[2,98],49:[2,98],54:[2,98],57:[2,98],73:[2,98],78:[2,98],86:[2,98],91:[2,98],93:[2,98],102:[2,98],104:[2,98],105:[2,98],106:[2,98],110:[2,98],118:[2,98],126:[2,98],128:[2,98],129:[2,98],132:[2,98],133:[2,98],134:[2,98],135:[2,98],136:[2,98],137:[2,98]},{1:[2,101],6:[2,101],24:302,25:[1,112],26:[2,101],49:[2,101],54:[2,101],57:[2,101],73:[2,101],78:[2,101],86:[2,101],91:[2,101],93:[2,101],102:[2,101],103:82,104:[1,63],105:[2,101],106:[1,64],109:83,110:[1,66],111:67,118:[2,101],126:[2,101],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{102:[1,303]},{91:[1,304],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,115],6:[2,115],25:[2,115],26:[2,115],40:[2,115],49:[2,115],54:[2,115],57:[2,115],66:[2,115],67:[2,115],68:[2,115],69:[2,115],71:[2,115],73:[2,115],74:[2,115],78:[2,115],84:[2,115],85:[2,115],86:[2,115],91:[2,115],93:[2,115],102:[2,115],104:[2,115],105:[2,115],106:[2,115],110:[2,115],116:[2,115],117:[2,115],118:[2,115],126:[2,115],128:[2,115],129:[2,115],132:[2,115],133:[2,115],134:[2,115],135:[2,115],136:[2,115],137:[2,115]},{7:197,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],94:305,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:197,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,143],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],87:306,88:[1,56],89:[1,57],90:[1,55],94:142,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,124],25:[2,124],26:[2,124],54:[2,124],86:[2,124],91:[2,124]},{6:[1,270],25:[1,271],26:[1,307]},{1:[2,143],6:[2,143],25:[2,143],26:[2,143],49:[2,143],54:[2,143],57:[2,143],73:[2,143],78:[2,143],86:[2,143],91:[2,143],93:[2,143],102:[2,143],103:82,104:[1,63],105:[2,143],106:[1,64],109:83,110:[1,66],111:67,118:[2,143],126:[2,143],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,145],6:[2,145],25:[2,145],26:[2,145],49:[2,145],54:[2,145],57:[2,145],73:[2,145],78:[2,145],86:[2,145],91:[2,145],93:[2,145],102:[2,145],103:82,104:[1,63],105:[2,145],106:[1,64],109:83,110:[1,66],111:67,118:[2,145],126:[2,145],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{116:[2,164],117:[2,164]},{7:308,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:309,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:310,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,89],6:[2,89],25:[2,89],26:[2,89],40:[2,89],49:[2,89],54:[2,89],57:[2,89],66:[2,89],67:[2,89],68:[2,89],69:[2,89],71:[2,89],73:[2,89],74:[2,89],78:[2,89],84:[2,89],85:[2,89],86:[2,89],91:[2,89],93:[2,89],102:[2,89],104:[2,89],105:[2,89],106:[2,89],110:[2,89],116:[2,89],117:[2,89],118:[2,89],126:[2,89],128:[2,89],129:[2,89],132:[2,89],133:[2,89],134:[2,89],135:[2,89],136:[2,89],137:[2,89]},{10:165,27:166,28:[1,71],29:167,30:[1,69],31:[1,70],41:311,42:164,44:168,46:[1,44],89:[1,109]},{6:[2,90],10:165,25:[2,90],26:[2,90],27:166,28:[1,71],29:167,30:[1,69],31:[1,70],41:163,42:164,44:168,46:[1,44],54:[2,90],77:312,89:[1,109]},{6:[2,92],25:[2,92],26:[2,92],54:[2,92],78:[2,92]},{6:[2,39],25:[2,39],26:[2,39],54:[2,39],78:[2,39],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{7:313,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{73:[2,119],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,37],6:[2,37],25:[2,37],26:[2,37],49:[2,37],54:[2,37],57:[2,37],73:[2,37],78:[2,37],86:[2,37],91:[2,37],93:[2,37],102:[2,37],104:[2,37],105:[2,37],106:[2,37],110:[2,37],118:[2,37],126:[2,37],128:[2,37],129:[2,37],132:[2,37],133:[2,37],134:[2,37],135:[2,37],136:[2,37],137:[2,37]},{1:[2,110],6:[2,110],25:[2,110],26:[2,110],49:[2,110],54:[2,110],57:[2,110],66:[2,110],67:[2,110],68:[2,110],69:[2,110],71:[2,110],73:[2,110],74:[2,110],78:[2,110],84:[2,110],85:[2,110],86:[2,110],91:[2,110],93:[2,110],102:[2,110],104:[2,110],105:[2,110],106:[2,110],110:[2,110],118:[2,110],126:[2,110],128:[2,110],129:[2,110],132:[2,110],133:[2,110],134:[2,110],135:[2,110],136:[2,110],137:[2,110]},{1:[2,48],6:[2,48],25:[2,48],26:[2,48],49:[2,48],54:[2,48],57:[2,48],73:[2,48],78:[2,48],86:[2,48],91:[2,48],93:[2,48],102:[2,48],104:[2,48],105:[2,48],106:[2,48],110:[2,48],118:[2,48],126:[2,48],128:[2,48],129:[2,48],132:[2,48],133:[2,48],134:[2,48],135:[2,48],136:[2,48],137:[2,48]},{6:[2,57],25:[2,57],26:[2,57],49:[2,57],54:[2,57]},{6:[2,52],25:[2,52],26:[2,52],53:314,54:[1,199]},{1:[2,202],6:[2,202],25:[2,202],26:[2,202],49:[2,202],54:[2,202],57:[2,202],73:[2,202],78:[2,202],86:[2,202],91:[2,202],93:[2,202],102:[2,202],104:[2,202],105:[2,202],106:[2,202],110:[2,202],118:[2,202],126:[2,202],128:[2,202],129:[2,202],132:[2,202],133:[2,202],134:[2,202],135:[2,202],136:[2,202],137:[2,202]},{1:[2,181],6:[2,181],25:[2,181],26:[2,181],49:[2,181],54:[2,181],57:[2,181],73:[2,181],78:[2,181],86:[2,181],91:[2,181],93:[2,181],102:[2,181],104:[2,181],105:[2,181],106:[2,181],110:[2,181],118:[2,181],121:[2,181],126:[2,181],128:[2,181],129:[2,181],132:[2,181],133:[2,181],134:[2,181],135:[2,181],136:[2,181],137:[2,181]},{1:[2,135],6:[2,135],25:[2,135],26:[2,135],49:[2,135],54:[2,135],57:[2,135],73:[2,135],78:[2,135],86:[2,135],91:[2,135],93:[2,135],102:[2,135],104:[2,135],105:[2,135],106:[2,135],110:[2,135],118:[2,135],126:[2,135],128:[2,135],129:[2,135],132:[2,135],133:[2,135],134:[2,135],135:[2,135],136:[2,135],137:[2,135]},{1:[2,136],6:[2,136],25:[2,136],26:[2,136],49:[2,136],54:[2,136],57:[2,136],73:[2,136],78:[2,136],86:[2,136],91:[2,136],93:[2,136],98:[2,136],102:[2,136],104:[2,136],105:[2,136],106:[2,136],110:[2,136],118:[2,136],126:[2,136],128:[2,136],129:[2,136],132:[2,136],133:[2,136],134:[2,136],135:[2,136],136:[2,136],137:[2,136]},{1:[2,137],6:[2,137],25:[2,137],26:[2,137],49:[2,137],54:[2,137],57:[2,137],73:[2,137],78:[2,137],86:[2,137],91:[2,137],93:[2,137],98:[2,137],102:[2,137],104:[2,137],105:[2,137],106:[2,137],110:[2,137],118:[2,137],126:[2,137],128:[2,137],129:[2,137],132:[2,137],133:[2,137],134:[2,137],135:[2,137],136:[2,137],137:[2,137]},{1:[2,172],6:[2,172],25:[2,172],26:[2,172],49:[2,172],54:[2,172],57:[2,172],73:[2,172],78:[2,172],86:[2,172],91:[2,172],93:[2,172],102:[2,172],104:[2,172],105:[2,172],106:[2,172],110:[2,172],118:[2,172],126:[2,172],128:[2,172],129:[2,172],132:[2,172],133:[2,172],134:[2,172],135:[2,172],136:[2,172],137:[2,172]},{24:315,25:[1,112]},{26:[1,316]},{6:[1,317],26:[2,178],121:[2,178],123:[2,178]},{7:318,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,102],6:[2,102],25:[2,102],26:[2,102],49:[2,102],54:[2,102],57:[2,102],73:[2,102],78:[2,102],86:[2,102],91:[2,102],93:[2,102],102:[2,102],104:[2,102],105:[2,102],106:[2,102],110:[2,102],118:[2,102],126:[2,102],128:[2,102],129:[2,102],132:[2,102],133:[2,102],134:[2,102],135:[2,102],136:[2,102],137:[2,102]},{1:[2,141],6:[2,141],25:[2,141],26:[2,141],49:[2,141],54:[2,141],57:[2,141],66:[2,141],67:[2,141],68:[2,141],69:[2,141],71:[2,141],73:[2,141],74:[2,141],78:[2,141],84:[2,141],85:[2,141],86:[2,141],91:[2,141],93:[2,141],102:[2,141],104:[2,141],105:[2,141],106:[2,141],110:[2,141],118:[2,141],126:[2,141],128:[2,141],129:[2,141],132:[2,141],133:[2,141],134:[2,141],135:[2,141],136:[2,141],137:[2,141]},{1:[2,118],6:[2,118],25:[2,118],26:[2,118],49:[2,118],54:[2,118],57:[2,118],66:[2,118],67:[2,118],68:[2,118],69:[2,118],71:[2,118],73:[2,118],74:[2,118],78:[2,118],84:[2,118],85:[2,118],86:[2,118],91:[2,118],93:[2,118],102:[2,118],104:[2,118],105:[2,118],106:[2,118],110:[2,118],118:[2,118],126:[2,118],128:[2,118],129:[2,118],132:[2,118],133:[2,118],134:[2,118],135:[2,118],136:[2,118],137:[2,118]},{6:[2,125],25:[2,125],26:[2,125],54:[2,125],86:[2,125],91:[2,125]},{6:[2,52],25:[2,52],26:[2,52],53:319,54:[1,226]},{6:[2,126],25:[2,126],26:[2,126],54:[2,126],86:[2,126],91:[2,126]},{1:[2,167],6:[2,167],25:[2,167],26:[2,167],49:[2,167],54:[2,167],57:[2,167],73:[2,167],78:[2,167],86:[2,167],91:[2,167],93:[2,167],102:[2,167],103:82,104:[2,167],105:[2,167],106:[2,167],109:83,110:[2,167],111:67,118:[1,320],126:[2,167],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,169],6:[2,169],25:[2,169],26:[2,169],49:[2,169],54:[2,169],57:[2,169],73:[2,169],78:[2,169],86:[2,169],91:[2,169],93:[2,169],102:[2,169],103:82,104:[2,169],105:[1,321],106:[2,169],109:83,110:[2,169],111:67,118:[2,169],126:[2,169],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,168],6:[2,168],25:[2,168],26:[2,168],49:[2,168],54:[2,168],57:[2,168],73:[2,168],78:[2,168],86:[2,168],91:[2,168],93:[2,168],102:[2,168],103:82,104:[2,168],105:[2,168],106:[2,168],109:83,110:[2,168],111:67,118:[2,168],126:[2,168],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[2,93],25:[2,93],26:[2,93],54:[2,93],78:[2,93]},{6:[2,52],25:[2,52],26:[2,52],53:322,54:[1,236]},{26:[1,323],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[1,247],25:[1,248],26:[1,324]},{26:[1,325]},{1:[2,175],6:[2,175],25:[2,175],26:[2,175],49:[2,175],54:[2,175],57:[2,175],73:[2,175],78:[2,175],86:[2,175],91:[2,175],93:[2,175],102:[2,175],104:[2,175],105:[2,175],106:[2,175],110:[2,175],118:[2,175],126:[2,175],128:[2,175],129:[2,175],132:[2,175],133:[2,175],134:[2,175],135:[2,175],136:[2,175],137:[2,175]},{26:[2,179],121:[2,179],123:[2,179]},{25:[2,131],54:[2,131],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[1,270],25:[1,271],26:[1,326]},{7:327,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:328,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[1,281],25:[1,282],26:[1,329]},{6:[2,40],25:[2,40],26:[2,40],54:[2,40],78:[2,40]},{6:[2,58],25:[2,58],26:[2,58],49:[2,58],54:[2,58]},{1:[2,173],6:[2,173],25:[2,173],26:[2,173],49:[2,173],54:[2,173],57:[2,173],73:[2,173],78:[2,173],86:[2,173],91:[2,173],93:[2,173],102:[2,173],104:[2,173],105:[2,173],106:[2,173],110:[2,173],118:[2,173],126:[2,173],128:[2,173],129:[2,173],132:[2,173],133:[2,173],134:[2,173],135:[2,173],136:[2,173],137:[2,173]},{6:[2,127],25:[2,127],26:[2,127],54:[2,127],86:[2,127],91:[2,127]},{1:[2,170],6:[2,170],25:[2,170],26:[2,170],49:[2,170],54:[2,170],57:[2,170],73:[2,170],78:[2,170],86:[2,170],91:[2,170],93:[2,170],102:[2,170],103:82,104:[2,170],105:[2,170],106:[2,170],109:83,110:[2,170],111:67,118:[2,170],126:[2,170],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,171],6:[2,171],25:[2,171],26:[2,171],49:[2,171],54:[2,171],57:[2,171],73:[2,171],78:[2,171],86:[2,171],91:[2,171],93:[2,171],102:[2,171],103:82,104:[2,171],105:[2,171],106:[2,171],109:83,110:[2,171],111:67,118:[2,171],126:[2,171],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[2,94],25:[2,94],26:[2,94],54:[2,94],78:[2,94]}], +defaultActions: {58:[2,50],59:[2,51],89:[2,108],186:[2,88]}, +parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var e = new Error(str) + e.location = hash.loc + throw e; + } +}, +parse: function parse(input) { + var self = this, stack = [0], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1; + this.lexer.setInput(input); + this.lexer.yy = this.yy; + this.yy.lexer = this.lexer; + this.yy.parser = this; + if (typeof this.lexer.yylloc == 'undefined') { + this.lexer.yylloc = {}; + } + var yyloc = this.lexer.yylloc; + lstack.push(yyloc); + var ranges = this.lexer.options && this.lexer.options.ranges; + if (typeof this.yy.parseError === 'function') { + this.parseError = this.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function popStack(n) { + stack.length = stack.length - 2 * n; + vstack.length = vstack.length - n; + lstack.length = lstack.length - n; + } + function lex() { + var token; + token = self.lexer.lex() || EOF; + if (typeof token !== 'number') { + token = self.symbols_[token] || token; + } + return token; + } + var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == 'undefined') { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === 'undefined' || !action.length || !action[0]) { + var errStr = ''; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push('\'' + this.terminals_[p] + '\''); + } + } + if (this.lexer.showPosition) { + errStr = 'Expecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\''; + } else { + errStr = 'Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\''); + } + if (this.lexer.yylloc.first_line !== yyloc.first_line) yyloc = this.lexer.yylloc; + this.parseError(errStr, { + text: this.lexer.match, + token: this.terminals_[symbol] || symbol, + line: this.lexer.yylineno, + loc: yyloc, + expected: expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(this.lexer.yytext); + lstack.push(this.lexer.yylloc); + stack.push(action[1]); + symbol = null; + if (!preErrorSymbol) { + yyleng = this.lexer.yyleng; + yytext = this.lexer.yytext; + yylineno = this.lexer.yylineno; + yyloc = this.lexer.yylloc; + if (recovering > 0) { + recovering--; + } + } else { + symbol = preErrorSymbol; + preErrorSymbol = null; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack); + if (typeof r !== 'undefined') { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; +}}; +undefined +function Parser () { + this.yy = {}; +} +Parser.prototype = parser;parser.Parser = Parser; + +module.exports = new Parser; + + +}); + +ace.define("ace/mode/coffee/scope",["require","exports","module","ace/mode/coffee/helpers"], function(require, exports, module) { + + var Scope, extend, last, _ref; + + _ref = require('./helpers'), extend = _ref.extend, last = _ref.last; + + exports.Scope = Scope = (function() { + Scope.root = null; + + function Scope(parent, expressions, method) { + this.parent = parent; + this.expressions = expressions; + this.method = method; + this.variables = [ + { + name: 'arguments', + type: 'arguments' + } + ]; + this.positions = {}; + if (!this.parent) { + Scope.root = this; + } + } + + Scope.prototype.add = function(name, type, immediate) { + if (this.shared && !immediate) { + return this.parent.add(name, type, immediate); + } + if (Object.prototype.hasOwnProperty.call(this.positions, name)) { + return this.variables[this.positions[name]].type = type; + } else { + return this.positions[name] = this.variables.push({ + name: name, + type: type + }) - 1; + } + }; + + Scope.prototype.namedMethod = function() { + var _ref1; + if (((_ref1 = this.method) != null ? _ref1.name : void 0) || !this.parent) { + return this.method; + } + return this.parent.namedMethod(); + }; + + Scope.prototype.find = function(name) { + if (this.check(name)) { + return true; + } + this.add(name, 'var'); + return false; + }; + + Scope.prototype.parameter = function(name) { + if (this.shared && this.parent.check(name, true)) { + return; + } + return this.add(name, 'param'); + }; + + Scope.prototype.check = function(name) { + var _ref1; + return !!(this.type(name) || ((_ref1 = this.parent) != null ? _ref1.check(name) : void 0)); + }; + + Scope.prototype.temporary = function(name, index) { + if (name.length > 1) { + return '_' + name + (index > 1 ? index - 1 : ''); + } else { + return '_' + (index + parseInt(name, 36)).toString(36).replace(/\d/g, 'a'); + } + }; + + Scope.prototype.type = function(name) { + var v, _i, _len, _ref1; + _ref1 = this.variables; + for (_i = 0, _len = _ref1.length; _i < _len; _i++) { + v = _ref1[_i]; + if (v.name === name) { + return v.type; + } + } + return null; + }; + + Scope.prototype.freeVariable = function(name, reserve) { + var index, temp; + if (reserve == null) { + reserve = true; + } + index = 0; + while (this.check((temp = this.temporary(name, index)))) { + index++; + } + if (reserve) { + this.add(temp, 'var', true); + } + return temp; + }; + + Scope.prototype.assign = function(name, value) { + this.add(name, { + value: value, + assigned: true + }, true); + return this.hasAssignments = true; + }; + + Scope.prototype.hasDeclarations = function() { + return !!this.declaredVariables().length; + }; + + Scope.prototype.declaredVariables = function() { + var realVars, tempVars, v, _i, _len, _ref1; + realVars = []; + tempVars = []; + _ref1 = this.variables; + for (_i = 0, _len = _ref1.length; _i < _len; _i++) { + v = _ref1[_i]; + if (v.type === 'var') { + (v.name.charAt(0) === '_' ? tempVars : realVars).push(v.name); + } + } + return realVars.sort().concat(tempVars.sort()); + }; + + Scope.prototype.assignedVariables = function() { + var v, _i, _len, _ref1, _results; + _ref1 = this.variables; + _results = []; + for (_i = 0, _len = _ref1.length; _i < _len; _i++) { + v = _ref1[_i]; + if (v.type.assigned) { + _results.push("" + v.name + " = " + v.type.value); + } + } + return _results; + }; + + return Scope; + + })(); + + +}); + +ace.define("ace/mode/coffee/nodes",["require","exports","module","ace/mode/coffee/scope","ace/mode/coffee/lexer","ace/mode/coffee/helpers"], function(require, exports, module) { + + var Access, Arr, Assign, Base, Block, Call, Class, Code, CodeFragment, Comment, Existence, Extends, For, HEXNUM, IDENTIFIER, IDENTIFIER_STR, IS_REGEX, IS_STRING, If, In, Index, LEVEL_ACCESS, LEVEL_COND, LEVEL_LIST, LEVEL_OP, LEVEL_PAREN, LEVEL_TOP, Literal, METHOD_DEF, NEGATE, NO, NUMBER, Obj, Op, Param, Parens, RESERVED, Range, Return, SIMPLENUM, STRICT_PROSCRIBED, Scope, Slice, Splat, Switch, TAB, THIS, Throw, Try, UTILITIES, Value, While, YES, addLocationDataFn, compact, del, ends, extend, flatten, fragmentsToText, isLiteralArguments, isLiteralThis, last, locationDataToString, merge, multident, parseNum, some, starts, throwSyntaxError, unfoldSoak, utility, _ref, _ref1, + __hasProp = {}.hasOwnProperty, + __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }, + __slice = [].slice; + + Error.stackTraceLimit = Infinity; + + Scope = require('./scope').Scope; + + _ref = require('./lexer'), RESERVED = _ref.RESERVED, STRICT_PROSCRIBED = _ref.STRICT_PROSCRIBED; + + _ref1 = require('./helpers'), compact = _ref1.compact, flatten = _ref1.flatten, extend = _ref1.extend, merge = _ref1.merge, del = _ref1.del, starts = _ref1.starts, ends = _ref1.ends, last = _ref1.last, some = _ref1.some, addLocationDataFn = _ref1.addLocationDataFn, locationDataToString = _ref1.locationDataToString, throwSyntaxError = _ref1.throwSyntaxError; + + exports.extend = extend; + + exports.addLocationDataFn = addLocationDataFn; + + YES = function() { + return true; + }; + + NO = function() { + return false; + }; + + THIS = function() { + return this; + }; + + NEGATE = function() { + this.negated = !this.negated; + return this; + }; + + exports.CodeFragment = CodeFragment = (function() { + function CodeFragment(parent, code) { + var _ref2; + this.code = "" + code; + this.locationData = parent != null ? parent.locationData : void 0; + this.type = (parent != null ? (_ref2 = parent.constructor) != null ? _ref2.name : void 0 : void 0) || 'unknown'; + } + + CodeFragment.prototype.toString = function() { + return "" + this.code + (this.locationData ? ": " + locationDataToString(this.locationData) : ''); + }; + + return CodeFragment; + + })(); + + fragmentsToText = function(fragments) { + var fragment; + return ((function() { + var _i, _len, _results; + _results = []; + for (_i = 0, _len = fragments.length; _i < _len; _i++) { + fragment = fragments[_i]; + _results.push(fragment.code); + } + return _results; + })()).join(''); + }; + + exports.Base = Base = (function() { + function Base() {} + + Base.prototype.compile = function(o, lvl) { + return fragmentsToText(this.compileToFragments(o, lvl)); + }; + + Base.prototype.compileToFragments = function(o, lvl) { + var node; + o = extend({}, o); + if (lvl) { + o.level = lvl; + } + node = this.unfoldSoak(o) || this; + node.tab = o.indent; + if (o.level === LEVEL_TOP || !node.isStatement(o)) { + return node.compileNode(o); + } else { + return node.compileClosure(o); + } + }; + + Base.prototype.compileClosure = function(o) { + var args, argumentsNode, func, jumpNode, meth; + if (jumpNode = this.jumps()) { + jumpNode.error('cannot use a pure statement in an expression'); + } + o.sharedScope = true; + func = new Code([], Block.wrap([this])); + args = []; + if ((argumentsNode = this.contains(isLiteralArguments)) || this.contains(isLiteralThis)) { + args = [new Literal('this')]; + if (argumentsNode) { + meth = 'apply'; + args.push(new Literal('arguments')); + } else { + meth = 'call'; + } + func = new Value(func, [new Access(new Literal(meth))]); + } + return (new Call(func, args)).compileNode(o); + }; + + Base.prototype.cache = function(o, level, reused) { + var ref, sub; + if (!this.isComplex()) { + ref = level ? this.compileToFragments(o, level) : this; + return [ref, ref]; + } else { + ref = new Literal(reused || o.scope.freeVariable('ref')); + sub = new Assign(ref, this); + if (level) { + return [sub.compileToFragments(o, level), [this.makeCode(ref.value)]]; + } else { + return [sub, ref]; + } + } + }; + + Base.prototype.cacheToCodeFragments = function(cacheValues) { + return [fragmentsToText(cacheValues[0]), fragmentsToText(cacheValues[1])]; + }; + + Base.prototype.makeReturn = function(res) { + var me; + me = this.unwrapAll(); + if (res) { + return new Call(new Literal("" + res + ".push"), [me]); + } else { + return new Return(me); + } + }; + + Base.prototype.contains = function(pred) { + var node; + node = void 0; + this.traverseChildren(false, function(n) { + if (pred(n)) { + node = n; + return false; + } + }); + return node; + }; + + Base.prototype.lastNonComment = function(list) { + var i; + i = list.length; + while (i--) { + if (!(list[i] instanceof Comment)) { + return list[i]; + } + } + return null; + }; + + Base.prototype.toString = function(idt, name) { + var tree; + if (idt == null) { + idt = ''; + } + if (name == null) { + name = this.constructor.name; + } + tree = '\n' + idt + name; + if (this.soak) { + tree += '?'; + } + this.eachChild(function(node) { + return tree += node.toString(idt + TAB); + }); + return tree; + }; + + Base.prototype.eachChild = function(func) { + var attr, child, _i, _j, _len, _len1, _ref2, _ref3; + if (!this.children) { + return this; + } + _ref2 = this.children; + for (_i = 0, _len = _ref2.length; _i < _len; _i++) { + attr = _ref2[_i]; + if (this[attr]) { + _ref3 = flatten([this[attr]]); + for (_j = 0, _len1 = _ref3.length; _j < _len1; _j++) { + child = _ref3[_j]; + if (func(child) === false) { + return this; + } + } + } + } + return this; + }; + + Base.prototype.traverseChildren = function(crossScope, func) { + return this.eachChild(function(child) { + var recur; + recur = func(child); + if (recur !== false) { + return child.traverseChildren(crossScope, func); + } + }); + }; + + Base.prototype.invert = function() { + return new Op('!', this); + }; + + Base.prototype.unwrapAll = function() { + var node; + node = this; + while (node !== (node = node.unwrap())) { + continue; + } + return node; + }; + + Base.prototype.children = []; + + Base.prototype.isStatement = NO; + + Base.prototype.jumps = NO; + + Base.prototype.isComplex = YES; + + Base.prototype.isChainable = NO; + + Base.prototype.isAssignable = NO; + + Base.prototype.unwrap = THIS; + + Base.prototype.unfoldSoak = NO; + + Base.prototype.assigns = NO; + + Base.prototype.updateLocationDataIfMissing = function(locationData) { + if (this.locationData) { + return this; + } + this.locationData = locationData; + return this.eachChild(function(child) { + return child.updateLocationDataIfMissing(locationData); + }); + }; + + Base.prototype.error = function(message) { + return throwSyntaxError(message, this.locationData); + }; + + Base.prototype.makeCode = function(code) { + return new CodeFragment(this, code); + }; + + Base.prototype.wrapInBraces = function(fragments) { + return [].concat(this.makeCode('('), fragments, this.makeCode(')')); + }; + + Base.prototype.joinFragmentArrays = function(fragmentsList, joinStr) { + var answer, fragments, i, _i, _len; + answer = []; + for (i = _i = 0, _len = fragmentsList.length; _i < _len; i = ++_i) { + fragments = fragmentsList[i]; + if (i) { + answer.push(this.makeCode(joinStr)); + } + answer = answer.concat(fragments); + } + return answer; + }; + + return Base; + + })(); + + exports.Block = Block = (function(_super) { + __extends(Block, _super); + + function Block(nodes) { + this.expressions = compact(flatten(nodes || [])); + } + + Block.prototype.children = ['expressions']; + + Block.prototype.push = function(node) { + this.expressions.push(node); + return this; + }; + + Block.prototype.pop = function() { + return this.expressions.pop(); + }; + + Block.prototype.unshift = function(node) { + this.expressions.unshift(node); + return this; + }; + + Block.prototype.unwrap = function() { + if (this.expressions.length === 1) { + return this.expressions[0]; + } else { + return this; + } + }; + + Block.prototype.isEmpty = function() { + return !this.expressions.length; + }; + + Block.prototype.isStatement = function(o) { + var exp, _i, _len, _ref2; + _ref2 = this.expressions; + for (_i = 0, _len = _ref2.length; _i < _len; _i++) { + exp = _ref2[_i]; + if (exp.isStatement(o)) { + return true; + } + } + return false; + }; + + Block.prototype.jumps = function(o) { + var exp, jumpNode, _i, _len, _ref2; + _ref2 = this.expressions; + for (_i = 0, _len = _ref2.length; _i < _len; _i++) { + exp = _ref2[_i]; + if (jumpNode = exp.jumps(o)) { + return jumpNode; + } + } + }; + + Block.prototype.makeReturn = function(res) { + var expr, len; + len = this.expressions.length; + while (len--) { + expr = this.expressions[len]; + if (!(expr instanceof Comment)) { + this.expressions[len] = expr.makeReturn(res); + if (expr instanceof Return && !expr.expression) { + this.expressions.splice(len, 1); + } + break; + } + } + return this; + }; + + Block.prototype.compileToFragments = function(o, level) { + if (o == null) { + o = {}; + } + if (o.scope) { + return Block.__super__.compileToFragments.call(this, o, level); + } else { + return this.compileRoot(o); + } + }; + + Block.prototype.compileNode = function(o) { + var answer, compiledNodes, fragments, index, node, top, _i, _len, _ref2; + this.tab = o.indent; + top = o.level === LEVEL_TOP; + compiledNodes = []; + _ref2 = this.expressions; + for (index = _i = 0, _len = _ref2.length; _i < _len; index = ++_i) { + node = _ref2[index]; + node = node.unwrapAll(); + node = node.unfoldSoak(o) || node; + if (node instanceof Block) { + compiledNodes.push(node.compileNode(o)); + } else if (top) { + node.front = true; + fragments = node.compileToFragments(o); + if (!node.isStatement(o)) { + fragments.unshift(this.makeCode("" + this.tab)); + fragments.push(this.makeCode(";")); + } + compiledNodes.push(fragments); + } else { + compiledNodes.push(node.compileToFragments(o, LEVEL_LIST)); + } + } + if (top) { + if (this.spaced) { + return [].concat(this.joinFragmentArrays(compiledNodes, '\n\n'), this.makeCode("\n")); + } else { + return this.joinFragmentArrays(compiledNodes, '\n'); + } + } + if (compiledNodes.length) { + answer = this.joinFragmentArrays(compiledNodes, ', '); + } else { + answer = [this.makeCode("void 0")]; + } + if (compiledNodes.length > 1 && o.level >= LEVEL_LIST) { + return this.wrapInBraces(answer); + } else { + return answer; + } + }; + + Block.prototype.compileRoot = function(o) { + var exp, fragments, i, name, prelude, preludeExps, rest, _i, _len, _ref2; + o.indent = o.bare ? '' : TAB; + o.level = LEVEL_TOP; + this.spaced = true; + o.scope = new Scope(null, this, null); + _ref2 = o.locals || []; + for (_i = 0, _len = _ref2.length; _i < _len; _i++) { + name = _ref2[_i]; + o.scope.parameter(name); + } + prelude = []; + if (!o.bare) { + preludeExps = (function() { + var _j, _len1, _ref3, _results; + _ref3 = this.expressions; + _results = []; + for (i = _j = 0, _len1 = _ref3.length; _j < _len1; i = ++_j) { + exp = _ref3[i]; + if (!(exp.unwrap() instanceof Comment)) { + break; + } + _results.push(exp); + } + return _results; + }).call(this); + rest = this.expressions.slice(preludeExps.length); + this.expressions = preludeExps; + if (preludeExps.length) { + prelude = this.compileNode(merge(o, { + indent: '' + })); + prelude.push(this.makeCode("\n")); + } + this.expressions = rest; + } + fragments = this.compileWithDeclarations(o); + if (o.bare) { + return fragments; + } + return [].concat(prelude, this.makeCode("(function() {\n"), fragments, this.makeCode("\n}).call(this);\n")); + }; + + Block.prototype.compileWithDeclarations = function(o) { + var assigns, declars, exp, fragments, i, post, rest, scope, spaced, _i, _len, _ref2, _ref3, _ref4; + fragments = []; + post = []; + _ref2 = this.expressions; + for (i = _i = 0, _len = _ref2.length; _i < _len; i = ++_i) { + exp = _ref2[i]; + exp = exp.unwrap(); + if (!(exp instanceof Comment || exp instanceof Literal)) { + break; + } + } + o = merge(o, { + level: LEVEL_TOP + }); + if (i) { + rest = this.expressions.splice(i, 9e9); + _ref3 = [this.spaced, false], spaced = _ref3[0], this.spaced = _ref3[1]; + _ref4 = [this.compileNode(o), spaced], fragments = _ref4[0], this.spaced = _ref4[1]; + this.expressions = rest; + } + post = this.compileNode(o); + scope = o.scope; + if (scope.expressions === this) { + declars = o.scope.hasDeclarations(); + assigns = scope.hasAssignments; + if (declars || assigns) { + if (i) { + fragments.push(this.makeCode('\n')); + } + fragments.push(this.makeCode("" + this.tab + "var ")); + if (declars) { + fragments.push(this.makeCode(scope.declaredVariables().join(', '))); + } + if (assigns) { + if (declars) { + fragments.push(this.makeCode(",\n" + (this.tab + TAB))); + } + fragments.push(this.makeCode(scope.assignedVariables().join(",\n" + (this.tab + TAB)))); + } + fragments.push(this.makeCode(";\n" + (this.spaced ? '\n' : ''))); + } else if (fragments.length && post.length) { + fragments.push(this.makeCode("\n")); + } + } + return fragments.concat(post); + }; + + Block.wrap = function(nodes) { + if (nodes.length === 1 && nodes[0] instanceof Block) { + return nodes[0]; + } + return new Block(nodes); + }; + + return Block; + + })(Base); + + exports.Literal = Literal = (function(_super) { + __extends(Literal, _super); + + function Literal(value) { + this.value = value; + } + + Literal.prototype.makeReturn = function() { + if (this.isStatement()) { + return this; + } else { + return Literal.__super__.makeReturn.apply(this, arguments); + } + }; + + Literal.prototype.isAssignable = function() { + return IDENTIFIER.test(this.value); + }; + + Literal.prototype.isStatement = function() { + var _ref2; + return (_ref2 = this.value) === 'break' || _ref2 === 'continue' || _ref2 === 'debugger'; + }; + + Literal.prototype.isComplex = NO; + + Literal.prototype.assigns = function(name) { + return name === this.value; + }; + + Literal.prototype.jumps = function(o) { + if (this.value === 'break' && !((o != null ? o.loop : void 0) || (o != null ? o.block : void 0))) { + return this; + } + if (this.value === 'continue' && !(o != null ? o.loop : void 0)) { + return this; + } + }; + + Literal.prototype.compileNode = function(o) { + var answer, code, _ref2; + code = this.value === 'this' ? ((_ref2 = o.scope.method) != null ? _ref2.bound : void 0) ? o.scope.method.context : this.value : this.value.reserved ? "\"" + this.value + "\"" : this.value; + answer = this.isStatement() ? "" + this.tab + code + ";" : code; + return [this.makeCode(answer)]; + }; + + Literal.prototype.toString = function() { + return ' "' + this.value + '"'; + }; + + return Literal; + + })(Base); + + exports.Undefined = (function(_super) { + __extends(Undefined, _super); + + function Undefined() { + return Undefined.__super__.constructor.apply(this, arguments); + } + + Undefined.prototype.isAssignable = NO; + + Undefined.prototype.isComplex = NO; + + Undefined.prototype.compileNode = function(o) { + return [this.makeCode(o.level >= LEVEL_ACCESS ? '(void 0)' : 'void 0')]; + }; + + return Undefined; + + })(Base); + + exports.Null = (function(_super) { + __extends(Null, _super); + + function Null() { + return Null.__super__.constructor.apply(this, arguments); + } + + Null.prototype.isAssignable = NO; + + Null.prototype.isComplex = NO; + + Null.prototype.compileNode = function() { + return [this.makeCode("null")]; + }; + + return Null; + + })(Base); + + exports.Bool = (function(_super) { + __extends(Bool, _super); + + Bool.prototype.isAssignable = NO; + + Bool.prototype.isComplex = NO; + + Bool.prototype.compileNode = function() { + return [this.makeCode(this.val)]; + }; + + function Bool(val) { + this.val = val; + } + + return Bool; + + })(Base); + + exports.Return = Return = (function(_super) { + __extends(Return, _super); + + function Return(expr) { + if (expr && !expr.unwrap().isUndefined) { + this.expression = expr; + } + } + + Return.prototype.children = ['expression']; + + Return.prototype.isStatement = YES; + + Return.prototype.makeReturn = THIS; + + Return.prototype.jumps = THIS; + + Return.prototype.compileToFragments = function(o, level) { + var expr, _ref2; + expr = (_ref2 = this.expression) != null ? _ref2.makeReturn() : void 0; + if (expr && !(expr instanceof Return)) { + return expr.compileToFragments(o, level); + } else { + return Return.__super__.compileToFragments.call(this, o, level); + } + }; + + Return.prototype.compileNode = function(o) { + var answer; + answer = []; + answer.push(this.makeCode(this.tab + ("return" + (this.expression ? " " : "")))); + if (this.expression) { + answer = answer.concat(this.expression.compileToFragments(o, LEVEL_PAREN)); + } + answer.push(this.makeCode(";")); + return answer; + }; + + return Return; + + })(Base); + + exports.Value = Value = (function(_super) { + __extends(Value, _super); + + function Value(base, props, tag) { + if (!props && base instanceof Value) { + return base; + } + this.base = base; + this.properties = props || []; + if (tag) { + this[tag] = true; + } + return this; + } + + Value.prototype.children = ['base', 'properties']; + + Value.prototype.add = function(props) { + this.properties = this.properties.concat(props); + return this; + }; + + Value.prototype.hasProperties = function() { + return !!this.properties.length; + }; + + Value.prototype.bareLiteral = function(type) { + return !this.properties.length && this.base instanceof type; + }; + + Value.prototype.isArray = function() { + return this.bareLiteral(Arr); + }; + + Value.prototype.isRange = function() { + return this.bareLiteral(Range); + }; + + Value.prototype.isComplex = function() { + return this.hasProperties() || this.base.isComplex(); + }; + + Value.prototype.isAssignable = function() { + return this.hasProperties() || this.base.isAssignable(); + }; + + Value.prototype.isSimpleNumber = function() { + return this.bareLiteral(Literal) && SIMPLENUM.test(this.base.value); + }; + + Value.prototype.isString = function() { + return this.bareLiteral(Literal) && IS_STRING.test(this.base.value); + }; + + Value.prototype.isRegex = function() { + return this.bareLiteral(Literal) && IS_REGEX.test(this.base.value); + }; + + Value.prototype.isAtomic = function() { + var node, _i, _len, _ref2; + _ref2 = this.properties.concat(this.base); + for (_i = 0, _len = _ref2.length; _i < _len; _i++) { + node = _ref2[_i]; + if (node.soak || node instanceof Call) { + return false; + } + } + return true; + }; + + Value.prototype.isNotCallable = function() { + return this.isSimpleNumber() || this.isString() || this.isRegex() || this.isArray() || this.isRange() || this.isSplice() || this.isObject(); + }; + + Value.prototype.isStatement = function(o) { + return !this.properties.length && this.base.isStatement(o); + }; + + Value.prototype.assigns = function(name) { + return !this.properties.length && this.base.assigns(name); + }; + + Value.prototype.jumps = function(o) { + return !this.properties.length && this.base.jumps(o); + }; + + Value.prototype.isObject = function(onlyGenerated) { + if (this.properties.length) { + return false; + } + return (this.base instanceof Obj) && (!onlyGenerated || this.base.generated); + }; + + Value.prototype.isSplice = function() { + return last(this.properties) instanceof Slice; + }; + + Value.prototype.looksStatic = function(className) { + var _ref2; + return this.base.value === className && this.properties.length && ((_ref2 = this.properties[0].name) != null ? _ref2.value : void 0) !== 'prototype'; + }; + + Value.prototype.unwrap = function() { + if (this.properties.length) { + return this; + } else { + return this.base; + } + }; + + Value.prototype.cacheReference = function(o) { + var base, bref, name, nref; + name = last(this.properties); + if (this.properties.length < 2 && !this.base.isComplex() && !(name != null ? name.isComplex() : void 0)) { + return [this, this]; + } + base = new Value(this.base, this.properties.slice(0, -1)); + if (base.isComplex()) { + bref = new Literal(o.scope.freeVariable('base')); + base = new Value(new Parens(new Assign(bref, base))); + } + if (!name) { + return [base, bref]; + } + if (name.isComplex()) { + nref = new Literal(o.scope.freeVariable('name')); + name = new Index(new Assign(nref, name.index)); + nref = new Index(nref); + } + return [base.add(name), new Value(bref || base.base, [nref || name])]; + }; + + Value.prototype.compileNode = function(o) { + var fragments, prop, props, _i, _len; + this.base.front = this.front; + props = this.properties; + fragments = this.base.compileToFragments(o, (props.length ? LEVEL_ACCESS : null)); + if ((this.base instanceof Parens || props.length) && SIMPLENUM.test(fragmentsToText(fragments))) { + fragments.push(this.makeCode('.')); + } + for (_i = 0, _len = props.length; _i < _len; _i++) { + prop = props[_i]; + fragments.push.apply(fragments, prop.compileToFragments(o)); + } + return fragments; + }; + + Value.prototype.unfoldSoak = function(o) { + return this.unfoldedSoak != null ? this.unfoldedSoak : this.unfoldedSoak = (function(_this) { + return function() { + var fst, i, ifn, prop, ref, snd, _i, _len, _ref2, _ref3; + if (ifn = _this.base.unfoldSoak(o)) { + (_ref2 = ifn.body.properties).push.apply(_ref2, _this.properties); + return ifn; + } + _ref3 = _this.properties; + for (i = _i = 0, _len = _ref3.length; _i < _len; i = ++_i) { + prop = _ref3[i]; + if (!prop.soak) { + continue; + } + prop.soak = false; + fst = new Value(_this.base, _this.properties.slice(0, i)); + snd = new Value(_this.base, _this.properties.slice(i)); + if (fst.isComplex()) { + ref = new Literal(o.scope.freeVariable('ref')); + fst = new Parens(new Assign(ref, fst)); + snd.base = ref; + } + return new If(new Existence(fst), snd, { + soak: true + }); + } + return false; + }; + })(this)(); + }; + + return Value; + + })(Base); + + exports.Comment = Comment = (function(_super) { + __extends(Comment, _super); + + function Comment(comment) { + this.comment = comment; + } + + Comment.prototype.isStatement = YES; + + Comment.prototype.makeReturn = THIS; + + Comment.prototype.compileNode = function(o, level) { + var code, comment; + comment = this.comment.replace(/^(\s*)#/gm, "$1 *"); + code = "/*" + (multident(comment, this.tab)) + (__indexOf.call(comment, '\n') >= 0 ? "\n" + this.tab : '') + " */"; + if ((level || o.level) === LEVEL_TOP) { + code = o.indent + code; + } + return [this.makeCode("\n"), this.makeCode(code)]; + }; + + return Comment; + + })(Base); + + exports.Call = Call = (function(_super) { + __extends(Call, _super); + + function Call(variable, args, soak) { + this.args = args != null ? args : []; + this.soak = soak; + this.isNew = false; + this.isSuper = variable === 'super'; + this.variable = this.isSuper ? null : variable; + if (variable instanceof Value && variable.isNotCallable()) { + variable.error("literal is not a function"); + } + } + + Call.prototype.children = ['variable', 'args']; + + Call.prototype.newInstance = function() { + var base, _ref2; + base = ((_ref2 = this.variable) != null ? _ref2.base : void 0) || this.variable; + if (base instanceof Call && !base.isNew) { + base.newInstance(); + } else { + this.isNew = true; + } + return this; + }; + + Call.prototype.superReference = function(o) { + var accesses, method; + method = o.scope.namedMethod(); + if (method != null ? method.klass : void 0) { + accesses = [new Access(new Literal('__super__'))]; + if (method["static"]) { + accesses.push(new Access(new Literal('constructor'))); + } + accesses.push(new Access(new Literal(method.name))); + return (new Value(new Literal(method.klass), accesses)).compile(o); + } else if (method != null ? method.ctor : void 0) { + return "" + method.name + ".__super__.constructor"; + } else { + return this.error('cannot call super outside of an instance method.'); + } + }; + + Call.prototype.superThis = function(o) { + var method; + method = o.scope.method; + return (method && !method.klass && method.context) || "this"; + }; + + Call.prototype.unfoldSoak = function(o) { + var call, ifn, left, list, rite, _i, _len, _ref2, _ref3; + if (this.soak) { + if (this.variable) { + if (ifn = unfoldSoak(o, this, 'variable')) { + return ifn; + } + _ref2 = new Value(this.variable).cacheReference(o), left = _ref2[0], rite = _ref2[1]; + } else { + left = new Literal(this.superReference(o)); + rite = new Value(left); + } + rite = new Call(rite, this.args); + rite.isNew = this.isNew; + left = new Literal("typeof " + (left.compile(o)) + " === \"function\""); + return new If(left, new Value(rite), { + soak: true + }); + } + call = this; + list = []; + while (true) { + if (call.variable instanceof Call) { + list.push(call); + call = call.variable; + continue; + } + if (!(call.variable instanceof Value)) { + break; + } + list.push(call); + if (!((call = call.variable.base) instanceof Call)) { + break; + } + } + _ref3 = list.reverse(); + for (_i = 0, _len = _ref3.length; _i < _len; _i++) { + call = _ref3[_i]; + if (ifn) { + if (call.variable instanceof Call) { + call.variable = ifn; + } else { + call.variable.base = ifn; + } + } + ifn = unfoldSoak(o, call, 'variable'); + } + return ifn; + }; + + Call.prototype.compileNode = function(o) { + var arg, argIndex, compiledArgs, compiledArray, fragments, preface, _i, _len, _ref2, _ref3; + if ((_ref2 = this.variable) != null) { + _ref2.front = this.front; + } + compiledArray = Splat.compileSplattedArray(o, this.args, true); + if (compiledArray.length) { + return this.compileSplat(o, compiledArray); + } + compiledArgs = []; + _ref3 = this.args; + for (argIndex = _i = 0, _len = _ref3.length; _i < _len; argIndex = ++_i) { + arg = _ref3[argIndex]; + if (argIndex) { + compiledArgs.push(this.makeCode(", ")); + } + compiledArgs.push.apply(compiledArgs, arg.compileToFragments(o, LEVEL_LIST)); + } + fragments = []; + if (this.isSuper) { + preface = this.superReference(o) + (".call(" + (this.superThis(o))); + if (compiledArgs.length) { + preface += ", "; + } + fragments.push(this.makeCode(preface)); + } else { + if (this.isNew) { + fragments.push(this.makeCode('new ')); + } + fragments.push.apply(fragments, this.variable.compileToFragments(o, LEVEL_ACCESS)); + fragments.push(this.makeCode("(")); + } + fragments.push.apply(fragments, compiledArgs); + fragments.push(this.makeCode(")")); + return fragments; + }; + + Call.prototype.compileSplat = function(o, splatArgs) { + var answer, base, fun, idt, name, ref; + if (this.isSuper) { + return [].concat(this.makeCode("" + (this.superReference(o)) + ".apply(" + (this.superThis(o)) + ", "), splatArgs, this.makeCode(")")); + } + if (this.isNew) { + idt = this.tab + TAB; + return [].concat(this.makeCode("(function(func, args, ctor) {\n" + idt + "ctor.prototype = func.prototype;\n" + idt + "var child = new ctor, result = func.apply(child, args);\n" + idt + "return Object(result) === result ? result : child;\n" + this.tab + "})("), this.variable.compileToFragments(o, LEVEL_LIST), this.makeCode(", "), splatArgs, this.makeCode(", function(){})")); + } + answer = []; + base = new Value(this.variable); + if ((name = base.properties.pop()) && base.isComplex()) { + ref = o.scope.freeVariable('ref'); + answer = answer.concat(this.makeCode("(" + ref + " = "), base.compileToFragments(o, LEVEL_LIST), this.makeCode(")"), name.compileToFragments(o)); + } else { + fun = base.compileToFragments(o, LEVEL_ACCESS); + if (SIMPLENUM.test(fragmentsToText(fun))) { + fun = this.wrapInBraces(fun); + } + if (name) { + ref = fragmentsToText(fun); + fun.push.apply(fun, name.compileToFragments(o)); + } else { + ref = 'null'; + } + answer = answer.concat(fun); + } + return answer = answer.concat(this.makeCode(".apply(" + ref + ", "), splatArgs, this.makeCode(")")); + }; + + return Call; + + })(Base); + + exports.Extends = Extends = (function(_super) { + __extends(Extends, _super); + + function Extends(child, parent) { + this.child = child; + this.parent = parent; + } + + Extends.prototype.children = ['child', 'parent']; + + Extends.prototype.compileToFragments = function(o) { + return new Call(new Value(new Literal(utility('extends'))), [this.child, this.parent]).compileToFragments(o); + }; + + return Extends; + + })(Base); + + exports.Access = Access = (function(_super) { + __extends(Access, _super); + + function Access(name, tag) { + this.name = name; + this.name.asKey = true; + this.soak = tag === 'soak'; + } + + Access.prototype.children = ['name']; + + Access.prototype.compileToFragments = function(o) { + var name; + name = this.name.compileToFragments(o); + if (IDENTIFIER.test(fragmentsToText(name))) { + name.unshift(this.makeCode(".")); + } else { + name.unshift(this.makeCode("[")); + name.push(this.makeCode("]")); + } + return name; + }; + + Access.prototype.isComplex = NO; + + return Access; + + })(Base); + + exports.Index = Index = (function(_super) { + __extends(Index, _super); + + function Index(index) { + this.index = index; + } + + Index.prototype.children = ['index']; + + Index.prototype.compileToFragments = function(o) { + return [].concat(this.makeCode("["), this.index.compileToFragments(o, LEVEL_PAREN), this.makeCode("]")); + }; + + Index.prototype.isComplex = function() { + return this.index.isComplex(); + }; + + return Index; + + })(Base); + + exports.Range = Range = (function(_super) { + __extends(Range, _super); + + Range.prototype.children = ['from', 'to']; + + function Range(from, to, tag) { + this.from = from; + this.to = to; + this.exclusive = tag === 'exclusive'; + this.equals = this.exclusive ? '' : '='; + } + + Range.prototype.compileVariables = function(o) { + var step, _ref2, _ref3, _ref4, _ref5; + o = merge(o, { + top: true + }); + _ref2 = this.cacheToCodeFragments(this.from.cache(o, LEVEL_LIST)), this.fromC = _ref2[0], this.fromVar = _ref2[1]; + _ref3 = this.cacheToCodeFragments(this.to.cache(o, LEVEL_LIST)), this.toC = _ref3[0], this.toVar = _ref3[1]; + if (step = del(o, 'step')) { + _ref4 = this.cacheToCodeFragments(step.cache(o, LEVEL_LIST)), this.step = _ref4[0], this.stepVar = _ref4[1]; + } + _ref5 = [this.fromVar.match(NUMBER), this.toVar.match(NUMBER)], this.fromNum = _ref5[0], this.toNum = _ref5[1]; + if (this.stepVar) { + return this.stepNum = this.stepVar.match(NUMBER); + } + }; + + Range.prototype.compileNode = function(o) { + var cond, condPart, from, gt, idx, idxName, known, lt, namedIndex, stepPart, to, varPart, _ref2, _ref3; + if (!this.fromVar) { + this.compileVariables(o); + } + if (!o.index) { + return this.compileArray(o); + } + known = this.fromNum && this.toNum; + idx = del(o, 'index'); + idxName = del(o, 'name'); + namedIndex = idxName && idxName !== idx; + varPart = "" + idx + " = " + this.fromC; + if (this.toC !== this.toVar) { + varPart += ", " + this.toC; + } + if (this.step !== this.stepVar) { + varPart += ", " + this.step; + } + _ref2 = ["" + idx + " <" + this.equals, "" + idx + " >" + this.equals], lt = _ref2[0], gt = _ref2[1]; + condPart = this.stepNum ? parseNum(this.stepNum[0]) > 0 ? "" + lt + " " + this.toVar : "" + gt + " " + this.toVar : known ? ((_ref3 = [parseNum(this.fromNum[0]), parseNum(this.toNum[0])], from = _ref3[0], to = _ref3[1], _ref3), from <= to ? "" + lt + " " + to : "" + gt + " " + to) : (cond = this.stepVar ? "" + this.stepVar + " > 0" : "" + this.fromVar + " <= " + this.toVar, "" + cond + " ? " + lt + " " + this.toVar + " : " + gt + " " + this.toVar); + stepPart = this.stepVar ? "" + idx + " += " + this.stepVar : known ? namedIndex ? from <= to ? "++" + idx : "--" + idx : from <= to ? "" + idx + "++" : "" + idx + "--" : namedIndex ? "" + cond + " ? ++" + idx + " : --" + idx : "" + cond + " ? " + idx + "++ : " + idx + "--"; + if (namedIndex) { + varPart = "" + idxName + " = " + varPart; + } + if (namedIndex) { + stepPart = "" + idxName + " = " + stepPart; + } + return [this.makeCode("" + varPart + "; " + condPart + "; " + stepPart)]; + }; + + Range.prototype.compileArray = function(o) { + var args, body, cond, hasArgs, i, idt, post, pre, range, result, vars, _i, _ref2, _ref3, _results; + if (this.fromNum && this.toNum && Math.abs(this.fromNum - this.toNum) <= 20) { + range = (function() { + _results = []; + for (var _i = _ref2 = +this.fromNum, _ref3 = +this.toNum; _ref2 <= _ref3 ? _i <= _ref3 : _i >= _ref3; _ref2 <= _ref3 ? _i++ : _i--){ _results.push(_i); } + return _results; + }).apply(this); + if (this.exclusive) { + range.pop(); + } + return [this.makeCode("[" + (range.join(', ')) + "]")]; + } + idt = this.tab + TAB; + i = o.scope.freeVariable('i'); + result = o.scope.freeVariable('results'); + pre = "\n" + idt + result + " = [];"; + if (this.fromNum && this.toNum) { + o.index = i; + body = fragmentsToText(this.compileNode(o)); + } else { + vars = ("" + i + " = " + this.fromC) + (this.toC !== this.toVar ? ", " + this.toC : ''); + cond = "" + this.fromVar + " <= " + this.toVar; + body = "var " + vars + "; " + cond + " ? " + i + " <" + this.equals + " " + this.toVar + " : " + i + " >" + this.equals + " " + this.toVar + "; " + cond + " ? " + i + "++ : " + i + "--"; + } + post = "{ " + result + ".push(" + i + "); }\n" + idt + "return " + result + ";\n" + o.indent; + hasArgs = function(node) { + return node != null ? node.contains(isLiteralArguments) : void 0; + }; + if (hasArgs(this.from) || hasArgs(this.to)) { + args = ', arguments'; + } + return [this.makeCode("(function() {" + pre + "\n" + idt + "for (" + body + ")" + post + "}).apply(this" + (args != null ? args : '') + ")")]; + }; + + return Range; + + })(Base); + + exports.Slice = Slice = (function(_super) { + __extends(Slice, _super); + + Slice.prototype.children = ['range']; + + function Slice(range) { + this.range = range; + Slice.__super__.constructor.call(this); + } + + Slice.prototype.compileNode = function(o) { + var compiled, compiledText, from, fromCompiled, to, toStr, _ref2; + _ref2 = this.range, to = _ref2.to, from = _ref2.from; + fromCompiled = from && from.compileToFragments(o, LEVEL_PAREN) || [this.makeCode('0')]; + if (to) { + compiled = to.compileToFragments(o, LEVEL_PAREN); + compiledText = fragmentsToText(compiled); + if (!(!this.range.exclusive && +compiledText === -1)) { + toStr = ', ' + (this.range.exclusive ? compiledText : SIMPLENUM.test(compiledText) ? "" + (+compiledText + 1) : (compiled = to.compileToFragments(o, LEVEL_ACCESS), "+" + (fragmentsToText(compiled)) + " + 1 || 9e9")); + } + } + return [this.makeCode(".slice(" + (fragmentsToText(fromCompiled)) + (toStr || '') + ")")]; + }; + + return Slice; + + })(Base); + + exports.Obj = Obj = (function(_super) { + __extends(Obj, _super); + + function Obj(props, generated) { + this.generated = generated != null ? generated : false; + this.objects = this.properties = props || []; + } + + Obj.prototype.children = ['properties']; + + Obj.prototype.compileNode = function(o) { + var answer, i, idt, indent, join, lastNoncom, node, prop, props, _i, _j, _len, _len1; + props = this.properties; + if (!props.length) { + return [this.makeCode(this.front ? '({})' : '{}')]; + } + if (this.generated) { + for (_i = 0, _len = props.length; _i < _len; _i++) { + node = props[_i]; + if (node instanceof Value) { + node.error('cannot have an implicit value in an implicit object'); + } + } + } + idt = o.indent += TAB; + lastNoncom = this.lastNonComment(this.properties); + answer = []; + for (i = _j = 0, _len1 = props.length; _j < _len1; i = ++_j) { + prop = props[i]; + join = i === props.length - 1 ? '' : prop === lastNoncom || prop instanceof Comment ? '\n' : ',\n'; + indent = prop instanceof Comment ? '' : idt; + if (prop instanceof Assign && prop.variable instanceof Value && prop.variable.hasProperties()) { + prop.variable.error('Invalid object key'); + } + if (prop instanceof Value && prop["this"]) { + prop = new Assign(prop.properties[0].name, prop, 'object'); + } + if (!(prop instanceof Comment)) { + if (!(prop instanceof Assign)) { + prop = new Assign(prop, prop, 'object'); + } + (prop.variable.base || prop.variable).asKey = true; + } + if (indent) { + answer.push(this.makeCode(indent)); + } + answer.push.apply(answer, prop.compileToFragments(o, LEVEL_TOP)); + if (join) { + answer.push(this.makeCode(join)); + } + } + answer.unshift(this.makeCode("{" + (props.length && '\n'))); + answer.push(this.makeCode("" + (props.length && '\n' + this.tab) + "}")); + if (this.front) { + return this.wrapInBraces(answer); + } else { + return answer; + } + }; + + Obj.prototype.assigns = function(name) { + var prop, _i, _len, _ref2; + _ref2 = this.properties; + for (_i = 0, _len = _ref2.length; _i < _len; _i++) { + prop = _ref2[_i]; + if (prop.assigns(name)) { + return true; + } + } + return false; + }; + + return Obj; + + })(Base); + + exports.Arr = Arr = (function(_super) { + __extends(Arr, _super); + + function Arr(objs) { + this.objects = objs || []; + } + + Arr.prototype.children = ['objects']; + + Arr.prototype.compileNode = function(o) { + var answer, compiledObjs, fragments, index, obj, _i, _len; + if (!this.objects.length) { + return [this.makeCode('[]')]; + } + o.indent += TAB; + answer = Splat.compileSplattedArray(o, this.objects); + if (answer.length) { + return answer; + } + answer = []; + compiledObjs = (function() { + var _i, _len, _ref2, _results; + _ref2 = this.objects; + _results = []; + for (_i = 0, _len = _ref2.length; _i < _len; _i++) { + obj = _ref2[_i]; + _results.push(obj.compileToFragments(o, LEVEL_LIST)); + } + return _results; + }).call(this); + for (index = _i = 0, _len = compiledObjs.length; _i < _len; index = ++_i) { + fragments = compiledObjs[index]; + if (index) { + answer.push(this.makeCode(", ")); + } + answer.push.apply(answer, fragments); + } + if (fragmentsToText(answer).indexOf('\n') >= 0) { + answer.unshift(this.makeCode("[\n" + o.indent)); + answer.push(this.makeCode("\n" + this.tab + "]")); + } else { + answer.unshift(this.makeCode("[")); + answer.push(this.makeCode("]")); + } + return answer; + }; + + Arr.prototype.assigns = function(name) { + var obj, _i, _len, _ref2; + _ref2 = this.objects; + for (_i = 0, _len = _ref2.length; _i < _len; _i++) { + obj = _ref2[_i]; + if (obj.assigns(name)) { + return true; + } + } + return false; + }; + + return Arr; + + })(Base); + + exports.Class = Class = (function(_super) { + __extends(Class, _super); + + function Class(variable, parent, body) { + this.variable = variable; + this.parent = parent; + this.body = body != null ? body : new Block; + this.boundFuncs = []; + this.body.classBody = true; + } + + Class.prototype.children = ['variable', 'parent', 'body']; + + Class.prototype.determineName = function() { + var decl, tail; + if (!this.variable) { + return null; + } + decl = (tail = last(this.variable.properties)) ? tail instanceof Access && tail.name.value : this.variable.base.value; + if (__indexOf.call(STRICT_PROSCRIBED, decl) >= 0) { + this.variable.error("class variable name may not be " + decl); + } + return decl && (decl = IDENTIFIER.test(decl) && decl); + }; + + Class.prototype.setContext = function(name) { + return this.body.traverseChildren(false, function(node) { + if (node.classBody) { + return false; + } + if (node instanceof Literal && node.value === 'this') { + return node.value = name; + } else if (node instanceof Code) { + node.klass = name; + if (node.bound) { + return node.context = name; + } + } + }); + }; + + Class.prototype.addBoundFunctions = function(o) { + var bvar, lhs, _i, _len, _ref2; + _ref2 = this.boundFuncs; + for (_i = 0, _len = _ref2.length; _i < _len; _i++) { + bvar = _ref2[_i]; + lhs = (new Value(new Literal("this"), [new Access(bvar)])).compile(o); + this.ctor.body.unshift(new Literal("" + lhs + " = " + (utility('bind')) + "(" + lhs + ", this)")); + } + }; + + Class.prototype.addProperties = function(node, name, o) { + var assign, base, exprs, func, props; + props = node.base.properties.slice(0); + exprs = (function() { + var _results; + _results = []; + while (assign = props.shift()) { + if (assign instanceof Assign) { + base = assign.variable.base; + delete assign.context; + func = assign.value; + if (base.value === 'constructor') { + if (this.ctor) { + assign.error('cannot define more than one constructor in a class'); + } + if (func.bound) { + assign.error('cannot define a constructor as a bound function'); + } + if (func instanceof Code) { + assign = this.ctor = func; + } else { + this.externalCtor = o.classScope.freeVariable('class'); + assign = new Assign(new Literal(this.externalCtor), func); + } + } else { + if (assign.variable["this"]) { + func["static"] = true; + } else { + assign.variable = new Value(new Literal(name), [new Access(new Literal('prototype')), new Access(base)]); + if (func instanceof Code && func.bound) { + this.boundFuncs.push(base); + func.bound = false; + } + } + } + } + _results.push(assign); + } + return _results; + }).call(this); + return compact(exprs); + }; + + Class.prototype.walkBody = function(name, o) { + return this.traverseChildren(false, (function(_this) { + return function(child) { + var cont, exps, i, node, _i, _len, _ref2; + cont = true; + if (child instanceof Class) { + return false; + } + if (child instanceof Block) { + _ref2 = exps = child.expressions; + for (i = _i = 0, _len = _ref2.length; _i < _len; i = ++_i) { + node = _ref2[i]; + if (node instanceof Assign && node.variable.looksStatic(name)) { + node.value["static"] = true; + } else if (node instanceof Value && node.isObject(true)) { + cont = false; + exps[i] = _this.addProperties(node, name, o); + } + } + child.expressions = exps = flatten(exps); + } + return cont && !(child instanceof Class); + }; + })(this)); + }; + + Class.prototype.hoistDirectivePrologue = function() { + var expressions, index, node; + index = 0; + expressions = this.body.expressions; + while ((node = expressions[index]) && node instanceof Comment || node instanceof Value && node.isString()) { + ++index; + } + return this.directives = expressions.splice(0, index); + }; + + Class.prototype.ensureConstructor = function(name) { + if (!this.ctor) { + this.ctor = new Code; + if (this.externalCtor) { + this.ctor.body.push(new Literal("" + this.externalCtor + ".apply(this, arguments)")); + } else if (this.parent) { + this.ctor.body.push(new Literal("" + name + ".__super__.constructor.apply(this, arguments)")); + } + this.ctor.body.makeReturn(); + this.body.expressions.unshift(this.ctor); + } + this.ctor.ctor = this.ctor.name = name; + this.ctor.klass = null; + return this.ctor.noReturn = true; + }; + + Class.prototype.compileNode = function(o) { + var args, argumentsNode, func, jumpNode, klass, lname, name, superClass, _ref2; + if (jumpNode = this.body.jumps()) { + jumpNode.error('Class bodies cannot contain pure statements'); + } + if (argumentsNode = this.body.contains(isLiteralArguments)) { + argumentsNode.error("Class bodies shouldn't reference arguments"); + } + name = this.determineName() || '_Class'; + if (name.reserved) { + name = "_" + name; + } + lname = new Literal(name); + func = new Code([], Block.wrap([this.body])); + args = []; + o.classScope = func.makeScope(o.scope); + this.hoistDirectivePrologue(); + this.setContext(name); + this.walkBody(name, o); + this.ensureConstructor(name); + this.addBoundFunctions(o); + this.body.spaced = true; + this.body.expressions.push(lname); + if (this.parent) { + superClass = new Literal(o.classScope.freeVariable('super', false)); + this.body.expressions.unshift(new Extends(lname, superClass)); + func.params.push(new Param(superClass)); + args.push(this.parent); + } + (_ref2 = this.body.expressions).unshift.apply(_ref2, this.directives); + klass = new Parens(new Call(func, args)); + if (this.variable) { + klass = new Assign(this.variable, klass); + } + return klass.compileToFragments(o); + }; + + return Class; + + })(Base); + + exports.Assign = Assign = (function(_super) { + __extends(Assign, _super); + + function Assign(variable, value, context, options) { + var forbidden, name, _ref2; + this.variable = variable; + this.value = value; + this.context = context; + this.param = options && options.param; + this.subpattern = options && options.subpattern; + forbidden = (_ref2 = (name = this.variable.unwrapAll().value), __indexOf.call(STRICT_PROSCRIBED, _ref2) >= 0); + if (forbidden && this.context !== 'object') { + this.variable.error("variable name may not be \"" + name + "\""); + } + } + + Assign.prototype.children = ['variable', 'value']; + + Assign.prototype.isStatement = function(o) { + return (o != null ? o.level : void 0) === LEVEL_TOP && (this.context != null) && __indexOf.call(this.context, "?") >= 0; + }; + + Assign.prototype.assigns = function(name) { + return this[this.context === 'object' ? 'value' : 'variable'].assigns(name); + }; + + Assign.prototype.unfoldSoak = function(o) { + return unfoldSoak(o, this, 'variable'); + }; + + Assign.prototype.compileNode = function(o) { + var answer, compiledName, isValue, match, name, val, varBase, _ref2, _ref3, _ref4; + if (isValue = this.variable instanceof Value) { + if (this.variable.isArray() || this.variable.isObject()) { + return this.compilePatternMatch(o); + } + if (this.variable.isSplice()) { + return this.compileSplice(o); + } + if ((_ref2 = this.context) === '||=' || _ref2 === '&&=' || _ref2 === '?=') { + return this.compileConditional(o); + } + } + compiledName = this.variable.compileToFragments(o, LEVEL_LIST); + name = fragmentsToText(compiledName); + if (!this.context) { + varBase = this.variable.unwrapAll(); + if (!varBase.isAssignable()) { + this.variable.error("\"" + (this.variable.compile(o)) + "\" cannot be assigned"); + } + if (!(typeof varBase.hasProperties === "function" ? varBase.hasProperties() : void 0)) { + if (this.param) { + o.scope.add(name, 'var'); + } else { + o.scope.find(name); + } + } + } + if (this.value instanceof Code && (match = METHOD_DEF.exec(name))) { + if (match[2]) { + this.value.klass = match[1]; + } + this.value.name = (_ref3 = (_ref4 = match[3]) != null ? _ref4 : match[4]) != null ? _ref3 : match[5]; + } + val = this.value.compileToFragments(o, LEVEL_LIST); + if (this.context === 'object') { + return compiledName.concat(this.makeCode(": "), val); + } + answer = compiledName.concat(this.makeCode(" " + (this.context || '=') + " "), val); + if (o.level <= LEVEL_LIST) { + return answer; + } else { + return this.wrapInBraces(answer); + } + }; + + Assign.prototype.compilePatternMatch = function(o) { + var acc, assigns, code, fragments, i, idx, isObject, ivar, name, obj, objects, olen, ref, rest, splat, top, val, value, vvar, vvarText, _i, _len, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7; + top = o.level === LEVEL_TOP; + value = this.value; + objects = this.variable.base.objects; + if (!(olen = objects.length)) { + code = value.compileToFragments(o); + if (o.level >= LEVEL_OP) { + return this.wrapInBraces(code); + } else { + return code; + } + } + isObject = this.variable.isObject(); + if (top && olen === 1 && !((obj = objects[0]) instanceof Splat)) { + if (obj instanceof Assign) { + _ref2 = obj, (_ref3 = _ref2.variable, idx = _ref3.base), obj = _ref2.value; + } else { + idx = isObject ? obj["this"] ? obj.properties[0].name : obj : new Literal(0); + } + acc = IDENTIFIER.test(idx.unwrap().value || 0); + value = new Value(value); + value.properties.push(new (acc ? Access : Index)(idx)); + if (_ref4 = obj.unwrap().value, __indexOf.call(RESERVED, _ref4) >= 0) { + obj.error("assignment to a reserved word: " + (obj.compile(o))); + } + return new Assign(obj, value, null, { + param: this.param + }).compileToFragments(o, LEVEL_TOP); + } + vvar = value.compileToFragments(o, LEVEL_LIST); + vvarText = fragmentsToText(vvar); + assigns = []; + splat = false; + if (!IDENTIFIER.test(vvarText) || this.variable.assigns(vvarText)) { + assigns.push([this.makeCode("" + (ref = o.scope.freeVariable('ref')) + " = ")].concat(__slice.call(vvar))); + vvar = [this.makeCode(ref)]; + vvarText = ref; + } + for (i = _i = 0, _len = objects.length; _i < _len; i = ++_i) { + obj = objects[i]; + idx = i; + if (isObject) { + if (obj instanceof Assign) { + _ref5 = obj, (_ref6 = _ref5.variable, idx = _ref6.base), obj = _ref5.value; + } else { + if (obj.base instanceof Parens) { + _ref7 = new Value(obj.unwrapAll()).cacheReference(o), obj = _ref7[0], idx = _ref7[1]; + } else { + idx = obj["this"] ? obj.properties[0].name : obj; + } + } + } + if (!splat && obj instanceof Splat) { + name = obj.name.unwrap().value; + obj = obj.unwrap(); + val = "" + olen + " <= " + vvarText + ".length ? " + (utility('slice')) + ".call(" + vvarText + ", " + i; + if (rest = olen - i - 1) { + ivar = o.scope.freeVariable('i'); + val += ", " + ivar + " = " + vvarText + ".length - " + rest + ") : (" + ivar + " = " + i + ", [])"; + } else { + val += ") : []"; + } + val = new Literal(val); + splat = "" + ivar + "++"; + } else { + name = obj.unwrap().value; + if (obj instanceof Splat) { + obj.error("multiple splats are disallowed in an assignment"); + } + if (typeof idx === 'number') { + idx = new Literal(splat || idx); + acc = false; + } else { + acc = isObject && IDENTIFIER.test(idx.unwrap().value || 0); + } + val = new Value(new Literal(vvarText), [new (acc ? Access : Index)(idx)]); + } + if ((name != null) && __indexOf.call(RESERVED, name) >= 0) { + obj.error("assignment to a reserved word: " + (obj.compile(o))); + } + assigns.push(new Assign(obj, val, null, { + param: this.param, + subpattern: true + }).compileToFragments(o, LEVEL_LIST)); + } + if (!(top || this.subpattern)) { + assigns.push(vvar); + } + fragments = this.joinFragmentArrays(assigns, ', '); + if (o.level < LEVEL_LIST) { + return fragments; + } else { + return this.wrapInBraces(fragments); + } + }; + + Assign.prototype.compileConditional = function(o) { + var fragments, left, right, _ref2; + _ref2 = this.variable.cacheReference(o), left = _ref2[0], right = _ref2[1]; + if (!left.properties.length && left.base instanceof Literal && left.base.value !== "this" && !o.scope.check(left.base.value)) { + this.variable.error("the variable \"" + left.base.value + "\" can't be assigned with " + this.context + " because it has not been declared before"); + } + if (__indexOf.call(this.context, "?") >= 0) { + o.isExistentialEquals = true; + return new If(new Existence(left), right, { + type: 'if' + }).addElse(new Assign(right, this.value, '=')).compileToFragments(o); + } else { + fragments = new Op(this.context.slice(0, -1), left, new Assign(right, this.value, '=')).compileToFragments(o); + if (o.level <= LEVEL_LIST) { + return fragments; + } else { + return this.wrapInBraces(fragments); + } + } + }; + + Assign.prototype.compileSplice = function(o) { + var answer, exclusive, from, fromDecl, fromRef, name, to, valDef, valRef, _ref2, _ref3, _ref4; + _ref2 = this.variable.properties.pop().range, from = _ref2.from, to = _ref2.to, exclusive = _ref2.exclusive; + name = this.variable.compile(o); + if (from) { + _ref3 = this.cacheToCodeFragments(from.cache(o, LEVEL_OP)), fromDecl = _ref3[0], fromRef = _ref3[1]; + } else { + fromDecl = fromRef = '0'; + } + if (to) { + if (from instanceof Value && from.isSimpleNumber() && to instanceof Value && to.isSimpleNumber()) { + to = to.compile(o) - fromRef; + if (!exclusive) { + to += 1; + } + } else { + to = to.compile(o, LEVEL_ACCESS) + ' - ' + fromRef; + if (!exclusive) { + to += ' + 1'; + } + } + } else { + to = "9e9"; + } + _ref4 = this.value.cache(o, LEVEL_LIST), valDef = _ref4[0], valRef = _ref4[1]; + answer = [].concat(this.makeCode("[].splice.apply(" + name + ", [" + fromDecl + ", " + to + "].concat("), valDef, this.makeCode(")), "), valRef); + if (o.level > LEVEL_TOP) { + return this.wrapInBraces(answer); + } else { + return answer; + } + }; + + return Assign; + + })(Base); + + exports.Code = Code = (function(_super) { + __extends(Code, _super); + + function Code(params, body, tag) { + this.params = params || []; + this.body = body || new Block; + this.bound = tag === 'boundfunc'; + } + + Code.prototype.children = ['params', 'body']; + + Code.prototype.isStatement = function() { + return !!this.ctor; + }; + + Code.prototype.jumps = NO; + + Code.prototype.makeScope = function(parentScope) { + return new Scope(parentScope, this.body, this); + }; + + Code.prototype.compileNode = function(o) { + var answer, boundfunc, code, exprs, i, lit, p, param, params, ref, splats, uniqs, val, wasEmpty, wrapper, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _len5, _m, _n, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7; + if (this.bound && ((_ref2 = o.scope.method) != null ? _ref2.bound : void 0)) { + this.context = o.scope.method.context; + } + if (this.bound && !this.context) { + this.context = '_this'; + wrapper = new Code([new Param(new Literal(this.context))], new Block([this])); + boundfunc = new Call(wrapper, [new Literal('this')]); + boundfunc.updateLocationDataIfMissing(this.locationData); + return boundfunc.compileNode(o); + } + o.scope = del(o, 'classScope') || this.makeScope(o.scope); + o.scope.shared = del(o, 'sharedScope'); + o.indent += TAB; + delete o.bare; + delete o.isExistentialEquals; + params = []; + exprs = []; + _ref3 = this.params; + for (_i = 0, _len = _ref3.length; _i < _len; _i++) { + param = _ref3[_i]; + o.scope.parameter(param.asReference(o)); + } + _ref4 = this.params; + for (_j = 0, _len1 = _ref4.length; _j < _len1; _j++) { + param = _ref4[_j]; + if (!param.splat) { + continue; + } + _ref5 = this.params; + for (_k = 0, _len2 = _ref5.length; _k < _len2; _k++) { + p = _ref5[_k].name; + if (p["this"]) { + p = p.properties[0].name; + } + if (p.value) { + o.scope.add(p.value, 'var', true); + } + } + splats = new Assign(new Value(new Arr((function() { + var _l, _len3, _ref6, _results; + _ref6 = this.params; + _results = []; + for (_l = 0, _len3 = _ref6.length; _l < _len3; _l++) { + p = _ref6[_l]; + _results.push(p.asReference(o)); + } + return _results; + }).call(this))), new Value(new Literal('arguments'))); + break; + } + _ref6 = this.params; + for (_l = 0, _len3 = _ref6.length; _l < _len3; _l++) { + param = _ref6[_l]; + if (param.isComplex()) { + val = ref = param.asReference(o); + if (param.value) { + val = new Op('?', ref, param.value); + } + exprs.push(new Assign(new Value(param.name), val, '=', { + param: true + })); + } else { + ref = param; + if (param.value) { + lit = new Literal(ref.name.value + ' == null'); + val = new Assign(new Value(param.name), param.value, '='); + exprs.push(new If(lit, val)); + } + } + if (!splats) { + params.push(ref); + } + } + wasEmpty = this.body.isEmpty(); + if (splats) { + exprs.unshift(splats); + } + if (exprs.length) { + (_ref7 = this.body.expressions).unshift.apply(_ref7, exprs); + } + for (i = _m = 0, _len4 = params.length; _m < _len4; i = ++_m) { + p = params[i]; + params[i] = p.compileToFragments(o); + o.scope.parameter(fragmentsToText(params[i])); + } + uniqs = []; + this.eachParamName(function(name, node) { + if (__indexOf.call(uniqs, name) >= 0) { + node.error("multiple parameters named '" + name + "'"); + } + return uniqs.push(name); + }); + if (!(wasEmpty || this.noReturn)) { + this.body.makeReturn(); + } + code = 'function'; + if (this.ctor) { + code += ' ' + this.name; + } + code += '('; + answer = [this.makeCode(code)]; + for (i = _n = 0, _len5 = params.length; _n < _len5; i = ++_n) { + p = params[i]; + if (i) { + answer.push(this.makeCode(", ")); + } + answer.push.apply(answer, p); + } + answer.push(this.makeCode(') {')); + if (!this.body.isEmpty()) { + answer = answer.concat(this.makeCode("\n"), this.body.compileWithDeclarations(o), this.makeCode("\n" + this.tab)); + } + answer.push(this.makeCode('}')); + if (this.ctor) { + return [this.makeCode(this.tab)].concat(__slice.call(answer)); + } + if (this.front || (o.level >= LEVEL_ACCESS)) { + return this.wrapInBraces(answer); + } else { + return answer; + } + }; + + Code.prototype.eachParamName = function(iterator) { + var param, _i, _len, _ref2, _results; + _ref2 = this.params; + _results = []; + for (_i = 0, _len = _ref2.length; _i < _len; _i++) { + param = _ref2[_i]; + _results.push(param.eachName(iterator)); + } + return _results; + }; + + Code.prototype.traverseChildren = function(crossScope, func) { + if (crossScope) { + return Code.__super__.traverseChildren.call(this, crossScope, func); + } + }; + + return Code; + + })(Base); + + exports.Param = Param = (function(_super) { + __extends(Param, _super); + + function Param(name, value, splat) { + var _ref2; + this.name = name; + this.value = value; + this.splat = splat; + if (_ref2 = (name = this.name.unwrapAll().value), __indexOf.call(STRICT_PROSCRIBED, _ref2) >= 0) { + this.name.error("parameter name \"" + name + "\" is not allowed"); + } + } + + Param.prototype.children = ['name', 'value']; + + Param.prototype.compileToFragments = function(o) { + return this.name.compileToFragments(o, LEVEL_LIST); + }; + + Param.prototype.asReference = function(o) { + var node; + if (this.reference) { + return this.reference; + } + node = this.name; + if (node["this"]) { + node = node.properties[0].name; + if (node.value.reserved) { + node = new Literal(o.scope.freeVariable(node.value)); + } + } else if (node.isComplex()) { + node = new Literal(o.scope.freeVariable('arg')); + } + node = new Value(node); + if (this.splat) { + node = new Splat(node); + } + node.updateLocationDataIfMissing(this.locationData); + return this.reference = node; + }; + + Param.prototype.isComplex = function() { + return this.name.isComplex(); + }; + + Param.prototype.eachName = function(iterator, name) { + var atParam, node, obj, _i, _len, _ref2; + if (name == null) { + name = this.name; + } + atParam = function(obj) { + var node; + node = obj.properties[0].name; + if (!node.value.reserved) { + return iterator(node.value, node); + } + }; + if (name instanceof Literal) { + return iterator(name.value, name); + } + if (name instanceof Value) { + return atParam(name); + } + _ref2 = name.objects; + for (_i = 0, _len = _ref2.length; _i < _len; _i++) { + obj = _ref2[_i]; + if (obj instanceof Assign) { + this.eachName(iterator, obj.value.unwrap()); + } else if (obj instanceof Splat) { + node = obj.name.unwrap(); + iterator(node.value, node); + } else if (obj instanceof Value) { + if (obj.isArray() || obj.isObject()) { + this.eachName(iterator, obj.base); + } else if (obj["this"]) { + atParam(obj); + } else { + iterator(obj.base.value, obj.base); + } + } else { + obj.error("illegal parameter " + (obj.compile())); + } + } + }; + + return Param; + + })(Base); + + exports.Splat = Splat = (function(_super) { + __extends(Splat, _super); + + Splat.prototype.children = ['name']; + + Splat.prototype.isAssignable = YES; + + function Splat(name) { + this.name = name.compile ? name : new Literal(name); + } + + Splat.prototype.assigns = function(name) { + return this.name.assigns(name); + }; + + Splat.prototype.compileToFragments = function(o) { + return this.name.compileToFragments(o); + }; + + Splat.prototype.unwrap = function() { + return this.name; + }; + + Splat.compileSplattedArray = function(o, list, apply) { + var args, base, compiledNode, concatPart, fragments, i, index, node, _i, _len; + index = -1; + while ((node = list[++index]) && !(node instanceof Splat)) { + continue; + } + if (index >= list.length) { + return []; + } + if (list.length === 1) { + node = list[0]; + fragments = node.compileToFragments(o, LEVEL_LIST); + if (apply) { + return fragments; + } + return [].concat(node.makeCode("" + (utility('slice')) + ".call("), fragments, node.makeCode(")")); + } + args = list.slice(index); + for (i = _i = 0, _len = args.length; _i < _len; i = ++_i) { + node = args[i]; + compiledNode = node.compileToFragments(o, LEVEL_LIST); + args[i] = node instanceof Splat ? [].concat(node.makeCode("" + (utility('slice')) + ".call("), compiledNode, node.makeCode(")")) : [].concat(node.makeCode("["), compiledNode, node.makeCode("]")); + } + if (index === 0) { + node = list[0]; + concatPart = node.joinFragmentArrays(args.slice(1), ', '); + return args[0].concat(node.makeCode(".concat("), concatPart, node.makeCode(")")); + } + base = (function() { + var _j, _len1, _ref2, _results; + _ref2 = list.slice(0, index); + _results = []; + for (_j = 0, _len1 = _ref2.length; _j < _len1; _j++) { + node = _ref2[_j]; + _results.push(node.compileToFragments(o, LEVEL_LIST)); + } + return _results; + })(); + base = list[0].joinFragmentArrays(base, ', '); + concatPart = list[index].joinFragmentArrays(args, ', '); + return [].concat(list[0].makeCode("["), base, list[index].makeCode("].concat("), concatPart, (last(list)).makeCode(")")); + }; + + return Splat; + + })(Base); + + exports.While = While = (function(_super) { + __extends(While, _super); + + function While(condition, options) { + this.condition = (options != null ? options.invert : void 0) ? condition.invert() : condition; + this.guard = options != null ? options.guard : void 0; + } + + While.prototype.children = ['condition', 'guard', 'body']; + + While.prototype.isStatement = YES; + + While.prototype.makeReturn = function(res) { + if (res) { + return While.__super__.makeReturn.apply(this, arguments); + } else { + this.returns = !this.jumps({ + loop: true + }); + return this; + } + }; + + While.prototype.addBody = function(body) { + this.body = body; + return this; + }; + + While.prototype.jumps = function() { + var expressions, jumpNode, node, _i, _len; + expressions = this.body.expressions; + if (!expressions.length) { + return false; + } + for (_i = 0, _len = expressions.length; _i < _len; _i++) { + node = expressions[_i]; + if (jumpNode = node.jumps({ + loop: true + })) { + return jumpNode; + } + } + return false; + }; + + While.prototype.compileNode = function(o) { + var answer, body, rvar, set; + o.indent += TAB; + set = ''; + body = this.body; + if (body.isEmpty()) { + body = this.makeCode(''); + } else { + if (this.returns) { + body.makeReturn(rvar = o.scope.freeVariable('results')); + set = "" + this.tab + rvar + " = [];\n"; + } + if (this.guard) { + if (body.expressions.length > 1) { + body.expressions.unshift(new If((new Parens(this.guard)).invert(), new Literal("continue"))); + } else { + if (this.guard) { + body = Block.wrap([new If(this.guard, body)]); + } + } + } + body = [].concat(this.makeCode("\n"), body.compileToFragments(o, LEVEL_TOP), this.makeCode("\n" + this.tab)); + } + answer = [].concat(this.makeCode(set + this.tab + "while ("), this.condition.compileToFragments(o, LEVEL_PAREN), this.makeCode(") {"), body, this.makeCode("}")); + if (this.returns) { + answer.push(this.makeCode("\n" + this.tab + "return " + rvar + ";")); + } + return answer; + }; + + return While; + + })(Base); + + exports.Op = Op = (function(_super) { + var CONVERSIONS, INVERSIONS; + + __extends(Op, _super); + + function Op(op, first, second, flip) { + if (op === 'in') { + return new In(first, second); + } + if (op === 'do') { + return this.generateDo(first); + } + if (op === 'new') { + if (first instanceof Call && !first["do"] && !first.isNew) { + return first.newInstance(); + } + if (first instanceof Code && first.bound || first["do"]) { + first = new Parens(first); + } + } + this.operator = CONVERSIONS[op] || op; + this.first = first; + this.second = second; + this.flip = !!flip; + return this; + } + + CONVERSIONS = { + '==': '===', + '!=': '!==', + 'of': 'in' + }; + + INVERSIONS = { + '!==': '===', + '===': '!==' + }; + + Op.prototype.children = ['first', 'second']; + + Op.prototype.isSimpleNumber = NO; + + Op.prototype.isUnary = function() { + return !this.second; + }; + + Op.prototype.isComplex = function() { + var _ref2; + return !(this.isUnary() && ((_ref2 = this.operator) === '+' || _ref2 === '-')) || this.first.isComplex(); + }; + + Op.prototype.isChainable = function() { + var _ref2; + return (_ref2 = this.operator) === '<' || _ref2 === '>' || _ref2 === '>=' || _ref2 === '<=' || _ref2 === '===' || _ref2 === '!=='; + }; + + Op.prototype.invert = function() { + var allInvertable, curr, fst, op, _ref2; + if (this.isChainable() && this.first.isChainable()) { + allInvertable = true; + curr = this; + while (curr && curr.operator) { + allInvertable && (allInvertable = curr.operator in INVERSIONS); + curr = curr.first; + } + if (!allInvertable) { + return new Parens(this).invert(); + } + curr = this; + while (curr && curr.operator) { + curr.invert = !curr.invert; + curr.operator = INVERSIONS[curr.operator]; + curr = curr.first; + } + return this; + } else if (op = INVERSIONS[this.operator]) { + this.operator = op; + if (this.first.unwrap() instanceof Op) { + this.first.invert(); + } + return this; + } else if (this.second) { + return new Parens(this).invert(); + } else if (this.operator === '!' && (fst = this.first.unwrap()) instanceof Op && ((_ref2 = fst.operator) === '!' || _ref2 === 'in' || _ref2 === 'instanceof')) { + return fst; + } else { + return new Op('!', this); + } + }; + + Op.prototype.unfoldSoak = function(o) { + var _ref2; + return ((_ref2 = this.operator) === '++' || _ref2 === '--' || _ref2 === 'delete') && unfoldSoak(o, this, 'first'); + }; + + Op.prototype.generateDo = function(exp) { + var call, func, param, passedParams, ref, _i, _len, _ref2; + passedParams = []; + func = exp instanceof Assign && (ref = exp.value.unwrap()) instanceof Code ? ref : exp; + _ref2 = func.params || []; + for (_i = 0, _len = _ref2.length; _i < _len; _i++) { + param = _ref2[_i]; + if (param.value) { + passedParams.push(param.value); + delete param.value; + } else { + passedParams.push(param); + } + } + call = new Call(exp, passedParams); + call["do"] = true; + return call; + }; + + Op.prototype.compileNode = function(o) { + var answer, isChain, _ref2, _ref3; + isChain = this.isChainable() && this.first.isChainable(); + if (!isChain) { + this.first.front = this.front; + } + if (this.operator === 'delete' && o.scope.check(this.first.unwrapAll().value)) { + this.error('delete operand may not be argument or var'); + } + if (((_ref2 = this.operator) === '--' || _ref2 === '++') && (_ref3 = this.first.unwrapAll().value, __indexOf.call(STRICT_PROSCRIBED, _ref3) >= 0)) { + this.error("cannot increment/decrement \"" + (this.first.unwrapAll().value) + "\""); + } + if (this.isUnary()) { + return this.compileUnary(o); + } + if (isChain) { + return this.compileChain(o); + } + if (this.operator === '?') { + return this.compileExistence(o); + } + answer = [].concat(this.first.compileToFragments(o, LEVEL_OP), this.makeCode(' ' + this.operator + ' '), this.second.compileToFragments(o, LEVEL_OP)); + if (o.level <= LEVEL_OP) { + return answer; + } else { + return this.wrapInBraces(answer); + } + }; + + Op.prototype.compileChain = function(o) { + var fragments, fst, shared, _ref2; + _ref2 = this.first.second.cache(o), this.first.second = _ref2[0], shared = _ref2[1]; + fst = this.first.compileToFragments(o, LEVEL_OP); + fragments = fst.concat(this.makeCode(" " + (this.invert ? '&&' : '||') + " "), shared.compileToFragments(o), this.makeCode(" " + this.operator + " "), this.second.compileToFragments(o, LEVEL_OP)); + return this.wrapInBraces(fragments); + }; + + Op.prototype.compileExistence = function(o) { + var fst, ref; + if (this.first.isComplex()) { + ref = new Literal(o.scope.freeVariable('ref')); + fst = new Parens(new Assign(ref, this.first)); + } else { + fst = this.first; + ref = fst; + } + return new If(new Existence(fst), ref, { + type: 'if' + }).addElse(this.second).compileToFragments(o); + }; + + Op.prototype.compileUnary = function(o) { + var op, parts, plusMinus; + parts = []; + op = this.operator; + parts.push([this.makeCode(op)]); + if (op === '!' && this.first instanceof Existence) { + this.first.negated = !this.first.negated; + return this.first.compileToFragments(o); + } + if (o.level >= LEVEL_ACCESS) { + return (new Parens(this)).compileToFragments(o); + } + plusMinus = op === '+' || op === '-'; + if ((op === 'new' || op === 'typeof' || op === 'delete') || plusMinus && this.first instanceof Op && this.first.operator === op) { + parts.push([this.makeCode(' ')]); + } + if ((plusMinus && this.first instanceof Op) || (op === 'new' && this.first.isStatement(o))) { + this.first = new Parens(this.first); + } + parts.push(this.first.compileToFragments(o, LEVEL_OP)); + if (this.flip) { + parts.reverse(); + } + return this.joinFragmentArrays(parts, ''); + }; + + Op.prototype.toString = function(idt) { + return Op.__super__.toString.call(this, idt, this.constructor.name + ' ' + this.operator); + }; + + return Op; + + })(Base); + + exports.In = In = (function(_super) { + __extends(In, _super); + + function In(object, array) { + this.object = object; + this.array = array; + } + + In.prototype.children = ['object', 'array']; + + In.prototype.invert = NEGATE; + + In.prototype.compileNode = function(o) { + var hasSplat, obj, _i, _len, _ref2; + if (this.array instanceof Value && this.array.isArray()) { + _ref2 = this.array.base.objects; + for (_i = 0, _len = _ref2.length; _i < _len; _i++) { + obj = _ref2[_i]; + if (!(obj instanceof Splat)) { + continue; + } + hasSplat = true; + break; + } + if (!hasSplat) { + return this.compileOrTest(o); + } + } + return this.compileLoopTest(o); + }; + + In.prototype.compileOrTest = function(o) { + var cmp, cnj, i, item, ref, sub, tests, _i, _len, _ref2, _ref3, _ref4; + if (this.array.base.objects.length === 0) { + return [this.makeCode("" + (!!this.negated))]; + } + _ref2 = this.object.cache(o, LEVEL_OP), sub = _ref2[0], ref = _ref2[1]; + _ref3 = this.negated ? [' !== ', ' && '] : [' === ', ' || '], cmp = _ref3[0], cnj = _ref3[1]; + tests = []; + _ref4 = this.array.base.objects; + for (i = _i = 0, _len = _ref4.length; _i < _len; i = ++_i) { + item = _ref4[i]; + if (i) { + tests.push(this.makeCode(cnj)); + } + tests = tests.concat((i ? ref : sub), this.makeCode(cmp), item.compileToFragments(o, LEVEL_ACCESS)); + } + if (o.level < LEVEL_OP) { + return tests; + } else { + return this.wrapInBraces(tests); + } + }; + + In.prototype.compileLoopTest = function(o) { + var fragments, ref, sub, _ref2; + _ref2 = this.object.cache(o, LEVEL_LIST), sub = _ref2[0], ref = _ref2[1]; + fragments = [].concat(this.makeCode(utility('indexOf') + ".call("), this.array.compileToFragments(o, LEVEL_LIST), this.makeCode(", "), ref, this.makeCode(") " + (this.negated ? '< 0' : '>= 0'))); + if (fragmentsToText(sub) === fragmentsToText(ref)) { + return fragments; + } + fragments = sub.concat(this.makeCode(', '), fragments); + if (o.level < LEVEL_LIST) { + return fragments; + } else { + return this.wrapInBraces(fragments); + } + }; + + In.prototype.toString = function(idt) { + return In.__super__.toString.call(this, idt, this.constructor.name + (this.negated ? '!' : '')); + }; + + return In; + + })(Base); + + exports.Try = Try = (function(_super) { + __extends(Try, _super); + + function Try(attempt, errorVariable, recovery, ensure) { + this.attempt = attempt; + this.errorVariable = errorVariable; + this.recovery = recovery; + this.ensure = ensure; + } + + Try.prototype.children = ['attempt', 'recovery', 'ensure']; + + Try.prototype.isStatement = YES; + + Try.prototype.jumps = function(o) { + var _ref2; + return this.attempt.jumps(o) || ((_ref2 = this.recovery) != null ? _ref2.jumps(o) : void 0); + }; + + Try.prototype.makeReturn = function(res) { + if (this.attempt) { + this.attempt = this.attempt.makeReturn(res); + } + if (this.recovery) { + this.recovery = this.recovery.makeReturn(res); + } + return this; + }; + + Try.prototype.compileNode = function(o) { + var catchPart, ensurePart, placeholder, tryPart; + o.indent += TAB; + tryPart = this.attempt.compileToFragments(o, LEVEL_TOP); + catchPart = this.recovery ? (placeholder = new Literal('_error'), this.errorVariable ? this.recovery.unshift(new Assign(this.errorVariable, placeholder)) : void 0, [].concat(this.makeCode(" catch ("), placeholder.compileToFragments(o), this.makeCode(") {\n"), this.recovery.compileToFragments(o, LEVEL_TOP), this.makeCode("\n" + this.tab + "}"))) : !(this.ensure || this.recovery) ? [this.makeCode(' catch (_error) {}')] : []; + ensurePart = this.ensure ? [].concat(this.makeCode(" finally {\n"), this.ensure.compileToFragments(o, LEVEL_TOP), this.makeCode("\n" + this.tab + "}")) : []; + return [].concat(this.makeCode("" + this.tab + "try {\n"), tryPart, this.makeCode("\n" + this.tab + "}"), catchPart, ensurePart); + }; + + return Try; + + })(Base); + + exports.Throw = Throw = (function(_super) { + __extends(Throw, _super); + + function Throw(expression) { + this.expression = expression; + } + + Throw.prototype.children = ['expression']; + + Throw.prototype.isStatement = YES; + + Throw.prototype.jumps = NO; + + Throw.prototype.makeReturn = THIS; + + Throw.prototype.compileNode = function(o) { + return [].concat(this.makeCode(this.tab + "throw "), this.expression.compileToFragments(o), this.makeCode(";")); + }; + + return Throw; + + })(Base); + + exports.Existence = Existence = (function(_super) { + __extends(Existence, _super); + + function Existence(expression) { + this.expression = expression; + } + + Existence.prototype.children = ['expression']; + + Existence.prototype.invert = NEGATE; + + Existence.prototype.compileNode = function(o) { + var cmp, cnj, code, _ref2; + this.expression.front = this.front; + code = this.expression.compile(o, LEVEL_OP); + if (IDENTIFIER.test(code) && !o.scope.check(code)) { + _ref2 = this.negated ? ['===', '||'] : ['!==', '&&'], cmp = _ref2[0], cnj = _ref2[1]; + code = "typeof " + code + " " + cmp + " \"undefined\" " + cnj + " " + code + " " + cmp + " null"; + } else { + code = "" + code + " " + (this.negated ? '==' : '!=') + " null"; + } + return [this.makeCode(o.level <= LEVEL_COND ? code : "(" + code + ")")]; + }; + + return Existence; + + })(Base); + + exports.Parens = Parens = (function(_super) { + __extends(Parens, _super); + + function Parens(body) { + this.body = body; + } + + Parens.prototype.children = ['body']; + + Parens.prototype.unwrap = function() { + return this.body; + }; + + Parens.prototype.isComplex = function() { + return this.body.isComplex(); + }; + + Parens.prototype.compileNode = function(o) { + var bare, expr, fragments; + expr = this.body.unwrap(); + if (expr instanceof Value && expr.isAtomic()) { + expr.front = this.front; + return expr.compileToFragments(o); + } + fragments = expr.compileToFragments(o, LEVEL_PAREN); + bare = o.level < LEVEL_OP && (expr instanceof Op || expr instanceof Call || (expr instanceof For && expr.returns)); + if (bare) { + return fragments; + } else { + return this.wrapInBraces(fragments); + } + }; + + return Parens; + + })(Base); + + exports.For = For = (function(_super) { + __extends(For, _super); + + function For(body, source) { + var _ref2; + this.source = source.source, this.guard = source.guard, this.step = source.step, this.name = source.name, this.index = source.index; + this.body = Block.wrap([body]); + this.own = !!source.own; + this.object = !!source.object; + if (this.object) { + _ref2 = [this.index, this.name], this.name = _ref2[0], this.index = _ref2[1]; + } + if (this.index instanceof Value) { + this.index.error('index cannot be a pattern matching expression'); + } + this.range = this.source instanceof Value && this.source.base instanceof Range && !this.source.properties.length; + this.pattern = this.name instanceof Value; + if (this.range && this.index) { + this.index.error('indexes do not apply to range loops'); + } + if (this.range && this.pattern) { + this.name.error('cannot pattern match over range loops'); + } + if (this.own && !this.object) { + this.name.error('cannot use own with for-in'); + } + this.returns = false; + } + + For.prototype.children = ['body', 'source', 'guard', 'step']; + + For.prototype.compileNode = function(o) { + var body, bodyFragments, compare, compareDown, declare, declareDown, defPart, defPartFragments, down, forPartFragments, guardPart, idt1, increment, index, ivar, kvar, kvarAssign, lastJumps, lvar, name, namePart, ref, resultPart, returnResult, rvar, scope, source, step, stepNum, stepVar, svar, varPart, _ref2, _ref3; + body = Block.wrap([this.body]); + lastJumps = (_ref2 = last(body.expressions)) != null ? _ref2.jumps() : void 0; + if (lastJumps && lastJumps instanceof Return) { + this.returns = false; + } + source = this.range ? this.source.base : this.source; + scope = o.scope; + name = this.name && (this.name.compile(o, LEVEL_LIST)); + index = this.index && (this.index.compile(o, LEVEL_LIST)); + if (name && !this.pattern) { + scope.find(name); + } + if (index) { + scope.find(index); + } + if (this.returns) { + rvar = scope.freeVariable('results'); + } + ivar = (this.object && index) || scope.freeVariable('i'); + kvar = (this.range && name) || index || ivar; + kvarAssign = kvar !== ivar ? "" + kvar + " = " : ""; + if (this.step && !this.range) { + _ref3 = this.cacheToCodeFragments(this.step.cache(o, LEVEL_LIST)), step = _ref3[0], stepVar = _ref3[1]; + stepNum = stepVar.match(NUMBER); + } + if (this.pattern) { + name = ivar; + } + varPart = ''; + guardPart = ''; + defPart = ''; + idt1 = this.tab + TAB; + if (this.range) { + forPartFragments = source.compileToFragments(merge(o, { + index: ivar, + name: name, + step: this.step + })); + } else { + svar = this.source.compile(o, LEVEL_LIST); + if ((name || this.own) && !IDENTIFIER.test(svar)) { + defPart += "" + this.tab + (ref = scope.freeVariable('ref')) + " = " + svar + ";\n"; + svar = ref; + } + if (name && !this.pattern) { + namePart = "" + name + " = " + svar + "[" + kvar + "]"; + } + if (!this.object) { + if (step !== stepVar) { + defPart += "" + this.tab + step + ";\n"; + } + if (!(this.step && stepNum && (down = parseNum(stepNum[0]) < 0))) { + lvar = scope.freeVariable('len'); + } + declare = "" + kvarAssign + ivar + " = 0, " + lvar + " = " + svar + ".length"; + declareDown = "" + kvarAssign + ivar + " = " + svar + ".length - 1"; + compare = "" + ivar + " < " + lvar; + compareDown = "" + ivar + " >= 0"; + if (this.step) { + if (stepNum) { + if (down) { + compare = compareDown; + declare = declareDown; + } + } else { + compare = "" + stepVar + " > 0 ? " + compare + " : " + compareDown; + declare = "(" + stepVar + " > 0 ? (" + declare + ") : " + declareDown + ")"; + } + increment = "" + ivar + " += " + stepVar; + } else { + increment = "" + (kvar !== ivar ? "++" + ivar : "" + ivar + "++"); + } + forPartFragments = [this.makeCode("" + declare + "; " + compare + "; " + kvarAssign + increment)]; + } + } + if (this.returns) { + resultPart = "" + this.tab + rvar + " = [];\n"; + returnResult = "\n" + this.tab + "return " + rvar + ";"; + body.makeReturn(rvar); + } + if (this.guard) { + if (body.expressions.length > 1) { + body.expressions.unshift(new If((new Parens(this.guard)).invert(), new Literal("continue"))); + } else { + if (this.guard) { + body = Block.wrap([new If(this.guard, body)]); + } + } + } + if (this.pattern) { + body.expressions.unshift(new Assign(this.name, new Literal("" + svar + "[" + kvar + "]"))); + } + defPartFragments = [].concat(this.makeCode(defPart), this.pluckDirectCall(o, body)); + if (namePart) { + varPart = "\n" + idt1 + namePart + ";"; + } + if (this.object) { + forPartFragments = [this.makeCode("" + kvar + " in " + svar)]; + if (this.own) { + guardPart = "\n" + idt1 + "if (!" + (utility('hasProp')) + ".call(" + svar + ", " + kvar + ")) continue;"; + } + } + bodyFragments = body.compileToFragments(merge(o, { + indent: idt1 + }), LEVEL_TOP); + if (bodyFragments && (bodyFragments.length > 0)) { + bodyFragments = [].concat(this.makeCode("\n"), bodyFragments, this.makeCode("\n")); + } + return [].concat(defPartFragments, this.makeCode("" + (resultPart || '') + this.tab + "for ("), forPartFragments, this.makeCode(") {" + guardPart + varPart), bodyFragments, this.makeCode("" + this.tab + "}" + (returnResult || ''))); + }; + + For.prototype.pluckDirectCall = function(o, body) { + var base, defs, expr, fn, idx, ref, val, _i, _len, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8; + defs = []; + _ref2 = body.expressions; + for (idx = _i = 0, _len = _ref2.length; _i < _len; idx = ++_i) { + expr = _ref2[idx]; + expr = expr.unwrapAll(); + if (!(expr instanceof Call)) { + continue; + } + val = (_ref3 = expr.variable) != null ? _ref3.unwrapAll() : void 0; + if (!((val instanceof Code) || (val instanceof Value && ((_ref4 = val.base) != null ? _ref4.unwrapAll() : void 0) instanceof Code && val.properties.length === 1 && ((_ref5 = (_ref6 = val.properties[0].name) != null ? _ref6.value : void 0) === 'call' || _ref5 === 'apply')))) { + continue; + } + fn = ((_ref7 = val.base) != null ? _ref7.unwrapAll() : void 0) || val; + ref = new Literal(o.scope.freeVariable('fn')); + base = new Value(ref); + if (val.base) { + _ref8 = [base, val], val.base = _ref8[0], base = _ref8[1]; + } + body.expressions[idx] = new Call(base, expr.args); + defs = defs.concat(this.makeCode(this.tab), new Assign(ref, fn).compileToFragments(o, LEVEL_TOP), this.makeCode(';\n')); + } + return defs; + }; + + return For; + + })(While); + + exports.Switch = Switch = (function(_super) { + __extends(Switch, _super); + + function Switch(subject, cases, otherwise) { + this.subject = subject; + this.cases = cases; + this.otherwise = otherwise; + } + + Switch.prototype.children = ['subject', 'cases', 'otherwise']; + + Switch.prototype.isStatement = YES; + + Switch.prototype.jumps = function(o) { + var block, conds, jumpNode, _i, _len, _ref2, _ref3, _ref4; + if (o == null) { + o = { + block: true + }; + } + _ref2 = this.cases; + for (_i = 0, _len = _ref2.length; _i < _len; _i++) { + _ref3 = _ref2[_i], conds = _ref3[0], block = _ref3[1]; + if (jumpNode = block.jumps(o)) { + return jumpNode; + } + } + return (_ref4 = this.otherwise) != null ? _ref4.jumps(o) : void 0; + }; + + Switch.prototype.makeReturn = function(res) { + var pair, _i, _len, _ref2, _ref3; + _ref2 = this.cases; + for (_i = 0, _len = _ref2.length; _i < _len; _i++) { + pair = _ref2[_i]; + pair[1].makeReturn(res); + } + if (res) { + this.otherwise || (this.otherwise = new Block([new Literal('void 0')])); + } + if ((_ref3 = this.otherwise) != null) { + _ref3.makeReturn(res); + } + return this; + }; + + Switch.prototype.compileNode = function(o) { + var block, body, cond, conditions, expr, fragments, i, idt1, idt2, _i, _j, _len, _len1, _ref2, _ref3, _ref4; + idt1 = o.indent + TAB; + idt2 = o.indent = idt1 + TAB; + fragments = [].concat(this.makeCode(this.tab + "switch ("), (this.subject ? this.subject.compileToFragments(o, LEVEL_PAREN) : this.makeCode("false")), this.makeCode(") {\n")); + _ref2 = this.cases; + for (i = _i = 0, _len = _ref2.length; _i < _len; i = ++_i) { + _ref3 = _ref2[i], conditions = _ref3[0], block = _ref3[1]; + _ref4 = flatten([conditions]); + for (_j = 0, _len1 = _ref4.length; _j < _len1; _j++) { + cond = _ref4[_j]; + if (!this.subject) { + cond = cond.invert(); + } + fragments = fragments.concat(this.makeCode(idt1 + "case "), cond.compileToFragments(o, LEVEL_PAREN), this.makeCode(":\n")); + } + if ((body = block.compileToFragments(o, LEVEL_TOP)).length > 0) { + fragments = fragments.concat(body, this.makeCode('\n')); + } + if (i === this.cases.length - 1 && !this.otherwise) { + break; + } + expr = this.lastNonComment(block.expressions); + if (expr instanceof Return || (expr instanceof Literal && expr.jumps() && expr.value !== 'debugger')) { + continue; + } + fragments.push(cond.makeCode(idt2 + 'break;\n')); + } + if (this.otherwise && this.otherwise.expressions.length) { + fragments.push.apply(fragments, [this.makeCode(idt1 + "default:\n")].concat(__slice.call(this.otherwise.compileToFragments(o, LEVEL_TOP)), [this.makeCode("\n")])); + } + fragments.push(this.makeCode(this.tab + '}')); + return fragments; + }; + + return Switch; + + })(Base); + + exports.If = If = (function(_super) { + __extends(If, _super); + + function If(condition, body, options) { + this.body = body; + if (options == null) { + options = {}; + } + this.condition = options.type === 'unless' ? condition.invert() : condition; + this.elseBody = null; + this.isChain = false; + this.soak = options.soak; + } + + If.prototype.children = ['condition', 'body', 'elseBody']; + + If.prototype.bodyNode = function() { + var _ref2; + return (_ref2 = this.body) != null ? _ref2.unwrap() : void 0; + }; + + If.prototype.elseBodyNode = function() { + var _ref2; + return (_ref2 = this.elseBody) != null ? _ref2.unwrap() : void 0; + }; + + If.prototype.addElse = function(elseBody) { + if (this.isChain) { + this.elseBodyNode().addElse(elseBody); + } else { + this.isChain = elseBody instanceof If; + this.elseBody = this.ensureBlock(elseBody); + this.elseBody.updateLocationDataIfMissing(elseBody.locationData); + } + return this; + }; + + If.prototype.isStatement = function(o) { + var _ref2; + return (o != null ? o.level : void 0) === LEVEL_TOP || this.bodyNode().isStatement(o) || ((_ref2 = this.elseBodyNode()) != null ? _ref2.isStatement(o) : void 0); + }; + + If.prototype.jumps = function(o) { + var _ref2; + return this.body.jumps(o) || ((_ref2 = this.elseBody) != null ? _ref2.jumps(o) : void 0); + }; + + If.prototype.compileNode = function(o) { + if (this.isStatement(o)) { + return this.compileStatement(o); + } else { + return this.compileExpression(o); + } + }; + + If.prototype.makeReturn = function(res) { + if (res) { + this.elseBody || (this.elseBody = new Block([new Literal('void 0')])); + } + this.body && (this.body = new Block([this.body.makeReturn(res)])); + this.elseBody && (this.elseBody = new Block([this.elseBody.makeReturn(res)])); + return this; + }; + + If.prototype.ensureBlock = function(node) { + if (node instanceof Block) { + return node; + } else { + return new Block([node]); + } + }; + + If.prototype.compileStatement = function(o) { + var answer, body, child, cond, exeq, ifPart, indent; + child = del(o, 'chainChild'); + exeq = del(o, 'isExistentialEquals'); + if (exeq) { + return new If(this.condition.invert(), this.elseBodyNode(), { + type: 'if' + }).compileToFragments(o); + } + indent = o.indent + TAB; + cond = this.condition.compileToFragments(o, LEVEL_PAREN); + body = this.ensureBlock(this.body).compileToFragments(merge(o, { + indent: indent + })); + ifPart = [].concat(this.makeCode("if ("), cond, this.makeCode(") {\n"), body, this.makeCode("\n" + this.tab + "}")); + if (!child) { + ifPart.unshift(this.makeCode(this.tab)); + } + if (!this.elseBody) { + return ifPart; + } + answer = ifPart.concat(this.makeCode(' else ')); + if (this.isChain) { + o.chainChild = true; + answer = answer.concat(this.elseBody.unwrap().compileToFragments(o, LEVEL_TOP)); + } else { + answer = answer.concat(this.makeCode("{\n"), this.elseBody.compileToFragments(merge(o, { + indent: indent + }), LEVEL_TOP), this.makeCode("\n" + this.tab + "}")); + } + return answer; + }; + + If.prototype.compileExpression = function(o) { + var alt, body, cond, fragments; + cond = this.condition.compileToFragments(o, LEVEL_COND); + body = this.bodyNode().compileToFragments(o, LEVEL_LIST); + alt = this.elseBodyNode() ? this.elseBodyNode().compileToFragments(o, LEVEL_LIST) : [this.makeCode('void 0')]; + fragments = cond.concat(this.makeCode(" ? "), body, this.makeCode(" : "), alt); + if (o.level >= LEVEL_COND) { + return this.wrapInBraces(fragments); + } else { + return fragments; + } + }; + + If.prototype.unfoldSoak = function() { + return this.soak && this; + }; + + return If; + + })(Base); + + UTILITIES = { + "extends": function() { + return "function(child, parent) { for (var key in parent) { if (" + (utility('hasProp')) + ".call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }"; + }, + bind: function() { + return 'function(fn, me){ return function(){ return fn.apply(me, arguments); }; }'; + }, + indexOf: function() { + return "[].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }"; + }, + hasProp: function() { + return '{}.hasOwnProperty'; + }, + slice: function() { + return '[].slice'; + } + }; + + LEVEL_TOP = 1; + + LEVEL_PAREN = 2; + + LEVEL_LIST = 3; + + LEVEL_COND = 4; + + LEVEL_OP = 5; + + LEVEL_ACCESS = 6; + + TAB = ' '; + + IDENTIFIER_STR = "[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*"; + + IDENTIFIER = RegExp("^" + IDENTIFIER_STR + "$"); + + SIMPLENUM = /^[+-]?\d+$/; + + HEXNUM = /^[+-]?0x[\da-f]+/i; + + NUMBER = /^[+-]?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)$/i; + + METHOD_DEF = RegExp("^(" + IDENTIFIER_STR + ")(\\.prototype)?(?:\\.(" + IDENTIFIER_STR + ")|\\[(\"(?:[^\\\\\"\\r\\n]|\\\\.)*\"|'(?:[^\\\\'\\r\\n]|\\\\.)*')\\]|\\[(0x[\\da-fA-F]+|\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\])$"); + + IS_STRING = /^['"]/; + + IS_REGEX = /^\//; + + utility = function(name) { + var ref; + ref = "__" + name; + Scope.root.assign(ref, UTILITIES[name]()); + return ref; + }; + + multident = function(code, tab) { + code = code.replace(/\n/g, '$&' + tab); + return code.replace(/\s+$/, ''); + }; + + parseNum = function(x) { + if (x == null) { + return 0; + } else if (x.match(HEXNUM)) { + return parseInt(x, 16); + } else { + return parseFloat(x); + } + }; + + isLiteralArguments = function(node) { + return node instanceof Literal && node.value === 'arguments' && !node.asKey; + }; + + isLiteralThis = function(node) { + return (node instanceof Literal && node.value === 'this' && !node.asKey) || (node instanceof Code && node.bound) || (node instanceof Call && node.isSuper); + }; + + unfoldSoak = function(o, parent, name) { + var ifn; + if (!(ifn = parent[name].unfoldSoak(o))) { + return; + } + parent[name] = ifn.body; + ifn.body = new Value(parent); + return ifn; + }; + + +}); + +ace.define("ace/mode/coffee/coffee-script",["require","exports","module","ace/mode/coffee/lexer","ace/mode/coffee/parser","ace/mode/coffee/nodes"], function(require, exports, module) { + + var Lexer = require("./lexer").Lexer; + var parser = require("./parser"); + + var lexer = new Lexer(); + parser.lexer = { + lex: function() { + var tag, token; + token = this.tokens[this.pos++]; + if (token) { + tag = token[0], this.yytext = token[1], this.yylloc = token[2]; + this.yylineno = this.yylloc.first_line; + } else { + tag = ''; + } + return tag; + }, + setInput: function(tokens) { + this.tokens = tokens; + return this.pos = 0; + }, + upcomingInput: function() { + return ""; + } + }; + parser.yy = require('./nodes'); + + exports.parse = function(code) { + return parser.parse(lexer.tokenize(code)); + }; +}); + +ace.define("ace/mode/coffee_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/mode/coffee/coffee-script"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var Mirror = require("../worker/mirror").Mirror; +var coffee = require("../mode/coffee/coffee-script"); + +window.addEventListener = function() {}; + + +var Worker = exports.Worker = function(sender) { + Mirror.call(this, sender); + this.setTimeout(250); +}; + +oop.inherits(Worker, Mirror); + +(function() { + + this.onUpdate = function() { + var value = this.doc.getValue(); + + try { + coffee.parse(value).compile(); + } catch(e) { + var loc = e.location; + if (loc) { + this.sender.emit("error", { + row: loc.first_line, + column: loc.first_column, + endRow: loc.last_line, + endColumn: loc.last_column, + text: e.message, + type: "error" + }); + } + return; + } + this.sender.emit("ok"); + }; + +}).call(Worker.prototype); + +}); + +ace.define("ace/lib/es5-shim",["require","exports","module"], function(require, exports, module) { + +function Empty() {} + +if (!Function.prototype.bind) { + Function.prototype.bind = function bind(that) { // .length is 1 + var target = this; + if (typeof target != "function") { + throw new TypeError("Function.prototype.bind called on incompatible " + target); + } + var args = slice.call(arguments, 1); // for normal call + var bound = function () { + + if (this instanceof bound) { + + var result = target.apply( + this, + args.concat(slice.call(arguments)) + ); + if (Object(result) === result) { + return result; + } + return this; + + } else { + return target.apply( + that, + args.concat(slice.call(arguments)) + ); + + } + + }; + if(target.prototype) { + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + return bound; + }; +} +var call = Function.prototype.call; +var prototypeOfArray = Array.prototype; +var prototypeOfObject = Object.prototype; +var slice = prototypeOfArray.slice; +var _toString = call.bind(prototypeOfObject.toString); +var owns = call.bind(prototypeOfObject.hasOwnProperty); +var defineGetter; +var defineSetter; +var lookupGetter; +var lookupSetter; +var supportsAccessors; +if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) { + defineGetter = call.bind(prototypeOfObject.__defineGetter__); + defineSetter = call.bind(prototypeOfObject.__defineSetter__); + lookupGetter = call.bind(prototypeOfObject.__lookupGetter__); + lookupSetter = call.bind(prototypeOfObject.__lookupSetter__); +} +if ([1,2].splice(0).length != 2) { + if(function() { // test IE < 9 to splice bug - see issue #138 + function makeArray(l) { + var a = new Array(l+2); + a[0] = a[1] = 0; + return a; + } + var array = [], lengthBefore; + + array.splice.apply(array, makeArray(20)); + array.splice.apply(array, makeArray(26)); + + lengthBefore = array.length; //46 + array.splice(5, 0, "XXX"); // add one element + + lengthBefore + 1 == array.length + + if (lengthBefore + 1 == array.length) { + return true;// has right splice implementation without bugs + } + }()) {//IE 6/7 + var array_splice = Array.prototype.splice; + Array.prototype.splice = function(start, deleteCount) { + if (!arguments.length) { + return []; + } else { + return array_splice.apply(this, [ + start === void 0 ? 0 : start, + deleteCount === void 0 ? (this.length - start) : deleteCount + ].concat(slice.call(arguments, 2))) + } + }; + } else {//IE8 + Array.prototype.splice = function(pos, removeCount){ + var length = this.length; + if (pos > 0) { + if (pos > length) + pos = length; + } else if (pos == void 0) { + pos = 0; + } else if (pos < 0) { + pos = Math.max(length + pos, 0); + } + + if (!(pos+removeCount < length)) + removeCount = length - pos; + + var removed = this.slice(pos, pos+removeCount); + var insert = slice.call(arguments, 2); + var add = insert.length; + if (pos === length) { + if (add) { + this.push.apply(this, insert); + } + } else { + var remove = Math.min(removeCount, length - pos); + var tailOldPos = pos + remove; + var tailNewPos = tailOldPos + add - remove; + var tailCount = length - tailOldPos; + var lengthAfterRemove = length - remove; + + if (tailNewPos < tailOldPos) { // case A + for (var i = 0; i < tailCount; ++i) { + this[tailNewPos+i] = this[tailOldPos+i]; + } + } else if (tailNewPos > tailOldPos) { // case B + for (i = tailCount; i--; ) { + this[tailNewPos+i] = this[tailOldPos+i]; + } + } // else, add == remove (nothing to do) + + if (add && pos === lengthAfterRemove) { + this.length = lengthAfterRemove; // truncate array + this.push.apply(this, insert); + } else { + this.length = lengthAfterRemove + add; // reserves space + for (i = 0; i < add; ++i) { + this[pos+i] = insert[i]; + } + } + } + return removed; + }; + } +} +if (!Array.isArray) { + Array.isArray = function isArray(obj) { + return _toString(obj) == "[object Array]"; + }; +} +var boxedString = Object("a"), + splitString = boxedString[0] != "a" || !(0 in boxedString); + +if (!Array.prototype.forEach) { + Array.prototype.forEach = function forEach(fun /*, thisp*/) { + var object = toObject(this), + self = splitString && _toString(this) == "[object String]" ? + this.split("") : + object, + thisp = arguments[1], + i = -1, + length = self.length >>> 0; + if (_toString(fun) != "[object Function]") { + throw new TypeError(); // TODO message + } + + while (++i < length) { + if (i in self) { + fun.call(thisp, self[i], i, object); + } + } + }; +} +if (!Array.prototype.map) { + Array.prototype.map = function map(fun /*, thisp*/) { + var object = toObject(this), + self = splitString && _toString(this) == "[object String]" ? + this.split("") : + object, + length = self.length >>> 0, + result = Array(length), + thisp = arguments[1]; + if (_toString(fun) != "[object Function]") { + throw new TypeError(fun + " is not a function"); + } + + for (var i = 0; i < length; i++) { + if (i in self) + result[i] = fun.call(thisp, self[i], i, object); + } + return result; + }; +} +if (!Array.prototype.filter) { + Array.prototype.filter = function filter(fun /*, thisp */) { + var object = toObject(this), + self = splitString && _toString(this) == "[object String]" ? + this.split("") : + object, + length = self.length >>> 0, + result = [], + value, + thisp = arguments[1]; + if (_toString(fun) != "[object Function]") { + throw new TypeError(fun + " is not a function"); + } + + for (var i = 0; i < length; i++) { + if (i in self) { + value = self[i]; + if (fun.call(thisp, value, i, object)) { + result.push(value); + } + } + } + return result; + }; +} +if (!Array.prototype.every) { + Array.prototype.every = function every(fun /*, thisp */) { + var object = toObject(this), + self = splitString && _toString(this) == "[object String]" ? + this.split("") : + object, + length = self.length >>> 0, + thisp = arguments[1]; + if (_toString(fun) != "[object Function]") { + throw new TypeError(fun + " is not a function"); + } + + for (var i = 0; i < length; i++) { + if (i in self && !fun.call(thisp, self[i], i, object)) { + return false; + } + } + return true; + }; +} +if (!Array.prototype.some) { + Array.prototype.some = function some(fun /*, thisp */) { + var object = toObject(this), + self = splitString && _toString(this) == "[object String]" ? + this.split("") : + object, + length = self.length >>> 0, + thisp = arguments[1]; + if (_toString(fun) != "[object Function]") { + throw new TypeError(fun + " is not a function"); + } + + for (var i = 0; i < length; i++) { + if (i in self && fun.call(thisp, self[i], i, object)) { + return true; + } + } + return false; + }; +} +if (!Array.prototype.reduce) { + Array.prototype.reduce = function reduce(fun /*, initial*/) { + var object = toObject(this), + self = splitString && _toString(this) == "[object String]" ? + this.split("") : + object, + length = self.length >>> 0; + if (_toString(fun) != "[object Function]") { + throw new TypeError(fun + " is not a function"); + } + if (!length && arguments.length == 1) { + throw new TypeError("reduce of empty array with no initial value"); + } + + var i = 0; + var result; + if (arguments.length >= 2) { + result = arguments[1]; + } else { + do { + if (i in self) { + result = self[i++]; + break; + } + if (++i >= length) { + throw new TypeError("reduce of empty array with no initial value"); + } + } while (true); + } + + for (; i < length; i++) { + if (i in self) { + result = fun.call(void 0, result, self[i], i, object); + } + } + + return result; + }; +} +if (!Array.prototype.reduceRight) { + Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) { + var object = toObject(this), + self = splitString && _toString(this) == "[object String]" ? + this.split("") : + object, + length = self.length >>> 0; + if (_toString(fun) != "[object Function]") { + throw new TypeError(fun + " is not a function"); + } + if (!length && arguments.length == 1) { + throw new TypeError("reduceRight of empty array with no initial value"); + } + + var result, i = length - 1; + if (arguments.length >= 2) { + result = arguments[1]; + } else { + do { + if (i in self) { + result = self[i--]; + break; + } + if (--i < 0) { + throw new TypeError("reduceRight of empty array with no initial value"); + } + } while (true); + } + + do { + if (i in this) { + result = fun.call(void 0, result, self[i], i, object); + } + } while (i--); + + return result; + }; +} +if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) { + Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) { + var self = splitString && _toString(this) == "[object String]" ? + this.split("") : + toObject(this), + length = self.length >>> 0; + + if (!length) { + return -1; + } + + var i = 0; + if (arguments.length > 1) { + i = toInteger(arguments[1]); + } + i = i >= 0 ? i : Math.max(0, length + i); + for (; i < length; i++) { + if (i in self && self[i] === sought) { + return i; + } + } + return -1; + }; +} +if (!Array.prototype.lastIndexOf || ([0, 1].lastIndexOf(0, -3) != -1)) { + Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) { + var self = splitString && _toString(this) == "[object String]" ? + this.split("") : + toObject(this), + length = self.length >>> 0; + + if (!length) { + return -1; + } + var i = length - 1; + if (arguments.length > 1) { + i = Math.min(i, toInteger(arguments[1])); + } + i = i >= 0 ? i : length - Math.abs(i); + for (; i >= 0; i--) { + if (i in self && sought === self[i]) { + return i; + } + } + return -1; + }; +} +if (!Object.getPrototypeOf) { + Object.getPrototypeOf = function getPrototypeOf(object) { + return object.__proto__ || ( + object.constructor ? + object.constructor.prototype : + prototypeOfObject + ); + }; +} +if (!Object.getOwnPropertyDescriptor) { + var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a " + + "non-object: "; + Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) { + if ((typeof object != "object" && typeof object != "function") || object === null) + throw new TypeError(ERR_NON_OBJECT + object); + if (!owns(object, property)) + return; + + var descriptor, getter, setter; + descriptor = { enumerable: true, configurable: true }; + if (supportsAccessors) { + var prototype = object.__proto__; + object.__proto__ = prototypeOfObject; + + var getter = lookupGetter(object, property); + var setter = lookupSetter(object, property); + object.__proto__ = prototype; + + if (getter || setter) { + if (getter) descriptor.get = getter; + if (setter) descriptor.set = setter; + return descriptor; + } + } + descriptor.value = object[property]; + return descriptor; + }; +} +if (!Object.getOwnPropertyNames) { + Object.getOwnPropertyNames = function getOwnPropertyNames(object) { + return Object.keys(object); + }; +} +if (!Object.create) { + var createEmpty; + if (Object.prototype.__proto__ === null) { + createEmpty = function () { + return { "__proto__": null }; + }; + } else { + createEmpty = function () { + var empty = {}; + for (var i in empty) + empty[i] = null; + empty.constructor = + empty.hasOwnProperty = + empty.propertyIsEnumerable = + empty.isPrototypeOf = + empty.toLocaleString = + empty.toString = + empty.valueOf = + empty.__proto__ = null; + return empty; + } + } + + Object.create = function create(prototype, properties) { + var object; + if (prototype === null) { + object = createEmpty(); + } else { + if (typeof prototype != "object") + throw new TypeError("typeof prototype["+(typeof prototype)+"] != 'object'"); + var Type = function () {}; + Type.prototype = prototype; + object = new Type(); + object.__proto__ = prototype; + } + if (properties !== void 0) + Object.defineProperties(object, properties); + return object; + }; +} + +function doesDefinePropertyWork(object) { + try { + Object.defineProperty(object, "sentinel", {}); + return "sentinel" in object; + } catch (exception) { + } +} +if (Object.defineProperty) { + var definePropertyWorksOnObject = doesDefinePropertyWork({}); + var definePropertyWorksOnDom = typeof document == "undefined" || + doesDefinePropertyWork(document.createElement("div")); + if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) { + var definePropertyFallback = Object.defineProperty; + } +} + +if (!Object.defineProperty || definePropertyFallback) { + var ERR_NON_OBJECT_DESCRIPTOR = "Property description must be an object: "; + var ERR_NON_OBJECT_TARGET = "Object.defineProperty called on non-object: " + var ERR_ACCESSORS_NOT_SUPPORTED = "getters & setters can not be defined " + + "on this javascript engine"; + + Object.defineProperty = function defineProperty(object, property, descriptor) { + if ((typeof object != "object" && typeof object != "function") || object === null) + throw new TypeError(ERR_NON_OBJECT_TARGET + object); + if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null) + throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor); + if (definePropertyFallback) { + try { + return definePropertyFallback.call(Object, object, property, descriptor); + } catch (exception) { + } + } + if (owns(descriptor, "value")) { + + if (supportsAccessors && (lookupGetter(object, property) || + lookupSetter(object, property))) + { + var prototype = object.__proto__; + object.__proto__ = prototypeOfObject; + delete object[property]; + object[property] = descriptor.value; + object.__proto__ = prototype; + } else { + object[property] = descriptor.value; + } + } else { + if (!supportsAccessors) + throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED); + if (owns(descriptor, "get")) + defineGetter(object, property, descriptor.get); + if (owns(descriptor, "set")) + defineSetter(object, property, descriptor.set); + } + + return object; + }; +} +if (!Object.defineProperties) { + Object.defineProperties = function defineProperties(object, properties) { + for (var property in properties) { + if (owns(properties, property)) + Object.defineProperty(object, property, properties[property]); + } + return object; + }; +} +if (!Object.seal) { + Object.seal = function seal(object) { + return object; + }; +} +if (!Object.freeze) { + Object.freeze = function freeze(object) { + return object; + }; +} +try { + Object.freeze(function () {}); +} catch (exception) { + Object.freeze = (function freeze(freezeObject) { + return function freeze(object) { + if (typeof object == "function") { + return object; + } else { + return freezeObject(object); + } + }; + })(Object.freeze); +} +if (!Object.preventExtensions) { + Object.preventExtensions = function preventExtensions(object) { + return object; + }; +} +if (!Object.isSealed) { + Object.isSealed = function isSealed(object) { + return false; + }; +} +if (!Object.isFrozen) { + Object.isFrozen = function isFrozen(object) { + return false; + }; +} +if (!Object.isExtensible) { + Object.isExtensible = function isExtensible(object) { + if (Object(object) === object) { + throw new TypeError(); // TODO message + } + var name = ''; + while (owns(object, name)) { + name += '?'; + } + object[name] = true; + var returnValue = owns(object, name); + delete object[name]; + return returnValue; + }; +} +if (!Object.keys) { + var hasDontEnumBug = true, + dontEnums = [ + "toString", + "toLocaleString", + "valueOf", + "hasOwnProperty", + "isPrototypeOf", + "propertyIsEnumerable", + "constructor" + ], + dontEnumsLength = dontEnums.length; + + for (var key in {"toString": null}) { + hasDontEnumBug = false; + } + + Object.keys = function keys(object) { + + if ( + (typeof object != "object" && typeof object != "function") || + object === null + ) { + throw new TypeError("Object.keys called on a non-object"); + } + + var keys = []; + for (var name in object) { + if (owns(object, name)) { + keys.push(name); + } + } + + if (hasDontEnumBug) { + for (var i = 0, ii = dontEnumsLength; i < ii; i++) { + var dontEnum = dontEnums[i]; + if (owns(object, dontEnum)) { + keys.push(dontEnum); + } + } + } + return keys; + }; + +} +if (!Date.now) { + Date.now = function now() { + return new Date().getTime(); + }; +} +var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" + + "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" + + "\u2029\uFEFF"; +if (!String.prototype.trim || ws.trim()) { + ws = "[" + ws + "]"; + var trimBeginRegexp = new RegExp("^" + ws + ws + "*"), + trimEndRegexp = new RegExp(ws + ws + "*$"); + String.prototype.trim = function trim() { + return String(this).replace(trimBeginRegexp, "").replace(trimEndRegexp, ""); + }; +} + +function toInteger(n) { + n = +n; + if (n !== n) { // isNaN + n = 0; + } else if (n !== 0 && n !== (1/0) && n !== -(1/0)) { + n = (n > 0 || -1) * Math.floor(Math.abs(n)); + } + return n; +} + +function isPrimitive(input) { + var type = typeof input; + return ( + input === null || + type === "undefined" || + type === "boolean" || + type === "number" || + type === "string" + ); +} + +function toPrimitive(input) { + var val, valueOf, toString; + if (isPrimitive(input)) { + return input; + } + valueOf = input.valueOf; + if (typeof valueOf === "function") { + val = valueOf.call(input); + if (isPrimitive(val)) { + return val; + } + } + toString = input.toString; + if (typeof toString === "function") { + val = toString.call(input); + if (isPrimitive(val)) { + return val; + } + } + throw new TypeError(); +} +var toObject = function (o) { + if (o == null) { // this matches both null and undefined + throw new TypeError("can't convert "+o+" to object"); + } + return Object(o); +}; + +}); diff --git a/lib/ace/src-noconflict/worker-css.js b/lib/ace/src-noconflict/worker-css.js new file mode 100644 index 00000000..926966cb --- /dev/null +++ b/lib/ace/src-noconflict/worker-css.js @@ -0,0 +1,8672 @@ +"no use strict"; +;(function(window) { +if (typeof window.window != "undefined" && window.document) { + return; +} + +window.console = function() { + var msgs = Array.prototype.slice.call(arguments, 0); + postMessage({type: "log", data: msgs}); +}; +window.console.error = +window.console.warn = +window.console.log = +window.console.trace = window.console; + +window.window = window; +window.ace = window; + +window.onerror = function(message, file, line, col, err) { + console.error("Worker " + (err ? err.stack : message)); +}; + +window.normalizeModule = function(parentId, moduleName) { + // normalize plugin requires + if (moduleName.indexOf("!") !== -1) { + var chunks = moduleName.split("!"); + return window.normalizeModule(parentId, chunks[0]) + "!" + window.normalizeModule(parentId, chunks[1]); + } + // normalize relative requires + if (moduleName.charAt(0) == ".") { + var base = parentId.split("/").slice(0, -1).join("/"); + moduleName = (base ? base + "/" : "") + moduleName; + + while(moduleName.indexOf(".") !== -1 && previous != moduleName) { + var previous = moduleName; + moduleName = moduleName.replace(/^\.\//, "").replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, ""); + } + } + + return moduleName; +}; + +window.require = function(parentId, id) { + if (!id) { + id = parentId; + parentId = null; + } + if (!id.charAt) + throw new Error("worker.js require() accepts only (parentId, id) as arguments"); + + id = window.normalizeModule(parentId, id); + + var module = window.require.modules[id]; + if (module) { + if (!module.initialized) { + module.initialized = true; + module.exports = module.factory().exports; + } + return module.exports; + } + + var chunks = id.split("/"); + if (!window.require.tlns) + return console.log("unable to load " + id); + chunks[0] = window.require.tlns[chunks[0]] || chunks[0]; + var path = chunks.join("/") + ".js"; + + window.require.id = id; + importScripts(path); + return window.require(parentId, id); +}; +window.require.modules = {}; +window.require.tlns = {}; + +window.define = function(id, deps, factory) { + if (arguments.length == 2) { + factory = deps; + if (typeof id != "string") { + deps = id; + id = window.require.id; + } + } else if (arguments.length == 1) { + factory = id; + deps = []; + id = window.require.id; + } + + if (!deps.length) + // If there is no dependencies, we inject 'require', 'exports' and + // 'module' as dependencies, to provide CommonJS compatibility. + deps = ['require', 'exports', 'module']; + + if (id.indexOf("text!") === 0) + return; + + var req = function(childId) { + return window.require(id, childId); + }; + + window.require.modules[id] = { + exports: {}, + factory: function() { + var module = this; + var returnExports = factory.apply(this, deps.map(function(dep) { + switch(dep) { + // Because 'require', 'exports' and 'module' aren't actual + // dependencies, we must handle them seperately. + case 'require': return req; + case 'exports': return module.exports; + case 'module': return module; + // But for all other dependencies, we can just go ahead and + // require them. + default: return req(dep); + } + })); + if (returnExports) + module.exports = returnExports; + return module; + } + }; +}; +window.define.amd = {}; + +window.initBaseUrls = function initBaseUrls(topLevelNamespaces) { + require.tlns = topLevelNamespaces; +}; + +window.initSender = function initSender() { + + var EventEmitter = window.require("ace/lib/event_emitter").EventEmitter; + var oop = window.require("ace/lib/oop"); + + var Sender = function() {}; + + (function() { + + oop.implement(this, EventEmitter); + + this.callback = function(data, callbackId) { + postMessage({ + type: "call", + id: callbackId, + data: data + }); + }; + + this.emit = function(name, data) { + postMessage({ + type: "event", + name: name, + data: data + }); + }; + + }).call(Sender.prototype); + + return new Sender(); +}; + +var main = window.main = null; +var sender = window.sender = null; + +window.onmessage = function(e) { + var msg = e.data; + if (msg.command) { + if (main[msg.command]) + main[msg.command].apply(main, msg.args); + else + throw new Error("Unknown command:" + msg.command); + } + else if (msg.init) { + initBaseUrls(msg.tlns); + require("ace/lib/es5-shim"); + sender = window.sender = initSender(); + var clazz = require(msg.module)[msg.classname]; + main = window.main = new clazz(sender); + } + else if (msg.event && sender) { + sender._signal(msg.event, msg.data); + } +}; +})(this); + +ace.define("ace/lib/oop",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.inherits = function(ctor, superCtor) { + ctor.super_ = superCtor; + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); +}; + +exports.mixin = function(obj, mixin) { + for (var key in mixin) { + obj[key] = mixin[key]; + } + return obj; +}; + +exports.implement = function(proto, mixin) { + exports.mixin(proto, mixin); +}; + +}); + +ace.define("ace/lib/lang",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.last = function(a) { + return a[a.length - 1]; +}; + +exports.stringReverse = function(string) { + return string.split("").reverse().join(""); +}; + +exports.stringRepeat = function (string, count) { + var result = ''; + while (count > 0) { + if (count & 1) + result += string; + + if (count >>= 1) + string += string; + } + return result; +}; + +var trimBeginRegexp = /^\s\s*/; +var trimEndRegexp = /\s\s*$/; + +exports.stringTrimLeft = function (string) { + return string.replace(trimBeginRegexp, ''); +}; + +exports.stringTrimRight = function (string) { + return string.replace(trimEndRegexp, ''); +}; + +exports.copyObject = function(obj) { + var copy = {}; + for (var key in obj) { + copy[key] = obj[key]; + } + return copy; +}; + +exports.copyArray = function(array){ + var copy = []; + for (var i=0, l=array.length; i [" + this.end.row + "/" + this.end.column + "]"); + }; + + this.contains = function(row, column) { + return this.compare(row, column) == 0; + }; + this.compareRange = function(range) { + var cmp, + end = range.end, + start = range.start; + + cmp = this.compare(end.row, end.column); + if (cmp == 1) { + cmp = this.compare(start.row, start.column); + if (cmp == 1) { + return 2; + } else if (cmp == 0) { + return 1; + } else { + return 0; + } + } else if (cmp == -1) { + return -2; + } else { + cmp = this.compare(start.row, start.column); + if (cmp == -1) { + return -1; + } else if (cmp == 1) { + return 42; + } else { + return 0; + } + } + }; + this.comparePoint = function(p) { + return this.compare(p.row, p.column); + }; + this.containsRange = function(range) { + return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0; + }; + this.intersects = function(range) { + var cmp = this.compareRange(range); + return (cmp == -1 || cmp == 0 || cmp == 1); + }; + this.isEnd = function(row, column) { + return this.end.row == row && this.end.column == column; + }; + this.isStart = function(row, column) { + return this.start.row == row && this.start.column == column; + }; + this.setStart = function(row, column) { + if (typeof row == "object") { + this.start.column = row.column; + this.start.row = row.row; + } else { + this.start.row = row; + this.start.column = column; + } + }; + this.setEnd = function(row, column) { + if (typeof row == "object") { + this.end.column = row.column; + this.end.row = row.row; + } else { + this.end.row = row; + this.end.column = column; + } + }; + this.inside = function(row, column) { + if (this.compare(row, column) == 0) { + if (this.isEnd(row, column) || this.isStart(row, column)) { + return false; + } else { + return true; + } + } + return false; + }; + this.insideStart = function(row, column) { + if (this.compare(row, column) == 0) { + if (this.isEnd(row, column)) { + return false; + } else { + return true; + } + } + return false; + }; + this.insideEnd = function(row, column) { + if (this.compare(row, column) == 0) { + if (this.isStart(row, column)) { + return false; + } else { + return true; + } + } + return false; + }; + this.compare = function(row, column) { + if (!this.isMultiLine()) { + if (row === this.start.row) { + return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0); + }; + } + + if (row < this.start.row) + return -1; + + if (row > this.end.row) + return 1; + + if (this.start.row === row) + return column >= this.start.column ? 0 : -1; + + if (this.end.row === row) + return column <= this.end.column ? 0 : 1; + + return 0; + }; + this.compareStart = function(row, column) { + if (this.start.row == row && this.start.column == column) { + return -1; + } else { + return this.compare(row, column); + } + }; + this.compareEnd = function(row, column) { + if (this.end.row == row && this.end.column == column) { + return 1; + } else { + return this.compare(row, column); + } + }; + this.compareInside = function(row, column) { + if (this.end.row == row && this.end.column == column) { + return 1; + } else if (this.start.row == row && this.start.column == column) { + return -1; + } else { + return this.compare(row, column); + } + }; + this.clipRows = function(firstRow, lastRow) { + if (this.end.row > lastRow) + var end = {row: lastRow + 1, column: 0}; + else if (this.end.row < firstRow) + var end = {row: firstRow, column: 0}; + + if (this.start.row > lastRow) + var start = {row: lastRow + 1, column: 0}; + else if (this.start.row < firstRow) + var start = {row: firstRow, column: 0}; + + return Range.fromPoints(start || this.start, end || this.end); + }; + this.extend = function(row, column) { + var cmp = this.compare(row, column); + + if (cmp == 0) + return this; + else if (cmp == -1) + var start = {row: row, column: column}; + else + var end = {row: row, column: column}; + + return Range.fromPoints(start || this.start, end || this.end); + }; + + this.isEmpty = function() { + return (this.start.row === this.end.row && this.start.column === this.end.column); + }; + this.isMultiLine = function() { + return (this.start.row !== this.end.row); + }; + this.clone = function() { + return Range.fromPoints(this.start, this.end); + }; + this.collapseRows = function() { + if (this.end.column == 0) + return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0) + else + return new Range(this.start.row, 0, this.end.row, 0) + }; + this.toScreenRange = function(session) { + var screenPosStart = session.documentToScreenPosition(this.start); + var screenPosEnd = session.documentToScreenPosition(this.end); + + return new Range( + screenPosStart.row, screenPosStart.column, + screenPosEnd.row, screenPosEnd.column + ); + }; + this.moveBy = function(row, column) { + this.start.row += row; + this.start.column += column; + this.end.row += row; + this.end.column += column; + }; + +}).call(Range.prototype); +Range.fromPoints = function(start, end) { + return new Range(start.row, start.column, end.row, end.column); +}; +Range.comparePoints = comparePoints; + +Range.comparePoints = function(p1, p2) { + return p1.row - p2.row || p1.column - p2.column; +}; + + +exports.Range = Range; +}); + +ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"], function(require, exports, module) { +"use strict"; + +var oop = require("./lib/oop"); +var EventEmitter = require("./lib/event_emitter").EventEmitter; + +var Anchor = exports.Anchor = function(doc, row, column) { + this.$onChange = this.onChange.bind(this); + this.attach(doc); + + if (typeof column == "undefined") + this.setPosition(row.row, row.column); + else + this.setPosition(row, column); +}; + +(function() { + + oop.implement(this, EventEmitter); + this.getPosition = function() { + return this.$clipPositionToDocument(this.row, this.column); + }; + this.getDocument = function() { + return this.document; + }; + this.$insertRight = false; + this.onChange = function(e) { + var delta = e.data; + var range = delta.range; + + if (range.start.row == range.end.row && range.start.row != this.row) + return; + + if (range.start.row > this.row) + return; + + if (range.start.row == this.row && range.start.column > this.column) + return; + + var row = this.row; + var column = this.column; + var start = range.start; + var end = range.end; + + if (delta.action === "insertText") { + if (start.row === row && start.column <= column) { + if (start.column === column && this.$insertRight) { + } else if (start.row === end.row) { + column += end.column - start.column; + } else { + column -= start.column; + row += end.row - start.row; + } + } else if (start.row !== end.row && start.row < row) { + row += end.row - start.row; + } + } else if (delta.action === "insertLines") { + if (start.row === row && column === 0 && this.$insertRight) { + } + else if (start.row <= row) { + row += end.row - start.row; + } + } else if (delta.action === "removeText") { + if (start.row === row && start.column < column) { + if (end.column >= column) + column = start.column; + else + column = Math.max(0, column - (end.column - start.column)); + + } else if (start.row !== end.row && start.row < row) { + if (end.row === row) + column = Math.max(0, column - end.column) + start.column; + row -= (end.row - start.row); + } else if (end.row === row) { + row -= end.row - start.row; + column = Math.max(0, column - end.column) + start.column; + } + } else if (delta.action == "removeLines") { + if (start.row <= row) { + if (end.row <= row) + row -= end.row - start.row; + else { + row = start.row; + column = 0; + } + } + } + + this.setPosition(row, column, true); + }; + this.setPosition = function(row, column, noClip) { + var pos; + if (noClip) { + pos = { + row: row, + column: column + }; + } else { + pos = this.$clipPositionToDocument(row, column); + } + + if (this.row == pos.row && this.column == pos.column) + return; + + var old = { + row: this.row, + column: this.column + }; + + this.row = pos.row; + this.column = pos.column; + this._signal("change", { + old: old, + value: pos + }); + }; + this.detach = function() { + this.document.removeEventListener("change", this.$onChange); + }; + this.attach = function(doc) { + this.document = doc || this.document; + this.document.on("change", this.$onChange); + }; + this.$clipPositionToDocument = function(row, column) { + var pos = {}; + + if (row >= this.document.getLength()) { + pos.row = Math.max(0, this.document.getLength() - 1); + pos.column = this.document.getLine(pos.row).length; + } + else if (row < 0) { + pos.row = 0; + pos.column = 0; + } + else { + pos.row = row; + pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column)); + } + + if (column < 0) + pos.column = 0; + + return pos; + }; + +}).call(Anchor.prototype); + +}); + +ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"], function(require, exports, module) { +"use strict"; + +var oop = require("./lib/oop"); +var EventEmitter = require("./lib/event_emitter").EventEmitter; +var Range = require("./range").Range; +var Anchor = require("./anchor").Anchor; + +var Document = function(text) { + this.$lines = []; + if (text.length === 0) { + this.$lines = [""]; + } else if (Array.isArray(text)) { + this._insertLines(0, text); + } else { + this.insert({row: 0, column:0}, text); + } +}; + +(function() { + + oop.implement(this, EventEmitter); + this.setValue = function(text) { + var len = this.getLength(); + this.remove(new Range(0, 0, len, this.getLine(len-1).length)); + this.insert({row: 0, column:0}, text); + }; + this.getValue = function() { + return this.getAllLines().join(this.getNewLineCharacter()); + }; + this.createAnchor = function(row, column) { + return new Anchor(this, row, column); + }; + if ("aaa".split(/a/).length === 0) + this.$split = function(text) { + return text.replace(/\r\n|\r/g, "\n").split("\n"); + }; + else + this.$split = function(text) { + return text.split(/\r\n|\r|\n/); + }; + + + this.$detectNewLine = function(text) { + var match = text.match(/^.*?(\r\n|\r|\n)/m); + this.$autoNewLine = match ? match[1] : "\n"; + this._signal("changeNewLineMode"); + }; + this.getNewLineCharacter = function() { + switch (this.$newLineMode) { + case "windows": + return "\r\n"; + case "unix": + return "\n"; + default: + return this.$autoNewLine || "\n"; + } + }; + + this.$autoNewLine = ""; + this.$newLineMode = "auto"; + this.setNewLineMode = function(newLineMode) { + if (this.$newLineMode === newLineMode) + return; + + this.$newLineMode = newLineMode; + this._signal("changeNewLineMode"); + }; + this.getNewLineMode = function() { + return this.$newLineMode; + }; + this.isNewLine = function(text) { + return (text == "\r\n" || text == "\r" || text == "\n"); + }; + this.getLine = function(row) { + return this.$lines[row] || ""; + }; + this.getLines = function(firstRow, lastRow) { + return this.$lines.slice(firstRow, lastRow + 1); + }; + this.getAllLines = function() { + return this.getLines(0, this.getLength()); + }; + this.getLength = function() { + return this.$lines.length; + }; + this.getTextRange = function(range) { + if (range.start.row == range.end.row) { + return this.getLine(range.start.row) + .substring(range.start.column, range.end.column); + } + var lines = this.getLines(range.start.row, range.end.row); + lines[0] = (lines[0] || "").substring(range.start.column); + var l = lines.length - 1; + if (range.end.row - range.start.row == l) + lines[l] = lines[l].substring(0, range.end.column); + return lines.join(this.getNewLineCharacter()); + }; + + this.$clipPosition = function(position) { + var length = this.getLength(); + if (position.row >= length) { + position.row = Math.max(0, length - 1); + position.column = this.getLine(length-1).length; + } else if (position.row < 0) + position.row = 0; + return position; + }; + this.insert = function(position, text) { + if (!text || text.length === 0) + return position; + + position = this.$clipPosition(position); + if (this.getLength() <= 1) + this.$detectNewLine(text); + + var lines = this.$split(text); + var firstLine = lines.splice(0, 1)[0]; + var lastLine = lines.length == 0 ? null : lines.splice(lines.length - 1, 1)[0]; + + position = this.insertInLine(position, firstLine); + if (lastLine !== null) { + position = this.insertNewLine(position); // terminate first line + position = this._insertLines(position.row, lines); + position = this.insertInLine(position, lastLine || ""); + } + return position; + }; + this.insertLines = function(row, lines) { + if (row >= this.getLength()) + return this.insert({row: row, column: 0}, "\n" + lines.join("\n")); + return this._insertLines(Math.max(row, 0), lines); + }; + this._insertLines = function(row, lines) { + if (lines.length == 0) + return {row: row, column: 0}; + while (lines.length > 0xF000) { + var end = this._insertLines(row, lines.slice(0, 0xF000)); + lines = lines.slice(0xF000); + row = end.row; + } + + var args = [row, 0]; + args.push.apply(args, lines); + this.$lines.splice.apply(this.$lines, args); + + var range = new Range(row, 0, row + lines.length, 0); + var delta = { + action: "insertLines", + range: range, + lines: lines + }; + this._signal("change", { data: delta }); + return range.end; + }; + this.insertNewLine = function(position) { + position = this.$clipPosition(position); + var line = this.$lines[position.row] || ""; + + this.$lines[position.row] = line.substring(0, position.column); + this.$lines.splice(position.row + 1, 0, line.substring(position.column, line.length)); + + var end = { + row : position.row + 1, + column : 0 + }; + + var delta = { + action: "insertText", + range: Range.fromPoints(position, end), + text: this.getNewLineCharacter() + }; + this._signal("change", { data: delta }); + + return end; + }; + this.insertInLine = function(position, text) { + if (text.length == 0) + return position; + + var line = this.$lines[position.row] || ""; + + this.$lines[position.row] = line.substring(0, position.column) + text + + line.substring(position.column); + + var end = { + row : position.row, + column : position.column + text.length + }; + + var delta = { + action: "insertText", + range: Range.fromPoints(position, end), + text: text + }; + this._signal("change", { data: delta }); + + return end; + }; + this.remove = function(range) { + if (!(range instanceof Range)) + range = Range.fromPoints(range.start, range.end); + range.start = this.$clipPosition(range.start); + range.end = this.$clipPosition(range.end); + + if (range.isEmpty()) + return range.start; + + var firstRow = range.start.row; + var lastRow = range.end.row; + + if (range.isMultiLine()) { + var firstFullRow = range.start.column == 0 ? firstRow : firstRow + 1; + var lastFullRow = lastRow - 1; + + if (range.end.column > 0) + this.removeInLine(lastRow, 0, range.end.column); + + if (lastFullRow >= firstFullRow) + this._removeLines(firstFullRow, lastFullRow); + + if (firstFullRow != firstRow) { + this.removeInLine(firstRow, range.start.column, this.getLine(firstRow).length); + this.removeNewLine(range.start.row); + } + } + else { + this.removeInLine(firstRow, range.start.column, range.end.column); + } + return range.start; + }; + this.removeInLine = function(row, startColumn, endColumn) { + if (startColumn == endColumn) + return; + + var range = new Range(row, startColumn, row, endColumn); + var line = this.getLine(row); + var removed = line.substring(startColumn, endColumn); + var newLine = line.substring(0, startColumn) + line.substring(endColumn, line.length); + this.$lines.splice(row, 1, newLine); + + var delta = { + action: "removeText", + range: range, + text: removed + }; + this._signal("change", { data: delta }); + return range.start; + }; + this.removeLines = function(firstRow, lastRow) { + if (firstRow < 0 || lastRow >= this.getLength()) + return this.remove(new Range(firstRow, 0, lastRow + 1, 0)); + return this._removeLines(firstRow, lastRow); + }; + + this._removeLines = function(firstRow, lastRow) { + var range = new Range(firstRow, 0, lastRow + 1, 0); + var removed = this.$lines.splice(firstRow, lastRow - firstRow + 1); + + var delta = { + action: "removeLines", + range: range, + nl: this.getNewLineCharacter(), + lines: removed + }; + this._signal("change", { data: delta }); + return removed; + }; + this.removeNewLine = function(row) { + var firstLine = this.getLine(row); + var secondLine = this.getLine(row+1); + + var range = new Range(row, firstLine.length, row+1, 0); + var line = firstLine + secondLine; + + this.$lines.splice(row, 2, line); + + var delta = { + action: "removeText", + range: range, + text: this.getNewLineCharacter() + }; + this._signal("change", { data: delta }); + }; + this.replace = function(range, text) { + if (!(range instanceof Range)) + range = Range.fromPoints(range.start, range.end); + if (text.length == 0 && range.isEmpty()) + return range.start; + if (text == this.getTextRange(range)) + return range.end; + + this.remove(range); + if (text) { + var end = this.insert(range.start, text); + } + else { + end = range.start; + } + + return end; + }; + this.applyDeltas = function(deltas) { + for (var i=0; i=0; i--) { + var delta = deltas[i]; + + var range = Range.fromPoints(delta.range.start, delta.range.end); + + if (delta.action == "insertLines") + this._removeLines(range.start.row, range.end.row - 1); + else if (delta.action == "insertText") + this.remove(range); + else if (delta.action == "removeLines") + this._insertLines(range.start.row, delta.lines); + else if (delta.action == "removeText") + this.insert(range.start, delta.text); + } + }; + this.indexToPosition = function(index, startRow) { + var lines = this.$lines || this.getAllLines(); + var newlineLength = this.getNewLineCharacter().length; + for (var i = startRow || 0, l = lines.length; i < l; i++) { + index -= lines[i].length + newlineLength; + if (index < 0) + return {row: i, column: index + lines[i].length + newlineLength}; + } + return {row: l-1, column: lines[l-1].length}; + }; + this.positionToIndex = function(pos, startRow) { + var lines = this.$lines || this.getAllLines(); + var newlineLength = this.getNewLineCharacter().length; + var index = 0; + var row = Math.min(pos.row, lines.length); + for (var i = startRow || 0; i < row; ++i) + index += lines[i].length + newlineLength; + + return index + pos.column; + }; + +}).call(Document.prototype); + +exports.Document = Document; +}); + +ace.define("ace/worker/mirror",["require","exports","module","ace/document","ace/lib/lang"], function(require, exports, module) { +"use strict"; + +var Document = require("../document").Document; +var lang = require("../lib/lang"); + +var Mirror = exports.Mirror = function(sender) { + this.sender = sender; + var doc = this.doc = new Document(""); + + var deferredUpdate = this.deferredUpdate = lang.delayedCall(this.onUpdate.bind(this)); + + var _self = this; + sender.on("change", function(e) { + doc.applyDeltas(e.data); + if (_self.$timeout) + return deferredUpdate.schedule(_self.$timeout); + _self.onUpdate(); + }); +}; + +(function() { + + this.$timeout = 500; + + this.setTimeout = function(timeout) { + this.$timeout = timeout; + }; + + this.setValue = function(value) { + this.doc.setValue(value); + this.deferredUpdate.schedule(this.$timeout); + }; + + this.getValue = function(callbackId) { + this.sender.callback(this.doc.getValue(), callbackId); + }; + + this.onUpdate = function() { + }; + + this.isPending = function() { + return this.deferredUpdate.isPending(); + }; + +}).call(Mirror.prototype); + +}); + +ace.define("ace/mode/css/csslint",["require","exports","module"], function(require, exports, module) { +var parserlib = {}; +(function(){ +function EventTarget(){ + this._listeners = {}; +} + +EventTarget.prototype = { + constructor: EventTarget, + addListener: function(type, listener){ + if (!this._listeners[type]){ + this._listeners[type] = []; + } + + this._listeners[type].push(listener); + }, + fire: function(event){ + if (typeof event == "string"){ + event = { type: event }; + } + if (typeof event.target != "undefined"){ + event.target = this; + } + + if (typeof event.type == "undefined"){ + throw new Error("Event object missing 'type' property."); + } + + if (this._listeners[event.type]){ + var listeners = this._listeners[event.type].concat(); + for (var i=0, len=listeners.length; i < len; i++){ + listeners[i].call(this, event); + } + } + }, + removeListener: function(type, listener){ + if (this._listeners[type]){ + var listeners = this._listeners[type]; + for (var i=0, len=listeners.length; i < len; i++){ + if (listeners[i] === listener){ + listeners.splice(i, 1); + break; + } + } + + + } + } +}; +function StringReader(text){ + this._input = text.replace(/\n\r?/g, "\n"); + this._line = 1; + this._col = 1; + this._cursor = 0; +} + +StringReader.prototype = { + constructor: StringReader, + getCol: function(){ + return this._col; + }, + getLine: function(){ + return this._line ; + }, + eof: function(){ + return (this._cursor == this._input.length); + }, + peek: function(count){ + var c = null; + count = (typeof count == "undefined" ? 1 : count); + if (this._cursor < this._input.length){ + c = this._input.charAt(this._cursor + count - 1); + } + + return c; + }, + read: function(){ + var c = null; + if (this._cursor < this._input.length){ + if (this._input.charAt(this._cursor) == "\n"){ + this._line++; + this._col=1; + } else { + this._col++; + } + c = this._input.charAt(this._cursor++); + } + + return c; + }, + mark: function(){ + this._bookmark = { + cursor: this._cursor, + line: this._line, + col: this._col + }; + }, + + reset: function(){ + if (this._bookmark){ + this._cursor = this._bookmark.cursor; + this._line = this._bookmark.line; + this._col = this._bookmark.col; + delete this._bookmark; + } + }, + readTo: function(pattern){ + + var buffer = "", + c; + while (buffer.length < pattern.length || buffer.lastIndexOf(pattern) != buffer.length - pattern.length){ + c = this.read(); + if (c){ + buffer += c; + } else { + throw new Error("Expected \"" + pattern + "\" at line " + this._line + ", col " + this._col + "."); + } + } + + return buffer; + + }, + readWhile: function(filter){ + + var buffer = "", + c = this.read(); + + while(c !== null && filter(c)){ + buffer += c; + c = this.read(); + } + + return buffer; + + }, + readMatch: function(matcher){ + + var source = this._input.substring(this._cursor), + value = null; + if (typeof matcher == "string"){ + if (source.indexOf(matcher) === 0){ + value = this.readCount(matcher.length); + } + } else if (matcher instanceof RegExp){ + if (matcher.test(source)){ + value = this.readCount(RegExp.lastMatch.length); + } + } + + return value; + }, + readCount: function(count){ + var buffer = ""; + + while(count--){ + buffer += this.read(); + } + + return buffer; + } + +}; +function SyntaxError(message, line, col){ + this.col = col; + this.line = line; + this.message = message; + +} +SyntaxError.prototype = new Error(); +function SyntaxUnit(text, line, col, type){ + this.col = col; + this.line = line; + this.text = text; + this.type = type; +} +SyntaxUnit.fromToken = function(token){ + return new SyntaxUnit(token.value, token.startLine, token.startCol); +}; + +SyntaxUnit.prototype = { + constructor: SyntaxUnit, + valueOf: function(){ + return this.text; + }, + toString: function(){ + return this.text; + } + +}; +function TokenStreamBase(input, tokenData){ + this._reader = input ? new StringReader(input.toString()) : null; + this._token = null; + this._tokenData = tokenData; + this._lt = []; + this._ltIndex = 0; + + this._ltIndexCache = []; +} +TokenStreamBase.createTokenData = function(tokens){ + + var nameMap = [], + typeMap = {}, + tokenData = tokens.concat([]), + i = 0, + len = tokenData.length+1; + + tokenData.UNKNOWN = -1; + tokenData.unshift({name:"EOF"}); + + for (; i < len; i++){ + nameMap.push(tokenData[i].name); + tokenData[tokenData[i].name] = i; + if (tokenData[i].text){ + typeMap[tokenData[i].text] = i; + } + } + + tokenData.name = function(tt){ + return nameMap[tt]; + }; + + tokenData.type = function(c){ + return typeMap[c]; + }; + + return tokenData; +}; + +TokenStreamBase.prototype = { + constructor: TokenStreamBase, + match: function(tokenTypes, channel){ + if (!(tokenTypes instanceof Array)){ + tokenTypes = [tokenTypes]; + } + + var tt = this.get(channel), + i = 0, + len = tokenTypes.length; + + while(i < len){ + if (tt == tokenTypes[i++]){ + return true; + } + } + this.unget(); + return false; + }, + mustMatch: function(tokenTypes, channel){ + + var token; + if (!(tokenTypes instanceof Array)){ + tokenTypes = [tokenTypes]; + } + + if (!this.match.apply(this, arguments)){ + token = this.LT(1); + throw new SyntaxError("Expected " + this._tokenData[tokenTypes[0]].name + + " at line " + token.startLine + ", col " + token.startCol + ".", token.startLine, token.startCol); + } + }, + advance: function(tokenTypes, channel){ + + while(this.LA(0) !== 0 && !this.match(tokenTypes, channel)){ + this.get(); + } + + return this.LA(0); + }, + get: function(channel){ + + var tokenInfo = this._tokenData, + reader = this._reader, + value, + i =0, + len = tokenInfo.length, + found = false, + token, + info; + if (this._lt.length && this._ltIndex >= 0 && this._ltIndex < this._lt.length){ + + i++; + this._token = this._lt[this._ltIndex++]; + info = tokenInfo[this._token.type]; + while((info.channel !== undefined && channel !== info.channel) && + this._ltIndex < this._lt.length){ + this._token = this._lt[this._ltIndex++]; + info = tokenInfo[this._token.type]; + i++; + } + if ((info.channel === undefined || channel === info.channel) && + this._ltIndex <= this._lt.length){ + this._ltIndexCache.push(i); + return this._token.type; + } + } + token = this._getToken(); + if (token.type > -1 && !tokenInfo[token.type].hide){ + token.channel = tokenInfo[token.type].channel; + this._token = token; + this._lt.push(token); + this._ltIndexCache.push(this._lt.length - this._ltIndex + i); + if (this._lt.length > 5){ + this._lt.shift(); + } + if (this._ltIndexCache.length > 5){ + this._ltIndexCache.shift(); + } + this._ltIndex = this._lt.length; + } + info = tokenInfo[token.type]; + if (info && + (info.hide || + (info.channel !== undefined && channel !== info.channel))){ + return this.get(channel); + } else { + return token.type; + } + }, + LA: function(index){ + var total = index, + tt; + if (index > 0){ + if (index > 5){ + throw new Error("Too much lookahead."); + } + while(total){ + tt = this.get(); + total--; + } + while(total < index){ + this.unget(); + total++; + } + } else if (index < 0){ + + if(this._lt[this._ltIndex+index]){ + tt = this._lt[this._ltIndex+index].type; + } else { + throw new Error("Too much lookbehind."); + } + + } else { + tt = this._token.type; + } + + return tt; + + }, + LT: function(index){ + this.LA(index); + return this._lt[this._ltIndex+index-1]; + }, + peek: function(){ + return this.LA(1); + }, + token: function(){ + return this._token; + }, + tokenName: function(tokenType){ + if (tokenType < 0 || tokenType > this._tokenData.length){ + return "UNKNOWN_TOKEN"; + } else { + return this._tokenData[tokenType].name; + } + }, + tokenType: function(tokenName){ + return this._tokenData[tokenName] || -1; + }, + unget: function(){ + if (this._ltIndexCache.length){ + this._ltIndex -= this._ltIndexCache.pop();//--; + this._token = this._lt[this._ltIndex - 1]; + } else { + throw new Error("Too much lookahead."); + } + } + +}; + + +parserlib.util = { +StringReader: StringReader, +SyntaxError : SyntaxError, +SyntaxUnit : SyntaxUnit, +EventTarget : EventTarget, +TokenStreamBase : TokenStreamBase +}; +})(); +(function(){ +var EventTarget = parserlib.util.EventTarget, +TokenStreamBase = parserlib.util.TokenStreamBase, +StringReader = parserlib.util.StringReader, +SyntaxError = parserlib.util.SyntaxError, +SyntaxUnit = parserlib.util.SyntaxUnit; + +var Colors = { + aliceblue :"#f0f8ff", + antiquewhite :"#faebd7", + aqua :"#00ffff", + aquamarine :"#7fffd4", + azure :"#f0ffff", + beige :"#f5f5dc", + bisque :"#ffe4c4", + black :"#000000", + blanchedalmond :"#ffebcd", + blue :"#0000ff", + blueviolet :"#8a2be2", + brown :"#a52a2a", + burlywood :"#deb887", + cadetblue :"#5f9ea0", + chartreuse :"#7fff00", + chocolate :"#d2691e", + coral :"#ff7f50", + cornflowerblue :"#6495ed", + cornsilk :"#fff8dc", + crimson :"#dc143c", + cyan :"#00ffff", + darkblue :"#00008b", + darkcyan :"#008b8b", + darkgoldenrod :"#b8860b", + darkgray :"#a9a9a9", + darkgrey :"#a9a9a9", + darkgreen :"#006400", + darkkhaki :"#bdb76b", + darkmagenta :"#8b008b", + darkolivegreen :"#556b2f", + darkorange :"#ff8c00", + darkorchid :"#9932cc", + darkred :"#8b0000", + darksalmon :"#e9967a", + darkseagreen :"#8fbc8f", + darkslateblue :"#483d8b", + darkslategray :"#2f4f4f", + darkslategrey :"#2f4f4f", + darkturquoise :"#00ced1", + darkviolet :"#9400d3", + deeppink :"#ff1493", + deepskyblue :"#00bfff", + dimgray :"#696969", + dimgrey :"#696969", + dodgerblue :"#1e90ff", + firebrick :"#b22222", + floralwhite :"#fffaf0", + forestgreen :"#228b22", + fuchsia :"#ff00ff", + gainsboro :"#dcdcdc", + ghostwhite :"#f8f8ff", + gold :"#ffd700", + goldenrod :"#daa520", + gray :"#808080", + grey :"#808080", + green :"#008000", + greenyellow :"#adff2f", + honeydew :"#f0fff0", + hotpink :"#ff69b4", + indianred :"#cd5c5c", + indigo :"#4b0082", + ivory :"#fffff0", + khaki :"#f0e68c", + lavender :"#e6e6fa", + lavenderblush :"#fff0f5", + lawngreen :"#7cfc00", + lemonchiffon :"#fffacd", + lightblue :"#add8e6", + lightcoral :"#f08080", + lightcyan :"#e0ffff", + lightgoldenrodyellow :"#fafad2", + lightgray :"#d3d3d3", + lightgrey :"#d3d3d3", + lightgreen :"#90ee90", + lightpink :"#ffb6c1", + lightsalmon :"#ffa07a", + lightseagreen :"#20b2aa", + lightskyblue :"#87cefa", + lightslategray :"#778899", + lightslategrey :"#778899", + lightsteelblue :"#b0c4de", + lightyellow :"#ffffe0", + lime :"#00ff00", + limegreen :"#32cd32", + linen :"#faf0e6", + magenta :"#ff00ff", + maroon :"#800000", + mediumaquamarine:"#66cdaa", + mediumblue :"#0000cd", + mediumorchid :"#ba55d3", + mediumpurple :"#9370d8", + mediumseagreen :"#3cb371", + mediumslateblue :"#7b68ee", + mediumspringgreen :"#00fa9a", + mediumturquoise :"#48d1cc", + mediumvioletred :"#c71585", + midnightblue :"#191970", + mintcream :"#f5fffa", + mistyrose :"#ffe4e1", + moccasin :"#ffe4b5", + navajowhite :"#ffdead", + navy :"#000080", + oldlace :"#fdf5e6", + olive :"#808000", + olivedrab :"#6b8e23", + orange :"#ffa500", + orangered :"#ff4500", + orchid :"#da70d6", + palegoldenrod :"#eee8aa", + palegreen :"#98fb98", + paleturquoise :"#afeeee", + palevioletred :"#d87093", + papayawhip :"#ffefd5", + peachpuff :"#ffdab9", + peru :"#cd853f", + pink :"#ffc0cb", + plum :"#dda0dd", + powderblue :"#b0e0e6", + purple :"#800080", + red :"#ff0000", + rosybrown :"#bc8f8f", + royalblue :"#4169e1", + saddlebrown :"#8b4513", + salmon :"#fa8072", + sandybrown :"#f4a460", + seagreen :"#2e8b57", + seashell :"#fff5ee", + sienna :"#a0522d", + silver :"#c0c0c0", + skyblue :"#87ceeb", + slateblue :"#6a5acd", + slategray :"#708090", + slategrey :"#708090", + snow :"#fffafa", + springgreen :"#00ff7f", + steelblue :"#4682b4", + tan :"#d2b48c", + teal :"#008080", + thistle :"#d8bfd8", + tomato :"#ff6347", + turquoise :"#40e0d0", + violet :"#ee82ee", + wheat :"#f5deb3", + white :"#ffffff", + whitesmoke :"#f5f5f5", + yellow :"#ffff00", + yellowgreen :"#9acd32", + activeBorder :"Active window border.", + activecaption :"Active window caption.", + appworkspace :"Background color of multiple document interface.", + background :"Desktop background.", + buttonface :"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border.", + buttonhighlight :"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border.", + buttonshadow :"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border.", + buttontext :"Text on push buttons.", + captiontext :"Text in caption, size box, and scrollbar arrow box.", + graytext :"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color.", + greytext :"Greyed (disabled) text. This color is set to #000 if the current display driver does not support a solid grey color.", + highlight :"Item(s) selected in a control.", + highlighttext :"Text of item(s) selected in a control.", + inactiveborder :"Inactive window border.", + inactivecaption :"Inactive window caption.", + inactivecaptiontext :"Color of text in an inactive caption.", + infobackground :"Background color for tooltip controls.", + infotext :"Text color for tooltip controls.", + menu :"Menu background.", + menutext :"Text in menus.", + scrollbar :"Scroll bar gray area.", + threeddarkshadow :"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.", + threedface :"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border.", + threedhighlight :"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.", + threedlightshadow :"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.", + threedshadow :"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.", + window :"Window background.", + windowframe :"Window frame.", + windowtext :"Text in windows." +}; +function Combinator(text, line, col){ + + SyntaxUnit.call(this, text, line, col, Parser.COMBINATOR_TYPE); + this.type = "unknown"; + if (/^\s+$/.test(text)){ + this.type = "descendant"; + } else if (text == ">"){ + this.type = "child"; + } else if (text == "+"){ + this.type = "adjacent-sibling"; + } else if (text == "~"){ + this.type = "sibling"; + } + +} + +Combinator.prototype = new SyntaxUnit(); +Combinator.prototype.constructor = Combinator; +function MediaFeature(name, value){ + + SyntaxUnit.call(this, "(" + name + (value !== null ? ":" + value : "") + ")", name.startLine, name.startCol, Parser.MEDIA_FEATURE_TYPE); + this.name = name; + this.value = value; +} + +MediaFeature.prototype = new SyntaxUnit(); +MediaFeature.prototype.constructor = MediaFeature; +function MediaQuery(modifier, mediaType, features, line, col){ + + SyntaxUnit.call(this, (modifier ? modifier + " ": "") + (mediaType ? mediaType : "") + (mediaType && features.length > 0 ? " and " : "") + features.join(" and "), line, col, Parser.MEDIA_QUERY_TYPE); + this.modifier = modifier; + this.mediaType = mediaType; + this.features = features; + +} + +MediaQuery.prototype = new SyntaxUnit(); +MediaQuery.prototype.constructor = MediaQuery; +function Parser(options){ + EventTarget.call(this); + + + this.options = options || {}; + + this._tokenStream = null; +} +Parser.DEFAULT_TYPE = 0; +Parser.COMBINATOR_TYPE = 1; +Parser.MEDIA_FEATURE_TYPE = 2; +Parser.MEDIA_QUERY_TYPE = 3; +Parser.PROPERTY_NAME_TYPE = 4; +Parser.PROPERTY_VALUE_TYPE = 5; +Parser.PROPERTY_VALUE_PART_TYPE = 6; +Parser.SELECTOR_TYPE = 7; +Parser.SELECTOR_PART_TYPE = 8; +Parser.SELECTOR_SUB_PART_TYPE = 9; + +Parser.prototype = function(){ + + var proto = new EventTarget(), //new prototype + prop, + additions = { + constructor: Parser, + DEFAULT_TYPE : 0, + COMBINATOR_TYPE : 1, + MEDIA_FEATURE_TYPE : 2, + MEDIA_QUERY_TYPE : 3, + PROPERTY_NAME_TYPE : 4, + PROPERTY_VALUE_TYPE : 5, + PROPERTY_VALUE_PART_TYPE : 6, + SELECTOR_TYPE : 7, + SELECTOR_PART_TYPE : 8, + SELECTOR_SUB_PART_TYPE : 9, + + _stylesheet: function(){ + + var tokenStream = this._tokenStream, + charset = null, + count, + token, + tt; + + this.fire("startstylesheet"); + this._charset(); + + this._skipCruft(); + while (tokenStream.peek() == Tokens.IMPORT_SYM){ + this._import(); + this._skipCruft(); + } + while (tokenStream.peek() == Tokens.NAMESPACE_SYM){ + this._namespace(); + this._skipCruft(); + } + tt = tokenStream.peek(); + while(tt > Tokens.EOF){ + + try { + + switch(tt){ + case Tokens.MEDIA_SYM: + this._media(); + this._skipCruft(); + break; + case Tokens.PAGE_SYM: + this._page(); + this._skipCruft(); + break; + case Tokens.FONT_FACE_SYM: + this._font_face(); + this._skipCruft(); + break; + case Tokens.KEYFRAMES_SYM: + this._keyframes(); + this._skipCruft(); + break; + case Tokens.VIEWPORT_SYM: + this._viewport(); + this._skipCruft(); + break; + case Tokens.UNKNOWN_SYM: //unknown @ rule + tokenStream.get(); + if (!this.options.strict){ + this.fire({ + type: "error", + error: null, + message: "Unknown @ rule: " + tokenStream.LT(0).value + ".", + line: tokenStream.LT(0).startLine, + col: tokenStream.LT(0).startCol + }); + count=0; + while (tokenStream.advance([Tokens.LBRACE, Tokens.RBRACE]) == Tokens.LBRACE){ + count++; //keep track of nesting depth + } + + while(count){ + tokenStream.advance([Tokens.RBRACE]); + count--; + } + + } else { + throw new SyntaxError("Unknown @ rule.", tokenStream.LT(0).startLine, tokenStream.LT(0).startCol); + } + break; + case Tokens.S: + this._readWhitespace(); + break; + default: + if(!this._ruleset()){ + switch(tt){ + case Tokens.CHARSET_SYM: + token = tokenStream.LT(1); + this._charset(false); + throw new SyntaxError("@charset not allowed here.", token.startLine, token.startCol); + case Tokens.IMPORT_SYM: + token = tokenStream.LT(1); + this._import(false); + throw new SyntaxError("@import not allowed here.", token.startLine, token.startCol); + case Tokens.NAMESPACE_SYM: + token = tokenStream.LT(1); + this._namespace(false); + throw new SyntaxError("@namespace not allowed here.", token.startLine, token.startCol); + default: + tokenStream.get(); //get the last token + this._unexpectedToken(tokenStream.token()); + } + + } + } + } catch(ex) { + if (ex instanceof SyntaxError && !this.options.strict){ + this.fire({ + type: "error", + error: ex, + message: ex.message, + line: ex.line, + col: ex.col + }); + } else { + throw ex; + } + } + + tt = tokenStream.peek(); + } + + if (tt != Tokens.EOF){ + this._unexpectedToken(tokenStream.token()); + } + + this.fire("endstylesheet"); + }, + + _charset: function(emit){ + var tokenStream = this._tokenStream, + charset, + token, + line, + col; + + if (tokenStream.match(Tokens.CHARSET_SYM)){ + line = tokenStream.token().startLine; + col = tokenStream.token().startCol; + + this._readWhitespace(); + tokenStream.mustMatch(Tokens.STRING); + + token = tokenStream.token(); + charset = token.value; + + this._readWhitespace(); + tokenStream.mustMatch(Tokens.SEMICOLON); + + if (emit !== false){ + this.fire({ + type: "charset", + charset:charset, + line: line, + col: col + }); + } + } + }, + + _import: function(emit){ + + var tokenStream = this._tokenStream, + tt, + uri, + importToken, + mediaList = []; + tokenStream.mustMatch(Tokens.IMPORT_SYM); + importToken = tokenStream.token(); + this._readWhitespace(); + + tokenStream.mustMatch([Tokens.STRING, Tokens.URI]); + uri = tokenStream.token().value.replace(/^(?:url\()?["']?([^"']+?)["']?\)?$/, "$1"); + + this._readWhitespace(); + + mediaList = this._media_query_list(); + tokenStream.mustMatch(Tokens.SEMICOLON); + this._readWhitespace(); + + if (emit !== false){ + this.fire({ + type: "import", + uri: uri, + media: mediaList, + line: importToken.startLine, + col: importToken.startCol + }); + } + + }, + + _namespace: function(emit){ + + var tokenStream = this._tokenStream, + line, + col, + prefix, + uri; + tokenStream.mustMatch(Tokens.NAMESPACE_SYM); + line = tokenStream.token().startLine; + col = tokenStream.token().startCol; + this._readWhitespace(); + if (tokenStream.match(Tokens.IDENT)){ + prefix = tokenStream.token().value; + this._readWhitespace(); + } + + tokenStream.mustMatch([Tokens.STRING, Tokens.URI]); + uri = tokenStream.token().value.replace(/(?:url\()?["']([^"']+)["']\)?/, "$1"); + + this._readWhitespace(); + tokenStream.mustMatch(Tokens.SEMICOLON); + this._readWhitespace(); + + if (emit !== false){ + this.fire({ + type: "namespace", + prefix: prefix, + uri: uri, + line: line, + col: col + }); + } + + }, + + _media: function(){ + var tokenStream = this._tokenStream, + line, + col, + mediaList;// = []; + tokenStream.mustMatch(Tokens.MEDIA_SYM); + line = tokenStream.token().startLine; + col = tokenStream.token().startCol; + + this._readWhitespace(); + + mediaList = this._media_query_list(); + + tokenStream.mustMatch(Tokens.LBRACE); + this._readWhitespace(); + + this.fire({ + type: "startmedia", + media: mediaList, + line: line, + col: col + }); + + while(true) { + if (tokenStream.peek() == Tokens.PAGE_SYM){ + this._page(); + } else if (tokenStream.peek() == Tokens.FONT_FACE_SYM){ + this._font_face(); + } else if (tokenStream.peek() == Tokens.VIEWPORT_SYM){ + this._viewport(); + } else if (!this._ruleset()){ + break; + } + } + + tokenStream.mustMatch(Tokens.RBRACE); + this._readWhitespace(); + + this.fire({ + type: "endmedia", + media: mediaList, + line: line, + col: col + }); + }, + _media_query_list: function(){ + var tokenStream = this._tokenStream, + mediaList = []; + + + this._readWhitespace(); + + if (tokenStream.peek() == Tokens.IDENT || tokenStream.peek() == Tokens.LPAREN){ + mediaList.push(this._media_query()); + } + + while(tokenStream.match(Tokens.COMMA)){ + this._readWhitespace(); + mediaList.push(this._media_query()); + } + + return mediaList; + }, + _media_query: function(){ + var tokenStream = this._tokenStream, + type = null, + ident = null, + token = null, + expressions = []; + + if (tokenStream.match(Tokens.IDENT)){ + ident = tokenStream.token().value.toLowerCase(); + if (ident != "only" && ident != "not"){ + tokenStream.unget(); + ident = null; + } else { + token = tokenStream.token(); + } + } + + this._readWhitespace(); + + if (tokenStream.peek() == Tokens.IDENT){ + type = this._media_type(); + if (token === null){ + token = tokenStream.token(); + } + } else if (tokenStream.peek() == Tokens.LPAREN){ + if (token === null){ + token = tokenStream.LT(1); + } + expressions.push(this._media_expression()); + } + + if (type === null && expressions.length === 0){ + return null; + } else { + this._readWhitespace(); + while (tokenStream.match(Tokens.IDENT)){ + if (tokenStream.token().value.toLowerCase() != "and"){ + this._unexpectedToken(tokenStream.token()); + } + + this._readWhitespace(); + expressions.push(this._media_expression()); + } + } + + return new MediaQuery(ident, type, expressions, token.startLine, token.startCol); + }, + _media_type: function(){ + return this._media_feature(); + }, + _media_expression: function(){ + var tokenStream = this._tokenStream, + feature = null, + token, + expression = null; + + tokenStream.mustMatch(Tokens.LPAREN); + + feature = this._media_feature(); + this._readWhitespace(); + + if (tokenStream.match(Tokens.COLON)){ + this._readWhitespace(); + token = tokenStream.LT(1); + expression = this._expression(); + } + + tokenStream.mustMatch(Tokens.RPAREN); + this._readWhitespace(); + + return new MediaFeature(feature, (expression ? new SyntaxUnit(expression, token.startLine, token.startCol) : null)); + }, + _media_feature: function(){ + var tokenStream = this._tokenStream; + + tokenStream.mustMatch(Tokens.IDENT); + + return SyntaxUnit.fromToken(tokenStream.token()); + }, + _page: function(){ + var tokenStream = this._tokenStream, + line, + col, + identifier = null, + pseudoPage = null; + tokenStream.mustMatch(Tokens.PAGE_SYM); + line = tokenStream.token().startLine; + col = tokenStream.token().startCol; + + this._readWhitespace(); + + if (tokenStream.match(Tokens.IDENT)){ + identifier = tokenStream.token().value; + if (identifier.toLowerCase() === "auto"){ + this._unexpectedToken(tokenStream.token()); + } + } + if (tokenStream.peek() == Tokens.COLON){ + pseudoPage = this._pseudo_page(); + } + + this._readWhitespace(); + + this.fire({ + type: "startpage", + id: identifier, + pseudo: pseudoPage, + line: line, + col: col + }); + + this._readDeclarations(true, true); + + this.fire({ + type: "endpage", + id: identifier, + pseudo: pseudoPage, + line: line, + col: col + }); + + }, + _margin: function(){ + var tokenStream = this._tokenStream, + line, + col, + marginSym = this._margin_sym(); + + if (marginSym){ + line = tokenStream.token().startLine; + col = tokenStream.token().startCol; + + this.fire({ + type: "startpagemargin", + margin: marginSym, + line: line, + col: col + }); + + this._readDeclarations(true); + + this.fire({ + type: "endpagemargin", + margin: marginSym, + line: line, + col: col + }); + return true; + } else { + return false; + } + }, + _margin_sym: function(){ + + var tokenStream = this._tokenStream; + + if(tokenStream.match([Tokens.TOPLEFTCORNER_SYM, Tokens.TOPLEFT_SYM, + Tokens.TOPCENTER_SYM, Tokens.TOPRIGHT_SYM, Tokens.TOPRIGHTCORNER_SYM, + Tokens.BOTTOMLEFTCORNER_SYM, Tokens.BOTTOMLEFT_SYM, + Tokens.BOTTOMCENTER_SYM, Tokens.BOTTOMRIGHT_SYM, + Tokens.BOTTOMRIGHTCORNER_SYM, Tokens.LEFTTOP_SYM, + Tokens.LEFTMIDDLE_SYM, Tokens.LEFTBOTTOM_SYM, Tokens.RIGHTTOP_SYM, + Tokens.RIGHTMIDDLE_SYM, Tokens.RIGHTBOTTOM_SYM])) + { + return SyntaxUnit.fromToken(tokenStream.token()); + } else { + return null; + } + + }, + + _pseudo_page: function(){ + + var tokenStream = this._tokenStream; + + tokenStream.mustMatch(Tokens.COLON); + tokenStream.mustMatch(Tokens.IDENT); + + return tokenStream.token().value; + }, + + _font_face: function(){ + var tokenStream = this._tokenStream, + line, + col; + tokenStream.mustMatch(Tokens.FONT_FACE_SYM); + line = tokenStream.token().startLine; + col = tokenStream.token().startCol; + + this._readWhitespace(); + + this.fire({ + type: "startfontface", + line: line, + col: col + }); + + this._readDeclarations(true); + + this.fire({ + type: "endfontface", + line: line, + col: col + }); + }, + + _viewport: function(){ + var tokenStream = this._tokenStream, + line, + col; + + tokenStream.mustMatch(Tokens.VIEWPORT_SYM); + line = tokenStream.token().startLine; + col = tokenStream.token().startCol; + + this._readWhitespace(); + + this.fire({ + type: "startviewport", + line: line, + col: col + }); + + this._readDeclarations(true); + + this.fire({ + type: "endviewport", + line: line, + col: col + }); + + }, + + _operator: function(inFunction){ + + var tokenStream = this._tokenStream, + token = null; + + if (tokenStream.match([Tokens.SLASH, Tokens.COMMA]) || + (inFunction && tokenStream.match([Tokens.PLUS, Tokens.STAR, Tokens.MINUS]))){ + token = tokenStream.token(); + this._readWhitespace(); + } + return token ? PropertyValuePart.fromToken(token) : null; + + }, + + _combinator: function(){ + + var tokenStream = this._tokenStream, + value = null, + token; + + if(tokenStream.match([Tokens.PLUS, Tokens.GREATER, Tokens.TILDE])){ + token = tokenStream.token(); + value = new Combinator(token.value, token.startLine, token.startCol); + this._readWhitespace(); + } + + return value; + }, + + _unary_operator: function(){ + + var tokenStream = this._tokenStream; + + if (tokenStream.match([Tokens.MINUS, Tokens.PLUS])){ + return tokenStream.token().value; + } else { + return null; + } + }, + + _property: function(){ + + var tokenStream = this._tokenStream, + value = null, + hack = null, + tokenValue, + token, + line, + col; + if (tokenStream.peek() == Tokens.STAR && this.options.starHack){ + tokenStream.get(); + token = tokenStream.token(); + hack = token.value; + line = token.startLine; + col = token.startCol; + } + + if(tokenStream.match(Tokens.IDENT)){ + token = tokenStream.token(); + tokenValue = token.value; + if (tokenValue.charAt(0) == "_" && this.options.underscoreHack){ + hack = "_"; + tokenValue = tokenValue.substring(1); + } + + value = new PropertyName(tokenValue, hack, (line||token.startLine), (col||token.startCol)); + this._readWhitespace(); + } + + return value; + }, + _ruleset: function(){ + + var tokenStream = this._tokenStream, + tt, + selectors; + try { + selectors = this._selectors_group(); + } catch (ex){ + if (ex instanceof SyntaxError && !this.options.strict){ + this.fire({ + type: "error", + error: ex, + message: ex.message, + line: ex.line, + col: ex.col + }); + tt = tokenStream.advance([Tokens.RBRACE]); + if (tt == Tokens.RBRACE){ + } else { + throw ex; + } + + } else { + throw ex; + } + return true; + } + if (selectors){ + + this.fire({ + type: "startrule", + selectors: selectors, + line: selectors[0].line, + col: selectors[0].col + }); + + this._readDeclarations(true); + + this.fire({ + type: "endrule", + selectors: selectors, + line: selectors[0].line, + col: selectors[0].col + }); + + } + + return selectors; + + }, + _selectors_group: function(){ + var tokenStream = this._tokenStream, + selectors = [], + selector; + + selector = this._selector(); + if (selector !== null){ + + selectors.push(selector); + while(tokenStream.match(Tokens.COMMA)){ + this._readWhitespace(); + selector = this._selector(); + if (selector !== null){ + selectors.push(selector); + } else { + this._unexpectedToken(tokenStream.LT(1)); + } + } + } + + return selectors.length ? selectors : null; + }, + _selector: function(){ + + var tokenStream = this._tokenStream, + selector = [], + nextSelector = null, + combinator = null, + ws = null; + nextSelector = this._simple_selector_sequence(); + if (nextSelector === null){ + return null; + } + + selector.push(nextSelector); + + do { + combinator = this._combinator(); + + if (combinator !== null){ + selector.push(combinator); + nextSelector = this._simple_selector_sequence(); + if (nextSelector === null){ + this._unexpectedToken(tokenStream.LT(1)); + } else { + selector.push(nextSelector); + } + } else { + if (this._readWhitespace()){ + ws = new Combinator(tokenStream.token().value, tokenStream.token().startLine, tokenStream.token().startCol); + combinator = this._combinator(); + nextSelector = this._simple_selector_sequence(); + if (nextSelector === null){ + if (combinator !== null){ + this._unexpectedToken(tokenStream.LT(1)); + } + } else { + + if (combinator !== null){ + selector.push(combinator); + } else { + selector.push(ws); + } + + selector.push(nextSelector); + } + } else { + break; + } + + } + } while(true); + + return new Selector(selector, selector[0].line, selector[0].col); + }, + _simple_selector_sequence: function(){ + + var tokenStream = this._tokenStream, + elementName = null, + modifiers = [], + selectorText= "", + components = [ + function(){ + return tokenStream.match(Tokens.HASH) ? + new SelectorSubPart(tokenStream.token().value, "id", tokenStream.token().startLine, tokenStream.token().startCol) : + null; + }, + this._class, + this._attrib, + this._pseudo, + this._negation + ], + i = 0, + len = components.length, + component = null, + found = false, + line, + col; + line = tokenStream.LT(1).startLine; + col = tokenStream.LT(1).startCol; + + elementName = this._type_selector(); + if (!elementName){ + elementName = this._universal(); + } + + if (elementName !== null){ + selectorText += elementName; + } + + while(true){ + if (tokenStream.peek() === Tokens.S){ + break; + } + while(i < len && component === null){ + component = components[i++].call(this); + } + + if (component === null){ + if (selectorText === ""){ + return null; + } else { + break; + } + } else { + i = 0; + modifiers.push(component); + selectorText += component.toString(); + component = null; + } + } + + + return selectorText !== "" ? + new SelectorPart(elementName, modifiers, selectorText, line, col) : + null; + }, + _type_selector: function(){ + + var tokenStream = this._tokenStream, + ns = this._namespace_prefix(), + elementName = this._element_name(); + + if (!elementName){ + if (ns){ + tokenStream.unget(); + if (ns.length > 1){ + tokenStream.unget(); + } + } + + return null; + } else { + if (ns){ + elementName.text = ns + elementName.text; + elementName.col -= ns.length; + } + return elementName; + } + }, + _class: function(){ + + var tokenStream = this._tokenStream, + token; + + if (tokenStream.match(Tokens.DOT)){ + tokenStream.mustMatch(Tokens.IDENT); + token = tokenStream.token(); + return new SelectorSubPart("." + token.value, "class", token.startLine, token.startCol - 1); + } else { + return null; + } + + }, + _element_name: function(){ + + var tokenStream = this._tokenStream, + token; + + if (tokenStream.match(Tokens.IDENT)){ + token = tokenStream.token(); + return new SelectorSubPart(token.value, "elementName", token.startLine, token.startCol); + + } else { + return null; + } + }, + _namespace_prefix: function(){ + var tokenStream = this._tokenStream, + value = ""; + if (tokenStream.LA(1) === Tokens.PIPE || tokenStream.LA(2) === Tokens.PIPE){ + + if(tokenStream.match([Tokens.IDENT, Tokens.STAR])){ + value += tokenStream.token().value; + } + + tokenStream.mustMatch(Tokens.PIPE); + value += "|"; + + } + + return value.length ? value : null; + }, + _universal: function(){ + var tokenStream = this._tokenStream, + value = "", + ns; + + ns = this._namespace_prefix(); + if(ns){ + value += ns; + } + + if(tokenStream.match(Tokens.STAR)){ + value += "*"; + } + + return value.length ? value : null; + + }, + _attrib: function(){ + + var tokenStream = this._tokenStream, + value = null, + ns, + token; + + if (tokenStream.match(Tokens.LBRACKET)){ + token = tokenStream.token(); + value = token.value; + value += this._readWhitespace(); + + ns = this._namespace_prefix(); + + if (ns){ + value += ns; + } + + tokenStream.mustMatch(Tokens.IDENT); + value += tokenStream.token().value; + value += this._readWhitespace(); + + if(tokenStream.match([Tokens.PREFIXMATCH, Tokens.SUFFIXMATCH, Tokens.SUBSTRINGMATCH, + Tokens.EQUALS, Tokens.INCLUDES, Tokens.DASHMATCH])){ + + value += tokenStream.token().value; + value += this._readWhitespace(); + + tokenStream.mustMatch([Tokens.IDENT, Tokens.STRING]); + value += tokenStream.token().value; + value += this._readWhitespace(); + } + + tokenStream.mustMatch(Tokens.RBRACKET); + + return new SelectorSubPart(value + "]", "attribute", token.startLine, token.startCol); + } else { + return null; + } + }, + _pseudo: function(){ + + var tokenStream = this._tokenStream, + pseudo = null, + colons = ":", + line, + col; + + if (tokenStream.match(Tokens.COLON)){ + + if (tokenStream.match(Tokens.COLON)){ + colons += ":"; + } + + if (tokenStream.match(Tokens.IDENT)){ + pseudo = tokenStream.token().value; + line = tokenStream.token().startLine; + col = tokenStream.token().startCol - colons.length; + } else if (tokenStream.peek() == Tokens.FUNCTION){ + line = tokenStream.LT(1).startLine; + col = tokenStream.LT(1).startCol - colons.length; + pseudo = this._functional_pseudo(); + } + + if (pseudo){ + pseudo = new SelectorSubPart(colons + pseudo, "pseudo", line, col); + } + } + + return pseudo; + }, + _functional_pseudo: function(){ + + var tokenStream = this._tokenStream, + value = null; + + if(tokenStream.match(Tokens.FUNCTION)){ + value = tokenStream.token().value; + value += this._readWhitespace(); + value += this._expression(); + tokenStream.mustMatch(Tokens.RPAREN); + value += ")"; + } + + return value; + }, + _expression: function(){ + + var tokenStream = this._tokenStream, + value = ""; + + while(tokenStream.match([Tokens.PLUS, Tokens.MINUS, Tokens.DIMENSION, + Tokens.NUMBER, Tokens.STRING, Tokens.IDENT, Tokens.LENGTH, + Tokens.FREQ, Tokens.ANGLE, Tokens.TIME, + Tokens.RESOLUTION, Tokens.SLASH])){ + + value += tokenStream.token().value; + value += this._readWhitespace(); + } + + return value.length ? value : null; + + }, + _negation: function(){ + + var tokenStream = this._tokenStream, + line, + col, + value = "", + arg, + subpart = null; + + if (tokenStream.match(Tokens.NOT)){ + value = tokenStream.token().value; + line = tokenStream.token().startLine; + col = tokenStream.token().startCol; + value += this._readWhitespace(); + arg = this._negation_arg(); + value += arg; + value += this._readWhitespace(); + tokenStream.match(Tokens.RPAREN); + value += tokenStream.token().value; + + subpart = new SelectorSubPart(value, "not", line, col); + subpart.args.push(arg); + } + + return subpart; + }, + _negation_arg: function(){ + + var tokenStream = this._tokenStream, + args = [ + this._type_selector, + this._universal, + function(){ + return tokenStream.match(Tokens.HASH) ? + new SelectorSubPart(tokenStream.token().value, "id", tokenStream.token().startLine, tokenStream.token().startCol) : + null; + }, + this._class, + this._attrib, + this._pseudo + ], + arg = null, + i = 0, + len = args.length, + elementName, + line, + col, + part; + + line = tokenStream.LT(1).startLine; + col = tokenStream.LT(1).startCol; + + while(i < len && arg === null){ + + arg = args[i].call(this); + i++; + } + if (arg === null){ + this._unexpectedToken(tokenStream.LT(1)); + } + if (arg.type == "elementName"){ + part = new SelectorPart(arg, [], arg.toString(), line, col); + } else { + part = new SelectorPart(null, [arg], arg.toString(), line, col); + } + + return part; + }, + + _declaration: function(){ + + var tokenStream = this._tokenStream, + property = null, + expr = null, + prio = null, + error = null, + invalid = null, + propertyName= ""; + + property = this._property(); + if (property !== null){ + + tokenStream.mustMatch(Tokens.COLON); + this._readWhitespace(); + + expr = this._expr(); + if (!expr || expr.length === 0){ + this._unexpectedToken(tokenStream.LT(1)); + } + + prio = this._prio(); + propertyName = property.toString(); + if (this.options.starHack && property.hack == "*" || + this.options.underscoreHack && property.hack == "_") { + + propertyName = property.text; + } + + try { + this._validateProperty(propertyName, expr); + } catch (ex) { + invalid = ex; + } + + this.fire({ + type: "property", + property: property, + value: expr, + important: prio, + line: property.line, + col: property.col, + invalid: invalid + }); + + return true; + } else { + return false; + } + }, + + _prio: function(){ + + var tokenStream = this._tokenStream, + result = tokenStream.match(Tokens.IMPORTANT_SYM); + + this._readWhitespace(); + return result; + }, + + _expr: function(inFunction){ + + var tokenStream = this._tokenStream, + values = [], + value = null, + operator = null; + + value = this._term(inFunction); + if (value !== null){ + + values.push(value); + + do { + operator = this._operator(inFunction); + if (operator){ + values.push(operator); + } /*else { + values.push(new PropertyValue(valueParts, valueParts[0].line, valueParts[0].col)); + valueParts = []; + }*/ + + value = this._term(inFunction); + + if (value === null){ + break; + } else { + values.push(value); + } + } while(true); + } + + return values.length > 0 ? new PropertyValue(values, values[0].line, values[0].col) : null; + }, + + _term: function(inFunction){ + + var tokenStream = this._tokenStream, + unary = null, + value = null, + endChar = null, + token, + line, + col; + unary = this._unary_operator(); + if (unary !== null){ + line = tokenStream.token().startLine; + col = tokenStream.token().startCol; + } + if (tokenStream.peek() == Tokens.IE_FUNCTION && this.options.ieFilters){ + + value = this._ie_function(); + if (unary === null){ + line = tokenStream.token().startLine; + col = tokenStream.token().startCol; + } + } else if (inFunction && tokenStream.match([Tokens.LPAREN, Tokens.LBRACE, Tokens.LBRACKET])){ + + token = tokenStream.token(); + endChar = token.endChar; + value = token.value + this._expr(inFunction).text; + if (unary === null){ + line = tokenStream.token().startLine; + col = tokenStream.token().startCol; + } + tokenStream.mustMatch(Tokens.type(endChar)); + value += endChar; + this._readWhitespace(); + } else if (tokenStream.match([Tokens.NUMBER, Tokens.PERCENTAGE, Tokens.LENGTH, + Tokens.ANGLE, Tokens.TIME, + Tokens.FREQ, Tokens.STRING, Tokens.IDENT, Tokens.URI, Tokens.UNICODE_RANGE])){ + + value = tokenStream.token().value; + if (unary === null){ + line = tokenStream.token().startLine; + col = tokenStream.token().startCol; + } + this._readWhitespace(); + } else { + token = this._hexcolor(); + if (token === null){ + if (unary === null){ + line = tokenStream.LT(1).startLine; + col = tokenStream.LT(1).startCol; + } + if (value === null){ + if (tokenStream.LA(3) == Tokens.EQUALS && this.options.ieFilters){ + value = this._ie_function(); + } else { + value = this._function(); + } + } + + } else { + value = token.value; + if (unary === null){ + line = token.startLine; + col = token.startCol; + } + } + + } + + return value !== null ? + new PropertyValuePart(unary !== null ? unary + value : value, line, col) : + null; + + }, + + _function: function(){ + + var tokenStream = this._tokenStream, + functionText = null, + expr = null, + lt; + + if (tokenStream.match(Tokens.FUNCTION)){ + functionText = tokenStream.token().value; + this._readWhitespace(); + expr = this._expr(true); + functionText += expr; + if (this.options.ieFilters && tokenStream.peek() == Tokens.EQUALS){ + do { + + if (this._readWhitespace()){ + functionText += tokenStream.token().value; + } + if (tokenStream.LA(0) == Tokens.COMMA){ + functionText += tokenStream.token().value; + } + + tokenStream.match(Tokens.IDENT); + functionText += tokenStream.token().value; + + tokenStream.match(Tokens.EQUALS); + functionText += tokenStream.token().value; + lt = tokenStream.peek(); + while(lt != Tokens.COMMA && lt != Tokens.S && lt != Tokens.RPAREN){ + tokenStream.get(); + functionText += tokenStream.token().value; + lt = tokenStream.peek(); + } + } while(tokenStream.match([Tokens.COMMA, Tokens.S])); + } + + tokenStream.match(Tokens.RPAREN); + functionText += ")"; + this._readWhitespace(); + } + + return functionText; + }, + + _ie_function: function(){ + + var tokenStream = this._tokenStream, + functionText = null, + expr = null, + lt; + if (tokenStream.match([Tokens.IE_FUNCTION, Tokens.FUNCTION])){ + functionText = tokenStream.token().value; + + do { + + if (this._readWhitespace()){ + functionText += tokenStream.token().value; + } + if (tokenStream.LA(0) == Tokens.COMMA){ + functionText += tokenStream.token().value; + } + + tokenStream.match(Tokens.IDENT); + functionText += tokenStream.token().value; + + tokenStream.match(Tokens.EQUALS); + functionText += tokenStream.token().value; + lt = tokenStream.peek(); + while(lt != Tokens.COMMA && lt != Tokens.S && lt != Tokens.RPAREN){ + tokenStream.get(); + functionText += tokenStream.token().value; + lt = tokenStream.peek(); + } + } while(tokenStream.match([Tokens.COMMA, Tokens.S])); + + tokenStream.match(Tokens.RPAREN); + functionText += ")"; + this._readWhitespace(); + } + + return functionText; + }, + + _hexcolor: function(){ + + var tokenStream = this._tokenStream, + token = null, + color; + + if(tokenStream.match(Tokens.HASH)){ + + token = tokenStream.token(); + color = token.value; + if (!/#[a-f0-9]{3,6}/i.test(color)){ + throw new SyntaxError("Expected a hex color but found '" + color + "' at line " + token.startLine + ", col " + token.startCol + ".", token.startLine, token.startCol); + } + this._readWhitespace(); + } + + return token; + }, + + _keyframes: function(){ + var tokenStream = this._tokenStream, + token, + tt, + name, + prefix = ""; + + tokenStream.mustMatch(Tokens.KEYFRAMES_SYM); + token = tokenStream.token(); + if (/^@\-([^\-]+)\-/.test(token.value)) { + prefix = RegExp.$1; + } + + this._readWhitespace(); + name = this._keyframe_name(); + + this._readWhitespace(); + tokenStream.mustMatch(Tokens.LBRACE); + + this.fire({ + type: "startkeyframes", + name: name, + prefix: prefix, + line: token.startLine, + col: token.startCol + }); + + this._readWhitespace(); + tt = tokenStream.peek(); + while(tt == Tokens.IDENT || tt == Tokens.PERCENTAGE) { + this._keyframe_rule(); + this._readWhitespace(); + tt = tokenStream.peek(); + } + + this.fire({ + type: "endkeyframes", + name: name, + prefix: prefix, + line: token.startLine, + col: token.startCol + }); + + this._readWhitespace(); + tokenStream.mustMatch(Tokens.RBRACE); + + }, + + _keyframe_name: function(){ + var tokenStream = this._tokenStream, + token; + + tokenStream.mustMatch([Tokens.IDENT, Tokens.STRING]); + return SyntaxUnit.fromToken(tokenStream.token()); + }, + + _keyframe_rule: function(){ + var tokenStream = this._tokenStream, + token, + keyList = this._key_list(); + + this.fire({ + type: "startkeyframerule", + keys: keyList, + line: keyList[0].line, + col: keyList[0].col + }); + + this._readDeclarations(true); + + this.fire({ + type: "endkeyframerule", + keys: keyList, + line: keyList[0].line, + col: keyList[0].col + }); + + }, + + _key_list: function(){ + var tokenStream = this._tokenStream, + token, + key, + keyList = []; + keyList.push(this._key()); + + this._readWhitespace(); + + while(tokenStream.match(Tokens.COMMA)){ + this._readWhitespace(); + keyList.push(this._key()); + this._readWhitespace(); + } + + return keyList; + }, + + _key: function(){ + + var tokenStream = this._tokenStream, + token; + + if (tokenStream.match(Tokens.PERCENTAGE)){ + return SyntaxUnit.fromToken(tokenStream.token()); + } else if (tokenStream.match(Tokens.IDENT)){ + token = tokenStream.token(); + + if (/from|to/i.test(token.value)){ + return SyntaxUnit.fromToken(token); + } + + tokenStream.unget(); + } + this._unexpectedToken(tokenStream.LT(1)); + }, + _skipCruft: function(){ + while(this._tokenStream.match([Tokens.S, Tokens.CDO, Tokens.CDC])){ + } + }, + _readDeclarations: function(checkStart, readMargins){ + var tokenStream = this._tokenStream, + tt; + + + this._readWhitespace(); + + if (checkStart){ + tokenStream.mustMatch(Tokens.LBRACE); + } + + this._readWhitespace(); + + try { + + while(true){ + + if (tokenStream.match(Tokens.SEMICOLON) || (readMargins && this._margin())){ + } else if (this._declaration()){ + if (!tokenStream.match(Tokens.SEMICOLON)){ + break; + } + } else { + break; + } + this._readWhitespace(); + } + + tokenStream.mustMatch(Tokens.RBRACE); + this._readWhitespace(); + + } catch (ex) { + if (ex instanceof SyntaxError && !this.options.strict){ + this.fire({ + type: "error", + error: ex, + message: ex.message, + line: ex.line, + col: ex.col + }); + tt = tokenStream.advance([Tokens.SEMICOLON, Tokens.RBRACE]); + if (tt == Tokens.SEMICOLON){ + this._readDeclarations(false, readMargins); + } else if (tt != Tokens.RBRACE){ + throw ex; + } + + } else { + throw ex; + } + } + + }, + _readWhitespace: function(){ + + var tokenStream = this._tokenStream, + ws = ""; + + while(tokenStream.match(Tokens.S)){ + ws += tokenStream.token().value; + } + + return ws; + }, + _unexpectedToken: function(token){ + throw new SyntaxError("Unexpected token '" + token.value + "' at line " + token.startLine + ", col " + token.startCol + ".", token.startLine, token.startCol); + }, + _verifyEnd: function(){ + if (this._tokenStream.LA(1) != Tokens.EOF){ + this._unexpectedToken(this._tokenStream.LT(1)); + } + }, + _validateProperty: function(property, value){ + Validation.validate(property, value); + }, + + parse: function(input){ + this._tokenStream = new TokenStream(input, Tokens); + this._stylesheet(); + }, + + parseStyleSheet: function(input){ + return this.parse(input); + }, + + parseMediaQuery: function(input){ + this._tokenStream = new TokenStream(input, Tokens); + var result = this._media_query(); + this._verifyEnd(); + return result; + }, + parsePropertyValue: function(input){ + + this._tokenStream = new TokenStream(input, Tokens); + this._readWhitespace(); + + var result = this._expr(); + this._readWhitespace(); + this._verifyEnd(); + return result; + }, + parseRule: function(input){ + this._tokenStream = new TokenStream(input, Tokens); + this._readWhitespace(); + + var result = this._ruleset(); + this._readWhitespace(); + this._verifyEnd(); + return result; + }, + parseSelector: function(input){ + + this._tokenStream = new TokenStream(input, Tokens); + this._readWhitespace(); + + var result = this._selector(); + this._readWhitespace(); + this._verifyEnd(); + return result; + }, + parseStyleAttribute: function(input){ + input += "}"; // for error recovery in _readDeclarations() + this._tokenStream = new TokenStream(input, Tokens); + this._readDeclarations(); + } + }; + for (prop in additions){ + if (additions.hasOwnProperty(prop)){ + proto[prop] = additions[prop]; + } + } + + return proto; +}(); +var Properties = { + "align-items" : "flex-start | flex-end | center | baseline | stretch", + "align-content" : "flex-start | flex-end | center | space-between | space-around | stretch", + "align-self" : "auto | flex-start | flex-end | center | baseline | stretch", + "-webkit-align-items" : "flex-start | flex-end | center | baseline | stretch", + "-webkit-align-content" : "flex-start | flex-end | center | space-between | space-around | stretch", + "-webkit-align-self" : "auto | flex-start | flex-end | center | baseline | stretch", + "alignment-adjust" : "auto | baseline | before-edge | text-before-edge | middle | central | after-edge | text-after-edge | ideographic | alphabetic | hanging | mathematical | | ", + "alignment-baseline" : "baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical", + "animation" : 1, + "animation-delay" : { multi: "