rails_modular_admin 0.3.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1416) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/list.txt +23 -0
  3. data/app/assets/javascripts/rails_modular_admin/vendor.js +60351 -60351
  4. data/app/assets/javascripts/rails_modular_admin.js +1 -0
  5. data/app/assets/node_modules/animate.css/LICENSE +21 -0
  6. data/app/assets/node_modules/animate.css/README.md +233 -0
  7. data/app/assets/node_modules/animate.css/animate-config.json +120 -0
  8. data/app/assets/node_modules/animate.css/animate.css +3494 -0
  9. data/app/assets/node_modules/animate.css/animate.min.css +11 -0
  10. data/app/assets/node_modules/animate.css/bower.json +5 -0
  11. data/app/assets/node_modules/animate.css/gulpfile.js +107 -0
  12. data/app/assets/node_modules/animate.css/package.json +54 -0
  13. data/app/assets/node_modules/animate.css/source/_base.css +8 -0
  14. data/app/assets/node_modules/animate.css/source/attention_seekers/bounce.css +30 -0
  15. data/app/assets/node_modules/animate.css/source/attention_seekers/flash.css +16 -0
  16. data/app/assets/node_modules/animate.css/source/attention_seekers/headShake.css +30 -0
  17. data/app/assets/node_modules/animate.css/source/attention_seekers/jello.css +40 -0
  18. data/app/assets/node_modules/animate.css/source/attention_seekers/pulse.css +19 -0
  19. data/app/assets/node_modules/animate.css/source/attention_seekers/rubberBand.css +33 -0
  20. data/app/assets/node_modules/animate.css/source/attention_seekers/shake.css +25 -0
  21. data/app/assets/node_modules/animate.css/source/attention_seekers/swing.css +26 -0
  22. data/app/assets/node_modules/animate.css/source/attention_seekers/tada.css +31 -0
  23. data/app/assets/node_modules/animate.css/source/attention_seekers/wobble.css +35 -0
  24. data/app/assets/node_modules/animate.css/source/bouncing_entrances/bounceIn.css +42 -0
  25. data/app/assets/node_modules/animate.css/source/bouncing_entrances/bounceInDown.css +35 -0
  26. data/app/assets/node_modules/animate.css/source/bouncing_entrances/bounceInLeft.css +35 -0
  27. data/app/assets/node_modules/animate.css/source/bouncing_entrances/bounceInRight.css +35 -0
  28. data/app/assets/node_modules/animate.css/source/bouncing_entrances/bounceInUp.css +35 -0
  29. data/app/assets/node_modules/animate.css/source/bouncing_exits/bounceOut.css +21 -0
  30. data/app/assets/node_modules/animate.css/source/bouncing_exits/bounceOutDown.css +20 -0
  31. data/app/assets/node_modules/animate.css/source/bouncing_exits/bounceOutLeft.css +15 -0
  32. data/app/assets/node_modules/animate.css/source/bouncing_exits/bounceOutRight.css +15 -0
  33. data/app/assets/node_modules/animate.css/source/bouncing_exits/bounceOutUp.css +20 -0
  34. data/app/assets/node_modules/animate.css/source/fading_entrances/fadeIn.css +13 -0
  35. data/app/assets/node_modules/animate.css/source/fading_entrances/fadeInDown.css +15 -0
  36. data/app/assets/node_modules/animate.css/source/fading_entrances/fadeInDownBig.css +15 -0
  37. data/app/assets/node_modules/animate.css/source/fading_entrances/fadeInLeft.css +15 -0
  38. data/app/assets/node_modules/animate.css/source/fading_entrances/fadeInLeftBig.css +15 -0
  39. data/app/assets/node_modules/animate.css/source/fading_entrances/fadeInRight.css +15 -0
  40. data/app/assets/node_modules/animate.css/source/fading_entrances/fadeInRightBig.css +15 -0
  41. data/app/assets/node_modules/animate.css/source/fading_entrances/fadeInUp.css +15 -0
  42. data/app/assets/node_modules/animate.css/source/fading_entrances/fadeInUpBig.css +15 -0
  43. data/app/assets/node_modules/animate.css/source/fading_exits/fadeOut.css +13 -0
  44. data/app/assets/node_modules/animate.css/source/fading_exits/fadeOutDown.css +14 -0
  45. data/app/assets/node_modules/animate.css/source/fading_exits/fadeOutDownBig.css +14 -0
  46. data/app/assets/node_modules/animate.css/source/fading_exits/fadeOutLeft.css +14 -0
  47. data/app/assets/node_modules/animate.css/source/fading_exits/fadeOutLeftBig.css +14 -0
  48. data/app/assets/node_modules/animate.css/source/fading_exits/fadeOutRight.css +14 -0
  49. data/app/assets/node_modules/animate.css/source/fading_exits/fadeOutRightBig.css +14 -0
  50. data/app/assets/node_modules/animate.css/source/fading_exits/fadeOutUp.css +14 -0
  51. data/app/assets/node_modules/animate.css/source/fading_exits/fadeOutUpBig.css +14 -0
  52. data/app/assets/node_modules/animate.css/source/flippers/flip.css +31 -0
  53. data/app/assets/node_modules/animate.css/source/flippers/flipInX.css +30 -0
  54. data/app/assets/node_modules/animate.css/source/flippers/flipInY.css +30 -0
  55. data/app/assets/node_modules/animate.css/source/flippers/flipOutX.css +21 -0
  56. data/app/assets/node_modules/animate.css/source/flippers/flipOutY.css +21 -0
  57. data/app/assets/node_modules/animate.css/source/lightspeed/lightSpeedIn.css +26 -0
  58. data/app/assets/node_modules/animate.css/source/lightspeed/lightSpeedOut.css +15 -0
  59. data/app/assets/node_modules/animate.css/source/rotating_entrances/rotateIn.css +17 -0
  60. data/app/assets/node_modules/animate.css/source/rotating_entrances/rotateInDownLeft.css +17 -0
  61. data/app/assets/node_modules/animate.css/source/rotating_entrances/rotateInDownRight.css +17 -0
  62. data/app/assets/node_modules/animate.css/source/rotating_entrances/rotateInUpLeft.css +17 -0
  63. data/app/assets/node_modules/animate.css/source/rotating_entrances/rotateInUpRight.css +17 -0
  64. data/app/assets/node_modules/animate.css/source/rotating_exits/rotateOut.css +16 -0
  65. data/app/assets/node_modules/animate.css/source/rotating_exits/rotateOutDownLeft.css +16 -0
  66. data/app/assets/node_modules/animate.css/source/rotating_exits/rotateOutDownRight.css +16 -0
  67. data/app/assets/node_modules/animate.css/source/rotating_exits/rotateOutUpLeft.css +16 -0
  68. data/app/assets/node_modules/animate.css/source/rotating_exits/rotateOutUpRight.css +16 -0
  69. data/app/assets/node_modules/animate.css/source/sliding_entrances/slideInDown.css +14 -0
  70. data/app/assets/node_modules/animate.css/source/sliding_entrances/slideInLeft.css +14 -0
  71. data/app/assets/node_modules/animate.css/source/sliding_entrances/slideInRight.css +14 -0
  72. data/app/assets/node_modules/animate.css/source/sliding_entrances/slideInUp.css +14 -0
  73. data/app/assets/node_modules/animate.css/source/sliding_exits/slideOutDown.css +14 -0
  74. data/app/assets/node_modules/animate.css/source/sliding_exits/slideOutLeft.css +14 -0
  75. data/app/assets/node_modules/animate.css/source/sliding_exits/slideOutRight.css +14 -0
  76. data/app/assets/node_modules/animate.css/source/sliding_exits/slideOutUp.css +14 -0
  77. data/app/assets/node_modules/animate.css/source/specials/hinge.css +31 -0
  78. data/app/assets/node_modules/animate.css/source/specials/jackInTheBox.css +24 -0
  79. data/app/assets/node_modules/animate.css/source/specials/rollIn.css +17 -0
  80. data/app/assets/node_modules/animate.css/source/specials/rollOut.css +16 -0
  81. data/app/assets/node_modules/animate.css/source/zooming_entrances/zoomIn.css +14 -0
  82. data/app/assets/node_modules/animate.css/source/zooming_entrances/zoomInDown.css +17 -0
  83. data/app/assets/node_modules/animate.css/source/zooming_entrances/zoomInLeft.css +17 -0
  84. data/app/assets/node_modules/animate.css/source/zooming_entrances/zoomInRight.css +17 -0
  85. data/app/assets/node_modules/animate.css/source/zooming_entrances/zoomInUp.css +17 -0
  86. data/app/assets/node_modules/animate.css/source/zooming_exits/zoomOut.css +18 -0
  87. data/app/assets/node_modules/animate.css/source/zooming_exits/zoomOutDown.css +18 -0
  88. data/app/assets/node_modules/animate.css/source/zooming_exits/zoomOutLeft.css +16 -0
  89. data/app/assets/node_modules/animate.css/source/zooming_exits/zoomOutRight.css +16 -0
  90. data/app/assets/node_modules/animate.css/source/zooming_exits/zoomOutUp.css +18 -0
  91. data/app/assets/node_modules/bootstrap/LICENSE +22 -0
  92. data/app/assets/node_modules/bootstrap/README.md +171 -0
  93. data/app/assets/node_modules/bootstrap/dist/css/bootstrap-grid.css +1912 -0
  94. data/app/assets/node_modules/bootstrap/dist/css/bootstrap-grid.css.map +1 -0
  95. data/app/assets/node_modules/bootstrap/dist/css/bootstrap-grid.min.css +7 -0
  96. data/app/assets/node_modules/bootstrap/dist/css/bootstrap-grid.min.css.map +1 -0
  97. data/app/assets/node_modules/bootstrap/dist/css/bootstrap-reboot.css +330 -0
  98. data/app/assets/node_modules/bootstrap/dist/css/bootstrap-reboot.css.map +1 -0
  99. data/app/assets/node_modules/bootstrap/dist/css/bootstrap-reboot.min.css +8 -0
  100. data/app/assets/node_modules/bootstrap/dist/css/bootstrap-reboot.min.css.map +1 -0
  101. data/app/assets/node_modules/bootstrap/dist/css/bootstrap.css +8981 -0
  102. data/app/assets/node_modules/bootstrap/dist/css/bootstrap.css.map +1 -0
  103. data/app/assets/node_modules/bootstrap/dist/css/bootstrap.min.css +7 -0
  104. data/app/assets/node_modules/bootstrap/dist/css/bootstrap.min.css.map +1 -0
  105. data/app/assets/node_modules/bootstrap/dist/js/bootstrap.bundle.js +6444 -0
  106. data/app/assets/node_modules/bootstrap/dist/js/bootstrap.bundle.js.map +1 -0
  107. data/app/assets/node_modules/bootstrap/dist/js/bootstrap.bundle.min.js +7 -0
  108. data/app/assets/node_modules/bootstrap/dist/js/bootstrap.bundle.min.js.map +1 -0
  109. data/app/assets/node_modules/bootstrap/dist/js/bootstrap.js +3927 -0
  110. data/app/assets/node_modules/bootstrap/dist/js/bootstrap.js.map +1 -0
  111. data/app/assets/node_modules/bootstrap/dist/js/bootstrap.min.js +7 -0
  112. data/app/assets/node_modules/bootstrap/dist/js/bootstrap.min.js.map +1 -0
  113. data/app/assets/node_modules/bootstrap/js/dist/alert.js +178 -0
  114. data/app/assets/node_modules/bootstrap/js/dist/alert.js.map +1 -0
  115. data/app/assets/node_modules/bootstrap/js/dist/button.js +167 -0
  116. data/app/assets/node_modules/bootstrap/js/dist/button.js.map +1 -0
  117. data/app/assets/node_modules/bootstrap/js/dist/carousel.js +508 -0
  118. data/app/assets/node_modules/bootstrap/js/dist/carousel.js.map +1 -0
  119. data/app/assets/node_modules/bootstrap/js/dist/collapse.js +367 -0
  120. data/app/assets/node_modules/bootstrap/js/dist/collapse.js.map +1 -0
  121. data/app/assets/node_modules/bootstrap/js/dist/dropdown.js +489 -0
  122. data/app/assets/node_modules/bootstrap/js/dist/dropdown.js.map +1 -0
  123. data/app/assets/node_modules/bootstrap/js/dist/index.js +23 -0
  124. data/app/assets/node_modules/bootstrap/js/dist/index.js.map +1 -0
  125. data/app/assets/node_modules/bootstrap/js/dist/modal.js +585 -0
  126. data/app/assets/node_modules/bootstrap/js/dist/modal.js.map +1 -0
  127. data/app/assets/node_modules/bootstrap/js/dist/popover.js +206 -0
  128. data/app/assets/node_modules/bootstrap/js/dist/popover.js.map +1 -0
  129. data/app/assets/node_modules/bootstrap/js/dist/scrollspy.js +319 -0
  130. data/app/assets/node_modules/bootstrap/js/dist/scrollspy.js.map +1 -0
  131. data/app/assets/node_modules/bootstrap/js/dist/tab.js +251 -0
  132. data/app/assets/node_modules/bootstrap/js/dist/tab.js.map +1 -0
  133. data/app/assets/node_modules/bootstrap/js/dist/tooltip.js +674 -0
  134. data/app/assets/node_modules/bootstrap/js/dist/tooltip.js.map +1 -0
  135. data/app/assets/node_modules/bootstrap/js/dist/util.js +132 -0
  136. data/app/assets/node_modules/bootstrap/js/dist/util.js.map +1 -0
  137. data/app/assets/node_modules/bootstrap/js/src/alert.js +183 -0
  138. data/app/assets/node_modules/bootstrap/js/src/button.js +175 -0
  139. data/app/assets/node_modules/bootstrap/js/src/carousel.js +517 -0
  140. data/app/assets/node_modules/bootstrap/js/src/collapse.js +394 -0
  141. data/app/assets/node_modules/bootstrap/js/src/dropdown.js +487 -0
  142. data/app/assets/node_modules/bootstrap/js/src/index.js +50 -0
  143. data/app/assets/node_modules/bootstrap/js/src/modal.js +579 -0
  144. data/app/assets/node_modules/bootstrap/js/src/popover.js +188 -0
  145. data/app/assets/node_modules/bootstrap/js/src/scrollspy.js +329 -0
  146. data/app/assets/node_modules/bootstrap/js/src/tab.js +263 -0
  147. data/app/assets/node_modules/bootstrap/js/src/tooltip.js +723 -0
  148. data/app/assets/node_modules/bootstrap/js/src/util.js +153 -0
  149. data/app/assets/node_modules/bootstrap/package.json +218 -0
  150. data/app/assets/node_modules/bootstrap/scss/_alert.scss +51 -0
  151. data/app/assets/node_modules/bootstrap/scss/_badge.scss +47 -0
  152. data/app/assets/node_modules/bootstrap/scss/_breadcrumb.scss +41 -0
  153. data/app/assets/node_modules/bootstrap/scss/_button-group.scss +172 -0
  154. data/app/assets/node_modules/bootstrap/scss/_buttons.scss +144 -0
  155. data/app/assets/node_modules/bootstrap/scss/_card.scss +301 -0
  156. data/app/assets/node_modules/bootstrap/scss/_carousel.scss +236 -0
  157. data/app/assets/node_modules/bootstrap/scss/_close.scss +34 -0
  158. data/app/assets/node_modules/bootstrap/scss/_code.scss +48 -0
  159. data/app/assets/node_modules/bootstrap/scss/_custom-forms.scss +421 -0
  160. data/app/assets/node_modules/bootstrap/scss/_dropdown.scss +166 -0
  161. data/app/assets/node_modules/bootstrap/scss/_forms.scss +335 -0
  162. data/app/assets/node_modules/bootstrap/scss/_functions.scss +86 -0
  163. data/app/assets/node_modules/bootstrap/scss/_grid.scss +52 -0
  164. data/app/assets/node_modules/bootstrap/scss/_images.scss +42 -0
  165. data/app/assets/node_modules/bootstrap/scss/_input-group.scss +158 -0
  166. data/app/assets/node_modules/bootstrap/scss/_jumbotron.scss +16 -0
  167. data/app/assets/node_modules/bootstrap/scss/_list-group.scss +115 -0
  168. data/app/assets/node_modules/bootstrap/scss/_media.scss +8 -0
  169. data/app/assets/node_modules/bootstrap/scss/_mixins.scss +41 -0
  170. data/app/assets/node_modules/bootstrap/scss/_modal.scss +168 -0
  171. data/app/assets/node_modules/bootstrap/scss/_nav.scss +118 -0
  172. data/app/assets/node_modules/bootstrap/scss/_navbar.scss +299 -0
  173. data/app/assets/node_modules/bootstrap/scss/_pagination.scss +78 -0
  174. data/app/assets/node_modules/bootstrap/scss/_popover.scss +183 -0
  175. data/app/assets/node_modules/bootstrap/scss/_print.scss +141 -0
  176. data/app/assets/node_modules/bootstrap/scss/_progress.scss +34 -0
  177. data/app/assets/node_modules/bootstrap/scss/_reboot.scss +480 -0
  178. data/app/assets/node_modules/bootstrap/scss/_root.scss +19 -0
  179. data/app/assets/node_modules/bootstrap/scss/_tables.scss +188 -0
  180. data/app/assets/node_modules/bootstrap/scss/_tooltip.scss +115 -0
  181. data/app/assets/node_modules/bootstrap/scss/_transitions.scss +22 -0
  182. data/app/assets/node_modules/bootstrap/scss/_type.scss +125 -0
  183. data/app/assets/node_modules/bootstrap/scss/_utilities.scss +15 -0
  184. data/app/assets/node_modules/bootstrap/scss/_variables.scss +929 -0
  185. data/app/assets/node_modules/bootstrap/scss/bootstrap-grid.scss +32 -0
  186. data/app/assets/node_modules/bootstrap/scss/bootstrap-reboot.scss +12 -0
  187. data/app/assets/node_modules/bootstrap/scss/bootstrap.scss +42 -0
  188. data/app/assets/node_modules/bootstrap/scss/mixins/_alert.scss +13 -0
  189. data/app/assets/node_modules/bootstrap/scss/mixins/_background-variant.scss +21 -0
  190. data/app/assets/node_modules/bootstrap/scss/mixins/_badge.scss +12 -0
  191. data/app/assets/node_modules/bootstrap/scss/mixins/_border-radius.scss +35 -0
  192. data/app/assets/node_modules/bootstrap/scss/mixins/_box-shadow.scss +5 -0
  193. data/app/assets/node_modules/bootstrap/scss/mixins/_breakpoints.scss +123 -0
  194. data/app/assets/node_modules/bootstrap/scss/mixins/_buttons.scss +109 -0
  195. data/app/assets/node_modules/bootstrap/scss/mixins/_caret.scss +66 -0
  196. data/app/assets/node_modules/bootstrap/scss/mixins/_clearfix.scss +7 -0
  197. data/app/assets/node_modules/bootstrap/scss/mixins/_float.scss +11 -0
  198. data/app/assets/node_modules/bootstrap/scss/mixins/_forms.scss +147 -0
  199. data/app/assets/node_modules/bootstrap/scss/mixins/_gradients.scss +45 -0
  200. data/app/assets/node_modules/bootstrap/scss/mixins/_grid-framework.scss +67 -0
  201. data/app/assets/node_modules/bootstrap/scss/mixins/_grid.scss +52 -0
  202. data/app/assets/node_modules/bootstrap/scss/mixins/_hover.scss +37 -0
  203. data/app/assets/node_modules/bootstrap/scss/mixins/_image.scss +36 -0
  204. data/app/assets/node_modules/bootstrap/scss/mixins/_list-group.scss +21 -0
  205. data/app/assets/node_modules/bootstrap/scss/mixins/_lists.scss +7 -0
  206. data/app/assets/node_modules/bootstrap/scss/mixins/_nav-divider.scss +10 -0
  207. data/app/assets/node_modules/bootstrap/scss/mixins/_pagination.scss +22 -0
  208. data/app/assets/node_modules/bootstrap/scss/mixins/_reset-text.scss +17 -0
  209. data/app/assets/node_modules/bootstrap/scss/mixins/_resize.scss +6 -0
  210. data/app/assets/node_modules/bootstrap/scss/mixins/_screen-reader.scss +33 -0
  211. data/app/assets/node_modules/bootstrap/scss/mixins/_size.scss +6 -0
  212. data/app/assets/node_modules/bootstrap/scss/mixins/_table-row.scss +30 -0
  213. data/app/assets/node_modules/bootstrap/scss/mixins/_text-emphasis.scss +14 -0
  214. data/app/assets/node_modules/bootstrap/scss/mixins/_text-hide.scss +13 -0
  215. data/app/assets/node_modules/bootstrap/scss/mixins/_text-truncate.scss +8 -0
  216. data/app/assets/node_modules/bootstrap/scss/mixins/_transition.scss +13 -0
  217. data/app/assets/node_modules/bootstrap/scss/mixins/_visibility.scss +7 -0
  218. data/app/assets/node_modules/bootstrap/scss/utilities/_align.scss +8 -0
  219. data/app/assets/node_modules/bootstrap/scss/utilities/_background.scss +19 -0
  220. data/app/assets/node_modules/bootstrap/scss/utilities/_borders.scss +59 -0
  221. data/app/assets/node_modules/bootstrap/scss/utilities/_clearfix.scss +3 -0
  222. data/app/assets/node_modules/bootstrap/scss/utilities/_display.scss +38 -0
  223. data/app/assets/node_modules/bootstrap/scss/utilities/_embed.scss +52 -0
  224. data/app/assets/node_modules/bootstrap/scss/utilities/_flex.scss +51 -0
  225. data/app/assets/node_modules/bootstrap/scss/utilities/_float.scss +9 -0
  226. data/app/assets/node_modules/bootstrap/scss/utilities/_position.scss +37 -0
  227. data/app/assets/node_modules/bootstrap/scss/utilities/_screenreaders.scss +11 -0
  228. data/app/assets/node_modules/bootstrap/scss/utilities/_shadows.scss +6 -0
  229. data/app/assets/node_modules/bootstrap/scss/utilities/_sizing.scss +12 -0
  230. data/app/assets/node_modules/bootstrap/scss/utilities/_spacing.scss +51 -0
  231. data/app/assets/node_modules/bootstrap/scss/utilities/_text.scss +58 -0
  232. data/app/assets/node_modules/bootstrap/scss/utilities/_visibility.scss +11 -0
  233. data/app/assets/node_modules/clone/LICENSE +18 -0
  234. data/app/assets/node_modules/clone/README.md +178 -0
  235. data/app/assets/node_modules/clone/clone.iml +10 -0
  236. data/app/assets/node_modules/clone/clone.js +251 -0
  237. data/app/assets/node_modules/clone/package.json +56 -0
  238. data/app/assets/node_modules/deep-equal/LICENSE +18 -0
  239. data/app/assets/node_modules/deep-equal/example/cmp.js +11 -0
  240. data/app/assets/node_modules/deep-equal/index.js +94 -0
  241. data/app/assets/node_modules/deep-equal/lib/is_arguments.js +20 -0
  242. data/app/assets/node_modules/deep-equal/lib/keys.js +9 -0
  243. data/app/assets/node_modules/deep-equal/package.json +58 -0
  244. data/app/assets/node_modules/deep-equal/readme.markdown +61 -0
  245. data/app/assets/node_modules/deep-equal/test/cmp.js +95 -0
  246. data/app/assets/node_modules/dropzone/CONTRIBUTING.md +6 -0
  247. data/app/assets/node_modules/dropzone/LICENSE +12 -0
  248. data/app/assets/node_modules/dropzone/README.md +36 -0
  249. data/app/assets/node_modules/dropzone/bower.json +16 -0
  250. data/app/assets/node_modules/dropzone/component.json +10 -0
  251. data/app/assets/node_modules/dropzone/composer.json +18 -0
  252. data/app/assets/node_modules/dropzone/dist/basic.css +39 -0
  253. data/app/assets/node_modules/dropzone/dist/dropzone-amd-module.js +3541 -0
  254. data/app/assets/node_modules/dropzone/dist/dropzone.css +388 -0
  255. data/app/assets/node_modules/dropzone/dist/dropzone.js +3526 -0
  256. data/app/assets/node_modules/dropzone/dist/min/basic.min.css +1 -0
  257. data/app/assets/node_modules/dropzone/dist/min/dropzone-amd-module.min.js +2 -0
  258. data/app/assets/node_modules/dropzone/dist/min/dropzone.min.css +1 -0
  259. data/app/assets/node_modules/dropzone/dist/min/dropzone.min.js +2 -0
  260. data/app/assets/node_modules/dropzone/dist/readme.md +10 -0
  261. data/app/assets/node_modules/dropzone/index.js +1 -0
  262. data/app/assets/node_modules/dropzone/package.json +40 -0
  263. data/app/assets/node_modules/eve-raphael/LICENSE +202 -0
  264. data/app/assets/node_modules/eve-raphael/README.md +5 -0
  265. data/app/assets/node_modules/eve-raphael/bower.json +17 -0
  266. data/app/assets/node_modules/eve-raphael/component.json +13 -0
  267. data/app/assets/node_modules/eve-raphael/e.html +66 -0
  268. data/app/assets/node_modules/eve-raphael/eve.js +426 -0
  269. data/app/assets/node_modules/eve-raphael/package.json +15 -0
  270. data/app/assets/node_modules/eventemitter3/LICENSE +21 -0
  271. data/app/assets/node_modules/eventemitter3/README.md +105 -0
  272. data/app/assets/node_modules/eventemitter3/index.d.ts +50 -0
  273. data/app/assets/node_modules/eventemitter3/index.js +311 -0
  274. data/app/assets/node_modules/eventemitter3/package.json +51 -0
  275. data/app/assets/node_modules/eventemitter3/umd/eventemitter3.min.js +1 -0
  276. data/app/assets/node_modules/extend/CHANGELOG.md +77 -0
  277. data/app/assets/node_modules/extend/LICENSE +23 -0
  278. data/app/assets/node_modules/extend/README.md +81 -0
  279. data/app/assets/node_modules/extend/component.json +32 -0
  280. data/app/assets/node_modules/extend/index.js +86 -0
  281. data/app/assets/node_modules/extend/package.json +43 -0
  282. data/app/assets/node_modules/fast-diff/README.md +24 -0
  283. data/app/assets/node_modules/fast-diff/diff.js +738 -0
  284. data/app/assets/node_modules/fast-diff/package.json +24 -0
  285. data/app/assets/node_modules/fast-diff/test.js +91 -0
  286. data/app/assets/node_modules/jquery/AUTHORS.txt +313 -0
  287. data/app/assets/node_modules/jquery/LICENSE.txt +36 -0
  288. data/app/assets/node_modules/jquery/README.md +67 -0
  289. data/app/assets/node_modules/jquery/bower.json +14 -0
  290. data/app/assets/node_modules/jquery/dist/core.js +399 -0
  291. data/app/assets/node_modules/jquery/dist/jquery.js +10364 -0
  292. data/app/assets/node_modules/jquery/dist/jquery.min.js +2 -0
  293. data/app/assets/node_modules/jquery/dist/jquery.min.map +1 -0
  294. data/app/assets/node_modules/jquery/dist/jquery.slim.js +8269 -0
  295. data/app/assets/node_modules/jquery/dist/jquery.slim.min.js +2 -0
  296. data/app/assets/node_modules/jquery/dist/jquery.slim.min.map +1 -0
  297. data/app/assets/node_modules/jquery/external/sizzle/LICENSE.txt +36 -0
  298. data/app/assets/node_modules/jquery/external/sizzle/dist/sizzle.js +2272 -0
  299. data/app/assets/node_modules/jquery/external/sizzle/dist/sizzle.min.js +3 -0
  300. data/app/assets/node_modules/jquery/external/sizzle/dist/sizzle.min.map +1 -0
  301. data/app/assets/node_modules/jquery/package.json +108 -0
  302. data/app/assets/node_modules/jquery/src/ajax/jsonp.js +103 -0
  303. data/app/assets/node_modules/jquery/src/ajax/load.js +77 -0
  304. data/app/assets/node_modules/jquery/src/ajax/parseXML.js +30 -0
  305. data/app/assets/node_modules/jquery/src/ajax/script.js +77 -0
  306. data/app/assets/node_modules/jquery/src/ajax/var/location.js +5 -0
  307. data/app/assets/node_modules/jquery/src/ajax/var/nonce.js +5 -0
  308. data/app/assets/node_modules/jquery/src/ajax/var/rquery.js +5 -0
  309. data/app/assets/node_modules/jquery/src/ajax/xhr.js +170 -0
  310. data/app/assets/node_modules/jquery/src/ajax.js +856 -0
  311. data/app/assets/node_modules/jquery/src/attributes/attr.js +141 -0
  312. data/app/assets/node_modules/jquery/src/attributes/classes.js +186 -0
  313. data/app/assets/node_modules/jquery/src/attributes/prop.js +143 -0
  314. data/app/assets/node_modules/jquery/src/attributes/support.js +33 -0
  315. data/app/assets/node_modules/jquery/src/attributes/val.js +191 -0
  316. data/app/assets/node_modules/jquery/src/attributes.js +13 -0
  317. data/app/assets/node_modules/jquery/src/callbacks.js +236 -0
  318. data/app/assets/node_modules/jquery/src/core/DOMEval.js +30 -0
  319. data/app/assets/node_modules/jquery/src/core/access.js +72 -0
  320. data/app/assets/node_modules/jquery/src/core/camelCase.js +23 -0
  321. data/app/assets/node_modules/jquery/src/core/init.js +129 -0
  322. data/app/assets/node_modules/jquery/src/core/nodeName.js +13 -0
  323. data/app/assets/node_modules/jquery/src/core/parseHTML.js +65 -0
  324. data/app/assets/node_modules/jquery/src/core/ready-no-deferred.js +97 -0
  325. data/app/assets/node_modules/jquery/src/core/ready.js +86 -0
  326. data/app/assets/node_modules/jquery/src/core/readyException.js +13 -0
  327. data/app/assets/node_modules/jquery/src/core/stripAndCollapse.js +14 -0
  328. data/app/assets/node_modules/jquery/src/core/support.js +20 -0
  329. data/app/assets/node_modules/jquery/src/core/toType.js +20 -0
  330. data/app/assets/node_modules/jquery/src/core/var/rsingleTag.js +6 -0
  331. data/app/assets/node_modules/jquery/src/core.js +399 -0
  332. data/app/assets/node_modules/jquery/src/css/addGetHookIf.js +26 -0
  333. data/app/assets/node_modules/jquery/src/css/adjustCSS.js +73 -0
  334. data/app/assets/node_modules/jquery/src/css/curCSS.js +65 -0
  335. data/app/assets/node_modules/jquery/src/css/hiddenVisibleSelectors.js +15 -0
  336. data/app/assets/node_modules/jquery/src/css/showHide.js +105 -0
  337. data/app/assets/node_modules/jquery/src/css/support.js +102 -0
  338. data/app/assets/node_modules/jquery/src/css/var/cssExpand.js +5 -0
  339. data/app/assets/node_modules/jquery/src/css/var/getStyles.js +17 -0
  340. data/app/assets/node_modules/jquery/src/css/var/isHiddenWithinTree.js +34 -0
  341. data/app/assets/node_modules/jquery/src/css/var/rboxStyle.js +7 -0
  342. data/app/assets/node_modules/jquery/src/css/var/rnumnonpx.js +7 -0
  343. data/app/assets/node_modules/jquery/src/css/var/swap.js +26 -0
  344. data/app/assets/node_modules/jquery/src/css.js +481 -0
  345. data/app/assets/node_modules/jquery/src/data/Data.js +162 -0
  346. data/app/assets/node_modules/jquery/src/data/var/acceptData.js +19 -0
  347. data/app/assets/node_modules/jquery/src/data/var/dataPriv.js +7 -0
  348. data/app/assets/node_modules/jquery/src/data/var/dataUser.js +7 -0
  349. data/app/assets/node_modules/jquery/src/data.js +180 -0
  350. data/app/assets/node_modules/jquery/src/deferred/exceptionHook.js +21 -0
  351. data/app/assets/node_modules/jquery/src/deferred.js +399 -0
  352. data/app/assets/node_modules/jquery/src/deprecated.js +98 -0
  353. data/app/assets/node_modules/jquery/src/dimensions.js +57 -0
  354. data/app/assets/node_modules/jquery/src/effects/Tween.js +123 -0
  355. data/app/assets/node_modules/jquery/src/effects/animatedSelector.js +15 -0
  356. data/app/assets/node_modules/jquery/src/effects.js +702 -0
  357. data/app/assets/node_modules/jquery/src/event/ajax.js +22 -0
  358. data/app/assets/node_modules/jquery/src/event/alias.js +29 -0
  359. data/app/assets/node_modules/jquery/src/event/focusin.js +55 -0
  360. data/app/assets/node_modules/jquery/src/event/support.js +11 -0
  361. data/app/assets/node_modules/jquery/src/event/trigger.js +199 -0
  362. data/app/assets/node_modules/jquery/src/event.js +748 -0
  363. data/app/assets/node_modules/jquery/src/exports/amd.js +26 -0
  364. data/app/assets/node_modules/jquery/src/exports/global.js +34 -0
  365. data/app/assets/node_modules/jquery/src/jquery.js +40 -0
  366. data/app/assets/node_modules/jquery/src/manipulation/_evalUrl.js +23 -0
  367. data/app/assets/node_modules/jquery/src/manipulation/buildFragment.js +105 -0
  368. data/app/assets/node_modules/jquery/src/manipulation/getAll.js +32 -0
  369. data/app/assets/node_modules/jquery/src/manipulation/setGlobalEval.js +22 -0
  370. data/app/assets/node_modules/jquery/src/manipulation/support.js +35 -0
  371. data/app/assets/node_modules/jquery/src/manipulation/var/rcheckableType.js +5 -0
  372. data/app/assets/node_modules/jquery/src/manipulation/var/rscriptType.js +5 -0
  373. data/app/assets/node_modules/jquery/src/manipulation/var/rtagName.js +5 -0
  374. data/app/assets/node_modules/jquery/src/manipulation/wrapMap.js +29 -0
  375. data/app/assets/node_modules/jquery/src/manipulation.js +486 -0
  376. data/app/assets/node_modules/jquery/src/offset.js +233 -0
  377. data/app/assets/node_modules/jquery/src/queue/delay.js +24 -0
  378. data/app/assets/node_modules/jquery/src/queue.js +145 -0
  379. data/app/assets/node_modules/jquery/src/selector-native.js +237 -0
  380. data/app/assets/node_modules/jquery/src/selector-sizzle.js +19 -0
  381. data/app/assets/node_modules/jquery/src/selector.js +3 -0
  382. data/app/assets/node_modules/jquery/src/serialize.js +132 -0
  383. data/app/assets/node_modules/jquery/src/traversing/findFilter.js +97 -0
  384. data/app/assets/node_modules/jquery/src/traversing/var/dir.js +22 -0
  385. data/app/assets/node_modules/jquery/src/traversing/var/rneedsContext.js +8 -0
  386. data/app/assets/node_modules/jquery/src/traversing/var/siblings.js +17 -0
  387. data/app/assets/node_modules/jquery/src/traversing.js +191 -0
  388. data/app/assets/node_modules/jquery/src/var/ObjectFunctionString.js +7 -0
  389. data/app/assets/node_modules/jquery/src/var/arr.js +5 -0
  390. data/app/assets/node_modules/jquery/src/var/class2type.js +6 -0
  391. data/app/assets/node_modules/jquery/src/var/concat.js +7 -0
  392. data/app/assets/node_modules/jquery/src/var/document.js +5 -0
  393. data/app/assets/node_modules/jquery/src/var/documentElement.js +7 -0
  394. data/app/assets/node_modules/jquery/src/var/fnToString.js +7 -0
  395. data/app/assets/node_modules/jquery/src/var/getProto.js +5 -0
  396. data/app/assets/node_modules/jquery/src/var/hasOwn.js +7 -0
  397. data/app/assets/node_modules/jquery/src/var/indexOf.js +7 -0
  398. data/app/assets/node_modules/jquery/src/var/isFunction.js +13 -0
  399. data/app/assets/node_modules/jquery/src/var/isWindow.js +8 -0
  400. data/app/assets/node_modules/jquery/src/var/pnum.js +5 -0
  401. data/app/assets/node_modules/jquery/src/var/push.js +7 -0
  402. data/app/assets/node_modules/jquery/src/var/rcssNum.js +9 -0
  403. data/app/assets/node_modules/jquery/src/var/rnothtmlwhite.js +8 -0
  404. data/app/assets/node_modules/jquery/src/var/slice.js +7 -0
  405. data/app/assets/node_modules/jquery/src/var/support.js +6 -0
  406. data/app/assets/node_modules/jquery/src/var/toString.js +7 -0
  407. data/app/assets/node_modules/jquery/src/wrap.js +78 -0
  408. data/app/assets/node_modules/jquery-flot/API.md +1498 -0
  409. data/app/assets/node_modules/jquery-flot/CONTRIBUTING.md +98 -0
  410. data/app/assets/node_modules/jquery-flot/FAQ.md +75 -0
  411. data/app/assets/node_modules/jquery-flot/LICENSE.txt +22 -0
  412. data/app/assets/node_modules/jquery-flot/Makefile +12 -0
  413. data/app/assets/node_modules/jquery-flot/NEWS.md +1026 -0
  414. data/app/assets/node_modules/jquery-flot/PLUGINS.md +143 -0
  415. data/app/assets/node_modules/jquery-flot/README.md +110 -0
  416. data/app/assets/node_modules/jquery-flot/component.json +8 -0
  417. data/app/assets/node_modules/jquery-flot/examples/ajax/data-eu-gdp-growth-1.json +4 -0
  418. data/app/assets/node_modules/jquery-flot/examples/ajax/data-eu-gdp-growth-2.json +4 -0
  419. data/app/assets/node_modules/jquery-flot/examples/ajax/data-eu-gdp-growth-3.json +4 -0
  420. data/app/assets/node_modules/jquery-flot/examples/ajax/data-eu-gdp-growth-4.json +4 -0
  421. data/app/assets/node_modules/jquery-flot/examples/ajax/data-eu-gdp-growth-5.json +4 -0
  422. data/app/assets/node_modules/jquery-flot/examples/ajax/data-eu-gdp-growth.json +4 -0
  423. data/app/assets/node_modules/jquery-flot/examples/ajax/data-japan-gdp-growth.json +4 -0
  424. data/app/assets/node_modules/jquery-flot/examples/ajax/data-usa-gdp-growth.json +4 -0
  425. data/app/assets/node_modules/jquery-flot/examples/ajax/index.html +173 -0
  426. data/app/assets/node_modules/jquery-flot/examples/annotating/index.html +87 -0
  427. data/app/assets/node_modules/jquery-flot/examples/axes-interacting/index.html +97 -0
  428. data/app/assets/node_modules/jquery-flot/examples/axes-multiple/index.html +77 -0
  429. data/app/assets/node_modules/jquery-flot/examples/axes-time/index.html +137 -0
  430. data/app/assets/node_modules/jquery-flot/examples/axes-time-zones/date.js +893 -0
  431. data/app/assets/node_modules/jquery-flot/examples/axes-time-zones/index.html +114 -0
  432. data/app/assets/node_modules/jquery-flot/examples/axes-time-zones/tz/africa +1181 -0
  433. data/app/assets/node_modules/jquery-flot/examples/axes-time-zones/tz/antarctica +413 -0
  434. data/app/assets/node_modules/jquery-flot/examples/axes-time-zones/tz/asia +2717 -0
  435. data/app/assets/node_modules/jquery-flot/examples/axes-time-zones/tz/australasia +1719 -0
  436. data/app/assets/node_modules/jquery-flot/examples/axes-time-zones/tz/backward +117 -0
  437. data/app/assets/node_modules/jquery-flot/examples/axes-time-zones/tz/etcetera +81 -0
  438. data/app/assets/node_modules/jquery-flot/examples/axes-time-zones/tz/europe +2856 -0
  439. data/app/assets/node_modules/jquery-flot/examples/axes-time-zones/tz/factory +10 -0
  440. data/app/assets/node_modules/jquery-flot/examples/axes-time-zones/tz/iso3166.tab +276 -0
  441. data/app/assets/node_modules/jquery-flot/examples/axes-time-zones/tz/leapseconds +100 -0
  442. data/app/assets/node_modules/jquery-flot/examples/axes-time-zones/tz/northamerica +3235 -0
  443. data/app/assets/node_modules/jquery-flot/examples/axes-time-zones/tz/pacificnew +28 -0
  444. data/app/assets/node_modules/jquery-flot/examples/axes-time-zones/tz/solar87 +390 -0
  445. data/app/assets/node_modules/jquery-flot/examples/axes-time-zones/tz/solar88 +390 -0
  446. data/app/assets/node_modules/jquery-flot/examples/axes-time-zones/tz/solar89 +395 -0
  447. data/app/assets/node_modules/jquery-flot/examples/axes-time-zones/tz/southamerica +1711 -0
  448. data/app/assets/node_modules/jquery-flot/examples/axes-time-zones/tz/systemv +38 -0
  449. data/app/assets/node_modules/jquery-flot/examples/axes-time-zones/tz/yearistype.sh +38 -0
  450. data/app/assets/node_modules/jquery-flot/examples/axes-time-zones/tz/zone.tab +441 -0
  451. data/app/assets/node_modules/jquery-flot/examples/background.png +0 -0
  452. data/app/assets/node_modules/jquery-flot/examples/basic-options/index.html +91 -0
  453. data/app/assets/node_modules/jquery-flot/examples/basic-usage/index.html +57 -0
  454. data/app/assets/node_modules/jquery-flot/examples/canvas/index.html +75 -0
  455. data/app/assets/node_modules/jquery-flot/examples/categories/index.html +64 -0
  456. data/app/assets/node_modules/jquery-flot/examples/examples.css +97 -0
  457. data/app/assets/node_modules/jquery-flot/examples/image/hs-2004-27-a-large-web.jpg +0 -0
  458. data/app/assets/node_modules/jquery-flot/examples/image/index.html +69 -0
  459. data/app/assets/node_modules/jquery-flot/examples/index.html +80 -0
  460. data/app/assets/node_modules/jquery-flot/examples/interacting/index.html +118 -0
  461. data/app/assets/node_modules/jquery-flot/examples/navigate/arrow-down.gif +0 -0
  462. data/app/assets/node_modules/jquery-flot/examples/navigate/arrow-left.gif +0 -0
  463. data/app/assets/node_modules/jquery-flot/examples/navigate/arrow-right.gif +0 -0
  464. data/app/assets/node_modules/jquery-flot/examples/navigate/arrow-up.gif +0 -0
  465. data/app/assets/node_modules/jquery-flot/examples/navigate/index.html +153 -0
  466. data/app/assets/node_modules/jquery-flot/examples/percentiles/index.html +79 -0
  467. data/app/assets/node_modules/jquery-flot/examples/realtime/index.html +122 -0
  468. data/app/assets/node_modules/jquery-flot/examples/resize/index.html +76 -0
  469. data/app/assets/node_modules/jquery-flot/examples/selection/index.html +152 -0
  470. data/app/assets/node_modules/jquery-flot/examples/series-errorbars/index.html +150 -0
  471. data/app/assets/node_modules/jquery-flot/examples/series-pie/index.html +818 -0
  472. data/app/assets/node_modules/jquery-flot/examples/series-toggle/index.html +121 -0
  473. data/app/assets/node_modules/jquery-flot/examples/series-types/index.html +90 -0
  474. data/app/assets/node_modules/jquery-flot/examples/shared/jquery-ui/jquery-ui.min.css +6 -0
  475. data/app/assets/node_modules/jquery-flot/examples/stacking/index.html +107 -0
  476. data/app/assets/node_modules/jquery-flot/examples/symbols/index.html +76 -0
  477. data/app/assets/node_modules/jquery-flot/examples/threshold/index.html +76 -0
  478. data/app/assets/node_modules/jquery-flot/examples/tracking/index.html +135 -0
  479. data/app/assets/node_modules/jquery-flot/examples/visitors/index.html +147 -0
  480. data/app/assets/node_modules/jquery-flot/examples/zooming/index.html +144 -0
  481. data/app/assets/node_modules/jquery-flot/excanvas.js +1428 -0
  482. data/app/assets/node_modules/jquery-flot/excanvas.min.js +1 -0
  483. data/app/assets/node_modules/jquery-flot/flot.jquery.json +27 -0
  484. data/app/assets/node_modules/jquery-flot/jquery.colorhelpers.js +180 -0
  485. data/app/assets/node_modules/jquery-flot/jquery.flot.canvas.js +345 -0
  486. data/app/assets/node_modules/jquery-flot/jquery.flot.categories.js +190 -0
  487. data/app/assets/node_modules/jquery-flot/jquery.flot.crosshair.js +176 -0
  488. data/app/assets/node_modules/jquery-flot/jquery.flot.errorbars.js +353 -0
  489. data/app/assets/node_modules/jquery-flot/jquery.flot.fillbetween.js +226 -0
  490. data/app/assets/node_modules/jquery-flot/jquery.flot.image.js +241 -0
  491. data/app/assets/node_modules/jquery-flot/jquery.flot.js +3168 -0
  492. data/app/assets/node_modules/jquery-flot/jquery.flot.navigate.js +346 -0
  493. data/app/assets/node_modules/jquery-flot/jquery.flot.pie.js +820 -0
  494. data/app/assets/node_modules/jquery-flot/jquery.flot.resize.js +59 -0
  495. data/app/assets/node_modules/jquery-flot/jquery.flot.selection.js +360 -0
  496. data/app/assets/node_modules/jquery-flot/jquery.flot.stack.js +188 -0
  497. data/app/assets/node_modules/jquery-flot/jquery.flot.symbol.js +71 -0
  498. data/app/assets/node_modules/jquery-flot/jquery.flot.threshold.js +142 -0
  499. data/app/assets/node_modules/jquery-flot/jquery.flot.time.js +432 -0
  500. data/app/assets/node_modules/jquery-flot/jquery.js +9472 -0
  501. data/app/assets/node_modules/jquery-flot/package.json +11 -0
  502. data/app/assets/node_modules/jquery-sparkline/Changelog.txt +324 -0
  503. data/app/assets/node_modules/jquery-sparkline/README.md +19 -0
  504. data/app/assets/node_modules/jquery-sparkline/build.js +13 -0
  505. data/app/assets/node_modules/jquery-sparkline/jquery.sparkline.js +3068 -0
  506. data/app/assets/node_modules/jquery-sparkline/jquery.sparkline.min.js +2 -0
  507. data/app/assets/node_modules/jquery-sparkline/package.json +32 -0
  508. data/app/assets/node_modules/jquery-sparkline/src/base.js +415 -0
  509. data/app/assets/node_modules/jquery-sparkline/src/chart-bar.js +256 -0
  510. data/app/assets/node_modules/jquery-sparkline/src/chart-box.js +186 -0
  511. data/app/assets/node_modules/jquery-sparkline/src/chart-bullet.js +131 -0
  512. data/app/assets/node_modules/jquery-sparkline/src/chart-discrete.js +66 -0
  513. data/app/assets/node_modules/jquery-sparkline/src/chart-line.js +350 -0
  514. data/app/assets/node_modules/jquery-sparkline/src/chart-pie.js +117 -0
  515. data/app/assets/node_modules/jquery-sparkline/src/chart-tristate.js +98 -0
  516. data/app/assets/node_modules/jquery-sparkline/src/defaults.js +156 -0
  517. data/app/assets/node_modules/jquery-sparkline/src/footer.js +1 -0
  518. data/app/assets/node_modules/jquery-sparkline/src/header.js +222 -0
  519. data/app/assets/node_modules/jquery-sparkline/src/interact.js +247 -0
  520. data/app/assets/node_modules/jquery-sparkline/src/rangemap.js +39 -0
  521. data/app/assets/node_modules/jquery-sparkline/src/simpledraw.js +55 -0
  522. data/app/assets/node_modules/jquery-sparkline/src/utils.js +224 -0
  523. data/app/assets/node_modules/jquery-sparkline/src/vcanvas-base.js +147 -0
  524. data/app/assets/node_modules/jquery-sparkline/src/vcanvas-canvas.js +193 -0
  525. data/app/assets/node_modules/jquery-sparkline/src/vcanvas-vml.js +165 -0
  526. data/app/assets/node_modules/jquery-touchswipe/LICENSE +24 -0
  527. data/app/assets/node_modules/jquery-touchswipe/README.md +81 -0
  528. data/app/assets/node_modules/jquery-touchswipe/bower.json +8 -0
  529. data/app/assets/node_modules/jquery-touchswipe/demos/Any_finger_swipe.html +49 -0
  530. data/app/assets/node_modules/jquery-touchswipe/demos/Basic_swipe.html +48 -0
  531. data/app/assets/node_modules/jquery-touchswipe/demos/Enable_and_destroy.html +95 -0
  532. data/app/assets/node_modules/jquery-touchswipe/demos/Excluded_children.html +82 -0
  533. data/app/assets/node_modules/jquery-touchswipe/demos/Finger_swipe.html +61 -0
  534. data/app/assets/node_modules/jquery-touchswipe/demos/Handlers_and_events.html +128 -0
  535. data/app/assets/node_modules/jquery-touchswipe/demos/Hold.html +61 -0
  536. data/app/assets/node_modules/jquery-touchswipe/demos/Image_gallery_example.html +148 -0
  537. data/app/assets/node_modules/jquery-touchswipe/demos/Options.html +90 -0
  538. data/app/assets/node_modules/jquery-touchswipe/demos/Page_scrolling.html +109 -0
  539. data/app/assets/node_modules/jquery-touchswipe/demos/Page_zoom.html +50 -0
  540. data/app/assets/node_modules/jquery-touchswipe/demos/Pinch.html +57 -0
  541. data/app/assets/node_modules/jquery-touchswipe/demos/Pinch_and_Swipe.html +81 -0
  542. data/app/assets/node_modules/jquery-touchswipe/demos/Pinch_status.html +51 -0
  543. data/app/assets/node_modules/jquery-touchswipe/demos/Single_swipe.html +51 -0
  544. data/app/assets/node_modules/jquery-touchswipe/demos/Stop_propegation.html +57 -0
  545. data/app/assets/node_modules/jquery-touchswipe/demos/Swipe_status.html +82 -0
  546. data/app/assets/node_modules/jquery-touchswipe/demos/Tap_vs_swipe.html +114 -0
  547. data/app/assets/node_modules/jquery-touchswipe/demos/Thresholds.html +109 -0
  548. data/app/assets/node_modules/jquery-touchswipe/demos/Trigger_handlers.html +158 -0
  549. data/app/assets/node_modules/jquery-touchswipe/demos/css/main.css +110 -0
  550. data/app/assets/node_modules/jquery-touchswipe/demos/index.html +74 -0
  551. data/app/assets/node_modules/jquery-touchswipe/demos/js/jquery.ui.ipad.js +223 -0
  552. data/app/assets/node_modules/jquery-touchswipe/demos/js/main.js +240 -0
  553. data/app/assets/node_modules/jquery-touchswipe/demos/tutorials.json +22 -0
  554. data/app/assets/node_modules/jquery-touchswipe/docs/$.fn.html +188 -0
  555. data/app/assets/node_modules/jquery-touchswipe/docs/$.fn.swipe.defaults.html +1174 -0
  556. data/app/assets/node_modules/jquery-touchswipe/docs/$.fn.swipe.directions.html +311 -0
  557. data/app/assets/node_modules/jquery-touchswipe/docs/$.fn.swipe.fingers.html +319 -0
  558. data/app/assets/node_modules/jquery-touchswipe/docs/$.fn.swipe.html +4205 -0
  559. data/app/assets/node_modules/jquery-touchswipe/docs/$.fn.swipe.pageScroll.html +272 -0
  560. data/app/assets/node_modules/jquery-touchswipe/docs/$.fn.swipe.phases.html +265 -0
  561. data/app/assets/node_modules/jquery-touchswipe/docs/$.html +186 -0
  562. data/app/assets/node_modules/jquery-touchswipe/docs/css/main.css +110 -0
  563. data/app/assets/node_modules/jquery-touchswipe/docs/index.html +101 -0
  564. data/app/assets/node_modules/jquery-touchswipe/docs/jquery.touchSwipe.js.html +2168 -0
  565. data/app/assets/node_modules/jquery-touchswipe/docs/js/jquery.ui.ipad.js +223 -0
  566. data/app/assets/node_modules/jquery-touchswipe/docs/js/main.js +85 -0
  567. data/app/assets/node_modules/jquery-touchswipe/docs/scripts/linenumber.js +25 -0
  568. data/app/assets/node_modules/jquery-touchswipe/docs/scripts/prettify/Apache-License-2.0.txt +202 -0
  569. data/app/assets/node_modules/jquery-touchswipe/docs/scripts/prettify/lang-css.js +2 -0
  570. data/app/assets/node_modules/jquery-touchswipe/docs/scripts/prettify/prettify.js +28 -0
  571. data/app/assets/node_modules/jquery-touchswipe/docs/styles/jsdoc.css +625 -0
  572. data/app/assets/node_modules/jquery-touchswipe/docs/styles/prettify.css +79 -0
  573. data/app/assets/node_modules/jquery-touchswipe/docs/tutorial-Any_finger_swipe.html +108 -0
  574. data/app/assets/node_modules/jquery-touchswipe/docs/tutorial-Basic_swipe.html +107 -0
  575. data/app/assets/node_modules/jquery-touchswipe/docs/tutorial-Enable_and_destroy.html +154 -0
  576. data/app/assets/node_modules/jquery-touchswipe/docs/tutorial-Excluded_children.html +141 -0
  577. data/app/assets/node_modules/jquery-touchswipe/docs/tutorial-Finger_swipe.html +120 -0
  578. data/app/assets/node_modules/jquery-touchswipe/docs/tutorial-Handlers_and_events.html +187 -0
  579. data/app/assets/node_modules/jquery-touchswipe/docs/tutorial-Hold.html +120 -0
  580. data/app/assets/node_modules/jquery-touchswipe/docs/tutorial-Image_gallery_example.html +207 -0
  581. data/app/assets/node_modules/jquery-touchswipe/docs/tutorial-Options.html +149 -0
  582. data/app/assets/node_modules/jquery-touchswipe/docs/tutorial-Page_scrolling.html +168 -0
  583. data/app/assets/node_modules/jquery-touchswipe/docs/tutorial-Page_zoom.html +109 -0
  584. data/app/assets/node_modules/jquery-touchswipe/docs/tutorial-Pinch.html +116 -0
  585. data/app/assets/node_modules/jquery-touchswipe/docs/tutorial-Pinch_and_Swipe.html +140 -0
  586. data/app/assets/node_modules/jquery-touchswipe/docs/tutorial-Pinch_status.html +110 -0
  587. data/app/assets/node_modules/jquery-touchswipe/docs/tutorial-Single_swipe.html +110 -0
  588. data/app/assets/node_modules/jquery-touchswipe/docs/tutorial-Stop_propegation.html +116 -0
  589. data/app/assets/node_modules/jquery-touchswipe/docs/tutorial-Swipe_status.html +141 -0
  590. data/app/assets/node_modules/jquery-touchswipe/docs/tutorial-Tap_vs_swipe.html +173 -0
  591. data/app/assets/node_modules/jquery-touchswipe/docs/tutorial-Thresholds.html +168 -0
  592. data/app/assets/node_modules/jquery-touchswipe/docs/tutorial-Trigger_handlers.html +217 -0
  593. data/app/assets/node_modules/jquery-touchswipe/docs/tutorial-index_.html +133 -0
  594. data/app/assets/node_modules/jquery-touchswipe/jquery.touchSwipe.js +2109 -0
  595. data/app/assets/node_modules/jquery-touchswipe/jquery.touchSwipe.min.js +14 -0
  596. data/app/assets/node_modules/jquery-touchswipe/package.json +47 -0
  597. data/app/assets/node_modules/jquery-validation/LICENSE.md +22 -0
  598. data/app/assets/node_modules/jquery-validation/README.md +76 -0
  599. data/app/assets/node_modules/jquery-validation/changelog.md +639 -0
  600. data/app/assets/node_modules/jquery-validation/dist/additional-methods.js +1158 -0
  601. data/app/assets/node_modules/jquery-validation/dist/jquery.validate.js +1601 -0
  602. data/app/assets/node_modules/jquery-validation/dist/jquery.validate.min.js +4 -0
  603. data/app/assets/node_modules/jquery-validation/dist/localization/messages_ar.js +35 -0
  604. data/app/assets/node_modules/jquery-validation/dist/localization/messages_az.js +35 -0
  605. data/app/assets/node_modules/jquery-validation/dist/localization/messages_bg.js +35 -0
  606. data/app/assets/node_modules/jquery-validation/dist/localization/messages_bn_BD.js +35 -0
  607. data/app/assets/node_modules/jquery-validation/dist/localization/messages_ca.js +35 -0
  608. data/app/assets/node_modules/jquery-validation/dist/localization/messages_cs.js +35 -0
  609. data/app/assets/node_modules/jquery-validation/dist/localization/messages_da.js +32 -0
  610. data/app/assets/node_modules/jquery-validation/dist/localization/messages_de.js +32 -0
  611. data/app/assets/node_modules/jquery-validation/dist/localization/messages_el.js +35 -0
  612. data/app/assets/node_modules/jquery-validation/dist/localization/messages_es.js +38 -0
  613. data/app/assets/node_modules/jquery-validation/dist/localization/messages_es_AR.js +39 -0
  614. data/app/assets/node_modules/jquery-validation/dist/localization/messages_es_PE.js +39 -0
  615. data/app/assets/node_modules/jquery-validation/dist/localization/messages_et.js +33 -0
  616. data/app/assets/node_modules/jquery-validation/dist/localization/messages_eu.js +35 -0
  617. data/app/assets/node_modules/jquery-validation/dist/localization/messages_fa.js +38 -0
  618. data/app/assets/node_modules/jquery-validation/dist/localization/messages_fi.js +33 -0
  619. data/app/assets/node_modules/jquery-validation/dist/localization/messages_fr.js +63 -0
  620. data/app/assets/node_modules/jquery-validation/dist/localization/messages_ge.js +35 -0
  621. data/app/assets/node_modules/jquery-validation/dist/localization/messages_gl.js +40 -0
  622. data/app/assets/node_modules/jquery-validation/dist/localization/messages_he.js +35 -0
  623. data/app/assets/node_modules/jquery-validation/dist/localization/messages_hr.js +35 -0
  624. data/app/assets/node_modules/jquery-validation/dist/localization/messages_hu.js +35 -0
  625. data/app/assets/node_modules/jquery-validation/dist/localization/messages_hy_AM.js +35 -0
  626. data/app/assets/node_modules/jquery-validation/dist/localization/messages_id.js +34 -0
  627. data/app/assets/node_modules/jquery-validation/dist/localization/messages_is.js +33 -0
  628. data/app/assets/node_modules/jquery-validation/dist/localization/messages_it.js +39 -0
  629. data/app/assets/node_modules/jquery-validation/dist/localization/messages_ja.js +36 -0
  630. data/app/assets/node_modules/jquery-validation/dist/localization/messages_ka.js +35 -0
  631. data/app/assets/node_modules/jquery-validation/dist/localization/messages_kk.js +35 -0
  632. data/app/assets/node_modules/jquery-validation/dist/localization/messages_ko.js +35 -0
  633. data/app/assets/node_modules/jquery-validation/dist/localization/messages_lt.js +35 -0
  634. data/app/assets/node_modules/jquery-validation/dist/localization/messages_lv.js +35 -0
  635. data/app/assets/node_modules/jquery-validation/dist/localization/messages_mk.js +35 -0
  636. data/app/assets/node_modules/jquery-validation/dist/localization/messages_my.js +35 -0
  637. data/app/assets/node_modules/jquery-validation/dist/localization/messages_nl.js +46 -0
  638. data/app/assets/node_modules/jquery-validation/dist/localization/messages_no.js +36 -0
  639. data/app/assets/node_modules/jquery-validation/dist/localization/messages_pl.js +37 -0
  640. data/app/assets/node_modules/jquery-validation/dist/localization/messages_pt_BR.js +88 -0
  641. data/app/assets/node_modules/jquery-validation/dist/localization/messages_pt_PT.js +39 -0
  642. data/app/assets/node_modules/jquery-validation/dist/localization/messages_ro.js +35 -0
  643. data/app/assets/node_modules/jquery-validation/dist/localization/messages_ru.js +35 -0
  644. data/app/assets/node_modules/jquery-validation/dist/localization/messages_sd.js +35 -0
  645. data/app/assets/node_modules/jquery-validation/dist/localization/messages_si.js +35 -0
  646. data/app/assets/node_modules/jquery-validation/dist/localization/messages_sk.js +32 -0
  647. data/app/assets/node_modules/jquery-validation/dist/localization/messages_sl.js +35 -0
  648. data/app/assets/node_modules/jquery-validation/dist/localization/messages_sr.js +35 -0
  649. data/app/assets/node_modules/jquery-validation/dist/localization/messages_sr_lat.js +35 -0
  650. data/app/assets/node_modules/jquery-validation/dist/localization/messages_sv.js +33 -0
  651. data/app/assets/node_modules/jquery-validation/dist/localization/messages_th.js +35 -0
  652. data/app/assets/node_modules/jquery-validation/dist/localization/messages_tj.js +35 -0
  653. data/app/assets/node_modules/jquery-validation/dist/localization/messages_tr.js +36 -0
  654. data/app/assets/node_modules/jquery-validation/dist/localization/messages_uk.js +35 -0
  655. data/app/assets/node_modules/jquery-validation/dist/localization/messages_ur.js +35 -0
  656. data/app/assets/node_modules/jquery-validation/dist/localization/messages_vi.js +35 -0
  657. data/app/assets/node_modules/jquery-validation/dist/localization/messages_zh.js +35 -0
  658. data/app/assets/node_modules/jquery-validation/dist/localization/messages_zh_TW.js +36 -0
  659. data/app/assets/node_modules/jquery-validation/dist/localization/methods_de.js +24 -0
  660. data/app/assets/node_modules/jquery-validation/dist/localization/methods_es_CL.js +24 -0
  661. data/app/assets/node_modules/jquery-validation/dist/localization/methods_fi.js +24 -0
  662. data/app/assets/node_modules/jquery-validation/dist/localization/methods_nl.js +24 -0
  663. data/app/assets/node_modules/jquery-validation/dist/localization/methods_pt.js +21 -0
  664. data/app/assets/node_modules/jquery-validation/package.json +61 -0
  665. data/app/assets/node_modules/jquery.browser/Gruntfile.js +62 -0
  666. data/app/assets/node_modules/jquery.browser/MIT-LICENSE.txt +21 -0
  667. data/app/assets/node_modules/jquery.browser/README.md +117 -0
  668. data/app/assets/node_modules/jquery.browser/bower.json +13 -0
  669. data/app/assets/node_modules/jquery.browser/browser.jquery.json +37 -0
  670. data/app/assets/node_modules/jquery.browser/dist/jquery.browser.js +193 -0
  671. data/app/assets/node_modules/jquery.browser/dist/jquery.browser.min.js +14 -0
  672. data/app/assets/node_modules/jquery.browser/package.json +30 -0
  673. data/app/assets/node_modules/jquery.browser/test/casperserver.js +257 -0
  674. data/app/assets/node_modules/jquery.browser/test/index.html +13 -0
  675. data/app/assets/node_modules/jquery.browser/test/src/jquery-1.10.2.min.js +6 -0
  676. data/app/assets/node_modules/jquery.browser/test/src/require/test.js +21 -0
  677. data/app/assets/node_modules/jquery.browser/test/test.js +962 -0
  678. data/app/assets/node_modules/jquery.flot.tooltip/CONTRIBUTING.md +9 -0
  679. data/app/assets/node_modules/jquery.flot.tooltip/Gruntfile.js +72 -0
  680. data/app/assets/node_modules/jquery.flot.tooltip/README.md +267 -0
  681. data/app/assets/node_modules/jquery.flot.tooltip/bower.json +13 -0
  682. data/app/assets/node_modules/jquery.flot.tooltip/examples/basic.html +45 -0
  683. data/app/assets/node_modules/jquery.flot.tooltip/examples/curved-lines.html +59 -0
  684. data/app/assets/node_modules/jquery.flot.tooltip/examples/custom-label-text.html +114 -0
  685. data/app/assets/node_modules/jquery.flot.tooltip/examples/custom_ticks.html +78 -0
  686. data/app/assets/node_modules/jquery.flot.tooltip/examples/dollar_in_tickformatter.html +68 -0
  687. data/app/assets/node_modules/jquery.flot.tooltip/examples/index.html +36 -0
  688. data/app/assets/node_modules/jquery.flot.tooltip/examples/js/curvedLines.js +483 -0
  689. data/app/assets/node_modules/jquery.flot.tooltip/examples/js/excanvas.min.js +1 -0
  690. data/app/assets/node_modules/jquery.flot.tooltip/examples/js/jquery.flot.js +3168 -0
  691. data/app/assets/node_modules/jquery.flot.tooltip/examples/js/jquery.flot.pie.js +820 -0
  692. data/app/assets/node_modules/jquery.flot.tooltip/examples/js/jquery.flot.stack.js +184 -0
  693. data/app/assets/node_modules/jquery.flot.tooltip/examples/js/jquery.flot.threshold.js +142 -0
  694. data/app/assets/node_modules/jquery.flot.tooltip/examples/js/jquery.flot.time.js +432 -0
  695. data/app/assets/node_modules/jquery.flot.tooltip/examples/many_series.html +78 -0
  696. data/app/assets/node_modules/jquery.flot.tooltip/examples/multiple-axes.html +78 -0
  697. data/app/assets/node_modules/jquery.flot.tooltip/examples/pie.html +87 -0
  698. data/app/assets/node_modules/jquery.flot.tooltip/examples/real_data.html +133 -0
  699. data/app/assets/node_modules/jquery.flot.tooltip/examples/stacking.html +97 -0
  700. data/app/assets/node_modules/jquery.flot.tooltip/examples/threshold.html +97 -0
  701. data/app/assets/node_modules/jquery.flot.tooltip/examples/time_bars.html +77 -0
  702. data/app/assets/node_modules/jquery.flot.tooltip/examples/two_chars.html +63 -0
  703. data/app/assets/node_modules/jquery.flot.tooltip/js/jquery.flot.tooltip.js +606 -0
  704. data/app/assets/node_modules/jquery.flot.tooltip/js/jquery.flot.tooltip.min.js +12 -0
  705. data/app/assets/node_modules/jquery.flot.tooltip/js/jquery.flot.tooltip.source.js +595 -0
  706. data/app/assets/node_modules/jquery.flot.tooltip/package.json +37 -0
  707. data/app/assets/node_modules/jqvmap/CHANGELOG.md +118 -0
  708. data/app/assets/node_modules/jqvmap/CONTRIBUTING.md +118 -0
  709. data/app/assets/node_modules/jqvmap/LICENSE +43 -0
  710. data/app/assets/node_modules/jqvmap/README.md +495 -0
  711. data/app/assets/node_modules/jqvmap/REGIONS.md +405 -0
  712. data/app/assets/node_modules/jqvmap/bower.json +32 -0
  713. data/app/assets/node_modules/jqvmap/create/README.md +207 -0
  714. data/app/assets/node_modules/jqvmap/create/config/continent.json +64 -0
  715. data/app/assets/node_modules/jqvmap/create/config/new-york.json +16 -0
  716. data/app/assets/node_modules/jqvmap/create/config/syria.json +16 -0
  717. data/app/assets/node_modules/jqvmap/create/jqvmap.py +573 -0
  718. data/app/assets/node_modules/jqvmap/dist/jquery.vmap.js +1281 -0
  719. data/app/assets/node_modules/jqvmap/dist/jquery.vmap.min.js +10 -0
  720. data/app/assets/node_modules/jqvmap/dist/jqvmap.css +50 -0
  721. data/app/assets/node_modules/jqvmap/dist/jqvmap.min.css +1 -0
  722. data/app/assets/node_modules/jqvmap/dist/maps/continents/jquery.vmap.africa.js +2 -0
  723. data/app/assets/node_modules/jqvmap/dist/maps/continents/jquery.vmap.asia.js +2 -0
  724. data/app/assets/node_modules/jqvmap/dist/maps/continents/jquery.vmap.australia.js +2 -0
  725. data/app/assets/node_modules/jqvmap/dist/maps/continents/jquery.vmap.europe.js +2 -0
  726. data/app/assets/node_modules/jqvmap/dist/maps/continents/jquery.vmap.north-america.js +2 -0
  727. data/app/assets/node_modules/jqvmap/dist/maps/continents/jquery.vmap.south-america.js +2 -0
  728. data/app/assets/node_modules/jqvmap/dist/maps/jquery.vmap.algeria.js +2 -0
  729. data/app/assets/node_modules/jqvmap/dist/maps/jquery.vmap.argentina.js +1 -0
  730. data/app/assets/node_modules/jqvmap/dist/maps/jquery.vmap.brazil.js +2 -0
  731. data/app/assets/node_modules/jqvmap/dist/maps/jquery.vmap.canada.js +2 -0
  732. data/app/assets/node_modules/jqvmap/dist/maps/jquery.vmap.europe.js +2 -0
  733. data/app/assets/node_modules/jqvmap/dist/maps/jquery.vmap.france.js +1 -0
  734. data/app/assets/node_modules/jqvmap/dist/maps/jquery.vmap.germany.js +2 -0
  735. data/app/assets/node_modules/jqvmap/dist/maps/jquery.vmap.greece.js +1 -0
  736. data/app/assets/node_modules/jqvmap/dist/maps/jquery.vmap.iran.js +6 -0
  737. data/app/assets/node_modules/jqvmap/dist/maps/jquery.vmap.iraq.js +1 -0
  738. data/app/assets/node_modules/jqvmap/dist/maps/jquery.vmap.russia.js +2 -0
  739. data/app/assets/node_modules/jqvmap/dist/maps/jquery.vmap.tunisia.js +2 -0
  740. data/app/assets/node_modules/jqvmap/dist/maps/jquery.vmap.turkey.js +11 -0
  741. data/app/assets/node_modules/jqvmap/dist/maps/jquery.vmap.usa.js +2 -0
  742. data/app/assets/node_modules/jqvmap/dist/maps/jquery.vmap.world.js +2 -0
  743. data/app/assets/node_modules/jqvmap/examples/algeria.html +27 -0
  744. data/app/assets/node_modules/jqvmap/examples/argentina.html +33 -0
  745. data/app/assets/node_modules/jqvmap/examples/brazil.html +33 -0
  746. data/app/assets/node_modules/jqvmap/examples/continents.html +172 -0
  747. data/app/assets/node_modules/jqvmap/examples/europe.html +27 -0
  748. data/app/assets/node_modules/jqvmap/examples/france.html +27 -0
  749. data/app/assets/node_modules/jqvmap/examples/germany.html +33 -0
  750. data/app/assets/node_modules/jqvmap/examples/greece.html +33 -0
  751. data/app/assets/node_modules/jqvmap/examples/images/background.png +0 -0
  752. data/app/assets/node_modules/jqvmap/examples/images/flag.png +0 -0
  753. data/app/assets/node_modules/jqvmap/examples/images/globe.png +0 -0
  754. data/app/assets/node_modules/jqvmap/examples/images/marker/black.png +0 -0
  755. data/app/assets/node_modules/jqvmap/examples/images/marker/blue.png +0 -0
  756. data/app/assets/node_modules/jqvmap/examples/images/marker/green.png +0 -0
  757. data/app/assets/node_modules/jqvmap/examples/images/marker/grey.png +0 -0
  758. data/app/assets/node_modules/jqvmap/examples/images/marker/orange.png +0 -0
  759. data/app/assets/node_modules/jqvmap/examples/images/marker/purple.png +0 -0
  760. data/app/assets/node_modules/jqvmap/examples/images/marker/red.png +0 -0
  761. data/app/assets/node_modules/jqvmap/examples/images/marker/white.png +0 -0
  762. data/app/assets/node_modules/jqvmap/examples/images/marker/yellow.png +0 -0
  763. data/app/assets/node_modules/jqvmap/examples/images/thumb.jpg +0 -0
  764. data/app/assets/node_modules/jqvmap/examples/images/tip.png +0 -0
  765. data/app/assets/node_modules/jqvmap/examples/inactive_regions.html +62 -0
  766. data/app/assets/node_modules/jqvmap/examples/iran.html +44 -0
  767. data/app/assets/node_modules/jqvmap/examples/iraq.html +44 -0
  768. data/app/assets/node_modules/jqvmap/examples/js/jquery.vmap.sampledata.js +1 -0
  769. data/app/assets/node_modules/jqvmap/examples/labels.html +146 -0
  770. data/app/assets/node_modules/jqvmap/examples/mobile.html +59 -0
  771. data/app/assets/node_modules/jqvmap/examples/multi.html +29 -0
  772. data/app/assets/node_modules/jqvmap/examples/pins.html +236 -0
  773. data/app/assets/node_modules/jqvmap/examples/pins_custom.html +127 -0
  774. data/app/assets/node_modules/jqvmap/examples/responsive.html +45 -0
  775. data/app/assets/node_modules/jqvmap/examples/russia.html +33 -0
  776. data/app/assets/node_modules/jqvmap/examples/touch_detect.html +46 -0
  777. data/app/assets/node_modules/jqvmap/examples/tunisia.html +33 -0
  778. data/app/assets/node_modules/jqvmap/examples/turkey.html +26 -0
  779. data/app/assets/node_modules/jqvmap/examples/usa.html +37 -0
  780. data/app/assets/node_modules/jqvmap/examples/world.html +35 -0
  781. data/app/assets/node_modules/jqvmap/grunt/bump.js +22 -0
  782. data/app/assets/node_modules/jqvmap/grunt/changelog.js +14 -0
  783. data/app/assets/node_modules/jqvmap/grunt/clean.js +5 -0
  784. data/app/assets/node_modules/jqvmap/grunt/concat.js +23 -0
  785. data/app/assets/node_modules/jqvmap/grunt/index.js +2 -0
  786. data/app/assets/node_modules/jqvmap/grunt/qunit.js +3 -0
  787. data/app/assets/node_modules/jqvmap/grunt/shell.js +6 -0
  788. data/app/assets/node_modules/jqvmap/grunt/uglify.js +19 -0
  789. data/app/assets/node_modules/jqvmap/gruntfile.js +21 -0
  790. data/app/assets/node_modules/jqvmap/node_modules/jquery/AUTHORS.txt +217 -0
  791. data/app/assets/node_modules/jqvmap/node_modules/jquery/CONTRIBUTING.md +214 -0
  792. data/app/assets/node_modules/jqvmap/node_modules/jquery/MIT-LICENSE.txt +21 -0
  793. data/app/assets/node_modules/jqvmap/node_modules/jquery/README.md +368 -0
  794. data/app/assets/node_modules/jqvmap/node_modules/jquery/bower.json +28 -0
  795. data/app/assets/node_modules/jqvmap/node_modules/jquery/dist/jquery.js +10351 -0
  796. data/app/assets/node_modules/jqvmap/node_modules/jquery/dist/jquery.min.js +6 -0
  797. data/app/assets/node_modules/jqvmap/node_modules/jquery/dist/jquery.min.map +1 -0
  798. data/app/assets/node_modules/jqvmap/node_modules/jquery/package.json +54 -0
  799. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/ajax/jsonp.js +89 -0
  800. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/ajax/load.js +75 -0
  801. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/ajax/parseJSON.js +51 -0
  802. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/ajax/parseXML.js +31 -0
  803. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/ajax/script.js +93 -0
  804. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/ajax/var/nonce.js +5 -0
  805. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/ajax/var/rquery.js +3 -0
  806. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/ajax/xhr.js +197 -0
  807. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/ajax.js +801 -0
  808. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/attributes/attr.js +271 -0
  809. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/attributes/classes.js +157 -0
  810. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/attributes/prop.js +134 -0
  811. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/attributes/support.js +62 -0
  812. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/attributes/val.js +178 -0
  813. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/attributes.js +11 -0
  814. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/callbacks.js +205 -0
  815. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/core/access.js +60 -0
  816. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/core/init.js +132 -0
  817. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/core/parseHTML.js +39 -0
  818. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/core/ready.js +152 -0
  819. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/core/var/rsingleTag.js +4 -0
  820. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/core.js +540 -0
  821. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/css/addGetHookIf.js +32 -0
  822. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/css/curCSS.js +124 -0
  823. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/css/defaultDisplay.js +69 -0
  824. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/css/hiddenVisibleSelectors.js +20 -0
  825. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/css/support.js +151 -0
  826. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/css/swap.js +28 -0
  827. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/css/var/cssExpand.js +3 -0
  828. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/css/var/isHidden.js +13 -0
  829. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/css/var/rmargin.js +3 -0
  830. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/css/var/rnumnonpx.js +5 -0
  831. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/css.js +504 -0
  832. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/data/accepts.js +21 -0
  833. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/data/support.js +25 -0
  834. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/data.js +335 -0
  835. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/deferred.js +150 -0
  836. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/deprecated.js +13 -0
  837. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/dimensions.js +50 -0
  838. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/effects/Tween.js +114 -0
  839. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/effects/animatedSelector.js +13 -0
  840. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/effects/support.js +55 -0
  841. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/effects.js +656 -0
  842. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/event/ajax.js +13 -0
  843. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/event/alias.js +39 -0
  844. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/event/support.js +26 -0
  845. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/event.js +1037 -0
  846. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/exports/amd.js +24 -0
  847. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/exports/global.js +32 -0
  848. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/intro.js +44 -0
  849. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/jquery.js +38 -0
  850. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/manipulation/_evalUrl.js +18 -0
  851. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/manipulation/support.js +76 -0
  852. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/manipulation/var/rcheckableType.js +3 -0
  853. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/manipulation.js +744 -0
  854. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/offset.js +211 -0
  855. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/outro.js +1 -0
  856. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/queue/delay.js +22 -0
  857. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/queue.js +142 -0
  858. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/selector-sizzle.js +14 -0
  859. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/selector.js +1 -0
  860. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/serialize.js +110 -0
  861. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/sizzle/dist/sizzle.js +2067 -0
  862. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/sizzle/dist/sizzle.min.js +3 -0
  863. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/sizzle/dist/sizzle.min.map +1 -0
  864. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/sizzle/test/data/empty.js +0 -0
  865. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/sizzle/test/data/mixed_sort.html +22 -0
  866. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/sizzle/test/data/testinit.js +136 -0
  867. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/sizzle/test/index.html +242 -0
  868. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/sizzle/test/jquery.js +9597 -0
  869. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/sizzle/test/unit/extending.js +95 -0
  870. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/sizzle/test/unit/selector.js +1149 -0
  871. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/sizzle/test/unit/utilities.js +169 -0
  872. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/support.js +58 -0
  873. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/traversing/findFilter.js +100 -0
  874. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/traversing/var/rneedsContext.js +6 -0
  875. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/traversing.js +200 -0
  876. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/var/class2type.js +4 -0
  877. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/var/concat.js +5 -0
  878. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/var/deletedIds.js +3 -0
  879. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/var/hasOwn.js +5 -0
  880. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/var/indexOf.js +5 -0
  881. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/var/pnum.js +3 -0
  882. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/var/push.js +5 -0
  883. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/var/rnotwhite.js +3 -0
  884. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/var/slice.js +5 -0
  885. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/var/strundefined.js +3 -0
  886. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/var/support.js +4 -0
  887. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/var/toString.js +5 -0
  888. data/app/assets/node_modules/jqvmap/node_modules/jquery/src/wrap.js +76 -0
  889. data/app/assets/node_modules/jqvmap/package.json +45 -0
  890. data/app/assets/node_modules/jqvmap/src/Base.js +80 -0
  891. data/app/assets/node_modules/jqvmap/src/ColorScale/arrayToRgb.js +9 -0
  892. data/app/assets/node_modules/jqvmap/src/ColorScale/getColor.js +41 -0
  893. data/app/assets/node_modules/jqvmap/src/ColorScale/rgbToArray.js +4 -0
  894. data/app/assets/node_modules/jqvmap/src/ColorScale/setColors.js +6 -0
  895. data/app/assets/node_modules/jqvmap/src/ColorScale/setMax.js +8 -0
  896. data/app/assets/node_modules/jqvmap/src/ColorScale/setMin.js +9 -0
  897. data/app/assets/node_modules/jqvmap/src/ColorScale/setNormalizeFunction.js +13 -0
  898. data/app/assets/node_modules/jqvmap/src/ColorScale/vectorAdd.js +7 -0
  899. data/app/assets/node_modules/jqvmap/src/ColorScale/vectorLength.js +7 -0
  900. data/app/assets/node_modules/jqvmap/src/ColorScale/vectorMult.js +7 -0
  901. data/app/assets/node_modules/jqvmap/src/ColorScale/vectorSubtract.js +7 -0
  902. data/app/assets/node_modules/jqvmap/src/ColorScale/vectorToNum.js +7 -0
  903. data/app/assets/node_modules/jqvmap/src/ColorScale.js +18 -0
  904. data/app/assets/node_modules/jqvmap/src/JQVMap/applyTransform.js +31 -0
  905. data/app/assets/node_modules/jqvmap/src/JQVMap/bindZoomButtons.js +9 -0
  906. data/app/assets/node_modules/jqvmap/src/JQVMap/deselect.js +18 -0
  907. data/app/assets/node_modules/jqvmap/src/JQVMap/getCountryId.js +3 -0
  908. data/app/assets/node_modules/jqvmap/src/JQVMap/getPin.js +4 -0
  909. data/app/assets/node_modules/jqvmap/src/JQVMap/getPinId.js +3 -0
  910. data/app/assets/node_modules/jqvmap/src/JQVMap/getPins.js +11 -0
  911. data/app/assets/node_modules/jqvmap/src/JQVMap/highlight.js +12 -0
  912. data/app/assets/node_modules/jqvmap/src/JQVMap/isSelected.js +3 -0
  913. data/app/assets/node_modules/jqvmap/src/JQVMap/makeDraggable.js +159 -0
  914. data/app/assets/node_modules/jqvmap/src/JQVMap/placePins.js +46 -0
  915. data/app/assets/node_modules/jqvmap/src/JQVMap/positionPins.js +19 -0
  916. data/app/assets/node_modules/jqvmap/src/JQVMap/removePin.js +4 -0
  917. data/app/assets/node_modules/jqvmap/src/JQVMap/removePins.js +3 -0
  918. data/app/assets/node_modules/jqvmap/src/JQVMap/reset.js +9 -0
  919. data/app/assets/node_modules/jqvmap/src/JQVMap/resize.js +13 -0
  920. data/app/assets/node_modules/jqvmap/src/JQVMap/select.js +18 -0
  921. data/app/assets/node_modules/jqvmap/src/JQVMap/selectIndex.js +9 -0
  922. data/app/assets/node_modules/jqvmap/src/JQVMap/setBackgroundColor.js +3 -0
  923. data/app/assets/node_modules/jqvmap/src/JQVMap/setColors.js +15 -0
  924. data/app/assets/node_modules/jqvmap/src/JQVMap/setNormalizeFunction.js +7 -0
  925. data/app/assets/node_modules/jqvmap/src/JQVMap/setScale.js +4 -0
  926. data/app/assets/node_modules/jqvmap/src/JQVMap/setScaleColors.js +7 -0
  927. data/app/assets/node_modules/jqvmap/src/JQVMap/setValues.js +36 -0
  928. data/app/assets/node_modules/jqvmap/src/JQVMap/unhighlight.js +8 -0
  929. data/app/assets/node_modules/jqvmap/src/JQVMap/zoomIn.js +17 -0
  930. data/app/assets/node_modules/jqvmap/src/JQVMap/zoomOut.js +17 -0
  931. data/app/assets/node_modules/jqvmap/src/JQVMap.js +243 -0
  932. data/app/assets/node_modules/jqvmap/src/VectorCanvas/applyTransformParams.js +8 -0
  933. data/app/assets/node_modules/jqvmap/src/VectorCanvas/createGroup.js +19 -0
  934. data/app/assets/node_modules/jqvmap/src/VectorCanvas/createPath.js +75 -0
  935. data/app/assets/node_modules/jqvmap/src/VectorCanvas/pathSvgToVml.js +103 -0
  936. data/app/assets/node_modules/jqvmap/src/VectorCanvas/setSize.js +24 -0
  937. data/app/assets/node_modules/jqvmap/src/VectorCanvas.js +42 -0
  938. data/app/assets/node_modules/jqvmap/tests/index.html +32 -0
  939. data/app/assets/node_modules/jqvmap/tests/qunit/qunit.css +291 -0
  940. data/app/assets/node_modules/jqvmap/tests/qunit/qunit.js +3828 -0
  941. data/app/assets/node_modules/jqvmap/tests/tests.js +422 -0
  942. data/app/assets/node_modules/metismenu/LICENSE +20 -0
  943. data/app/assets/node_modules/metismenu/README.md +361 -0
  944. data/app/assets/node_modules/metismenu/changelog.md +22 -0
  945. data/app/assets/node_modules/metismenu/dist/cjs/index.js +327 -0
  946. data/app/assets/node_modules/metismenu/dist/metisMenu.css +132 -0
  947. data/app/assets/node_modules/metismenu/dist/metisMenu.css.map +1 -0
  948. data/app/assets/node_modules/metismenu/dist/metisMenu.js +332 -0
  949. data/app/assets/node_modules/metismenu/dist/metisMenu.js.map +1 -0
  950. data/app/assets/node_modules/metismenu/dist/metisMenu.min.css +9 -0
  951. data/app/assets/node_modules/metismenu/dist/metisMenu.min.css.map +1 -0
  952. data/app/assets/node_modules/metismenu/dist/metisMenu.min.js +10 -0
  953. data/app/assets/node_modules/metismenu/dist/metisMenu.min.js.map +1 -0
  954. data/app/assets/node_modules/metismenu/dist/modules/index.js +323 -0
  955. data/app/assets/node_modules/metismenu/package.json +122 -0
  956. data/app/assets/node_modules/metismenu/src/index.js +260 -0
  957. data/app/assets/node_modules/metismenu/src/metisMenu.css +116 -0
  958. data/app/assets/node_modules/metismenu/src/util.js +61 -0
  959. data/app/assets/node_modules/metismenu/types/metismenu.d.ts +25 -0
  960. data/app/assets/node_modules/morris.js/Gruntfile.js +90 -0
  961. data/app/assets/node_modules/morris.js/README.md +234 -0
  962. data/app/assets/node_modules/morris.js/bower.json +20 -0
  963. data/app/assets/node_modules/morris.js/bower.travis.json +20 -0
  964. data/app/assets/node_modules/morris.js/examples/_template.html +18 -0
  965. data/app/assets/node_modules/morris.js/examples/area-as-line.html +31 -0
  966. data/app/assets/node_modules/morris.js/examples/area.html +34 -0
  967. data/app/assets/node_modules/morris.js/examples/bar-colors.html +44 -0
  968. data/app/assets/node_modules/morris.js/examples/bar-no-axes.html +31 -0
  969. data/app/assets/node_modules/morris.js/examples/bar.html +32 -0
  970. data/app/assets/node_modules/morris.js/examples/days.html +37 -0
  971. data/app/assets/node_modules/morris.js/examples/decimal-custom-hover.html +37 -0
  972. data/app/assets/node_modules/morris.js/examples/diagonal-xlabels-bar.html +38 -0
  973. data/app/assets/node_modules/morris.js/examples/diagonal-xlabels.html +38 -0
  974. data/app/assets/node_modules/morris.js/examples/donut-colors.html +38 -0
  975. data/app/assets/node_modules/morris.js/examples/donut-formatter.html +27 -0
  976. data/app/assets/node_modules/morris.js/examples/donut.html +29 -0
  977. data/app/assets/node_modules/morris.js/examples/dst.html +30 -0
  978. data/app/assets/node_modules/morris.js/examples/events.html +57 -0
  979. data/app/assets/node_modules/morris.js/examples/goals.html +33 -0
  980. data/app/assets/node_modules/morris.js/examples/lib/example.css +13 -0
  981. data/app/assets/node_modules/morris.js/examples/lib/example.js +4 -0
  982. data/app/assets/node_modules/morris.js/examples/months-no-smooth.html +38 -0
  983. data/app/assets/node_modules/morris.js/examples/negative.html +36 -0
  984. data/app/assets/node_modules/morris.js/examples/no-grid.html +38 -0
  985. data/app/assets/node_modules/morris.js/examples/non-continuous.html +42 -0
  986. data/app/assets/node_modules/morris.js/examples/non-date.html +37 -0
  987. data/app/assets/node_modules/morris.js/examples/quarters.html +54 -0
  988. data/app/assets/node_modules/morris.js/examples/resize.html +42 -0
  989. data/app/assets/node_modules/morris.js/examples/stacked_bars.html +31 -0
  990. data/app/assets/node_modules/morris.js/examples/timestamps.html +38 -0
  991. data/app/assets/node_modules/morris.js/examples/updating.html +49 -0
  992. data/app/assets/node_modules/morris.js/examples/weeks.html +53 -0
  993. data/app/assets/node_modules/morris.js/examples/years.html +37 -0
  994. data/app/assets/node_modules/morris.js/less/morris.core.less +27 -0
  995. data/app/assets/node_modules/morris.js/lib/morris.area.coffee +66 -0
  996. data/app/assets/node_modules/morris.js/lib/morris.bar.coffee +208 -0
  997. data/app/assets/node_modules/morris.js/lib/morris.coffee +43 -0
  998. data/app/assets/node_modules/morris.js/lib/morris.donut.coffee +213 -0
  999. data/app/assets/node_modules/morris.js/lib/morris.grid.coffee +499 -0
  1000. data/app/assets/node_modules/morris.js/lib/morris.hover.coffee +44 -0
  1001. data/app/assets/node_modules/morris.js/lib/morris.line.coffee +405 -0
  1002. data/app/assets/node_modules/morris.js/morris.css +2 -0
  1003. data/app/assets/node_modules/morris.js/morris.js +1892 -0
  1004. data/app/assets/node_modules/morris.js/morris.min.js +7 -0
  1005. data/app/assets/node_modules/morris.js/package.json +36 -0
  1006. data/app/assets/node_modules/morris.js/spec/lib/area/area_spec.coffee +60 -0
  1007. data/app/assets/node_modules/morris.js/spec/lib/bar/bar_spec.coffee +127 -0
  1008. data/app/assets/node_modules/morris.js/spec/lib/bar/colours.coffee +36 -0
  1009. data/app/assets/node_modules/morris.js/spec/lib/commas_spec.coffee +38 -0
  1010. data/app/assets/node_modules/morris.js/spec/lib/donut/donut_spec.coffee +76 -0
  1011. data/app/assets/node_modules/morris.js/spec/lib/grid/auto_grid_lines_spec.coffee +25 -0
  1012. data/app/assets/node_modules/morris.js/spec/lib/grid/set_data_spec.coffee +208 -0
  1013. data/app/assets/node_modules/morris.js/spec/lib/grid/y_label_format_spec.coffee +15 -0
  1014. data/app/assets/node_modules/morris.js/spec/lib/hover_spec.coffee +64 -0
  1015. data/app/assets/node_modules/morris.js/spec/lib/label_series_spec.coffee +186 -0
  1016. data/app/assets/node_modules/morris.js/spec/lib/line/line_spec.coffee +211 -0
  1017. data/app/assets/node_modules/morris.js/spec/lib/pad_spec.coffee +17 -0
  1018. data/app/assets/node_modules/morris.js/spec/lib/parse_time_spec.coffee +35 -0
  1019. data/app/assets/node_modules/morris.js/spec/specs.html +34 -0
  1020. data/app/assets/node_modules/morris.js/spec/support/placeholder.coffee +6 -0
  1021. data/app/assets/node_modules/morris.js/spec/viz/examples.js +56 -0
  1022. data/app/assets/node_modules/morris.js/spec/viz/exemplary/area0.png +0 -0
  1023. data/app/assets/node_modules/morris.js/spec/viz/exemplary/bar0.png +0 -0
  1024. data/app/assets/node_modules/morris.js/spec/viz/exemplary/line0.png +0 -0
  1025. data/app/assets/node_modules/morris.js/spec/viz/exemplary/stacked_bar0.png +0 -0
  1026. data/app/assets/node_modules/morris.js/spec/viz/run.sh +32 -0
  1027. data/app/assets/node_modules/morris.js/spec/viz/test.html +34 -0
  1028. data/app/assets/node_modules/morris.js/spec/viz/visual_specs.js +66 -0
  1029. data/app/assets/node_modules/nprogress/History.md +110 -0
  1030. data/app/assets/node_modules/nprogress/License.md +19 -0
  1031. data/app/assets/node_modules/nprogress/Notes.md +25 -0
  1032. data/app/assets/node_modules/nprogress/Readme.md +197 -0
  1033. data/app/assets/node_modules/nprogress/bower.json +27 -0
  1034. data/app/assets/node_modules/nprogress/component.json +19 -0
  1035. data/app/assets/node_modules/nprogress/nprogress.css +74 -0
  1036. data/app/assets/node_modules/nprogress/nprogress.js +476 -0
  1037. data/app/assets/node_modules/nprogress/package.json +47 -0
  1038. data/app/assets/node_modules/nprogress/test/component.html +26 -0
  1039. data/app/assets/node_modules/nprogress/test/test.js +175 -0
  1040. data/app/assets/node_modules/parchment/LICENSE +29 -0
  1041. data/app/assets/node_modules/parchment/README.md +274 -0
  1042. data/app/assets/node_modules/parchment/dist/parchment.js +1749 -0
  1043. data/app/assets/node_modules/parchment/dist/parchment.js.map +1 -0
  1044. data/app/assets/node_modules/parchment/dist/src/attributor/attributor.d.ts +17 -0
  1045. data/app/assets/node_modules/parchment/dist/src/attributor/class.d.ts +8 -0
  1046. data/app/assets/node_modules/parchment/dist/src/attributor/store.d.ts +15 -0
  1047. data/app/assets/node_modules/parchment/dist/src/attributor/style.d.ts +8 -0
  1048. data/app/assets/node_modules/parchment/dist/src/blot/abstract/blot.d.ts +63 -0
  1049. data/app/assets/node_modules/parchment/dist/src/blot/abstract/container.d.ts +40 -0
  1050. data/app/assets/node_modules/parchment/dist/src/blot/abstract/format.d.ts +18 -0
  1051. data/app/assets/node_modules/parchment/dist/src/blot/abstract/leaf.d.ts +11 -0
  1052. data/app/assets/node_modules/parchment/dist/src/blot/abstract/parent.d.ts +41 -0
  1053. data/app/assets/node_modules/parchment/dist/src/blot/abstract/shadow.d.ts +38 -0
  1054. data/app/assets/node_modules/parchment/dist/src/blot/block.d.ts +15 -0
  1055. data/app/assets/node_modules/parchment/dist/src/blot/embed.d.ts +11 -0
  1056. data/app/assets/node_modules/parchment/dist/src/blot/inline.d.ts +14 -0
  1057. data/app/assets/node_modules/parchment/dist/src/blot/scroll.d.ts +24 -0
  1058. data/app/assets/node_modules/parchment/dist/src/blot/text.d.ts +26 -0
  1059. data/app/assets/node_modules/parchment/dist/src/collection/linked-list.d.ts +19 -0
  1060. data/app/assets/node_modules/parchment/dist/src/collection/linked-node.d.ts +6 -0
  1061. data/app/assets/node_modules/parchment/dist/src/parchment.d.ts +35 -0
  1062. data/app/assets/node_modules/parchment/dist/src/registry.d.ts +31 -0
  1063. data/app/assets/node_modules/parchment/package.json +44 -0
  1064. data/app/assets/node_modules/parchment/src/attributor/attributor.ts +61 -0
  1065. data/app/assets/node_modules/parchment/src/attributor/class.ts +44 -0
  1066. data/app/assets/node_modules/parchment/src/attributor/store.ts +73 -0
  1067. data/app/assets/node_modules/parchment/src/attributor/style.ts +44 -0
  1068. data/app/assets/node_modules/parchment/src/blot/abstract/blot.ts +58 -0
  1069. data/app/assets/node_modules/parchment/src/blot/abstract/container.ts +268 -0
  1070. data/app/assets/node_modules/parchment/src/blot/abstract/format.ts +71 -0
  1071. data/app/assets/node_modules/parchment/src/blot/abstract/leaf.ts +33 -0
  1072. data/app/assets/node_modules/parchment/src/blot/abstract/shadow.ts +174 -0
  1073. data/app/assets/node_modules/parchment/src/blot/block.ts +53 -0
  1074. data/app/assets/node_modules/parchment/src/blot/embed.ts +29 -0
  1075. data/app/assets/node_modules/parchment/src/blot/inline.ts +64 -0
  1076. data/app/assets/node_modules/parchment/src/blot/scroll.ts +166 -0
  1077. data/app/assets/node_modules/parchment/src/blot/text.ts +93 -0
  1078. data/app/assets/node_modules/parchment/src/collection/linked-list.ts +143 -0
  1079. data/app/assets/node_modules/parchment/src/collection/linked-node.ts +8 -0
  1080. data/app/assets/node_modules/parchment/src/parchment.ts +46 -0
  1081. data/app/assets/node_modules/parchment/src/registry.ts +133 -0
  1082. data/app/assets/node_modules/parchment/tsconfig.json +9 -0
  1083. data/app/assets/node_modules/popper.js/README.md +219 -0
  1084. data/app/assets/node_modules/popper.js/dist/esm/popper-utils.js +1093 -0
  1085. data/app/assets/node_modules/popper.js/dist/esm/popper-utils.js.map +1 -0
  1086. data/app/assets/node_modules/popper.js/dist/esm/popper-utils.min.js +5 -0
  1087. data/app/assets/node_modules/popper.js/dist/esm/popper-utils.min.js.map +1 -0
  1088. data/app/assets/node_modules/popper.js/dist/esm/popper.js +2520 -0
  1089. data/app/assets/node_modules/popper.js/dist/esm/popper.js.map +1 -0
  1090. data/app/assets/node_modules/popper.js/dist/esm/popper.min.js +5 -0
  1091. data/app/assets/node_modules/popper.js/dist/esm/popper.min.js.map +1 -0
  1092. data/app/assets/node_modules/popper.js/dist/popper-utils.js +1042 -0
  1093. data/app/assets/node_modules/popper.js/dist/popper-utils.js.map +1 -0
  1094. data/app/assets/node_modules/popper.js/dist/popper-utils.min.js +5 -0
  1095. data/app/assets/node_modules/popper.js/dist/popper-utils.min.js.map +1 -0
  1096. data/app/assets/node_modules/popper.js/dist/popper.js +2372 -0
  1097. data/app/assets/node_modules/popper.js/dist/popper.js.map +1 -0
  1098. data/app/assets/node_modules/popper.js/dist/popper.min.js +5 -0
  1099. data/app/assets/node_modules/popper.js/dist/popper.min.js.map +1 -0
  1100. data/app/assets/node_modules/popper.js/dist/umd/popper-utils.js +1131 -0
  1101. data/app/assets/node_modules/popper.js/dist/umd/popper-utils.js.map +1 -0
  1102. data/app/assets/node_modules/popper.js/dist/umd/popper-utils.min.js +5 -0
  1103. data/app/assets/node_modules/popper.js/dist/umd/popper-utils.min.js.map +1 -0
  1104. data/app/assets/node_modules/popper.js/dist/umd/popper.js +2528 -0
  1105. data/app/assets/node_modules/popper.js/dist/umd/popper.js.map +1 -0
  1106. data/app/assets/node_modules/popper.js/dist/umd/popper.min.js +5 -0
  1107. data/app/assets/node_modules/popper.js/dist/umd/popper.min.js.map +1 -0
  1108. data/app/assets/node_modules/popper.js/index.d.ts +159 -0
  1109. data/app/assets/node_modules/popper.js/package.json +54 -0
  1110. data/app/assets/node_modules/quill/CHANGELOG.md +734 -0
  1111. data/app/assets/node_modules/quill/LICENSE +30 -0
  1112. data/app/assets/node_modules/quill/README.md +109 -0
  1113. data/app/assets/node_modules/quill/assets/base.styl +304 -0
  1114. data/app/assets/node_modules/quill/assets/bubble/toolbar.styl +14 -0
  1115. data/app/assets/node_modules/quill/assets/bubble/tooltip.styl +49 -0
  1116. data/app/assets/node_modules/quill/assets/bubble.styl +45 -0
  1117. data/app/assets/node_modules/quill/assets/core.styl +183 -0
  1118. data/app/assets/node_modules/quill/assets/favicon.png +0 -0
  1119. data/app/assets/node_modules/quill/assets/icons/align-center.svg +5 -0
  1120. data/app/assets/node_modules/quill/assets/icons/align-justify.svg +5 -0
  1121. data/app/assets/node_modules/quill/assets/icons/align-left.svg +5 -0
  1122. data/app/assets/node_modules/quill/assets/icons/align-right.svg +5 -0
  1123. data/app/assets/node_modules/quill/assets/icons/attachment.svg +3 -0
  1124. data/app/assets/node_modules/quill/assets/icons/audio.svg +5 -0
  1125. data/app/assets/node_modules/quill/assets/icons/authorship.svg +5 -0
  1126. data/app/assets/node_modules/quill/assets/icons/background.svg +52 -0
  1127. data/app/assets/node_modules/quill/assets/icons/blockquote.svg +6 -0
  1128. data/app/assets/node_modules/quill/assets/icons/bold.svg +4 -0
  1129. data/app/assets/node_modules/quill/assets/icons/clean.svg +7 -0
  1130. data/app/assets/node_modules/quill/assets/icons/code.svg +5 -0
  1131. data/app/assets/node_modules/quill/assets/icons/color.svg +5 -0
  1132. data/app/assets/node_modules/quill/assets/icons/comment.svg +3 -0
  1133. data/app/assets/node_modules/quill/assets/icons/direction-ltr.svg +7 -0
  1134. data/app/assets/node_modules/quill/assets/icons/direction-rtl.svg +7 -0
  1135. data/app/assets/node_modules/quill/assets/icons/dropdown.svg +4 -0
  1136. data/app/assets/node_modules/quill/assets/icons/embed.svg +3 -0
  1137. data/app/assets/node_modules/quill/assets/icons/emoji.svg +6 -0
  1138. data/app/assets/node_modules/quill/assets/icons/float-center.svg +5 -0
  1139. data/app/assets/node_modules/quill/assets/icons/float-full.svg +5 -0
  1140. data/app/assets/node_modules/quill/assets/icons/float-left.svg +7 -0
  1141. data/app/assets/node_modules/quill/assets/icons/float-right.svg +7 -0
  1142. data/app/assets/node_modules/quill/assets/icons/font.svg +5 -0
  1143. data/app/assets/node_modules/quill/assets/icons/formula.svg +5 -0
  1144. data/app/assets/node_modules/quill/assets/icons/hashtag.svg +6 -0
  1145. data/app/assets/node_modules/quill/assets/icons/header-2.svg +3 -0
  1146. data/app/assets/node_modules/quill/assets/icons/header-3.svg +3 -0
  1147. data/app/assets/node_modules/quill/assets/icons/header-4.svg +3 -0
  1148. data/app/assets/node_modules/quill/assets/icons/header-5.svg +3 -0
  1149. data/app/assets/node_modules/quill/assets/icons/header-6.svg +3 -0
  1150. data/app/assets/node_modules/quill/assets/icons/header.svg +3 -0
  1151. data/app/assets/node_modules/quill/assets/icons/horizontal-rule.svg +4 -0
  1152. data/app/assets/node_modules/quill/assets/icons/image.svg +5 -0
  1153. data/app/assets/node_modules/quill/assets/icons/indent.svg +6 -0
  1154. data/app/assets/node_modules/quill/assets/icons/italic.svg +5 -0
  1155. data/app/assets/node_modules/quill/assets/icons/link.svg +5 -0
  1156. data/app/assets/node_modules/quill/assets/icons/list-bullet.svg +8 -0
  1157. data/app/assets/node_modules/quill/assets/icons/list-check.svg +8 -0
  1158. data/app/assets/node_modules/quill/assets/icons/list-ordered.svg +9 -0
  1159. data/app/assets/node_modules/quill/assets/icons/map.svg +5 -0
  1160. data/app/assets/node_modules/quill/assets/icons/mention.svg +4 -0
  1161. data/app/assets/node_modules/quill/assets/icons/more.svg +3 -0
  1162. data/app/assets/node_modules/quill/assets/icons/outdent.svg +6 -0
  1163. data/app/assets/node_modules/quill/assets/icons/redo.svg +4 -0
  1164. data/app/assets/node_modules/quill/assets/icons/size-decrease.svg +5 -0
  1165. data/app/assets/node_modules/quill/assets/icons/size-increase.svg +6 -0
  1166. data/app/assets/node_modules/quill/assets/icons/size.svg +6 -0
  1167. data/app/assets/node_modules/quill/assets/icons/spacing.svg +9 -0
  1168. data/app/assets/node_modules/quill/assets/icons/speech.svg +6 -0
  1169. data/app/assets/node_modules/quill/assets/icons/strike.svg +5 -0
  1170. data/app/assets/node_modules/quill/assets/icons/subscript.svg +4 -0
  1171. data/app/assets/node_modules/quill/assets/icons/superscript.svg +4 -0
  1172. data/app/assets/node_modules/quill/assets/icons/table-border-all.svg +5 -0
  1173. data/app/assets/node_modules/quill/assets/icons/table-border-bottom.svg +28 -0
  1174. data/app/assets/node_modules/quill/assets/icons/table-border-left.svg +28 -0
  1175. data/app/assets/node_modules/quill/assets/icons/table-border-none.svg +25 -0
  1176. data/app/assets/node_modules/quill/assets/icons/table-border-outside.svg +35 -0
  1177. data/app/assets/node_modules/quill/assets/icons/table-border-right.svg +28 -0
  1178. data/app/assets/node_modules/quill/assets/icons/table-border-top.svg +28 -0
  1179. data/app/assets/node_modules/quill/assets/icons/table-delete-cells.svg +13 -0
  1180. data/app/assets/node_modules/quill/assets/icons/table-delete-columns.svg +8 -0
  1181. data/app/assets/node_modules/quill/assets/icons/table-delete-rows.svg +9 -0
  1182. data/app/assets/node_modules/quill/assets/icons/table-insert-cells.svg +13 -0
  1183. data/app/assets/node_modules/quill/assets/icons/table-insert-columns.svg +8 -0
  1184. data/app/assets/node_modules/quill/assets/icons/table-insert-rows.svg +9 -0
  1185. data/app/assets/node_modules/quill/assets/icons/table-merge-cells.svg +4 -0
  1186. data/app/assets/node_modules/quill/assets/icons/table-unmerge-cells.svg +7 -0
  1187. data/app/assets/node_modules/quill/assets/icons/table.svg +11 -0
  1188. data/app/assets/node_modules/quill/assets/icons/underline.svg +4 -0
  1189. data/app/assets/node_modules/quill/assets/icons/undo.svg +4 -0
  1190. data/app/assets/node_modules/quill/assets/icons/video.svg +14 -0
  1191. data/app/assets/node_modules/quill/assets/snow/toolbar.styl +26 -0
  1192. data/app/assets/node_modules/quill/assets/snow/tooltip.styl +53 -0
  1193. data/app/assets/node_modules/quill/assets/snow.styl +18 -0
  1194. data/app/assets/node_modules/quill/blots/block.js +174 -0
  1195. data/app/assets/node_modules/quill/blots/break.js +29 -0
  1196. data/app/assets/node_modules/quill/blots/container.js +9 -0
  1197. data/app/assets/node_modules/quill/blots/cursor.js +116 -0
  1198. data/app/assets/node_modules/quill/blots/embed.js +79 -0
  1199. data/app/assets/node_modules/quill/blots/inline.js +50 -0
  1200. data/app/assets/node_modules/quill/blots/scroll.js +173 -0
  1201. data/app/assets/node_modules/quill/blots/text.js +5 -0
  1202. data/app/assets/node_modules/quill/core/editor.js +267 -0
  1203. data/app/assets/node_modules/quill/core/emitter.js +63 -0
  1204. data/app/assets/node_modules/quill/core/logger.js +22 -0
  1205. data/app/assets/node_modules/quill/core/module.js +10 -0
  1206. data/app/assets/node_modules/quill/core/polyfill.js +63 -0
  1207. data/app/assets/node_modules/quill/core/quill.js +506 -0
  1208. data/app/assets/node_modules/quill/core/selection.js +355 -0
  1209. data/app/assets/node_modules/quill/core/theme.js +30 -0
  1210. data/app/assets/node_modules/quill/core.js +36 -0
  1211. data/app/assets/node_modules/quill/dist/quill.bubble.css +952 -0
  1212. data/app/assets/node_modules/quill/dist/quill.core.css +397 -0
  1213. data/app/assets/node_modules/quill/dist/quill.core.js +8522 -0
  1214. data/app/assets/node_modules/quill/dist/quill.js +11489 -0
  1215. data/app/assets/node_modules/quill/dist/quill.min.js +8 -0
  1216. data/app/assets/node_modules/quill/dist/quill.min.js.map +1 -0
  1217. data/app/assets/node_modules/quill/dist/quill.snow.css +945 -0
  1218. data/app/assets/node_modules/quill/formats/align.js +12 -0
  1219. data/app/assets/node_modules/quill/formats/background.js +11 -0
  1220. data/app/assets/node_modules/quill/formats/blockquote.js +9 -0
  1221. data/app/assets/node_modules/quill/formats/bold.js +22 -0
  1222. data/app/assets/node_modules/quill/formats/code.js +118 -0
  1223. data/app/assets/node_modules/quill/formats/color.js +21 -0
  1224. data/app/assets/node_modules/quill/formats/direction.js +12 -0
  1225. data/app/assets/node_modules/quill/formats/font.js +18 -0
  1226. data/app/assets/node_modules/quill/formats/header.js +13 -0
  1227. data/app/assets/node_modules/quill/formats/image.js +57 -0
  1228. data/app/assets/node_modules/quill/formats/indent.js +31 -0
  1229. data/app/assets/node_modules/quill/formats/italic.js +7 -0
  1230. data/app/assets/node_modules/quill/formats/link.js +41 -0
  1231. data/app/assets/node_modules/quill/formats/list.js +130 -0
  1232. data/app/assets/node_modules/quill/formats/script.js +23 -0
  1233. data/app/assets/node_modules/quill/formats/size.js +12 -0
  1234. data/app/assets/node_modules/quill/formats/strike.js +7 -0
  1235. data/app/assets/node_modules/quill/formats/underline.js +7 -0
  1236. data/app/assets/node_modules/quill/formats/video.js +53 -0
  1237. data/app/assets/node_modules/quill/modules/clipboard.js +358 -0
  1238. data/app/assets/node_modules/quill/modules/formula.js +42 -0
  1239. data/app/assets/node_modules/quill/modules/history.js +120 -0
  1240. data/app/assets/node_modules/quill/modules/keyboard.js +494 -0
  1241. data/app/assets/node_modules/quill/modules/syntax.js +81 -0
  1242. data/app/assets/node_modules/quill/modules/toolbar.js +261 -0
  1243. data/app/assets/node_modules/quill/package.json +99 -0
  1244. data/app/assets/node_modules/quill/quill.js +104 -0
  1245. data/app/assets/node_modules/quill/themes/base.js +264 -0
  1246. data/app/assets/node_modules/quill/themes/bubble.js +111 -0
  1247. data/app/assets/node_modules/quill/themes/snow.js +120 -0
  1248. data/app/assets/node_modules/quill/ui/color-picker.js +35 -0
  1249. data/app/assets/node_modules/quill/ui/icon-picker.js +23 -0
  1250. data/app/assets/node_modules/quill/ui/icons.js +49 -0
  1251. data/app/assets/node_modules/quill/ui/picker.js +186 -0
  1252. data/app/assets/node_modules/quill/ui/tooltip.js +53 -0
  1253. data/app/assets/node_modules/quill-delta/CHANGELOG.md +48 -0
  1254. data/app/assets/node_modules/quill-delta/LICENSE +21 -0
  1255. data/app/assets/node_modules/quill-delta/README.md +639 -0
  1256. data/app/assets/node_modules/quill-delta/lib/delta.js +325 -0
  1257. data/app/assets/node_modules/quill-delta/lib/op.js +139 -0
  1258. data/app/assets/node_modules/quill-delta/package.json +40 -0
  1259. data/app/assets/node_modules/raphael/CONTRIBUTING.md +22 -0
  1260. data/app/assets/node_modules/raphael/Gruntfile.js +72 -0
  1261. data/app/assets/node_modules/raphael/README.md +75 -0
  1262. data/app/assets/node_modules/raphael/bower.json +31 -0
  1263. data/app/assets/node_modules/raphael/dev/banner.txt +8 -0
  1264. data/app/assets/node_modules/raphael/dev/raphael.amd.js +5 -0
  1265. data/app/assets/node_modules/raphael/dev/raphael.core.js +5405 -0
  1266. data/app/assets/node_modules/raphael/dev/raphael.svg.js +1424 -0
  1267. data/app/assets/node_modules/raphael/dev/raphael.vml.js +999 -0
  1268. data/app/assets/node_modules/raphael/dev/raphaelTest.html +39 -0
  1269. data/app/assets/node_modules/raphael/dev/test/index.html +31 -0
  1270. data/app/assets/node_modules/raphael/dev/test/svg/dom.js +317 -0
  1271. data/app/assets/node_modules/raphael/dev/test/vml/dom.js +5 -0
  1272. data/app/assets/node_modules/raphael/history.md +155 -0
  1273. data/app/assets/node_modules/raphael/license.txt +21 -0
  1274. data/app/assets/node_modules/raphael/package.json +47 -0
  1275. data/app/assets/node_modules/raphael/raphael.js +8353 -0
  1276. data/app/assets/node_modules/raphael/raphael.min.js +3 -0
  1277. data/app/assets/node_modules/raphael/raphael.no-deps.js +7927 -0
  1278. data/app/assets/node_modules/raphael/raphael.no-deps.min.js +3 -0
  1279. data/app/assets/node_modules/raphael/webpack.config.js +64 -0
  1280. data/app/assets/node_modules/raphael/yarn.lock +2012 -0
  1281. data/app/assets/node_modules/responsive-toolkit/CHANGELOG.md +70 -0
  1282. data/app/assets/node_modules/responsive-toolkit/LICENSE +21 -0
  1283. data/app/assets/node_modules/responsive-toolkit/README.md +155 -0
  1284. data/app/assets/node_modules/responsive-toolkit/bower.json +22 -0
  1285. data/app/assets/node_modules/responsive-toolkit/demos/bootstrap/index.html +53 -0
  1286. data/app/assets/node_modules/responsive-toolkit/demos/bootstrap/main.js +42 -0
  1287. data/app/assets/node_modules/responsive-toolkit/demos/bootstrap/style.css +109 -0
  1288. data/app/assets/node_modules/responsive-toolkit/demos/custom/index.html +23 -0
  1289. data/app/assets/node_modules/responsive-toolkit/demos/custom/main.js +36 -0
  1290. data/app/assets/node_modules/responsive-toolkit/demos/custom/style.css +19 -0
  1291. data/app/assets/node_modules/responsive-toolkit/demos/foundation/index.html +25 -0
  1292. data/app/assets/node_modules/responsive-toolkit/demos/foundation/main.js +28 -0
  1293. data/app/assets/node_modules/responsive-toolkit/demos/foundation/style.css +3 -0
  1294. data/app/assets/node_modules/responsive-toolkit/dist/bootstrap-toolkit-1.5.0.js +49 -0
  1295. data/app/assets/node_modules/responsive-toolkit/dist/bootstrap-toolkit-1.5.0.min.js +8 -0
  1296. data/app/assets/node_modules/responsive-toolkit/dist/bootstrap-toolkit.js +238 -0
  1297. data/app/assets/node_modules/responsive-toolkit/dist/bootstrap-toolkit.min.js +8 -0
  1298. data/app/assets/node_modules/responsive-toolkit/gulpfile.js +38 -0
  1299. data/app/assets/node_modules/responsive-toolkit/package.json +28 -0
  1300. data/app/assets/node_modules/responsive-toolkit/src/bootstrap-toolkit.js +238 -0
  1301. data/app/assets/node_modules/sortablejs/README.md +636 -0
  1302. data/app/assets/node_modules/sortablejs/Sortable.js +1540 -0
  1303. data/app/assets/node_modules/sortablejs/Sortable.min.js +2 -0
  1304. data/app/assets/node_modules/sortablejs/package.json +48 -0
  1305. data/app/assets/node_modules/tether/CHANGELOG.md +13 -0
  1306. data/app/assets/node_modules/tether/CONTRIBUTING.md +59 -0
  1307. data/app/assets/node_modules/tether/LICENSE +8 -0
  1308. data/app/assets/node_modules/tether/README.md +116 -0
  1309. data/app/assets/node_modules/tether/bower.json +26 -0
  1310. data/app/assets/node_modules/tether/component.json +22 -0
  1311. data/app/assets/node_modules/tether/dist/css/tether-theme-arrows-dark.css +150 -0
  1312. data/app/assets/node_modules/tether/dist/css/tether-theme-arrows-dark.min.css +1 -0
  1313. data/app/assets/node_modules/tether/dist/css/tether-theme-arrows.css +153 -0
  1314. data/app/assets/node_modules/tether/dist/css/tether-theme-arrows.min.css +1 -0
  1315. data/app/assets/node_modules/tether/dist/css/tether-theme-basic.css +21 -0
  1316. data/app/assets/node_modules/tether/dist/css/tether-theme-basic.min.css +1 -0
  1317. data/app/assets/node_modules/tether/dist/css/tether.css +8 -0
  1318. data/app/assets/node_modules/tether/dist/css/tether.min.css +1 -0
  1319. data/app/assets/node_modules/tether/dist/js/tether.js +1813 -0
  1320. data/app/assets/node_modules/tether/dist/js/tether.min.js +1 -0
  1321. data/app/assets/node_modules/tether/docs/1-Overview/1-why_you_should_use_tether.md +43 -0
  1322. data/app/assets/node_modules/tether/docs/1-Overview/2-repositioning.md +46 -0
  1323. data/app/assets/node_modules/tether/docs/1-Overview/3-why_we_dont_support_IE_8.md +47 -0
  1324. data/app/assets/node_modules/tether/docs/2-Examples/1-list_of_examples.md +27 -0
  1325. data/app/assets/node_modules/tether/docs/2-Examples/2-projects_using_tether.md +45 -0
  1326. data/app/assets/node_modules/tether/docs/3-Advanced/1-embedding_tether.md +9 -0
  1327. data/app/assets/node_modules/tether/docs/3-Advanced/2-extending_tether.md +54 -0
  1328. data/app/assets/node_modules/tether/docs/coffee/intro.coffee +113 -0
  1329. data/app/assets/node_modules/tether/docs/css/intro.css +218 -0
  1330. data/app/assets/node_modules/tether/docs/intro.md +591 -0
  1331. data/app/assets/node_modules/tether/docs/js/intro.js +117 -0
  1332. data/app/assets/node_modules/tether/docs/js/markAttachment.js +51 -0
  1333. data/app/assets/node_modules/tether/docs/sass/intro.sass +233 -0
  1334. data/app/assets/node_modules/tether/docs/welcome/browser-demo.html +76 -0
  1335. data/app/assets/node_modules/tether/docs/welcome/coffee/welcome.coffee +212 -0
  1336. data/app/assets/node_modules/tether/docs/welcome/css/browser-demo.css +86 -0
  1337. data/app/assets/node_modules/tether/docs/welcome/css/prism.css +2 -0
  1338. data/app/assets/node_modules/tether/docs/welcome/css/welcome.css +247 -0
  1339. data/app/assets/node_modules/tether/docs/welcome/index.html +226 -0
  1340. data/app/assets/node_modules/tether/docs/welcome/js/drop.js +239 -0
  1341. data/app/assets/node_modules/tether/docs/welcome/js/jquery.js +9597 -0
  1342. data/app/assets/node_modules/tether/docs/welcome/js/log.js +134 -0
  1343. data/app/assets/node_modules/tether/docs/welcome/js/tether-v0.1.3.js +2 -0
  1344. data/app/assets/node_modules/tether/docs/welcome/js/welcome.js +193 -0
  1345. data/app/assets/node_modules/tether/docs/welcome/sass/_inline-block.sass +6 -0
  1346. data/app/assets/node_modules/tether/docs/welcome/sass/browser-demo.sass +93 -0
  1347. data/app/assets/node_modules/tether/docs/welcome/sass/welcome.sass +285 -0
  1348. data/app/assets/node_modules/tether/examples/chosen/chosen-sprite.png +0 -0
  1349. data/app/assets/node_modules/tether/examples/chosen/chosen-sprite@2x.png +0 -0
  1350. data/app/assets/node_modules/tether/examples/chosen/chosen.css +430 -0
  1351. data/app/assets/node_modules/tether/examples/chosen/chosen.js +1166 -0
  1352. data/app/assets/node_modules/tether/examples/chosen/index.html +110 -0
  1353. data/app/assets/node_modules/tether/examples/common/css/style.css +48 -0
  1354. data/app/assets/node_modules/tether/examples/content-visible/index.html +64 -0
  1355. data/app/assets/node_modules/tether/examples/dolls/dolls.css +18 -0
  1356. data/app/assets/node_modules/tether/examples/dolls/dolls.js +83 -0
  1357. data/app/assets/node_modules/tether/examples/dolls/index.html +7 -0
  1358. data/app/assets/node_modules/tether/examples/element-scroll/index.html +499 -0
  1359. data/app/assets/node_modules/tether/examples/enable-disable/index.html +37 -0
  1360. data/app/assets/node_modules/tether/examples/facebook/facebook.css +86 -0
  1361. data/app/assets/node_modules/tether/examples/facebook/index.html +209 -0
  1362. data/app/assets/node_modules/tether/examples/out-of-bounds/index.html +38 -0
  1363. data/app/assets/node_modules/tether/examples/pin/index.html +30 -0
  1364. data/app/assets/node_modules/tether/examples/resources/css/base.css +10 -0
  1365. data/app/assets/node_modules/tether/examples/resources/js/jquery.js +9597 -0
  1366. data/app/assets/node_modules/tether/examples/resources/js/log.js +134 -0
  1367. data/app/assets/node_modules/tether/examples/scroll/index.html +922 -0
  1368. data/app/assets/node_modules/tether/examples/simple/index.html +30 -0
  1369. data/app/assets/node_modules/tether/examples/testbed/index.html +36 -0
  1370. data/app/assets/node_modules/tether/examples/tooltip/index.html +86 -0
  1371. data/app/assets/node_modules/tether/examples/viewport/colors.css +145 -0
  1372. data/app/assets/node_modules/tether/examples/viewport/index.html +70 -0
  1373. data/app/assets/node_modules/tether/gulpfile.js +97 -0
  1374. data/app/assets/node_modules/tether/package.json +40 -0
  1375. data/app/assets/node_modules/tether/src/css/helpers/_tether-theme-arrows.sass +192 -0
  1376. data/app/assets/node_modules/tether/src/css/helpers/_tether-theme-basic.sass +14 -0
  1377. data/app/assets/node_modules/tether/src/css/helpers/_tether.sass +12 -0
  1378. data/app/assets/node_modules/tether/src/css/mixins/_inline-block.sass +6 -0
  1379. data/app/assets/node_modules/tether/src/css/mixins/_pie-clearfix.sass +7 -0
  1380. data/app/assets/node_modules/tether/src/css/tether-theme-arrows-dark.sass +12 -0
  1381. data/app/assets/node_modules/tether/src/css/tether-theme-arrows.sass +12 -0
  1382. data/app/assets/node_modules/tether/src/css/tether-theme-basic.sass +10 -0
  1383. data/app/assets/node_modules/tether/src/css/tether.sass +5 -0
  1384. data/app/assets/node_modules/tether/src/js/abutment.js +61 -0
  1385. data/app/assets/node_modules/tether/src/js/constraint.js +366 -0
  1386. data/app/assets/node_modules/tether/src/js/markAttachment.js +46 -0
  1387. data/app/assets/node_modules/tether/src/js/shift.js +32 -0
  1388. data/app/assets/node_modules/tether/src/js/tether.js +811 -0
  1389. data/app/assets/node_modules/tether/src/js/utils.js +370 -0
  1390. data/app/assets/node_modules/tinycolor2/Gruntfile.js +59 -0
  1391. data/app/assets/node_modules/tinycolor2/LICENSE +20 -0
  1392. data/app/assets/node_modules/tinycolor2/README.md +469 -0
  1393. data/app/assets/node_modules/tinycolor2/bower.json +9 -0
  1394. data/app/assets/node_modules/tinycolor2/demo/demo.css +23 -0
  1395. data/app/assets/node_modules/tinycolor2/demo/jquery-1.9.1.js +9597 -0
  1396. data/app/assets/node_modules/tinycolor2/dist/tinycolor-min.js +4 -0
  1397. data/app/assets/node_modules/tinycolor2/docs/docco.css +192 -0
  1398. data/app/assets/node_modules/tinycolor2/docs/tinycolor.html +1023 -0
  1399. data/app/assets/node_modules/tinycolor2/index.html +207 -0
  1400. data/app/assets/node_modules/tinycolor2/package.json +31 -0
  1401. data/app/assets/node_modules/tinycolor2/test/index.html +19 -0
  1402. data/app/assets/node_modules/tinycolor2/test/qunit.css +244 -0
  1403. data/app/assets/node_modules/tinycolor2/test/qunit.js +2152 -0
  1404. data/app/assets/node_modules/tinycolor2/test/test.js +791 -0
  1405. data/app/assets/node_modules/tinycolor2/tinycolor.js +1195 -0
  1406. data/app/assets/stylesheets/rails_modular_admin/application.scss +2 -3
  1407. data/app/assets/stylesheets/rails_modular_admin.scss +0 -1
  1408. data/config/initializers/assets.rb +4 -29
  1409. data/lib/rails_modular_admin/engine.rb +30 -2
  1410. data/lib/rails_modular_admin/version.rb +1 -1
  1411. metadata +1419 -8
  1412. data/app/controllers/rails_modular_admin/application_controller.rb +0 -5
  1413. data/app/helpers/rails_modular_admin/application_helper.rb +0 -4
  1414. data/app/jobs/rails_modular_admin/application_job.rb +0 -4
  1415. data/app/mailers/rails_modular_admin/application_mailer.rb +0 -6
  1416. data/app/models/rails_modular_admin/application_record.rb +0 -5
@@ -0,0 +1,3068 @@
1
+ /**
2
+ *
3
+ * jquery.sparkline.js
4
+ *
5
+ * v2.4.1
6
+ * (c) Splunk, Inc
7
+ * Contact: Gareth Watts (gareth@splunk.com)
8
+ * http://omnipotent.net/jquery.sparkline/
9
+ *
10
+ * Generates inline sparkline charts from data supplied either to the method
11
+ * or inline in HTML
12
+ *
13
+ * Compatible with Internet Explorer 6.0+ and modern browsers equipped with the canvas tag
14
+ * (Firefox 2.0+, Safari, Opera, etc)
15
+ *
16
+ * License: New BSD License
17
+ *
18
+ * Copyright (c) 2012, Splunk Inc.
19
+ * All rights reserved.
20
+ *
21
+ * Redistribution and use in source and binary forms, with or without modification,
22
+ * are permitted provided that the following conditions are met:
23
+ *
24
+ * * Redistributions of source code must retain the above copyright notice,
25
+ * this list of conditions and the following disclaimer.
26
+ * * Redistributions in binary form must reproduce the above copyright notice,
27
+ * this list of conditions and the following disclaimer in the documentation
28
+ * and/or other materials provided with the distribution.
29
+ * * Neither the name of Splunk Inc nor the names of its contributors may
30
+ * be used to endorse or promote products derived from this software without
31
+ * specific prior written permission.
32
+ *
33
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
34
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
35
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
36
+ * SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
37
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
38
+ * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
39
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
40
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
41
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
42
+ *
43
+ *
44
+ * Usage:
45
+ * $(selector).sparkline(values, options)
46
+ *
47
+ * If values is undefined or set to 'html' then the data values are read from the specified tag:
48
+ * <p>Sparkline: <span class="sparkline">1,4,6,6,8,5,3,5</span></p>
49
+ * $('.sparkline').sparkline();
50
+ * There must be no spaces in the enclosed data set
51
+ *
52
+ * Otherwise values must be an array of numbers or null values
53
+ * <p>Sparkline: <span id="sparkline1">This text replaced if the browser is compatible</span></p>
54
+ * $('#sparkline1').sparkline([1,4,6,6,8,5,3,5])
55
+ * $('#sparkline2').sparkline([1,4,6,null,null,5,3,5])
56
+ *
57
+ * Values can also be specified in an HTML comment, or as a values attribute:
58
+ * <p>Sparkline: <span class="sparkline"><!--1,4,6,6,8,5,3,5 --></span></p>
59
+ * <p>Sparkline: <span class="sparkline" values="1,4,6,6,8,5,3,5"></span></p>
60
+ * $('.sparkline').sparkline();
61
+ *
62
+ * For line charts, x values can also be specified:
63
+ * <p>Sparkline: <span class="sparkline">1:1,2.7:4,3.4:6,5:6,6:8,8.7:5,9:3,10:5</span></p>
64
+ * $('#sparkline1').sparkline([ [1,1], [2.7,4], [3.4,6], [5,6], [6,8], [8.7,5], [9,3], [10,5] ])
65
+ *
66
+ * By default, options should be passed in as the second argument to the sparkline function:
67
+ * $('.sparkline').sparkline([1,2,3,4], {type: 'bar'})
68
+ *
69
+ * Options can also be set by passing them on the tag itself. This feature is disabled by default though
70
+ * as there's a slight performance overhead:
71
+ * $('.sparkline').sparkline([1,2,3,4], {enableTagOptions: true})
72
+ * <p>Sparkline: <span class="sparkline" sparkType="bar" sparkBarColor="red">loading</span></p>
73
+ * Prefix all options supplied as tag attribute with "spark" (configurable by setting tagOptionsPrefix)
74
+ *
75
+ * Supported options:
76
+ * lineColor - Color of the line used for the chart
77
+ * fillColor - Color used to fill in the chart - Set to '' or false for a transparent chart
78
+ * width - Width of the chart - Defaults to 3 times the number of values in pixels
79
+ * height - Height of the chart - Defaults to the height of the containing element
80
+ * chartRangeMin - Specify the minimum value to use for the Y range of the chart - Defaults to the minimum value supplied
81
+ * chartRangeMax - Specify the maximum value to use for the Y range of the chart - Defaults to the maximum value supplied
82
+ * chartRangeClip - Clip out of range values to the max/min specified by chartRangeMin and chartRangeMax
83
+ * chartRangeMinX - Specify the minimum value to use for the X range of the chart - Defaults to the minimum value supplied
84
+ * chartRangeMaxX - Specify the maximum value to use for the X range of the chart - Defaults to the maximum value supplied
85
+ * composite - If true then don't erase any existing chart attached to the tag, but draw
86
+ * another chart over the top - Note that width and height are ignored if an
87
+ * existing chart is detected.
88
+ * tagValuesAttribute - Name of tag attribute to check for data values - Defaults to 'values'
89
+ * enableTagOptions - Whether to check tags for sparkline options
90
+ * tagOptionsPrefix - Prefix used for options supplied as tag attributes - Defaults to 'spark'
91
+ * disableHiddenCheck - If set to true, then the plugin will assume that charts will never be drawn into a
92
+ * hidden dom element, avoding a browser reflow
93
+ * disableInteraction - If set to true then all mouseover/click interaction behaviour will be disabled,
94
+ * making the plugin perform much like it did in 1.x
95
+ * disableTooltips - If set to true then tooltips will be disabled - Defaults to false (tooltips enabled)
96
+ * disableHighlight - If set to true then highlighting of selected chart elements on mouseover will be disabled
97
+ * defaults to false (highlights enabled)
98
+ * highlightLighten - Factor to lighten/darken highlighted chart values by - Defaults to 1.4 for a 40% increase
99
+ * tooltipContainer - Specify which DOM element the tooltip should be rendered into - defaults to document.body
100
+ * tooltipClassname - Optional CSS classname to apply to tooltips - If not specified then a default style will be applied
101
+ * tooltipOffsetX - How many pixels away from the mouse pointer to render the tooltip on the X axis
102
+ * tooltipOffsetY - How many pixels away from the mouse pointer to render the tooltip on the r axis
103
+ * tooltipFormatter - Optional callback that allows you to override the HTML displayed in the tooltip
104
+ * callback is given arguments of (sparkline, options, fields)
105
+ * tooltipChartTitle - If specified then the tooltip uses the string specified by this setting as a title
106
+ * tooltipFormat - A format string or SPFormat object (or an array thereof for multiple entries)
107
+ * to control the format of the tooltip
108
+ * tooltipPrefix - A string to prepend to each field displayed in a tooltip
109
+ * tooltipSuffix - A string to append to each field displayed in a tooltip
110
+ * tooltipSkipNull - If true then null values will not have a tooltip displayed (defaults to true)
111
+ * tooltipValueLookups - An object or range map to map field values to tooltip strings
112
+ * (eg. to map -1 to "Lost", 0 to "Draw", and 1 to "Win")
113
+ * numberFormatter - Optional callback for formatting numbers in tooltips
114
+ * numberDigitGroupSep - Character to use for group separator in numbers "1,234" - Defaults to ","
115
+ * numberDecimalMark - Character to use for the decimal point when formatting numbers - Defaults to "."
116
+ * numberDigitGroupCount - Number of digits between group separator - Defaults to 3
117
+ *
118
+ * There are 7 types of sparkline, selected by supplying a "type" option of 'line' (default),
119
+ * 'bar', 'tristate', 'bullet', 'discrete', 'pie' or 'box'
120
+ * line - Line chart. Options:
121
+ * spotColor - Set to '' to not end each line in a circular spot
122
+ * minSpotColor - If set, color of spot at minimum value
123
+ * maxSpotColor - If set, color of spot at maximum value
124
+ * spotRadius - Radius in pixels
125
+ * lineWidth - Width of line in pixels
126
+ * normalRangeMin
127
+ * normalRangeMax - If set draws a filled horizontal bar between these two values marking the "normal"
128
+ * or expected range of values
129
+ * normalRangeColor - Color to use for the above bar
130
+ * drawNormalOnTop - Draw the normal range above the chart fill color if true
131
+ * defaultPixelsPerValue - Defaults to 3 pixels of width for each value in the chart
132
+ * highlightSpotColor - The color to use for drawing a highlight spot on mouseover - Set to null to disable
133
+ * highlightLineColor - The color to use for drawing a highlight line on mouseover - Set to null to disable
134
+ * valueSpots - Specify which points to draw spots on, and in which color. Accepts a range map
135
+ *
136
+ * bar - Bar chart. Options:
137
+ * barColor - Color of bars for postive values
138
+ * negBarColor - Color of bars for negative values
139
+ * zeroColor - Color of bars with zero values
140
+ * nullColor - Color of bars with null values - Defaults to omitting the bar entirely
141
+ * barWidth - Width of bars in pixels
142
+ * colorMap - Optional mappnig of values to colors to override the *BarColor values above
143
+ * can be an Array of values to control the color of individual bars or a range map
144
+ * to specify colors for individual ranges of values
145
+ * barSpacing - Gap between bars in pixels
146
+ * zeroAxis - Centers the y-axis around zero if true
147
+ *
148
+ * tristate - Charts values of win (>0), lose (<0) or draw (=0)
149
+ * posBarColor - Color of win values
150
+ * negBarColor - Color of lose values
151
+ * zeroBarColor - Color of draw values
152
+ * barWidth - Width of bars in pixels
153
+ * barSpacing - Gap between bars in pixels
154
+ * colorMap - Optional mappnig of values to colors to override the *BarColor values above
155
+ * can be an Array of values to control the color of individual bars or a range map
156
+ * to specify colors for individual ranges of values
157
+ *
158
+ * discrete - Options:
159
+ * lineHeight - Height of each line in pixels - Defaults to 30% of the graph height
160
+ * thesholdValue - Values less than this value will be drawn using thresholdColor instead of lineColor
161
+ * thresholdColor
162
+ *
163
+ * bullet - Values for bullet graphs msut be in the order: target, performance, range1, range2, range3, ...
164
+ * options:
165
+ * targetColor - The color of the vertical target marker
166
+ * targetWidth - The width of the target marker in pixels
167
+ * performanceColor - The color of the performance measure horizontal bar
168
+ * rangeColors - Colors to use for each qualitative range background color
169
+ *
170
+ * pie - Pie chart. Options:
171
+ * sliceColors - An array of colors to use for pie slices
172
+ * offset - Angle in degrees to offset the first slice - Try -90 or +90
173
+ * borderWidth - Width of border to draw around the pie chart, in pixels - Defaults to 0 (no border)
174
+ * borderColor - Color to use for the pie chart border - Defaults to #000
175
+ *
176
+ * box - Box plot. Options:
177
+ * raw - Set to true to supply pre-computed plot points as values
178
+ * values should be: low_outlier, low_whisker, q1, median, q3, high_whisker, high_outlier
179
+ * When set to false you can supply any number of values and the box plot will
180
+ * be computed for you. Default is false.
181
+ * showOutliers - Set to true (default) to display outliers as circles
182
+ * outlierIQR - Interquartile range used to determine outliers. Default 1.5
183
+ * boxLineColor - Outline color of the box
184
+ * boxFillColor - Fill color for the box
185
+ * whiskerColor - Line color used for whiskers
186
+ * outlierLineColor - Outline color of outlier circles
187
+ * outlierFillColor - Fill color of the outlier circles
188
+ * spotRadius - Radius of outlier circles
189
+ * medianColor - Line color of the median line
190
+ * target - Draw a target cross hair at the supplied value (default undefined)
191
+ *
192
+ *
193
+ *
194
+ * Examples:
195
+ * $('#sparkline1').sparkline(myvalues, { lineColor: '#f00', fillColor: false });
196
+ * $('.barsparks').sparkline('html', { type:'bar', height:'40px', barWidth:5 });
197
+ * $('#tristate').sparkline([1,1,-1,1,0,0,-1], { type:'tristate' }):
198
+ * $('#discrete').sparkline([1,3,4,5,5,3,4,5], { type:'discrete' });
199
+ * $('#bullet').sparkline([10,12,12,9,7], { type:'bullet' });
200
+ * $('#pie').sparkline([1,1,2], { type:'pie' });
201
+ */
202
+
203
+ /*jslint regexp: true, browser: true, jquery: true, white: true, nomen: false, plusplus: false, maxerr: 500, indent: 4 */
204
+
205
+ (function(document, Math, undefined) { // performance/minified-size optimization
206
+ (function(factory) {
207
+ if(typeof define === 'function' && define.amd) {
208
+ define(['jquery'], factory);
209
+ } else if (jQuery && !jQuery.fn.sparkline) {
210
+ factory(jQuery);
211
+ }
212
+ }
213
+ (function($) {
214
+ 'use strict';
215
+
216
+ var UNSET_OPTION = {},
217
+ getDefaults, createClass, SPFormat, clipval, quartile, normalizeValue, normalizeValues,
218
+ remove, isNumber, all, sum, addCSS, ensureArray, formatNumber, RangeMap,
219
+ MouseHandler, Tooltip, barHighlightMixin,
220
+ line, bar, tristate, discrete, bullet, pie, box, defaultStyles, initStyles,
221
+ VShape, VCanvas_base, VCanvas_canvas, VCanvas_vml, pending, shapeCount = 0;
222
+
223
+ /**
224
+ * Default configuration settings
225
+ */
226
+ getDefaults = function () {
227
+ return {
228
+ // Settings common to most/all chart types
229
+ common: {
230
+ type: 'line',
231
+ lineColor: '#00f',
232
+ fillColor: '#cdf',
233
+ defaultPixelsPerValue: 3,
234
+ width: 'auto',
235
+ height: 'auto',
236
+ composite: false,
237
+ tagValuesAttribute: 'values',
238
+ tagOptionsPrefix: 'spark',
239
+ enableTagOptions: false,
240
+ enableHighlight: true,
241
+ highlightLighten: 1.4,
242
+ tooltipSkipNull: true,
243
+ tooltipPrefix: '',
244
+ tooltipSuffix: '',
245
+ disableHiddenCheck: false,
246
+ numberFormatter: false,
247
+ numberDigitGroupCount: 3,
248
+ numberDigitGroupSep: ',',
249
+ numberDecimalMark: '.',
250
+ disableTooltips: false,
251
+ disableInteraction: false
252
+ },
253
+ // Defaults for line charts
254
+ line: {
255
+ spotColor: '#f80',
256
+ highlightSpotColor: '#5f5',
257
+ highlightLineColor: '#f22',
258
+ spotRadius: 1.5,
259
+ minSpotColor: '#f80',
260
+ maxSpotColor: '#f80',
261
+ lineWidth: 1,
262
+ normalRangeMin: undefined,
263
+ normalRangeMax: undefined,
264
+ normalRangeColor: '#ccc',
265
+ drawNormalOnTop: false,
266
+ chartRangeMin: undefined,
267
+ chartRangeMax: undefined,
268
+ chartRangeMinX: undefined,
269
+ chartRangeMaxX: undefined,
270
+ tooltipFormat: new SPFormat('<span style="color: {{color}}">&#9679;</span> {{prefix}}{{y}}{{suffix}}')
271
+ },
272
+ // Defaults for bar charts
273
+ bar: {
274
+ barColor: '#3366cc',
275
+ negBarColor: '#f44',
276
+ stackedBarColor: ['#3366cc', '#dc3912', '#ff9900', '#109618', '#66aa00',
277
+ '#dd4477', '#0099c6', '#990099'],
278
+ zeroColor: undefined,
279
+ nullColor: undefined,
280
+ zeroAxis: true,
281
+ barWidth: 4,
282
+ barSpacing: 1,
283
+ chartRangeMax: undefined,
284
+ chartRangeMin: undefined,
285
+ chartRangeClip: false,
286
+ colorMap: undefined,
287
+ tooltipFormat: new SPFormat('<span style="color: {{color}}">&#9679;</span> {{prefix}}{{value}}{{suffix}}')
288
+ },
289
+ // Defaults for tristate charts
290
+ tristate: {
291
+ barWidth: 4,
292
+ barSpacing: 1,
293
+ posBarColor: '#6f6',
294
+ negBarColor: '#f44',
295
+ zeroBarColor: '#999',
296
+ colorMap: {},
297
+ tooltipFormat: new SPFormat('<span style="color: {{color}}">&#9679;</span> {{value:map}}'),
298
+ tooltipValueLookups: { map: { '-1': 'Loss', '0': 'Draw', '1': 'Win' } }
299
+ },
300
+ // Defaults for discrete charts
301
+ discrete: {
302
+ lineHeight: 'auto',
303
+ thresholdColor: undefined,
304
+ thresholdValue: 0,
305
+ chartRangeMax: undefined,
306
+ chartRangeMin: undefined,
307
+ chartRangeClip: false,
308
+ tooltipFormat: new SPFormat('{{prefix}}{{value}}{{suffix}}')
309
+ },
310
+ // Defaults for bullet charts
311
+ bullet: {
312
+ targetColor: '#f33',
313
+ targetWidth: 3, // width of the target bar in pixels
314
+ performanceColor: '#33f',
315
+ rangeColors: ['#d3dafe', '#a8b6ff', '#7f94ff'],
316
+ base: undefined, // set this to a number to change the base start number
317
+ tooltipFormat: new SPFormat('{{fieldkey:fields}} - {{value}}'),
318
+ tooltipValueLookups: { fields: {r: 'Range', p: 'Performance', t: 'Target'} }
319
+ },
320
+ // Defaults for pie charts
321
+ pie: {
322
+ offset: 0,
323
+ sliceColors: ['#3366cc', '#dc3912', '#ff9900', '#109618', '#66aa00',
324
+ '#dd4477', '#0099c6', '#990099'],
325
+ borderWidth: 0,
326
+ borderColor: '#000',
327
+ tooltipFormat: new SPFormat('<span style="color: {{color}}">&#9679;</span> {{value}} ({{percent.1}}%)')
328
+ },
329
+ // Defaults for box plots
330
+ box: {
331
+ raw: false,
332
+ boxLineColor: '#000',
333
+ boxFillColor: '#cdf',
334
+ whiskerColor: '#000',
335
+ outlierLineColor: '#333',
336
+ outlierFillColor: '#fff',
337
+ medianColor: '#f00',
338
+ showOutliers: true,
339
+ outlierIQR: 1.5,
340
+ spotRadius: 1.5,
341
+ target: undefined,
342
+ targetColor: '#4a2',
343
+ chartRangeMax: undefined,
344
+ chartRangeMin: undefined,
345
+ tooltipFormat: new SPFormat('{{field:fields}}: {{value}}'),
346
+ tooltipFormatFieldlistKey: 'field',
347
+ tooltipValueLookups: { fields: { lq: 'Lower Quartile', med: 'Median',
348
+ uq: 'Upper Quartile', lo: 'Left Outlier', ro: 'Right Outlier',
349
+ lw: 'Left Whisker', rw: 'Right Whisker'} }
350
+ }
351
+ };
352
+ };
353
+
354
+ // You can have tooltips use a css class other than jqstooltip by specifying tooltipClassname
355
+ defaultStyles = '.jqstooltip { ' +
356
+ 'position: absolute;' +
357
+ 'left: 0px;' +
358
+ 'top: 0px;' +
359
+ 'visibility: hidden;' +
360
+ 'background: rgb(0, 0, 0) transparent;' +
361
+ 'background-color: rgba(0,0,0,0.6);' +
362
+ 'filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000);' +
363
+ '-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000)";' +
364
+ 'color: white;' +
365
+ 'font: 10px arial, san serif;' +
366
+ 'text-align: left;' +
367
+ 'white-space: nowrap;' +
368
+ 'padding: 5px;' +
369
+ 'border: 1px solid white;' +
370
+ 'box-sizing: content-box;' +
371
+ 'z-index: 10000;' +
372
+ '}' +
373
+ '.jqsfield { ' +
374
+ 'color: white;' +
375
+ 'font: 10px arial, san serif;' +
376
+ 'text-align: left;' +
377
+ '}';
378
+
379
+ /**
380
+ * Utilities
381
+ */
382
+
383
+ createClass = function (/* [baseclass, [mixin, ...]], definition */) {
384
+ var Class, args;
385
+ Class = function () {
386
+ this.init.apply(this, arguments);
387
+ };
388
+ if (arguments.length > 1) {
389
+ if (arguments[0]) {
390
+ Class.prototype = $.extend(new arguments[0](), arguments[arguments.length - 1]);
391
+ Class._super = arguments[0].prototype;
392
+ } else {
393
+ Class.prototype = arguments[arguments.length - 1];
394
+ }
395
+ if (arguments.length > 2) {
396
+ args = Array.prototype.slice.call(arguments, 1, -1);
397
+ args.unshift(Class.prototype);
398
+ $.extend.apply($, args);
399
+ }
400
+ } else {
401
+ Class.prototype = arguments[0];
402
+ }
403
+ Class.prototype.cls = Class;
404
+ return Class;
405
+ };
406
+
407
+ /**
408
+ * Wraps a format string for tooltips
409
+ * {{x}}
410
+ * {{x.2}
411
+ * {{x:months}}
412
+ */
413
+ $.SPFormatClass = SPFormat = createClass({
414
+ fre: /\{\{([\w.]+?)(:(.+?))?\}\}/g,
415
+ precre: /(\w+)\.(\d+)/,
416
+
417
+ init: function (format, fclass) {
418
+ this.format = format;
419
+ this.fclass = fclass;
420
+ },
421
+
422
+ render: function (fieldset, lookups, options) {
423
+ var self = this,
424
+ fields = fieldset,
425
+ match, token, lookupkey, fieldvalue, prec;
426
+ return this.format.replace(this.fre, function () {
427
+ var lookup;
428
+ token = arguments[1];
429
+ lookupkey = arguments[3];
430
+ match = self.precre.exec(token);
431
+ if (match) {
432
+ prec = match[2];
433
+ token = match[1];
434
+ } else {
435
+ prec = false;
436
+ }
437
+ fieldvalue = fields[token];
438
+ if (fieldvalue === undefined) {
439
+ return '';
440
+ }
441
+ if (lookupkey && lookups && lookups[lookupkey]) {
442
+ lookup = lookups[lookupkey];
443
+ if (lookup.get) { // RangeMap
444
+ return lookups[lookupkey].get(fieldvalue) || fieldvalue;
445
+ } else {
446
+ return lookups[lookupkey][fieldvalue] || fieldvalue;
447
+ }
448
+ }
449
+ if (isNumber(fieldvalue)) {
450
+ if (options.get('numberFormatter')) {
451
+ fieldvalue = options.get('numberFormatter')(fieldvalue);
452
+ } else {
453
+ fieldvalue = formatNumber(fieldvalue, prec,
454
+ options.get('numberDigitGroupCount'),
455
+ options.get('numberDigitGroupSep'),
456
+ options.get('numberDecimalMark'));
457
+ }
458
+ }
459
+ return fieldvalue;
460
+ });
461
+ }
462
+ });
463
+
464
+ // convience method to avoid needing the new operator
465
+ $.spformat = function(format, fclass) {
466
+ return new SPFormat(format, fclass);
467
+ };
468
+
469
+ clipval = function (val, min, max) {
470
+ if (val < min) {
471
+ return min;
472
+ }
473
+ if (val > max) {
474
+ return max;
475
+ }
476
+ return val;
477
+ };
478
+
479
+ quartile = function (values, q) {
480
+ var vl;
481
+ if (q === 2) {
482
+ vl = Math.floor(values.length / 2);
483
+ return values.length % 2 ? values[vl] : (values[vl-1] + values[vl]) / 2;
484
+ } else {
485
+ if (values.length % 2 ) { // odd
486
+ vl = (values.length * q + q) / 4;
487
+ return vl % 1 ? (values[Math.floor(vl)] + values[Math.floor(vl) - 1]) / 2 : values[vl-1];
488
+ } else { //even
489
+ vl = (values.length * q + 2) / 4;
490
+ return vl % 1 ? (values[Math.floor(vl)] + values[Math.floor(vl) - 1]) / 2 : values[vl-1];
491
+
492
+ }
493
+ }
494
+ };
495
+
496
+ normalizeValue = function (val) {
497
+ var nf;
498
+ switch (val) {
499
+ case 'undefined':
500
+ val = undefined;
501
+ break;
502
+ case 'null':
503
+ val = null;
504
+ break;
505
+ case 'true':
506
+ val = true;
507
+ break;
508
+ case 'false':
509
+ val = false;
510
+ break;
511
+ default:
512
+ nf = parseFloat(val);
513
+ if (val == nf) {
514
+ val = nf;
515
+ }
516
+ }
517
+ return val;
518
+ };
519
+
520
+ normalizeValues = function (vals) {
521
+ var i, result = [];
522
+ for (i = vals.length; i--;) {
523
+ result[i] = normalizeValue(vals[i]);
524
+ }
525
+ return result;
526
+ };
527
+
528
+ remove = function (vals, filter) {
529
+ var i, vl, result = [];
530
+ for (i = 0, vl = vals.length; i < vl; i++) {
531
+ if (vals[i] !== filter) {
532
+ result.push(vals[i]);
533
+ }
534
+ }
535
+ return result;
536
+ };
537
+
538
+ isNumber = function (num) {
539
+ return !isNaN(parseFloat(num)) && isFinite(num);
540
+ };
541
+
542
+ formatNumber = function (num, prec, groupsize, groupsep, decsep) {
543
+ var p, i;
544
+ num = (prec === false ? parseFloat(num).toString() : num.toFixed(prec)).split('');
545
+ p = (p = $.inArray('.', num)) < 0 ? num.length : p;
546
+ if (p < num.length) {
547
+ num[p] = decsep;
548
+ }
549
+ for (i = p - groupsize; i > 0; i -= groupsize) {
550
+ num.splice(i, 0, groupsep);
551
+ }
552
+ return num.join('');
553
+ };
554
+
555
+ // determine if all values of an array match a value
556
+ // returns true if the array is empty
557
+ all = function (val, arr, ignoreNull) {
558
+ var i;
559
+ for (i = arr.length; i--; ) {
560
+ if (ignoreNull && arr[i] === null) continue;
561
+ if (arr[i] !== val) {
562
+ return false;
563
+ }
564
+ }
565
+ return true;
566
+ };
567
+
568
+ // sums the numeric values in an array, ignoring other values
569
+ sum = function (vals) {
570
+ var total = 0, i;
571
+ for (i = vals.length; i--;) {
572
+ total += typeof vals[i] === 'number' ? vals[i] : 0;
573
+ }
574
+ return total;
575
+ };
576
+
577
+ ensureArray = function (val) {
578
+ return $.isArray(val) ? val : [val];
579
+ };
580
+
581
+ // http://paulirish.com/2008/bookmarklet-inject-new-css-rules/
582
+ addCSS = function(css) {
583
+ var tag, iefail;
584
+ if (document.createStyleSheet) {
585
+ try {
586
+ document.createStyleSheet().cssText = css;
587
+ return;
588
+ } catch (e) {
589
+ // IE <= 9 maxes out at 31 stylesheets; inject into page instead.
590
+ iefail = true;
591
+ }
592
+ }
593
+ tag = document.createElement('style');
594
+ tag.type = 'text/css';
595
+ document.getElementsByTagName('head')[0].appendChild(tag);
596
+ if (iefail) {
597
+ document.styleSheets[document.styleSheets.length - 1].cssText = css;
598
+ } else {
599
+ tag[(typeof document.body.style.WebkitAppearance == 'string') /* webkit only */ ? 'innerText' : 'innerHTML'] = css;
600
+ }
601
+ };
602
+
603
+ // Provide a cross-browser interface to a few simple drawing primitives
604
+ $.fn.simpledraw = function (width, height, useExisting, interact) {
605
+ var target, mhandler;
606
+ if (useExisting && (target = this.data('_jqs_vcanvas'))) {
607
+ return target;
608
+ }
609
+
610
+ if ($.fn.sparkline.canvas === false) {
611
+ // We've already determined that neither Canvas nor VML are available
612
+ return false;
613
+
614
+ } else if ($.fn.sparkline.canvas === undefined) {
615
+ // No function defined yet -- need to see if we support Canvas or VML
616
+ var el = document.createElement('canvas');
617
+ if (!!(el.getContext && el.getContext('2d'))) {
618
+ // Canvas is available
619
+ $.fn.sparkline.canvas = function(width, height, target, interact) {
620
+ return new VCanvas_canvas(width, height, target, interact);
621
+ };
622
+ } else if (document.namespaces && !document.namespaces.v) {
623
+ // VML is available
624
+ document.namespaces.add('v', 'urn:schemas-microsoft-com:vml', '#default#VML');
625
+ $.fn.sparkline.canvas = function(width, height, target, interact) {
626
+ return new VCanvas_vml(width, height, target);
627
+ };
628
+ } else {
629
+ // Neither Canvas nor VML are available
630
+ $.fn.sparkline.canvas = false;
631
+ return false;
632
+ }
633
+ }
634
+
635
+ if (width === undefined) {
636
+ width = $(this).innerWidth();
637
+ }
638
+ if (height === undefined) {
639
+ height = $(this).innerHeight();
640
+ }
641
+
642
+ target = $.fn.sparkline.canvas(width, height, this, interact);
643
+
644
+ mhandler = $(this).data('_jqs_mhandler');
645
+ if (mhandler) {
646
+ mhandler.registerCanvas(target);
647
+ }
648
+ return target;
649
+ };
650
+
651
+ $.fn.cleardraw = function () {
652
+ var target = this.data('_jqs_vcanvas');
653
+ if (target) {
654
+ target.reset();
655
+ }
656
+ };
657
+
658
+ $.RangeMapClass = RangeMap = createClass({
659
+ init: function (map) {
660
+ var key, range, rangelist = [];
661
+ for (key in map) {
662
+ if (map.hasOwnProperty(key) && typeof key === 'string' && key.indexOf(':') > -1) {
663
+ range = key.split(':');
664
+ range[0] = range[0].length === 0 ? -Infinity : parseFloat(range[0]);
665
+ range[1] = range[1].length === 0 ? Infinity : parseFloat(range[1]);
666
+ range[2] = map[key];
667
+ rangelist.push(range);
668
+ }
669
+ }
670
+ this.map = map;
671
+ this.rangelist = rangelist || false;
672
+ },
673
+
674
+ get: function (value) {
675
+ var rangelist = this.rangelist,
676
+ i, range, result;
677
+ if ((result = this.map[value]) !== undefined) {
678
+ return result;
679
+ }
680
+ if (rangelist) {
681
+ for (i = rangelist.length; i--;) {
682
+ range = rangelist[i];
683
+ if (range[0] <= value && range[1] >= value) {
684
+ return range[2];
685
+ }
686
+ }
687
+ }
688
+ return undefined;
689
+ }
690
+ });
691
+
692
+ // Convenience function
693
+ $.range_map = function(map) {
694
+ return new RangeMap(map);
695
+ };
696
+
697
+ MouseHandler = createClass({
698
+ init: function (el, options) {
699
+ var $el = $(el);
700
+ this.$el = $el;
701
+ this.options = options;
702
+ this.currentPageX = 0;
703
+ this.currentPageY = 0;
704
+ this.el = el;
705
+ this.splist = [];
706
+ this.tooltip = null;
707
+ this.over = false;
708
+ this.displayTooltips = !options.get('disableTooltips');
709
+ this.highlightEnabled = !options.get('disableHighlight');
710
+ },
711
+
712
+ registerSparkline: function (sp) {
713
+ this.splist.push(sp);
714
+ if (this.over) {
715
+ this.updateDisplay();
716
+ }
717
+ },
718
+
719
+ registerCanvas: function (canvas) {
720
+ var $canvas = $(canvas.canvas);
721
+ this.canvas = canvas;
722
+ this.$canvas = $canvas;
723
+ $canvas.mouseenter($.proxy(this.mouseenter, this));
724
+ $canvas.mouseleave($.proxy(this.mouseleave, this));
725
+ $canvas.click($.proxy(this.mouseclick, this));
726
+ },
727
+
728
+ reset: function (removeTooltip) {
729
+ this.splist = [];
730
+ if (this.tooltip && removeTooltip) {
731
+ this.tooltip.remove();
732
+ this.tooltip = undefined;
733
+ }
734
+ },
735
+
736
+ mouseclick: function (e) {
737
+ var clickEvent = $.Event('sparklineClick');
738
+ clickEvent.originalEvent = e;
739
+ clickEvent.sparklines = this.splist;
740
+ this.$el.trigger(clickEvent);
741
+ },
742
+
743
+ mouseenter: function (e) {
744
+ $(document.body).unbind('mousemove.jqs');
745
+ $(document.body).bind('mousemove.jqs', $.proxy(this.mousemove, this));
746
+ this.over = true;
747
+ this.currentPageX = e.pageX;
748
+ this.currentPageY = e.pageY;
749
+ this.currentEl = e.target;
750
+ if (!this.tooltip && this.displayTooltips) {
751
+ this.tooltip = new Tooltip(this.options);
752
+ this.tooltip.updatePosition(e.pageX, e.pageY);
753
+ }
754
+ this.updateDisplay();
755
+ },
756
+
757
+ mouseleave: function () {
758
+ $(document.body).unbind('mousemove.jqs');
759
+ var splist = this.splist,
760
+ spcount = splist.length,
761
+ needsRefresh = false,
762
+ sp, i;
763
+ this.over = false;
764
+ this.currentEl = null;
765
+
766
+ if (this.tooltip) {
767
+ this.tooltip.remove();
768
+ this.tooltip = null;
769
+ }
770
+
771
+ for (i = 0; i < spcount; i++) {
772
+ sp = splist[i];
773
+ if (sp.clearRegionHighlight()) {
774
+ needsRefresh = true;
775
+ }
776
+ }
777
+
778
+ if (needsRefresh) {
779
+ this.canvas.render();
780
+ }
781
+ },
782
+
783
+ mousemove: function (e) {
784
+ this.currentPageX = e.pageX;
785
+ this.currentPageY = e.pageY;
786
+ this.currentEl = e.target;
787
+ if (this.tooltip) {
788
+ this.tooltip.updatePosition(e.pageX, e.pageY);
789
+ }
790
+ this.updateDisplay();
791
+ },
792
+
793
+ updateDisplay: function () {
794
+ var splist = this.splist,
795
+ spcount = splist.length,
796
+ needsRefresh = false,
797
+ offset = this.$canvas.offset(),
798
+ localX = this.currentPageX - offset.left,
799
+ localY = this.currentPageY - offset.top,
800
+ tooltiphtml, sp, i, result, changeEvent;
801
+ if (!this.over) {
802
+ return;
803
+ }
804
+ for (i = 0; i < spcount; i++) {
805
+ sp = splist[i];
806
+ result = sp.setRegionHighlight(this.currentEl, localX, localY);
807
+ if (result) {
808
+ needsRefresh = true;
809
+ }
810
+ }
811
+ if (needsRefresh) {
812
+ changeEvent = $.Event('sparklineRegionChange');
813
+ changeEvent.sparklines = this.splist;
814
+ this.$el.trigger(changeEvent);
815
+ if (this.tooltip) {
816
+ tooltiphtml = '';
817
+ for (i = 0; i < spcount; i++) {
818
+ sp = splist[i];
819
+ tooltiphtml += sp.getCurrentRegionTooltip();
820
+ }
821
+ this.tooltip.setContent(tooltiphtml);
822
+ }
823
+ if (!this.disableHighlight) {
824
+ this.canvas.render();
825
+ }
826
+ }
827
+ if (result === null) {
828
+ this.mouseleave();
829
+ }
830
+ }
831
+ });
832
+
833
+
834
+ Tooltip = createClass({
835
+ sizeStyle: 'position: static !important;' +
836
+ 'display: block !important;' +
837
+ 'visibility: hidden !important;' +
838
+ 'float: left !important;',
839
+
840
+ init: function (options) {
841
+ var tooltipClassname = options.get('tooltipClassname', 'jqstooltip'),
842
+ sizetipStyle = this.sizeStyle,
843
+ offset;
844
+ this.container = options.get('tooltipContainer') || document.body;
845
+ this.tooltipOffsetX = options.get('tooltipOffsetX', 10);
846
+ this.tooltipOffsetY = options.get('tooltipOffsetY', 12);
847
+ // remove any previous lingering tooltip
848
+ $('#jqssizetip').remove();
849
+ $('#jqstooltip').remove();
850
+ this.sizetip = $('<div/>', {
851
+ id: 'jqssizetip',
852
+ style: sizetipStyle,
853
+ 'class': tooltipClassname
854
+ });
855
+ this.tooltip = $('<div/>', {
856
+ id: 'jqstooltip',
857
+ 'class': tooltipClassname
858
+ }).appendTo(this.container);
859
+ // account for the container's location
860
+ offset = this.tooltip.offset();
861
+ this.offsetLeft = offset.left;
862
+ this.offsetTop = offset.top;
863
+ this.hidden = true;
864
+ $(window).unbind('resize.jqs scroll.jqs');
865
+ $(window).bind('resize.jqs scroll.jqs', $.proxy(this.updateWindowDims, this));
866
+ this.updateWindowDims();
867
+ },
868
+
869
+ updateWindowDims: function () {
870
+ this.scrollTop = $(window).scrollTop();
871
+ this.scrollLeft = $(window).scrollLeft();
872
+ this.scrollRight = this.scrollLeft + $(window).width();
873
+ this.updatePosition();
874
+ },
875
+
876
+ getSize: function (content) {
877
+ this.sizetip.html(content).appendTo(this.container);
878
+ this.width = this.sizetip.width() + 1;
879
+ this.height = this.sizetip.height();
880
+ this.sizetip.remove();
881
+ },
882
+
883
+ setContent: function (content) {
884
+ if (!content) {
885
+ this.tooltip.css('visibility', 'hidden');
886
+ this.hidden = true;
887
+ return;
888
+ }
889
+ this.getSize(content);
890
+ this.tooltip.html(content)
891
+ .css({
892
+ 'width': this.width,
893
+ 'height': this.height,
894
+ 'visibility': 'visible'
895
+ });
896
+ if (this.hidden) {
897
+ this.hidden = false;
898
+ this.updatePosition();
899
+ }
900
+ },
901
+
902
+ updatePosition: function (x, y) {
903
+ if (x === undefined) {
904
+ if (this.mousex === undefined) {
905
+ return;
906
+ }
907
+ x = this.mousex - this.offsetLeft;
908
+ y = this.mousey - this.offsetTop;
909
+
910
+ } else {
911
+ this.mousex = x = x - this.offsetLeft;
912
+ this.mousey = y = y - this.offsetTop;
913
+ }
914
+ if (!this.height || !this.width || this.hidden) {
915
+ return;
916
+ }
917
+
918
+ y -= this.height + this.tooltipOffsetY;
919
+ x += this.tooltipOffsetX;
920
+
921
+ if (y < this.scrollTop) {
922
+ y = this.scrollTop;
923
+ }
924
+ if (x < this.scrollLeft) {
925
+ x = this.scrollLeft;
926
+ } else if (x + this.width > this.scrollRight) {
927
+ x = this.scrollRight - this.width;
928
+ }
929
+
930
+ this.tooltip.css({
931
+ 'left': x,
932
+ 'top': y
933
+ });
934
+ },
935
+
936
+ remove: function () {
937
+ this.tooltip.remove();
938
+ this.sizetip.remove();
939
+ this.sizetip = this.tooltip = undefined;
940
+ $(window).unbind('resize.jqs scroll.jqs');
941
+ }
942
+ });
943
+
944
+ initStyles = function() {
945
+ addCSS(defaultStyles);
946
+ };
947
+
948
+ $(initStyles);
949
+
950
+ pending = [];
951
+ $.fn.sparkline = function (userValues, userOptions) {
952
+ return this.each(function () {
953
+ var options = new $.fn.sparkline.options(this, userOptions),
954
+ $this = $(this),
955
+ render, i;
956
+ render = function () {
957
+ var values, width, height, tmp, mhandler, sp, vals;
958
+ if (userValues === 'html' || userValues === undefined) {
959
+ vals = this.getAttribute(options.get('tagValuesAttribute'));
960
+ if (vals === undefined || vals === null) {
961
+ vals = $this.html();
962
+ }
963
+ values = vals.replace(/(^\s*<!--)|(-->\s*$)|\s+/g, '').split(',');
964
+ } else {
965
+ values = userValues;
966
+ }
967
+
968
+ width = options.get('width') === 'auto' ? values.length * options.get('defaultPixelsPerValue') : options.get('width');
969
+ if (options.get('height') === 'auto') {
970
+ if (!options.get('composite') || !$.data(this, '_jqs_vcanvas')) {
971
+ // must be a better way to get the line height
972
+ tmp = document.createElement('span');
973
+ tmp.innerHTML = 'a';
974
+ $this.html(tmp);
975
+ height = $(tmp).innerHeight() || $(tmp).height();
976
+ $(tmp).remove();
977
+ tmp = null;
978
+ }
979
+ } else {
980
+ height = options.get('height');
981
+ }
982
+
983
+ if (!options.get('disableInteraction')) {
984
+ mhandler = $.data(this, '_jqs_mhandler');
985
+ if (!mhandler) {
986
+ mhandler = new MouseHandler(this, options);
987
+ $.data(this, '_jqs_mhandler', mhandler);
988
+ } else if (!options.get('composite')) {
989
+ mhandler.reset();
990
+ }
991
+ } else {
992
+ mhandler = false;
993
+ }
994
+
995
+ if (options.get('composite') && !$.data(this, '_jqs_vcanvas')) {
996
+ if (!$.data(this, '_jqs_errnotify')) {
997
+ alert('Attempted to attach a composite sparkline to an element with no existing sparkline');
998
+ $.data(this, '_jqs_errnotify', true);
999
+ }
1000
+ return;
1001
+ }
1002
+
1003
+ sp = new $.fn.sparkline[options.get('type')](this, values, options, width, height);
1004
+
1005
+ sp.render();
1006
+
1007
+ if (mhandler) {
1008
+ mhandler.registerSparkline(sp);
1009
+ }
1010
+ };
1011
+ if (($(this).html() && !options.get('disableHiddenCheck') && $(this).is(':hidden')) || !$(this).parents('body').length) {
1012
+ if (!options.get('composite') && $.data(this, '_jqs_pending')) {
1013
+ // remove any existing references to the element
1014
+ for (i = pending.length; i; i--) {
1015
+ if (pending[i - 1][0] == this) {
1016
+ pending.splice(i - 1, 1);
1017
+ }
1018
+ }
1019
+ }
1020
+ pending.push([this, render]);
1021
+ $.data(this, '_jqs_pending', true);
1022
+ } else {
1023
+ render.call(this);
1024
+ }
1025
+ });
1026
+ };
1027
+
1028
+ $.fn.sparkline.defaults = getDefaults();
1029
+
1030
+
1031
+ $.sparkline_display_visible = function () {
1032
+ var el, i, pl;
1033
+ var done = [];
1034
+ for (i = 0, pl = pending.length; i < pl; i++) {
1035
+ el = pending[i][0];
1036
+ if ($(el).is(':visible') && !$(el).parents().is(':hidden')) {
1037
+ pending[i][1].call(el);
1038
+ $.data(pending[i][0], '_jqs_pending', false);
1039
+ done.push(i);
1040
+ } else if (!$(el).closest('html').length && !$.data(el, '_jqs_pending')) {
1041
+ // element has been inserted and removed from the DOM
1042
+ // If it was not yet inserted into the dom then the .data request
1043
+ // will return true.
1044
+ // removing from the dom causes the data to be removed.
1045
+ $.data(pending[i][0], '_jqs_pending', false);
1046
+ done.push(i);
1047
+ }
1048
+ }
1049
+ for (i = done.length; i; i--) {
1050
+ pending.splice(done[i - 1], 1);
1051
+ }
1052
+ };
1053
+
1054
+
1055
+ /**
1056
+ * User option handler
1057
+ */
1058
+ $.fn.sparkline.options = createClass({
1059
+ init: function (tag, userOptions) {
1060
+ var extendedOptions, defaults, base, tagOptionType;
1061
+ this.userOptions = userOptions = userOptions || {};
1062
+ this.tag = tag;
1063
+ this.tagValCache = {};
1064
+ defaults = $.fn.sparkline.defaults;
1065
+ base = defaults.common;
1066
+ this.tagOptionsPrefix = userOptions.enableTagOptions && (userOptions.tagOptionsPrefix || base.tagOptionsPrefix);
1067
+
1068
+ tagOptionType = this.getTagSetting('type');
1069
+ if (tagOptionType === UNSET_OPTION) {
1070
+ extendedOptions = defaults[userOptions.type || base.type];
1071
+ } else {
1072
+ extendedOptions = defaults[tagOptionType];
1073
+ }
1074
+ this.mergedOptions = $.extend({}, base, extendedOptions, userOptions);
1075
+ },
1076
+
1077
+
1078
+ getTagSetting: function (key) {
1079
+ var prefix = this.tagOptionsPrefix,
1080
+ val, i, pairs, keyval;
1081
+ if (prefix === false || prefix === undefined) {
1082
+ return UNSET_OPTION;
1083
+ }
1084
+ if (this.tagValCache.hasOwnProperty(key)) {
1085
+ val = this.tagValCache.key;
1086
+ } else {
1087
+ val = this.tag.getAttribute(prefix + key);
1088
+ if (val === undefined || val === null) {
1089
+ val = UNSET_OPTION;
1090
+ } else if (val.substr(0, 1) === '[') {
1091
+ val = val.substr(1, val.length - 2).split(',');
1092
+ for (i = val.length; i--;) {
1093
+ val[i] = normalizeValue(val[i].replace(/(^\s*)|(\s*$)/g, ''));
1094
+ }
1095
+ } else if (val.substr(0, 1) === '{') {
1096
+ pairs = val.substr(1, val.length - 2).split(',');
1097
+ val = {};
1098
+ for (i = pairs.length; i--;) {
1099
+ keyval = pairs[i].split(':', 2);
1100
+ val[keyval[0].replace(/(^\s*)|(\s*$)/g, '')] = normalizeValue(keyval[1].replace(/(^\s*)|(\s*$)/g, ''));
1101
+ }
1102
+ } else {
1103
+ val = normalizeValue(val);
1104
+ }
1105
+ this.tagValCache.key = val;
1106
+ }
1107
+ return val;
1108
+ },
1109
+
1110
+ get: function (key, defaultval) {
1111
+ var tagOption = this.getTagSetting(key),
1112
+ result;
1113
+ if (tagOption !== UNSET_OPTION) {
1114
+ return tagOption;
1115
+ }
1116
+ return (result = this.mergedOptions[key]) === undefined ? defaultval : result;
1117
+ }
1118
+ });
1119
+
1120
+
1121
+ $.fn.sparkline._base = createClass({
1122
+ disabled: false,
1123
+
1124
+ init: function (el, values, options, width, height) {
1125
+ this.el = el;
1126
+ this.$el = $(el);
1127
+ this.values = values;
1128
+ this.options = options;
1129
+ this.width = width;
1130
+ this.height = height;
1131
+ this.currentRegion = undefined;
1132
+ },
1133
+
1134
+ /**
1135
+ * Setup the canvas
1136
+ */
1137
+ initTarget: function () {
1138
+ var interactive = !this.options.get('disableInteraction');
1139
+ if (!(this.target = this.$el.simpledraw(this.width, this.height, this.options.get('composite'), interactive))) {
1140
+ this.disabled = true;
1141
+ } else {
1142
+ this.canvasWidth = this.target.pixelWidth;
1143
+ this.canvasHeight = this.target.pixelHeight;
1144
+ }
1145
+ },
1146
+
1147
+ /**
1148
+ * Actually render the chart to the canvas
1149
+ */
1150
+ render: function () {
1151
+ if (this.disabled) {
1152
+ this.el.innerHTML = '';
1153
+ return false;
1154
+ }
1155
+ return true;
1156
+ },
1157
+
1158
+ /**
1159
+ * Return a region id for a given x/y co-ordinate
1160
+ */
1161
+ getRegion: function (x, y) {
1162
+ },
1163
+
1164
+ /**
1165
+ * Highlight an item based on the moused-over x,y co-ordinate
1166
+ */
1167
+ setRegionHighlight: function (el, x, y) {
1168
+ var currentRegion = this.currentRegion,
1169
+ highlightEnabled = !this.options.get('disableHighlight'),
1170
+ newRegion;
1171
+ if (x > this.canvasWidth || y > this.canvasHeight || x < 0 || y < 0) {
1172
+ return null;
1173
+ }
1174
+ newRegion = this.getRegion(el, x, y);
1175
+ if (currentRegion !== newRegion) {
1176
+ if (currentRegion !== undefined && highlightEnabled) {
1177
+ this.removeHighlight();
1178
+ }
1179
+ this.currentRegion = newRegion;
1180
+ if (newRegion !== undefined && highlightEnabled) {
1181
+ this.renderHighlight();
1182
+ }
1183
+ return true;
1184
+ }
1185
+ return false;
1186
+ },
1187
+
1188
+ /**
1189
+ * Reset any currently highlighted item
1190
+ */
1191
+ clearRegionHighlight: function () {
1192
+ if (this.currentRegion !== undefined) {
1193
+ this.removeHighlight();
1194
+ this.currentRegion = undefined;
1195
+ return true;
1196
+ }
1197
+ return false;
1198
+ },
1199
+
1200
+ renderHighlight: function () {
1201
+ this.changeHighlight(true);
1202
+ },
1203
+
1204
+ removeHighlight: function () {
1205
+ this.changeHighlight(false);
1206
+ },
1207
+
1208
+ changeHighlight: function (highlight) {},
1209
+
1210
+ /**
1211
+ * Fetch the HTML to display as a tooltip
1212
+ */
1213
+ getCurrentRegionTooltip: function () {
1214
+ var options = this.options,
1215
+ header = '',
1216
+ entries = [],
1217
+ fields, formats, formatlen, fclass, text, i,
1218
+ showFields, showFieldsKey, newFields, fv,
1219
+ formatter, format, fieldlen, j;
1220
+ if (this.currentRegion === undefined) {
1221
+ return '';
1222
+ }
1223
+ fields = this.getCurrentRegionFields();
1224
+ formatter = options.get('tooltipFormatter');
1225
+ if (formatter) {
1226
+ return formatter(this, options, fields);
1227
+ }
1228
+ if (options.get('tooltipChartTitle')) {
1229
+ header += '<div class="jqs jqstitle">' + options.get('tooltipChartTitle') + '</div>\n';
1230
+ }
1231
+ formats = this.options.get('tooltipFormat');
1232
+ if (!formats) {
1233
+ return '';
1234
+ }
1235
+ if (!$.isArray(formats)) {
1236
+ formats = [formats];
1237
+ }
1238
+ if (!$.isArray(fields)) {
1239
+ fields = [fields];
1240
+ }
1241
+ showFields = this.options.get('tooltipFormatFieldlist');
1242
+ showFieldsKey = this.options.get('tooltipFormatFieldlistKey');
1243
+ if (showFields && showFieldsKey) {
1244
+ // user-selected ordering of fields
1245
+ newFields = [];
1246
+ for (i = fields.length; i--;) {
1247
+ fv = fields[i][showFieldsKey];
1248
+ if ((j = $.inArray(fv, showFields)) != -1) {
1249
+ newFields[j] = fields[i];
1250
+ }
1251
+ }
1252
+ fields = newFields;
1253
+ }
1254
+ formatlen = formats.length;
1255
+ fieldlen = fields.length;
1256
+ for (i = 0; i < formatlen; i++) {
1257
+ format = formats[i];
1258
+ if (typeof format === 'string') {
1259
+ format = new SPFormat(format);
1260
+ }
1261
+ fclass = format.fclass || 'jqsfield';
1262
+ for (j = 0; j < fieldlen; j++) {
1263
+ if (!fields[j].isNull || !options.get('tooltipSkipNull')) {
1264
+ $.extend(fields[j], {
1265
+ prefix: options.get('tooltipPrefix'),
1266
+ suffix: options.get('tooltipSuffix')
1267
+ });
1268
+ text = format.render(fields[j], options.get('tooltipValueLookups'), options);
1269
+ entries.push('<div class="' + fclass + '">' + text + '</div>');
1270
+ }
1271
+ }
1272
+ }
1273
+ if (entries.length) {
1274
+ return header + entries.join('\n');
1275
+ }
1276
+ return '';
1277
+ },
1278
+
1279
+ getCurrentRegionFields: function () {},
1280
+
1281
+ calcHighlightColor: function (color, options) {
1282
+ var highlightColor = options.get('highlightColor'),
1283
+ lighten = options.get('highlightLighten'),
1284
+ parse, mult, rgbnew, i;
1285
+ if (highlightColor) {
1286
+ return highlightColor;
1287
+ }
1288
+ if (lighten) {
1289
+ // extract RGB values
1290
+ parse = /^#([0-9a-f])([0-9a-f])([0-9a-f])$/i.exec(color) || /^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(color);
1291
+ if (parse) {
1292
+ rgbnew = [];
1293
+ mult = color.length === 4 ? 16 : 1;
1294
+ for (i = 0; i < 3; i++) {
1295
+ rgbnew[i] = clipval(Math.round(parseInt(parse[i + 1], 16) * mult * lighten), 0, 255);
1296
+ }
1297
+ return 'rgb(' + rgbnew.join(',') + ')';
1298
+ }
1299
+
1300
+ }
1301
+ return color;
1302
+ }
1303
+
1304
+ });
1305
+
1306
+ barHighlightMixin = {
1307
+ changeHighlight: function (highlight) {
1308
+ var currentRegion = this.currentRegion,
1309
+ target = this.target,
1310
+ shapeids = this.regionShapes[currentRegion],
1311
+ newShapes;
1312
+ // will be null if the region value was null
1313
+ if (shapeids) {
1314
+ newShapes = this.renderRegion(currentRegion, highlight);
1315
+ if ($.isArray(newShapes) || $.isArray(shapeids)) {
1316
+ target.replaceWithShapes(shapeids, newShapes);
1317
+ this.regionShapes[currentRegion] = $.map(newShapes, function (newShape) {
1318
+ return newShape.id;
1319
+ });
1320
+ } else {
1321
+ target.replaceWithShape(shapeids, newShapes);
1322
+ this.regionShapes[currentRegion] = newShapes.id;
1323
+ }
1324
+ }
1325
+ },
1326
+
1327
+ render: function () {
1328
+ var values = this.values,
1329
+ target = this.target,
1330
+ regionShapes = this.regionShapes,
1331
+ shapes, ids, i, j;
1332
+
1333
+ if (!this.cls._super.render.call(this)) {
1334
+ return;
1335
+ }
1336
+ for (i = values.length; i--;) {
1337
+ shapes = this.renderRegion(i);
1338
+ if (shapes) {
1339
+ if ($.isArray(shapes)) {
1340
+ ids = [];
1341
+ for (j = shapes.length; j--;) {
1342
+ shapes[j].append();
1343
+ ids.push(shapes[j].id);
1344
+ }
1345
+ regionShapes[i] = ids;
1346
+ } else {
1347
+ shapes.append();
1348
+ regionShapes[i] = shapes.id; // store just the shapeid
1349
+ }
1350
+ } else {
1351
+ // null value
1352
+ regionShapes[i] = null;
1353
+ }
1354
+ }
1355
+ target.render();
1356
+ }
1357
+ };
1358
+
1359
+ /**
1360
+ * Line charts
1361
+ */
1362
+ $.fn.sparkline.line = line = createClass($.fn.sparkline._base, {
1363
+ type: 'line',
1364
+
1365
+ init: function (el, values, options, width, height) {
1366
+ line._super.init.call(this, el, values, options, width, height);
1367
+ this.vertices = [];
1368
+ this.regionMap = [];
1369
+ this.xvalues = [];
1370
+ this.yvalues = [];
1371
+ this.yminmax = [];
1372
+ this.hightlightSpotId = null;
1373
+ this.lastShapeId = null;
1374
+ this.initTarget();
1375
+ },
1376
+
1377
+ getRegion: function (el, x, y) {
1378
+ var i,
1379
+ regionMap = this.regionMap; // maps regions to value positions
1380
+ for (i = regionMap.length; i--;) {
1381
+ if (regionMap[i] !== null && x >= regionMap[i][0] && x <= regionMap[i][1]) {
1382
+ return regionMap[i][2];
1383
+ }
1384
+ }
1385
+ return undefined;
1386
+ },
1387
+
1388
+ getCurrentRegionFields: function () {
1389
+ var currentRegion = this.currentRegion;
1390
+ return {
1391
+ isNull: this.yvalues[currentRegion] === null,
1392
+ x: this.xvalues[currentRegion],
1393
+ y: this.yvalues[currentRegion],
1394
+ color: this.options.get('lineColor'),
1395
+ fillColor: this.options.get('fillColor'),
1396
+ offset: currentRegion
1397
+ };
1398
+ },
1399
+
1400
+ renderHighlight: function () {
1401
+ var currentRegion = this.currentRegion,
1402
+ target = this.target,
1403
+ vertex = this.vertices[currentRegion],
1404
+ options = this.options,
1405
+ spotRadius = options.get('spotRadius'),
1406
+ highlightSpotColor = options.get('highlightSpotColor'),
1407
+ highlightLineColor = options.get('highlightLineColor'),
1408
+ highlightSpot, highlightLine;
1409
+
1410
+ if (!vertex) {
1411
+ return;
1412
+ }
1413
+ if (spotRadius && highlightSpotColor) {
1414
+ highlightSpot = target.drawCircle(vertex[0], vertex[1],
1415
+ spotRadius, undefined, highlightSpotColor);
1416
+ this.highlightSpotId = highlightSpot.id;
1417
+ target.insertAfterShape(this.lastShapeId, highlightSpot);
1418
+ }
1419
+ if (highlightLineColor) {
1420
+ highlightLine = target.drawLine(vertex[0], this.canvasTop, vertex[0],
1421
+ this.canvasTop + this.canvasHeight, highlightLineColor);
1422
+ this.highlightLineId = highlightLine.id;
1423
+ target.insertAfterShape(this.lastShapeId, highlightLine);
1424
+ }
1425
+ },
1426
+
1427
+ removeHighlight: function () {
1428
+ var target = this.target;
1429
+ if (this.highlightSpotId) {
1430
+ target.removeShapeId(this.highlightSpotId);
1431
+ this.highlightSpotId = null;
1432
+ }
1433
+ if (this.highlightLineId) {
1434
+ target.removeShapeId(this.highlightLineId);
1435
+ this.highlightLineId = null;
1436
+ }
1437
+ },
1438
+
1439
+ scanValues: function () {
1440
+ var values = this.values,
1441
+ valcount = values.length,
1442
+ xvalues = this.xvalues,
1443
+ yvalues = this.yvalues,
1444
+ yminmax = this.yminmax,
1445
+ i, val, isStr, isArray, sp;
1446
+ for (i = 0; i < valcount; i++) {
1447
+ val = values[i];
1448
+ isStr = typeof(values[i]) === 'string';
1449
+ isArray = typeof(values[i]) === 'object' && values[i] instanceof Array;
1450
+ sp = isStr && values[i].split(':');
1451
+ if (isStr && sp.length === 2) { // x:y
1452
+ xvalues.push(Number(sp[0]));
1453
+ yvalues.push(Number(sp[1]));
1454
+ yminmax.push(Number(sp[1]));
1455
+ } else if (isArray) {
1456
+ xvalues.push(val[0]);
1457
+ yvalues.push(val[1]);
1458
+ yminmax.push(val[1]);
1459
+ } else {
1460
+ xvalues.push(i);
1461
+ if (values[i] === null || values[i] === 'null') {
1462
+ yvalues.push(null);
1463
+ } else {
1464
+ yvalues.push(Number(val));
1465
+ yminmax.push(Number(val));
1466
+ }
1467
+ }
1468
+ }
1469
+ if (this.options.get('xvalues')) {
1470
+ xvalues = this.options.get('xvalues');
1471
+ }
1472
+
1473
+ this.maxy = this.maxyorg = Math.max.apply(Math, yminmax);
1474
+ this.miny = this.minyorg = Math.min.apply(Math, yminmax);
1475
+
1476
+ this.maxx = Math.max.apply(Math, xvalues);
1477
+ this.minx = Math.min.apply(Math, xvalues);
1478
+
1479
+ this.xvalues = xvalues;
1480
+ this.yvalues = yvalues;
1481
+ this.yminmax = yminmax;
1482
+
1483
+ },
1484
+
1485
+ processRangeOptions: function () {
1486
+ var options = this.options,
1487
+ normalRangeMin = options.get('normalRangeMin'),
1488
+ normalRangeMax = options.get('normalRangeMax');
1489
+
1490
+ if (normalRangeMin !== undefined) {
1491
+ if (normalRangeMin < this.miny) {
1492
+ this.miny = normalRangeMin;
1493
+ }
1494
+ if (normalRangeMax > this.maxy) {
1495
+ this.maxy = normalRangeMax;
1496
+ }
1497
+ }
1498
+ if (options.get('chartRangeMin') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMin') < this.miny)) {
1499
+ this.miny = options.get('chartRangeMin');
1500
+ }
1501
+ if (options.get('chartRangeMax') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMax') > this.maxy)) {
1502
+ this.maxy = options.get('chartRangeMax');
1503
+ }
1504
+ if (options.get('chartRangeMinX') !== undefined && (options.get('chartRangeClipX') || options.get('chartRangeMinX') < this.minx)) {
1505
+ this.minx = options.get('chartRangeMinX');
1506
+ }
1507
+ if (options.get('chartRangeMaxX') !== undefined && (options.get('chartRangeClipX') || options.get('chartRangeMaxX') > this.maxx)) {
1508
+ this.maxx = options.get('chartRangeMaxX');
1509
+ }
1510
+
1511
+ },
1512
+
1513
+ drawNormalRange: function (canvasLeft, canvasTop, canvasHeight, canvasWidth, rangey) {
1514
+ var normalRangeMin = this.options.get('normalRangeMin'),
1515
+ normalRangeMax = this.options.get('normalRangeMax'),
1516
+ ytop = canvasTop + Math.round(canvasHeight - (canvasHeight * ((normalRangeMax - this.miny) / rangey))),
1517
+ height = Math.round((canvasHeight * (normalRangeMax - normalRangeMin)) / rangey);
1518
+ this.target.drawRect(canvasLeft, ytop, canvasWidth, height, undefined, this.options.get('normalRangeColor')).append();
1519
+ },
1520
+
1521
+ render: function () {
1522
+ var options = this.options,
1523
+ target = this.target,
1524
+ canvasWidth = this.canvasWidth,
1525
+ canvasHeight = this.canvasHeight,
1526
+ vertices = this.vertices,
1527
+ spotRadius = options.get('spotRadius'),
1528
+ regionMap = this.regionMap,
1529
+ rangex, rangey, yvallast,
1530
+ canvasTop, canvasLeft,
1531
+ vertex, path, paths, x, y, xnext, xpos, xposnext,
1532
+ last, next, yvalcount, lineShapes, fillShapes, plen,
1533
+ valueSpots, hlSpotsEnabled, color, xvalues, yvalues, i;
1534
+
1535
+ if (!line._super.render.call(this)) {
1536
+ return;
1537
+ }
1538
+
1539
+ this.scanValues();
1540
+ this.processRangeOptions();
1541
+
1542
+ xvalues = this.xvalues;
1543
+ yvalues = this.yvalues;
1544
+
1545
+ if (!this.yminmax.length || this.yvalues.length < 2) {
1546
+ // empty or all null valuess
1547
+ return;
1548
+ }
1549
+
1550
+ canvasTop = canvasLeft = 0;
1551
+
1552
+ rangex = this.maxx - this.minx === 0 ? 1 : this.maxx - this.minx;
1553
+ rangey = this.maxy - this.miny === 0 ? 1 : this.maxy - this.miny;
1554
+ yvallast = this.yvalues.length - 1;
1555
+
1556
+ if (spotRadius && (canvasWidth < (spotRadius * 4) || canvasHeight < (spotRadius * 4))) {
1557
+ spotRadius = 0;
1558
+ }
1559
+ if (spotRadius) {
1560
+ // adjust the canvas size as required so that spots will fit
1561
+ hlSpotsEnabled = options.get('highlightSpotColor') && !options.get('disableInteraction');
1562
+ if (hlSpotsEnabled || options.get('minSpotColor') || (options.get('spotColor') && yvalues[yvallast] === this.miny)) {
1563
+ canvasHeight -= Math.ceil(spotRadius);
1564
+ }
1565
+ if (hlSpotsEnabled || options.get('maxSpotColor') || (options.get('spotColor') && yvalues[yvallast] === this.maxy)) {
1566
+ canvasHeight -= Math.ceil(spotRadius);
1567
+ canvasTop += Math.ceil(spotRadius);
1568
+ }
1569
+ if (hlSpotsEnabled ||
1570
+ ((options.get('minSpotColor') || options.get('maxSpotColor')) && (yvalues[0] === this.miny || yvalues[0] === this.maxy))) {
1571
+ canvasLeft += Math.ceil(spotRadius);
1572
+ canvasWidth -= Math.ceil(spotRadius);
1573
+ }
1574
+ if (hlSpotsEnabled || options.get('spotColor') ||
1575
+ (options.get('minSpotColor') || options.get('maxSpotColor') &&
1576
+ (yvalues[yvallast] === this.miny || yvalues[yvallast] === this.maxy))) {
1577
+ canvasWidth -= Math.ceil(spotRadius);
1578
+ }
1579
+ }
1580
+
1581
+
1582
+ canvasHeight--;
1583
+
1584
+ if (options.get('normalRangeMin') !== undefined && !options.get('drawNormalOnTop')) {
1585
+ this.drawNormalRange(canvasLeft, canvasTop, canvasHeight, canvasWidth, rangey);
1586
+ }
1587
+
1588
+ path = [];
1589
+ paths = [path];
1590
+ last = next = null;
1591
+ yvalcount = yvalues.length;
1592
+ for (i = 0; i < yvalcount; i++) {
1593
+ x = xvalues[i];
1594
+ xnext = xvalues[i + 1];
1595
+ y = yvalues[i];
1596
+ xpos = canvasLeft + Math.round((x - this.minx) * (canvasWidth / rangex));
1597
+ xposnext = i < yvalcount - 1 ? canvasLeft + Math.round((xnext - this.minx) * (canvasWidth / rangex)) : canvasWidth;
1598
+ next = xpos + ((xposnext - xpos) / 2);
1599
+ regionMap[i] = [last || 0, next, i];
1600
+ last = next;
1601
+ if (y === null) {
1602
+ if (i) {
1603
+ if (yvalues[i - 1] !== null) {
1604
+ path = [];
1605
+ paths.push(path);
1606
+ }
1607
+ vertices.push(null);
1608
+ }
1609
+ } else {
1610
+ if (y < this.miny) {
1611
+ y = this.miny;
1612
+ }
1613
+ if (y > this.maxy) {
1614
+ y = this.maxy;
1615
+ }
1616
+ if (!path.length) {
1617
+ // previous value was null
1618
+ path.push([xpos, canvasTop + canvasHeight]);
1619
+ }
1620
+ vertex = [xpos, canvasTop + Math.round(canvasHeight - (canvasHeight * ((y - this.miny) / rangey)))];
1621
+ path.push(vertex);
1622
+ vertices.push(vertex);
1623
+ }
1624
+ }
1625
+
1626
+ lineShapes = [];
1627
+ fillShapes = [];
1628
+ plen = paths.length;
1629
+ for (i = 0; i < plen; i++) {
1630
+ path = paths[i];
1631
+ if (path.length) {
1632
+ if (options.get('fillColor')) {
1633
+ path.push([path[path.length - 1][0], (canvasTop + canvasHeight)]);
1634
+ fillShapes.push(path.slice(0));
1635
+ path.pop();
1636
+ }
1637
+ // if there's only a single point in this path, then we want to display it
1638
+ // as a vertical line which means we keep path[0] as is
1639
+ if (path.length > 2) {
1640
+ // else we want the first value
1641
+ path[0] = [path[0][0], path[1][1]];
1642
+ }
1643
+ lineShapes.push(path);
1644
+ }
1645
+ }
1646
+
1647
+ // draw the fill first, then optionally the normal range, then the line on top of that
1648
+ plen = fillShapes.length;
1649
+ for (i = 0; i < plen; i++) {
1650
+ target.drawShape(fillShapes[i],
1651
+ options.get('fillColor'), options.get('fillColor')).append();
1652
+ }
1653
+
1654
+ if (options.get('normalRangeMin') !== undefined && options.get('drawNormalOnTop')) {
1655
+ this.drawNormalRange(canvasLeft, canvasTop, canvasHeight, canvasWidth, rangey);
1656
+ }
1657
+
1658
+ plen = lineShapes.length;
1659
+ for (i = 0; i < plen; i++) {
1660
+ target.drawShape(lineShapes[i], options.get('lineColor'), undefined,
1661
+ options.get('lineWidth')).append();
1662
+ }
1663
+
1664
+ if (spotRadius && options.get('valueSpots')) {
1665
+ valueSpots = options.get('valueSpots');
1666
+ if (valueSpots.get === undefined) {
1667
+ valueSpots = new RangeMap(valueSpots);
1668
+ }
1669
+ for (i = 0; i < yvalcount; i++) {
1670
+ color = valueSpots.get(yvalues[i]);
1671
+ if (color) {
1672
+ target.drawCircle(canvasLeft + Math.round((xvalues[i] - this.minx) * (canvasWidth / rangex)),
1673
+ canvasTop + Math.round(canvasHeight - (canvasHeight * ((yvalues[i] - this.miny) / rangey))),
1674
+ spotRadius, undefined,
1675
+ color).append();
1676
+ }
1677
+ }
1678
+
1679
+ }
1680
+ if (spotRadius && options.get('spotColor') && yvalues[yvallast] !== null) {
1681
+ target.drawCircle(canvasLeft + Math.round((xvalues[xvalues.length - 1] - this.minx) * (canvasWidth / rangex)),
1682
+ canvasTop + Math.round(canvasHeight - (canvasHeight * ((yvalues[yvallast] - this.miny) / rangey))),
1683
+ spotRadius, undefined,
1684
+ options.get('spotColor')).append();
1685
+ }
1686
+ if (this.maxy !== this.minyorg) {
1687
+ if (spotRadius && options.get('minSpotColor')) {
1688
+ x = xvalues[$.inArray(this.minyorg, yvalues)];
1689
+ target.drawCircle(canvasLeft + Math.round((x - this.minx) * (canvasWidth / rangex)),
1690
+ canvasTop + Math.round(canvasHeight - (canvasHeight * ((this.minyorg - this.miny) / rangey))),
1691
+ spotRadius, undefined,
1692
+ options.get('minSpotColor')).append();
1693
+ }
1694
+ if (spotRadius && options.get('maxSpotColor')) {
1695
+ x = xvalues[$.inArray(this.maxyorg, yvalues)];
1696
+ target.drawCircle(canvasLeft + Math.round((x - this.minx) * (canvasWidth / rangex)),
1697
+ canvasTop + Math.round(canvasHeight - (canvasHeight * ((this.maxyorg - this.miny) / rangey))),
1698
+ spotRadius, undefined,
1699
+ options.get('maxSpotColor')).append();
1700
+ }
1701
+ }
1702
+
1703
+ this.lastShapeId = target.getLastShapeId();
1704
+ this.canvasTop = canvasTop;
1705
+ target.render();
1706
+ }
1707
+ });
1708
+
1709
+ /**
1710
+ * Bar charts
1711
+ */
1712
+ $.fn.sparkline.bar = bar = createClass($.fn.sparkline._base, barHighlightMixin, {
1713
+ type: 'bar',
1714
+
1715
+ init: function (el, values, options, width, height) {
1716
+ var barWidth = parseInt(options.get('barWidth'), 10),
1717
+ barSpacing = parseInt(options.get('barSpacing'), 10),
1718
+ chartRangeMin = options.get('chartRangeMin'),
1719
+ chartRangeMax = options.get('chartRangeMax'),
1720
+ chartRangeClip = options.get('chartRangeClip'),
1721
+ stackMin = Infinity,
1722
+ stackMax = -Infinity,
1723
+ isStackString, groupMin, groupMax, stackRanges,
1724
+ numValues, i, vlen, range, zeroAxis, xaxisOffset, min, max, clipMin, clipMax,
1725
+ stacked, vlist, j, slen, svals, val, yoffset, yMaxCalc, canvasHeightEf;
1726
+ bar._super.init.call(this, el, values, options, width, height);
1727
+
1728
+ // scan values to determine whether to stack bars
1729
+ for (i = 0, vlen = values.length; i < vlen; i++) {
1730
+ val = values[i];
1731
+ isStackString = typeof(val) === 'string' && val.indexOf(':') > -1;
1732
+ if (isStackString || $.isArray(val)) {
1733
+ stacked = true;
1734
+ if (isStackString) {
1735
+ val = values[i] = normalizeValues(val.split(':'));
1736
+ }
1737
+ val = remove(val, null); // min/max will treat null as zero
1738
+ groupMin = Math.min.apply(Math, val);
1739
+ groupMax = Math.max.apply(Math, val);
1740
+ if (groupMin < stackMin) {
1741
+ stackMin = groupMin;
1742
+ }
1743
+ if (groupMax > stackMax) {
1744
+ stackMax = groupMax;
1745
+ }
1746
+ }
1747
+ }
1748
+
1749
+ this.stacked = stacked;
1750
+ this.regionShapes = {};
1751
+ this.barWidth = barWidth;
1752
+ this.barSpacing = barSpacing;
1753
+ this.totalBarWidth = barWidth + barSpacing;
1754
+ this.width = width = (values.length * barWidth) + ((values.length - 1) * barSpacing);
1755
+
1756
+ this.initTarget();
1757
+
1758
+ if (chartRangeClip) {
1759
+ clipMin = chartRangeMin === undefined ? -Infinity : chartRangeMin;
1760
+ clipMax = chartRangeMax === undefined ? Infinity : chartRangeMax;
1761
+ }
1762
+
1763
+ numValues = [];
1764
+ stackRanges = stacked ? [] : numValues;
1765
+ var stackTotals = [];
1766
+ var stackRangesNeg = [];
1767
+ for (i = 0, vlen = values.length; i < vlen; i++) {
1768
+ if (stacked) {
1769
+ vlist = values[i];
1770
+ values[i] = svals = [];
1771
+ stackTotals[i] = 0;
1772
+ stackRanges[i] = stackRangesNeg[i] = 0;
1773
+ for (j = 0, slen = vlist.length; j < slen; j++) {
1774
+ val = svals[j] = chartRangeClip ? clipval(vlist[j], clipMin, clipMax) : vlist[j];
1775
+ if (val !== null) {
1776
+ if (val > 0) {
1777
+ stackTotals[i] += val;
1778
+ }
1779
+ if (stackMin < 0 && stackMax > 0) {
1780
+ if (val < 0) {
1781
+ stackRangesNeg[i] += Math.abs(val);
1782
+ } else {
1783
+ stackRanges[i] += val;
1784
+ }
1785
+ } else {
1786
+ stackRanges[i] += Math.abs(val - (val < 0 ? stackMax : stackMin));
1787
+ }
1788
+ numValues.push(val);
1789
+ }
1790
+ }
1791
+ } else {
1792
+ val = chartRangeClip ? clipval(values[i], clipMin, clipMax) : values[i];
1793
+ val = values[i] = normalizeValue(val);
1794
+ if (val !== null) {
1795
+ numValues.push(val);
1796
+ }
1797
+ }
1798
+ }
1799
+ this.max = max = Math.max.apply(Math, numValues);
1800
+ this.min = min = Math.min.apply(Math, numValues);
1801
+ this.stackMax = stackMax = stacked ? Math.max.apply(Math, stackTotals) : max;
1802
+ this.stackMin = stackMin = stacked ? Math.min.apply(Math, numValues) : min;
1803
+
1804
+ if (options.get('chartRangeMin') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMin') < min)) {
1805
+ min = options.get('chartRangeMin');
1806
+ }
1807
+ if (options.get('chartRangeMax') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMax') > max)) {
1808
+ max = options.get('chartRangeMax');
1809
+ }
1810
+
1811
+ this.zeroAxis = zeroAxis = options.get('zeroAxis', true);
1812
+ if (min <= 0 && max >= 0 && zeroAxis) {
1813
+ xaxisOffset = 0;
1814
+ } else if (zeroAxis == false) {
1815
+ xaxisOffset = min;
1816
+ } else if (min > 0) {
1817
+ xaxisOffset = min;
1818
+ } else {
1819
+ xaxisOffset = max;
1820
+ }
1821
+ this.xaxisOffset = xaxisOffset;
1822
+
1823
+ range = stacked ? (Math.max.apply(Math, stackRanges) + Math.max.apply(Math, stackRangesNeg)) : max - min;
1824
+
1825
+ // as we plot zero/min values a single pixel line, we add a pixel to all other
1826
+ // values - Reduce the effective canvas size to suit
1827
+ this.canvasHeightEf = (zeroAxis && min < 0) ? this.canvasHeight - 2 : this.canvasHeight - 1;
1828
+
1829
+ if (min < xaxisOffset) {
1830
+ yMaxCalc = (stacked && max >= 0) ? stackMax : max;
1831
+ yoffset = (yMaxCalc - xaxisOffset) / range * this.canvasHeight;
1832
+ if (yoffset !== Math.ceil(yoffset)) {
1833
+ this.canvasHeightEf -= 2;
1834
+ yoffset = Math.ceil(yoffset);
1835
+ }
1836
+ } else {
1837
+ yoffset = this.canvasHeight;
1838
+ }
1839
+ this.yoffset = yoffset;
1840
+
1841
+ if ($.isArray(options.get('colorMap'))) {
1842
+ this.colorMapByIndex = options.get('colorMap');
1843
+ this.colorMapByValue = null;
1844
+ } else {
1845
+ this.colorMapByIndex = null;
1846
+ this.colorMapByValue = options.get('colorMap');
1847
+ if (this.colorMapByValue && this.colorMapByValue.get === undefined) {
1848
+ this.colorMapByValue = new RangeMap(this.colorMapByValue);
1849
+ }
1850
+ }
1851
+
1852
+ this.range = range;
1853
+ },
1854
+
1855
+ getRegion: function (el, x, y) {
1856
+ var result = Math.floor(x / this.totalBarWidth);
1857
+ return (result < 0 || result >= this.values.length) ? undefined : result;
1858
+ },
1859
+
1860
+ getCurrentRegionFields: function () {
1861
+ var currentRegion = this.currentRegion,
1862
+ values = ensureArray(this.values[currentRegion]),
1863
+ result = [],
1864
+ value, i;
1865
+ for (i = values.length; i--;) {
1866
+ value = values[i];
1867
+ result.push({
1868
+ isNull: value === null,
1869
+ value: value,
1870
+ color: this.calcColor(i, value, currentRegion),
1871
+ offset: currentRegion
1872
+ });
1873
+ }
1874
+ return result;
1875
+ },
1876
+
1877
+ calcColor: function (stacknum, value, valuenum) {
1878
+ var colorMapByIndex = this.colorMapByIndex,
1879
+ colorMapByValue = this.colorMapByValue,
1880
+ options = this.options,
1881
+ color, newColor;
1882
+ if (this.stacked) {
1883
+ color = options.get('stackedBarColor');
1884
+ } else {
1885
+ color = (value < 0) ? options.get('negBarColor') : options.get('barColor');
1886
+ }
1887
+ if (value === 0 && options.get('zeroColor') !== undefined) {
1888
+ color = options.get('zeroColor');
1889
+ }
1890
+ if (colorMapByValue && (newColor = colorMapByValue.get(value))) {
1891
+ color = newColor;
1892
+ } else if (colorMapByIndex && colorMapByIndex.length > valuenum) {
1893
+ color = colorMapByIndex[valuenum];
1894
+ }
1895
+ return $.isArray(color) ? color[stacknum % color.length] : color;
1896
+ },
1897
+
1898
+ /**
1899
+ * Render bar(s) for a region
1900
+ */
1901
+ renderRegion: function (valuenum, highlight) {
1902
+ var vals = this.values[valuenum],
1903
+ options = this.options,
1904
+ xaxisOffset = this.xaxisOffset,
1905
+ result = [],
1906
+ range = this.range,
1907
+ stacked = this.stacked,
1908
+ target = this.target,
1909
+ x = valuenum * this.totalBarWidth,
1910
+ canvasHeightEf = this.canvasHeightEf,
1911
+ yoffset = this.yoffset,
1912
+ y, height, color, isNull, yoffsetNeg, i, valcount, val, minPlotted, allMin;
1913
+
1914
+ vals = $.isArray(vals) ? vals : [vals];
1915
+ valcount = vals.length;
1916
+ val = vals[0];
1917
+ isNull = all(null, vals);
1918
+ allMin = all(xaxisOffset, vals, true);
1919
+
1920
+ if (isNull) {
1921
+ if (options.get('nullColor')) {
1922
+ color = highlight ? options.get('nullColor') : this.calcHighlightColor(options.get('nullColor'), options);
1923
+ y = (yoffset > 0) ? yoffset - 1 : yoffset;
1924
+ return target.drawRect(x, y, this.barWidth - 1, 0, color, color);
1925
+ } else {
1926
+ return undefined;
1927
+ }
1928
+ }
1929
+ yoffsetNeg = yoffset;
1930
+ for (i = 0; i < valcount; i++) {
1931
+ val = vals[i];
1932
+
1933
+ if (stacked && val === xaxisOffset) {
1934
+ if (!allMin || minPlotted) {
1935
+ continue;
1936
+ }
1937
+ minPlotted = true;
1938
+ }
1939
+
1940
+ if (range > 0) {
1941
+ height = Math.floor(canvasHeightEf * ((Math.abs(val - xaxisOffset) / range))) + 1;
1942
+ } else {
1943
+ height = 1;
1944
+ }
1945
+ if (val < xaxisOffset || (val === xaxisOffset && yoffset === 0)) {
1946
+ y = yoffsetNeg;
1947
+ yoffsetNeg += height;
1948
+ } else {
1949
+ y = yoffset - height;
1950
+ yoffset -= height;
1951
+ }
1952
+ color = this.calcColor(i, val, valuenum);
1953
+ if (highlight) {
1954
+ color = this.calcHighlightColor(color, options);
1955
+ }
1956
+ result.push(target.drawRect(x, y, this.barWidth - 1, height - 1, color, color));
1957
+ }
1958
+ if (result.length === 1) {
1959
+ return result[0];
1960
+ }
1961
+ return result;
1962
+ }
1963
+ });
1964
+
1965
+ /**
1966
+ * Tristate charts
1967
+ */
1968
+ $.fn.sparkline.tristate = tristate = createClass($.fn.sparkline._base, barHighlightMixin, {
1969
+ type: 'tristate',
1970
+
1971
+ init: function (el, values, options, width, height) {
1972
+ var barWidth = parseInt(options.get('barWidth'), 10),
1973
+ barSpacing = parseInt(options.get('barSpacing'), 10);
1974
+ tristate._super.init.call(this, el, values, options, width, height);
1975
+
1976
+ this.regionShapes = {};
1977
+ this.barWidth = barWidth;
1978
+ this.barSpacing = barSpacing;
1979
+ this.totalBarWidth = barWidth + barSpacing;
1980
+ this.values = $.map(values, Number);
1981
+ this.width = width = (values.length * barWidth) + ((values.length - 1) * barSpacing);
1982
+
1983
+ if ($.isArray(options.get('colorMap'))) {
1984
+ this.colorMapByIndex = options.get('colorMap');
1985
+ this.colorMapByValue = null;
1986
+ } else {
1987
+ this.colorMapByIndex = null;
1988
+ this.colorMapByValue = options.get('colorMap');
1989
+ if (this.colorMapByValue && this.colorMapByValue.get === undefined) {
1990
+ this.colorMapByValue = new RangeMap(this.colorMapByValue);
1991
+ }
1992
+ }
1993
+ this.initTarget();
1994
+ },
1995
+
1996
+ getRegion: function (el, x, y) {
1997
+ return Math.floor(x / this.totalBarWidth);
1998
+ },
1999
+
2000
+ getCurrentRegionFields: function () {
2001
+ var currentRegion = this.currentRegion;
2002
+ return {
2003
+ isNull: this.values[currentRegion] === undefined,
2004
+ value: this.values[currentRegion],
2005
+ color: this.calcColor(this.values[currentRegion], currentRegion),
2006
+ offset: currentRegion
2007
+ };
2008
+ },
2009
+
2010
+ calcColor: function (value, valuenum) {
2011
+ var values = this.values,
2012
+ options = this.options,
2013
+ colorMapByIndex = this.colorMapByIndex,
2014
+ colorMapByValue = this.colorMapByValue,
2015
+ color, newColor;
2016
+
2017
+ if (colorMapByValue && (newColor = colorMapByValue.get(value))) {
2018
+ color = newColor;
2019
+ } else if (colorMapByIndex && colorMapByIndex.length > valuenum) {
2020
+ color = colorMapByIndex[valuenum];
2021
+ } else if (values[valuenum] < 0) {
2022
+ color = options.get('negBarColor');
2023
+ } else if (values[valuenum] > 0) {
2024
+ color = options.get('posBarColor');
2025
+ } else {
2026
+ color = options.get('zeroBarColor');
2027
+ }
2028
+ return color;
2029
+ },
2030
+
2031
+ renderRegion: function (valuenum, highlight) {
2032
+ var values = this.values,
2033
+ options = this.options,
2034
+ target = this.target,
2035
+ canvasHeight, height, halfHeight,
2036
+ x, y, color;
2037
+
2038
+ canvasHeight = target.pixelHeight;
2039
+ halfHeight = Math.round(canvasHeight / 2);
2040
+
2041
+ x = valuenum * this.totalBarWidth;
2042
+ if (values[valuenum] < 0) {
2043
+ y = halfHeight;
2044
+ height = halfHeight - 1;
2045
+ } else if (values[valuenum] > 0) {
2046
+ y = 0;
2047
+ height = halfHeight - 1;
2048
+ } else {
2049
+ y = halfHeight - 1;
2050
+ height = 2;
2051
+ }
2052
+ color = this.calcColor(values[valuenum], valuenum);
2053
+ if (color === null) {
2054
+ return;
2055
+ }
2056
+ if (highlight) {
2057
+ color = this.calcHighlightColor(color, options);
2058
+ }
2059
+ return target.drawRect(x, y, this.barWidth - 1, height - 1, color, color);
2060
+ }
2061
+ });
2062
+
2063
+ /**
2064
+ * Discrete charts
2065
+ */
2066
+ $.fn.sparkline.discrete = discrete = createClass($.fn.sparkline._base, barHighlightMixin, {
2067
+ type: 'discrete',
2068
+
2069
+ init: function (el, values, options, width, height) {
2070
+ discrete._super.init.call(this, el, values, options, width, height);
2071
+
2072
+ this.regionShapes = {};
2073
+ this.values = values = $.map(values, Number);
2074
+ this.min = Math.min.apply(Math, values);
2075
+ this.max = Math.max.apply(Math, values);
2076
+ this.range = this.max - this.min;
2077
+ this.width = width = options.get('width') === 'auto' ? values.length * 2 : this.width;
2078
+ this.interval = Math.floor(width / values.length);
2079
+ this.itemWidth = width / values.length;
2080
+ if (options.get('chartRangeMin') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMin') < this.min)) {
2081
+ this.min = options.get('chartRangeMin');
2082
+ }
2083
+ if (options.get('chartRangeMax') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMax') > this.max)) {
2084
+ this.max = options.get('chartRangeMax');
2085
+ }
2086
+ this.initTarget();
2087
+ if (this.target) {
2088
+ this.lineHeight = options.get('lineHeight') === 'auto' ? Math.round(this.canvasHeight * 0.3) : options.get('lineHeight');
2089
+ }
2090
+ },
2091
+
2092
+ getRegion: function (el, x, y) {
2093
+ return Math.floor(x / this.itemWidth);
2094
+ },
2095
+
2096
+ getCurrentRegionFields: function () {
2097
+ var currentRegion = this.currentRegion;
2098
+ return {
2099
+ isNull: this.values[currentRegion] === undefined,
2100
+ value: this.values[currentRegion],
2101
+ offset: currentRegion
2102
+ };
2103
+ },
2104
+
2105
+ renderRegion: function (valuenum, highlight) {
2106
+ var values = this.values,
2107
+ options = this.options,
2108
+ min = this.min,
2109
+ max = this.max,
2110
+ range = this.range,
2111
+ interval = this.interval,
2112
+ target = this.target,
2113
+ canvasHeight = this.canvasHeight,
2114
+ lineHeight = this.lineHeight,
2115
+ pheight = canvasHeight - lineHeight,
2116
+ ytop, val, color, x;
2117
+
2118
+ val = clipval(values[valuenum], min, max);
2119
+ x = valuenum * interval;
2120
+ ytop = Math.round(pheight - pheight * ((val - min) / range));
2121
+ color = (options.get('thresholdColor') && val < options.get('thresholdValue')) ? options.get('thresholdColor') : options.get('lineColor');
2122
+ if (highlight) {
2123
+ color = this.calcHighlightColor(color, options);
2124
+ }
2125
+ return target.drawLine(x, ytop, x, ytop + lineHeight, color);
2126
+ }
2127
+ });
2128
+
2129
+ /**
2130
+ * Bullet charts
2131
+ */
2132
+ $.fn.sparkline.bullet = bullet = createClass($.fn.sparkline._base, {
2133
+ type: 'bullet',
2134
+
2135
+ init: function (el, values, options, width, height) {
2136
+ var min, max, vals;
2137
+ bullet._super.init.call(this, el, values, options, width, height);
2138
+
2139
+ // values: target, performance, range1, range2, range3
2140
+ this.values = values = normalizeValues(values);
2141
+ // target or performance could be null
2142
+ vals = values.slice();
2143
+ vals[0] = vals[0] === null ? vals[2] : vals[0];
2144
+ vals[1] = values[1] === null ? vals[2] : vals[1];
2145
+ min = Math.min.apply(Math, values);
2146
+ max = Math.max.apply(Math, values);
2147
+ if (options.get('base') === undefined) {
2148
+ min = min < 0 ? min : 0;
2149
+ } else {
2150
+ min = options.get('base');
2151
+ }
2152
+ this.min = min;
2153
+ this.max = max;
2154
+ this.range = max - min;
2155
+ this.shapes = {};
2156
+ this.valueShapes = {};
2157
+ this.regiondata = {};
2158
+ this.width = width = options.get('width') === 'auto' ? '4.0em' : width;
2159
+ this.target = this.$el.simpledraw(width, height, options.get('composite'));
2160
+ if (!values.length) {
2161
+ this.disabled = true;
2162
+ }
2163
+ this.initTarget();
2164
+ },
2165
+
2166
+ getRegion: function (el, x, y) {
2167
+ var shapeid = this.target.getShapeAt(el, x, y);
2168
+ return (shapeid !== undefined && this.shapes[shapeid] !== undefined) ? this.shapes[shapeid] : undefined;
2169
+ },
2170
+
2171
+ getCurrentRegionFields: function () {
2172
+ var currentRegion = this.currentRegion;
2173
+ return {
2174
+ fieldkey: currentRegion.substr(0, 1),
2175
+ value: this.values[currentRegion.substr(1)],
2176
+ region: currentRegion
2177
+ };
2178
+ },
2179
+
2180
+ changeHighlight: function (highlight) {
2181
+ var currentRegion = this.currentRegion,
2182
+ shapeid = this.valueShapes[currentRegion],
2183
+ shape;
2184
+ delete this.shapes[shapeid];
2185
+ switch (currentRegion.substr(0, 1)) {
2186
+ case 'r':
2187
+ shape = this.renderRange(currentRegion.substr(1), highlight);
2188
+ break;
2189
+ case 'p':
2190
+ shape = this.renderPerformance(highlight);
2191
+ break;
2192
+ case 't':
2193
+ shape = this.renderTarget(highlight);
2194
+ break;
2195
+ }
2196
+ this.valueShapes[currentRegion] = shape.id;
2197
+ this.shapes[shape.id] = currentRegion;
2198
+ this.target.replaceWithShape(shapeid, shape);
2199
+ },
2200
+
2201
+ renderRange: function (rn, highlight) {
2202
+ var rangeval = this.values[rn],
2203
+ rangewidth = Math.round(this.canvasWidth * ((rangeval - this.min) / this.range)),
2204
+ color = this.options.get('rangeColors')[rn - 2];
2205
+ if (highlight) {
2206
+ color = this.calcHighlightColor(color, this.options);
2207
+ }
2208
+ return this.target.drawRect(0, 0, rangewidth - 1, this.canvasHeight - 1, color, color);
2209
+ },
2210
+
2211
+ renderPerformance: function (highlight) {
2212
+ var perfval = this.values[1],
2213
+ perfwidth = Math.round(this.canvasWidth * ((perfval - this.min) / this.range)),
2214
+ color = this.options.get('performanceColor');
2215
+ if (highlight) {
2216
+ color = this.calcHighlightColor(color, this.options);
2217
+ }
2218
+ return this.target.drawRect(0, Math.round(this.canvasHeight * 0.3), perfwidth - 1,
2219
+ Math.round(this.canvasHeight * 0.4) - 1, color, color);
2220
+ },
2221
+
2222
+ renderTarget: function (highlight) {
2223
+ var targetval = this.values[0],
2224
+ x = Math.round(this.canvasWidth * ((targetval - this.min) / this.range) - (this.options.get('targetWidth') / 2)),
2225
+ targettop = Math.round(this.canvasHeight * 0.10),
2226
+ targetheight = this.canvasHeight - (targettop * 2),
2227
+ color = this.options.get('targetColor');
2228
+ if (highlight) {
2229
+ color = this.calcHighlightColor(color, this.options);
2230
+ }
2231
+ return this.target.drawRect(x, targettop, this.options.get('targetWidth') - 1, targetheight - 1, color, color);
2232
+ },
2233
+
2234
+ render: function () {
2235
+ var vlen = this.values.length,
2236
+ target = this.target,
2237
+ i, shape;
2238
+ if (!bullet._super.render.call(this)) {
2239
+ return;
2240
+ }
2241
+ for (i = 2; i < vlen; i++) {
2242
+ shape = this.renderRange(i).append();
2243
+ this.shapes[shape.id] = 'r' + i;
2244
+ this.valueShapes['r' + i] = shape.id;
2245
+ }
2246
+ if (this.values[1] !== null) {
2247
+ shape = this.renderPerformance().append();
2248
+ this.shapes[shape.id] = 'p1';
2249
+ this.valueShapes.p1 = shape.id;
2250
+ }
2251
+ if (this.values[0] !== null) {
2252
+ shape = this.renderTarget().append();
2253
+ this.shapes[shape.id] = 't0';
2254
+ this.valueShapes.t0 = shape.id;
2255
+ }
2256
+ target.render();
2257
+ }
2258
+ });
2259
+
2260
+ /**
2261
+ * Pie charts
2262
+ */
2263
+ $.fn.sparkline.pie = pie = createClass($.fn.sparkline._base, {
2264
+ type: 'pie',
2265
+
2266
+ init: function (el, values, options, width, height) {
2267
+ var total = 0, i;
2268
+
2269
+ pie._super.init.call(this, el, values, options, width, height);
2270
+
2271
+ this.shapes = {}; // map shape ids to value offsets
2272
+ this.valueShapes = {}; // maps value offsets to shape ids
2273
+ this.values = values = $.map(values, Number);
2274
+
2275
+ if (options.get('width') === 'auto') {
2276
+ this.width = this.height;
2277
+ }
2278
+
2279
+ if (values.length > 0) {
2280
+ for (i = values.length; i--;) {
2281
+ total += values[i];
2282
+ }
2283
+ }
2284
+ this.total = total;
2285
+ this.initTarget();
2286
+ this.radius = Math.floor(Math.min(this.canvasWidth, this.canvasHeight) / 2);
2287
+ },
2288
+
2289
+ getRegion: function (el, x, y) {
2290
+ var shapeid = this.target.getShapeAt(el, x, y);
2291
+ return (shapeid !== undefined && this.shapes[shapeid] !== undefined) ? this.shapes[shapeid] : undefined;
2292
+ },
2293
+
2294
+ getCurrentRegionFields: function () {
2295
+ var currentRegion = this.currentRegion;
2296
+ return {
2297
+ isNull: this.values[currentRegion] === undefined,
2298
+ value: this.values[currentRegion],
2299
+ percent: this.values[currentRegion] / this.total * 100,
2300
+ color: this.options.get('sliceColors')[currentRegion % this.options.get('sliceColors').length],
2301
+ offset: currentRegion
2302
+ };
2303
+ },
2304
+
2305
+ changeHighlight: function (highlight) {
2306
+ var currentRegion = this.currentRegion,
2307
+ newslice = this.renderSlice(currentRegion, highlight),
2308
+ shapeid = this.valueShapes[currentRegion];
2309
+ delete this.shapes[shapeid];
2310
+ this.target.replaceWithShape(shapeid, newslice);
2311
+ this.valueShapes[currentRegion] = newslice.id;
2312
+ this.shapes[newslice.id] = currentRegion;
2313
+ },
2314
+
2315
+ renderSlice: function (valuenum, highlight) {
2316
+ var target = this.target,
2317
+ options = this.options,
2318
+ radius = this.radius,
2319
+ borderWidth = options.get('borderWidth'),
2320
+ offset = options.get('offset'),
2321
+ circle = 2 * Math.PI,
2322
+ values = this.values,
2323
+ total = this.total,
2324
+ next = offset ? (2*Math.PI)*(offset/360) : 0,
2325
+ start, end, i, vlen, color;
2326
+
2327
+ vlen = values.length;
2328
+ for (i = 0; i < vlen; i++) {
2329
+ start = next;
2330
+ end = next;
2331
+ if (total > 0) { // avoid divide by zero
2332
+ end = next + (circle * (values[i] / total));
2333
+ }
2334
+ if (valuenum === i) {
2335
+ color = options.get('sliceColors')[i % options.get('sliceColors').length];
2336
+ if (highlight) {
2337
+ color = this.calcHighlightColor(color, options);
2338
+ }
2339
+
2340
+ return target.drawPieSlice(radius, radius, radius - borderWidth, start, end, undefined, color);
2341
+ }
2342
+ next = end;
2343
+ }
2344
+ },
2345
+
2346
+ render: function () {
2347
+ var target = this.target,
2348
+ values = this.values,
2349
+ options = this.options,
2350
+ radius = this.radius,
2351
+ borderWidth = options.get('borderWidth'),
2352
+ donutWidth = options.get('donutWidth'),
2353
+ shape, i;
2354
+
2355
+ if (!pie._super.render.call(this)) {
2356
+ return;
2357
+ }
2358
+ if (borderWidth) {
2359
+ target.drawCircle(radius, radius, Math.floor(radius - (borderWidth / 2)),
2360
+ options.get('borderColor'), undefined, borderWidth).append();
2361
+ }
2362
+ for (i = values.length; i--;) {
2363
+ if (values[i]) { // don't render zero values
2364
+ shape = this.renderSlice(i).append();
2365
+ this.valueShapes[i] = shape.id; // store just the shapeid
2366
+ this.shapes[shape.id] = i;
2367
+ }
2368
+ }
2369
+ if (donutWidth) {
2370
+ target.drawCircle(radius, radius, radius - donutWidth, options.get('donutColor'),
2371
+ options.get('donutColor'), 0).append();
2372
+ }
2373
+ target.render();
2374
+ }
2375
+ });
2376
+
2377
+ /**
2378
+ * Box plots
2379
+ */
2380
+ $.fn.sparkline.box = box = createClass($.fn.sparkline._base, {
2381
+ type: 'box',
2382
+
2383
+ init: function (el, values, options, width, height) {
2384
+ box._super.init.call(this, el, values, options, width, height);
2385
+ this.values = $.map(values, Number);
2386
+ this.width = options.get('width') === 'auto' ? '4.0em' : width;
2387
+ this.initTarget();
2388
+ if (!this.values.length) {
2389
+ this.disabled = 1;
2390
+ }
2391
+ },
2392
+
2393
+ /**
2394
+ * Simulate a single region
2395
+ */
2396
+ getRegion: function () {
2397
+ return 1;
2398
+ },
2399
+
2400
+ getCurrentRegionFields: function () {
2401
+ var result = [
2402
+ { field: 'lq', value: this.quartiles[0] },
2403
+ { field: 'med', value: this.quartiles[1] },
2404
+ { field: 'uq', value: this.quartiles[2] }
2405
+ ];
2406
+ if (this.loutlier !== undefined) {
2407
+ result.push({ field: 'lo', value: this.loutlier});
2408
+ }
2409
+ if (this.routlier !== undefined) {
2410
+ result.push({ field: 'ro', value: this.routlier});
2411
+ }
2412
+ if (this.lwhisker !== undefined) {
2413
+ result.push({ field: 'lw', value: this.lwhisker});
2414
+ }
2415
+ if (this.rwhisker !== undefined) {
2416
+ result.push({ field: 'rw', value: this.rwhisker});
2417
+ }
2418
+ return result;
2419
+ },
2420
+
2421
+ render: function () {
2422
+ var target = this.target,
2423
+ values = this.values,
2424
+ vlen = values.length,
2425
+ options = this.options,
2426
+ canvasWidth = this.canvasWidth,
2427
+ canvasHeight = this.canvasHeight,
2428
+ minValue = options.get('chartRangeMin') === undefined ? Math.min.apply(Math, values) : options.get('chartRangeMin'),
2429
+ maxValue = options.get('chartRangeMax') === undefined ? Math.max.apply(Math, values) : options.get('chartRangeMax'),
2430
+ canvasLeft = 0,
2431
+ lwhisker, loutlier, iqr, q1, q2, q3, rwhisker, routlier, i,
2432
+ size, unitSize;
2433
+
2434
+ if (!box._super.render.call(this)) {
2435
+ return;
2436
+ }
2437
+
2438
+ if (options.get('raw')) {
2439
+ if (options.get('showOutliers') && values.length > 5) {
2440
+ loutlier = values[0];
2441
+ lwhisker = values[1];
2442
+ q1 = values[2];
2443
+ q2 = values[3];
2444
+ q3 = values[4];
2445
+ rwhisker = values[5];
2446
+ routlier = values[6];
2447
+ } else {
2448
+ lwhisker = values[0];
2449
+ q1 = values[1];
2450
+ q2 = values[2];
2451
+ q3 = values[3];
2452
+ rwhisker = values[4];
2453
+ }
2454
+ } else {
2455
+ values.sort(function (a, b) { return a - b; });
2456
+ q1 = quartile(values, 1);
2457
+ q2 = quartile(values, 2);
2458
+ q3 = quartile(values, 3);
2459
+ iqr = q3 - q1;
2460
+ if (options.get('showOutliers')) {
2461
+ lwhisker = rwhisker = undefined;
2462
+ for (i = 0; i < vlen; i++) {
2463
+ if (lwhisker === undefined && values[i] > q1 - (iqr * options.get('outlierIQR'))) {
2464
+ lwhisker = values[i];
2465
+ }
2466
+ if (values[i] < q3 + (iqr * options.get('outlierIQR'))) {
2467
+ rwhisker = values[i];
2468
+ }
2469
+ }
2470
+ loutlier = values[0];
2471
+ routlier = values[vlen - 1];
2472
+ } else {
2473
+ lwhisker = values[0];
2474
+ rwhisker = values[vlen - 1];
2475
+ }
2476
+ }
2477
+ this.quartiles = [q1, q2, q3];
2478
+ this.lwhisker = lwhisker;
2479
+ this.rwhisker = rwhisker;
2480
+ this.loutlier = loutlier;
2481
+ this.routlier = routlier;
2482
+
2483
+ unitSize = canvasWidth / (maxValue - minValue + 1);
2484
+ if (options.get('showOutliers')) {
2485
+ canvasLeft = Math.ceil(options.get('spotRadius'));
2486
+ canvasWidth -= 2 * Math.ceil(options.get('spotRadius'));
2487
+ unitSize = canvasWidth / (maxValue - minValue + 1);
2488
+ if (loutlier < lwhisker) {
2489
+ target.drawCircle((loutlier - minValue) * unitSize + canvasLeft,
2490
+ canvasHeight / 2,
2491
+ options.get('spotRadius'),
2492
+ options.get('outlierLineColor'),
2493
+ options.get('outlierFillColor')).append();
2494
+ }
2495
+ if (routlier > rwhisker) {
2496
+ target.drawCircle((routlier - minValue) * unitSize + canvasLeft,
2497
+ canvasHeight / 2,
2498
+ options.get('spotRadius'),
2499
+ options.get('outlierLineColor'),
2500
+ options.get('outlierFillColor')).append();
2501
+ }
2502
+ }
2503
+
2504
+ // box
2505
+ target.drawRect(
2506
+ Math.round((q1 - minValue) * unitSize + canvasLeft),
2507
+ Math.round(canvasHeight * 0.1),
2508
+ Math.round((q3 - q1) * unitSize),
2509
+ Math.round(canvasHeight * 0.8),
2510
+ options.get('boxLineColor'),
2511
+ options.get('boxFillColor')).append();
2512
+ // left whisker
2513
+ target.drawLine(
2514
+ Math.round((lwhisker - minValue) * unitSize + canvasLeft),
2515
+ Math.round(canvasHeight / 2),
2516
+ Math.round((q1 - minValue) * unitSize + canvasLeft),
2517
+ Math.round(canvasHeight / 2),
2518
+ options.get('lineColor')).append();
2519
+ target.drawLine(
2520
+ Math.round((lwhisker - minValue) * unitSize + canvasLeft),
2521
+ Math.round(canvasHeight / 4),
2522
+ Math.round((lwhisker - minValue) * unitSize + canvasLeft),
2523
+ Math.round(canvasHeight - canvasHeight / 4),
2524
+ options.get('whiskerColor')).append();
2525
+ // right whisker
2526
+ target.drawLine(Math.round((rwhisker - minValue) * unitSize + canvasLeft),
2527
+ Math.round(canvasHeight / 2),
2528
+ Math.round((q3 - minValue) * unitSize + canvasLeft),
2529
+ Math.round(canvasHeight / 2),
2530
+ options.get('lineColor')).append();
2531
+ target.drawLine(
2532
+ Math.round((rwhisker - minValue) * unitSize + canvasLeft),
2533
+ Math.round(canvasHeight / 4),
2534
+ Math.round((rwhisker - minValue) * unitSize + canvasLeft),
2535
+ Math.round(canvasHeight - canvasHeight / 4),
2536
+ options.get('whiskerColor')).append();
2537
+ // median line
2538
+ target.drawLine(
2539
+ Math.round((q2 - minValue) * unitSize + canvasLeft),
2540
+ Math.round(canvasHeight * 0.1),
2541
+ Math.round((q2 - minValue) * unitSize + canvasLeft),
2542
+ Math.round(canvasHeight * 0.9),
2543
+ options.get('medianColor')).append();
2544
+ if (options.get('target')) {
2545
+ size = Math.ceil(options.get('spotRadius'));
2546
+ target.drawLine(
2547
+ Math.round((options.get('target') - minValue) * unitSize + canvasLeft),
2548
+ Math.round((canvasHeight / 2) - size),
2549
+ Math.round((options.get('target') - minValue) * unitSize + canvasLeft),
2550
+ Math.round((canvasHeight / 2) + size),
2551
+ options.get('targetColor')).append();
2552
+ target.drawLine(
2553
+ Math.round((options.get('target') - minValue) * unitSize + canvasLeft - size),
2554
+ Math.round(canvasHeight / 2),
2555
+ Math.round((options.get('target') - minValue) * unitSize + canvasLeft + size),
2556
+ Math.round(canvasHeight / 2),
2557
+ options.get('targetColor')).append();
2558
+ }
2559
+ target.render();
2560
+ }
2561
+ });
2562
+
2563
+ // Setup a very simple "virtual canvas" to make drawing the few shapes we need easier
2564
+ // This is accessible as $(foo).simpledraw()
2565
+
2566
+ VShape = createClass({
2567
+ init: function (target, id, type, args) {
2568
+ this.target = target;
2569
+ this.id = id;
2570
+ this.type = type;
2571
+ this.args = args;
2572
+ },
2573
+ append: function () {
2574
+ this.target.appendShape(this);
2575
+ return this;
2576
+ }
2577
+ });
2578
+
2579
+ VCanvas_base = createClass({
2580
+ _pxregex: /(\d+)(px)?\s*$/i,
2581
+
2582
+ init: function (width, height, target) {
2583
+ if (!width) {
2584
+ return;
2585
+ }
2586
+ this.width = width;
2587
+ this.height = height;
2588
+ this.target = target;
2589
+ this.lastShapeId = null;
2590
+ if (target[0]) {
2591
+ target = target[0];
2592
+ }
2593
+ $.data(target, '_jqs_vcanvas', this);
2594
+ },
2595
+
2596
+ drawLine: function (x1, y1, x2, y2, lineColor, lineWidth) {
2597
+ return this.drawShape([[x1, y1], [x2, y2]], lineColor, lineWidth);
2598
+ },
2599
+
2600
+ drawShape: function (path, lineColor, fillColor, lineWidth) {
2601
+ return this._genShape('Shape', [path, lineColor, fillColor, lineWidth]);
2602
+ },
2603
+
2604
+ drawCircle: function (x, y, radius, lineColor, fillColor, lineWidth) {
2605
+ return this._genShape('Circle', [x, y, radius, lineColor, fillColor, lineWidth]);
2606
+ },
2607
+
2608
+ drawPieSlice: function (x, y, radius, startAngle, endAngle, lineColor, fillColor) {
2609
+ return this._genShape('PieSlice', [x, y, radius, startAngle, endAngle, lineColor, fillColor]);
2610
+ },
2611
+
2612
+ drawRect: function (x, y, width, height, lineColor, fillColor) {
2613
+ return this._genShape('Rect', [x, y, width, height, lineColor, fillColor]);
2614
+ },
2615
+
2616
+ getElement: function () {
2617
+ return this.canvas;
2618
+ },
2619
+
2620
+ /**
2621
+ * Return the most recently inserted shape id
2622
+ */
2623
+ getLastShapeId: function () {
2624
+ return this.lastShapeId;
2625
+ },
2626
+
2627
+ /**
2628
+ * Clear and reset the canvas
2629
+ */
2630
+ reset: function () {
2631
+ alert('reset not implemented');
2632
+ },
2633
+
2634
+ _insert: function (el, target) {
2635
+ $(target).html(el);
2636
+ },
2637
+
2638
+ /**
2639
+ * Calculate the pixel dimensions of the canvas
2640
+ */
2641
+ _calculatePixelDims: function (width, height, canvas) {
2642
+ // XXX This should probably be a configurable option
2643
+ var match;
2644
+ match = this._pxregex.exec(height);
2645
+ if (match) {
2646
+ this.pixelHeight = match[1];
2647
+ } else {
2648
+ this.pixelHeight = $(canvas).height();
2649
+ }
2650
+ match = this._pxregex.exec(width);
2651
+ if (match) {
2652
+ this.pixelWidth = match[1];
2653
+ } else {
2654
+ this.pixelWidth = $(canvas).width();
2655
+ }
2656
+ },
2657
+
2658
+ /**
2659
+ * Generate a shape object and id for later rendering
2660
+ */
2661
+ _genShape: function (shapetype, shapeargs) {
2662
+ var id = shapeCount++;
2663
+ shapeargs.unshift(id);
2664
+ return new VShape(this, id, shapetype, shapeargs);
2665
+ },
2666
+
2667
+ /**
2668
+ * Add a shape to the end of the render queue
2669
+ */
2670
+ appendShape: function (shape) {
2671
+ alert('appendShape not implemented');
2672
+ },
2673
+
2674
+ /**
2675
+ * Replace one shape with another
2676
+ */
2677
+ replaceWithShape: function (shapeid, shape) {
2678
+ alert('replaceWithShape not implemented');
2679
+ },
2680
+
2681
+ /**
2682
+ * Insert one shape after another in the render queue
2683
+ */
2684
+ insertAfterShape: function (shapeid, shape) {
2685
+ alert('insertAfterShape not implemented');
2686
+ },
2687
+
2688
+ /**
2689
+ * Remove a shape from the queue
2690
+ */
2691
+ removeShapeId: function (shapeid) {
2692
+ alert('removeShapeId not implemented');
2693
+ },
2694
+
2695
+ /**
2696
+ * Find a shape at the specified x/y co-ordinates
2697
+ */
2698
+ getShapeAt: function (el, x, y) {
2699
+ alert('getShapeAt not implemented');
2700
+ },
2701
+
2702
+ /**
2703
+ * Render all queued shapes onto the canvas
2704
+ */
2705
+ render: function () {
2706
+ alert('render not implemented');
2707
+ }
2708
+ });
2709
+
2710
+ VCanvas_canvas = createClass(VCanvas_base, {
2711
+ init: function (width, height, target, interact) {
2712
+ VCanvas_canvas._super.init.call(this, width, height, target);
2713
+ this.canvas = document.createElement('canvas');
2714
+ if (target[0]) {
2715
+ target = target[0];
2716
+ }
2717
+ $.data(target, '_jqs_vcanvas', this);
2718
+ $(this.canvas).css({ display: 'inline-block', width: width, height: height, verticalAlign: 'top' });
2719
+ this._insert(this.canvas, target);
2720
+ this._calculatePixelDims(width, height, this.canvas);
2721
+ this.canvas.width = this.pixelWidth;
2722
+ this.canvas.height = this.pixelHeight;
2723
+ this.interact = interact;
2724
+ this.shapes = {};
2725
+ this.shapeseq = [];
2726
+ this.currentTargetShapeId = undefined;
2727
+ $(this.canvas).css({width: this.pixelWidth, height: this.pixelHeight});
2728
+ },
2729
+
2730
+ _getContext: function (lineColor, fillColor, lineWidth) {
2731
+ var context = this.canvas.getContext('2d');
2732
+ if (lineColor !== undefined) {
2733
+ context.strokeStyle = lineColor;
2734
+ }
2735
+ context.lineWidth = lineWidth === undefined ? 1 : lineWidth;
2736
+ if (fillColor !== undefined) {
2737
+ context.fillStyle = fillColor;
2738
+ }
2739
+ return context;
2740
+ },
2741
+
2742
+ reset: function () {
2743
+ var context = this._getContext();
2744
+ context.clearRect(0, 0, this.pixelWidth, this.pixelHeight);
2745
+ this.shapes = {};
2746
+ this.shapeseq = [];
2747
+ this.currentTargetShapeId = undefined;
2748
+ },
2749
+
2750
+ _drawShape: function (shapeid, path, lineColor, fillColor, lineWidth) {
2751
+ var context = this._getContext(lineColor, fillColor, lineWidth),
2752
+ i, plen;
2753
+ context.beginPath();
2754
+ context.moveTo(path[0][0] + 0.5, path[0][1] + 0.5);
2755
+ for (i = 1, plen = path.length; i < plen; i++) {
2756
+ context.lineTo(path[i][0] + 0.5, path[i][1] + 0.5); // the 0.5 offset gives us crisp pixel-width lines
2757
+ }
2758
+ if (lineColor !== undefined) {
2759
+ context.stroke();
2760
+ }
2761
+ if (fillColor !== undefined) {
2762
+ context.fill();
2763
+ }
2764
+ if (this.targetX !== undefined && this.targetY !== undefined &&
2765
+ context.isPointInPath(this.targetX, this.targetY)) {
2766
+ this.currentTargetShapeId = shapeid;
2767
+ }
2768
+ },
2769
+
2770
+ _drawCircle: function (shapeid, x, y, radius, lineColor, fillColor, lineWidth) {
2771
+ var context = this._getContext(lineColor, fillColor, lineWidth);
2772
+ context.beginPath();
2773
+ context.arc(x, y, radius, 0, 2 * Math.PI, false);
2774
+ if (this.targetX !== undefined && this.targetY !== undefined &&
2775
+ context.isPointInPath(this.targetX, this.targetY)) {
2776
+ this.currentTargetShapeId = shapeid;
2777
+ }
2778
+ if (lineColor !== undefined) {
2779
+ context.stroke();
2780
+ }
2781
+ if (fillColor !== undefined) {
2782
+ context.fill();
2783
+ }
2784
+ },
2785
+
2786
+ _drawPieSlice: function (shapeid, x, y, radius, startAngle, endAngle, lineColor, fillColor) {
2787
+ var context = this._getContext(lineColor, fillColor);
2788
+ context.beginPath();
2789
+ context.moveTo(x, y);
2790
+ context.arc(x, y, radius, startAngle, endAngle, false);
2791
+ context.lineTo(x, y);
2792
+ context.closePath();
2793
+ if (lineColor !== undefined) {
2794
+ context.stroke();
2795
+ }
2796
+ if (fillColor) {
2797
+ context.fill();
2798
+ }
2799
+ if (this.targetX !== undefined && this.targetY !== undefined &&
2800
+ context.isPointInPath(this.targetX, this.targetY)) {
2801
+ this.currentTargetShapeId = shapeid;
2802
+ }
2803
+ },
2804
+
2805
+ _drawRect: function (shapeid, x, y, width, height, lineColor, fillColor) {
2806
+ return this._drawShape(shapeid, [[x, y], [x + width, y], [x + width, y + height], [x, y + height], [x, y]], lineColor, fillColor);
2807
+ },
2808
+
2809
+ appendShape: function (shape) {
2810
+ this.shapes[shape.id] = shape;
2811
+ this.shapeseq.push(shape.id);
2812
+ this.lastShapeId = shape.id;
2813
+ return shape.id;
2814
+ },
2815
+
2816
+ replaceWithShape: function (shapeid, shape) {
2817
+ var shapeseq = this.shapeseq,
2818
+ i;
2819
+ this.shapes[shape.id] = shape;
2820
+ for (i = shapeseq.length; i--;) {
2821
+ if (shapeseq[i] == shapeid) {
2822
+ shapeseq[i] = shape.id;
2823
+ }
2824
+ }
2825
+ delete this.shapes[shapeid];
2826
+ },
2827
+
2828
+ replaceWithShapes: function (shapeids, shapes) {
2829
+ var shapeseq = this.shapeseq,
2830
+ shapemap = {},
2831
+ sid, i, first;
2832
+
2833
+ for (i = shapeids.length; i--;) {
2834
+ shapemap[shapeids[i]] = true;
2835
+ }
2836
+ for (i = shapeseq.length; i--;) {
2837
+ sid = shapeseq[i];
2838
+ if (shapemap[sid]) {
2839
+ shapeseq.splice(i, 1);
2840
+ delete this.shapes[sid];
2841
+ first = i;
2842
+ }
2843
+ }
2844
+ for (i = shapes.length; i--;) {
2845
+ shapeseq.splice(first, 0, shapes[i].id);
2846
+ this.shapes[shapes[i].id] = shapes[i];
2847
+ }
2848
+
2849
+ },
2850
+
2851
+ insertAfterShape: function (shapeid, shape) {
2852
+ var shapeseq = this.shapeseq,
2853
+ i;
2854
+ for (i = shapeseq.length; i--;) {
2855
+ if (shapeseq[i] === shapeid) {
2856
+ shapeseq.splice(i + 1, 0, shape.id);
2857
+ this.shapes[shape.id] = shape;
2858
+ return;
2859
+ }
2860
+ }
2861
+ },
2862
+
2863
+ removeShapeId: function (shapeid) {
2864
+ var shapeseq = this.shapeseq,
2865
+ i;
2866
+ for (i = shapeseq.length; i--;) {
2867
+ if (shapeseq[i] === shapeid) {
2868
+ shapeseq.splice(i, 1);
2869
+ break;
2870
+ }
2871
+ }
2872
+ delete this.shapes[shapeid];
2873
+ },
2874
+
2875
+ getShapeAt: function (el, x, y) {
2876
+ this.targetX = x;
2877
+ this.targetY = y;
2878
+ this.render();
2879
+ return this.currentTargetShapeId;
2880
+ },
2881
+
2882
+ render: function () {
2883
+ var shapeseq = this.shapeseq,
2884
+ shapes = this.shapes,
2885
+ shapeCount = shapeseq.length,
2886
+ context = this._getContext(),
2887
+ shapeid, shape, i;
2888
+ context.clearRect(0, 0, this.pixelWidth, this.pixelHeight);
2889
+ for (i = 0; i < shapeCount; i++) {
2890
+ shapeid = shapeseq[i];
2891
+ shape = shapes[shapeid];
2892
+ this['_draw' + shape.type].apply(this, shape.args);
2893
+ }
2894
+ if (!this.interact) {
2895
+ // not interactive so no need to keep the shapes array
2896
+ this.shapes = {};
2897
+ this.shapeseq = [];
2898
+ }
2899
+ }
2900
+
2901
+ });
2902
+
2903
+ VCanvas_vml = createClass(VCanvas_base, {
2904
+ init: function (width, height, target) {
2905
+ var groupel;
2906
+ VCanvas_vml._super.init.call(this, width, height, target);
2907
+ if (target[0]) {
2908
+ target = target[0];
2909
+ }
2910
+ $.data(target, '_jqs_vcanvas', this);
2911
+ this.canvas = document.createElement('span');
2912
+ $(this.canvas).css({ display: 'inline-block', position: 'relative', overflow: 'hidden', width: width, height: height, margin: '0px', padding: '0px', verticalAlign: 'top'});
2913
+ this._insert(this.canvas, target);
2914
+ this._calculatePixelDims(width, height, this.canvas);
2915
+ this.canvas.width = this.pixelWidth;
2916
+ this.canvas.height = this.pixelHeight;
2917
+ groupel = '<v:group coordorigin="0 0" coordsize="' + this.pixelWidth + ' ' + this.pixelHeight + '"' +
2918
+ ' style="position:absolute;top:0;left:0;width:' + this.pixelWidth + 'px;height=' + this.pixelHeight + 'px;"></v:group>';
2919
+ this.canvas.insertAdjacentHTML('beforeEnd', groupel);
2920
+ this.group = $(this.canvas).children()[0];
2921
+ this.rendered = false;
2922
+ this.prerender = '';
2923
+ },
2924
+
2925
+ _drawShape: function (shapeid, path, lineColor, fillColor, lineWidth) {
2926
+ var vpath = [],
2927
+ initial, stroke, fill, closed, vel, plen, i;
2928
+ for (i = 0, plen = path.length; i < plen; i++) {
2929
+ vpath[i] = '' + (path[i][0]) + ',' + (path[i][1]);
2930
+ }
2931
+ initial = vpath.splice(0, 1);
2932
+ lineWidth = lineWidth === undefined ? 1 : lineWidth;
2933
+ stroke = lineColor === undefined ? ' stroked="false" ' : ' strokeWeight="' + lineWidth + 'px" strokeColor="' + lineColor + '" ';
2934
+ fill = fillColor === undefined ? ' filled="false"' : ' fillColor="' + fillColor + '" filled="true" ';
2935
+ closed = vpath[0] === vpath[vpath.length - 1] ? 'x ' : '';
2936
+ vel = '<v:shape coordorigin="0 0" coordsize="' + this.pixelWidth + ' ' + this.pixelHeight + '" ' +
2937
+ ' id="jqsshape' + shapeid + '" ' +
2938
+ stroke +
2939
+ fill +
2940
+ ' style="position:absolute;left:0px;top:0px;height:' + this.pixelHeight + 'px;width:' + this.pixelWidth + 'px;padding:0px;margin:0px;" ' +
2941
+ ' path="m ' + initial + ' l ' + vpath.join(', ') + ' ' + closed + 'e">' +
2942
+ ' </v:shape>';
2943
+ return vel;
2944
+ },
2945
+
2946
+ _drawCircle: function (shapeid, x, y, radius, lineColor, fillColor, lineWidth) {
2947
+ var stroke, fill, vel;
2948
+ x -= radius;
2949
+ y -= radius;
2950
+ stroke = lineColor === undefined ? ' stroked="false" ' : ' strokeWeight="' + lineWidth + 'px" strokeColor="' + lineColor + '" ';
2951
+ fill = fillColor === undefined ? ' filled="false"' : ' fillColor="' + fillColor + '" filled="true" ';
2952
+ vel = '<v:oval ' +
2953
+ ' id="jqsshape' + shapeid + '" ' +
2954
+ stroke +
2955
+ fill +
2956
+ ' style="position:absolute;top:' + y + 'px; left:' + x + 'px; width:' + (radius * 2) + 'px; height:' + (radius * 2) + 'px"></v:oval>';
2957
+ return vel;
2958
+
2959
+ },
2960
+
2961
+ _drawPieSlice: function (shapeid, x, y, radius, startAngle, endAngle, lineColor, fillColor) {
2962
+ var vpath, startx, starty, endx, endy, stroke, fill, vel;
2963
+ if (startAngle === endAngle) {
2964
+ return ''; // VML seems to have problem when start angle equals end angle.
2965
+ }
2966
+ if ((endAngle - startAngle) === (2 * Math.PI)) {
2967
+ startAngle = 0.0; // VML seems to have a problem when drawing a full circle that doesn't start 0
2968
+ endAngle = (2 * Math.PI);
2969
+ }
2970
+
2971
+ startx = x + Math.round(Math.cos(startAngle) * radius);
2972
+ starty = y + Math.round(Math.sin(startAngle) * radius);
2973
+ endx = x + Math.round(Math.cos(endAngle) * radius);
2974
+ endy = y + Math.round(Math.sin(endAngle) * radius);
2975
+
2976
+ if (startx === endx && starty === endy) {
2977
+ if ((endAngle - startAngle) < Math.PI) {
2978
+ // Prevent very small slices from being mistaken as a whole pie
2979
+ return '';
2980
+ }
2981
+ // essentially going to be the entire circle, so ignore startAngle
2982
+ startx = endx = x + radius;
2983
+ starty = endy = y;
2984
+ }
2985
+
2986
+ if (startx === endx && starty === endy && (endAngle - startAngle) < Math.PI) {
2987
+ return '';
2988
+ }
2989
+
2990
+ vpath = [x - radius, y - radius, x + radius, y + radius, startx, starty, endx, endy];
2991
+ stroke = lineColor === undefined ? ' stroked="false" ' : ' strokeWeight="1px" strokeColor="' + lineColor + '" ';
2992
+ fill = fillColor === undefined ? ' filled="false"' : ' fillColor="' + fillColor + '" filled="true" ';
2993
+ vel = '<v:shape coordorigin="0 0" coordsize="' + this.pixelWidth + ' ' + this.pixelHeight + '" ' +
2994
+ ' id="jqsshape' + shapeid + '" ' +
2995
+ stroke +
2996
+ fill +
2997
+ ' style="position:absolute;left:0px;top:0px;height:' + this.pixelHeight + 'px;width:' + this.pixelWidth + 'px;padding:0px;margin:0px;" ' +
2998
+ ' path="m ' + x + ',' + y + ' wa ' + vpath.join(', ') + ' x e">' +
2999
+ ' </v:shape>';
3000
+ return vel;
3001
+ },
3002
+
3003
+ _drawRect: function (shapeid, x, y, width, height, lineColor, fillColor) {
3004
+ return this._drawShape(shapeid, [[x, y], [x, y + height], [x + width, y + height], [x + width, y], [x, y]], lineColor, fillColor);
3005
+ },
3006
+
3007
+ reset: function () {
3008
+ this.group.innerHTML = '';
3009
+ },
3010
+
3011
+ appendShape: function (shape) {
3012
+ var vel = this['_draw' + shape.type].apply(this, shape.args);
3013
+ if (this.rendered) {
3014
+ this.group.insertAdjacentHTML('beforeEnd', vel);
3015
+ } else {
3016
+ this.prerender += vel;
3017
+ }
3018
+ this.lastShapeId = shape.id;
3019
+ return shape.id;
3020
+ },
3021
+
3022
+ replaceWithShape: function (shapeid, shape) {
3023
+ var existing = $('#jqsshape' + shapeid),
3024
+ vel = this['_draw' + shape.type].apply(this, shape.args);
3025
+ existing[0].outerHTML = vel;
3026
+ },
3027
+
3028
+ replaceWithShapes: function (shapeids, shapes) {
3029
+ // replace the first shapeid with all the new shapes then toast the remaining old shapes
3030
+ var existing = $('#jqsshape' + shapeids[0]),
3031
+ replace = '',
3032
+ slen = shapes.length,
3033
+ i;
3034
+ for (i = 0; i < slen; i++) {
3035
+ replace += this['_draw' + shapes[i].type].apply(this, shapes[i].args);
3036
+ }
3037
+ existing[0].outerHTML = replace;
3038
+ for (i = 1; i < shapeids.length; i++) {
3039
+ $('#jqsshape' + shapeids[i]).remove();
3040
+ }
3041
+ },
3042
+
3043
+ insertAfterShape: function (shapeid, shape) {
3044
+ var existing = $('#jqsshape' + shapeid),
3045
+ vel = this['_draw' + shape.type].apply(this, shape.args);
3046
+ existing[0].insertAdjacentHTML('afterEnd', vel);
3047
+ },
3048
+
3049
+ removeShapeId: function (shapeid) {
3050
+ var existing = $('#jqsshape' + shapeid);
3051
+ this.group.removeChild(existing[0]);
3052
+ },
3053
+
3054
+ getShapeAt: function (el, x, y) {
3055
+ var shapeid = el.id.substr(8);
3056
+ return shapeid;
3057
+ },
3058
+
3059
+ render: function () {
3060
+ if (!this.rendered) {
3061
+ // batch the intial render into a single repaint
3062
+ this.group.innerHTML = this.prerender;
3063
+ this.rendered = true;
3064
+ }
3065
+ }
3066
+ });
3067
+
3068
+ }))}(document, Math));