fomantic-ui 2.9.3-beta.1 → 2.9.3-beta.3

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 (187) hide show
  1. package/.all-contributorsrc +9 -0
  2. package/CONTRIBUTORS.md +102 -99
  3. package/dist/components/accordion.css +1 -1
  4. package/dist/components/accordion.js +1 -5
  5. package/dist/components/accordion.min.css +1 -1
  6. package/dist/components/accordion.min.js +2 -2
  7. package/dist/components/ad.css +1 -1
  8. package/dist/components/ad.min.css +1 -1
  9. package/dist/components/api.js +14 -8
  10. package/dist/components/api.min.js +2 -2
  11. package/dist/components/breadcrumb.css +1 -1
  12. package/dist/components/breadcrumb.min.css +1 -1
  13. package/dist/components/button.css +1 -1
  14. package/dist/components/button.min.css +1 -1
  15. package/dist/components/calendar.css +6 -6
  16. package/dist/components/calendar.js +1 -6
  17. package/dist/components/calendar.min.css +2 -2
  18. package/dist/components/calendar.min.js +2 -2
  19. package/dist/components/card.css +1 -1
  20. package/dist/components/card.min.css +1 -1
  21. package/dist/components/checkbox.css +1 -1
  22. package/dist/components/checkbox.js +1 -5
  23. package/dist/components/checkbox.min.css +1 -1
  24. package/dist/components/checkbox.min.js +2 -2
  25. package/dist/components/comment.css +1 -1
  26. package/dist/components/comment.min.css +1 -1
  27. package/dist/components/container.css +1 -1
  28. package/dist/components/container.min.css +1 -1
  29. package/dist/components/dimmer.css +1 -1
  30. package/dist/components/dimmer.js +1 -5
  31. package/dist/components/dimmer.min.css +1 -1
  32. package/dist/components/dimmer.min.js +2 -2
  33. package/dist/components/divider.css +1 -1
  34. package/dist/components/divider.min.css +1 -1
  35. package/dist/components/dropdown.css +1 -1
  36. package/dist/components/dropdown.js +29 -14
  37. package/dist/components/dropdown.min.css +1 -1
  38. package/dist/components/dropdown.min.js +2 -2
  39. package/dist/components/embed.css +1 -1
  40. package/dist/components/embed.js +1 -6
  41. package/dist/components/embed.min.css +1 -1
  42. package/dist/components/embed.min.js +2 -2
  43. package/dist/components/emoji.css +1 -1
  44. package/dist/components/emoji.min.css +1 -1
  45. package/dist/components/feed.css +1 -1
  46. package/dist/components/feed.min.css +1 -1
  47. package/dist/components/flag.css +1 -1
  48. package/dist/components/flag.min.css +1 -1
  49. package/dist/components/flyout.css +1 -1
  50. package/dist/components/flyout.js +38 -27
  51. package/dist/components/flyout.min.css +1 -1
  52. package/dist/components/flyout.min.js +2 -2
  53. package/dist/components/form.css +1 -1
  54. package/dist/components/form.js +31 -23
  55. package/dist/components/form.min.css +1 -1
  56. package/dist/components/form.min.js +2 -2
  57. package/dist/components/grid.css +1 -1
  58. package/dist/components/grid.min.css +1 -1
  59. package/dist/components/header.css +1 -1
  60. package/dist/components/header.min.css +1 -1
  61. package/dist/components/icon.css +1 -1
  62. package/dist/components/icon.min.css +1 -1
  63. package/dist/components/image.css +1 -1
  64. package/dist/components/image.min.css +1 -1
  65. package/dist/components/input.css +1 -1
  66. package/dist/components/input.min.css +1 -1
  67. package/dist/components/item.css +1 -1
  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 +1 -1
  76. package/dist/components/menu.min.css +1 -1
  77. package/dist/components/message.css +1 -1
  78. package/dist/components/message.min.css +1 -1
  79. package/dist/components/modal.css +1 -1
  80. package/dist/components/modal.js +38 -26
  81. package/dist/components/modal.min.css +1 -1
  82. package/dist/components/modal.min.js +2 -2
  83. package/dist/components/nag.css +1 -1
  84. package/dist/components/nag.js +16 -8
  85. package/dist/components/nag.min.css +1 -1
  86. package/dist/components/nag.min.js +2 -2
  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 +18 -12
  91. package/dist/components/popup.min.css +1 -1
  92. package/dist/components/popup.min.js +2 -2
  93. package/dist/components/progress.css +1 -1
  94. package/dist/components/progress.js +1 -6
  95. package/dist/components/progress.min.css +1 -1
  96. package/dist/components/progress.min.js +2 -2
  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 -5
  101. package/dist/components/rating.min.css +1 -1
  102. package/dist/components/rating.min.js +2 -2
  103. package/dist/components/reset.css +1 -1
  104. package/dist/components/reset.min.css +1 -1
  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 +1 -5
  109. package/dist/components/search.min.css +1 -1
  110. package/dist/components/search.min.js +2 -2
  111. package/dist/components/segment.css +3 -2
  112. package/dist/components/segment.min.css +2 -2
  113. package/dist/components/shape.css +1 -1
  114. package/dist/components/shape.js +1 -5
  115. package/dist/components/shape.min.css +1 -1
  116. package/dist/components/shape.min.js +2 -2
  117. package/dist/components/sidebar.css +1 -1
  118. package/dist/components/sidebar.js +15 -8
  119. package/dist/components/sidebar.min.css +1 -1
  120. package/dist/components/sidebar.min.js +2 -2
  121. package/dist/components/site.css +1 -1
  122. package/dist/components/site.js +1 -1
  123. package/dist/components/site.min.css +1 -1
  124. package/dist/components/site.min.js +1 -1
  125. package/dist/components/slider.css +1 -1
  126. package/dist/components/slider.js +1 -6
  127. package/dist/components/slider.min.css +1 -1
  128. package/dist/components/slider.min.js +2 -2
  129. package/dist/components/state.js +23 -20
  130. package/dist/components/state.min.js +2 -2
  131. package/dist/components/statistic.css +1 -1
  132. package/dist/components/statistic.min.css +1 -1
  133. package/dist/components/step.css +1 -1
  134. package/dist/components/step.min.css +1 -1
  135. package/dist/components/sticky.css +1 -1
  136. package/dist/components/sticky.js +17 -16
  137. package/dist/components/sticky.min.css +1 -1
  138. package/dist/components/sticky.min.js +2 -2
  139. package/dist/components/tab.css +1 -1
  140. package/dist/components/tab.js +14 -6
  141. package/dist/components/tab.min.css +1 -1
  142. package/dist/components/tab.min.js +2 -2
  143. package/dist/components/table.css +1 -1
  144. package/dist/components/table.min.css +1 -1
  145. package/dist/components/text.css +1 -1
  146. package/dist/components/text.min.css +1 -1
  147. package/dist/components/toast.css +1 -1
  148. package/dist/components/toast.js +17 -9
  149. package/dist/components/toast.min.css +1 -1
  150. package/dist/components/toast.min.js +2 -2
  151. package/dist/components/transition.css +1 -1
  152. package/dist/components/transition.js +1 -5
  153. package/dist/components/transition.min.css +1 -1
  154. package/dist/components/transition.min.js +2 -2
  155. package/dist/components/visibility.js +15 -6
  156. package/dist/components/visibility.min.js +2 -2
  157. package/dist/semantic.css +60 -59
  158. package/dist/semantic.js +298 -244
  159. package/dist/semantic.min.css +2 -2
  160. package/dist/semantic.min.js +2 -2
  161. package/package.json +1 -1
  162. package/src/definitions/behaviors/api.js +13 -7
  163. package/src/definitions/behaviors/form.js +30 -22
  164. package/src/definitions/behaviors/state.js +22 -19
  165. package/src/definitions/behaviors/visibility.js +14 -5
  166. package/src/definitions/elements/segment.less +2 -1
  167. package/src/definitions/modules/accordion.js +0 -4
  168. package/src/definitions/modules/calendar.js +0 -5
  169. package/src/definitions/modules/calendar.less +1 -1
  170. package/src/definitions/modules/checkbox.js +0 -4
  171. package/src/definitions/modules/dimmer.js +0 -4
  172. package/src/definitions/modules/dropdown.js +28 -13
  173. package/src/definitions/modules/embed.js +0 -5
  174. package/src/definitions/modules/flyout.js +37 -26
  175. package/src/definitions/modules/modal.js +37 -25
  176. package/src/definitions/modules/nag.js +15 -7
  177. package/src/definitions/modules/popup.js +17 -11
  178. package/src/definitions/modules/progress.js +0 -5
  179. package/src/definitions/modules/rating.js +0 -4
  180. package/src/definitions/modules/search.js +0 -4
  181. package/src/definitions/modules/shape.js +0 -4
  182. package/src/definitions/modules/sidebar.js +14 -7
  183. package/src/definitions/modules/slider.js +0 -5
  184. package/src/definitions/modules/sticky.js +16 -15
  185. package/src/definitions/modules/tab.js +13 -5
  186. package/src/definitions/modules/toast.js +16 -8
  187. package/src/definitions/modules/transition.js +0 -4
@@ -1,5 +1,5 @@
1
1
  /*
2
- * # Fomantic UI - 2.9.3-beta.1+d8dd970
2
+ * # Fomantic UI - 2.9.3-beta.3+880333c
3
3
  * https://github.com/fomantic/Fomantic-UI
4
4
  * https://fomantic-ui.com/
5
5
  *
@@ -8,4 +8,4 @@
8
8
  * https://opensource.org/licenses/MIT
9
9
  *
10
10
  */
11
- !function(E,e){"use strict";e=void 0!==e&&e.Math===Math?e:globalThis,E.fn.embed=function(h){var b,v=E(this),g=v.selector||"",y=Date.now(),w=[],P=h,C="string"==typeof P,D=[].slice.call(arguments,1);return v.each(function(){var t=E.isPlainObject(h)?E.extend(!0,{},E.fn.embed.settings,h):E.extend({},E.fn.embed.settings),e=t.selector,o=t.className,r=t.sources,d=t.error,a=t.metadata,n=t.namespace,i=t.templates,c="."+n,l="module-"+n,u=E(this),s=(u.find(e.placeholder),u.find(e.icon),u.find(e.embed)),m=this,p=u.data(l),f={initialize:function(){f.debug("Initializing embed"),f.determine.autoplay(),f.create(),f.bind.events(),f.instantiate()},instantiate:function(){f.verbose("Storing instance of module",f),p=f,u.data(l,f)},destroy:function(){f.verbose("Destroying previous instance of embed"),f.reset(),u.removeData(l).off(c)},refresh:function(){f.verbose("Refreshing selector cache"),u.find(e.placeholder),u.find(e.icon),s=u.find(e.embed)},bind:{events:function(){f.has.placeholder()&&(f.debug("Adding placeholder events"),u.on("click"+c,e.placeholder,f.createAndShow).on("click"+c,e.icon,f.createAndShow))}},create:function(){f.get.placeholder()?f.createPlaceholder():f.createAndShow()},createPlaceholder:function(e){var o=f.get.icon();e=e||f.get.placeholder(),u.html(i.placeholder(e,o)),f.debug("Creating placeholder for embed",e,o)},createEmbed:function(e){f.refresh(),e=e||f.get.url(),s=E("<div/>").addClass(o.embed).html(f.generate.embed(e)).appendTo(u),t.onCreate.call(m,e),f.debug("Creating embed object",s)},changeEmbed:function(e){s.html(f.generate.embed(e))},createAndShow:function(){f.createEmbed(),f.show()},change:function(e,o,n){f.debug("Changing video to ",e,o,n),u.data(a.source,e).data(a.id,o),n?u.data(a.url,n):u.removeData(a.url),f.has.embed()?f.changeEmbed():f.create()},reset:function(){f.debug("Clearing embed and showing placeholder"),f.remove.data(),f.remove.active(),f.remove.embed(),f.showPlaceholder(),t.onReset.call(m)},show:function(){f.debug("Showing embed"),f.set.active(),t.onDisplay.call(m)},hide:function(){f.debug("Hiding embed"),f.showPlaceholder()},showPlaceholder:function(){f.debug("Showing placeholder image"),f.remove.active(),t.onPlaceholderDisplay.call(m)},get:{id:function(){return t.id||u.data(a.id)},placeholder:function(){return t.placeholder||u.data(a.placeholder)},icon:function(){return t.icon||(void 0!==u.data(a.icon)?u.data(a.icon):f.determine.icon())},source:function(e){return t.source||(void 0!==u.data(a.source)?u.data(a.source):f.determine.source())},type:function(){var e=f.get.source();return void 0!==r[e]&&r[e].type},url:function(){return t.url||(void 0!==u.data(a.url)?u.data(a.url):f.determine.url())}},determine:{autoplay:function(){f.should.autoplay()&&(t.autoplay=!0)},source:function(n){var t=!1;return(n=n||f.get.url())&&E.each(r,function(e,o){if(-1!==n.search(o.domain))return t=e,!1}),t},icon:function(){var e=f.get.source();return void 0!==r[e]&&r[e].icon},url:function(){var e=t.id||u.data(a.id),o=t.source||u.data(a.source),o=void 0!==r[o]&&r[o].url.replace("{id}",e);return o&&u.data(a.url,o),o}},set:{active:function(){u.addClass(o.active)}},remove:{data:function(){u.removeData(a.id).removeData(a.icon).removeData(a.placeholder).removeData(a.source).removeData(a.url)},active:function(){u.removeClass(o.active)},embed:function(){s.empty()}},encode:{parameters:function(e){var o,n=[];for(o in e)n.push(encodeURIComponent(o)+"="+encodeURIComponent(e[o]));return n.join("&amp;")}},generate:{embed:function(e){f.debug("Generating embed html");var o,n=f.get.source();return(e=f.get.url(e))?(n=f.generate.parameters(n),o=i.iframe(e,n)):f.error(d.noURL,u),o},parameters:function(e,o){e=r[e]&&void 0!==r[e].parameters?r[e].parameters(t):{};return(o=o||t.parameters)&&(e=E.extend({},e,o)),e=t.onEmbed(e),f.encode.parameters(e)}},has:{embed:function(){return 0<s.length},placeholder:function(){return t.placeholder||u.data(a.placeholder)}},should:{autoplay:function(){return"auto"===t.autoplay?t.placeholder||void 0!==u.data(a.placeholder):t.autoplay}},is:{video:function(){return"video"===f.get.type()}},setting:function(e,o){if(f.debug("Changing setting",e,o),E.isPlainObject(e))E.extend(!0,t,e);else{if(void 0===o)return t[e];E.isPlainObject(t[e])?E.extend(!0,t[e],o):t[e]=o}},internal:function(e,o){if(E.isPlainObject(e))E.extend(!0,f,e);else{if(void 0===o)return f[e];f[e]=o}},debug:function(){!t.silent&&t.debug&&(t.performance?f.performance.log(arguments):(f.debug=Function.prototype.bind.call(console.info,console,t.name+":"),f.debug.apply(console,arguments)))},verbose:function(){!t.silent&&t.verbose&&t.debug&&(t.performance?f.performance.log(arguments):(f.verbose=Function.prototype.bind.call(console.info,console,t.name+":"),f.verbose.apply(console,arguments)))},error:function(){t.silent||(f.error=Function.prototype.bind.call(console.error,console,t.name+":"),f.error.apply(console,arguments))},performance:{log:function(e){var o,n;t.performance&&(n=(o=Date.now())-(y||o),y=o,w.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:m,"Execution Time":n})),clearTimeout(f.performance.timer),f.performance.timer=setTimeout(f.performance.display,500)},display:function(){var e=t.name+":",n=0;y=!1,clearTimeout(f.performance.timer),E.each(w,function(e,o){n+=o["Execution Time"]}),e+=" "+n+"ms",g&&(e+=" '"+g+"'"),1<v.length&&(e+=" ("+v.length+")"),0<w.length&&(console.groupCollapsed(e),console.table?console.table(w):E.each(w,function(e,o){console.log(o.Name+": "+o["Execution Time"]+"ms")}),console.groupEnd()),w=[]}},invoke:function(t,e,o){var r,a,n,i,c=p;return e=e||D,o=o||m,"string"==typeof t&&void 0!==c&&(t=t.split(/[ .]/),r=t.length-1,E.each(t,function(e,o){var n=e!==r?o+t[e+1].charAt(0).toUpperCase()+t[e+1].slice(1):t;if(E.isPlainObject(c[n])&&e!==r)c=c[n];else{if(void 0!==c[n])return a=c[n],!1;{if(!E.isPlainObject(c[o])||e===r)return void 0!==c[o]?a=c[o]:f.error(d.method,t),!1;c=c[o]}}})),"function"==typeof(i=a)&&"number"!=typeof i.nodeType?n=a.apply(o,e):void 0!==a&&(n=a),Array.isArray(b)?b.push(n):void 0!==b?b=[b,n]:void 0!==n&&(b=n),a}};C?(void 0===p&&f.initialize(),f.invoke(P)):(void 0!==p&&p.invoke("destroy"),f.initialize())}),void 0!==b?b:this},E.fn.embed.settings={name:"Embed",namespace:"embed",silent:!1,debug:!1,verbose:!1,performance:!0,icon:!1,source:!1,url:!1,id:!1,autoplay:"auto",color:"#444",hd:!0,brandedUI:!1,parameters:!1,onDisplay:function(){},onPlaceholderDisplay:function(){},onReset:function(){},onCreate:function(e){},onEmbed:function(e){return e},metadata:{id:"id",icon:"icon",placeholder:"placeholder",source:"source",url:"url"},error:{noURL:"No URL specified",method:"The method you called is not defined"},className:{active:"active",embed:"embed"},selector:{embed:".embed",placeholder:".placeholder",icon:".icon"},sources:{youtube:{name:"youtube",type:"video",icon:"video play",domain:"youtube.com",url:"//www.youtube.com/embed/{id}",parameters:function(e){return{autohide:!e.brandedUI,autoplay:e.autoplay,color:e.color||void 0,hq:e.hd,jsapi:e.api,modestbranding:!e.brandedUI}}},vimeo:{name:"vimeo",type:"video",icon:"video play",domain:"vimeo.com",url:"//player.vimeo.com/video/{id}",parameters:function(e){return{api:e.api,autoplay:e.autoplay,byline:e.brandedUI,color:e.color||void 0,portrait:e.brandedUI,title:e.brandedUI}}}},templates:{deQuote:function(e,o){return String(e).replace(/"/g,o?"&quot;":"")},iframe:function(e,o){return o&&(e+="?"+o),'<iframe src="'+(0,E.fn.embed.settings.templates.deQuote)(e)+'" width="100%" height="100%" msallowFullScreen allowFullScreen></iframe>'},placeholder:function(e,o){var n="",t=E.fn.embed.settings.templates.deQuote;return o&&(n+='<i class="'+t(o)+' icon"></i>'),e&&(n+='<img class="placeholder" src="'+t(e)+'">'),n}},api:!1,onPause:function(){},onPlay:function(){},onStop:function(){}}}(jQuery,window,document);
11
+ !function(D,e){"use strict";e=void 0!==e&&e.Math===Math?e:globalThis,D.fn.embed=function(h){var b,v=D(this),g=Date.now(),y=[],w=h,P="string"==typeof w,C=[].slice.call(arguments,1);return v.each(function(){var t=D.isPlainObject(h)?D.extend(!0,{},D.fn.embed.settings,h):D.extend({},D.fn.embed.settings),e=t.selector,o=t.className,a=t.sources,d=t.error,r=t.metadata,n=t.namespace,i=t.templates,c="."+n,l="module-"+n,u=D(this),s=(u.find(e.placeholder),u.find(e.icon),u.find(e.embed)),m=this,p=u.data(l),f={initialize:function(){f.debug("Initializing embed"),f.determine.autoplay(),f.create(),f.bind.events(),f.instantiate()},instantiate:function(){f.verbose("Storing instance of module",f),p=f,u.data(l,f)},destroy:function(){f.verbose("Destroying previous instance of embed"),f.reset(),u.removeData(l).off(c)},refresh:function(){f.verbose("Refreshing selector cache"),u.find(e.placeholder),u.find(e.icon),s=u.find(e.embed)},bind:{events:function(){f.has.placeholder()&&(f.debug("Adding placeholder events"),u.on("click"+c,e.placeholder,f.createAndShow).on("click"+c,e.icon,f.createAndShow))}},create:function(){f.get.placeholder()?f.createPlaceholder():f.createAndShow()},createPlaceholder:function(e){var o=f.get.icon();e=e||f.get.placeholder(),u.html(i.placeholder(e,o)),f.debug("Creating placeholder for embed",e,o)},createEmbed:function(e){f.refresh(),e=e||f.get.url(),s=D("<div/>").addClass(o.embed).html(f.generate.embed(e)).appendTo(u),t.onCreate.call(m,e),f.debug("Creating embed object",s)},changeEmbed:function(e){s.html(f.generate.embed(e))},createAndShow:function(){f.createEmbed(),f.show()},change:function(e,o,n){f.debug("Changing video to ",e,o,n),u.data(r.source,e).data(r.id,o),n?u.data(r.url,n):u.removeData(r.url),f.has.embed()?f.changeEmbed():f.create()},reset:function(){f.debug("Clearing embed and showing placeholder"),f.remove.data(),f.remove.active(),f.remove.embed(),f.showPlaceholder(),t.onReset.call(m)},show:function(){f.debug("Showing embed"),f.set.active(),t.onDisplay.call(m)},hide:function(){f.debug("Hiding embed"),f.showPlaceholder()},showPlaceholder:function(){f.debug("Showing placeholder image"),f.remove.active(),t.onPlaceholderDisplay.call(m)},get:{id:function(){return t.id||u.data(r.id)},placeholder:function(){return t.placeholder||u.data(r.placeholder)},icon:function(){return t.icon||(void 0!==u.data(r.icon)?u.data(r.icon):f.determine.icon())},source:function(e){return t.source||(void 0!==u.data(r.source)?u.data(r.source):f.determine.source())},type:function(){var e=f.get.source();return void 0!==a[e]&&a[e].type},url:function(){return t.url||(void 0!==u.data(r.url)?u.data(r.url):f.determine.url())}},determine:{autoplay:function(){f.should.autoplay()&&(t.autoplay=!0)},source:function(n){var t=!1;return(n=n||f.get.url())&&D.each(a,function(e,o){if(-1!==n.search(o.domain))return t=e,!1}),t},icon:function(){var e=f.get.source();return void 0!==a[e]&&a[e].icon},url:function(){var e=t.id||u.data(r.id),o=t.source||u.data(r.source),o=void 0!==a[o]&&a[o].url.replace("{id}",e);return o&&u.data(r.url,o),o}},set:{active:function(){u.addClass(o.active)}},remove:{data:function(){u.removeData(r.id).removeData(r.icon).removeData(r.placeholder).removeData(r.source).removeData(r.url)},active:function(){u.removeClass(o.active)},embed:function(){s.empty()}},encode:{parameters:function(e){var o,n=[];for(o in e)n.push(encodeURIComponent(o)+"="+encodeURIComponent(e[o]));return n.join("&amp;")}},generate:{embed:function(e){f.debug("Generating embed html");var o,n=f.get.source();return(e=f.get.url(e))?(n=f.generate.parameters(n),o=i.iframe(e,n)):f.error(d.noURL,u),o},parameters:function(e,o){e=a[e]&&void 0!==a[e].parameters?a[e].parameters(t):{};return(o=o||t.parameters)&&(e=D.extend({},e,o)),e=t.onEmbed(e),f.encode.parameters(e)}},has:{embed:function(){return 0<s.length},placeholder:function(){return t.placeholder||u.data(r.placeholder)}},should:{autoplay:function(){return"auto"===t.autoplay?t.placeholder||void 0!==u.data(r.placeholder):t.autoplay}},is:{video:function(){return"video"===f.get.type()}},setting:function(e,o){if(f.debug("Changing setting",e,o),D.isPlainObject(e))D.extend(!0,t,e);else{if(void 0===o)return t[e];D.isPlainObject(t[e])?D.extend(!0,t[e],o):t[e]=o}},internal:function(e,o){if(D.isPlainObject(e))D.extend(!0,f,e);else{if(void 0===o)return f[e];f[e]=o}},debug:function(){!t.silent&&t.debug&&(t.performance?f.performance.log(arguments):(f.debug=Function.prototype.bind.call(console.info,console,t.name+":"),f.debug.apply(console,arguments)))},verbose:function(){!t.silent&&t.verbose&&t.debug&&(t.performance?f.performance.log(arguments):(f.verbose=Function.prototype.bind.call(console.info,console,t.name+":"),f.verbose.apply(console,arguments)))},error:function(){t.silent||(f.error=Function.prototype.bind.call(console.error,console,t.name+":"),f.error.apply(console,arguments))},performance:{log:function(e){var o,n;t.performance&&(n=(o=Date.now())-(g||o),g=o,y.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:m,"Execution Time":n})),clearTimeout(f.performance.timer),f.performance.timer=setTimeout(f.performance.display,500)},display:function(){var e=t.name+":",n=0;g=!1,clearTimeout(f.performance.timer),D.each(y,function(e,o){n+=o["Execution Time"]}),e+=" "+n+"ms",1<v.length&&(e+=" ("+v.length+")"),0<y.length&&(console.groupCollapsed(e),console.table?console.table(y):D.each(y,function(e,o){console.log(o.Name+": "+o["Execution Time"]+"ms")}),console.groupEnd()),y=[]}},invoke:function(t,e,o){var a,r,n,i,c=p;return e=e||C,o=o||m,"string"==typeof t&&void 0!==c&&(t=t.split(/[ .]/),a=t.length-1,D.each(t,function(e,o){var n=e!==a?o+t[e+1].charAt(0).toUpperCase()+t[e+1].slice(1):t;if(D.isPlainObject(c[n])&&e!==a)c=c[n];else{if(void 0!==c[n])return r=c[n],!1;{if(!D.isPlainObject(c[o])||e===a)return void 0!==c[o]?r=c[o]:f.error(d.method,t),!1;c=c[o]}}})),"function"==typeof(i=r)&&"number"!=typeof i.nodeType?n=r.apply(o,e):void 0!==r&&(n=r),Array.isArray(b)?b.push(n):void 0!==b?b=[b,n]:void 0!==n&&(b=n),r}};P?(void 0===p&&f.initialize(),f.invoke(w)):(void 0!==p&&p.invoke("destroy"),f.initialize())}),void 0!==b?b:this},D.fn.embed.settings={name:"Embed",namespace:"embed",silent:!1,debug:!1,verbose:!1,performance:!0,icon:!1,source:!1,url:!1,id:!1,autoplay:"auto",color:"#444",hd:!0,brandedUI:!1,parameters:!1,onDisplay:function(){},onPlaceholderDisplay:function(){},onReset:function(){},onCreate:function(e){},onEmbed:function(e){return e},metadata:{id:"id",icon:"icon",placeholder:"placeholder",source:"source",url:"url"},error:{noURL:"No URL specified",method:"The method you called is not defined"},className:{active:"active",embed:"embed"},selector:{embed:".embed",placeholder:".placeholder",icon:".icon"},sources:{youtube:{name:"youtube",type:"video",icon:"video play",domain:"youtube.com",url:"//www.youtube.com/embed/{id}",parameters:function(e){return{autohide:!e.brandedUI,autoplay:e.autoplay,color:e.color||void 0,hq:e.hd,jsapi:e.api,modestbranding:!e.brandedUI}}},vimeo:{name:"vimeo",type:"video",icon:"video play",domain:"vimeo.com",url:"//player.vimeo.com/video/{id}",parameters:function(e){return{api:e.api,autoplay:e.autoplay,byline:e.brandedUI,color:e.color||void 0,portrait:e.brandedUI,title:e.brandedUI}}}},templates:{deQuote:function(e,o){return String(e).replace(/"/g,o?"&quot;":"")},iframe:function(e,o){return o&&(e+="?"+o),'<iframe src="'+(0,D.fn.embed.settings.templates.deQuote)(e)+'" width="100%" height="100%" msallowFullScreen allowFullScreen></iframe>'},placeholder:function(e,o){var n="",t=D.fn.embed.settings.templates.deQuote;return o&&(n+='<i class="'+t(o)+' icon"></i>'),e&&(n+='<img class="placeholder" src="'+t(e)+'">'),n}},api:!1,onPause:function(){},onPlay:function(){},onStop:function(){}}}(jQuery,window,document);
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.3-beta.1+d8dd970 - Emoji
2
+ * # Fomantic-UI 2.9.3-beta.3+880333c - Emoji
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.3-beta.1+d8dd970 - Emoji
2
+ * # Fomantic-UI 2.9.3-beta.3+880333c - Emoji
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.3-beta.1+d8dd970 - Feed
2
+ * # Fomantic-UI 2.9.3-beta.3+880333c - Feed
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.3-beta.1+d8dd970 - Feed
2
+ * # Fomantic-UI 2.9.3-beta.3+880333c - Feed
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.3-beta.1+d8dd970 - Flag
2
+ * # Fomantic-UI 2.9.3-beta.3+880333c - Flag
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.3-beta.1+d8dd970 - Flag
2
+ * # Fomantic-UI 2.9.3-beta.3+880333c - Flag
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.3-beta.1+d8dd970 - Flyout
2
+ * # Fomantic-UI 2.9.3-beta.3+880333c - Flyout
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.3-beta.1+d8dd970 - Flyout
2
+ * # Fomantic-UI 2.9.3-beta.3+880333c - Flyout
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -28,15 +28,25 @@
28
28
  $head = $('head'),
29
29
  $body = $('body'),
30
30
 
31
- moduleSelector = $allModules.selector || '',
32
-
33
31
  time = Date.now(),
34
32
  performance = [],
35
33
 
36
34
  query = arguments[0],
37
35
  methodInvoked = typeof query === 'string',
38
36
  queryArguments = [].slice.call(arguments, 1),
37
+ contextCheck = function (context, win) {
38
+ var $context;
39
+ if ([window, document].indexOf(context) >= 0) {
40
+ $context = $body;
41
+ } else {
42
+ $context = $(win.document).find(context);
43
+ if ($context.length === 0) {
44
+ $context = win.frameElement ? contextCheck(context, win.parent) : $body;
45
+ }
46
+ }
39
47
 
48
+ return $context;
49
+ },
40
50
  returnedValue
41
51
  ;
42
52
 
@@ -57,7 +67,7 @@
57
67
  moduleNamespace = 'module-' + namespace,
58
68
 
59
69
  $module = $(this),
60
- $context = [window, document].indexOf(settings.context) < 0 ? $document.find(settings.context) : $body,
70
+ $context = contextCheck(settings.context, window),
61
71
  $closeIcon = $module.find(selector.close),
62
72
  $inputs,
63
73
  $focusedElement,
@@ -76,6 +86,7 @@
76
86
  initialBodyMargin = '',
77
87
  tempBodyMargin = '',
78
88
  hadScrollbar = false,
89
+ windowRefocused = false,
79
90
 
80
91
  elementNamespace,
81
92
  id,
@@ -254,9 +265,13 @@
254
265
  module.setup.heights();
255
266
  },
256
267
  focus: function () {
257
- if (module.is.visible() && settings.autofocus && settings.dimPage) {
268
+ windowRefocused = true;
269
+ },
270
+ click: function (event) {
271
+ if (windowRefocused && document.activeElement !== event.target && module.is.visible() && settings.autofocus && settings.dimPage && $(document.activeElement).closest(selector.flyout).length === 0) {
258
272
  requestAnimationFrame(module.set.autofocus);
259
273
  }
274
+ windowRefocused = false;
260
275
  },
261
276
  clickaway: function (event) {
262
277
  if (settings.closable) {
@@ -363,6 +378,9 @@
363
378
  $window
364
379
  .on('focus' + elementNamespace, module.event.focus)
365
380
  ;
381
+ $context
382
+ .on('click' + elementNamespace, module.event.click)
383
+ ;
366
384
  },
367
385
  clickaway: function () {
368
386
  module.verbose('Adding clickaway events to context', $context);
@@ -492,11 +510,12 @@
492
510
 
493
511
  return nodes;
494
512
  },
495
- shouldRefreshInputs = false
513
+ shouldRefreshInputs = false,
514
+ ignoreAutofocus = true
496
515
  ;
497
516
  mutations.every(function (mutation) {
498
517
  if (mutation.type === 'attributes') {
499
- if (observeAttributes && (mutation.attributeName === 'disabled' || $(mutation.target).find(':input').addBack(':input').length > 0)) {
518
+ if (observeAttributes && (mutation.attributeName === 'disabled' || $(mutation.target).find(':input').addBack(':input').filter(':visible').length > 0)) {
500
519
  shouldRefreshInputs = true;
501
520
  }
502
521
  } else {
@@ -506,6 +525,7 @@
506
525
  $removedInputs = $(collectNodes(mutation.removedNodes)).filter('a[href], [tabindex], :input');
507
526
  if ($addedInputs.length > 0 || $removedInputs.length > 0) {
508
527
  shouldRefreshInputs = true;
528
+ ignoreAutofocus = false;
509
529
  }
510
530
  }
511
531
 
@@ -513,7 +533,7 @@
513
533
  });
514
534
 
515
535
  if (shouldRefreshInputs) {
516
- module.refreshInputs();
536
+ module.refreshInputs(ignoreAutofocus);
517
537
  }
518
538
  });
519
539
  observer.observe(element, {
@@ -527,7 +547,7 @@
527
547
  },
528
548
  refresh: function () {
529
549
  module.verbose('Refreshing selector cache');
530
- $context = [window, document].indexOf(settings.context) < 0 ? $document.find(settings.context) : $body;
550
+ $context = contextCheck(settings.context, window);
531
551
  module.refreshFlyouts();
532
552
  $pusher = $context.children(selector.pusher);
533
553
  module.clear.cache();
@@ -538,7 +558,7 @@
538
558
  $flyouts = $context.children(selector.flyout);
539
559
  },
540
560
 
541
- refreshInputs: function () {
561
+ refreshInputs: function (ignoreAutofocus) {
542
562
  if ($inputs) {
543
563
  $inputs
544
564
  .off('keydown' + elementNamespace)
@@ -550,8 +570,8 @@
550
570
  $inputs = $module.find('a[href], [tabindex], :input:enabled').filter(':visible').filter(function () {
551
571
  return $(this).closest('.disabled').length === 0;
552
572
  });
553
- if ($inputs.length === 0) {
554
- $inputs = $module;
573
+ if ($inputs.filter(':input').length === 0) {
574
+ $inputs = $module.add($inputs);
555
575
  $module.attr('tabindex', -1);
556
576
  } else {
557
577
  $module.removeAttr('tabindex');
@@ -562,7 +582,7 @@
562
582
  $inputs.last()
563
583
  .on('keydown' + elementNamespace, module.event.inputKeyDown.last)
564
584
  ;
565
- if (settings.autofocus && $inputs.filter(':focus').length === 0) {
585
+ if (!ignoreAutofocus && settings.autofocus && $inputs.filter(':focus').length === 0) {
566
586
  module.set.autofocus();
567
587
  }
568
588
  },
@@ -840,20 +860,14 @@
840
860
  var
841
861
  $autofocus = $inputs.filter('[autofocus]'),
842
862
  $rawInputs = $inputs.filter(':input'),
843
- $input = $autofocus.length > 0
844
- ? $autofocus.first()
863
+ $input = ($autofocus.length > 0
864
+ ? $autofocus
845
865
  : ($rawInputs.length > 0
846
866
  ? $rawInputs
847
- : $inputs.filter(':not(i.close)')
848
- ).first()
867
+ : $module)
868
+ ).first()
849
869
  ;
850
- // check if only the close icon is remaining
851
- if ($input.length === 0 && $inputs.length > 0) {
852
- $input = $inputs.first();
853
- }
854
- if ($input.length > 0) {
855
- $input.trigger('focus');
856
- }
870
+ $input.trigger('focus');
857
871
  },
858
872
  dimmerStyles: function () {
859
873
  if (settings.blurring) {
@@ -1244,9 +1258,6 @@
1244
1258
  totalTime += data['Execution Time'];
1245
1259
  });
1246
1260
  title += ' ' + totalTime + 'ms';
1247
- if (moduleSelector) {
1248
- title += ' \'' + moduleSelector + '\'';
1249
- }
1250
1261
  if (performance.length > 0) {
1251
1262
  console.groupCollapsed(title);
1252
1263
  if (console.table) {
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.3-beta.1+d8dd970 - Flyout
2
+ * # Fomantic-UI 2.9.3-beta.3+880333c - Flyout
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*
2
- * # Fomantic UI - 2.9.3-beta.1+d8dd970
2
+ * # Fomantic UI - 2.9.3-beta.3+880333c
3
3
  * https://github.com/fomantic/Fomantic-UI
4
4
  * https://fomantic-ui.com/
5
5
  *
@@ -8,4 +8,4 @@
8
8
  * https://opensource.org/licenses/MIT
9
9
  *
10
10
  */
11
- !function(Q,W,U){"use strict";function X(e){return"function"==typeof e&&"number"!=typeof e.nodeType}W=void 0!==W&&W.Math===Math?W:globalThis,Q.fn.flyout=function(M){var O,e=Q(this),D=Q(W),N=Q(U),L=Q("html"),B=Q("head"),z=Q("body"),I=e.selector||"",j=Date.now(),R=[],q=M,K="string"==typeof q,V=[].slice.call(arguments,1);return e.each(function(){var n,e,o,s,t,i,r,a=Q.isPlainObject(M)?Q.extend(!0,{},Q.fn.flyout.settings,M):Q.extend({},Q.fn.flyout.settings),l=a.selector,c=a.className,u=a.namespace,d=a.fields,f=a.regExp,h=a.error,g="."+u,p="module-"+u,v=Q(this),b=[W,U].indexOf(a.context)<0?N.find(a.context):z,m=v.find(l.close),y=v.children(l.flyout),k=b.children(l.pusher),x=v.hasClass("flyout"),S=this,A=x?v.data(p):void 0,C=!1,w=b[0]===z[0],T="",F="",H=!1,P=!1,E={initialize:function(){var s;E.debug("Initializing flyout",M),E.create.id(),x||(E.create.flyout(),X(a.onHidden)||(a.onHidden=function(){E.destroy(),v.remove()}),a.autoShow||(a.autoShow=!0)),v.addClass(a.class),""!==a.title&&v.find(l.header).html(E.helpers.escape(a.title,a.preserveHTML)).addClass(a.classTitle),""!==a.content&&v.find(l.content).html(E.helpers.escape(a.content,a.preserveHTML)).addClass(a.classContent),E.has.configActions()&&(0===(s=v.find(l.actions).addClass(a.classActions)).length?s=Q("<div/>",{class:c.actions+" "+(a.classActions||"")}).appendTo(v):s.empty(),a.actions.forEach(function(e){var t=e[d.icon]?"<i "+(e[d.text]?'aria-hidden="true"':"")+' class="'+E.helpers.deQuote(e[d.icon])+' icon"></i>':"",n=E.helpers.escape(e[d.text]||"",a.preserveHTML),i=E.helpers.deQuote(e[d.class]||""),o=e[d.click]&&X(e[d.click])?e[d.click]:function(){};s.append(Q("<button/>",{html:t+n,"aria-label":(e[d.text]||e[d.icon]||"").replace(/<[^>]+(>|$)/g,""),class:c.button+" "+i,on:{click:function(){!1!==o.call(S,v)&&E.hide()}}}))})),a.delaySetup?requestAnimationFrame(E.setup.layout):E.setup.layout(),requestAnimationFrame(function(){E.setup.cache()}),"left"!==E.get.direction()&&"right"!==E.get.direction()||(E.setup.heights(),E.bind.resize()),E.bind.events(),E.observeChanges(),E.instantiate(),a.autoShow&&E.show()},instantiate:function(){E.verbose("Storing instance of module",E),A=E,v.data(p,A)},create:{flyout:function(){var e;E.verbose("Programmaticaly create flyout",b),v=Q("<div/>",{class:c.flyout,role:"dialog","aria-modal":a.dimPage}),a.closeIcon&&(m=Q("<i/>",{class:c.close,role:"button",tabindex:0,"aria-label":a.text.close}),v.append(m)),""!==a.title&&(e="_"+E.get.id()+"title",v.attr("aria-labelledby",e),Q("<div/>",{class:c.header,id:e}).appendTo(v)),""!==a.content&&(e="_"+E.get.id()+"desc",v.attr("aria-describedby",e),Q("<div/>",{class:c.content,id:e}).appendTo(v)),E.has.configActions()&&Q("<div/>",{class:c.actions}).appendTo(v),v.prependTo(b),S=v[0]},id:function(){t=(Math.random().toString(16)+"000000000").slice(2,10),s="."+t,E.verbose("Creating unique id for element",t)}},destroy:function(){i&&i.disconnect(),E.verbose("Destroying previous module for",v),v.off(g).removeData(p),E.is.ios()&&E.remove.ios(),m.off(s),n&&n.off(s),b.off(s),D.off(s),N.off(s)},event:{keyboard:function(e){e.which===a.keys.escape&&(a.closable?(E.debug("Escape key pressed hiding flyout"),E.hide()):E.debug("Escape key pressed, but closable is set to false"),e.preventDefault())},resize:function(){E.setup.heights()},focus:function(){E.is.visible()&&a.autofocus&&a.dimPage&&requestAnimationFrame(E.set.autofocus)},clickaway:function(e){var t;a.closable&&(t=0<k.find(e.target).length||k.is(e.target),e=b.is(e.target),t&&(E.verbose("User clicked on dimmed page"),E.hide()),e&&(E.verbose("User clicked on dimmable context (scaled out page)"),E.hide()))},close:function(e){E.hide()},closeKeyUp:function(e){e=e.which;e!==a.keys.enter&&e!==a.keys.space||E.hide()},inputKeyDown:{first:function(e){e.which===a.keys.tab&&e.shiftKey&&(n.last().trigger("focus"),e.preventDefault())},last:function(e){e.which!==a.keys.tab||e.shiftKey||(n.first().trigger("focus"),e.preventDefault())}},approve:function(e){C||!1===a.onApprove.call(E.element,Q(this))?E.verbose("Approve callback returned false cancelling close"):(C=!0,E.hide(function(){C=!1}))},deny:function(e){C||!1===a.onDeny.call(E.element,Q(this))?E.verbose("Deny callback returned false cancelling close"):(C=!0,E.hide(function(){C=!1}))},touch:function(e){},containScroll:function(e){S.scrollTop<=0&&(S.scrollTop=1),S.scrollTop+S.offsetHeight>=S.scrollHeight&&(S.scrollTop=S.scrollHeight-S.offsetHeight-1)},scroll:function(e){0===Q(e.target).closest(l.flyout).length&&e.preventDefault()}},bind:{resize:function(){E.verbose("Adding resize event to window",D),D.on("resize"+s,E.event.resize)},events:function(){E.verbose("Attaching events"),v.on("click"+g,l.close,E.event.close).on("click"+g,l.approve,E.event.approve).on("click"+g,l.deny,E.event.deny),m.on("keyup"+s,E.event.closeKeyUp),D.on("focus"+s,E.event.focus)},clickaway:function(){E.verbose("Adding clickaway events to context",b),b.on("click"+s,E.event.clickaway).on("touchend"+s,E.event.clickaway)},scrollLock:function(){a.scrollLock&&(E.debug("Disabling page scroll"),(H=E.has.scrollbar())&&(E.save.bodyMargin(),E.set.bodyMargin()),b.addClass(c.locked)),E.verbose("Adding events to contain flyout scroll"),N.on("touchmove"+s,E.event.touch),v.on("scroll"+g,E.event.containScroll)}},unbind:{clickaway:function(){E.verbose("Removing clickaway events from context",b),b.off(s)},scrollLock:function(){E.verbose("Removing scroll lock from page"),H&&E.restore.bodyMargin(),b.removeClass(c.locked),N.off(s),v.off("scroll"+g)}},add:{inlineCSS:function(){var e=E.cache.width||v.outerWidth(),t=E.cache.height||v.outerHeight(),n=E.is.rtl(),i=E.get.direction(),t={left:e,right:-e,top:t,bottom:-t};n&&(E.verbose("RTL detected, flipping widths"),t.left=-e,t.right=e),n="<style>","left"===i||"right"===i?(E.debug("Adding CSS rules for animation distance",e),n+=" .ui.visible."+i+".flyout ~ .fixed, .ui.visible."+i+".flyout ~ .pusher { transform: translate3d("+t[i]+"px, 0, 0); }"):"top"!==i&&"bottom"!==i||(n+=" .ui.visible."+i+".flyout ~ .fixed, .ui.visible."+i+".flyout ~ .pusher { transform: translate3d(0, "+t[i]+"px, 0); }"),E.is.ie()&&("left"===i||"right"===i?(E.debug("Adding CSS rules for animation distance",e),n+=" body.pushable > .ui.visible."+i+".flyout ~ .pusher::after { transform: translate3d("+t[i]+"px, 0, 0); }"):"top"!==i&&"bottom"!==i||(n+=" body.pushable > .ui.visible."+i+".flyout ~ .pusher::after { transform: translate3d(0, "+t[i]+"px, 0); }"),n+=" body.pushable > .ui.visible.left.flyout ~ .ui.visible.right.flyout ~ .pusher::after, body.pushable > .ui.visible.right.flyout ~ .ui.visible.left.flyout ~ .pusher::after { transform: translate3d(0, 0, 0); }"),o=Q(n+="</style>").appendTo(B),E.debug("Adding sizing css to head",o)},keyboardShortcuts:function(){E.verbose("Adding keyboard shortcuts"),N.on("keydown"+g,E.event.keyboard)}},observeChanges:function(){"MutationObserver"in W&&((i=new MutationObserver(function(e){function o(e){for(var t=[],n=0,i=e.length;n<i;n++)Array.prototype.push.apply(t,o(e[n].childNodes)),t.push(e[n]);return t}var n=!1;e.every(function(e){var t;return"attributes"===e.type?P&&("disabled"===e.attributeName||0<Q(e.target).find(":input").addBack(":input").length)&&(n=!0):(t=Q(o(e.addedNodes)).filter("a[href], [tabindex], :input:enabled").filter(":visible"),e=Q(o(e.removedNodes)).filter("a[href], [tabindex], :input"),(0<t.length||0<e.length)&&(n=!0)),!n}),n&&E.refreshInputs()})).observe(S,{attributeFilter:["class","disabled"],attributes:!0,childList:!0,subtree:!0}),E.debug("Setting up mutation observer",i))},refresh:function(){E.verbose("Refreshing selector cache"),b=[W,U].indexOf(a.context)<0?N.find(a.context):z,E.refreshFlyouts(),k=b.children(l.pusher),E.clear.cache()},refreshFlyouts:function(){E.verbose("Refreshing other flyouts"),y=b.children(l.flyout)},refreshInputs:function(){n&&n.off("keydown"+s),a.dimPage&&(0===(n=v.find("a[href], [tabindex], :input:enabled").filter(":visible").filter(function(){return 0===Q(this).closest(".disabled").length})).length?(n=v).attr("tabindex",-1):v.removeAttr("tabindex"),n.first().on("keydown"+s,E.event.inputKeyDown.first),n.last().on("keydown"+s,E.event.inputKeyDown.last),a.autofocus&&0===n.filter(":focus").length&&E.set.autofocus())},setup:{cache:function(){E.cache={width:v.outerWidth(),height:v.outerHeight()}},layout:function(){0===b.children(l.pusher).length&&(E.debug("Adding wrapper element for flyout"),E.error(h.pusher),k=Q('<div class="pusher" />'),b.children().not(l.omitted).not(y).wrapAll(k),E.refresh()),0!==v.nextAll(l.pusher).length&&v.nextAll(l.pusher)[0]===k[0]||(E.debug("Moved flyout to correct parent element"),E.error(h.movedFlyout,S),v.detach().prependTo(b),E.refresh()),E.is.mobile()&&v.addClass(c.fullscreen),E.clear.cache(),E.set.pushable(),E.set.direction()},heights:function(){E.debug("Setting up heights",v);var e=v.children(l.header),t=v.children(l.content),n=v.children(l.actions),e=(b.height()||0)-(e.outerHeight()||0)-(n.outerHeight()||0);0<e&&t.css("min-height",String(e)+"px")}},attachEvents:function(e,t){var n=Q(e);t=X(E[t])?E[t]:E.toggle,0<n.length?(E.debug("Attaching flyout events to element",e,t),n.on("click"+g,t)):E.error(h.notFound,e)},show:function(e){e=X(e)?e:function(){},E.is.hidden()?!1===a.onShow.call(S)?E.verbose("Show callback returned false cancelling show"):(E.refresh(),E.othersActive()&&(E.debug("Other flyouts currently visible"),a.exclusive?E.hideOthers():C=!1),E.set.dimmerStyles(),E.set.observeAttributes(!1),E.pushPage(function(){e.call(S),a.onVisible.call(S),a.keyboardShortcuts&&E.add.keyboardShortcuts(),E.save.focus(),E.refreshInputs(),requestAnimationFrame(E.set.observeAttributes)}),a.onChange.call(S)):E.debug("Flyout is already visible")},hide:function(e){if(e=X(e)?e:function(){},!1===a.onHide.call(S,Q(this)))return E.verbose("Hide callback returned false cancelling hide"),C=!1;(E.is.visible()||E.is.animating())&&(E.debug("Hiding flyout",e),E.refreshFlyouts(),E.set.observeAttributes(!1),E.pullPage(function(){e.call(S),X(a.onHidden)&&a.onHidden.call(S),E.restore.focus()}),a.onChange.call(S))},othersAnimating:function(){return 0<y.not(v).filter("."+c.animating).length},othersVisible:function(){return 0<y.not(v).filter("."+c.visible).length},othersActive:function(){return E.othersVisible()||E.othersAnimating()},hideOthers:function(e){var t=y.not(v).filter("."+c.visible),n=t.length,i=0;e=e||function(){},t.flyout("hide",function(){++i===n&&e()})},toggle:function(){E.verbose("Determining toggled direction"),E.is.hidden()?E.show():E.hide()},pushPage:function(t){var e,n,i;t=X(t)?t:function(){},E.set.overlay(),a.returnScroll&&(r=(w?D:b).scrollTop()),E.bind.scrollLock(),e=function(){E.bind.clickaway(),E.add.inlineCSS(),E.set.animating(),E.set.visible()},n=function(){E.set.dimmed()},i=function(e){e.target===v[0]&&(v.off("transitionend"+s,i),E.remove.animating(),t.call(S))},v.off("transitionend"+s),v.on("transitionend"+s,i),requestAnimationFrame(e),a.dimPage&&!E.othersVisible()&&requestAnimationFrame(n)},pullPage:function(t){var e,n;t=X(t)?t:function(){},E.verbose("Removing context push state",E.get.direction()),E.unbind.clickaway(),E.othersActive()||(E.unbind.scrollLock(),a.keyboardShortcuts&&E.remove.keyboardShortcuts()),e=function(){E.set.overlay(),E.set.animating(),a.dimPage&&!E.othersVisible()&&E.set.closing(),E.remove.visible()},n=function(e){e.target===v[0]&&(v.off("transitionend"+s,n),E.remove.animating(),E.remove.closing(),E.remove.overlay(),E.remove.inlineCSS(),a.returnScroll&&E.scrollBack(),a.dimPage&&!E.othersVisible()&&k.removeClass(c.dimmed),t.call(S))},v.off("transitionend"+s),v.on("transitionend"+s,n),requestAnimationFrame(e)},scrollToTop:function(){E.verbose("Scrolling to top of page to avoid animation issues"),v.scrollTop(0),(w?D:b)[0].scrollTo(0,0)},scrollBack:function(){E.verbose("Scrolling back to original page position"),(w?D:b)[0].scrollTo(0,r)},clear:{cache:function(){E.verbose("Clearing cached dimensions"),E.cache={}}},set:{observeAttributes:function(e){P=!1!==e},autofocus:function(){var e=n.filter("[autofocus]"),t=n.filter(":input"),e=(0<e.length?e:0<t.length?t:n.filter(":not(i.close)")).first();0<(e=0===e.length&&0<n.length?n.first():e).length&&e.trigger("focus")},dimmerStyles:function(){a.blurring?k.addClass(c.blurring):k.removeClass(c.blurring)},bodyMargin:function(){var n=E.can.leftBodyScrollbar()?"left":"right";b.css((w?"margin-":"padding-")+n,F+"px"),b.find(l.bodyFixed.replace("right",n)).each(function(){var e=Q(this),t="fixed"===e.css("position")?"padding-"+n:n;e.css(t,"calc("+e.css(t)+" + "+F+"px)")})},ios:function(){L.addClass(c.ios)},pushed:function(){b.addClass(c.pushed)},pushable:function(){b.addClass(c.pushable)},dimmed:function(){k.addClass(c.dimmed)},active:function(){v.addClass(c.active)},animating:function(){v.addClass(c.animating)},closing:function(){k.addClass(c.closing)},direction:function(e){e=e||E.get.direction(),v.addClass(c[e])},visible:function(){v.addClass(c.visible)},overlay:function(){v.addClass(c.overlay)}},remove:{inlineCSS:function(){E.debug("Removing inline css styles",o),o&&0<o.length&&o.remove()},keyboardShortcuts:function(){E.verbose("Removing keyboard shortcuts"),N.off("keydown"+g)},ios:function(){L.removeClass(c.ios)},pushed:function(){b.removeClass(c.pushed)},pushable:function(){b.removeClass(c.pushable)},active:function(){v.removeClass(c.active)},animating:function(){v.removeClass(c.animating)},closing:function(){k.removeClass(c.closing)},direction:function(e){e=e||E.get.direction(),v.removeClass(c[e])},visible:function(){v.removeClass(c.visible)},overlay:function(){v.removeClass(c.overlay)}},get:{direction:function(){return v.hasClass(c.top)?c.top:v.hasClass(c.right)?c.right:v.hasClass(c.bottom)?c.bottom:c.left},id:function(){return t},element:function(){return v},settings:function(){return a}},can:{leftBodyScrollbar:function(){return void 0===E.cache.leftBodyScrollbar&&(E.cache.leftBodyScrollbar=E.is.rtl()&&(E.is.iframe&&!E.is.firefox()||E.is.safari()||E.is.edge()||E.is.ie())),E.cache.leftBodyScrollbar}},save:{focus:function(){0<Q(U.activeElement).closest(v).length||(e=Q(U.activeElement).trigger("blur"))},bodyMargin:function(){T=b.css((w?"margin-":"padding-")+(E.can.leftBodyScrollbar()?"left":"right"));var e=parseInt(T.replace(/[^\d.]/g,""),10),t=w?W.innerWidth-U.documentElement.clientWidth:b[0].offsetWidth-b[0].clientWidth;F=e+t}},is:{safari:function(){return void 0===E.cache.isSafari&&(E.cache.isSafari=/constructor/i.test(W.HTMLElement)||!!W.ApplePaySession),E.cache.isSafari},edge:function(){return void 0===E.cache.isEdge&&(E.cache.isEdge=!!W.setImmediate&&!E.is.ie()),E.cache.isEdge},firefox:function(){return void 0===E.cache.isFirefox&&(E.cache.isFirefox=!!W.InstallTrigger),E.cache.isFirefox},iframe:function(){return!(self===top)},ie:function(){var e,t;return void 0===E.cache.isIE&&(e=!W.ActiveXObject&&"ActiveXObject"in W,t="ActiveXObject"in W,E.cache.isIE=e||t),E.cache.isIE},ios:function(){var e=navigator.userAgent,t=e.match(f.ios),n=e.match(f.mobileChrome);return!(!t||n)&&(E.verbose("Browser was found to be iOS",e),!0)},mobile:function(){var e=navigator.userAgent;return e.match(f.mobile)?(E.verbose("Browser was found to be mobile",e),!0):(E.verbose("Browser is not mobile, using regular transition",e),!1)},hidden:function(){return!E.is.visible()},visible:function(){return v.hasClass(c.visible)},animating:function(){return b.hasClass(c.animating)},rtl:function(){return void 0===E.cache.isRTL&&(E.cache.isRTL="rtl"===v.attr("dir")||"rtl"===v.css("direction")||"rtl"===z.attr("dir")||"rtl"===z.css("direction")||"rtl"===b.attr("dir")||"rtl"===b.css("direction")),E.cache.isRTL}},has:{configActions:function(){return Array.isArray(a.actions)&&0<a.actions.length},scrollbar:function(){return w||"hidden"!==b.css("overflow-y")}},restore:{focus:function(){e&&0<e.length&&a.restoreFocus&&e.trigger("focus")},bodyMargin:function(){var n=E.can.leftBodyScrollbar()?"left":"right";b.css((w?"margin-":"padding-")+n,T),b.find(l.bodyFixed.replace("right",n)).each(function(){var e=Q(this),t="fixed"===e.css("position")?"padding-"+n:n;e.css(t,"")})}},helpers:{deQuote:function(e){return String(e).replace(/"/g,"")},escape:function(e,t){if(t)return e;var n={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"};return/["&'<>`]/.test(e)?(e=e.replace(/&(?![\d#a-z]{1,12};)/gi,"&amp;")).replace(/["'<>`]/g,function(e){return n[e]}):e}},setting:function(e,t){if(E.debug("Changing setting",e,t),Q.isPlainObject(e))Q.extend(!0,a,e);else{if(void 0===t)return a[e];Q.isPlainObject(a[e])?Q.extend(!0,a[e],t):a[e]=t}},internal:function(e,t){if(Q.isPlainObject(e))Q.extend(!0,E,e);else{if(void 0===t)return E[e];E[e]=t}},debug:function(){!a.silent&&a.debug&&(a.performance?E.performance.log(arguments):(E.debug=Function.prototype.bind.call(console.info,console,a.name+":"),E.debug.apply(console,arguments)))},verbose:function(){!a.silent&&a.verbose&&a.debug&&(a.performance?E.performance.log(arguments):(E.verbose=Function.prototype.bind.call(console.info,console,a.name+":"),E.verbose.apply(console,arguments)))},error:function(){a.silent||(E.error=Function.prototype.bind.call(console.error,console,a.name+":"),E.error.apply(console,arguments))},performance:{log:function(e){var t,n;a.performance&&(n=(t=Date.now())-(j||t),j=t,R.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:S,"Execution Time":n})),clearTimeout(E.performance.timer),E.performance.timer=setTimeout(E.performance.display,500)},display:function(){var e=a.name+":",n=0;j=!1,clearTimeout(E.performance.timer),Q.each(R,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",I&&(e+=" '"+I+"'"),0<R.length&&(console.groupCollapsed(e),console.table?console.table(R):Q.each(R,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),R=[]}},invoke:function(i,e,t){var o,s,n,r=A;return e=e||V,t=S||t,"string"==typeof i&&void 0!==r&&(i=i.split(/[ .]/),o=i.length-1,Q.each(i,function(e,t){var n=e!==o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(Q.isPlainObject(r[n])&&e!==o)r=r[n];else{if(void 0!==r[n])return s=r[n],!1;{if(!Q.isPlainObject(r[t])||e===o)return void 0!==r[t]?s=r[t]:E.error(h.method,i),!1;r=r[t]}}})),X(s)?n=s.apply(t,e):void 0!==s&&(n=s),Array.isArray(O)?O.push(n):void 0!==O?O=[O,n]:void 0!==n&&(O=n),s}};K?(void 0===A&&(X(a.templates[q])&&(a.autoShow=!0,a.className.flyout=a.className.template,a=Q.extend(!0,{},a,a.templates[q].apply(E,V)),c=a.className,a.namespace,d=a.fields,h=a.error),E.initialize()),X(a.templates[q])||E.invoke(q)):(void 0!==A&&A.invoke("destroy"),E.initialize(),O=v)}),void 0!==O?O:this},Q.flyout=Q.fn.flyout,Q.fn.flyout.settings={name:"Flyout",namespace:"flyout",silent:!1,debug:!1,verbose:!1,performance:!0,context:"body",exclusive:!1,closable:!0,autofocus:!0,restoreFocus:!0,dimPage:!0,scrollLock:!1,returnScroll:!1,delaySetup:!1,autoShow:!1,keyboardShortcuts:!0,title:"",content:"",class:"",classTitle:"",classContent:"",classActions:"",closeIcon:!1,actions:!1,preserveHTML:!0,fields:{class:"class",text:"text",icon:"icon",click:"click"},onChange:function(){},onShow:function(){},onHide:function(){return!0},onHidden:!1,onVisible:function(){},onApprove:function(){},onDeny:function(){},keys:{space:32,enter:13,escape:27,tab:9},className:{flyout:"ui flyout",close:"close icon",header:"ui header",content:"content",actions:"actions",active:"active",animating:"animating",blurring:"blurring",closing:"closing",dimmed:"dimmed",ios:"ios",locked:"locked",pushable:"pushable",pushed:"pushed",right:"right",top:"top",left:"left",bottom:"bottom",visible:"visible",overlay:"overlay",fullscreen:"fullscreen",template:"ui flyout",button:"ui button",ok:"positive",cancel:"negative",prompt:"ui fluid input"},selector:{bodyFixed:"> .ui.fixed.menu, > .ui.right.toast-container, > .ui.right.sidebar, > .ui.right.flyout, > .ui.fixed.nag, > .ui.fixed.nag > .close",fixed:".fixed",omitted:"script, link, style, .ui.modal, .ui.dimmer, .ui.nag, .ui.fixed",pusher:".pusher",flyout:".ui.flyout",header:".ui.header",content:".content",actions:".actions",close:".close",approve:".actions .positive, .actions .approve, .actions .ok",deny:".actions .negative, .actions .deny, .actions .cancel"},regExp:{ios:/(iPad|iPhone|iPod)/g,mobileChrome:/(CriOS)/g,mobile:/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/g},error:{method:"The method you called is not defined.",pusher:"Had to add pusher element. For optimal performance make sure body content is inside a pusher element",movedFlyout:"Had to move flyout. For optimal performance make sure flyout and pusher are direct children of your body tag",notFound:"There were no elements that matched the specified selector"},text:{ok:"Ok",cancel:"Cancel",close:"Close"}},Q.fn.flyout.settings.templates={getArguments:function(e){e=[].slice.call(e);return Q.isPlainObject(e[0])?Q.extend({handler:function(){},content:"",title:""},e[0]):(X(e[e.length-1])||e.push(function(){}),{handler:e.pop(),content:e.pop()||"",title:e.pop()||""})},alert:function(){var e=this.get.settings(),t=e.templates.getArguments(arguments);return{title:t.title,content:t.content,actions:[{text:e.text.ok,class:e.className.ok,click:t.handler}]}},confirm:function(){var e=this.get.settings(),t=e.templates.getArguments(arguments);return{title:t.title,content:t.content,actions:[{text:e.text.ok,class:e.className.ok,click:function(){t.handler(!0)}},{text:e.text.cancel,class:e.className.cancel,click:function(){t.handler(!1)}}]}},prompt:function(){var t=this,e=this.get.settings(),n=e.templates.getArguments(arguments);return 0===Q(Q.parseHTML(n.content)).filter(".ui.input").length&&(n.content+='<p><div class="'+e.className.prompt+'"><input placeholder="'+this.helpers.deQuote(n.placeholder||"")+'" type="text" value="'+this.helpers.deQuote(n.defaultValue||"")+'"></div></p>'),{title:n.title,content:n.content,actions:[{text:e.text.ok,class:e.className.ok,click:function(){var e=t.get.settings(),e=t.get.element().find(e.selector.prompt)[0];n.handler(Q(e).val())}},{text:e.text.cancel,class:e.className.cancel,click:function(){n.handler(null)}}]}}}}(jQuery,window,document);
11
+ !function(W,U,X){"use strict";function _(e){return"function"==typeof e&&"number"!=typeof e.nodeType}U=void 0!==U&&U.Math===Math?U:globalThis,W.fn.flyout=function(O){var D,e=W(this),N=W(U),L=W(X),B=W("html"),z=W("head"),I=W("body"),j=Date.now(),R=[],q=O,K="string"==typeof q,V=[].slice.call(arguments,1),Q=function(e,t){var n;return 0<=[U,X].indexOf(e)?n=I:0===(n=W(t.document).find(e)).length&&(n=t.frameElement?Q(e,t.parent):I),n};return e.each(function(){var n,e,o,s,t,i,r,a=W.isPlainObject(O)?W.extend(!0,{},W.fn.flyout.settings,O):W.extend({},W.fn.flyout.settings),c=a.selector,l=a.className,u=a.namespace,d=a.fields,f=a.regExp,h=a.error,g="."+u,p="module-"+u,v=W(this),b=Q(a.context,U),m=v.find(c.close),y=v.children(c.flyout),k=b.children(c.pusher),x=v.hasClass("flyout"),S=this,A=x?v.data(p):void 0,C=!1,w=b[0]===I[0],T="",F="",E=!1,H=!1,P=!1,M={initialize:function(){var s;M.debug("Initializing flyout",O),M.create.id(),x||(M.create.flyout(),_(a.onHidden)||(a.onHidden=function(){M.destroy(),v.remove()}),a.autoShow||(a.autoShow=!0)),v.addClass(a.class),""!==a.title&&v.find(c.header).html(M.helpers.escape(a.title,a.preserveHTML)).addClass(a.classTitle),""!==a.content&&v.find(c.content).html(M.helpers.escape(a.content,a.preserveHTML)).addClass(a.classContent),M.has.configActions()&&(0===(s=v.find(c.actions).addClass(a.classActions)).length?s=W("<div/>",{class:l.actions+" "+(a.classActions||"")}).appendTo(v):s.empty(),a.actions.forEach(function(e){var t=e[d.icon]?"<i "+(e[d.text]?'aria-hidden="true"':"")+' class="'+M.helpers.deQuote(e[d.icon])+' icon"></i>':"",n=M.helpers.escape(e[d.text]||"",a.preserveHTML),i=M.helpers.deQuote(e[d.class]||""),o=e[d.click]&&_(e[d.click])?e[d.click]:function(){};s.append(W("<button/>",{html:t+n,"aria-label":(e[d.text]||e[d.icon]||"").replace(/<[^>]+(>|$)/g,""),class:l.button+" "+i,on:{click:function(){!1!==o.call(S,v)&&M.hide()}}}))})),a.delaySetup?requestAnimationFrame(M.setup.layout):M.setup.layout(),requestAnimationFrame(function(){M.setup.cache()}),"left"!==M.get.direction()&&"right"!==M.get.direction()||(M.setup.heights(),M.bind.resize()),M.bind.events(),M.observeChanges(),M.instantiate(),a.autoShow&&M.show()},instantiate:function(){M.verbose("Storing instance of module",M),A=M,v.data(p,A)},create:{flyout:function(){var e;M.verbose("Programmaticaly create flyout",b),v=W("<div/>",{class:l.flyout,role:"dialog","aria-modal":a.dimPage}),a.closeIcon&&(m=W("<i/>",{class:l.close,role:"button",tabindex:0,"aria-label":a.text.close}),v.append(m)),""!==a.title&&(e="_"+M.get.id()+"title",v.attr("aria-labelledby",e),W("<div/>",{class:l.header,id:e}).appendTo(v)),""!==a.content&&(e="_"+M.get.id()+"desc",v.attr("aria-describedby",e),W("<div/>",{class:l.content,id:e}).appendTo(v)),M.has.configActions()&&W("<div/>",{class:l.actions}).appendTo(v),v.prependTo(b),S=v[0]},id:function(){t=(Math.random().toString(16)+"000000000").slice(2,10),s="."+t,M.verbose("Creating unique id for element",t)}},destroy:function(){i&&i.disconnect(),M.verbose("Destroying previous module for",v),v.off(g).removeData(p),M.is.ios()&&M.remove.ios(),m.off(s),n&&n.off(s),b.off(s),N.off(s),L.off(s)},event:{keyboard:function(e){e.which===a.keys.escape&&(a.closable?(M.debug("Escape key pressed hiding flyout"),M.hide()):M.debug("Escape key pressed, but closable is set to false"),e.preventDefault())},resize:function(){M.setup.heights()},focus:function(){H=!0},click:function(e){H&&X.activeElement!==e.target&&M.is.visible()&&a.autofocus&&a.dimPage&&0===W(X.activeElement).closest(c.flyout).length&&requestAnimationFrame(M.set.autofocus),H=!1},clickaway:function(e){var t;a.closable&&(t=0<k.find(e.target).length||k.is(e.target),e=b.is(e.target),t&&(M.verbose("User clicked on dimmed page"),M.hide()),e&&(M.verbose("User clicked on dimmable context (scaled out page)"),M.hide()))},close:function(e){M.hide()},closeKeyUp:function(e){e=e.which;e!==a.keys.enter&&e!==a.keys.space||M.hide()},inputKeyDown:{first:function(e){e.which===a.keys.tab&&e.shiftKey&&(n.last().trigger("focus"),e.preventDefault())},last:function(e){e.which!==a.keys.tab||e.shiftKey||(n.first().trigger("focus"),e.preventDefault())}},approve:function(e){C||!1===a.onApprove.call(M.element,W(this))?M.verbose("Approve callback returned false cancelling close"):(C=!0,M.hide(function(){C=!1}))},deny:function(e){C||!1===a.onDeny.call(M.element,W(this))?M.verbose("Deny callback returned false cancelling close"):(C=!0,M.hide(function(){C=!1}))},touch:function(e){},containScroll:function(e){S.scrollTop<=0&&(S.scrollTop=1),S.scrollTop+S.offsetHeight>=S.scrollHeight&&(S.scrollTop=S.scrollHeight-S.offsetHeight-1)},scroll:function(e){0===W(e.target).closest(c.flyout).length&&e.preventDefault()}},bind:{resize:function(){M.verbose("Adding resize event to window",N),N.on("resize"+s,M.event.resize)},events:function(){M.verbose("Attaching events"),v.on("click"+g,c.close,M.event.close).on("click"+g,c.approve,M.event.approve).on("click"+g,c.deny,M.event.deny),m.on("keyup"+s,M.event.closeKeyUp),N.on("focus"+s,M.event.focus),b.on("click"+s,M.event.click)},clickaway:function(){M.verbose("Adding clickaway events to context",b),b.on("click"+s,M.event.clickaway).on("touchend"+s,M.event.clickaway)},scrollLock:function(){a.scrollLock&&(M.debug("Disabling page scroll"),(E=M.has.scrollbar())&&(M.save.bodyMargin(),M.set.bodyMargin()),b.addClass(l.locked)),M.verbose("Adding events to contain flyout scroll"),L.on("touchmove"+s,M.event.touch),v.on("scroll"+g,M.event.containScroll)}},unbind:{clickaway:function(){M.verbose("Removing clickaway events from context",b),b.off(s)},scrollLock:function(){M.verbose("Removing scroll lock from page"),E&&M.restore.bodyMargin(),b.removeClass(l.locked),L.off(s),v.off("scroll"+g)}},add:{inlineCSS:function(){var e=M.cache.width||v.outerWidth(),t=M.cache.height||v.outerHeight(),n=M.is.rtl(),i=M.get.direction(),t={left:e,right:-e,top:t,bottom:-t};n&&(M.verbose("RTL detected, flipping widths"),t.left=-e,t.right=e),n="<style>","left"===i||"right"===i?(M.debug("Adding CSS rules for animation distance",e),n+=" .ui.visible."+i+".flyout ~ .fixed, .ui.visible."+i+".flyout ~ .pusher { transform: translate3d("+t[i]+"px, 0, 0); }"):"top"!==i&&"bottom"!==i||(n+=" .ui.visible."+i+".flyout ~ .fixed, .ui.visible."+i+".flyout ~ .pusher { transform: translate3d(0, "+t[i]+"px, 0); }"),M.is.ie()&&("left"===i||"right"===i?(M.debug("Adding CSS rules for animation distance",e),n+=" body.pushable > .ui.visible."+i+".flyout ~ .pusher::after { transform: translate3d("+t[i]+"px, 0, 0); }"):"top"!==i&&"bottom"!==i||(n+=" body.pushable > .ui.visible."+i+".flyout ~ .pusher::after { transform: translate3d(0, "+t[i]+"px, 0); }"),n+=" body.pushable > .ui.visible.left.flyout ~ .ui.visible.right.flyout ~ .pusher::after, body.pushable > .ui.visible.right.flyout ~ .ui.visible.left.flyout ~ .pusher::after { transform: translate3d(0, 0, 0); }"),o=W(n+="</style>").appendTo(z),M.debug("Adding sizing css to head",o)},keyboardShortcuts:function(){M.verbose("Adding keyboard shortcuts"),L.on("keydown"+g,M.event.keyboard)}},observeChanges:function(){"MutationObserver"in U&&((i=new MutationObserver(function(e){function o(e){for(var t=[],n=0,i=e.length;n<i;n++)Array.prototype.push.apply(t,o(e[n].childNodes)),t.push(e[n]);return t}var n=!1,i=!0;e.every(function(e){var t;return"attributes"===e.type?P&&("disabled"===e.attributeName||0<W(e.target).find(":input").addBack(":input").filter(":visible").length)&&(n=!0):(t=W(o(e.addedNodes)).filter("a[href], [tabindex], :input:enabled").filter(":visible"),e=W(o(e.removedNodes)).filter("a[href], [tabindex], :input"),(0<t.length||0<e.length)&&(i=!(n=!0))),!n}),n&&M.refreshInputs(i)})).observe(S,{attributeFilter:["class","disabled"],attributes:!0,childList:!0,subtree:!0}),M.debug("Setting up mutation observer",i))},refresh:function(){M.verbose("Refreshing selector cache"),b=Q(a.context,U),M.refreshFlyouts(),k=b.children(c.pusher),M.clear.cache()},refreshFlyouts:function(){M.verbose("Refreshing other flyouts"),y=b.children(c.flyout)},refreshInputs:function(e){n&&n.off("keydown"+s),a.dimPage&&(0===(n=v.find("a[href], [tabindex], :input:enabled").filter(":visible").filter(function(){return 0===W(this).closest(".disabled").length})).filter(":input").length?(n=v.add(n),v.attr("tabindex",-1)):v.removeAttr("tabindex"),n.first().on("keydown"+s,M.event.inputKeyDown.first),n.last().on("keydown"+s,M.event.inputKeyDown.last),!e&&a.autofocus&&0===n.filter(":focus").length&&M.set.autofocus())},setup:{cache:function(){M.cache={width:v.outerWidth(),height:v.outerHeight()}},layout:function(){0===b.children(c.pusher).length&&(M.debug("Adding wrapper element for flyout"),M.error(h.pusher),k=W('<div class="pusher" />'),b.children().not(c.omitted).not(y).wrapAll(k),M.refresh()),0!==v.nextAll(c.pusher).length&&v.nextAll(c.pusher)[0]===k[0]||(M.debug("Moved flyout to correct parent element"),M.error(h.movedFlyout,S),v.detach().prependTo(b),M.refresh()),M.is.mobile()&&v.addClass(l.fullscreen),M.clear.cache(),M.set.pushable(),M.set.direction()},heights:function(){M.debug("Setting up heights",v);var e=v.children(c.header),t=v.children(c.content),n=v.children(c.actions),e=(b.height()||0)-(e.outerHeight()||0)-(n.outerHeight()||0);0<e&&t.css("min-height",String(e)+"px")}},attachEvents:function(e,t){var n=W(e);t=_(M[t])?M[t]:M.toggle,0<n.length?(M.debug("Attaching flyout events to element",e,t),n.on("click"+g,t)):M.error(h.notFound,e)},show:function(e){e=_(e)?e:function(){},M.is.hidden()?!1===a.onShow.call(S)?M.verbose("Show callback returned false cancelling show"):(M.refresh(),M.othersActive()&&(M.debug("Other flyouts currently visible"),a.exclusive?M.hideOthers():C=!1),M.set.dimmerStyles(),M.set.observeAttributes(!1),M.pushPage(function(){e.call(S),a.onVisible.call(S),a.keyboardShortcuts&&M.add.keyboardShortcuts(),M.save.focus(),M.refreshInputs(),requestAnimationFrame(M.set.observeAttributes)}),a.onChange.call(S)):M.debug("Flyout is already visible")},hide:function(e){if(e=_(e)?e:function(){},!1===a.onHide.call(S,W(this)))return M.verbose("Hide callback returned false cancelling hide"),C=!1;(M.is.visible()||M.is.animating())&&(M.debug("Hiding flyout",e),M.refreshFlyouts(),M.set.observeAttributes(!1),M.pullPage(function(){e.call(S),_(a.onHidden)&&a.onHidden.call(S),M.restore.focus()}),a.onChange.call(S))},othersAnimating:function(){return 0<y.not(v).filter("."+l.animating).length},othersVisible:function(){return 0<y.not(v).filter("."+l.visible).length},othersActive:function(){return M.othersVisible()||M.othersAnimating()},hideOthers:function(e){var t=y.not(v).filter("."+l.visible),n=t.length,i=0;e=e||function(){},t.flyout("hide",function(){++i===n&&e()})},toggle:function(){M.verbose("Determining toggled direction"),M.is.hidden()?M.show():M.hide()},pushPage:function(t){var e,n,i;t=_(t)?t:function(){},M.set.overlay(),a.returnScroll&&(r=(w?N:b).scrollTop()),M.bind.scrollLock(),e=function(){M.bind.clickaway(),M.add.inlineCSS(),M.set.animating(),M.set.visible()},n=function(){M.set.dimmed()},i=function(e){e.target===v[0]&&(v.off("transitionend"+s,i),M.remove.animating(),t.call(S))},v.off("transitionend"+s),v.on("transitionend"+s,i),requestAnimationFrame(e),a.dimPage&&!M.othersVisible()&&requestAnimationFrame(n)},pullPage:function(t){var e,n;t=_(t)?t:function(){},M.verbose("Removing context push state",M.get.direction()),M.unbind.clickaway(),M.othersActive()||(M.unbind.scrollLock(),a.keyboardShortcuts&&M.remove.keyboardShortcuts()),e=function(){M.set.overlay(),M.set.animating(),a.dimPage&&!M.othersVisible()&&M.set.closing(),M.remove.visible()},n=function(e){e.target===v[0]&&(v.off("transitionend"+s,n),M.remove.animating(),M.remove.closing(),M.remove.overlay(),M.remove.inlineCSS(),a.returnScroll&&M.scrollBack(),a.dimPage&&!M.othersVisible()&&k.removeClass(l.dimmed),t.call(S))},v.off("transitionend"+s),v.on("transitionend"+s,n),requestAnimationFrame(e)},scrollToTop:function(){M.verbose("Scrolling to top of page to avoid animation issues"),v.scrollTop(0),(w?N:b)[0].scrollTo(0,0)},scrollBack:function(){M.verbose("Scrolling back to original page position"),(w?N:b)[0].scrollTo(0,r)},clear:{cache:function(){M.verbose("Clearing cached dimensions"),M.cache={}}},set:{observeAttributes:function(e){P=!1!==e},autofocus:function(){var e=n.filter("[autofocus]"),t=n.filter(":input");(0<e.length?e:0<t.length?t:v).first().trigger("focus")},dimmerStyles:function(){a.blurring?k.addClass(l.blurring):k.removeClass(l.blurring)},bodyMargin:function(){var n=M.can.leftBodyScrollbar()?"left":"right";b.css((w?"margin-":"padding-")+n,F+"px"),b.find(c.bodyFixed.replace("right",n)).each(function(){var e=W(this),t="fixed"===e.css("position")?"padding-"+n:n;e.css(t,"calc("+e.css(t)+" + "+F+"px)")})},ios:function(){B.addClass(l.ios)},pushed:function(){b.addClass(l.pushed)},pushable:function(){b.addClass(l.pushable)},dimmed:function(){k.addClass(l.dimmed)},active:function(){v.addClass(l.active)},animating:function(){v.addClass(l.animating)},closing:function(){k.addClass(l.closing)},direction:function(e){e=e||M.get.direction(),v.addClass(l[e])},visible:function(){v.addClass(l.visible)},overlay:function(){v.addClass(l.overlay)}},remove:{inlineCSS:function(){M.debug("Removing inline css styles",o),o&&0<o.length&&o.remove()},keyboardShortcuts:function(){M.verbose("Removing keyboard shortcuts"),L.off("keydown"+g)},ios:function(){B.removeClass(l.ios)},pushed:function(){b.removeClass(l.pushed)},pushable:function(){b.removeClass(l.pushable)},active:function(){v.removeClass(l.active)},animating:function(){v.removeClass(l.animating)},closing:function(){k.removeClass(l.closing)},direction:function(e){e=e||M.get.direction(),v.removeClass(l[e])},visible:function(){v.removeClass(l.visible)},overlay:function(){v.removeClass(l.overlay)}},get:{direction:function(){return v.hasClass(l.top)?l.top:v.hasClass(l.right)?l.right:v.hasClass(l.bottom)?l.bottom:l.left},id:function(){return t},element:function(){return v},settings:function(){return a}},can:{leftBodyScrollbar:function(){return void 0===M.cache.leftBodyScrollbar&&(M.cache.leftBodyScrollbar=M.is.rtl()&&(M.is.iframe&&!M.is.firefox()||M.is.safari()||M.is.edge()||M.is.ie())),M.cache.leftBodyScrollbar}},save:{focus:function(){0<W(X.activeElement).closest(v).length||(e=W(X.activeElement).trigger("blur"))},bodyMargin:function(){T=b.css((w?"margin-":"padding-")+(M.can.leftBodyScrollbar()?"left":"right"));var e=parseInt(T.replace(/[^\d.]/g,""),10),t=w?U.innerWidth-X.documentElement.clientWidth:b[0].offsetWidth-b[0].clientWidth;F=e+t}},is:{safari:function(){return void 0===M.cache.isSafari&&(M.cache.isSafari=/constructor/i.test(U.HTMLElement)||!!U.ApplePaySession),M.cache.isSafari},edge:function(){return void 0===M.cache.isEdge&&(M.cache.isEdge=!!U.setImmediate&&!M.is.ie()),M.cache.isEdge},firefox:function(){return void 0===M.cache.isFirefox&&(M.cache.isFirefox=!!U.InstallTrigger),M.cache.isFirefox},iframe:function(){return!(self===top)},ie:function(){var e,t;return void 0===M.cache.isIE&&(e=!U.ActiveXObject&&"ActiveXObject"in U,t="ActiveXObject"in U,M.cache.isIE=e||t),M.cache.isIE},ios:function(){var e=navigator.userAgent,t=e.match(f.ios),n=e.match(f.mobileChrome);return!(!t||n)&&(M.verbose("Browser was found to be iOS",e),!0)},mobile:function(){var e=navigator.userAgent;return e.match(f.mobile)?(M.verbose("Browser was found to be mobile",e),!0):(M.verbose("Browser is not mobile, using regular transition",e),!1)},hidden:function(){return!M.is.visible()},visible:function(){return v.hasClass(l.visible)},animating:function(){return b.hasClass(l.animating)},rtl:function(){return void 0===M.cache.isRTL&&(M.cache.isRTL="rtl"===v.attr("dir")||"rtl"===v.css("direction")||"rtl"===I.attr("dir")||"rtl"===I.css("direction")||"rtl"===b.attr("dir")||"rtl"===b.css("direction")),M.cache.isRTL}},has:{configActions:function(){return Array.isArray(a.actions)&&0<a.actions.length},scrollbar:function(){return w||"hidden"!==b.css("overflow-y")}},restore:{focus:function(){e&&0<e.length&&a.restoreFocus&&e.trigger("focus")},bodyMargin:function(){var n=M.can.leftBodyScrollbar()?"left":"right";b.css((w?"margin-":"padding-")+n,T),b.find(c.bodyFixed.replace("right",n)).each(function(){var e=W(this),t="fixed"===e.css("position")?"padding-"+n:n;e.css(t,"")})}},helpers:{deQuote:function(e){return String(e).replace(/"/g,"")},escape:function(e,t){if(t)return e;var n={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"};return/["&'<>`]/.test(e)?(e=e.replace(/&(?![\d#a-z]{1,12};)/gi,"&amp;")).replace(/["'<>`]/g,function(e){return n[e]}):e}},setting:function(e,t){if(M.debug("Changing setting",e,t),W.isPlainObject(e))W.extend(!0,a,e);else{if(void 0===t)return a[e];W.isPlainObject(a[e])?W.extend(!0,a[e],t):a[e]=t}},internal:function(e,t){if(W.isPlainObject(e))W.extend(!0,M,e);else{if(void 0===t)return M[e];M[e]=t}},debug:function(){!a.silent&&a.debug&&(a.performance?M.performance.log(arguments):(M.debug=Function.prototype.bind.call(console.info,console,a.name+":"),M.debug.apply(console,arguments)))},verbose:function(){!a.silent&&a.verbose&&a.debug&&(a.performance?M.performance.log(arguments):(M.verbose=Function.prototype.bind.call(console.info,console,a.name+":"),M.verbose.apply(console,arguments)))},error:function(){a.silent||(M.error=Function.prototype.bind.call(console.error,console,a.name+":"),M.error.apply(console,arguments))},performance:{log:function(e){var t,n;a.performance&&(n=(t=Date.now())-(j||t),j=t,R.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:S,"Execution Time":n})),clearTimeout(M.performance.timer),M.performance.timer=setTimeout(M.performance.display,500)},display:function(){var e=a.name+":",n=0;j=!1,clearTimeout(M.performance.timer),W.each(R,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",0<R.length&&(console.groupCollapsed(e),console.table?console.table(R):W.each(R,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),R=[]}},invoke:function(i,e,t){var o,s,n,r=A;return e=e||V,t=S||t,"string"==typeof i&&void 0!==r&&(i=i.split(/[ .]/),o=i.length-1,W.each(i,function(e,t){var n=e!==o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(W.isPlainObject(r[n])&&e!==o)r=r[n];else{if(void 0!==r[n])return s=r[n],!1;{if(!W.isPlainObject(r[t])||e===o)return void 0!==r[t]?s=r[t]:M.error(h.method,i),!1;r=r[t]}}})),_(s)?n=s.apply(t,e):void 0!==s&&(n=s),Array.isArray(D)?D.push(n):void 0!==D?D=[D,n]:void 0!==n&&(D=n),s}};K?(void 0===A&&(_(a.templates[q])&&(a.autoShow=!0,a.className.flyout=a.className.template,a=W.extend(!0,{},a,a.templates[q].apply(M,V)),l=a.className,a.namespace,d=a.fields,h=a.error),M.initialize()),_(a.templates[q])||M.invoke(q)):(void 0!==A&&A.invoke("destroy"),M.initialize(),D=v)}),void 0!==D?D:this},W.flyout=W.fn.flyout,W.fn.flyout.settings={name:"Flyout",namespace:"flyout",silent:!1,debug:!1,verbose:!1,performance:!0,context:"body",exclusive:!1,closable:!0,autofocus:!0,restoreFocus:!0,dimPage:!0,scrollLock:!1,returnScroll:!1,delaySetup:!1,autoShow:!1,keyboardShortcuts:!0,title:"",content:"",class:"",classTitle:"",classContent:"",classActions:"",closeIcon:!1,actions:!1,preserveHTML:!0,fields:{class:"class",text:"text",icon:"icon",click:"click"},onChange:function(){},onShow:function(){},onHide:function(){return!0},onHidden:!1,onVisible:function(){},onApprove:function(){},onDeny:function(){},keys:{space:32,enter:13,escape:27,tab:9},className:{flyout:"ui flyout",close:"close icon",header:"ui header",content:"content",actions:"actions",active:"active",animating:"animating",blurring:"blurring",closing:"closing",dimmed:"dimmed",ios:"ios",locked:"locked",pushable:"pushable",pushed:"pushed",right:"right",top:"top",left:"left",bottom:"bottom",visible:"visible",overlay:"overlay",fullscreen:"fullscreen",template:"ui flyout",button:"ui button",ok:"positive",cancel:"negative",prompt:"ui fluid input"},selector:{bodyFixed:"> .ui.fixed.menu, > .ui.right.toast-container, > .ui.right.sidebar, > .ui.right.flyout, > .ui.fixed.nag, > .ui.fixed.nag > .close",fixed:".fixed",omitted:"script, link, style, .ui.modal, .ui.dimmer, .ui.nag, .ui.fixed",pusher:".pusher",flyout:".ui.flyout",header:".ui.header",content:".content",actions:".actions",close:".close",approve:".actions .positive, .actions .approve, .actions .ok",deny:".actions .negative, .actions .deny, .actions .cancel"},regExp:{ios:/(iPad|iPhone|iPod)/g,mobileChrome:/(CriOS)/g,mobile:/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/g},error:{method:"The method you called is not defined.",pusher:"Had to add pusher element. For optimal performance make sure body content is inside a pusher element",movedFlyout:"Had to move flyout. For optimal performance make sure flyout and pusher are direct children of your body tag",notFound:"There were no elements that matched the specified selector"},text:{ok:"Ok",cancel:"Cancel",close:"Close"}},W.fn.flyout.settings.templates={getArguments:function(e){e=[].slice.call(e);return W.isPlainObject(e[0])?W.extend({handler:function(){},content:"",title:""},e[0]):(_(e[e.length-1])||e.push(function(){}),{handler:e.pop(),content:e.pop()||"",title:e.pop()||""})},alert:function(){var e=this.get.settings(),t=e.templates.getArguments(arguments);return{title:t.title,content:t.content,actions:[{text:e.text.ok,class:e.className.ok,click:t.handler}]}},confirm:function(){var e=this.get.settings(),t=e.templates.getArguments(arguments);return{title:t.title,content:t.content,actions:[{text:e.text.ok,class:e.className.ok,click:function(){t.handler(!0)}},{text:e.text.cancel,class:e.className.cancel,click:function(){t.handler(!1)}}]}},prompt:function(){var t=this,e=this.get.settings(),n=e.templates.getArguments(arguments);return 0===W(W.parseHTML(n.content)).filter(".ui.input").length&&(n.content+='<p><div class="'+e.className.prompt+'"><input placeholder="'+this.helpers.deQuote(n.placeholder||"")+'" type="text" value="'+this.helpers.deQuote(n.defaultValue||"")+'"></div></p>'),{title:n.title,content:n.content,actions:[{text:e.text.ok,class:e.className.ok,click:function(){var e=t.get.settings(),e=t.get.element().find(e.selector.prompt)[0];n.handler(W(e).val())}},{text:e.text.cancel,class:e.className.cancel,click:function(){n.handler(null)}}]}}}}(jQuery,window,document);
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.3-beta.1+d8dd970 - Form
2
+ * # Fomantic-UI 2.9.3-beta.3+880333c - Form
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.3-beta.1+d8dd970 - Form Validation
2
+ * # Fomantic-UI 2.9.3-beta.3+880333c - Form Validation
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -22,7 +22,7 @@
22
22
  $.fn.form = function (parameters) {
23
23
  var
24
24
  $allModules = $(this),
25
- moduleSelector = $allModules.selector || '',
25
+ $window = $(window),
26
26
 
27
27
  time = Date.now(),
28
28
  performance = [],
@@ -61,6 +61,8 @@
61
61
  namespace,
62
62
  moduleNamespace,
63
63
  eventNamespace,
64
+ attachEventsSelector,
65
+ attachEventsAction,
64
66
 
65
67
  submitting = false,
66
68
  dirty = false,
@@ -143,6 +145,9 @@
143
145
  module[action]();
144
146
  event.preventDefault();
145
147
  });
148
+
149
+ attachEventsSelector = selector;
150
+ attachEventsAction = action;
146
151
  },
147
152
 
148
153
  bindEvents: function () {
@@ -168,10 +173,14 @@
168
173
 
169
174
  // Dirty events
170
175
  if (settings.preventLeaving) {
171
- $(window).on('beforeunload' + eventNamespace, module.event.beforeUnload);
176
+ $window.on('beforeunload' + eventNamespace, module.event.beforeUnload);
172
177
  }
173
178
 
174
- $field.on('change click keyup keydown blur', function (e) {
179
+ $field.on('change' + eventNamespace
180
+ + ' click' + eventNamespace
181
+ + ' keyup' + eventNamespace
182
+ + ' keydown' + eventNamespace
183
+ + ' blur' + eventNamespace, function (e) {
175
184
  module.determine.isDirty();
176
185
  });
177
186
 
@@ -182,6 +191,9 @@
182
191
  $module.on('clean' + eventNamespace, function (e) {
183
192
  settings.onClean.call();
184
193
  });
194
+ if (attachEventsSelector) {
195
+ module.attachEvents(attachEventsSelector, attachEventsAction);
196
+ }
185
197
  },
186
198
 
187
199
  clear: function () {
@@ -230,6 +242,7 @@
230
242
  isCheckbox = $field.is(selector.checkbox),
231
243
  isDropdown = $element.is(selector.uiDropdown) && module.can.useElement('dropdown'),
232
244
  isCalendar = $calendar.length > 0 && module.can.useElement('calendar'),
245
+ isFile = $field.is(selector.file),
233
246
  isErrored = $fieldGroup.hasClass(className.error)
234
247
  ;
235
248
  if (defaultValue === undefined) {
@@ -250,7 +263,7 @@
250
263
  $calendar.calendar('set date', defaultValue);
251
264
  } else {
252
265
  module.verbose('Resetting field value', $field, defaultValue);
253
- $field.val(defaultValue);
266
+ $field.val(isFile ? '' : defaultValue);
254
267
  }
255
268
  });
256
269
  module.remove.states();
@@ -386,6 +399,13 @@
386
399
  $module.off(eventNamespace);
387
400
  $field.off(eventNamespace);
388
401
  $submit.off(eventNamespace);
402
+ if (settings.preventLeaving) {
403
+ $window.off(eventNamespace);
404
+ }
405
+ if (attachEventsSelector) {
406
+ $(attachEventsSelector).off(eventNamespace);
407
+ attachEventsSelector = undefined;
408
+ }
389
409
  },
390
410
 
391
411
  event: {
@@ -487,18 +507,7 @@
487
507
  return rule.type;
488
508
  },
489
509
  changeEvent: function (type, $input) {
490
- if (type === 'checkbox' || type === 'radio' || type === 'hidden' || $input.is('select')) {
491
- return 'change';
492
- }
493
-
494
- return module.get.inputEvent();
495
- },
496
- inputEvent: function () {
497
- return document.createElement('input').oninput !== undefined
498
- ? 'input'
499
- : (document.createElement('input').onpropertychange !== undefined
500
- ? 'propertychange'
501
- : 'keyup');
510
+ return ['file', 'checkbox', 'radio', 'hidden'].indexOf(type) >= 0 || $input.is('select') ? 'change' : 'input';
502
511
  },
503
512
  fieldsFromShorthand: function (fields) {
504
513
  var
@@ -1103,6 +1112,7 @@
1103
1112
  $field = module.get.field(key),
1104
1113
  $element = $field.parent(),
1105
1114
  $calendar = $field.closest(selector.uiCalendar),
1115
+ isFile = $field.is(selector.file),
1106
1116
  isMultiple = Array.isArray(value),
1107
1117
  isCheckbox = $element.is(selector.uiCheckbox) && module.can.useElement('checkbox'),
1108
1118
  isDropdown = $element.is(selector.uiDropdown) && module.can.useElement('dropdown'),
@@ -1145,7 +1155,7 @@
1145
1155
  $calendar.calendar('set date', value);
1146
1156
  } else {
1147
1157
  module.verbose('Setting field value', value, $field);
1148
- $field.val(value);
1158
+ $field.val(isFile ? '' : value);
1149
1159
  }
1150
1160
  }
1151
1161
  });
@@ -1473,9 +1483,6 @@
1473
1483
  totalTime += data['Execution Time'];
1474
1484
  });
1475
1485
  title += ' ' + totalTime + 'ms';
1476
- if (moduleSelector) {
1477
- title += ' \'' + moduleSelector + '\'';
1478
- }
1479
1486
  if ($allModules.length > 1) {
1480
1487
  title += ' (' + $allModules.length + ')';
1481
1488
  }
@@ -1651,9 +1658,10 @@
1651
1658
  selector: {
1652
1659
  checkbox: 'input[type="checkbox"], input[type="radio"]',
1653
1660
  clear: '.clear',
1654
- field: 'input:not(.search):not([type="file"]):not([type="reset"]):not([type="button"]):not([type="submit"]), textarea, select',
1661
+ field: 'input:not(.search):not([type="reset"]):not([type="button"]):not([type="submit"]), textarea, select',
1662
+ file: 'input[type="file"]',
1655
1663
  group: '.field',
1656
- input: 'input:not([type="file"])',
1664
+ input: 'input',
1657
1665
  message: '.error.message',
1658
1666
  prompt: '.prompt.label',
1659
1667
  radio: 'input[type="radio"]',
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.3-beta.1+d8dd970 - Form
2
+ * # Fomantic-UI 2.9.3-beta.3+880333c - Form
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *