Social Media Share Buttons | MashShare - Version 3.5.4

Version Description

  • New: Support for Yoast custom variables e.g. %%title%%
  • New: Add sharedcount.com 10.000 free daily api requests
  • New: Switch from newsharecount to opensharecount.com to collect twitter shares
  • New: Collect twitter shares with social network add-on
Download this release

Release Info

Developer ReneHermi
Plugin Icon 128x128 Social Media Share Buttons | MashShare
Version 3.5.4
Comparing to
See all releases

Code changes from version 3.5.3 to 3.5.4

Files changed (257) hide show
  1. assets/css/fonts/mashsb-font.svg +77 -77
  2. assets/js/chosen.jquery.js +1284 -1284
  3. assets/js/chosen.jquery.min.js +1 -1
  4. includes/admin/admin-notices.php +3 -3
  5. includes/admin/meta-box/css/autocomplete.css +13 -13
  6. includes/admin/meta-box/css/checkbox.css +4 -4
  7. includes/admin/meta-box/css/color.css +7 -7
  8. includes/admin/meta-box/css/datepicker.css +231 -231
  9. includes/admin/meta-box/css/divider.css +6 -6
  10. includes/admin/meta-box/css/file.css +57 -57
  11. includes/admin/meta-box/css/heading.css +11 -11
  12. includes/admin/meta-box/css/image-advanced.css +43 -43
  13. includes/admin/meta-box/css/image-select.css +20 -20
  14. includes/admin/meta-box/css/image.css +66 -66
  15. includes/admin/meta-box/css/input-list.css +7 -7
  16. includes/admin/meta-box/css/jqueryui/jquery-ui-timepicker-addon.min.css +4 -4
  17. includes/admin/meta-box/css/jqueryui/jquery.ui.core.css +38 -38
  18. includes/admin/meta-box/css/jqueryui/jquery.ui.datepicker.css +67 -67
  19. includes/admin/meta-box/css/jqueryui/jquery.ui.slider.css +23 -23
  20. includes/admin/meta-box/css/jqueryui/jquery.ui.theme.css +248 -248
  21. includes/admin/meta-box/css/map.css +4 -4
  22. includes/admin/meta-box/css/media.css +81 -81
  23. includes/admin/meta-box/css/oembed.css +10 -10
  24. includes/admin/meta-box/css/plupload-image.css +24 -24
  25. includes/admin/meta-box/css/range.css +13 -13
  26. includes/admin/meta-box/css/select-advanced.css +7 -7
  27. includes/admin/meta-box/css/select-tree.css +7 -7
  28. includes/admin/meta-box/css/select.css +4 -4
  29. includes/admin/meta-box/css/select2/select2.css +483 -483
  30. includes/admin/meta-box/css/slider.css +12 -12
  31. includes/admin/meta-box/css/style-rtl.css +6 -6
  32. includes/admin/meta-box/css/upload.css +30 -30
  33. includes/admin/meta-box/css/wysiwyg.css +6 -6
  34. includes/admin/meta-box/inc/core.php +142 -142
  35. includes/admin/meta-box/inc/field.php +495 -495
  36. includes/admin/meta-box/inc/fields/autocomplete.php +120 -120
  37. includes/admin/meta-box/inc/fields/button.php +47 -47
  38. includes/admin/meta-box/inc/fields/checkbox-list.php +19 -19
  39. includes/admin/meta-box/inc/fields/checkbox.php +87 -87
  40. includes/admin/meta-box/inc/fields/choice.php +160 -160
  41. includes/admin/meta-box/inc/fields/color.php +85 -85
  42. includes/admin/meta-box/inc/fields/date.php +31 -31
  43. includes/admin/meta-box/inc/fields/datetime.php +264 -264
  44. includes/admin/meta-box/inc/fields/divider.php +43 -43
  45. includes/admin/meta-box/inc/fields/email.php +50 -50
  46. includes/admin/meta-box/inc/fields/fieldset-text.php +84 -84
  47. includes/admin/meta-box/inc/fields/file-advanced.php +43 -43
  48. includes/admin/meta-box/inc/fields/file-input.php +64 -64
  49. includes/admin/meta-box/inc/fields/file-upload.php +39 -39
  50. includes/admin/meta-box/inc/fields/heading.php +45 -45
  51. includes/admin/meta-box/inc/fields/hidden-data.php +28 -28
  52. includes/admin/meta-box/inc/fields/hidden.php +22 -22
  53. includes/admin/meta-box/inc/fields/image-advanced.php +90 -90
  54. includes/admin/meta-box/inc/fields/image-select.php +116 -116
  55. includes/admin/meta-box/inc/fields/image-upload.php +30 -30
  56. includes/admin/meta-box/inc/fields/input-list.php +91 -91
  57. includes/admin/meta-box/inc/fields/input.php +83 -83
  58. includes/admin/meta-box/inc/fields/key-value.php +149 -149
  59. includes/admin/meta-box/inc/fields/map.php +162 -162
  60. includes/admin/meta-box/inc/fields/media.php +152 -152
  61. includes/admin/meta-box/inc/fields/multiple-values.php +73 -73
  62. includes/admin/meta-box/inc/fields/number.php +47 -47
  63. includes/admin/meta-box/inc/fields/object-choice.php +145 -145
  64. includes/admin/meta-box/inc/fields/oembed.php +122 -122
  65. includes/admin/meta-box/inc/fields/password.php +34 -34
  66. includes/admin/meta-box/inc/fields/plupload-image.php +5 -5
  67. includes/admin/meta-box/inc/fields/post.php +132 -132
  68. includes/admin/meta-box/inc/fields/radio.php +19 -19
  69. includes/admin/meta-box/inc/fields/range.php +93 -93
  70. includes/admin/meta-box/inc/fields/select-advanced.php +102 -102
  71. includes/admin/meta-box/inc/fields/select-tree.php +64 -64
  72. includes/admin/meta-box/inc/fields/select.php +95 -95
  73. includes/admin/meta-box/inc/fields/slider.php +66 -66
  74. includes/admin/meta-box/inc/fields/taxonomy-advanced.php +89 -89
  75. includes/admin/meta-box/inc/fields/taxonomy.php +164 -164
  76. includes/admin/meta-box/inc/fields/text-list.php +91 -91
  77. includes/admin/meta-box/inc/fields/text.php +48 -48
  78. includes/admin/meta-box/inc/fields/textarea.php +79 -79
  79. includes/admin/meta-box/inc/fields/thickbox-image.php +79 -79
  80. includes/admin/meta-box/inc/fields/time.php +31 -31
  81. includes/admin/meta-box/inc/fields/url.php +37 -37
  82. includes/admin/meta-box/inc/fields/user.php +89 -89
  83. includes/admin/meta-box/inc/fields/wysiwyg.php +106 -106
  84. includes/admin/meta-box/inc/functions.php +136 -136
  85. includes/admin/meta-box/inc/helper.php +135 -135
  86. includes/admin/meta-box/inc/loader.php +132 -132
  87. includes/admin/meta-box/inc/meta-box.php +427 -427
  88. includes/admin/meta-box/inc/templates/image-advanced.php +22 -22
  89. includes/admin/meta-box/inc/templates/image-advanced_1.php +33 -33
  90. includes/admin/meta-box/inc/templates/media.php +49 -49
  91. includes/admin/meta-box/inc/templates/upload.php +9 -9
  92. includes/admin/meta-box/inc/validation.php +45 -45
  93. includes/admin/meta-box/inc/walkers/input-list-walker.php +70 -70
  94. includes/admin/meta-box/inc/walkers/select-tree-walker.php +75 -75
  95. includes/admin/meta-box/inc/walkers/select-walker.php +32 -32
  96. includes/admin/meta-box/inc/walkers/walker.php +34 -34
  97. includes/admin/meta-box/js/autocomplete.js +55 -55
  98. includes/admin/meta-box/js/autosave.js +19 -19
  99. includes/admin/meta-box/js/clone.js +211 -211
  100. includes/admin/meta-box/js/color.js +38 -38
  101. includes/admin/meta-box/js/date.js +57 -57
  102. includes/admin/meta-box/js/datetime.js +67 -67
  103. includes/admin/meta-box/js/file-input.js +42 -42
  104. includes/admin/meta-box/js/file-upload.js +199 -199
  105. includes/admin/meta-box/js/file.js +157 -157
  106. includes/admin/meta-box/js/image-advanced.js +36 -36
  107. includes/admin/meta-box/js/image-select.js +26 -26
  108. includes/admin/meta-box/js/image-upload.js +31 -31
  109. includes/admin/meta-box/js/image.js +25 -25
  110. includes/admin/meta-box/js/input-list.js +25 -25
  111. includes/admin/meta-box/js/jquery.validate.min.js +1 -1
  112. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-af.js +23 -23
  113. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ar-DZ.js +23 -23
  114. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ar.js +23 -23
  115. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-az.js +23 -23
  116. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-be.js +23 -23
  117. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-bg.js +24 -24
  118. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-bs.js +23 -23
  119. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ca.js +23 -23
  120. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-cs.js +23 -23
  121. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-cy-GB.js +23 -23
  122. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-da.js +23 -23
  123. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-de.js +23 -23
  124. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-el.js +23 -23
  125. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-en-AU.js +23 -23
  126. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-en-GB.js +23 -23
  127. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-en-NZ.js +23 -23
  128. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-eo.js +23 -23
  129. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-es.js +23 -23
  130. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-et.js +23 -23
  131. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-eu.js +23 -23
  132. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-fa.js +59 -59
  133. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-fi.js +23 -23
  134. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-fo.js +23 -23
  135. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-fr-CA.js +23 -23
  136. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-fr-CH.js +23 -23
  137. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-fr.js +25 -25
  138. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-gl.js +23 -23
  139. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-he.js +23 -23
  140. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-hi.js +23 -23
  141. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-hr.js +23 -23
  142. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-hu.js +23 -23
  143. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-hy.js +23 -23
  144. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-id.js +23 -23
  145. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-is.js +23 -23
  146. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-it.js +23 -23
  147. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ja.js +23 -23
  148. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ka.js +21 -21
  149. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-kk.js +23 -23
  150. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-km.js +23 -23
  151. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ko.js +23 -23
  152. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ky.js +24 -24
  153. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-lb.js +23 -23
  154. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-lt.js +23 -23
  155. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-lv.js +23 -23
  156. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-mk.js +23 -23
  157. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ml.js +23 -23
  158. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ms.js +23 -23
  159. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-nb.js +22 -22
  160. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-nl-BE.js +23 -23
  161. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-nl.js +23 -23
  162. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-nn.js +22 -22
  163. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-no.js +23 -23
  164. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-pl.js +23 -23
  165. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-pt-BR.js +23 -23
  166. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-pt.js +22 -22
  167. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-rm.js +21 -21
  168. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ro.js +26 -26
  169. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ru.js +23 -23
  170. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-sk.js +23 -23
  171. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-sl.js +24 -24
  172. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-sq.js +23 -23
  173. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-sr-SR.js +23 -23
  174. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-sr.js +23 -23
  175. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-sv.js +23 -23
  176. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ta.js +23 -23
  177. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-th.js +23 -23
  178. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-tj.js +23 -23
  179. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-tr.js +23 -23
  180. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-uk.js +24 -24
  181. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-vi.js +23 -23
  182. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-zh-CN.js +23 -23
  183. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-zh-HK.js +23 -23
  184. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-zh-TW.js +23 -23
  185. includes/admin/meta-box/js/jqueryui/jquery-ui-timepicker-addon-i18n.min.js +4 -4
  186. includes/admin/meta-box/js/jqueryui/jquery-ui-timepicker-addon.min.js +4 -4
  187. includes/admin/meta-box/js/map-frontend.js +71 -71
  188. includes/admin/meta-box/js/map.js +227 -227
  189. includes/admin/meta-box/js/media.js +451 -451
  190. includes/admin/meta-box/js/oembed.js +24 -24
  191. includes/admin/meta-box/js/range.js +23 -23
  192. includes/admin/meta-box/js/select-advanced.js +23 -23
  193. includes/admin/meta-box/js/select-tree.js +22 -22
  194. includes/admin/meta-box/js/select.js +84 -84
  195. includes/admin/meta-box/js/select2/i18n/ar.js +2 -2
  196. includes/admin/meta-box/js/select2/i18n/az.js +2 -2
  197. includes/admin/meta-box/js/select2/i18n/bg.js +2 -2
  198. includes/admin/meta-box/js/select2/i18n/ca.js +2 -2
  199. includes/admin/meta-box/js/select2/i18n/cs.js +2 -2
  200. includes/admin/meta-box/js/select2/i18n/da.js +2 -2
  201. includes/admin/meta-box/js/select2/i18n/de.js +2 -2
  202. includes/admin/meta-box/js/select2/i18n/en.js +2 -2
  203. includes/admin/meta-box/js/select2/i18n/es.js +2 -2
  204. includes/admin/meta-box/js/select2/i18n/et.js +2 -2
  205. includes/admin/meta-box/js/select2/i18n/eu.js +2 -2
  206. includes/admin/meta-box/js/select2/i18n/fa.js +2 -2
  207. includes/admin/meta-box/js/select2/i18n/fi.js +2 -2
  208. includes/admin/meta-box/js/select2/i18n/fr.js +2 -2
  209. includes/admin/meta-box/js/select2/i18n/gl.js +2 -2
  210. includes/admin/meta-box/js/select2/i18n/he.js +2 -2
  211. includes/admin/meta-box/js/select2/i18n/hi.js +2 -2
  212. includes/admin/meta-box/js/select2/i18n/hr.js +2 -2
  213. includes/admin/meta-box/js/select2/i18n/hu.js +2 -2
  214. includes/admin/meta-box/js/select2/i18n/id.js +2 -2
  215. includes/admin/meta-box/js/select2/i18n/is.js +2 -2
  216. includes/admin/meta-box/js/select2/i18n/it.js +2 -2
  217. includes/admin/meta-box/js/select2/i18n/ja.js +2 -2
  218. includes/admin/meta-box/js/select2/i18n/ko.js +2 -2
  219. includes/admin/meta-box/js/select2/i18n/lt.js +2 -2
  220. includes/admin/meta-box/js/select2/i18n/lv.js +2 -2
  221. includes/admin/meta-box/js/select2/i18n/mk.js +2 -2
  222. includes/admin/meta-box/js/select2/i18n/ms.js +2 -2
  223. includes/admin/meta-box/js/select2/i18n/nb.js +2 -2
  224. includes/admin/meta-box/js/select2/i18n/nl.js +2 -2
  225. includes/admin/meta-box/js/select2/i18n/pl.js +2 -2
  226. includes/admin/meta-box/js/select2/i18n/pt-BR.js +2 -2
  227. includes/admin/meta-box/js/select2/i18n/pt.js +2 -2
  228. includes/admin/meta-box/js/select2/i18n/ro.js +2 -2
  229. includes/admin/meta-box/js/select2/i18n/ru.js +2 -2
  230. includes/admin/meta-box/js/select2/i18n/sk.js +2 -2
  231. includes/admin/meta-box/js/select2/i18n/sr-Cyrl.js +2 -2
  232. includes/admin/meta-box/js/select2/i18n/sr.js +2 -2
  233. includes/admin/meta-box/js/select2/i18n/sv.js +2 -2
  234. includes/admin/meta-box/js/select2/i18n/th.js +2 -2
  235. includes/admin/meta-box/js/select2/i18n/tr.js +2 -2
  236. includes/admin/meta-box/js/select2/i18n/uk.js +2 -2
  237. includes/admin/meta-box/js/select2/i18n/vi.js +2 -2
  238. includes/admin/meta-box/js/select2/i18n/zh-CN.js +2 -2
  239. includes/admin/meta-box/js/select2/i18n/zh-TW.js +2 -2
  240. includes/admin/meta-box/js/select2/select2.min.js +1 -1
  241. includes/admin/meta-box/js/slider.js +39 -39
  242. includes/admin/meta-box/js/thickbox-image.js +37 -37
  243. includes/admin/meta-box/js/time.js +46 -46
  244. includes/admin/meta-box/js/validate.js +35 -35
  245. includes/admin/meta-box/js/wysiwyg.js +100 -100
  246. includes/admin/meta-box/readme.txt +552 -552
  247. includes/admin/settings/register-settings.php +18 -18
  248. includes/admin/welcome.php +2 -2
  249. includes/header-meta-tags.php +16 -17
  250. includes/mashengine.php +322 -306
  251. includes/sharedcount.class.php +215 -0
  252. includes/template-functions.php +21 -12
  253. languages/mashsb-en_US.po +806 -806
  254. languages/mashsb.po +489 -489
  255. mashshare.php +2 -2
  256. readme.txt +15 -4
  257. uninstall.php +1 -0
assets/css/fonts/mashsb-font.svg CHANGED
@@ -1,78 +1,78 @@
1
- <?xml version="1.0" standalone="no"?>
2
- <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3
- <svg xmlns="http://www.w3.org/2000/svg">
4
- <metadata>Copyright (C) 2016 by original authors @ fontello.com</metadata>
5
- <defs>
6
- <font id="mashsb-font" horiz-adv-x="1000" >
7
- <font-face font-family="mashsb-font" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" />
8
- <missing-glyph horiz-adv-x="1000" />
9
- <glyph glyph-name="facebook" unicode="&#xe800;" d="M535 843v-147h-87q-48 0-65-20t-17-60v-106h164l-22-165h-142v-424h-171v424h-142v165h142v122q0 104 58 161t155 57q82 0 127-7z" horiz-adv-x="571.4" />
10
-
11
- <glyph glyph-name="google" unicode="&#xe801;" d="M0 32q0 87 89 155t215 68l54 0q-42 40-42 86 0 29 16 58-10-1-29-1-104 0-170 65t-66 160q0 91 82 159t187 68l310 0-69-50-98 0q47-18 74-68t26-111q0-93-88-162-37-29-48-46t-11-42q0-19 27-48t54-49q61-43 85-88t23-113q0-90-82-157t-222-66q-133 0-225 50t-92 132z m112 33q0-69 59-118t145-48q119 0 173 44t53 117q0 19-4 32-3 11-7 21t-12 19-14 16-19 16-21 15-25 18-26 17q-39 12-77 12l-4 0q-87 0-153-47-68-48-68-114z m66 559q11-79 61-136t109-58l4 0q56 0 90 52 27 42 27 99 0 16-2 34-10 79-59 134t-110 57l-4 0q-57 0-91-51-27-41-27-98 0-16 2-33z" horiz-adv-x="646" />
12
-
13
- <glyph glyph-name="pinterest" unicode="&#xe802;" d="M0 350q4 213 150 356t350 144q219-4 358-149t142-351q-4-211-150-354t-350-146q-70 0-141 21 14 22 28 49 15 34 39 125 6 26 17 69 14-24 47-43 88-41 186 8 101 58 140 181 36 129-8 239t-158 160q-142 41-277-9t-187-171q-14-45-17-89t3-86 29-75 63-51q9-4 15 0 8 4 16 31t6 38q-2 3-8 13-41 67-27 140t60 124q72 64 169 70t165-53q37-42 48-103t0-116-38-105q-49-76-115-78-39 2-64 30t-14 66q3 21 23 84t22 94q-6 74-69 76-49-6-72-44t-26-87q6-57 18-78-21-88-33-141-4-14-22-84t-19-107l0-55q-139 64-219 187t-80 270z" horiz-adv-x="1000" />
14
-
15
- <glyph glyph-name="linkedin" unicode="&#xe803;" d="M0-150l0 1000 1000 0 0-1000-1000 0z m164 729q2-34 25-54t53-23l2 0q35 2 59 24t23 53q-2 33-25 53t-55 21q-35 0-58-22t-24-52z m8-569l144 0 0 434-144 0 0-434z m225 0l144 0 0 242q0 24 4 36 27 52 74 52 72-2 72-97l0-233 145 0 0 248q-2 98-47 149-47 47-119 49-53-2-86-26-21-15-43-47l0 61-144 0q1-18 1-70 0-90-1-364z" horiz-adv-x="1000" />
16
-
17
- <glyph glyph-name="digg" unicode="&#xe804;" d="M0 152l0 372q0 13 13 13l176 0 0 129q0 14 13 14l98 0 0-514q0-14-12-14l-288 0z m109 83l67 0q13 0 13 14l0 206-67 0q-13 0-13-14l0-206z m225-83l0 372q0 13 13 13l98 0 0-371q0-14-12-14l-99 0z m0 445l0 69q0 14 12 14l99 0 0-69q0-14-12-14l-99 0z m149-445l0 372q0 13 13 13l288 0 0-504q0-13-13-13l-288 0 1 69q0 14 12 14l176 0 0 49-189 0z m110 83l67 0q12 0 12 14l0 206-67 0q-12 0-12-14l0-206z m229-146q0 14 13 14l176 0 0 49-189 0 0 372q0 13 13 13l287 0 0-504q0-13-12-13l-288 0 0 69z m109 146l67 0q13 0 13 14l0 206-67 0q-13 0-13-14l0-206z" horiz-adv-x="1122" />
18
-
19
- <glyph glyph-name="reddit" unicode="&#xe805;" d="M0 353q0 62 50 106t112 44q62 0 105-36l5 0q134 82 335 82l5 4 70 267 242-36q0-1 2-1 1 0 0 1 2 1 12 16t14 18q34 32 82 32 49 0 83-32t33-82-33-84-83-35q-57 0-87 39t-30 96q-2-1-97 13t-110 17l-3 0q-2-2-16-53t-30-109-18-64l0-3 5-4q72 0 148-20t130-58l3-2q1 1 2 1t2 1q25 18 36 25t29 13 43 6q68 0 116-48t48-117q0-47-26-86t-70-60q0-195-260-303-41-18-56-23-32-10-91-19t-93-9q-120 0-231 35-2 2-72 38-95 51-152 116t-58 156l-5 0q-33 17-59 50l-9 12q-15 27-19 46t-4 50z m34-12q0-66 57-112 5 59 48 116t101 101q-37 26-82 26-49 0-86-40t-38-91z m102-146q0-54 31-104t80-85 102-60 105-34q75-14 146-14 123 0 233 39t185 123l-3 0q30 38 43 69t13 72q0 54-26 103t-70 84-92 61-100 38q-85 23-181 23-74 0-151-18t-150-54-119-99-46-144z m186 73q0 37 23 60t59 22 62-22 25-60q0-36-25-60t-62-24-59 24-23 60z m36-164l44 0q25-45 80-68t111-24q58 0 110 24t84 68l41 0q-25-62-93-96t-142-34q-72 0-141 35t-94 95z m336 164q0 38 23 60t61 22q34 0 58-24t24-58-24-59-58-25q-37 0-60 24t-24 60z m255 468q0-35 25-60t60-25q36 0 59 25t23 60q0 34-24 58t-58 24-59-24-26-58z m14-281q55-36 95-92t56-120q59 43 59 96 0 58-35 100t-93 42q-45 0-82-26z" horiz-adv-x="1205" />
20
-
21
- <glyph glyph-name="stumbleupon" unicode="&#xe806;" d="M0 143l0 181 224 0 0-179q0-28 20-48t49-21 50 20 20 49l0 423q0 117 87 200t205 82 206-83 86-201l0-92-134-40-89 42 0 80q0 29-20 49t-49 20-49-20-21-49l0-417q0-120-86-205t-206-84q-121 0-207 85t-86 208z m724-3l0 183 89-42 134 40 0-184q0-29 20-49t49-21 49 21 20 49l0 187 224 0 0-181q0-121-85-207t-207-86-207 85-86 205z" horiz-adv-x="1309" />
22
-
23
- <glyph glyph-name="twitter" unicode="&#xe807;" d="M0-37q30-3 60-3 176 0 314 108-82 1-147 50t-89 125q20-4 47-4 35 0 67 9-88 17-145 87t-58 160l0 3q53-30 115-31-52 34-82 90t-31 120q0 68 35 127 94-117 230-186t290-78q-7 33-7 58 0 104 74 178t179 74q109 0 184-80 87 18 160 62-28-91-110-140 73 9 144 40-48-75-125-131l0-33q0-101-29-202t-90-194-145-165-201-115-253-42q-209 0-387 113z" horiz-adv-x="1230" />
24
-
25
- <glyph glyph-name="mail" unicode="&#xe808;" d="M0 28v644q0 8 2 18l460-460q39-39 95-39 55 0 94 39l460 460q2-9 2-18v-644q0-37-26-62t-62-26h-937q-36 0-62 26t-26 62z m63 728q13 4 25 4h937q12 0 25-4l-463-463q-13-12-31-12t-30 12z" horiz-adv-x="1113.3" />
26
-
27
- <glyph glyph-name="vk" unicode="&#xe809;" d="M0 654q10 8 25 12 14 4 25 4l9 0q10 0 24-1 22-1 32-1 6 0 38 2 16 1 29 1t23-1q20-2 32-8 6-3 13-13t12-19 11-25 10-22q38-82 94-163 2-3 7-11t9-12 9-12 10-11 11-8 11-6 12 0q28 5 31 117 1 19 1 35 0 74-15 102-6 11-15 18t-25 12-23 10q14 28 50 37t96 9l53 0t26 0 27-3l22-6t20-9 12-14q9-18 11-42 0-7 1-14 0-20-3-52-4-42-4-52-3-23-3-46 0-18 2-38 4-44 30-61 9 1 17 4t15 11 11 12 13 16 10 14q47 62 94 163l9 23t12 26 12 20 15 13q16 7 38 7l9 0q20 0 46-2 32-2 47-2 9 0 28 1t32 2 30-1 25-6 14-13q3-6 3-13 0-29-35-87-17-29-34-52t-46-58-37-47q-2-2-14-18t-17-24-12-22-5-27q0-8 3-15t10-15 10-12 13-13 12-11q71-65 112-117 40-52 40-75 0-33-51-41-26-4-53-4-21 0-43 3-20 2-37 2-26 0-45-5l-6 0q-66 11-139 94-4 4-17 21t-22 25-23 17-27 6q-23-4-30-29t-9-59-10-49q-13-24-79-24-28 0-66 4-78 8-141 40t-101 68-81 92q-104 133-197 322-3 6-11 23t-12 25-9 24-8 28-3 26z" horiz-adv-x="1220" />
28
-
29
- <glyph glyph-name="print" unicode="&#xe80a;" d="M866 564c40 0 75-35 75-78l0-366c0-42-35-77-75-77l-76 0 34-153-691 0 27 153-82 0c-45 0-78 35-78 77l0 366c0 43 33 78 78 78l96 0 0 117 34 0 0 129 527 0 0-129 34 0 0-117 97 0z m-623 199l0-292 457 0 0 292-457 0z m-113-389c30 0 55 24 55 54 0 28-25 53-55 53-29 0-54-25-54-53 0-30 25-54 54-54z m63-438l567 0-47 242-484 0z m252 113l-139 0 0 35 139 0 0-35z m198 0l-139 0 0 35 139 0 0-35z" horiz-adv-x="941" />
30
-
31
- <glyph glyph-name="delicious" unicode="&#xe80b;" d="M0-150l0 501 501 0 0-501-501 0z m509 499l0 501 500 0 0-501-500 0z" horiz-adv-x="1009" />
32
-
33
- <glyph glyph-name="buffer" unicode="&#xe80c;" d="M0 88q11 15 32 26t49 20 40 15q19 0 34-4t33-15 25-13q47-21 260-119 19-4 36 0t39 18 24 14q20 9 77 35t87 39q4 2 42 21t60 24q13 2 28-1t23-7 23-13 18-11 16-6 18-8 11-11q3-4 4-14-10-13-31-24t-51-22-40-16q-43-20-128-62t-129-61q-7-3-21-12t-23-13-26-11-27-7-30 2l-264 123q-6 3-32 14t-51 22-54 24-46 24-22 16q-4 4-4 13z m0 268q11 15 32 25t50 20 41 15q19 0 34-4t35-15 25-14q42-19 127-58t127-59q19-5 37 0t39 17 25 14q68 32 160 72 11 5 32 17t38 19 36 11q16 3 32-1t37-17 23-13q5-3 16-6t18-8 11-11q3-5 4-14-10-14-31-25t-53-23-41-16q-48-23-135-65t-123-59q-7-3-26-14t-29-15-32-10-36 0q-214 101-260 122-6 3-44 19t-69 30-62 30-34 22q-4 4-4 14z m0 267q10 15 32 27t52 22 41 16l348 162q30 0 54-7t56-26 40-22q39-18 117-54t117-55q4-2 37-15t54-24 27-20q3-4 4-13-9-13-26-22t-43-19-35-14q-47-22-140-66t-139-67q-6-3-20-11t-23-12-25-11-27-6-28 1q-245 114-256 119-4 2-63 28t-102 46-48 30q-4 4-4 13z" horiz-adv-x="979" />
34
-
35
- <glyph glyph-name="heart" unicode="&#xe80d;" d="M500-79q-14 0-25 10l-348 336q-5 5-15 15t-31 37-38 54-30 67-13 77q0 123 71 192t196 70q34 0 70-12t67-33 54-38 42-38q20 20 42 38t54 38 67 33 70 12q125 0 196-70t71-192q0-123-128-251l-347-335q-10-10-25-10z" horiz-adv-x="1000" />
36
-
37
- <glyph glyph-name="weibo" unicode="&#xe80e;" d="M0 178q0 161 184 347 117 116 236 162 56 23 97 23 45 0 72-27 26-26 26-72 0-31-12-72-4-14 3-17t16-1l10 4q96 40 170 40t106-42q15-22 15-52 0-31-16-71-7-10-2-17t8-9 14-5q62-19 106-62t44-107q0-59-41-120t-111-113-178-84-229-33q-131 0-247 38t-194 116-77 174z m125-48q10-101 125-161 92-49 209-49 29 0 60 3 153 15 255 97 92 75 92 165 0 9-1 18-10 100-125 160-93 49-210 49-29 0-59-3-101-10-183-51t-126-101q-38-53-38-109 0-9 1-18z m160-62q-13 29-13 59 0 35 18 70 31 64 104 96 45 20 91 20 27 0 54-7 76-20 109-82 17-32 17-66 0-32-15-65-31-71-109-104-44-19-88-19-34 0-67 11-73 23-101 87z m56 19q6-25 30-35 13-6 27-6 12 0 24 4 28 9 43 33 10 16 10 32 0 7-3 15-6 24-30 34-13 5-26 5-12 0-25-4-27-9-41-32-11-16-11-33 0-7 2-13z m141 79q3-9 13-13 5-2 10-2t9 2q11 4 16 13t2 18-12 13q-9 3-19 0t-16-13q-3-6-3-12l0-6z m321 621q-1 5-1 10 0 13 8 25 10 16 29 21 34 7 68 7 51 0 100-15 83-27 143-93t78-153q7-35 7-68 0-51-16-98l0-1q-6-18-23-27-11-5-22-5-7 0-15 2-19 6-27 23-5 11-5 21 0 8 2 15l0 1q11 34 11 70 0 23-4 48-13 62-56 109t-102 66q-35 10-70 10-24 0-49-5-5-1-10-1-14 0-26 8-16 11-20 30z m40-157q-1 5-1 10 0 10 6 21 9 14 26 18 19 4 37 4 67 0 115-53 29-33 38-75 3-17 3-33 0-24-8-48-5-16-20-23-9-5-18-5-7 0-13 2-16 5-24 20-4 9-4 18 0 7 2 13 4 14 4 26 0 28-21 50-22 26-54 26-10 0-20-2-5-1-9-1-11 0-21 7-14 9-18 25z" horiz-adv-x="1235" />
38
-
39
- <glyph glyph-name="pocket" unicode="&#xe80f;" d="M2 520q-7 215 12 270 4 9 9 16t14 12 14 10 17 10 17 8q136 0 386 2t329 2l94 0t55 0 56-3 45-6 33-10q16-9 27-24t16-29 8-40 2-42-1-50 0-50q0-207-23-327t-96-213q-70-88-165-140t-193-62-200 11-186 73-151 134-96 181q-15 52-23 267z m232 2q-26-28 15-89t104-124q2-2 39-40t54-52 47-35 57-29q11-3 22-3t20 1 19 7 16 7 16 12 12 10 12 11l3 3q9 9 60 56t86 81 68 79 35 75q-15 40-38 56t-51 9-56-26-59-48-56-56-49-51-37-33q-27 16-73 60t-82 82-73 64-55 14q-25-15-56-41z" horiz-adv-x="1136" />
40
-
41
- <glyph glyph-name="xing" unicode="&#xe810;" d="M0 152l219 0 173 286-130 229-219 0 130-229z m362 90l346 608 232 0-345-608 222-392-232 0z" horiz-adv-x="940" />
42
-
43
- <glyph glyph-name="flattr" unicode="&#xe811;" d="M0-37l0 514q0 179 85 278t259 99l548 0q-5-5-52-53t-100-101-109-109-95-93-42-37q-15 0-15 16l0 156-48 0q-59 0-94-6t-63-26-39-57-12-96l0-262z m67-117q5 5 53 53t100 101 109 110 95 93 41 36q15 0 15-16l0-156 48 0q116 0 162 36t45 149l0 262 224 223 0-514q0-179-84-278t-260-99l-548 0z" horiz-adv-x="959" />
44
-
45
- <glyph glyph-name="odnoklassniki" unicode="&#xe812;" d="M1000 761v-824q0-36-26-62t-62-26h-824q-36 0-62 26t-26 62v824q0 36 26 62t62 26h824q36 0 62-26t26-62z m-295-216q0 87-59 150t-146 63-146-63-59-150 59-150 146-63 146 63 59 150z m22-279q0 26-17 45t-43 18q-15 0-28-8-70-36-140-36-69 0-138 36-16 7-28 7-25 0-42-18t-18-45q0-68 147-97l-117-121q-18-18-18-44t18-45 42-18 43 18l112 116 112-116q18-18 43-18t43 18 17 45-18 44l-117 121q147 30 147 98z m-142 279q0-36-24-62t-61-26-60 26-25 62 25 62 60 26 61-26 24-62z" horiz-adv-x="1000" />
46
-
47
- <glyph glyph-name="tumblr" unicode="&#xe813;" d="M0 440l0 142q60 20 101 55 41 33 67 86 26 51 35 127l143 0 0-253 237 0 0-157-237 0 0-256q0-86 9-112 9-24 34-39 34-20 76-20 77 0 151 49l0-157q-63-31-116-43-52-12-112-12-68 0-122 17-55 19-89 50-36 31-52 68-14 34-14 105l0 350-111 0z" horiz-adv-x="616" />
48
-
49
- <glyph glyph-name="whatsapp" unicode="&#xe814;" d="M952 362c0-244-198-441-444-441-78 0-151 20-214 55l-246-78 80 236c-41 67-64 144-64 228 0 243 199 440 444 440 246 0 444-197 444-440z m-444 370c-206 0-373-166-373-370 0-81 26-156 71-217l-47-138 144 45c59-38 129-61 205-61 206 0 374 166 374 371 0 204-168 370-374 370z m225-472c-3 5-10 7-21 13-11 5-65 31-75 35-10 4-17 5-24-5-7-11-28-36-35-43-6-7-12-8-23-3-11 6-46 17-88 54-32 29-54 64-60 75-7 11-1 17 4 22 5 5 11 13 17 19 5 6 7 11 11 18 3 7 1 13-1 19-3 5-25 58-34 80-9 22-18 18-24 18-7 0-14 1-21 1-7 0-19-3-29-14-10-10-38-37-38-90 0-53 39-104 44-111 6-8 75-120 186-163 111-44 111-29 131-27 20 1 64 26 73 51 9 25 9 47 7 51z" horiz-adv-x="1000" />
50
-
51
- <glyph glyph-name="meneame" unicode="&#xe815;" d="M508 378c-21-13-41-20-63-24-32-7-64-7-96-1-28 5-50 20-68 41-37 41-63 87-70 142-11 76 15 137 73 185 42 34 91 51 144 60 82 15 159-1 235-34 38-16 76-36 115-50 9-3 18-6 27-7 17-2 31 3 42 16 14 16 19 36 19 57 4 0 5-3 6-5 13-23 9-60-7-79-18-20-41-23-66-20-28 3-54 11-80 23-48 23-96 44-148 56-66 15-130 12-194-9-92-31-140-122-115-216 14-54 45-97 93-127 20-13 43-18 67-17 24 0 48 5 71 9 5 1 9 2 15 0z m97-462c-5 1-13-4-14 3-1 6 7 8 12 10 31 12 62 25 92 37 19 8 38 17 55 29 6 4 11 8 16 14 7 8 9 17 5 28-23 58-49 115-70 175-16 48-29 96-33 147-4 60 17 107 69 139 24 15 51 27 77 38 32 14 64 28 93 50 43 33 57 76 53 128-2 23-6 46-11 68 0 3-4 7 1 9 4 1 6-2 8-5 14-25 25-52 28-81 6-55-18-98-57-135-24-23-54-38-84-53-27-13-55-26-80-42-28-18-51-40-58-74-7-28-2-55 4-81 12-59 36-114 59-169 13-29 26-57 35-86 16-47 3-84-39-111-30-19-64-27-99-33-20-3-41-4-62-5z m-408 567c0-5-3-8-6-12-45-64-83-132-112-205-21-51-25-103-12-156 16-66 60-106 122-130 45-18 91-26 139-32 65-7 131-13 197-19 7-1 13-2 19-4 3-1 7-2 7-6-1-5-5-3-8-4-43-3-86-5-128-6-61-1-121-1-180 9-97 16-172 64-208 159-19 51-17 104-1 156 23 77 59 148 117 207 15 15 32 28 48 41 2 1 3 3 6 2z m165-353c68 12 137 18 205 10 33-4 39-11 40-44 1-52-6-104-21-154-3-8-6-16-11-23-2-3-4-7-8-5-4 1-3 5-4 8-1 23 3 45 5 67 3 31 8 63 5 95-1 10-5 16-14 21-27 12-55 16-84 19-35 4-71 3-106 6-2 0-5 0-7 0z" horiz-adv-x="1000" />
52
-
53
- <glyph glyph-name="managewp" unicode="&#xe816;" d="M779 604c0 0-12-237-175-199-111 32-92 160-92 160s-127-55-143-173c-3 95-127 159-127 159 29-35 51-121 23-186-41-96-121-118-121-118 55-149 187-256 356-256 215 0 356 164 356 380 0 87-29 168-77 233m-279 198c-250 0-452-202-452-452 0-250 202-452 452-452 250 0 452 202 452 452 0 250-202 452-452 452m0-863c-227 0-411 184-411 411 0 227 184 411 411 411 227 0 411-184 411-411 0-227-184-411-411-411" horiz-adv-x="1000" />
54
-
55
- <glyph glyph-name="thumbs-up" unicode="&#xe817;" d="M143 100q0 15-11 25t-25 11-25-11-11-25 11-25 25-11 25 11 11 25z m643 321q0 29-22 50t-50 22h-196q0 32 27 89t26 89q0 55-17 81t-72 27q-14-15-21-48t-17-70-33-61q-13-13-43-51-2-3-13-16t-18-23-19-24-22-25-22-19-22-15-20-6h-18v-357h18q7 0 18-1t18-4 21-6 20-7 20-6 16-6q118-41 191-41h67q107 0 107 93 0 15-2 31 16 9 26 30t10 41-10 38q29 28 29 67 0 14-5 31t-14 26q18 1 30 26t12 45z m71 1q0-50-27-91 5-18 5-38 0-43-21-81 1-12 1-24 0-56-33-99 0-78-48-123t-126-45h-72q-54 0-106 13t-121 36q-65 23-77 23h-161q-29 0-50 21t-21 50v357q0 30 21 51t50 21h153q20 13 77 86 32 42 60 72 13 14 19 48t17 70 35 60q22 21 50 21 47 0 84-18t57-57 20-104q0-51-27-107h98q58 0 101-42t42-100z" horiz-adv-x="857.1" />
56
-
57
- <glyph glyph-name="facebook-squared" unicode="&#xe818;" d="M696 779q67 0 114-48t47-113v-536q0-66-47-113t-114-48h-104v333h111l16 129h-127v83q0 31 13 46t51 16l68 1v115q-35 5-100 5-75 0-121-44t-45-127v-95h-112v-129h112v-333h-297q-67 0-114 48t-47 113v536q0 66 47 113t114 48h535z" horiz-adv-x="857.1" />
58
-
59
- <glyph glyph-name="mailru" unicode="&#xe819;" d="M542 418q0 60-29 94t-83 34q-35 0-69-17t-61-47-45-77-17-100q0-63 30-97t84-34q54 0 98 37t69 93 23 114z m315-68q0-62-20-110t-55-75-74-42-81-15q-3 0-8 0t-10-1q-53 0-79 30-15 18-18 46-29-37-74-61t-96-25q-90 0-140 54t-49 150q0 88 37 162t100 117 137 43q48 0 86-19t60-56l1 11 6 31q0 3 3 7t5 3h66q3 0 7-6 3-3 2-9l-67-343q-3-13-3-26 0-22 7-29t25-8q16 1 32 3t41 14 43 28 31 50 14 76q0 163-97 260t-260 97q-73 0-139-28t-114-76-76-114-29-139 29-139 76-113 114-77 139-28q127 0 226 80 6 5 13 5t12-7l23-27q4-7 4-14-2-7-7-12-57-46-127-72t-144-25q-87 0-167 34t-136 92-92 137-34 166 34 166 92 137 136 92 167 34q192 0 310-119t118-310z" horiz-adv-x="857.1" />
60
-
61
- <glyph glyph-name="line" unicode="&#xe81a;" d="M0 850h1000v-1000h-1000z m875-447c0 168-168 304-375 304s-375-136-375-304c0-150 133-276 314-300 12-3 28-8 33-19 4-9 2-24 1-34l-5-32c-2-9-8-37 32-20s216 127 295 218c54 59 80 120 80 187z m-522-100h-74c-11 0-20 9-20 20v149c0 11 9 20 20 20 11 0 19-9 19-20v-130h55c11 0 20-8 20-19 0-11-9-20-20-20z m77 20c0-11-9-20-19-20-11 0-20 9-20 20v149c0 11 9 20 20 20 10 0 19-9 19-20v-149z m180 0c0-9-6-16-14-19-2 0-4-1-6-1-6 0-12 3-16 8l-76 104v-92c0-11-9-20-20-20-11 0-19 9-19 20v149c0 8 5 16 13 19 2 0 4 1 6 1 6 0 12-3 16-8l76-104v92c0 11 9 20 20 20 11 0 20-9 20-20v-149z m120 94c11 0 20-9 20-20 0-10-9-19-20-19h-55v-35h55c11 0 20-9 20-20 0-11-9-20-20-20h-74c-11 0-20 9-20 20v149c0 11 9 20 20 20h74c11 0 20-9 20-20 0-11-9-20-20-20h-55v-35h55z" horiz-adv-x="1000" />
62
-
63
- <glyph glyph-name="yummly" unicode="&#xe81b;" d="M791 265c12-1 23 2 33 6 6 3 9 7 7 14-2 6-4 13-2 20 8 49 16 98 25 147 0 3 1 6 3 8 11 7 23 14 37 13 9-1 14-6 15-15 1-6 1-12 0-18-6-31-11-61-16-91-3-15-5-31-7-46-3-21 5-34 24-37 15-3 30-2 44 4 7 3 10 8 8 15-3 10-3 19-1 29 7 44 15 88 23 133 3 19 7 38 4 58-4 20-16 33-36 38-14 3-27 3-40-1-19-4-36-12-52-21-5-3-7-2-10 2-6 11-16 17-27 20-14 3-28 3-42-1-15-3-29-9-43-16-5-3-8-2-10 2-4 7-11 10-18 12-16 4-32 1-47-5-7-3-9-7-7-14 3-9 3-19 1-28-8-47-17-94-25-140-3-20-8-38-8-58 0-17 8-27 25-30 15-2 29-1 43 5 8 4 10 7 8 16-1 8-3 15-1 23 8 48 16 95 24 143 1 3 2 6 5 8 9 6 18 11 29 12 15 2 22-4 22-19 0-4 0-8-1-12-5-30-10-60-15-90-3-18-8-36-8-55-1-19 10-30 30-31 2 0 5 0 6 0z m-418 69c0-2 0-4 0-6 1-42 30-65 71-58 19 3 36 9 53 16 5 2 7 2 9-3 4-11 13-16 24-18 15-2 30 0 44 6 7 2 9 7 7 13-3 11-3 22-1 33 8 45 16 90 24 135 3 20 9 40 8 61 0 14-8 23-22 27-16 3-31 1-46-5-7-3-9-7-8-14 2-8 4-15 2-23-8-46-16-93-24-139-1-3-2-6-5-8-11-5-21-10-33-10-16-1-24 7-24 22 0 4 0 8 1 13 4 26 9 52 13 78 4 20 9 39 9 59-1 15-9 24-23 27-15 4-30 2-44-3-10-4-11-7-9-17 2-8 3-15 1-23-5-29-10-58-15-87-4-25-10-50-12-76z m601-100c-4 4-8 5-14 2-10-7-21-12-33-17-52-21-106-29-165-28-32-1-67 3-102 7-65 8-130 21-195 32-47 8-93 16-141 19-12 1-12 1-10 13 17 96 34 192 50 288 5 25 10 50 13 74 2 21-7 33-27 36-15 3-29 1-42-5-8-3-10-6-8-15 2-9 3-17 1-26-13-73-26-146-39-220-1-4-3-8-7-10-22-12-46-21-70-26-11-2-22-4-33-1-11 2-15 6-17 17-1 8 0 16 2 23 11 43 22 87 33 130 6 23 13 47 12 72-2 35-21 59-56 63-44 5-83-10-116-39-8-6-8-16-6-25 5-14 13-26 25-36 4-4 9-4 13 1 2 2 4 4 6 5 11 9 23 17 38 18 11 1 17-4 18-15 1-7-1-13-3-20-9-35-18-69-27-104-8-30-18-60-23-92-5-38 12-81 69-83 42-1 82 8 119 30 2 1 4 3 6 2 1-1 0-4 0-5-2-13-5-25-6-37-1-9-6-12-13-13-31-4-60-12-87-27-44-22-71-59-78-108-6-36 10-68 41-85 19-10 40-12 61-10 46 4 79 29 102 67 18 29 29 61 35 95 2 11 3 12 14 11 47-4 93-12 138-22 86-17 170-38 257-50 55-7 110-10 165-2 39 6 75 18 107 40 10 7 16 16 16 29-1 19-9 34-23 47z m-756-56c-6-23-13-46-27-66-7-10-16-16-27-19-17-4-28 6-29 23 1 16 8 30 20 40 16 16 36 23 58 28 4 1 6-1 5-6z" horiz-adv-x="1000" />
64
-
65
- <glyph glyph-name="frype" unicode="&#xe81c;" d="M420 188c3-18 7-29 14-35 8-8 18-10 31-12 16 2 27 5 34 16 4 7 7 17 9 31 1 13 2 35 5 60v1l-1 9-2 9-1 9-1 8-1 9-2 9-1 9-1 8-2 8-1 8-1 8v1l-1 7-1 7-2 7-1 6-1 6-2 6-2 8-2 9-2 9-3 10-2 10-3 11-2 10-3 11-2 11-1 11-2 11-1 12-1 11-1 11v11l1 11 1 11 1 11 3 11 3 10 5 10 5 10 3 4c-10 2-22 4-36 4-5 0-11 0-16-1-120-10-71-147-50-222 14-52 30-173 36-210z m14 448c5-1 10-1 15-1 25 0 41 13 50 33 6 14 8 31 8 50-1 15-3 30-8 42-10 24-28 41-55 41-3 0-7 0-10-1-34-5-49-40-48-82 1-40 17-74 48-82z m65-198c4-18 9-35 12-50 15-60 29-199 35-241 5-43 20-51 50-54 30 3 45 11 50 54 5 42 19 181 34 241 3 15 8 32 12 50 13 55 24 119 0 161-15 26-45 44-96 44-52 0-82-18-97-44-24-42-13-106 0-161z m96 221h1c46 0 68 43 68 95 0 53-22 96-68 96h-1c-47 0-69-43-69-96 0-52 22-95 69-95z m146-38c-14 0-26-2-36-4l3-4 5-10 5-10 3-10 3-11 2-11 1-11 0-11v-11l-1-11 0-11-2-12-1-11-2-11-3-11-2-11-2-10-2-11-3-10-2-10-3-9-2-9-2-8-1-6-2-6-1-6-1-7-2-7-1-6v-2l-1-8-2-8-1-8-1-8-1-9-2-9-1-9-1-8-1-9-1-9-1-9v0c2-26 4-48 5-61 1-14 4-24 8-31 7-11 18-14 34-16 13 2 23 4 31 12 7 6 11 17 14 35 6 37 22 158 37 210 20 75 69 212-51 222-5 1-10 1-16 1z m1 14c5 0 10 0 15 1 31 8 47 42 48 82 2 42-13 77-48 82-3 1-6 1-10 1-27 0-45-17-55-41-4-12-7-27-8-42 0-19 2-36 8-50 9-20 25-33 50-33z m144-62c223-3 353-139 205-326-67-86-182-171-334-226-7-3-15-5-22-8-14-4-29-9-43-13-33-9-65-17-96-24-34-6-66-11-97-15-22-2-44-4-65-4-141-4-248 35-283 118-42 100 43 238 213 343-126-50-354-169-364-340v-22c1-17 4-34 10-53 36-115 207-169 424-149 22 2 43 4 65 7 32 5 64 11 97 19 31 8 64 16 96 27 7 2 15 4 22 7 14 4 29 9 43 15 188 68 328 159 410 264 46 60 70 116 75 165v38c-13 124-158 197-356 177" horiz-adv-x="1242" />
66
-
67
- <glyph glyph-name="skype" unicode="&#xe81d;" d="M655 257q0 28-11 51t-27 38-41 27-46 19-49 13l-58 14q-17 4-25 6t-19 6-17 9-9 12-4 16q0 43 80 43 24 0 43-6t30-16 21-19 23-16 27-7q26 0 42 18t16 43q0 31-32 55t-79 38-101 13q-38 0-74-9t-67-26-49-48-19-72q0-34 10-60t32-42 44-27 58-18l81-20q51-12 63-20 18-11 18-34 0-21-23-36t-58-14q-29 0-51 9t-37 22-25 25-26 21-30 9q-28 0-42-17t-14-41q0-52 68-88t162-37q41 0 78 10t69 30 49 52 19 74z m202-121q0-89-63-152t-151-63q-73 0-131 45-43-9-83-9-80 0-153 31t-126 84-83 125-31 153q0 41 9 84-45 58-45 130 0 89 63 152t151 63q73 0 131-45 43 9 84 9 79 0 152-31t126-84 84-125 30-153q0-41-8-84 44-58 44-130z" horiz-adv-x="857.1" />
68
-
69
- <glyph glyph-name="share" unicode="&#xe81e;" d="M679 279q74 0 126-53t52-126-52-126-126-53-127 53-52 126q0 7 1 19l-201 100q-51-48-121-48-75 0-127 53t-52 126 52 126 127 53q70 0 121-48l201 100q-1 12-1 19 0 74 52 126t127 53 126-53 52-126-52-126-126-53q-71 0-122 48l-201-100q1-12 1-19t-1-19l201-100q51 48 122 48z" horiz-adv-x="857.1" />
70
-
71
- <glyph glyph-name="telegram" unicode="&#xe81f;" d="M364-1c-24 0-20 9-29 31l-72 225 557 313m-456-569c19 0 28 8 38 18l102 93-127 72m0 0l307-214c35-18 60-9 68 31l125 555c13 49-19 71-53 56l-732-267c-50-18-50-45-9-57l188-55 435 259c20 12 39 6 24-7" horiz-adv-x="1000" />
72
-
73
- <glyph glyph-name="hackernews" unicode="&#xe820;" d="M0 850l161 0 197-301q49-75 102-170 48 85 109 177l194 294 154 0-399-576 0-424-133 0 0 424z" horiz-adv-x="917" />
74
-
75
- <glyph glyph-name="flipboard" unicode="&#xe821;" d="M10 350v-490h163 163v163 163l163 1 163 1 1 163 1 163 163 1 163 1v162 162h-490-490v-490z" horiz-adv-x="1000" />
76
- </font>
77
- </defs>
78
</svg>
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3
+ <svg xmlns="http://www.w3.org/2000/svg">
4
+ <metadata>Copyright (C) 2016 by original authors @ fontello.com</metadata>
5
+ <defs>
6
+ <font id="mashsb-font" horiz-adv-x="1000" >
7
+ <font-face font-family="mashsb-font" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" />
8
+ <missing-glyph horiz-adv-x="1000" />
9
+ <glyph glyph-name="facebook" unicode="&#xe800;" d="M535 843v-147h-87q-48 0-65-20t-17-60v-106h164l-22-165h-142v-424h-171v424h-142v165h142v122q0 104 58 161t155 57q82 0 127-7z" horiz-adv-x="571.4" />
10
+
11
+ <glyph glyph-name="google" unicode="&#xe801;" d="M0 32q0 87 89 155t215 68l54 0q-42 40-42 86 0 29 16 58-10-1-29-1-104 0-170 65t-66 160q0 91 82 159t187 68l310 0-69-50-98 0q47-18 74-68t26-111q0-93-88-162-37-29-48-46t-11-42q0-19 27-48t54-49q61-43 85-88t23-113q0-90-82-157t-222-66q-133 0-225 50t-92 132z m112 33q0-69 59-118t145-48q119 0 173 44t53 117q0 19-4 32-3 11-7 21t-12 19-14 16-19 16-21 15-25 18-26 17q-39 12-77 12l-4 0q-87 0-153-47-68-48-68-114z m66 559q11-79 61-136t109-58l4 0q56 0 90 52 27 42 27 99 0 16-2 34-10 79-59 134t-110 57l-4 0q-57 0-91-51-27-41-27-98 0-16 2-33z" horiz-adv-x="646" />
12
+
13
+ <glyph glyph-name="pinterest" unicode="&#xe802;" d="M0 350q4 213 150 356t350 144q219-4 358-149t142-351q-4-211-150-354t-350-146q-70 0-141 21 14 22 28 49 15 34 39 125 6 26 17 69 14-24 47-43 88-41 186 8 101 58 140 181 36 129-8 239t-158 160q-142 41-277-9t-187-171q-14-45-17-89t3-86 29-75 63-51q9-4 15 0 8 4 16 31t6 38q-2 3-8 13-41 67-27 140t60 124q72 64 169 70t165-53q37-42 48-103t0-116-38-105q-49-76-115-78-39 2-64 30t-14 66q3 21 23 84t22 94q-6 74-69 76-49-6-72-44t-26-87q6-57 18-78-21-88-33-141-4-14-22-84t-19-107l0-55q-139 64-219 187t-80 270z" horiz-adv-x="1000" />
14
+
15
+ <glyph glyph-name="linkedin" unicode="&#xe803;" d="M0-150l0 1000 1000 0 0-1000-1000 0z m164 729q2-34 25-54t53-23l2 0q35 2 59 24t23 53q-2 33-25 53t-55 21q-35 0-58-22t-24-52z m8-569l144 0 0 434-144 0 0-434z m225 0l144 0 0 242q0 24 4 36 27 52 74 52 72-2 72-97l0-233 145 0 0 248q-2 98-47 149-47 47-119 49-53-2-86-26-21-15-43-47l0 61-144 0q1-18 1-70 0-90-1-364z" horiz-adv-x="1000" />
16
+
17
+ <glyph glyph-name="digg" unicode="&#xe804;" d="M0 152l0 372q0 13 13 13l176 0 0 129q0 14 13 14l98 0 0-514q0-14-12-14l-288 0z m109 83l67 0q13 0 13 14l0 206-67 0q-13 0-13-14l0-206z m225-83l0 372q0 13 13 13l98 0 0-371q0-14-12-14l-99 0z m0 445l0 69q0 14 12 14l99 0 0-69q0-14-12-14l-99 0z m149-445l0 372q0 13 13 13l288 0 0-504q0-13-13-13l-288 0 1 69q0 14 12 14l176 0 0 49-189 0z m110 83l67 0q12 0 12 14l0 206-67 0q-12 0-12-14l0-206z m229-146q0 14 13 14l176 0 0 49-189 0 0 372q0 13 13 13l287 0 0-504q0-13-12-13l-288 0 0 69z m109 146l67 0q13 0 13 14l0 206-67 0q-13 0-13-14l0-206z" horiz-adv-x="1122" />
18
+
19
+ <glyph glyph-name="reddit" unicode="&#xe805;" d="M0 353q0 62 50 106t112 44q62 0 105-36l5 0q134 82 335 82l5 4 70 267 242-36q0-1 2-1 1 0 0 1 2 1 12 16t14 18q34 32 82 32 49 0 83-32t33-82-33-84-83-35q-57 0-87 39t-30 96q-2-1-97 13t-110 17l-3 0q-2-2-16-53t-30-109-18-64l0-3 5-4q72 0 148-20t130-58l3-2q1 1 2 1t2 1q25 18 36 25t29 13 43 6q68 0 116-48t48-117q0-47-26-86t-70-60q0-195-260-303-41-18-56-23-32-10-91-19t-93-9q-120 0-231 35-2 2-72 38-95 51-152 116t-58 156l-5 0q-33 17-59 50l-9 12q-15 27-19 46t-4 50z m34-12q0-66 57-112 5 59 48 116t101 101q-37 26-82 26-49 0-86-40t-38-91z m102-146q0-54 31-104t80-85 102-60 105-34q75-14 146-14 123 0 233 39t185 123l-3 0q30 38 43 69t13 72q0 54-26 103t-70 84-92 61-100 38q-85 23-181 23-74 0-151-18t-150-54-119-99-46-144z m186 73q0 37 23 60t59 22 62-22 25-60q0-36-25-60t-62-24-59 24-23 60z m36-164l44 0q25-45 80-68t111-24q58 0 110 24t84 68l41 0q-25-62-93-96t-142-34q-72 0-141 35t-94 95z m336 164q0 38 23 60t61 22q34 0 58-24t24-58-24-59-58-25q-37 0-60 24t-24 60z m255 468q0-35 25-60t60-25q36 0 59 25t23 60q0 34-24 58t-58 24-59-24-26-58z m14-281q55-36 95-92t56-120q59 43 59 96 0 58-35 100t-93 42q-45 0-82-26z" horiz-adv-x="1205" />
20
+
21
+ <glyph glyph-name="stumbleupon" unicode="&#xe806;" d="M0 143l0 181 224 0 0-179q0-28 20-48t49-21 50 20 20 49l0 423q0 117 87 200t205 82 206-83 86-201l0-92-134-40-89 42 0 80q0 29-20 49t-49 20-49-20-21-49l0-417q0-120-86-205t-206-84q-121 0-207 85t-86 208z m724-3l0 183 89-42 134 40 0-184q0-29 20-49t49-21 49 21 20 49l0 187 224 0 0-181q0-121-85-207t-207-86-207 85-86 205z" horiz-adv-x="1309" />
22
+
23
+ <glyph glyph-name="twitter" unicode="&#xe807;" d="M0-37q30-3 60-3 176 0 314 108-82 1-147 50t-89 125q20-4 47-4 35 0 67 9-88 17-145 87t-58 160l0 3q53-30 115-31-52 34-82 90t-31 120q0 68 35 127 94-117 230-186t290-78q-7 33-7 58 0 104 74 178t179 74q109 0 184-80 87 18 160 62-28-91-110-140 73 9 144 40-48-75-125-131l0-33q0-101-29-202t-90-194-145-165-201-115-253-42q-209 0-387 113z" horiz-adv-x="1230" />
24
+
25
+ <glyph glyph-name="mail" unicode="&#xe808;" d="M0 28v644q0 8 2 18l460-460q39-39 95-39 55 0 94 39l460 460q2-9 2-18v-644q0-37-26-62t-62-26h-937q-36 0-62 26t-26 62z m63 728q13 4 25 4h937q12 0 25-4l-463-463q-13-12-31-12t-30 12z" horiz-adv-x="1113.3" />
26
+
27
+ <glyph glyph-name="vk" unicode="&#xe809;" d="M0 654q10 8 25 12 14 4 25 4l9 0q10 0 24-1 22-1 32-1 6 0 38 2 16 1 29 1t23-1q20-2 32-8 6-3 13-13t12-19 11-25 10-22q38-82 94-163 2-3 7-11t9-12 9-12 10-11 11-8 11-6 12 0q28 5 31 117 1 19 1 35 0 74-15 102-6 11-15 18t-25 12-23 10q14 28 50 37t96 9l53 0t26 0 27-3l22-6t20-9 12-14q9-18 11-42 0-7 1-14 0-20-3-52-4-42-4-52-3-23-3-46 0-18 2-38 4-44 30-61 9 1 17 4t15 11 11 12 13 16 10 14q47 62 94 163l9 23t12 26 12 20 15 13q16 7 38 7l9 0q20 0 46-2 32-2 47-2 9 0 28 1t32 2 30-1 25-6 14-13q3-6 3-13 0-29-35-87-17-29-34-52t-46-58-37-47q-2-2-14-18t-17-24-12-22-5-27q0-8 3-15t10-15 10-12 13-13 12-11q71-65 112-117 40-52 40-75 0-33-51-41-26-4-53-4-21 0-43 3-20 2-37 2-26 0-45-5l-6 0q-66 11-139 94-4 4-17 21t-22 25-23 17-27 6q-23-4-30-29t-9-59-10-49q-13-24-79-24-28 0-66 4-78 8-141 40t-101 68-81 92q-104 133-197 322-3 6-11 23t-12 25-9 24-8 28-3 26z" horiz-adv-x="1220" />
28
+
29
+ <glyph glyph-name="print" unicode="&#xe80a;" d="M866 564c40 0 75-35 75-78l0-366c0-42-35-77-75-77l-76 0 34-153-691 0 27 153-82 0c-45 0-78 35-78 77l0 366c0 43 33 78 78 78l96 0 0 117 34 0 0 129 527 0 0-129 34 0 0-117 97 0z m-623 199l0-292 457 0 0 292-457 0z m-113-389c30 0 55 24 55 54 0 28-25 53-55 53-29 0-54-25-54-53 0-30 25-54 54-54z m63-438l567 0-47 242-484 0z m252 113l-139 0 0 35 139 0 0-35z m198 0l-139 0 0 35 139 0 0-35z" horiz-adv-x="941" />
30
+
31
+ <glyph glyph-name="delicious" unicode="&#xe80b;" d="M0-150l0 501 501 0 0-501-501 0z m509 499l0 501 500 0 0-501-500 0z" horiz-adv-x="1009" />
32
+
33
+ <glyph glyph-name="buffer" unicode="&#xe80c;" d="M0 88q11 15 32 26t49 20 40 15q19 0 34-4t33-15 25-13q47-21 260-119 19-4 36 0t39 18 24 14q20 9 77 35t87 39q4 2 42 21t60 24q13 2 28-1t23-7 23-13 18-11 16-6 18-8 11-11q3-4 4-14-10-13-31-24t-51-22-40-16q-43-20-128-62t-129-61q-7-3-21-12t-23-13-26-11-27-7-30 2l-264 123q-6 3-32 14t-51 22-54 24-46 24-22 16q-4 4-4 13z m0 268q11 15 32 25t50 20 41 15q19 0 34-4t35-15 25-14q42-19 127-58t127-59q19-5 37 0t39 17 25 14q68 32 160 72 11 5 32 17t38 19 36 11q16 3 32-1t37-17 23-13q5-3 16-6t18-8 11-11q3-5 4-14-10-14-31-25t-53-23-41-16q-48-23-135-65t-123-59q-7-3-26-14t-29-15-32-10-36 0q-214 101-260 122-6 3-44 19t-69 30-62 30-34 22q-4 4-4 14z m0 267q10 15 32 27t52 22 41 16l348 162q30 0 54-7t56-26 40-22q39-18 117-54t117-55q4-2 37-15t54-24 27-20q3-4 4-13-9-13-26-22t-43-19-35-14q-47-22-140-66t-139-67q-6-3-20-11t-23-12-25-11-27-6-28 1q-245 114-256 119-4 2-63 28t-102 46-48 30q-4 4-4 13z" horiz-adv-x="979" />
34
+
35
+ <glyph glyph-name="heart" unicode="&#xe80d;" d="M500-79q-14 0-25 10l-348 336q-5 5-15 15t-31 37-38 54-30 67-13 77q0 123 71 192t196 70q34 0 70-12t67-33 54-38 42-38q20 20 42 38t54 38 67 33 70 12q125 0 196-70t71-192q0-123-128-251l-347-335q-10-10-25-10z" horiz-adv-x="1000" />
36
+
37
+ <glyph glyph-name="weibo" unicode="&#xe80e;" d="M0 178q0 161 184 347 117 116 236 162 56 23 97 23 45 0 72-27 26-26 26-72 0-31-12-72-4-14 3-17t16-1l10 4q96 40 170 40t106-42q15-22 15-52 0-31-16-71-7-10-2-17t8-9 14-5q62-19 106-62t44-107q0-59-41-120t-111-113-178-84-229-33q-131 0-247 38t-194 116-77 174z m125-48q10-101 125-161 92-49 209-49 29 0 60 3 153 15 255 97 92 75 92 165 0 9-1 18-10 100-125 160-93 49-210 49-29 0-59-3-101-10-183-51t-126-101q-38-53-38-109 0-9 1-18z m160-62q-13 29-13 59 0 35 18 70 31 64 104 96 45 20 91 20 27 0 54-7 76-20 109-82 17-32 17-66 0-32-15-65-31-71-109-104-44-19-88-19-34 0-67 11-73 23-101 87z m56 19q6-25 30-35 13-6 27-6 12 0 24 4 28 9 43 33 10 16 10 32 0 7-3 15-6 24-30 34-13 5-26 5-12 0-25-4-27-9-41-32-11-16-11-33 0-7 2-13z m141 79q3-9 13-13 5-2 10-2t9 2q11 4 16 13t2 18-12 13q-9 3-19 0t-16-13q-3-6-3-12l0-6z m321 621q-1 5-1 10 0 13 8 25 10 16 29 21 34 7 68 7 51 0 100-15 83-27 143-93t78-153q7-35 7-68 0-51-16-98l0-1q-6-18-23-27-11-5-22-5-7 0-15 2-19 6-27 23-5 11-5 21 0 8 2 15l0 1q11 34 11 70 0 23-4 48-13 62-56 109t-102 66q-35 10-70 10-24 0-49-5-5-1-10-1-14 0-26 8-16 11-20 30z m40-157q-1 5-1 10 0 10 6 21 9 14 26 18 19 4 37 4 67 0 115-53 29-33 38-75 3-17 3-33 0-24-8-48-5-16-20-23-9-5-18-5-7 0-13 2-16 5-24 20-4 9-4 18 0 7 2 13 4 14 4 26 0 28-21 50-22 26-54 26-10 0-20-2-5-1-9-1-11 0-21 7-14 9-18 25z" horiz-adv-x="1235" />
38
+
39
+ <glyph glyph-name="pocket" unicode="&#xe80f;" d="M2 520q-7 215 12 270 4 9 9 16t14 12 14 10 17 10 17 8q136 0 386 2t329 2l94 0t55 0 56-3 45-6 33-10q16-9 27-24t16-29 8-40 2-42-1-50 0-50q0-207-23-327t-96-213q-70-88-165-140t-193-62-200 11-186 73-151 134-96 181q-15 52-23 267z m232 2q-26-28 15-89t104-124q2-2 39-40t54-52 47-35 57-29q11-3 22-3t20 1 19 7 16 7 16 12 12 10 12 11l3 3q9 9 60 56t86 81 68 79 35 75q-15 40-38 56t-51 9-56-26-59-48-56-56-49-51-37-33q-27 16-73 60t-82 82-73 64-55 14q-25-15-56-41z" horiz-adv-x="1136" />
40
+
41
+ <glyph glyph-name="xing" unicode="&#xe810;" d="M0 152l219 0 173 286-130 229-219 0 130-229z m362 90l346 608 232 0-345-608 222-392-232 0z" horiz-adv-x="940" />
42
+
43
+ <glyph glyph-name="flattr" unicode="&#xe811;" d="M0-37l0 514q0 179 85 278t259 99l548 0q-5-5-52-53t-100-101-109-109-95-93-42-37q-15 0-15 16l0 156-48 0q-59 0-94-6t-63-26-39-57-12-96l0-262z m67-117q5 5 53 53t100 101 109 110 95 93 41 36q15 0 15-16l0-156 48 0q116 0 162 36t45 149l0 262 224 223 0-514q0-179-84-278t-260-99l-548 0z" horiz-adv-x="959" />
44
+
45
+ <glyph glyph-name="odnoklassniki" unicode="&#xe812;" d="M1000 761v-824q0-36-26-62t-62-26h-824q-36 0-62 26t-26 62v824q0 36 26 62t62 26h824q36 0 62-26t26-62z m-295-216q0 87-59 150t-146 63-146-63-59-150 59-150 146-63 146 63 59 150z m22-279q0 26-17 45t-43 18q-15 0-28-8-70-36-140-36-69 0-138 36-16 7-28 7-25 0-42-18t-18-45q0-68 147-97l-117-121q-18-18-18-44t18-45 42-18 43 18l112 116 112-116q18-18 43-18t43 18 17 45-18 44l-117 121q147 30 147 98z m-142 279q0-36-24-62t-61-26-60 26-25 62 25 62 60 26 61-26 24-62z" horiz-adv-x="1000" />
46
+
47
+ <glyph glyph-name="tumblr" unicode="&#xe813;" d="M0 440l0 142q60 20 101 55 41 33 67 86 26 51 35 127l143 0 0-253 237 0 0-157-237 0 0-256q0-86 9-112 9-24 34-39 34-20 76-20 77 0 151 49l0-157q-63-31-116-43-52-12-112-12-68 0-122 17-55 19-89 50-36 31-52 68-14 34-14 105l0 350-111 0z" horiz-adv-x="616" />
48
+
49
+ <glyph glyph-name="whatsapp" unicode="&#xe814;" d="M952 362c0-244-198-441-444-441-78 0-151 20-214 55l-246-78 80 236c-41 67-64 144-64 228 0 243 199 440 444 440 246 0 444-197 444-440z m-444 370c-206 0-373-166-373-370 0-81 26-156 71-217l-47-138 144 45c59-38 129-61 205-61 206 0 374 166 374 371 0 204-168 370-374 370z m225-472c-3 5-10 7-21 13-11 5-65 31-75 35-10 4-17 5-24-5-7-11-28-36-35-43-6-7-12-8-23-3-11 6-46 17-88 54-32 29-54 64-60 75-7 11-1 17 4 22 5 5 11 13 17 19 5 6 7 11 11 18 3 7 1 13-1 19-3 5-25 58-34 80-9 22-18 18-24 18-7 0-14 1-21 1-7 0-19-3-29-14-10-10-38-37-38-90 0-53 39-104 44-111 6-8 75-120 186-163 111-44 111-29 131-27 20 1 64 26 73 51 9 25 9 47 7 51z" horiz-adv-x="1000" />
50
+
51
+ <glyph glyph-name="meneame" unicode="&#xe815;" d="M508 378c-21-13-41-20-63-24-32-7-64-7-96-1-28 5-50 20-68 41-37 41-63 87-70 142-11 76 15 137 73 185 42 34 91 51 144 60 82 15 159-1 235-34 38-16 76-36 115-50 9-3 18-6 27-7 17-2 31 3 42 16 14 16 19 36 19 57 4 0 5-3 6-5 13-23 9-60-7-79-18-20-41-23-66-20-28 3-54 11-80 23-48 23-96 44-148 56-66 15-130 12-194-9-92-31-140-122-115-216 14-54 45-97 93-127 20-13 43-18 67-17 24 0 48 5 71 9 5 1 9 2 15 0z m97-462c-5 1-13-4-14 3-1 6 7 8 12 10 31 12 62 25 92 37 19 8 38 17 55 29 6 4 11 8 16 14 7 8 9 17 5 28-23 58-49 115-70 175-16 48-29 96-33 147-4 60 17 107 69 139 24 15 51 27 77 38 32 14 64 28 93 50 43 33 57 76 53 128-2 23-6 46-11 68 0 3-4 7 1 9 4 1 6-2 8-5 14-25 25-52 28-81 6-55-18-98-57-135-24-23-54-38-84-53-27-13-55-26-80-42-28-18-51-40-58-74-7-28-2-55 4-81 12-59 36-114 59-169 13-29 26-57 35-86 16-47 3-84-39-111-30-19-64-27-99-33-20-3-41-4-62-5z m-408 567c0-5-3-8-6-12-45-64-83-132-112-205-21-51-25-103-12-156 16-66 60-106 122-130 45-18 91-26 139-32 65-7 131-13 197-19 7-1 13-2 19-4 3-1 7-2 7-6-1-5-5-3-8-4-43-3-86-5-128-6-61-1-121-1-180 9-97 16-172 64-208 159-19 51-17 104-1 156 23 77 59 148 117 207 15 15 32 28 48 41 2 1 3 3 6 2z m165-353c68 12 137 18 205 10 33-4 39-11 40-44 1-52-6-104-21-154-3-8-6-16-11-23-2-3-4-7-8-5-4 1-3 5-4 8-1 23 3 45 5 67 3 31 8 63 5 95-1 10-5 16-14 21-27 12-55 16-84 19-35 4-71 3-106 6-2 0-5 0-7 0z" horiz-adv-x="1000" />
52
+
53
+ <glyph glyph-name="managewp" unicode="&#xe816;" d="M779 604c0 0-12-237-175-199-111 32-92 160-92 160s-127-55-143-173c-3 95-127 159-127 159 29-35 51-121 23-186-41-96-121-118-121-118 55-149 187-256 356-256 215 0 356 164 356 380 0 87-29 168-77 233m-279 198c-250 0-452-202-452-452 0-250 202-452 452-452 250 0 452 202 452 452 0 250-202 452-452 452m0-863c-227 0-411 184-411 411 0 227 184 411 411 411 227 0 411-184 411-411 0-227-184-411-411-411" horiz-adv-x="1000" />
54
+
55
+ <glyph glyph-name="thumbs-up" unicode="&#xe817;" d="M143 100q0 15-11 25t-25 11-25-11-11-25 11-25 25-11 25 11 11 25z m643 321q0 29-22 50t-50 22h-196q0 32 27 89t26 89q0 55-17 81t-72 27q-14-15-21-48t-17-70-33-61q-13-13-43-51-2-3-13-16t-18-23-19-24-22-25-22-19-22-15-20-6h-18v-357h18q7 0 18-1t18-4 21-6 20-7 20-6 16-6q118-41 191-41h67q107 0 107 93 0 15-2 31 16 9 26 30t10 41-10 38q29 28 29 67 0 14-5 31t-14 26q18 1 30 26t12 45z m71 1q0-50-27-91 5-18 5-38 0-43-21-81 1-12 1-24 0-56-33-99 0-78-48-123t-126-45h-72q-54 0-106 13t-121 36q-65 23-77 23h-161q-29 0-50 21t-21 50v357q0 30 21 51t50 21h153q20 13 77 86 32 42 60 72 13 14 19 48t17 70 35 60q22 21 50 21 47 0 84-18t57-57 20-104q0-51-27-107h98q58 0 101-42t42-100z" horiz-adv-x="857.1" />
56
+
57
+ <glyph glyph-name="facebook-squared" unicode="&#xe818;" d="M696 779q67 0 114-48t47-113v-536q0-66-47-113t-114-48h-104v333h111l16 129h-127v83q0 31 13 46t51 16l68 1v115q-35 5-100 5-75 0-121-44t-45-127v-95h-112v-129h112v-333h-297q-67 0-114 48t-47 113v536q0 66 47 113t114 48h535z" horiz-adv-x="857.1" />
58
+
59
+ <glyph glyph-name="mailru" unicode="&#xe819;" d="M542 418q0 60-29 94t-83 34q-35 0-69-17t-61-47-45-77-17-100q0-63 30-97t84-34q54 0 98 37t69 93 23 114z m315-68q0-62-20-110t-55-75-74-42-81-15q-3 0-8 0t-10-1q-53 0-79 30-15 18-18 46-29-37-74-61t-96-25q-90 0-140 54t-49 150q0 88 37 162t100 117 137 43q48 0 86-19t60-56l1 11 6 31q0 3 3 7t5 3h66q3 0 7-6 3-3 2-9l-67-343q-3-13-3-26 0-22 7-29t25-8q16 1 32 3t41 14 43 28 31 50 14 76q0 163-97 260t-260 97q-73 0-139-28t-114-76-76-114-29-139 29-139 76-113 114-77 139-28q127 0 226 80 6 5 13 5t12-7l23-27q4-7 4-14-2-7-7-12-57-46-127-72t-144-25q-87 0-167 34t-136 92-92 137-34 166 34 166 92 137 136 92 167 34q192 0 310-119t118-310z" horiz-adv-x="857.1" />
60
+
61
+ <glyph glyph-name="line" unicode="&#xe81a;" d="M0 850h1000v-1000h-1000z m875-447c0 168-168 304-375 304s-375-136-375-304c0-150 133-276 314-300 12-3 28-8 33-19 4-9 2-24 1-34l-5-32c-2-9-8-37 32-20s216 127 295 218c54 59 80 120 80 187z m-522-100h-74c-11 0-20 9-20 20v149c0 11 9 20 20 20 11 0 19-9 19-20v-130h55c11 0 20-8 20-19 0-11-9-20-20-20z m77 20c0-11-9-20-19-20-11 0-20 9-20 20v149c0 11 9 20 20 20 10 0 19-9 19-20v-149z m180 0c0-9-6-16-14-19-2 0-4-1-6-1-6 0-12 3-16 8l-76 104v-92c0-11-9-20-20-20-11 0-19 9-19 20v149c0 8 5 16 13 19 2 0 4 1 6 1 6 0 12-3 16-8l76-104v92c0 11 9 20 20 20 11 0 20-9 20-20v-149z m120 94c11 0 20-9 20-20 0-10-9-19-20-19h-55v-35h55c11 0 20-9 20-20 0-11-9-20-20-20h-74c-11 0-20 9-20 20v149c0 11 9 20 20 20h74c11 0 20-9 20-20 0-11-9-20-20-20h-55v-35h55z" horiz-adv-x="1000" />
62
+
63
+ <glyph glyph-name="yummly" unicode="&#xe81b;" d="M791 265c12-1 23 2 33 6 6 3 9 7 7 14-2 6-4 13-2 20 8 49 16 98 25 147 0 3 1 6 3 8 11 7 23 14 37 13 9-1 14-6 15-15 1-6 1-12 0-18-6-31-11-61-16-91-3-15-5-31-7-46-3-21 5-34 24-37 15-3 30-2 44 4 7 3 10 8 8 15-3 10-3 19-1 29 7 44 15 88 23 133 3 19 7 38 4 58-4 20-16 33-36 38-14 3-27 3-40-1-19-4-36-12-52-21-5-3-7-2-10 2-6 11-16 17-27 20-14 3-28 3-42-1-15-3-29-9-43-16-5-3-8-2-10 2-4 7-11 10-18 12-16 4-32 1-47-5-7-3-9-7-7-14 3-9 3-19 1-28-8-47-17-94-25-140-3-20-8-38-8-58 0-17 8-27 25-30 15-2 29-1 43 5 8 4 10 7 8 16-1 8-3 15-1 23 8 48 16 95 24 143 1 3 2 6 5 8 9 6 18 11 29 12 15 2 22-4 22-19 0-4 0-8-1-12-5-30-10-60-15-90-3-18-8-36-8-55-1-19 10-30 30-31 2 0 5 0 6 0z m-418 69c0-2 0-4 0-6 1-42 30-65 71-58 19 3 36 9 53 16 5 2 7 2 9-3 4-11 13-16 24-18 15-2 30 0 44 6 7 2 9 7 7 13-3 11-3 22-1 33 8 45 16 90 24 135 3 20 9 40 8 61 0 14-8 23-22 27-16 3-31 1-46-5-7-3-9-7-8-14 2-8 4-15 2-23-8-46-16-93-24-139-1-3-2-6-5-8-11-5-21-10-33-10-16-1-24 7-24 22 0 4 0 8 1 13 4 26 9 52 13 78 4 20 9 39 9 59-1 15-9 24-23 27-15 4-30 2-44-3-10-4-11-7-9-17 2-8 3-15 1-23-5-29-10-58-15-87-4-25-10-50-12-76z m601-100c-4 4-8 5-14 2-10-7-21-12-33-17-52-21-106-29-165-28-32-1-67 3-102 7-65 8-130 21-195 32-47 8-93 16-141 19-12 1-12 1-10 13 17 96 34 192 50 288 5 25 10 50 13 74 2 21-7 33-27 36-15 3-29 1-42-5-8-3-10-6-8-15 2-9 3-17 1-26-13-73-26-146-39-220-1-4-3-8-7-10-22-12-46-21-70-26-11-2-22-4-33-1-11 2-15 6-17 17-1 8 0 16 2 23 11 43 22 87 33 130 6 23 13 47 12 72-2 35-21 59-56 63-44 5-83-10-116-39-8-6-8-16-6-25 5-14 13-26 25-36 4-4 9-4 13 1 2 2 4 4 6 5 11 9 23 17 38 18 11 1 17-4 18-15 1-7-1-13-3-20-9-35-18-69-27-104-8-30-18-60-23-92-5-38 12-81 69-83 42-1 82 8 119 30 2 1 4 3 6 2 1-1 0-4 0-5-2-13-5-25-6-37-1-9-6-12-13-13-31-4-60-12-87-27-44-22-71-59-78-108-6-36 10-68 41-85 19-10 40-12 61-10 46 4 79 29 102 67 18 29 29 61 35 95 2 11 3 12 14 11 47-4 93-12 138-22 86-17 170-38 257-50 55-7 110-10 165-2 39 6 75 18 107 40 10 7 16 16 16 29-1 19-9 34-23 47z m-756-56c-6-23-13-46-27-66-7-10-16-16-27-19-17-4-28 6-29 23 1 16 8 30 20 40 16 16 36 23 58 28 4 1 6-1 5-6z" horiz-adv-x="1000" />
64
+
65
+ <glyph glyph-name="frype" unicode="&#xe81c;" d="M420 188c3-18 7-29 14-35 8-8 18-10 31-12 16 2 27 5 34 16 4 7 7 17 9 31 1 13 2 35 5 60v1l-1 9-2 9-1 9-1 8-1 9-2 9-1 9-1 8-2 8-1 8-1 8v1l-1 7-1 7-2 7-1 6-1 6-2 6-2 8-2 9-2 9-3 10-2 10-3 11-2 10-3 11-2 11-1 11-2 11-1 12-1 11-1 11v11l1 11 1 11 1 11 3 11 3 10 5 10 5 10 3 4c-10 2-22 4-36 4-5 0-11 0-16-1-120-10-71-147-50-222 14-52 30-173 36-210z m14 448c5-1 10-1 15-1 25 0 41 13 50 33 6 14 8 31 8 50-1 15-3 30-8 42-10 24-28 41-55 41-3 0-7 0-10-1-34-5-49-40-48-82 1-40 17-74 48-82z m65-198c4-18 9-35 12-50 15-60 29-199 35-241 5-43 20-51 50-54 30 3 45 11 50 54 5 42 19 181 34 241 3 15 8 32 12 50 13 55 24 119 0 161-15 26-45 44-96 44-52 0-82-18-97-44-24-42-13-106 0-161z m96 221h1c46 0 68 43 68 95 0 53-22 96-68 96h-1c-47 0-69-43-69-96 0-52 22-95 69-95z m146-38c-14 0-26-2-36-4l3-4 5-10 5-10 3-10 3-11 2-11 1-11 0-11v-11l-1-11 0-11-2-12-1-11-2-11-3-11-2-11-2-10-2-11-3-10-2-10-3-9-2-9-2-8-1-6-2-6-1-6-1-7-2-7-1-6v-2l-1-8-2-8-1-8-1-8-1-9-2-9-1-9-1-8-1-9-1-9-1-9v0c2-26 4-48 5-61 1-14 4-24 8-31 7-11 18-14 34-16 13 2 23 4 31 12 7 6 11 17 14 35 6 37 22 158 37 210 20 75 69 212-51 222-5 1-10 1-16 1z m1 14c5 0 10 0 15 1 31 8 47 42 48 82 2 42-13 77-48 82-3 1-6 1-10 1-27 0-45-17-55-41-4-12-7-27-8-42 0-19 2-36 8-50 9-20 25-33 50-33z m144-62c223-3 353-139 205-326-67-86-182-171-334-226-7-3-15-5-22-8-14-4-29-9-43-13-33-9-65-17-96-24-34-6-66-11-97-15-22-2-44-4-65-4-141-4-248 35-283 118-42 100 43 238 213 343-126-50-354-169-364-340v-22c1-17 4-34 10-53 36-115 207-169 424-149 22 2 43 4 65 7 32 5 64 11 97 19 31 8 64 16 96 27 7 2 15 4 22 7 14 4 29 9 43 15 188 68 328 159 410 264 46 60 70 116 75 165v38c-13 124-158 197-356 177" horiz-adv-x="1242" />
66
+
67
+ <glyph glyph-name="skype" unicode="&#xe81d;" d="M655 257q0 28-11 51t-27 38-41 27-46 19-49 13l-58 14q-17 4-25 6t-19 6-17 9-9 12-4 16q0 43 80 43 24 0 43-6t30-16 21-19 23-16 27-7q26 0 42 18t16 43q0 31-32 55t-79 38-101 13q-38 0-74-9t-67-26-49-48-19-72q0-34 10-60t32-42 44-27 58-18l81-20q51-12 63-20 18-11 18-34 0-21-23-36t-58-14q-29 0-51 9t-37 22-25 25-26 21-30 9q-28 0-42-17t-14-41q0-52 68-88t162-37q41 0 78 10t69 30 49 52 19 74z m202-121q0-89-63-152t-151-63q-73 0-131 45-43-9-83-9-80 0-153 31t-126 84-83 125-31 153q0 41 9 84-45 58-45 130 0 89 63 152t151 63q73 0 131-45 43 9 84 9 79 0 152-31t126-84 84-125 30-153q0-41-8-84 44-58 44-130z" horiz-adv-x="857.1" />
68
+
69
+ <glyph glyph-name="share" unicode="&#xe81e;" d="M679 279q74 0 126-53t52-126-52-126-126-53-127 53-52 126q0 7 1 19l-201 100q-51-48-121-48-75 0-127 53t-52 126 52 126 127 53q70 0 121-48l201 100q-1 12-1 19 0 74 52 126t127 53 126-53 52-126-52-126-126-53q-71 0-122 48l-201-100q1-12 1-19t-1-19l201-100q51 48 122 48z" horiz-adv-x="857.1" />
70
+
71
+ <glyph glyph-name="telegram" unicode="&#xe81f;" d="M364-1c-24 0-20 9-29 31l-72 225 557 313m-456-569c19 0 28 8 38 18l102 93-127 72m0 0l307-214c35-18 60-9 68 31l125 555c13 49-19 71-53 56l-732-267c-50-18-50-45-9-57l188-55 435 259c20 12 39 6 24-7" horiz-adv-x="1000" />
72
+
73
+ <glyph glyph-name="hackernews" unicode="&#xe820;" d="M0 850l161 0 197-301q49-75 102-170 48 85 109 177l194 294 154 0-399-576 0-424-133 0 0 424z" horiz-adv-x="917" />
74
+
75
+ <glyph glyph-name="flipboard" unicode="&#xe821;" d="M10 350v-490h163 163v163 163l163 1 163 1 1 163 1 163 163 1 163 1v162 162h-490-490v-490z" horiz-adv-x="1000" />
76
+ </font>
77
+ </defs>
78
</svg>
assets/js/chosen.jquery.js CHANGED
@@ -1,1284 +1,1284 @@
1
- /*!
2
- Chosen, a Select Box Enhancer for jQuery and Prototype
3
- by Patrick Filler for Harvest, http://getharvest.com
4
-
5
- Version 1.5.1
6
- Full source at https://github.com/harvesthq/chosen
7
- Copyright (c) 2011-2016 Harvest http://getharvest.com
8
-
9
- MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
10
- This file is generated by `grunt build`, do not edit it by hand.
11
- */
12
-
13
- (function() {
14
- var $, AbstractChosen, Chosen, SelectParser, _ref,
15
- __hasProp = {}.hasOwnProperty,
16
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
17
-
18
- SelectParser = (function() {
19
- function SelectParser() {
20
- this.options_index = 0;
21
- this.parsed = [];
22
- }
23
-
24
- SelectParser.prototype.add_node = function(child) {
25
- if (child.nodeName.toUpperCase() === "OPTGROUP") {
26
- return this.add_group(child);
27
- } else {
28
- return this.add_option(child);
29
- }
30
- };
31
-
32
- SelectParser.prototype.add_group = function(group) {
33
- var group_position, option, _i, _len, _ref, _results;
34
- group_position = this.parsed.length;
35
- this.parsed.push({
36
- array_index: group_position,
37
- group: true,
38
- label: this.escapeExpression(group.label),
39
- title: group.title ? group.title : void 0,
40
- children: 0,
41
- disabled: group.disabled,
42
- classes: group.className
43
- });
44
- _ref = group.childNodes;
45
- _results = [];
46
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
47
- option = _ref[_i];
48
- _results.push(this.add_option(option, group_position, group.disabled));
49
- }
50
- return _results;
51
- };
52
-
53
- SelectParser.prototype.add_option = function(option, group_position, group_disabled) {
54
- if (option.nodeName.toUpperCase() === "OPTION") {
55
- if (option.text !== "") {
56
- if (group_position != null) {
57
- this.parsed[group_position].children += 1;
58
- }
59
- this.parsed.push({
60
- array_index: this.parsed.length,
61
- options_index: this.options_index,
62
- value: option.value,
63
- text: option.text,
64
- html: option.innerHTML,
65
- title: option.title ? option.title : void 0,
66
- selected: option.selected,
67
- disabled: group_disabled === true ? group_disabled : option.disabled,
68
- group_array_index: group_position,
69
- group_label: group_position != null ? this.parsed[group_position].label : null,
70
- classes: option.className,
71
- style: option.style.cssText
72
- });
73
- } else {
74
- this.parsed.push({
75
- array_index: this.parsed.length,
76
- options_index: this.options_index,
77
- empty: true
78
- });
79
- }
80
- return this.options_index += 1;
81
- }
82
- };
83
-
84
- SelectParser.prototype.escapeExpression = function(text) {
85
- var map, unsafe_chars;
86
- if ((text == null) || text === false) {
87
- return "";
88
- }
89
- if (!/[\&\<\>\"\'\`]/.test(text)) {
90
- return text;
91
- }
92
- map = {
93
- "<": "&lt;",
94
- ">": "&gt;",
95
- '"': "&quot;",
96
- "'": "&#x27;",
97
- "`": "&#x60;"
98
- };
99
- unsafe_chars = /&(?!\w+;)|[\<\>\"\'\`]/g;
100
- return text.replace(unsafe_chars, function(chr) {
101
- return map[chr] || "&amp;";
102
- });
103
- };
104
-
105
- return SelectParser;
106
-
107
- })();
108
-
109
- SelectParser.select_to_array = function(select) {
110
- var child, parser, _i, _len, _ref;
111
- parser = new SelectParser();
112
- _ref = select.childNodes;
113
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
114
- child = _ref[_i];
115
- parser.add_node(child);
116
- }
117
- return parser.parsed;
118
- };
119
-
120
- AbstractChosen = (function() {
121
- function AbstractChosen(form_field, options) {
122
- this.form_field = form_field;
123
- this.options = options != null ? options : {};
124
- if (!AbstractChosen.browser_is_supported()) {
125
- return;
126
- }
127
- this.is_multiple = this.form_field.multiple;
128
- this.set_default_text();
129
- this.set_default_values();
130
- this.setup();
131
- this.set_up_html();
132
- this.register_observers();
133
- this.on_ready();
134
- }
135
-
136
- AbstractChosen.prototype.set_default_values = function() {
137
- var _this = this;
138
- this.click_test_action = function(evt) {
139
- return _this.test_active_click(evt);
140
- };
141
- this.activate_action = function(evt) {
142
- return _this.activate_field(evt);
143
- };
144
- this.active_field = false;
145
- this.mouse_on_container = false;
146
- this.results_showing = false;
147
- this.result_highlighted = null;
148
- this.allow_single_deselect = (this.options.allow_single_deselect != null) && (this.form_field.options[0] != null) && this.form_field.options[0].text === "" ? this.options.allow_single_deselect : false;
149
- this.disable_search_threshold = this.options.disable_search_threshold || 0;
150
- this.disable_search = this.options.disable_search || false;
151
- this.enable_split_word_search = this.options.enable_split_word_search != null ? this.options.enable_split_word_search : true;
152
- this.group_search = this.options.group_search != null ? this.options.group_search : true;
153
- this.search_contains = this.options.search_contains || false;
154
- this.single_backstroke_delete = this.options.single_backstroke_delete != null ? this.options.single_backstroke_delete : true;
155
- this.max_selected_options = this.options.max_selected_options || Infinity;
156
- this.inherit_select_classes = this.options.inherit_select_classes || false;
157
- this.display_selected_options = this.options.display_selected_options != null ? this.options.display_selected_options : true;
158
- this.display_disabled_options = this.options.display_disabled_options != null ? this.options.display_disabled_options : true;
159
- this.include_group_label_in_selected = this.options.include_group_label_in_selected || false;
160
- return this.max_shown_results = this.options.max_shown_results || Number.POSITIVE_INFINITY;
161
- };
162
-
163
- AbstractChosen.prototype.set_default_text = function() {
164
- if (this.form_field.getAttribute("data-placeholder")) {
165
- this.default_text = this.form_field.getAttribute("data-placeholder");
166
- } else if (this.is_multiple) {
167
- this.default_text = this.options.placeholder_text_multiple || this.options.placeholder_text || AbstractChosen.default_multiple_text;
168
- } else {
169
- this.default_text = this.options.placeholder_text_single || this.options.placeholder_text || AbstractChosen.default_single_text;
170
- }
171
- return this.results_none_found = this.form_field.getAttribute("data-no_results_text") || this.options.no_results_text || AbstractChosen.default_no_result_text;
172
- };
173
-
174
- AbstractChosen.prototype.choice_label = function(item) {
175
- if (this.include_group_label_in_selected && (item.group_label != null)) {
176
- return "<b class='group-name'>" + item.group_label + "</b>" + item.html;
177
- } else {
178
- return item.html;
179
- }
180
- };
181
-
182
- AbstractChosen.prototype.mouse_enter = function() {
183
- return this.mouse_on_container = true;
184
- };
185
-
186
- AbstractChosen.prototype.mouse_leave = function() {
187
- return this.mouse_on_container = false;
188
- };
189
-
190
- AbstractChosen.prototype.input_focus = function(evt) {
191
- var _this = this;
192
- if (this.is_multiple) {
193
- if (!this.active_field) {
194
- return setTimeout((function() {
195
- return _this.container_mousedown();
196
- }), 50);
197
- }
198
- } else {
199
- if (!this.active_field) {
200
- return this.activate_field();
201
- }
202
- }
203
- };
204
-
205
- AbstractChosen.prototype.input_blur = function(evt) {
206
- var _this = this;
207
- if (!this.mouse_on_container) {
208
- this.active_field = false;
209
- return setTimeout((function() {
210
- return _this.blur_test();
211
- }), 100);
212
- }
213
- };
214
-
215
- AbstractChosen.prototype.results_option_build = function(options) {
216
- var content, data, data_content, shown_results, _i, _len, _ref;
217
- content = '';
218
- shown_results = 0;
219
- _ref = this.results_data;
220
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
221
- data = _ref[_i];
222
- data_content = '';
223
- if (data.group) {
224
- data_content = this.result_add_group(data);
225
- } else {
226
- data_content = this.result_add_option(data);
227
- }
228
- if (data_content !== '') {
229
- shown_results++;
230
- content += data_content;
231
- }
232
- if (options != null ? options.first : void 0) {
233
- if (data.selected && this.is_multiple) {
234
- this.choice_build(data);
235
- } else if (data.selected && !this.is_multiple) {
236
- this.single_set_selected_text(this.choice_label(data));
237
- }
238
- }
239
- if (shown_results >= this.max_shown_results) {
240
- break;
241
- }
242
- }
243
- return content;
244
- };
245
-
246
- AbstractChosen.prototype.result_add_option = function(option) {
247
- var classes, option_el;
248
- if (!option.search_match) {
249
- return '';
250
- }
251
- if (!this.include_option_in_results(option)) {
252
- return '';
253
- }
254
- classes = [];
255
- if (!option.disabled && !(option.selected && this.is_multiple)) {
256
- classes.push("active-result");
257
- }
258
- if (option.disabled && !(option.selected && this.is_multiple)) {
259
- classes.push("disabled-result");
260
- }
261
- if (option.selected) {
262
- classes.push("result-selected");
263
- }
264
- if (option.group_array_index != null) {
265
- classes.push("group-option");
266
- }
267
- if (option.classes !== "") {
268
- classes.push(option.classes);
269
- }
270
- option_el = document.createElement("li");
271
- option_el.className = classes.join(" ");
272
- option_el.style.cssText = option.style;
273
- option_el.setAttribute("data-option-array-index", option.array_index);
274
- option_el.innerHTML = option.search_text;
275
- if (option.title) {
276
- option_el.title = option.title;
277
- }
278
- return this.outerHTML(option_el);
279
- };
280
-
281
- AbstractChosen.prototype.result_add_group = function(group) {
282
- var classes, group_el;
283
- if (!(group.search_match || group.group_match)) {
284
- return '';
285
- }
286
- if (!(group.active_options > 0)) {
287
- return '';
288
- }
289
- classes = [];
290
- classes.push("group-result");
291
- if (group.classes) {
292
- classes.push(group.classes);
293
- }
294
- group_el = document.createElement("li");
295
- group_el.className = classes.join(" ");
296
- group_el.innerHTML = group.search_text;
297
- if (group.title) {
298
- group_el.title = group.title;
299
- }
300
- return this.outerHTML(group_el);
301
- };
302
-
303
- AbstractChosen.prototype.results_update_field = function() {
304
- this.set_default_text();
305
- if (!this.is_multiple) {
306
- this.results_reset_cleanup();
307
- }
308
- this.result_clear_highlight();
309
- this.results_build();
310
- if (this.results_showing) {
311
- return this.winnow_results();
312
- }
313
- };
314
-
315
- AbstractChosen.prototype.reset_single_select_options = function() {
316
- var result, _i, _len, _ref, _results;
317
- _ref = this.results_data;
318
- _results = [];
319
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
320
- result = _ref[_i];
321
- if (result.selected) {
322
- _results.push(result.selected = false);
323
- } else {
324
- _results.push(void 0);
325
- }
326
- }
327
- return _results;
328
- };
329
-
330
- AbstractChosen.prototype.results_toggle = function() {
331
- if (this.results_showing) {
332
- return this.results_hide();
333
- } else {
334
- return this.results_show();
335
- }
336
- };
337
-
338
- AbstractChosen.prototype.results_search = function(evt) {
339
- if (this.results_showing) {
340
- return this.winnow_results();
341
- } else {
342
- return this.results_show();
343
- }
344
- };
345
-
346
- AbstractChosen.prototype.winnow_results = function() {
347
- var escapedSearchText, option, regex, results, results_group, searchText, startpos, text, zregex, _i, _len, _ref;
348
- this.no_results_clear();
349
- results = 0;
350
- searchText = this.get_search_text();
351
- escapedSearchText = searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\amp;");
352
- zregex = new RegExp(escapedSearchText, 'i');
353
- regex = this.get_search_regex(escapedSearchText);
354
- _ref = this.results_data;
355
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
356
- option = _ref[_i];
357
- option.search_match = false;
358
- results_group = null;
359
- if (this.include_option_in_results(option)) {
360
- if (option.group) {
361
- option.group_match = false;
362
- option.active_options = 0;
363
- }
364
- if ((option.group_array_index != null) && this.results_data[option.group_array_index]) {
365
- results_group = this.results_data[option.group_array_index];
366
- if (results_group.active_options === 0 && results_group.search_match) {
367
- results += 1;
368
- }
369
- results_group.active_options += 1;
370
- }
371
- option.search_text = option.group ? option.label : option.html;
372
- if (!(option.group && !this.group_search)) {
373
- option.search_match = this.search_string_match(option.search_text, regex);
374
- if (option.search_match && !option.group) {
375
- results += 1;
376
- }
377
- if (option.search_match) {
378
- if (searchText.length) {
379
- startpos = option.search_text.search(zregex);
380
- text = option.search_text.substr(0, startpos + searchText.length) + '</em>' + option.search_text.substr(startpos + searchText.length);
381
- option.search_text = text.substr(0, startpos) + '<em>' + text.substr(startpos);
382
- }
383
- if (results_group != null) {
384
- results_group.group_match = true;
385
- }
386
- } else if ((option.group_array_index != null) && this.results_data[option.group_array_index].search_match) {
387
- option.search_match = true;
388
- }
389
- }
390
- }
391
- }
392
- this.result_clear_highlight();
393
- if (results < 1 && searchText.length) {
394
- this.update_results_content("");
395
- return this.no_results(searchText);
396
- } else {
397
- this.update_results_content(this.results_option_build());
398
- return this.winnow_results_set_highlight();
399
- }
400
- };
401
-
402
- AbstractChosen.prototype.get_search_regex = function(escaped_search_string) {
403
- var regex_anchor;
404
- regex_anchor = this.search_contains ? "" : "^";
405
- return new RegExp(regex_anchor + escaped_search_string, 'i');
406
- };
407
-
408
- AbstractChosen.prototype.search_string_match = function(search_string, regex) {
409
- var part, parts, _i, _len;
410
- if (regex.test(search_string)) {
411
- return true;
412
- } else if (this.enable_split_word_search && (search_string.indexOf(" ") >= 0 || search_string.indexOf("[") === 0)) {
413
- parts = search_string.replace(/\[|\]/g, "").split(" ");
414
- if (parts.length) {
415
- for (_i = 0, _len = parts.length; _i < _len; _i++) {
416
- part = parts[_i];
417
- if (regex.test(part)) {
418
- return true;
419
- }
420
- }
421
- }
422
- }
423
- };
424
-
425
- AbstractChosen.prototype.choices_count = function() {
426
- var option, _i, _len, _ref;
427
- if (this.selected_option_count != null) {
428
- return this.selected_option_count;
429
- }
430
- this.selected_option_count = 0;
431
- _ref = this.form_field.options;
432
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
433
- option = _ref[_i];
434
- if (option.selected) {
435
- this.selected_option_count += 1;
436
- }
437
- }
438
- return this.selected_option_count;
439
- };
440
-
441
- AbstractChosen.prototype.choices_click = function(evt) {
442
- evt.preventDefault();
443
- if (!(this.results_showing || this.is_disabled)) {
444
- return this.results_show();
445
- }
446
- };
447
-
448
- AbstractChosen.prototype.keyup_checker = function(evt) {
449
- var stroke, _ref;
450
- stroke = (_ref = evt.which) != null ? _ref : evt.keyCode;
451
- this.search_field_scale();
452
- switch (stroke) {
453
- case 8:
454
- if (this.is_multiple && this.backstroke_length < 1 && this.choices_count() > 0) {
455
- return this.keydown_backstroke();
456
- } else if (!this.pending_backstroke) {
457
- this.result_clear_highlight();
458
- return this.results_search();
459
- }
460
- break;
461
- case 13:
462
- evt.preventDefault();
463
- if (this.results_showing) {
464
- return this.result_select(evt);
465
- }
466
- break;
467
- case 27:
468
- if (this.results_showing) {
469
- this.results_hide();
470
- }
471
- return true;
472
- case 9:
473
- case 38:
474
- case 40:
475
- case 16:
476
- case 91:
477
- case 17:
478
- case 18:
479
- break;
480
- default:
481
- return this.results_search();
482
- }
483
- };
484
-
485
- AbstractChosen.prototype.clipboard_event_checker = function(evt) {
486
- var _this = this;
487
- return setTimeout((function() {
488
- return _this.results_search();
489
- }), 50);
490
- };
491
-
492
- AbstractChosen.prototype.container_width = function() {
493
- if (this.options.width != null) {
494
- return this.options.width;
495
- } else {
496
- return "" + this.form_field.offsetWidth + "px";
497
- }
498
- };
499
-
500
- AbstractChosen.prototype.include_option_in_results = function(option) {
501
- if (this.is_multiple && (!this.display_selected_options && option.selected)) {
502
- return false;
503
- }
504
- if (!this.display_disabled_options && option.disabled) {
505
- return false;
506
- }
507
- if (option.empty) {
508
- return false;
509
- }
510
- return true;
511
- };
512
-
513
- AbstractChosen.prototype.search_results_touchstart = function(evt) {
514
- this.touch_started = true;
515
- return this.search_results_mouseover(evt);
516
- };
517
-
518
- AbstractChosen.prototype.search_results_touchmove = function(evt) {
519
- this.touch_started = false;
520
- return this.search_results_mouseout(evt);
521
- };
522
-
523
- AbstractChosen.prototype.search_results_touchend = function(evt) {
524
- if (this.touch_started) {
525
- return this.search_results_mouseup(evt);
526
- }
527
- };
528
-
529
- AbstractChosen.prototype.outerHTML = function(element) {
530
- var tmp;
531
- if (element.outerHTML) {
532
- return element.outerHTML;
533
- }
534
- tmp = document.createElement("div");
535
- tmp.appendChild(element);
536
- return tmp.innerHTML;
537
- };
538
-
539
- AbstractChosen.browser_is_supported = function() {
540
- if (/iP(od|hone)/i.test(window.navigator.userAgent)) {
541
- return false;
542
- }
543
- if (/Android/i.test(window.navigator.userAgent)) {
544
- if (/Mobile/i.test(window.navigator.userAgent)) {
545
- return false;
546
- }
547
- }
548
- if (/IEMobile/i.test(window.navigator.userAgent)) {
549
- return false;
550
- }
551
- if (/Windows Phone/i.test(window.navigator.userAgent)) {
552
- return false;
553
- }
554
- if (/BlackBerry/i.test(window.navigator.userAgent)) {
555
- return false;
556
- }
557
- if (/BB10/i.test(window.navigator.userAgent)) {
558
- return false;
559
- }
560
- if (window.navigator.appName === "Microsoft Internet Explorer") {
561
- return document.documentMode >= 8;
562
- }
563
- return true;
564
- };
565
-
566
- AbstractChosen.default_multiple_text = "Select Some Options";
567
-
568
- AbstractChosen.default_single_text = "Select an Option";
569
-
570
- AbstractChosen.default_no_result_text = "No results match";
571
-
572
- return AbstractChosen;
573
-
574
- })();
575
-
576
- $ = jQuery;
577
-
578
- $.fn.extend({
579
- chosen: function(options) {
580
- if (!AbstractChosen.browser_is_supported()) {
581
- return this;
582
- }
583
- return this.each(function(input_field) {
584
- var $this, chosen;
585
- $this = $(this);
586
- chosen = $this.data('chosen');
587
- if (options === 'destroy') {
588
- if (chosen instanceof Chosen) {
589
- chosen.destroy();
590
- }
591
- return;
592
- }
593
- if (!(chosen instanceof Chosen)) {
594
- $this.data('chosen', new Chosen(this, options));
595
- }
596
- });
597
- }
598
- });
599
-
600
- Chosen = (function(_super) {
601
- __extends(Chosen, _super);
602
-
603
- function Chosen() {
604
- _ref = Chosen.__super__.constructor.apply(this, arguments);
605
- return _ref;
606
- }
607
-
608
- Chosen.prototype.setup = function() {
609
- this.form_field_jq = $(this.form_field);
610
- this.current_selectedIndex = this.form_field.selectedIndex;
611
- return this.is_rtl = this.form_field_jq.hasClass("chosen-rtl");
612
- };
613
-
614
- Chosen.prototype.set_up_html = function() {
615
- var container_classes, container_props;
616
- container_classes = ["chosen-container"];
617
- container_classes.push("chosen-container-" + (this.is_multiple ? "multi" : "single"));
618
- if (this.inherit_select_classes && this.form_field.className) {
619
- container_classes.push(this.form_field.className);
620
- }
621
- if (this.is_rtl) {
622
- container_classes.push("chosen-rtl");
623
- }
624
- container_props = {
625
- 'class': container_classes.join(' '),
626
- 'style': "width: " + (this.container_width()) + ";",
627
- 'title': this.form_field.title
628
- };
629
- if (this.form_field.id.length) {
630
- container_props.id = this.form_field.id.replace(/[^\w]/g, '_') + "_chosen";
631
- }
632
- this.container = $("<div />", container_props);
633
- if (this.is_multiple) {
634
- this.container.html('<ul class="chosen-choices"><li class="search-field"><input type="text" value="' + this.default_text + '" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chosen-drop"><ul class="chosen-results"></ul></div>');
635
- } else {
636
- this.container.html('<a class="chosen-single chosen-default"><span>' + this.default_text + '</span><div><b></b></div></a><div class="chosen-drop"><div class="chosen-search"><input type="text" autocomplete="off" /></div><ul class="chosen-results"></ul></div>');
637
- }
638
- this.form_field_jq.hide().after(this.container);
639
- this.dropdown = this.container.find('div.chosen-drop').first();
640
- this.search_field = this.container.find('input').first();
641
- this.search_results = this.container.find('ul.chosen-results').first();
642
- this.search_field_scale();
643
- this.search_no_results = this.container.find('li.no-results').first();
644
- if (this.is_multiple) {
645
- this.search_choices = this.container.find('ul.chosen-choices').first();
646
- this.search_container = this.container.find('li.search-field').first();
647
- } else {
648
- this.search_container = this.container.find('div.chosen-search').first();
649
- this.selected_item = this.container.find('.chosen-single').first();
650
- }
651
- this.results_build();
652
- this.set_tab_index();
653
- return this.set_label_behavior();
654
- };
655
-
656
- Chosen.prototype.on_ready = function() {
657
- return this.form_field_jq.trigger("chosen:ready", {
658
- chosen: this
659
- });
660
- };
661
-
662
- Chosen.prototype.register_observers = function() {
663
- var _this = this;
664
- this.container.bind('touchstart.chosen', function(evt) {
665
- _this.container_mousedown(evt);
666
- return evt.preventDefault();
667
- });
668
- this.container.bind('touchend.chosen', function(evt) {
669
- _this.container_mouseup(evt);
670
- return evt.preventDefault();
671
- });
672
- this.container.bind('mousedown.chosen', function(evt) {
673
- _this.container_mousedown(evt);
674
- });
675
- this.container.bind('mouseup.chosen', function(evt) {
676
- _this.container_mouseup(evt);
677
- });
678
- this.container.bind('mouseenter.chosen', function(evt) {
679
- _this.mouse_enter(evt);
680
- });
681
- this.container.bind('mouseleave.chosen', function(evt) {
682
- _this.mouse_leave(evt);
683
- });
684
- this.search_results.bind('mouseup.chosen', function(evt) {
685
- _this.search_results_mouseup(evt);
686
- });
687
- this.search_results.bind('mouseover.chosen', function(evt) {
688
- _this.search_results_mouseover(evt);
689
- });
690
- this.search_results.bind('mouseout.chosen', function(evt) {
691
- _this.search_results_mouseout(evt);
692
- });
693
- this.search_results.bind('mousewheel.chosen DOMMouseScroll.chosen', function(evt) {
694
- _this.search_results_mousewheel(evt);
695
- });
696
- this.search_results.bind('touchstart.chosen', function(evt) {
697
- _this.search_results_touchstart(evt);
698
- });
699
- this.search_results.bind('touchmove.chosen', function(evt) {
700
- _this.search_results_touchmove(evt);
701
- });
702
- this.search_results.bind('touchend.chosen', function(evt) {
703
- _this.search_results_touchend(evt);
704
- });
705
- this.form_field_jq.bind("chosen:updated.chosen", function(evt) {
706
- _this.results_update_field(evt);
707
- });
708
- this.form_field_jq.bind("chosen:activate.chosen", function(evt) {
709
- _this.activate_field(evt);
710
- });
711
- this.form_field_jq.bind("chosen:open.chosen", function(evt) {
712
- _this.container_mousedown(evt);
713
- });
714
- this.form_field_jq.bind("chosen:close.chosen", function(evt) {
715
- _this.input_blur(evt);
716
- });
717
- this.search_field.bind('blur.chosen', function(evt) {
718
- _this.input_blur(evt);
719
- });
720
- this.search_field.bind('keyup.chosen', function(evt) {
721
- _this.keyup_checker(evt);
722
- });
723
- this.search_field.bind('keydown.chosen', function(evt) {
724
- _this.keydown_checker(evt);
725
- });
726
- this.search_field.bind('focus.chosen', function(evt) {
727
- _this.input_focus(evt);
728
- });
729
- this.search_field.bind('cut.chosen', function(evt) {
730
- _this.clipboard_event_checker(evt);
731
- });
732
- this.search_field.bind('paste.chosen', function(evt) {
733
- _this.clipboard_event_checker(evt);
734
- });
735
- if (this.is_multiple) {
736
- return this.search_choices.bind('click.chosen', function(evt) {
737
- _this.choices_click(evt);
738
- });
739
- } else {
740
- return this.container.bind('click.chosen', function(evt) {
741
- evt.preventDefault();
742
- });
743
- }
744
- };
745
-
746
- Chosen.prototype.destroy = function() {
747
- $(this.container[0].ownerDocument).unbind("click.chosen", this.click_test_action);
748
- if (this.search_field[0].tabIndex) {
749
- this.form_field_jq[0].tabIndex = this.search_field[0].tabIndex;
750
- }
751
- this.container.remove();
752
- this.form_field_jq.removeData('chosen');
753
- return this.form_field_jq.show();
754
- };
755
-
756
- Chosen.prototype.search_field_disabled = function() {
757
- this.is_disabled = this.form_field_jq[0].disabled;
758
- if (this.is_disabled) {
759
- this.container.addClass('chosen-disabled');
760
- this.search_field[0].disabled = true;
761
- if (!this.is_multiple) {
762
- this.selected_item.unbind("focus.chosen", this.activate_action);
763
- }
764
- return this.close_field();
765
- } else {
766
- this.container.removeClass('chosen-disabled');
767
- this.search_field[0].disabled = false;
768
- if (!this.is_multiple) {
769
- return this.selected_item.bind("focus.chosen", this.activate_action);
770
- }
771
- }
772
- };
773
-
774
- Chosen.prototype.container_mousedown = function(evt) {
775
- if (!this.is_disabled) {
776
- if (evt && evt.type === "mousedown" && !this.results_showing) {
777
- evt.preventDefault();
778
- }
779
- if (!((evt != null) && ($(evt.target)).hasClass("search-choice-close"))) {
780
- if (!this.active_field) {
781
- if (this.is_multiple) {
782
- this.search_field.val("");
783
- }
784
- $(this.container[0].ownerDocument).bind('click.chosen', this.click_test_action);
785
- this.results_show();
786
- } else if (!this.is_multiple && evt && (($(evt.target)[0] === this.selected_item[0]) || $(evt.target).parents("a.chosen-single").length)) {
787
- evt.preventDefault();
788
- this.results_toggle();
789
- }
790
- return this.activate_field();
791
- }
792
- }
793
- };
794
-
795
- Chosen.prototype.container_mouseup = function(evt) {
796
- if (evt.target.nodeName === "ABBR" && !this.is_disabled) {
797
- return this.results_reset(evt);
798
- }
799
- };
800
-
801
- Chosen.prototype.search_results_mousewheel = function(evt) {
802
- var delta;
803
- if (evt.originalEvent) {
804
- delta = evt.originalEvent.deltaY || -evt.originalEvent.wheelDelta || evt.originalEvent.detail;
805
- }
806
- if (delta != null) {
807
- evt.preventDefault();
808
- if (evt.type === 'DOMMouseScroll') {
809
- delta = delta * 40;
810
- }
811
- return this.search_results.scrollTop(delta + this.search_results.scrollTop());
812
- }
813
- };
814
-
815
- Chosen.prototype.blur_test = function(evt) {
816
- if (!this.active_field && this.container.hasClass("chosen-container-active")) {
817
- return this.close_field();
818
- }
819
- };
820
-
821
- Chosen.prototype.close_field = function() {
822
- $(this.container[0].ownerDocument).unbind("click.chosen", this.click_test_action);
823
- this.active_field = false;
824
- this.results_hide();
825
- this.container.removeClass("chosen-container-active");
826
- this.clear_backstroke();
827
- this.show_search_field_default();
828
- return this.search_field_scale();
829
- };
830
-
831
- Chosen.prototype.activate_field = function() {
832
- this.container.addClass("chosen-container-active");
833
- this.active_field = true;
834
- this.search_field.val(this.search_field.val());
835
- return this.search_field.focus();
836
- };
837
-
838
- Chosen.prototype.test_active_click = function(evt) {
839
- var active_container;
840
- active_container = $(evt.target).closest('.chosen-container');
841
- if (active_container.length && this.container[0] === active_container[0]) {
842
- return this.active_field = true;
843
- } else {
844
- return this.close_field();
845
- }
846
- };
847
-
848
- Chosen.prototype.results_build = function() {
849
- this.parsing = true;
850
- this.selected_option_count = null;
851
- this.results_data = SelectParser.select_to_array(this.form_field);
852
- if (this.is_multiple) {
853
- this.search_choices.find("li.search-choice").remove();
854
- } else if (!this.is_multiple) {
855
- this.single_set_selected_text();
856
- if (this.disable_search || this.form_field.options.length <= this.disable_search_threshold) {
857
- this.search_field[0].readOnly = true;
858
- this.container.addClass("chosen-container-single-nosearch");
859
- } else {
860
- this.search_field[0].readOnly = false;
861
- this.container.removeClass("chosen-container-single-nosearch");
862
- }
863
- }
864
- this.update_results_content(this.results_option_build({
865
- first: true
866
- }));
867
- this.search_field_disabled();
868
- this.show_search_field_default();
869
- this.search_field_scale();
870
- return this.parsing = false;
871
- };
872
-
873
- Chosen.prototype.result_do_highlight = function(el) {
874
- var high_bottom, high_top, maxHeight, visible_bottom, visible_top;
875
- if (el.length) {
876
- this.result_clear_highlight();
877
- this.result_highlight = el;
878
- this.result_highlight.addClass("highlighted");
879
- maxHeight = parseInt(this.search_results.css("maxHeight"), 10);
880
- visible_top = this.search_results.scrollTop();
881
- visible_bottom = maxHeight + visible_top;
882
- high_top = this.result_highlight.position().top + this.search_results.scrollTop();
883
- high_bottom = high_top + this.result_highlight.outerHeight();
884
- if (high_bottom >= visible_bottom) {
885
- return this.search_results.scrollTop((high_bottom - maxHeight) > 0 ? high_bottom - maxHeight : 0);
886
- } else if (high_top < visible_top) {
887
- return this.search_results.scrollTop(high_top);
888
- }
889
- }
890
- };
891
-
892
- Chosen.prototype.result_clear_highlight = function() {
893
- if (this.result_highlight) {
894
- this.result_highlight.removeClass("highlighted");
895
- }
896
- return this.result_highlight = null;
897
- };
898
-
899
- Chosen.prototype.results_show = function() {
900
- if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
901
- this.form_field_jq.trigger("chosen:maxselected", {
902
- chosen: this
903
- });
904
- return false;
905
- }
906
- this.container.addClass("chosen-with-drop");
907
- this.results_showing = true;
908
- this.search_field.focus();
909
- this.search_field.val(this.search_field.val());
910
- this.winnow_results();
911
- return this.form_field_jq.trigger("chosen:showing_dropdown", {
912
- chosen: this
913
- });
914
- };
915
-
916
- Chosen.prototype.update_results_content = function(content) {
917
- return this.search_results.html(content);
918
- };
919
-
920
- Chosen.prototype.results_hide = function() {
921
- if (this.results_showing) {
922
- this.result_clear_highlight();
923
- this.container.removeClass("chosen-with-drop");
924
- this.form_field_jq.trigger("chosen:hiding_dropdown", {
925
- chosen: this
926
- });
927
- }
928
- return this.results_showing = false;
929
- };
930
-
931
- Chosen.prototype.set_tab_index = function(el) {
932
- var ti;
933
- if (this.form_field.tabIndex) {
934
- ti = this.form_field.tabIndex;
935
- this.form_field.tabIndex = -1;
936
- return this.search_field[0].tabIndex = ti;
937
- }
938
- };
939
-
940
- Chosen.prototype.set_label_behavior = function() {
941
- var _this = this;
942
- this.form_field_label = this.form_field_jq.parents("label");
943
- if (!this.form_field_label.length && this.form_field.id.length) {
944
- this.form_field_label = $("label[for='" + this.form_field.id + "']");
945
- }
946
- if (this.form_field_label.length > 0) {
947
- return this.form_field_label.bind('click.chosen', function(evt) {
948
- if (_this.is_multiple) {
949
- return _this.container_mousedown(evt);
950
- } else {
951
- return _this.activate_field();
952
- }
953
- });
954
- }
955
- };
956
-
957
- Chosen.prototype.show_search_field_default = function() {
958
- if (this.is_multiple && this.choices_count() < 1 && !this.active_field) {
959
- this.search_field.val(this.default_text);
960
- return this.search_field.addClass("default");
961
- } else {
962
- this.search_field.val("");
963
- return this.search_field.removeClass("default");
964
- }
965
- };
966
-
967
- Chosen.prototype.search_results_mouseup = function(evt) {
968
- var target;
969
- target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
970
- if (target.length) {
971
- this.result_highlight = target;
972
- this.result_select(evt);
973
- return this.search_field.focus();
974
- }
975
- };
976
-
977
- Chosen.prototype.search_results_mouseover = function(evt) {
978
- var target;
979
- target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
980
- if (target) {
981
- return this.result_do_highlight(target);
982
- }
983
- };
984
-
985
- Chosen.prototype.search_results_mouseout = function(evt) {
986
- if ($(evt.target).hasClass("active-result" || $(evt.target).parents('.active-result').first())) {
987
- return this.result_clear_highlight();
988
- }
989
- };
990
-
991
- Chosen.prototype.choice_build = function(item) {
992
- var choice, close_link,
993
- _this = this;
994
- choice = $('<li />', {
995
- "class": "search-choice"
996
- }).html("<span>" + (this.choice_label(item)) + "</span>");
997
- if (item.disabled) {
998
- choice.addClass('search-choice-disabled');
999
- } else {
1000
- close_link = $('<a />', {
1001
- "class": 'search-choice-close',
1002
- 'data-option-array-index': item.array_index
1003
- });
1004
- close_link.bind('click.chosen', function(evt) {
1005
- return _this.choice_destroy_link_click(evt);
1006
- });
1007
- choice.append(close_link);
1008
- }
1009
- return this.search_container.before(choice);
1010
- };
1011
-
1012
- Chosen.prototype.choice_destroy_link_click = function(evt) {
1013
- evt.preventDefault();
1014
- evt.stopPropagation();
1015
- if (!this.is_disabled) {
1016
- return this.choice_destroy($(evt.target));
1017
- }
1018
- };
1019
-
1020
- Chosen.prototype.choice_destroy = function(link) {
1021
- if (this.result_deselect(link[0].getAttribute("data-option-array-index"))) {
1022
- this.show_search_field_default();
1023
- if (this.is_multiple && this.choices_count() > 0 && this.search_field.val().length < 1) {
1024
- this.results_hide();
1025
- }
1026
- link.parents('li').first().remove();
1027
- return this.search_field_scale();
1028
- }
1029
- };
1030
-
1031
- Chosen.prototype.results_reset = function() {
1032
- this.reset_single_select_options();
1033
- this.form_field.options[0].selected = true;
1034
- this.single_set_selected_text();
1035
- this.show_search_field_default();
1036
- this.results_reset_cleanup();
1037
- this.form_field_jq.trigger("change");
1038
- if (this.active_field) {
1039
- return this.results_hide();
1040
- }
1041
- };
1042
-
1043
- Chosen.prototype.results_reset_cleanup = function() {
1044
- this.current_selectedIndex = this.form_field.selectedIndex;
1045
- return this.selected_item.find("abbr").remove();
1046
- };
1047
-
1048
- Chosen.prototype.result_select = function(evt) {
1049
- var high, item;
1050
- if (this.result_highlight) {
1051
- high = this.result_highlight;
1052
- this.result_clear_highlight();
1053
- if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
1054
- this.form_field_jq.trigger("chosen:maxselected", {
1055
- chosen: this
1056
- });
1057
- return false;
1058
- }
1059
- if (this.is_multiple) {
1060
- high.removeClass("active-result");
1061
- } else {
1062
- this.reset_single_select_options();
1063
- }
1064
- high.addClass("result-selected");
1065
- item = this.results_data[high[0].getAttribute("data-option-array-index")];
1066
- item.selected = true;
1067
- this.form_field.options[item.options_index].selected = true;
1068
- this.selected_option_count = null;
1069
- if (this.is_multiple) {
1070
- this.choice_build(item);
1071
- } else {
1072
- this.single_set_selected_text(this.choice_label(item));
1073
- }
1074
- if (!((evt.metaKey || evt.ctrlKey) && this.is_multiple)) {
1075
- this.results_hide();
1076
- }
1077
- this.show_search_field_default();
1078
- if (this.is_multiple || this.form_field.selectedIndex !== this.current_selectedIndex) {
1079
- this.form_field_jq.trigger("change", {
1080
- 'selected': this.form_field.options[item.options_index].value
1081
- });
1082
- }
1083
- this.current_selectedIndex = this.form_field.selectedIndex;
1084
- evt.preventDefault();
1085
- return this.search_field_scale();
1086
- }
1087
- };
1088
-
1089
- Chosen.prototype.single_set_selected_text = function(text) {
1090
- if (text == null) {
1091
- text = this.default_text;
1092
- }
1093
- if (text === this.default_text) {
1094
- this.selected_item.addClass("chosen-default");
1095
- } else {
1096
- this.single_deselect_control_build();
1097
- this.selected_item.removeClass("chosen-default");
1098
- }
1099
- return this.selected_item.find("span").html(text);
1100
- };
1101
-
1102
- Chosen.prototype.result_deselect = function(pos) {
1103
- var result_data;
1104
- result_data = this.results_data[pos];
1105
- if (!this.form_field.options[result_data.options_index].disabled) {
1106
- result_data.selected = false;
1107
- this.form_field.options[result_data.options_index].selected = false;
1108
- this.selected_option_count = null;
1109
- this.result_clear_highlight();
1110
- if (this.results_showing) {
1111
- this.winnow_results();
1112
- }
1113
- this.form_field_jq.trigger("change", {
1114
- deselected: this.form_field.options[result_data.options_index].value
1115
- });
1116
- this.search_field_scale();
1117
- return true;
1118
- } else {
1119
- return false;
1120
- }
1121
- };
1122
-
1123
- Chosen.prototype.single_deselect_control_build = function() {
1124
- if (!this.allow_single_deselect) {
1125
- return;
1126
- }
1127
- if (!this.selected_item.find("abbr").length) {
1128
- this.selected_item.find("span").first().after("<abbr class=\"search-choice-close\"></abbr>");
1129
- }
1130
- return this.selected_item.addClass("chosen-single-with-deselect");
1131
- };
1132
-
1133
- Chosen.prototype.get_search_text = function() {
1134
- return $('<div/>').text($.trim(this.search_field.val())).html();
1135
- };
1136
-
1137
- Chosen.prototype.winnow_results_set_highlight = function() {
1138
- var do_high, selected_results;
1139
- selected_results = !this.is_multiple ? this.search_results.find(".result-selected.active-result") : [];
1140
- do_high = selected_results.length ? selected_results.first() : this.search_results.find(".active-result").first();
1141
- if (do_high != null) {
1142
- return this.result_do_highlight(do_high);
1143
- }
1144
- };
1145
-
1146
- Chosen.prototype.no_results = function(terms) {
1147
- var no_results_html;
1148
- no_results_html = $('<li class="no-results">' + this.results_none_found + ' "<span></span>"</li>');
1149
- no_results_html.find("span").first().html(terms);
1150
- this.search_results.append(no_results_html);
1151
- return this.form_field_jq.trigger("chosen:no_results", {
1152
- chosen: this
1153
- });
1154
- };
1155
-
1156
- Chosen.prototype.no_results_clear = function() {
1157
- return this.search_results.find(".no-results").remove();
1158
- };
1159
-
1160
- Chosen.prototype.keydown_arrow = function() {
1161
- var next_sib;
1162
- if (this.results_showing && this.result_highlight) {
1163
- next_sib = this.result_highlight.nextAll("li.active-result").first();
1164
- if (next_sib) {
1165
- return this.result_do_highlight(next_sib);
1166
- }
1167
- } else {
1168
- return this.results_show();
1169
- }
1170
- };
1171
-
1172
- Chosen.prototype.keyup_arrow = function() {
1173
- var prev_sibs;
1174
- if (!this.results_showing && !this.is_multiple) {
1175
- return this.results_show();
1176
- } else if (this.result_highlight) {
1177
- prev_sibs = this.result_highlight.prevAll("li.active-result");
1178
- if (prev_sibs.length) {
1179
- return this.result_do_highlight(prev_sibs.first());
1180
- } else {
1181
- if (this.choices_count() > 0) {
1182
- this.results_hide();
1183
- }
1184
- return this.result_clear_highlight();
1185
- }
1186
- }
1187
- };
1188
-
1189
- Chosen.prototype.keydown_backstroke = function() {
1190
- var next_available_destroy;
1191
- if (this.pending_backstroke) {
1192
- this.choice_destroy(this.pending_backstroke.find("a").first());
1193
- return this.clear_backstroke();
1194
- } else {
1195
- next_available_destroy = this.search_container.siblings("li.search-choice").last();
1196
- if (next_available_destroy.length && !next_available_destroy.hasClass("search-choice-disabled")) {
1197
- this.pending_backstroke = next_available_destroy;
1198
- if (this.single_backstroke_delete) {
1199
- return this.keydown_backstroke();
1200
- } else {
1201
- return this.pending_backstroke.addClass("search-choice-focus");
1202
- }
1203
- }
1204
- }
1205
- };
1206
-
1207
- Chosen.prototype.clear_backstroke = function() {
1208
- if (this.pending_backstroke) {
1209
- this.pending_backstroke.removeClass("search-choice-focus");
1210
- }
1211
- return this.pending_backstroke = null;
1212
- };
1213
-
1214
- Chosen.prototype.keydown_checker = function(evt) {
1215
- var stroke, _ref1;
1216
- stroke = (_ref1 = evt.which) != null ? _ref1 : evt.keyCode;
1217
- this.search_field_scale();
1218
- if (stroke !== 8 && this.pending_backstroke) {
1219
- this.clear_backstroke();
1220
- }
1221
- switch (stroke) {
1222
- case 8:
1223
- this.backstroke_length = this.search_field.val().length;
1224
- break;
1225
- case 9:
1226
- if (this.results_showing && !this.is_multiple) {
1227
- this.result_select(evt);
1228
- }
1229
- this.mouse_on_container = false;
1230
- break;
1231
- case 13:
1232
- if (this.results_showing) {
1233
- evt.preventDefault();
1234
- }
1235
- break;
1236
- case 32:
1237
- if (this.disable_search) {
1238
- evt.preventDefault();
1239
- }
1240
- break;
1241
- case 38:
1242
- evt.preventDefault();
1243
- this.keyup_arrow();
1244
- break;
1245
- case 40:
1246
- evt.preventDefault();
1247
- this.keydown_arrow();
1248
- break;
1249
- }
1250
- };
1251
-
1252
- Chosen.prototype.search_field_scale = function() {
1253
- var div, f_width, h, style, style_block, styles, w, _i, _len;
1254
- if (this.is_multiple) {
1255
- h = 0;
1256
- w = 0;
1257
- style_block = "position:absolute; left: -1000px; top: -1000px; display:none;";
1258
- styles = ['font-size', 'font-style', 'font-weight', 'font-family', 'line-height', 'text-transform', 'letter-spacing'];
1259
- for (_i = 0, _len = styles.length; _i < _len; _i++) {
1260
- style = styles[_i];
1261
- style_block += style + ":" + this.search_field.css(style) + ";";
1262
- }
1263
- div = $('<div />', {
1264
- 'style': style_block
1265
- });
1266
- div.text(this.search_field.val());
1267
- $('body').append(div);
1268
- w = div.width() + 25;
1269
- div.remove();
1270
- f_width = this.container.outerWidth();
1271
- if (w > f_width - 10) {
1272
- w = f_width - 10;
1273
- }
1274
- return this.search_field.css({
1275
- 'width': w + 'px'
1276
- });
1277
- }
1278
- };
1279
-
1280
- return Chosen;
1281
-
1282
- })(AbstractChosen);
1283
-
1284
- }).call(this);
1
+ /*!
2
+ Chosen, a Select Box Enhancer for jQuery and Prototype
3
+ by Patrick Filler for Harvest, http://getharvest.com
4
+
5
+ Version 1.5.1
6
+ Full source at https://github.com/harvesthq/chosen
7
+ Copyright (c) 2011-2016 Harvest http://getharvest.com
8
+
9
+ MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
10
+ This file is generated by `grunt build`, do not edit it by hand.
11
+ */
12
+
13
+ (function() {
14
+ var $, AbstractChosen, Chosen, SelectParser, _ref,
15
+ __hasProp = {}.hasOwnProperty,
16
+ __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
17
+
18
+ SelectParser = (function() {
19
+ function SelectParser() {
20
+ this.options_index = 0;
21
+ this.parsed = [];
22
+ }
23
+
24
+ SelectParser.prototype.add_node = function(child) {
25
+ if (child.nodeName.toUpperCase() === "OPTGROUP") {
26
+ return this.add_group(child);
27
+ } else {
28
+ return this.add_option(child);
29
+ }
30
+ };
31
+
32
+ SelectParser.prototype.add_group = function(group) {
33
+ var group_position, option, _i, _len, _ref, _results;
34
+ group_position = this.parsed.length;
35
+ this.parsed.push({
36
+ array_index: group_position,
37
+ group: true,
38
+ label: this.escapeExpression(group.label),
39
+ title: group.title ? group.title : void 0,
40
+ children: 0,
41
+ disabled: group.disabled,
42
+ classes: group.className
43
+ });
44
+ _ref = group.childNodes;
45
+ _results = [];
46
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
47
+ option = _ref[_i];
48
+ _results.push(this.add_option(option, group_position, group.disabled));
49
+ }
50
+ return _results;
51
+ };
52
+
53
+ SelectParser.prototype.add_option = function(option, group_position, group_disabled) {
54
+ if (option.nodeName.toUpperCase() === "OPTION") {
55
+ if (option.text !== "") {
56
+ if (group_position != null) {
57
+ this.parsed[group_position].children += 1;
58
+ }
59
+ this.parsed.push({
60
+ array_index: this.parsed.length,
61
+ options_index: this.options_index,
62
+ value: option.value,
63
+ text: option.text,
64
+ html: option.innerHTML,
65
+ title: option.title ? option.title : void 0,
66
+ selected: option.selected,
67
+ disabled: group_disabled === true ? group_disabled : option.disabled,
68
+ group_array_index: group_position,
69
+ group_label: group_position != null ? this.parsed[group_position].label : null,
70
+ classes: option.className,
71
+ style: option.style.cssText
72
+ });
73
+ } else {
74
+ this.parsed.push({
75
+ array_index: this.parsed.length,
76
+ options_index: this.options_index,
77
+ empty: true
78
+ });
79
+ }
80
+ return this.options_index += 1;
81
+ }
82
+ };
83
+
84
+ SelectParser.prototype.escapeExpression = function(text) {
85
+ var map, unsafe_chars;
86
+ if ((text == null) || text === false) {
87
+ return "";
88
+ }
89
+ if (!/[\&\<\>\"\'\`]/.test(text)) {
90
+ return text;
91
+ }
92
+ map = {
93
+ "<": "&lt;",
94
+ ">": "&gt;",
95
+ '"': "&quot;",
96
+ "'": "&#x27;",
97
+ "`": "&#x60;"
98
+ };
99
+ unsafe_chars = /&(?!\w+;)|[\<\>\"\'\`]/g;
100
+ return text.replace(unsafe_chars, function(chr) {
101
+ return map[chr] || "&amp;";
102
+ });
103
+ };
104
+
105
+ return SelectParser;
106
+
107
+ })();
108
+
109
+ SelectParser.select_to_array = function(select) {
110
+ var child, parser, _i, _len, _ref;
111
+ parser = new SelectParser();
112
+ _ref = select.childNodes;
113
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
114
+ child = _ref[_i];
115
+ parser.add_node(child);
116
+ }
117
+ return parser.parsed;
118
+ };
119
+
120
+ AbstractChosen = (function() {
121
+ function AbstractChosen(form_field, options) {
122
+ this.form_field = form_field;
123
+ this.options = options != null ? options : {};
124
+ if (!AbstractChosen.browser_is_supported()) {
125
+ return;
126
+ }
127
+ this.is_multiple = this.form_field.multiple;
128
+ this.set_default_text();
129
+ this.set_default_values();
130
+ this.setup();
131
+ this.set_up_html();
132
+ this.register_observers();
133
+ this.on_ready();
134
+ }
135
+
136
+ AbstractChosen.prototype.set_default_values = function() {
137
+ var _this = this;
138
+ this.click_test_action = function(evt) {
139
+ return _this.test_active_click(evt);
140
+ };
141
+ this.activate_action = function(evt) {
142
+ return _this.activate_field(evt);
143
+ };
144
+ this.active_field = false;
145
+ this.mouse_on_container = false;
146
+ this.results_showing = false;
147
+ this.result_highlighted = null;
148
+ this.allow_single_deselect = (this.options.allow_single_deselect != null) && (this.form_field.options[0] != null) && this.form_field.options[0].text === "" ? this.options.allow_single_deselect : false;
149
+ this.disable_search_threshold = this.options.disable_search_threshold || 0;
150
+ this.disable_search = this.options.disable_search || false;
151
+ this.enable_split_word_search = this.options.enable_split_word_search != null ? this.options.enable_split_word_search : true;
152
+ this.group_search = this.options.group_search != null ? this.options.group_search : true;
153
+ this.search_contains = this.options.search_contains || false;
154
+ this.single_backstroke_delete = this.options.single_backstroke_delete != null ? this.options.single_backstroke_delete : true;
155
+ this.max_selected_options = this.options.max_selected_options || Infinity;
156
+ this.inherit_select_classes = this.options.inherit_select_classes || false;
157
+ this.display_selected_options = this.options.display_selected_options != null ? this.options.display_selected_options : true;
158
+ this.display_disabled_options = this.options.display_disabled_options != null ? this.options.display_disabled_options : true;
159
+ this.include_group_label_in_selected = this.options.include_group_label_in_selected || false;
160
+ return this.max_shown_results = this.options.max_shown_results || Number.POSITIVE_INFINITY;
161
+ };
162
+
163
+ AbstractChosen.prototype.set_default_text = function() {
164
+ if (this.form_field.getAttribute("data-placeholder")) {
165
+ this.default_text = this.form_field.getAttribute("data-placeholder");
166
+ } else if (this.is_multiple) {
167
+ this.default_text = this.options.placeholder_text_multiple || this.options.placeholder_text || AbstractChosen.default_multiple_text;
168
+ } else {
169
+ this.default_text = this.options.placeholder_text_single || this.options.placeholder_text || AbstractChosen.default_single_text;
170
+ }
171
+ return this.results_none_found = this.form_field.getAttribute("data-no_results_text") || this.options.no_results_text || AbstractChosen.default_no_result_text;
172
+ };
173
+
174
+ AbstractChosen.prototype.choice_label = function(item) {
175
+ if (this.include_group_label_in_selected && (item.group_label != null)) {
176
+ return "<b class='group-name'>" + item.group_label + "</b>" + item.html;
177
+ } else {
178
+ return item.html;
179
+ }
180
+ };
181
+
182
+ AbstractChosen.prototype.mouse_enter = function() {
183
+ return this.mouse_on_container = true;
184
+ };
185
+
186
+ AbstractChosen.prototype.mouse_leave = function() {
187
+ return this.mouse_on_container = false;
188
+ };
189
+
190
+ AbstractChosen.prototype.input_focus = function(evt) {
191
+ var _this = this;
192
+ if (this.is_multiple) {
193
+ if (!this.active_field) {
194
+ return setTimeout((function() {
195
+ return _this.container_mousedown();
196
+ }), 50);
197
+ }
198
+ } else {
199
+ if (!this.active_field) {
200
+ return this.activate_field();
201
+ }
202
+ }
203
+ };
204
+
205
+ AbstractChosen.prototype.input_blur = function(evt) {
206
+ var _this = this;
207
+ if (!this.mouse_on_container) {
208
+ this.active_field = false;
209
+ return setTimeout((function() {
210
+ return _this.blur_test();
211
+ }), 100);
212
+ }
213
+ };
214
+
215
+ AbstractChosen.prototype.results_option_build = function(options) {
216
+ var content, data, data_content, shown_results, _i, _len, _ref;
217
+ content = '';
218
+ shown_results = 0;
219
+ _ref = this.results_data;
220
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
221
+ data = _ref[_i];
222
+ data_content = '';
223
+ if (data.group) {
224
+ data_content = this.result_add_group(data);
225
+ } else {
226
+ data_content = this.result_add_option(data);
227
+ }
228
+ if (data_content !== '') {
229
+ shown_results++;
230
+ content += data_content;
231
+ }
232
+ if (options != null ? options.first : void 0) {
233
+ if (data.selected && this.is_multiple) {
234
+ this.choice_build(data);
235
+ } else if (data.selected && !this.is_multiple) {
236
+ this.single_set_selected_text(this.choice_label(data));
237
+ }
238
+ }
239
+ if (shown_results >= this.max_shown_results) {
240
+ break;
241
+ }
242
+ }
243
+ return content;
244
+ };
245
+
246
+ AbstractChosen.prototype.result_add_option = function(option) {
247
+ var classes, option_el;
248
+ if (!option.search_match) {
249
+ return '';
250
+ }
251
+ if (!this.include_option_in_results(option)) {
252
+ return '';
253
+ }
254
+ classes = [];
255
+ if (!option.disabled && !(option.selected && this.is_multiple)) {
256
+ classes.push("active-result");
257
+ }
258
+ if (option.disabled && !(option.selected && this.is_multiple)) {
259
+ classes.push("disabled-result");
260
+ }
261
+ if (option.selected) {
262
+ classes.push("result-selected");
263
+ }
264
+ if (option.group_array_index != null) {
265
+ classes.push("group-option");
266
+ }
267
+ if (option.classes !== "") {
268
+ classes.push(option.classes);
269
+ }
270
+ option_el = document.createElement("li");
271
+ option_el.className = classes.join(" ");
272
+ option_el.style.cssText = option.style;
273
+ option_el.setAttribute("data-option-array-index", option.array_index);
274
+ option_el.innerHTML = option.search_text;
275
+ if (option.title) {
276
+ option_el.title = option.title;
277
+ }
278
+ return this.outerHTML(option_el);
279
+ };
280
+
281
+ AbstractChosen.prototype.result_add_group = function(group) {
282
+ var classes, group_el;
283
+ if (!(group.search_match || group.group_match)) {
284
+ return '';
285
+ }
286
+ if (!(group.active_options > 0)) {
287
+ return '';
288
+ }
289
+ classes = [];
290
+ classes.push("group-result");
291
+ if (group.classes) {
292
+ classes.push(group.classes);
293
+ }
294
+ group_el = document.createElement("li");
295
+ group_el.className = classes.join(" ");
296
+ group_el.innerHTML = group.search_text;
297
+ if (group.title) {
298
+ group_el.title = group.title;
299
+ }
300
+ return this.outerHTML(group_el);
301
+ };
302
+
303
+ AbstractChosen.prototype.results_update_field = function() {
304
+ this.set_default_text();
305
+ if (!this.is_multiple) {
306
+ this.results_reset_cleanup();
307
+ }
308
+ this.result_clear_highlight();
309
+ this.results_build();
310
+ if (this.results_showing) {
311
+ return this.winnow_results();
312
+ }
313
+ };
314
+
315
+ AbstractChosen.prototype.reset_single_select_options = function() {
316
+ var result, _i, _len, _ref, _results;
317
+ _ref = this.results_data;
318
+ _results = [];
319
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
320
+ result = _ref[_i];
321
+ if (result.selected) {
322
+ _results.push(result.selected = false);
323
+ } else {
324
+ _results.push(void 0);
325
+ }
326
+ }
327
+ return _results;
328
+ };
329
+
330
+ AbstractChosen.prototype.results_toggle = function() {
331
+ if (this.results_showing) {
332
+ return this.results_hide();
333
+ } else {
334
+ return this.results_show();
335
+ }
336
+ };
337
+
338
+ AbstractChosen.prototype.results_search = function(evt) {
339
+ if (this.results_showing) {
340
+ return this.winnow_results();
341
+ } else {
342
+ return this.results_show();
343
+ }
344
+ };
345
+
346
+ AbstractChosen.prototype.winnow_results = function() {
347
+ var escapedSearchText, option, regex, results, results_group, searchText, startpos, text, zregex, _i, _len, _ref;
348
+ this.no_results_clear();
349
+ results = 0;
350
+ searchText = this.get_search_text();
351
+ escapedSearchText = searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\amp;");
352
+ zregex = new RegExp(escapedSearchText, 'i');
353
+ regex = this.get_search_regex(escapedSearchText);
354
+ _ref = this.results_data;
355
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
356
+ option = _ref[_i];
357
+ option.search_match = false;
358
+ results_group = null;
359
+ if (this.include_option_in_results(option)) {
360
+ if (option.group) {
361
+ option.group_match = false;
362
+ option.active_options = 0;
363
+ }
364
+ if ((option.group_array_index != null) && this.results_data[option.group_array_index]) {
365
+ results_group = this.results_data[option.group_array_index];
366
+ if (results_group.active_options === 0 && results_group.search_match) {
367
+ results += 1;
368
+ }
369
+ results_group.active_options += 1;
370
+ }
371
+ option.search_text = option.group ? option.label : option.html;
372
+ if (!(option.group && !this.group_search)) {
373
+ option.search_match = this.search_string_match(option.search_text, regex);
374
+ if (option.search_match && !option.group) {
375
+ results += 1;
376
+ }
377
+ if (option.search_match) {
378
+ if (searchText.length) {
379
+ startpos = option.search_text.search(zregex);
380
+ text = option.search_text.substr(0, startpos + searchText.length) + '</em>' + option.search_text.substr(startpos + searchText.length);
381
+ option.search_text = text.substr(0, startpos) + '<em>' + text.substr(startpos);
382
+ }
383
+ if (results_group != null) {
384
+ results_group.group_match = true;
385
+ }
386
+ } else if ((option.group_array_index != null) && this.results_data[option.group_array_index].search_match) {
387
+ option.search_match = true;
388
+ }
389
+ }
390
+ }
391
+ }
392
+ this.result_clear_highlight();
393
+ if (results < 1 && searchText.length) {
394
+ this.update_results_content("");
395
+ return this.no_results(searchText);
396
+ } else {
397
+ this.update_results_content(this.results_option_build());
398
+ return this.winnow_results_set_highlight();
399
+ }
400
+ };
401
+
402
+ AbstractChosen.prototype.get_search_regex = function(escaped_search_string) {
403
+ var regex_anchor;
404
+ regex_anchor = this.search_contains ? "" : "^";
405
+ return new RegExp(regex_anchor + escaped_search_string, 'i');
406
+ };
407
+
408
+ AbstractChosen.prototype.search_string_match = function(search_string, regex) {
409
+ var part, parts, _i, _len;
410
+ if (regex.test(search_string)) {
411
+ return true;
412
+ } else if (this.enable_split_word_search && (search_string.indexOf(" ") >= 0 || search_string.indexOf("[") === 0)) {
413
+ parts = search_string.replace(/\[|\]/g, "").split(" ");
414
+ if (parts.length) {
415
+ for (_i = 0, _len = parts.length; _i < _len; _i++) {
416
+ part = parts[_i];
417
+ if (regex.test(part)) {
418
+ return true;
419
+ }
420
+ }
421
+ }
422
+ }
423
+ };
424
+
425
+ AbstractChosen.prototype.choices_count = function() {
426
+ var option, _i, _len, _ref;
427
+ if (this.selected_option_count != null) {
428
+ return this.selected_option_count;
429
+ }
430
+ this.selected_option_count = 0;
431
+ _ref = this.form_field.options;
432
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
433
+ option = _ref[_i];
434
+ if (option.selected) {
435
+ this.selected_option_count += 1;
436
+ }
437
+ }
438
+ return this.selected_option_count;
439
+ };
440
+
441
+ AbstractChosen.prototype.choices_click = function(evt) {
442
+ evt.preventDefault();
443
+ if (!(this.results_showing || this.is_disabled)) {
444
+ return this.results_show();
445
+ }
446
+ };
447
+
448
+ AbstractChosen.prototype.keyup_checker = function(evt) {
449
+ var stroke, _ref;
450
+ stroke = (_ref = evt.which) != null ? _ref : evt.keyCode;
451
+ this.search_field_scale();
452
+ switch (stroke) {
453
+ case 8:
454
+ if (this.is_multiple && this.backstroke_length < 1 && this.choices_count() > 0) {
455
+ return this.keydown_backstroke();
456
+ } else if (!this.pending_backstroke) {
457
+ this.result_clear_highlight();
458
+ return this.results_search();
459
+ }
460
+ break;
461
+ case 13:
462
+ evt.preventDefault();
463
+ if (this.results_showing) {
464
+ return this.result_select(evt);
465
+ }
466
+ break;
467
+ case 27:
468
+ if (this.results_showing) {
469
+ this.results_hide();
470
+ }
471
+ return true;
472
+ case 9:
473
+ case 38:
474
+ case 40:
475
+ case 16:
476
+ case 91:
477
+ case 17:
478
+ case 18:
479
+ break;
480
+ default:
481
+ return this.results_search();
482
+ }
483
+ };
484
+
485
+ AbstractChosen.prototype.clipboard_event_checker = function(evt) {
486
+ var _this = this;
487
+ return setTimeout((function() {
488
+ return _this.results_search();
489
+ }), 50);
490
+ };
491
+
492
+ AbstractChosen.prototype.container_width = function() {
493
+ if (this.options.width != null) {
494
+ return this.options.width;
495
+ } else {
496
+ return "" + this.form_field.offsetWidth + "px";
497
+ }
498
+ };
499
+
500
+ AbstractChosen.prototype.include_option_in_results = function(option) {
501
+ if (this.is_multiple && (!this.display_selected_options && option.selected)) {
502
+ return false;
503
+ }
504
+ if (!this.display_disabled_options && option.disabled) {
505
+ return false;
506
+ }
507
+ if (option.empty) {
508
+ return false;
509
+ }
510
+ return true;
511
+ };
512
+
513
+ AbstractChosen.prototype.search_results_touchstart = function(evt) {
514
+ this.touch_started = true;
515
+ return this.search_results_mouseover(evt);
516
+ };
517
+
518
+ AbstractChosen.prototype.search_results_touchmove = function(evt) {
519
+ this.touch_started = false;
520
+ return this.search_results_mouseout(evt);
521
+ };
522
+
523
+ AbstractChosen.prototype.search_results_touchend = function(evt) {
524
+ if (this.touch_started) {
525
+ return this.search_results_mouseup(evt);
526
+ }
527
+ };
528
+
529
+ AbstractChosen.prototype.outerHTML = function(element) {
530
+ var tmp;
531
+ if (element.outerHTML) {
532
+ return element.outerHTML;
533
+ }
534
+ tmp = document.createElement("div");
535
+ tmp.appendChild(element);
536
+ return tmp.innerHTML;
537
+ };
538
+
539
+ AbstractChosen.browser_is_supported = function() {
540
+ if (/iP(od|hone)/i.test(window.navigator.userAgent)) {
541
+ return false;
542
+ }
543
+ if (/Android/i.test(window.navigator.userAgent)) {
544
+ if (/Mobile/i.test(window.navigator.userAgent)) {
545
+ return false;
546
+ }
547
+ }
548
+ if (/IEMobile/i.test(window.navigator.userAgent)) {
549
+ return false;
550
+ }
551
+ if (/Windows Phone/i.test(window.navigator.userAgent)) {
552
+ return false;
553
+ }
554
+ if (/BlackBerry/i.test(window.navigator.userAgent)) {
555
+ return false;
556
+ }
557
+ if (/BB10/i.test(window.navigator.userAgent)) {
558
+ return false;
559
+ }
560
+ if (window.navigator.appName === "Microsoft Internet Explorer") {
561
+ return document.documentMode >= 8;
562
+ }
563
+ return true;
564
+ };
565
+
566
+ AbstractChosen.default_multiple_text = "Select Some Options";
567
+
568
+ AbstractChosen.default_single_text = "Select an Option";
569
+
570
+ AbstractChosen.default_no_result_text = "No results match";
571
+
572
+ return AbstractChosen;
573
+
574
+ })();
575
+
576
+ $ = jQuery;
577
+
578
+ $.fn.extend({
579
+ chosen: function(options) {
580
+ if (!AbstractChosen.browser_is_supported()) {
581
+ return this;
582
+ }
583
+ return this.each(function(input_field) {
584
+ var $this, chosen;
585
+ $this = $(this);
586
+ chosen = $this.data('chosen');
587
+ if (options === 'destroy') {
588
+ if (chosen instanceof Chosen) {
589
+ chosen.destroy();
590
+ }
591
+ return;
592
+ }
593
+ if (!(chosen instanceof Chosen)) {
594
+ $this.data('chosen', new Chosen(this, options));
595
+ }
596
+ });
597
+ }
598
+ });
599
+
600
+ Chosen = (function(_super) {
601
+ __extends(Chosen, _super);
602
+
603
+ function Chosen() {
604
+ _ref = Chosen.__super__.constructor.apply(this, arguments);
605
+ return _ref;
606
+ }
607
+
608
+ Chosen.prototype.setup = function() {
609
+ this.form_field_jq = $(this.form_field);
610
+ this.current_selectedIndex = this.form_field.selectedIndex;
611
+ return this.is_rtl = this.form_field_jq.hasClass("chosen-rtl");
612
+ };
613
+
614
+ Chosen.prototype.set_up_html = function() {
615
+ var container_classes, container_props;
616
+ container_classes = ["chosen-container"];
617
+ container_classes.push("chosen-container-" + (this.is_multiple ? "multi" : "single"));
618
+ if (this.inherit_select_classes && this.form_field.className) {
619
+ container_classes.push(this.form_field.className);
620
+ }
621
+ if (this.is_rtl) {
622
+ container_classes.push("chosen-rtl");
623
+ }
624
+ container_props = {
625
+ 'class': container_classes.join(' '),
626
+ 'style': "width: " + (this.container_width()) + ";",
627
+ 'title': this.form_field.title
628
+ };
629
+ if (this.form_field.id.length) {
630
+ container_props.id = this.form_field.id.replace(/[^\w]/g, '_') + "_chosen";
631
+ }
632
+ this.container = $("<div />", container_props);
633
+ if (this.is_multiple) {
634
+ this.container.html('<ul class="chosen-choices"><li class="search-field"><input type="text" value="' + this.default_text + '" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chosen-drop"><ul class="chosen-results"></ul></div>');
635
+ } else {
636
+ this.container.html('<a class="chosen-single chosen-default"><span>' + this.default_text + '</span><div><b></b></div></a><div class="chosen-drop"><div class="chosen-search"><input type="text" autocomplete="off" /></div><ul class="chosen-results"></ul></div>');
637
+ }
638
+ this.form_field_jq.hide().after(this.container);
639
+ this.dropdown = this.container.find('div.chosen-drop').first();
640
+ this.search_field = this.container.find('input').first();
641
+ this.search_results = this.container.find('ul.chosen-results').first();
642
+ this.search_field_scale();
643
+ this.search_no_results = this.container.find('li.no-results').first();
644
+ if (this.is_multiple) {
645
+ this.search_choices = this.container.find('ul.chosen-choices').first();
646
+ this.search_container = this.container.find('li.search-field').first();
647
+ } else {
648
+ this.search_container = this.container.find('div.chosen-search').first();
649
+ this.selected_item = this.container.find('.chosen-single').first();
650
+ }
651
+ this.results_build();
652
+ this.set_tab_index();
653
+ return this.set_label_behavior();
654
+ };
655
+
656
+ Chosen.prototype.on_ready = function() {
657
+ return this.form_field_jq.trigger("chosen:ready", {
658
+ chosen: this
659
+ });
660
+ };
661
+
662
+ Chosen.prototype.register_observers = function() {
663
+ var _this = this;
664
+ this.container.bind('touchstart.chosen', function(evt) {
665
+ _this.container_mousedown(evt);
666
+ return evt.preventDefault();
667
+ });
668
+ this.container.bind('touchend.chosen', function(evt) {
669
+ _this.container_mouseup(evt);
670
+ return evt.preventDefault();
671
+ });
672
+ this.container.bind('mousedown.chosen', function(evt) {
673
+ _this.container_mousedown(evt);
674
+ });
675
+ this.container.bind('mouseup.chosen', function(evt) {
676
+ _this.container_mouseup(evt);
677
+ });
678
+ this.container.bind('mouseenter.chosen', function(evt) {
679
+ _this.mouse_enter(evt);
680
+ });
681
+ this.container.bind('mouseleave.chosen', function(evt) {
682
+ _this.mouse_leave(evt);
683
+ });
684
+ this.search_results.bind('mouseup.chosen', function(evt) {
685
+ _this.search_results_mouseup(evt);
686
+ });
687
+ this.search_results.bind('mouseover.chosen', function(evt) {
688
+ _this.search_results_mouseover(evt);
689
+ });
690
+ this.search_results.bind('mouseout.chosen', function(evt) {
691
+ _this.search_results_mouseout(evt);
692
+ });
693
+ this.search_results.bind('mousewheel.chosen DOMMouseScroll.chosen', function(evt) {
694
+ _this.search_results_mousewheel(evt);
695
+ });
696
+ this.search_results.bind('touchstart.chosen', function(evt) {
697
+ _this.search_results_touchstart(evt);
698
+ });
699
+ this.search_results.bind('touchmove.chosen', function(evt) {
700
+ _this.search_results_touchmove(evt);
701
+ });
702
+ this.search_results.bind('touchend.chosen', function(evt) {
703
+ _this.search_results_touchend(evt);
704
+ });
705
+ this.form_field_jq.bind("chosen:updated.chosen", function(evt) {
706
+ _this.results_update_field(evt);
707
+ });
708
+ this.form_field_jq.bind("chosen:activate.chosen", function(evt) {
709
+ _this.activate_field(evt);
710
+ });
711
+ this.form_field_jq.bind("chosen:open.chosen", function(evt) {
712
+ _this.container_mousedown(evt);
713
+ });
714
+ this.form_field_jq.bind("chosen:close.chosen", function(evt) {
715
+ _this.input_blur(evt);
716
+ });
717
+ this.search_field.bind('blur.chosen', function(evt) {
718
+ _this.input_blur(evt);
719
+ });
720
+ this.search_field.bind('keyup.chosen', function(evt) {
721
+ _this.keyup_checker(evt);
722
+ });
723
+ this.search_field.bind('keydown.chosen', function(evt) {
724
+ _this.keydown_checker(evt);
725
+ });
726
+ this.search_field.bind('focus.chosen', function(evt) {
727
+ _this.input_focus(evt);
728
+ });
729
+ this.search_field.bind('cut.chosen', function(evt) {
730
+ _this.clipboard_event_checker(evt);
731
+ });
732
+ this.search_field.bind('paste.chosen', function(evt) {
733
+ _this.clipboard_event_checker(evt);
734
+ });
735
+ if (this.is_multiple) {
736
+ return this.search_choices.bind('click.chosen', function(evt) {
737
+ _this.choices_click(evt);
738
+ });
739
+ } else {
740
+ return this.container.bind('click.chosen', function(evt) {
741
+ evt.preventDefault();
742
+ });
743
+ }
744
+ };
745
+
746
+ Chosen.prototype.destroy = function() {
747
+ $(this.container[0].ownerDocument).unbind("click.chosen", this.click_test_action);
748
+ if (this.search_field[0].tabIndex) {
749
+ this.form_field_jq[0].tabIndex = this.search_field[0].tabIndex;
750
+ }
751
+ this.container.remove();
752
+ this.form_field_jq.removeData('chosen');
753
+ return this.form_field_jq.show();
754
+ };
755
+
756
+ Chosen.prototype.search_field_disabled = function() {
757
+ this.is_disabled = this.form_field_jq[0].disabled;
758
+ if (this.is_disabled) {
759
+ this.container.addClass('chosen-disabled');
760
+ this.search_field[0].disabled = true;
761
+ if (!this.is_multiple) {
762
+ this.selected_item.unbind("focus.chosen", this.activate_action);
763
+ }
764
+ return this.close_field();
765
+ } else {
766
+ this.container.removeClass('chosen-disabled');
767
+ this.search_field[0].disabled = false;
768
+ if (!this.is_multiple) {
769
+ return this.selected_item.bind("focus.chosen", this.activate_action);
770
+ }
771
+ }
772
+ };
773
+
774
+ Chosen.prototype.container_mousedown = function(evt) {
775
+ if (!this.is_disabled) {
776
+ if (evt && evt.type === "mousedown" && !this.results_showing) {
777
+ evt.preventDefault();
778
+ }
779
+ if (!((evt != null) && ($(evt.target)).hasClass("search-choice-close"))) {
780
+ if (!this.active_field) {
781
+ if (this.is_multiple) {
782
+ this.search_field.val("");
783
+ }
784
+ $(this.container[0].ownerDocument).bind('click.chosen', this.click_test_action);
785
+ this.results_show();
786
+ } else if (!this.is_multiple && evt && (($(evt.target)[0] === this.selected_item[0]) || $(evt.target).parents("a.chosen-single").length)) {
787
+ evt.preventDefault();
788
+ this.results_toggle();
789
+ }
790
+ return this.activate_field();
791
+ }
792
+ }
793
+ };
794
+
795
+ Chosen.prototype.container_mouseup = function(evt) {
796
+ if (evt.target.nodeName === "ABBR" && !this.is_disabled) {
797
+ return this.results_reset(evt);
798
+ }
799
+ };
800
+
801
+ Chosen.prototype.search_results_mousewheel = function(evt) {
802
+ var delta;
803
+ if (evt.originalEvent) {
804
+ delta = evt.originalEvent.deltaY || -evt.originalEvent.wheelDelta || evt.originalEvent.detail;
805
+ }
806
+ if (delta != null) {
807
+ evt.preventDefault();
808
+ if (evt.type === 'DOMMouseScroll') {
809
+ delta = delta * 40;
810
+ }
811
+ return this.search_results.scrollTop(delta + this.search_results.scrollTop());
812
+ }
813
+ };
814
+
815
+ Chosen.prototype.blur_test = function(evt) {
816
+ if (!this.active_field && this.container.hasClass("chosen-container-active")) {
817
+ return this.close_field();
818
+ }
819
+ };
820
+
821
+ Chosen.prototype.close_field = function() {
822
+ $(this.container[0].ownerDocument).unbind("click.chosen", this.click_test_action);
823
+ this.active_field = false;
824
+ this.results_hide();
825
+ this.container.removeClass("chosen-container-active");
826
+ this.clear_backstroke();
827
+ this.show_search_field_default();
828
+ return this.search_field_scale();
829
+ };
830
+
831
+ Chosen.prototype.activate_field = function() {
832
+ this.container.addClass("chosen-container-active");
833
+ this.active_field = true;
834
+ this.search_field.val(this.search_field.val());
835
+ return this.search_field.focus();
836
+ };
837
+
838
+ Chosen.prototype.test_active_click = function(evt) {
839
+ var active_container;
840
+ active_container = $(evt.target).closest('.chosen-container');
841
+ if (active_container.length && this.container[0] === active_container[0]) {
842
+ return this.active_field = true;
843
+ } else {
844
+ return this.close_field();
845
+ }
846
+ };
847
+
848
+ Chosen.prototype.results_build = function() {
849
+ this.parsing = true;
850
+ this.selected_option_count = null;
851
+ this.results_data = SelectParser.select_to_array(this.form_field);
852
+ if (this.is_multiple) {
853
+ this.search_choices.find("li.search-choice").remove();
854
+ } else if (!this.is_multiple) {
855
+ this.single_set_selected_text();
856
+ if (this.disable_search || this.form_field.options.length <= this.disable_search_threshold) {
857
+ this.search_field[0].readOnly = true;
858
+ this.container.addClass("chosen-container-single-nosearch");
859
+ } else {
860
+ this.search_field[0].readOnly = false;
861
+ this.container.removeClass("chosen-container-single-nosearch");
862
+ }
863
+ }
864
+ this.update_results_content(this.results_option_build({
865
+ first: true
866
+ }));
867
+ this.search_field_disabled();
868
+ this.show_search_field_default();
869
+ this.search_field_scale();
870
+ return this.parsing = false;
871
+ };
872
+
873
+ Chosen.prototype.result_do_highlight = function(el) {
874
+ var high_bottom, high_top, maxHeight, visible_bottom, visible_top;
875
+ if (el.length) {
876
+ this.result_clear_highlight();
877
+ this.result_highlight = el;
878
+ this.result_highlight.addClass("highlighted");
879
+ maxHeight = parseInt(this.search_results.css("maxHeight"), 10);
880
+ visible_top = this.search_results.scrollTop();
881
+ visible_bottom = maxHeight + visible_top;
882
+ high_top = this.result_highlight.position().top + this.search_results.scrollTop();
883
+ high_bottom = high_top + this.result_highlight.outerHeight();
884
+ if (high_bottom >= visible_bottom) {
885
+ return this.search_results.scrollTop((high_bottom - maxHeight) > 0 ? high_bottom - maxHeight : 0);
886
+ } else if (high_top < visible_top) {
887
+ return this.search_results.scrollTop(high_top);
888
+ }
889
+ }
890
+ };
891
+
892
+ Chosen.prototype.result_clear_highlight = function() {
893
+ if (this.result_highlight) {
894
+ this.result_highlight.removeClass("highlighted");
895
+ }
896
+ return this.result_highlight = null;
897
+ };
898
+
899
+ Chosen.prototype.results_show = function() {
900
+ if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
901
+ this.form_field_jq.trigger("chosen:maxselected", {
902
+ chosen: this
903
+ });
904
+ return false;
905
+ }
906
+ this.container.addClass("chosen-with-drop");
907
+ this.results_showing = true;
908
+ this.search_field.focus();
909
+ this.search_field.val(this.search_field.val());
910
+ this.winnow_results();
911
+ return this.form_field_jq.trigger("chosen:showing_dropdown", {
912
+ chosen: this
913
+ });
914
+ };
915
+
916
+ Chosen.prototype.update_results_content = function(content) {
917
+ return this.search_results.html(content);
918
+ };
919
+
920
+ Chosen.prototype.results_hide = function() {
921
+ if (this.results_showing) {
922
+ this.result_clear_highlight();
923
+ this.container.removeClass("chosen-with-drop");
924
+ this.form_field_jq.trigger("chosen:hiding_dropdown", {
925
+ chosen: this
926
+ });
927
+ }
928
+ return this.results_showing = false;
929
+ };
930
+
931
+ Chosen.prototype.set_tab_index = function(el) {
932
+ var ti;
933
+ if (this.form_field.tabIndex) {
934
+ ti = this.form_field.tabIndex;
935
+ this.form_field.tabIndex = -1;
936
+ return this.search_field[0].tabIndex = ti;
937
+ }
938
+ };
939
+
940
+ Chosen.prototype.set_label_behavior = function() {
941
+ var _this = this;
942
+ this.form_field_label = this.form_field_jq.parents("label");
943
+ if (!this.form_field_label.length && this.form_field.id.length) {
944
+ this.form_field_label = $("label[for='" + this.form_field.id + "']");
945
+ }
946
+ if (this.form_field_label.length > 0) {
947
+ return this.form_field_label.bind('click.chosen', function(evt) {
948
+ if (_this.is_multiple) {
949
+ return _this.container_mousedown(evt);
950
+ } else {
951
+ return _this.activate_field();
952
+ }
953
+ });
954
+ }
955
+ };
956
+
957
+ Chosen.prototype.show_search_field_default = function() {
958
+ if (this.is_multiple && this.choices_count() < 1 && !this.active_field) {
959
+ this.search_field.val(this.default_text);
960
+ return this.search_field.addClass("default");
961
+ } else {
962
+ this.search_field.val("");
963
+ return this.search_field.removeClass("default");
964
+ }
965
+ };
966
+
967
+ Chosen.prototype.search_results_mouseup = function(evt) {
968
+ var target;
969
+ target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
970
+ if (target.length) {
971
+ this.result_highlight = target;
972
+ this.result_select(evt);
973
+ return this.search_field.focus();
974
+ }
975
+ };
976
+
977
+ Chosen.prototype.search_results_mouseover = function(evt) {
978
+ var target;
979
+ target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
980
+ if (target) {
981
+ return this.result_do_highlight(target);
982
+ }
983
+ };
984
+
985
+ Chosen.prototype.search_results_mouseout = function(evt) {
986
+ if ($(evt.target).hasClass("active-result" || $(evt.target).parents('.active-result').first())) {
987
+ return this.result_clear_highlight();
988
+ }
989
+ };
990
+
991
+ Chosen.prototype.choice_build = function(item) {
992
+ var choice, close_link,
993
+ _this = this;
994
+ choice = $('<li />', {
995
+ "class": "search-choice"
996
+ }).html("<span>" + (this.choice_label(item)) + "</span>");
997
+ if (item.disabled) {
998
+ choice.addClass('search-choice-disabled');
999
+ } else {
1000
+ close_link = $('<a />', {
1001
+ "class": 'search-choice-close',
1002
+ 'data-option-array-index': item.array_index
1003
+ });
1004
+ close_link.bind('click.chosen', function(evt) {
1005
+ return _this.choice_destroy_link_click(evt);
1006
+ });
1007
+ choice.append(close_link);
1008
+ }
1009
+ return this.search_container.before(choice);
1010
+ };
1011
+
1012
+ Chosen.prototype.choice_destroy_link_click = function(evt) {
1013
+ evt.preventDefault();
1014
+ evt.stopPropagation();
1015
+ if (!this.is_disabled) {
1016
+ return this.choice_destroy($(evt.target));
1017
+ }
1018
+ };
1019
+
1020
+ Chosen.prototype.choice_destroy = function(link) {
1021
+ if (this.result_deselect(link[0].getAttribute("data-option-array-index"))) {
1022
+ this.show_search_field_default();
1023
+ if (this.is_multiple && this.choices_count() > 0 && this.search_field.val().length < 1) {
1024
+ this.results_hide();
1025
+ }
1026
+ link.parents('li').first().remove();
1027
+ return this.search_field_scale();
1028
+ }
1029
+ };
1030
+
1031
+ Chosen.prototype.results_reset = function() {
1032
+ this.reset_single_select_options();
1033
+ this.form_field.options[0].selected = true;
1034
+ this.single_set_selected_text();
1035
+ this.show_search_field_default();
1036
+ this.results_reset_cleanup();
1037
+ this.form_field_jq.trigger("change");
1038
+ if (this.active_field) {
1039
+ return this.results_hide();
1040
+ }
1041
+ };
1042
+
1043
+ Chosen.prototype.results_reset_cleanup = function() {
1044
+ this.current_selectedIndex = this.form_field.selectedIndex;
1045
+ return this.selected_item.find("abbr").remove();
1046
+