fomantic-ui 2.9.0-beta.27 → 2.9.0-beta.272

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 (287) hide show
  1. package/.all-contributorsrc +215 -3
  2. package/.github/workflows/ci.yml +6 -6
  3. package/.github/workflows/nightly.yml +13 -8
  4. package/.github/workflows/release.yml +31 -0
  5. package/CONTRIBUTORS.md +76 -37
  6. package/README.md +8 -8
  7. package/dist/components/accordion.css +175 -35
  8. package/dist/components/accordion.js +6 -3
  9. package/dist/components/accordion.min.css +2 -2
  10. package/dist/components/accordion.min.js +3 -3
  11. package/dist/components/ad.css +1 -1
  12. package/dist/components/ad.min.css +1 -1
  13. package/dist/components/api.js +88 -29
  14. package/dist/components/api.min.js +3 -3
  15. package/dist/components/breadcrumb.css +1 -1
  16. package/dist/components/breadcrumb.min.css +1 -1
  17. package/dist/components/button.css +176 -134
  18. package/dist/components/button.min.css +2 -2
  19. package/dist/components/calendar.css +18 -1
  20. package/dist/components/calendar.js +6 -4
  21. package/dist/components/calendar.min.css +2 -2
  22. package/dist/components/calendar.min.js +3 -3
  23. package/dist/components/card.css +26 -19
  24. package/dist/components/card.min.css +2 -2
  25. package/dist/components/checkbox.css +2 -1
  26. package/dist/components/checkbox.js +17 -11
  27. package/dist/components/checkbox.min.css +2 -2
  28. package/dist/components/checkbox.min.js +3 -3
  29. package/dist/components/comment.css +11 -11
  30. package/dist/components/comment.min.css +1 -1
  31. package/dist/components/container.css +97 -3
  32. package/dist/components/container.min.css +2 -2
  33. package/dist/components/dimmer.css +29 -14
  34. package/dist/components/dimmer.js +11 -5
  35. package/dist/components/dimmer.min.css +2 -2
  36. package/dist/components/dimmer.min.js +3 -3
  37. package/dist/components/divider.css +1 -1
  38. package/dist/components/divider.min.css +1 -1
  39. package/dist/components/dropdown.css +54 -14
  40. package/dist/components/dropdown.js +66 -39
  41. package/dist/components/dropdown.min.css +2 -2
  42. package/dist/components/dropdown.min.js +3 -3
  43. package/dist/components/embed.css +1 -1
  44. package/dist/components/embed.js +1 -1
  45. package/dist/components/embed.min.css +1 -1
  46. package/dist/components/embed.min.js +3 -3
  47. package/dist/components/emoji.css +10147 -8139
  48. package/dist/components/emoji.min.css +1 -1
  49. package/dist/components/feed.css +28 -28
  50. package/dist/components/feed.min.css +2 -2
  51. package/dist/components/flag.css +734 -625
  52. package/dist/components/flag.min.css +2 -2
  53. package/dist/components/form.css +132 -55
  54. package/dist/components/form.js +38 -29
  55. package/dist/components/form.min.css +2 -2
  56. package/dist/components/form.min.js +3 -3
  57. package/dist/components/grid.css +14 -10
  58. package/dist/components/grid.min.css +2 -2
  59. package/dist/components/header.css +3 -1
  60. package/dist/components/header.min.css +2 -2
  61. package/dist/components/icon.css +126 -47
  62. package/dist/components/icon.min.css +2 -2
  63. package/dist/components/image.css +1 -1
  64. package/dist/components/image.min.css +1 -1
  65. package/dist/components/input.css +754 -17
  66. package/dist/components/input.min.css +2 -2
  67. package/dist/components/item.css +13 -13
  68. package/dist/components/item.min.css +1 -1
  69. package/dist/components/label.css +1 -1
  70. package/dist/components/label.min.css +1 -1
  71. package/dist/components/list.css +1 -1
  72. package/dist/components/list.min.css +1 -1
  73. package/dist/components/loader.css +1 -1
  74. package/dist/components/loader.min.css +1 -1
  75. package/dist/components/menu.css +29 -5
  76. package/dist/components/menu.min.css +1 -1
  77. package/dist/components/message.css +41 -41
  78. package/dist/components/message.min.css +2 -2
  79. package/dist/components/modal.css +13 -1
  80. package/dist/components/modal.js +127 -49
  81. package/dist/components/modal.min.css +2 -2
  82. package/dist/components/modal.min.js +3 -3
  83. package/dist/components/nag.css +1 -1
  84. package/dist/components/nag.js +1 -1
  85. package/dist/components/nag.min.css +1 -1
  86. package/dist/components/nag.min.js +3 -3
  87. package/dist/components/placeholder.css +1 -1
  88. package/dist/components/placeholder.min.css +1 -1
  89. package/dist/components/popup.css +1 -1
  90. package/dist/components/popup.js +2 -2
  91. package/dist/components/popup.min.css +1 -1
  92. package/dist/components/popup.min.js +3 -3
  93. package/dist/components/progress.css +1 -1
  94. package/dist/components/progress.js +4 -1
  95. package/dist/components/progress.min.css +1 -1
  96. package/dist/components/progress.min.js +3 -3
  97. package/dist/components/rail.css +1 -1
  98. package/dist/components/rail.min.css +1 -1
  99. package/dist/components/rating.css +1 -1
  100. package/dist/components/rating.js +1 -1
  101. package/dist/components/rating.min.css +1 -1
  102. package/dist/components/rating.min.js +3 -3
  103. package/dist/components/reset.css +3 -2
  104. package/dist/components/reset.min.css +2 -2
  105. package/dist/components/reveal.css +1 -1
  106. package/dist/components/reveal.min.css +1 -1
  107. package/dist/components/search.css +1 -1
  108. package/dist/components/search.js +2 -2
  109. package/dist/components/search.min.css +1 -1
  110. package/dist/components/search.min.js +3 -3
  111. package/dist/components/segment.css +91 -7
  112. package/dist/components/segment.min.css +2 -2
  113. package/dist/components/shape.css +1 -1
  114. package/dist/components/shape.js +3 -3
  115. package/dist/components/shape.min.css +1 -1
  116. package/dist/components/shape.min.js +3 -3
  117. package/dist/components/sidebar.css +4 -2
  118. package/dist/components/sidebar.js +8 -6
  119. package/dist/components/sidebar.min.css +2 -2
  120. package/dist/components/sidebar.min.js +3 -3
  121. package/dist/components/site.css +65 -39
  122. package/dist/components/site.js +1 -1
  123. package/dist/components/site.min.css +2 -2
  124. package/dist/components/site.min.js +3 -3
  125. package/dist/components/slider.js +1 -1
  126. package/dist/components/slider.min.js +3 -3
  127. package/dist/components/state.js +1 -1
  128. package/dist/components/state.min.js +3 -3
  129. package/dist/components/statistic.css +1 -1
  130. package/dist/components/statistic.min.css +1 -1
  131. package/dist/components/step.css +3 -3
  132. package/dist/components/step.min.css +1 -1
  133. package/dist/components/sticky.css +1 -1
  134. package/dist/components/sticky.js +1 -1
  135. package/dist/components/sticky.min.css +1 -1
  136. package/dist/components/sticky.min.js +3 -3
  137. package/dist/components/tab.css +1 -1
  138. package/dist/components/tab.js +23 -5
  139. package/dist/components/tab.min.css +1 -1
  140. package/dist/components/tab.min.js +3 -3
  141. package/dist/components/table.css +1168 -26
  142. package/dist/components/table.min.css +2 -2
  143. package/dist/components/text.css +1 -1
  144. package/dist/components/text.min.css +1 -1
  145. package/dist/components/toast.css +39 -1
  146. package/dist/components/toast.js +56 -28
  147. package/dist/components/toast.min.css +2 -2
  148. package/dist/components/toast.min.js +3 -3
  149. package/dist/components/transition.css +1 -1
  150. package/dist/components/transition.js +21 -16
  151. package/dist/components/transition.min.css +1 -1
  152. package/dist/components/transition.min.js +3 -3
  153. package/dist/components/visibility.js +1 -1
  154. package/dist/components/visibility.min.js +3 -3
  155. package/dist/semantic.css +21972 -16244
  156. package/dist/semantic.js +488 -242
  157. package/dist/semantic.min.css +3 -3
  158. package/dist/semantic.min.js +3 -3
  159. package/dist/themes/default/assets/fonts/brand-icons.eot +0 -0
  160. package/dist/themes/default/assets/fonts/brand-icons.svg +801 -654
  161. package/dist/themes/default/assets/fonts/brand-icons.ttf +0 -0
  162. package/dist/themes/default/assets/fonts/brand-icons.woff +0 -0
  163. package/dist/themes/default/assets/fonts/brand-icons.woff2 +0 -0
  164. package/dist/themes/default/assets/fonts/icons.eot +0 -0
  165. package/dist/themes/default/assets/fonts/icons.svg +1175 -1079
  166. package/dist/themes/default/assets/fonts/icons.ttf +0 -0
  167. package/dist/themes/default/assets/fonts/icons.woff +0 -0
  168. package/dist/themes/default/assets/fonts/icons.woff2 +0 -0
  169. package/dist/themes/default/assets/fonts/outline-icons.eot +0 -0
  170. package/dist/themes/default/assets/fonts/outline-icons.svg +93 -95
  171. package/dist/themes/default/assets/fonts/outline-icons.ttf +0 -0
  172. package/dist/themes/default/assets/fonts/outline-icons.woff +0 -0
  173. package/dist/themes/default/assets/fonts/outline-icons.woff2 +0 -0
  174. package/examples/assets/library/iframe-content.js +8 -8
  175. package/examples/assets/library/iframe.js +3 -3
  176. package/package.json +12 -11
  177. package/scripts/nightly-version.js +47 -38
  178. package/src/definitions/behaviors/api.js +87 -28
  179. package/src/definitions/behaviors/form.js +37 -28
  180. package/src/definitions/collections/form.less +204 -140
  181. package/src/definitions/collections/grid.less +716 -680
  182. package/src/definitions/collections/menu.less +173 -126
  183. package/src/definitions/collections/message.less +48 -46
  184. package/src/definitions/collections/table.less +849 -262
  185. package/src/definitions/elements/button.less +586 -449
  186. package/src/definitions/elements/container.less +145 -8
  187. package/src/definitions/elements/emoji.less +15 -9
  188. package/src/definitions/elements/flag.less +7 -17
  189. package/src/definitions/elements/header.less +44 -35
  190. package/src/definitions/elements/icon.less +38 -31
  191. package/src/definitions/elements/input.less +264 -22
  192. package/src/definitions/elements/label.less +92 -91
  193. package/src/definitions/elements/list.less +55 -45
  194. package/src/definitions/elements/loader.less +30 -29
  195. package/src/definitions/elements/segment.less +147 -28
  196. package/src/definitions/elements/step.less +52 -48
  197. package/src/definitions/elements/text.less +17 -15
  198. package/src/definitions/globals/site.less +23 -2
  199. package/src/definitions/modules/accordion.js +5 -2
  200. package/src/definitions/modules/accordion.less +181 -29
  201. package/src/definitions/modules/calendar.js +5 -3
  202. package/src/definitions/modules/calendar.less +20 -0
  203. package/src/definitions/modules/checkbox.js +16 -10
  204. package/src/definitions/modules/checkbox.less +34 -178
  205. package/src/definitions/modules/dimmer.js +10 -4
  206. package/src/definitions/modules/dimmer.less +21 -8
  207. package/src/definitions/modules/dropdown.js +65 -38
  208. package/src/definitions/modules/dropdown.less +148 -97
  209. package/src/definitions/modules/modal.js +126 -48
  210. package/src/definitions/modules/modal.less +12 -0
  211. package/src/definitions/modules/nag.less +20 -19
  212. package/src/definitions/modules/popup.js +1 -1
  213. package/src/definitions/modules/progress.js +3 -0
  214. package/src/definitions/modules/progress.less +19 -18
  215. package/src/definitions/modules/rating.less +35 -34
  216. package/src/definitions/modules/search.js +1 -1
  217. package/src/definitions/modules/search.less +32 -16
  218. package/src/definitions/modules/shape.js +2 -2
  219. package/src/definitions/modules/sidebar.js +7 -5
  220. package/src/definitions/modules/sidebar.less +33 -19
  221. package/src/definitions/modules/slider.less +39 -38
  222. package/src/definitions/modules/tab.js +22 -4
  223. package/src/definitions/modules/toast.js +55 -27
  224. package/src/definitions/modules/toast.less +48 -16
  225. package/src/definitions/modules/transition.js +20 -15
  226. package/src/definitions/views/card.less +402 -361
  227. package/src/definitions/views/comment.less +92 -81
  228. package/src/definitions/views/feed.less +164 -144
  229. package/src/definitions/views/item.less +249 -196
  230. package/src/definitions/views/statistic.less +90 -88
  231. package/src/themes/bookish/elements/header.overrides +1 -1
  232. package/src/themes/chubby/elements/button.overrides +1 -1
  233. package/src/themes/chubby/elements/header.overrides +1 -1
  234. package/src/themes/default/assets/fonts/brand-icons.eot +0 -0
  235. package/src/themes/default/assets/fonts/brand-icons.svg +801 -654
  236. package/src/themes/default/assets/fonts/brand-icons.ttf +0 -0
  237. package/src/themes/default/assets/fonts/brand-icons.woff +0 -0
  238. package/src/themes/default/assets/fonts/brand-icons.woff2 +0 -0
  239. package/src/themes/default/assets/fonts/icons.eot +0 -0
  240. package/src/themes/default/assets/fonts/icons.svg +1175 -1079
  241. package/src/themes/default/assets/fonts/icons.ttf +0 -0
  242. package/src/themes/default/assets/fonts/icons.woff +0 -0
  243. package/src/themes/default/assets/fonts/icons.woff2 +0 -0
  244. package/src/themes/default/assets/fonts/outline-icons.eot +0 -0
  245. package/src/themes/default/assets/fonts/outline-icons.svg +93 -95
  246. package/src/themes/default/assets/fonts/outline-icons.ttf +0 -0
  247. package/src/themes/default/assets/fonts/outline-icons.woff +0 -0
  248. package/src/themes/default/assets/fonts/outline-icons.woff2 +0 -0
  249. package/src/themes/default/collections/form.variables +4 -0
  250. package/src/themes/default/collections/menu.variables +6 -0
  251. package/src/themes/default/collections/table.variables +52 -0
  252. package/src/themes/default/elements/button.variables +7 -1
  253. package/src/themes/default/elements/container.variables +12 -0
  254. package/src/themes/default/elements/emoji.overrides +1734 -1232
  255. package/src/themes/default/elements/flag.overrides +1641 -986
  256. package/src/themes/default/elements/flag.variables +7 -5
  257. package/src/themes/default/elements/icon.overrides +75 -48
  258. package/src/themes/default/elements/icon.variables +1 -0
  259. package/src/themes/default/elements/input.variables +15 -0
  260. package/src/themes/default/elements/segment.variables +8 -0
  261. package/src/themes/default/globals/site.variables +6 -0
  262. package/src/themes/default/globals/variation.variables +139 -6
  263. package/src/themes/default/modules/accordion.overrides +6 -5
  264. package/src/themes/default/modules/accordion.variables +49 -2
  265. package/src/themes/default/modules/calendar.variables +3 -0
  266. package/src/themes/default/modules/checkbox.variables +5 -5
  267. package/src/themes/default/modules/dimmer.variables +1 -1
  268. package/src/themes/default/modules/dropdown.variables +4 -10
  269. package/src/themes/default/modules/modal.variables +13 -0
  270. package/src/themes/default/modules/toast.variables +3 -0
  271. package/src/themes/famfamfam/elements/flag.overrides +1026 -0
  272. package/src/themes/famfamfam/elements/flag.variables +13 -0
  273. package/src/themes/instagram/views/card.overrides +1 -1
  274. package/src/themes/joypixels/elements/emoji.overrides +1759 -1257
  275. package/src/themes/joypixels/elements/emoji.variables +1 -1
  276. package/src/themes/material/collections/menu.overrides +1 -1
  277. package/src/themes/material/elements/button.overrides +1 -1
  278. package/src/themes/material/elements/header.overrides +1 -1
  279. package/src/themes/material/globals/site.variables +0 -1
  280. package/src/themes/material/modules/dropdown.overrides +1 -1
  281. package/src/themes/material/modules/modal.overrides +1 -1
  282. package/src/themes/rtl/globals/site.overrides +1 -1
  283. package/src/themes/twitter/elements/emoji.overrides +1734 -1232
  284. package/tasks/build/css.js +6 -1
  285. package/tasks/config/project/install.js +11 -5
  286. package/tasks/install.js +1 -0
  287. package/test/helpers/sinon.js +2 -2
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.0-beta.27 - Step
2
+ * # Fomantic-UI 2.9.0-beta.272+5e88144 - Step
3
3
  * http://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -531,8 +531,8 @@
531
531
  }
532
532
 
533
533
  /*-------------------
534
- Evenly Divided
535
- --------------------*/
534
+ Evenly Divided
535
+ --------------------*/
536
536
 
537
537
  .ui.one.steps,
538
538
  .ui.two.steps,
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.0-beta.27 - Step
2
+ * # Fomantic-UI 2.9.0-beta.272+5e88144 - Step
3
3
  * http://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.0-beta.27 - Sticky
2
+ * # Fomantic-UI 2.9.0-beta.272+5e88144 - Sticky
3
3
  * http://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.0-beta.27 - Sticky
2
+ * # Fomantic-UI 2.9.0-beta.272+5e88144 - Sticky
3
3
  * http://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.0-beta.27 - Sticky
2
+ * # Fomantic-UI 2.9.0-beta.272+5e88144 - Sticky
3
3
  * http://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,11 +1,11 @@
1
1
  /*
2
- * # Fomantic UI - 2.9.0-beta.27
2
+ * # Fomantic UI - 2.9.0-beta.272+5e88144
3
3
  * https://github.com/fomantic/Fomantic-UI
4
4
  * http://fomantic-ui.com/
5
5
  *
6
- * Copyright 2021 Contributors
6
+ * Copyright 2022 Contributors
7
7
  * Released under the MIT license
8
8
  * http://opensource.org/licenses/MIT
9
9
  *
10
10
  */
11
- !function(T,w,B,F){"use strict";T.isFunction=T.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},w=void 0!==w&&w.Math==Math?w:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),T.fn.sticky=function(b){var v,e=T(this),x=e.selector||"",C=(new Date).getTime(),S=[],y=b,k="string"==typeof y,z=[].slice.call(arguments,1);return e.each(function(){var t,n,e,o,m,u=T.isPlainObject(b)?T.extend(!0,{},T.fn.sticky.settings,b):T.extend({},T.fn.sticky.settings),i=u.className,s=u.namespace,r=u.error,c="."+s,l="module-"+s,a=T(this),f=T(w),d=T(u.scrollContext),h=a.data(l),g=w.requestAnimationFrame||w.mozRequestAnimationFrame||w.webkitRequestAnimationFrame||w.msRequestAnimationFrame||function(e){setTimeout(e,0)},p=this;m={initialize:function(){m.determineContainer(),m.determineContext(),m.verbose("Initializing sticky",u,t),m.save.positions(),m.checkErrors(),m.bind.events(),u.observeChanges&&m.observeChanges(),m.instantiate()},instantiate:function(){m.verbose("Storing instance of module",m),h=m,a.data(l,m)},destroy:function(){m.verbose("Destroying previous instance"),m.reset(),e&&e.disconnect(),o&&o.disconnect(),f.off("load"+c,m.event.load).off("resize"+c,m.event.resize),d.off("scrollchange"+c,m.event.scrollchange),a.removeData(l)},observeChanges:function(){"MutationObserver"in w&&(e=new MutationObserver(m.event.documentChanged),o=new MutationObserver(m.event.changed),e.observe(B,{childList:!0,subtree:!0}),o.observe(p,{childList:!0,subtree:!0}),o.observe(n[0],{childList:!0,subtree:!0}),m.debug("Setting up mutation observer",o))},determineContainer:function(){t=u.container?T(u.container):a.offsetParent()},determineContext:function(){0!==(n=u.context?T(u.context):t).length||m.error(r.invalidContext,u.context,a)},checkErrors:function(){if(m.is.hidden()&&m.error(r.visible,a),m.cache.element.height>m.cache.context.height)return m.reset(),void m.error(r.elementSize,a)},bind:{events:function(){f.on("load"+c,m.event.load).on("resize"+c,m.event.resize),d.off("scroll"+c).on("scroll"+c,m.event.scroll).on("scrollchange"+c,m.event.scrollchange)}},event:{changed:function(e){clearTimeout(m.timer),m.timer=setTimeout(function(){m.verbose("DOM tree modified, updating sticky menu",e),m.refresh()},100)},documentChanged:function(e){[].forEach.call(e,function(e){e.removedNodes&&[].forEach.call(e.removedNodes,function(e){(e==p||0<T(e).find(p).length)&&(m.debug("Element removed from DOM, tearing down events"),m.destroy())})})},load:function(){m.verbose("Page contents finished loading"),g(m.refresh)},resize:function(){m.verbose("Window resized"),g(m.refresh)},scroll:function(){g(function(){d.triggerHandler("scrollchange"+c,d.scrollTop())})},scrollchange:function(e,t){m.stick(t),u.onScroll.call(p)}},refresh:function(e){m.reset(),u.context||m.determineContext(),e&&m.determineContainer(),m.save.positions(),m.stick(),u.onReposition.call(p)},supports:{sticky:function(){var e=T("<div/>");return e.addClass(i.supported),e.css("position").match("sticky")}},save:{lastScroll:function(e){m.lastScroll=e},elementScroll:function(e){m.elementScroll=e},positions:function(){var e={height:d.height()},t={margin:{top:parseInt(a.css("margin-top"),10),bottom:parseInt(a.css("margin-bottom"),10)},offset:a.offset(),width:a.outerWidth(),height:a.outerHeight()},o={offset:n.offset(),height:n.outerHeight()};m.is.standardScroll()||(m.debug("Non-standard scroll. Removing scroll offset from element offset"),e.top=d.scrollTop(),e.left=d.scrollLeft(),t.offset.top+=e.top,o.offset.top+=e.top,t.offset.left+=e.left,o.offset.left+=e.left),m.cache={fits:t.height+u.offset<=e.height,sameHeight:t.height==o.height,scrollContext:{height:e.height},element:{margin:t.margin,top:t.offset.top-t.margin.top,left:t.offset.left,width:t.width,height:t.height,bottom:t.offset.top+t.height},context:{top:o.offset.top,height:o.height,bottom:o.offset.top+o.height}},m.set.containerSize(),m.stick(),m.debug("Caching element positions",m.cache)}},get:{direction:function(e){var t="down";return e=e||d.scrollTop(),m.lastScroll!==F&&(m.lastScroll<e?t="down":m.lastScroll>e&&(t="up")),t},scrollChange:function(e){return e=e||d.scrollTop(),m.lastScroll?e-m.lastScroll:0},currentElementScroll:function(){return m.elementScroll?m.elementScroll:m.is.top()?Math.abs(parseInt(a.css("top"),10))||0:Math.abs(parseInt(a.css("bottom"),10))||0},elementScroll:function(e){e=e||d.scrollTop();var t=m.cache.element,o=m.cache.scrollContext,n=m.get.scrollChange(e),i=t.height-o.height+u.offset,s=m.get.currentElementScroll(),r=s+n;return s=m.cache.fits||r<0?0:i<r?i:r}},remove:{lastScroll:function(){delete m.lastScroll},elementScroll:function(e){delete m.elementScroll},minimumSize:function(){t.css("min-height","")},offset:function(){a.css("margin-top","")}},set:{offset:function(){m.verbose("Setting offset on element",u.offset),a.css("margin-top",u.offset)},containerSize:function(){var e=t.get(0).tagName;"HTML"===e||"body"==e?m.determineContainer():Math.abs(t.outerHeight()-m.cache.context.height)>u.jitter&&(m.debug("Context has padding, specifying exact height for container",m.cache.context.height),t.css({height:m.cache.context.height}))},minimumSize:function(){var e=m.cache.element;t.css("min-height",e.height)},scroll:function(e){m.debug("Setting scroll on element",e),m.elementScroll!=e&&(m.is.top()&&a.css("bottom","").css("top",-e),m.is.bottom()&&a.css("top","").css("bottom",e))},size:function(){0!==m.cache.element.height&&0!==m.cache.element.width&&(p.style.setProperty("width",m.cache.element.width+"px","important"),p.style.setProperty("height",m.cache.element.height+"px","important"))}},is:{standardScroll:function(){return d[0]==w},top:function(){return a.hasClass(i.top)},bottom:function(){return a.hasClass(i.bottom)},initialPosition:function(){return!m.is.fixed()&&!m.is.bound()},hidden:function(){return!a.is(":visible")},bound:function(){return a.hasClass(i.bound)},fixed:function(){return a.hasClass(i.fixed)}},stick:function(e){var t=e||d.scrollTop(),o=m.cache,n=o.fits,i=o.sameHeight,s=o.element,r=o.scrollContext,c=o.context,l=m.is.bottom()&&u.pushing?u.bottomOffset:u.offset,a=(e={top:t+l,bottom:t+l+r.height},n?0:m.get.elementScroll(e.top)),f=!n;0===s.height||i||(m.is.initialPosition()?e.top>=c.bottom?(m.debug("Initial element position is bottom of container"),m.bindBottom()):e.top>s.top&&(s.height+e.top-a>=c.bottom?(m.debug("Initial element position is bottom of container"),m.bindBottom()):(m.debug("Initial element position is fixed"),m.fixTop())):m.is.fixed()?m.is.top()?e.top<=s.top?(m.debug("Fixed element reached top of container"),m.setInitialPosition()):s.height+e.top-a>=c.bottom?(m.debug("Fixed element reached bottom of container"),m.bindBottom()):f&&(m.set.scroll(a),m.save.lastScroll(e.top),m.save.elementScroll(a)):m.is.bottom()&&(e.bottom-s.height<=s.top?(m.debug("Bottom fixed rail has reached top of container"),m.setInitialPosition()):e.bottom>=c.bottom?(m.debug("Bottom fixed rail has reached bottom of container"),m.bindBottom()):f&&(m.set.scroll(a),m.save.lastScroll(e.top),m.save.elementScroll(a))):m.is.bottom()&&(e.top<=s.top?(m.debug("Jumped from bottom fixed to top fixed, most likely used home/end button"),m.setInitialPosition()):u.pushing?m.is.bound()&&e.bottom<=c.bottom&&(m.debug("Fixing bottom attached element to bottom of browser."),m.fixBottom()):m.is.bound()&&e.top<=c.bottom-s.height&&(m.debug("Fixing bottom attached element to top of browser."),m.fixTop())))},bindTop:function(){m.debug("Binding element to top of parent container"),m.remove.offset(),a.css({left:"",top:"",marginBottom:""}).removeClass(i.fixed).removeClass(i.bottom).addClass(i.bound).addClass(i.top),u.onTop.call(p),u.onUnstick.call(p)},bindBottom:function(){m.debug("Binding element to bottom of parent container"),m.remove.offset(),a.css({left:"",top:""}).removeClass(i.fixed).removeClass(i.top).addClass(i.bound).addClass(i.bottom),u.onBottom.call(p),u.onUnstick.call(p)},setInitialPosition:function(){m.debug("Returning to initial position"),m.unfix(),m.unbind()},fixTop:function(){m.debug("Fixing element to top of page"),u.setSize&&m.set.size(),m.set.minimumSize(),m.set.offset(),a.css({left:m.cache.element.left,bottom:"",marginBottom:""}).removeClass(i.bound).removeClass(i.bottom).addClass(i.fixed).addClass(i.top),u.onStick.call(p)},fixBottom:function(){m.debug("Sticking element to bottom of page"),u.setSize&&m.set.size(),m.set.minimumSize(),m.set.offset(),a.css({left:m.cache.element.left,bottom:"",marginBottom:""}).removeClass(i.bound).removeClass(i.top).addClass(i.fixed).addClass(i.bottom),u.onStick.call(p)},unbind:function(){m.is.bound()&&(m.debug("Removing container bound position on element"),m.remove.offset(),a.removeClass(i.bound).removeClass(i.top).removeClass(i.bottom))},unfix:function(){m.is.fixed()&&(m.debug("Removing fixed position on element"),m.remove.minimumSize(),m.remove.offset(),a.removeClass(i.fixed).removeClass(i.top).removeClass(i.bottom),u.onUnstick.call(p))},reset:function(){m.debug("Resetting elements position"),m.unbind(),m.unfix(),m.resetCSS(),m.remove.offset(),m.remove.lastScroll()},resetCSS:function(){a.css({width:"",height:""}),t.css({height:""})},setting:function(e,t){if(T.isPlainObject(e))T.extend(!0,u,e);else{if(t===F)return u[e];u[e]=t}},internal:function(e,t){if(T.isPlainObject(e))T.extend(!0,m,e);else{if(t===F)return m[e];m[e]=t}},debug:function(){!u.silent&&u.debug&&(u.performance?m.performance.log(arguments):(m.debug=Function.prototype.bind.call(console.info,console,u.name+":"),m.debug.apply(console,arguments)))},verbose:function(){!u.silent&&u.verbose&&u.debug&&(u.performance?m.performance.log(arguments):(m.verbose=Function.prototype.bind.call(console.info,console,u.name+":"),m.verbose.apply(console,arguments)))},error:function(){u.silent||(m.error=Function.prototype.bind.call(console.error,console,u.name+":"),m.error.apply(console,arguments))},performance:{log:function(e){var t,o;u.performance&&(o=(t=(new Date).getTime())-(C||t),C=t,S.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:p,"Execution Time":o})),clearTimeout(m.performance.timer),m.performance.timer=setTimeout(m.performance.display,0)},display:function(){var e=u.name+":",o=0;C=!1,clearTimeout(m.performance.timer),T.each(S,function(e,t){o+=t["Execution Time"]}),e+=" "+o+"ms",x&&(e+=" '"+x+"'"),(console.group!==F||console.table!==F)&&0<S.length&&(console.groupCollapsed(e),console.table?console.table(S):T.each(S,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),S=[]}},invoke:function(n,e,t){var i,s,o,r=h;return e=e||z,t=p||t,"string"==typeof n&&r!==F&&(n=n.split(/[\. ]/),i=n.length-1,T.each(n,function(e,t){var o=e!=i?t+n[e+1].charAt(0).toUpperCase()+n[e+1].slice(1):n;if(T.isPlainObject(r[o])&&e!=i)r=r[o];else{if(r[o]!==F)return s=r[o],!1;if(!T.isPlainObject(r[t])||e==i)return r[t]!==F&&(s=r[t]),!1;r=r[t]}})),T.isFunction(s)?o=s.apply(t,e):s!==F&&(o=s),Array.isArray(v)?v.push(o):v!==F?v=[v,o]:o!==F&&(v=o),s}},k?(h===F&&m.initialize(),m.invoke(y)):(h!==F&&h.invoke("destroy"),m.initialize())}),v!==F?v:this},T.fn.sticky.settings={name:"Sticky",namespace:"sticky",silent:!1,debug:!1,verbose:!0,performance:!0,pushing:!1,context:!1,container:!1,scrollContext:w,offset:0,bottomOffset:0,jitter:5,setSize:!0,observeChanges:!1,onReposition:function(){},onScroll:function(){},onStick:function(){},onUnstick:function(){},onTop:function(){},onBottom:function(){},error:{container:"Sticky element must be inside a relative container",visible:"Element is hidden, you must call refresh after element becomes visible. Use silent setting to suppress this warning in production.",method:"The method you called is not defined.",invalidContext:"Context specified does not exist",elementSize:"Sticky element is larger than its container, cannot create sticky."},className:{bound:"bound",fixed:"fixed",supported:"native",top:"top",bottom:"bottom"}}}(jQuery,window,document);
11
+ !function(T,w,B,F){"use strict";T.isFunction=T.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},w=void 0!==w&&w.Math==Math?w:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),T.fn.sticky=function(b){var v,e=T(this),x=e.selector||"",C=(new Date).getTime(),S=[],y=b,k="string"==typeof y,z=[].slice.call(arguments,1);return e.each(function(){var t,n,e,o,l=T.isPlainObject(b)?T.extend(!0,{},T.fn.sticky.settings,b):T.extend({},T.fn.sticky.settings),i=l.className,s=l.namespace,r=l.error,c="."+s,a="module-"+s,f=T(this),m=T(w),u=T(l.scrollContext),d=f.data(a),h=w.requestAnimationFrame||w.mozRequestAnimationFrame||w.webkitRequestAnimationFrame||w.msRequestAnimationFrame||function(e){setTimeout(e,0)},g=this,p={initialize:function(){p.determineContainer(),p.determineContext(),p.verbose("Initializing sticky",l,t),p.save.positions(),p.checkErrors(),p.bind.events(),l.observeChanges&&p.observeChanges(),p.instantiate()},instantiate:function(){p.verbose("Storing instance of module",p),d=p,f.data(a,p)},destroy:function(){p.verbose("Destroying previous instance"),p.reset(),e&&e.disconnect(),o&&o.disconnect(),m.off("load"+c,p.event.load).off("resize"+c,p.event.resize),u.off("scrollchange"+c,p.event.scrollchange),f.removeData(a)},observeChanges:function(){"MutationObserver"in w&&(e=new MutationObserver(p.event.documentChanged),o=new MutationObserver(p.event.changed),e.observe(B,{childList:!0,subtree:!0}),o.observe(g,{childList:!0,subtree:!0}),o.observe(n[0],{childList:!0,subtree:!0}),p.debug("Setting up mutation observer",o))},determineContainer:function(){t=l.container?T(l.container):f.offsetParent()},determineContext:function(){0===(n=l.context?T(l.context):t).length&&p.error(r.invalidContext,l.context,f)},checkErrors:function(){p.is.hidden()&&p.error(r.visible,f),p.cache.element.height>p.cache.context.height&&(p.reset(),p.error(r.elementSize,f))},bind:{events:function(){m.on("load"+c,p.event.load).on("resize"+c,p.event.resize),u.off("scroll"+c).on("scroll"+c,p.event.scroll).on("scrollchange"+c,p.event.scrollchange)}},event:{changed:function(e){clearTimeout(p.timer),p.timer=setTimeout(function(){p.verbose("DOM tree modified, updating sticky menu",e),p.refresh()},100)},documentChanged:function(e){[].forEach.call(e,function(e){e.removedNodes&&[].forEach.call(e.removedNodes,function(e){(e==g||0<T(e).find(g).length)&&(p.debug("Element removed from DOM, tearing down events"),p.destroy())})})},load:function(){p.verbose("Page contents finished loading"),h(p.refresh)},resize:function(){p.verbose("Window resized"),h(p.refresh)},scroll:function(){h(function(){u.triggerHandler("scrollchange"+c,u.scrollTop())})},scrollchange:function(e,t){p.stick(t),l.onScroll.call(g)}},refresh:function(e){p.reset(),l.context||p.determineContext(),e&&p.determineContainer(),p.save.positions(),p.stick(),l.onReposition.call(g)},supports:{sticky:function(){var e=T("<div/>");return e.addClass(i.supported),e.css("position").match("sticky")}},save:{lastScroll:function(e){p.lastScroll=e},elementScroll:function(e){p.elementScroll=e},positions:function(){var e={height:u.height()},t={margin:{top:parseInt(f.css("margin-top"),10),bottom:parseInt(f.css("margin-bottom"),10)},offset:f.offset(),width:f.outerWidth(),height:f.outerHeight()},o={offset:n.offset(),height:n.outerHeight()};p.is.standardScroll()||(p.debug("Non-standard scroll. Removing scroll offset from element offset"),e.top=u.scrollTop(),e.left=u.scrollLeft(),t.offset.top+=e.top,o.offset.top+=e.top,t.offset.left+=e.left,o.offset.left+=e.left),p.cache={fits:t.height+l.offset<=e.height,sameHeight:t.height==o.height,scrollContext:{height:e.height},element:{margin:t.margin,top:t.offset.top-t.margin.top,left:t.offset.left,width:t.width,height:t.height,bottom:t.offset.top+t.height},context:{top:o.offset.top,height:o.height,bottom:o.offset.top+o.height}},p.set.containerSize(),p.stick(),p.debug("Caching element positions",p.cache)}},get:{direction:function(e){var t="down";return e=e||u.scrollTop(),p.lastScroll!==F&&(p.lastScroll<e?t="down":p.lastScroll>e&&(t="up")),t},scrollChange:function(e){return e=e||u.scrollTop(),p.lastScroll?e-p.lastScroll:0},currentElementScroll:function(){return p.elementScroll||(p.is.top()?Math.abs(parseInt(f.css("top"),10))||0:Math.abs(parseInt(f.css("bottom"),10))||0)},elementScroll:function(e){e=e||u.scrollTop();var t=p.cache.element,o=p.cache.scrollContext,e=p.get.scrollChange(e),t=t.height-o.height+l.offset,o=p.get.currentElementScroll(),e=o+e;return o=p.cache.fits||e<0?0:t<e?t:e}},remove:{lastScroll:function(){delete p.lastScroll},elementScroll:function(e){delete p.elementScroll},minimumSize:function(){t.css("min-height","")},offset:function(){f.css("margin-top","")}},set:{offset:function(){p.verbose("Setting offset on element",l.offset),f.css("margin-top",l.offset)},containerSize:function(){var e=t.get(0).tagName;"HTML"===e||"body"==e?p.determineContainer():Math.abs(t.outerHeight()-p.cache.context.height)>l.jitter&&(p.debug("Context has padding, specifying exact height for container",p.cache.context.height),t.css({height:p.cache.context.height}))},minimumSize:function(){var e=p.cache.element;t.css("min-height",e.height)},scroll:function(e){p.debug("Setting scroll on element",e),p.elementScroll!=e&&(p.is.top()&&f.css("bottom","").css("top",-e),p.is.bottom()&&f.css("top","").css("bottom",e))},size:function(){0!==p.cache.element.height&&0!==p.cache.element.width&&(g.style.setProperty("width",p.cache.element.width+"px","important"),g.style.setProperty("height",p.cache.element.height+"px","important"))}},is:{standardScroll:function(){return u[0]==w},top:function(){return f.hasClass(i.top)},bottom:function(){return f.hasClass(i.bottom)},initialPosition:function(){return!p.is.fixed()&&!p.is.bound()},hidden:function(){return!f.is(":visible")},bound:function(){return f.hasClass(i.bound)},fixed:function(){return f.hasClass(i.fixed)}},stick:function(e){var t=e||u.scrollTop(),o=p.cache,n=o.fits,i=o.sameHeight,s=o.element,r=o.scrollContext,o=o.context,c=p.is.bottom()&&l.pushing?l.bottomOffset:l.offset,e={top:t+c,bottom:t+c+r.height},t=n?0:p.get.elementScroll(e.top),c=!n;0===s.height||i||(p.is.initialPosition()?e.top>=o.bottom?(p.debug("Initial element position is bottom of container"),p.bindBottom()):e.top>s.top&&(s.height+e.top-t>=o.bottom?(p.debug("Initial element position is bottom of container"),p.bindBottom()):(p.debug("Initial element position is fixed"),p.fixTop())):p.is.fixed()?p.is.top()?e.top<=s.top?(p.debug("Fixed element reached top of container"),p.setInitialPosition()):s.height+e.top-t>=o.bottom?(p.debug("Fixed element reached bottom of container"),p.bindBottom()):c&&(p.set.scroll(t),p.save.lastScroll(e.top),p.save.elementScroll(t)):p.is.bottom()&&(e.bottom-s.height<=s.top?(p.debug("Bottom fixed rail has reached top of container"),p.setInitialPosition()):e.bottom>=o.bottom?(p.debug("Bottom fixed rail has reached bottom of container"),p.bindBottom()):c&&(p.set.scroll(t),p.save.lastScroll(e.top),p.save.elementScroll(t))):p.is.bottom()&&(e.top<=s.top?(p.debug("Jumped from bottom fixed to top fixed, most likely used home/end button"),p.setInitialPosition()):l.pushing?p.is.bound()&&e.bottom<=o.bottom&&(p.debug("Fixing bottom attached element to bottom of browser."),p.fixBottom()):p.is.bound()&&e.top<=o.bottom-s.height&&(p.debug("Fixing bottom attached element to top of browser."),p.fixTop())))},bindTop:function(){p.debug("Binding element to top of parent container"),p.remove.offset(),f.css({left:"",top:"",marginBottom:""}).removeClass(i.fixed).removeClass(i.bottom).addClass(i.bound).addClass(i.top),l.onTop.call(g),l.onUnstick.call(g)},bindBottom:function(){p.debug("Binding element to bottom of parent container"),p.remove.offset(),f.css({left:"",top:""}).removeClass(i.fixed).removeClass(i.top).addClass(i.bound).addClass(i.bottom),l.onBottom.call(g),l.onUnstick.call(g)},setInitialPosition:function(){p.debug("Returning to initial position"),p.unfix(),p.unbind()},fixTop:function(){p.debug("Fixing element to top of page"),l.setSize&&p.set.size(),p.set.minimumSize(),p.set.offset(),f.css({left:p.cache.element.left,bottom:"",marginBottom:""}).removeClass(i.bound).removeClass(i.bottom).addClass(i.fixed).addClass(i.top),l.onStick.call(g)},fixBottom:function(){p.debug("Sticking element to bottom of page"),l.setSize&&p.set.size(),p.set.minimumSize(),p.set.offset(),f.css({left:p.cache.element.left,bottom:"",marginBottom:""}).removeClass(i.bound).removeClass(i.top).addClass(i.fixed).addClass(i.bottom),l.onStick.call(g)},unbind:function(){p.is.bound()&&(p.debug("Removing container bound position on element"),p.remove.offset(),f.removeClass(i.bound).removeClass(i.top).removeClass(i.bottom))},unfix:function(){p.is.fixed()&&(p.debug("Removing fixed position on element"),p.remove.minimumSize(),p.remove.offset(),f.removeClass(i.fixed).removeClass(i.top).removeClass(i.bottom),l.onUnstick.call(g))},reset:function(){p.debug("Resetting elements position"),p.unbind(),p.unfix(),p.resetCSS(),p.remove.offset(),p.remove.lastScroll()},resetCSS:function(){f.css({width:"",height:""}),t.css({height:""})},setting:function(e,t){if(T.isPlainObject(e))T.extend(!0,l,e);else{if(t===F)return l[e];l[e]=t}},internal:function(e,t){if(T.isPlainObject(e))T.extend(!0,p,e);else{if(t===F)return p[e];p[e]=t}},debug:function(){!l.silent&&l.debug&&(l.performance?p.performance.log(arguments):(p.debug=Function.prototype.bind.call(console.info,console,l.name+":"),p.debug.apply(console,arguments)))},verbose:function(){!l.silent&&l.verbose&&l.debug&&(l.performance?p.performance.log(arguments):(p.verbose=Function.prototype.bind.call(console.info,console,l.name+":"),p.verbose.apply(console,arguments)))},error:function(){l.silent||(p.error=Function.prototype.bind.call(console.error,console,l.name+":"),p.error.apply(console,arguments))},performance:{log:function(e){var t,o;l.performance&&(o=(t=(new Date).getTime())-(C||t),C=t,S.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:g,"Execution Time":o})),clearTimeout(p.performance.timer),p.performance.timer=setTimeout(p.performance.display,0)},display:function(){var e=l.name+":",o=0;C=!1,clearTimeout(p.performance.timer),T.each(S,function(e,t){o+=t["Execution Time"]}),e+=" "+o+"ms",x&&(e+=" '"+x+"'"),(console.group!==F||console.table!==F)&&0<S.length&&(console.groupCollapsed(e),console.table?console.table(S):T.each(S,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),S=[]}},invoke:function(n,e,t){var i,s,o,r=d;return e=e||z,t=g||t,"string"==typeof n&&r!==F&&(n=n.split(/[\. ]/),i=n.length-1,T.each(n,function(e,t){var o=e!=i?t+n[e+1].charAt(0).toUpperCase()+n[e+1].slice(1):n;if(T.isPlainObject(r[o])&&e!=i)r=r[o];else{if(r[o]!==F)return s=r[o],!1;{if(!T.isPlainObject(r[t])||e==i)return r[t]!==F&&(s=r[t]),!1;r=r[t]}}})),T.isFunction(s)?o=s.apply(t,e):s!==F&&(o=s),Array.isArray(v)?v.push(o):v!==F?v=[v,o]:o!==F&&(v=o),s}};k?(d===F&&p.initialize(),p.invoke(y)):(d!==F&&d.invoke("destroy"),p.initialize())}),v!==F?v:this},T.fn.sticky.settings={name:"Sticky",namespace:"sticky",silent:!1,debug:!1,verbose:!0,performance:!0,pushing:!1,context:!1,container:!1,scrollContext:w,offset:0,bottomOffset:0,jitter:5,setSize:!0,observeChanges:!1,onReposition:function(){},onScroll:function(){},onStick:function(){},onUnstick:function(){},onTop:function(){},onBottom:function(){},error:{container:"Sticky element must be inside a relative container",visible:"Element is hidden, you must call refresh after element becomes visible. Use silent setting to suppress this warning in production.",method:"The method you called is not defined.",invalidContext:"Context specified does not exist",elementSize:"Sticky element is larger than its container, cannot create sticky."},className:{bound:"bound",fixed:"fixed",supported:"native",top:"top",bottom:"bottom"}}}(jQuery,window,document);
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.0-beta.27 - Tab
2
+ * # Fomantic-UI 2.9.0-beta.272+5e88144 - Tab
3
3
  * http://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.0-beta.27 - Tab
2
+ * # Fomantic-UI 2.9.0-beta.272+5e88144 - Tab
3
3
  * http://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -100,10 +100,18 @@ $.fn.tab = function(parameters) {
100
100
  initializedHistory = true;
101
101
  }
102
102
 
103
- if(settings.autoTabActivation && instance === undefined && module.determine.activeTab() == null) {
104
- module.debug('No active tab detected, setting first tab active', module.get.initialPath());
105
- module.changeTab(settings.autoTabActivation === true ? module.get.initialPath() : settings.autoTabActivation);
106
- };
103
+ var activeTab = module.determine.activeTab();
104
+ if(settings.autoTabActivation && instance === undefined && activeTab == null) {
105
+ activeTab = settings.autoTabActivation === true ? module.get.initialPath() : settings.autoTabActivation;
106
+ module.debug('No active tab detected, setting tab active', activeTab);
107
+ module.changeTab(activeTab);
108
+ }
109
+ if(activeTab != null && settings.history) {
110
+ var autoUpdate = $.address.autoUpdate();
111
+ $.address.autoUpdate(false);
112
+ $.address.value(activeTab);
113
+ $.address.autoUpdate(autoUpdate);
114
+ }
107
115
 
108
116
  module.instantiate();
109
117
  },
@@ -203,6 +211,7 @@ $.fn.tab = function(parameters) {
203
211
  .history(true)
204
212
  .state(settings.path)
205
213
  ;
214
+ $(window).trigger('popstate');
206
215
  }
207
216
  else {
208
217
  module.error(error.path);
@@ -370,6 +379,10 @@ $.fn.tab = function(parameters) {
370
379
  module.verbose('Tab parameters found', nextPathArray);
371
380
  }
372
381
  }
382
+ if (settings.onBeforeChange.call(element, currentPath) === false) {
383
+ module.debug('onBeforeChange returned false, cancelling tab change', $tab);
384
+ return false;
385
+ }
373
386
  if(isLastTab && remoteContent) {
374
387
  if(!shouldIgnoreLoad) {
375
388
  module.activate.navigation(currentPath);
@@ -406,6 +419,10 @@ $.fn.tab = function(parameters) {
406
419
  // if anchor exists use parent tab
407
420
  if($anchor && $anchor.length > 0 && currentPath) {
408
421
  module.debug('Anchor link used, opening parent tab', $tab, $anchor);
422
+ if (settings.onBeforeChange.call(element, currentPath) === false) {
423
+ module.debug('onBeforeChange returned false, cancelling tab change', $tab);
424
+ return false;
425
+ }
409
426
  if( !$tab.hasClass(className.active) ) {
410
427
  setTimeout(function() {
411
428
  module.scrollTo($anchor);
@@ -959,6 +976,7 @@ $.fn.tab.settings = {
959
976
  onLoad : function(tabPath, parameterArray, historyEvent) {}, // called on every load
960
977
  onVisible : function(tabPath, parameterArray, historyEvent) {}, // called every time tab visible
961
978
  onRequest : function(tabPath, parameterArray, historyEvent) {}, // called ever time a tab beings loading remote content
979
+ onBeforeChange: function(tabPath) {}, // called before a tab is about to be changed. Returning false will cancel the tab change
962
980
 
963
981
  templates : {
964
982
  determineTitle: function(tabArray) {} // returns page title for path
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.0-beta.27 - Tab
2
+ * # Fomantic-UI 2.9.0-beta.272+5e88144 - Tab
3
3
  * http://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,11 +1,11 @@
1
1
  /*
2
- * # Fomantic UI - 2.9.0-beta.27
2
+ * # Fomantic UI - 2.9.0-beta.272+5e88144
3
3
  * https://github.com/fomantic/Fomantic-UI
4
4
  * http://fomantic-ui.com/
5
5
  *
6
- * Copyright 2021 Contributors
6
+ * Copyright 2022 Contributors
7
7
  * Released under the MIT license
8
8
  * http://opensource.org/licenses/MIT
9
9
  *
10
10
  */
11
- !function(j,O,k,I){"use strict";j.isWindow=j.isWindow||function(e){return null!=e&&e===e.window},j.isFunction=j.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},O=void 0!==O&&O.Math==Math?O:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),j.fn.tab=function(l){var d,u=j.isFunction(this)?j(O):j(this),b=u.selector||"",g=(new Date).getTime(),f=[],F=l,w="string"==typeof F,S=[].slice.call(arguments,1),E=!1;return u.each(function(){var h,o,p,v,m,y,T=j.isPlainObject(l)?j.extend(!0,{},j.fn.tab.settings,l):j.extend({},j.fn.tab.settings),L=T.className,A=T.metadata,t=T.selector,x=T.error,a=T.regExp,e="."+T.namespace,n="module-"+T.namespace,P=j(this),i={},C=!0,r=0,s=this,c=P.data(n);m={initialize:function(){m.debug("Initializing tab menu item",P),m.fix.callbacks(),m.determineTabs(),m.debug("Determining tabs",T.context,o),T.auto&&m.set.auto(),m.bind.events(),T.history&&!E&&(m.initializeHistory(),E=!0),T.autoTabActivation&&c===I&&null==m.determine.activeTab()&&(m.debug("No active tab detected, setting first tab active",m.get.initialPath()),m.changeTab(!0===T.autoTabActivation?m.get.initialPath():T.autoTabActivation)),m.instantiate()},instantiate:function(){m.verbose("Storing instance of module",m),c=m,P.data(n,m)},destroy:function(){m.debug("Destroying tabs",P),P.removeData(n).off(e)},bind:{events:function(){j.isWindow(s)||(m.debug("Attaching tab activation events to element",P),P.on("click"+e,m.event.click))}},determineTabs:function(){var e;"parent"===T.context?(0<P.closest(t.ui).length?(e=P.closest(t.ui),m.verbose("Using closest UI element as parent",e)):e=P,h=e.parent(),m.verbose("Determined parent element for creating context",h)):T.context?(h=j(T.context),m.verbose("Using selector for tab context",T.context,h)):h=j("body"),T.childrenOnly?(o=h.children(t.tabs),m.debug("Searching tab context children for tabs",h,o)):(o=h.find(t.tabs),m.debug("Searching tab context for tabs",h,o))},fix:{callbacks:function(){j.isPlainObject(l)&&(l.onTabLoad||l.onTabInit)&&(l.onTabLoad&&(l.onLoad=l.onTabLoad,delete l.onTabLoad,m.error(x.legacyLoad,l.onLoad)),l.onTabInit&&(l.onFirstLoad=l.onTabInit,delete l.onTabInit,m.error(x.legacyInit,l.onFirstLoad)),T=j.extend(!0,{},j.fn.tab.settings,l))}},initializeHistory:function(){if(m.debug("Initializing page state"),j.address===I)return m.error(x.state),!1;if("state"==T.historyType){if(m.debug("Using HTML5 to manage state"),!1===T.path)return m.error(x.path),!1;j.address.history(!0).state(T.path)}j.address.bind("change",m.event.history.change)},event:{click:function(e){var t=j(this).data(A.tab);t!==I?(T.history?(m.verbose("Updating page state",e),j.address.value(t)):(m.verbose("Changing tab",e),m.changeTab(t)),e.preventDefault()):m.debug("No tab specified")},history:{change:function(e){var t=e.pathNames.join("/")||m.get.initialPath(),a=T.templates.determineTitle(t)||!1;m.performance.display(),m.debug("History change event",t,e),y=e,t!==I&&m.changeTab(t),a&&j.address.title(a)}}},refresh:function(){p&&(m.debug("Refreshing tab",p),m.changeTab(p))},cache:{read:function(e){return e!==I&&i[e]},add:function(e,t){e=e||p,m.debug("Adding cached content for",e),i[e]=t},remove:function(e){e=e||p,m.debug("Removing cached content for",e),delete i[e]}},escape:{string:function(e){return(e=String(e)).replace(a.escape,"\\$&")}},set:{auto:function(){var e="string"==typeof T.path?T.path.replace(/\/$/,"")+"/{$tab}":"/{$tab}";m.verbose("Setting up automatic tab retrieval from server",e),j.isPlainObject(T.apiSettings)?T.apiSettings.url=e:T.apiSettings={url:e}},loading:function(e){var t=m.get.tabElement(e);t.hasClass(L.loading)||(m.verbose("Setting loading state for",t),t.addClass(L.loading).siblings(o).removeClass(L.active+" "+L.loading),0<t.length&&T.onRequest.call(t[0],e))},state:function(e){j.address.value(e)}},changeTab:function(u){var b=O.history&&O.history.pushState&&T.ignoreFirstLoad&&C,g=T.auto||j.isPlainObject(T.apiSettings),f=g&&!b?m.utilities.pathToArray(u):m.get.defaultPathArray(u);u=m.utilities.arrayToPath(f),j.each(f,function(e,t){var a,n,i,o,r=f.slice(0,e+1),s=m.utilities.arrayToPath(r),c=m.is.tab(s),l=e+1==f.length,d=m.get.tabElement(s);if(m.verbose("Looking for tab",t),c){if(m.verbose("Tab was found",t),p=s,v=m.utilities.filterArray(f,r),l?o=!0:(n=f.slice(0,e+2),i=m.utilities.arrayToPath(n),(o=!m.is.tab(i))&&m.verbose("Tab parameters found",n)),o&&g)return b?(m.debug("Ignoring remote content on first tab load",s),C=!1,m.cache.add(u,d.html()),m.activate.all(s),T.onFirstLoad.call(d[0],s,v,y),T.onLoad.call(d[0],s,v,y)):(m.activate.navigation(s),m.fetch.content(s,u)),!1;m.debug("Opened local tab",s),m.activate.all(s),m.cache.read(s)||(m.cache.add(s,!0),m.debug("First time tab loaded calling tab init"),T.onFirstLoad.call(d[0],s,v,y)),T.onLoad.call(d[0],s,v,y)}else{if(-1!=u.search("/")||""===u)return m.error(x.missingTab,P,h,s),!1;if(u=m.escape.string(u),s=(a=j("#"+u+', a[name="'+u+'"]')).closest("[data-tab]").data(A.tab),d=m.get.tabElement(s),a&&0<a.length&&s)return m.debug("Anchor link used, opening parent tab",d,a),d.hasClass(L.active)||setTimeout(function(){m.scrollTo(a)},0),m.activate.all(s),m.cache.read(s)||(m.cache.add(s,!0),m.debug("First time tab loaded calling tab init"),T.onFirstLoad.call(d[0],s,v,y)),T.onLoad.call(d[0],s,v,y),!1}})},scrollTo:function(e){var t=!!(e&&0<e.length)&&e.offset().top;!1!==t&&(m.debug("Forcing scroll to an in-page link in a hidden tab",t,e),j(k).scrollTop(t))},update:{content:function(e,t,a){var n=m.get.tabElement(e),i=n[0];a=a!==I?a:T.evaluateScripts,"string"==typeof T.cacheType&&"dom"==T.cacheType.toLowerCase()&&"string"!=typeof t?n.empty().append(j(t).clone(!0)):a?(m.debug("Updating HTML and evaluating inline scripts",e,t),n.html(t)):(m.debug("Updating HTML",e,t),i.innerHTML=t)}},fetch:{content:function(t,a){var e,n,i=m.get.tabElement(t),o={dataType:"html",encodeParameters:!1,on:"now",cache:T.alwaysRefresh,headers:{"X-Remote":!0},onSuccess:function(e){"response"==T.cacheType&&m.cache.add(a,e),m.update.content(t,e),t==p?(m.debug("Content loaded",t),m.activate.tab(t)):m.debug("Content loaded in background",t),T.onFirstLoad.call(i[0],t,v,y),T.onLoad.call(i[0],t,v,y),T.loadOnce?m.cache.add(a,!0):"string"==typeof T.cacheType&&"dom"==T.cacheType.toLowerCase()&&0<i.children().length?setTimeout(function(){var e=i.children().clone(!0);e=e.not("script"),m.cache.add(a,e)},0):m.cache.add(a,i.html())},urlData:{tab:a}},r=i.api("get request")||!1,s=r&&"pending"===r.state();a=a||t,n=m.cache.read(a),T.cache&&n?(m.activate.tab(t),m.debug("Adding cached content",a),T.loadOnce||("once"==T.evaluateScripts?m.update.content(t,n,!1):m.update.content(t,n)),T.onLoad.call(i[0],t,v,y)):s?(m.set.loading(t),m.debug("Content is already loading",a)):j.api!==I?(e=j.extend(!0,{},T.apiSettings,o),m.debug("Retrieving remote content",a,e),m.set.loading(t),i.api(e)):m.error(x.api)}},activate:{all:function(e){m.activate.tab(e),m.activate.navigation(e)},tab:function(e){var t=m.get.tabElement(e),a="siblings"==T.deactivate?t.siblings(o):o.not(t),n=t.hasClass(L.active);m.verbose("Showing tab content for",t),n||(t.addClass(L.active),a.removeClass(L.active+" "+L.loading),0<t.length&&T.onVisible.call(t[0],e))},navigation:function(e){var t=m.get.navElement(e),a="siblings"==T.deactivate?t.siblings(u):u.not(t),n=t.hasClass(L.active);m.verbose("Activating tab navigation for",t,e),n||(t.addClass(L.active),a.removeClass(L.active+" "+L.loading))}},deactivate:{all:function(){m.deactivate.navigation(),m.deactivate.tabs()},navigation:function(){u.removeClass(L.active)},tabs:function(){o.removeClass(L.active+" "+L.loading)}},is:{tab:function(e){return e!==I&&0<m.get.tabElement(e).length}},get:{initialPath:function(){return u.eq(0).data(A.tab)||o.eq(0).data(A.tab)},path:function(){return j.address.value()},defaultPathArray:function(e){return m.utilities.pathToArray(m.get.defaultPath(e))},defaultPath:function(e){var t=u.filter("[data-"+A.tab+'^="'+m.escape.string(e)+'/"]').eq(0).data(A.tab)||!1;if(t){if(m.debug("Found default tab",t),r<T.maxDepth)return r++,m.get.defaultPath(t);m.error(x.recursion)}else m.debug("No default tabs found for",e,o);return r=0,e},navElement:function(e){return e=e||p,u.filter("[data-"+A.tab+'="'+m.escape.string(e)+'"]')},tabElement:function(e){var t,a,n,i;return e=e||p,n=m.utilities.pathToArray(e),i=m.utilities.last(n),t=o.filter("[data-"+A.tab+'="'+m.escape.string(e)+'"]'),a=o.filter("[data-"+A.tab+'="'+m.escape.string(i)+'"]'),0<t.length?t:a},tab:function(){return p}},determine:{activeTab:function(){var n=null;return o.each(function(e,t){if(j(t).hasClass(L.active)){var a=j(this).data(A.tab);u.filter("[data-"+A.tab+'="'+m.escape.string(a)+'"]').hasClass(L.active)&&(n=a)}}),n}},utilities:{filterArray:function(e,t){return j.grep(e,function(e){return-1==j.inArray(e,t)})},last:function(e){return!!Array.isArray(e)&&e[e.length-1]},pathToArray:function(e){return e===I&&(e=p),"string"==typeof e?e.split("/"):[e]},arrayToPath:function(e){return!!Array.isArray(e)&&e.join("/")}},setting:function(e,t){if(m.debug("Changing setting",e,t),j.isPlainObject(e))j.extend(!0,T,e);else{if(t===I)return T[e];j.isPlainObject(T[e])?j.extend(!0,T[e],t):T[e]=t}},internal:function(e,t){if(j.isPlainObject(e))j.extend(!0,m,e);else{if(t===I)return m[e];m[e]=t}},debug:function(){!T.silent&&T.debug&&(T.performance?m.performance.log(arguments):(m.debug=Function.prototype.bind.call(console.info,console,T.name+":"),m.debug.apply(console,arguments)))},verbose:function(){!T.silent&&T.verbose&&T.debug&&(T.performance?m.performance.log(arguments):(m.verbose=Function.prototype.bind.call(console.info,console,T.name+":"),m.verbose.apply(console,arguments)))},error:function(){T.silent||(m.error=Function.prototype.bind.call(console.error,console,T.name+":"),m.error.apply(console,arguments))},performance:{log:function(e){var t,a;T.performance&&(a=(t=(new Date).getTime())-(g||t),g=t,f.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:s,"Execution Time":a})),clearTimeout(m.performance.timer),m.performance.timer=setTimeout(m.performance.display,500)},display:function(){var e=T.name+":",a=0;g=!1,clearTimeout(m.performance.timer),j.each(f,function(e,t){a+=t["Execution Time"]}),e+=" "+a+"ms",b&&(e+=" '"+b+"'"),(console.group!==I||console.table!==I)&&0<f.length&&(console.groupCollapsed(e),console.table?console.table(f):j.each(f,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),f=[]}},invoke:function(n,e,t){var i,o,a,r=c;return e=e||S,t=s||t,"string"==typeof n&&r!==I&&(n=n.split(/[\. ]/),i=n.length-1,j.each(n,function(e,t){var a=e!=i?t+n[e+1].charAt(0).toUpperCase()+n[e+1].slice(1):n;if(j.isPlainObject(r[a])&&e!=i)r=r[a];else{if(r[a]!==I)return o=r[a],!1;if(!j.isPlainObject(r[t])||e==i)return r[t]!==I?o=r[t]:m.error(x.method,n),!1;r=r[t]}})),j.isFunction(o)?a=o.apply(t,e):o!==I&&(a=o),Array.isArray(d)?d.push(a):d!==I?d=[d,a]:a!==I&&(d=a),o}},w?(c===I&&m.initialize(),m.invoke(F)):(c!==I&&c.invoke("destroy"),m.initialize())}),d!==I?d:this},j.tab=function(){j(O).tab.apply(this,arguments)},j.fn.tab.settings={name:"Tab",namespace:"tab",silent:!1,debug:!1,verbose:!1,performance:!0,auto:!1,history:!1,historyType:"hash",path:!1,context:!1,childrenOnly:!1,maxDepth:25,deactivate:"siblings",alwaysRefresh:!1,cache:!0,loadOnce:!1,cacheType:"response",ignoreFirstLoad:!1,apiSettings:!1,evaluateScripts:"once",autoTabActivation:!0,onFirstLoad:function(e,t,a){},onLoad:function(e,t,a){},onVisible:function(e,t,a){},onRequest:function(e,t,a){},templates:{determineTitle:function(e){}},error:{api:"You attempted to load content without API module",method:"The method you called is not defined",missingTab:"Activated tab cannot be found. Tabs are case-sensitive.",noContent:"The tab you specified is missing a content url.",path:"History enabled, but no path was specified",recursion:"Max recursive depth reached",legacyInit:"onTabInit has been renamed to onFirstLoad in 2.0, please adjust your code.",legacyLoad:"onTabLoad has been renamed to onLoad in 2.0. Please adjust your code",state:"History requires Asual's Address library <https://github.com/asual/jquery-address>"},regExp:{escape:/[-[\]{}()*+?.,\\^$|#\s:=@]/g},metadata:{tab:"tab",loaded:"loaded",promise:"promise"},className:{loading:"loading",active:"active"},selector:{tabs:".ui.tab",ui:".ui"}}}(jQuery,window,document);
11
+ !function(j,O,k,I){"use strict";j.isWindow=j.isWindow||function(e){return null!=e&&e===e.window},j.isFunction=j.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},O=void 0!==O&&O.Math==Math?O:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),j.fn.tab=function(c){var l,d=j.isFunction(this)?j(O):j(this),u=d.selector||"",g=(new Date).getTime(),P=[],F=c,w="string"==typeof F,S=[].slice.call(arguments,1),E=!1;return d.each(function(){var b,i,f,h,p,v=j.isPlainObject(c)?j.extend(!0,{},j.fn.tab.settings,c):j.extend({},j.fn.tab.settings),m=v.className,y=v.metadata,t=v.selector,T=v.error,a=v.regExp,e="."+v.namespace,n="module-"+v.namespace,L=j(this),o={},A=!0,r=0,C=this,s=L.data(n),x={initialize:function(){x.debug("Initializing tab menu item",L),x.fix.callbacks(),x.determineTabs(),x.debug("Determining tabs",v.context,i),v.auto&&x.set.auto(),x.bind.events(),v.history&&!E&&(x.initializeHistory(),E=!0);var e,t=x.determine.activeTab();v.autoTabActivation&&s===I&&null==t&&(t=!0===v.autoTabActivation?x.get.initialPath():v.autoTabActivation,x.debug("No active tab detected, setting tab active",t),x.changeTab(t)),null!=t&&v.history&&(e=j.address.autoUpdate(),j.address.autoUpdate(!1),j.address.value(t),j.address.autoUpdate(e)),x.instantiate()},instantiate:function(){x.verbose("Storing instance of module",x),s=x,L.data(n,x)},destroy:function(){x.debug("Destroying tabs",L),L.removeData(n).off(e)},bind:{events:function(){j.isWindow(C)||(x.debug("Attaching tab activation events to element",L),L.on("click"+e,x.event.click))}},determineTabs:function(){var e;"parent"===v.context?(0<L.closest(t.ui).length?(e=L.closest(t.ui),x.verbose("Using closest UI element as parent",e)):e=L,b=e.parent(),x.verbose("Determined parent element for creating context",b)):v.context?(b=j(v.context),x.verbose("Using selector for tab context",v.context,b)):b=j("body"),v.childrenOnly?(i=b.children(t.tabs),x.debug("Searching tab context children for tabs",b,i)):(i=b.find(t.tabs),x.debug("Searching tab context for tabs",b,i))},fix:{callbacks:function(){j.isPlainObject(c)&&(c.onTabLoad||c.onTabInit)&&(c.onTabLoad&&(c.onLoad=c.onTabLoad,delete c.onTabLoad,x.error(T.legacyLoad,c.onLoad)),c.onTabInit&&(c.onFirstLoad=c.onTabInit,delete c.onTabInit,x.error(T.legacyInit,c.onFirstLoad)),v=j.extend(!0,{},j.fn.tab.settings,c))}},initializeHistory:function(){if(x.debug("Initializing page state"),j.address===I)return x.error(T.state),!1;if("state"==v.historyType){if(x.debug("Using HTML5 to manage state"),!1===v.path)return x.error(T.path),!1;j.address.history(!0).state(v.path),j(O).trigger("popstate")}j.address.bind("change",x.event.history.change)},event:{click:function(e){var t=j(this).data(y.tab);t!==I?(v.history?(x.verbose("Updating page state",e),j.address.value(t)):(x.verbose("Changing tab",e),x.changeTab(t)),e.preventDefault()):x.debug("No tab specified")},history:{change:function(e){var t=e.pathNames.join("/")||x.get.initialPath(),a=v.templates.determineTitle(t)||!1;x.performance.display(),x.debug("History change event",t,e),p=e,t!==I&&x.changeTab(t),a&&j.address.title(a)}}},refresh:function(){f&&(x.debug("Refreshing tab",f),x.changeTab(f))},cache:{read:function(e){return e!==I&&o[e]},add:function(e,t){e=e||f,x.debug("Adding cached content for",e),o[e]=t},remove:function(e){e=e||f,x.debug("Removing cached content for",e),delete o[e]}},escape:{string:function(e){return(e=String(e)).replace(a.escape,"\\$&")}},set:{auto:function(){var e="string"==typeof v.path?v.path.replace(/\/$/,"")+"/{$tab}":"/{$tab}";x.verbose("Setting up automatic tab retrieval from server",e),j.isPlainObject(v.apiSettings)?v.apiSettings.url=e:v.apiSettings={url:e}},loading:function(e){var t=x.get.tabElement(e);t.hasClass(m.loading)||(x.verbose("Setting loading state for",t),t.addClass(m.loading).siblings(i).removeClass(m.active+" "+m.loading),0<t.length&&v.onRequest.call(t[0],e))},state:function(e){j.address.value(e)}},changeTab:function(l){var d=O.history&&O.history.pushState&&v.ignoreFirstLoad&&A,u=v.auto||j.isPlainObject(v.apiSettings),g=u&&!d?x.utilities.pathToArray(l):x.get.defaultPathArray(l);l=x.utilities.arrayToPath(g),j.each(g,function(e,t){var a,n,i=g.slice(0,e+1),o=x.utilities.arrayToPath(i),r=x.is.tab(o),s=e+1==g.length,c=x.get.tabElement(o);return x.verbose("Looking for tab",t),r?(x.verbose("Tab was found",t),f=o,h=x.utilities.filterArray(g,i),s?n=!0:(r=g.slice(0,e+2),t=x.utilities.arrayToPath(r),(n=!x.is.tab(t))&&x.verbose("Tab parameters found",r)),!1===v.onBeforeChange.call(C,o)?(x.debug("onBeforeChange returned false, cancelling tab change",c),!1):n&&u?(d?(x.debug("Ignoring remote content on first tab load",o),A=!1,x.cache.add(l,c.html()),x.activate.all(o),v.onFirstLoad.call(c[0],o,h,p),v.onLoad.call(c[0],o,h,p)):(x.activate.navigation(o),x.fetch.content(o,l)),!1):(x.debug("Opened local tab",o),x.activate.all(o),x.cache.read(o)||(x.cache.add(o,!0),x.debug("First time tab loaded calling tab init"),v.onFirstLoad.call(c[0],o,h,p)),void v.onLoad.call(c[0],o,h,p))):-1!=l.search("/")||""===l?(x.error(T.missingTab,L,b,o),!1):(l=x.escape.string(l),o=(a=j("#"+l+', a[name="'+l+'"]')).closest("[data-tab]").data(y.tab),c=x.get.tabElement(o),a&&0<a.length&&o?(x.debug("Anchor link used, opening parent tab",c,a),!1===v.onBeforeChange.call(C,o)?x.debug("onBeforeChange returned false, cancelling tab change",c):(c.hasClass(m.active)||setTimeout(function(){x.scrollTo(a)},0),x.activate.all(o),x.cache.read(o)||(x.cache.add(o,!0),x.debug("First time tab loaded calling tab init"),v.onFirstLoad.call(c[0],o,h,p)),v.onLoad.call(c[0],o,h,p)),!1):void 0)})},scrollTo:function(e){var t=!!(e&&0<e.length)&&e.offset().top;!1!==t&&(x.debug("Forcing scroll to an in-page link in a hidden tab",t,e),j(k).scrollTop(t))},update:{content:function(e,t,a){var n=x.get.tabElement(e),i=n[0];a=a!==I?a:v.evaluateScripts,"string"==typeof v.cacheType&&"dom"==v.cacheType.toLowerCase()&&"string"!=typeof t?n.empty().append(j(t).clone(!0)):a?(x.debug("Updating HTML and evaluating inline scripts",e,t),n.html(t)):(x.debug("Updating HTML",e,t),i.innerHTML=t)}},fetch:{content:function(t,a){var e,n=x.get.tabElement(t),i={dataType:"html",encodeParameters:!1,on:"now",cache:v.alwaysRefresh,headers:{"X-Remote":!0},onSuccess:function(e){"response"==v.cacheType&&x.cache.add(a,e),x.update.content(t,e),t==f?(x.debug("Content loaded",t),x.activate.tab(t)):x.debug("Content loaded in background",t),v.onFirstLoad.call(n[0],t,h,p),v.onLoad.call(n[0],t,h,p),v.loadOnce?x.cache.add(a,!0):"string"==typeof v.cacheType&&"dom"==v.cacheType.toLowerCase()&&0<n.children().length?setTimeout(function(){var e=(e=n.children().clone(!0)).not("script");x.cache.add(a,e)},0):x.cache.add(a,n.html())},urlData:{tab:a}},o=n.api("get request")||!1,o=o&&"pending"===o.state();a=a||t,e=x.cache.read(a),v.cache&&e?(x.activate.tab(t),x.debug("Adding cached content",a),v.loadOnce||("once"==v.evaluateScripts?x.update.content(t,e,!1):x.update.content(t,e)),v.onLoad.call(n[0],t,h,p)):o?(x.set.loading(t),x.debug("Content is already loading",a)):j.api!==I?(e=j.extend(!0,{},v.apiSettings,i),x.debug("Retrieving remote content",a,e),x.set.loading(t),n.api(e)):x.error(T.api)}},activate:{all:function(e){x.activate.tab(e),x.activate.navigation(e)},tab:function(e){var t=x.get.tabElement(e),a="siblings"==v.deactivate?t.siblings(i):i.not(t),n=t.hasClass(m.active);x.verbose("Showing tab content for",t),n||(t.addClass(m.active),a.removeClass(m.active+" "+m.loading),0<t.length&&v.onVisible.call(t[0],e))},navigation:function(e){var t=x.get.navElement(e),a="siblings"==v.deactivate?t.siblings(d):d.not(t),n=t.hasClass(m.active);x.verbose("Activating tab navigation for",t,e),n||(t.addClass(m.active),a.removeClass(m.active+" "+m.loading))}},deactivate:{all:function(){x.deactivate.navigation(),x.deactivate.tabs()},navigation:function(){d.removeClass(m.active)},tabs:function(){i.removeClass(m.active+" "+m.loading)}},is:{tab:function(e){return e!==I&&0<x.get.tabElement(e).length}},get:{initialPath:function(){return d.eq(0).data(y.tab)||i.eq(0).data(y.tab)},path:function(){return j.address.value()},defaultPathArray:function(e){return x.utilities.pathToArray(x.get.defaultPath(e))},defaultPath:function(e){var t=d.filter("[data-"+y.tab+'^="'+x.escape.string(e)+'/"]').eq(0).data(y.tab)||!1;if(t){if(x.debug("Found default tab",t),r<v.maxDepth)return r++,x.get.defaultPath(t);x.error(T.recursion)}else x.debug("No default tabs found for",e,i);return r=0,e},navElement:function(e){return e=e||f,d.filter("[data-"+y.tab+'="'+x.escape.string(e)+'"]')},tabElement:function(e){var t;return e=e||f,t=x.utilities.pathToArray(e),t=x.utilities.last(t),e=i.filter("[data-"+y.tab+'="'+x.escape.string(e)+'"]'),t=i.filter("[data-"+y.tab+'="'+x.escape.string(t)+'"]'),0<e.length?e:t},tab:function(){return f}},determine:{activeTab:function(){var a=null;return i.each(function(e,t){j(t).hasClass(m.active)&&(t=j(this).data(y.tab),d.filter("[data-"+y.tab+'="'+x.escape.string(t)+'"]').hasClass(m.active)&&(a=t))}),a}},utilities:{filterArray:function(e,t){return j.grep(e,function(e){return-1==j.inArray(e,t)})},last:function(e){return!!Array.isArray(e)&&e[e.length-1]},pathToArray:function(e){return"string"==typeof(e=e===I?f:e)?e.split("/"):[e]},arrayToPath:function(e){return!!Array.isArray(e)&&e.join("/")}},setting:function(e,t){if(x.debug("Changing setting",e,t),j.isPlainObject(e))j.extend(!0,v,e);else{if(t===I)return v[e];j.isPlainObject(v[e])?j.extend(!0,v[e],t):v[e]=t}},internal:function(e,t){if(j.isPlainObject(e))j.extend(!0,x,e);else{if(t===I)return x[e];x[e]=t}},debug:function(){!v.silent&&v.debug&&(v.performance?x.performance.log(arguments):(x.debug=Function.prototype.bind.call(console.info,console,v.name+":"),x.debug.apply(console,arguments)))},verbose:function(){!v.silent&&v.verbose&&v.debug&&(v.performance?x.performance.log(arguments):(x.verbose=Function.prototype.bind.call(console.info,console,v.name+":"),x.verbose.apply(console,arguments)))},error:function(){v.silent||(x.error=Function.prototype.bind.call(console.error,console,v.name+":"),x.error.apply(console,arguments))},performance:{log:function(e){var t,a;v.performance&&(a=(t=(new Date).getTime())-(g||t),g=t,P.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:C,"Execution Time":a})),clearTimeout(x.performance.timer),x.performance.timer=setTimeout(x.performance.display,500)},display:function(){var e=v.name+":",a=0;g=!1,clearTimeout(x.performance.timer),j.each(P,function(e,t){a+=t["Execution Time"]}),e+=" "+a+"ms",u&&(e+=" '"+u+"'"),(console.group!==I||console.table!==I)&&0<P.length&&(console.groupCollapsed(e),console.table?console.table(P):j.each(P,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),P=[]}},invoke:function(n,e,t){var i,o,a,r=s;return e=e||S,t=C||t,"string"==typeof n&&r!==I&&(n=n.split(/[\. ]/),i=n.length-1,j.each(n,function(e,t){var a=e!=i?t+n[e+1].charAt(0).toUpperCase()+n[e+1].slice(1):n;if(j.isPlainObject(r[a])&&e!=i)r=r[a];else{if(r[a]!==I)return o=r[a],!1;{if(!j.isPlainObject(r[t])||e==i)return r[t]!==I?o=r[t]:x.error(T.method,n),!1;r=r[t]}}})),j.isFunction(o)?a=o.apply(t,e):o!==I&&(a=o),Array.isArray(l)?l.push(a):l!==I?l=[l,a]:a!==I&&(l=a),o}};w?(s===I&&x.initialize(),x.invoke(F)):(s!==I&&s.invoke("destroy"),x.initialize())}),l!==I?l:this},j.tab=function(){j(O).tab.apply(this,arguments)},j.fn.tab.settings={name:"Tab",namespace:"tab",silent:!1,debug:!1,verbose:!1,performance:!0,auto:!1,history:!1,historyType:"hash",path:!1,context:!1,childrenOnly:!1,maxDepth:25,deactivate:"siblings",alwaysRefresh:!1,cache:!0,loadOnce:!1,cacheType:"response",ignoreFirstLoad:!1,apiSettings:!1,evaluateScripts:"once",autoTabActivation:!0,onFirstLoad:function(e,t,a){},onLoad:function(e,t,a){},onVisible:function(e,t,a){},onRequest:function(e,t,a){},onBeforeChange:function(e){},templates:{determineTitle:function(e){}},error:{api:"You attempted to load content without API module",method:"The method you called is not defined",missingTab:"Activated tab cannot be found. Tabs are case-sensitive.",noContent:"The tab you specified is missing a content url.",path:"History enabled, but no path was specified",recursion:"Max recursive depth reached",legacyInit:"onTabInit has been renamed to onFirstLoad in 2.0, please adjust your code.",legacyLoad:"onTabLoad has been renamed to onLoad in 2.0. Please adjust your code",state:"History requires Asual's Address library <https://github.com/asual/jquery-address>"},regExp:{escape:/[-[\]{}()*+?.,\\^$|#\s:=@]/g},metadata:{tab:"tab",loaded:"loaded",promise:"promise"},className:{loading:"loading",active:"active"},selector:{tabs:".ui.tab",ui:".ui"}}}(jQuery,window,document);