Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'codeEditor' of https://github.com/acm-uiuc/CodeBlue int…

…o membershipSystem
  • Loading branch information...
commit 0d8c29a5039180819fccdbc00cb118f60d335f19 2 parents 274be49 + f7f460d
@rashadrussell rashadrussell authored
Showing with 30,800 additions and 0 deletions.
  1. +14 −0 editor/Cakefile
  2. +25 −0 editor/lib/index.js
  3. +1 −0  editor/node_modules/.bin/sharejs
  4. +1 −0  editor/node_modules/.bin/sharejs-exampleserver
  5. +4 −0 editor/node_modules/browserchannel/.npmignore
  6. +2 −0  editor/node_modules/browserchannel/.travis.yml
  7. +61 −0 editor/node_modules/browserchannel/Makefile
  8. +169 −0 editor/node_modules/browserchannel/README.md
  9. +347 −0 editor/node_modules/browserchannel/XMLHttpRequest.js
  10. +92 −0 editor/node_modules/browserchannel/closure-terminate-fixes-r2325.patch
  11. +2,675 −0 editor/node_modules/browserchannel/dist/bcsocket-uncompressed.js
  12. +95 −0 editor/node_modules/browserchannel/dist/bcsocket.js
  13. +2,706 −0 editor/node_modules/browserchannel/dist/node-bcsocket-uncompressed.js
  14. +96 −0 editor/node_modules/browserchannel/dist/node-bcsocket.js
  15. +186 −0 editor/node_modules/browserchannel/docs/docco.css
  16. +652 −0 editor/node_modules/browserchannel/docs/server.html
  17. +12 −0 editor/node_modules/browserchannel/docs/test.html
  18. +25 −0 editor/node_modules/browserchannel/examples/chatserver.coffee
  19. +9 −0 editor/node_modules/browserchannel/index.js
  20. +5 −0 editor/node_modules/browserchannel/lib/README.md
  21. +249 −0 editor/node_modules/browserchannel/lib/bcsocket.coffee
  22. +81 −0 editor/node_modules/browserchannel/lib/browserchannel.coffee
  23. BIN  editor/node_modules/browserchannel/lib/cleardot.gif
  24. +8 −0 editor/node_modules/browserchannel/lib/debug.coffee
  25. +18 −0 editor/node_modules/browserchannel/lib/handler-externs.js
  26. +77 −0 editor/node_modules/browserchannel/lib/nodejs-override.coffee
  27. +1,031 −0 editor/node_modules/browserchannel/lib/server.coffee
  28. +1 −0  editor/node_modules/browserchannel/node_modules/.bin/cake
  29. +1 −0  editor/node_modules/browserchannel/node_modules/.bin/coffee
  30. +11 −0 editor/node_modules/browserchannel/node_modules/coffee-script/.npmignore
  31. +1 −0  editor/node_modules/browserchannel/node_modules/coffee-script/CNAME
  32. +9 −0 editor/node_modules/browserchannel/node_modules/coffee-script/CONTRIBUTING.md
  33. +22 −0 editor/node_modules/browserchannel/node_modules/coffee-script/LICENSE
  34. +51 −0 editor/node_modules/browserchannel/node_modules/coffee-script/README
  35. +78 −0 editor/node_modules/browserchannel/node_modules/coffee-script/Rakefile
  36. +7 −0 editor/node_modules/browserchannel/node_modules/coffee-script/bin/cake
  37. +7 −0 editor/node_modules/browserchannel/node_modules/coffee-script/bin/coffee
  38. +44 −0 editor/node_modules/browserchannel/node_modules/coffee-script/extras/jsl.conf
  39. +92 −0 editor/node_modules/browserchannel/node_modules/coffee-script/lib/coffee-script/browser.js
  40. +113 −0 editor/node_modules/browserchannel/node_modules/coffee-script/lib/coffee-script/cake.js
  41. +171 −0 editor/node_modules/browserchannel/node_modules/coffee-script/lib/coffee-script/coffee-script.js
  42. +502 −0 editor/node_modules/browserchannel/node_modules/coffee-script/lib/coffee-script/command.js
  43. +606 −0 editor/node_modules/browserchannel/node_modules/coffee-script/lib/coffee-script/grammar.js
  44. +88 −0 editor/node_modules/browserchannel/node_modules/coffee-script/lib/coffee-script/helpers.js
  45. +11 −0 editor/node_modules/browserchannel/node_modules/coffee-script/lib/coffee-script/index.js
  46. +788 −0 editor/node_modules/browserchannel/node_modules/coffee-script/lib/coffee-script/lexer.js
  47. +2,971 −0 editor/node_modules/browserchannel/node_modules/coffee-script/lib/coffee-script/nodes.js
  48. +138 −0 editor/node_modules/browserchannel/node_modules/coffee-script/lib/coffee-script/optparse.js
  49. +683 −0 editor/node_modules/browserchannel/node_modules/coffee-script/lib/coffee-script/parser.js
  50. +276 −0 editor/node_modules/browserchannel/node_modules/coffee-script/lib/coffee-script/repl.js
  51. +349 −0 editor/node_modules/browserchannel/node_modules/coffee-script/lib/coffee-script/rewriter.js
  52. +146 −0 editor/node_modules/browserchannel/node_modules/coffee-script/lib/coffee-script/scope.js
  53. +48 −0 editor/node_modules/browserchannel/node_modules/coffee-script/package.json
  54. +71 −0 editor/node_modules/browserchannel/node_modules/hat/README.markdown
  55. +4 −0 editor/node_modules/browserchannel/node_modules/hat/example/hat.js
  56. +5 −0 editor/node_modules/browserchannel/node_modules/hat/example/rack.js
  57. +62 −0 editor/node_modules/browserchannel/node_modules/hat/index.js
  58. +43 −0 editor/node_modules/browserchannel/node_modules/hat/package.json
  59. +49 −0 editor/node_modules/browserchannel/node_modules/hat/test/id.js
  60. +62 −0 editor/node_modules/browserchannel/node_modules/hat/test/rack.js
  61. +55 −0 editor/node_modules/browserchannel/node_modules/request/LICENSE
  62. +310 −0 editor/node_modules/browserchannel/node_modules/request/README.md
  63. +191 −0 editor/node_modules/browserchannel/node_modules/request/aws.js
  64. +103 −0 editor/node_modules/browserchannel/node_modules/request/forever.js
  65. +1,123 −0 editor/node_modules/browserchannel/node_modules/request/main.js
  66. +5 −0 editor/node_modules/browserchannel/node_modules/request/node_modules/form-data/.npmignore
  67. +7 −0 editor/node_modules/browserchannel/node_modules/request/node_modules/form-data/Makefile
  68. +86 −0 editor/node_modules/browserchannel/node_modules/request/node_modules/form-data/Readme.md
  69. +237 −0 editor/node_modules/browserchannel/node_modules/request/node_modules/form-data/lib/form_data.js
  70. +8 −0 editor/node_modules/browserchannel/node_modules/request/node_modules/form-data/node-form-data.sublime-project
  71. +508 −0 ...or/node_modules/browserchannel/node_modules/request/node_modules/form-data/node-form-data.sublime-workspace
  72. +9 −0 editor/node_modules/browserchannel/node_modules/request/node_modules/form-data/node_modules/async/.gitmodules
  73. +19 −0 editor/node_modules/browserchannel/node_modules/request/node_modules/form-data/node_modules/async/LICENSE
  74. +21 −0 editor/node_modules/browserchannel/node_modules/request/node_modules/form-data/node_modules/async/Makefile
  75. +970 −0 editor/node_modules/browserchannel/node_modules/request/node_modules/form-data/node_modules/async/README.md
  76. BIN  ...ode_modules/browserchannel/node_modules/request/node_modules/form-data/node_modules/async/async.min.js.gzip
  77. +70 −0 ...ode_modules/browserchannel/node_modules/request/node_modules/form-data/node_modules/async/deps/nodeunit.css
  78. +1,966 −0 ...node_modules/browserchannel/node_modules/request/node_modules/form-data/node_modules/async/deps/nodeunit.js
  79. +1 −0  ...ode_modules/browserchannel/node_modules/request/node_modules/form-data/node_modules/async/dist/async.min.js
  80. +3 −0  editor/node_modules/browserchannel/node_modules/request/node_modules/form-data/node_modules/async/index.js
  81. +632 −0 editor/node_modules/browserchannel/node_modules/request/node_modules/form-data/node_modules/async/lib/async.js
  82. +4 −0 editor/node_modules/browserchannel/node_modules/request/node_modules/form-data/node_modules/async/nodelint.cfg
  83. +41 −0 editor/node_modules/browserchannel/node_modules/request/node_modules/form-data/node_modules/async/package.json
  84. BIN  editor/node_modules/browserchannel/node_modules/request/node_modules/form-data/node_modules/async/test/.swp
  85. +1,367 −0 ...de_modules/browserchannel/node_modules/request/node_modules/form-data/node_modules/async/test/test-async.js
  86. +24 −0 ...r/node_modules/browserchannel/node_modules/request/node_modules/form-data/node_modules/async/test/test.html
  87. +3 −0  ..._modules/browserchannel/node_modules/request/node_modules/form-data/node_modules/combined-stream/.npmignore
  88. +19 −0 ...ode_modules/browserchannel/node_modules/request/node_modules/form-data/node_modules/combined-stream/License
  89. +7 −0 ...de_modules/browserchannel/node_modules/request/node_modules/form-data/node_modules/combined-stream/Makefile
  90. +132 −0 ...e_modules/browserchannel/node_modules/request/node_modules/form-data/node_modules/combined-stream/Readme.md
  91. +183 −0 ...wserchannel/node_modules/request/node_modules/form-data/node_modules/combined-stream/lib/combined_stream.js
  92. +2 −0  ..._modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/.npmignore
  93. +19 −0 ...ode_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/License
  94. +7 −0 ...de_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Makefile
  95. +154 −0 ...e_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Readme.md
  96. +99 −0 ...quest/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/lib/delayed_stream.js
  97. +38 −0 ...odules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/package.json
  98. +6 −0 ...ules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/common.js
  99. +38 −0 ...-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-http-upload.js
  100. +21 −0 ...node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream-auto-pause.js
  101. +14 −0 ...data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream-pause.js
  102. +48 −0 .../form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream.js
  103. +15 −0 ...data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-handle-source-errors.js
  104. +18 −0 ...s/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-max-data-size.js
  105. +13 −0 ...es/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-pipe-resumes.js
  106. +13 −0 .../form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-proxy-readable.js
  107. +7 −0 ...modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/run.js
  108. +39 −0 ...odules/browserchannel/node_modules/request/node_modules/form-data/node_modules/combined-stream/package.json
  109. +12 −0 ...ules/browserchannel/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/common.js
  110. +256 −0 ...wserchannel/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/fixture/file1.txt
  111. +256 −0 ...wserchannel/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/fixture/file2.txt
  112. +27 −0 ...dules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-callback-streams.js
  113. +34 −0 ...node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-data-size.js
  114. +38 −0 ...les/form-data/node_modules/combined-stream/test/integration/test-delayed-streams-and-buffers-and-strings.js
  115. +35 −0 ...odules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-delayed-streams.js
  116. +24 −0 ..._modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-max-data-size.js
  117. +30 −0 ...dules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-unpaused-streams.js
  118. +7 −0 ...modules/browserchannel/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/run.js
  119. +43 −0 editor/node_modules/browserchannel/node_modules/request/node_modules/form-data/package.json
  120. +14 −0 editor/node_modules/browserchannel/node_modules/request/node_modules/form-data/test/common.js
  121. +1 −0  editor/node_modules/browserchannel/node_modules/request/node_modules/form-data/test/fixture/bacon.txt
  122. BIN  editor/node_modules/browserchannel/node_modules/request/node_modules/form-data/test/fixture/unicycle.jpg
  123. +93 −0 ...modules/browserchannel/node_modules/request/node_modules/form-data/test/integration/test-form-get-length.js
  124. +18 −0 ...de_modules/browserchannel/node_modules/request/node_modules/form-data/test/integration/test-get-boundary.js
  125. +121 −0 ...e_modules/browserchannel/node_modules/request/node_modules/form-data/test/integration/test-http-response.js
  126. +111 −0 editor/node_modules/browserchannel/node_modules/request/node_modules/form-data/test/integration/test-pipe.js
  127. +107 −0 editor/node_modules/browserchannel/node_modules/request/node_modules/form-data/test/integration/test-submit.js
  128. +7 −0 editor/node_modules/browserchannel/node_modules/request/node_modules/form-data/test/run.js
  129. +19 −0 editor/node_modules/browserchannel/node_modules/request/node_modules/mime/LICENSE
  130. +63 −0 editor/node_modules/browserchannel/node_modules/request/node_modules/mime/README.md
  131. +104 −0 editor/node_modules/browserchannel/node_modules/request/node_modules/mime/mime.js
  132. +42 −0 editor/node_modules/browserchannel/node_modules/request/node_modules/mime/package.json
  133. +55 −0 editor/node_modules/browserchannel/node_modules/request/node_modules/mime/test.js
  134. +1,588 −0 editor/node_modules/browserchannel/node_modules/request/node_modules/mime/types/mime.types
  135. +59 −0 editor/node_modules/browserchannel/node_modules/request/node_modules/mime/types/node.types
  136. +43 −0 editor/node_modules/browserchannel/node_modules/request/oauth.js
  137. +41 −0 editor/node_modules/browserchannel/node_modules/request/package.json
  138. BIN  editor/node_modules/browserchannel/node_modules/request/tests/googledoodle.png
  139. +45 −0 editor/node_modules/browserchannel/node_modules/request/tests/run.js
  140. +90 −0 editor/node_modules/browserchannel/node_modules/request/tests/server.js
  141. +77 −0 editor/node_modules/browserchannel/node_modules/request/tests/squid.conf
  142. +20 −0 editor/node_modules/browserchannel/node_modules/request/tests/ssl/ca/ca.cnf
  143. 0  editor/node_modules/browserchannel/node_modules/request/tests/ssl/ca/ca.crl
  144. +17 −0 editor/node_modules/browserchannel/node_modules/request/tests/ssl/ca/ca.crt
  145. +13 −0 editor/node_modules/browserchannel/node_modules/request/tests/ssl/ca/ca.csr
  146. +18 −0 editor/node_modules/browserchannel/node_modules/request/tests/ssl/ca/ca.key
  147. +1 −0  editor/node_modules/browserchannel/node_modules/request/tests/ssl/ca/ca.srl
  148. +19 −0 editor/node_modules/browserchannel/node_modules/request/tests/ssl/ca/server.cnf
  149. +16 −0 editor/node_modules/browserchannel/node_modules/request/tests/ssl/ca/server.crt
  150. +11 −0 editor/node_modules/browserchannel/node_modules/request/tests/ssl/ca/server.csr
  151. +28 −0 editor/node_modules/browserchannel/node_modules/request/tests/ssl/ca/server.js
  152. +9 −0 editor/node_modules/browserchannel/node_modules/request/tests/ssl/ca/server.key
  153. +16 −0 editor/node_modules/browserchannel/node_modules/request/tests/ssl/npm-ca.crt
  154. +15 −0 editor/node_modules/browserchannel/node_modules/request/tests/ssl/test.crt
  155. +15 −0 editor/node_modules/browserchannel/node_modules/request/tests/ssl/test.key
  156. +117 −0 editor/node_modules/browserchannel/node_modules/request/tests/test-body.js
  157. +29 −0 editor/node_modules/browserchannel/node_modules/request/tests/test-cookie.js
  158. +90 −0 editor/node_modules/browserchannel/node_modules/request/tests/test-cookiejar.js
  159. +114 −0 editor/node_modules/browserchannel/node_modules/request/tests/test-defaults.js
  160. +37 −0 editor/node_modules/browserchannel/node_modules/request/tests/test-errors.js
  161. +30 −0 editor/node_modules/browserchannel/node_modules/request/tests/test-follow-all-303.js
  162. +35 −0 editor/node_modules/browserchannel/node_modules/request/tests/test-follow-all.js
  163. +79 −0 editor/node_modules/browserchannel/node_modules/request/tests/test-form.js
  164. +52 −0 editor/node_modules/browserchannel/node_modules/request/tests/test-headers.js
  165. +94 −0 editor/node_modules/browserchannel/node_modules/request/tests/test-httpModule.js
  166. +97 −0 editor/node_modules/browserchannel/node_modules/request/tests/test-https-strict.js
  167. +86 −0 editor/node_modules/browserchannel/node_modules/request/tests/test-https.js
  168. +117 −0 editor/node_modules/browserchannel/node_modules/request/tests/test-oauth.js
  169. +92 −0 editor/node_modules/browserchannel/node_modules/request/tests/test-params.js
  170. +52 −0 editor/node_modules/browserchannel/node_modules/request/tests/test-piped-redirect.js
  171. +216 −0 editor/node_modules/browserchannel/node_modules/request/tests/test-pipes.js
  172. +16 −0 editor/node_modules/browserchannel/node_modules/request/tests/test-pool.js
  173. +60 −0 editor/node_modules/browserchannel/node_modules/request/tests/test-protocol-changing-redirect.js
  174. +39 −0 editor/node_modules/browserchannel/node_modules/request/tests/test-proxy.js
  175. +28 −0 editor/node_modules/browserchannel/node_modules/request/tests/test-qs.js
  176. +154 −0 editor/node_modules/browserchannel/node_modules/request/tests/test-redirect.js
  177. +13 −0 editor/node_modules/browserchannel/node_modules/request/tests/test-s3.js
  178. +87 −0 editor/node_modules/browserchannel/node_modules/request/tests/test-timeout.js
  179. +14 −0 editor/node_modules/browserchannel/node_modules/request/tests/test-toJSON.js
  180. +63 −0 editor/node_modules/browserchannel/node_modules/request/tests/test-tunnel.js
  181. BIN  editor/node_modules/browserchannel/node_modules/request/tests/unicycle.jpg
  182. +227 −0 editor/node_modules/browserchannel/node_modules/request/tunnel.js
  183. +19 −0 editor/node_modules/browserchannel/node_modules/request/uuid.js
  184. +65 −0 editor/node_modules/browserchannel/node_modules/request/vendor/cookie/index.js
  185. +72 −0 editor/node_modules/browserchannel/node_modules/request/vendor/cookie/jar.js
  186. +3 −0  editor/node_modules/browserchannel/node_modules/timerstub/.npmignore
  187. +2 −0  editor/node_modules/browserchannel/node_modules/timerstub/.travis.yml
  188. +100 −0 editor/node_modules/browserchannel/node_modules/timerstub/README.md
  189. +2 −0  editor/node_modules/browserchannel/node_modules/timerstub/index.js
  190. +35 −0 editor/node_modules/browserchannel/node_modules/timerstub/package.json
Sorry, we could not display the entire diff because too many files (1,571) changed.
View
14 editor/Cakefile
@@ -0,0 +1,14 @@
+{exec} = require 'child_process'
+
+task 'build', 'Build the .js files', (options) ->
+ console.log('Compiling Coffee from src to lib')
+ exec "coffee --compile --bare --output lib/ src/", (err, stdout, stderr) ->
+ throw err if err
+ console.log stdout + stderr
+
+task 'watch', 'Watch src directory and build the .js files', (options) ->
+ console.log('Watching Coffee in src and compiling to lib')
+ cp = exec "coffee --watch --bare --output lib/ src/"
+ cp.stdout.on "data", (data) -> console.log(data)
+ cp.stderr.on "data", (data) -> console.log(data)
+
View
25 editor/lib/index.js
@@ -0,0 +1,25 @@
+// Generated by CoffeeScript 1.4.0
+var ShareJS, ShareJSOpts, connect, port, server;
+
+connect = require('connect');
+
+ShareJS = require('share').server;
+
+ShareJSOpts = {
+ browserChannel: {
+ cors: "*"
+ },
+ db: "none"
+};
+
+server = connect.createServer();
+
+server.use(connect['static'](__dirname + "/../static"));
+
+ShareJS.attach(server, ShareJSOpts);
+
+port = 5000;
+
+server.listen(port, function() {
+ return console.log("Listening on " + port);
+});
View
1  editor/node_modules/.bin/sharejs
View
1  editor/node_modules/.bin/sharejs-exampleserver
View
4 editor/node_modules/browserchannel/.npmignore
@@ -0,0 +1,4 @@
+*.swp
+.DS_Store
+node_modules
+tmp
View
2  editor/node_modules/browserchannel/.travis.yml
@@ -0,0 +1,2 @@
+before_script: "npm install && npm install nodeunit"
+script: "npm test"
View
61 editor/node_modules/browserchannel/Makefile
@@ -0,0 +1,61 @@
+# I require a local version of the closure library because the version in google's
+# REST service is too old and crufty to be useful.
+#
+# You can get the closure library like this:
+#
+# % svn co http://closure-library.googlecode.com/svn/trunk closure-library
+#
+# And download the closure compiler JAR here:
+#
+# http://code.google.com/p/closure-compiler/downloads/list
+#
+# I also compile with this patch to the closure library:
+# http://code.google.com/p/closure-library/issues/detail?id=388&sort=-id
+# ... which fixes a couple timing issues in nodejs.
+
+.PHONY: clean, all
+
+CLOSURE_DIR = ../closure-library
+CLOSURE_COMPILER = ../closure-library/compiler.jar
+
+CLOSURE_BUILDER = $(CLOSURE_DIR)/closure/bin/build/closurebuilder.py
+
+CLOSURE_CFLAGS = \
+ --root="$(CLOSURE_DIR)" \
+ --root=tmp/ \
+ --output_mode=compiled \
+ --compiler_jar="$(CLOSURE_COMPILER)" \
+ --compiler_flags=--compilation_level=ADVANCED_OPTIMIZATIONS \
+ --compiler_flags=--warning_level=DEFAULT \
+ --compiler_flags=--externs=lib/handler-externs.js \
+ --namespace=bc.BCSocket
+
+PRETTY_PRINT = --compiler_flags=--formatting=PRETTY_PRINT
+
+COFFEE = coffee
+
+all: dist/bcsocket.js dist/node-bcsocket.js dist/bcsocket-uncompressed.js dist/node-bcsocket-uncompressed.js
+
+clean:
+ rm -rf tmp
+
+tmp/%.js: lib/%.coffee
+ $(COFFEE) -bco tmp $+
+
+dist/%.js: tmp/compiled-%.js
+ echo '(function(){' > $@
+ cat $+ >> $@
+ echo "})();" >> $@
+
+tmp/compiled-bcsocket.js: tmp/bcsocket.js tmp/browserchannel.js
+ $(CLOSURE_BUILDER) $(CLOSURE_CFLAGS) > $@
+
+tmp/compiled-node-bcsocket.js: tmp/bcsocket.js tmp/nodejs-override.js tmp/browserchannel.js
+ $(CLOSURE_BUILDER) $(CLOSURE_CFLAGS) --namespace=bc.node > $@
+
+tmp/compiled-bcsocket-uncompressed.js: tmp/bcsocket.js tmp/browserchannel.js
+ $(CLOSURE_BUILDER) $(CLOSURE_CFLAGS) --compiler_flags=--formatting=PRETTY_PRINT > $@
+
+tmp/compiled-node-bcsocket-uncompressed.js: tmp/bcsocket.js tmp/nodejs-override.js tmp/browserchannel.js
+ $(CLOSURE_BUILDER) $(CLOSURE_CFLAGS) --compiler_flags=--formatting=PRETTY_PRINT --namespace=bc.node > $@
+
View
169 editor/node_modules/browserchannel/README.md
@@ -0,0 +1,169 @@
+A [BrowserChannel](http://closure-library.googlecode.com/svn/trunk/closure/goog/net/browserchannel.js) server.
+
+**tldr;** Its like socket.io, but it scales better and it has fewer bugs. It
+just does long polling. It doesn't support websockets and doesn't work cross-domain.
+
+BrowserChannel is google's version of [socket.io](http://socket.io) from when they first put
+chat in gmail. Unlike socket.io, browserchannel provides much better guarantees about message
+delivery and state. It has better reconnection logic and error handling. With browserchannel,
+**you know whats going on**.
+
+[![Build Status](https://secure.travis-ci.org/josephg/node-browserchannel.png)](http://travis-ci.org/josephg/node-browserchannel)
+
+node-browserchannel:
+
+- Is compatible with the closure library's browserchannel implementation
+- Is super thoroughly tested
+- Works in IE5.5+, iOS, Safari, Chrome, Firefox, and probably others.
+- Works in any network environment (incl. behind buffering proxies)
+
+---
+
+# Use it
+
+ # npm install browserchannel
+
+Browserchannel is implemented as connect middleware. Here's an echo server:
+
+```coffeescript
+browserChannel = require('browserchannel').server
+connect = require 'connect'
+
+server = connect(
+ connect.static "#{__dirname}/public"
+ browserChannel (session) ->
+ console.log "New session: #{session.id} from #{session.address} with cookies #{session.headers.cookie}"
+
+ session.on 'message', (data) ->
+ console.log "#{session.id} sent #{JSON.stringify data}"
+ session.send data
+
+ session.on 'close', (reason) ->
+ console.log "Session #{session.id} disconnected (#{reason})"
+
+ # This tells the session to stop trying to connect
+ session.stop()
+
+ # This just kills the session.
+ session.abort()
+).listen(4321)
+
+console.log 'Echo server listening on localhost:4321'
+```
+
+The client emulates the [websocket API](http://dev.w3.org/html5/websockets/). Here is a simple client:
+
+```coffeescript
+{BCSocket} = require 'browserchannel'
+
+socket = new BCSocket 'http://localhost:4321/channel'
+socket.onopen = ->
+ socket.send {hi:'there'}
+socket.onmessage = (message) ->
+ console.log 'got message', message
+
+# later...
+socket.close()
+```
+
+... Or from a website:
+
+```html
+<html><head>
+<script src='/channel/bcsocket.js'></script>
+<script>
+socket = new BCSocket('/channel');
+socket.onopen = function() {
+ socket.send({hi:'there'});
+ socket.close();
+};
+socket.onmessage = function(message) {
+ // ...
+};
+</script>
+```
+
+You can also ask the client to automatically reconnect whenever its been disconnected. - Which is
+super useful.
+
+```coffeescript
+{BCSocket} = require 'browserchannel'
+socket = new BCSocket 'http://localhost:4321/channel', reconnect:true
+socket.onopen = ->
+ socket.send "I just connected!"
+```
+
+---
+
+# Caveats
+
+- It doesn't do RPC.
+- It doesn't work in cross-origin environments. Put it behind
+ [nginx](http://nginx.net/) or [varnish](https://www.varnish-cache.org/) if you aren't using nodejs
+ to host your whole site.
+- Currently there's no websocket support. So, its higher bandwidth than socket.io running on modern
+ browsers.
+
+---
+
+# How to rebuild the client
+
+The client uses google's [closure library](https://developers.google.com/closure/library/)
+& [compiler](https://developers.google.com/closure/compiler/). There's a couple small bugs that google
+still hasn't fixed in their library (and probably never will), so I have a patch file kicking around.
+
+Rebuilding the client library is annoying, so I keep an up to date compiled copy in `dist/`.
+
+1. Download the closure library
+
+```
+svn checkout http://closure-library.googlecode.com/svn/trunk/ closure-library
+cd closure-library
+```
+
+2. Download the closure compiler
+
+```
+curl http://closure-compiler.googlecode.com/files/compiler-latest.zip > compiler-latest.zip
+unzip compiler-latest.zip compiler.jar
+```
+
+3. Patch the library
+
+```
+patch -p0 <../node-browserchannel/closure-*.patch
+```
+
+4. Build
+
+```
+cd ../node-browserchannel
+make
+```
+
+
+---
+
+### License
+
+Licensed under the standard MIT license:
+
+Copyright 2011 Joseph Gentle.
+
+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.
View
347 editor/node_modules/browserchannel/XMLHttpRequest.js
@@ -0,0 +1,347 @@
+/**
+ * Wrapper for built-in http.js to emulate the browser XMLHttpRequest object.
+ *
+ * This can be used with JS designed for browsers to improve reuse of code and
+ * allow the use of existing libraries.
+ *
+ * Usage: include("XMLHttpRequest.js") and use XMLHttpRequest per W3C specs.
+ *
+ * @todo SSL Support
+ * @author Dan DeFelippi <dan@driverdan.com>
+ * @contributor David Ellis <d.f.ellis@ieee.org>
+ * @license MIT
+ *
+ * This has been modified by Joseph Gentle <josephg@gmail.com> to fix some bugs.
+ * It will live here until the changes have been merged into node-XMLHttpRequest
+ * upstream.
+ */
+
+var Url = require("url"),
+ spawn = require("child_process").spawn,
+ fs = require('fs');
+
+exports.XMLHttpRequest = function() {
+ /**
+ * Private variables
+ */
+ var self = this;
+ var http = require('http');
+ var https = require('https');
+
+ // Holds http.js objects
+ var client;
+ var request;
+ var response;
+
+ // Request settings
+ var settings = {};
+
+ // Set some default headers
+ var defaultHeaders = {
+ "User-Agent": "node.js",
+ "Accept": "*/*",
+ };
+
+ // Send flag
+ var sendFlag = false;
+
+ var headers = defaultHeaders;
+
+ /**
+ * Constants
+ */
+ this.UNSENT = 0;
+ this.OPENED = 1;
+ this.HEADERS_RECEIVED = 2;
+ this.LOADING = 3;
+ this.DONE = 4;
+
+ /**
+ * Public vars
+ */
+ // Current state
+ this.readyState = this.UNSENT;
+
+ // default ready state change handler in case one is not set or is set late
+ this.onreadystatechange = null;
+
+ // Result & response
+ this.responseText = "";
+ this.responseXML = "";
+ this.status = null;
+ this.statusText = null;
+
+ /**
+ * Open the connection. Currently supports local server requests.
+ *
+ * @param string method Connection method (eg GET, POST)
+ * @param string url URL for the connection.
+ * @param boolean async Asynchronous connection. Default is true.
+ * @param string user Username for basic authentication (optional)
+ * @param string password Password for basic authentication (optional)
+ */
+ this.open = function(method, url, async, user, password) {
+ settings = {
+ "method": method,
+ "url": url.toString(),
+ "async": async || true,
+ "user": user || null,
+ "password": password || null
+ };
+
+ this.abort();
+
+ setState(this.OPENED);
+ };
+
+ /**
+ * Sets a header for the request.
+ *
+ * @param string header Header name
+ * @param string value Header value
+ */
+ this.setRequestHeader = function(header, value) {
+ headers[header] = value;
+ };
+
+ /**
+ * Gets a header from the server response.
+ *
+ * @param string header Name of header to get.
+ * @return string Text of the header or null if it doesn't exist.
+ */
+ this.getResponseHeader = function(header) {
+ if (this.readyState > this.OPENED && response.headers[header]) {
+ return response.headers[header];
+ }
+
+ return null;
+ };
+
+ /**
+ * Gets all the response headers.
+ *
+ * @return string
+ */
+ this.getAllResponseHeaders = function() {
+ if (this.readyState < this.HEADERS_RECEIVED) {
+ throw "INVALID_STATE_ERR: Headers have not been received.";
+ }
+ var result = "";
+
+ for (var i in response.headers) {
+ result += i + ": " + response.headers[i] + "\r\n";
+ }
+ return result.substr(0, result.length - 2);
+ };
+
+ /**
+ * Sends the request to the server.
+ *
+ * @param string data Optional data to send as request body.
+ */
+ this.send = function(data) {
+ if (this.readyState != this.OPENED) {
+ throw "INVALID_STATE_ERR: connection must be opened before send() is called";
+ }
+
+ if (sendFlag) {
+ throw "INVALID_STATE_ERR: send has already been called";
+ }
+
+ var ssl = false;
+ var url = Url.parse(settings.url);
+
+ // Determine the server
+ switch (url.protocol) {
+ case 'https:':
+ ssl = true;
+ // SSL & non-SSL both need host, no break here.
+ case 'http:':
+ var host = url.hostname;
+ break;
+
+ case undefined:
+ case '':
+ var host = "localhost";
+ break;
+
+ default:
+ throw "Protocol not supported.";
+ }
+
+ // Default to port 80. If accessing localhost on another port be sure
+ // to use http://localhost:port/path
+ var port = url.port || (ssl ? 443 : 80);
+ // Add query string if one is used
+ var uri = url.pathname + (url.search ? url.search : '');
+
+ // Set the Host header or the server may reject the request
+ this.setRequestHeader("Host", host);
+
+ // Set Basic Auth if necessary
+ if (settings.user) {
+ if (typeof settings.password == "undefined") {
+ settings.password = "";
+ }
+ var authBuf = new Buffer(settings.user + ":" + settings.password);
+ headers["Authorization"] = "Basic " + authBuf.toString("base64");
+ }
+
+ // Set content length header
+ if (settings.method == "GET" || settings.method == "HEAD") {
+ data = null;
+ } else if (data) {
+ this.setRequestHeader("Content-Length", Buffer.byteLength(data));
+
+ if (!headers["Content-Type"]) {
+ this.setRequestHeader("Content-Type", "text/plain;charset=UTF-8");
+ }
+ }
+
+ var options = {
+ host: host,
+ port: port,
+ path: uri,
+ method: settings.method,
+ headers: headers
+ };
+
+ if(!settings.hasOwnProperty("async") || settings.async) { //Normal async path
+ // Use the proper protocol
+ var doRequest = ssl ? https.request : http.request;
+
+ sendFlag = true;
+
+ // As per spec, this is called here for historical reasons.
+ if (typeof self.onreadystatechange === "function") {
+ self.onreadystatechange();
+ }
+
+ request = doRequest(options, function(resp) {
+ response = resp;
+ response.setEncoding("utf8");
+
+ setState(self.HEADERS_RECEIVED);
+ self.status = response.statusCode;
+
+ response.on('data', function(chunk) {
+ // Make sure there's some data
+ if (chunk) {
+ self.responseText += chunk;
+ }
+ // Don't emit state changes if the connection has been aborted.
+ if (sendFlag) {
+ setState(self.LOADING);
+ }
+ });
+
+ response.on('end', function() {
+ if (sendFlag) {
+ // Discard the 'end' event if the connection has been aborted
+ setState(self.DONE);
+ sendFlag = false;
+ }
+ });
+
+ response.on('error', function(error) {
+ self.handleError(error);
+ });
+ }).on('error', function(error) {
+ self.handleError(error);
+ });
+
+ // Node 0.4 and later won't accept empty data. Make sure it's needed.
+ if (data) {
+ request.write(data);
+ }
+
+ request.end();
+ } else { // Synchronous
+ // Create a temporary file for communication with the other Node process
+ var syncFile = ".node-xmlhttprequest-sync-" + process.pid;
+ fs.writeFileSync(syncFile, "", "utf8");
+ // The async request the other Node process executes
+ var execString = "var http = require('http'), https = require('https'), fs = require('fs');"
+ + "var doRequest = http" + (ssl?"s":"") + ".request;"
+ + "var options = " + JSON.stringify(options) + ";"
+ + "var responseText = '';"
+ + "var req = doRequest(options, function(response) {"
+ + "response.setEncoding('utf8');"
+ + "response.on('data', function(chunk) {"
+ + "responseText += chunk;"
+ + "});"
+ + "response.on('end', function() {"
+ + "fs.writeFileSync('" + syncFile + "', 'NODE-XMLHTTPREQUEST-STATUS:' + response.statusCode + ',' + responseText, 'utf8');"
+ + "});"
+ + "response.on('error', function(error) {"
+ + "fs.writeFileSync('" + syncFile + "', 'NODE-XMLHTTPREQUEST-ERROR:' + JSON.stringify(error), 'utf8');"
+ + "});"
+ + "}).on('error', function(error) {"
+ + "fs.writeFileSync('" + syncFile + "', 'NODE-XMLHTTPREQUEST-ERROR:' + JSON.stringify(error), 'utf8');"
+ + "});"
+ + (data ? "req.write('" + data.replace(/'/g, "\\'") + "');":"")
+ + "req.end();";
+ // Start the other Node Process, executing this string
+ syncProc = spawn(process.argv[0], ["-e", execString]);
+ while((self.responseText = fs.readFileSync(syncFile, 'utf8')) == "") {
+ // Wait while the file is empty
+ }
+ // Kill the child process once the file has data
+ syncProc.stdin.end();
+ // Remove the temporary file
+ fs.unlinkSync(syncFile);
+ if(self.responseText.match(/^NODE-XMLHTTPREQUEST-ERROR:/)) {
+ // If the file returned an error, handle it
+ var errorObj = self.responseText.replace(/^NODE-XMLHTTPREQUEST-ERROR:/, "");
+ self.handleError(errorObj);
+ } else {
+ // If the file returned okay, parse its data and move to the DONE state
+ self.status = self.responseText.replace(/^NODE-XMLHTTPREQUEST-STATUS:([0-9]*),.*/, "$1");
+ self.responseText = self.responseText.replace(/^NODE-XMLHTTPREQUEST-STATUS:[0-9]*,(.*)/, "$1");
+ setState(self.DONE);
+ }
+ }
+ };
+
+ this.handleError = function(error) {
+ this.status = 503;
+ this.statusText = error;
+ this.responseText = error.stack;
+ setState(this.DONE);
+ };
+
+ /**
+ * Aborts a request.
+ */
+ this.abort = function() {
+ headers = defaultHeaders;
+ this.responseText = "";
+ this.responseXML = "";
+
+ if (request) {
+ request.abort();
+ request = null;
+ }
+
+ if (this.readyState !== this.UNSENT
+ && (this.readyState !== this.OPENED || sendFlag)
+ && this.readyState !== this.DONE) {
+ sendFlag = false;
+ setState(this.DONE);
+ }
+ this.readyState = this.UNSENT;
+ };
+
+ /**
+ * Changes readyState and calls onreadystatechange.
+ *
+ * @param int state New state
+ */
+ var setState = function(state) {
+ self.readyState = state;
+ if (typeof self.onreadystatechange === "function") {
+ self.onreadystatechange();
+ }
+ };
+};
View
92 editor/node_modules/browserchannel/closure-terminate-fixes-r2325.patch
@@ -0,0 +1,92 @@
+Index: closure/goog/net/tmpnetwork.js
+===================================================================
+--- closure/goog/net/tmpnetwork.js (revision 1850)
++++ closure/goog/net/tmpnetwork.js (working copy)
+@@ -92,44 +92,26 @@
+ var channelDebug = new goog.net.ChannelDebug();
+ channelDebug.debug('TestLoadImage: loading ' + url);
+ var img = new Image();
+- img.onload = function() {
+- try {
+- channelDebug.debug('TestLoadImage: loaded');
+- goog.net.tmpnetwork.clearImageCallbacks_(img);
+- callback(true);
+- } catch (e) {
+- channelDebug.dumpException(e);
+- }
++ var timer = null;
++ createHandler = function(result, message) {
++ return function() {
++ try {
++ channelDebug.debug('TestLoadImage: ' + message);
++ goog.net.tmpnetwork.clearImageCallbacks_(img);
++ goog.global.clearTimeout(timer);
++ callback(result);
++ } catch (e) {
++ channelDebug.dumpException(e);
++ }
++ };
+ };
+- img.onerror = function() {
+- try {
+- channelDebug.debug('TestLoadImage: error');
+- goog.net.tmpnetwork.clearImageCallbacks_(img);
+- callback(false);
+- } catch (e) {
+- channelDebug.dumpException(e);
+- }
+- };
+- img.onabort = function() {
+- try {
+- channelDebug.debug('TestLoadImage: abort');
+- goog.net.tmpnetwork.clearImageCallbacks_(img);
+- callback(false);
+- } catch (e) {
+- channelDebug.dumpException(e);
+- }
+- };
+- img.ontimeout = function() {
+- try {
+- channelDebug.debug('TestLoadImage: timeout');
+- goog.net.tmpnetwork.clearImageCallbacks_(img);
+- callback(false);
+- } catch (e) {
+- channelDebug.dumpException(e);
+- }
+- };
+
+- goog.global.setTimeout(function() {
++ img.onload = createHandler(true, 'loaded');
++ img.onerror = createHandler(false, 'error');
++ img.onabort = createHandler(false, 'abort');
++ img.ontimeout = createHandler(false, 'timeout');
++
++ timer = goog.global.setTimeout(function() {
+ if (img.ontimeout) {
+ img.ontimeout();
+ }
+Index: closure/goog/net/channelrequest.js
+===================================================================
+--- closure/goog/net/channelrequest.js (revision 1850)
++++ closure/goog/net/channelrequest.js (working copy)
+@@ -999,10 +999,20 @@
+ goog.net.ChannelRequest.prototype.imgTagGet_ = function() {
+ var eltImg = new Image();
+ eltImg.src = this.baseUri_;
++ eltImg.onload = eltImg.onerror = goog.bind(this.imgTagComplete_, this);
+ this.requestStartTime_ = goog.now();
+ this.ensureWatchDogTimer_();
+ };
+
++/**
++ * Callback when the image request is complete
++ *
++ * @private
++ */
++goog.net.ChannelRequest.prototype.imgTagComplete_ = function() {
++ this.cancelWatchDogTimer_();
++ this.channel_.onRequestComplete(this);
++}
+
+ /**
+ * Cancels the request no matter what the underlying transport is.
View
2,675 editor/node_modules/browserchannel/dist/bcsocket-uncompressed.js
@@ -0,0 +1,2675 @@
+(function(){
+function f(a) {
+ throw a;
+}
+var h = void 0, j = !0, k = null, p = !1;
+function q() {
+ return function() {
+ }
+}
+function s(a) {
+ return function(b) {
+ this[a] = b
+ }
+}
+function aa(a) {
+ return function() {
+ return this[a]
+ }
+}
+function ba(a) {
+ return function() {
+ return a
+ }
+}
+var t, ca = ca || {}, u = this;
+function da(a) {
+ for(var a = a.split("."), b = u, c;c = a.shift();) {
+ if(b[c] != k) {
+ b = b[c]
+ }else {
+ return k
+ }
+ }
+ return b
+}
+function ea() {
+}
+function fa(a) {
+ var b = typeof a;
+ if("object" == b) {
+ if(a) {
+ if(a instanceof Array) {
+ return"array"
+ }
+ if(a instanceof Object) {
+ return b
+ }
+ var c = Object.prototype.toString.call(a);
+ if("[object Window]" == c) {
+ return"object"
+ }
+ if("[object Array]" == c || "number" == typeof a.length && "undefined" != typeof a.splice && "undefined" != typeof a.propertyIsEnumerable && !a.propertyIsEnumerable("splice")) {
+ return"array"
+ }
+ if("[object Function]" == c || "undefined" != typeof a.call && "undefined" != typeof a.propertyIsEnumerable && !a.propertyIsEnumerable("call")) {
+ return"function"
+ }
+ }else {
+ return"null"
+ }
+ }else {
+ if("function" == b && "undefined" == typeof a.call) {
+ return"object"
+ }
+ }
+ return b
+}
+function v(a) {
+ return"array" == fa(a)
+}
+function ga(a) {
+ var b = fa(a);
+ return"array" == b || "object" == b && "number" == typeof a.length
+}
+function x(a) {
+ return"string" == typeof a
+}
+function ha(a) {
+ return"function" == fa(a)
+}
+function y(a) {
+ return a[ia] || (a[ia] = ++ja)
+}
+var ia = "closure_uid_" + Math.floor(2147483648 * Math.random()).toString(36), ja = 0;
+function ka(a, b, c) {
+ return a.call.apply(a.bind, arguments)
+}
+function la(a, b, c) {
+ a || f(Error());
+ if(2 < arguments.length) {
+ var d = Array.prototype.slice.call(arguments, 2);
+ return function() {
+ var c = Array.prototype.slice.call(arguments);
+ Array.prototype.unshift.apply(c, d);
+ return a.apply(b, c)
+ }
+ }
+ return function() {
+ return a.apply(b, arguments)
+ }
+}
+function z(a, b, c) {
+ z = Function.prototype.bind && -1 != Function.prototype.bind.toString().indexOf("native code") ? ka : la;
+ return z.apply(k, arguments)
+}
+var A = Date.now || function() {
+ return+new Date
+};
+function B(a, b) {
+ function c() {
+ }
+ c.prototype = b.prototype;
+ a.oa = b.prototype;
+ a.prototype = new c
+}
+;function ma(a, b) {
+ for(var c = 1;c < arguments.length;c++) {
+ var d = String(arguments[c]).replace(/\$/g, "$$$$"), a = a.replace(/\%s/, d)
+ }
+ return a
+}
+function na(a) {
+ if(!oa.test(a)) {
+ return a
+ }
+ -1 != a.indexOf("&") && (a = a.replace(pa, "&amp;"));
+ -1 != a.indexOf("<") && (a = a.replace(qa, "&lt;"));
+ -1 != a.indexOf(">") && (a = a.replace(ra, "&gt;"));
+ -1 != a.indexOf('"') && (a = a.replace(sa, "&quot;"));
+ return a
+}
+var pa = /&/g, qa = /</g, ra = />/g, sa = /\"/g, oa = /[&<>\"]/;
+var ta, ua, va, wa;
+function xa() {
+ return u.navigator ? u.navigator.userAgent : k
+}
+wa = va = ua = ta = p;
+var za;
+if(za = xa()) {
+ var Aa = u.navigator;
+ ta = 0 == za.indexOf("Opera");
+ ua = !ta && -1 != za.indexOf("MSIE");
+ va = !ta && -1 != za.indexOf("WebKit");
+ wa = !ta && !va && "Gecko" == Aa.product
+}
+var Ba = ta, C = ua, Ca = wa, D = va, Da = u.navigator, Ea = -1 != (Da && Da.platform || "").indexOf("Mac");
+function Fa() {
+ var a = u.document;
+ return a ? a.documentMode : h
+}
+var Ga;
+a: {
+ var Ha = "", Ia;
+ if(Ba && u.opera) {
+ var Ja = u.opera.version, Ha = "function" == typeof Ja ? Ja() : Ja
+ }else {
+ if(Ca ? Ia = /rv\:([^\);]+)(\)|;)/ : C ? Ia = /MSIE\s+([^\);]+)(\)|;)/ : D && (Ia = /WebKit\/(\S+)/), Ia) {
+ var Ka = Ia.exec(xa()), Ha = Ka ? Ka[1] : ""
+ }
+ }
+ if(C) {
+ var La = Fa();
+ if(La > parseFloat(Ha)) {
+ Ga = String(La);
+ break a
+ }
+ }
+ Ga = Ha
+}
+var Ma = {};
+function E(a) {
+ var b;
+ if(!(b = Ma[a])) {
+ b = 0;
+ for(var c = String(Ga).replace(/^[\s\xa0]+|[\s\xa0]+$/g, "").split("."), d = String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g, "").split("."), e = Math.max(c.length, d.length), g = 0;0 == b && g < e;g++) {
+ var i = c[g] || "", m = d[g] || "", l = RegExp("(\\d*)(\\D*)", "g"), n = RegExp("(\\d*)(\\D*)", "g");
+ do {
+ var r = l.exec(i) || ["", "", ""], w = n.exec(m) || ["", "", ""];
+ if(0 == r[0].length && 0 == w[0].length) {
+ break
+ }
+ b = ((0 == r[1].length ? 0 : parseInt(r[1], 10)) < (0 == w[1].length ? 0 : parseInt(w[1], 10)) ? -1 : (0 == r[1].length ? 0 : parseInt(r[1], 10)) > (0 == w[1].length ? 0 : parseInt(w[1], 10)) ? 1 : 0) || ((0 == r[2].length) < (0 == w[2].length) ? -1 : (0 == r[2].length) > (0 == w[2].length) ? 1 : 0) || (r[2] < w[2] ? -1 : r[2] > w[2] ? 1 : 0)
+ }while(0 == b)
+ }
+ b = Ma[a] = 0 <= b
+ }
+ return b
+}
+var Na = u.document, Oa = !Na || !C ? h : Fa() || ("CSS1Compat" == Na.compatMode ? parseInt(Ga, 10) : 5);
+function Pa(a) {
+ Error.captureStackTrace ? Error.captureStackTrace(this, Pa) : this.stack = Error().stack || "";
+ a && (this.message = String(a))
+}
+B(Pa, Error);
+Pa.prototype.name = "CustomError";
+function Qa(a, b) {
+ b.unshift(a);
+ Pa.call(this, ma.apply(k, b));
+ b.shift();
+ this.Ic = a
+}
+B(Qa, Pa);
+Qa.prototype.name = "AssertionError";
+function Ra(a, b) {
+ f(new Qa("Failure" + (a ? ": " + a : ""), Array.prototype.slice.call(arguments, 1)))
+}
+;var Sa = RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");
+function Ta(a) {
+ var b = [], c = 0, d;
+ for(d in a) {
+ b[c++] = a[d]
+ }
+ return b
+}
+function Ua(a) {
+ var b = [], c = 0, d;
+ for(d in a) {
+ b[c++] = d
+ }
+ return b
+}
+var Va = "constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");
+function Wa(a, b) {
+ for(var c, d, e = 1;e < arguments.length;e++) {
+ d = arguments[e];
+ for(c in d) {
+ a[c] = d[c]
+ }
+ for(var g = 0;g < Va.length;g++) {
+ c = Va[g], Object.prototype.hasOwnProperty.call(d, c) && (a[c] = d[c])
+ }
+ }
+}
+;var F = Array.prototype, Xa = F.indexOf ? function(a, b, c) {
+ return F.indexOf.call(a, b, c)
+} : function(a, b, c) {
+ c = c == k ? 0 : 0 > c ? Math.max(0, a.length + c) : c;
+ if(x(a)) {
+ return!x(b) || 1 != b.length ? -1 : a.indexOf(b, c)
+ }
+ for(;c < a.length;c++) {
+ if(c in a && a[c] === b) {
+ return c
+ }
+ }
+ return-1
+}, Ya = F.forEach ? function(a, b, c) {
+ F.forEach.call(a, b, c)
+} : function(a, b, c) {
+ for(var d = a.length, e = x(a) ? a.split("") : a, g = 0;g < d;g++) {
+ g in e && b.call(c, e[g], g, a)
+ }
+};
+function Za(a) {
+ return F.concat.apply(F, arguments)
+}
+function $a(a) {
+ var b = a.length;
+ if(0 < b) {
+ for(var c = Array(b), d = 0;d < b;d++) {
+ c[d] = a[d]
+ }
+ return c
+ }
+ return[]
+}
+;function ab(a) {
+ if("function" == typeof a.L) {
+ return a.L()
+ }
+ if(x(a)) {
+ return a.split("")
+ }
+ if(ga(a)) {
+ for(var b = [], c = a.length, d = 0;d < c;d++) {
+ b.push(a[d])
+ }
+ return b
+ }
+ return Ta(a)
+}
+function bb(a, b, c) {
+ if("function" == typeof a.forEach) {
+ a.forEach(b, c)
+ }else {
+ if(ga(a) || x(a)) {
+ Ya(a, b, c)
+ }else {
+ var d;
+ if("function" == typeof a.ga) {
+ d = a.ga()
+ }else {
+ if("function" != typeof a.L) {
+ if(ga(a) || x(a)) {
+ d = [];
+ for(var e = a.length, g = 0;g < e;g++) {
+ d.push(g)
+ }
+ }else {
+ d = Ua(a)
+ }
+ }else {
+ d = h
+ }
+ }
+ for(var e = ab(a), g = e.length, i = 0;i < g;i++) {
+ b.call(c, e[i], d && d[i], a)
+ }
+ }
+ }
+}
+;function cb(a, b) {
+ this.N = {};
+ this.j = [];
+ var c = arguments.length;
+ if(1 < c) {
+ c % 2 && f(Error("Uneven number of arguments"));
+ for(var d = 0;d < c;d += 2) {
+ this.set(arguments[d], arguments[d + 1])
+ }
+ }else {
+ if(a) {
+ a instanceof cb ? (c = a.ga(), d = a.L()) : (c = Ua(a), d = Ta(a));
+ for(var e = 0;e < c.length;e++) {
+ this.set(c[e], d[e])
+ }
+ }
+ }
+}
+t = cb.prototype;
+t.f = 0;
+t.$b = 0;
+t.L = function() {
+ db(this);
+ for(var a = [], b = 0;b < this.j.length;b++) {
+ a.push(this.N[this.j[b]])
+ }
+ return a
+};
+t.ga = function() {
+ db(this);
+ return this.j.concat()
+};
+t.ea = function(a) {
+ return eb(this.N, a)
+};
+t.remove = function(a) {
+ return eb(this.N, a) ? (delete this.N[a], this.f--, this.$b++, this.j.length > 2 * this.f && db(this), j) : p
+};
+function db(a) {
+ if(a.f != a.j.length) {
+ for(var b = 0, c = 0;b < a.j.length;) {
+ var d = a.j[b];
+ eb(a.N, d) && (a.j[c++] = d);
+ b++
+ }
+ a.j.length = c
+ }
+ if(a.f != a.j.length) {
+ for(var e = {}, c = b = 0;b < a.j.length;) {
+ d = a.j[b], eb(e, d) || (a.j[c++] = d, e[d] = 1), b++
+ }
+ a.j.length = c
+ }
+}
+t.get = function(a, b) {
+ return eb(this.N, a) ? this.N[a] : b
+};
+t.set = function(a, b) {
+ eb(this.N, a) || (this.f++, this.j.push(a), this.$b++);
+ this.N[a] = b
+};
+t.n = function() {
+ return new cb(this)
+};
+function eb(a, b) {
+ return Object.prototype.hasOwnProperty.call(a, b)
+}
+;function H(a, b) {
+ var c;
+ if(a instanceof H) {
+ this.A = b !== h ? b : a.A, fb(this, a.na), c = a.Xa, I(this), this.Xa = c, gb(this, a.fa), hb(this, a.za), ib(this, a.G), jb(this, a.Q.n()), c = a.Ja, I(this), this.Ja = c
+ }else {
+ if(a && (c = String(a).match(Sa))) {
+ this.A = !!b;
+ fb(this, c[1] || "", j);
+ var d = c[2] || "";
+ I(this);
+ this.Xa = d ? decodeURIComponent(d) : "";
+ gb(this, c[3] || "", j);
+ hb(this, c[4]);
+ ib(this, c[5] || "", j);
+ jb(this, c[6] || "", j);
+ c = c[7] || "";
+ I(this);
+ this.Ja = c ? decodeURIComponent(c) : ""
+ }else {
+ this.A = !!b, this.Q = new kb(k, 0, this.A)
+ }
+ }
+}
+t = H.prototype;
+t.na = "";
+t.Xa = "";
+t.fa = "";
+t.za = k;
+t.G = "";
+t.Ja = "";
+t.lc = p;
+t.A = p;
+t.toString = function() {
+ var a = [], b = this.na;
+ b && a.push(lb(b, mb), ":");
+ if(b = this.fa) {
+ a.push("//");
+ var c = this.Xa;
+ c && a.push(lb(c, mb), "@");
+ a.push(encodeURIComponent(String(b)));
+ b = this.za;
+ b != k && a.push(":", String(b))
+ }
+ if(b = this.G) {
+ this.fa && "/" != b.charAt(0) && a.push("/"), a.push(lb(b, "/" == b.charAt(0) ? nb : ob))
+ }
+ (b = this.Q.toString()) && a.push("?", b);
+ (b = this.Ja) && a.push("#", lb(b, pb));
+ return a.join("")
+};
+t.n = function() {
+ return new H(this)
+};
+function fb(a, b, c) {
+ I(a);
+ a.na = c ? b ? decodeURIComponent(b) : "" : b;
+ a.na && (a.na = a.na.replace(/:$/, ""))
+}
+function gb(a, b, c) {
+ I(a);
+ a.fa = c ? b ? decodeURIComponent(b) : "" : b
+}
+function hb(a, b) {
+ I(a);
+ b ? (b = Number(b), (isNaN(b) || 0 > b) && f(Error("Bad port number " + b)), a.za = b) : a.za = k
+}
+function ib(a, b, c) {
+ I(a);
+ a.G = c ? b ? decodeURIComponent(b) : "" : b
+}
+function jb(a, b, c) {
+ I(a);
+ b instanceof kb ? (a.Q = b, a.Q.nb(a.A)) : (c || (b = lb(b, qb)), a.Q = new kb(b, 0, a.A))
+}
+function J(a, b, c) {
+ I(a);
+ a.Q.set(b, c)
+}
+function rb(a, b, c) {
+ I(a);
+ v(c) || (c = [String(c)]);
+ sb(a.Q, b, c)
+}
+function K(a) {
+ I(a);
+ J(a, "zx", Math.floor(2147483648 * Math.random()).toString(36) + Math.abs(Math.floor(2147483648 * Math.random()) ^ A()).toString(36));
+ return a
+}
+function I(a) {
+ a.lc && f(Error("Tried to modify a read-only Uri"))
+}
+t.nb = function(a) {
+ this.A = a;
+ this.Q && this.Q.nb(a);
+ return this
+};
+function lb(a, b) {
+ return x(a) ? encodeURI(a).replace(b, tb) : k
+}
+function tb(a) {
+ a = a.charCodeAt(0);
+ return"%" + (a >> 4 & 15).toString(16) + (a & 15).toString(16)
+}
+var mb = /[#\/\?@]/g, ob = /[\#\?:]/g, nb = /[\#\?]/g, qb = /[\#\?@]/g, pb = /#/g;
+function kb(a, b, c) {
+ this.z = a || k;
+ this.A = !!c
+}
+function L(a) {
+ if(!a.i && (a.i = new cb, a.f = 0, a.z)) {
+ for(var b = a.z.split("&"), c = 0;c < b.length;c++) {
+ var d = b[c].indexOf("="), e = k, g = k;
+ 0 <= d ? (e = b[c].substring(0, d), g = b[c].substring(d + 1)) : e = b[c];
+ e = decodeURIComponent(e.replace(/\+/g, " "));
+ e = M(a, e);
+ a.add(e, g ? decodeURIComponent(g.replace(/\+/g, " ")) : "")
+ }
+ }
+}
+t = kb.prototype;
+t.i = k;
+t.f = k;
+t.add = function(a, b) {
+ L(this);
+ this.z = k;
+ var a = M(this, a), c = this.i.get(a);
+ c || this.i.set(a, c = []);
+ c.push(b);
+ this.f++;
+ return this
+};
+t.remove = function(a) {
+ L(this);
+ a = M(this, a);
+ return this.i.ea(a) ? (this.z = k, this.f -= this.i.get(a).length, this.i.remove(a)) : p
+};
+t.ea = function(a) {
+ L(this);
+ a = M(this, a);
+ return this.i.ea(a)
+};
+t.ga = function() {
+ L(this);
+ for(var a = this.i.L(), b = this.i.ga(), c = [], d = 0;d < b.length;d++) {
+ for(var e = a[d], g = 0;g < e.length;g++) {
+ c.push(b[d])
+ }
+ }
+ return c
+};
+t.L = function(a) {
+ L(this);
+ var b = [];
+ if(a) {
+ this.ea(a) && (b = Za(b, this.i.get(M(this, a))))
+ }else {
+ for(var a = this.i.L(), c = 0;c < a.length;c++) {
+ b = Za(b, a[c])
+ }
+ }
+ return b
+};
+t.set = function(a, b) {
+ L(this);
+ this.z = k;
+ a = M(this, a);
+ this.ea(a) && (this.f -= this.i.get(a).length);
+ this.i.set(a, [b]);
+ this.f++;
+ return this
+};
+t.get = function(a, b) {
+ var c = a ? this.L(a) : [];
+ return 0 < c.length ? String(c[0]) : b
+};
+function sb(a, b, c) {
+ a.remove(b);
+ 0 < c.length && (a.z = k, a.i.set(M(a, b), $a(c)), a.f += c.length)
+}
+t.toString = function() {
+ if(this.z) {
+ return this.z
+ }
+ if(!this.i) {
+ return""
+ }
+ for(var a = [], b = this.i.ga(), c = 0;c < b.length;c++) {
+ for(var d = b[c], e = encodeURIComponent(String(d)), d = this.L(d), g = 0;g < d.length;g++) {
+ var i = e;
+ "" !== d[g] && (i += "=" + encodeURIComponent(String(d[g])));
+ a.push(i)
+ }
+ }
+ return this.z = a.join("&")
+};
+t.n = function() {
+ var a = new kb;
+ a.z = this.z;
+ this.i && (a.i = this.i.n(), a.f = this.f);
+ return a
+};
+function M(a, b) {
+ var c = String(b);
+ a.A && (c = c.toLowerCase());
+ return c
+}
+t.nb = function(a) {
+ a && !this.A && (L(this), this.z = k, bb(this.i, function(a, c) {
+ var d = c.toLowerCase();
+ c != d && (this.remove(c), sb(this, d, a))
+ }, this));
+ this.A = a
+};
+function ub() {
+}
+ub.prototype.Ea = k;
+var vb;
+function wb() {
+}
+B(wb, ub);
+function xb(a) {
+ return(a = yb(a)) ? new ActiveXObject(a) : new XMLHttpRequest
+}
+function zb(a) {
+ var b = {};
+ yb(a) && (b[0] = j, b[1] = j);
+ return b
+}
+function yb(a) {
+ if(!a.Eb && "undefined" == typeof XMLHttpRequest && "undefined" != typeof ActiveXObject) {
+ for(var b = ["MSXML2.XMLHTTP.6.0", "MSXML2.XMLHTTP.3.0", "MSXML2.XMLHTTP", "Microsoft.XMLHTTP"], c = 0;c < b.length;c++) {
+ var d = b[c];
+ try {
+ return new ActiveXObject(d), a.Eb = d
+ }catch(e) {
+ }
+ }
+ f(Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed"))
+ }
+ return a.Eb
+}
+vb = new wb;
+function Ab() {
+}
+var Bb = 0;
+t = Ab.prototype;
+t.key = 0;
+t.la = p;
+t.tb = p;
+t.La = function(a, b, c, d, e, g) {
+ ha(a) ? this.Gb = j : a && a.handleEvent && ha(a.handleEvent) ? this.Gb = p : f(Error("Invalid listener argument"));
+ this.xa = a;
+ this.Sb = b;
+ this.src = c;
+ this.type = d;
+ this.capture = !!e;
+ this.ib = g;
+ this.tb = p;
+ this.key = ++Bb;
+ this.la = p
+};
+t.handleEvent = function(a) {
+ return this.Gb ? this.xa.call(this.ib || this.src, a) : this.xa.handleEvent.call(this.xa, a)
+};
+var Cb = !C || C && 9 <= Oa, Db = C && !E("9");
+!D || E("528");
+Ca && E("1.9b") || C && E("8") || Ba && E("9.5") || D && E("528");
+Ca && !E("8") || C && E("9");
+function N() {
+ 0 != Eb && (this.Fc = Error().stack, Fb[y(this)] = this)
+}
+var Eb = 0, Fb = {};
+N.prototype.xb = p;
+N.prototype.Fa = function() {
+ if(!this.xb && (this.xb = j, this.t(), 0 != Eb)) {
+ var a = y(this);
+ delete Fb[a]
+ }
+};
+N.prototype.t = function() {
+ this.hc && Gb.apply(k, this.hc);
+ if(this.Lb) {
+ for(;this.Lb.length;) {
+ this.Lb.shift()()
+ }
+ }
+};
+function Hb(a) {
+ a && "function" == typeof a.Fa && a.Fa()
+}
+function Gb(a) {
+ for(var b = 0, c = arguments.length;b < c;++b) {
+ var d = arguments[b];
+ ga(d) ? Gb.apply(k, d) : Hb(d)
+ }
+}
+;function O(a, b) {
+ this.type = a;
+ this.currentTarget = this.target = b
+}
+t = O.prototype;
+t.t = q();
+t.Fa = q();
+t.ja = p;
+t.defaultPrevented = p;
+t.Ta = j;
+t.preventDefault = function() {
+ this.defaultPrevented = j;
+ this.Ta = p
+};
+function Ib(a) {
+ Ib[" "](a);
+ return a
+}
+Ib[" "] = ea;
+function Jb(a, b) {
+ a && this.La(a, b)
+}
+B(Jb, O);
+t = Jb.prototype;
+t.target = k;
+t.relatedTarget = k;
+t.offsetX = 0;
+t.offsetY = 0;
+t.clientX = 0;
+t.clientY = 0;
+t.screenX = 0;
+t.screenY = 0;
+t.button = 0;
+t.keyCode = 0;
+t.charCode = 0;
+t.ctrlKey = p;
+t.altKey = p;
+t.shiftKey = p;
+t.metaKey = p;
+t.xc = p;
+t.yb = k;
+t.La = function(a, b) {
+ var c = this.type = a.type;
+ O.call(this, c);
+ this.target = a.target || a.srcElement;
+ this.currentTarget = b;
+ var d = a.relatedTarget;
+ if(d) {
+ if(Ca) {
+ var e;
+ a: {
+ try {
+ Ib(d.nodeName);
+ e = j;
+ break a
+ }catch(g) {
+ }
+ e = p
+ }
+ e || (d = k)
+ }
+ }else {
+ "mouseover" == c ? d = a.fromElement : "mouseout" == c && (d = a.toElement)
+ }
+ this.relatedTarget = d;
+ this.offsetX = D || a.offsetX !== h ? a.offsetX : a.layerX;
+ this.offsetY = D || a.offsetY !== h ? a.offsetY : a.layerY;
+ this.clientX = a.clientX !== h ? a.clientX : a.pageX;
+ this.clientY = a.clientY !== h ? a.clientY : a.pageY;
+ this.screenX = a.screenX || 0;
+ this.screenY = a.screenY || 0;
+ this.button = a.button;
+ this.keyCode = a.keyCode || 0;
+ this.charCode = a.charCode || ("keypress" == c ? a.keyCode : 0);
+ this.ctrlKey = a.ctrlKey;
+ this.altKey = a.altKey;
+ this.shiftKey = a.shiftKey;
+ this.metaKey = a.metaKey;
+ this.xc = Ea ? a.metaKey : a.ctrlKey;
+ this.state = a.state;
+ this.yb = a;
+ a.defaultPrevented && this.preventDefault();
+ delete this.ja
+};
+t.preventDefault = function() {
+ Jb.oa.preventDefault.call(this);
+ var a = this.yb;
+ if(a.preventDefault) {
+ a.preventDefault()
+ }else {
+ if(a.returnValue = p, Db) {
+ try {
+ if(a.ctrlKey || 112 <= a.keyCode && 123 >= a.keyCode) {
+ a.keyCode = -1
+ }
+ }catch(b) {
+ }
+ }
+ }
+};
+t.t = q();
+var Kb = {}, P = {}, Q = {}, Lb = {};
+function Mb(a, b, c, d, e) {
+ if(b) {
+ if(v(b)) {
+ for(var g = 0;g < b.length;g++) {
+ Mb(a, b[g], c, d, e)
+ }
+ return k
+ }
+ var d = !!d, i = P;
+ b in i || (i[b] = {f:0, B:0});
+ i = i[b];
+ d in i || (i[d] = {f:0, B:0}, i.f++);
+ var i = i[d], m = y(a), l;
+ i.B++;
+ if(i[m]) {
+ l = i[m];
+ for(g = 0;g < l.length;g++) {
+ if(i = l[g], i.xa == c && i.ib == e) {
+ if(i.la) {
+ break
+ }
+ return l[g].key
+ }
+ }
+ }else {
+ l = i[m] = [], i.f++
+ }
+ var n = Nb, r = Cb ? function(a) {
+ return n.call(r.src, r.key, a)
+ } : function(a) {
+ a = n.call(r.src, r.key, a);
+ if(!a) {
+ return a
+ }
+ }, g = r;
+ g.src = a;
+ i = new Ab;
+ i.La(c, g, a, b, d, e);
+ c = i.key;
+ g.key = c;
+ l.push(i);
+ Kb[c] = i;
+ Q[m] || (Q[m] = []);
+ Q[m].push(i);
+ a.addEventListener ? (a == u || !a.vb) && a.addEventListener(b, g, d) : a.attachEvent(b in Lb ? Lb[b] : Lb[b] = "on" + b, g);
+ return c
+ }
+ f(Error("Invalid event type"))
+}
+function Ob(a, b, c, d, e) {
+ if(v(b)) {
+ for(var g = 0;g < b.length;g++) {
+ Ob(a, b[g], c, d, e)
+ }
+ }else {
+ d = !!d;
+ a: {
+ g = P;
+ if(b in g && (g = g[b], d in g && (g = g[d], a = y(a), g[a]))) {
+ a = g[a];
+ break a
+ }
+ a = k
+ }
+ if(a) {
+ for(g = 0;g < a.length;g++) {
+ if(a[g].xa == c && a[g].capture == d && a[g].ib == e) {
+ Pb(a[g].key);
+ break
+ }
+ }
+ }
+ }
+}
+function Pb(a) {
+ if(!Kb[a]) {
+ return p
+ }
+ var b = Kb[a];
+ if(b.la) {
+ return p
+ }
+ var c = b.src, d = b.type, e = b.Sb, g = b.capture;
+ c.removeEventListener ? (c == u || !c.vb) && c.removeEventListener(d, e, g) : c.detachEvent && c.detachEvent(d in Lb ? Lb[d] : Lb[d] = "on" + d, e);
+ c = y(c);
+ if(Q[c]) {
+ var e = Q[c], i = Xa(e, b);
+ 0 <= i && F.splice.call(e, i, 1);
+ 0 == e.length && delete Q[c]
+ }
+ b.la = j;
+ if(b = P[d][g][c]) {
+ b.Kb = j, Qb(d, g, c, b)
+ }
+ delete Kb[a];
+ return j
+}
+function Qb(a, b, c, d) {
+ if(!d.Na && d.Kb) {
+ for(var e = 0, g = 0;e < d.length;e++) {
+ d[e].la ? d[e].Sb.src = k : (e != g && (d[g] = d[e]), g++)
+ }
+ d.length = g;
+ d.Kb = p;
+ 0 == g && (delete P[a][b][c], P[a][b].f--, 0 == P[a][b].f && (delete P[a][b], P[a].f--), 0 == P[a].f && delete P[a])
+ }
+}
+function Rb(a, b, c, d, e) {
+ var g = 1, b = y(b);
+ if(a[b]) {
+ a.B--;
+ a = a[b];
+ a.Na ? a.Na++ : a.Na = 1;
+ try {
+ for(var i = a.length, m = 0;m < i;m++) {
+ var l = a[m];
+ l && !l.la && (g &= Sb(l, e) !== p)
+ }
+ }finally {
+ a.Na--, Qb(c, d, b, a)
+ }
+ }
+ return Boolean(g)
+}
+function Sb(a, b) {
+ a.tb && Pb(a.key);
+ return a.handleEvent(b)
+}
+function Nb(a, b) {
+ if(!Kb[a]) {
+ return j
+ }
+ var c = Kb[a], d = c.type, e = P;
+ if(!(d in e)) {
+ return j
+ }
+ var e = e[d], g, i;
+ if(!Cb) {
+ g = b || da("window.event");
+ var m = j in e, l = p in e;
+ if(m) {
+ if(0 > g.keyCode || g.returnValue != h) {
+ return j
+ }
+ a: {
+ var n = p;
+ if(0 == g.keyCode) {
+ try {
+ g.keyCode = -1;
+ break a
+ }catch(r) {
+ n = j
+ }
+ }
+ if(n || g.returnValue == h) {
+ g.returnValue = j
+ }
+ }
+ }
+ n = new Jb;
+ n.La(g, this);
+ g = j;
+ try {
+ if(m) {
+ for(var w = [], ya = n.currentTarget;ya;ya = ya.parentNode) {
+ w.push(ya)
+ }
+ i = e[j];
+ i.B = i.f;
+ for(var G = w.length - 1;!n.ja && 0 <= G && i.B;G--) {
+ n.currentTarget = w[G], g &= Rb(i, w[G], d, j, n)
+ }
+ if(l) {
+ i = e[p];
+ i.B = i.f;
+ for(G = 0;!n.ja && G < w.length && i.B;G++) {
+ n.currentTarget = w[G], g &= Rb(i, w[G], d, p, n)
+ }
+ }
+ }else {
+ g = Sb(c, n)
+ }
+ }finally {
+ w && (w.length = 0)
+ }
+ return g
+ }
+ d = new Jb(b, this);
+ return g = Sb(c, d)
+}
+;function Tb() {
+ N.call(this)
+}
+B(Tb, N);
+t = Tb.prototype;
+t.vb = j;
+t.mb = k;
+t.addEventListener = function(a, b, c, d) {
+ Mb(this, a, b, c, d)
+};
+t.removeEventListener = function(a, b, c, d) {
+ Ob(this, a, b, c, d)
+};
+t.dispatchEvent = function(a) {
+ var b = a.type || a, c = P;
+ if(b in c) {
+ if(x(a)) {
+ a = new O(a, this)
+ }else {
+ if(a instanceof O) {
+ a.target = a.target || this
+ }else {
+ var d = a, a = new O(b, this);
+ Wa(a, d)
+ }
+ }
+ var d = 1, e, c = c[b], b = j in c, g;
+ if(b) {
+ e = [];
+ for(g = this;g;g = g.mb) {
+ e.push(g)
+ }
+ g = c[j];
+ g.B = g.f;
+ for(var i = e.length - 1;!a.ja && 0 <= i && g.B;i--) {
+ a.currentTarget = e[i], d &= Rb(g, e[i], a.type, j, a) && a.Ta != p
+ }
+ }
+ if(p in c) {
+ if(g = c[p], g.B = g.f, b) {
+ for(i = 0;!a.ja && i < e.length && g.B;i++) {
+ a.currentTarget = e[i], d &= Rb(g, e[i], a.type, p, a) && a.Ta != p
+ }
+ }else {
+ for(e = this;!a.ja && e && g.B;e = e.mb) {
+ a.currentTarget = e, d &= Rb(g, e, a.type, p, a) && a.Ta != p
+ }
+ }
+ }
+ a = Boolean(d)
+ }else {
+ a = j
+ }
+ return a
+};
+t.t = function() {
+ Tb.oa.t.call(this);
+ var a, b = 0, c = a == k;
+ a = !!a;
+ if(this == k) {
+ var d = function(d) {
+ for(var e = d.length - 1;0 <= e;e--) {
+ var g = d[e];
+ if(c || a == g.capture) {
+ Pb(g.key), b++
+ }
+ }
+ }, e;
+ for(e in Q) {
+ d.call(h, Q[e])
+ }
+ }else {
+ if(d = y(this), Q[d]) {
+ d = Q[d];
+ for(e = d.length - 1;0 <= e;e--) {
+ var g = d[e];
+ if(c || a == g.capture) {
+ Pb(g.key), b++
+ }
+ }
+ }
+ }
+ this.mb = k
+};
+function Ub(a, b) {
+ N.call(this);
+ this.aa = a || 1;
+ this.Ca = b || R;
+ this.ab = z(this.Dc, this);
+ this.lb = A()
+}
+B(Ub, Tb);
+Ub.prototype.enabled = p;
+var R = u.window;
+t = Ub.prototype;
+t.r = k;
+t.setInterval = function(a) {
+ this.aa = a;
+ this.r && this.enabled ? (this.stop(), this.start()) : this.r && this.stop()
+};
+t.Dc = function() {
+ if(this.enabled) {
+ var a = A() - this.lb;
+ 0 < a && a < 0.8 * this.aa ? this.r = this.Ca.setTimeout(this.ab, this.aa - a) : (this.dispatchEvent(Vb), this.enabled && (this.r = this.Ca.setTimeout(this.ab, this.aa), this.lb = A()))
+ }
+};
+t.start = function() {
+ this.enabled = j;
+ this.r || (this.r = this.Ca.setTimeout(this.ab, this.aa), this.lb = A())
+};
+t.stop = function() {
+ this.enabled = p;
+ this.r && (this.Ca.clearTimeout(this.r), this.r = k)
+};
+t.t = function() {
+ Ub.oa.t.call(this);
+ this.stop();
+ delete this.Ca
+};
+var Vb = "tick";
+function Wb(a) {
+ N.call(this);
+ this.e = a;
+ this.j = []
+}
+B(Wb, N);
+var Xb = [];
+function Yb(a, b, c, d) {
+ v(c) || (Xb[0] = c, c = Xb);
+ for(var e = 0;e < c.length;e++) {
+ var g = Mb(b, c[e], d || a, p, a.e || a);
+ a.j.push(g)
+ }
+}
+Wb.prototype.t = function() {
+ Wb.oa.t.call(this);
+ Ya(this.j, Pb);
+ this.j.length = 0
+};
+Wb.prototype.handleEvent = function() {
+ f(Error("EventHandler.handleEvent not implemented"))
+};
+function Zb(a, b, c) {
+ N.call(this);
+ this.mc = a;
+ this.aa = b;
+ this.e = c;
+ this.fc = z(this.sc, this)
+}
+B(Zb, N);
+t = Zb.prototype;
+t.Ua = p;
+t.Rb = 0;
+t.r = k;
+t.stop = function() {
+ this.r && (R.clearTimeout(this.r), this.r = k, this.Ua = p)
+};
+t.t = function() {
+ Zb.oa.t.call(this);
+ this.stop()
+};
+t.sc = function() {
+ this.r = k;
+ this.Ua && !this.Rb && (this.Ua = p, $b(this))
+};
+function $b(a) {
+ var b;
+ b = a.fc;
+ var c = a.aa;
+ ha(b) || (b && "function" == typeof b.handleEvent ? b = z(b.handleEvent, b) : f(Error("Invalid listener argument")));
+ b = 2147483647 < c ? -1 : R.setTimeout(b, c || 0);
+ a.r = b;
+ a.mc.call(a.e)
+}
+;function S(a, b, c, d, e) {
+ this.b = a;
+ this.a = b;
+ this.X = c;
+ this.C = d;
+ this.Aa = e || 1;
+ this.Ba = ac;
+ this.gb = new Wb(this);
+ this.Pa = new Ub;
+ this.Pa.setInterval(bc)
+}
+t = S.prototype;
+t.u = k;
+t.I = p;
+t.sa = k;
+t.qb = k;
+t.ma = k;
+t.pa = k;
+t.S = k;
+t.v = k;
+t.V = k;
+t.l = k;
+t.Da = 0;
+t.J = k;
+t.qa = k;
+t.p = k;
+t.h = -1;
+t.Vb = j;
+t.Y = p;
+t.ka = 0;
+t.Qa = k;
+var ac = 45E3, bc = 250;
+function cc(a, b) {
+ switch(a) {
+ case 0:
+ return"Non-200 return code (" + b + ")";
+ case 1:
+ return"XMLHTTP failure (no data)";
+ case 2:
+ return"HttpConnection timeout";
+ default:
+ return"Unknown error"
+ }
+}
+var dc = {}, ec = {};
+function fc() {
+ return!C || C && 10 <= Oa
+}
+t = S.prototype;
+t.W = s("u");
+t.setTimeout = s("Ba");
+t.Yb = s("ka");
+function gc(a, b, c) {
+ a.pa = 1;
+ a.S = K(b.n());
+ a.V = c;
+ a.wb = j;
+ hc(a, k)
+}
+function ic(a, b, c, d, e) {
+ a.pa = 1;
+ a.S = K(b.n());
+ a.V = k;
+ a.wb = c;
+ e && (a.Vb = p);
+ hc(a, d)
+}
+function hc(a, b) {
+ a.ma = A();
+ jc(a);
+ a.v = a.S.n();
+ rb(a.v, "t", a.Aa);
+ a.Da = 0;
+ a.l = a.b.eb(a.b.Va() ? b : k);
+ 0 < a.ka && (a.Qa = new Zb(z(a.bc, a, a.l), a.ka));
+ Yb(a.gb, a.l, "readystatechange", a.zc);
+ var c;
+ if(a.u) {
+ c = a.u;
+ var d = {}, e;
+ for(e in c) {
+ d[e] = c[e]
+ }
+ c = d
+ }else {
+ c = {}
+ }
+ a.V ? (a.qa = "POST", c["Content-Type"] = "application/x-www-form-urlencoded", a.l.send(a.v, a.qa, a.V, c)) : (a.qa = "GET", a.Vb && !D && (c.Connection = "close"), a.l.send(a.v, a.qa, k, c));
+ a.b.F(kc);
+ if(d = a.V) {
+ c = "";
+ d = d.split("&");
+ for(e = 0;e < d.length;e++) {
+ var g = d[e].split("=");
+ if(1 < g.length) {
+ var i = g[0], g = g[1], m = i.split("_");
+ c = 2 <= m.length && "type" == m[1] ? c + (i + "=" + g + "&") : c + (i + "=redacted&")
+ }
+ }
+ }else {
+ c = k
+ }
+ a.a.info("XMLHTTP REQ (" + a.C + ") [attempt " + a.Aa + "]: " + a.qa + "\n" + a.v + "\n" + c)
+}
+t.zc = function(a) {
+ var a = a.target, b = this.Qa;
+ b && 3 == T(a) ? (this.a.debug("Throttling readystatechange."), !b.r && !b.Rb ? $b(b) : b.Ua = j) : this.bc(a)
+};
+t.bc = function(a) {
+ try {
+ if(a == this.l) {
+ a: {
+ var b = T(this.l), c = this.l.ha, d = lc(this.l);
+ if(!fc() || D && !E("420+")) {
+ if(4 > b) {
+ break a
+ }
+ }else {
+ if(3 > b || 3 == b && !Ba && !mc(this.l)) {
+ break a
+ }
+ }
+ !this.Y && (4 == b && c != nc) && (c == oc || 0 >= d ? this.b.F(pc) : this.b.F(qc));
+ rc(this);
+ var e = lc(this.l);
+ this.h = e;
+ var g = mc(this.l);
+ g || this.a.debug("No response text for uri " + this.v + " status " + e);
+ this.I = 200 == e;
+ this.a.info("XMLHTTP RESP (" + this.C + ") [ attempt " + this.Aa + "]: " + this.qa + "\n" + this.v + "\n" + b + " " + e);
+ this.I ? (4 == b && U(this), this.wb ? (sc(this, b, g), Ba && 3 == b && (Yb(this.gb, this.Pa, Vb, this.yc), this.Pa.start())) : (tc(this.a, this.C, g, k), uc(this, g)), this.I && !this.Y && (4 == b ? this.b.ia(this) : (this.I = p, jc(this)))) : (400 == e && 0 < g.indexOf("Unknown SID") ? (this.p = 3, V(vc)) : (this.p = 0, V(wc)), tc(this.a, this.C, g), U(this), xc(this))
+ }
+ }else {
+ this.a.ra("Called back with an unexpected xmlhttp")
+ }
+ }catch(i) {
+ this.a.debug("Failed call to OnXmlHttpReadyStateChanged_"), this.l && mc(this.l) ? yc(this.a, i, "ResponseText: " + mc(this.l)) : yc(this.a, i, "No response text")
+ }finally {
+ }
+};
+function sc(a, b, c) {
+ for(var d = j;!a.Y && a.Da < c.length;) {
+ var e = zc(a, c);
+ if(e == ec) {
+ 4 == b && (a.p = 4, V(Ac), d = p);
+ tc(a.a, a.C, k, "[Incomplete Response]");
+ break
+ }else {
+ if(e == dc) {
+ a.p = 4;
+ V(Bc);
+ tc(a.a, a.C, c, "[Invalid Chunk]");
+ d = p;
+ break
+ }else {
+ tc(a.a, a.C, e, k), uc(a, e)
+ }
+ }
+ }
+ 4 == b && 0 == c.length && (a.p = 1, V(Cc), d = p);
+ a.I = a.I && d;
+ d || (tc(a.a, a.C, c, "[Invalid Chunked Response]"), U(a), xc(a))
+}
+t.yc = function() {
+ var a = T(this.l), b = mc(this.l);
+ this.Da < b.length && (rc(this), sc(this, a, b), this.I && 4 != a && jc(this))
+};
+function zc(a, b) {
+ var c = a.Da, d = b.indexOf("\n", c);
+ if(-1 == d) {
+ return ec
+ }
+ c = Number(b.substring(c, d));
+ if(isNaN(c)) {
+ return dc
+ }
+ d += 1;
+ if(d + c > b.length) {
+ return ec
+ }
+ var e = b.substr(d, c);
+ a.Da = d + c;
+ return e
+}
+function Dc(a, b) {
+ a.ma = A();
+ jc(a);
+ var c = b ? window.location.hostname : "";
+ a.v = a.S.n();
+ J(a.v, "DOMAIN", c);
+ J(a.v, "t", a.Aa);
+ try {
+ a.J = new ActiveXObject("htmlfile")
+ }catch(d) {
+ a.a.H("ActiveX blocked");
+ U(a);
+ a.p = 7;
+ V(Ec);
+ xc(a);
+ return
+ }
+ var e = "<html><body>";
+ b && (e += '<script>document.domain="' + c + '"<\/script>');
+ e += "</body></html>";
+ a.J.open();
+ a.J.write(e);
+ a.J.close();
+ a.J.parentWindow.m = z(a.vc, a);
+ a.J.parentWindow.d = z(a.Qb, a, j);
+ a.J.parentWindow.rpcClose = z(a.Qb, a, p);
+ c = a.J.createElement("div");
+ a.J.parentWindow.document.body.appendChild(c);
+ c.innerHTML = '<iframe src="' + a.v + '"></iframe>';
+ a.a.info("TRIDENT REQ (" + a.C + ") [ attempt " + a.Aa + "]: GET\n" + a.v);
+ a.b.F(kc)
+}
+t.vc = function(a) {
+ W(z(this.uc, this, a), 0)
+};
+t.uc = function(a) {
+ if(!this.Y) {
+ var b = this.a;
+ b.info("TRIDENT TEXT (" + this.C + "): " + Fc(b, a));
+ rc(this);
+ uc(this, a);
+ jc(this)
+ }
+};
+t.Qb = function(a) {
+ W(z(this.tc, this, a), 0)
+};
+t.tc = function(a) {
+ this.Y || (this.a.info("TRIDENT TEXT (" + this.C + "): " + a ? "success" : "failure"), U(this), this.I = a, this.b.ia(this), this.b.F(Gc))
+};
+t.kc = function() {
+ rc(this);
+ this.b.ia(this)
+};
+t.cancel = function() {
+ this.Y = j;
+ U(this)
+};
+function jc(a) {
+ a.qb = A() + a.Ba;
+ Hc(a, a.Ba)
+}
+function Hc(a, b) {
+ a.sa != k && f(Error("WatchDog timer not null"));
+ a.sa = W(z(a.wc, a), b)
+}
+function rc(a) {
+ a.sa && (u.clearTimeout(a.sa), a.sa = k)
+}
+t.wc = function() {
+ this.sa = k;
+ var a = A();
+ 0 <= a - this.qb ? (this.I && this.a.H("Received watchdog timeout even though request loaded successfully"), this.a.info("TIMEOUT: " + this.v), 2 != this.pa && this.b.F(pc), U(this), this.p = 2, V(Ic), xc(this)) : (this.a.ra("WatchDog timer called too early"), Hc(this, this.qb - a))
+};