kuppayam 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1055) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +28 -0
  4. data/Rakefile +37 -0
  5. data/app/assets/config/kuppayam_manifest.js +0 -0
  6. data/app/assets/images/kuppayam/defaults/default-large.png +0 -0
  7. data/app/assets/images/kuppayam/defaults/default-small.png +0 -0
  8. data/app/assets/images/kuppayam/defaults/user-large.png +0 -0
  9. data/app/assets/images/kuppayam/defaults/user-small.png +0 -0
  10. data/app/assets/images/kuppayam/favicon.png +0 -0
  11. data/app/assets/images/kuppayam/logo.png +0 -0
  12. data/app/assets/javascripts/jquery_with_ujs.js +15 -0
  13. data/app/assets/javascripts/kuppayam.js +21 -0
  14. data/app/assets/javascripts/kuppayam/utilities.js +68 -0
  15. data/app/assets/stylesheets/kuppayam.css +23 -0
  16. data/app/assets/stylesheets/kuppayam/custom.css +8 -0
  17. data/app/assets/stylesheets/kuppayam/handycss.css +996 -0
  18. data/app/controllers/kuppayam/base_controller.rb +43 -0
  19. data/app/helpers/breadcrumbs_helper.rb +27 -0
  20. data/app/helpers/filter_helper.rb +370 -0
  21. data/app/helpers/flash_helper.rb +54 -0
  22. data/app/helpers/image_helper.rb +209 -0
  23. data/app/helpers/kuppayam_helper.rb +72 -0
  24. data/app/helpers/meta_tags_helper.rb +50 -0
  25. data/app/helpers/navigation_helper.rb +17 -0
  26. data/app/helpers/params_parser_helper.rb +48 -0
  27. data/app/helpers/render_helper.rb +28 -0
  28. data/app/helpers/resource_helper.rb +133 -0
  29. data/app/views/kaminari/_first_page.html.erb +11 -0
  30. data/app/views/kaminari/_gap.html.erb +8 -0
  31. data/app/views/kaminari/_last_page.html.erb +11 -0
  32. data/app/views/kaminari/_next_page.html.erb +11 -0
  33. data/app/views/kaminari/_page.html.erb +12 -0
  34. data/app/views/kaminari/_paginator.html.erb +25 -0
  35. data/app/views/kaminari/_prev_page.html.erb +11 -0
  36. data/app/views/layouts/kuppayam/_footer.html.erb +25 -0
  37. data/app/views/layouts/kuppayam/_head.html.erb +29 -0
  38. data/app/views/layouts/kuppayam/_header.html.erb +43 -0
  39. data/app/views/layouts/kuppayam/_heading.html.erb +9 -0
  40. data/app/views/layouts/kuppayam/_navbar.html.erb +321 -0
  41. data/app/views/layouts/kuppayam/_overlays.html.erb +40 -0
  42. data/app/views/layouts/kuppayam/_settings_pane.html.erb +107 -0
  43. data/app/views/layouts/kuppayam/_sidebar.html.erb +612 -0
  44. data/app/views/layouts/kuppayam/_sidebar_old.html.erb +54 -0
  45. data/app/views/layouts/kuppayam/admin.html.erb +59 -0
  46. data/app/views/layouts/kuppayam/blank.html.erb +37 -0
  47. data/config/initializers/config_center.rb +60 -0
  48. data/config/initializers/kuppayam_validators.rb +76 -0
  49. data/config/routes.rb +2 -0
  50. data/lib/kuppayam.rb +8 -0
  51. data/lib/kuppayam/action_view/form_helper.rb +254 -0
  52. data/lib/kuppayam/action_view/modal_helper.rb +7 -0
  53. data/lib/kuppayam/action_view/theme_helper.rb +226 -0
  54. data/lib/kuppayam/engine.rb +34 -0
  55. data/lib/kuppayam/version.rb +3 -0
  56. data/lib/tasks/kuppayam_tasks.rake +4 -0
  57. data/vendor/assets/fonts/elusive/css/animation.css +85 -0
  58. data/vendor/assets/fonts/elusive/css/elusive-codes.css +272 -0
  59. data/vendor/assets/fonts/elusive/css/elusive-embedded.css +325 -0
  60. data/vendor/assets/fonts/elusive/css/elusive-ie7-codes.css +272 -0
  61. data/vendor/assets/fonts/elusive/css/elusive-ie7.css +283 -0
  62. data/vendor/assets/fonts/elusive/css/elusive.css +323 -0
  63. data/vendor/assets/fonts/elusive/font/elusive.eot +0 -0
  64. data/vendor/assets/fonts/elusive/font/elusive.svg +282 -0
  65. data/vendor/assets/fonts/elusive/font/elusive.ttf +0 -0
  66. data/vendor/assets/fonts/elusive/font/elusive.woff +0 -0
  67. data/vendor/assets/fonts/elusive/index.html +0 -0
  68. data/vendor/assets/fonts/fontawesome/css/font-awesome.css +1681 -0
  69. data/vendor/assets/fonts/fontawesome/css/font-awesome.min.css +4 -0
  70. data/vendor/assets/fonts/fontawesome/fonts/FontAwesome.otf +0 -0
  71. data/vendor/assets/fonts/fontawesome/fonts/fontawesome-webfont.eot +0 -0
  72. data/vendor/assets/fonts/fontawesome/fonts/fontawesome-webfont.svg +520 -0
  73. data/vendor/assets/fonts/fontawesome/fonts/fontawesome-webfont.ttf +0 -0
  74. data/vendor/assets/fonts/fontawesome/fonts/fontawesome-webfont.woff +0 -0
  75. data/vendor/assets/fonts/fontawesome/index.html +0 -0
  76. data/vendor/assets/fonts/glyphicons/glyphicons-halflings-regular.eot +0 -0
  77. data/vendor/assets/fonts/glyphicons/glyphicons-halflings-regular.svg +229 -0
  78. data/vendor/assets/fonts/glyphicons/glyphicons-halflings-regular.ttf +0 -0
  79. data/vendor/assets/fonts/glyphicons/glyphicons-halflings-regular.woff +0 -0
  80. data/vendor/assets/fonts/glyphicons/index.html +0 -0
  81. data/vendor/assets/fonts/linecons/css/animation.css +85 -0
  82. data/vendor/assets/fonts/linecons/css/linecons-codes.css +49 -0
  83. data/vendor/assets/fonts/linecons/css/linecons-embedded.css +102 -0
  84. data/vendor/assets/fonts/linecons/css/linecons-ie7-codes.css +49 -0
  85. data/vendor/assets/fonts/linecons/css/linecons-ie7.css +60 -0
  86. data/vendor/assets/fonts/linecons/css/linecons.css +100 -0
  87. data/vendor/assets/fonts/linecons/font/linecons.eot +0 -0
  88. data/vendor/assets/fonts/linecons/font/linecons.svg +59 -0
  89. data/vendor/assets/fonts/linecons/font/linecons.ttf +0 -0
  90. data/vendor/assets/fonts/linecons/font/linecons.woff +0 -0
  91. data/vendor/assets/fonts/linecons/index.html +0 -0
  92. data/vendor/assets/fonts/meteocons/css/animation.css +85 -0
  93. data/vendor/assets/fonts/meteocons/css/meteocons-codes.css +48 -0
  94. data/vendor/assets/fonts/meteocons/css/meteocons-embedded.css +101 -0
  95. data/vendor/assets/fonts/meteocons/css/meteocons-ie7-codes.css +48 -0
  96. data/vendor/assets/fonts/meteocons/css/meteocons-ie7.css +59 -0
  97. data/vendor/assets/fonts/meteocons/css/meteocons.css +99 -0
  98. data/vendor/assets/fonts/meteocons/font/meteocons.eot +0 -0
  99. data/vendor/assets/fonts/meteocons/font/meteocons.svg +58 -0
  100. data/vendor/assets/fonts/meteocons/font/meteocons.ttf +0 -0
  101. data/vendor/assets/fonts/meteocons/font/meteocons.woff +0 -0
  102. data/vendor/assets/fonts/meteocons/index.html +0 -0
  103. data/vendor/assets/images/flags/flag-al.png +0 -0
  104. data/vendor/assets/images/flags/flag-br.png +0 -0
  105. data/vendor/assets/images/flags/flag-de.png +0 -0
  106. data/vendor/assets/images/flags/flag-es.png +0 -0
  107. data/vendor/assets/images/flags/flag-fr.png +0 -0
  108. data/vendor/assets/images/flags/flag-uk.png +0 -0
  109. data/vendor/assets/images/flags/index.html +0 -0
  110. data/vendor/assets/javascripts/TweenLite.min.js +12 -0
  111. data/vendor/assets/javascripts/TweenMax.min.js +17 -0
  112. data/vendor/assets/javascripts/bootstrap.min.js +7 -0
  113. data/vendor/assets/javascripts/ckeditor/CHANGES.md +643 -0
  114. data/vendor/assets/javascripts/ckeditor/LICENSE.md +1264 -0
  115. data/vendor/assets/javascripts/ckeditor/README.md +39 -0
  116. data/vendor/assets/javascripts/ckeditor/adapters/jquery.js +10 -0
  117. data/vendor/assets/javascripts/ckeditor/build-config.js +152 -0
  118. data/vendor/assets/javascripts/ckeditor/ckeditor.js +936 -0
  119. data/vendor/assets/javascripts/ckeditor/config.js +42 -0
  120. data/vendor/assets/javascripts/ckeditor/contents.css +134 -0
  121. data/vendor/assets/javascripts/ckeditor/index.html +0 -0
  122. data/vendor/assets/javascripts/ckeditor/lang/af.js +5 -0
  123. data/vendor/assets/javascripts/ckeditor/lang/ar.js +5 -0
  124. data/vendor/assets/javascripts/ckeditor/lang/bg.js +5 -0
  125. data/vendor/assets/javascripts/ckeditor/lang/bn.js +5 -0
  126. data/vendor/assets/javascripts/ckeditor/lang/bs.js +5 -0
  127. data/vendor/assets/javascripts/ckeditor/lang/ca.js +5 -0
  128. data/vendor/assets/javascripts/ckeditor/lang/cs.js +5 -0
  129. data/vendor/assets/javascripts/ckeditor/lang/cy.js +5 -0
  130. data/vendor/assets/javascripts/ckeditor/lang/da.js +5 -0
  131. data/vendor/assets/javascripts/ckeditor/lang/de.js +5 -0
  132. data/vendor/assets/javascripts/ckeditor/lang/el.js +5 -0
  133. data/vendor/assets/javascripts/ckeditor/lang/en-au.js +5 -0
  134. data/vendor/assets/javascripts/ckeditor/lang/en-ca.js +5 -0
  135. data/vendor/assets/javascripts/ckeditor/lang/en-gb.js +5 -0
  136. data/vendor/assets/javascripts/ckeditor/lang/en.js +5 -0
  137. data/vendor/assets/javascripts/ckeditor/lang/eo.js +5 -0
  138. data/vendor/assets/javascripts/ckeditor/lang/es.js +5 -0
  139. data/vendor/assets/javascripts/ckeditor/lang/et.js +5 -0
  140. data/vendor/assets/javascripts/ckeditor/lang/eu.js +5 -0
  141. data/vendor/assets/javascripts/ckeditor/lang/fa.js +5 -0
  142. data/vendor/assets/javascripts/ckeditor/lang/fi.js +5 -0
  143. data/vendor/assets/javascripts/ckeditor/lang/fo.js +5 -0
  144. data/vendor/assets/javascripts/ckeditor/lang/fr-ca.js +5 -0
  145. data/vendor/assets/javascripts/ckeditor/lang/fr.js +5 -0
  146. data/vendor/assets/javascripts/ckeditor/lang/gl.js +5 -0
  147. data/vendor/assets/javascripts/ckeditor/lang/gu.js +5 -0
  148. data/vendor/assets/javascripts/ckeditor/lang/he.js +5 -0
  149. data/vendor/assets/javascripts/ckeditor/lang/hi.js +5 -0
  150. data/vendor/assets/javascripts/ckeditor/lang/hr.js +5 -0
  151. data/vendor/assets/javascripts/ckeditor/lang/hu.js +5 -0
  152. data/vendor/assets/javascripts/ckeditor/lang/id.js +5 -0
  153. data/vendor/assets/javascripts/ckeditor/lang/is.js +5 -0
  154. data/vendor/assets/javascripts/ckeditor/lang/it.js +5 -0
  155. data/vendor/assets/javascripts/ckeditor/lang/ja.js +5 -0
  156. data/vendor/assets/javascripts/ckeditor/lang/ka.js +5 -0
  157. data/vendor/assets/javascripts/ckeditor/lang/km.js +5 -0
  158. data/vendor/assets/javascripts/ckeditor/lang/ko.js +5 -0
  159. data/vendor/assets/javascripts/ckeditor/lang/ku.js +5 -0
  160. data/vendor/assets/javascripts/ckeditor/lang/lt.js +5 -0
  161. data/vendor/assets/javascripts/ckeditor/lang/lv.js +5 -0
  162. data/vendor/assets/javascripts/ckeditor/lang/mk.js +5 -0
  163. data/vendor/assets/javascripts/ckeditor/lang/mn.js +5 -0
  164. data/vendor/assets/javascripts/ckeditor/lang/ms.js +5 -0
  165. data/vendor/assets/javascripts/ckeditor/lang/nb.js +5 -0
  166. data/vendor/assets/javascripts/ckeditor/lang/nl.js +5 -0
  167. data/vendor/assets/javascripts/ckeditor/lang/no.js +5 -0
  168. data/vendor/assets/javascripts/ckeditor/lang/pl.js +5 -0
  169. data/vendor/assets/javascripts/ckeditor/lang/pt-br.js +5 -0
  170. data/vendor/assets/javascripts/ckeditor/lang/pt.js +5 -0
  171. data/vendor/assets/javascripts/ckeditor/lang/ro.js +5 -0
  172. data/vendor/assets/javascripts/ckeditor/lang/ru.js +5 -0
  173. data/vendor/assets/javascripts/ckeditor/lang/si.js +5 -0
  174. data/vendor/assets/javascripts/ckeditor/lang/sk.js +5 -0
  175. data/vendor/assets/javascripts/ckeditor/lang/sl.js +5 -0
  176. data/vendor/assets/javascripts/ckeditor/lang/sq.js +5 -0
  177. data/vendor/assets/javascripts/ckeditor/lang/sr-latn.js +5 -0
  178. data/vendor/assets/javascripts/ckeditor/lang/sr.js +5 -0
  179. data/vendor/assets/javascripts/ckeditor/lang/sv.js +5 -0
  180. data/vendor/assets/javascripts/ckeditor/lang/th.js +5 -0
  181. data/vendor/assets/javascripts/ckeditor/lang/tr.js +5 -0
  182. data/vendor/assets/javascripts/ckeditor/lang/tt.js +5 -0
  183. data/vendor/assets/javascripts/ckeditor/lang/ug.js +5 -0
  184. data/vendor/assets/javascripts/ckeditor/lang/uk.js +5 -0
  185. data/vendor/assets/javascripts/ckeditor/lang/vi.js +5 -0
  186. data/vendor/assets/javascripts/ckeditor/lang/zh-cn.js +5 -0
  187. data/vendor/assets/javascripts/ckeditor/lang/zh.js +5 -0
  188. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +10 -0
  189. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/_translationstatus.txt +25 -0
  190. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ar.js +11 -0
  191. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/bg.js +11 -0
  192. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ca.js +13 -0
  193. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/cs.js +13 -0
  194. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/cy.js +11 -0
  195. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/da.js +11 -0
  196. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/de.js +12 -0
  197. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/el.js +13 -0
  198. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en-gb.js +11 -0
  199. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en.js +11 -0
  200. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/eo.js +13 -0
  201. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/es.js +12 -0
  202. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/et.js +11 -0
  203. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fa.js +11 -0
  204. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fi.js +12 -0
  205. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fr-ca.js +12 -0
  206. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fr.js +13 -0
  207. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/gl.js +12 -0
  208. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/gu.js +11 -0
  209. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/he.js +11 -0
  210. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hi.js +11 -0
  211. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hr.js +11 -0
  212. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hu.js +13 -0
  213. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/id.js +11 -0
  214. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/it.js +13 -0
  215. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ja.js +9 -0
  216. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/km.js +11 -0
  217. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ko.js +10 -0
  218. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ku.js +12 -0
  219. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/lt.js +11 -0
  220. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/lv.js +13 -0
  221. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/mk.js +11 -0
  222. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/mn.js +11 -0
  223. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/nb.js +12 -0
  224. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/nl.js +12 -0
  225. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/no.js +11 -0
  226. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pl.js +13 -0
  227. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pt-br.js +12 -0
  228. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pt.js +12 -0
  229. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ro.js +12 -0
  230. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js +11 -0
  231. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/si.js +10 -0
  232. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sk.js +12 -0
  233. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sl.js +12 -0
  234. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sq.js +11 -0
  235. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sr-latn.js +11 -0
  236. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sr.js +11 -0
  237. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sv.js +12 -0
  238. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/th.js +11 -0
  239. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/tr.js +12 -0
  240. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/tt.js +11 -0
  241. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ug.js +11 -0
  242. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/uk.js +12 -0
  243. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/vi.js +11 -0
  244. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/zh-cn.js +9 -0
  245. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/zh.js +9 -0
  246. data/vendor/assets/javascripts/ckeditor/plugins/about/dialogs/about.js +7 -0
  247. data/vendor/assets/javascripts/ckeditor/plugins/about/dialogs/hidpi/logo_ckeditor.png +0 -0
  248. data/vendor/assets/javascripts/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
  249. data/vendor/assets/javascripts/ckeditor/plugins/clipboard/dialogs/paste.js +11 -0
  250. data/vendor/assets/javascripts/ckeditor/plugins/dialog/dialogDefinition.js +4 -0
  251. data/vendor/assets/javascripts/ckeditor/plugins/icons.png +0 -0
  252. data/vendor/assets/javascripts/ckeditor/plugins/icons_hidpi.png +0 -0
  253. data/vendor/assets/javascripts/ckeditor/plugins/image/dialogs/image.js +43 -0
  254. data/vendor/assets/javascripts/ckeditor/plugins/image/images/noimage.png +0 -0
  255. data/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/anchor.js +7 -0
  256. data/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/link.js +26 -0
  257. data/vendor/assets/javascripts/ckeditor/plugins/link/images/anchor.png +0 -0
  258. data/vendor/assets/javascripts/ckeditor/plugins/link/images/hidpi/anchor.png +0 -0
  259. data/vendor/assets/javascripts/ckeditor/plugins/magicline/images/hidpi/icon-rtl.png +0 -0
  260. data/vendor/assets/javascripts/ckeditor/plugins/magicline/images/hidpi/icon.png +0 -0
  261. data/vendor/assets/javascripts/ckeditor/plugins/magicline/images/icon-rtl.png +0 -0
  262. data/vendor/assets/javascripts/ckeditor/plugins/magicline/images/icon.png +0 -0
  263. data/vendor/assets/javascripts/ckeditor/plugins/pastefromword/filter/default.js +31 -0
  264. data/vendor/assets/javascripts/ckeditor/plugins/scayt/LICENSE.md +28 -0
  265. data/vendor/assets/javascripts/ckeditor/plugins/scayt/README.md +25 -0
  266. data/vendor/assets/javascripts/ckeditor/plugins/scayt/dialogs/options.js +17 -0
  267. data/vendor/assets/javascripts/ckeditor/plugins/scayt/dialogs/toolbar.css +71 -0
  268. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/_translationstatus.txt +20 -0
  269. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ar.js +13 -0
  270. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/bg.js +13 -0
  271. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ca.js +14 -0
  272. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/cs.js +13 -0
  273. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/cy.js +14 -0
  274. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/de.js +13 -0
  275. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/el.js +13 -0
  276. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en-gb.js +13 -0
  277. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en.js +13 -0
  278. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/eo.js +12 -0
  279. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/es.js +13 -0
  280. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/et.js +13 -0
  281. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fa.js +12 -0
  282. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fi.js +13 -0
  283. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fr-ca.js +10 -0
  284. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fr.js +11 -0
  285. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/gl.js +13 -0
  286. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/he.js +12 -0
  287. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/hr.js +13 -0
  288. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/hu.js +12 -0
  289. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/id.js +13 -0
  290. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/it.js +14 -0
  291. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ja.js +9 -0
  292. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/km.js +13 -0
  293. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ku.js +13 -0
  294. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/lv.js +13 -0
  295. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/nb.js +11 -0
  296. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/nl.js +13 -0
  297. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/no.js +11 -0
  298. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/pl.js +12 -0
  299. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/pt-br.js +11 -0
  300. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/pt.js +13 -0
  301. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ru.js +13 -0
  302. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/si.js +13 -0
  303. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sk.js +13 -0
  304. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sl.js +12 -0
  305. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sq.js +13 -0
  306. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sv.js +11 -0
  307. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/th.js +13 -0
  308. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/tr.js +12 -0
  309. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/tt.js +13 -0
  310. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ug.js +13 -0
  311. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/uk.js +12 -0
  312. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/vi.js +14 -0
  313. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/zh-cn.js +9 -0
  314. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/zh.js +12 -0
  315. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/specialchar.js +14 -0
  316. data/vendor/assets/javascripts/ckeditor/plugins/table/dialogs/table.js +21 -0
  317. data/vendor/assets/javascripts/ckeditor/plugins/tabletools/dialogs/tableCell.js +17 -0
  318. data/vendor/assets/javascripts/ckeditor/plugins/wsc/LICENSE.md +28 -0
  319. data/vendor/assets/javascripts/ckeditor/plugins/wsc/README.md +25 -0
  320. data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/ciframe.html +66 -0
  321. data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +52 -0
  322. data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.css +82 -0
  323. data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.js +74 -0
  324. data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc_ie.js +11 -0
  325. data/vendor/assets/javascripts/ckeditor/samples/ajax.html +82 -0
  326. data/vendor/assets/javascripts/ckeditor/samples/api.html +207 -0
  327. data/vendor/assets/javascripts/ckeditor/samples/appendto.html +56 -0
  328. data/vendor/assets/javascripts/ckeditor/samples/assets/inlineall/logo.png +0 -0
  329. data/vendor/assets/javascripts/ckeditor/samples/assets/outputxhtml/outputxhtml.css +204 -0
  330. data/vendor/assets/javascripts/ckeditor/samples/assets/posteddata.php +59 -0
  331. data/vendor/assets/javascripts/ckeditor/samples/assets/sample.jpg +0 -0
  332. data/vendor/assets/javascripts/ckeditor/samples/assets/uilanguages/languages.js +7 -0
  333. data/vendor/assets/javascripts/ckeditor/samples/datafiltering.html +401 -0
  334. data/vendor/assets/javascripts/ckeditor/samples/divreplace.html +141 -0
  335. data/vendor/assets/javascripts/ckeditor/samples/index.html +128 -0
  336. data/vendor/assets/javascripts/ckeditor/samples/inlineall.html +311 -0
  337. data/vendor/assets/javascripts/ckeditor/samples/inlinebycode.html +121 -0
  338. data/vendor/assets/javascripts/ckeditor/samples/inlinetextarea.html +110 -0
  339. data/vendor/assets/javascripts/ckeditor/samples/jquery.html +100 -0
  340. data/vendor/assets/javascripts/ckeditor/samples/plugins/dialog/assets/my_dialog.js +48 -0
  341. data/vendor/assets/javascripts/ckeditor/samples/plugins/dialog/dialog.html +187 -0
  342. data/vendor/assets/javascripts/ckeditor/samples/plugins/enterkey/enterkey.html +103 -0
  343. data/vendor/assets/javascripts/ckeditor/samples/plugins/htmlwriter/assets/outputforflash/outputforflash.fla +0 -0
  344. data/vendor/assets/javascripts/ckeditor/samples/plugins/htmlwriter/assets/outputforflash/outputforflash.swf +0 -0
  345. data/vendor/assets/javascripts/ckeditor/samples/plugins/htmlwriter/assets/outputforflash/swfobject.js +18 -0
  346. data/vendor/assets/javascripts/ckeditor/samples/plugins/htmlwriter/outputforflash.html +280 -0
  347. data/vendor/assets/javascripts/ckeditor/samples/plugins/htmlwriter/outputhtml.html +221 -0
  348. data/vendor/assets/javascripts/ckeditor/samples/plugins/magicline/magicline.html +206 -0
  349. data/vendor/assets/javascripts/ckeditor/samples/plugins/toolbar/toolbar.html +232 -0
  350. data/vendor/assets/javascripts/ckeditor/samples/plugins/wysiwygarea/fullpage.html +77 -0
  351. data/vendor/assets/javascripts/ckeditor/samples/readonly.html +73 -0
  352. data/vendor/assets/javascripts/ckeditor/samples/replacebyclass.html +57 -0
  353. data/vendor/assets/javascripts/ckeditor/samples/replacebycode.html +56 -0
  354. data/vendor/assets/javascripts/ckeditor/samples/sample.css +365 -0
  355. data/vendor/assets/javascripts/ckeditor/samples/sample.js +50 -0
  356. data/vendor/assets/javascripts/ckeditor/samples/sample_posteddata.php +16 -0
  357. data/vendor/assets/javascripts/ckeditor/samples/tabindex.html +75 -0
  358. data/vendor/assets/javascripts/ckeditor/samples/uicolor.html +69 -0
  359. data/vendor/assets/javascripts/ckeditor/samples/uilanguages.html +119 -0
  360. data/vendor/assets/javascripts/ckeditor/samples/xhtmlstyle.html +231 -0
  361. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/dev/icons16.svg +683 -0
  362. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/dev/icons32.svg +694 -0
  363. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/dev/locations.json +140 -0
  364. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/dialog.css +1 -0
  365. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/dialog_ie.css +1 -0
  366. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/dialog_ie7.css +1 -0
  367. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/dialog_ie8.css +1 -0
  368. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/dialog_iequirks.css +1 -0
  369. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/dialog_opera.css +1 -0
  370. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/editor.css +1 -0
  371. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/editor_gecko.css +1 -0
  372. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/editor_ie.css +1 -0
  373. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/editor_ie7.css +1 -0
  374. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/editor_ie8.css +1 -0
  375. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/editor_iequirks.css +1 -0
  376. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/icons.png +0 -0
  377. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/icons_hidpi.png +0 -0
  378. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/images/arrow.png +0 -0
  379. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/images/close.png +0 -0
  380. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/images/hidpi/close.png +0 -0
  381. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/images/hidpi/lock-open.png +0 -0
  382. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/images/hidpi/lock.png +0 -0
  383. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/images/hidpi/refresh.png +0 -0
  384. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/images/lock-open.png +0 -0
  385. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/images/lock.png +0 -0
  386. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/images/refresh.png +0 -0
  387. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/readme.md +35 -0
  388. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/sample/bootstrapck-sample.html +127 -0
  389. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/sample/css/bootstrapck-sample.css +1 -0
  390. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/sample/js/analytics.js +4 -0
  391. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/sample/js/jquery-1.11.0.min.js +189 -0
  392. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/browser-specific/gecko/editor_gecko.scss +25 -0
  393. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/browser-specific/ie/dialog_ie.scss +62 -0
  394. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/browser-specific/ie/editor_ie.scss +71 -0
  395. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/browser-specific/ie7/dialog_ie7.scss +68 -0
  396. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/browser-specific/ie7/editor_ie7.scss +213 -0
  397. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/browser-specific/ie8/dialog_ie8.scss +24 -0
  398. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/browser-specific/ie8/editor_ie8.scss +27 -0
  399. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/browser-specific/iequirks/dialog_iequirks.scss +21 -0
  400. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/browser-specific/iequirks/editor_iequirks.scss +79 -0
  401. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/browser-specific/opera/dialog_opera.scss +31 -0
  402. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/components/_colorpanel.scss +119 -0
  403. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/components/_elementspath.scss +66 -0
  404. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/components/_mainui.scss +189 -0
  405. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/components/_menu.scss +182 -0
  406. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/components/_panel.scss +199 -0
  407. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/components/_presets.scss +32 -0
  408. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/components/_reset.scss +107 -0
  409. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/components/_richcombo.scss +174 -0
  410. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/components/_toolbar.scss +317 -0
  411. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/components/editor.scss +66 -0
  412. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/config/_colors.scss +61 -0
  413. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/config/_config.scss +9 -0
  414. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/config/_defaults.scss +37 -0
  415. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/dialog/dialog.scss +822 -0
  416. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/skin.js +10 -0
  417. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog.css +5 -0
  418. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie.css +5 -0
  419. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie7.css +5 -0
  420. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie8.css +5 -0
  421. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_iequirks.css +5 -0
  422. data/vendor/assets/javascripts/ckeditor/skins/moono/editor.css +5 -0
  423. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_gecko.css +5 -0
  424. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie.css +5 -0
  425. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie7.css +5 -0
  426. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie8.css +5 -0
  427. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_iequirks.css +5 -0
  428. data/vendor/assets/javascripts/ckeditor/skins/moono/icons.png +0 -0
  429. data/vendor/assets/javascripts/ckeditor/skins/moono/icons_hidpi.png +0 -0
  430. data/vendor/assets/javascripts/ckeditor/skins/moono/images/arrow.png +0 -0
  431. data/vendor/assets/javascripts/ckeditor/skins/moono/images/close.png +0 -0
  432. data/vendor/assets/javascripts/ckeditor/skins/moono/images/hidpi/close.png +0 -0
  433. data/vendor/assets/javascripts/ckeditor/skins/moono/images/hidpi/lock-open.png +0 -0
  434. data/vendor/assets/javascripts/ckeditor/skins/moono/images/hidpi/lock.png +0 -0
  435. data/vendor/assets/javascripts/ckeditor/skins/moono/images/hidpi/refresh.png +0 -0
  436. data/vendor/assets/javascripts/ckeditor/skins/moono/images/lock-open.png +0 -0
  437. data/vendor/assets/javascripts/ckeditor/skins/moono/images/lock.png +0 -0
  438. data/vendor/assets/javascripts/ckeditor/skins/moono/images/refresh.png +0 -0
  439. data/vendor/assets/javascripts/ckeditor/skins/moono/readme.md +51 -0
  440. data/vendor/assets/javascripts/ckeditor/styles.js +111 -0
  441. data/vendor/assets/javascripts/colorpicker/bootstrap-colorpicker.min.js +1 -0
  442. data/vendor/assets/javascripts/colorpicker/images/alpha-horizontal.png +0 -0
  443. data/vendor/assets/javascripts/colorpicker/images/alpha.png +0 -0
  444. data/vendor/assets/javascripts/colorpicker/images/hue-horizontal.png +0 -0
  445. data/vendor/assets/javascripts/colorpicker/images/hue.png +0 -0
  446. data/vendor/assets/javascripts/colorpicker/images/saturation.png +0 -0
  447. data/vendor/assets/javascripts/colorpicker/index.html +0 -0
  448. data/vendor/assets/javascripts/cropper/cropper.css +266 -0
  449. data/vendor/assets/javascripts/cropper/cropper.js +1063 -0
  450. data/vendor/assets/javascripts/cropper/cropper.min.css +9 -0
  451. data/vendor/assets/javascripts/cropper/cropper.min.js +9 -0
  452. data/vendor/assets/javascripts/cropper/index.html +0 -0
  453. data/vendor/assets/javascripts/datatables/css/jquery.dataTables.css +476 -0
  454. data/vendor/assets/javascripts/datatables/css/jquery.dataTables.min.css +1 -0
  455. data/vendor/assets/javascripts/datatables/css/jquery.dataTables_themeroller.css +330 -0
  456. data/vendor/assets/javascripts/datatables/dataTables.bootstrap.css +281 -0
  457. data/vendor/assets/javascripts/datatables/dataTables.bootstrap.js +186 -0
  458. data/vendor/assets/javascripts/datatables/datatables-angular.js +2651 -0
  459. data/vendor/assets/javascripts/datatables/images/Sorting icons.psd +0 -0
  460. data/vendor/assets/javascripts/datatables/images/back_disabled.png +0 -0
  461. data/vendor/assets/javascripts/datatables/images/back_enabled.png +0 -0
  462. data/vendor/assets/javascripts/datatables/images/back_enabled_hover.png +0 -0
  463. data/vendor/assets/javascripts/datatables/images/favicon.ico +0 -0
  464. data/vendor/assets/javascripts/datatables/images/forward_disabled.png +0 -0
  465. data/vendor/assets/javascripts/datatables/images/forward_enabled.png +0 -0
  466. data/vendor/assets/javascripts/datatables/images/forward_enabled_hover.png +0 -0
  467. data/vendor/assets/javascripts/datatables/images/sort_asc.png +0 -0
  468. data/vendor/assets/javascripts/datatables/images/sort_asc_disabled.png +0 -0
  469. data/vendor/assets/javascripts/datatables/images/sort_both.png +0 -0
  470. data/vendor/assets/javascripts/datatables/images/sort_desc.png +0 -0
  471. data/vendor/assets/javascripts/datatables/images/sort_desc_disabled.png +0 -0
  472. data/vendor/assets/javascripts/datatables/index.html +0 -0
  473. data/vendor/assets/javascripts/datatables/js/jquery.dataTables.js +14624 -0
  474. data/vendor/assets/javascripts/datatables/js/jquery.dataTables.min.js +155 -0
  475. data/vendor/assets/javascripts/datatables/js/jquery.js +4 -0
  476. data/vendor/assets/javascripts/datatables/tabletools/copy_csv_xls.swf +0 -0
  477. data/vendor/assets/javascripts/datatables/tabletools/copy_csv_xls_pdf.swf +0 -0
  478. data/vendor/assets/javascripts/datatables/tabletools/dataTables.tableTools.css +361 -0
  479. data/vendor/assets/javascripts/datatables/tabletools/dataTables.tableTools.min.js +69 -0
  480. data/vendor/assets/javascripts/datatables/yadcf/jquery.dataTables.yadcf.css +116 -0
  481. data/vendor/assets/javascripts/datatables/yadcf/jquery.dataTables.yadcf.js +2235 -0
  482. data/vendor/assets/javascripts/datepicker/bootstrap-datepicker.js +1395 -0
  483. data/vendor/assets/javascripts/datepicker/index.html +0 -0
  484. data/vendor/assets/javascripts/daterangepicker/daterangepicker-bs2.css +256 -0
  485. data/vendor/assets/javascripts/daterangepicker/daterangepicker-bs3.css +288 -0
  486. data/vendor/assets/javascripts/daterangepicker/daterangepicker.js +1118 -0
  487. data/vendor/assets/javascripts/daterangepicker/index.html +0 -0
  488. data/vendor/assets/javascripts/devexpress-web-14.1/js/dx.chartjs.js +12 -0
  489. data/vendor/assets/javascripts/devexpress-web-14.1/js/globalize.min.js +12 -0
  490. data/vendor/assets/javascripts/devexpress-web-14.1/js/knockout-3.1.0.js +12 -0
  491. data/vendor/assets/javascripts/dropzone/css/basic.css +155 -0
  492. data/vendor/assets/javascripts/dropzone/css/dropzone.css +397 -0
  493. data/vendor/assets/javascripts/dropzone/css/stylus/basic.styl +165 -0
  494. data/vendor/assets/javascripts/dropzone/css/stylus/dropzone.styl +180 -0
  495. data/vendor/assets/javascripts/dropzone/dropzone-amd-module.min.js +1 -0
  496. data/vendor/assets/javascripts/dropzone/dropzone.min.js +1 -0
  497. data/vendor/assets/javascripts/dropzone/images/spritemap.png +0 -0
  498. data/vendor/assets/javascripts/dropzone/images/spritemap@2x.png +0 -0
  499. data/vendor/assets/javascripts/dropzone/index.html +0 -0
  500. data/vendor/assets/javascripts/formwizard/index.html +0 -0
  501. data/vendor/assets/javascripts/formwizard/jquery.bootstrap.wizard.js +331 -0
  502. data/vendor/assets/javascripts/formwizard/jquery.bootstrap.wizard.min.js +22 -0
  503. data/vendor/assets/javascripts/fullcalendar/fullcalendar.css +933 -0
  504. data/vendor/assets/javascripts/fullcalendar/fullcalendar.js +8391 -0
  505. data/vendor/assets/javascripts/fullcalendar/fullcalendar.min.css +5 -0
  506. data/vendor/assets/javascripts/fullcalendar/fullcalendar.min.js +8 -0
  507. data/vendor/assets/javascripts/fullcalendar/fullcalendar.print.css +201 -0
  508. data/vendor/assets/javascripts/fullcalendar/index.html +0 -0
  509. data/vendor/assets/javascripts/fullcalendar/moment.min.js +6 -0
  510. data/vendor/assets/javascripts/handlebars.min.js +28 -0
  511. data/vendor/assets/javascripts/icheck/icheck.min.js +11 -0
  512. data/vendor/assets/javascripts/icheck/index.html +0 -0
  513. data/vendor/assets/javascripts/icheck/skins/all.css +61 -0
  514. data/vendor/assets/javascripts/icheck/skins/flat/_all.css +530 -0
  515. data/vendor/assets/javascripts/icheck/skins/flat/aero.css +53 -0
  516. data/vendor/assets/javascripts/icheck/skins/flat/aero.png +0 -0
  517. data/vendor/assets/javascripts/icheck/skins/flat/aero@2x.png +0 -0
  518. data/vendor/assets/javascripts/icheck/skins/flat/blue.css +53 -0
  519. data/vendor/assets/javascripts/icheck/skins/flat/blue.png +0 -0
  520. data/vendor/assets/javascripts/icheck/skins/flat/blue@2x.png +0 -0
  521. data/vendor/assets/javascripts/icheck/skins/flat/flat.css +53 -0
  522. data/vendor/assets/javascripts/icheck/skins/flat/flat.png +0 -0
  523. data/vendor/assets/javascripts/icheck/skins/flat/flat@2x.png +0 -0
  524. data/vendor/assets/javascripts/icheck/skins/flat/green.css +53 -0
  525. data/vendor/assets/javascripts/icheck/skins/flat/green.png +0 -0
  526. data/vendor/assets/javascripts/icheck/skins/flat/green@2x.png +0 -0
  527. data/vendor/assets/javascripts/icheck/skins/flat/grey.css +53 -0
  528. data/vendor/assets/javascripts/icheck/skins/flat/grey.png +0 -0
  529. data/vendor/assets/javascripts/icheck/skins/flat/grey@2x.png +0 -0
  530. data/vendor/assets/javascripts/icheck/skins/flat/orange.css +53 -0
  531. data/vendor/assets/javascripts/icheck/skins/flat/orange.png +0 -0
  532. data/vendor/assets/javascripts/icheck/skins/flat/orange@2x.png +0 -0
  533. data/vendor/assets/javascripts/icheck/skins/flat/pink.css +53 -0
  534. data/vendor/assets/javascripts/icheck/skins/flat/pink.png +0 -0
  535. data/vendor/assets/javascripts/icheck/skins/flat/pink@2x.png +0 -0
  536. data/vendor/assets/javascripts/icheck/skins/flat/purple.css +53 -0
  537. data/vendor/assets/javascripts/icheck/skins/flat/purple.png +0 -0
  538. data/vendor/assets/javascripts/icheck/skins/flat/purple@2x.png +0 -0
  539. data/vendor/assets/javascripts/icheck/skins/flat/red.css +53 -0
  540. data/vendor/assets/javascripts/icheck/skins/flat/red.png +0 -0
  541. data/vendor/assets/javascripts/icheck/skins/flat/red@2x.png +0 -0
  542. data/vendor/assets/javascripts/icheck/skins/flat/yellow.css +53 -0
  543. data/vendor/assets/javascripts/icheck/skins/flat/yellow.png +0 -0
  544. data/vendor/assets/javascripts/icheck/skins/flat/yellow@2x.png +0 -0
  545. data/vendor/assets/javascripts/icheck/skins/futurico/futurico.css +53 -0
  546. data/vendor/assets/javascripts/icheck/skins/futurico/futurico.png +0 -0
  547. data/vendor/assets/javascripts/icheck/skins/futurico/futurico@2x.png +0 -0
  548. data/vendor/assets/javascripts/icheck/skins/line/_all.css +710 -0
  549. data/vendor/assets/javascripts/icheck/skins/line/aero.css +71 -0
  550. data/vendor/assets/javascripts/icheck/skins/line/blue.css +71 -0
  551. data/vendor/assets/javascripts/icheck/skins/line/green.css +71 -0
  552. data/vendor/assets/javascripts/icheck/skins/line/grey.css +71 -0
  553. data/vendor/assets/javascripts/icheck/skins/line/line.css +71 -0
  554. data/vendor/assets/javascripts/icheck/skins/line/line.png +0 -0
  555. data/vendor/assets/javascripts/icheck/skins/line/line@2x.png +0 -0
  556. data/vendor/assets/javascripts/icheck/skins/line/orange.css +71 -0
  557. data/vendor/assets/javascripts/icheck/skins/line/pink.css +71 -0
  558. data/vendor/assets/javascripts/icheck/skins/line/purple.css +71 -0
  559. data/vendor/assets/javascripts/icheck/skins/line/red.css +71 -0
  560. data/vendor/assets/javascripts/icheck/skins/line/yellow.css +71 -0
  561. data/vendor/assets/javascripts/icheck/skins/minimal/_all.css +590 -0
  562. data/vendor/assets/javascripts/icheck/skins/minimal/aero.css +59 -0
  563. data/vendor/assets/javascripts/icheck/skins/minimal/aero.png +0 -0
  564. data/vendor/assets/javascripts/icheck/skins/minimal/aero@2x.png +0 -0
  565. data/vendor/assets/javascripts/icheck/skins/minimal/blue.css +59 -0
  566. data/vendor/assets/javascripts/icheck/skins/minimal/blue.png +0 -0
  567. data/vendor/assets/javascripts/icheck/skins/minimal/blue@2x.png +0 -0
  568. data/vendor/assets/javascripts/icheck/skins/minimal/green.css +59 -0
  569. data/vendor/assets/javascripts/icheck/skins/minimal/green.png +0 -0
  570. data/vendor/assets/javascripts/icheck/skins/minimal/green@2x.png +0 -0
  571. data/vendor/assets/javascripts/icheck/skins/minimal/grey.css +59 -0
  572. data/vendor/assets/javascripts/icheck/skins/minimal/grey.png +0 -0
  573. data/vendor/assets/javascripts/icheck/skins/minimal/grey@2x.png +0 -0
  574. data/vendor/assets/javascripts/icheck/skins/minimal/minimal.css +59 -0
  575. data/vendor/assets/javascripts/icheck/skins/minimal/minimal.png +0 -0
  576. data/vendor/assets/javascripts/icheck/skins/minimal/minimal@2x.png +0 -0
  577. data/vendor/assets/javascripts/icheck/skins/minimal/orange.css +59 -0
  578. data/vendor/assets/javascripts/icheck/skins/minimal/orange.png +0 -0
  579. data/vendor/assets/javascripts/icheck/skins/minimal/orange@2x.png +0 -0
  580. data/vendor/assets/javascripts/icheck/skins/minimal/pink.css +59 -0
  581. data/vendor/assets/javascripts/icheck/skins/minimal/pink.png +0 -0
  582. data/vendor/assets/javascripts/icheck/skins/minimal/pink@2x.png +0 -0
  583. data/vendor/assets/javascripts/icheck/skins/minimal/purple.css +59 -0
  584. data/vendor/assets/javascripts/icheck/skins/minimal/purple.png +0 -0
  585. data/vendor/assets/javascripts/icheck/skins/minimal/purple@2x.png +0 -0
  586. data/vendor/assets/javascripts/icheck/skins/minimal/red.css +59 -0
  587. data/vendor/assets/javascripts/icheck/skins/minimal/red.png +0 -0
  588. data/vendor/assets/javascripts/icheck/skins/minimal/red@2x.png +0 -0
  589. data/vendor/assets/javascripts/icheck/skins/minimal/yellow.css +59 -0
  590. data/vendor/assets/javascripts/icheck/skins/minimal/yellow.png +0 -0
  591. data/vendor/assets/javascripts/icheck/skins/minimal/yellow@2x.png +0 -0
  592. data/vendor/assets/javascripts/icheck/skins/polaris/polaris.css +59 -0
  593. data/vendor/assets/javascripts/icheck/skins/polaris/polaris.png +0 -0
  594. data/vendor/assets/javascripts/icheck/skins/polaris/polaris@2x.png +0 -0
  595. data/vendor/assets/javascripts/icheck/skins/square/_all.css +590 -0
  596. data/vendor/assets/javascripts/icheck/skins/square/aero.css +59 -0
  597. data/vendor/assets/javascripts/icheck/skins/square/aero.png +0 -0
  598. data/vendor/assets/javascripts/icheck/skins/square/aero@2x.png +0 -0
  599. data/vendor/assets/javascripts/icheck/skins/square/blue.css +59 -0
  600. data/vendor/assets/javascripts/icheck/skins/square/blue.png +0 -0
  601. data/vendor/assets/javascripts/icheck/skins/square/blue@2x.png +0 -0
  602. data/vendor/assets/javascripts/icheck/skins/square/green.css +59 -0
  603. data/vendor/assets/javascripts/icheck/skins/square/green.png +0 -0
  604. data/vendor/assets/javascripts/icheck/skins/square/green@2x.png +0 -0
  605. data/vendor/assets/javascripts/icheck/skins/square/grey.css +59 -0
  606. data/vendor/assets/javascripts/icheck/skins/square/grey.png +0 -0
  607. data/vendor/assets/javascripts/icheck/skins/square/grey@2x.png +0 -0
  608. data/vendor/assets/javascripts/icheck/skins/square/orange.css +59 -0
  609. data/vendor/assets/javascripts/icheck/skins/square/orange.png +0 -0
  610. data/vendor/assets/javascripts/icheck/skins/square/orange@2x.png +0 -0
  611. data/vendor/assets/javascripts/icheck/skins/square/pink.css +59 -0
  612. data/vendor/assets/javascripts/icheck/skins/square/pink.png +0 -0
  613. data/vendor/assets/javascripts/icheck/skins/square/pink@2x.png +0 -0
  614. data/vendor/assets/javascripts/icheck/skins/square/purple.css +59 -0
  615. data/vendor/assets/javascripts/icheck/skins/square/purple.png +0 -0
  616. data/vendor/assets/javascripts/icheck/skins/square/purple@2x.png +0 -0
  617. data/vendor/assets/javascripts/icheck/skins/square/red.css +59 -0
  618. data/vendor/assets/javascripts/icheck/skins/square/red.png +0 -0
  619. data/vendor/assets/javascripts/icheck/skins/square/red@2x.png +0 -0
  620. data/vendor/assets/javascripts/icheck/skins/square/square.css +59 -0
  621. data/vendor/assets/javascripts/icheck/skins/square/square.png +0 -0
  622. data/vendor/assets/javascripts/icheck/skins/square/square@2x.png +0 -0
  623. data/vendor/assets/javascripts/icheck/skins/square/yellow.css +59 -0
  624. data/vendor/assets/javascripts/icheck/skins/square/yellow.png +0 -0
  625. data/vendor/assets/javascripts/icheck/skins/square/yellow@2x.png +0 -0
  626. data/vendor/assets/javascripts/inputmask/index.html +0 -0
  627. data/vendor/assets/javascripts/inputmask/inputmask/jquery.inputmask.date.extensions.js +8 -0
  628. data/vendor/assets/javascripts/inputmask/inputmask/jquery.inputmask.extensions.js +8 -0
  629. data/vendor/assets/javascripts/inputmask/inputmask/jquery.inputmask.js +9 -0
  630. data/vendor/assets/javascripts/inputmask/inputmask/jquery.inputmask.numeric.extensions.js +8 -0
  631. data/vendor/assets/javascripts/inputmask/inputmask/jquery.inputmask.phone.extensions.js +8 -0
  632. data/vendor/assets/javascripts/inputmask/inputmask/jquery.inputmask.regex.extensions.js +8 -0
  633. data/vendor/assets/javascripts/inputmask/jquery.inputmask.bundle.js +9 -0
  634. data/vendor/assets/javascripts/joinable.js +45 -0
  635. data/vendor/assets/javascripts/jquery-1.11.1.min.js +4 -0
  636. data/vendor/assets/javascripts/jquery-ui/external/jquery/jquery.js +9789 -0
  637. data/vendor/assets/javascripts/jquery-ui/index.html +317 -0
  638. data/vendor/assets/javascripts/jquery-ui/jquery-ui.css +239 -0
  639. data/vendor/assets/javascripts/jquery-ui/jquery-ui.js +6343 -0
  640. data/vendor/assets/javascripts/jquery-ui/jquery-ui.min.css +6 -0
  641. data/vendor/assets/javascripts/jquery-ui/jquery-ui.min.js +9 -0
  642. data/vendor/assets/javascripts/jquery-ui/jquery-ui.structure.css +245 -0
  643. data/vendor/assets/javascripts/jquery-ui/jquery-ui.structure.min.css +5 -0
  644. data/vendor/assets/javascripts/jquery-validate/additional-methods.js +928 -0
  645. data/vendor/assets/javascripts/jquery-validate/additional-methods.min.js +4 -0
  646. data/vendor/assets/javascripts/jquery-validate/index.html +0 -0
  647. data/vendor/assets/javascripts/jquery-validate/jquery.validate.js +1357 -0
  648. data/vendor/assets/javascripts/jquery-validate/jquery.validate.min.js +4 -0
  649. data/vendor/assets/javascripts/jquery-validate/localization/messages_ar.js +33 -0
  650. data/vendor/assets/javascripts/jquery-validate/localization/messages_ar.min.js +4 -0
  651. data/vendor/assets/javascripts/jquery-validate/localization/messages_bg.js +33 -0
  652. data/vendor/assets/javascripts/jquery-validate/localization/messages_bg.min.js +4 -0
  653. data/vendor/assets/javascripts/jquery-validate/localization/messages_ca.js +33 -0
  654. data/vendor/assets/javascripts/jquery-validate/localization/messages_ca.min.js +4 -0
  655. data/vendor/assets/javascripts/jquery-validate/localization/messages_cs.js +33 -0
  656. data/vendor/assets/javascripts/jquery-validate/localization/messages_cs.min.js +4 -0
  657. data/vendor/assets/javascripts/jquery-validate/localization/messages_da.js +30 -0
  658. data/vendor/assets/javascripts/jquery-validate/localization/messages_da.min.js +4 -0
  659. data/vendor/assets/javascripts/jquery-validate/localization/messages_de.js +30 -0
  660. data/vendor/assets/javascripts/jquery-validate/localization/messages_de.min.js +4 -0
  661. data/vendor/assets/javascripts/jquery-validate/localization/messages_el.js +33 -0
  662. data/vendor/assets/javascripts/jquery-validate/localization/messages_el.min.js +4 -0
  663. data/vendor/assets/javascripts/jquery-validate/localization/messages_es.js +36 -0
  664. data/vendor/assets/javascripts/jquery-validate/localization/messages_es.min.js +4 -0
  665. data/vendor/assets/javascripts/jquery-validate/localization/messages_es_AR.js +37 -0
  666. data/vendor/assets/javascripts/jquery-validate/localization/messages_es_AR.min.js +4 -0
  667. data/vendor/assets/javascripts/jquery-validate/localization/messages_et.js +31 -0
  668. data/vendor/assets/javascripts/jquery-validate/localization/messages_et.min.js +4 -0
  669. data/vendor/assets/javascripts/jquery-validate/localization/messages_eu.js +33 -0
  670. data/vendor/assets/javascripts/jquery-validate/localization/messages_eu.min.js +4 -0
  671. data/vendor/assets/javascripts/jquery-validate/localization/messages_fa.js +36 -0
  672. data/vendor/assets/javascripts/jquery-validate/localization/messages_fa.min.js +4 -0
  673. data/vendor/assets/javascripts/jquery-validate/localization/messages_fi.js +31 -0
  674. data/vendor/assets/javascripts/jquery-validate/localization/messages_fi.min.js +4 -0
  675. data/vendor/assets/javascripts/jquery-validate/localization/messages_fr.js +59 -0
  676. data/vendor/assets/javascripts/jquery-validate/localization/messages_fr.min.js +4 -0
  677. data/vendor/assets/javascripts/jquery-validate/localization/messages_gl.js +38 -0
  678. data/vendor/assets/javascripts/jquery-validate/localization/messages_gl.min.js +4 -0
  679. data/vendor/assets/javascripts/jquery-validate/localization/messages_he.js +33 -0
  680. data/vendor/assets/javascripts/jquery-validate/localization/messages_he.min.js +4 -0
  681. data/vendor/assets/javascripts/jquery-validate/localization/messages_hr.js +33 -0
  682. data/vendor/assets/javascripts/jquery-validate/localization/messages_hr.min.js +4 -0
  683. data/vendor/assets/javascripts/jquery-validate/localization/messages_hu.js +32 -0
  684. data/vendor/assets/javascripts/jquery-validate/localization/messages_hu.min.js +4 -0
  685. data/vendor/assets/javascripts/jquery-validate/localization/messages_id.js +32 -0
  686. data/vendor/assets/javascripts/jquery-validate/localization/messages_id.min.js +4 -0
  687. data/vendor/assets/javascripts/jquery-validate/localization/messages_is.js +31 -0
  688. data/vendor/assets/javascripts/jquery-validate/localization/messages_is.min.js +4 -0
  689. data/vendor/assets/javascripts/jquery-validate/localization/messages_it.js +36 -0
  690. data/vendor/assets/javascripts/jquery-validate/localization/messages_it.min.js +4 -0
  691. data/vendor/assets/javascripts/jquery-validate/localization/messages_ja.js +33 -0
  692. data/vendor/assets/javascripts/jquery-validate/localization/messages_ja.min.js +4 -0
  693. data/vendor/assets/javascripts/jquery-validate/localization/messages_ka.js +33 -0
  694. data/vendor/assets/javascripts/jquery-validate/localization/messages_ka.min.js +4 -0
  695. data/vendor/assets/javascripts/jquery-validate/localization/messages_kk.js +33 -0
  696. data/vendor/assets/javascripts/jquery-validate/localization/messages_kk.min.js +4 -0
  697. data/vendor/assets/javascripts/jquery-validate/localization/messages_ko.js +33 -0
  698. data/vendor/assets/javascripts/jquery-validate/localization/messages_ko.min.js +4 -0
  699. data/vendor/assets/javascripts/jquery-validate/localization/messages_lt.js +33 -0
  700. data/vendor/assets/javascripts/jquery-validate/localization/messages_lt.min.js +4 -0
  701. data/vendor/assets/javascripts/jquery-validate/localization/messages_lv.js +33 -0
  702. data/vendor/assets/javascripts/jquery-validate/localization/messages_lv.min.js +4 -0
  703. data/vendor/assets/javascripts/jquery-validate/localization/messages_my.js +33 -0
  704. data/vendor/assets/javascripts/jquery-validate/localization/messages_my.min.js +4 -0
  705. data/vendor/assets/javascripts/jquery-validate/localization/messages_nl.js +43 -0
  706. data/vendor/assets/javascripts/jquery-validate/localization/messages_nl.min.js +4 -0
  707. data/vendor/assets/javascripts/jquery-validate/localization/messages_no.js +33 -0
  708. data/vendor/assets/javascripts/jquery-validate/localization/messages_no.min.js +4 -0
  709. data/vendor/assets/javascripts/jquery-validate/localization/messages_pl.js +33 -0
  710. data/vendor/assets/javascripts/jquery-validate/localization/messages_pl.min.js +4 -0
  711. data/vendor/assets/javascripts/jquery-validate/localization/messages_pt_BR.js +37 -0
  712. data/vendor/assets/javascripts/jquery-validate/localization/messages_pt_BR.min.js +4 -0
  713. data/vendor/assets/javascripts/jquery-validate/localization/messages_pt_PT.js +37 -0
  714. data/vendor/assets/javascripts/jquery-validate/localization/messages_pt_PT.min.js +4 -0
  715. data/vendor/assets/javascripts/jquery-validate/localization/messages_ro.js +33 -0
  716. data/vendor/assets/javascripts/jquery-validate/localization/messages_ro.min.js +4 -0
  717. data/vendor/assets/javascripts/jquery-validate/localization/messages_ru.js +33 -0
  718. data/vendor/assets/javascripts/jquery-validate/localization/messages_ru.min.js +4 -0
  719. data/vendor/assets/javascripts/jquery-validate/localization/messages_si.js +33 -0
  720. data/vendor/assets/javascripts/jquery-validate/localization/messages_si.min.js +4 -0
  721. data/vendor/assets/javascripts/jquery-validate/localization/messages_sk.js +30 -0
  722. data/vendor/assets/javascripts/jquery-validate/localization/messages_sk.min.js +4 -0
  723. data/vendor/assets/javascripts/jquery-validate/localization/messages_sl.js +33 -0
  724. data/vendor/assets/javascripts/jquery-validate/localization/messages_sl.min.js +4 -0
  725. data/vendor/assets/javascripts/jquery-validate/localization/messages_sr.js +33 -0
  726. data/vendor/assets/javascripts/jquery-validate/localization/messages_sr.min.js +4 -0
  727. data/vendor/assets/javascripts/jquery-validate/localization/messages_sr_lat.js +33 -0
  728. data/vendor/assets/javascripts/jquery-validate/localization/messages_sr_lat.min.js +4 -0
  729. data/vendor/assets/javascripts/jquery-validate/localization/messages_sv.js +31 -0
  730. data/vendor/assets/javascripts/jquery-validate/localization/messages_sv.min.js +4 -0
  731. data/vendor/assets/javascripts/jquery-validate/localization/messages_th.js +33 -0
  732. data/vendor/assets/javascripts/jquery-validate/localization/messages_th.min.js +4 -0
  733. data/vendor/assets/javascripts/jquery-validate/localization/messages_tj.js +33 -0
  734. data/vendor/assets/javascripts/jquery-validate/localization/messages_tj.min.js +4 -0
  735. data/vendor/assets/javascripts/jquery-validate/localization/messages_tr.js +33 -0
  736. data/vendor/assets/javascripts/jquery-validate/localization/messages_tr.min.js +4 -0
  737. data/vendor/assets/javascripts/jquery-validate/localization/messages_uk.js +33 -0
  738. data/vendor/assets/javascripts/jquery-validate/localization/messages_uk.min.js +4 -0
  739. data/vendor/assets/javascripts/jquery-validate/localization/messages_vi.js +33 -0
  740. data/vendor/assets/javascripts/jquery-validate/localization/messages_vi.min.js +4 -0
  741. data/vendor/assets/javascripts/jquery-validate/localization/messages_zh.js +33 -0
  742. data/vendor/assets/javascripts/jquery-validate/localization/messages_zh.min.js +4 -0
  743. data/vendor/assets/javascripts/jquery-validate/localization/messages_zh_TW.js +34 -0
  744. data/vendor/assets/javascripts/jquery-validate/localization/messages_zh_TW.min.js +4 -0
  745. data/vendor/assets/javascripts/jquery-validate/localization/methods_de.js +22 -0
  746. data/vendor/assets/javascripts/jquery-validate/localization/methods_de.min.js +4 -0
  747. data/vendor/assets/javascripts/jquery-validate/localization/methods_es_CL.js +22 -0
  748. data/vendor/assets/javascripts/jquery-validate/localization/methods_es_CL.min.js +4 -0
  749. data/vendor/assets/javascripts/jquery-validate/localization/methods_fi.js +22 -0
  750. data/vendor/assets/javascripts/jquery-validate/localization/methods_fi.min.js +4 -0
  751. data/vendor/assets/javascripts/jquery-validate/localization/methods_nl.js +19 -0
  752. data/vendor/assets/javascripts/jquery-validate/localization/methods_nl.min.js +4 -0
  753. data/vendor/assets/javascripts/jquery-validate/localization/methods_pt.js +19 -0
  754. data/vendor/assets/javascripts/jquery-validate/localization/methods_pt.min.js +4 -0
  755. data/vendor/assets/javascripts/jquery.mousewheel.js +201 -0
  756. data/vendor/assets/javascripts/jvectormap/index.html +0 -0
  757. data/vendor/assets/javascripts/jvectormap/jquery-jvectormap-1.1.1.css +37 -0
  758. data/vendor/assets/javascripts/jvectormap/jquery-jvectormap-1.1.1.min.js +7 -0
  759. data/vendor/assets/javascripts/jvectormap/jquery-jvectormap-1.2.2.css +37 -0
  760. data/vendor/assets/javascripts/jvectormap/jquery-jvectormap-1.2.2.min.js +8 -0
  761. data/vendor/assets/javascripts/jvectormap/regions/index.html +0 -0
  762. data/vendor/assets/javascripts/jvectormap/regions/jquery-jvectormap-it-mill-en.js +1 -0
  763. data/vendor/assets/javascripts/jvectormap/regions/jquery-jvectormap-world-mill-en.js +1 -0
  764. data/vendor/assets/javascripts/knob/index.html +0 -0
  765. data/vendor/assets/javascripts/knob/jquery.knob.min.js +1 -0
  766. data/vendor/assets/javascripts/min/bootstrap.min-min.js +2 -0
  767. data/vendor/assets/javascripts/min/resizeable-min.js +1 -0
  768. data/vendor/assets/javascripts/min/xenon-notes-min.js +1 -0
  769. data/vendor/assets/javascripts/min/xenon-toggles-min.js +1 -0
  770. data/vendor/assets/javascripts/moment.min.js +6 -0
  771. data/vendor/assets/javascripts/multiselect/css/index.html +0 -0
  772. data/vendor/assets/javascripts/multiselect/css/multi-select.css +93 -0
  773. data/vendor/assets/javascripts/multiselect/img/index.html +0 -0
  774. data/vendor/assets/javascripts/multiselect/img/switch.png +0 -0
  775. data/vendor/assets/javascripts/multiselect/index.html +0 -0
  776. data/vendor/assets/javascripts/multiselect/js/index.html +0 -0
  777. data/vendor/assets/javascripts/multiselect/js/jquery.multi-select.js +532 -0
  778. data/vendor/assets/javascripts/resizeable.js +122 -0
  779. data/vendor/assets/javascripts/rwd-table/css/rwd-table.css +306 -0
  780. data/vendor/assets/javascripts/rwd-table/css/rwd-table.min.css +7 -0
  781. data/vendor/assets/javascripts/rwd-table/index.html +0 -0
  782. data/vendor/assets/javascripts/rwd-table/js/rwd-table.js +674 -0
  783. data/vendor/assets/javascripts/rwd-table/js/rwd-table.min.js +7 -0
  784. data/vendor/assets/javascripts/select2/LICENSE +18 -0
  785. data/vendor/assets/javascripts/select2/index.html +0 -0
  786. data/vendor/assets/javascripts/select2/select2-bootstrap.css +87 -0
  787. data/vendor/assets/javascripts/select2/select2-spinner.gif +0 -0
  788. data/vendor/assets/javascripts/select2/select2.css +704 -0
  789. data/vendor/assets/javascripts/select2/select2.jquery.json +36 -0
  790. data/vendor/assets/javascripts/select2/select2.js +3508 -0
  791. data/vendor/assets/javascripts/select2/select2.min.js +23 -0
  792. data/vendor/assets/javascripts/select2/select2.png +0 -0
  793. data/vendor/assets/javascripts/select2/select2_locale_ar.js +19 -0
  794. data/vendor/assets/javascripts/select2/select2_locale_az.js +20 -0
  795. data/vendor/assets/javascripts/select2/select2_locale_bg.js +20 -0
  796. data/vendor/assets/javascripts/select2/select2_locale_ca.js +19 -0
  797. data/vendor/assets/javascripts/select2/select2_locale_cs.js +51 -0
  798. data/vendor/assets/javascripts/select2/select2_locale_da.js +19 -0
  799. data/vendor/assets/javascripts/select2/select2_locale_de.js +18 -0
  800. data/vendor/assets/javascripts/select2/select2_locale_el.js +19 -0
  801. data/vendor/assets/javascripts/select2/select2_locale_en.js.template +20 -0
  802. data/vendor/assets/javascripts/select2/select2_locale_es.js +17 -0
  803. data/vendor/assets/javascripts/select2/select2_locale_et.js +19 -0
  804. data/vendor/assets/javascripts/select2/select2_locale_eu.js +45 -0
  805. data/vendor/assets/javascripts/select2/select2_locale_fa.js +21 -0
  806. data/vendor/assets/javascripts/select2/select2_locale_fi.js +30 -0
  807. data/vendor/assets/javascripts/select2/select2_locale_fr.js +18 -0
  808. data/vendor/assets/javascripts/select2/select2_locale_gl.js +45 -0
  809. data/vendor/assets/javascripts/select2/select2_locale_he.js +19 -0
  810. data/vendor/assets/javascripts/select2/select2_locale_hr.js +24 -0
  811. data/vendor/assets/javascripts/select2/select2_locale_hu.js +17 -0
  812. data/vendor/assets/javascripts/select2/select2_locale_id.js +19 -0
  813. data/vendor/assets/javascripts/select2/select2_locale_is.js +17 -0
  814. data/vendor/assets/javascripts/select2/select2_locale_it.js +17 -0
  815. data/vendor/assets/javascripts/select2/select2_locale_ja.js +17 -0
  816. data/vendor/assets/javascripts/select2/select2_locale_ka.js +19 -0
  817. data/vendor/assets/javascripts/select2/select2_locale_ko.js +19 -0
  818. data/vendor/assets/javascripts/select2/select2_locale_lt.js +26 -0
  819. data/vendor/assets/javascripts/select2/select2_locale_lv.js +19 -0
  820. data/vendor/assets/javascripts/select2/select2_locale_mk.js +19 -0
  821. data/vendor/assets/javascripts/select2/select2_locale_ms.js +19 -0
  822. data/vendor/assets/javascripts/select2/select2_locale_nl.js +17 -0
  823. data/vendor/assets/javascripts/select2/select2_locale_no.js +20 -0
  824. data/vendor/assets/javascripts/select2/select2_locale_pl.js +25 -0
  825. data/vendor/assets/javascripts/select2/select2_locale_pt-BR.js +17 -0
  826. data/vendor/assets/javascripts/select2/select2_locale_pt-PT.js +17 -0
  827. data/vendor/assets/javascripts/select2/select2_locale_ro.js +17 -0
  828. data/vendor/assets/javascripts/select2/select2_locale_rs.js +19 -0
  829. data/vendor/assets/javascripts/select2/select2_locale_ru.js +23 -0
  830. data/vendor/assets/javascripts/select2/select2_locale_sk.js +50 -0
  831. data/vendor/assets/javascripts/select2/select2_locale_sv.js +19 -0
  832. data/vendor/assets/javascripts/select2/select2_locale_th.js +19 -0
  833. data/vendor/assets/javascripts/select2/select2_locale_tr.js +19 -0
  834. data/vendor/assets/javascripts/select2/select2_locale_ug-CN.js +16 -0
  835. data/vendor/assets/javascripts/select2/select2_locale_uk.js +25 -0
  836. data/vendor/assets/javascripts/select2/select2_locale_vi.js +20 -0
  837. data/vendor/assets/javascripts/select2/select2_locale_zh-CN.js +16 -0
  838. data/vendor/assets/javascripts/select2/select2_locale_zh-TW.js +16 -0
  839. data/vendor/assets/javascripts/select2/select2x2.png +0 -0
  840. data/vendor/assets/javascripts/selectboxit/index.html +0 -0
  841. data/vendor/assets/javascripts/selectboxit/jquery.selectBoxIt.css +278 -0
  842. data/vendor/assets/javascripts/selectboxit/jquery.selectBoxIt.js +3259 -0
  843. data/vendor/assets/javascripts/selectboxit/jquery.selectBoxIt.min.js +4 -0
  844. data/vendor/assets/javascripts/tagsinput/bootstrap-tagsinput.css +46 -0
  845. data/vendor/assets/javascripts/tagsinput/bootstrap-tagsinput.js +617 -0
  846. data/vendor/assets/javascripts/tagsinput/bootstrap-tagsinput.less +50 -0
  847. data/vendor/assets/javascripts/tagsinput/bootstrap-tagsinput.min.js +7 -0
  848. data/vendor/assets/javascripts/tagsinput/bootstrap-tagsinput.min.js.map +1 -0
  849. data/vendor/assets/javascripts/tagsinput/index.html +0 -0
  850. data/vendor/assets/javascripts/tagsinput/min/bootstrap-tagsinput.min-min.js +8 -0
  851. data/vendor/assets/javascripts/timepicker/bootstrap-timepicker.min.js +5 -0
  852. data/vendor/assets/javascripts/timepicker/index.html +0 -0
  853. data/vendor/assets/javascripts/toastr/index.html +0 -0
  854. data/vendor/assets/javascripts/toastr/toastr-icon.png +0 -0
  855. data/vendor/assets/javascripts/toastr/toastr.css +180 -0
  856. data/vendor/assets/javascripts/toastr/toastr.js +350 -0
  857. data/vendor/assets/javascripts/toastr/toastr.less +232 -0
  858. data/vendor/assets/javascripts/toastr/toastr.min.css +1 -0
  859. data/vendor/assets/javascripts/toastr/toastr.min.js +1 -0
  860. data/vendor/assets/javascripts/toastr/toastr.min.js.map +8 -0
  861. data/vendor/assets/javascripts/toastr/toastr.scss +183 -0
  862. data/vendor/assets/javascripts/tocify/index.html +0 -0
  863. data/vendor/assets/javascripts/tocify/jquery.tocify.css +62 -0
  864. data/vendor/assets/javascripts/tocify/jquery.tocify.min.js +4 -0
  865. data/vendor/assets/javascripts/typeahead.bundle.js +1782 -0
  866. data/vendor/assets/javascripts/uikit/css/addons/uikit.addons.css +1253 -0
  867. data/vendor/assets/javascripts/uikit/css/addons/uikit.addons.min.css +3 -0
  868. data/vendor/assets/javascripts/uikit/css/addons/uikit.almost-flat.addons.css +1334 -0
  869. data/vendor/assets/javascripts/uikit/css/addons/uikit.almost-flat.addons.min.css +3 -0
  870. data/vendor/assets/javascripts/uikit/css/addons/uikit.gradient.addons.css +1355 -0
  871. data/vendor/assets/javascripts/uikit/css/addons/uikit.gradient.addons.min.css +3 -0
  872. data/vendor/assets/javascripts/uikit/css/index.html +0 -0
  873. data/vendor/assets/javascripts/uikit/css/uikit.almost-flat.css +7273 -0
  874. data/vendor/assets/javascripts/uikit/css/uikit.almost-flat.min.css +3 -0
  875. data/vendor/assets/javascripts/uikit/css/uikit.css +1 -0
  876. data/vendor/assets/javascripts/uikit/css/uikit.gradient.css +7341 -0
  877. data/vendor/assets/javascripts/uikit/css/uikit.gradient.min.css +3 -0
  878. data/vendor/assets/javascripts/uikit/css/uikit.min.css +3 -0
  879. data/vendor/assets/javascripts/uikit/fonts/FontAwesome.otf +0 -0
  880. data/vendor/assets/javascripts/uikit/fonts/fontawesome-webfont.eot +0 -0
  881. data/vendor/assets/javascripts/uikit/fonts/fontawesome-webfont.ttf +0 -0
  882. data/vendor/assets/javascripts/uikit/fonts/fontawesome-webfont.woff +0 -0
  883. data/vendor/assets/javascripts/uikit/fonts/index.html +0 -0
  884. data/vendor/assets/javascripts/uikit/index.html +0 -0
  885. data/vendor/assets/javascripts/uikit/js/addons/autocomplete.js +305 -0
  886. data/vendor/assets/javascripts/uikit/js/addons/autocomplete.min.js +3 -0
  887. data/vendor/assets/javascripts/uikit/js/addons/cover.js +90 -0
  888. data/vendor/assets/javascripts/uikit/js/addons/cover.min.js +3 -0
  889. data/vendor/assets/javascripts/uikit/js/addons/datepicker.js +379 -0
  890. data/vendor/assets/javascripts/uikit/js/addons/datepicker.min.js +3 -0
  891. data/vendor/assets/javascripts/uikit/js/addons/form-password.js +62 -0
  892. data/vendor/assets/javascripts/uikit/js/addons/form-password.min.js +3 -0
  893. data/vendor/assets/javascripts/uikit/js/addons/form-select.js +62 -0
  894. data/vendor/assets/javascripts/uikit/js/addons/form-select.min.js +3 -0
  895. data/vendor/assets/javascripts/uikit/js/addons/htmleditor.js +615 -0
  896. data/vendor/assets/javascripts/uikit/js/addons/htmleditor.min.js +3 -0
  897. data/vendor/assets/javascripts/uikit/js/addons/nestable.js +575 -0
  898. data/vendor/assets/javascripts/uikit/js/addons/nestable.min.js +3 -0
  899. data/vendor/assets/javascripts/uikit/js/addons/notify.js +180 -0
  900. data/vendor/assets/javascripts/uikit/js/addons/notify.min.js +3 -0
  901. data/vendor/assets/javascripts/uikit/js/addons/pagination.js +146 -0
  902. data/vendor/assets/javascripts/uikit/js/addons/pagination.min.js +3 -0
  903. data/vendor/assets/javascripts/uikit/js/addons/search.js +90 -0
  904. data/vendor/assets/javascripts/uikit/js/addons/search.min.js +3 -0
  905. data/vendor/assets/javascripts/uikit/js/addons/sortable.js +520 -0
  906. data/vendor/assets/javascripts/uikit/js/addons/sortable.min.js +3 -0
  907. data/vendor/assets/javascripts/uikit/js/addons/sticky.js +240 -0
  908. data/vendor/assets/javascripts/uikit/js/addons/sticky.min.js +3 -0
  909. data/vendor/assets/javascripts/uikit/js/addons/timepicker.js +165 -0
  910. data/vendor/assets/javascripts/uikit/js/addons/timepicker.min.js +3 -0
  911. data/vendor/assets/javascripts/uikit/js/addons/upload.js +256 -0
  912. data/vendor/assets/javascripts/uikit/js/addons/upload.min.js +3 -0
  913. data/vendor/assets/javascripts/uikit/js/index.html +0 -0
  914. data/vendor/assets/javascripts/uikit/js/uikit.js +2592 -0
  915. data/vendor/assets/javascripts/uikit/js/uikit.min.js +4 -0
  916. data/vendor/assets/javascripts/uikit/less/addons/autocomplete.less +102 -0
  917. data/vendor/assets/javascripts/uikit/less/addons/cover.less +70 -0
  918. data/vendor/assets/javascripts/uikit/less/addons/datepicker.less +193 -0
  919. data/vendor/assets/javascripts/uikit/less/addons/dotnav.less +141 -0
  920. data/vendor/assets/javascripts/uikit/less/addons/flex.less +62 -0
  921. data/vendor/assets/javascripts/uikit/less/addons/form-advanced.less +123 -0
  922. data/vendor/assets/javascripts/uikit/less/addons/form-file.less +63 -0
  923. data/vendor/assets/javascripts/uikit/less/addons/form-password.less +74 -0
  924. data/vendor/assets/javascripts/uikit/less/addons/form-select.less +66 -0
  925. data/vendor/assets/javascripts/uikit/less/addons/htmleditor.less +274 -0
  926. data/vendor/assets/javascripts/uikit/less/addons/nestable.less +204 -0
  927. data/vendor/assets/javascripts/uikit/less/addons/notify.less +191 -0
  928. data/vendor/assets/javascripts/uikit/less/addons/placeholder.less +66 -0
  929. data/vendor/assets/javascripts/uikit/less/addons/search.less +310 -0
  930. data/vendor/assets/javascripts/uikit/less/addons/slidenav.less +164 -0
  931. data/vendor/assets/javascripts/uikit/less/addons/sortable.less +110 -0
  932. data/vendor/assets/javascripts/uikit/less/addons/sticky.less +52 -0
  933. data/vendor/assets/javascripts/uikit/less/addons/upload.less +34 -0
  934. data/vendor/assets/javascripts/uikit/less/alert.less +141 -0
  935. data/vendor/assets/javascripts/uikit/less/animation.less +580 -0
  936. data/vendor/assets/javascripts/uikit/less/article.less +139 -0
  937. data/vendor/assets/javascripts/uikit/less/badge.less +111 -0
  938. data/vendor/assets/javascripts/uikit/less/base.less +521 -0
  939. data/vendor/assets/javascripts/uikit/less/breadcrumb.less +86 -0
  940. data/vendor/assets/javascripts/uikit/less/button.less +407 -0
  941. data/vendor/assets/javascripts/uikit/less/close.less +133 -0
  942. data/vendor/assets/javascripts/uikit/less/comment.less +172 -0
  943. data/vendor/assets/javascripts/uikit/less/description-list.less +70 -0
  944. data/vendor/assets/javascripts/uikit/less/dropdown.less +272 -0
  945. data/vendor/assets/javascripts/uikit/less/form.less +623 -0
  946. data/vendor/assets/javascripts/uikit/less/grid.less +593 -0
  947. data/vendor/assets/javascripts/uikit/less/icon.less +695 -0
  948. data/vendor/assets/javascripts/uikit/less/index.html +0 -0
  949. data/vendor/assets/javascripts/uikit/less/list.less +102 -0
  950. data/vendor/assets/javascripts/uikit/less/modal.less +226 -0
  951. data/vendor/assets/javascripts/uikit/less/nav.less +468 -0
  952. data/vendor/assets/javascripts/uikit/less/navbar.less +327 -0
  953. data/vendor/assets/javascripts/uikit/less/offcanvas.less +162 -0
  954. data/vendor/assets/javascripts/uikit/less/overlay.less +241 -0
  955. data/vendor/assets/javascripts/uikit/less/pagination.less +198 -0
  956. data/vendor/assets/javascripts/uikit/less/panel.less +244 -0
  957. data/vendor/assets/javascripts/uikit/less/print.less +52 -0
  958. data/vendor/assets/javascripts/uikit/less/progress.less +174 -0
  959. data/vendor/assets/javascripts/uikit/less/subnav.less +183 -0
  960. data/vendor/assets/javascripts/uikit/less/switcher.less +33 -0
  961. data/vendor/assets/javascripts/uikit/less/tab.less +368 -0
  962. data/vendor/assets/javascripts/uikit/less/table.less +120 -0
  963. data/vendor/assets/javascripts/uikit/less/text.less +124 -0
  964. data/vendor/assets/javascripts/uikit/less/thumbnail.less +123 -0
  965. data/vendor/assets/javascripts/uikit/less/tooltip.less +179 -0
  966. data/vendor/assets/javascripts/uikit/less/uikit-addons.less +26 -0
  967. data/vendor/assets/javascripts/uikit/less/uikit.css +4426 -0
  968. data/vendor/assets/javascripts/uikit/less/uikit.less +53 -0
  969. data/vendor/assets/javascripts/uikit/less/utility.less +526 -0
  970. data/vendor/assets/javascripts/uikit/less/variables.less +27 -0
  971. data/vendor/assets/javascripts/uikit/uikit.css +1 -0
  972. data/vendor/assets/javascripts/uikit/vendor/codemirror/codemirror.css +340 -0
  973. data/vendor/assets/javascripts/uikit/vendor/codemirror/codemirror.js +65 -0
  974. data/vendor/assets/javascripts/uikit/vendor/codemirror/show-hint.css +38 -0
  975. data/vendor/assets/javascripts/uikit/vendor/customizer.js +290 -0
  976. data/vendor/assets/javascripts/uikit/vendor/highlight/highlight.css +127 -0
  977. data/vendor/assets/javascripts/uikit/vendor/highlight/highlight.js +1 -0
  978. data/vendor/assets/javascripts/uikit/vendor/highlight/test.html +45 -0
  979. data/vendor/assets/javascripts/uikit/vendor/holder.js +648 -0
  980. data/vendor/assets/javascripts/uikit/vendor/index.html +0 -0
  981. data/vendor/assets/javascripts/uikit/vendor/jquery.js +4 -0
  982. data/vendor/assets/javascripts/uikit/vendor/jquery.less.js +274 -0
  983. data/vendor/assets/javascripts/uikit/vendor/jquery.mustache.js +16 -0
  984. data/vendor/assets/javascripts/uikit/vendor/jquery.rtl.js +271 -0
  985. data/vendor/assets/javascripts/uikit/vendor/less.js +16 -0
  986. data/vendor/assets/javascripts/uikit/vendor/marked.js +1272 -0
  987. data/vendor/assets/javascripts/uikit/vendor/spectrum/spectrum.css +480 -0
  988. data/vendor/assets/javascripts/uikit/vendor/spectrum/spectrum.js +1889 -0
  989. data/vendor/assets/javascripts/uikit/vendor/spectrum/test.html +343 -0
  990. data/vendor/assets/javascripts/wysihtml5/index.html +0 -0
  991. data/vendor/assets/javascripts/wysihtml5/lib/css/bootstrap-responsive.css +686 -0
  992. data/vendor/assets/javascripts/wysihtml5/lib/css/bootstrap-responsive.min.css +12 -0
  993. data/vendor/assets/javascripts/wysihtml5/lib/css/bootstrap.css +3990 -0
  994. data/vendor/assets/javascripts/wysihtml5/lib/css/bootstrap.min.css +689 -0
  995. data/vendor/assets/javascripts/wysihtml5/lib/css/index.html +0 -0
  996. data/vendor/assets/javascripts/wysihtml5/lib/css/prettify.css +30 -0
  997. data/vendor/assets/javascripts/wysihtml5/lib/css/wysiwyg-color.css +67 -0
  998. data/vendor/assets/javascripts/wysihtml5/lib/img/glyphicons-halflings-white.png +0 -0
  999. data/vendor/assets/javascripts/wysihtml5/lib/img/glyphicons-halflings.png +0 -0
  1000. data/vendor/assets/javascripts/wysihtml5/lib/img/index.html +0 -0
  1001. data/vendor/assets/javascripts/wysihtml5/lib/index.html +0 -0
  1002. data/vendor/assets/javascripts/wysihtml5/lib/js/bootstrap-button.js +100 -0
  1003. data/vendor/assets/javascripts/wysihtml5/lib/js/bootstrap.js +2025 -0
  1004. data/vendor/assets/javascripts/wysihtml5/lib/js/bootstrap.min.js +6 -0
  1005. data/vendor/assets/javascripts/wysihtml5/lib/js/index.html +0 -0
  1006. data/vendor/assets/javascripts/wysihtml5/lib/js/jquery-1.7.2.min.js +4 -0
  1007. data/vendor/assets/javascripts/wysihtml5/lib/js/prettify.js +28 -0
  1008. data/vendor/assets/javascripts/wysihtml5/lib/js/wysihtml5-0.3.0.js +9523 -0
  1009. data/vendor/assets/javascripts/wysihtml5/lib/js/wysihtml5-0.3.0.min.js +261 -0
  1010. data/vendor/assets/javascripts/wysihtml5/src/bootstrap-wysihtml5.css +102 -0
  1011. data/vendor/assets/javascripts/wysihtml5/src/bootstrap-wysihtml5.js +519 -0
  1012. data/vendor/assets/javascripts/wysihtml5/src/index.html +0 -0
  1013. data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.ar-AR.js +49 -0
  1014. data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.bg-BG.js +49 -0
  1015. data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.ca-CT.js +47 -0
  1016. data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.cs-CZ.js +48 -0
  1017. data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.da-DK.js +48 -0
  1018. data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.de-DE.js +49 -0
  1019. data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.el-GR.js +48 -0
  1020. data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.es-AR.js +49 -0
  1021. data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.es-ES.js +48 -0
  1022. data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.fr-FR.js +49 -0
  1023. data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.hr-HR.js +48 -0
  1024. data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.it-IT.js +47 -0
  1025. data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.ja-JP.js +49 -0
  1026. data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.ko-KR.js +49 -0
  1027. data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.lt-LT.js +48 -0
  1028. data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.mo-MD.js +48 -0
  1029. data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.nb-NB.js +49 -0
  1030. data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.nl-NL.js +48 -0
  1031. data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.pl-PL.js +48 -0
  1032. data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.pt-BR.js +52 -0
  1033. data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.ru-RU.js +49 -0
  1034. data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.sk-SK.js +48 -0
  1035. data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.sv-SE.js +48 -0
  1036. data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.tr-TR.js +48 -0
  1037. data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.ua-UA.js +49 -0
  1038. data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.zh-CN.js +48 -0
  1039. data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.zh-TW.js +48 -0
  1040. data/vendor/assets/javascripts/wysihtml5/src/locales/index.html +0 -0
  1041. data/vendor/assets/javascripts/wysihtml5/wysihtml5-angular.js +10042 -0
  1042. data/vendor/assets/javascripts/xenon-api.js +91 -0
  1043. data/vendor/assets/javascripts/xenon-custom.js +1950 -0
  1044. data/vendor/assets/javascripts/xenon-notes.js +189 -0
  1045. data/vendor/assets/javascripts/xenon-toggles.js +321 -0
  1046. data/vendor/assets/javascripts/xenon-widgets.js +171 -0
  1047. data/vendor/assets/stylesheets/bootstrap.css +1 -0
  1048. data/vendor/assets/stylesheets/handycss.css +996 -0
  1049. data/vendor/assets/stylesheets/other/wysihtml5-color.css +67 -0
  1050. data/vendor/assets/stylesheets/xenon-components.css +1 -0
  1051. data/vendor/assets/stylesheets/xenon-core.css +1 -0
  1052. data/vendor/assets/stylesheets/xenon-forms.css +18 -0
  1053. data/vendor/assets/stylesheets/xenon-skins.css +1 -0
  1054. data/vendor/assets/stylesheets/xenon.css +18 -0
  1055. metadata +1341 -0
@@ -0,0 +1,4 @@
1
+ /*! jquery.tocify - v1.9.0 - 2013-10-01
2
+ * http://gregfranko.com/jquery.tocify.js/
3
+ * Copyright (c) 2013 Greg Franko; Licensed MIT*/
4
+ (function(e){"use strict";e(window.jQuery,window,document)})(function(e,t,s){"use strict";var i="tocify",o="tocify-focus",n="tocify-hover",a="tocify-hide",l="tocify-header",h="."+l,r="tocify-subheader",d="."+r,c="tocify-item",f="."+c,u="tocify-extend-page",p="."+u;e.widget("toc.tocify",{version:"1.9.0",options:{context:"body",ignoreSelector:null,selectors:"h1, h2, h3",showAndHide:!0,showEffect:"slideDown",showEffectSpeed:"medium",hideEffect:"slideUp",hideEffectSpeed:"medium",smoothScroll:!0,smoothScrollSpeed:"medium",scrollTo:0,showAndHideOnScroll:!0,highlightOnScroll:!0,highlightOffset:40,theme:"bootstrap",extendPage:!0,extendPageOffset:100,history:!0,scrollHistory:!1,hashGenerator:"compact",highlightDefault:!0},_create:function(){var s=this;s.extendPageScroll=!0,s.items=[],s._generateToc(),s._addCSSClasses(),s.webkit=function(){for(var e in t)if(e&&-1!==e.toLowerCase().indexOf("webkit"))return!0;return!1}(),s._setEventHandlers(),e(t).load(function(){s._setActiveElement(!0),e("html, body").promise().done(function(){setTimeout(function(){s.extendPageScroll=!1},0)})})},_generateToc:function(){var t,s,o=this,n=o.options.ignoreSelector;return t=-1!==this.options.selectors.indexOf(",")?e(this.options.context).find(this.options.selectors.replace(/ /g,"").substr(0,this.options.selectors.indexOf(","))):e(this.options.context).find(this.options.selectors.replace(/ /g,"")),t.length?(o.element.addClass(i),t.each(function(t){e(this).is(n)||(s=e("<ul/>",{id:l+t,"class":l}).append(o._nestElements(e(this),t)),o.element.append(s),e(this).nextUntil(this.nodeName.toLowerCase()).each(function(){0===e(this).find(o.options.selectors).length?e(this).filter(o.options.selectors).each(function(){e(this).is(n)||o._appendSubheaders.call(this,o,s)}):e(this).find(o.options.selectors).each(function(){e(this).is(n)||o._appendSubheaders.call(this,o,s)})}))}),undefined):(o.element.addClass(a),undefined)},_setActiveElement:function(e){var s=this,i=t.location.hash.substring(1),o=s.element.find('li[data-unique="'+i+'"]');return i.length?(s.element.find("."+s.focusClass).removeClass(s.focusClass),o.addClass(s.focusClass),s.options.showAndHide&&o.click()):(s.element.find("."+s.focusClass).removeClass(s.focusClass),!i.length&&e&&s.options.highlightDefault&&s.element.find(f).first().addClass(s.focusClass)),s},_nestElements:function(t,s){var i,o,n;return i=e.grep(this.items,function(e){return e===t.text()}),i.length?this.items.push(t.text()+s):this.items.push(t.text()),n=this._generateHashValue(i,t,s),o=e("<li/>",{"class":c,"data-unique":n}).append(e("<a/>",{text:t.text()})),t.before(e("<div/>",{name:n,"data-unique":n})),o},_generateHashValue:function(e,t,s){var i="",o=this.options.hashGenerator;if("pretty"===o){for(i=t.text().toLowerCase().replace(/\s/g,"-");i.indexOf("--")>-1;)i=i.replace(/--/g,"-");for(;i.indexOf(":-")>-1;)i=i.replace(/:-/g,"-")}else i="function"==typeof o?o(t.text(),t):t.text().replace(/\s/g,"");return e.length&&(i+=""+s),i},_appendSubheaders:function(t,s){var i=e(this).index(t.options.selectors),o=e(t.options.selectors).eq(i-1),n=+e(this).prop("tagName").charAt(1),a=+o.prop("tagName").charAt(1);a>n?t.element.find(d+"[data-tag="+n+"]").last().append(t._nestElements(e(this),i)):n===a?s.find(f).last().after(t._nestElements(e(this),i)):s.find(f).last().after(e("<ul/>",{"class":r,"data-tag":n})).next(d).append(t._nestElements(e(this),i))},_setEventHandlers:function(){var i=this;this.element.on("click.tocify","li",function(){if(i.options.history&&(t.location.hash=e(this).attr("data-unique")),i.element.find("."+i.focusClass).removeClass(i.focusClass),e(this).addClass(i.focusClass),i.options.showAndHide){var s=e('li[data-unique="'+e(this).attr("data-unique")+'"]');i._triggerShow(s)}i._scrollTo(e(this))}),this.element.find("li").on({"mouseenter.tocify":function(){e(this).addClass(i.hoverClass),e(this).css("cursor","pointer")},"mouseleave.tocify":function(){"bootstrap"!==i.options.theme&&e(this).removeClass(i.hoverClass)}}),(i.options.extendPage||i.options.highlightOnScroll||i.options.scrollHistory||i.options.showAndHideOnScroll)&&e(t).on("scroll.tocify",function(){e("html, body").promise().done(function(){var o,n,a,l,h=e(t).scrollTop(),r=e(t).height(),d=e(s).height(),c=e("body")[0].scrollHeight;if(i.options.extendPage&&(i.webkit&&h>=c-r-i.options.extendPageOffset||!i.webkit&&r+h>d-i.options.extendPageOffset)&&!e(p).length){if(n=e('div[data-unique="'+e(f).last().attr("data-unique")+'"]'),!n.length)return;a=n.offset().top,e(i.options.context).append(e("<div />",{"class":u,height:Math.abs(a-h)+"px","data-unique":u})),i.extendPageScroll&&(l=i.element.find("li.active"),i._scrollTo(e('div[data-unique="'+l.attr("data-unique")+'"]')))}setTimeout(function(){var s,n=null,a=null,l=e(i.options.context).find("div[data-unique]");l.each(function(t){var s=Math.abs((e(this).next().length?e(this).next():e(this)).offset().top-h-i.options.highlightOffset);return null==n||n>s?(n=s,a=t,undefined):!1}),s=e(l[a]).attr("data-unique"),o=e('li[data-unique="'+s+'"]'),i.options.highlightOnScroll&&o.length&&(i.element.find("."+i.focusClass).removeClass(i.focusClass),o.addClass(i.focusClass)),i.options.scrollHistory&&t.location.hash!=="#"+s&&t.location.replace("#"+s),i.options.showAndHideOnScroll&&i.options.showAndHide&&i._triggerShow(o,!0)},0)})})},show:function(t){var s=this;if(!t.is(":visible"))switch(t.find(d).length||t.parent().is(h)||t.parent().is(":visible")?t.children(d).length||t.parent().is(h)||(t=t.closest(d)):t=t.parents(d).add(t),s.options.showEffect){case"none":t.show();break;case"show":t.show(s.options.showEffectSpeed);break;case"slideDown":t.slideDown(s.options.showEffectSpeed);break;case"fadeIn":t.fadeIn(s.options.showEffectSpeed);break;default:t.show()}return t.parent().is(h)?s.hide(e(d).not(t)):s.hide(e(d).not(t.closest(h).find(d).not(t.siblings()))),s},hide:function(e){var t=this;switch(t.options.hideEffect){case"none":e.hide();break;case"hide":e.hide(t.options.hideEffectSpeed);break;case"slideUp":e.slideUp(t.options.hideEffectSpeed);break;case"fadeOut":e.fadeOut(t.options.hideEffectSpeed);break;default:e.hide()}return t},_triggerShow:function(e,t){var s=this;return e.parent().is(h)||e.next().is(d)?s.show(e.next(d),t):e.parent().is(d)&&s.show(e.parent(),t),s},_addCSSClasses:function(){return"jqueryui"===this.options.theme?(this.focusClass="ui-state-default",this.hoverClass="ui-state-hover",this.element.addClass("ui-widget").find(".toc-title").addClass("ui-widget-header").end().find("li").addClass("ui-widget-content")):"bootstrap"===this.options.theme?(this.element.find(h+","+d).addClass("nav nav-list"),this.focusClass="active"):(this.focusClass=o,this.hoverClass=n),this},setOption:function(){e.Widget.prototype._setOption.apply(this,arguments)},setOptions:function(){e.Widget.prototype._setOptions.apply(this,arguments)},_scrollTo:function(t){var s=this,i=s.options.smoothScroll||0,o=s.options.scrollTo,n=e('div[data-unique="'+t.attr("data-unique")+'"]');return n.length?(e("html, body").promise().done(function(){e("html, body").animate({scrollTop:n.offset().top-(e.isFunction(o)?o.call():o)+"px"},{duration:i})}),s):s}})});
@@ -0,0 +1,1782 @@
1
+ /*!
2
+ * typeahead.js 0.10.4
3
+ * https://github.com/twitter/typeahead.js
4
+ * Copyright 2013-2014 Twitter, Inc. and other contributors; Licensed MIT
5
+ */
6
+
7
+ (function($) {
8
+ var _ = function() {
9
+ "use strict";
10
+ return {
11
+ isMsie: function() {
12
+ return /(msie|trident)/i.test(navigator.userAgent) ? navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2] : false;
13
+ },
14
+ isBlankString: function(str) {
15
+ return !str || /^\s*$/.test(str);
16
+ },
17
+ escapeRegExChars: function(str) {
18
+ return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
19
+ },
20
+ isString: function(obj) {
21
+ return typeof obj === "string";
22
+ },
23
+ isNumber: function(obj) {
24
+ return typeof obj === "number";
25
+ },
26
+ isArray: $.isArray,
27
+ isFunction: $.isFunction,
28
+ isObject: $.isPlainObject,
29
+ isUndefined: function(obj) {
30
+ return typeof obj === "undefined";
31
+ },
32
+ toStr: function toStr(s) {
33
+ return _.isUndefined(s) || s === null ? "" : s + "";
34
+ },
35
+ bind: $.proxy,
36
+ each: function(collection, cb) {
37
+ $.each(collection, reverseArgs);
38
+ function reverseArgs(index, value) {
39
+ return cb(value, index);
40
+ }
41
+ },
42
+ map: $.map,
43
+ filter: $.grep,
44
+ every: function(obj, test) {
45
+ var result = true;
46
+ if (!obj) {
47
+ return result;
48
+ }
49
+ $.each(obj, function(key, val) {
50
+ if (!(result = test.call(null, val, key, obj))) {
51
+ return false;
52
+ }
53
+ });
54
+ return !!result;
55
+ },
56
+ some: function(obj, test) {
57
+ var result = false;
58
+ if (!obj) {
59
+ return result;
60
+ }
61
+ $.each(obj, function(key, val) {
62
+ if (result = test.call(null, val, key, obj)) {
63
+ return false;
64
+ }
65
+ });
66
+ return !!result;
67
+ },
68
+ mixin: $.extend,
69
+ getUniqueId: function() {
70
+ var counter = 0;
71
+ return function() {
72
+ return counter++;
73
+ };
74
+ }(),
75
+ templatify: function templatify(obj) {
76
+ return $.isFunction(obj) ? obj : template;
77
+ function template() {
78
+ return String(obj);
79
+ }
80
+ },
81
+ defer: function(fn) {
82
+ setTimeout(fn, 0);
83
+ },
84
+ debounce: function(func, wait, immediate) {
85
+ var timeout, result;
86
+ return function() {
87
+ var context = this, args = arguments, later, callNow;
88
+ later = function() {
89
+ timeout = null;
90
+ if (!immediate) {
91
+ result = func.apply(context, args);
92
+ }
93
+ };
94
+ callNow = immediate && !timeout;
95
+ clearTimeout(timeout);
96
+ timeout = setTimeout(later, wait);
97
+ if (callNow) {
98
+ result = func.apply(context, args);
99
+ }
100
+ return result;
101
+ };
102
+ },
103
+ throttle: function(func, wait) {
104
+ var context, args, timeout, result, previous, later;
105
+ previous = 0;
106
+ later = function() {
107
+ previous = new Date();
108
+ timeout = null;
109
+ result = func.apply(context, args);
110
+ };
111
+ return function() {
112
+ var now = new Date(), remaining = wait - (now - previous);
113
+ context = this;
114
+ args = arguments;
115
+ if (remaining <= 0) {
116
+ clearTimeout(timeout);
117
+ timeout = null;
118
+ previous = now;
119
+ result = func.apply(context, args);
120
+ } else if (!timeout) {
121
+ timeout = setTimeout(later, remaining);
122
+ }
123
+ return result;
124
+ };
125
+ },
126
+ noop: function() {}
127
+ };
128
+ }();
129
+ var VERSION = "0.10.4";
130
+ var tokenizers = function() {
131
+ "use strict";
132
+ return {
133
+ nonword: nonword,
134
+ whitespace: whitespace,
135
+ obj: {
136
+ nonword: getObjTokenizer(nonword),
137
+ whitespace: getObjTokenizer(whitespace)
138
+ }
139
+ };
140
+ function whitespace(str) {
141
+ str = _.toStr(str);
142
+ return str ? str.split(/\s+/) : [];
143
+ }
144
+ function nonword(str) {
145
+ str = _.toStr(str);
146
+ return str ? str.split(/\W+/) : [];
147
+ }
148
+ function getObjTokenizer(tokenizer) {
149
+ return function setKey() {
150
+ var args = [].slice.call(arguments, 0);
151
+ return function tokenize(o) {
152
+ var tokens = [];
153
+ _.each(args, function(k) {
154
+ tokens = tokens.concat(tokenizer(_.toStr(o[k])));
155
+ });
156
+ return tokens;
157
+ };
158
+ };
159
+ }
160
+ }();
161
+ var LruCache = function() {
162
+ "use strict";
163
+ function LruCache(maxSize) {
164
+ this.maxSize = _.isNumber(maxSize) ? maxSize : 100;
165
+ this.reset();
166
+ if (this.maxSize <= 0) {
167
+ this.set = this.get = $.noop;
168
+ }
169
+ }
170
+ _.mixin(LruCache.prototype, {
171
+ set: function set(key, val) {
172
+ var tailItem = this.list.tail, node;
173
+ if (this.size >= this.maxSize) {
174
+ this.list.remove(tailItem);
175
+ delete this.hash[tailItem.key];
176
+ }
177
+ if (node = this.hash[key]) {
178
+ node.val = val;
179
+ this.list.moveToFront(node);
180
+ } else {
181
+ node = new Node(key, val);
182
+ this.list.add(node);
183
+ this.hash[key] = node;
184
+ this.size++;
185
+ }
186
+ },
187
+ get: function get(key) {
188
+ var node = this.hash[key];
189
+ if (node) {
190
+ this.list.moveToFront(node);
191
+ return node.val;
192
+ }
193
+ },
194
+ reset: function reset() {
195
+ this.size = 0;
196
+ this.hash = {};
197
+ this.list = new List();
198
+ }
199
+ });
200
+ function List() {
201
+ this.head = this.tail = null;
202
+ }
203
+ _.mixin(List.prototype, {
204
+ add: function add(node) {
205
+ if (this.head) {
206
+ node.next = this.head;
207
+ this.head.prev = node;
208
+ }
209
+ this.head = node;
210
+ this.tail = this.tail || node;
211
+ },
212
+ remove: function remove(node) {
213
+ node.prev ? node.prev.next = node.next : this.head = node.next;
214
+ node.next ? node.next.prev = node.prev : this.tail = node.prev;
215
+ },
216
+ moveToFront: function(node) {
217
+ this.remove(node);
218
+ this.add(node);
219
+ }
220
+ });
221
+ function Node(key, val) {
222
+ this.key = key;
223
+ this.val = val;
224
+ this.prev = this.next = null;
225
+ }
226
+ return LruCache;
227
+ }();
228
+ var PersistentStorage = function() {
229
+ "use strict";
230
+ var ls, methods;
231
+ try {
232
+ ls = window.localStorage;
233
+ ls.setItem("~~~", "!");
234
+ ls.removeItem("~~~");
235
+ } catch (err) {
236
+ ls = null;
237
+ }
238
+ function PersistentStorage(namespace) {
239
+ this.prefix = [ "__", namespace, "__" ].join("");
240
+ this.ttlKey = "__ttl__";
241
+ this.keyMatcher = new RegExp("^" + _.escapeRegExChars(this.prefix));
242
+ }
243
+ if (ls && window.JSON) {
244
+ methods = {
245
+ _prefix: function(key) {
246
+ return this.prefix + key;
247
+ },
248
+ _ttlKey: function(key) {
249
+ return this._prefix(key) + this.ttlKey;
250
+ },
251
+ get: function(key) {
252
+ if (this.isExpired(key)) {
253
+ this.remove(key);
254
+ }
255
+ return decode(ls.getItem(this._prefix(key)));
256
+ },
257
+ set: function(key, val, ttl) {
258
+ if (_.isNumber(ttl)) {
259
+ ls.setItem(this._ttlKey(key), encode(now() + ttl));
260
+ } else {
261
+ ls.removeItem(this._ttlKey(key));
262
+ }
263
+ return ls.setItem(this._prefix(key), encode(val));
264
+ },
265
+ remove: function(key) {
266
+ ls.removeItem(this._ttlKey(key));
267
+ ls.removeItem(this._prefix(key));
268
+ return this;
269
+ },
270
+ clear: function() {
271
+ var i, key, keys = [], len = ls.length;
272
+ for (i = 0; i < len; i++) {
273
+ if ((key = ls.key(i)).match(this.keyMatcher)) {
274
+ keys.push(key.replace(this.keyMatcher, ""));
275
+ }
276
+ }
277
+ for (i = keys.length; i--; ) {
278
+ this.remove(keys[i]);
279
+ }
280
+ return this;
281
+ },
282
+ isExpired: function(key) {
283
+ var ttl = decode(ls.getItem(this._ttlKey(key)));
284
+ return _.isNumber(ttl) && now() > ttl ? true : false;
285
+ }
286
+ };
287
+ } else {
288
+ methods = {
289
+ get: _.noop,
290
+ set: _.noop,
291
+ remove: _.noop,
292
+ clear: _.noop,
293
+ isExpired: _.noop
294
+ };
295
+ }
296
+ _.mixin(PersistentStorage.prototype, methods);
297
+ return PersistentStorage;
298
+ function now() {
299
+ return new Date().getTime();
300
+ }
301
+ function encode(val) {
302
+ return JSON.stringify(_.isUndefined(val) ? null : val);
303
+ }
304
+ function decode(val) {
305
+ return JSON.parse(val);
306
+ }
307
+ }();
308
+ var Transport = function() {
309
+ "use strict";
310
+ var pendingRequestsCount = 0, pendingRequests = {}, maxPendingRequests = 6, sharedCache = new LruCache(10);
311
+ function Transport(o) {
312
+ o = o || {};
313
+ this.cancelled = false;
314
+ this.lastUrl = null;
315
+ this._send = o.transport ? callbackToDeferred(o.transport) : $.ajax;
316
+ this._get = o.rateLimiter ? o.rateLimiter(this._get) : this._get;
317
+ this._cache = o.cache === false ? new LruCache(0) : sharedCache;
318
+ }
319
+ Transport.setMaxPendingRequests = function setMaxPendingRequests(num) {
320
+ maxPendingRequests = num;
321
+ };
322
+ Transport.resetCache = function resetCache() {
323
+ sharedCache.reset();
324
+ };
325
+ _.mixin(Transport.prototype, {
326
+ _get: function(url, o, cb) {
327
+ var that = this, jqXhr;
328
+ if (this.cancelled || url !== this.lastUrl) {
329
+ return;
330
+ }
331
+ if (jqXhr = pendingRequests[url]) {
332
+ jqXhr.done(done).fail(fail);
333
+ } else if (pendingRequestsCount < maxPendingRequests) {
334
+ pendingRequestsCount++;
335
+ pendingRequests[url] = this._send(url, o).done(done).fail(fail).always(always);
336
+ } else {
337
+ this.onDeckRequestArgs = [].slice.call(arguments, 0);
338
+ }
339
+ function done(resp) {
340
+ cb && cb(null, resp);
341
+ that._cache.set(url, resp);
342
+ }
343
+ function fail() {
344
+ cb && cb(true);
345
+ }
346
+ function always() {
347
+ pendingRequestsCount--;
348
+ delete pendingRequests[url];
349
+ if (that.onDeckRequestArgs) {
350
+ that._get.apply(that, that.onDeckRequestArgs);
351
+ that.onDeckRequestArgs = null;
352
+ }
353
+ }
354
+ },
355
+ get: function(url, o, cb) {
356
+ var resp;
357
+ if (_.isFunction(o)) {
358
+ cb = o;
359
+ o = {};
360
+ }
361
+ this.cancelled = false;
362
+ this.lastUrl = url;
363
+ if (resp = this._cache.get(url)) {
364
+ _.defer(function() {
365
+ cb && cb(null, resp);
366
+ });
367
+ } else {
368
+ this._get(url, o, cb);
369
+ }
370
+ return !!resp;
371
+ },
372
+ cancel: function() {
373
+ this.cancelled = true;
374
+ }
375
+ });
376
+ return Transport;
377
+ function callbackToDeferred(fn) {
378
+ return function customSendWrapper(url, o) {
379
+ var deferred = $.Deferred();
380
+ fn(url, o, onSuccess, onError);
381
+ return deferred;
382
+ function onSuccess(resp) {
383
+ _.defer(function() {
384
+ deferred.resolve(resp);
385
+ });
386
+ }
387
+ function onError(err) {
388
+ _.defer(function() {
389
+ deferred.reject(err);
390
+ });
391
+ }
392
+ };
393
+ }
394
+ }();
395
+ var SearchIndex = function() {
396
+ "use strict";
397
+ function SearchIndex(o) {
398
+ o = o || {};
399
+ if (!o.datumTokenizer || !o.queryTokenizer) {
400
+ $.error("datumTokenizer and queryTokenizer are both required");
401
+ }
402
+ this.datumTokenizer = o.datumTokenizer;
403
+ this.queryTokenizer = o.queryTokenizer;
404
+ this.reset();
405
+ }
406
+ _.mixin(SearchIndex.prototype, {
407
+ bootstrap: function bootstrap(o) {
408
+ this.datums = o.datums;
409
+ this.trie = o.trie;
410
+ },
411
+ add: function(data) {
412
+ var that = this;
413
+ data = _.isArray(data) ? data : [ data ];
414
+ _.each(data, function(datum) {
415
+ var id, tokens;
416
+ id = that.datums.push(datum) - 1;
417
+ tokens = normalizeTokens(that.datumTokenizer(datum));
418
+ _.each(tokens, function(token) {
419
+ var node, chars, ch;
420
+ node = that.trie;
421
+ chars = token.split("");
422
+ while (ch = chars.shift()) {
423
+ node = node.children[ch] || (node.children[ch] = newNode());
424
+ node.ids.push(id);
425
+ }
426
+ });
427
+ });
428
+ },
429
+ get: function get(query) {
430
+ var that = this, tokens, matches;
431
+ tokens = normalizeTokens(this.queryTokenizer(query));
432
+ _.each(tokens, function(token) {
433
+ var node, chars, ch, ids;
434
+ if (matches && matches.length === 0) {
435
+ return false;
436
+ }
437
+ node = that.trie;
438
+ chars = token.split("");
439
+ while (node && (ch = chars.shift())) {
440
+ node = node.children[ch];
441
+ }
442
+ if (node && chars.length === 0) {
443
+ ids = node.ids.slice(0);
444
+ matches = matches ? getIntersection(matches, ids) : ids;
445
+ } else {
446
+ matches = [];
447
+ return false;
448
+ }
449
+ });
450
+ return matches ? _.map(unique(matches), function(id) {
451
+ return that.datums[id];
452
+ }) : [];
453
+ },
454
+ reset: function reset() {
455
+ this.datums = [];
456
+ this.trie = newNode();
457
+ },
458
+ serialize: function serialize() {
459
+ return {
460
+ datums: this.datums,
461
+ trie: this.trie
462
+ };
463
+ }
464
+ });
465
+ return SearchIndex;
466
+ function normalizeTokens(tokens) {
467
+ tokens = _.filter(tokens, function(token) {
468
+ return !!token;
469
+ });
470
+ tokens = _.map(tokens, function(token) {
471
+ return token.toLowerCase();
472
+ });
473
+ return tokens;
474
+ }
475
+ function newNode() {
476
+ return {
477
+ ids: [],
478
+ children: {}
479
+ };
480
+ }
481
+ function unique(array) {
482
+ var seen = {}, uniques = [];
483
+ for (var i = 0, len = array.length; i < len; i++) {
484
+ if (!seen[array[i]]) {
485
+ seen[array[i]] = true;
486
+ uniques.push(array[i]);
487
+ }
488
+ }
489
+ return uniques;
490
+ }
491
+ function getIntersection(arrayA, arrayB) {
492
+ var ai = 0, bi = 0, intersection = [];
493
+ arrayA = arrayA.sort(compare);
494
+ arrayB = arrayB.sort(compare);
495
+ var lenArrayA = arrayA.length, lenArrayB = arrayB.length;
496
+ while (ai < lenArrayA && bi < lenArrayB) {
497
+ if (arrayA[ai] < arrayB[bi]) {
498
+ ai++;
499
+ } else if (arrayA[ai] > arrayB[bi]) {
500
+ bi++;
501
+ } else {
502
+ intersection.push(arrayA[ai]);
503
+ ai++;
504
+ bi++;
505
+ }
506
+ }
507
+ return intersection;
508
+ function compare(a, b) {
509
+ return a - b;
510
+ }
511
+ }
512
+ }();
513
+ var oParser = function() {
514
+ "use strict";
515
+ return {
516
+ local: getLocal,
517
+ prefetch: getPrefetch,
518
+ remote: getRemote
519
+ };
520
+ function getLocal(o) {
521
+ return o.local || null;
522
+ }
523
+ function getPrefetch(o) {
524
+ var prefetch, defaults;
525
+ defaults = {
526
+ url: null,
527
+ thumbprint: "",
528
+ ttl: 24 * 60 * 60 * 1e3,
529
+ filter: null,
530
+ ajax: {}
531
+ };
532
+ if (prefetch = o.prefetch || null) {
533
+ prefetch = _.isString(prefetch) ? {
534
+ url: prefetch
535
+ } : prefetch;
536
+ prefetch = _.mixin(defaults, prefetch);
537
+ prefetch.thumbprint = VERSION + prefetch.thumbprint;
538
+ prefetch.ajax.type = prefetch.ajax.type || "GET";
539
+ prefetch.ajax.dataType = prefetch.ajax.dataType || "json";
540
+ !prefetch.url && $.error("prefetch requires url to be set");
541
+ }
542
+ return prefetch;
543
+ }
544
+ function getRemote(o) {
545
+ var remote, defaults;
546
+ defaults = {
547
+ url: null,
548
+ cache: true,
549
+ wildcard: "%QUERY",
550
+ replace: null,
551
+ rateLimitBy: "debounce",
552
+ rateLimitWait: 300,
553
+ send: null,
554
+ filter: null,
555
+ ajax: {}
556
+ };
557
+ if (remote = o.remote || null) {
558
+ remote = _.isString(remote) ? {
559
+ url: remote
560
+ } : remote;
561
+ remote = _.mixin(defaults, remote);
562
+ remote.rateLimiter = /^throttle$/i.test(remote.rateLimitBy) ? byThrottle(remote.rateLimitWait) : byDebounce(remote.rateLimitWait);
563
+ remote.ajax.type = remote.ajax.type || "GET";
564
+ remote.ajax.dataType = remote.ajax.dataType || "json";
565
+ delete remote.rateLimitBy;
566
+ delete remote.rateLimitWait;
567
+ !remote.url && $.error("remote requires url to be set");
568
+ }
569
+ return remote;
570
+ function byDebounce(wait) {
571
+ return function(fn) {
572
+ return _.debounce(fn, wait);
573
+ };
574
+ }
575
+ function byThrottle(wait) {
576
+ return function(fn) {
577
+ return _.throttle(fn, wait);
578
+ };
579
+ }
580
+ }
581
+ }();
582
+ (function(root) {
583
+ "use strict";
584
+ var old, keys;
585
+ old = root.Bloodhound;
586
+ keys = {
587
+ data: "data",
588
+ protocol: "protocol",
589
+ thumbprint: "thumbprint"
590
+ };
591
+ root.Bloodhound = Bloodhound;
592
+ function Bloodhound(o) {
593
+ if (!o || !o.local && !o.prefetch && !o.remote) {
594
+ $.error("one of local, prefetch, or remote is required");
595
+ }
596
+ this.limit = o.limit || 5;
597
+ this.sorter = getSorter(o.sorter);
598
+ this.dupDetector = o.dupDetector || ignoreDuplicates;
599
+ this.local = oParser.local(o);
600
+ this.prefetch = oParser.prefetch(o);
601
+ this.remote = oParser.remote(o);
602
+ this.cacheKey = this.prefetch ? this.prefetch.cacheKey || this.prefetch.url : null;
603
+ this.index = new SearchIndex({
604
+ datumTokenizer: o.datumTokenizer,
605
+ queryTokenizer: o.queryTokenizer
606
+ });
607
+ this.storage = this.cacheKey ? new PersistentStorage(this.cacheKey) : null;
608
+ }
609
+ Bloodhound.noConflict = function noConflict() {
610
+ root.Bloodhound = old;
611
+ return Bloodhound;
612
+ };
613
+ Bloodhound.tokenizers = tokenizers;
614
+ _.mixin(Bloodhound.prototype, {
615
+ _loadPrefetch: function loadPrefetch(o) {
616
+ var that = this, serialized, deferred;
617
+ if (serialized = this._readFromStorage(o.thumbprint)) {
618
+ this.index.bootstrap(serialized);
619
+ deferred = $.Deferred().resolve();
620
+ } else {
621
+ deferred = $.ajax(o.url, o.ajax).done(handlePrefetchResponse);
622
+ }
623
+ return deferred;
624
+ function handlePrefetchResponse(resp) {
625
+ that.clear();
626
+ that.add(o.filter ? o.filter(resp) : resp);
627
+ that._saveToStorage(that.index.serialize(), o.thumbprint, o.ttl);
628
+ }
629
+ },
630
+ _getFromRemote: function getFromRemote(query, cb) {
631
+ var that = this, url, uriEncodedQuery;
632
+ if (!this.transport) {
633
+ return;
634
+ }
635
+ query = query || "";
636
+ uriEncodedQuery = encodeURIComponent(query);
637
+ url = this.remote.replace ? this.remote.replace(this.remote.url, query) : this.remote.url.replace(this.remote.wildcard, uriEncodedQuery);
638
+ return this.transport.get(url, this.remote.ajax, handleRemoteResponse);
639
+ function handleRemoteResponse(err, resp) {
640
+ err ? cb([]) : cb(that.remote.filter ? that.remote.filter(resp) : resp);
641
+ }
642
+ },
643
+ _cancelLastRemoteRequest: function cancelLastRemoteRequest() {
644
+ this.transport && this.transport.cancel();
645
+ },
646
+ _saveToStorage: function saveToStorage(data, thumbprint, ttl) {
647
+ if (this.storage) {
648
+ this.storage.set(keys.data, data, ttl);
649
+ this.storage.set(keys.protocol, location.protocol, ttl);
650
+ this.storage.set(keys.thumbprint, thumbprint, ttl);
651
+ }
652
+ },
653
+ _readFromStorage: function readFromStorage(thumbprint) {
654
+ var stored = {}, isExpired;
655
+ if (this.storage) {
656
+ stored.data = this.storage.get(keys.data);
657
+ stored.protocol = this.storage.get(keys.protocol);
658
+ stored.thumbprint = this.storage.get(keys.thumbprint);
659
+ }
660
+ isExpired = stored.thumbprint !== thumbprint || stored.protocol !== location.protocol;
661
+ return stored.data && !isExpired ? stored.data : null;
662
+ },
663
+ _initialize: function initialize() {
664
+ var that = this, local = this.local, deferred;
665
+ deferred = this.prefetch ? this._loadPrefetch(this.prefetch) : $.Deferred().resolve();
666
+ local && deferred.done(addLocalToIndex);
667
+ this.transport = this.remote ? new Transport(this.remote) : null;
668
+ return this.initPromise = deferred.promise();
669
+ function addLocalToIndex() {
670
+ that.add(_.isFunction(local) ? local() : local);
671
+ }
672
+ },
673
+ initialize: function initialize(force) {
674
+ return !this.initPromise || force ? this._initialize() : this.initPromise;
675
+ },
676
+ add: function add(data) {
677
+ this.index.add(data);
678
+ },
679
+ get: function get(query, cb) {
680
+ var that = this, matches = [], cacheHit = false;
681
+ matches = this.index.get(query);
682
+ matches = this.sorter(matches).slice(0, this.limit);
683
+ matches.length < this.limit ? cacheHit = this._getFromRemote(query, returnRemoteMatches) : this._cancelLastRemoteRequest();
684
+ if (!cacheHit) {
685
+ (matches.length > 0 || !this.transport) && cb && cb(matches);
686
+ }
687
+ function returnRemoteMatches(remoteMatches) {
688
+ var matchesWithBackfill = matches.slice(0);
689
+ _.each(remoteMatches, function(remoteMatch) {
690
+ var isDuplicate;
691
+ isDuplicate = _.some(matchesWithBackfill, function(match) {
692
+ return that.dupDetector(remoteMatch, match);
693
+ });
694
+ !isDuplicate && matchesWithBackfill.push(remoteMatch);
695
+ return matchesWithBackfill.length < that.limit;
696
+ });
697
+ cb && cb(that.sorter(matchesWithBackfill));
698
+ }
699
+ },
700
+ clear: function clear() {
701
+ this.index.reset();
702
+ },
703
+ clearPrefetchCache: function clearPrefetchCache() {
704
+ this.storage && this.storage.clear();
705
+ },
706
+ clearRemoteCache: function clearRemoteCache() {
707
+ this.transport && Transport.resetCache();
708
+ },
709
+ ttAdapter: function ttAdapter() {
710
+ return _.bind(this.get, this);
711
+ }
712
+ });
713
+ return Bloodhound;
714
+ function getSorter(sortFn) {
715
+ return _.isFunction(sortFn) ? sort : noSort;
716
+ function sort(array) {
717
+ return array.sort(sortFn);
718
+ }
719
+ function noSort(array) {
720
+ return array;
721
+ }
722
+ }
723
+ function ignoreDuplicates() {
724
+ return false;
725
+ }
726
+ })(this);
727
+ var html = function() {
728
+ return {
729
+ wrapper: '<span class="twitter-typeahead"></span>',
730
+ dropdown: '<span class="tt-dropdown-menu"></span>',
731
+ dataset: '<div class="tt-dataset-%CLASS%"></div>',
732
+ suggestions: '<span class="tt-suggestions"></span>',
733
+ suggestion: '<div class="tt-suggestion"></div>'
734
+ };
735
+ }();
736
+ var css = function() {
737
+ "use strict";
738
+ var css = {
739
+ wrapper: {
740
+ position: "relative",
741
+ display: "inline-block"
742
+ },
743
+ hint: {
744
+ position: "absolute",
745
+ top: "0",
746
+ left: "0",
747
+ borderColor: "transparent",
748
+ boxShadow: "none",
749
+ opacity: "1"
750
+ },
751
+ input: {
752
+ position: "relative",
753
+ verticalAlign: "top",
754
+ backgroundColor: "transparent"
755
+ },
756
+ inputWithNoHint: {
757
+ position: "relative",
758
+ verticalAlign: "top"
759
+ },
760
+ dropdown: {
761
+ position: "absolute",
762
+ top: "100%",
763
+ left: "0",
764
+ zIndex: "100",
765
+ display: "none"
766
+ },
767
+ suggestions: {
768
+ display: "block"
769
+ },
770
+ suggestion: {
771
+ whiteSpace: "nowrap",
772
+ cursor: "pointer"
773
+ },
774
+ suggestionChild: {
775
+ whiteSpace: "normal"
776
+ },
777
+ ltr: {
778
+ left: "0",
779
+ right: "auto"
780
+ },
781
+ rtl: {
782
+ left: "auto",
783
+ right: " 0"
784
+ }
785
+ };
786
+ if (_.isMsie()) {
787
+ _.mixin(css.input, {
788
+ backgroundImage: "url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"
789
+ });
790
+ }
791
+ if (_.isMsie() && _.isMsie() <= 7) {
792
+ _.mixin(css.input, {
793
+ marginTop: "-1px"
794
+ });
795
+ }
796
+ return css;
797
+ }();
798
+ var EventBus = function() {
799
+ "use strict";
800
+ var namespace = "typeahead:";
801
+ function EventBus(o) {
802
+ if (!o || !o.el) {
803
+ $.error("EventBus initialized without el");
804
+ }
805
+ this.$el = $(o.el);
806
+ }
807
+ _.mixin(EventBus.prototype, {
808
+ trigger: function(type) {
809
+ var args = [].slice.call(arguments, 1);
810
+ this.$el.trigger(namespace + type, args);
811
+ }
812
+ });
813
+ return EventBus;
814
+ }();
815
+ var EventEmitter = function() {
816
+ "use strict";
817
+ var splitter = /\s+/, nextTick = getNextTick();
818
+ return {
819
+ onSync: onSync,
820
+ onAsync: onAsync,
821
+ off: off,
822
+ trigger: trigger
823
+ };
824
+ function on(method, types, cb, context) {
825
+ var type;
826
+ if (!cb) {
827
+ return this;
828
+ }
829
+ types = types.split(splitter);
830
+ cb = context ? bindContext(cb, context) : cb;
831
+ this._callbacks = this._callbacks || {};
832
+ while (type = types.shift()) {
833
+ this._callbacks[type] = this._callbacks[type] || {
834
+ sync: [],
835
+ async: []
836
+ };
837
+ this._callbacks[type][method].push(cb);
838
+ }
839
+ return this;
840
+ }
841
+ function onAsync(types, cb, context) {
842
+ return on.call(this, "async", types, cb, context);
843
+ }
844
+ function onSync(types, cb, context) {
845
+ return on.call(this, "sync", types, cb, context);
846
+ }
847
+ function off(types) {
848
+ var type;
849
+ if (!this._callbacks) {
850
+ return this;
851
+ }
852
+ types = types.split(splitter);
853
+ while (type = types.shift()) {
854
+ delete this._callbacks[type];
855
+ }
856
+ return this;
857
+ }
858
+ function trigger(types) {
859
+ var type, callbacks, args, syncFlush, asyncFlush;
860
+ if (!this._callbacks) {
861
+ return this;
862
+ }
863
+ types = types.split(splitter);
864
+ args = [].slice.call(arguments, 1);
865
+ while ((type = types.shift()) && (callbacks = this._callbacks[type])) {
866
+ syncFlush = getFlush(callbacks.sync, this, [ type ].concat(args));
867
+ asyncFlush = getFlush(callbacks.async, this, [ type ].concat(args));
868
+ syncFlush() && nextTick(asyncFlush);
869
+ }
870
+ return this;
871
+ }
872
+ function getFlush(callbacks, context, args) {
873
+ return flush;
874
+ function flush() {
875
+ var cancelled;
876
+ for (var i = 0, len = callbacks.length; !cancelled && i < len; i += 1) {
877
+ cancelled = callbacks[i].apply(context, args) === false;
878
+ }
879
+ return !cancelled;
880
+ }
881
+ }
882
+ function getNextTick() {
883
+ var nextTickFn;
884
+ if (window.setImmediate) {
885
+ nextTickFn = function nextTickSetImmediate(fn) {
886
+ setImmediate(function() {
887
+ fn();
888
+ });
889
+ };
890
+ } else {
891
+ nextTickFn = function nextTickSetTimeout(fn) {
892
+ setTimeout(function() {
893
+ fn();
894
+ }, 0);
895
+ };
896
+ }
897
+ return nextTickFn;
898
+ }
899
+ function bindContext(fn, context) {
900
+ return fn.bind ? fn.bind(context) : function() {
901
+ fn.apply(context, [].slice.call(arguments, 0));
902
+ };
903
+ }
904
+ }();
905
+ var highlight = function(doc) {
906
+ "use strict";
907
+ var defaults = {
908
+ node: null,
909
+ pattern: null,
910
+ tagName: "strong",
911
+ className: null,
912
+ wordsOnly: false,
913
+ caseSensitive: false
914
+ };
915
+ return function hightlight(o) {
916
+ var regex;
917
+ o = _.mixin({}, defaults, o);
918
+ if (!o.node || !o.pattern) {
919
+ return;
920
+ }
921
+ o.pattern = _.isArray(o.pattern) ? o.pattern : [ o.pattern ];
922
+ regex = getRegex(o.pattern, o.caseSensitive, o.wordsOnly);
923
+ traverse(o.node, hightlightTextNode);
924
+ function hightlightTextNode(textNode) {
925
+ var match, patternNode, wrapperNode;
926
+ if (match = regex.exec(textNode.data)) {
927
+ wrapperNode = doc.createElement(o.tagName);
928
+ o.className && (wrapperNode.className = o.className);
929
+ patternNode = textNode.splitText(match.index);
930
+ patternNode.splitText(match[0].length);
931
+ wrapperNode.appendChild(patternNode.cloneNode(true));
932
+ textNode.parentNode.replaceChild(wrapperNode, patternNode);
933
+ }
934
+ return !!match;
935
+ }
936
+ function traverse(el, hightlightTextNode) {
937
+ var childNode, TEXT_NODE_TYPE = 3;
938
+ for (var i = 0; i < el.childNodes.length; i++) {
939
+ childNode = el.childNodes[i];
940
+ if (childNode.nodeType === TEXT_NODE_TYPE) {
941
+ i += hightlightTextNode(childNode) ? 1 : 0;
942
+ } else {
943
+ traverse(childNode, hightlightTextNode);
944
+ }
945
+ }
946
+ }
947
+ };
948
+ function getRegex(patterns, caseSensitive, wordsOnly) {
949
+ var escapedPatterns = [], regexStr;
950
+ for (var i = 0, len = patterns.length; i < len; i++) {
951
+ escapedPatterns.push(_.escapeRegExChars(patterns[i]));
952
+ }
953
+ regexStr = wordsOnly ? "\\b(" + escapedPatterns.join("|") + ")\\b" : "(" + escapedPatterns.join("|") + ")";
954
+ return caseSensitive ? new RegExp(regexStr) : new RegExp(regexStr, "i");
955
+ }
956
+ }(window.document);
957
+ var Input = function() {
958
+ "use strict";
959
+ var specialKeyCodeMap;
960
+ specialKeyCodeMap = {
961
+ 9: "tab",
962
+ 27: "esc",
963
+ 37: "left",
964
+ 39: "right",
965
+ 13: "enter",
966
+ 38: "up",
967
+ 40: "down"
968
+ };
969
+ function Input(o) {
970
+ var that = this, onBlur, onFocus, onKeydown, onInput;
971
+ o = o || {};
972
+ if (!o.input) {
973
+ $.error("input is missing");
974
+ }
975
+ onBlur = _.bind(this._onBlur, this);
976
+ onFocus = _.bind(this._onFocus, this);
977
+ onKeydown = _.bind(this._onKeydown, this);
978
+ onInput = _.bind(this._onInput, this);
979
+ this.$hint = $(o.hint);
980
+ this.$input = $(o.input).on("blur.tt", onBlur).on("focus.tt", onFocus).on("keydown.tt", onKeydown);
981
+ if (this.$hint.length === 0) {
982
+ this.setHint = this.getHint = this.clearHint = this.clearHintIfInvalid = _.noop;
983
+ }
984
+ if (!_.isMsie()) {
985
+ this.$input.on("input.tt", onInput);
986
+ } else {
987
+ this.$input.on("keydown.tt keypress.tt cut.tt paste.tt", function($e) {
988
+ if (specialKeyCodeMap[$e.which || $e.keyCode]) {
989
+ return;
990
+ }
991
+ _.defer(_.bind(that._onInput, that, $e));
992
+ });
993
+ }
994
+ this.query = this.$input.val();
995
+ this.$overflowHelper = buildOverflowHelper(this.$input);
996
+ }
997
+ Input.normalizeQuery = function(str) {
998
+ return (str || "").replace(/^\s*/g, "").replace(/\s{2,}/g, " ");
999
+ };
1000
+ _.mixin(Input.prototype, EventEmitter, {
1001
+ _onBlur: function onBlur() {
1002
+ this.resetInputValue();
1003
+ this.trigger("blurred");
1004
+ },
1005
+ _onFocus: function onFocus() {
1006
+ this.trigger("focused");
1007
+ },
1008
+ _onKeydown: function onKeydown($e) {
1009
+ var keyName = specialKeyCodeMap[$e.which || $e.keyCode];
1010
+ this._managePreventDefault(keyName, $e);
1011
+ if (keyName && this._shouldTrigger(keyName, $e)) {
1012
+ this.trigger(keyName + "Keyed", $e);
1013
+ }
1014
+ },
1015
+ _onInput: function onInput() {
1016
+ this._checkInputValue();
1017
+ },
1018
+ _managePreventDefault: function managePreventDefault(keyName, $e) {
1019
+ var preventDefault, hintValue, inputValue;
1020
+ switch (keyName) {
1021
+ case "tab":
1022
+ hintValue = this.getHint();
1023
+ inputValue = this.getInputValue();
1024
+ preventDefault = hintValue && hintValue !== inputValue && !withModifier($e);
1025
+ break;
1026
+
1027
+ case "up":
1028
+ case "down":
1029
+ preventDefault = !withModifier($e);
1030
+ break;
1031
+
1032
+ default:
1033
+ preventDefault = false;
1034
+ }
1035
+ preventDefault && $e.preventDefault();
1036
+ },
1037
+ _shouldTrigger: function shouldTrigger(keyName, $e) {
1038
+ var trigger;
1039
+ switch (keyName) {
1040
+ case "tab":
1041
+ trigger = !withModifier($e);
1042
+ break;
1043
+
1044
+ default:
1045
+ trigger = true;
1046
+ }
1047
+ return trigger;
1048
+ },
1049
+ _checkInputValue: function checkInputValue() {
1050
+ var inputValue, areEquivalent, hasDifferentWhitespace;
1051
+ inputValue = this.getInputValue();
1052
+ areEquivalent = areQueriesEquivalent(inputValue, this.query);
1053
+ hasDifferentWhitespace = areEquivalent ? this.query.length !== inputValue.length : false;
1054
+ this.query = inputValue;
1055
+ if (!areEquivalent) {
1056
+ this.trigger("queryChanged", this.query);
1057
+ } else if (hasDifferentWhitespace) {
1058
+ this.trigger("whitespaceChanged", this.query);
1059
+ }
1060
+ },
1061
+ focus: function focus() {
1062
+ this.$input.focus();
1063
+ },
1064
+ blur: function blur() {
1065
+ this.$input.blur();
1066
+ },
1067
+ getQuery: function getQuery() {
1068
+ return this.query;
1069
+ },
1070
+ setQuery: function setQuery(query) {
1071
+ this.query = query;
1072
+ },
1073
+ getInputValue: function getInputValue() {
1074
+ return this.$input.val();
1075
+ },
1076
+ setInputValue: function setInputValue(value, silent) {
1077
+ this.$input.val(value);
1078
+ silent ? this.clearHint() : this._checkInputValue();
1079
+ },
1080
+ resetInputValue: function resetInputValue() {
1081
+ this.setInputValue(this.query, true);
1082
+ },
1083
+ getHint: function getHint() {
1084
+ return this.$hint.val();
1085
+ },
1086
+ setHint: function setHint(value) {
1087
+ this.$hint.val(value);
1088
+ },
1089
+ clearHint: function clearHint() {
1090
+ this.setHint("");
1091
+ },
1092
+ clearHintIfInvalid: function clearHintIfInvalid() {
1093
+ var val, hint, valIsPrefixOfHint, isValid;
1094
+ val = this.getInputValue();
1095
+ hint = this.getHint();
1096
+ valIsPrefixOfHint = val !== hint && hint.indexOf(val) === 0;
1097
+ isValid = val !== "" && valIsPrefixOfHint && !this.hasOverflow();
1098
+ !isValid && this.clearHint();
1099
+ },
1100
+ getLanguageDirection: function getLanguageDirection() {
1101
+ return (this.$input.css("direction") || "ltr").toLowerCase();
1102
+ },
1103
+ hasOverflow: function hasOverflow() {
1104
+ var constraint = this.$input.width() - 2;
1105
+ this.$overflowHelper.text(this.getInputValue());
1106
+ return this.$overflowHelper.width() >= constraint;
1107
+ },
1108
+ isCursorAtEnd: function() {
1109
+ var valueLength, selectionStart, range;
1110
+ valueLength = this.$input.val().length;
1111
+ selectionStart = this.$input[0].selectionStart;
1112
+ if (_.isNumber(selectionStart)) {
1113
+ return selectionStart === valueLength;
1114
+ } else if (document.selection) {
1115
+ range = document.selection.createRange();
1116
+ range.moveStart("character", -valueLength);
1117
+ return valueLength === range.text.length;
1118
+ }
1119
+ return true;
1120
+ },
1121
+ destroy: function destroy() {
1122
+ this.$hint.off(".tt");
1123
+ this.$input.off(".tt");
1124
+ this.$hint = this.$input = this.$overflowHelper = null;
1125
+ }
1126
+ });
1127
+ return Input;
1128
+ function buildOverflowHelper($input) {
1129
+ return $('<pre aria-hidden="true"></pre>').css({
1130
+ position: "absolute",
1131
+ visibility: "hidden",
1132
+ whiteSpace: "pre",
1133
+ fontFamily: $input.css("font-family"),
1134
+ fontSize: $input.css("font-size"),
1135
+ fontStyle: $input.css("font-style"),
1136
+ fontVariant: $input.css("font-variant"),
1137
+ fontWeight: $input.css("font-weight"),
1138
+ wordSpacing: $input.css("word-spacing"),
1139
+ letterSpacing: $input.css("letter-spacing"),
1140
+ textIndent: $input.css("text-indent"),
1141
+ textRendering: $input.css("text-rendering"),
1142
+ textTransform: $input.css("text-transform")
1143
+ }).insertAfter($input);
1144
+ }
1145
+ function areQueriesEquivalent(a, b) {
1146
+ return Input.normalizeQuery(a) === Input.normalizeQuery(b);
1147
+ }
1148
+ function withModifier($e) {
1149
+ return $e.altKey || $e.ctrlKey || $e.metaKey || $e.shiftKey;
1150
+ }
1151
+ }();
1152
+ var Dataset = function() {
1153
+ "use strict";
1154
+ var datasetKey = "ttDataset", valueKey = "ttValue", datumKey = "ttDatum";
1155
+ function Dataset(o) {
1156
+ o = o || {};
1157
+ o.templates = o.templates || {};
1158
+ if (!o.source) {
1159
+ $.error("missing source");
1160
+ }
1161
+ if (o.name && !isValidName(o.name)) {
1162
+ $.error("invalid dataset name: " + o.name);
1163
+ }
1164
+ this.query = null;
1165
+ this.highlight = !!o.highlight;
1166
+ this.name = o.name || _.getUniqueId();
1167
+ this.source = o.source;
1168
+ this.displayFn = getDisplayFn(o.display || o.displayKey);
1169
+ this.templates = getTemplates(o.templates, this.displayFn);
1170
+ this.$el = $(html.dataset.replace("%CLASS%", this.name));
1171
+ }
1172
+ Dataset.extractDatasetName = function extractDatasetName(el) {
1173
+ return $(el).data(datasetKey);
1174
+ };
1175
+ Dataset.extractValue = function extractDatum(el) {
1176
+ return $(el).data(valueKey);
1177
+ };
1178
+ Dataset.extractDatum = function extractDatum(el) {
1179
+ return $(el).data(datumKey);
1180
+ };
1181
+ _.mixin(Dataset.prototype, EventEmitter, {
1182
+ _render: function render(query, suggestions) {
1183
+ if (!this.$el) {
1184
+ return;
1185
+ }
1186
+ var that = this, hasSuggestions;
1187
+ this.$el.empty();
1188
+ hasSuggestions = suggestions && suggestions.length;
1189
+ if (!hasSuggestions && this.templates.empty) {
1190
+ this.$el.html(getEmptyHtml()).prepend(that.templates.header ? getHeaderHtml() : null).append(that.templates.footer ? getFooterHtml() : null);
1191
+ } else if (hasSuggestions) {
1192
+ this.$el.html(getSuggestionsHtml()).prepend(that.templates.header ? getHeaderHtml() : null).append(that.templates.footer ? getFooterHtml() : null);
1193
+ }
1194
+ this.trigger("rendered");
1195
+ function getEmptyHtml() {
1196
+ return that.templates.empty({
1197
+ query: query,
1198
+ isEmpty: true
1199
+ });
1200
+ }
1201
+ function getSuggestionsHtml() {
1202
+ var $suggestions, nodes;
1203
+ $suggestions = $(html.suggestions).css(css.suggestions);
1204
+ nodes = _.map(suggestions, getSuggestionNode);
1205
+ $suggestions.append.apply($suggestions, nodes);
1206
+ that.highlight && highlight({
1207
+ className: "tt-highlight",
1208
+ node: $suggestions[0],
1209
+ pattern: query
1210
+ });
1211
+ return $suggestions;
1212
+ function getSuggestionNode(suggestion) {
1213
+ var $el;
1214
+ $el = $(html.suggestion).append(that.templates.suggestion(suggestion)).data(datasetKey, that.name).data(valueKey, that.displayFn(suggestion)).data(datumKey, suggestion);
1215
+ $el.children().each(function() {
1216
+ $(this).css(css.suggestionChild);
1217
+ });
1218
+ return $el;
1219
+ }
1220
+ }
1221
+ function getHeaderHtml() {
1222
+ return that.templates.header({
1223
+ query: query,
1224
+ isEmpty: !hasSuggestions
1225
+ });
1226
+ }
1227
+ function getFooterHtml() {
1228
+ return that.templates.footer({
1229
+ query: query,
1230
+ isEmpty: !hasSuggestions
1231
+ });
1232
+ }
1233
+ },
1234
+ getRoot: function getRoot() {
1235
+ return this.$el;
1236
+ },
1237
+ update: function update(query) {
1238
+ var that = this;
1239
+ this.query = query;
1240
+ this.canceled = false;
1241
+ this.source(query, render);
1242
+ function render(suggestions) {
1243
+ if (!that.canceled && query === that.query) {
1244
+ that._render(query, suggestions);
1245
+ }
1246
+ }
1247
+ },
1248
+ cancel: function cancel() {
1249
+ this.canceled = true;
1250
+ },
1251
+ clear: function clear() {
1252
+ this.cancel();
1253
+ this.$el.empty();
1254
+ this.trigger("rendered");
1255
+ },
1256
+ isEmpty: function isEmpty() {
1257
+ return this.$el.is(":empty");
1258
+ },
1259
+ destroy: function destroy() {
1260
+ this.$el = null;
1261
+ }
1262
+ });
1263
+ return Dataset;
1264
+ function getDisplayFn(display) {
1265
+ display = display || "value";
1266
+ return _.isFunction(display) ? display : displayFn;
1267
+ function displayFn(obj) {
1268
+ return obj[display];
1269
+ }
1270
+ }
1271
+ function getTemplates(templates, displayFn) {
1272
+ return {
1273
+ empty: templates.empty && _.templatify(templates.empty),
1274
+ header: templates.header && _.templatify(templates.header),
1275
+ footer: templates.footer && _.templatify(templates.footer),
1276
+ suggestion: templates.suggestion || suggestionTemplate
1277
+ };
1278
+ function suggestionTemplate(context) {
1279
+ return "<p>" + displayFn(context) + "</p>";
1280
+ }
1281
+ }
1282
+ function isValidName(str) {
1283
+ return /^[_a-zA-Z0-9-]+$/.test(str);
1284
+ }
1285
+ }();
1286
+ var Dropdown = function() {
1287
+ "use strict";
1288
+ function Dropdown(o) {
1289
+ var that = this, onSuggestionClick, onSuggestionMouseEnter, onSuggestionMouseLeave;
1290
+ o = o || {};
1291
+ if (!o.menu) {
1292
+ $.error("menu is required");
1293
+ }
1294
+ this.isOpen = false;
1295
+ this.isEmpty = true;
1296
+ this.datasets = _.map(o.datasets, initializeDataset);
1297
+ onSuggestionClick = _.bind(this._onSuggestionClick, this);
1298
+ onSuggestionMouseEnter = _.bind(this._onSuggestionMouseEnter, this);
1299
+ onSuggestionMouseLeave = _.bind(this._onSuggestionMouseLeave, this);
1300
+ this.$menu = $(o.menu).on("click.tt", ".tt-suggestion", onSuggestionClick).on("mouseenter.tt", ".tt-suggestion", onSuggestionMouseEnter).on("mouseleave.tt", ".tt-suggestion", onSuggestionMouseLeave);
1301
+ _.each(this.datasets, function(dataset) {
1302
+ that.$menu.append(dataset.getRoot());
1303
+ dataset.onSync("rendered", that._onRendered, that);
1304
+ });
1305
+ }
1306
+ _.mixin(Dropdown.prototype, EventEmitter, {
1307
+ _onSuggestionClick: function onSuggestionClick($e) {
1308
+ this.trigger("suggestionClicked", $($e.currentTarget));
1309
+ },
1310
+ _onSuggestionMouseEnter: function onSuggestionMouseEnter($e) {
1311
+ this._removeCursor();
1312
+ this._setCursor($($e.currentTarget), true);
1313
+ },
1314
+ _onSuggestionMouseLeave: function onSuggestionMouseLeave() {
1315
+ this._removeCursor();
1316
+ },
1317
+ _onRendered: function onRendered() {
1318
+ this.isEmpty = _.every(this.datasets, isDatasetEmpty);
1319
+ this.isEmpty ? this._hide() : this.isOpen && this._show();
1320
+ this.trigger("datasetRendered");
1321
+ function isDatasetEmpty(dataset) {
1322
+ return dataset.isEmpty();
1323
+ }
1324
+ },
1325
+ _hide: function() {
1326
+ this.$menu.hide();
1327
+ },
1328
+ _show: function() {
1329
+ this.$menu.css("display", "block");
1330
+ },
1331
+ _getSuggestions: function getSuggestions() {
1332
+ return this.$menu.find(".tt-suggestion");
1333
+ },
1334
+ _getCursor: function getCursor() {
1335
+ return this.$menu.find(".tt-cursor").first();
1336
+ },
1337
+ _setCursor: function setCursor($el, silent) {
1338
+ $el.first().addClass("tt-cursor");
1339
+ !silent && this.trigger("cursorMoved");
1340
+ },
1341
+ _removeCursor: function removeCursor() {
1342
+ this._getCursor().removeClass("tt-cursor");
1343
+ },
1344
+ _moveCursor: function moveCursor(increment) {
1345
+ var $suggestions, $oldCursor, newCursorIndex, $newCursor;
1346
+ if (!this.isOpen) {
1347
+ return;
1348
+ }
1349
+ $oldCursor = this._getCursor();
1350
+ $suggestions = this._getSuggestions();
1351
+ this._removeCursor();
1352
+ newCursorIndex = $suggestions.index($oldCursor) + increment;
1353
+ newCursorIndex = (newCursorIndex + 1) % ($suggestions.length + 1) - 1;
1354
+ if (newCursorIndex === -1) {
1355
+ this.trigger("cursorRemoved");
1356
+ return;
1357
+ } else if (newCursorIndex < -1) {
1358
+ newCursorIndex = $suggestions.length - 1;
1359
+ }
1360
+ this._setCursor($newCursor = $suggestions.eq(newCursorIndex));
1361
+ this._ensureVisible($newCursor);
1362
+ },
1363
+ _ensureVisible: function ensureVisible($el) {
1364
+ var elTop, elBottom, menuScrollTop, menuHeight;
1365
+ elTop = $el.position().top;
1366
+ elBottom = elTop + $el.outerHeight(true);
1367
+ menuScrollTop = this.$menu.scrollTop();
1368
+ menuHeight = this.$menu.height() + parseInt(this.$menu.css("paddingTop"), 10) + parseInt(this.$menu.css("paddingBottom"), 10);
1369
+ if (elTop < 0) {
1370
+ this.$menu.scrollTop(menuScrollTop + elTop);
1371
+ } else if (menuHeight < elBottom) {
1372
+ this.$menu.scrollTop(menuScrollTop + (elBottom - menuHeight));
1373
+ }
1374
+ },
1375
+ close: function close() {
1376
+ if (this.isOpen) {
1377
+ this.isOpen = false;
1378
+ this._removeCursor();
1379
+ this._hide();
1380
+ this.trigger("closed");
1381
+ }
1382
+ },
1383
+ open: function open() {
1384
+ if (!this.isOpen) {
1385
+ this.isOpen = true;
1386
+ !this.isEmpty && this._show();
1387
+ this.trigger("opened");
1388
+ }
1389
+ },
1390
+ setLanguageDirection: function setLanguageDirection(dir) {
1391
+ this.$menu.css(dir === "ltr" ? css.ltr : css.rtl);
1392
+ },
1393
+ moveCursorUp: function moveCursorUp() {
1394
+ this._moveCursor(-1);
1395
+ },
1396
+ moveCursorDown: function moveCursorDown() {
1397
+ this._moveCursor(+1);
1398
+ },
1399
+ getDatumForSuggestion: function getDatumForSuggestion($el) {
1400
+ var datum = null;
1401
+ if ($el.length) {
1402
+ datum = {
1403
+ raw: Dataset.extractDatum($el),
1404
+ value: Dataset.extractValue($el),
1405
+ datasetName: Dataset.extractDatasetName($el)
1406
+ };
1407
+ }
1408
+ return datum;
1409
+ },
1410
+ getDatumForCursor: function getDatumForCursor() {
1411
+ return this.getDatumForSuggestion(this._getCursor().first());
1412
+ },
1413
+ getDatumForTopSuggestion: function getDatumForTopSuggestion() {
1414
+ return this.getDatumForSuggestion(this._getSuggestions().first());
1415
+ },
1416
+ update: function update(query) {
1417
+ _.each(this.datasets, updateDataset);
1418
+ function updateDataset(dataset) {
1419
+ dataset.update(query);
1420
+ }
1421
+ },
1422
+ empty: function empty() {
1423
+ _.each(this.datasets, clearDataset);
1424
+ this.isEmpty = true;
1425
+ function clearDataset(dataset) {
1426
+ dataset.clear();
1427
+ }
1428
+ },
1429
+ isVisible: function isVisible() {
1430
+ return this.isOpen && !this.isEmpty;
1431
+ },
1432
+ destroy: function destroy() {
1433
+ this.$menu.off(".tt");
1434
+ this.$menu = null;
1435
+ _.each(this.datasets, destroyDataset);
1436
+ function destroyDataset(dataset) {
1437
+ dataset.destroy();
1438
+ }
1439
+ }
1440
+ });
1441
+ return Dropdown;
1442
+ function initializeDataset(oDataset) {
1443
+ return new Dataset(oDataset);
1444
+ }
1445
+ }();
1446
+ var Typeahead = function() {
1447
+ "use strict";
1448
+ var attrsKey = "ttAttrs";
1449
+ function Typeahead(o) {
1450
+ var $menu, $input, $hint;
1451
+ o = o || {};
1452
+ if (!o.input) {
1453
+ $.error("missing input");
1454
+ }
1455
+ this.isActivated = false;
1456
+ this.autoselect = !!o.autoselect;
1457
+ this.minLength = _.isNumber(o.minLength) ? o.minLength : 1;
1458
+ this.$node = buildDom(o.input, o.withHint);
1459
+ $menu = this.$node.find(".tt-dropdown-menu");
1460
+ $input = this.$node.find(".tt-input");
1461
+ $hint = this.$node.find(".tt-hint");
1462
+ $input.on("blur.tt", function($e) {
1463
+ var active, isActive, hasActive;
1464
+ active = document.activeElement;
1465
+ isActive = $menu.is(active);
1466
+ hasActive = $menu.has(active).length > 0;
1467
+ if (_.isMsie() && (isActive || hasActive)) {
1468
+ $e.preventDefault();
1469
+ $e.stopImmediatePropagation();
1470
+ _.defer(function() {
1471
+ $input.focus();
1472
+ });
1473
+ }
1474
+ });
1475
+ $menu.on("mousedown.tt", function($e) {
1476
+ $e.preventDefault();
1477
+ });
1478
+ this.eventBus = o.eventBus || new EventBus({
1479
+ el: $input
1480
+ });
1481
+ this.dropdown = new Dropdown({
1482
+ menu: $menu,
1483
+ datasets: o.datasets
1484
+ }).onSync("suggestionClicked", this._onSuggestionClicked, this).onSync("cursorMoved", this._onCursorMoved, this).onSync("cursorRemoved", this._onCursorRemoved, this).onSync("opened", this._onOpened, this).onSync("closed", this._onClosed, this).onAsync("datasetRendered", this._onDatasetRendered, this);
1485
+ this.input = new Input({
1486
+ input: $input,
1487
+ hint: $hint
1488
+ }).onSync("focused", this._onFocused, this).onSync("blurred", this._onBlurred, this).onSync("enterKeyed", this._onEnterKeyed, this).onSync("tabKeyed", this._onTabKeyed, this).onSync("escKeyed", this._onEscKeyed, this).onSync("upKeyed", this._onUpKeyed, this).onSync("downKeyed", this._onDownKeyed, this).onSync("leftKeyed", this._onLeftKeyed, this).onSync("rightKeyed", this._onRightKeyed, this).onSync("queryChanged", this._onQueryChanged, this).onSync("whitespaceChanged", this._onWhitespaceChanged, this);
1489
+ this._setLanguageDirection();
1490
+ }
1491
+ _.mixin(Typeahead.prototype, {
1492
+ _onSuggestionClicked: function onSuggestionClicked(type, $el) {
1493
+ var datum;
1494
+ if (datum = this.dropdown.getDatumForSuggestion($el)) {
1495
+ this._select(datum);
1496
+ }
1497
+ },
1498
+ _onCursorMoved: function onCursorMoved() {
1499
+ var datum = this.dropdown.getDatumForCursor();
1500
+ this.input.setInputValue(datum.value, true);
1501
+ this.eventBus.trigger("cursorchanged", datum.raw, datum.datasetName);
1502
+ },
1503
+ _onCursorRemoved: function onCursorRemoved() {
1504
+ this.input.resetInputValue();
1505
+ this._updateHint();
1506
+ },
1507
+ _onDatasetRendered: function onDatasetRendered() {
1508
+ this._updateHint();
1509
+ },
1510
+ _onOpened: function onOpened() {
1511
+ this._updateHint();
1512
+ this.eventBus.trigger("opened");
1513
+ },
1514
+ _onClosed: function onClosed() {
1515
+ this.input.clearHint();
1516
+ this.eventBus.trigger("closed");
1517
+ },
1518
+ _onFocused: function onFocused() {
1519
+ this.isActivated = true;
1520
+ this.dropdown.open();
1521
+ },
1522
+ _onBlurred: function onBlurred() {
1523
+ this.isActivated = false;
1524
+ this.dropdown.empty();
1525
+ this.dropdown.close();
1526
+ },
1527
+ _onEnterKeyed: function onEnterKeyed(type, $e) {
1528
+ var cursorDatum, topSuggestionDatum;
1529
+ cursorDatum = this.dropdown.getDatumForCursor();
1530
+ topSuggestionDatum = this.dropdown.getDatumForTopSuggestion();
1531
+ if (cursorDatum) {
1532
+ this._select(cursorDatum);
1533
+ $e.preventDefault();
1534
+ } else if (this.autoselect && topSuggestionDatum) {
1535
+ this._select(topSuggestionDatum);
1536
+ $e.preventDefault();
1537
+ }
1538
+ },
1539
+ _onTabKeyed: function onTabKeyed(type, $e) {
1540
+ var datum;
1541
+ if (datum = this.dropdown.getDatumForCursor()) {
1542
+ this._select(datum);
1543
+ $e.preventDefault();
1544
+ } else {
1545
+ this._autocomplete(true);
1546
+ }
1547
+ },
1548
+ _onEscKeyed: function onEscKeyed() {
1549
+ this.dropdown.close();
1550
+ this.input.resetInputValue();
1551
+ },
1552
+ _onUpKeyed: function onUpKeyed() {
1553
+ var query = this.input.getQuery();
1554
+ this.dropdown.isEmpty && query.length >= this.minLength ? this.dropdown.update(query) : this.dropdown.moveCursorUp();
1555
+ this.dropdown.open();
1556
+ },
1557
+ _onDownKeyed: function onDownKeyed() {
1558
+ var query = this.input.getQuery();
1559
+ this.dropdown.isEmpty && query.length >= this.minLength ? this.dropdown.update(query) : this.dropdown.moveCursorDown();
1560
+ this.dropdown.open();
1561
+ },
1562
+ _onLeftKeyed: function onLeftKeyed() {
1563
+ this.dir === "rtl" && this._autocomplete();
1564
+ },
1565
+ _onRightKeyed: function onRightKeyed() {
1566
+ this.dir === "ltr" && this._autocomplete();
1567
+ },
1568
+ _onQueryChanged: function onQueryChanged(e, query) {
1569
+ this.input.clearHintIfInvalid();
1570
+ query.length >= this.minLength ? this.dropdown.update(query) : this.dropdown.empty();
1571
+ this.dropdown.open();
1572
+ this._setLanguageDirection();
1573
+ },
1574
+ _onWhitespaceChanged: function onWhitespaceChanged() {
1575
+ this._updateHint();
1576
+ this.dropdown.open();
1577
+ },
1578
+ _setLanguageDirection: function setLanguageDirection() {
1579
+ var dir;
1580
+ if (this.dir !== (dir = this.input.getLanguageDirection())) {
1581
+ this.dir = dir;
1582
+ this.$node.css("direction", dir);
1583
+ this.dropdown.setLanguageDirection(dir);
1584
+ }
1585
+ },
1586
+ _updateHint: function updateHint() {
1587
+ var datum, val, query, escapedQuery, frontMatchRegEx, match;
1588
+ datum = this.dropdown.getDatumForTopSuggestion();
1589
+ if (datum && this.dropdown.isVisible() && !this.input.hasOverflow()) {
1590
+ val = this.input.getInputValue();
1591
+ query = Input.normalizeQuery(val);
1592
+ escapedQuery = _.escapeRegExChars(query);
1593
+ frontMatchRegEx = new RegExp("^(?:" + escapedQuery + ")(.+$)", "i");
1594
+ match = frontMatchRegEx.exec(datum.value);
1595
+ match ? this.input.setHint(val + match[1]) : this.input.clearHint();
1596
+ } else {
1597
+ this.input.clearHint();
1598
+ }
1599
+ },
1600
+ _autocomplete: function autocomplete(laxCursor) {
1601
+ var hint, query, isCursorAtEnd, datum;
1602
+ hint = this.input.getHint();
1603
+ query = this.input.getQuery();
1604
+ isCursorAtEnd = laxCursor || this.input.isCursorAtEnd();
1605
+ if (hint && query !== hint && isCursorAtEnd) {
1606
+ datum = this.dropdown.getDatumForTopSuggestion();
1607
+ datum && this.input.setInputValue(datum.value);
1608
+ this.eventBus.trigger("autocompleted", datum.raw, datum.datasetName);
1609
+ }
1610
+ },
1611
+ _select: function select(datum) {
1612
+ this.input.setQuery(datum.value);
1613
+ this.input.setInputValue(datum.value, true);
1614
+ this._setLanguageDirection();
1615
+ this.eventBus.trigger("selected", datum.raw, datum.datasetName);
1616
+ this.dropdown.close();
1617
+ _.defer(_.bind(this.dropdown.empty, this.dropdown));
1618
+ },
1619
+ open: function open() {
1620
+ this.dropdown.open();
1621
+ },
1622
+ close: function close() {
1623
+ this.dropdown.close();
1624
+ },
1625
+ setVal: function setVal(val) {
1626
+ val = _.toStr(val);
1627
+ if (this.isActivated) {
1628
+ this.input.setInputValue(val);
1629
+ } else {
1630
+ this.input.setQuery(val);
1631
+ this.input.setInputValue(val, true);
1632
+ }
1633
+ this._setLanguageDirection();
1634
+ },
1635
+ getVal: function getVal() {
1636
+ return this.input.getQuery();
1637
+ },
1638
+ destroy: function destroy() {
1639
+ this.input.destroy();
1640
+ this.dropdown.destroy();
1641
+ destroyDomStructure(this.$node);
1642
+ this.$node = null;
1643
+ }
1644
+ });
1645
+ return Typeahead;
1646
+ function buildDom(input, withHint) {
1647
+ var $input, $wrapper, $dropdown, $hint;
1648
+ $input = $(input);
1649
+ $wrapper = $(html.wrapper).css(css.wrapper);
1650
+ $dropdown = $(html.dropdown).css(css.dropdown);
1651
+ $hint = $input.clone().css(css.hint).css(getBackgroundStyles($input));
1652
+ $hint.val("").removeData().addClass("tt-hint").removeAttr("id name placeholder required").prop("readonly", true).attr({
1653
+ autocomplete: "off",
1654
+ spellcheck: "false",
1655
+ tabindex: -1
1656
+ });
1657
+ $input.data(attrsKey, {
1658
+ dir: $input.attr("dir"),
1659
+ autocomplete: $input.attr("autocomplete"),
1660
+ spellcheck: $input.attr("spellcheck"),
1661
+ style: $input.attr("style")
1662
+ });
1663
+ $input.addClass("tt-input").attr({
1664
+ autocomplete: "off",
1665
+ spellcheck: false
1666
+ }).css(withHint ? css.input : css.inputWithNoHint);
1667
+ try {
1668
+ !$input.attr("dir") && $input.attr("dir", "auto");
1669
+ } catch (e) {}
1670
+ return $input.wrap($wrapper).parent().prepend(withHint ? $hint : null).append($dropdown);
1671
+ }
1672
+ function getBackgroundStyles($el) {
1673
+ return {
1674
+ backgroundAttachment: $el.css("background-attachment"),
1675
+ backgroundClip: $el.css("background-clip"),
1676
+ backgroundColor: $el.css("background-color"),
1677
+ backgroundImage: $el.css("background-image"),
1678
+ backgroundOrigin: $el.css("background-origin"),
1679
+ backgroundPosition: $el.css("background-position"),
1680
+ backgroundRepeat: $el.css("background-repeat"),
1681
+ backgroundSize: $el.css("background-size")
1682
+ };
1683
+ }
1684
+ function destroyDomStructure($node) {
1685
+ var $input = $node.find(".tt-input");
1686
+ _.each($input.data(attrsKey), function(val, key) {
1687
+ _.isUndefined(val) ? $input.removeAttr(key) : $input.attr(key, val);
1688
+ });
1689
+ $input.detach().removeData(attrsKey).removeClass("tt-input").insertAfter($node);
1690
+ $node.remove();
1691
+ }
1692
+ }();
1693
+ (function() {
1694
+ "use strict";
1695
+ var old, typeaheadKey, methods;
1696
+ old = $.fn.typeahead;
1697
+ typeaheadKey = "ttTypeahead";
1698
+ methods = {
1699
+ initialize: function initialize(o, datasets) {
1700
+ datasets = _.isArray(datasets) ? datasets : [].slice.call(arguments, 1);
1701
+ o = o || {};
1702
+ return this.each(attach);
1703
+ function attach() {
1704
+ var $input = $(this), eventBus, typeahead;
1705
+ _.each(datasets, function(d) {
1706
+ d.highlight = !!o.highlight;
1707
+ });
1708
+ typeahead = new Typeahead({
1709
+ input: $input,
1710
+ eventBus: eventBus = new EventBus({
1711
+ el: $input
1712
+ }),
1713
+ withHint: _.isUndefined(o.hint) ? true : !!o.hint,
1714
+ minLength: o.minLength,
1715
+ autoselect: o.autoselect,
1716
+ datasets: datasets
1717
+ });
1718
+ $input.data(typeaheadKey, typeahead);
1719
+ }
1720
+ },
1721
+ open: function open() {
1722
+ return this.each(openTypeahead);
1723
+ function openTypeahead() {
1724
+ var $input = $(this), typeahead;
1725
+ if (typeahead = $input.data(typeaheadKey)) {
1726
+ typeahead.open();
1727
+ }
1728
+ }
1729
+ },
1730
+ close: function close() {
1731
+ return this.each(closeTypeahead);
1732
+ function closeTypeahead() {
1733
+ var $input = $(this), typeahead;
1734
+ if (typeahead = $input.data(typeaheadKey)) {
1735
+ typeahead.close();
1736
+ }
1737
+ }
1738
+ },
1739
+ val: function val(newVal) {
1740
+ return !arguments.length ? getVal(this.first()) : this.each(setVal);
1741
+ function setVal() {
1742
+ var $input = $(this), typeahead;
1743
+ if (typeahead = $input.data(typeaheadKey)) {
1744
+ typeahead.setVal(newVal);
1745
+ }
1746
+ }
1747
+ function getVal($input) {
1748
+ var typeahead, query;
1749
+ if (typeahead = $input.data(typeaheadKey)) {
1750
+ query = typeahead.getVal();
1751
+ }
1752
+ return query;
1753
+ }
1754
+ },
1755
+ destroy: function destroy() {
1756
+ return this.each(unattach);
1757
+ function unattach() {
1758
+ var $input = $(this), typeahead;
1759
+ if (typeahead = $input.data(typeaheadKey)) {
1760
+ typeahead.destroy();
1761
+ $input.removeData(typeaheadKey);
1762
+ }
1763
+ }
1764
+ }
1765
+ };
1766
+ $.fn.typeahead = function(method) {
1767
+ var tts;
1768
+ if (methods[method] && method !== "initialize") {
1769
+ tts = this.filter(function() {
1770
+ return !!$(this).data(typeaheadKey);
1771
+ });
1772
+ return methods[method].apply(tts, [].slice.call(arguments, 1));
1773
+ } else {
1774
+ return methods.initialize.apply(this, arguments);
1775
+ }
1776
+ };
1777
+ $.fn.typeahead.noConflict = function noConflict() {
1778
+ $.fn.typeahead = old;
1779
+ return this;
1780
+ };
1781
+ })();
1782
+ })(window.jQuery);