rroonga 5.0.4-x64-mingw32 → 5.0.5-x64-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (750) hide show
  1. checksums.yaml +8 -8
  2. data/README.md +2 -2
  3. data/example/measure-data-column-disk-usage.rb +124 -0
  4. data/example/measure-index-column-disk-usage.rb +81 -0
  5. data/example/measure-table-disk-usage.rb +100 -0
  6. data/ext/groonga/rb-grn-database.c +31 -0
  7. data/ext/groonga/rb-grn-double-array-trie.c +1 -8
  8. data/ext/groonga/rb-grn-logger.c +45 -0
  9. data/ext/groonga/rb-grn-object.c +29 -1
  10. data/ext/groonga/rb-grn-patricia-trie.c +1 -8
  11. data/ext/groonga/rb-grn-table-cursor.c +8 -3
  12. data/ext/groonga/rb-grn-table.c +10 -5
  13. data/ext/groonga/rb-grn-thread.c +160 -0
  14. data/ext/groonga/rb-grn-windows-event-logger.c +79 -0
  15. data/ext/groonga/rb-grn.h +3 -1
  16. data/ext/groonga/rb-groonga.c +3 -1
  17. data/lib/1.9/groonga.so +0 -0
  18. data/lib/2.0/groonga.so +0 -0
  19. data/lib/2.1/groonga.so +0 -0
  20. data/lib/2.2/groonga.so +0 -0
  21. data/lib/groonga/dumper.rb +6 -1
  22. data/rroonga-build.rb +4 -4
  23. data/test/groonga-test-utils.rb +5 -1
  24. data/test/test-database.rb +11 -0
  25. data/test/test-logger.rb +6 -0
  26. data/test/test-operator.rb +6 -6
  27. data/test/test-procedure.rb +15 -0
  28. data/test/test-table-dumper.rb +170 -1
  29. data/test/test-thread.rb +42 -0
  30. data/test/test-windows-event-logger.rb +28 -0
  31. data/vendor/local/bin/grndb.exe +0 -0
  32. data/vendor/local/bin/groonga-benchmark.exe +0 -0
  33. data/vendor/local/bin/groonga.exe +0 -0
  34. data/vendor/local/bin/libgcc_s_seh-1.dll +0 -0
  35. data/vendor/local/bin/libgroonga-0.dll +0 -0
  36. data/vendor/local/bin/libmecab-1.dll +0 -0
  37. data/vendor/local/bin/libmsgpack-4.dll +0 -0
  38. data/vendor/local/bin/libmsgpackc-2.dll +0 -0
  39. data/vendor/local/bin/libonig-5.dll +0 -0
  40. data/vendor/local/bin/libstdc++-6.dll +0 -0
  41. data/vendor/local/bin/libwinpthread-1.dll +0 -0
  42. data/vendor/local/bin/lz4.exe +0 -0
  43. data/vendor/local/bin/lz4c.exe +0 -0
  44. data/vendor/local/bin/lz4cat +0 -0
  45. data/vendor/local/bin/mecab-config +2 -2
  46. data/vendor/local/bin/mecab.exe +0 -0
  47. data/vendor/local/bin/onig-config +1 -1
  48. data/vendor/local/bin/zlib1.dll +0 -0
  49. data/vendor/local/etc/groonga/httpd/groonga-httpd.conf +2 -2
  50. data/vendor/local/etc/groonga/windows_event_log/provider.man +38 -0
  51. data/vendor/local/include/groonga/groonga.h +2 -0
  52. data/vendor/local/include/groonga/groonga/command.h +2 -0
  53. data/vendor/local/include/groonga/groonga/groonga.h +5 -0
  54. data/vendor/local/include/groonga/groonga/obj.h +1 -0
  55. data/vendor/local/include/groonga/groonga/portability.h +16 -0
  56. data/vendor/local/include/groonga/groonga/thread.h +42 -0
  57. data/vendor/local/include/groonga/groonga/windows_event_logger.h +33 -0
  58. data/vendor/local/lib/groonga/plugins/functions/vector.a +0 -0
  59. data/vendor/local/lib/groonga/plugins/functions/vector.dll +0 -0
  60. data/vendor/local/lib/groonga/plugins/functions/vector.dll.a +0 -0
  61. data/vendor/local/lib/groonga/plugins/functions/vector.la +2 -2
  62. data/vendor/local/lib/groonga/plugins/query_expanders/tsv.a +0 -0
  63. data/vendor/local/lib/groonga/plugins/query_expanders/tsv.dll +0 -0
  64. data/vendor/local/lib/groonga/plugins/query_expanders/tsv.dll.a +0 -0
  65. data/vendor/local/lib/groonga/plugins/query_expanders/tsv.la +2 -2
  66. data/vendor/local/lib/groonga/plugins/ruby/eval.a +0 -0
  67. data/vendor/local/lib/groonga/plugins/ruby/eval.dll +0 -0
  68. data/vendor/local/lib/groonga/plugins/ruby/eval.dll.a +0 -0
  69. data/vendor/local/lib/groonga/plugins/ruby/eval.la +2 -2
  70. data/vendor/local/lib/groonga/plugins/ruby/load.a +0 -0
  71. data/vendor/local/lib/groonga/plugins/ruby/load.dll +0 -0
  72. data/vendor/local/lib/groonga/plugins/ruby/load.dll.a +0 -0
  73. data/vendor/local/lib/groonga/plugins/ruby/load.la +2 -2
  74. data/vendor/local/lib/groonga/plugins/sharding.rb +5 -0
  75. data/vendor/local/lib/groonga/plugins/sharding/logical_count.rb +43 -6
  76. data/vendor/local/lib/groonga/plugins/sharding/logical_enumerator.rb +32 -25
  77. data/vendor/local/lib/groonga/plugins/sharding/logical_parameters.rb +44 -0
  78. data/vendor/local/lib/groonga/plugins/sharding/logical_range_filter.rb +217 -49
  79. data/vendor/local/lib/groonga/plugins/sharding/logical_select.rb +507 -45
  80. data/vendor/local/lib/groonga/plugins/sharding/logical_shard_list.rb +28 -0
  81. data/vendor/local/lib/groonga/plugins/sharding/logical_table_remove.rb +11 -6
  82. data/vendor/local/lib/groonga/plugins/sharding/parameters.rb +10 -0
  83. data/vendor/local/lib/groonga/plugins/suggest/suggest.a +0 -0
  84. data/vendor/local/lib/groonga/plugins/suggest/suggest.dll +0 -0
  85. data/vendor/local/lib/groonga/plugins/suggest/suggest.dll.a +0 -0
  86. data/vendor/local/lib/groonga/plugins/suggest/suggest.la +2 -2
  87. data/vendor/local/lib/groonga/plugins/table/table.a +0 -0
  88. data/vendor/local/lib/groonga/plugins/table/table.dll +0 -0
  89. data/vendor/local/lib/groonga/plugins/table/table.dll.a +0 -0
  90. data/vendor/local/lib/groonga/plugins/table/table.la +2 -2
  91. data/vendor/local/lib/groonga/plugins/token_filters/stop_word.a +0 -0
  92. data/vendor/local/lib/groonga/plugins/token_filters/stop_word.dll +0 -0
  93. data/vendor/local/lib/groonga/plugins/token_filters/stop_word.dll.a +0 -0
  94. data/vendor/local/lib/groonga/plugins/token_filters/stop_word.la +2 -2
  95. data/vendor/local/lib/groonga/plugins/tokenizers/mecab.a +0 -0
  96. data/vendor/local/lib/groonga/plugins/tokenizers/mecab.dll +0 -0
  97. data/vendor/local/lib/groonga/plugins/tokenizers/mecab.dll.a +0 -0
  98. data/vendor/local/lib/groonga/plugins/tokenizers/mecab.la +2 -2
  99. data/vendor/local/lib/groonga/scripts/ruby/command.rb +31 -1
  100. data/vendor/local/lib/groonga/scripts/ruby/context.rb +18 -2
  101. data/vendor/local/lib/groonga/scripts/ruby/database.rb +12 -4
  102. data/vendor/local/lib/groonga/scripts/ruby/expression_size_estimator.rb +31 -28
  103. data/vendor/local/lib/groonga/scripts/ruby/initialize/post.rb +1 -0
  104. data/vendor/local/lib/groonga/scripts/ruby/logger/level.rb +4 -2
  105. data/vendor/local/lib/groonga/scripts/ruby/query_logger.rb +9 -0
  106. data/vendor/local/lib/groonga/scripts/ruby/query_logger/flag.rb +39 -0
  107. data/vendor/local/lib/groonga/scripts/ruby/record.rb +12 -0
  108. data/vendor/local/lib/groonga/scripts/ruby/table.rb +35 -1
  109. data/vendor/local/lib/libgroonga.a +0 -0
  110. data/vendor/local/lib/libgroonga.dll.a +0 -0
  111. data/vendor/local/lib/libgroonga.la +2 -2
  112. data/vendor/local/lib/liblz4.dll +0 -0
  113. data/vendor/local/lib/liblz4.dll.1 +0 -0
  114. data/vendor/local/lib/liblz4.dll.1.5.0 +0 -0
  115. data/vendor/local/lib/libmecab.a +0 -0
  116. data/vendor/local/lib/libmecab.dll.a +0 -0
  117. data/vendor/local/lib/libmecab.la +2 -2
  118. data/vendor/local/lib/libmsgpack.a +0 -0
  119. data/vendor/local/lib/libmsgpack.dll.a +0 -0
  120. data/vendor/local/lib/libmsgpack.la +2 -2
  121. data/vendor/local/lib/libmsgpackc.a +0 -0
  122. data/vendor/local/lib/libmsgpackc.dll.a +0 -0
  123. data/vendor/local/lib/libmsgpackc.la +2 -2
  124. data/vendor/local/lib/libonig.a +0 -0
  125. data/vendor/local/lib/libonig.dll.a +0 -0
  126. data/vendor/local/lib/libonig.la +2 -2
  127. data/vendor/local/lib/libz.dll.a +0 -0
  128. data/vendor/local/lib/pkgconfig/groonga.pc +3 -3
  129. data/vendor/local/lib/pkgconfig/liblz4.pc +5 -5
  130. data/vendor/local/lib/pkgconfig/msgpack.pc +1 -1
  131. data/vendor/local/lib/pkgconfig/oniguruma.pc +6 -6
  132. data/vendor/local/lib/pkgconfig/zlib.pc +3 -3
  133. data/vendor/local/libexec/mecab/mecab-cost-train.exe +0 -0
  134. data/vendor/local/libexec/mecab/mecab-dict-gen.exe +0 -0
  135. data/vendor/local/libexec/mecab/mecab-dict-index.exe +0 -0
  136. data/vendor/local/libexec/mecab/mecab-system-eval.exe +0 -0
  137. data/vendor/local/libexec/mecab/mecab-test-gen.exe +0 -0
  138. data/vendor/local/sbin/groonga-httpd-restart +1 -1
  139. data/vendor/local/sbin/groonga-httpd.exe +0 -0
  140. data/vendor/local/share/doc/groonga/en/html/.buildinfo +1 -1
  141. data/vendor/local/share/doc/groonga/en/html/_sources/contribution/development.txt +3 -2
  142. data/vendor/local/share/doc/groonga/en/html/_sources/contribution/development/build.txt +19 -0
  143. data/vendor/local/share/doc/groonga/en/html/_sources/contribution/development/build/unix_autotools.txt +101 -0
  144. data/vendor/local/share/doc/groonga/en/html/_sources/contribution/development/build/unix_cmake.txt +94 -0
  145. data/vendor/local/share/doc/groonga/en/html/_sources/contribution/development/build/windows_cmake.txt +93 -0
  146. data/vendor/local/share/doc/groonga/en/html/_sources/contribution/development/release.txt +16 -7
  147. data/vendor/local/share/doc/groonga/en/html/_sources/contribution/development/repository.txt +7 -3
  148. data/vendor/local/share/doc/groonga/en/html/_sources/contribution/development/test.txt +4 -0
  149. data/vendor/local/share/doc/groonga/en/html/_sources/install/centos.txt +3 -3
  150. data/vendor/local/share/doc/groonga/en/html/_sources/install/debian.txt +4 -4
  151. data/vendor/local/share/doc/groonga/en/html/_sources/install/fedora.txt +3 -3
  152. data/vendor/local/share/doc/groonga/en/html/_sources/install/mac_os_x.txt +3 -3
  153. data/vendor/local/share/doc/groonga/en/html/_sources/install/others.txt +4 -4
  154. data/vendor/local/share/doc/groonga/en/html/_sources/install/solaris.txt +3 -3
  155. data/vendor/local/share/doc/groonga/en/html/_sources/install/ubuntu.txt +3 -4
  156. data/vendor/local/share/doc/groonga/en/html/_sources/install/windows.txt +9 -9
  157. data/vendor/local/share/doc/groonga/en/html/_sources/news.txt +319 -0
  158. data/vendor/local/share/doc/groonga/en/html/_sources/reference.txt +1 -0
  159. data/vendor/local/share/doc/groonga/en/html/_sources/reference/api/grn_ctx.txt +1 -1
  160. data/vendor/local/share/doc/groonga/en/html/_sources/reference/api/grn_db.txt +23 -0
  161. data/vendor/local/share/doc/groonga/en/html/_sources/reference/api/grn_thread.txt +122 -0
  162. data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/cache_limit.txt +1 -1
  163. data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/column_copy.txt +381 -0
  164. data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/column_list.txt +1 -1
  165. data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/column_rename.txt +3 -1
  166. data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/database_unmap.txt +85 -0
  167. data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/io_flush.txt +218 -9
  168. data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/lock_clear.txt +1 -3
  169. data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/log_level.txt +1 -1
  170. data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/logical_count.txt +3 -1
  171. data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/logical_parameters.txt +138 -0
  172. data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/logical_range_filter.txt +97 -10
  173. data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/logical_select.txt +745 -23
  174. data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/logical_shard_list.txt +107 -0
  175. data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/logical_table_remove.txt +3 -1
  176. data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/normalize.txt +2 -3
  177. data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/normalizer_list.txt +1 -2
  178. data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/object_exist.txt +90 -0
  179. data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/plugin_register.txt +1 -1
  180. data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/plugin_unregister.txt +1 -1
  181. data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/register.txt +1 -1
  182. data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/request_cancel.txt +1 -3
  183. data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/ruby_eval.txt +1 -1
  184. data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/ruby_load.txt +1 -1
  185. data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/select.txt +240 -56
  186. data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/table_create.txt +33 -7
  187. data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/table_rename.txt +90 -0
  188. data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/table_tokenize.txt +2 -1
  189. data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/thread_limit.txt +110 -0
  190. data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/tokenize.txt +2 -1
  191. data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/tokenizer_list.txt +1 -3
  192. data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/truncate.txt +1 -3
  193. data/vendor/local/share/doc/groonga/en/html/_sources/reference/executables/groonga-httpd.txt +3 -4
  194. data/vendor/local/share/doc/groonga/en/html/_sources/reference/functions/highlight_full.txt +0 -1
  195. data/vendor/local/share/doc/groonga/en/html/_sources/reference/functions/highlight_html.txt +0 -1
  196. data/vendor/local/share/doc/groonga/en/html/_sources/reference/functions/query.txt +2 -2
  197. data/vendor/local/share/doc/groonga/en/html/_sources/reference/functions/snippet_html.txt +1 -1
  198. data/vendor/local/share/doc/groonga/en/html/_sources/reference/grn_expr/query_syntax.txt +1 -1
  199. data/vendor/local/share/doc/groonga/en/html/_sources/reference/grn_expr/script_syntax.txt +34 -14
  200. data/vendor/local/share/doc/groonga/en/html/_sources/reference/indexing.txt +2 -2
  201. data/vendor/local/share/doc/groonga/en/html/_sources/reference/query_expanders/tsv.txt +1 -1
  202. data/vendor/local/share/doc/groonga/en/html/_sources/reference/regular_expression.txt +3 -0
  203. data/vendor/local/share/doc/groonga/en/html/_sources/reference/scoring_note.txt +2 -0
  204. data/vendor/local/share/doc/groonga/en/html/_sources/reference/sharding.txt +108 -0
  205. data/vendor/local/share/doc/groonga/en/html/_sources/reference/tokenizers.txt +0 -21
  206. data/vendor/local/share/doc/groonga/en/html/_sources/reference/tuning.txt +1 -1
  207. data/vendor/local/share/doc/groonga/en/html/_sources/spec/search.txt +1 -1
  208. data/vendor/local/share/doc/groonga/en/html/_sources/troubleshooting/different_results_with_the_same_keyword.txt +4 -4
  209. data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/introduction.txt +24 -18
  210. data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/match_columns.txt +19 -19
  211. data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/micro_blog.txt +9 -9
  212. data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/query_expansion.txt +1 -1
  213. data/vendor/local/share/doc/groonga/en/html/_static/basic.css +68 -6
  214. data/vendor/local/share/doc/groonga/en/html/_static/doctools.js +27 -2
  215. data/vendor/local/share/doc/groonga/en/html/_static/down-pressed.png +0 -0
  216. data/vendor/local/share/doc/groonga/en/html/_static/down.png +0 -0
  217. data/vendor/local/share/doc/groonga/en/html/_static/file.png +0 -0
  218. data/vendor/local/share/doc/groonga/en/html/_static/jquery-1.11.1.js +10308 -0
  219. data/vendor/local/share/doc/groonga/en/html/_static/jquery.js +4 -9404
  220. data/vendor/local/share/doc/groonga/en/html/_static/minus.png +0 -0
  221. data/vendor/local/share/doc/groonga/en/html/_static/plus.png +0 -0
  222. data/vendor/local/share/doc/groonga/en/html/_static/searchtools.js +2 -2
  223. data/vendor/local/share/doc/groonga/en/html/_static/underscore-1.3.1.js +999 -0
  224. data/vendor/local/share/doc/groonga/en/html/_static/underscore.js +31 -1415
  225. data/vendor/local/share/doc/groonga/en/html/_static/up-pressed.png +0 -0
  226. data/vendor/local/share/doc/groonga/en/html/_static/up.png +0 -0
  227. data/vendor/local/share/doc/groonga/en/html/_static/websupport.js +15 -15
  228. data/vendor/local/share/doc/groonga/en/html/characteristic.html +19 -17
  229. data/vendor/local/share/doc/groonga/en/html/client.html +19 -17
  230. data/vendor/local/share/doc/groonga/en/html/community.html +19 -17
  231. data/vendor/local/share/doc/groonga/en/html/contribution.html +78 -70
  232. data/vendor/local/share/doc/groonga/en/html/contribution/development.html +30 -27
  233. data/vendor/local/share/doc/groonga/en/html/contribution/development/build.html +146 -0
  234. data/vendor/local/share/doc/groonga/en/html/contribution/development/build/unix_autotools.html +237 -0
  235. data/vendor/local/share/doc/groonga/en/html/contribution/development/build/unix_cmake.html +227 -0
  236. data/vendor/local/share/doc/groonga/en/html/contribution/development/build/windows_cmake.html +231 -0
  237. data/vendor/local/share/doc/groonga/en/html/contribution/development/com.html +37 -35
  238. data/vendor/local/share/doc/groonga/en/html/contribution/development/cooperation.html +54 -52
  239. data/vendor/local/share/doc/groonga/en/html/contribution/development/query.html +80 -78
  240. data/vendor/local/share/doc/groonga/en/html/contribution/development/release.html +135 -122
  241. data/vendor/local/share/doc/groonga/en/html/contribution/development/repository.html +38 -34
  242. data/vendor/local/share/doc/groonga/en/html/contribution/development/test.html +58 -54
  243. data/vendor/local/share/doc/groonga/en/html/contribution/documentation.html +21 -19
  244. data/vendor/local/share/doc/groonga/en/html/contribution/documentation/c-api.html +27 -25
  245. data/vendor/local/share/doc/groonga/en/html/contribution/documentation/i18n.html +23 -21
  246. data/vendor/local/share/doc/groonga/en/html/contribution/documentation/introduction.html +30 -28
  247. data/vendor/local/share/doc/groonga/en/html/contribution/report.html +21 -19
  248. data/vendor/local/share/doc/groonga/en/html/development.html +19 -17
  249. data/vendor/local/share/doc/groonga/en/html/development/travis-ci.html +30 -28
  250. data/vendor/local/share/doc/groonga/en/html/genindex.html +48 -20
  251. data/vendor/local/share/doc/groonga/en/html/index.html +123 -105
  252. data/vendor/local/share/doc/groonga/en/html/install.html +33 -31
  253. data/vendor/local/share/doc/groonga/en/html/install/centos.html +32 -30
  254. data/vendor/local/share/doc/groonga/en/html/install/debian.html +31 -29
  255. data/vendor/local/share/doc/groonga/en/html/install/fedora.html +29 -27
  256. data/vendor/local/share/doc/groonga/en/html/install/mac_os_x.html +26 -24
  257. data/vendor/local/share/doc/groonga/en/html/install/others.html +92 -90
  258. data/vendor/local/share/doc/groonga/en/html/install/solaris.html +26 -24
  259. data/vendor/local/share/doc/groonga/en/html/install/ubuntu.html +29 -28
  260. data/vendor/local/share/doc/groonga/en/html/install/windows.html +34 -32
  261. data/vendor/local/share/doc/groonga/en/html/limitations.html +19 -17
  262. data/vendor/local/share/doc/groonga/en/html/news.html +509 -142
  263. data/vendor/local/share/doc/groonga/en/html/news/0.x.html +19 -17
  264. data/vendor/local/share/doc/groonga/en/html/news/1.0.x.html +20 -18
  265. data/vendor/local/share/doc/groonga/en/html/news/1.1.x.html +19 -17
  266. data/vendor/local/share/doc/groonga/en/html/news/1.2.x.html +34 -32
  267. data/vendor/local/share/doc/groonga/en/html/news/1.3.x.html +29 -27
  268. data/vendor/local/share/doc/groonga/en/html/news/2.x.html +110 -108
  269. data/vendor/local/share/doc/groonga/en/html/news/3.x.html +73 -71
  270. data/vendor/local/share/doc/groonga/en/html/news/4.x.html +111 -109
  271. data/vendor/local/share/doc/groonga/en/html/news/senna.html +19 -17
  272. data/vendor/local/share/doc/groonga/en/html/objects.inv +0 -0
  273. data/vendor/local/share/doc/groonga/en/html/reference.html +111 -94
  274. data/vendor/local/share/doc/groonga/en/html/reference/api.html +55 -52
  275. data/vendor/local/share/doc/groonga/en/html/reference/api/global_configurations.html +51 -49
  276. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_cache.html +63 -61
  277. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_column.html +84 -82
  278. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_command_version.html +46 -44
  279. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_content_type.html +41 -39
  280. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_ctx.html +89 -87
  281. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_db.html +88 -50
  282. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_encoding.html +48 -46
  283. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_expr.html +83 -81
  284. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_geo.html +46 -44
  285. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_hook.html +48 -46
  286. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_ii.html +46 -44
  287. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_index_cursor.html +45 -43
  288. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_info.html +45 -43
  289. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_match_escalation.html +44 -42
  290. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_obj.html +93 -91
  291. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_proc.html +48 -46
  292. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_search.html +43 -41
  293. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_table.html +79 -77
  294. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_table_cursor.html +69 -67
  295. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_thread.html +296 -0
  296. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_type.html +45 -43
  297. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_user_data.html +38 -36
  298. data/vendor/local/share/doc/groonga/en/html/reference/api/overview.html +51 -49
  299. data/vendor/local/share/doc/groonga/en/html/reference/api/plugin.html +60 -58
  300. data/vendor/local/share/doc/groonga/en/html/reference/cast.html +19 -17
  301. data/vendor/local/share/doc/groonga/en/html/reference/column.html +21 -19
  302. data/vendor/local/share/doc/groonga/en/html/reference/columns/index.html +23 -21
  303. data/vendor/local/share/doc/groonga/en/html/reference/columns/pseudo.html +28 -26
  304. data/vendor/local/share/doc/groonga/en/html/reference/columns/scalar.html +23 -21
  305. data/vendor/local/share/doc/groonga/en/html/reference/columns/vector.html +72 -70
  306. data/vendor/local/share/doc/groonga/en/html/reference/command.html +70 -61
  307. data/vendor/local/share/doc/groonga/en/html/reference/command/command_version.html +23 -21
  308. data/vendor/local/share/doc/groonga/en/html/reference/command/output_format.html +59 -57
  309. data/vendor/local/share/doc/groonga/en/html/reference/command/request_id.html +28 -26
  310. data/vendor/local/share/doc/groonga/en/html/reference/command/return_code.html +100 -98
  311. data/vendor/local/share/doc/groonga/en/html/reference/commands/cache_limit.html +44 -42
  312. data/vendor/local/share/doc/groonga/en/html/reference/commands/check.html +49 -47
  313. data/vendor/local/share/doc/groonga/en/html/reference/commands/clearlock.html +33 -31
  314. data/vendor/local/share/doc/groonga/en/html/reference/commands/column_copy.html +796 -0
  315. data/vendor/local/share/doc/groonga/en/html/reference/commands/column_create.html +62 -60
  316. data/vendor/local/share/doc/groonga/en/html/reference/commands/column_list.html +96 -94
  317. data/vendor/local/share/doc/groonga/en/html/reference/commands/column_remove.html +46 -44
  318. data/vendor/local/share/doc/groonga/en/html/reference/commands/column_rename.html +67 -64
  319. data/vendor/local/share/doc/groonga/en/html/reference/commands/database_unmap.html +236 -0
  320. data/vendor/local/share/doc/groonga/en/html/reference/commands/define_selector.html +62 -60
  321. data/vendor/local/share/doc/groonga/en/html/reference/commands/defrag.html +46 -44
  322. data/vendor/local/share/doc/groonga/en/html/reference/commands/delete.html +59 -57
  323. data/vendor/local/share/doc/groonga/en/html/reference/commands/dump.html +63 -61
  324. data/vendor/local/share/doc/groonga/en/html/reference/commands/io_flush.html +281 -54
  325. data/vendor/local/share/doc/groonga/en/html/reference/commands/load.html +66 -64
  326. data/vendor/local/share/doc/groonga/en/html/reference/commands/lock_clear.html +53 -52
  327. data/vendor/local/share/doc/groonga/en/html/reference/commands/log_level.html +48 -46
  328. data/vendor/local/share/doc/groonga/en/html/reference/commands/log_put.html +48 -46
  329. data/vendor/local/share/doc/groonga/en/html/reference/commands/log_reopen.html +48 -46
  330. data/vendor/local/share/doc/groonga/en/html/reference/commands/logical_count.html +78 -75
  331. data/vendor/local/share/doc/groonga/en/html/reference/commands/logical_parameters.html +283 -0
  332. data/vendor/local/share/doc/groonga/en/html/reference/commands/logical_range_filter.html +160 -85
  333. data/vendor/local/share/doc/groonga/en/html/reference/commands/logical_select.html +2071 -83
  334. data/vendor/local/share/doc/groonga/en/html/reference/commands/logical_shard_list.html +287 -0
  335. data/vendor/local/share/doc/groonga/en/html/reference/commands/logical_table_remove.html +71 -68
  336. data/vendor/local/share/doc/groonga/en/html/reference/commands/normalize.html +86 -84
  337. data/vendor/local/share/doc/groonga/en/html/reference/commands/normalizer_list.html +52 -50
  338. data/vendor/local/share/doc/groonga/en/html/reference/commands/object_exist.html +227 -0
  339. data/vendor/local/share/doc/groonga/en/html/reference/commands/plugin_register.html +57 -55
  340. data/vendor/local/share/doc/groonga/en/html/reference/commands/plugin_unregister.html +53 -51
  341. data/vendor/local/share/doc/groonga/en/html/reference/commands/quit.html +43 -41
  342. data/vendor/local/share/doc/groonga/en/html/reference/commands/range_filter.html +43 -41
  343. data/vendor/local/share/doc/groonga/en/html/reference/commands/register.html +56 -54
  344. data/vendor/local/share/doc/groonga/en/html/reference/commands/request_cancel.html +75 -74
  345. data/vendor/local/share/doc/groonga/en/html/reference/commands/ruby_eval.html +59 -57
  346. data/vendor/local/share/doc/groonga/en/html/reference/commands/ruby_load.html +59 -57
  347. data/vendor/local/share/doc/groonga/en/html/reference/commands/select.html +898 -647
  348. data/vendor/local/share/doc/groonga/en/html/reference/commands/shutdown.html +43 -41
  349. data/vendor/local/share/doc/groonga/en/html/reference/commands/status.html +50 -48
  350. data/vendor/local/share/doc/groonga/en/html/reference/commands/suggest.html +87 -85
  351. data/vendor/local/share/doc/groonga/en/html/reference/commands/table_create.html +175 -152
  352. data/vendor/local/share/doc/groonga/en/html/reference/commands/table_list.html +55 -53
  353. data/vendor/local/share/doc/groonga/en/html/reference/commands/table_remove.html +46 -44
  354. data/vendor/local/share/doc/groonga/en/html/reference/commands/table_rename.html +327 -0
  355. data/vendor/local/share/doc/groonga/en/html/reference/commands/table_tokenize.html +77 -75
  356. data/vendor/local/share/doc/groonga/en/html/reference/commands/thread_limit.html +241 -0
  357. data/vendor/local/share/doc/groonga/en/html/reference/commands/tokenize.html +108 -106
  358. data/vendor/local/share/doc/groonga/en/html/reference/commands/tokenizer_list.html +56 -51
  359. data/vendor/local/share/doc/groonga/en/html/reference/commands/truncate.html +56 -55
  360. data/vendor/local/share/doc/groonga/en/html/reference/executables.html +24 -22
  361. data/vendor/local/share/doc/groonga/en/html/reference/executables/grndb.html +41 -39
  362. data/vendor/local/share/doc/groonga/en/html/reference/executables/grnslap.html +28 -26
  363. data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-benchmark.html +33 -31
  364. data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-httpd.html +83 -81
  365. data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-server-http.html +29 -27
  366. data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-suggest-create-dataset.html +23 -21
  367. data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-suggest-httpd.html +48 -46
  368. data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-suggest-learner.html +40 -38
  369. data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga.html +84 -82
  370. data/vendor/local/share/doc/groonga/en/html/reference/function.html +22 -20
  371. data/vendor/local/share/doc/groonga/en/html/reference/functions/between.html +47 -45
  372. data/vendor/local/share/doc/groonga/en/html/reference/functions/edit_distance.html +25 -23
  373. data/vendor/local/share/doc/groonga/en/html/reference/functions/geo_distance.html +85 -83
  374. data/vendor/local/share/doc/groonga/en/html/reference/functions/geo_in_circle.html +36 -34
  375. data/vendor/local/share/doc/groonga/en/html/reference/functions/geo_in_rectangle.html +26 -24
  376. data/vendor/local/share/doc/groonga/en/html/reference/functions/highlight_full.html +66 -64
  377. data/vendor/local/share/doc/groonga/en/html/reference/functions/highlight_html.html +54 -52
  378. data/vendor/local/share/doc/groonga/en/html/reference/functions/html_untag.html +35 -33
  379. data/vendor/local/share/doc/groonga/en/html/reference/functions/in_values.html +34 -32
  380. data/vendor/local/share/doc/groonga/en/html/reference/functions/now.html +23 -21
  381. data/vendor/local/share/doc/groonga/en/html/reference/functions/query.html +55 -53
  382. data/vendor/local/share/doc/groonga/en/html/reference/functions/rand.html +24 -22
  383. data/vendor/local/share/doc/groonga/en/html/reference/functions/snippet_html.html +49 -47
  384. data/vendor/local/share/doc/groonga/en/html/reference/functions/sub_filter.html +45 -43
  385. data/vendor/local/share/doc/groonga/en/html/reference/functions/vector_size.html +33 -31
  386. data/vendor/local/share/doc/groonga/en/html/reference/grn_expr.html +29 -27
  387. data/vendor/local/share/doc/groonga/en/html/reference/grn_expr/query_syntax.html +244 -242
  388. data/vendor/local/share/doc/groonga/en/html/reference/grn_expr/script_syntax.html +327 -325
  389. data/vendor/local/share/doc/groonga/en/html/reference/indexing.html +35 -29
  390. data/vendor/local/share/doc/groonga/en/html/reference/log.html +43 -41
  391. data/vendor/local/share/doc/groonga/en/html/reference/normalizers.html +49 -47
  392. data/vendor/local/share/doc/groonga/en/html/reference/operations.html +21 -19
  393. data/vendor/local/share/doc/groonga/en/html/reference/operations/geolocation_search.html +23 -21
  394. data/vendor/local/share/doc/groonga/en/html/reference/output.html +36 -34
  395. data/vendor/local/share/doc/groonga/en/html/reference/query_expanders.html +21 -19
  396. data/vendor/local/share/doc/groonga/en/html/reference/query_expanders/tsv.html +62 -60
  397. data/vendor/local/share/doc/groonga/en/html/reference/regular_expression.html +107 -103
  398. data/vendor/local/share/doc/groonga/en/html/reference/scorer.html +50 -40
  399. data/vendor/local/share/doc/groonga/en/html/reference/scorers/scorer_tf_at_most.html +27 -25
  400. data/vendor/local/share/doc/groonga/en/html/reference/scorers/scorer_tf_idf.html +41 -31
  401. data/vendor/local/share/doc/groonga/en/html/reference/scoring_note.html +19 -17
  402. data/vendor/local/share/doc/groonga/en/html/reference/sharding.html +241 -0
  403. data/vendor/local/share/doc/groonga/en/html/reference/suggest.html +21 -19
  404. data/vendor/local/share/doc/groonga/en/html/reference/suggest/completion.html +30 -28
  405. data/vendor/local/share/doc/groonga/en/html/reference/suggest/correction.html +23 -21
  406. data/vendor/local/share/doc/groonga/en/html/reference/suggest/introduction.html +23 -21
  407. data/vendor/local/share/doc/groonga/en/html/reference/suggest/suggestion.html +23 -21
  408. data/vendor/local/share/doc/groonga/en/html/reference/tables.html +56 -54
  409. data/vendor/local/share/doc/groonga/en/html/reference/token_filters.html +41 -39
  410. data/vendor/local/share/doc/groonga/en/html/reference/tokenizers.html +341 -289
  411. data/vendor/local/share/doc/groonga/en/html/reference/tuning.html +68 -66
  412. data/vendor/local/share/doc/groonga/en/html/reference/types.html +43 -41
  413. data/vendor/local/share/doc/groonga/en/html/search.html +11 -11
  414. data/vendor/local/share/doc/groonga/en/html/searchindex.js +1 -1
  415. data/vendor/local/share/doc/groonga/en/html/server.html +19 -17
  416. data/vendor/local/share/doc/groonga/en/html/server/gqtp.html +22 -20
  417. data/vendor/local/share/doc/groonga/en/html/server/http.html +21 -19
  418. data/vendor/local/share/doc/groonga/en/html/server/http/comparison.html +37 -35
  419. data/vendor/local/share/doc/groonga/en/html/server/http/groonga-httpd.html +23 -21
  420. data/vendor/local/share/doc/groonga/en/html/server/http/groonga.html +23 -21
  421. data/vendor/local/share/doc/groonga/en/html/server/memcached.html +21 -19
  422. data/vendor/local/share/doc/groonga/en/html/server/package.html +39 -37
  423. data/vendor/local/share/doc/groonga/en/html/spec.html +23 -21
  424. data/vendor/local/share/doc/groonga/en/html/spec/gqtp.html +129 -127
  425. data/vendor/local/share/doc/groonga/en/html/spec/search.html +22 -20
  426. data/vendor/local/share/doc/groonga/en/html/troubleshooting.html +19 -17
  427. data/vendor/local/share/doc/groonga/en/html/troubleshooting/different_results_with_the_same_keyword.html +25 -23
  428. data/vendor/local/share/doc/groonga/en/html/troubleshooting/mmap_cannot_allocate_memory.html +22 -20
  429. data/vendor/local/share/doc/groonga/en/html/tutorial.html +20 -18
  430. data/vendor/local/share/doc/groonga/en/html/tutorial/data.html +29 -23
  431. data/vendor/local/share/doc/groonga/en/html/tutorial/drilldown.html +35 -33
  432. data/vendor/local/share/doc/groonga/en/html/tutorial/index.html +25 -23
  433. data/vendor/local/share/doc/groonga/en/html/tutorial/introduction.html +46 -39
  434. data/vendor/local/share/doc/groonga/en/html/tutorial/lexicon.html +21 -19
  435. data/vendor/local/share/doc/groonga/en/html/tutorial/match_columns.html +65 -63
  436. data/vendor/local/share/doc/groonga/en/html/tutorial/micro_blog.html +55 -53
  437. data/vendor/local/share/doc/groonga/en/html/tutorial/network.html +25 -23
  438. data/vendor/local/share/doc/groonga/en/html/tutorial/patricia_trie.html +22 -20
  439. data/vendor/local/share/doc/groonga/en/html/tutorial/query_expansion.html +25 -23
  440. data/vendor/local/share/doc/groonga/en/html/tutorial/search.html +37 -35
  441. data/vendor/local/share/doc/groonga/ja/html/.buildinfo +1 -1
  442. data/vendor/local/share/doc/groonga/ja/html/_sources/contribution/development.txt +3 -2
  443. data/vendor/local/share/doc/groonga/ja/html/_sources/contribution/development/build.txt +19 -0
  444. data/vendor/local/share/doc/groonga/ja/html/_sources/contribution/development/build/unix_autotools.txt +101 -0
  445. data/vendor/local/share/doc/groonga/ja/html/_sources/contribution/development/build/unix_cmake.txt +94 -0
  446. data/vendor/local/share/doc/groonga/ja/html/_sources/contribution/development/build/windows_cmake.txt +93 -0
  447. data/vendor/local/share/doc/groonga/ja/html/_sources/contribution/development/release.txt +16 -7
  448. data/vendor/local/share/doc/groonga/ja/html/_sources/contribution/development/repository.txt +7 -3
  449. data/vendor/local/share/doc/groonga/ja/html/_sources/contribution/development/test.txt +4 -0
  450. data/vendor/local/share/doc/groonga/ja/html/_sources/install/centos.txt +3 -3
  451. data/vendor/local/share/doc/groonga/ja/html/_sources/install/debian.txt +4 -4
  452. data/vendor/local/share/doc/groonga/ja/html/_sources/install/fedora.txt +3 -3
  453. data/vendor/local/share/doc/groonga/ja/html/_sources/install/mac_os_x.txt +3 -3
  454. data/vendor/local/share/doc/groonga/ja/html/_sources/install/others.txt +4 -4
  455. data/vendor/local/share/doc/groonga/ja/html/_sources/install/solaris.txt +3 -3
  456. data/vendor/local/share/doc/groonga/ja/html/_sources/install/ubuntu.txt +3 -4
  457. data/vendor/local/share/doc/groonga/ja/html/_sources/install/windows.txt +9 -9
  458. data/vendor/local/share/doc/groonga/ja/html/_sources/news.txt +319 -0
  459. data/vendor/local/share/doc/groonga/ja/html/_sources/reference.txt +1 -0
  460. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/api/grn_ctx.txt +1 -1
  461. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/api/grn_db.txt +23 -0
  462. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/api/grn_thread.txt +122 -0
  463. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/cache_limit.txt +1 -1
  464. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/column_copy.txt +381 -0
  465. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/column_list.txt +1 -1
  466. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/column_rename.txt +3 -1
  467. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/database_unmap.txt +85 -0
  468. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/io_flush.txt +218 -9
  469. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/lock_clear.txt +1 -3
  470. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/log_level.txt +1 -1
  471. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/logical_count.txt +3 -1
  472. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/logical_parameters.txt +138 -0
  473. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/logical_range_filter.txt +97 -10
  474. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/logical_select.txt +745 -23
  475. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/logical_shard_list.txt +107 -0
  476. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/logical_table_remove.txt +3 -1
  477. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/normalize.txt +2 -3
  478. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/normalizer_list.txt +1 -2
  479. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/object_exist.txt +90 -0
  480. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/plugin_register.txt +1 -1
  481. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/plugin_unregister.txt +1 -1
  482. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/register.txt +1 -1
  483. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/request_cancel.txt +1 -3
  484. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/ruby_eval.txt +1 -1
  485. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/ruby_load.txt +1 -1
  486. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/select.txt +240 -56
  487. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/table_create.txt +33 -7
  488. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/table_rename.txt +90 -0
  489. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/table_tokenize.txt +2 -1
  490. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/thread_limit.txt +110 -0
  491. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/tokenize.txt +2 -1
  492. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/tokenizer_list.txt +1 -3
  493. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/truncate.txt +1 -3
  494. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/executables/groonga-httpd.txt +3 -4
  495. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/functions/highlight_full.txt +0 -1
  496. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/functions/highlight_html.txt +0 -1
  497. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/functions/query.txt +2 -2
  498. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/functions/snippet_html.txt +1 -1
  499. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/grn_expr/query_syntax.txt +1 -1
  500. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/grn_expr/script_syntax.txt +34 -14
  501. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/indexing.txt +2 -2
  502. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/query_expanders/tsv.txt +1 -1
  503. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/regular_expression.txt +3 -0
  504. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/scoring_note.txt +2 -0
  505. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/sharding.txt +108 -0
  506. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/tokenizers.txt +0 -21
  507. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/tuning.txt +1 -1
  508. data/vendor/local/share/doc/groonga/ja/html/_sources/spec/search.txt +1 -1
  509. data/vendor/local/share/doc/groonga/ja/html/_sources/troubleshooting/different_results_with_the_same_keyword.txt +4 -4
  510. data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/introduction.txt +24 -18
  511. data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/match_columns.txt +19 -19
  512. data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/micro_blog.txt +9 -9
  513. data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/query_expansion.txt +1 -1
  514. data/vendor/local/share/doc/groonga/ja/html/_static/basic.css +68 -6
  515. data/vendor/local/share/doc/groonga/ja/html/_static/doctools.js +27 -2
  516. data/vendor/local/share/doc/groonga/ja/html/_static/down-pressed.png +0 -0
  517. data/vendor/local/share/doc/groonga/ja/html/_static/down.png +0 -0
  518. data/vendor/local/share/doc/groonga/ja/html/_static/file.png +0 -0
  519. data/vendor/local/share/doc/groonga/ja/html/_static/jquery-1.11.1.js +10308 -0
  520. data/vendor/local/share/doc/groonga/ja/html/_static/jquery.js +4 -9404
  521. data/vendor/local/share/doc/groonga/ja/html/_static/minus.png +0 -0
  522. data/vendor/local/share/doc/groonga/ja/html/_static/plus.png +0 -0
  523. data/vendor/local/share/doc/groonga/ja/html/_static/searchtools.js +2 -2
  524. data/vendor/local/share/doc/groonga/ja/html/_static/underscore-1.3.1.js +999 -0
  525. data/vendor/local/share/doc/groonga/ja/html/_static/underscore.js +31 -1415
  526. data/vendor/local/share/doc/groonga/ja/html/_static/up-pressed.png +0 -0
  527. data/vendor/local/share/doc/groonga/ja/html/_static/up.png +0 -0
  528. data/vendor/local/share/doc/groonga/ja/html/_static/websupport.js +15 -15
  529. data/vendor/local/share/doc/groonga/ja/html/characteristic.html +19 -17
  530. data/vendor/local/share/doc/groonga/ja/html/client.html +19 -17
  531. data/vendor/local/share/doc/groonga/ja/html/community.html +19 -17
  532. data/vendor/local/share/doc/groonga/ja/html/contribution.html +77 -69
  533. data/vendor/local/share/doc/groonga/ja/html/contribution/development.html +30 -27
  534. data/vendor/local/share/doc/groonga/ja/html/contribution/development/build.html +144 -0
  535. data/vendor/local/share/doc/groonga/ja/html/contribution/development/build/unix_autotools.html +226 -0
  536. data/vendor/local/share/doc/groonga/ja/html/contribution/development/build/unix_cmake.html +215 -0
  537. data/vendor/local/share/doc/groonga/ja/html/contribution/development/build/windows_cmake.html +229 -0
  538. data/vendor/local/share/doc/groonga/ja/html/contribution/development/com.html +36 -34
  539. data/vendor/local/share/doc/groonga/ja/html/contribution/development/cooperation.html +53 -51
  540. data/vendor/local/share/doc/groonga/ja/html/contribution/development/query.html +79 -77
  541. data/vendor/local/share/doc/groonga/ja/html/contribution/development/release.html +134 -121
  542. data/vendor/local/share/doc/groonga/ja/html/contribution/development/repository.html +29 -27
  543. data/vendor/local/share/doc/groonga/ja/html/contribution/development/test.html +57 -53
  544. data/vendor/local/share/doc/groonga/ja/html/contribution/documentation.html +21 -19
  545. data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/c-api.html +23 -21
  546. data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/i18n.html +23 -21
  547. data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/introduction.html +30 -28
  548. data/vendor/local/share/doc/groonga/ja/html/contribution/report.html +21 -19
  549. data/vendor/local/share/doc/groonga/ja/html/development.html +19 -17
  550. data/vendor/local/share/doc/groonga/ja/html/development/travis-ci.html +25 -23
  551. data/vendor/local/share/doc/groonga/ja/html/genindex.html +48 -20
  552. data/vendor/local/share/doc/groonga/ja/html/index.html +122 -104
  553. data/vendor/local/share/doc/groonga/ja/html/install.html +33 -31
  554. data/vendor/local/share/doc/groonga/ja/html/install/centos.html +35 -33
  555. data/vendor/local/share/doc/groonga/ja/html/install/debian.html +33 -31
  556. data/vendor/local/share/doc/groonga/ja/html/install/fedora.html +30 -28
  557. data/vendor/local/share/doc/groonga/ja/html/install/mac_os_x.html +26 -24
  558. data/vendor/local/share/doc/groonga/ja/html/install/others.html +83 -81
  559. data/vendor/local/share/doc/groonga/ja/html/install/solaris.html +25 -23
  560. data/vendor/local/share/doc/groonga/ja/html/install/ubuntu.html +30 -29
  561. data/vendor/local/share/doc/groonga/ja/html/install/windows.html +33 -31
  562. data/vendor/local/share/doc/groonga/ja/html/limitations.html +19 -17
  563. data/vendor/local/share/doc/groonga/ja/html/news.html +460 -126
  564. data/vendor/local/share/doc/groonga/ja/html/news/0.x.html +19 -17
  565. data/vendor/local/share/doc/groonga/ja/html/news/1.0.x.html +20 -18
  566. data/vendor/local/share/doc/groonga/ja/html/news/1.1.x.html +19 -17
  567. data/vendor/local/share/doc/groonga/ja/html/news/1.2.x.html +34 -32
  568. data/vendor/local/share/doc/groonga/ja/html/news/1.3.x.html +29 -27
  569. data/vendor/local/share/doc/groonga/ja/html/news/2.x.html +102 -100
  570. data/vendor/local/share/doc/groonga/ja/html/news/3.x.html +66 -64
  571. data/vendor/local/share/doc/groonga/ja/html/news/4.x.html +91 -89
  572. data/vendor/local/share/doc/groonga/ja/html/news/senna.html +19 -17
  573. data/vendor/local/share/doc/groonga/ja/html/objects.inv +0 -0
  574. data/vendor/local/share/doc/groonga/ja/html/reference.html +111 -94
  575. data/vendor/local/share/doc/groonga/ja/html/reference/api.html +55 -52
  576. data/vendor/local/share/doc/groonga/ja/html/reference/api/global_configurations.html +51 -49
  577. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_cache.html +58 -56
  578. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_column.html +84 -82
  579. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_command_version.html +46 -44
  580. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_content_type.html +41 -39
  581. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_ctx.html +85 -83
  582. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_db.html +88 -50
  583. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_encoding.html +48 -46
  584. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_expr.html +78 -76
  585. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_geo.html +46 -44
  586. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_hook.html +48 -46
  587. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_ii.html +46 -44
  588. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_index_cursor.html +45 -43
  589. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_info.html +45 -43
  590. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_match_escalation.html +44 -42
  591. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_obj.html +93 -91
  592. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_proc.html +48 -46
  593. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_search.html +43 -41
  594. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_table.html +79 -77
  595. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_table_cursor.html +69 -67
  596. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_thread.html +286 -0
  597. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_type.html +45 -43
  598. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_user_data.html +38 -36
  599. data/vendor/local/share/doc/groonga/ja/html/reference/api/overview.html +48 -46
  600. data/vendor/local/share/doc/groonga/ja/html/reference/api/plugin.html +60 -58
  601. data/vendor/local/share/doc/groonga/ja/html/reference/cast.html +19 -17
  602. data/vendor/local/share/doc/groonga/ja/html/reference/column.html +21 -19
  603. data/vendor/local/share/doc/groonga/ja/html/reference/columns/index.html +23 -21
  604. data/vendor/local/share/doc/groonga/ja/html/reference/columns/pseudo.html +28 -26
  605. data/vendor/local/share/doc/groonga/ja/html/reference/columns/scalar.html +23 -21
  606. data/vendor/local/share/doc/groonga/ja/html/reference/columns/vector.html +61 -59
  607. data/vendor/local/share/doc/groonga/ja/html/reference/command.html +70 -61
  608. data/vendor/local/share/doc/groonga/ja/html/reference/command/command_version.html +23 -21
  609. data/vendor/local/share/doc/groonga/ja/html/reference/command/output_format.html +49 -47
  610. data/vendor/local/share/doc/groonga/ja/html/reference/command/request_id.html +28 -26
  611. data/vendor/local/share/doc/groonga/ja/html/reference/command/return_code.html +99 -97
  612. data/vendor/local/share/doc/groonga/ja/html/reference/commands/cache_limit.html +41 -39
  613. data/vendor/local/share/doc/groonga/ja/html/reference/commands/check.html +49 -47
  614. data/vendor/local/share/doc/groonga/ja/html/reference/commands/clearlock.html +33 -31
  615. data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_copy.html +781 -0
  616. data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_create.html +62 -60
  617. data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_list.html +88 -86
  618. data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_remove.html +46 -44
  619. data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_rename.html +66 -63
  620. data/vendor/local/share/doc/groonga/ja/html/reference/commands/database_unmap.html +229 -0
  621. data/vendor/local/share/doc/groonga/ja/html/reference/commands/define_selector.html +62 -60
  622. data/vendor/local/share/doc/groonga/ja/html/reference/commands/defrag.html +46 -44
  623. data/vendor/local/share/doc/groonga/ja/html/reference/commands/delete.html +58 -56
  624. data/vendor/local/share/doc/groonga/ja/html/reference/commands/dump.html +63 -61
  625. data/vendor/local/share/doc/groonga/ja/html/reference/commands/io_flush.html +266 -54
  626. data/vendor/local/share/doc/groonga/ja/html/reference/commands/load.html +59 -57
  627. data/vendor/local/share/doc/groonga/ja/html/reference/commands/lock_clear.html +53 -52
  628. data/vendor/local/share/doc/groonga/ja/html/reference/commands/log_level.html +48 -46
  629. data/vendor/local/share/doc/groonga/ja/html/reference/commands/log_put.html +48 -46
  630. data/vendor/local/share/doc/groonga/ja/html/reference/commands/log_reopen.html +48 -46
  631. data/vendor/local/share/doc/groonga/ja/html/reference/commands/logical_count.html +78 -75
  632. data/vendor/local/share/doc/groonga/ja/html/reference/commands/logical_parameters.html +276 -0
  633. data/vendor/local/share/doc/groonga/ja/html/reference/commands/logical_range_filter.html +158 -85
  634. data/vendor/local/share/doc/groonga/ja/html/reference/commands/logical_select.html +2008 -80
  635. data/vendor/local/share/doc/groonga/ja/html/reference/commands/logical_shard_list.html +285 -0
  636. data/vendor/local/share/doc/groonga/ja/html/reference/commands/logical_table_remove.html +71 -68
  637. data/vendor/local/share/doc/groonga/ja/html/reference/commands/normalize.html +82 -79
  638. data/vendor/local/share/doc/groonga/ja/html/reference/commands/normalizer_list.html +52 -50
  639. data/vendor/local/share/doc/groonga/ja/html/reference/commands/object_exist.html +220 -0
  640. data/vendor/local/share/doc/groonga/ja/html/reference/commands/plugin_register.html +53 -51
  641. data/vendor/local/share/doc/groonga/ja/html/reference/commands/plugin_unregister.html +51 -49
  642. data/vendor/local/share/doc/groonga/ja/html/reference/commands/quit.html +43 -41
  643. data/vendor/local/share/doc/groonga/ja/html/reference/commands/range_filter.html +43 -41
  644. data/vendor/local/share/doc/groonga/ja/html/reference/commands/register.html +52 -50
  645. data/vendor/local/share/doc/groonga/ja/html/reference/commands/request_cancel.html +68 -67
  646. data/vendor/local/share/doc/groonga/ja/html/reference/commands/ruby_eval.html +59 -57
  647. data/vendor/local/share/doc/groonga/ja/html/reference/commands/ruby_load.html +59 -57
  648. data/vendor/local/share/doc/groonga/ja/html/reference/commands/select.html +680 -448
  649. data/vendor/local/share/doc/groonga/ja/html/reference/commands/shutdown.html +43 -41
  650. data/vendor/local/share/doc/groonga/ja/html/reference/commands/status.html +48 -46
  651. data/vendor/local/share/doc/groonga/ja/html/reference/commands/suggest.html +84 -82
  652. data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_create.html +146 -126
  653. data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_list.html +55 -53
  654. data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_remove.html +46 -44
  655. data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_rename.html +322 -0
  656. data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_tokenize.html +73 -70
  657. data/vendor/local/share/doc/groonga/ja/html/reference/commands/thread_limit.html +229 -0
  658. data/vendor/local/share/doc/groonga/ja/html/reference/commands/tokenize.html +94 -91
  659. data/vendor/local/share/doc/groonga/ja/html/reference/commands/tokenizer_list.html +56 -51
  660. data/vendor/local/share/doc/groonga/ja/html/reference/commands/truncate.html +56 -55
  661. data/vendor/local/share/doc/groonga/ja/html/reference/executables.html +24 -22
  662. data/vendor/local/share/doc/groonga/ja/html/reference/executables/grndb.html +39 -37
  663. data/vendor/local/share/doc/groonga/ja/html/reference/executables/grnslap.html +28 -26
  664. data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-benchmark.html +33 -31
  665. data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-httpd.html +73 -72
  666. data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-server-http.html +29 -27
  667. data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-suggest-create-dataset.html +23 -21
  668. data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-suggest-httpd.html +48 -46
  669. data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-suggest-learner.html +40 -38
  670. data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga.html +84 -82
  671. data/vendor/local/share/doc/groonga/ja/html/reference/function.html +22 -20
  672. data/vendor/local/share/doc/groonga/ja/html/reference/functions/between.html +46 -44
  673. data/vendor/local/share/doc/groonga/ja/html/reference/functions/edit_distance.html +25 -23
  674. data/vendor/local/share/doc/groonga/ja/html/reference/functions/geo_distance.html +69 -67
  675. data/vendor/local/share/doc/groonga/ja/html/reference/functions/geo_in_circle.html +36 -34
  676. data/vendor/local/share/doc/groonga/ja/html/reference/functions/geo_in_rectangle.html +26 -24
  677. data/vendor/local/share/doc/groonga/ja/html/reference/functions/highlight_full.html +56 -54
  678. data/vendor/local/share/doc/groonga/ja/html/reference/functions/highlight_html.html +45 -43
  679. data/vendor/local/share/doc/groonga/ja/html/reference/functions/html_untag.html +34 -32
  680. data/vendor/local/share/doc/groonga/ja/html/reference/functions/in_values.html +35 -33
  681. data/vendor/local/share/doc/groonga/ja/html/reference/functions/now.html +23 -21
  682. data/vendor/local/share/doc/groonga/ja/html/reference/functions/query.html +48 -46
  683. data/vendor/local/share/doc/groonga/ja/html/reference/functions/rand.html +24 -22
  684. data/vendor/local/share/doc/groonga/ja/html/reference/functions/snippet_html.html +35 -33
  685. data/vendor/local/share/doc/groonga/ja/html/reference/functions/sub_filter.html +37 -35
  686. data/vendor/local/share/doc/groonga/ja/html/reference/functions/vector_size.html +33 -31
  687. data/vendor/local/share/doc/groonga/ja/html/reference/grn_expr.html +26 -24
  688. data/vendor/local/share/doc/groonga/ja/html/reference/grn_expr/query_syntax.html +143 -141
  689. data/vendor/local/share/doc/groonga/ja/html/reference/grn_expr/script_syntax.html +236 -234
  690. data/vendor/local/share/doc/groonga/ja/html/reference/indexing.html +34 -28
  691. data/vendor/local/share/doc/groonga/ja/html/reference/log.html +43 -41
  692. data/vendor/local/share/doc/groonga/ja/html/reference/normalizers.html +39 -37
  693. data/vendor/local/share/doc/groonga/ja/html/reference/operations.html +21 -19
  694. data/vendor/local/share/doc/groonga/ja/html/reference/operations/geolocation_search.html +23 -21
  695. data/vendor/local/share/doc/groonga/ja/html/reference/output.html +32 -30
  696. data/vendor/local/share/doc/groonga/ja/html/reference/query_expanders.html +21 -19
  697. data/vendor/local/share/doc/groonga/ja/html/reference/query_expanders/tsv.html +42 -39
  698. data/vendor/local/share/doc/groonga/ja/html/reference/regular_expression.html +91 -88
  699. data/vendor/local/share/doc/groonga/ja/html/reference/scorer.html +50 -40
  700. data/vendor/local/share/doc/groonga/ja/html/reference/scorers/scorer_tf_at_most.html +27 -25
  701. data/vendor/local/share/doc/groonga/ja/html/reference/scorers/scorer_tf_idf.html +41 -31
  702. data/vendor/local/share/doc/groonga/ja/html/reference/scoring_note.html +19 -17
  703. data/vendor/local/share/doc/groonga/ja/html/reference/sharding.html +223 -0
  704. data/vendor/local/share/doc/groonga/ja/html/reference/suggest.html +21 -19
  705. data/vendor/local/share/doc/groonga/ja/html/reference/suggest/completion.html +27 -25
  706. data/vendor/local/share/doc/groonga/ja/html/reference/suggest/correction.html +23 -21
  707. data/vendor/local/share/doc/groonga/ja/html/reference/suggest/introduction.html +23 -21
  708. data/vendor/local/share/doc/groonga/ja/html/reference/suggest/suggestion.html +23 -21
  709. data/vendor/local/share/doc/groonga/ja/html/reference/tables.html +46 -44
  710. data/vendor/local/share/doc/groonga/ja/html/reference/token_filters.html +38 -36
  711. data/vendor/local/share/doc/groonga/ja/html/reference/tokenizers.html +303 -243
  712. data/vendor/local/share/doc/groonga/ja/html/reference/tuning.html +62 -60
  713. data/vendor/local/share/doc/groonga/ja/html/reference/types.html +42 -40
  714. data/vendor/local/share/doc/groonga/ja/html/search.html +11 -11
  715. data/vendor/local/share/doc/groonga/ja/html/searchindex.js +1 -1
  716. data/vendor/local/share/doc/groonga/ja/html/server.html +19 -17
  717. data/vendor/local/share/doc/groonga/ja/html/server/gqtp.html +21 -19
  718. data/vendor/local/share/doc/groonga/ja/html/server/http.html +21 -19
  719. data/vendor/local/share/doc/groonga/ja/html/server/http/comparison.html +31 -29
  720. data/vendor/local/share/doc/groonga/ja/html/server/http/groonga-httpd.html +23 -21
  721. data/vendor/local/share/doc/groonga/ja/html/server/http/groonga.html +23 -21
  722. data/vendor/local/share/doc/groonga/ja/html/server/memcached.html +21 -19
  723. data/vendor/local/share/doc/groonga/ja/html/server/package.html +38 -36
  724. data/vendor/local/share/doc/groonga/ja/html/spec.html +23 -21
  725. data/vendor/local/share/doc/groonga/ja/html/spec/gqtp.html +128 -126
  726. data/vendor/local/share/doc/groonga/ja/html/spec/search.html +22 -20
  727. data/vendor/local/share/doc/groonga/ja/html/troubleshooting.html +19 -17
  728. data/vendor/local/share/doc/groonga/ja/html/troubleshooting/different_results_with_the_same_keyword.html +25 -23
  729. data/vendor/local/share/doc/groonga/ja/html/troubleshooting/mmap_cannot_allocate_memory.html +22 -20
  730. data/vendor/local/share/doc/groonga/ja/html/tutorial.html +20 -18
  731. data/vendor/local/share/doc/groonga/ja/html/tutorial/data.html +29 -23
  732. data/vendor/local/share/doc/groonga/ja/html/tutorial/drilldown.html +34 -32
  733. data/vendor/local/share/doc/groonga/ja/html/tutorial/index.html +22 -20
  734. data/vendor/local/share/doc/groonga/ja/html/tutorial/introduction.html +46 -39
  735. data/vendor/local/share/doc/groonga/ja/html/tutorial/lexicon.html +21 -19
  736. data/vendor/local/share/doc/groonga/ja/html/tutorial/match_columns.html +66 -64
  737. data/vendor/local/share/doc/groonga/ja/html/tutorial/micro_blog.html +52 -50
  738. data/vendor/local/share/doc/groonga/ja/html/tutorial/network.html +25 -23
  739. data/vendor/local/share/doc/groonga/ja/html/tutorial/patricia_trie.html +22 -20
  740. data/vendor/local/share/doc/groonga/ja/html/tutorial/query_expansion.html +25 -23
  741. data/vendor/local/share/doc/groonga/ja/html/tutorial/search.html +35 -33
  742. data/vendor/local/share/license/groonga/README.md +6 -0
  743. data/vendor/local/share/license/mruby/AUTHORS +1 -0
  744. data/vendor/local/share/license/mruby/MITL +1 -1
  745. data/vendor/local/share/license/mruby/README.md +6 -5
  746. data/vendor/local/share/license/msgpack/README +219 -0
  747. data/vendor/local/share/man/ja/man1/groonga.1 +23512 -15126
  748. data/vendor/local/share/man/man1/groonga.1 +26542 -17745
  749. metadata +77 -3
  750. data/vendor/local/share/license/msgpack/AUTHORS +0 -0
@@ -1,1415 +1,31 @@
1
- // Underscore.js 1.7.0
2
- // http://underscorejs.org
3
- // (c) 2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
4
- // Underscore may be freely distributed under the MIT license.
5
-
6
- (function() {
7
-
8
- // Baseline setup
9
- // --------------
10
-
11
- // Establish the root object, `window` in the browser, or `exports` on the server.
12
- var root = this;
13
-
14
- // Save the previous value of the `_` variable.
15
- var previousUnderscore = root._;
16
-
17
- // Save bytes in the minified (but not gzipped) version:
18
- var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype;
19
-
20
- // Create quick reference variables for speed access to core prototypes.
21
- var
22
- push = ArrayProto.push,
23
- slice = ArrayProto.slice,
24
- concat = ArrayProto.concat,
25
- toString = ObjProto.toString,
26
- hasOwnProperty = ObjProto.hasOwnProperty;
27
-
28
- // All **ECMAScript 5** native function implementations that we hope to use
29
- // are declared here.
30
- var
31
- nativeIsArray = Array.isArray,
32
- nativeKeys = Object.keys,
33
- nativeBind = FuncProto.bind;
34
-
35
- // Create a safe reference to the Underscore object for use below.
36
- var _ = function(obj) {
37
- if (obj instanceof _) return obj;
38
- if (!(this instanceof _)) return new _(obj);
39
- this._wrapped = obj;
40
- };
41
-
42
- // Export the Underscore object for **Node.js**, with
43
- // backwards-compatibility for the old `require()` API. If we're in
44
- // the browser, add `_` as a global object.
45
- if (typeof exports !== 'undefined') {
46
- if (typeof module !== 'undefined' && module.exports) {
47
- exports = module.exports = _;
48
- }
49
- exports._ = _;
50
- } else {
51
- root._ = _;
52
- }
53
-
54
- // Current version.
55
- _.VERSION = '1.7.0';
56
-
57
- // Internal function that returns an efficient (for current engines) version
58
- // of the passed-in callback, to be repeatedly applied in other Underscore
59
- // functions.
60
- var createCallback = function(func, context, argCount) {
61
- if (context === void 0) return func;
62
- switch (argCount == null ? 3 : argCount) {
63
- case 1: return function(value) {
64
- return func.call(context, value);
65
- };
66
- case 2: return function(value, other) {
67
- return func.call(context, value, other);
68
- };
69
- case 3: return function(value, index, collection) {
70
- return func.call(context, value, index, collection);
71
- };
72
- case 4: return function(accumulator, value, index, collection) {
73
- return func.call(context, accumulator, value, index, collection);
74
- };
75
- }
76
- return function() {
77
- return func.apply(context, arguments);
78
- };
79
- };
80
-
81
- // A mostly-internal function to generate callbacks that can be applied
82
- // to each element in a collection, returning the desired result — either
83
- // identity, an arbitrary callback, a property matcher, or a property accessor.
84
- _.iteratee = function(value, context, argCount) {
85
- if (value == null) return _.identity;
86
- if (_.isFunction(value)) return createCallback(value, context, argCount);
87
- if (_.isObject(value)) return _.matches(value);
88
- return _.property(value);
89
- };
90
-
91
- // Collection Functions
92
- // --------------------
93
-
94
- // The cornerstone, an `each` implementation, aka `forEach`.
95
- // Handles raw objects in addition to array-likes. Treats all
96
- // sparse array-likes as if they were dense.
97
- _.each = _.forEach = function(obj, iteratee, context) {
98
- if (obj == null) return obj;
99
- iteratee = createCallback(iteratee, context);
100
- var i, length = obj.length;
101
- if (length === +length) {
102
- for (i = 0; i < length; i++) {
103
- iteratee(obj[i], i, obj);
104
- }
105
- } else {
106
- var keys = _.keys(obj);
107
- for (i = 0, length = keys.length; i < length; i++) {
108
- iteratee(obj[keys[i]], keys[i], obj);
109
- }
110
- }
111
- return obj;
112
- };
113
-
114
- // Return the results of applying the iteratee to each element.
115
- _.map = _.collect = function(obj, iteratee, context) {
116
- if (obj == null) return [];
117
- iteratee = _.iteratee(iteratee, context);
118
- var keys = obj.length !== +obj.length && _.keys(obj),
119
- length = (keys || obj).length,
120
- results = Array(length),
121
- currentKey;
122
- for (var index = 0; index < length; index++) {
123
- currentKey = keys ? keys[index] : index;
124
- results[index] = iteratee(obj[currentKey], currentKey, obj);
125
- }
126
- return results;
127
- };
128
-
129
- var reduceError = 'Reduce of empty array with no initial value';
130
-
131
- // **Reduce** builds up a single result from a list of values, aka `inject`,
132
- // or `foldl`.
133
- _.reduce = _.foldl = _.inject = function(obj, iteratee, memo, context) {
134
- if (obj == null) obj = [];
135
- iteratee = createCallback(iteratee, context, 4);
136
- var keys = obj.length !== +obj.length && _.keys(obj),
137
- length = (keys || obj).length,
138
- index = 0, currentKey;
139
- if (arguments.length < 3) {
140
- if (!length) throw new TypeError(reduceError);
141
- memo = obj[keys ? keys[index++] : index++];
142
- }
143
- for (; index < length; index++) {
144
- currentKey = keys ? keys[index] : index;
145
- memo = iteratee(memo, obj[currentKey], currentKey, obj);
146
- }
147
- return memo;
148
- };
149
-
150
- // The right-associative version of reduce, also known as `foldr`.
151
- _.reduceRight = _.foldr = function(obj, iteratee, memo, context) {
152
- if (obj == null) obj = [];
153
- iteratee = createCallback(iteratee, context, 4);
154
- var keys = obj.length !== + obj.length && _.keys(obj),
155
- index = (keys || obj).length,
156
- currentKey;
157
- if (arguments.length < 3) {
158
- if (!index) throw new TypeError(reduceError);
159
- memo = obj[keys ? keys[--index] : --index];
160
- }
161
- while (index--) {
162
- currentKey = keys ? keys[index] : index;
163
- memo = iteratee(memo, obj[currentKey], currentKey, obj);
164
- }
165
- return memo;
166
- };
167
-
168
- // Return the first value which passes a truth test. Aliased as `detect`.
169
- _.find = _.detect = function(obj, predicate, context) {
170
- var result;
171
- predicate = _.iteratee(predicate, context);
172
- _.some(obj, function(value, index, list) {
173
- if (predicate(value, index, list)) {
174
- result = value;
175
- return true;
176
- }
177
- });
178
- return result;
179
- };
180
-
181
- // Return all the elements that pass a truth test.
182
- // Aliased as `select`.
183
- _.filter = _.select = function(obj, predicate, context) {
184
- var results = [];
185
- if (obj == null) return results;
186
- predicate = _.iteratee(predicate, context);
187
- _.each(obj, function(value, index, list) {
188
- if (predicate(value, index, list)) results.push(value);
189
- });
190
- return results;
191
- };
192
-
193
- // Return all the elements for which a truth test fails.
194
- _.reject = function(obj, predicate, context) {
195
- return _.filter(obj, _.negate(_.iteratee(predicate)), context);
196
- };
197
-
198
- // Determine whether all of the elements match a truth test.
199
- // Aliased as `all`.
200
- _.every = _.all = function(obj, predicate, context) {
201
- if (obj == null) return true;
202
- predicate = _.iteratee(predicate, context);
203
- var keys = obj.length !== +obj.length && _.keys(obj),
204
- length = (keys || obj).length,
205
- index, currentKey;
206
- for (index = 0; index < length; index++) {
207
- currentKey = keys ? keys[index] : index;
208
- if (!predicate(obj[currentKey], currentKey, obj)) return false;
209
- }
210
- return true;
211
- };
212
-
213
- // Determine if at least one element in the object matches a truth test.
214
- // Aliased as `any`.
215
- _.some = _.any = function(obj, predicate, context) {
216
- if (obj == null) return false;
217
- predicate = _.iteratee(predicate, context);
218
- var keys = obj.length !== +obj.length && _.keys(obj),
219
- length = (keys || obj).length,
220
- index, currentKey;
221
- for (index = 0; index < length; index++) {
222
- currentKey = keys ? keys[index] : index;
223
- if (predicate(obj[currentKey], currentKey, obj)) return true;
224
- }
225
- return false;
226
- };
227
-
228
- // Determine if the array or object contains a given value (using `===`).
229
- // Aliased as `include`.
230
- _.contains = _.include = function(obj, target) {
231
- if (obj == null) return false;
232
- if (obj.length !== +obj.length) obj = _.values(obj);
233
- return _.indexOf(obj, target) >= 0;
234
- };
235
-
236
- // Invoke a method (with arguments) on every item in a collection.
237
- _.invoke = function(obj, method) {
238
- var args = slice.call(arguments, 2);
239
- var isFunc = _.isFunction(method);
240
- return _.map(obj, function(value) {
241
- return (isFunc ? method : value[method]).apply(value, args);
242
- });
243
- };
244
-
245
- // Convenience version of a common use case of `map`: fetching a property.
246
- _.pluck = function(obj, key) {
247
- return _.map(obj, _.property(key));
248
- };
249
-
250
- // Convenience version of a common use case of `filter`: selecting only objects
251
- // containing specific `key:value` pairs.
252
- _.where = function(obj, attrs) {
253
- return _.filter(obj, _.matches(attrs));
254
- };
255
-
256
- // Convenience version of a common use case of `find`: getting the first object
257
- // containing specific `key:value` pairs.
258
- _.findWhere = function(obj, attrs) {
259
- return _.find(obj, _.matches(attrs));
260
- };
261
-
262
- // Return the maximum element (or element-based computation).
263
- _.max = function(obj, iteratee, context) {
264
- var result = -Infinity, lastComputed = -Infinity,
265
- value, computed;
266
- if (iteratee == null && obj != null) {
267
- obj = obj.length === +obj.length ? obj : _.values(obj);
268
- for (var i = 0, length = obj.length; i < length; i++) {
269
- value = obj[i];
270
- if (value > result) {
271
- result = value;
272
- }
273
- }
274
- } else {
275
- iteratee = _.iteratee(iteratee, context);
276
- _.each(obj, function(value, index, list) {
277
- computed = iteratee(value, index, list);
278
- if (computed > lastComputed || computed === -Infinity && result === -Infinity) {
279
- result = value;
280
- lastComputed = computed;
281
- }
282
- });
283
- }
284
- return result;
285
- };
286
-
287
- // Return the minimum element (or element-based computation).
288
- _.min = function(obj, iteratee, context) {
289
- var result = Infinity, lastComputed = Infinity,
290
- value, computed;
291
- if (iteratee == null && obj != null) {
292
- obj = obj.length === +obj.length ? obj : _.values(obj);
293
- for (var i = 0, length = obj.length; i < length; i++) {
294
- value = obj[i];
295
- if (value < result) {
296
- result = value;
297
- }
298
- }
299
- } else {
300
- iteratee = _.iteratee(iteratee, context);
301
- _.each(obj, function(value, index, list) {
302
- computed = iteratee(value, index, list);
303
- if (computed < lastComputed || computed === Infinity && result === Infinity) {
304
- result = value;
305
- lastComputed = computed;
306
- }
307
- });
308
- }
309
- return result;
310
- };
311
-
312
- // Shuffle a collection, using the modern version of the
313
- // [Fisher-Yates shuffle](http://en.wikipedia.org/wiki/Fisher–Yates_shuffle).
314
- _.shuffle = function(obj) {
315
- var set = obj && obj.length === +obj.length ? obj : _.values(obj);
316
- var length = set.length;
317
- var shuffled = Array(length);
318
- for (var index = 0, rand; index < length; index++) {
319
- rand = _.random(0, index);
320
- if (rand !== index) shuffled[index] = shuffled[rand];
321
- shuffled[rand] = set[index];
322
- }
323
- return shuffled;
324
- };
325
-
326
- // Sample **n** random values from a collection.
327
- // If **n** is not specified, returns a single random element.
328
- // The internal `guard` argument allows it to work with `map`.
329
- _.sample = function(obj, n, guard) {
330
- if (n == null || guard) {
331
- if (obj.length !== +obj.length) obj = _.values(obj);
332
- return obj[_.random(obj.length - 1)];
333
- }
334
- return _.shuffle(obj).slice(0, Math.max(0, n));
335
- };
336
-
337
- // Sort the object's values by a criterion produced by an iteratee.
338
- _.sortBy = function(obj, iteratee, context) {
339
- iteratee = _.iteratee(iteratee, context);
340
- return _.pluck(_.map(obj, function(value, index, list) {
341
- return {
342
- value: value,
343
- index: index,
344
- criteria: iteratee(value, index, list)
345
- };
346
- }).sort(function(left, right) {
347
- var a = left.criteria;
348
- var b = right.criteria;
349
- if (a !== b) {
350
- if (a > b || a === void 0) return 1;
351
- if (a < b || b === void 0) return -1;
352
- }
353
- return left.index - right.index;
354
- }), 'value');
355
- };
356
-
357
- // An internal function used for aggregate "group by" operations.
358
- var group = function(behavior) {
359
- return function(obj, iteratee, context) {
360
- var result = {};
361
- iteratee = _.iteratee(iteratee, context);
362
- _.each(obj, function(value, index) {
363
- var key = iteratee(value, index, obj);
364
- behavior(result, value, key);
365
- });
366
- return result;
367
- };
368
- };
369
-
370
- // Groups the object's values by a criterion. Pass either a string attribute
371
- // to group by, or a function that returns the criterion.
372
- _.groupBy = group(function(result, value, key) {
373
- if (_.has(result, key)) result[key].push(value); else result[key] = [value];
374
- });
375
-
376
- // Indexes the object's values by a criterion, similar to `groupBy`, but for
377
- // when you know that your index values will be unique.
378
- _.indexBy = group(function(result, value, key) {
379
- result[key] = value;
380
- });
381
-
382
- // Counts instances of an object that group by a certain criterion. Pass
383
- // either a string attribute to count by, or a function that returns the
384
- // criterion.
385
- _.countBy = group(function(result, value, key) {
386
- if (_.has(result, key)) result[key]++; else result[key] = 1;
387
- });
388
-
389
- // Use a comparator function to figure out the smallest index at which
390
- // an object should be inserted so as to maintain order. Uses binary search.
391
- _.sortedIndex = function(array, obj, iteratee, context) {
392
- iteratee = _.iteratee(iteratee, context, 1);
393
- var value = iteratee(obj);
394
- var low = 0, high = array.length;
395
- while (low < high) {
396
- var mid = low + high >>> 1;
397
- if (iteratee(array[mid]) < value) low = mid + 1; else high = mid;
398
- }
399
- return low;
400
- };
401
-
402
- // Safely create a real, live array from anything iterable.
403
- _.toArray = function(obj) {
404
- if (!obj) return [];
405
- if (_.isArray(obj)) return slice.call(obj);
406
- if (obj.length === +obj.length) return _.map(obj, _.identity);
407
- return _.values(obj);
408
- };
409
-
410
- // Return the number of elements in an object.
411
- _.size = function(obj) {
412
- if (obj == null) return 0;
413
- return obj.length === +obj.length ? obj.length : _.keys(obj).length;
414
- };
415
-
416
- // Split a collection into two arrays: one whose elements all satisfy the given
417
- // predicate, and one whose elements all do not satisfy the predicate.
418
- _.partition = function(obj, predicate, context) {
419
- predicate = _.iteratee(predicate, context);
420
- var pass = [], fail = [];
421
- _.each(obj, function(value, key, obj) {
422
- (predicate(value, key, obj) ? pass : fail).push(value);
423
- });
424
- return [pass, fail];
425
- };
426
-
427
- // Array Functions
428
- // ---------------
429
-
430
- // Get the first element of an array. Passing **n** will return the first N
431
- // values in the array. Aliased as `head` and `take`. The **guard** check
432
- // allows it to work with `_.map`.
433
- _.first = _.head = _.take = function(array, n, guard) {
434
- if (array == null) return void 0;
435
- if (n == null || guard) return array[0];
436
- if (n < 0) return [];
437
- return slice.call(array, 0, n);
438
- };
439
-
440
- // Returns everything but the last entry of the array. Especially useful on
441
- // the arguments object. Passing **n** will return all the values in
442
- // the array, excluding the last N. The **guard** check allows it to work with
443
- // `_.map`.
444
- _.initial = function(array, n, guard) {
445
- return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));
446
- };
447
-
448
- // Get the last element of an array. Passing **n** will return the last N
449
- // values in the array. The **guard** check allows it to work with `_.map`.
450
- _.last = function(array, n, guard) {
451
- if (array == null) return void 0;
452
- if (n == null || guard) return array[array.length - 1];
453
- return slice.call(array, Math.max(array.length - n, 0));
454
- };
455
-
456
- // Returns everything but the first entry of the array. Aliased as `tail` and `drop`.
457
- // Especially useful on the arguments object. Passing an **n** will return
458
- // the rest N values in the array. The **guard**
459
- // check allows it to work with `_.map`.
460
- _.rest = _.tail = _.drop = function(array, n, guard) {
461
- return slice.call(array, n == null || guard ? 1 : n);
462
- };
463
-
464
- // Trim out all falsy values from an array.
465
- _.compact = function(array) {
466
- return _.filter(array, _.identity);
467
- };
468
-
469
- // Internal implementation of a recursive `flatten` function.
470
- var flatten = function(input, shallow, strict, output) {
471
- if (shallow && _.every(input, _.isArray)) {
472
- return concat.apply(output, input);
473
- }
474
- for (var i = 0, length = input.length; i < length; i++) {
475
- var value = input[i];
476
- if (!_.isArray(value) && !_.isArguments(value)) {
477
- if (!strict) output.push(value);
478
- } else if (shallow) {
479
- push.apply(output, value);
480
- } else {
481
- flatten(value, shallow, strict, output);
482
- }
483
- }
484
- return output;
485
- };
486
-
487
- // Flatten out an array, either recursively (by default), or just one level.
488
- _.flatten = function(array, shallow) {
489
- return flatten(array, shallow, false, []);
490
- };
491
-
492
- // Return a version of the array that does not contain the specified value(s).
493
- _.without = function(array) {
494
- return _.difference(array, slice.call(arguments, 1));
495
- };
496
-
497
- // Produce a duplicate-free version of the array. If the array has already
498
- // been sorted, you have the option of using a faster algorithm.
499
- // Aliased as `unique`.
500
- _.uniq = _.unique = function(array, isSorted, iteratee, context) {
501
- if (array == null) return [];
502
- if (!_.isBoolean(isSorted)) {
503
- context = iteratee;
504
- iteratee = isSorted;
505
- isSorted = false;
506
- }
507
- if (iteratee != null) iteratee = _.iteratee(iteratee, context);
508
- var result = [];
509
- var seen = [];
510
- for (var i = 0, length = array.length; i < length; i++) {
511
- var value = array[i];
512
- if (isSorted) {
513
- if (!i || seen !== value) result.push(value);
514
- seen = value;
515
- } else if (iteratee) {
516
- var computed = iteratee(value, i, array);
517
- if (_.indexOf(seen, computed) < 0) {
518
- seen.push(computed);
519
- result.push(value);
520
- }
521
- } else if (_.indexOf(result, value) < 0) {
522
- result.push(value);
523
- }
524
- }
525
- return result;
526
- };
527
-
528
- // Produce an array that contains the union: each distinct element from all of
529
- // the passed-in arrays.
530
- _.union = function() {
531
- return _.uniq(flatten(arguments, true, true, []));
532
- };
533
-
534
- // Produce an array that contains every item shared between all the
535
- // passed-in arrays.
536
- _.intersection = function(array) {
537
- if (array == null) return [];
538
- var result = [];
539
- var argsLength = arguments.length;
540
- for (var i = 0, length = array.length; i < length; i++) {
541
- var item = array[i];
542
- if (_.contains(result, item)) continue;
543
- for (var j = 1; j < argsLength; j++) {
544
- if (!_.contains(arguments[j], item)) break;
545
- }
546
- if (j === argsLength) result.push(item);
547
- }
548
- return result;
549
- };
550
-
551
- // Take the difference between one array and a number of other arrays.
552
- // Only the elements present in just the first array will remain.
553
- _.difference = function(array) {
554
- var rest = flatten(slice.call(arguments, 1), true, true, []);
555
- return _.filter(array, function(value){
556
- return !_.contains(rest, value);
557
- });
558
- };
559
-
560
- // Zip together multiple lists into a single array -- elements that share
561
- // an index go together.
562
- _.zip = function(array) {
563
- if (array == null) return [];
564
- var length = _.max(arguments, 'length').length;
565
- var results = Array(length);
566
- for (var i = 0; i < length; i++) {
567
- results[i] = _.pluck(arguments, i);
568
- }
569
- return results;
570
- };
571
-
572
- // Converts lists into objects. Pass either a single array of `[key, value]`
573
- // pairs, or two parallel arrays of the same length -- one of keys, and one of
574
- // the corresponding values.
575
- _.object = function(list, values) {
576
- if (list == null) return {};
577
- var result = {};
578
- for (var i = 0, length = list.length; i < length; i++) {
579
- if (values) {
580
- result[list[i]] = values[i];
581
- } else {
582
- result[list[i][0]] = list[i][1];
583
- }
584
- }
585
- return result;
586
- };
587
-
588
- // Return the position of the first occurrence of an item in an array,
589
- // or -1 if the item is not included in the array.
590
- // If the array is large and already in sort order, pass `true`
591
- // for **isSorted** to use binary search.
592
- _.indexOf = function(array, item, isSorted) {
593
- if (array == null) return -1;
594
- var i = 0, length = array.length;
595
- if (isSorted) {
596
- if (typeof isSorted == 'number') {
597
- i = isSorted < 0 ? Math.max(0, length + isSorted) : isSorted;
598
- } else {
599
- i = _.sortedIndex(array, item);
600
- return array[i] === item ? i : -1;
601
- }
602
- }
603
- for (; i < length; i++) if (array[i] === item) return i;
604
- return -1;
605
- };
606
-
607
- _.lastIndexOf = function(array, item, from) {
608
- if (array == null) return -1;
609
- var idx = array.length;
610
- if (typeof from == 'number') {
611
- idx = from < 0 ? idx + from + 1 : Math.min(idx, from + 1);
612
- }
613
- while (--idx >= 0) if (array[idx] === item) return idx;
614
- return -1;
615
- };
616
-
617
- // Generate an integer Array containing an arithmetic progression. A port of
618
- // the native Python `range()` function. See
619
- // [the Python documentation](http://docs.python.org/library/functions.html#range).
620
- _.range = function(start, stop, step) {
621
- if (arguments.length <= 1) {
622
- stop = start || 0;
623
- start = 0;
624
- }
625
- step = step || 1;
626
-
627
- var length = Math.max(Math.ceil((stop - start) / step), 0);
628
- var range = Array(length);
629
-
630
- for (var idx = 0; idx < length; idx++, start += step) {
631
- range[idx] = start;
632
- }
633
-
634
- return range;
635
- };
636
-
637
- // Function (ahem) Functions
638
- // ------------------
639
-
640
- // Reusable constructor function for prototype setting.
641
- var Ctor = function(){};
642
-
643
- // Create a function bound to a given object (assigning `this`, and arguments,
644
- // optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if
645
- // available.
646
- _.bind = function(func, context) {
647
- var args, bound;
648
- if (nativeBind && func.bind === nativeBind) return nativeBind.apply(func, slice.call(arguments, 1));
649
- if (!_.isFunction(func)) throw new TypeError('Bind must be called on a function');
650
- args = slice.call(arguments, 2);
651
- bound = function() {
652
- if (!(this instanceof bound)) return func.apply(context, args.concat(slice.call(arguments)));
653
- Ctor.prototype = func.prototype;
654
- var self = new Ctor;
655
- Ctor.prototype = null;
656
- var result = func.apply(self, args.concat(slice.call(arguments)));
657
- if (_.isObject(result)) return result;
658
- return self;
659
- };
660
- return bound;
661
- };
662
-
663
- // Partially apply a function by creating a version that has had some of its
664
- // arguments pre-filled, without changing its dynamic `this` context. _ acts
665
- // as a placeholder, allowing any combination of arguments to be pre-filled.
666
- _.partial = function(func) {
667
- var boundArgs = slice.call(arguments, 1);
668
- return function() {
669
- var position = 0;
670
- var args = boundArgs.slice();
671
- for (var i = 0, length = args.length; i < length; i++) {
672
- if (args[i] === _) args[i] = arguments[position++];
673
- }
674
- while (position < arguments.length) args.push(arguments[position++]);
675
- return func.apply(this, args);
676
- };
677
- };
678
-
679
- // Bind a number of an object's methods to that object. Remaining arguments
680
- // are the method names to be bound. Useful for ensuring that all callbacks
681
- // defined on an object belong to it.
682
- _.bindAll = function(obj) {
683
- var i, length = arguments.length, key;
684
- if (length <= 1) throw new Error('bindAll must be passed function names');
685
- for (i = 1; i < length; i++) {
686
- key = arguments[i];
687
- obj[key] = _.bind(obj[key], obj);
688
- }
689
- return obj;
690
- };
691
-
692
- // Memoize an expensive function by storing its results.
693
- _.memoize = function(func, hasher) {
694
- var memoize = function(key) {
695
- var cache = memoize.cache;
696
- var address = hasher ? hasher.apply(this, arguments) : key;
697
- if (!_.has(cache, address)) cache[address] = func.apply(this, arguments);
698
- return cache[address];
699
- };
700
- memoize.cache = {};
701
- return memoize;
702
- };
703
-
704
- // Delays a function for the given number of milliseconds, and then calls
705
- // it with the arguments supplied.
706
- _.delay = function(func, wait) {
707
- var args = slice.call(arguments, 2);
708
- return setTimeout(function(){
709
- return func.apply(null, args);
710
- }, wait);
711
- };
712
-
713
- // Defers a function, scheduling it to run after the current call stack has
714
- // cleared.
715
- _.defer = function(func) {
716
- return _.delay.apply(_, [func, 1].concat(slice.call(arguments, 1)));
717
- };
718
-
719
- // Returns a function, that, when invoked, will only be triggered at most once
720
- // during a given window of time. Normally, the throttled function will run
721
- // as much as it can, without ever going more than once per `wait` duration;
722
- // but if you'd like to disable the execution on the leading edge, pass
723
- // `{leading: false}`. To disable execution on the trailing edge, ditto.
724
- _.throttle = function(func, wait, options) {
725
- var context, args, result;
726
- var timeout = null;
727
- var previous = 0;
728
- if (!options) options = {};
729
- var later = function() {
730
- previous = options.leading === false ? 0 : _.now();
731
- timeout = null;
732
- result = func.apply(context, args);
733
- if (!timeout) context = args = null;
734
- };
735
- return function() {
736
- var now = _.now();
737
- if (!previous && options.leading === false) previous = now;
738
- var remaining = wait - (now - previous);
739
- context = this;
740
- args = arguments;
741
- if (remaining <= 0 || remaining > wait) {
742
- clearTimeout(timeout);
743
- timeout = null;
744
- previous = now;
745
- result = func.apply(context, args);
746
- if (!timeout) context = args = null;
747
- } else if (!timeout && options.trailing !== false) {
748
- timeout = setTimeout(later, remaining);
749
- }
750
- return result;
751
- };
752
- };
753
-
754
- // Returns a function, that, as long as it continues to be invoked, will not
755
- // be triggered. The function will be called after it stops being called for
756
- // N milliseconds. If `immediate` is passed, trigger the function on the
757
- // leading edge, instead of the trailing.
758
- _.debounce = function(func, wait, immediate) {
759
- var timeout, args, context, timestamp, result;
760
-
761
- var later = function() {
762
- var last = _.now() - timestamp;
763
-
764
- if (last < wait && last > 0) {
765
- timeout = setTimeout(later, wait - last);
766
- } else {
767
- timeout = null;
768
- if (!immediate) {
769
- result = func.apply(context, args);
770
- if (!timeout) context = args = null;
771
- }
772
- }
773
- };
774
-
775
- return function() {
776
- context = this;
777
- args = arguments;
778
- timestamp = _.now();
779
- var callNow = immediate && !timeout;
780
- if (!timeout) timeout = setTimeout(later, wait);
781
- if (callNow) {
782
- result = func.apply(context, args);
783
- context = args = null;
784
- }
785
-
786
- return result;
787
- };
788
- };
789
-
790
- // Returns the first function passed as an argument to the second,
791
- // allowing you to adjust arguments, run code before and after, and
792
- // conditionally execute the original function.
793
- _.wrap = function(func, wrapper) {
794
- return _.partial(wrapper, func);
795
- };
796
-
797
- // Returns a negated version of the passed-in predicate.
798
- _.negate = function(predicate) {
799
- return function() {
800
- return !predicate.apply(this, arguments);
801
- };
802
- };
803
-
804
- // Returns a function that is the composition of a list of functions, each
805
- // consuming the return value of the function that follows.
806
- _.compose = function() {
807
- var args = arguments;
808
- var start = args.length - 1;
809
- return function() {
810
- var i = start;
811
- var result = args[start].apply(this, arguments);
812
- while (i--) result = args[i].call(this, result);
813
- return result;
814
- };
815
- };
816
-
817
- // Returns a function that will only be executed after being called N times.
818
- _.after = function(times, func) {
819
- return function() {
820
- if (--times < 1) {
821
- return func.apply(this, arguments);
822
- }
823
- };
824
- };
825
-
826
- // Returns a function that will only be executed before being called N times.
827
- _.before = function(times, func) {
828
- var memo;
829
- return function() {
830
- if (--times > 0) {
831
- memo = func.apply(this, arguments);
832
- } else {
833
- func = null;
834
- }
835
- return memo;
836
- };
837
- };
838
-
839
- // Returns a function that will be executed at most one time, no matter how
840
- // often you call it. Useful for lazy initialization.
841
- _.once = _.partial(_.before, 2);
842
-
843
- // Object Functions
844
- // ----------------
845
-
846
- // Retrieve the names of an object's properties.
847
- // Delegates to **ECMAScript 5**'s native `Object.keys`
848
- _.keys = function(obj) {
849
- if (!_.isObject(obj)) return [];
850
- if (nativeKeys) return nativeKeys(obj);
851
- var keys = [];
852
- for (var key in obj) if (_.has(obj, key)) keys.push(key);
853
- return keys;
854
- };
855
-
856
- // Retrieve the values of an object's properties.
857
- _.values = function(obj) {
858
- var keys = _.keys(obj);
859
- var length = keys.length;
860
- var values = Array(length);
861
- for (var i = 0; i < length; i++) {
862
- values[i] = obj[keys[i]];
863
- }
864
- return values;
865
- };
866
-
867
- // Convert an object into a list of `[key, value]` pairs.
868
- _.pairs = function(obj) {
869
- var keys = _.keys(obj);
870
- var length = keys.length;
871
- var pairs = Array(length);
872
- for (var i = 0; i < length; i++) {
873
- pairs[i] = [keys[i], obj[keys[i]]];
874
- }
875
- return pairs;
876
- };
877
-
878
- // Invert the keys and values of an object. The values must be serializable.
879
- _.invert = function(obj) {
880
- var result = {};
881
- var keys = _.keys(obj);
882
- for (var i = 0, length = keys.length; i < length; i++) {
883
- result[obj[keys[i]]] = keys[i];
884
- }
885
- return result;
886
- };
887
-
888
- // Return a sorted list of the function names available on the object.
889
- // Aliased as `methods`
890
- _.functions = _.methods = function(obj) {
891
- var names = [];
892
- for (var key in obj) {
893
- if (_.isFunction(obj[key])) names.push(key);
894
- }
895
- return names.sort();
896
- };
897
-
898
- // Extend a given object with all the properties in passed-in object(s).
899
- _.extend = function(obj) {
900
- if (!_.isObject(obj)) return obj;
901
- var source, prop;
902
- for (var i = 1, length = arguments.length; i < length; i++) {
903
- source = arguments[i];
904
- for (prop in source) {
905
- if (hasOwnProperty.call(source, prop)) {
906
- obj[prop] = source[prop];
907
- }
908
- }
909
- }
910
- return obj;
911
- };
912
-
913
- // Return a copy of the object only containing the whitelisted properties.
914
- _.pick = function(obj, iteratee, context) {
915
- var result = {}, key;
916
- if (obj == null) return result;
917
- if (_.isFunction(iteratee)) {
918
- iteratee = createCallback(iteratee, context);
919
- for (key in obj) {
920
- var value = obj[key];
921
- if (iteratee(value, key, obj)) result[key] = value;
922
- }
923
- } else {
924
- var keys = concat.apply([], slice.call(arguments, 1));
925
- obj = new Object(obj);
926
- for (var i = 0, length = keys.length; i < length; i++) {
927
- key = keys[i];
928
- if (key in obj) result[key] = obj[key];
929
- }
930
- }
931
- return result;
932
- };
933
-
934
- // Return a copy of the object without the blacklisted properties.
935
- _.omit = function(obj, iteratee, context) {
936
- if (_.isFunction(iteratee)) {
937
- iteratee = _.negate(iteratee);
938
- } else {
939
- var keys = _.map(concat.apply([], slice.call(arguments, 1)), String);
940
- iteratee = function(value, key) {
941
- return !_.contains(keys, key);
942
- };
943
- }
944
- return _.pick(obj, iteratee, context);
945
- };
946
-
947
- // Fill in a given object with default properties.
948
- _.defaults = function(obj) {
949
- if (!_.isObject(obj)) return obj;
950
- for (var i = 1, length = arguments.length; i < length; i++) {
951
- var source = arguments[i];
952
- for (var prop in source) {
953
- if (obj[prop] === void 0) obj[prop] = source[prop];
954
- }
955
- }
956
- return obj;
957
- };
958
-
959
- // Create a (shallow-cloned) duplicate of an object.
960
- _.clone = function(obj) {
961
- if (!_.isObject(obj)) return obj;
962
- return _.isArray(obj) ? obj.slice() : _.extend({}, obj);
963
- };
964
-
965
- // Invokes interceptor with the obj, and then returns obj.
966
- // The primary purpose of this method is to "tap into" a method chain, in
967
- // order to perform operations on intermediate results within the chain.
968
- _.tap = function(obj, interceptor) {
969
- interceptor(obj);
970
- return obj;
971
- };
972
-
973
- // Internal recursive comparison function for `isEqual`.
974
- var eq = function(a, b, aStack, bStack) {
975
- // Identical objects are equal. `0 === -0`, but they aren't identical.
976
- // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal).
977
- if (a === b) return a !== 0 || 1 / a === 1 / b;
978
- // A strict comparison is necessary because `null == undefined`.
979
- if (a == null || b == null) return a === b;
980
- // Unwrap any wrapped objects.
981
- if (a instanceof _) a = a._wrapped;
982
- if (b instanceof _) b = b._wrapped;
983
- // Compare `[[Class]]` names.
984
- var className = toString.call(a);
985
- if (className !== toString.call(b)) return false;
986
- switch (className) {
987
- // Strings, numbers, regular expressions, dates, and booleans are compared by value.
988
- case '[object RegExp]':
989
- // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')
990
- case '[object String]':
991
- // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is
992
- // equivalent to `new String("5")`.
993
- return '' + a === '' + b;
994
- case '[object Number]':
995
- // `NaN`s are equivalent, but non-reflexive.
996
- // Object(NaN) is equivalent to NaN
997
- if (+a !== +a) return +b !== +b;
998
- // An `egal` comparison is performed for other numeric values.
999
- return +a === 0 ? 1 / +a === 1 / b : +a === +b;
1000
- case '[object Date]':
1001
- case '[object Boolean]':
1002
- // Coerce dates and booleans to numeric primitive values. Dates are compared by their
1003
- // millisecond representations. Note that invalid dates with millisecond representations
1004
- // of `NaN` are not equivalent.
1005
- return +a === +b;
1006
- }
1007
- if (typeof a != 'object' || typeof b != 'object') return false;
1008
- // Assume equality for cyclic structures. The algorithm for detecting cyclic
1009
- // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.
1010
- var length = aStack.length;
1011
- while (length--) {
1012
- // Linear search. Performance is inversely proportional to the number of
1013
- // unique nested structures.
1014
- if (aStack[length] === a) return bStack[length] === b;
1015
- }
1016
- // Objects with different constructors are not equivalent, but `Object`s
1017
- // from different frames are.
1018
- var aCtor = a.constructor, bCtor = b.constructor;
1019
- if (
1020
- aCtor !== bCtor &&
1021
- // Handle Object.create(x) cases
1022
- 'constructor' in a && 'constructor' in b &&
1023
- !(_.isFunction(aCtor) && aCtor instanceof aCtor &&
1024
- _.isFunction(bCtor) && bCtor instanceof bCtor)
1025
- ) {
1026
- return false;
1027
- }
1028
- // Add the first object to the stack of traversed objects.
1029
- aStack.push(a);
1030
- bStack.push(b);
1031
- var size, result;
1032
- // Recursively compare objects and arrays.
1033
- if (className === '[object Array]') {
1034
- // Compare array lengths to determine if a deep comparison is necessary.
1035
- size = a.length;
1036
- result = size === b.length;
1037
- if (result) {
1038
- // Deep compare the contents, ignoring non-numeric properties.
1039
- while (size--) {
1040
- if (!(result = eq(a[size], b[size], aStack, bStack))) break;
1041
- }
1042
- }
1043
- } else {
1044
- // Deep compare objects.
1045
- var keys = _.keys(a), key;
1046
- size = keys.length;
1047
- // Ensure that both objects contain the same number of properties before comparing deep equality.
1048
- result = _.keys(b).length === size;
1049
- if (result) {
1050
- while (size--) {
1051
- // Deep compare each member
1052
- key = keys[size];
1053
- if (!(result = _.has(b, key) && eq(a[key], b[key], aStack, bStack))) break;
1054
- }
1055
- }
1056
- }
1057
- // Remove the first object from the stack of traversed objects.
1058
- aStack.pop();
1059
- bStack.pop();
1060
- return result;
1061
- };
1062
-
1063
- // Perform a deep comparison to check if two objects are equal.
1064
- _.isEqual = function(a, b) {
1065
- return eq(a, b, [], []);
1066
- };
1067
-
1068
- // Is a given array, string, or object empty?
1069
- // An "empty" object has no enumerable own-properties.
1070
- _.isEmpty = function(obj) {
1071
- if (obj == null) return true;
1072
- if (_.isArray(obj) || _.isString(obj) || _.isArguments(obj)) return obj.length === 0;
1073
- for (var key in obj) if (_.has(obj, key)) return false;
1074
- return true;
1075
- };
1076
-
1077
- // Is a given value a DOM element?
1078
- _.isElement = function(obj) {
1079
- return !!(obj && obj.nodeType === 1);
1080
- };
1081
-
1082
- // Is a given value an array?
1083
- // Delegates to ECMA5's native Array.isArray
1084
- _.isArray = nativeIsArray || function(obj) {
1085
- return toString.call(obj) === '[object Array]';
1086
- };
1087
-
1088
- // Is a given variable an object?
1089
- _.isObject = function(obj) {
1090
- var type = typeof obj;
1091
- return type === 'function' || type === 'object' && !!obj;
1092
- };
1093
-
1094
- // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp.
1095
- _.each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp'], function(name) {
1096
- _['is' + name] = function(obj) {
1097
- return toString.call(obj) === '[object ' + name + ']';
1098
- };
1099
- });
1100
-
1101
- // Define a fallback version of the method in browsers (ahem, IE), where
1102
- // there isn't any inspectable "Arguments" type.
1103
- if (!_.isArguments(arguments)) {
1104
- _.isArguments = function(obj) {
1105
- return _.has(obj, 'callee');
1106
- };
1107
- }
1108
-
1109
- // Optimize `isFunction` if appropriate. Work around an IE 11 bug.
1110
- if (typeof /./ !== 'function') {
1111
- _.isFunction = function(obj) {
1112
- return typeof obj == 'function' || false;
1113
- };
1114
- }
1115
-
1116
- // Is a given object a finite number?
1117
- _.isFinite = function(obj) {
1118
- return isFinite(obj) && !isNaN(parseFloat(obj));
1119
- };
1120
-
1121
- // Is the given value `NaN`? (NaN is the only number which does not equal itself).
1122
- _.isNaN = function(obj) {
1123
- return _.isNumber(obj) && obj !== +obj;
1124
- };
1125
-
1126
- // Is a given value a boolean?
1127
- _.isBoolean = function(obj) {
1128
- return obj === true || obj === false || toString.call(obj) === '[object Boolean]';
1129
- };
1130
-
1131
- // Is a given value equal to null?
1132
- _.isNull = function(obj) {
1133
- return obj === null;
1134
- };
1135
-
1136
- // Is a given variable undefined?
1137
- _.isUndefined = function(obj) {
1138
- return obj === void 0;
1139
- };
1140
-
1141
- // Shortcut function for checking if an object has a given property directly
1142
- // on itself (in other words, not on a prototype).
1143
- _.has = function(obj, key) {
1144
- return obj != null && hasOwnProperty.call(obj, key);
1145
- };
1146
-
1147
- // Utility Functions
1148
- // -----------------
1149
-
1150
- // Run Underscore.js in *noConflict* mode, returning the `_` variable to its
1151
- // previous owner. Returns a reference to the Underscore object.
1152
- _.noConflict = function() {
1153
- root._ = previousUnderscore;
1154
- return this;
1155
- };
1156
-
1157
- // Keep the identity function around for default iteratees.
1158
- _.identity = function(value) {
1159
- return value;
1160
- };
1161
-
1162
- _.constant = function(value) {
1163
- return function() {
1164
- return value;
1165
- };
1166
- };
1167
-
1168
- _.noop = function(){};
1169
-
1170
- _.property = function(key) {
1171
- return function(obj) {
1172
- return obj[key];
1173
- };
1174
- };
1175
-
1176
- // Returns a predicate for checking whether an object has a given set of `key:value` pairs.
1177
- _.matches = function(attrs) {
1178
- var pairs = _.pairs(attrs), length = pairs.length;
1179
- return function(obj) {
1180
- if (obj == null) return !length;
1181
- obj = new Object(obj);
1182
- for (var i = 0; i < length; i++) {
1183
- var pair = pairs[i], key = pair[0];
1184
- if (pair[1] !== obj[key] || !(key in obj)) return false;
1185
- }
1186
- return true;
1187
- };
1188
- };
1189
-
1190
- // Run a function **n** times.
1191
- _.times = function(n, iteratee, context) {
1192
- var accum = Array(Math.max(0, n));
1193
- iteratee = createCallback(iteratee, context, 1);
1194
- for (var i = 0; i < n; i++) accum[i] = iteratee(i);
1195
- return accum;
1196
- };
1197
-
1198
- // Return a random integer between min and max (inclusive).
1199
- _.random = function(min, max) {
1200
- if (max == null) {
1201
- max = min;
1202
- min = 0;
1203
- }
1204
- return min + Math.floor(Math.random() * (max - min + 1));
1205
- };
1206
-
1207
- // A (possibly faster) way to get the current timestamp as an integer.
1208
- _.now = Date.now || function() {
1209
- return new Date().getTime();
1210
- };
1211
-
1212
- // List of HTML entities for escaping.
1213
- var escapeMap = {
1214
- '&': '&amp;',
1215
- '<': '&lt;',
1216
- '>': '&gt;',
1217
- '"': '&quot;',
1218
- "'": '&#x27;',
1219
- '`': '&#x60;'
1220
- };
1221
- var unescapeMap = _.invert(escapeMap);
1222
-
1223
- // Functions for escaping and unescaping strings to/from HTML interpolation.
1224
- var createEscaper = function(map) {
1225
- var escaper = function(match) {
1226
- return map[match];
1227
- };
1228
- // Regexes for identifying a key that needs to be escaped
1229
- var source = '(?:' + _.keys(map).join('|') + ')';
1230
- var testRegexp = RegExp(source);
1231
- var replaceRegexp = RegExp(source, 'g');
1232
- return function(string) {
1233
- string = string == null ? '' : '' + string;
1234
- return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;
1235
- };
1236
- };
1237
- _.escape = createEscaper(escapeMap);
1238
- _.unescape = createEscaper(unescapeMap);
1239
-
1240
- // If the value of the named `property` is a function then invoke it with the
1241
- // `object` as context; otherwise, return it.
1242
- _.result = function(object, property) {
1243
- if (object == null) return void 0;
1244
- var value = object[property];
1245
- return _.isFunction(value) ? object[property]() : value;
1246
- };
1247
-
1248
- // Generate a unique integer id (unique within the entire client session).
1249
- // Useful for temporary DOM ids.
1250
- var idCounter = 0;
1251
- _.uniqueId = function(prefix) {
1252
- var id = ++idCounter + '';
1253
- return prefix ? prefix + id : id;
1254
- };
1255
-
1256
- // By default, Underscore uses ERB-style template delimiters, change the
1257
- // following template settings to use alternative delimiters.
1258
- _.templateSettings = {
1259
- evaluate : /<%([\s\S]+?)%>/g,
1260
- interpolate : /<%=([\s\S]+?)%>/g,
1261
- escape : /<%-([\s\S]+?)%>/g
1262
- };
1263
-
1264
- // When customizing `templateSettings`, if you don't want to define an
1265
- // interpolation, evaluation or escaping regex, we need one that is
1266
- // guaranteed not to match.
1267
- var noMatch = /(.)^/;
1268
-
1269
- // Certain characters need to be escaped so that they can be put into a
1270
- // string literal.
1271
- var escapes = {
1272
- "'": "'",
1273
- '\\': '\\',
1274
- '\r': 'r',
1275
- '\n': 'n',
1276
- '\u2028': 'u2028',
1277
- '\u2029': 'u2029'
1278
- };
1279
-
1280
- var escaper = /\\|'|\r|\n|\u2028|\u2029/g;
1281
-
1282
- var escapeChar = function(match) {
1283
- return '\\' + escapes[match];
1284
- };
1285
-
1286
- // JavaScript micro-templating, similar to John Resig's implementation.
1287
- // Underscore templating handles arbitrary delimiters, preserves whitespace,
1288
- // and correctly escapes quotes within interpolated code.
1289
- // NB: `oldSettings` only exists for backwards compatibility.
1290
- _.template = function(text, settings, oldSettings) {
1291
- if (!settings && oldSettings) settings = oldSettings;
1292
- settings = _.defaults({}, settings, _.templateSettings);
1293
-
1294
- // Combine delimiters into one regular expression via alternation.
1295
- var matcher = RegExp([
1296
- (settings.escape || noMatch).source,
1297
- (settings.interpolate || noMatch).source,
1298
- (settings.evaluate || noMatch).source
1299
- ].join('|') + '|$', 'g');
1300
-
1301
- // Compile the template source, escaping string literals appropriately.
1302
- var index = 0;
1303
- var source = "__p+='";
1304
- text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {
1305
- source += text.slice(index, offset).replace(escaper, escapeChar);
1306
- index = offset + match.length;
1307
-
1308
- if (escape) {
1309
- source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'";
1310
- } else if (interpolate) {
1311
- source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'";
1312
- } else if (evaluate) {
1313
- source += "';\n" + evaluate + "\n__p+='";
1314
- }
1315
-
1316
- // Adobe VMs need the match returned to produce the correct offest.
1317
- return match;
1318
- });
1319
- source += "';\n";
1320
-
1321
- // If a variable is not specified, place data values in local scope.
1322
- if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n';
1323
-
1324
- source = "var __t,__p='',__j=Array.prototype.join," +
1325
- "print=function(){__p+=__j.call(arguments,'');};\n" +
1326
- source + 'return __p;\n';
1327
-
1328
- try {
1329
- var render = new Function(settings.variable || 'obj', '_', source);
1330
- } catch (e) {
1331
- e.source = source;
1332
- throw e;
1333
- }
1334
-
1335
- var template = function(data) {
1336
- return render.call(this, data, _);
1337
- };
1338
-
1339
- // Provide the compiled source as a convenience for precompilation.
1340
- var argument = settings.variable || 'obj';
1341
- template.source = 'function(' + argument + '){\n' + source + '}';
1342
-
1343
- return template;
1344
- };
1345
-
1346
- // Add a "chain" function. Start chaining a wrapped Underscore object.
1347
- _.chain = function(obj) {
1348
- var instance = _(obj);
1349
- instance._chain = true;
1350
- return instance;
1351
- };
1352
-
1353
- // OOP
1354
- // ---------------
1355
- // If Underscore is called as a function, it returns a wrapped object that
1356
- // can be used OO-style. This wrapper holds altered versions of all the
1357
- // underscore functions. Wrapped objects may be chained.
1358
-
1359
- // Helper function to continue chaining intermediate results.
1360
- var result = function(obj) {
1361
- return this._chain ? _(obj).chain() : obj;
1362
- };
1363
-
1364
- // Add your own custom functions to the Underscore object.
1365
- _.mixin = function(obj) {
1366
- _.each(_.functions(obj), function(name) {
1367
- var func = _[name] = obj[name];
1368
- _.prototype[name] = function() {
1369
- var args = [this._wrapped];
1370
- push.apply(args, arguments);
1371
- return result.call(this, func.apply(_, args));
1372
- };
1373
- });
1374
- };
1375
-
1376
- // Add all of the Underscore functions to the wrapper object.
1377
- _.mixin(_);
1378
-
1379
- // Add all mutator Array functions to the wrapper.
1380
- _.each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
1381
- var method = ArrayProto[name];
1382
- _.prototype[name] = function() {
1383
- var obj = this._wrapped;
1384
- method.apply(obj, arguments);
1385
- if ((name === 'shift' || name === 'splice') && obj.length === 0) delete obj[0];
1386
- return result.call(this, obj);
1387
- };
1388
- });
1389
-
1390
- // Add all accessor Array functions to the wrapper.
1391
- _.each(['concat', 'join', 'slice'], function(name) {
1392
- var method = ArrayProto[name];
1393
- _.prototype[name] = function() {
1394
- return result.call(this, method.apply(this._wrapped, arguments));
1395
- };
1396
- });
1397
-
1398
- // Extracts the result from a wrapped and chained object.
1399
- _.prototype.value = function() {
1400
- return this._wrapped;
1401
- };
1402
-
1403
- // AMD registration happens at the end for compatibility with AMD loaders
1404
- // that may not enforce next-turn semantics on modules. Even though general
1405
- // practice for AMD registration is to be anonymous, underscore registers
1406
- // as a named module because, like jQuery, it is a base library that is
1407
- // popular enough to be bundled in a third party lib, but not be part of
1408
- // an AMD load request. Those cases could generate an error when an
1409
- // anonymous define() is called outside of a loader request.
1410
- if (typeof define === 'function' && define.amd) {
1411
- define('underscore', [], function() {
1412
- return _;
1413
- });
1414
- }
1415
- }.call(this));
1
+ // Underscore.js 1.3.1
2
+ // (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
3
+ // Underscore is freely distributable under the MIT license.
4
+ // Portions of Underscore are inspired or borrowed from Prototype,
5
+ // Oliver Steele's Functional, and John Resig's Micro-Templating.
6
+ // For all details and documentation:
7
+ // http://documentcloud.github.com/underscore
8
+ (function(){function q(a,c,d){if(a===c)return a!==0||1/a==1/c;if(a==null||c==null)return a===c;if(a._chain)a=a._wrapped;if(c._chain)c=c._wrapped;if(a.isEqual&&b.isFunction(a.isEqual))return a.isEqual(c);if(c.isEqual&&b.isFunction(c.isEqual))return c.isEqual(a);var e=l.call(a);if(e!=l.call(c))return false;switch(e){case "[object String]":return a==String(c);case "[object Number]":return a!=+a?c!=+c:a==0?1/a==1/c:a==+c;case "[object Date]":case "[object Boolean]":return+a==+c;case "[object RegExp]":return a.source==
9
+ c.source&&a.global==c.global&&a.multiline==c.multiline&&a.ignoreCase==c.ignoreCase}if(typeof a!="object"||typeof c!="object")return false;for(var f=d.length;f--;)if(d[f]==a)return true;d.push(a);var f=0,g=true;if(e=="[object Array]"){if(f=a.length,g=f==c.length)for(;f--;)if(!(g=f in a==f in c&&q(a[f],c[f],d)))break}else{if("constructor"in a!="constructor"in c||a.constructor!=c.constructor)return false;for(var h in a)if(b.has(a,h)&&(f++,!(g=b.has(c,h)&&q(a[h],c[h],d))))break;if(g){for(h in c)if(b.has(c,
10
+ h)&&!f--)break;g=!f}}d.pop();return g}var r=this,G=r._,n={},k=Array.prototype,o=Object.prototype,i=k.slice,H=k.unshift,l=o.toString,I=o.hasOwnProperty,w=k.forEach,x=k.map,y=k.reduce,z=k.reduceRight,A=k.filter,B=k.every,C=k.some,p=k.indexOf,D=k.lastIndexOf,o=Array.isArray,J=Object.keys,s=Function.prototype.bind,b=function(a){return new m(a)};if(typeof exports!=="undefined"){if(typeof module!=="undefined"&&module.exports)exports=module.exports=b;exports._=b}else r._=b;b.VERSION="1.3.1";var j=b.each=
11
+ b.forEach=function(a,c,d){if(a!=null)if(w&&a.forEach===w)a.forEach(c,d);else if(a.length===+a.length)for(var e=0,f=a.length;e<f;e++){if(e in a&&c.call(d,a[e],e,a)===n)break}else for(e in a)if(b.has(a,e)&&c.call(d,a[e],e,a)===n)break};b.map=b.collect=function(a,c,b){var e=[];if(a==null)return e;if(x&&a.map===x)return a.map(c,b);j(a,function(a,g,h){e[e.length]=c.call(b,a,g,h)});if(a.length===+a.length)e.length=a.length;return e};b.reduce=b.foldl=b.inject=function(a,c,d,e){var f=arguments.length>2;a==
12
+ null&&(a=[]);if(y&&a.reduce===y)return e&&(c=b.bind(c,e)),f?a.reduce(c,d):a.reduce(c);j(a,function(a,b,i){f?d=c.call(e,d,a,b,i):(d=a,f=true)});if(!f)throw new TypeError("Reduce of empty array with no initial value");return d};b.reduceRight=b.foldr=function(a,c,d,e){var f=arguments.length>2;a==null&&(a=[]);if(z&&a.reduceRight===z)return e&&(c=b.bind(c,e)),f?a.reduceRight(c,d):a.reduceRight(c);var g=b.toArray(a).reverse();e&&!f&&(c=b.bind(c,e));return f?b.reduce(g,c,d,e):b.reduce(g,c)};b.find=b.detect=
13
+ function(a,c,b){var e;E(a,function(a,g,h){if(c.call(b,a,g,h))return e=a,true});return e};b.filter=b.select=function(a,c,b){var e=[];if(a==null)return e;if(A&&a.filter===A)return a.filter(c,b);j(a,function(a,g,h){c.call(b,a,g,h)&&(e[e.length]=a)});return e};b.reject=function(a,c,b){var e=[];if(a==null)return e;j(a,function(a,g,h){c.call(b,a,g,h)||(e[e.length]=a)});return e};b.every=b.all=function(a,c,b){var e=true;if(a==null)return e;if(B&&a.every===B)return a.every(c,b);j(a,function(a,g,h){if(!(e=
14
+ e&&c.call(b,a,g,h)))return n});return e};var E=b.some=b.any=function(a,c,d){c||(c=b.identity);var e=false;if(a==null)return e;if(C&&a.some===C)return a.some(c,d);j(a,function(a,b,h){if(e||(e=c.call(d,a,b,h)))return n});return!!e};b.include=b.contains=function(a,c){var b=false;if(a==null)return b;return p&&a.indexOf===p?a.indexOf(c)!=-1:b=E(a,function(a){return a===c})};b.invoke=function(a,c){var d=i.call(arguments,2);return b.map(a,function(a){return(b.isFunction(c)?c||a:a[c]).apply(a,d)})};b.pluck=
15
+ function(a,c){return b.map(a,function(a){return a[c]})};b.max=function(a,c,d){if(!c&&b.isArray(a))return Math.max.apply(Math,a);if(!c&&b.isEmpty(a))return-Infinity;var e={computed:-Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;b>=e.computed&&(e={value:a,computed:b})});return e.value};b.min=function(a,c,d){if(!c&&b.isArray(a))return Math.min.apply(Math,a);if(!c&&b.isEmpty(a))return Infinity;var e={computed:Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;b<e.computed&&(e={value:a,computed:b})});
16
+ return e.value};b.shuffle=function(a){var b=[],d;j(a,function(a,f){f==0?b[0]=a:(d=Math.floor(Math.random()*(f+1)),b[f]=b[d],b[d]=a)});return b};b.sortBy=function(a,c,d){return b.pluck(b.map(a,function(a,b,g){return{value:a,criteria:c.call(d,a,b,g)}}).sort(function(a,b){var c=a.criteria,d=b.criteria;return c<d?-1:c>d?1:0}),"value")};b.groupBy=function(a,c){var d={},e=b.isFunction(c)?c:function(a){return a[c]};j(a,function(a,b){var c=e(a,b);(d[c]||(d[c]=[])).push(a)});return d};b.sortedIndex=function(a,
17
+ c,d){d||(d=b.identity);for(var e=0,f=a.length;e<f;){var g=e+f>>1;d(a[g])<d(c)?e=g+1:f=g}return e};b.toArray=function(a){return!a?[]:a.toArray?a.toArray():b.isArray(a)?i.call(a):b.isArguments(a)?i.call(a):b.values(a)};b.size=function(a){return b.toArray(a).length};b.first=b.head=function(a,b,d){return b!=null&&!d?i.call(a,0,b):a[0]};b.initial=function(a,b,d){return i.call(a,0,a.length-(b==null||d?1:b))};b.last=function(a,b,d){return b!=null&&!d?i.call(a,Math.max(a.length-b,0)):a[a.length-1]};b.rest=
18
+ b.tail=function(a,b,d){return i.call(a,b==null||d?1:b)};b.compact=function(a){return b.filter(a,function(a){return!!a})};b.flatten=function(a,c){return b.reduce(a,function(a,e){if(b.isArray(e))return a.concat(c?e:b.flatten(e));a[a.length]=e;return a},[])};b.without=function(a){return b.difference(a,i.call(arguments,1))};b.uniq=b.unique=function(a,c,d){var d=d?b.map(a,d):a,e=[];b.reduce(d,function(d,g,h){if(0==h||(c===true?b.last(d)!=g:!b.include(d,g)))d[d.length]=g,e[e.length]=a[h];return d},[]);
19
+ return e};b.union=function(){return b.uniq(b.flatten(arguments,true))};b.intersection=b.intersect=function(a){var c=i.call(arguments,1);return b.filter(b.uniq(a),function(a){return b.every(c,function(c){return b.indexOf(c,a)>=0})})};b.difference=function(a){var c=b.flatten(i.call(arguments,1));return b.filter(a,function(a){return!b.include(c,a)})};b.zip=function(){for(var a=i.call(arguments),c=b.max(b.pluck(a,"length")),d=Array(c),e=0;e<c;e++)d[e]=b.pluck(a,""+e);return d};b.indexOf=function(a,c,
20
+ d){if(a==null)return-1;var e;if(d)return d=b.sortedIndex(a,c),a[d]===c?d:-1;if(p&&a.indexOf===p)return a.indexOf(c);for(d=0,e=a.length;d<e;d++)if(d in a&&a[d]===c)return d;return-1};b.lastIndexOf=function(a,b){if(a==null)return-1;if(D&&a.lastIndexOf===D)return a.lastIndexOf(b);for(var d=a.length;d--;)if(d in a&&a[d]===b)return d;return-1};b.range=function(a,b,d){arguments.length<=1&&(b=a||0,a=0);for(var d=arguments[2]||1,e=Math.max(Math.ceil((b-a)/d),0),f=0,g=Array(e);f<e;)g[f++]=a,a+=d;return g};
21
+ var F=function(){};b.bind=function(a,c){var d,e;if(a.bind===s&&s)return s.apply(a,i.call(arguments,1));if(!b.isFunction(a))throw new TypeError;e=i.call(arguments,2);return d=function(){if(!(this instanceof d))return a.apply(c,e.concat(i.call(arguments)));F.prototype=a.prototype;var b=new F,g=a.apply(b,e.concat(i.call(arguments)));return Object(g)===g?g:b}};b.bindAll=function(a){var c=i.call(arguments,1);c.length==0&&(c=b.functions(a));j(c,function(c){a[c]=b.bind(a[c],a)});return a};b.memoize=function(a,
22
+ c){var d={};c||(c=b.identity);return function(){var e=c.apply(this,arguments);return b.has(d,e)?d[e]:d[e]=a.apply(this,arguments)}};b.delay=function(a,b){var d=i.call(arguments,2);return setTimeout(function(){return a.apply(a,d)},b)};b.defer=function(a){return b.delay.apply(b,[a,1].concat(i.call(arguments,1)))};b.throttle=function(a,c){var d,e,f,g,h,i=b.debounce(function(){h=g=false},c);return function(){d=this;e=arguments;var b;f||(f=setTimeout(function(){f=null;h&&a.apply(d,e);i()},c));g?h=true:
23
+ a.apply(d,e);i();g=true}};b.debounce=function(a,b){var d;return function(){var e=this,f=arguments;clearTimeout(d);d=setTimeout(function(){d=null;a.apply(e,f)},b)}};b.once=function(a){var b=false,d;return function(){if(b)return d;b=true;return d=a.apply(this,arguments)}};b.wrap=function(a,b){return function(){var d=[a].concat(i.call(arguments,0));return b.apply(this,d)}};b.compose=function(){var a=arguments;return function(){for(var b=arguments,d=a.length-1;d>=0;d--)b=[a[d].apply(this,b)];return b[0]}};
24
+ b.after=function(a,b){return a<=0?b():function(){if(--a<1)return b.apply(this,arguments)}};b.keys=J||function(a){if(a!==Object(a))throw new TypeError("Invalid object");var c=[],d;for(d in a)b.has(a,d)&&(c[c.length]=d);return c};b.values=function(a){return b.map(a,b.identity)};b.functions=b.methods=function(a){var c=[],d;for(d in a)b.isFunction(a[d])&&c.push(d);return c.sort()};b.extend=function(a){j(i.call(arguments,1),function(b){for(var d in b)a[d]=b[d]});return a};b.defaults=function(a){j(i.call(arguments,
25
+ 1),function(b){for(var d in b)a[d]==null&&(a[d]=b[d])});return a};b.clone=function(a){return!b.isObject(a)?a:b.isArray(a)?a.slice():b.extend({},a)};b.tap=function(a,b){b(a);return a};b.isEqual=function(a,b){return q(a,b,[])};b.isEmpty=function(a){if(b.isArray(a)||b.isString(a))return a.length===0;for(var c in a)if(b.has(a,c))return false;return true};b.isElement=function(a){return!!(a&&a.nodeType==1)};b.isArray=o||function(a){return l.call(a)=="[object Array]"};b.isObject=function(a){return a===Object(a)};
26
+ b.isArguments=function(a){return l.call(a)=="[object Arguments]"};if(!b.isArguments(arguments))b.isArguments=function(a){return!(!a||!b.has(a,"callee"))};b.isFunction=function(a){return l.call(a)=="[object Function]"};b.isString=function(a){return l.call(a)=="[object String]"};b.isNumber=function(a){return l.call(a)=="[object Number]"};b.isNaN=function(a){return a!==a};b.isBoolean=function(a){return a===true||a===false||l.call(a)=="[object Boolean]"};b.isDate=function(a){return l.call(a)=="[object Date]"};
27
+ b.isRegExp=function(a){return l.call(a)=="[object RegExp]"};b.isNull=function(a){return a===null};b.isUndefined=function(a){return a===void 0};b.has=function(a,b){return I.call(a,b)};b.noConflict=function(){r._=G;return this};b.identity=function(a){return a};b.times=function(a,b,d){for(var e=0;e<a;e++)b.call(d,e)};b.escape=function(a){return(""+a).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;")};b.mixin=function(a){j(b.functions(a),
28
+ function(c){K(c,b[c]=a[c])})};var L=0;b.uniqueId=function(a){var b=L++;return a?a+b:b};b.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var t=/.^/,u=function(a){return a.replace(/\\\\/g,"\\").replace(/\\'/g,"'")};b.template=function(a,c){var d=b.templateSettings,d="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+a.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(d.escape||t,function(a,b){return"',_.escape("+
29
+ u(b)+"),'"}).replace(d.interpolate||t,function(a,b){return"',"+u(b)+",'"}).replace(d.evaluate||t,function(a,b){return"');"+u(b).replace(/[\r\n\t]/g," ")+";__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');",e=new Function("obj","_",d);return c?e(c,b):function(a){return e.call(this,a,b)}};b.chain=function(a){return b(a).chain()};var m=function(a){this._wrapped=a};b.prototype=m.prototype;var v=function(a,c){return c?b(a).chain():a},K=function(a,c){m.prototype[a]=
30
+ function(){var a=i.call(arguments);H.call(a,this._wrapped);return v(c.apply(b,a),this._chain)}};b.mixin(b);j("pop,push,reverse,shift,sort,splice,unshift".split(","),function(a){var b=k[a];m.prototype[a]=function(){var d=this._wrapped;b.apply(d,arguments);var e=d.length;(a=="shift"||a=="splice")&&e===0&&delete d[0];return v(d,this._chain)}});j(["concat","join","slice"],function(a){var b=k[a];m.prototype[a]=function(){return v(b.apply(this._wrapped,arguments),this._chain)}});m.prototype.chain=function(){this._chain=
31
+ true;return this};m.prototype.value=function(){return this._wrapped}}).call(this);