blazer-rails 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (469) hide show
  1. checksums.yaml +7 -0
  2. data/.bowerrc +3 -0
  3. data/.gitignore +9 -0
  4. data/.ruby-version +1 -0
  5. data/Gemfile +4 -0
  6. data/LICENSE.txt +21 -0
  7. data/README.md +85 -0
  8. data/Rakefile +1 -0
  9. data/assets/fonts/FontAwesome.otf +0 -0
  10. data/assets/fonts/fontawesome-webfont.ttf +0 -0
  11. data/assets/fonts/fontawesome-webfont.woff +0 -0
  12. data/assets/fonts/fontawesome-webfont.woff2 +0 -0
  13. data/assets/javascripts/blazer.js +5 -0
  14. data/assets/stylesheets/blazer.scss.erb +12 -0
  15. data/blazer-rails.gemspec +26 -0
  16. data/bower.json +27 -0
  17. data/lib/blazer-rails.rb +2 -0
  18. data/lib/blazer-rails/engine.rb +13 -0
  19. data/lib/blazer-rails/version.rb +3 -0
  20. data/vendor/assets/components/jquery/.bower.json +25 -0
  21. data/vendor/assets/components/jquery/AUTHORS.txt +278 -0
  22. data/vendor/assets/components/jquery/LICENSE.txt +36 -0
  23. data/vendor/assets/components/jquery/README.md +65 -0
  24. data/vendor/assets/components/jquery/bower.json +14 -0
  25. data/vendor/assets/components/jquery/dist/jquery.js +9814 -0
  26. data/vendor/assets/components/jquery/dist/jquery.min.js +4 -0
  27. data/vendor/assets/components/jquery/dist/jquery.min.map +1 -0
  28. data/vendor/assets/components/jquery/external/sizzle/LICENSE.txt +36 -0
  29. data/vendor/assets/components/jquery/external/sizzle/dist/sizzle.js +2143 -0
  30. data/vendor/assets/components/jquery/external/sizzle/dist/sizzle.min.js +3 -0
  31. data/vendor/assets/components/jquery/external/sizzle/dist/sizzle.min.map +1 -0
  32. data/vendor/assets/components/jquery/src/.jshintrc +29 -0
  33. data/vendor/assets/components/jquery/src/ajax.js +845 -0
  34. data/vendor/assets/components/jquery/src/ajax/jsonp.js +100 -0
  35. data/vendor/assets/components/jquery/src/ajax/load.js +83 -0
  36. data/vendor/assets/components/jquery/src/ajax/parseJSON.js +13 -0
  37. data/vendor/assets/components/jquery/src/ajax/parseXML.js +27 -0
  38. data/vendor/assets/components/jquery/src/ajax/script.js +68 -0
  39. data/vendor/assets/components/jquery/src/ajax/var/location.js +3 -0
  40. data/vendor/assets/components/jquery/src/ajax/var/nonce.js +5 -0
  41. data/vendor/assets/components/jquery/src/ajax/var/rquery.js +3 -0
  42. data/vendor/assets/components/jquery/src/ajax/xhr.js +167 -0
  43. data/vendor/assets/components/jquery/src/attributes.js +11 -0
  44. data/vendor/assets/components/jquery/src/attributes/attr.js +142 -0
  45. data/vendor/assets/components/jquery/src/attributes/classes.js +177 -0
  46. data/vendor/assets/components/jquery/src/attributes/prop.js +125 -0
  47. data/vendor/assets/components/jquery/src/attributes/support.js +36 -0
  48. data/vendor/assets/components/jquery/src/attributes/val.js +177 -0
  49. data/vendor/assets/components/jquery/src/callbacks.js +232 -0
  50. data/vendor/assets/components/jquery/src/core.js +494 -0
  51. data/vendor/assets/components/jquery/src/core/access.js +65 -0
  52. data/vendor/assets/components/jquery/src/core/init.js +134 -0
  53. data/vendor/assets/components/jquery/src/core/parseHTML.js +41 -0
  54. data/vendor/assets/components/jquery/src/core/ready.js +103 -0
  55. data/vendor/assets/components/jquery/src/core/var/rsingleTag.js +5 -0
  56. data/vendor/assets/components/jquery/src/css.js +502 -0
  57. data/vendor/assets/components/jquery/src/css/addGetHookIf.js +24 -0
  58. data/vendor/assets/components/jquery/src/css/adjustCSS.js +65 -0
  59. data/vendor/assets/components/jquery/src/css/curCSS.js +60 -0
  60. data/vendor/assets/components/jquery/src/css/defaultDisplay.js +72 -0
  61. data/vendor/assets/components/jquery/src/css/hiddenVisibleSelectors.js +18 -0
  62. data/vendor/assets/components/jquery/src/css/showHide.js +48 -0
  63. data/vendor/assets/components/jquery/src/css/support.js +121 -0
  64. data/vendor/assets/components/jquery/src/css/var/cssExpand.js +3 -0
  65. data/vendor/assets/components/jquery/src/css/var/getStyles.js +15 -0
  66. data/vendor/assets/components/jquery/src/css/var/isHidden.js +16 -0
  67. data/vendor/assets/components/jquery/src/css/var/rmargin.js +3 -0
  68. data/vendor/assets/components/jquery/src/css/var/rnumnonpx.js +5 -0
  69. data/vendor/assets/components/jquery/src/css/var/swap.js +24 -0
  70. data/vendor/assets/components/jquery/src/data.js +187 -0
  71. data/vendor/assets/components/jquery/src/data/Data.js +200 -0
  72. data/vendor/assets/components/jquery/src/data/var/acceptData.js +18 -0
  73. data/vendor/assets/components/jquery/src/data/var/dataPriv.js +5 -0
  74. data/vendor/assets/components/jquery/src/data/var/dataUser.js +5 -0
  75. data/vendor/assets/components/jquery/src/deferred.js +158 -0
  76. data/vendor/assets/components/jquery/src/deprecated.js +32 -0
  77. data/vendor/assets/components/jquery/src/dimensions.js +54 -0
  78. data/vendor/assets/components/jquery/src/effects.js +629 -0
  79. data/vendor/assets/components/jquery/src/effects/Tween.js +121 -0
  80. data/vendor/assets/components/jquery/src/effects/animatedSelector.js +13 -0
  81. data/vendor/assets/components/jquery/src/event.js +711 -0
  82. data/vendor/assets/components/jquery/src/event/ajax.js +20 -0
  83. data/vendor/assets/components/jquery/src/event/alias.js +27 -0
  84. data/vendor/assets/components/jquery/src/event/focusin.js +53 -0
  85. data/vendor/assets/components/jquery/src/event/support.js +9 -0
  86. data/vendor/assets/components/jquery/src/event/trigger.js +183 -0
  87. data/vendor/assets/components/jquery/src/exports/amd.js +24 -0
  88. data/vendor/assets/components/jquery/src/exports/global.js +26 -0
  89. data/vendor/assets/components/jquery/src/intro.js +44 -0
  90. data/vendor/assets/components/jquery/src/jquery.js +37 -0
  91. data/vendor/assets/components/jquery/src/manipulation.js +481 -0
  92. data/vendor/assets/components/jquery/src/manipulation/_evalUrl.js +20 -0
  93. data/vendor/assets/components/jquery/src/manipulation/buildFragment.js +102 -0
  94. data/vendor/assets/components/jquery/src/manipulation/getAll.js +21 -0
  95. data/vendor/assets/components/jquery/src/manipulation/setGlobalEval.js +20 -0
  96. data/vendor/assets/components/jquery/src/manipulation/support.js +33 -0
  97. data/vendor/assets/components/jquery/src/manipulation/var/rcheckableType.js +3 -0
  98. data/vendor/assets/components/jquery/src/manipulation/var/rscriptType.js +3 -0
  99. data/vendor/assets/components/jquery/src/manipulation/var/rtagName.js +3 -0
  100. data/vendor/assets/components/jquery/src/manipulation/wrapMap.js +27 -0
  101. data/vendor/assets/components/jquery/src/offset.js +218 -0
  102. data/vendor/assets/components/jquery/src/outro.js +2 -0
  103. data/vendor/assets/components/jquery/src/queue.js +143 -0
  104. data/vendor/assets/components/jquery/src/queue/delay.js +22 -0
  105. data/vendor/assets/components/jquery/src/selector-native.js +211 -0
  106. data/vendor/assets/components/jquery/src/selector-sizzle.js +14 -0
  107. data/vendor/assets/components/jquery/src/selector.js +1 -0
  108. data/vendor/assets/components/jquery/src/serialize.js +125 -0
  109. data/vendor/assets/components/jquery/src/traversing.js +175 -0
  110. data/vendor/assets/components/jquery/src/traversing/findFilter.js +100 -0
  111. data/vendor/assets/components/jquery/src/traversing/var/dir.js +20 -0
  112. data/vendor/assets/components/jquery/src/traversing/var/rneedsContext.js +6 -0
  113. data/vendor/assets/components/jquery/src/traversing/var/siblings.js +15 -0
  114. data/vendor/assets/components/jquery/src/var/arr.js +3 -0
  115. data/vendor/assets/components/jquery/src/var/class2type.js +5 -0
  116. data/vendor/assets/components/jquery/src/var/concat.js +5 -0
  117. data/vendor/assets/components/jquery/src/var/document.js +3 -0
  118. data/vendor/assets/components/jquery/src/var/documentElement.js +5 -0
  119. data/vendor/assets/components/jquery/src/var/hasOwn.js +5 -0
  120. data/vendor/assets/components/jquery/src/var/indexOf.js +5 -0
  121. data/vendor/assets/components/jquery/src/var/pnum.js +3 -0
  122. data/vendor/assets/components/jquery/src/var/push.js +5 -0
  123. data/vendor/assets/components/jquery/src/var/rcssNum.js +7 -0
  124. data/vendor/assets/components/jquery/src/var/rnotwhite.js +3 -0
  125. data/vendor/assets/components/jquery/src/var/slice.js +5 -0
  126. data/vendor/assets/components/jquery/src/var/support.js +5 -0
  127. data/vendor/assets/components/jquery/src/var/toString.js +5 -0
  128. data/vendor/assets/components/jquery/src/wrap.js +79 -0
  129. data/vendor/assets/components/uikit/.bower.json +34 -0
  130. data/vendor/assets/components/uikit/README.md +13 -0
  131. data/vendor/assets/components/uikit/bower.json +25 -0
  132. data/vendor/assets/components/uikit/css/components/accordion.almost-flat.css +39 -0
  133. data/vendor/assets/components/uikit/css/components/accordion.almost-flat.min.css +2 -0
  134. data/vendor/assets/components/uikit/css/components/accordion.css +37 -0
  135. data/vendor/assets/components/uikit/css/components/accordion.gradient.css +39 -0
  136. data/vendor/assets/components/uikit/css/components/accordion.gradient.min.css +2 -0
  137. data/vendor/assets/components/uikit/css/components/accordion.min.css +2 -0
  138. data/vendor/assets/components/uikit/css/components/autocomplete.almost-flat.css +57 -0
  139. data/vendor/assets/components/uikit/css/components/autocomplete.almost-flat.min.css +2 -0
  140. data/vendor/assets/components/uikit/css/components/autocomplete.css +55 -0
  141. data/vendor/assets/components/uikit/css/components/autocomplete.gradient.css +57 -0
  142. data/vendor/assets/components/uikit/css/components/autocomplete.gradient.min.css +2 -0
  143. data/vendor/assets/components/uikit/css/components/autocomplete.min.css +2 -0
  144. data/vendor/assets/components/uikit/css/components/datepicker.almost-flat.css +129 -0
  145. data/vendor/assets/components/uikit/css/components/datepicker.almost-flat.min.css +2 -0
  146. data/vendor/assets/components/uikit/css/components/datepicker.css +123 -0
  147. data/vendor/assets/components/uikit/css/components/datepicker.gradient.css +139 -0
  148. data/vendor/assets/components/uikit/css/components/datepicker.gradient.min.css +2 -0
  149. data/vendor/assets/components/uikit/css/components/datepicker.min.css +2 -0
  150. data/vendor/assets/components/uikit/css/components/dotnav.almost-flat.css +128 -0
  151. data/vendor/assets/components/uikit/css/components/dotnav.almost-flat.min.css +2 -0
  152. data/vendor/assets/components/uikit/css/components/dotnav.css +124 -0
  153. data/vendor/assets/components/uikit/css/components/dotnav.gradient.css +128 -0
  154. data/vendor/assets/components/uikit/css/components/dotnav.gradient.min.css +2 -0
  155. data/vendor/assets/components/uikit/css/components/dotnav.min.css +2 -0
  156. data/vendor/assets/components/uikit/css/components/form-advanced.almost-flat.css +78 -0
  157. data/vendor/assets/components/uikit/css/components/form-advanced.almost-flat.min.css +2 -0
  158. data/vendor/assets/components/uikit/css/components/form-advanced.css +78 -0
  159. data/vendor/assets/components/uikit/css/components/form-advanced.gradient.css +78 -0
  160. data/vendor/assets/components/uikit/css/components/form-advanced.gradient.min.css +2 -0
  161. data/vendor/assets/components/uikit/css/components/form-advanced.min.css +2 -0
  162. data/vendor/assets/components/uikit/css/components/form-file.almost-flat.css +34 -0
  163. data/vendor/assets/components/uikit/css/components/form-file.almost-flat.min.css +2 -0
  164. data/vendor/assets/components/uikit/css/components/form-file.css +34 -0
  165. data/vendor/assets/components/uikit/css/components/form-file.gradient.css +34 -0
  166. data/vendor/assets/components/uikit/css/components/form-file.gradient.min.css +2 -0
  167. data/vendor/assets/components/uikit/css/components/form-file.min.css +2 -0
  168. data/vendor/assets/components/uikit/css/components/form-password.almost-flat.css +34 -0
  169. data/vendor/assets/components/uikit/css/components/form-password.almost-flat.min.css +2 -0
  170. data/vendor/assets/components/uikit/css/components/form-password.css +34 -0
  171. data/vendor/assets/components/uikit/css/components/form-password.gradient.css +34 -0
  172. data/vendor/assets/components/uikit/css/components/form-password.gradient.min.css +2 -0
  173. data/vendor/assets/components/uikit/css/components/form-password.min.css +2 -0
  174. data/vendor/assets/components/uikit/css/components/form-select.almost-flat.css +35 -0
  175. data/vendor/assets/components/uikit/css/components/form-select.almost-flat.min.css +2 -0
  176. data/vendor/assets/components/uikit/css/components/form-select.css +35 -0
  177. data/vendor/assets/components/uikit/css/components/form-select.gradient.css +35 -0
  178. data/vendor/assets/components/uikit/css/components/form-select.gradient.min.css +2 -0
  179. data/vendor/assets/components/uikit/css/components/form-select.min.css +2 -0
  180. data/vendor/assets/components/uikit/css/components/htmleditor.almost-flat.css +222 -0
  181. data/vendor/assets/components/uikit/css/components/htmleditor.almost-flat.min.css +2 -0
  182. data/vendor/assets/components/uikit/css/components/htmleditor.css +164 -0
  183. data/vendor/assets/components/uikit/css/components/htmleditor.gradient.css +229 -0
  184. data/vendor/assets/components/uikit/css/components/htmleditor.gradient.min.css +2 -0
  185. data/vendor/assets/components/uikit/css/components/htmleditor.min.css +2 -0
  186. data/vendor/assets/components/uikit/css/components/nestable.almost-flat.css +135 -0
  187. data/vendor/assets/components/uikit/css/components/nestable.almost-flat.min.css +2 -0
  188. data/vendor/assets/components/uikit/css/components/nestable.css +132 -0
  189. data/vendor/assets/components/uikit/css/components/nestable.gradient.css +139 -0
  190. data/vendor/assets/components/uikit/css/components/nestable.gradient.min.css +2 -0
  191. data/vendor/assets/components/uikit/css/components/nestable.min.css +2 -0
  192. data/vendor/assets/components/uikit/css/components/notify.almost-flat.css +98 -0
  193. data/vendor/assets/components/uikit/css/components/notify.almost-flat.min.css +2 -0
  194. data/vendor/assets/components/uikit/css/components/notify.css +92 -0
  195. data/vendor/assets/components/uikit/css/components/notify.gradient.css +98 -0
  196. data/vendor/assets/components/uikit/css/components/notify.gradient.min.css +2 -0
  197. data/vendor/assets/components/uikit/css/components/notify.min.css +2 -0
  198. data/vendor/assets/components/uikit/css/components/placeholder.almost-flat.css +29 -0
  199. data/vendor/assets/components/uikit/css/components/placeholder.almost-flat.min.css +2 -0
  200. data/vendor/assets/components/uikit/css/components/placeholder.css +29 -0
  201. data/vendor/assets/components/uikit/css/components/placeholder.gradient.css +29 -0
  202. data/vendor/assets/components/uikit/css/components/placeholder.gradient.min.css +2 -0
  203. data/vendor/assets/components/uikit/css/components/placeholder.min.css +2 -0
  204. data/vendor/assets/components/uikit/css/components/progress.almost-flat.css +104 -0
  205. data/vendor/assets/components/uikit/css/components/progress.almost-flat.min.css +2 -0
  206. data/vendor/assets/components/uikit/css/components/progress.css +94 -0
  207. data/vendor/assets/components/uikit/css/components/progress.gradient.css +112 -0
  208. data/vendor/assets/components/uikit/css/components/progress.gradient.min.css +2 -0
  209. data/vendor/assets/components/uikit/css/components/progress.min.css +2 -0
  210. data/vendor/assets/components/uikit/css/components/search.almost-flat.css +191 -0
  211. data/vendor/assets/components/uikit/css/components/search.almost-flat.min.css +2 -0
  212. data/vendor/assets/components/uikit/css/components/search.css +189 -0
  213. data/vendor/assets/components/uikit/css/components/search.gradient.css +191 -0
  214. data/vendor/assets/components/uikit/css/components/search.gradient.min.css +2 -0
  215. data/vendor/assets/components/uikit/css/components/search.min.css +2 -0
  216. data/vendor/assets/components/uikit/css/components/slidenav.almost-flat.css +98 -0
  217. data/vendor/assets/components/uikit/css/components/slidenav.almost-flat.min.css +2 -0
  218. data/vendor/assets/components/uikit/css/components/slidenav.css +98 -0
  219. data/vendor/assets/components/uikit/css/components/slidenav.gradient.css +98 -0
  220. data/vendor/assets/components/uikit/css/components/slidenav.gradient.min.css +2 -0
  221. data/vendor/assets/components/uikit/css/components/slidenav.min.css +2 -0
  222. data/vendor/assets/components/uikit/css/components/slider.almost-flat.css +85 -0
  223. data/vendor/assets/components/uikit/css/components/slider.almost-flat.min.css +2 -0
  224. data/vendor/assets/components/uikit/css/components/slider.css +85 -0
  225. data/vendor/assets/components/uikit/css/components/slider.gradient.css +85 -0
  226. data/vendor/assets/components/uikit/css/components/slider.gradient.min.css +2 -0
  227. data/vendor/assets/components/uikit/css/components/slider.min.css +2 -0
  228. data/vendor/assets/components/uikit/css/components/slideshow.almost-flat.css +144 -0
  229. data/vendor/assets/components/uikit/css/components/slideshow.almost-flat.min.css +2 -0
  230. data/vendor/assets/components/uikit/css/components/slideshow.css +144 -0
  231. data/vendor/assets/components/uikit/css/components/slideshow.gradient.css +144 -0
  232. data/vendor/assets/components/uikit/css/components/slideshow.gradient.min.css +2 -0
  233. data/vendor/assets/components/uikit/css/components/slideshow.min.css +2 -0
  234. data/vendor/assets/components/uikit/css/components/sortable.almost-flat.css +62 -0
  235. data/vendor/assets/components/uikit/css/components/sortable.almost-flat.min.css +2 -0
  236. data/vendor/assets/components/uikit/css/components/sortable.css +62 -0
  237. data/vendor/assets/components/uikit/css/components/sortable.gradient.css +62 -0
  238. data/vendor/assets/components/uikit/css/components/sortable.gradient.min.css +2 -0
  239. data/vendor/assets/components/uikit/css/components/sortable.min.css +2 -0
  240. data/vendor/assets/components/uikit/css/components/sticky.almost-flat.css +23 -0
  241. data/vendor/assets/components/uikit/css/components/sticky.almost-flat.min.css +2 -0
  242. data/vendor/assets/components/uikit/css/components/sticky.css +23 -0
  243. data/vendor/assets/components/uikit/css/components/sticky.gradient.css +23 -0
  244. data/vendor/assets/components/uikit/css/components/sticky.gradient.min.css +2 -0
  245. data/vendor/assets/components/uikit/css/components/sticky.min.css +2 -0
  246. data/vendor/assets/components/uikit/css/components/tooltip.almost-flat.css +118 -0
  247. data/vendor/assets/components/uikit/css/components/tooltip.almost-flat.min.css +2 -0
  248. data/vendor/assets/components/uikit/css/components/tooltip.css +116 -0
  249. data/vendor/assets/components/uikit/css/components/tooltip.gradient.css +118 -0
  250. data/vendor/assets/components/uikit/css/components/tooltip.gradient.min.css +2 -0
  251. data/vendor/assets/components/uikit/css/components/tooltip.min.css +2 -0
  252. data/vendor/assets/components/uikit/css/components/upload.almost-flat.css +10 -0
  253. data/vendor/assets/components/uikit/css/components/upload.almost-flat.min.css +2 -0
  254. data/vendor/assets/components/uikit/css/components/upload.css +10 -0
  255. data/vendor/assets/components/uikit/css/components/upload.gradient.css +10 -0
  256. data/vendor/assets/components/uikit/css/components/upload.gradient.min.css +2 -0
  257. data/vendor/assets/components/uikit/css/components/upload.min.css +2 -0
  258. data/vendor/assets/components/uikit/css/uikit.almost-flat.css +9043 -0
  259. data/vendor/assets/components/uikit/css/uikit.almost-flat.min.css +2 -0
  260. data/vendor/assets/components/uikit/css/uikit.css +8743 -0
  261. data/vendor/assets/components/uikit/css/uikit.gradient.css +9106 -0
  262. data/vendor/assets/components/uikit/css/uikit.gradient.min.css +2 -0
  263. data/vendor/assets/components/uikit/css/uikit.min.css +2 -0
  264. data/vendor/assets/components/uikit/fonts/FontAwesome.otf +0 -0
  265. data/vendor/assets/components/uikit/fonts/fontawesome-webfont.ttf +0 -0
  266. data/vendor/assets/components/uikit/fonts/fontawesome-webfont.woff +0 -0
  267. data/vendor/assets/components/uikit/fonts/fontawesome-webfont.woff2 +0 -0
  268. data/vendor/assets/components/uikit/js/components/accordion.js +174 -0
  269. data/vendor/assets/components/uikit/js/components/accordion.min.js +2 -0
  270. data/vendor/assets/components/uikit/js/components/autocomplete.js +334 -0
  271. data/vendor/assets/components/uikit/js/components/autocomplete.min.js +2 -0
  272. data/vendor/assets/components/uikit/js/components/datepicker.js +3166 -0
  273. data/vendor/assets/components/uikit/js/components/datepicker.min.js +3 -0
  274. data/vendor/assets/components/uikit/js/components/form-password.js +67 -0
  275. data/vendor/assets/components/uikit/js/components/form-password.min.js +2 -0
  276. data/vendor/assets/components/uikit/js/components/form-select.js +77 -0
  277. data/vendor/assets/components/uikit/js/components/form-select.min.js +2 -0
  278. data/vendor/assets/components/uikit/js/components/grid-parallax.js +168 -0
  279. data/vendor/assets/components/uikit/js/components/grid-parallax.min.js +2 -0
  280. data/vendor/assets/components/uikit/js/components/grid.js +527 -0
  281. data/vendor/assets/components/uikit/js/components/grid.min.js +2 -0
  282. data/vendor/assets/components/uikit/js/components/htmleditor.js +635 -0
  283. data/vendor/assets/components/uikit/js/components/htmleditor.min.js +2 -0
  284. data/vendor/assets/components/uikit/js/components/lightbox.js +590 -0
  285. data/vendor/assets/components/uikit/js/components/lightbox.min.js +2 -0
  286. data/vendor/assets/components/uikit/js/components/nestable.js +653 -0
  287. data/vendor/assets/components/uikit/js/components/nestable.min.js +2 -0
  288. data/vendor/assets/components/uikit/js/components/notify.js +189 -0
  289. data/vendor/assets/components/uikit/js/components/notify.min.js +2 -0
  290. data/vendor/assets/components/uikit/js/components/pagination.js +147 -0
  291. data/vendor/assets/components/uikit/js/components/pagination.min.js +2 -0
  292. data/vendor/assets/components/uikit/js/components/parallax.js +462 -0
  293. data/vendor/assets/components/uikit/js/components/parallax.min.js +2 -0
  294. data/vendor/assets/components/uikit/js/components/search.js +92 -0
  295. data/vendor/assets/components/uikit/js/components/search.min.js +2 -0
  296. data/vendor/assets/components/uikit/js/components/slider.js +540 -0
  297. data/vendor/assets/components/uikit/js/components/slider.min.js +2 -0
  298. data/vendor/assets/components/uikit/js/components/slideset.js +514 -0
  299. data/vendor/assets/components/uikit/js/components/slideset.min.js +2 -0
  300. data/vendor/assets/components/uikit/js/components/slideshow-fx.js +375 -0
  301. data/vendor/assets/components/uikit/js/components/slideshow-fx.min.js +2 -0
  302. data/vendor/assets/components/uikit/js/components/slideshow.js +562 -0
  303. data/vendor/assets/components/uikit/js/components/slideshow.min.js +2 -0
  304. data/vendor/assets/components/uikit/js/components/sortable.js +679 -0
  305. data/vendor/assets/components/uikit/js/components/sortable.min.js +2 -0
  306. data/vendor/assets/components/uikit/js/components/sticky.js +358 -0
  307. data/vendor/assets/components/uikit/js/components/sticky.min.js +2 -0
  308. data/vendor/assets/components/uikit/js/components/timepicker.js +192 -0
  309. data/vendor/assets/components/uikit/js/components/timepicker.min.js +2 -0
  310. data/vendor/assets/components/uikit/js/components/tooltip.js +234 -0
  311. data/vendor/assets/components/uikit/js/components/tooltip.min.js +2 -0
  312. data/vendor/assets/components/uikit/js/components/upload.js +260 -0
  313. data/vendor/assets/components/uikit/js/components/upload.min.js +2 -0
  314. data/vendor/assets/components/uikit/js/core/alert.js +66 -0
  315. data/vendor/assets/components/uikit/js/core/alert.min.js +2 -0
  316. data/vendor/assets/components/uikit/js/core/button.js +157 -0
  317. data/vendor/assets/components/uikit/js/core/button.min.js +2 -0
  318. data/vendor/assets/components/uikit/js/core/core.js +785 -0
  319. data/vendor/assets/components/uikit/js/core/core.min.js +2 -0
  320. data/vendor/assets/components/uikit/js/core/cover.js +95 -0
  321. data/vendor/assets/components/uikit/js/core/cover.min.js +2 -0
  322. data/vendor/assets/components/uikit/js/core/dropdown.js +525 -0
  323. data/vendor/assets/components/uikit/js/core/dropdown.min.js +2 -0
  324. data/vendor/assets/components/uikit/js/core/grid.js +117 -0
  325. data/vendor/assets/components/uikit/js/core/grid.min.js +2 -0
  326. data/vendor/assets/components/uikit/js/core/modal.js +393 -0
  327. data/vendor/assets/components/uikit/js/core/modal.min.js +2 -0
  328. data/vendor/assets/components/uikit/js/core/nav.js +136 -0
  329. data/vendor/assets/components/uikit/js/core/nav.min.js +2 -0
  330. data/vendor/assets/components/uikit/js/core/offcanvas.js +180 -0
  331. data/vendor/assets/components/uikit/js/core/offcanvas.min.js +2 -0
  332. data/vendor/assets/components/uikit/js/core/scrollspy.js +209 -0
  333. data/vendor/assets/components/uikit/js/core/scrollspy.min.js +2 -0
  334. data/vendor/assets/components/uikit/js/core/smooth-scroll.js +62 -0
  335. data/vendor/assets/components/uikit/js/core/smooth-scroll.min.js +2 -0
  336. data/vendor/assets/components/uikit/js/core/switcher.js +305 -0
  337. data/vendor/assets/components/uikit/js/core/switcher.min.js +2 -0
  338. data/vendor/assets/components/uikit/js/core/tab.js +167 -0
  339. data/vendor/assets/components/uikit/js/core/tab.min.js +2 -0
  340. data/vendor/assets/components/uikit/js/core/toggle.js +120 -0
  341. data/vendor/assets/components/uikit/js/core/toggle.min.js +2 -0
  342. data/vendor/assets/components/uikit/js/core/touch.js +175 -0
  343. data/vendor/assets/components/uikit/js/core/touch.min.js +2 -0
  344. data/vendor/assets/components/uikit/js/core/utility.js +319 -0
  345. data/vendor/assets/components/uikit/js/core/utility.min.js +2 -0
  346. data/vendor/assets/components/uikit/js/uikit.js +3811 -0
  347. data/vendor/assets/components/uikit/js/uikit.min.js +3 -0
  348. data/vendor/assets/components/uikit/less/components/accordion.less +94 -0
  349. data/vendor/assets/components/uikit/less/components/autocomplete.less +107 -0
  350. data/vendor/assets/components/uikit/less/components/datepicker.less +197 -0
  351. data/vendor/assets/components/uikit/less/components/dotnav.less +212 -0
  352. data/vendor/assets/components/uikit/less/components/form-advanced.less +128 -0
  353. data/vendor/assets/components/uikit/less/components/form-file.less +63 -0
  354. data/vendor/assets/components/uikit/less/components/form-password.less +74 -0
  355. data/vendor/assets/components/uikit/less/components/form-select.less +66 -0
  356. data/vendor/assets/components/uikit/less/components/htmleditor.less +269 -0
  357. data/vendor/assets/components/uikit/less/components/nestable.less +229 -0
  358. data/vendor/assets/components/uikit/less/components/notify.less +190 -0
  359. data/vendor/assets/components/uikit/less/components/placeholder.less +66 -0
  360. data/vendor/assets/components/uikit/less/components/progress.less +173 -0
  361. data/vendor/assets/components/uikit/less/components/search.less +309 -0
  362. data/vendor/assets/components/uikit/less/components/slidenav.less +183 -0
  363. data/vendor/assets/components/uikit/less/components/slider.less +131 -0
  364. data/vendor/assets/components/uikit/less/components/slideshow.less +208 -0
  365. data/vendor/assets/components/uikit/less/components/sortable.less +122 -0
  366. data/vendor/assets/components/uikit/less/components/sticky.less +54 -0
  367. data/vendor/assets/components/uikit/less/components/tooltip.less +177 -0
  368. data/vendor/assets/components/uikit/less/components/upload.less +34 -0
  369. data/vendor/assets/components/uikit/less/core/alert.less +141 -0
  370. data/vendor/assets/components/uikit/less/core/animation.less +599 -0
  371. data/vendor/assets/components/uikit/less/core/article.less +139 -0
  372. data/vendor/assets/components/uikit/less/core/badge.less +110 -0
  373. data/vendor/assets/components/uikit/less/core/base.less +563 -0
  374. data/vendor/assets/components/uikit/less/core/block.less +155 -0
  375. data/vendor/assets/components/uikit/less/core/breadcrumb.less +86 -0
  376. data/vendor/assets/components/uikit/less/core/button.less +406 -0
  377. data/vendor/assets/components/uikit/less/core/close.less +132 -0
  378. data/vendor/assets/components/uikit/less/core/column.less +209 -0
  379. data/vendor/assets/components/uikit/less/core/comment.less +172 -0
  380. data/vendor/assets/components/uikit/less/core/contrast.less +493 -0
  381. data/vendor/assets/components/uikit/less/core/cover.less +70 -0
  382. data/vendor/assets/components/uikit/less/core/description-list.less +71 -0
  383. data/vendor/assets/components/uikit/less/core/dropdown.less +280 -0
  384. data/vendor/assets/components/uikit/less/core/flex.less +320 -0
  385. data/vendor/assets/components/uikit/less/core/form.less +629 -0
  386. data/vendor/assets/components/uikit/less/core/grid.less +731 -0
  387. data/vendor/assets/components/uikit/less/core/icon.less +925 -0
  388. data/vendor/assets/components/uikit/less/core/list.less +102 -0
  389. data/vendor/assets/components/uikit/less/core/modal.less +343 -0
  390. data/vendor/assets/components/uikit/less/core/nav.less +468 -0
  391. data/vendor/assets/components/uikit/less/core/navbar.less +325 -0
  392. data/vendor/assets/components/uikit/less/core/offcanvas.less +168 -0
  393. data/vendor/assets/components/uikit/less/core/overlay.less +534 -0
  394. data/vendor/assets/components/uikit/less/core/pagination.less +197 -0
  395. data/vendor/assets/components/uikit/less/core/panel.less +332 -0
  396. data/vendor/assets/components/uikit/less/core/print.less +61 -0
  397. data/vendor/assets/components/uikit/less/core/subnav.less +213 -0
  398. data/vendor/assets/components/uikit/less/core/switcher.less +38 -0
  399. data/vendor/assets/components/uikit/less/core/tab.less +368 -0
  400. data/vendor/assets/components/uikit/less/core/table.less +147 -0
  401. data/vendor/assets/components/uikit/less/core/text.less +128 -0
  402. data/vendor/assets/components/uikit/less/core/thumbnail.less +122 -0
  403. data/vendor/assets/components/uikit/less/core/thumbnav.less +122 -0
  404. data/vendor/assets/components/uikit/less/core/utility.less +610 -0
  405. data/vendor/assets/components/uikit/less/core/variables.less +23 -0
  406. data/vendor/assets/components/uikit/less/uikit-variables.less +819 -0
  407. data/vendor/assets/components/uikit/less/uikit.less +52 -0
  408. data/vendor/assets/components/uikit/scss/components/accordion.scss +94 -0
  409. data/vendor/assets/components/uikit/scss/components/autocomplete.scss +107 -0
  410. data/vendor/assets/components/uikit/scss/components/datepicker.scss +197 -0
  411. data/vendor/assets/components/uikit/scss/components/dotnav.scss +212 -0
  412. data/vendor/assets/components/uikit/scss/components/form-advanced.scss +128 -0
  413. data/vendor/assets/components/uikit/scss/components/form-file.scss +63 -0
  414. data/vendor/assets/components/uikit/scss/components/form-password.scss +74 -0
  415. data/vendor/assets/components/uikit/scss/components/form-select.scss +66 -0
  416. data/vendor/assets/components/uikit/scss/components/htmleditor.scss +269 -0
  417. data/vendor/assets/components/uikit/scss/components/nestable.scss +229 -0
  418. data/vendor/assets/components/uikit/scss/components/notify.scss +190 -0
  419. data/vendor/assets/components/uikit/scss/components/placeholder.scss +66 -0
  420. data/vendor/assets/components/uikit/scss/components/progress.scss +173 -0
  421. data/vendor/assets/components/uikit/scss/components/search.scss +309 -0
  422. data/vendor/assets/components/uikit/scss/components/slidenav.scss +183 -0
  423. data/vendor/assets/components/uikit/scss/components/slider.scss +131 -0
  424. data/vendor/assets/components/uikit/scss/components/slideshow.scss +208 -0
  425. data/vendor/assets/components/uikit/scss/components/sortable.scss +122 -0
  426. data/vendor/assets/components/uikit/scss/components/sticky.scss +54 -0
  427. data/vendor/assets/components/uikit/scss/components/tooltip.scss +177 -0
  428. data/vendor/assets/components/uikit/scss/components/upload.scss +34 -0
  429. data/vendor/assets/components/uikit/scss/core/alert.scss +141 -0
  430. data/vendor/assets/components/uikit/scss/core/animation.scss +599 -0
  431. data/vendor/assets/components/uikit/scss/core/article.scss +139 -0
  432. data/vendor/assets/components/uikit/scss/core/badge.scss +110 -0
  433. data/vendor/assets/components/uikit/scss/core/base.scss +563 -0
  434. data/vendor/assets/components/uikit/scss/core/block.scss +155 -0
  435. data/vendor/assets/components/uikit/scss/core/breadcrumb.scss +86 -0
  436. data/vendor/assets/components/uikit/scss/core/button.scss +406 -0
  437. data/vendor/assets/components/uikit/scss/core/close.scss +132 -0
  438. data/vendor/assets/components/uikit/scss/core/column.scss +209 -0
  439. data/vendor/assets/components/uikit/scss/core/comment.scss +172 -0
  440. data/vendor/assets/components/uikit/scss/core/contrast.scss +493 -0
  441. data/vendor/assets/components/uikit/scss/core/cover.scss +70 -0
  442. data/vendor/assets/components/uikit/scss/core/description-list.scss +71 -0
  443. data/vendor/assets/components/uikit/scss/core/dropdown.scss +280 -0
  444. data/vendor/assets/components/uikit/scss/core/flex.scss +320 -0
  445. data/vendor/assets/components/uikit/scss/core/form.scss +629 -0
  446. data/vendor/assets/components/uikit/scss/core/grid.scss +731 -0
  447. data/vendor/assets/components/uikit/scss/core/icon.scss +925 -0
  448. data/vendor/assets/components/uikit/scss/core/list.scss +102 -0
  449. data/vendor/assets/components/uikit/scss/core/modal.scss +343 -0
  450. data/vendor/assets/components/uikit/scss/core/nav.scss +468 -0
  451. data/vendor/assets/components/uikit/scss/core/navbar.scss +325 -0
  452. data/vendor/assets/components/uikit/scss/core/offcanvas.scss +168 -0
  453. data/vendor/assets/components/uikit/scss/core/overlay.scss +534 -0
  454. data/vendor/assets/components/uikit/scss/core/pagination.scss +197 -0
  455. data/vendor/assets/components/uikit/scss/core/panel.scss +332 -0
  456. data/vendor/assets/components/uikit/scss/core/print.scss +61 -0
  457. data/vendor/assets/components/uikit/scss/core/subnav.scss +213 -0
  458. data/vendor/assets/components/uikit/scss/core/switcher.scss +38 -0
  459. data/vendor/assets/components/uikit/scss/core/tab.scss +368 -0
  460. data/vendor/assets/components/uikit/scss/core/table.scss +147 -0
  461. data/vendor/assets/components/uikit/scss/core/text.scss +128 -0
  462. data/vendor/assets/components/uikit/scss/core/thumbnail.scss +122 -0
  463. data/vendor/assets/components/uikit/scss/core/thumbnav.scss +122 -0
  464. data/vendor/assets/components/uikit/scss/core/utility.scss +610 -0
  465. data/vendor/assets/components/uikit/scss/core/variables.scss +23 -0
  466. data/vendor/assets/components/uikit/scss/uikit-mixins.scss +327 -0
  467. data/vendor/assets/components/uikit/scss/uikit-variables.scss +819 -0
  468. data/vendor/assets/components/uikit/scss/uikit.scss +52 -0
  469. metadata +567 -0
@@ -0,0 +1,2 @@
1
+ /*! UIkit 2.26.3 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
2
+ !function(t){"use strict";var i=[];t.component("stackMargin",{defaults:{cls:"uk-margin-small-top",rowfirst:!1,observe:!1},boot:function(){t.ready(function(i){t.$("[data-uk-margin]",i).each(function(){var i=t.$(this);i.data("stackMargin")||t.stackMargin(i,t.Utils.options(i.attr("data-uk-margin")))})})},init:function(){var n=this;t.$win.on("resize orientationchange",function(){var i=function(){n.process()};return t.$(function(){i(),t.$win.on("load",i)}),t.Utils.debounce(i,20)}()),this.on("display.uk.check",function(){this.element.is(":visible")&&this.process()}.bind(this)),this.options.observe&&t.domObserve(this.element,function(){n.element.is(":visible")&&n.process()}),i.push(this)},process:function(){var i=this.element.children();if(t.Utils.stackMargin(i,this.options),!this.options.rowfirst||!i.length)return this;var n={},e=!1;return i.removeClass(this.options.rowfirst).each(function(i,s){s=t.$(this),"none"!=this.style.display&&(i=s.offset().left,((n[i]=n[i]||[])&&n[i]).push(this),e=e===!1?i:Math.min(e,i))}),t.$(n[e]).addClass(this.options.rowfirst),this}}),function(){var i=[],n=function(t){if(t.is(":visible")){var i=t.parent().width(),n=t.data("width"),e=i/n,s=Math.floor(e*t.data("height"));t.css({height:n>i?s:t.data("height")})}};t.component("responsiveElement",{defaults:{},boot:function(){t.ready(function(i){t.$("iframe.uk-responsive-width, [data-uk-responsive]",i).each(function(){var i,n=t.$(this);n.data("responsiveElement")||(i=t.responsiveElement(n,{}))})})},init:function(){var t=this.element;t.attr("width")&&t.attr("height")&&(t.data({width:t.attr("width"),height:t.attr("height")}).on("display.uk.check",function(){n(t)}),n(t),i.push(t))}}),t.$win.on("resize load",t.Utils.debounce(function(){i.forEach(function(t){n(t)})},15))}(),t.Utils.stackMargin=function(i,n){n=t.$.extend({cls:"uk-margin-small-top"},n),i=t.$(i).removeClass(n.cls);var e=!1;i.each(function(i,n,s,a){a=t.$(this),"none"!=a.css("display")&&(i=a.offset(),n=a.outerHeight(),s=i.top+n,a.data({ukMarginPos:s,ukMarginTop:i.top}),(e===!1||i.top<e.top)&&(e={top:i.top,left:i.left,pos:s}))}).each(function(i){i=t.$(this),"none"!=i.css("display")&&i.data("ukMarginTop")>e.top&&i.data("ukMarginPos")>e.pos&&i.addClass(n.cls)})},t.Utils.matchHeights=function(i,n){i=t.$(i).css("min-height",""),n=t.$.extend({row:!0},n);var e=function(i){if(!(i.length<2)){var n=0;i.each(function(){n=Math.max(n,t.$(this).outerHeight())}).each(function(){var i=t.$(this),e=n-("border-box"==i.css("box-sizing")?0:i.outerHeight()-i.height());i.css("min-height",e+"px")})}};n.row?(i.first().width(),setTimeout(function(){var n=!1,s=[];i.each(function(){var i=t.$(this),a=i.offset().top;a!=n&&s.length&&(e(t.$(s)),s=[],a=i.offset().top),s.push(i),n=a}),s.length&&e(t.$(s))},0)):e(i)},function(i){t.Utils.inlineSvg=function(n,e){t.$(n||'img[src$=".svg"]',e||document).each(function(){var n=t.$(this),e=n.attr("src");if(!i[e]){var s=t.$.Deferred();t.$.get(e,{nc:Math.random()},function(i){s.resolve(t.$(i).find("svg"))}),i[e]=s.promise()}i[e].then(function(i){var e=t.$(i).clone();n.attr("id")&&e.attr("id",n.attr("id")),n.attr("class")&&e.attr("class",n.attr("class")),n.attr("style")&&e.attr("style",n.attr("style")),n.attr("width")&&(e.attr("width",n.attr("width")),n.attr("height")||e.removeAttr("height")),n.attr("height")&&(e.attr("height",n.attr("height")),n.attr("width")||e.removeAttr("width")),n.replaceWith(e)})})},t.ready(function(i){t.Utils.inlineSvg("[data-uk-svg]",i)})}({})}(UIkit);
@@ -0,0 +1,3811 @@
1
+ /*! UIkit 2.26.3 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
2
+ (function(core) {
3
+
4
+ if (typeof define == "function" && define.amd) { // AMD
5
+
6
+ define("uikit", function(){
7
+
8
+ var uikit = window.UIkit || core(window, window.jQuery, window.document);
9
+
10
+ uikit.load = function(res, req, onload, config) {
11
+
12
+ var resources = res.split(','), load = [], i, base = (config.config && config.config.uikit && config.config.uikit.base ? config.config.uikit.base : "").replace(/\/+$/g, "");
13
+
14
+ if (!base) {
15
+ throw new Error( "Please define base path to UIkit in the requirejs config." );
16
+ }
17
+
18
+ for (i = 0; i < resources.length; i += 1) {
19
+ var resource = resources[i].replace(/\./g, '/');
20
+ load.push(base+'/components/'+resource);
21
+ }
22
+
23
+ req(load, function() {
24
+ onload(uikit);
25
+ });
26
+ };
27
+
28
+ return uikit;
29
+ });
30
+ }
31
+
32
+ if (!window.jQuery) {
33
+ throw new Error( "UIkit requires jQuery" );
34
+ }
35
+
36
+ if (window && window.jQuery) {
37
+ core(window, window.jQuery, window.document);
38
+ }
39
+
40
+
41
+ })(function(global, $, doc) {
42
+
43
+ "use strict";
44
+
45
+ var UI = {}, _UI = global.UIkit ? Object.create(global.UIkit) : undefined;
46
+
47
+ UI.version = '2.26.3';
48
+
49
+ UI.noConflict = function() {
50
+ // restore UIkit version
51
+ if (_UI) {
52
+ global.UIkit = _UI;
53
+ $.UIkit = _UI;
54
+ $.fn.uk = _UI.fn;
55
+ }
56
+
57
+ return UI;
58
+ };
59
+
60
+ UI.prefix = function(str) {
61
+ return str;
62
+ };
63
+
64
+ // cache jQuery
65
+ UI.$ = $;
66
+
67
+ UI.$doc = UI.$(document);
68
+ UI.$win = UI.$(window);
69
+ UI.$html = UI.$('html');
70
+
71
+ UI.support = {};
72
+ UI.support.transition = (function() {
73
+
74
+ var transitionEnd = (function() {
75
+
76
+ var element = doc.body || doc.documentElement,
77
+ transEndEventNames = {
78
+ WebkitTransition : 'webkitTransitionEnd',
79
+ MozTransition : 'transitionend',
80
+ OTransition : 'oTransitionEnd otransitionend',
81
+ transition : 'transitionend'
82
+ }, name;
83
+
84
+ for (name in transEndEventNames) {
85
+ if (element.style[name] !== undefined) return transEndEventNames[name];
86
+ }
87
+ }());
88
+
89
+ return transitionEnd && { end: transitionEnd };
90
+ })();
91
+
92
+ UI.support.animation = (function() {
93
+
94
+ var animationEnd = (function() {
95
+
96
+ var element = doc.body || doc.documentElement,
97
+ animEndEventNames = {
98
+ WebkitAnimation : 'webkitAnimationEnd',
99
+ MozAnimation : 'animationend',
100
+ OAnimation : 'oAnimationEnd oanimationend',
101
+ animation : 'animationend'
102
+ }, name;
103
+
104
+ for (name in animEndEventNames) {
105
+ if (element.style[name] !== undefined) return animEndEventNames[name];
106
+ }
107
+ }());
108
+
109
+ return animationEnd && { end: animationEnd };
110
+ })();
111
+
112
+ // requestAnimationFrame polyfill
113
+ //https://github.com/darius/requestAnimationFrame
114
+ (function() {
115
+
116
+ Date.now = Date.now || function() { return new Date().getTime(); };
117
+
118
+ var vendors = ['webkit', 'moz'];
119
+ for (var i = 0; i < vendors.length && !window.requestAnimationFrame; ++i) {
120
+ var vp = vendors[i];
121
+ window.requestAnimationFrame = window[vp+'RequestAnimationFrame'];
122
+ window.cancelAnimationFrame = (window[vp+'CancelAnimationFrame']
123
+ || window[vp+'CancelRequestAnimationFrame']);
124
+ }
125
+ if (/iP(ad|hone|od).*OS 6/.test(window.navigator.userAgent) // iOS6 is buggy
126
+ || !window.requestAnimationFrame || !window.cancelAnimationFrame) {
127
+ var lastTime = 0;
128
+ window.requestAnimationFrame = function(callback) {
129
+ var now = Date.now();
130
+ var nextTime = Math.max(lastTime + 16, now);
131
+ return setTimeout(function() { callback(lastTime = nextTime); },
132
+ nextTime - now);
133
+ };
134
+ window.cancelAnimationFrame = clearTimeout;
135
+ }
136
+ }());
137
+
138
+ UI.support.touch = (
139
+ ('ontouchstart' in document) ||
140
+ (global.DocumentTouch && document instanceof global.DocumentTouch) ||
141
+ (global.navigator.msPointerEnabled && global.navigator.msMaxTouchPoints > 0) || //IE 10
142
+ (global.navigator.pointerEnabled && global.navigator.maxTouchPoints > 0) || //IE >=11
143
+ false
144
+ );
145
+
146
+ UI.support.mutationobserver = (global.MutationObserver || global.WebKitMutationObserver || null);
147
+
148
+ UI.Utils = {};
149
+
150
+ UI.Utils.isFullscreen = function() {
151
+ return document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement || document.fullscreenElement || false;
152
+ };
153
+
154
+ UI.Utils.str2json = function(str, notevil) {
155
+ try {
156
+ if (notevil) {
157
+ return JSON.parse(str
158
+ // wrap keys without quote with valid double quote
159
+ .replace(/([\$\w]+)\s*:/g, function(_, $1){return '"'+$1+'":';})
160
+ // replacing single quote wrapped ones to double quote
161
+ .replace(/'([^']+)'/g, function(_, $1){return '"'+$1+'"';})
162
+ );
163
+ } else {
164
+ return (new Function("", "var json = " + str + "; return JSON.parse(JSON.stringify(json));"))();
165
+ }
166
+ } catch(e) { return false; }
167
+ };
168
+
169
+ UI.Utils.debounce = function(func, wait, immediate) {
170
+ var timeout;
171
+ return function() {
172
+ var context = this, args = arguments;
173
+ var later = function() {
174
+ timeout = null;
175
+ if (!immediate) func.apply(context, args);
176
+ };
177
+ var callNow = immediate && !timeout;
178
+ clearTimeout(timeout);
179
+ timeout = setTimeout(later, wait);
180
+ if (callNow) func.apply(context, args);
181
+ };
182
+ };
183
+
184
+ UI.Utils.throttle = function (func, limit) {
185
+ var wait = false;
186
+ return function () {
187
+ if (!wait) {
188
+ func.call();
189
+ wait = true;
190
+ setTimeout(function () {
191
+ wait = false;
192
+ }, limit);
193
+ }
194
+ }
195
+ };
196
+
197
+ UI.Utils.removeCssRules = function(selectorRegEx) {
198
+ var idx, idxs, stylesheet, _i, _j, _k, _len, _len1, _len2, _ref;
199
+
200
+ if(!selectorRegEx) return;
201
+
202
+ setTimeout(function(){
203
+ try {
204
+ _ref = document.styleSheets;
205
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
206
+ stylesheet = _ref[_i];
207
+ idxs = [];
208
+ stylesheet.cssRules = stylesheet.cssRules;
209
+ for (idx = _j = 0, _len1 = stylesheet.cssRules.length; _j < _len1; idx = ++_j) {
210
+ if (stylesheet.cssRules[idx].type === CSSRule.STYLE_RULE && selectorRegEx.test(stylesheet.cssRules[idx].selectorText)) {
211
+ idxs.unshift(idx);
212
+ }
213
+ }
214
+ for (_k = 0, _len2 = idxs.length; _k < _len2; _k++) {
215
+ stylesheet.deleteRule(idxs[_k]);
216
+ }
217
+ }
218
+ } catch (_error) {}
219
+ }, 0);
220
+ };
221
+
222
+ UI.Utils.isInView = function(element, options) {
223
+
224
+ var $element = $(element);
225
+
226
+ if (!$element.is(':visible')) {
227
+ return false;
228
+ }
229
+
230
+ var window_left = UI.$win.scrollLeft(), window_top = UI.$win.scrollTop(), offset = $element.offset(), left = offset.left, top = offset.top;
231
+
232
+ options = $.extend({topoffset:0, leftoffset:0}, options);
233
+
234
+ if (top + $element.height() >= window_top && top - options.topoffset <= window_top + UI.$win.height() &&
235
+ left + $element.width() >= window_left && left - options.leftoffset <= window_left + UI.$win.width()) {
236
+ return true;
237
+ } else {
238
+ return false;
239
+ }
240
+ };
241
+
242
+ UI.Utils.checkDisplay = function(context, initanimation) {
243
+
244
+ var elements = UI.$('[data-uk-margin], [data-uk-grid-match], [data-uk-grid-margin], [data-uk-check-display]', context || document), animated;
245
+
246
+ if (context && !elements.length) {
247
+ elements = $(context);
248
+ }
249
+
250
+ elements.trigger('display.uk.check');
251
+
252
+ // fix firefox / IE animations
253
+ if (initanimation) {
254
+
255
+ if (typeof(initanimation)!='string') {
256
+ initanimation = '[class*="uk-animation-"]';
257
+ }
258
+
259
+ elements.find(initanimation).each(function(){
260
+
261
+ var ele = UI.$(this),
262
+ cls = ele.attr('class'),
263
+ anim = cls.match(/uk\-animation\-(.+)/);
264
+
265
+ ele.removeClass(anim[0]).width();
266
+
267
+ ele.addClass(anim[0]);
268
+ });
269
+ }
270
+
271
+ return elements;
272
+ };
273
+
274
+ UI.Utils.options = function(string) {
275
+
276
+ if ($.type(string)!='string') return string;
277
+
278
+ if (string.indexOf(':') != -1 && string.trim().substr(-1) != '}') {
279
+ string = '{'+string+'}';
280
+ }
281
+
282
+ var start = (string ? string.indexOf("{") : -1), options = {};
283
+
284
+ if (start != -1) {
285
+ try {
286
+ options = UI.Utils.str2json(string.substr(start));
287
+ } catch (e) {}
288
+ }
289
+
290
+ return options;
291
+ };
292
+
293
+ UI.Utils.animate = function(element, cls) {
294
+
295
+ var d = $.Deferred();
296
+
297
+ element = UI.$(element);
298
+
299
+ element.css('display', 'none').addClass(cls).one(UI.support.animation.end, function() {
300
+ element.removeClass(cls);
301
+ d.resolve();
302
+ });
303
+
304
+ element.css('display', '');
305
+
306
+ return d.promise();
307
+ };
308
+
309
+ UI.Utils.uid = function(prefix) {
310
+ return (prefix || 'id') + (new Date().getTime())+"RAND"+(Math.ceil(Math.random() * 100000));
311
+ };
312
+
313
+ UI.Utils.template = function(str, data) {
314
+
315
+ var tokens = str.replace(/\n/g, '\\n').replace(/\{\{\{\s*(.+?)\s*\}\}\}/g, "{{!$1}}").split(/(\{\{\s*(.+?)\s*\}\})/g),
316
+ i=0, toc, cmd, prop, val, fn, output = [], openblocks = 0;
317
+
318
+ while(i < tokens.length) {
319
+
320
+ toc = tokens[i];
321
+
322
+ if(toc.match(/\{\{\s*(.+?)\s*\}\}/)) {
323
+ i = i + 1;
324
+ toc = tokens[i];
325
+ cmd = toc[0];
326
+ prop = toc.substring(toc.match(/^(\^|\#|\!|\~|\:)/) ? 1:0);
327
+
328
+ switch(cmd) {
329
+ case '~':
330
+ output.push("for(var $i=0;$i<"+prop+".length;$i++) { var $item = "+prop+"[$i];");
331
+ openblocks++;
332
+ break;
333
+ case ':':
334
+ output.push("for(var $key in "+prop+") { var $val = "+prop+"[$key];");
335
+ openblocks++;
336
+ break;
337
+ case '#':
338
+ output.push("if("+prop+") {");
339
+ openblocks++;
340
+ break;
341
+ case '^':
342
+ output.push("if(!"+prop+") {");
343
+ openblocks++;
344
+ break;
345
+ case '/':
346
+ output.push("}");
347
+ openblocks--;
348
+ break;
349
+ case '!':
350
+ output.push("__ret.push("+prop+");");
351
+ break;
352
+ default:
353
+ output.push("__ret.push(escape("+prop+"));");
354
+ break;
355
+ }
356
+ } else {
357
+ output.push("__ret.push('"+toc.replace(/\'/g, "\\'")+"');");
358
+ }
359
+ i = i + 1;
360
+ }
361
+
362
+ fn = new Function('$data', [
363
+ 'var __ret = [];',
364
+ 'try {',
365
+ 'with($data){', (!openblocks ? output.join('') : '__ret = ["Not all blocks are closed correctly."]'), '};',
366
+ '}catch(e){__ret = [e.message];}',
367
+ 'return __ret.join("").replace(/\\n\\n/g, "\\n");',
368
+ "function escape(html) { return String(html).replace(/&/g, '&amp;').replace(/\"/g, '&quot;').replace(/</g, '&lt;').replace(/>/g, '&gt;');}"
369
+ ].join("\n"));
370
+
371
+ return data ? fn(data) : fn;
372
+ };
373
+
374
+ UI.Utils.events = {};
375
+ UI.Utils.events.click = UI.support.touch ? 'tap' : 'click';
376
+
377
+ global.UIkit = UI;
378
+
379
+ // deprecated
380
+
381
+ UI.fn = function(command, options) {
382
+
383
+ var args = arguments, cmd = command.match(/^([a-z\-]+)(?:\.([a-z]+))?/i), component = cmd[1], method = cmd[2];
384
+
385
+ if (!UI[component]) {
386
+ $.error("UIkit component [" + component + "] does not exist.");
387
+ return this;
388
+ }
389
+
390
+ return this.each(function() {
391
+ var $this = $(this), data = $this.data(component);
392
+ if (!data) $this.data(component, (data = UI[component](this, method ? undefined : options)));
393
+ if (method) data[method].apply(data, Array.prototype.slice.call(args, 1));
394
+ });
395
+ };
396
+
397
+ $.UIkit = UI;
398
+ $.fn.uk = UI.fn;
399
+
400
+ UI.langdirection = UI.$html.attr("dir") == "rtl" ? "right" : "left";
401
+
402
+ UI.components = {};
403
+
404
+ UI.component = function(name, def) {
405
+
406
+ var fn = function(element, options) {
407
+
408
+ var $this = this;
409
+
410
+ this.UIkit = UI;
411
+ this.element = element ? UI.$(element) : null;
412
+ this.options = $.extend(true, {}, this.defaults, options);
413
+ this.plugins = {};
414
+
415
+ if (this.element) {
416
+ this.element.data(name, this);
417
+ }
418
+
419
+ this.init();
420
+
421
+ (this.options.plugins.length ? this.options.plugins : Object.keys(fn.plugins)).forEach(function(plugin) {
422
+
423
+ if (fn.plugins[plugin].init) {
424
+ fn.plugins[plugin].init($this);
425
+ $this.plugins[plugin] = true;
426
+ }
427
+
428
+ });
429
+
430
+ this.trigger('init.uk.component', [name, this]);
431
+
432
+ return this;
433
+ };
434
+
435
+ fn.plugins = {};
436
+
437
+ $.extend(true, fn.prototype, {
438
+
439
+ defaults : {plugins: []},
440
+
441
+ boot: function(){},
442
+ init: function(){},
443
+
444
+ on: function(a1,a2,a3){
445
+ return UI.$(this.element || this).on(a1,a2,a3);
446
+ },
447
+
448
+ one: function(a1,a2,a3){
449
+ return UI.$(this.element || this).one(a1,a2,a3);
450
+ },
451
+
452
+ off: function(evt){
453
+ return UI.$(this.element || this).off(evt);
454
+ },
455
+
456
+ trigger: function(evt, params) {
457
+ return UI.$(this.element || this).trigger(evt, params);
458
+ },
459
+
460
+ find: function(selector) {
461
+ return UI.$(this.element ? this.element: []).find(selector);
462
+ },
463
+
464
+ proxy: function(obj, methods) {
465
+
466
+ var $this = this;
467
+
468
+ methods.split(' ').forEach(function(method) {
469
+ if (!$this[method]) $this[method] = function() { return obj[method].apply(obj, arguments); };
470
+ });
471
+ },
472
+
473
+ mixin: function(obj, methods) {
474
+
475
+ var $this = this;
476
+
477
+ methods.split(' ').forEach(function(method) {
478
+ if (!$this[method]) $this[method] = obj[method].bind($this);
479
+ });
480
+ },
481
+
482
+ option: function() {
483
+
484
+ if (arguments.length == 1) {
485
+ return this.options[arguments[0]] || undefined;
486
+ } else if (arguments.length == 2) {
487
+ this.options[arguments[0]] = arguments[1];
488
+ }
489
+ }
490
+
491
+ }, def);
492
+
493
+ this.components[name] = fn;
494
+
495
+ this[name] = function() {
496
+
497
+ var element, options;
498
+
499
+ if (arguments.length) {
500
+
501
+ switch(arguments.length) {
502
+ case 1:
503
+
504
+ if (typeof arguments[0] === "string" || arguments[0].nodeType || arguments[0] instanceof jQuery) {
505
+ element = $(arguments[0]);
506
+ } else {
507
+ options = arguments[0];
508
+ }
509
+
510
+ break;
511
+ case 2:
512
+
513
+ element = $(arguments[0]);
514
+ options = arguments[1];
515
+ break;
516
+ }
517
+ }
518
+
519
+ if (element && element.data(name)) {
520
+ return element.data(name);
521
+ }
522
+
523
+ return (new UI.components[name](element, options));
524
+ };
525
+
526
+ if (UI.domready) {
527
+ UI.component.boot(name);
528
+ }
529
+
530
+ return fn;
531
+ };
532
+
533
+ UI.plugin = function(component, name, def) {
534
+ this.components[component].plugins[name] = def;
535
+ };
536
+
537
+ UI.component.boot = function(name) {
538
+
539
+ if (UI.components[name].prototype && UI.components[name].prototype.boot && !UI.components[name].booted) {
540
+ UI.components[name].prototype.boot.apply(UI, []);
541
+ UI.components[name].booted = true;
542
+ }
543
+ };
544
+
545
+ UI.component.bootComponents = function() {
546
+
547
+ for (var component in UI.components) {
548
+ UI.component.boot(component);
549
+ }
550
+ };
551
+
552
+
553
+ // DOM mutation save ready helper function
554
+
555
+ UI.domObservers = [];
556
+ UI.domready = false;
557
+
558
+ UI.ready = function(fn) {
559
+
560
+ UI.domObservers.push(fn);
561
+
562
+ if (UI.domready) {
563
+ fn(document);
564
+ }
565
+ };
566
+
567
+ UI.on = function(a1,a2,a3){
568
+
569
+ if (a1 && a1.indexOf('ready.uk.dom') > -1 && UI.domready) {
570
+ a2.apply(UI.$doc);
571
+ }
572
+
573
+ return UI.$doc.on(a1,a2,a3);
574
+ };
575
+
576
+ UI.one = function(a1,a2,a3){
577
+
578
+ if (a1 && a1.indexOf('ready.uk.dom') > -1 && UI.domready) {
579
+ a2.apply(UI.$doc);
580
+ return UI.$doc;
581
+ }
582
+
583
+ return UI.$doc.one(a1,a2,a3);
584
+ };
585
+
586
+ UI.trigger = function(evt, params) {
587
+ return UI.$doc.trigger(evt, params);
588
+ };
589
+
590
+ UI.domObserve = function(selector, fn) {
591
+
592
+ if(!UI.support.mutationobserver) return;
593
+
594
+ fn = fn || function() {};
595
+
596
+ UI.$(selector).each(function() {
597
+
598
+ var element = this,
599
+ $element = UI.$(element);
600
+
601
+ if ($element.data('observer')) {
602
+ return;
603
+ }
604
+
605
+ try {
606
+
607
+ var observer = new UI.support.mutationobserver(UI.Utils.debounce(function(mutations) {
608
+ fn.apply(element, []);
609
+ $element.trigger('changed.uk.dom');
610
+ }, 50), {childList: true, subtree: true});
611
+
612
+ // pass in the target node, as well as the observer options
613
+ observer.observe(element, { childList: true, subtree: true });
614
+
615
+ $element.data('observer', observer);
616
+
617
+ } catch(e) {}
618
+ });
619
+ };
620
+
621
+ UI.init = function(root) {
622
+
623
+ root = root || document;
624
+
625
+ UI.domObservers.forEach(function(fn){
626
+ fn(root);
627
+ });
628
+ };
629
+
630
+ UI.on('domready.uk.dom', function(){
631
+
632
+ UI.init();
633
+
634
+ if (UI.domready) UI.Utils.checkDisplay();
635
+ });
636
+
637
+ document.addEventListener('DOMContentLoaded', function(){
638
+
639
+ var domReady = function() {
640
+
641
+ UI.$body = UI.$('body');
642
+
643
+ UI.trigger('beforeready.uk.dom');
644
+
645
+ UI.component.bootComponents();
646
+
647
+ // custom scroll observer
648
+ requestAnimationFrame((function(){
649
+
650
+ var memory = {dir: {x:0, y:0}, x: window.pageXOffset, y:window.pageYOffset};
651
+
652
+ var fn = function(){
653
+ // reading this (window.page[X|Y]Offset) causes a full page recalc of the layout in Chrome,
654
+ // so we only want to do this once
655
+ var wpxo = window.pageXOffset;
656
+ var wpyo = window.pageYOffset;
657
+
658
+ // Did the scroll position change since the last time we were here?
659
+ if (memory.x != wpxo || memory.y != wpyo) {
660
+
661
+ // Set the direction of the scroll and store the new position
662
+ if (wpxo != memory.x) {memory.dir.x = wpxo > memory.x ? 1:-1; } else { memory.dir.x = 0; }
663
+ if (wpyo != memory.y) {memory.dir.y = wpyo > memory.y ? 1:-1; } else { memory.dir.y = 0; }
664
+
665
+ memory.x = wpxo;
666
+ memory.y = wpyo;
667
+
668
+ // Trigger the scroll event, this could probably be sent using memory.clone() but this is
669
+ // more explicit and easier to see exactly what is being sent in the event.
670
+ UI.$doc.trigger('scrolling.uk.document', [{
671
+ "dir": {"x": memory.dir.x, "y": memory.dir.y}, "x": wpxo, "y": wpyo
672
+ }]);
673
+ }
674
+
675
+ requestAnimationFrame(fn);
676
+ };
677
+
678
+ if (UI.support.touch) {
679
+ UI.$html.on('touchmove touchend MSPointerMove MSPointerUp pointermove pointerup', fn);
680
+ }
681
+
682
+ if (memory.x || memory.y) fn();
683
+
684
+ return fn;
685
+
686
+ })());
687
+
688
+ // run component init functions on dom
689
+ UI.trigger('domready.uk.dom');
690
+
691
+ if (UI.support.touch) {
692
+
693
+ // remove css hover rules for touch devices
694
+ // UI.Utils.removeCssRules(/\.uk-(?!navbar).*:hover/);
695
+
696
+ // viewport unit fix for uk-height-viewport - should be fixed in iOS 8
697
+ if (navigator.userAgent.match(/(iPad|iPhone|iPod)/g)) {
698
+
699
+ UI.$win.on('load orientationchange resize', UI.Utils.debounce((function(){
700
+
701
+ var fn = function() {
702
+ $('.uk-height-viewport').css('height', window.innerHeight);
703
+ return fn;
704
+ };
705
+
706
+ return fn();
707
+
708
+ })(), 100));
709
+ }
710
+ }
711
+
712
+ UI.trigger('afterready.uk.dom');
713
+
714
+ // mark that domready is left behind
715
+ UI.domready = true;
716
+
717
+ // auto init js components
718
+ if (UI.support.mutationobserver) {
719
+
720
+ var initFn = UI.Utils.debounce(function(){
721
+ requestAnimationFrame(function(){ UI.init(document.body);});
722
+ }, 10);
723
+
724
+ (new UI.support.mutationobserver(function(mutations) {
725
+
726
+ var init = false;
727
+
728
+ mutations.every(function(mutation){
729
+
730
+ if (mutation.type != 'childList') return true;
731
+
732
+ for (var i = 0, node; i < mutation.addedNodes.length; ++i) {
733
+
734
+ node = mutation.addedNodes[i];
735
+
736
+ if (node.outerHTML && node.outerHTML.indexOf('data-uk-') !== -1) {
737
+ return (init = true) && false;
738
+ }
739
+ }
740
+ return true;
741
+ });
742
+
743
+ if (init) initFn();
744
+
745
+ })).observe(document.body, {childList: true, subtree: true});
746
+ }
747
+ };
748
+
749
+ if (document.readyState == 'complete' || document.readyState == 'interactive') {
750
+ setTimeout(domReady);
751
+ }
752
+
753
+ return domReady;
754
+
755
+ }());
756
+
757
+ // add touch identifier class
758
+ UI.$html.addClass(UI.support.touch ? "uk-touch" : "uk-notouch");
759
+
760
+ // add uk-hover class on tap to support overlays on touch devices
761
+ if (UI.support.touch) {
762
+
763
+ var hoverset = false,
764
+ exclude,
765
+ hovercls = 'uk-hover',
766
+ selector = '.uk-overlay, .uk-overlay-hover, .uk-overlay-toggle, .uk-animation-hover, .uk-has-hover';
767
+
768
+ UI.$html.on('mouseenter touchstart MSPointerDown pointerdown', selector, function() {
769
+
770
+ if (hoverset) $('.'+hovercls).removeClass(hovercls);
771
+
772
+ hoverset = $(this).addClass(hovercls);
773
+
774
+ }).on('mouseleave touchend MSPointerUp pointerup', function(e) {
775
+
776
+ exclude = $(e.target).parents(selector);
777
+
778
+ if (hoverset) {
779
+ hoverset.not(exclude).removeClass(hovercls);
780
+ }
781
+ });
782
+ }
783
+
784
+ return UI;
785
+ });
786
+
787
+ // Based on Zeptos touch.js
788
+ // https://raw.github.com/madrobby/zepto/master/src/touch.js
789
+ // Zepto.js may be freely distributed under the MIT license.
790
+
791
+ ;(function($){
792
+
793
+ if ($.fn.swipeLeft) {
794
+ return;
795
+ }
796
+
797
+
798
+ var touch = {}, touchTimeout, tapTimeout, swipeTimeout, longTapTimeout, longTapDelay = 750, gesture;
799
+
800
+ function swipeDirection(x1, x2, y1, y2) {
801
+ return Math.abs(x1 - x2) >= Math.abs(y1 - y2) ? (x1 - x2 > 0 ? 'Left' : 'Right') : (y1 - y2 > 0 ? 'Up' : 'Down');
802
+ }
803
+
804
+ function longTap() {
805
+ longTapTimeout = null;
806
+ if (touch.last) {
807
+ if ( touch.el !== undefined ) touch.el.trigger('longTap');
808
+ touch = {};
809
+ }
810
+ }
811
+
812
+ function cancelLongTap() {
813
+ if (longTapTimeout) clearTimeout(longTapTimeout);
814
+ longTapTimeout = null;
815
+ }
816
+
817
+ function cancelAll() {
818
+ if (touchTimeout) clearTimeout(touchTimeout);
819
+ if (tapTimeout) clearTimeout(tapTimeout);
820
+ if (swipeTimeout) clearTimeout(swipeTimeout);
821
+ if (longTapTimeout) clearTimeout(longTapTimeout);
822
+ touchTimeout = tapTimeout = swipeTimeout = longTapTimeout = null;
823
+ touch = {};
824
+ }
825
+
826
+ function isPrimaryTouch(event){
827
+ return event.pointerType == event.MSPOINTER_TYPE_TOUCH && event.isPrimary;
828
+ }
829
+
830
+ $(function(){
831
+ var now, delta, deltaX = 0, deltaY = 0, firstTouch;
832
+
833
+ if ('MSGesture' in window) {
834
+ gesture = new MSGesture();
835
+ gesture.target = document.body;
836
+ }
837
+
838
+ $(document)
839
+ .on('MSGestureEnd gestureend', function(e){
840
+
841
+ var swipeDirectionFromVelocity = e.originalEvent.velocityX > 1 ? 'Right' : e.originalEvent.velocityX < -1 ? 'Left' : e.originalEvent.velocityY > 1 ? 'Down' : e.originalEvent.velocityY < -1 ? 'Up' : null;
842
+
843
+ if (swipeDirectionFromVelocity && touch.el !== undefined) {
844
+ touch.el.trigger('swipe');
845
+ touch.el.trigger('swipe'+ swipeDirectionFromVelocity);
846
+ }
847
+ })
848
+ // MSPointerDown: for IE10
849
+ // pointerdown: for IE11
850
+ .on('touchstart MSPointerDown pointerdown', function(e){
851
+
852
+ if(e.type == 'MSPointerDown' && !isPrimaryTouch(e.originalEvent)) return;
853
+
854
+ firstTouch = (e.type == 'MSPointerDown' || e.type == 'pointerdown') ? e : e.originalEvent.touches[0];
855
+
856
+ now = Date.now();
857
+ delta = now - (touch.last || now);
858
+ touch.el = $('tagName' in firstTouch.target ? firstTouch.target : firstTouch.target.parentNode);
859
+
860
+ if(touchTimeout) clearTimeout(touchTimeout);
861
+
862
+ touch.x1 = firstTouch.pageX;
863
+ touch.y1 = firstTouch.pageY;
864
+
865
+ if (delta > 0 && delta <= 250) touch.isDoubleTap = true;
866
+
867
+ touch.last = now;
868
+ longTapTimeout = setTimeout(longTap, longTapDelay);
869
+
870
+ // adds the current touch contact for IE gesture recognition
871
+ if (gesture && ( e.type == 'MSPointerDown' || e.type == 'pointerdown' || e.type == 'touchstart' ) ) {
872
+ gesture.addPointer(e.originalEvent.pointerId);
873
+ }
874
+
875
+ })
876
+ // MSPointerMove: for IE10
877
+ // pointermove: for IE11
878
+ .on('touchmove MSPointerMove pointermove', function(e){
879
+
880
+ if (e.type == 'MSPointerMove' && !isPrimaryTouch(e.originalEvent)) return;
881
+
882
+ firstTouch = (e.type == 'MSPointerMove' || e.type == 'pointermove') ? e : e.originalEvent.touches[0];
883
+
884
+ cancelLongTap();
885
+ touch.x2 = firstTouch.pageX;
886
+ touch.y2 = firstTouch.pageY;
887
+
888
+ deltaX += Math.abs(touch.x1 - touch.x2);
889
+ deltaY += Math.abs(touch.y1 - touch.y2);
890
+ })
891
+ // MSPointerUp: for IE10
892
+ // pointerup: for IE11
893
+ .on('touchend MSPointerUp pointerup', function(e){
894
+
895
+ if (e.type == 'MSPointerUp' && !isPrimaryTouch(e.originalEvent)) return;
896
+
897
+ cancelLongTap();
898
+
899
+ // swipe
900
+ if ((touch.x2 && Math.abs(touch.x1 - touch.x2) > 30) || (touch.y2 && Math.abs(touch.y1 - touch.y2) > 30)){
901
+
902
+ swipeTimeout = setTimeout(function() {
903
+ if ( touch.el !== undefined ) {
904
+ touch.el.trigger('swipe');
905
+ touch.el.trigger('swipe' + (swipeDirection(touch.x1, touch.x2, touch.y1, touch.y2)));
906
+ }
907
+ touch = {};
908
+ }, 0);
909
+
910
+ // normal tap
911
+ } else if ('last' in touch) {
912
+
913
+ // don't fire tap when delta position changed by more than 30 pixels,
914
+ // for instance when moving to a point and back to origin
915
+ if (isNaN(deltaX) || (deltaX < 30 && deltaY < 30)) {
916
+ // delay by one tick so we can cancel the 'tap' event if 'scroll' fires
917
+ // ('tap' fires before 'scroll')
918
+ tapTimeout = setTimeout(function() {
919
+
920
+ // trigger universal 'tap' with the option to cancelTouch()
921
+ // (cancelTouch cancels processing of single vs double taps for faster 'tap' response)
922
+ var event = $.Event('tap');
923
+ event.cancelTouch = cancelAll;
924
+ if ( touch.el !== undefined ) touch.el.trigger(event);
925
+
926
+ // trigger double tap immediately
927
+ if (touch.isDoubleTap) {
928
+ if ( touch.el !== undefined ) touch.el.trigger('doubleTap');
929
+ touch = {};
930
+ }
931
+
932
+ // trigger single tap after 250ms of inactivity
933
+ else {
934
+ touchTimeout = setTimeout(function(){
935
+ touchTimeout = null;
936
+ if ( touch.el !== undefined ) touch.el.trigger('singleTap');
937
+ touch = {};
938
+ }, 250);
939
+ }
940
+ }, 0);
941
+ } else {
942
+ touch = {};
943
+ }
944
+ deltaX = deltaY = 0;
945
+ }
946
+ })
947
+ // when the browser window loses focus,
948
+ // for example when a modal dialog is shown,
949
+ // cancel all ongoing events
950
+ .on('touchcancel MSPointerCancel', cancelAll);
951
+
952
+ // scrolling the window indicates intention of the user
953
+ // to scroll, not tap or swipe, so cancel all ongoing events
954
+ $(window).on('scroll', cancelAll);
955
+ });
956
+
957
+ ['swipe', 'swipeLeft', 'swipeRight', 'swipeUp', 'swipeDown', 'doubleTap', 'tap', 'singleTap', 'longTap'].forEach(function(eventName){
958
+ $.fn[eventName] = function(callback){ return $(this).on(eventName, callback); };
959
+ });
960
+ })(jQuery);
961
+
962
+ (function(UI) {
963
+
964
+ "use strict";
965
+
966
+ var stacks = [];
967
+
968
+ UI.component('stackMargin', {
969
+
970
+ defaults: {
971
+ cls: 'uk-margin-small-top',
972
+ rowfirst: false,
973
+ observe: false
974
+ },
975
+
976
+ boot: function() {
977
+
978
+ // init code
979
+ UI.ready(function(context) {
980
+
981
+ UI.$("[data-uk-margin]", context).each(function() {
982
+
983
+ var ele = UI.$(this);
984
+
985
+ if (!ele.data("stackMargin")) {
986
+ UI.stackMargin(ele, UI.Utils.options(ele.attr("data-uk-margin")));
987
+ }
988
+ });
989
+ });
990
+ },
991
+
992
+ init: function() {
993
+
994
+ var $this = this;
995
+
996
+ UI.$win.on('resize orientationchange', (function() {
997
+
998
+ var fn = function() {
999
+ $this.process();
1000
+ };
1001
+
1002
+ UI.$(function() {
1003
+ fn();
1004
+ UI.$win.on("load", fn);
1005
+ });
1006
+
1007
+ return UI.Utils.debounce(fn, 20);
1008
+ })());
1009
+
1010
+ this.on("display.uk.check", function(e) {
1011
+ if (this.element.is(":visible")) this.process();
1012
+ }.bind(this));
1013
+
1014
+ if (this.options.observe) {
1015
+
1016
+ UI.domObserve(this.element, function(e) {
1017
+ if ($this.element.is(":visible")) $this.process();
1018
+ });
1019
+ }
1020
+
1021
+ stacks.push(this);
1022
+ },
1023
+
1024
+ process: function() {
1025
+
1026
+ var $this = this, columns = this.element.children();
1027
+
1028
+ UI.Utils.stackMargin(columns, this.options);
1029
+
1030
+ if (!this.options.rowfirst || !columns.length) {
1031
+ return this;
1032
+ }
1033
+
1034
+ // Mark first column elements
1035
+ var group = {}, minleft = false;
1036
+
1037
+ columns.removeClass(this.options.rowfirst).each(function(offset, $ele){
1038
+
1039
+ $ele = UI.$(this);
1040
+
1041
+ if (this.style.display != 'none') {
1042
+ offset = $ele.offset().left;
1043
+ ((group[offset] = group[offset] || []) && group[offset]).push(this);
1044
+ minleft = minleft === false ? offset : Math.min(minleft, offset);
1045
+ }
1046
+ });
1047
+
1048
+ UI.$(group[minleft]).addClass(this.options.rowfirst);
1049
+
1050
+ return this;
1051
+ }
1052
+
1053
+ });
1054
+
1055
+
1056
+ // responsive element e.g. iframes
1057
+
1058
+ (function(){
1059
+
1060
+ var elements = [], check = function(ele) {
1061
+
1062
+ if (!ele.is(':visible')) return;
1063
+
1064
+ var width = ele.parent().width(),
1065
+ iwidth = ele.data('width'),
1066
+ ratio = (width / iwidth),
1067
+ height = Math.floor(ratio * ele.data('height'));
1068
+
1069
+ ele.css({'height': (width < iwidth) ? height : ele.data('height')});
1070
+ };
1071
+
1072
+ UI.component('responsiveElement', {
1073
+
1074
+ defaults: {},
1075
+
1076
+ boot: function() {
1077
+
1078
+ // init code
1079
+ UI.ready(function(context) {
1080
+
1081
+ UI.$("iframe.uk-responsive-width, [data-uk-responsive]", context).each(function() {
1082
+
1083
+ var ele = UI.$(this), obj;
1084
+
1085
+ if (!ele.data("responsiveElement")) {
1086
+ obj = UI.responsiveElement(ele, {});
1087
+ }
1088
+ });
1089
+ });
1090
+ },
1091
+
1092
+ init: function() {
1093
+
1094
+ var ele = this.element;
1095
+
1096
+ if (ele.attr('width') && ele.attr('height')) {
1097
+
1098
+ ele.data({
1099
+
1100
+ 'width' : ele.attr('width'),
1101
+ 'height': ele.attr('height')
1102
+
1103
+ }).on('display.uk.check', function(){
1104
+ check(ele);
1105
+ });
1106
+
1107
+ check(ele);
1108
+
1109
+ elements.push(ele);
1110
+ }
1111
+ }
1112
+ });
1113
+
1114
+ UI.$win.on('resize load', UI.Utils.debounce(function(){
1115
+
1116
+ elements.forEach(function(ele){
1117
+ check(ele);
1118
+ });
1119
+
1120
+ }, 15));
1121
+
1122
+ })();
1123
+
1124
+
1125
+
1126
+ // helper
1127
+
1128
+ UI.Utils.stackMargin = function(elements, options) {
1129
+
1130
+ options = UI.$.extend({
1131
+ 'cls': 'uk-margin-small-top'
1132
+ }, options);
1133
+
1134
+ elements = UI.$(elements).removeClass(options.cls);
1135
+
1136
+ var min = false;
1137
+
1138
+ elements.each(function(offset, height, pos, $ele){
1139
+
1140
+ $ele = UI.$(this);
1141
+
1142
+ if ($ele.css('display') != 'none') {
1143
+
1144
+ offset = $ele.offset();
1145
+ height = $ele.outerHeight();
1146
+ pos = offset.top + height;
1147
+
1148
+ $ele.data({
1149
+ 'ukMarginPos': pos,
1150
+ 'ukMarginTop': offset.top
1151
+ });
1152
+
1153
+ if (min === false || (offset.top < min.top) ) {
1154
+
1155
+ min = {
1156
+ top : offset.top,
1157
+ left : offset.left,
1158
+ pos : pos
1159
+ };
1160
+ }
1161
+ }
1162
+
1163
+ }).each(function($ele) {
1164
+
1165
+ $ele = UI.$(this);
1166
+
1167
+ if ($ele.css('display') != 'none' && $ele.data('ukMarginTop') > min.top && $ele.data('ukMarginPos') > min.pos) {
1168
+ $ele.addClass(options.cls);
1169
+ }
1170
+ });
1171
+ };
1172
+
1173
+ UI.Utils.matchHeights = function(elements, options) {
1174
+
1175
+ elements = UI.$(elements).css('min-height', '');
1176
+ options = UI.$.extend({ row : true }, options);
1177
+
1178
+ var matchHeights = function(group){
1179
+
1180
+ if (group.length < 2) return;
1181
+
1182
+ var max = 0;
1183
+
1184
+ group.each(function() {
1185
+ max = Math.max(max, UI.$(this).outerHeight());
1186
+ }).each(function() {
1187
+
1188
+ var element = UI.$(this),
1189
+ height = max - (element.css('box-sizing') == 'border-box' ? 0 : (element.outerHeight() - element.height()));
1190
+
1191
+ element.css('min-height', height + 'px');
1192
+ });
1193
+ };
1194
+
1195
+ if (options.row) {
1196
+
1197
+ elements.first().width(); // force redraw
1198
+
1199
+ setTimeout(function(){
1200
+
1201
+ var lastoffset = false, group = [];
1202
+
1203
+ elements.each(function() {
1204
+
1205
+ var ele = UI.$(this), offset = ele.offset().top;
1206
+
1207
+ if (offset != lastoffset && group.length) {
1208
+
1209
+ matchHeights(UI.$(group));
1210
+ group = [];
1211
+ offset = ele.offset().top;
1212
+ }
1213
+
1214
+ group.push(ele);
1215
+ lastoffset = offset;
1216
+ });
1217
+
1218
+ if (group.length) {
1219
+ matchHeights(UI.$(group));
1220
+ }
1221
+
1222
+ }, 0);
1223
+
1224
+ } else {
1225
+ matchHeights(elements);
1226
+ }
1227
+ };
1228
+
1229
+ (function(cacheSvgs){
1230
+
1231
+ UI.Utils.inlineSvg = function(selector, root) {
1232
+
1233
+ var images = UI.$(selector || 'img[src$=".svg"]', root || document).each(function(){
1234
+
1235
+ var img = UI.$(this),
1236
+ src = img.attr('src');
1237
+
1238
+ if (!cacheSvgs[src]) {
1239
+
1240
+ var d = UI.$.Deferred();
1241
+
1242
+ UI.$.get(src, {nc: Math.random()}, function(data){
1243
+ d.resolve(UI.$(data).find('svg'));
1244
+ });
1245
+
1246
+ cacheSvgs[src] = d.promise();
1247
+ }
1248
+
1249
+ cacheSvgs[src].then(function(svg) {
1250
+
1251
+ var $svg = UI.$(svg).clone();
1252
+
1253
+ if (img.attr('id')) $svg.attr('id', img.attr('id'));
1254
+ if (img.attr('class')) $svg.attr('class', img.attr('class'));
1255
+ if (img.attr('style')) $svg.attr('style', img.attr('style'));
1256
+
1257
+ if (img.attr('width')) {
1258
+ $svg.attr('width', img.attr('width'));
1259
+ if (!img.attr('height')) $svg.removeAttr('height');
1260
+ }
1261
+
1262
+ if (img.attr('height')){
1263
+ $svg.attr('height', img.attr('height'));
1264
+ if (!img.attr('width')) $svg.removeAttr('width');
1265
+ }
1266
+
1267
+ img.replaceWith($svg);
1268
+ });
1269
+ });
1270
+ };
1271
+
1272
+ // init code
1273
+ UI.ready(function(context) {
1274
+ UI.Utils.inlineSvg('[data-uk-svg]', context);
1275
+ });
1276
+
1277
+ })({});
1278
+
1279
+ })(UIkit);
1280
+
1281
+ (function(UI) {
1282
+
1283
+ "use strict";
1284
+
1285
+ UI.component('smoothScroll', {
1286
+
1287
+ boot: function() {
1288
+
1289
+ // init code
1290
+ UI.$html.on("click.smooth-scroll.uikit", "[data-uk-smooth-scroll]", function(e) {
1291
+ var ele = UI.$(this);
1292
+
1293
+ if (!ele.data("smoothScroll")) {
1294
+ var obj = UI.smoothScroll(ele, UI.Utils.options(ele.attr("data-uk-smooth-scroll")));
1295
+ ele.trigger("click");
1296
+ }
1297
+
1298
+ return false;
1299
+ });
1300
+ },
1301
+
1302
+ init: function() {
1303
+
1304
+ var $this = this;
1305
+
1306
+ this.on("click", function(e) {
1307
+ e.preventDefault();
1308
+ scrollToElement(UI.$(this.hash).length ? UI.$(this.hash) : UI.$("body"), $this.options);
1309
+ });
1310
+ }
1311
+ });
1312
+
1313
+ function scrollToElement(ele, options) {
1314
+
1315
+ options = UI.$.extend({
1316
+ duration: 1000,
1317
+ transition: 'easeOutExpo',
1318
+ offset: 0,
1319
+ complete: function(){}
1320
+ }, options);
1321
+
1322
+ // get / set parameters
1323
+ var target = ele.offset().top - options.offset,
1324
+ docheight = UI.$doc.height(),
1325
+ winheight = window.innerHeight;
1326
+
1327
+ if ((target + winheight) > docheight) {
1328
+ target = docheight - winheight;
1329
+ }
1330
+
1331
+ // animate to target, fire callback when done
1332
+ UI.$("html,body").stop().animate({scrollTop: target}, options.duration, options.transition).promise().done(options.complete);
1333
+ }
1334
+
1335
+ UI.Utils.scrollToElement = scrollToElement;
1336
+
1337
+ if (!UI.$.easing.easeOutExpo) {
1338
+ UI.$.easing.easeOutExpo = function(x, t, b, c, d) { return (t == d) ? b + c : c * (-Math.pow(2, -10 * t / d) + 1) + b; };
1339
+ }
1340
+
1341
+ })(UIkit);
1342
+
1343
+ (function(UI) {
1344
+
1345
+ "use strict";
1346
+
1347
+ var $win = UI.$win,
1348
+ $doc = UI.$doc,
1349
+ scrollspies = [],
1350
+ checkScrollSpy = function() {
1351
+ for(var i=0; i < scrollspies.length; i++) {
1352
+ window.requestAnimationFrame.apply(window, [scrollspies[i].check]);
1353
+ }
1354
+ };
1355
+
1356
+ UI.component('scrollspy', {
1357
+
1358
+ defaults: {
1359
+ "target" : false,
1360
+ "cls" : "uk-scrollspy-inview",
1361
+ "initcls" : "uk-scrollspy-init-inview",
1362
+ "topoffset" : 0,
1363
+ "leftoffset" : 0,
1364
+ "repeat" : false,
1365
+ "delay" : 0
1366
+ },
1367
+
1368
+ boot: function() {
1369
+
1370
+ // listen to scroll and resize
1371
+ $doc.on("scrolling.uk.document", checkScrollSpy);
1372
+ $win.on("load resize orientationchange", UI.Utils.debounce(checkScrollSpy, 50));
1373
+
1374
+ // init code
1375
+ UI.ready(function(context) {
1376
+
1377
+ UI.$("[data-uk-scrollspy]", context).each(function() {
1378
+
1379
+ var element = UI.$(this);
1380
+
1381
+ if (!element.data("scrollspy")) {
1382
+ var obj = UI.scrollspy(element, UI.Utils.options(element.attr("data-uk-scrollspy")));
1383
+ }
1384
+ });
1385
+ });
1386
+ },
1387
+
1388
+ init: function() {
1389
+
1390
+ var $this = this, inviewstate, initinview, togglecls = this.options.cls.split(/,/), fn = function(){
1391
+
1392
+ var elements = $this.options.target ? $this.element.find($this.options.target) : $this.element,
1393
+ delayIdx = elements.length === 1 ? 1 : 0,
1394
+ toggleclsIdx = 0;
1395
+
1396
+ elements.each(function(idx){
1397
+
1398
+ var element = UI.$(this),
1399
+ inviewstate = element.data('inviewstate'),
1400
+ inview = UI.Utils.isInView(element, $this.options),
1401
+ toggle = element.data('ukScrollspyCls') || togglecls[toggleclsIdx].trim();
1402
+
1403
+ if (inview && !inviewstate && !element.data('scrollspy-idle')) {
1404
+
1405
+ if (!initinview) {
1406
+ element.addClass($this.options.initcls);
1407
+ $this.offset = element.offset();
1408
+ initinview = true;
1409
+
1410
+ element.trigger("init.uk.scrollspy");
1411
+ }
1412
+
1413
+ element.data('scrollspy-idle', setTimeout(function(){
1414
+
1415
+ element.addClass("uk-scrollspy-inview").toggleClass(toggle).width();
1416
+ element.trigger("inview.uk.scrollspy");
1417
+
1418
+ element.data('scrollspy-idle', false);
1419
+ element.data('inviewstate', true);
1420
+
1421
+ }, $this.options.delay * delayIdx));
1422
+
1423
+ delayIdx++;
1424
+ }
1425
+
1426
+ if (!inview && inviewstate && $this.options.repeat) {
1427
+
1428
+ if (element.data('scrollspy-idle')) {
1429
+ clearTimeout(element.data('scrollspy-idle'));
1430
+ element.data('scrollspy-idle', false);
1431
+ }
1432
+
1433
+ element.removeClass("uk-scrollspy-inview").toggleClass(toggle);
1434
+ element.data('inviewstate', false);
1435
+
1436
+ element.trigger("outview.uk.scrollspy");
1437
+ }
1438
+
1439
+ toggleclsIdx = togglecls[toggleclsIdx + 1] ? (toggleclsIdx + 1) : 0;
1440
+
1441
+ });
1442
+ };
1443
+
1444
+ fn();
1445
+
1446
+ this.check = fn;
1447
+
1448
+ scrollspies.push(this);
1449
+ }
1450
+ });
1451
+
1452
+
1453
+ var scrollspynavs = [],
1454
+ checkScrollSpyNavs = function() {
1455
+ for(var i=0; i < scrollspynavs.length; i++) {
1456
+ window.requestAnimationFrame.apply(window, [scrollspynavs[i].check]);
1457
+ }
1458
+ };
1459
+
1460
+ UI.component('scrollspynav', {
1461
+
1462
+ defaults: {
1463
+ "cls" : 'uk-active',
1464
+ "closest" : false,
1465
+ "topoffset" : 0,
1466
+ "leftoffset" : 0,
1467
+ "smoothscroll" : false
1468
+ },
1469
+
1470
+ boot: function() {
1471
+
1472
+ // listen to scroll and resize
1473
+ $doc.on("scrolling.uk.document", checkScrollSpyNavs);
1474
+ $win.on("resize orientationchange", UI.Utils.debounce(checkScrollSpyNavs, 50));
1475
+
1476
+ // init code
1477
+ UI.ready(function(context) {
1478
+
1479
+ UI.$("[data-uk-scrollspy-nav]", context).each(function() {
1480
+
1481
+ var element = UI.$(this);
1482
+
1483
+ if (!element.data("scrollspynav")) {
1484
+ var obj = UI.scrollspynav(element, UI.Utils.options(element.attr("data-uk-scrollspy-nav")));
1485
+ }
1486
+ });
1487
+ });
1488
+ },
1489
+
1490
+ init: function() {
1491
+
1492
+ var ids = [],
1493
+ links = this.find("a[href^='#']").each(function(){ if(this.getAttribute("href").trim()!=='#') ids.push(this.getAttribute("href")); }),
1494
+ targets = UI.$(ids.join(",")),
1495
+
1496
+ clsActive = this.options.cls,
1497
+ clsClosest = this.options.closest || this.options.closest;
1498
+
1499
+ var $this = this, inviews, fn = function(){
1500
+
1501
+ inviews = [];
1502
+
1503
+ for (var i=0 ; i < targets.length ; i++) {
1504
+ if (UI.Utils.isInView(targets.eq(i), $this.options)) {
1505
+ inviews.push(targets.eq(i));
1506
+ }
1507
+ }
1508
+
1509
+ if (inviews.length) {
1510
+
1511
+ var navitems,
1512
+ scrollTop = $win.scrollTop(),
1513
+ target = (function(){
1514
+ for(var i=0; i< inviews.length;i++){
1515
+ if(inviews[i].offset().top >= scrollTop){
1516
+ return inviews[i];
1517
+ }
1518
+ }
1519
+ })();
1520
+
1521
+ if (!target) return;
1522
+
1523
+ if ($this.options.closest) {
1524
+ links.blur().closest(clsClosest).removeClass(clsActive);
1525
+ navitems = links.filter("a[href='#"+target.attr("id")+"']").closest(clsClosest).addClass(clsActive);
1526
+ } else {
1527
+ navitems = links.removeClass(clsActive).filter("a[href='#"+target.attr("id")+"']").addClass(clsActive);
1528
+ }
1529
+
1530
+ $this.element.trigger("inview.uk.scrollspynav", [target, navitems]);
1531
+ }
1532
+ };
1533
+
1534
+ if (this.options.smoothscroll && UI.smoothScroll) {
1535
+ links.each(function(){
1536
+ UI.smoothScroll(this, $this.options.smoothscroll);
1537
+ });
1538
+ }
1539
+
1540
+ fn();
1541
+
1542
+ this.element.data("scrollspynav", this);
1543
+
1544
+ this.check = fn;
1545
+ scrollspynavs.push(this);
1546
+
1547
+ }
1548
+ });
1549
+
1550
+ })(UIkit);
1551
+
1552
+ (function(UI){
1553
+
1554
+ "use strict";
1555
+
1556
+ var toggles = [];
1557
+
1558
+ UI.component('toggle', {
1559
+
1560
+ defaults: {
1561
+ target : false,
1562
+ cls : 'uk-hidden',
1563
+ animation : false,
1564
+ duration : 200
1565
+ },
1566
+
1567
+ boot: function(){
1568
+
1569
+ // init code
1570
+ UI.ready(function(context) {
1571
+
1572
+ UI.$("[data-uk-toggle]", context).each(function() {
1573
+ var ele = UI.$(this);
1574
+
1575
+ if (!ele.data("toggle")) {
1576
+ var obj = UI.toggle(ele, UI.Utils.options(ele.attr("data-uk-toggle")));
1577
+ }
1578
+ });
1579
+
1580
+ setTimeout(function(){
1581
+
1582
+ toggles.forEach(function(toggle){
1583
+ toggle.getToggles();
1584
+ });
1585
+
1586
+ }, 0);
1587
+ });
1588
+ },
1589
+
1590
+ init: function() {
1591
+
1592
+ var $this = this;
1593
+
1594
+ this.aria = (this.options.cls.indexOf('uk-hidden') !== -1);
1595
+
1596
+ this.getToggles();
1597
+
1598
+ this.on("click", function(e) {
1599
+ if ($this.element.is('a[href="#"]')) e.preventDefault();
1600
+ $this.toggle();
1601
+ });
1602
+
1603
+ toggles.push(this);
1604
+ },
1605
+
1606
+ toggle: function() {
1607
+
1608
+ if(!this.totoggle.length) return;
1609
+
1610
+ if (this.options.animation && UI.support.animation) {
1611
+
1612
+ var $this = this, animations = this.options.animation.split(',');
1613
+
1614
+ if (animations.length == 1) {
1615
+ animations[1] = animations[0];
1616
+ }
1617
+
1618
+ animations[0] = animations[0].trim();
1619
+ animations[1] = animations[1].trim();
1620
+
1621
+ this.totoggle.css('animation-duration', this.options.duration+'ms');
1622
+
1623
+ this.totoggle.each(function(){
1624
+
1625
+ var ele = UI.$(this);
1626
+
1627
+ if (ele.hasClass($this.options.cls)) {
1628
+
1629
+ ele.toggleClass($this.options.cls);
1630
+
1631
+ UI.Utils.animate(ele, animations[0]).then(function(){
1632
+ ele.css('animation-duration', '');
1633
+ UI.Utils.checkDisplay(ele);
1634
+ });
1635
+
1636
+ } else {
1637
+
1638
+ UI.Utils.animate(this, animations[1]+' uk-animation-reverse').then(function(){
1639
+ ele.toggleClass($this.options.cls).css('animation-duration', '');
1640
+ UI.Utils.checkDisplay(ele);
1641
+ });
1642
+
1643
+ }
1644
+
1645
+ });
1646
+
1647
+ } else {
1648
+ this.totoggle.toggleClass(this.options.cls);
1649
+ UI.Utils.checkDisplay(this.totoggle);
1650
+ }
1651
+
1652
+ this.updateAria();
1653
+
1654
+ },
1655
+
1656
+ getToggles: function() {
1657
+ this.totoggle = this.options.target ? UI.$(this.options.target):[];
1658
+ this.updateAria();
1659
+ },
1660
+
1661
+ updateAria: function() {
1662
+ if (this.aria && this.totoggle.length) {
1663
+ this.totoggle.each(function(){
1664
+ UI.$(this).attr('aria-hidden', UI.$(this).hasClass('uk-hidden'));
1665
+ });
1666
+ }
1667
+ }
1668
+ });
1669
+
1670
+ })(UIkit);
1671
+
1672
+ (function(UI) {
1673
+
1674
+ "use strict";
1675
+
1676
+ UI.component('alert', {
1677
+
1678
+ defaults: {
1679
+ "fade": true,
1680
+ "duration": 200,
1681
+ "trigger": ".uk-alert-close"
1682
+ },
1683
+
1684
+ boot: function() {
1685
+
1686
+ // init code
1687
+ UI.$html.on("click.alert.uikit", "[data-uk-alert]", function(e) {
1688
+
1689
+ var ele = UI.$(this);
1690
+
1691
+ if (!ele.data("alert")) {
1692
+
1693
+ var alert = UI.alert(ele, UI.Utils.options(ele.attr("data-uk-alert")));
1694
+
1695
+ if (UI.$(e.target).is(alert.options.trigger)) {
1696
+ e.preventDefault();
1697
+ alert.close();
1698
+ }
1699
+ }
1700
+ });
1701
+ },
1702
+
1703
+ init: function() {
1704
+
1705
+ var $this = this;
1706
+
1707
+ this.on("click", this.options.trigger, function(e) {
1708
+ e.preventDefault();
1709
+ $this.close();
1710
+ });
1711
+ },
1712
+
1713
+ close: function() {
1714
+
1715
+ var element = this.trigger("close.uk.alert"),
1716
+ removeElement = function () {
1717
+ this.trigger("closed.uk.alert").remove();
1718
+ }.bind(this);
1719
+
1720
+ if (this.options.fade) {
1721
+ element.css("overflow", "hidden").css("max-height", element.height()).animate({
1722
+ "height" : 0,
1723
+ "opacity" : 0,
1724
+ "padding-top" : 0,
1725
+ "padding-bottom" : 0,
1726
+ "margin-top" : 0,
1727
+ "margin-bottom" : 0
1728
+ }, this.options.duration, removeElement);
1729
+ } else {
1730
+ removeElement();
1731
+ }
1732
+ }
1733
+
1734
+ });
1735
+
1736
+ })(UIkit);
1737
+
1738
+ (function(UI) {
1739
+
1740
+ "use strict";
1741
+
1742
+ UI.component('buttonRadio', {
1743
+
1744
+ defaults: {
1745
+ "activeClass": 'uk-active',
1746
+ "target": ".uk-button"
1747
+ },
1748
+
1749
+ boot: function() {
1750
+
1751
+ // init code
1752
+ UI.$html.on("click.buttonradio.uikit", "[data-uk-button-radio]", function(e) {
1753
+
1754
+ var ele = UI.$(this);
1755
+
1756
+ if (!ele.data("buttonRadio")) {
1757
+
1758
+ var obj = UI.buttonRadio(ele, UI.Utils.options(ele.attr("data-uk-button-radio"))),
1759
+ target = UI.$(e.target);
1760
+
1761
+ if (target.is(obj.options.target)) {
1762
+ target.trigger("click");
1763
+ }
1764
+ }
1765
+ });
1766
+ },
1767
+
1768
+ init: function() {
1769
+
1770
+ var $this = this;
1771
+
1772
+ // Init ARIA
1773
+ this.find($this.options.target).attr('aria-checked', 'false').filter('.' + $this.options.activeClass).attr('aria-checked', 'true');
1774
+
1775
+ this.on("click", this.options.target, function(e) {
1776
+
1777
+ var ele = UI.$(this);
1778
+
1779
+ if (ele.is('a[href="#"]')) e.preventDefault();
1780
+
1781
+ $this.find($this.options.target).not(ele).removeClass($this.options.activeClass).blur();
1782
+ ele.addClass($this.options.activeClass);
1783
+
1784
+ // Update ARIA
1785
+ $this.find($this.options.target).not(ele).attr('aria-checked', 'false');
1786
+ ele.attr('aria-checked', 'true');
1787
+
1788
+ $this.trigger("change.uk.button", [ele]);
1789
+ });
1790
+
1791
+ },
1792
+
1793
+ getSelected: function() {
1794
+ return this.find('.' + this.options.activeClass);
1795
+ }
1796
+ });
1797
+
1798
+ UI.component('buttonCheckbox', {
1799
+
1800
+ defaults: {
1801
+ "activeClass": 'uk-active',
1802
+ "target": ".uk-button"
1803
+ },
1804
+
1805
+ boot: function() {
1806
+
1807
+ UI.$html.on("click.buttoncheckbox.uikit", "[data-uk-button-checkbox]", function(e) {
1808
+ var ele = UI.$(this);
1809
+
1810
+ if (!ele.data("buttonCheckbox")) {
1811
+
1812
+ var obj = UI.buttonCheckbox(ele, UI.Utils.options(ele.attr("data-uk-button-checkbox"))),
1813
+ target = UI.$(e.target);
1814
+
1815
+ if (target.is(obj.options.target)) {
1816
+ target.trigger("click");
1817
+ }
1818
+ }
1819
+ });
1820
+ },
1821
+
1822
+ init: function() {
1823
+
1824
+ var $this = this;
1825
+
1826
+ // Init ARIA
1827
+ this.find($this.options.target).attr('aria-checked', 'false').filter('.' + $this.options.activeClass).attr('aria-checked', 'true');
1828
+
1829
+ this.on("click", this.options.target, function(e) {
1830
+ var ele = UI.$(this);
1831
+
1832
+ if (ele.is('a[href="#"]')) e.preventDefault();
1833
+
1834
+ ele.toggleClass($this.options.activeClass).blur();
1835
+
1836
+ // Update ARIA
1837
+ ele.attr('aria-checked', ele.hasClass($this.options.activeClass));
1838
+
1839
+ $this.trigger("change.uk.button", [ele]);
1840
+ });
1841
+
1842
+ },
1843
+
1844
+ getSelected: function() {
1845
+ return this.find('.' + this.options.activeClass);
1846
+ }
1847
+ });
1848
+
1849
+
1850
+ UI.component('button', {
1851
+
1852
+ defaults: {},
1853
+
1854
+ boot: function() {
1855
+
1856
+ UI.$html.on("click.button.uikit", "[data-uk-button]", function(e) {
1857
+ var ele = UI.$(this);
1858
+
1859
+ if (!ele.data("button")) {
1860
+
1861
+ var obj = UI.button(ele, UI.Utils.options(ele.attr("data-uk-button")));
1862
+ ele.trigger("click");
1863
+ }
1864
+ });
1865
+ },
1866
+
1867
+ init: function() {
1868
+
1869
+ var $this = this;
1870
+
1871
+ // Init ARIA
1872
+ this.element.attr('aria-pressed', this.element.hasClass("uk-active"));
1873
+
1874
+ this.on("click", function(e) {
1875
+
1876
+ if ($this.element.is('a[href="#"]')) e.preventDefault();
1877
+
1878
+ $this.toggle();
1879
+ $this.trigger("change.uk.button", [$this.element.blur().hasClass("uk-active")]);
1880
+ });
1881
+
1882
+ },
1883
+
1884
+ toggle: function() {
1885
+ this.element.toggleClass("uk-active");
1886
+
1887
+ // Update ARIA
1888
+ this.element.attr('aria-pressed', this.element.hasClass("uk-active"));
1889
+ }
1890
+ });
1891
+
1892
+ })(UIkit);
1893
+
1894
+
1895
+ (function(UI) {
1896
+
1897
+ "use strict";
1898
+
1899
+ var active = false, hoverIdle, flips = {
1900
+ 'x': {
1901
+ "bottom-left" : 'bottom-right',
1902
+ "bottom-right" : 'bottom-left',
1903
+ "bottom-center" : 'bottom-center',
1904
+ "top-left" : 'top-right',
1905
+ "top-right" : 'top-left',
1906
+ "top-center" : 'top-center',
1907
+ "left-top" : 'right-top',
1908
+ "left-bottom" : 'right-bottom',
1909
+ "left-center" : 'right-center',
1910
+ "right-top" : 'left-top',
1911
+ "right-bottom" : 'left-bottom',
1912
+ "right-center" : 'left-center'
1913
+ },
1914
+ 'y': {
1915
+ "bottom-left" : 'top-left',
1916
+ "bottom-right" : 'top-right',
1917
+ "bottom-center" : 'top-center',
1918
+ "top-left" : 'bottom-left',
1919
+ "top-right" : 'bottom-right',
1920
+ "top-center" : 'bottom-center',
1921
+ "left-top" : 'left-bottom',
1922
+ "left-bottom" : 'left-top',
1923
+ "left-center" : 'left-center',
1924
+ "right-top" : 'right-bottom',
1925
+ "right-bottom" : 'right-top',
1926
+ "right-center" : 'right-center'
1927
+ },
1928
+ 'xy': {
1929
+ "bottom-left" : 'top-right',
1930
+ "bottom-right" : 'top-left',
1931
+ "bottom-center" : 'top-center',
1932
+ "top-left" : 'bottom-right',
1933
+ "top-right" : 'bottom-left',
1934
+ "top-center" : 'bottom-center',
1935
+ "left-top" : 'right-bottom',
1936
+ "left-bottom" : 'right-top',
1937
+ "left-center" : 'right-center',
1938
+ "right-top" : 'left-bottom',
1939
+ "right-bottom" : 'left-top',
1940
+ "right-center" : 'left-center'
1941
+ }
1942
+ };
1943
+
1944
+ UI.component('dropdown', {
1945
+
1946
+ defaults: {
1947
+ 'mode' : 'hover',
1948
+ 'pos' : 'bottom-left',
1949
+ 'offset' : 0,
1950
+ 'remaintime' : 800,
1951
+ 'justify' : false,
1952
+ 'boundary' : UI.$win,
1953
+ 'delay' : 0,
1954
+ 'dropdownSelector': '.uk-dropdown,.uk-dropdown-blank',
1955
+ 'hoverDelayIdle' : 250,
1956
+ 'preventflip' : false
1957
+ },
1958
+
1959
+ remainIdle: false,
1960
+
1961
+ boot: function() {
1962
+
1963
+ var triggerevent = UI.support.touch ? "click" : "mouseenter";
1964
+
1965
+ // init code
1966
+ UI.$html.on(triggerevent+".dropdown.uikit", "[data-uk-dropdown]", function(e) {
1967
+
1968
+ var ele = UI.$(this);
1969
+
1970
+ if (!ele.data("dropdown")) {
1971
+
1972
+ var dropdown = UI.dropdown(ele, UI.Utils.options(ele.attr("data-uk-dropdown")));
1973
+
1974
+ if (triggerevent=="click" || (triggerevent=="mouseenter" && dropdown.options.mode=="hover")) {
1975
+ dropdown.element.trigger(triggerevent);
1976
+ }
1977
+
1978
+ if (dropdown.element.find(dropdown.options.dropdownSelector).length) {
1979
+ e.preventDefault();
1980
+ }
1981
+ }
1982
+ });
1983
+ },
1984
+
1985
+ init: function() {
1986
+
1987
+ var $this = this;
1988
+
1989
+ this.dropdown = this.find(this.options.dropdownSelector);
1990
+ this.offsetParent = this.dropdown.parents().filter(function() {
1991
+ return UI.$.inArray(UI.$(this).css('position'), ['relative', 'fixed', 'absolute']) !== -1;
1992
+ }).slice(0,1);
1993
+
1994
+ this.centered = this.dropdown.hasClass('uk-dropdown-center');
1995
+ this.justified = this.options.justify ? UI.$(this.options.justify) : false;
1996
+
1997
+ this.boundary = UI.$(this.options.boundary);
1998
+
1999
+ if (!this.boundary.length) {
2000
+ this.boundary = UI.$win;
2001
+ }
2002
+
2003
+ // legacy DEPRECATED!
2004
+ if (this.dropdown.hasClass('uk-dropdown-up')) {
2005
+ this.options.pos = 'top-left';
2006
+ }
2007
+ if (this.dropdown.hasClass('uk-dropdown-flip')) {
2008
+ this.options.pos = this.options.pos.replace('left','right');
2009
+ }
2010
+ if (this.dropdown.hasClass('uk-dropdown-center')) {
2011
+ this.options.pos = this.options.pos.replace(/(left|right)/,'center');
2012
+ }
2013
+ //-- end legacy
2014
+
2015
+ // Init ARIA
2016
+ this.element.attr('aria-haspopup', 'true');
2017
+ this.element.attr('aria-expanded', this.element.hasClass("uk-open"));
2018
+
2019
+ if (this.options.mode == "click" || UI.support.touch) {
2020
+
2021
+ this.on("click.uk.dropdown", function(e) {
2022
+
2023
+ var $target = UI.$(e.target);
2024
+
2025
+ if (!$target.parents($this.options.dropdownSelector).length) {
2026
+
2027
+ if ($target.is("a[href='#']") || $target.parent().is("a[href='#']") || ($this.dropdown.length && !$this.dropdown.is(":visible")) ){
2028
+ e.preventDefault();
2029
+ }
2030
+
2031
+ $target.blur();
2032
+ }
2033
+
2034
+ if (!$this.element.hasClass('uk-open')) {
2035
+
2036
+ $this.show();
2037
+
2038
+ } else {
2039
+
2040
+ if (!$this.dropdown.find(e.target).length || $target.is(".uk-dropdown-close") || $target.parents(".uk-dropdown-close").length) {
2041
+ $this.hide();
2042
+ }
2043
+ }
2044
+ });
2045
+
2046
+ } else {
2047
+
2048
+ this.on("mouseenter", function(e) {
2049
+
2050
+ $this.trigger('pointerenter.uk.dropdown', [$this]);
2051
+
2052
+ if ($this.remainIdle) {
2053
+ clearTimeout($this.remainIdle);
2054
+ }
2055
+
2056
+ if (hoverIdle) {
2057
+ clearTimeout(hoverIdle);
2058
+ }
2059
+
2060
+ if (active && active == $this) {
2061
+ return;
2062
+ }
2063
+
2064
+ // pseudo manuAim
2065
+ if (active && active != $this) {
2066
+
2067
+ hoverIdle = setTimeout(function() {
2068
+ hoverIdle = setTimeout($this.show.bind($this), $this.options.delay);
2069
+ }, $this.options.hoverDelayIdle);
2070
+
2071
+ } else {
2072
+
2073
+ hoverIdle = setTimeout($this.show.bind($this), $this.options.delay);
2074
+ }
2075
+
2076
+ }).on("mouseleave", function() {
2077
+
2078
+ if (hoverIdle) {
2079
+ clearTimeout(hoverIdle);
2080
+ }
2081
+
2082
+ $this.remainIdle = setTimeout(function() {
2083
+ if (active && active == $this) $this.hide();
2084
+ }, $this.options.remaintime);
2085
+
2086
+ $this.trigger('pointerleave.uk.dropdown', [$this]);
2087
+
2088
+ }).on("click", function(e){
2089
+
2090
+ var $target = UI.$(e.target);
2091
+
2092
+ if ($this.remainIdle) {
2093
+ clearTimeout($this.remainIdle);
2094
+ }
2095
+
2096
+ if (active && active == $this) {
2097
+ if (!$this.dropdown.find(e.target).length || $target.is(".uk-dropdown-close") || $target.parents(".uk-dropdown-close").length) {
2098
+ $this.hide();
2099
+ }
2100
+ return;
2101
+ }
2102
+
2103
+ if ($target.is("a[href='#']") || $target.parent().is("a[href='#']")){
2104
+ e.preventDefault();
2105
+ }
2106
+
2107
+ $this.show();
2108
+ });
2109
+ }
2110
+ },
2111
+
2112
+ show: function(){
2113
+
2114
+ UI.$html.off("click.outer.dropdown");
2115
+
2116
+ if (active && active != this) {
2117
+ active.hide(true);
2118
+ }
2119
+
2120
+ if (hoverIdle) {
2121
+ clearTimeout(hoverIdle);
2122
+ }
2123
+
2124
+ this.trigger('beforeshow.uk.dropdown', [this]);
2125
+
2126
+ this.checkDimensions();
2127
+ this.element.addClass('uk-open');
2128
+
2129
+ // Update ARIA
2130
+ this.element.attr('aria-expanded', 'true');
2131
+
2132
+ this.trigger('show.uk.dropdown', [this]);
2133
+
2134
+ UI.Utils.checkDisplay(this.dropdown, true);
2135
+ active = this;
2136
+
2137
+ this.registerOuterClick();
2138
+ },
2139
+
2140
+ hide: function(force) {
2141
+
2142
+ this.trigger('beforehide.uk.dropdown', [this, force]);
2143
+
2144
+ this.element.removeClass('uk-open');
2145
+
2146
+ if (this.remainIdle) {
2147
+ clearTimeout(this.remainIdle);
2148
+ }
2149
+
2150
+ this.remainIdle = false;
2151
+
2152
+ // Update ARIA
2153
+ this.element.attr('aria-expanded', 'false');
2154
+
2155
+ this.trigger('hide.uk.dropdown', [this, force]);
2156
+
2157
+ if (active == this) active = false;
2158
+ },
2159
+
2160
+ registerOuterClick: function(){
2161
+
2162
+ var $this = this;
2163
+
2164
+ UI.$html.off("click.outer.dropdown");
2165
+
2166
+ setTimeout(function() {
2167
+
2168
+ UI.$html.on("click.outer.dropdown", function(e) {
2169
+
2170
+ if (hoverIdle) {
2171
+ clearTimeout(hoverIdle);
2172
+ }
2173
+
2174
+ var $target = UI.$(e.target);
2175
+
2176
+ if (active == $this && !$this.element.find(e.target).length) {
2177
+ $this.hide(true);
2178
+ UI.$html.off("click.outer.dropdown");
2179
+ }
2180
+ });
2181
+ }, 10);
2182
+ },
2183
+
2184
+ checkDimensions: function() {
2185
+
2186
+ if (!this.dropdown.length) return;
2187
+
2188
+ // reset
2189
+ this.dropdown.removeClass('uk-dropdown-top uk-dropdown-bottom uk-dropdown-left uk-dropdown-right uk-dropdown-stack').css({
2190
+ 'top-left':'',
2191
+ 'left':'',
2192
+ 'margin-left' :'',
2193
+ 'margin-right':''
2194
+ });
2195
+
2196
+ if (this.justified && this.justified.length) {
2197
+ this.dropdown.css("min-width", "");
2198
+ }
2199
+
2200
+ var $this = this,
2201
+ pos = UI.$.extend({}, this.offsetParent.offset(), {width: this.offsetParent[0].offsetWidth, height: this.offsetParent[0].offsetHeight}),
2202
+ posoffset = this.options.offset,
2203
+ dropdown = this.dropdown,
2204
+ offset = dropdown.show().offset() || {left: 0, top: 0},
2205
+ width = dropdown.outerWidth(),
2206
+ height = dropdown.outerHeight(),
2207
+ boundarywidth = this.boundary.width(),
2208
+ boundaryoffset = this.boundary[0] !== window && this.boundary.offset() ? this.boundary.offset(): {top:0, left:0},
2209
+ dpos = this.options.pos;
2210
+
2211
+ var variants = {
2212
+ "bottom-left" : {top: 0 + pos.height + posoffset, left: 0},
2213
+ "bottom-right" : {top: 0 + pos.height + posoffset, left: 0 + pos.width - width},
2214
+ "bottom-center" : {top: 0 + pos.height + posoffset, left: 0 + pos.width / 2 - width / 2},
2215
+ "top-left" : {top: 0 - height - posoffset, left: 0},
2216
+ "top-right" : {top: 0 - height - posoffset, left: 0 + pos.width - width},
2217
+ "top-center" : {top: 0 - height - posoffset, left: 0 + pos.width / 2 - width / 2},
2218
+ "left-top" : {top: 0, left: 0 - width - posoffset},
2219
+ "left-bottom" : {top: 0 + pos.height - height, left: 0 - width - posoffset},
2220
+ "left-center" : {top: 0 + pos.height / 2 - height / 2, left: 0 - width - posoffset},
2221
+ "right-top" : {top: 0, left: 0 + pos.width + posoffset},
2222
+ "right-bottom" : {top: 0 + pos.height - height, left: 0 + pos.width + posoffset},
2223
+ "right-center" : {top: 0 + pos.height / 2 - height / 2, left: 0 + pos.width + posoffset}
2224
+ },
2225
+ css = {},
2226
+ pp;
2227
+
2228
+ pp = dpos.split('-');
2229
+ css = variants[dpos] ? variants[dpos] : variants['bottom-left'];
2230
+
2231
+ // justify dropdown
2232
+ if (this.justified && this.justified.length) {
2233
+ justify(dropdown.css({left:0}), this.justified, boundarywidth);
2234
+ } else {
2235
+
2236
+ if (this.options.preventflip !== true) {
2237
+
2238
+ var fdpos;
2239
+
2240
+ switch(this.checkBoundary(pos.left + css.left, pos.top + css.top, width, height, boundarywidth)) {
2241
+ case "x":
2242
+ if(this.options.preventflip !=='x') fdpos = flips['x'][dpos] || 'right-top';
2243
+ break;
2244
+ case "y":
2245
+ if(this.options.preventflip !=='y') fdpos = flips['y'][dpos] || 'top-left';
2246
+ break;
2247
+ case "xy":
2248
+ if(!this.options.preventflip) fdpos = flips['xy'][dpos] || 'right-bottom';
2249
+ break;
2250
+ }
2251
+
2252
+ if (fdpos) {
2253
+
2254
+ pp = fdpos.split('-');
2255
+ css = variants[fdpos] ? variants[fdpos] : variants['bottom-left'];
2256
+
2257
+ // check flipped
2258
+ if (this.checkBoundary(pos.left + css.left, pos.top + css.top, width, height, boundarywidth)) {
2259
+ pp = dpos.split('-');
2260
+ css = variants[dpos] ? variants[dpos] : variants['bottom-left'];
2261
+ }
2262
+ }
2263
+ }
2264
+ }
2265
+
2266
+ if (width > boundarywidth) {
2267
+ dropdown.addClass("uk-dropdown-stack");
2268
+ this.trigger('stack.uk.dropdown', [this]);
2269
+ }
2270
+
2271
+ dropdown.css(css).css("display", "").addClass('uk-dropdown-'+pp[0]);
2272
+ },
2273
+
2274
+ checkBoundary: function(left, top, width, height, boundarywidth) {
2275
+
2276
+ var axis = "";
2277
+
2278
+ if (left < 0 || ((left - UI.$win.scrollLeft())+width) > boundarywidth) {
2279
+ axis += "x";
2280
+ }
2281
+
2282
+ if ((top - UI.$win.scrollTop()) < 0 || ((top - UI.$win.scrollTop())+height) > window.innerHeight) {
2283
+ axis += "y";
2284
+ }
2285
+
2286
+ return axis;
2287
+ }
2288
+ });
2289
+
2290
+
2291
+ UI.component('dropdownOverlay', {
2292
+
2293
+ defaults: {
2294
+ 'justify' : false,
2295
+ 'cls' : '',
2296
+ 'duration': 200
2297
+ },
2298
+
2299
+ boot: function() {
2300
+
2301
+ // init code
2302
+ UI.ready(function(context) {
2303
+
2304
+ UI.$("[data-uk-dropdown-overlay]", context).each(function() {
2305
+ var ele = UI.$(this);
2306
+
2307
+ if (!ele.data("dropdownOverlay")) {
2308
+ UI.dropdownOverlay(ele, UI.Utils.options(ele.attr("data-uk-dropdown-overlay")));
2309
+ }
2310
+ });
2311
+ });
2312
+ },
2313
+
2314
+ init: function() {
2315
+
2316
+ var $this = this;
2317
+
2318
+ this.justified = this.options.justify ? UI.$(this.options.justify) : false;
2319
+ this.overlay = this.element.find('uk-dropdown-overlay');
2320
+
2321
+ if (!this.overlay.length) {
2322
+ this.overlay = UI.$('<div class="uk-dropdown-overlay"></div>').appendTo(this.element);
2323
+ }
2324
+
2325
+ this.overlay.addClass(this.options.cls);
2326
+
2327
+ this.on({
2328
+
2329
+ 'beforeshow.uk.dropdown': function(e, dropdown) {
2330
+ $this.dropdown = dropdown;
2331
+
2332
+ if ($this.justified && $this.justified.length) {
2333
+ justify($this.overlay.css({'display':'block', 'margin-left':'','margin-right':''}), $this.justified, $this.justified.outerWidth());
2334
+ }
2335
+ },
2336
+
2337
+ 'show.uk.dropdown': function(e, dropdown) {
2338
+
2339
+ var h = $this.dropdown.dropdown.outerHeight(true);
2340
+
2341
+ $this.dropdown.element.removeClass('uk-open');
2342
+
2343
+ $this.overlay.stop().css('display', 'block').animate({height: h}, $this.options.duration, function() {
2344
+
2345
+ $this.dropdown.dropdown.css('visibility', '');
2346
+ $this.dropdown.element.addClass('uk-open');
2347
+
2348
+ UI.Utils.checkDisplay($this.dropdown.dropdown, true);
2349
+ });
2350
+
2351
+ $this.pointerleave = false;
2352
+ },
2353
+
2354
+ 'hide.uk.dropdown': function() {
2355
+ $this.overlay.stop().animate({height: 0}, $this.options.duration);
2356
+ },
2357
+
2358
+ 'pointerenter.uk.dropdown': function(e, dropdown) {
2359
+ clearTimeout($this.remainIdle);
2360
+ },
2361
+
2362
+ 'pointerleave.uk.dropdown': function(e, dropdown) {
2363
+ $this.pointerleave = true;
2364
+ }
2365
+ });
2366
+
2367
+
2368
+ this.overlay.on({
2369
+
2370
+ 'mouseenter': function() {
2371
+ if ($this.remainIdle) {
2372
+ clearTimeout($this.dropdown.remainIdle);
2373
+ clearTimeout($this.remainIdle);
2374
+ }
2375
+ },
2376
+
2377
+ 'mouseleave': function(){
2378
+
2379
+ if ($this.pointerleave && active) {
2380
+
2381
+ $this.remainIdle = setTimeout(function() {
2382
+ if(active) active.hide();
2383
+ }, active.options.remaintime);
2384
+ }
2385
+ }
2386
+ })
2387
+ }
2388
+
2389
+ });
2390
+
2391
+
2392
+ function justify(ele, justifyTo, boundarywidth, offset) {
2393
+
2394
+ ele = UI.$(ele);
2395
+ justifyTo = UI.$(justifyTo);
2396
+ boundarywidth = boundarywidth || window.innerWidth;
2397
+ offset = offset || ele.offset();
2398
+
2399
+ if (justifyTo.length) {
2400
+
2401
+ var jwidth = justifyTo.outerWidth();
2402
+
2403
+ ele.css("min-width", jwidth);
2404
+
2405
+ if (UI.langdirection == 'right') {
2406
+
2407
+ var right1 = boundarywidth - (justifyTo.offset().left + jwidth),
2408
+ right2 = boundarywidth - (ele.offset().left + ele.outerWidth());
2409
+
2410
+ ele.css("margin-right", right1 - right2);
2411
+
2412
+ } else {
2413
+ ele.css("margin-left", justifyTo.offset().left - offset.left);
2414
+ }
2415
+ }
2416
+ }
2417
+
2418
+ })(UIkit);
2419
+
2420
+ (function(UI) {
2421
+
2422
+ "use strict";
2423
+
2424
+ var grids = [];
2425
+
2426
+ UI.component('gridMatchHeight', {
2427
+
2428
+ defaults: {
2429
+ "target" : false,
2430
+ "row" : true,
2431
+ "ignorestacked" : false,
2432
+ "observe" : false
2433
+ },
2434
+
2435
+ boot: function() {
2436
+
2437
+ // init code
2438
+ UI.ready(function(context) {
2439
+
2440
+ UI.$("[data-uk-grid-match]", context).each(function() {
2441
+ var grid = UI.$(this), obj;
2442
+
2443
+ if (!grid.data("gridMatchHeight")) {
2444
+ obj = UI.gridMatchHeight(grid, UI.Utils.options(grid.attr("data-uk-grid-match")));
2445
+ }
2446
+ });
2447
+ });
2448
+ },
2449
+
2450
+ init: function() {
2451
+
2452
+ var $this = this;
2453
+
2454
+ this.columns = this.element.children();
2455
+ this.elements = this.options.target ? this.find(this.options.target) : this.columns;
2456
+
2457
+ if (!this.columns.length) return;
2458
+
2459
+ UI.$win.on('load resize orientationchange', (function() {
2460
+
2461
+ var fn = function() {
2462
+ if ($this.element.is(":visible")) $this.match();
2463
+ };
2464
+
2465
+ UI.$(function() { fn(); });
2466
+
2467
+ return UI.Utils.debounce(fn, 50);
2468
+ })());
2469
+
2470
+ if (this.options.observe) {
2471
+
2472
+ UI.domObserve(this.element, function(e) {
2473
+ if ($this.element.is(":visible")) $this.match();
2474
+ });
2475
+ }
2476
+
2477
+ this.on("display.uk.check", function(e) {
2478
+ if(this.element.is(":visible")) this.match();
2479
+ }.bind(this));
2480
+
2481
+ grids.push(this);
2482
+ },
2483
+
2484
+ match: function() {
2485
+
2486
+ var firstvisible = this.columns.filter(":visible:first");
2487
+
2488
+ if (!firstvisible.length) return;
2489
+
2490
+ var stacked = Math.ceil(100 * parseFloat(firstvisible.css('width')) / parseFloat(firstvisible.parent().css('width'))) >= 100;
2491
+
2492
+ if (stacked && !this.options.ignorestacked) {
2493
+ this.revert();
2494
+ } else {
2495
+ UI.Utils.matchHeights(this.elements, this.options);
2496
+ }
2497
+
2498
+ return this;
2499
+ },
2500
+
2501
+ revert: function() {
2502
+ this.elements.css('min-height', '');
2503
+ return this;
2504
+ }
2505
+ });
2506
+
2507
+ UI.component('gridMargin', {
2508
+
2509
+ defaults: {
2510
+ cls : 'uk-grid-margin',
2511
+ rowfirst : 'uk-row-first'
2512
+ },
2513
+
2514
+ boot: function() {
2515
+
2516
+ // init code
2517
+ UI.ready(function(context) {
2518
+
2519
+ UI.$("[data-uk-grid-margin]", context).each(function() {
2520
+ var grid = UI.$(this), obj;
2521
+
2522
+ if (!grid.data("gridMargin")) {
2523
+ obj = UI.gridMargin(grid, UI.Utils.options(grid.attr("data-uk-grid-margin")));
2524
+ }
2525
+ });
2526
+ });
2527
+ },
2528
+
2529
+ init: function() {
2530
+
2531
+ var stackMargin = UI.stackMargin(this.element, this.options);
2532
+ }
2533
+ });
2534
+
2535
+ })(UIkit);
2536
+
2537
+ (function(UI) {
2538
+
2539
+ "use strict";
2540
+
2541
+ var active = false, activeCount = 0, $html = UI.$html, body;
2542
+
2543
+ UI.$win.on("resize orientationchange", UI.Utils.debounce(function(){
2544
+ UI.$('.uk-modal.uk-open').each(function(){
2545
+ UI.$(this).data('modal').resize();
2546
+ });
2547
+ }, 150));
2548
+
2549
+ UI.component('modal', {
2550
+
2551
+ defaults: {
2552
+ keyboard: true,
2553
+ bgclose: true,
2554
+ minScrollHeight: 150,
2555
+ center: false,
2556
+ modal: true
2557
+ },
2558
+
2559
+ scrollable: false,
2560
+ transition: false,
2561
+ hasTransitioned: true,
2562
+
2563
+ init: function() {
2564
+
2565
+ if (!body) body = UI.$('body');
2566
+
2567
+ if (!this.element.length) return;
2568
+
2569
+ var $this = this;
2570
+
2571
+ this.paddingdir = "padding-" + (UI.langdirection == 'left' ? "right":"left");
2572
+ this.dialog = this.find(".uk-modal-dialog");
2573
+
2574
+ this.active = false;
2575
+
2576
+ // Update ARIA
2577
+ this.element.attr('aria-hidden', this.element.hasClass("uk-open"));
2578
+
2579
+ this.on("click", ".uk-modal-close", function(e) {
2580
+ e.preventDefault();
2581
+ $this.hide();
2582
+ }).on("click", function(e) {
2583
+
2584
+ var target = UI.$(e.target);
2585
+
2586
+ if (target[0] == $this.element[0] && $this.options.bgclose) {
2587
+ $this.hide();
2588
+ }
2589
+ });
2590
+
2591
+ UI.domObserve(this.element, function(e) { $this.resize(); });
2592
+ },
2593
+
2594
+ toggle: function() {
2595
+ return this[this.isActive() ? "hide" : "show"]();
2596
+ },
2597
+
2598
+ show: function() {
2599
+
2600
+ if (!this.element.length) return;
2601
+
2602
+ var $this = this;
2603
+
2604
+ if (this.isActive()) return;
2605
+
2606
+ if (this.options.modal && active) {
2607
+ active.hide(true);
2608
+ }
2609
+
2610
+ this.element.removeClass("uk-open").show();
2611
+ this.resize(true);
2612
+
2613
+ if (this.options.modal) {
2614
+ active = this;
2615
+ }
2616
+
2617
+ this.active = true;
2618
+
2619
+ activeCount++;
2620
+
2621
+ if (UI.support.transition) {
2622
+ this.hasTransitioned = false;
2623
+ this.element.one(UI.support.transition.end, function(){
2624
+ $this.hasTransitioned = true;
2625
+ }).addClass("uk-open");
2626
+ } else {
2627
+ this.element.addClass("uk-open");
2628
+ }
2629
+
2630
+ $html.addClass("uk-modal-page").height(); // force browser engine redraw
2631
+
2632
+ // Update ARIA
2633
+ this.element.attr('aria-hidden', 'false');
2634
+
2635
+ this.element.trigger("show.uk.modal");
2636
+
2637
+ UI.Utils.checkDisplay(this.dialog, true);
2638
+
2639
+ return this;
2640
+ },
2641
+
2642
+ hide: function(force) {
2643
+
2644
+ if (!force && UI.support.transition && this.hasTransitioned) {
2645
+
2646
+ var $this = this;
2647
+
2648
+ this.one(UI.support.transition.end, function() {
2649
+ $this._hide();
2650
+ }).removeClass("uk-open");
2651
+
2652
+ } else {
2653
+
2654
+ this._hide();
2655
+ }
2656
+
2657
+ return this;
2658
+ },
2659
+
2660
+ resize: function(force) {
2661
+
2662
+ if (!this.isActive() && !force) return;
2663
+
2664
+ var bodywidth = body.width();
2665
+
2666
+ this.scrollbarwidth = window.innerWidth - bodywidth;
2667
+
2668
+ body.css(this.paddingdir, this.scrollbarwidth);
2669
+
2670
+ this.element.css('overflow-y', this.scrollbarwidth ? 'scroll' : 'auto');
2671
+
2672
+ if (!this.updateScrollable() && this.options.center) {
2673
+
2674
+ var dh = this.dialog.outerHeight(),
2675
+ pad = parseInt(this.dialog.css('margin-top'), 10) + parseInt(this.dialog.css('margin-bottom'), 10);
2676
+
2677
+ if ((dh + pad) < window.innerHeight) {
2678
+ this.dialog.css({'top': (window.innerHeight/2 - dh/2) - pad });
2679
+ } else {
2680
+ this.dialog.css({'top': ''});
2681
+ }
2682
+ }
2683
+ },
2684
+
2685
+ updateScrollable: function() {
2686
+
2687
+ // has scrollable?
2688
+ var scrollable = this.dialog.find('.uk-overflow-container:visible:first');
2689
+
2690
+ if (scrollable.length) {
2691
+
2692
+ scrollable.css('height', 0);
2693
+
2694
+ var offset = Math.abs(parseInt(this.dialog.css('margin-top'), 10)),
2695
+ dh = this.dialog.outerHeight(),
2696
+ wh = window.innerHeight,
2697
+ h = wh - 2*(offset < 20 ? 20:offset) - dh;
2698
+
2699
+ scrollable.css({
2700
+ 'max-height': (h < this.options.minScrollHeight ? '':h),
2701
+ 'height':''
2702
+ });
2703
+
2704
+ return true;
2705
+ }
2706
+
2707
+ return false;
2708
+ },
2709
+
2710
+ _hide: function() {
2711
+
2712
+ this.active = false;
2713
+ if (activeCount > 0) activeCount--;
2714
+ else activeCount = 0;
2715
+
2716
+ this.element.hide().removeClass('uk-open');
2717
+
2718
+ // Update ARIA
2719
+ this.element.attr('aria-hidden', 'true');
2720
+
2721
+ if (!activeCount) {
2722
+ $html.removeClass('uk-modal-page');
2723
+ body.css(this.paddingdir, "");
2724
+ }
2725
+
2726
+ if (active===this) active = false;
2727
+
2728
+ this.trigger('hide.uk.modal');
2729
+ },
2730
+
2731
+ isActive: function() {
2732
+ return this.element.hasClass('uk-open');
2733
+ }
2734
+
2735
+ });
2736
+
2737
+ UI.component('modalTrigger', {
2738
+
2739
+ boot: function() {
2740
+
2741
+ // init code
2742
+ UI.$html.on("click.modal.uikit", "[data-uk-modal]", function(e) {
2743
+
2744
+ var ele = UI.$(this);
2745
+
2746
+ if (ele.is("a")) {
2747
+ e.preventDefault();
2748
+ }
2749
+
2750
+ if (!ele.data("modalTrigger")) {
2751
+ var modal = UI.modalTrigger(ele, UI.Utils.options(ele.attr("data-uk-modal")));
2752
+ modal.show();
2753
+ }
2754
+
2755
+ });
2756
+
2757
+ // close modal on esc button
2758
+ UI.$html.on('keydown.modal.uikit', function (e) {
2759
+
2760
+ if (active && e.keyCode === 27 && active.options.keyboard) { // ESC
2761
+ e.preventDefault();
2762
+ active.hide();
2763
+ }
2764
+ });
2765
+ },
2766
+
2767
+ init: function() {
2768
+
2769
+ var $this = this;
2770
+
2771
+ this.options = UI.$.extend({
2772
+ "target": $this.element.is("a") ? $this.element.attr("href") : false
2773
+ }, this.options);
2774
+
2775
+ this.modal = UI.modal(this.options.target, this.options);
2776
+
2777
+ this.on("click", function(e) {
2778
+ e.preventDefault();
2779
+ $this.show();
2780
+ });
2781
+
2782
+ //methods
2783
+ this.proxy(this.modal, "show hide isActive");
2784
+ }
2785
+ });
2786
+
2787
+ UI.modal.dialog = function(content, options) {
2788
+
2789
+ var modal = UI.modal(UI.$(UI.modal.dialog.template).appendTo("body"), options);
2790
+
2791
+ modal.on("hide.uk.modal", function(){
2792
+ if (modal.persist) {
2793
+ modal.persist.appendTo(modal.persist.data("modalPersistParent"));
2794
+ modal.persist = false;
2795
+ }
2796
+ modal.element.remove();
2797
+ });
2798
+
2799
+ setContent(content, modal);
2800
+
2801
+ return modal;
2802
+ };
2803
+
2804
+ UI.modal.dialog.template = '<div class="uk-modal"><div class="uk-modal-dialog" style="min-height:0;"></div></div>';
2805
+
2806
+ UI.modal.alert = function(content, options) {
2807
+
2808
+ options = UI.$.extend(true, {bgclose:false, keyboard:false, modal:false, labels:UI.modal.labels}, options);
2809
+
2810
+ var modal = UI.modal.dialog(([
2811
+ '<div class="uk-margin uk-modal-content">'+String(content)+'</div>',
2812
+ '<div class="uk-modal-footer uk-text-right"><button class="uk-button uk-button-primary uk-modal-close">'+options.labels.Ok+'</button></div>'
2813
+ ]).join(""), options);
2814
+
2815
+ modal.on('show.uk.modal', function(){
2816
+ setTimeout(function(){
2817
+ modal.element.find('button:first').focus();
2818
+ }, 50);
2819
+ });
2820
+
2821
+ return modal.show();
2822
+ };
2823
+
2824
+ UI.modal.confirm = function(content, onconfirm, oncancel) {
2825
+
2826
+ var options = arguments.length > 1 && arguments[arguments.length-1] ? arguments[arguments.length-1] : {};
2827
+
2828
+ onconfirm = UI.$.isFunction(onconfirm) ? onconfirm : function(){};
2829
+ oncancel = UI.$.isFunction(oncancel) ? oncancel : function(){};
2830
+ options = UI.$.extend(true, {bgclose:false, keyboard:false, modal:false, labels:UI.modal.labels}, UI.$.isFunction(options) ? {}:options);
2831
+
2832
+ var modal = UI.modal.dialog(([
2833
+ '<div class="uk-margin uk-modal-content">'+String(content)+'</div>',
2834
+ '<div class="uk-modal-footer uk-text-right"><button class="uk-button js-modal-confirm-cancel">'+options.labels.Cancel+'</button> <button class="uk-button uk-button-primary js-modal-confirm">'+options.labels.Ok+'</button></div>'
2835
+ ]).join(""), options);
2836
+
2837
+ modal.element.find(".js-modal-confirm, .js-modal-confirm-cancel").on("click", function(){
2838
+ UI.$(this).is('.js-modal-confirm') ? onconfirm() : oncancel();
2839
+ modal.hide();
2840
+ });
2841
+
2842
+ modal.on('show.uk.modal', function(){
2843
+ setTimeout(function(){
2844
+ modal.element.find('.js-modal-confirm').focus();
2845
+ }, 50);
2846
+ });
2847
+
2848
+ return modal.show();
2849
+ };
2850
+
2851
+ UI.modal.prompt = function(text, value, onsubmit, options) {
2852
+
2853
+ onsubmit = UI.$.isFunction(onsubmit) ? onsubmit : function(value){};
2854
+ options = UI.$.extend(true, {bgclose:false, keyboard:false, modal:false, labels:UI.modal.labels}, options);
2855
+
2856
+ var modal = UI.modal.dialog(([
2857
+ text ? '<div class="uk-modal-content uk-form">'+String(text)+'</div>':'',
2858
+ '<div class="uk-margin-small-top uk-modal-content uk-form"><p><input type="text" class="uk-width-1-1"></p></div>',
2859
+ '<div class="uk-modal-footer uk-text-right"><button class="uk-button uk-modal-close">'+options.labels.Cancel+'</button> <button class="uk-button uk-button-primary js-modal-ok">'+options.labels.Ok+'</button></div>'
2860
+ ]).join(""), options),
2861
+
2862
+ input = modal.element.find("input[type='text']").val(value || '').on('keyup', function(e){
2863
+ if (e.keyCode == 13) {
2864
+ modal.element.find(".js-modal-ok").trigger('click');
2865
+ }
2866
+ });
2867
+
2868
+ modal.element.find(".js-modal-ok").on("click", function(){
2869
+ if (onsubmit(input.val())!==false){
2870
+ modal.hide();
2871
+ }
2872
+ });
2873
+
2874
+ modal.on('show.uk.modal', function(){
2875
+ setTimeout(function(){
2876
+ input.focus();
2877
+ }, 50);
2878
+ });
2879
+
2880
+ return modal.show();
2881
+ };
2882
+
2883
+ UI.modal.blockUI = function(content, options) {
2884
+
2885
+ var modal = UI.modal.dialog(([
2886
+ '<div class="uk-margin uk-modal-content">'+String(content || '<div class="uk-text-center">...</div>')+'</div>'
2887
+ ]).join(""), UI.$.extend({bgclose:false, keyboard:false, modal:false}, options));
2888
+
2889
+ modal.content = modal.element.find('.uk-modal-content:first');
2890
+
2891
+ return modal.show();
2892
+ };
2893
+
2894
+
2895
+ UI.modal.labels = {
2896
+ 'Ok': 'Ok',
2897
+ 'Cancel': 'Cancel'
2898
+ };
2899
+
2900
+
2901
+ // helper functions
2902
+ function setContent(content, modal){
2903
+
2904
+ if(!modal) return;
2905
+
2906
+ if (typeof content === 'object') {
2907
+
2908
+ // convert DOM object to a jQuery object
2909
+ content = content instanceof jQuery ? content : UI.$(content);
2910
+
2911
+ if(content.parent().length) {
2912
+ modal.persist = content;
2913
+ modal.persist.data("modalPersistParent", content.parent());
2914
+ }
2915
+ }else if (typeof content === 'string' || typeof content === 'number') {
2916
+ // just insert the data as innerHTML
2917
+ content = UI.$('<div></div>').html(content);
2918
+ }else {
2919
+ // unsupported data type!
2920
+ content = UI.$('<div></div>').html('UIkit.modal Error: Unsupported data type: ' + typeof content);
2921
+ }
2922
+
2923
+ content.appendTo(modal.element.find('.uk-modal-dialog'));
2924
+
2925
+ return modal;
2926
+ }
2927
+
2928
+ })(UIkit);
2929
+
2930
+ (function(UI) {
2931
+
2932
+ "use strict";
2933
+
2934
+ UI.component('nav', {
2935
+
2936
+ defaults: {
2937
+ "toggle": ">li.uk-parent > a[href='#']",
2938
+ "lists": ">li.uk-parent > ul",
2939
+ "multiple": false
2940
+ },
2941
+
2942
+ boot: function() {
2943
+
2944
+ // init code
2945
+ UI.ready(function(context) {
2946
+
2947
+ UI.$("[data-uk-nav]", context).each(function() {
2948
+ var nav = UI.$(this);
2949
+
2950
+ if (!nav.data("nav")) {
2951
+ var obj = UI.nav(nav, UI.Utils.options(nav.attr("data-uk-nav")));
2952
+ }
2953
+ });
2954
+ });
2955
+ },
2956
+
2957
+ init: function() {
2958
+
2959
+ var $this = this;
2960
+
2961
+ this.on("click.uk.nav", this.options.toggle, function(e) {
2962
+ e.preventDefault();
2963
+ var ele = UI.$(this);
2964
+ $this.open(ele.parent()[0] == $this.element[0] ? ele : ele.parent("li"));
2965
+ });
2966
+
2967
+ this.find(this.options.lists).each(function() {
2968
+ var $ele = UI.$(this),
2969
+ parent = $ele.parent(),
2970
+ active = parent.hasClass("uk-active");
2971
+
2972
+ $ele.wrap('<div style="overflow:hidden;height:0;position:relative;"></div>');
2973
+ parent.data("list-container", $ele.parent()[active ? 'removeClass':'addClass']('uk-hidden'));
2974
+
2975
+ // Init ARIA
2976
+ parent.attr('aria-expanded', parent.hasClass("uk-open"));
2977
+
2978
+ if (active) $this.open(parent, true);
2979
+ });
2980
+
2981
+ },
2982
+
2983
+ open: function(li, noanimation) {
2984
+
2985
+ var $this = this, element = this.element, $li = UI.$(li), $container = $li.data('list-container');
2986
+
2987
+ if (!this.options.multiple) {
2988
+
2989
+ element.children('.uk-open').not(li).each(function() {
2990
+
2991
+ var ele = UI.$(this);
2992
+
2993
+ if (ele.data('list-container')) {
2994
+ ele.data('list-container').stop().animate({height: 0}, function() {
2995
+ UI.$(this).parent().removeClass('uk-open').end().addClass('uk-hidden');
2996
+ });
2997
+ }
2998
+ });
2999
+ }
3000
+
3001
+ $li.toggleClass('uk-open');
3002
+
3003
+ // Update ARIA
3004
+ $li.attr('aria-expanded', $li.hasClass('uk-open'));
3005
+
3006
+ if ($container) {
3007
+
3008
+ if ($li.hasClass('uk-open')) {
3009
+ $container.removeClass('uk-hidden');
3010
+ }
3011
+
3012
+ if (noanimation) {
3013
+
3014
+ $container.stop().height($li.hasClass('uk-open') ? 'auto' : 0);
3015
+
3016
+ if (!$li.hasClass('uk-open')) {
3017
+ $container.addClass('uk-hidden');
3018
+ }
3019
+
3020
+ this.trigger('display.uk.check');
3021
+
3022
+ } else {
3023
+
3024
+ $container.stop().animate({
3025
+ height: ($li.hasClass('uk-open') ? getHeight($container.find('ul:first')) : 0)
3026
+ }, function() {
3027
+
3028
+ if (!$li.hasClass('uk-open')) {
3029
+ $container.addClass('uk-hidden');
3030
+ } else {
3031
+ $container.css('height', '');
3032
+ }
3033
+
3034
+ $this.trigger('display.uk.check');
3035
+ });
3036
+ }
3037
+ }
3038
+ }
3039
+ });
3040
+
3041
+
3042
+ // helper
3043
+
3044
+ function getHeight(ele) {
3045
+ var $ele = UI.$(ele), height = "auto";
3046
+
3047
+ if ($ele.is(":visible")) {
3048
+ height = $ele.outerHeight();
3049
+ } else {
3050
+ var tmp = {
3051
+ position: $ele.css("position"),
3052
+ visibility: $ele.css("visibility"),
3053
+ display: $ele.css("display")
3054
+ };
3055
+
3056
+ height = $ele.css({position: 'absolute', visibility: 'hidden', display: 'block'}).outerHeight();
3057
+
3058
+ $ele.css(tmp); // reset element
3059
+ }
3060
+
3061
+ return height;
3062
+ }
3063
+
3064
+ })(UIkit);
3065
+
3066
+ (function(UI) {
3067
+
3068
+ "use strict";
3069
+
3070
+ var scrollpos = {x: window.scrollX, y: window.scrollY},
3071
+ $win = UI.$win,
3072
+ $doc = UI.$doc,
3073
+ $html = UI.$html,
3074
+ Offcanvas = {
3075
+
3076
+ show: function(element) {
3077
+
3078
+ element = UI.$(element);
3079
+
3080
+ if (!element.length) return;
3081
+
3082
+ var $body = UI.$('body'),
3083
+ bar = element.find(".uk-offcanvas-bar:first"),
3084
+ rtl = (UI.langdirection == "right"),
3085
+ flip = bar.hasClass("uk-offcanvas-bar-flip") ? -1:1,
3086
+ dir = flip * (rtl ? -1 : 1),
3087
+
3088
+ scrollbarwidth = window.innerWidth - $body.width();
3089
+
3090
+ scrollpos = {x: window.pageXOffset, y: window.pageYOffset};
3091
+
3092
+ element.addClass("uk-active");
3093
+
3094
+ $body.css({"width": window.innerWidth - scrollbarwidth, "height": window.innerHeight}).addClass("uk-offcanvas-page");
3095
+ $body.css((rtl ? "margin-right" : "margin-left"), (rtl ? -1 : 1) * (bar.outerWidth() * dir)).width(); // .width() - force redraw
3096
+
3097
+ $html.css('margin-top', scrollpos.y * -1);
3098
+
3099
+ bar.addClass("uk-offcanvas-bar-show");
3100
+
3101
+ this._initElement(element);
3102
+
3103
+ bar.trigger('show.uk.offcanvas', [element, bar]);
3104
+
3105
+ // Update ARIA
3106
+ element.attr('aria-hidden', 'false');
3107
+ },
3108
+
3109
+ hide: function(force) {
3110
+
3111
+ var $body = UI.$('body'),
3112
+ panel = UI.$(".uk-offcanvas.uk-active"),
3113
+ rtl = (UI.langdirection == "right"),
3114
+ bar = panel.find(".uk-offcanvas-bar:first"),
3115
+ finalize = function() {
3116
+ $body.removeClass("uk-offcanvas-page").css({"width": "", "height": "", "margin-left": "", "margin-right": ""});
3117
+ panel.removeClass("uk-active");
3118
+
3119
+ bar.removeClass("uk-offcanvas-bar-show");
3120
+ $html.css('margin-top', '');
3121
+ window.scrollTo(scrollpos.x, scrollpos.y);
3122
+ bar.trigger('hide.uk.offcanvas', [panel, bar]);
3123
+
3124
+ // Update ARIA
3125
+ panel.attr('aria-hidden', 'true');
3126
+ };
3127
+
3128
+ if (!panel.length) return;
3129
+
3130
+ if (UI.support.transition && !force) {
3131
+
3132
+ $body.one(UI.support.transition.end, function() {
3133
+ finalize();
3134
+ }).css((rtl ? "margin-right" : "margin-left"), "");
3135
+
3136
+ setTimeout(function(){
3137
+ bar.removeClass("uk-offcanvas-bar-show");
3138
+ }, 0);
3139
+
3140
+ } else {
3141
+ finalize();
3142
+ }
3143
+ },
3144
+
3145
+ _initElement: function(element) {
3146
+
3147
+ if (element.data("OffcanvasInit")) return;
3148
+
3149
+ element.on("click.uk.offcanvas swipeRight.uk.offcanvas swipeLeft.uk.offcanvas", function(e) {
3150
+
3151
+ var target = UI.$(e.target);
3152
+
3153
+ if (!e.type.match(/swipe/)) {
3154
+
3155
+ if (!target.hasClass("uk-offcanvas-close")) {
3156
+ if (target.hasClass("uk-offcanvas-bar")) return;
3157
+ if (target.parents(".uk-offcanvas-bar:first").length) return;
3158
+ }
3159
+ }
3160
+
3161
+ e.stopImmediatePropagation();
3162
+ Offcanvas.hide();
3163
+ });
3164
+
3165
+ element.on("click", "a[href*='#']", function(e){
3166
+
3167
+ var link = UI.$(this),
3168
+ href = link.attr("href");
3169
+
3170
+ if (href == "#") {
3171
+ return;
3172
+ }
3173
+
3174
+ UI.$doc.one('hide.uk.offcanvas', function() {
3175
+
3176
+ var target;
3177
+
3178
+ try {
3179
+ target = UI.$(link[0].hash);
3180
+ } catch (e){
3181
+ target = '';
3182
+ }
3183
+
3184
+ if (!target.length) {
3185
+ target = UI.$('[name="'+link[0].hash.replace('#','')+'"]');
3186
+ }
3187
+
3188
+ if (target.length && UI.Utils.scrollToElement) {
3189
+ UI.Utils.scrollToElement(target, UI.Utils.options(link.attr('data-uk-smooth-scroll') || '{}'));
3190
+ } else {
3191
+ window.location.href = href;
3192
+ }
3193
+ });
3194
+
3195
+ Offcanvas.hide();
3196
+ });
3197
+
3198
+ element.data("OffcanvasInit", true);
3199
+ }
3200
+ };
3201
+
3202
+ UI.component('offcanvasTrigger', {
3203
+
3204
+ boot: function() {
3205
+
3206
+ // init code
3207
+ $html.on("click.offcanvas.uikit", "[data-uk-offcanvas]", function(e) {
3208
+
3209
+ e.preventDefault();
3210
+
3211
+ var ele = UI.$(this);
3212
+
3213
+ if (!ele.data("offcanvasTrigger")) {
3214
+ var obj = UI.offcanvasTrigger(ele, UI.Utils.options(ele.attr("data-uk-offcanvas")));
3215
+ ele.trigger("click");
3216
+ }
3217
+ });
3218
+
3219
+ $html.on('keydown.uk.offcanvas', function(e) {
3220
+
3221
+ if (e.keyCode === 27) { // ESC
3222
+ Offcanvas.hide();
3223
+ }
3224
+ });
3225
+ },
3226
+
3227
+ init: function() {
3228
+
3229
+ var $this = this;
3230
+
3231
+ this.options = UI.$.extend({
3232
+ "target": $this.element.is("a") ? $this.element.attr("href") : false
3233
+ }, this.options);
3234
+
3235
+ this.on("click", function(e) {
3236
+ e.preventDefault();
3237
+ Offcanvas.show($this.options.target);
3238
+ });
3239
+ }
3240
+ });
3241
+
3242
+ UI.offcanvas = Offcanvas;
3243
+
3244
+ })(UIkit);
3245
+
3246
+ (function(UI) {
3247
+
3248
+ "use strict";
3249
+
3250
+ var Animations;
3251
+
3252
+ UI.component('switcher', {
3253
+
3254
+ defaults: {
3255
+ connect : false,
3256
+ toggle : ">*",
3257
+ active : 0,
3258
+ animation : false,
3259
+ duration : 200,
3260
+ swiping : true
3261
+ },
3262
+
3263
+ animating: false,
3264
+
3265
+ boot: function() {
3266
+
3267
+ // init code
3268
+ UI.ready(function(context) {
3269
+
3270
+ UI.$("[data-uk-switcher]", context).each(function() {
3271
+ var switcher = UI.$(this);
3272
+
3273
+ if (!switcher.data("switcher")) {
3274
+ var obj = UI.switcher(switcher, UI.Utils.options(switcher.attr("data-uk-switcher")));
3275
+ }
3276
+ });
3277
+ });
3278
+ },
3279
+
3280
+ init: function() {
3281
+
3282
+ var $this = this;
3283
+
3284
+ this.on("click.uk.switcher", this.options.toggle, function(e) {
3285
+ e.preventDefault();
3286
+ $this.show(this);
3287
+ });
3288
+
3289
+ if (this.options.connect) {
3290
+
3291
+ this.connect = UI.$(this.options.connect);
3292
+
3293
+ this.connect.children().removeClass("uk-active");
3294
+
3295
+ // delegate switch commands within container content
3296
+ if (this.connect.length) {
3297
+
3298
+ // Init ARIA for connect
3299
+ this.connect.children().attr('aria-hidden', 'true');
3300
+
3301
+ this.connect.on("click", '[data-uk-switcher-item]', function(e) {
3302
+
3303
+ e.preventDefault();
3304
+
3305
+ var item = UI.$(this).attr('data-uk-switcher-item');
3306
+
3307
+ if ($this.index == item) return;
3308
+
3309
+ switch(item) {
3310
+ case 'next':
3311
+ case 'previous':
3312
+ $this.show($this.index + (item=='next' ? 1:-1));
3313
+ break;
3314
+ default:
3315
+ $this.show(parseInt(item, 10));
3316
+ }
3317
+ });
3318
+
3319
+ if (this.options.swiping) {
3320
+
3321
+ this.connect.on('swipeRight swipeLeft', function(e) {
3322
+ e.preventDefault();
3323
+ if(!window.getSelection().toString()) {
3324
+ $this.show($this.index + (e.type == 'swipeLeft' ? 1 : -1));
3325
+ }
3326
+ });
3327
+ }
3328
+ }
3329
+
3330
+ var toggles = this.find(this.options.toggle),
3331
+ active = toggles.filter(".uk-active");
3332
+
3333
+ if (active.length) {
3334
+ this.show(active, false);
3335
+ } else {
3336
+
3337
+ if (this.options.active===false) return;
3338
+
3339
+ active = toggles.eq(this.options.active);
3340
+ this.show(active.length ? active : toggles.eq(0), false);
3341
+ }
3342
+
3343
+ // Init ARIA for toggles
3344
+ toggles.not(active).attr('aria-expanded', 'false');
3345
+ active.attr('aria-expanded', 'true');
3346
+ }
3347
+
3348
+ },
3349
+
3350
+ show: function(tab, animate) {
3351
+
3352
+ if (this.animating) {
3353
+ return;
3354
+ }
3355
+
3356
+ if (isNaN(tab)) {
3357
+ tab = UI.$(tab);
3358
+ } else {
3359
+
3360
+ var toggles = this.find(this.options.toggle);
3361
+
3362
+ tab = tab < 0 ? toggles.length-1 : tab;
3363
+ tab = toggles.eq(toggles[tab] ? tab : 0);
3364
+ }
3365
+
3366
+ var $this = this,
3367
+ toggles = this.find(this.options.toggle),
3368
+ active = UI.$(tab),
3369
+ animation = Animations[this.options.animation] || function(current, next) {
3370
+
3371
+ if (!$this.options.animation) {
3372
+ return Animations.none.apply($this);
3373
+ }
3374
+
3375
+ var anim = $this.options.animation.split(',');
3376
+
3377
+ if (anim.length == 1) {
3378
+ anim[1] = anim[0];
3379
+ }
3380
+
3381
+ anim[0] = anim[0].trim();
3382
+ anim[1] = anim[1].trim();
3383
+
3384
+ return coreAnimation.apply($this, [anim, current, next]);
3385
+ };
3386
+
3387
+ if (animate===false || !UI.support.animation) {
3388
+ animation = Animations.none;
3389
+ }
3390
+
3391
+ if (active.hasClass("uk-disabled")) return;
3392
+
3393
+ // Update ARIA for Toggles
3394
+ toggles.attr('aria-expanded', 'false');
3395
+ active.attr('aria-expanded', 'true');
3396
+
3397
+ toggles.filter(".uk-active").removeClass("uk-active");
3398
+ active.addClass("uk-active");
3399
+
3400
+ if (this.options.connect && this.connect.length) {
3401
+
3402
+ this.index = this.find(this.options.toggle).index(active);
3403
+
3404
+ if (this.index == -1 ) {
3405
+ this.index = 0;
3406
+ }
3407
+
3408
+ this.connect.each(function() {
3409
+
3410
+ var container = UI.$(this),
3411
+ children = UI.$(container.children()),
3412
+ current = UI.$(children.filter('.uk-active')),
3413
+ next = UI.$(children.eq($this.index));
3414
+
3415
+ $this.animating = true;
3416
+
3417
+ animation.apply($this, [current, next]).then(function(){
3418
+
3419
+ current.removeClass("uk-active");
3420
+ next.addClass("uk-active");
3421
+
3422
+ // Update ARIA for connect
3423
+ current.attr('aria-hidden', 'true');
3424
+ next.attr('aria-hidden', 'false');
3425
+
3426
+ UI.Utils.checkDisplay(next, true);
3427
+
3428
+ $this.animating = false;
3429
+
3430
+ });
3431
+ });
3432
+ }
3433
+
3434
+ this.trigger("show.uk.switcher", [active]);
3435
+ }
3436
+ });
3437
+
3438
+ Animations = {
3439
+
3440
+ 'none': function() {
3441
+ var d = UI.$.Deferred();
3442
+ d.resolve();
3443
+ return d.promise();
3444
+ },
3445
+
3446
+ 'fade': function(current, next) {
3447
+ return coreAnimation.apply(this, ['uk-animation-fade', current, next]);
3448
+ },
3449
+
3450
+ 'slide-bottom': function(current, next) {
3451
+ return coreAnimation.apply(this, ['uk-animation-slide-bottom', current, next]);
3452
+ },
3453
+
3454
+ 'slide-top': function(current, next) {
3455
+ return coreAnimation.apply(this, ['uk-animation-slide-top', current, next]);
3456
+ },
3457
+
3458
+ 'slide-vertical': function(current, next, dir) {
3459
+
3460
+ var anim = ['uk-animation-slide-top', 'uk-animation-slide-bottom'];
3461
+
3462
+ if (current && current.index() > next.index()) {
3463
+ anim.reverse();
3464
+ }
3465
+
3466
+ return coreAnimation.apply(this, [anim, current, next]);
3467
+ },
3468
+
3469
+ 'slide-left': function(current, next) {
3470
+ return coreAnimation.apply(this, ['uk-animation-slide-left', current, next]);
3471
+ },
3472
+
3473
+ 'slide-right': function(current, next) {
3474
+ return coreAnimation.apply(this, ['uk-animation-slide-right', current, next]);
3475
+ },
3476
+
3477
+ 'slide-horizontal': function(current, next, dir) {
3478
+
3479
+ var anim = ['uk-animation-slide-right', 'uk-animation-slide-left'];
3480
+
3481
+ if (current && current.index() > next.index()) {
3482
+ anim.reverse();
3483
+ }
3484
+
3485
+ return coreAnimation.apply(this, [anim, current, next]);
3486
+ },
3487
+
3488
+ 'scale': function(current, next) {
3489
+ return coreAnimation.apply(this, ['uk-animation-scale-up', current, next]);
3490
+ }
3491
+ };
3492
+
3493
+ UI.switcher.animations = Animations;
3494
+
3495
+
3496
+ // helpers
3497
+
3498
+ function coreAnimation(cls, current, next) {
3499
+
3500
+ var d = UI.$.Deferred(), clsIn = cls, clsOut = cls, release;
3501
+
3502
+ if (next[0]===current[0]) {
3503
+ d.resolve();
3504
+ return d.promise();
3505
+ }
3506
+
3507
+ if (typeof(cls) == 'object') {
3508
+ clsIn = cls[0];
3509
+ clsOut = cls[1] || cls[0];
3510
+ }
3511
+
3512
+ UI.$body.css('overflow-x', 'hidden'); // fix scroll jumping in iOS
3513
+
3514
+ release = function() {
3515
+
3516
+ if (current) current.hide().removeClass('uk-active '+clsOut+' uk-animation-reverse');
3517
+
3518
+ next.addClass(clsIn).one(UI.support.animation.end, function() {
3519
+
3520
+ next.removeClass(''+clsIn+'').css({opacity:'', display:''});
3521
+
3522
+ d.resolve();
3523
+
3524
+ UI.$body.css('overflow-x', '');
3525
+
3526
+ if (current) current.css({opacity:'', display:''});
3527
+
3528
+ }.bind(this)).show();
3529
+ };
3530
+
3531
+ next.css('animation-duration', this.options.duration+'ms');
3532
+
3533
+ if (current && current.length) {
3534
+
3535
+ current.css('animation-duration', this.options.duration+'ms');
3536
+
3537
+ current.css('display', 'none').addClass(clsOut+' uk-animation-reverse').one(UI.support.animation.end, function() {
3538
+ release();
3539
+ }.bind(this)).css('display', '');
3540
+
3541
+ } else {
3542
+ next.addClass('uk-active');
3543
+ release();
3544
+ }
3545
+
3546
+ return d.promise();
3547
+ }
3548
+
3549
+ })(UIkit);
3550
+
3551
+ (function(UI) {
3552
+
3553
+ "use strict";
3554
+
3555
+ UI.component('tab', {
3556
+
3557
+ defaults: {
3558
+ 'target' : '>li:not(.uk-tab-responsive, .uk-disabled)',
3559
+ 'connect' : false,
3560
+ 'active' : 0,
3561
+ 'animation' : false,
3562
+ 'duration' : 200,
3563
+ 'swiping' : true
3564
+ },
3565
+
3566
+ boot: function() {
3567
+
3568
+ // init code
3569
+ UI.ready(function(context) {
3570
+
3571
+ UI.$("[data-uk-tab]", context).each(function() {
3572
+
3573
+ var tab = UI.$(this);
3574
+
3575
+ if (!tab.data("tab")) {
3576
+ var obj = UI.tab(tab, UI.Utils.options(tab.attr("data-uk-tab")));
3577
+ }
3578
+ });
3579
+ });
3580
+ },
3581
+
3582
+ init: function() {
3583
+
3584
+ var $this = this;
3585
+
3586
+ this.current = false;
3587
+
3588
+ this.on("click.uk.tab", this.options.target, function(e) {
3589
+
3590
+ e.preventDefault();
3591
+
3592
+ if ($this.switcher && $this.switcher.animating) {
3593
+ return;
3594
+ }
3595
+
3596
+ var current = $this.find($this.options.target).not(this);
3597
+
3598
+ current.removeClass("uk-active").blur();
3599
+
3600
+ $this.trigger("change.uk.tab", [UI.$(this).addClass("uk-active"), $this.current]);
3601
+
3602
+ $this.current = UI.$(this);
3603
+
3604
+ // Update ARIA
3605
+ if (!$this.options.connect) {
3606
+ current.attr('aria-expanded', 'false');
3607
+ UI.$(this).attr('aria-expanded', 'true');
3608
+ }
3609
+ });
3610
+
3611
+ if (this.options.connect) {
3612
+ this.connect = UI.$(this.options.connect);
3613
+ }
3614
+
3615
+ // init responsive tab
3616
+ this.responsivetab = UI.$('<li class="uk-tab-responsive uk-active"><a></a></li>').append('<div class="uk-dropdown uk-dropdown-small"><ul class="uk-nav uk-nav-dropdown"></ul><div>');
3617
+
3618
+ this.responsivetab.dropdown = this.responsivetab.find('.uk-dropdown');
3619
+ this.responsivetab.lst = this.responsivetab.dropdown.find('ul');
3620
+ this.responsivetab.caption = this.responsivetab.find('a:first');
3621
+
3622
+ if (this.element.hasClass("uk-tab-bottom")) this.responsivetab.dropdown.addClass("uk-dropdown-up");
3623
+
3624
+ // handle click
3625
+ this.responsivetab.lst.on('click.uk.tab', 'a', function(e) {
3626
+
3627
+ e.preventDefault();
3628
+ e.stopPropagation();
3629
+
3630
+ var link = UI.$(this);
3631
+
3632
+ $this.element.children('li:not(.uk-tab-responsive)').eq(link.data('index')).trigger('click');
3633
+ });
3634
+
3635
+ this.on('show.uk.switcher change.uk.tab', function(e, tab) {
3636
+ $this.responsivetab.caption.html(tab.text());
3637
+ });
3638
+
3639
+ this.element.append(this.responsivetab);
3640
+
3641
+ // init UIkit components
3642
+ if (this.options.connect) {
3643
+ this.switcher = UI.switcher(this.element, {
3644
+ 'toggle' : '>li:not(.uk-tab-responsive)',
3645
+ 'connect' : this.options.connect,
3646
+ 'active' : this.options.active,
3647
+ 'animation' : this.options.animation,
3648
+ 'duration' : this.options.duration,
3649
+ 'swiping' : this.options.swiping
3650
+ });
3651
+ }
3652
+
3653
+ UI.dropdown(this.responsivetab, {"mode": "click", "preventflip": "y"});
3654
+
3655
+ // init
3656
+ $this.trigger("change.uk.tab", [this.element.find(this.options.target).not('.uk-tab-responsive').filter('.uk-active')]);
3657
+
3658
+ this.check();
3659
+
3660
+ UI.$win.on('resize orientationchange', UI.Utils.debounce(function(){
3661
+ if ($this.element.is(":visible")) $this.check();
3662
+ }, 100));
3663
+
3664
+ this.on('display.uk.check', function(){
3665
+ if ($this.element.is(":visible")) $this.check();
3666
+ });
3667
+ },
3668
+
3669
+ check: function() {
3670
+
3671
+ var children = this.element.children('li:not(.uk-tab-responsive)').removeClass('uk-hidden');
3672
+
3673
+ if (!children.length) {
3674
+ this.responsivetab.addClass('uk-hidden');
3675
+ return;
3676
+ }
3677
+
3678
+ var top = (children.eq(0).offset().top + Math.ceil(children.eq(0).height()/2)),
3679
+ doresponsive = false,
3680
+ item, link, clone;
3681
+
3682
+ this.responsivetab.lst.empty();
3683
+
3684
+ children.each(function(){
3685
+
3686
+ if (UI.$(this).offset().top > top) {
3687
+ doresponsive = true;
3688
+ }
3689
+ });
3690
+
3691
+ if (doresponsive) {
3692
+
3693
+ for (var i = 0; i < children.length; i++) {
3694
+
3695
+ item = UI.$(children.eq(i));
3696
+ link = item.find('a');
3697
+
3698
+ if (item.css('float') != 'none' && !item.attr('uk-dropdown')) {
3699
+
3700
+ if (!item.hasClass('uk-disabled')) {
3701
+
3702
+ clone = item[0].outerHTML.replace('<a ', '<a data-index="'+i+'" ');
3703
+
3704
+ this.responsivetab.lst.append(clone);
3705
+ }
3706
+
3707
+ item.addClass('uk-hidden');
3708
+ }
3709
+ }
3710
+ }
3711
+
3712
+ this.responsivetab[this.responsivetab.lst.children('li').length ? 'removeClass':'addClass']('uk-hidden');
3713
+ }
3714
+ });
3715
+
3716
+ })(UIkit);
3717
+
3718
+ (function(UI){
3719
+
3720
+ "use strict";
3721
+
3722
+ UI.component('cover', {
3723
+
3724
+ defaults: {
3725
+ automute : true
3726
+ },
3727
+
3728
+ boot: function() {
3729
+
3730
+ // auto init
3731
+ UI.ready(function(context) {
3732
+
3733
+ UI.$("[data-uk-cover]", context).each(function(){
3734
+
3735
+ var ele = UI.$(this);
3736
+
3737
+ if(!ele.data("cover")) {
3738
+ var plugin = UI.cover(ele, UI.Utils.options(ele.attr("data-uk-cover")));
3739
+ }
3740
+ });
3741
+ });
3742
+ },
3743
+
3744
+ init: function() {
3745
+
3746
+ this.parent = this.element.parent();
3747
+
3748
+ UI.$win.on('load resize orientationchange', UI.Utils.debounce(function(){
3749
+ this.check();
3750
+ }.bind(this), 100));
3751
+
3752
+ this.on("display.uk.check", function(e) {
3753
+ if(this.element.is(":visible")) this.check();
3754
+ }.bind(this));
3755
+
3756
+ this.check();
3757
+
3758
+ if (this.element.is('iframe') && this.options.automute) {
3759
+
3760
+ var src = this.element.attr('src');
3761
+
3762
+ this.element.attr('src', '').on('load', function(){
3763
+
3764
+ this.contentWindow.postMessage('{ "event": "command", "func": "mute", "method":"setVolume", "value":0}', '*');
3765
+
3766
+ }).attr('src', [src, (src.indexOf('?') > -1 ? '&':'?'), 'enablejsapi=1&api=1'].join(''));
3767
+ }
3768
+ },
3769
+
3770
+ check: function() {
3771
+
3772
+ this.element.css({
3773
+ 'width' : '',
3774
+ 'height' : ''
3775
+ });
3776
+
3777
+ this.dimension = {w: this.element.width(), h: this.element.height()};
3778
+
3779
+ if (this.element.attr('width') && !isNaN(this.element.attr('width'))) {
3780
+ this.dimension.w = this.element.attr('width');
3781
+ }
3782
+
3783
+ if (this.element.attr('height') && !isNaN(this.element.attr('height'))) {
3784
+ this.dimension.h = this.element.attr('height');
3785
+ }
3786
+
3787
+ this.ratio = this.dimension.w / this.dimension.h;
3788
+
3789
+ var w = this.parent.width(), h = this.parent.height(), width, height;
3790
+
3791
+ // if element height < parent height (gap underneath)
3792
+ if ((w / this.ratio) < h) {
3793
+
3794
+ width = Math.ceil(h * this.ratio);
3795
+ height = h;
3796
+
3797
+ // element width < parent width (gap to right)
3798
+ } else {
3799
+
3800
+ width = w;
3801
+ height = Math.ceil(w / this.ratio);
3802
+ }
3803
+
3804
+ this.element.css({
3805
+ 'width' : width,
3806
+ 'height' : height
3807
+ });
3808
+ }
3809
+ });
3810
+
3811
+ })(UIkit);