foundation-rails 6.6.2.0 → 6.9.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (217) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +1 -1
  3. data/.travis.yml +2 -0
  4. data/Appraisals +4 -0
  5. data/Gemfile +1 -1
  6. data/Gemfile.lock +198 -145
  7. data/bower.json +3 -3
  8. data/foundation-rails.gemspec +4 -4
  9. data/gemfiles/rails_7.1.gemfile +10 -0
  10. data/gemfiles/rails_7.1.gemfile.lock +261 -0
  11. data/lib/foundation/rails/version.rb +1 -1
  12. data/lib/generators/foundation/templates/_settings.scss +32 -28
  13. data/vendor/assets/js/foundation.cjs.js +1996 -3162
  14. data/vendor/assets/js/foundation.cjs.js.map +1 -1
  15. data/vendor/assets/js/foundation.es6.js +385 -292
  16. data/vendor/assets/js/foundation.es6.js.map +1 -1
  17. data/vendor/assets/js/foundation.esm.js +1663 -2832
  18. data/vendor/assets/js/foundation.esm.js.map +1 -1
  19. data/vendor/assets/js/foundation.js +2440 -3870
  20. data/vendor/assets/js/foundation.js.map +1 -1
  21. data/vendor/assets/js/foundation.min.js +1 -1
  22. data/vendor/assets/js/foundation.min.js.map +1 -1
  23. data/vendor/assets/js/plugins/foundation.abide.js +238 -344
  24. data/vendor/assets/js/plugins/foundation.abide.js.map +1 -1
  25. data/vendor/assets/js/plugins/foundation.abide.min.js +1 -1
  26. data/vendor/assets/js/plugins/foundation.abide.min.js.map +1 -1
  27. data/vendor/assets/js/plugins/foundation.accordion.js +197 -275
  28. data/vendor/assets/js/plugins/foundation.accordion.js.map +1 -1
  29. data/vendor/assets/js/plugins/foundation.accordion.min.js +1 -1
  30. data/vendor/assets/js/plugins/foundation.accordion.min.js.map +1 -1
  31. data/vendor/assets/js/plugins/foundation.accordionMenu.js +174 -260
  32. data/vendor/assets/js/plugins/foundation.accordionMenu.js.map +1 -1
  33. data/vendor/assets/js/plugins/foundation.accordionMenu.min.js +1 -1
  34. data/vendor/assets/js/plugins/foundation.accordionMenu.min.js.map +1 -1
  35. data/vendor/assets/js/plugins/foundation.core.js +308 -447
  36. data/vendor/assets/js/plugins/foundation.core.js.map +1 -1
  37. data/vendor/assets/js/plugins/foundation.core.min.js +1 -1
  38. data/vendor/assets/js/plugins/foundation.core.min.js.map +1 -1
  39. data/vendor/assets/js/plugins/foundation.drilldown.js +258 -358
  40. data/vendor/assets/js/plugins/foundation.drilldown.js.map +1 -1
  41. data/vendor/assets/js/plugins/foundation.drilldown.min.js +1 -1
  42. data/vendor/assets/js/plugins/foundation.drilldown.min.js.map +1 -1
  43. data/vendor/assets/js/plugins/foundation.dropdown.js +289 -457
  44. data/vendor/assets/js/plugins/foundation.dropdown.js.map +1 -1
  45. data/vendor/assets/js/plugins/foundation.dropdown.min.js +1 -1
  46. data/vendor/assets/js/plugins/foundation.dropdown.min.js.map +1 -1
  47. data/vendor/assets/js/plugins/foundation.dropdownMenu.js +246 -346
  48. data/vendor/assets/js/plugins/foundation.dropdownMenu.js.map +1 -1
  49. data/vendor/assets/js/plugins/foundation.dropdownMenu.min.js +1 -1
  50. data/vendor/assets/js/plugins/foundation.dropdownMenu.min.js.map +1 -1
  51. data/vendor/assets/js/plugins/foundation.equalizer.js +178 -261
  52. data/vendor/assets/js/plugins/foundation.equalizer.js.map +1 -1
  53. data/vendor/assets/js/plugins/foundation.equalizer.min.js +1 -1
  54. data/vendor/assets/js/plugins/foundation.equalizer.min.js.map +1 -1
  55. data/vendor/assets/js/plugins/foundation.interchange.js +227 -326
  56. data/vendor/assets/js/plugins/foundation.interchange.js.map +1 -1
  57. data/vendor/assets/js/plugins/foundation.interchange.min.js +1 -1
  58. data/vendor/assets/js/plugins/foundation.interchange.min.js.map +1 -1
  59. data/vendor/assets/js/plugins/foundation.magellan.js +225 -336
  60. data/vendor/assets/js/plugins/foundation.magellan.js.map +1 -1
  61. data/vendor/assets/js/plugins/foundation.magellan.min.js +1 -1
  62. data/vendor/assets/js/plugins/foundation.magellan.min.js.map +1 -1
  63. data/vendor/assets/js/plugins/foundation.offcanvas.js +326 -471
  64. data/vendor/assets/js/plugins/foundation.offcanvas.js.map +1 -1
  65. data/vendor/assets/js/plugins/foundation.offcanvas.min.js +1 -1
  66. data/vendor/assets/js/plugins/foundation.offcanvas.min.js.map +1 -1
  67. data/vendor/assets/js/plugins/foundation.orbit.js +244 -347
  68. data/vendor/assets/js/plugins/foundation.orbit.js.map +1 -1
  69. data/vendor/assets/js/plugins/foundation.orbit.min.js +1 -1
  70. data/vendor/assets/js/plugins/foundation.orbit.min.js.map +1 -1
  71. data/vendor/assets/js/plugins/foundation.responsiveAccordionTabs.js +203 -278
  72. data/vendor/assets/js/plugins/foundation.responsiveAccordionTabs.js.map +1 -1
  73. data/vendor/assets/js/plugins/foundation.responsiveAccordionTabs.min.js +1 -1
  74. data/vendor/assets/js/plugins/foundation.responsiveAccordionTabs.min.js.map +1 -1
  75. data/vendor/assets/js/plugins/foundation.responsiveMenu.js +205 -255
  76. data/vendor/assets/js/plugins/foundation.responsiveMenu.js.map +1 -1
  77. data/vendor/assets/js/plugins/foundation.responsiveMenu.min.js +1 -1
  78. data/vendor/assets/js/plugins/foundation.responsiveMenu.min.js.map +1 -1
  79. data/vendor/assets/js/plugins/foundation.responsiveToggle.js +170 -226
  80. data/vendor/assets/js/plugins/foundation.responsiveToggle.js.map +1 -1
  81. data/vendor/assets/js/plugins/foundation.responsiveToggle.min.js +1 -1
  82. data/vendor/assets/js/plugins/foundation.responsiveToggle.min.js.map +1 -1
  83. data/vendor/assets/js/plugins/foundation.reveal.js +284 -444
  84. data/vendor/assets/js/plugins/foundation.reveal.js.map +1 -1
  85. data/vendor/assets/js/plugins/foundation.reveal.min.js +1 -1
  86. data/vendor/assets/js/plugins/foundation.reveal.min.js.map +1 -1
  87. data/vendor/assets/js/plugins/foundation.slider.js +322 -483
  88. data/vendor/assets/js/plugins/foundation.slider.js.map +1 -1
  89. data/vendor/assets/js/plugins/foundation.slider.min.js +1 -1
  90. data/vendor/assets/js/plugins/foundation.slider.min.js.map +1 -1
  91. data/vendor/assets/js/plugins/foundation.smoothScroll.js +138 -188
  92. data/vendor/assets/js/plugins/foundation.smoothScroll.js.map +1 -1
  93. data/vendor/assets/js/plugins/foundation.smoothScroll.min.js +1 -1
  94. data/vendor/assets/js/plugins/foundation.smoothScroll.min.js.map +1 -1
  95. data/vendor/assets/js/plugins/foundation.sticky.js +253 -394
  96. data/vendor/assets/js/plugins/foundation.sticky.js.map +1 -1
  97. data/vendor/assets/js/plugins/foundation.sticky.min.js +1 -1
  98. data/vendor/assets/js/plugins/foundation.sticky.min.js.map +1 -1
  99. data/vendor/assets/js/plugins/foundation.tabs.js +228 -317
  100. data/vendor/assets/js/plugins/foundation.tabs.js.map +1 -1
  101. data/vendor/assets/js/plugins/foundation.tabs.min.js +1 -1
  102. data/vendor/assets/js/plugins/foundation.tabs.min.js.map +1 -1
  103. data/vendor/assets/js/plugins/foundation.toggler.js +207 -294
  104. data/vendor/assets/js/plugins/foundation.toggler.js.map +1 -1
  105. data/vendor/assets/js/plugins/foundation.toggler.min.js +1 -1
  106. data/vendor/assets/js/plugins/foundation.toggler.min.js.map +1 -1
  107. data/vendor/assets/js/plugins/foundation.tooltip.js +275 -434
  108. data/vendor/assets/js/plugins/foundation.tooltip.js.map +1 -1
  109. data/vendor/assets/js/plugins/foundation.tooltip.min.js +1 -1
  110. data/vendor/assets/js/plugins/foundation.tooltip.min.js.map +1 -1
  111. data/vendor/assets/js/plugins/foundation.util.box.js +130 -186
  112. data/vendor/assets/js/plugins/foundation.util.box.js.map +1 -1
  113. data/vendor/assets/js/plugins/foundation.util.box.min.js +1 -1
  114. data/vendor/assets/js/plugins/foundation.util.box.min.js.map +1 -1
  115. data/vendor/assets/js/plugins/foundation.util.imageLoader.js +110 -150
  116. data/vendor/assets/js/plugins/foundation.util.imageLoader.js.map +1 -1
  117. data/vendor/assets/js/plugins/foundation.util.imageLoader.min.js +1 -1
  118. data/vendor/assets/js/plugins/foundation.util.imageLoader.min.js.map +1 -1
  119. data/vendor/assets/js/plugins/foundation.util.keyboard.js +157 -172
  120. data/vendor/assets/js/plugins/foundation.util.keyboard.js.map +1 -1
  121. data/vendor/assets/js/plugins/foundation.util.keyboard.min.js +1 -1
  122. data/vendor/assets/js/plugins/foundation.util.keyboard.min.js.map +1 -1
  123. data/vendor/assets/js/plugins/foundation.util.mediaQuery.js +167 -233
  124. data/vendor/assets/js/plugins/foundation.util.mediaQuery.js.map +1 -1
  125. data/vendor/assets/js/plugins/foundation.util.mediaQuery.min.js +1 -1
  126. data/vendor/assets/js/plugins/foundation.util.mediaQuery.min.js.map +1 -1
  127. data/vendor/assets/js/plugins/foundation.util.motion.js +123 -161
  128. data/vendor/assets/js/plugins/foundation.util.motion.js.map +1 -1
  129. data/vendor/assets/js/plugins/foundation.util.motion.min.js +1 -1
  130. data/vendor/assets/js/plugins/foundation.util.motion.min.js.map +1 -1
  131. data/vendor/assets/js/plugins/foundation.util.nest.js +123 -160
  132. data/vendor/assets/js/plugins/foundation.util.nest.js.map +1 -1
  133. data/vendor/assets/js/plugins/foundation.util.nest.min.js +1 -1
  134. data/vendor/assets/js/plugins/foundation.util.nest.min.js.map +1 -1
  135. data/vendor/assets/js/plugins/foundation.util.timer.js +116 -171
  136. data/vendor/assets/js/plugins/foundation.util.timer.js.map +1 -1
  137. data/vendor/assets/js/plugins/foundation.util.timer.min.js +1 -1
  138. data/vendor/assets/js/plugins/foundation.util.timer.min.js.map +1 -1
  139. data/vendor/assets/js/plugins/foundation.util.touch.js +172 -228
  140. data/vendor/assets/js/plugins/foundation.util.touch.js.map +1 -1
  141. data/vendor/assets/js/plugins/foundation.util.touch.min.js +1 -1
  142. data/vendor/assets/js/plugins/foundation.util.touch.min.js.map +1 -1
  143. data/vendor/assets/js/plugins/foundation.util.triggers.js +158 -222
  144. data/vendor/assets/js/plugins/foundation.util.triggers.js.map +1 -1
  145. data/vendor/assets/js/plugins/foundation.util.triggers.min.js +1 -1
  146. data/vendor/assets/js/plugins/foundation.util.triggers.min.js.map +1 -1
  147. data/vendor/assets/scss/_global.scss +18 -5
  148. data/vendor/assets/scss/components/_accordion-menu.scss +2 -2
  149. data/vendor/assets/scss/components/_badge.scss +1 -1
  150. data/vendor/assets/scss/components/_breadcrumbs.scss +2 -1
  151. data/vendor/assets/scss/components/_button-group.scss +13 -8
  152. data/vendor/assets/scss/components/_button.scss +13 -13
  153. data/vendor/assets/scss/components/_callout.scss +2 -2
  154. data/vendor/assets/scss/components/_close-button.scss +5 -4
  155. data/vendor/assets/scss/components/_dropdown-menu.scss +1 -1
  156. data/vendor/assets/scss/components/_label.scss +1 -1
  157. data/vendor/assets/scss/components/_menu.scss +54 -19
  158. data/vendor/assets/scss/components/_off-canvas.scss +18 -16
  159. data/vendor/assets/scss/components/_orbit.scss +3 -3
  160. data/vendor/assets/scss/components/_pagination.scss +1 -1
  161. data/vendor/assets/scss/components/_progress-bar.scss +1 -1
  162. data/vendor/assets/scss/components/_responsive-embed.scss +1 -1
  163. data/vendor/assets/scss/components/_reveal.scss +8 -3
  164. data/vendor/assets/scss/components/_slider.scss +5 -2
  165. data/vendor/assets/scss/components/_switch.scss +25 -2
  166. data/vendor/assets/scss/components/_table.scss +8 -7
  167. data/vendor/assets/scss/components/_tabs.scss +2 -2
  168. data/vendor/assets/scss/components/_top-bar.scss +7 -5
  169. data/vendor/assets/scss/components/_visibility.scss +45 -2
  170. data/vendor/assets/scss/forms/_label.scss +2 -1
  171. data/vendor/assets/scss/forms/_progress.scss +1 -1
  172. data/vendor/assets/scss/forms/_range.scss +1 -1
  173. data/vendor/assets/scss/forms/_select.scss +5 -4
  174. data/vendor/assets/scss/forms/_text.scss +2 -2
  175. data/vendor/assets/scss/foundation.scss +1 -1
  176. data/vendor/assets/scss/grid/_classes.scss +1 -1
  177. data/vendor/assets/scss/grid/_column.scss +3 -2
  178. data/vendor/assets/scss/grid/_flex-grid.scss +7 -6
  179. data/vendor/assets/scss/grid/_gutter.scss +1 -1
  180. data/vendor/assets/scss/grid/_layout.scss +5 -5
  181. data/vendor/assets/scss/grid/_position.scss +4 -4
  182. data/vendor/assets/scss/grid/_row.scss +1 -1
  183. data/vendor/assets/scss/motion-ui/util/_animation.scss +1 -1
  184. data/vendor/assets/scss/motion-ui/util/_series.scss +1 -1
  185. data/vendor/assets/scss/motion-ui/util/_unit.scss +54 -1
  186. data/vendor/assets/scss/prototype/_border-none.scss +1 -1
  187. data/vendor/assets/scss/prototype/_font-styling.scss +2 -2
  188. data/vendor/assets/scss/prototype/_overflow.scss +9 -0
  189. data/vendor/assets/scss/prototype/_rotate.scss +7 -5
  190. data/vendor/assets/scss/prototype/_separator.scss +5 -5
  191. data/vendor/assets/scss/prototype/_shadow.scss +1 -2
  192. data/vendor/assets/scss/prototype/_spacing.scss +33 -33
  193. data/vendor/assets/scss/prototype/_text-transformation.scss +3 -3
  194. data/vendor/assets/scss/settings/_settings.scss +32 -28
  195. data/vendor/assets/scss/typography/_base.scss +6 -6
  196. data/vendor/assets/scss/typography/_helpers.scss +10 -2
  197. data/vendor/assets/scss/typography/_print.scss +2 -2
  198. data/vendor/assets/scss/util/_breakpoint.scss +21 -18
  199. data/vendor/assets/scss/util/_color.scss +20 -8
  200. data/vendor/assets/scss/util/_direction.scss +1 -1
  201. data/vendor/assets/scss/util/_flex.scss +1 -1
  202. data/vendor/assets/scss/util/_math.scss +61 -9
  203. data/vendor/assets/scss/util/_mixins.scss +18 -14
  204. data/vendor/assets/scss/util/_selector.scss +1 -15
  205. data/vendor/assets/scss/util/_typography.scss +6 -6
  206. data/vendor/assets/scss/util/_unit.scss +14 -8
  207. data/vendor/assets/scss/util/_value.scss +3 -18
  208. data/vendor/assets/scss/vendor/normalize.scss +19 -2
  209. data/vendor/assets/scss/xy-grid/_cell.scss +16 -5
  210. data/vendor/assets/scss/xy-grid/_classes.scss +8 -8
  211. data/vendor/assets/scss/xy-grid/_frame.scss +12 -0
  212. data/vendor/assets/scss/xy-grid/_grid.scss +2 -2
  213. data/vendor/assets/scss/xy-grid/_gutters.scss +2 -2
  214. data/vendor/assets/scss/xy-grid/_layout.scss +1 -1
  215. data/vendor/assets/scss/xy-grid/_position.scss +12 -7
  216. data/vendor/assets/scss/xy-grid/_xy-grid.scss +2 -2
  217. metadata +21 -19
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap","webpack:///./js/entries/foundation.js","webpack:///./js/foundation.abide.js","webpack:///./js/foundation.accordion.js","webpack:///./js/foundation.accordionMenu.js","webpack:///./js/foundation.core.js","webpack:///./js/foundation.core.plugin.js","webpack:///./js/foundation.core.utils.js","webpack:///./js/foundation.drilldown.js","webpack:///./js/foundation.dropdown.js","webpack:///./js/foundation.dropdownMenu.js","webpack:///./js/foundation.equalizer.js","webpack:///./js/foundation.interchange.js","webpack:///./js/foundation.magellan.js","webpack:///./js/foundation.offcanvas.js","webpack:///./js/foundation.orbit.js","webpack:///./js/foundation.positionable.js","webpack:///./js/foundation.responsiveAccordionTabs.js","webpack:///./js/foundation.responsiveMenu.js","webpack:///./js/foundation.responsiveToggle.js","webpack:///./js/foundation.reveal.js","webpack:///./js/foundation.slider.js","webpack:///./js/foundation.smoothScroll.js","webpack:///./js/foundation.sticky.js","webpack:///./js/foundation.tabs.js","webpack:///./js/foundation.toggler.js","webpack:///./js/foundation.tooltip.js","webpack:///./js/foundation.util.box.js","webpack:///./js/foundation.util.imageLoader.js","webpack:///./js/foundation.util.keyboard.js","webpack:///./js/foundation.util.mediaQuery.js","webpack:///./js/foundation.util.motion.js","webpack:///./js/foundation.util.nest.js","webpack:///./js/foundation.util.timer.js","webpack:///./js/foundation.util.touch.js","webpack:///./js/foundation.util.triggers.js","webpack:///external {\"root\":[\"jQuery\"],\"amd\":\"jquery\",\"commonjs\":\"jquery\",\"commonjs2\":\"jquery\"}"],"names":["Foundation","addToJquery","$","rtl","CoreUtils","GetYoDigits","transitionend","RegExpEscape","onLoad","Box","onImagesLoaded","Keyboard","MediaQuery","Motion","Move","Nest","Timer","Touch","init","Triggers","_init","plugin","Abide","Accordion","AccordionMenu","Drilldown","Dropdown","DropdownMenu","Equalizer","Interchange","Magellan","OffCanvas","Orbit","ResponsiveMenu","ResponsiveToggle","Reveal","Slider","SmoothScroll","Sticky","Tabs","Toggler","Tooltip","ResponsiveAccordionTabs","element","options","$element","extend","defaults","data","isEnabled","formnovalidate","className","$inputs","merge","find","not","$submits","$globalErrors","a11yAttributes","each","i","input","addA11yAttributes","error","addGlobalErrorA11yAttributes","_events","off","on","resetForm","validateForm","e","key","preventDefault","target","getAttribute","submit","validateOn","validateInput","liveValidate","validateOnBlur","length","$el","attr","isGood","type","checked","opt","val","failedValidators","id","$error","siblings","formErrorSelector","parent","add","forEach","v","$label","closest","$els","labels","map","el","findLabel","$formError","findFormError","addClass","labelErrorClass","formErrorClass","inputErrorClass","$errors","$labels","filter","first","errorId","elemId","label","end","a11yErrorLevel","groupName","findRadioLabels","$formErrors","removeClass","findCheckboxLabels","removeRadioErrorClasses","removeCheckboxErrorClasses","clearRequire","requiredCheck","validator","manageErrorClasses","_validationIsDisabled","is","validateRadio","push","validateCheckbox","validateText","required","split","validators","equalTo","goodToGo","message","dependentElements","_this","removeErrorClasses","addErrorClasses","trigger","acc","checkboxGroupName","initialized","noError","indexOf","elem","$elem","css","pattern","inputText","valid","patterns","hasOwnProperty","test","RegExp","$group","prop","minRequired","parseInt","clear","$form","opts","Plugin","alpha","alpha_numeric","integer","number","card","cvv","email","url","domain","datetime","date","time","dateISO","month_day_year","day_month_year","color","website","text","register","_isInitializing","$tabs","children","idx","$content","linkId","$initActive","_initialAnchor","prev","_openSingleTab","_checkDeepLink","anchor","window","location","hash","$anchor","$link","isOwnAnchor","hasClass","_closeAllTabs","deepLinkSmudge","offset","animate","scrollTop","top","deepLinkSmudgeOffset","deepLinkSmudgeDelay","deepLink","$tabContent","toggle","handleKey","next","$a","focus","multiExpand","previous","handled","$target","console","info","up","down","updateHistory","history","pushState","replaceState","_openTab","$targetItem","$othersItems","allowAllClosed","_closeTab","$activeContents","targetContentId","stop","slideDown","slideSpeed","slideUp","$activeTabs","Feather","multiOpen","$menuLinks","$sub","subId","isActive","parentLink","clone","prependTo","wrap","submenuToggle","after","submenuToggleText","initPanes","$submenu","$elements","$prevElement","$nextElement","eq","Math","max","min","parents","open","close","closeAll","hideAll","$targetBranch","parentsUntil","$othersActiveSubmenus","$submenus","$allmenus","detach","remove","Burn","FOUNDATION_VERSION","version","_plugins","_uuids","name","functionName","attrName","hyphenate","registerPlugin","pluginName","constructor","toLowerCase","uuid","unregisterPlugin","splice","removeAttr","removeData","reInit","plugins","isJQ","fns","plgs","p","foundation","Object","keys","err","reflow","addBack","option","_index","trim","parseValue","er","getFnName","method","$noJS","args","Array","prototype","slice","call","arguments","plugClass","apply","ReferenceError","TypeError","fn","util","throttle","func","delay","timer","context","setTimeout","Date","now","getTime","vendors","requestAnimationFrame","vp","cancelAnimationFrame","navigator","userAgent","lastTime","callback","nextTime","clearTimeout","performance","start","Function","bind","oThis","aArgs","fToBind","fNOP","fBound","concat","funcNameRegex","results","exec","toString","str","isNaN","parseFloat","replace","_setup","getPluginName","_destroy","obj","namespace","chars","charsLength","floor","random","transitions","document","createElement","transition","style","triggerHandler","handler","didLoad","readyState","eventType","cb","one","ignoreMousedisappear","ignoreLeaveWindow","ignoreReappear","leaveEventHandler","eLeave","rest","relatedTarget","leaveEventDebouncer","hasFocus","reenterEventHandler","eReenter","currentTarget","has","autoApplyClass","$submenuAnchors","$menuItems","$currentMenu","_prepareMenu","_registerEvents","_keyboardEvents","$menu","$back","backButtonPosition","append","backButton","prepend","_back","autoHeight","$wrapper","wrapper","animateHeight","_getMaxDims","_show","closeOnClick","$body","contains","_hideAll","_bindHandler","_scrollTop","_resize","$scrollTopElement","scrollTopElement","scrollPos","scrollTopOffset","animationDuration","animationEasing","_hide","calcHeight","height","parentSubMenu","autoFocus","$expandedSubmenus","index","_setHideSubMenuClasses","isLastChild","_setShowSubMenuClasses","blur","maxHeight","result","numOfElems","GetDimensions","getBoundingClientRect","width","unwrap","$id","$anchors","_setCurrentAnchor","parentClass","$parent","$currentAnchor","position","match","horizontalPosition","alignment","hasTouch","ontouchstart","_setPosition","forceFollow","hover","bodyData","whatinput","timeout","hoverDelay","hoverPane","visibleFocusableElements","findFocusable","body","$focusable","_addBodyHandler","trapFocus","releaseFocus","hide","Positionable","vOffset","hOffset","allowOverlap","allowBottomOverlap","subs","verticalClass","rightClass","Rtl","changed","parClass","handleClickFn","hasSub","hasClicked","clickOpen","stopImmediatePropagation","closeOnClickInside","disableHover","autoclose","closingTime","isTab","nextSibling","prevSibling","openSub","closeSub","functions","_isVertical","_isRtl","_removeBodyHandler","isItself","$sibs","ImNotTouchingYou","oldClass","$parentLi","$toClose","somethingToClose","$activeItem","eqId","$watched","hasNested","isNested","isOn","onResizeMeBound","_onResizeMe","onPostEqualizedBound","_onPostEqualized","imgs","tooSmall","equalizeOn","_checkMQ","_reflow","_pauseEvents","equalizeOnStack","_isStacked","equalizeByRow","getHeightsByRow","applyHeightByRow","getHeights","applyHeight","heights","len","offsetHeight","lastElTopOffset","groups","group","elOffsetTop","j","ln","get","groupsILength","lenJ","rules","currentPath","_parseOptions","_addBreakpoints","_generateRules","rule","matchMedia","query","matches","path","types","log","queries","SPECIAL_QUERIES","value","rulesList","join","nodeName","response","html","calcPoints","$targets","$links","$active","pageYOffset","documentElement","points","winHeight","round","innerHeight","clientHeight","docHeight","scrollHeight","$tar","pt","threshold","targetPoint","deepLinking","scrollToLoc","_updateActive","onLoadListener","arrival","_deepLinkScroll","loc","_inTransition","newScrollPos","isScrollingUp","activeIdx","visibleLinks","$oldActive","activeHash","isNewActive","isNewHash","activeClass","pathname","search","contentClasses","base","reveal","$lastTrigger","$triggers","nested","$sticky","isInCanvas","contentId","warn","contentOverlay","overlay","overlayPosition","setAttribute","$overlay","insertAfter","revealOnRegExp","revealClass","revealOnClass","isRevealed","revealOn","_setMQChecker","transitionTime","contentScroll","inCanvasFor","inCanvasOn","_checkInCanvas","_removeContentClasses","_handleKeyboard","atLeast","hasReveal","_","topVal","absoluteTopVal","stickyData","_addContentClasses","event","allowUp","allowDown","lastY","originalEvent","pageY","stopPropagation","hasAttribute","forceTo","scrollTo","_stopScrolling","_recordScrollable","_stopScrollPropagation","canvasFocus","_fixStickyElements","_unfixStickyElements","_reset","containerClass","$slides","slideClass","$images","initActive","useMUI","_prepareForOrbit","bullets","_loadBullets","autoPlay","geoSync","accessible","$bullets","boxOfBullets","duration","timerDelay","infinite","changeSlide","_setWrapperHeight","temp","counter","swipe","pauseOnHover","pause","navButtons","$controls","nextClass","prevClass","ltr","$slide","restart","show","_updateBullets","isLTR","chosenSlide","$curSlide","$firstSlide","$lastSlide","last","dirIn","dirOut","$newSlide","infiniteWrap","animateIn","animateOut","isPaused","$oldBullet","$othersBullets","$newBullet","activeStateDescriptor","spans","spanCountInOthersBullets","toArray","b","every","count","animInFromRight","animOutToRight","animInFromLeft","animOutToLeft","POSITIONS","VERTICAL_ALIGNMENTS","HORIZONTAL_ALIGNMENTS","ALIGNMENTS","nextItem","item","array","currentIdx","triedPositions","_getDefaultPosition","_getDefaultAlignment","originalPosition","originalAlignment","_alignmentsExhausted","_realign","_addTriedPosition","isExhausted","GetExplicitOffsets","_getVOffset","_getHOffset","minOverlap","minCoordinates","_positionsExhausted","overlap","OverlapArea","_reposition","MenuPlugins","tabs","cssClass","selectTab","accordion","storezfData","currentMq","currentRule","currentPlugin","rulesTree","ruleSize","rulePlugin","_getAllOptions","isEmptyObject","_checkMediaQueries","allOptions","dummyPlugin","tmpPlugin","keyKey","objObj","destroy","_changedZfMediaQueryHandler","matchedMq","_handleMarkup","toSet","fromString","$panels","tabsTitle","linkClass","tabsPanel","panelClass","$liHeads","$liHeadsA","display","visibility","appendTo","$tabsContent","$placeholder","tempValue","_target","dropdown","drilldown","targetID","$targetMenu","$toggler","animationIn","animationOut","_update","_updateMqHandler","toggleMenu","hideFor","cached","mq","current","fullScreen","_makeOverlay","additionalOverlayClasses","outerWidth","outerHeight","left","margin","_updatePosition","_handleState","$activeAnchor","activeElement","multipleOpened","_disableScroll","afterAnimation","_addGlobalClasses","focusableElements","showDelay","_addGlobalListeners","updateScrollbarClass","toggleClass","closeOnEsc","finishUp","hideDelay","_removeGlobalClasses","_enableScroll","resetOnClose","urlWithoutHash","title","inputs","handles","$handle","$input","$fill","vertical","disabled","disabledClass","binding","_setInitAttr","doubleSided","$handle2","$input2","setHandles","_setHandlePos","pctOfBar","percent","positionValueFunction","_logTransform","_powTransform","toFixed","baseLog","nonLinearBase","pow","$hndl","isDbl","h2Val","step","h1Val","vert","hOrW","lOrT","handleDim","elemDim","_pctOfBar","pxToMove","movement","decimal","_setValues","isLeftHndl","dim","handlePct","handlePos","initialStart","moveTime","changedDelay","initVal","initialEnd","hasVal","param","direction","eventOffset","pageX","barDim","windowScroll","scrollLeft","elemOffset","clientY","eventFromBar","barXY","offsetPct","_value","_adjustValue","firstHndlPos","absPosition","secndHndlPos","div","prev_val","next_val","_eventsForHandle","curHandle","handleChangeEvent","_handleEvent","keyCode","clickSelect","draggable","addTouch","_$handle","oldValue","newValue","decrease","increase","decrease_fast","increase_fast","invertVertical","frac","num","dir","clickPos","abs","_linkClickListener","_handleLinkClick","$loc","$container","wasWrapped","container","stickyClass","scrollCount","checkEvery","isStuck","containerHeight","elemHeight","_parsePoints","_setSizes","scroll","_calc","_removeSticky","topPoint","reverse","topAnchor","btm","btmAnchor","pts","breaks","place","scrollListener","canStick","_eventsHandler","_pauseListeners","checkSizes","bottomPoint","_setSticky","stickTo","mrgn","notStuckTo","isTop","stickToTop","anchorPt","anchorHeight","topOrBottom","stickyOn","newElemWidth","comp","getComputedStyle","pdngl","pdngr","dynamicHeight","newContainerHeight","_setBreakPoints","mTop","emCalc","marginTop","mBtm","marginBottom","bottom","em","fontSize","$tabTitles","linkActiveClass","matchHeight","_setHeight","anchorNoHash","_collapse","_addKeyHandler","_addClickHandler","_setHeightMqHandler","_handleTabChange","which","wrapOnKeys","historyHandled","activeCollapse","$oldTab","$tabLink","$targetContent","_collapseTab","panelActiveClass","$target_anchor","$activeTab","idStr","hashIdStr","panel","toggler","Error","$trigger","controls","containsId","_updateARIA","undefined","isClick","tipText","template","_buildTemplate","allowHtml","triggerClass","elementClassName","SVGElement","baseVal","tooltipWidth","tooltipHeight","templateClasses","tooltipClass","$template","showOn","fadeIn","fadeInDuration","fadeOut","fadeOutDuration","isFocus","disableForTouch","touchCloseText","lrOnly","tbOnly","ignoreBottom","eleDims","topOver","bottomOver","leftOver","rightOver","parDims","windowDims","sqrt","rect","parRect","parentNode","winRect","winY","winX","pageXOffset","parentDims","isOverflow","$eleDims","$anchorDims","leftVal","images","self","unloaded","complete","naturalWidth","singleImageLoaded","image","Image","events","me","src","keyCodes","commands","parseKey","String","fromCharCode","toUpperCase","shiftKey","ctrlKey","altKey","getKeyCodes","component","commandList","cmds","command","zfIsKeyHandled","returnValue","unhandled","componentName","$firstFocusable","$lastFocusable","kcs","k","kc","defaultQueries","landscape","portrait","retina","styleMedia","media","script","getElementsByTagName","head","appendChild","insertBefore","currentStyle","matchMedium","styleSheet","cssText","textContent","isInitialized","$meta","extractedStyles","namedQueries","parseStyleToObject","_getCurrentSize","_watcher","_reInit","size","only","upTo","nextSize","parts","bpSize","bpModifier","queryIndex","findIndex","q","_getQueryName","nextQuery","matched","newSize","currentSize","styleObject","reduce","ret","decodeURIComponent","isArray","initClasses","activeClasses","animation","anim","prog","move","ts","isIn","initClass","reset","offsetWidth","finish","transitionDuration","menu","items","subMenuClass","subItemClass","hasSubClass","applyAria","$item","nameSpace","remain","startPosX","startPosY","startTime","elapsedTime","startEvent","isMoving","didMoved","onTouchEnd","removeEventListener","onTouchMove","tapEvent","Event","spotSwipe","x","touches","y","dx","dy","moveThreshold","timeThreshold","assign","onTouchStart","addEventListener","teardown","SpotSwipe","enabled","special","setup","tap","noop","setupSpotSwipe","setupTouchHandler","handleTouch","changedTouches","eventTypes","touchstart","touchmove","touchend","simulatedEvent","MouseEvent","screenX","screenY","clientX","createEvent","initMouseEvent","dispatchEvent","MutationObserver","prefixes","triggers","Listeners","Basic","Global","Initializers","openListener","closeListener","toggleListener","closeableListener","toggleFocusListener","addOpenListener","addCloseListener","addToggleListener","addCloseableListener","addToggleFocusListener","resizeListener","$nodes","closeMeListener","pluginId","addClosemeListener","yetiBoxes","plugNames","listeners","debounceGlobalListener","debounce","listener","addResizeListener","addScrollListener","addMutationEventsListener","listeningElementsMutation","mutationRecordsList","attributeName","elementObserver","observe","attributes","childList","characterData","subtree","attributeFilter","addSimpleListeners","$document","addGlobalListeners","triggersInitialized","IHearYou"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kDAA0C,gCAAgC;AAC1E;AACA;;AAEA;AACA;AACA;AACA,gEAAwD,kBAAkB;AAC1E;AACA,yDAAiD,cAAc;AAC/D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAyC,iCAAiC;AAC1E,wHAAgH,mBAAmB,EAAE;AACrI;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;;AAGA;AACA;;;;;;;;;;;;;AClFA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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,SAAxC;AACArsC,UAAQ,CAACiqC,YAAT,CAAsBS,oBAAtB,CAA2C2B,SAA3C;AACArsC,UAAQ,CAACiqC,YAAT,CAAsBU,sBAAtB,CAA6C0B,SAA7C;AAED,CATD;;AAWArsC,QAAQ,CAACiqC,YAAT,CAAsBqC,kBAAtB,GAA2C,YAAW;AACpD,MAAID,SAAS,GAAGttC,6CAAC,CAACwX,QAAD,CAAjB;AACAvW,UAAQ,CAACiqC,YAAT,CAAsBwB,yBAAtB,CAAgDY,SAAhD;AACArsC,UAAQ,CAACiqC,YAAT,CAAsBsB,iBAAtB;AACAvrC,UAAQ,CAACiqC,YAAT,CAAsBuB,iBAAtB;AACAxrC,UAAQ,CAACiqC,YAAT,CAAsBe,kBAAtB;AACD,CAND;;AASAhrC,QAAQ,CAACD,IAAT,GAAgB,UAAUhB,CAAV,EAAaF,UAAb,EAAyB;AACvCQ,uEAAM,CAACN,CAAC,CAACuM,MAAD,CAAF,EAAY,YAAY;AAC5B,QAAIvM,CAAC,CAACwtC,mBAAF,KAA0B,IAA9B,EAAoC;AAClCvsC,cAAQ,CAACiqC,YAAT,CAAsBmC,kBAAtB;AACApsC,cAAQ,CAACiqC,YAAT,CAAsBqC,kBAAtB;AACAvtC,OAAC,CAACwtC,mBAAF,GAAwB,IAAxB;AACD;AACF,GANK,CAAN;;AAQA,MAAG1tC,UAAH,EAAe;AACbA,cAAU,CAACmB,QAAX,GAAsBA,QAAtB,CADa,CAEb;;AACAnB,cAAU,CAAC2tC,QAAX,GAAsBxsC,QAAQ,CAACiqC,YAAT,CAAsBqC,kBAA5C;AACD;AACF,CAdD;;;;;;;;;;;;;;;;;;;;;;;;;ACrPA,oD","file":"foundation.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"jquery\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"jquery\"], factory);\n\telse {\n\t\tvar a = typeof exports === 'object' ? factory(require(\"jquery\")) : factory(root[\"jQuery\"]);\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(window, function(__WEBPACK_EXTERNAL_MODULE_jquery__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","import $ from 'jquery';\n\nimport { Foundation } from '../foundation.core';\nimport * as CoreUtils from '../foundation.core.utils';\nimport { Box } from '../foundation.util.box'\nimport { onImagesLoaded } from '../foundation.util.imageLoader';\nimport { Keyboard } from '../foundation.util.keyboard';\nimport { MediaQuery } from '../foundation.util.mediaQuery';\nimport { Motion, Move } from '../foundation.util.motion';\nimport { Nest } from '../foundation.util.nest';\nimport { Timer } from '../foundation.util.timer';\nimport { Touch } from '../foundation.util.touch';\nimport { Triggers } from '../foundation.util.triggers';\nimport { Abide } from '../foundation.abide';\nimport { Accordion } from '../foundation.accordion';\nimport { AccordionMenu } from '../foundation.accordionMenu';\nimport { Drilldown } from '../foundation.drilldown';\nimport { Dropdown } from '../foundation.dropdown';\nimport { DropdownMenu } from '../foundation.dropdownMenu';\nimport { Equalizer } from '../foundation.equalizer';\nimport { Interchange } from '../foundation.interchange';\nimport { Magellan } from '../foundation.magellan';\nimport { OffCanvas } from '../foundation.offcanvas';\nimport { Orbit } from '../foundation.orbit';\nimport { ResponsiveMenu } from '../foundation.responsiveMenu';\nimport { ResponsiveToggle } from '../foundation.responsiveToggle';\nimport { Reveal } from '../foundation.reveal';\nimport { Slider } from '../foundation.slider';\nimport { SmoothScroll } from '../foundation.smoothScroll';\nimport { Sticky } from '../foundation.sticky';\nimport { Tabs } from '../foundation.tabs';\nimport { Toggler } from '../foundation.toggler';\nimport { Tooltip } from '../foundation.tooltip';\nimport { ResponsiveAccordionTabs } from '../foundation.responsiveAccordionTabs';\n\nFoundation.addToJquery($);\n\n// Add Foundation Utils to Foundation global namespace for backwards\n// compatibility.\nFoundation.rtl = CoreUtils.rtl;\nFoundation.GetYoDigits = CoreUtils.GetYoDigits;\nFoundation.transitionend = CoreUtils.transitionend;\nFoundation.RegExpEscape = CoreUtils.RegExpEscape;\nFoundation.onLoad = CoreUtils.onLoad;\n\nFoundation.Box = Box;\nFoundation.onImagesLoaded = onImagesLoaded;\nFoundation.Keyboard = Keyboard;\nFoundation.MediaQuery = MediaQuery;\nFoundation.Motion = Motion;\nFoundation.Move = Move;\nFoundation.Nest = Nest;\nFoundation.Timer = Timer;\n\n// Touch and Triggers previously were almost purely sede effect driven,\n// so no need to add it to Foundation, just init them.\nTouch.init($);\nTriggers.init($, Foundation);\nMediaQuery._init();\n\nFoundation.plugin(Abide, 'Abide');\nFoundation.plugin(Accordion, 'Accordion');\nFoundation.plugin(AccordionMenu, 'AccordionMenu');\nFoundation.plugin(Drilldown, 'Drilldown');\nFoundation.plugin(Dropdown, 'Dropdown');\nFoundation.plugin(DropdownMenu, 'DropdownMenu');\nFoundation.plugin(Equalizer, 'Equalizer');\nFoundation.plugin(Interchange, 'Interchange');\nFoundation.plugin(Magellan, 'Magellan');\nFoundation.plugin(OffCanvas, 'OffCanvas');\nFoundation.plugin(Orbit, 'Orbit');\nFoundation.plugin(ResponsiveMenu, 'ResponsiveMenu');\nFoundation.plugin(ResponsiveToggle, 'ResponsiveToggle');\nFoundation.plugin(Reveal, 'Reveal');\nFoundation.plugin(Slider, 'Slider');\nFoundation.plugin(SmoothScroll, 'SmoothScroll');\nFoundation.plugin(Sticky, 'Sticky');\nFoundation.plugin(Tabs, 'Tabs');\nFoundation.plugin(Toggler, 'Toggler');\nFoundation.plugin(Tooltip, 'Tooltip');\nFoundation.plugin(ResponsiveAccordionTabs, 'ResponsiveAccordionTabs');\n\nexport {\n Foundation,\n CoreUtils,\n Box,\n onImagesLoaded,\n Keyboard,\n MediaQuery,\n Motion,\n Nest,\n Timer,\n Touch,\n Triggers,\n Abide,\n Accordion,\n AccordionMenu,\n Drilldown,\n Dropdown,\n DropdownMenu,\n Equalizer,\n Interchange,\n Magellan,\n OffCanvas,\n Orbit,\n ResponsiveMenu,\n ResponsiveToggle,\n Reveal,\n Slider,\n SmoothScroll,\n Sticky,\n Tabs,\n Toggler,\n Tooltip,\n ResponsiveAccordionTabs\n}\n\nexport default Foundation;\n\n","'use strict';\n\nimport $ from 'jquery';\nimport { Plugin } from './foundation.core.plugin';\nimport { GetYoDigits } from './foundation.core.utils';\n\n/**\n * Abide module.\n * @module foundation.abide\n */\n\nclass Abide extends Plugin {\n /**\n * Creates a new instance of Abide.\n * @class\n * @name Abide\n * @fires Abide#init\n * @param {Object} element - jQuery object to add the trigger to.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element, options = {}) {\n this.$element = element;\n this.options = $.extend(true, {}, Abide.defaults, this.$element.data(), options);\n this.isEnabled = true;\n this.formnovalidate = null;\n\n this.className = 'Abide'; // ie9 back compat\n this._init();\n }\n\n /**\n * Initializes the Abide plugin and calls functions to get Abide functioning on load.\n * @private\n */\n _init() {\n this.$inputs = $.merge( // Consider as input to validate:\n this.$element.find('input').not('[type=\"submit\"]'), // * all input fields expect submit\n this.$element.find('textarea, select') // * all textareas and select fields\n );\n this.$submits = this.$element.find('[type=\"submit\"]');\n const $globalErrors = this.$element.find('[data-abide-error]');\n\n // Add a11y attributes to all fields\n if (this.options.a11yAttributes) {\n this.$inputs.each((i, input) => this.addA11yAttributes($(input)));\n $globalErrors.each((i, error) => this.addGlobalErrorA11yAttributes($(error)));\n }\n\n this._events();\n }\n\n /**\n * Initializes events for Abide.\n * @private\n */\n _events() {\n this.$element.off('.abide')\n .on('reset.zf.abide', () => {\n this.resetForm();\n })\n .on('submit.zf.abide', () => {\n return this.validateForm();\n });\n\n this.$submits\n .off('click.zf.abide keydown.zf.abide')\n .on('click.zf.abide keydown.zf.abide', (e) => {\n if (!e.key || (e.key === ' ' || e.key === 'Enter')) {\n e.preventDefault();\n this.formnovalidate = e.target.getAttribute('formnovalidate') !== null;\n this.$element.submit();\n }\n });\n\n if (this.options.validateOn === 'fieldChange') {\n this.$inputs\n .off('change.zf.abide')\n .on('change.zf.abide', (e) => {\n this.validateInput($(e.target));\n });\n }\n\n if (this.options.liveValidate) {\n this.$inputs\n .off('input.zf.abide')\n .on('input.zf.abide', (e) => {\n this.validateInput($(e.target));\n });\n }\n\n if (this.options.validateOnBlur) {\n this.$inputs\n .off('blur.zf.abide')\n .on('blur.zf.abide', (e) => {\n this.validateInput($(e.target));\n });\n }\n }\n\n /**\n * Calls necessary functions to update Abide upon DOM change\n * @private\n */\n _reflow() {\n this._init();\n }\n\n /**\n * Checks whether the submitted form should be validated or not, consodering formnovalidate and isEnabled\n * @returns {Boolean}\n * @private\n */\n _validationIsDisabled() {\n if (this.isEnabled === false) { // whole validation disabled\n return true;\n } else if (typeof this.formnovalidate === 'boolean') { // triggered by $submit\n return this.formnovalidate;\n }\n // triggered by Enter in non-submit input\n return this.$submits.length ? this.$submits[0].getAttribute('formnovalidate') !== null : false;\n }\n\n /**\n * Enables the whole validation\n */\n enableValidation() {\n this.isEnabled = true;\n }\n\n /**\n * Disables the whole validation\n */\n disableValidation() {\n this.isEnabled = false;\n }\n\n /**\n * Checks whether or not a form element has the required attribute and if it's checked or not\n * @param {Object} element - jQuery object to check for required attribute\n * @returns {Boolean} Boolean value depends on whether or not attribute is checked or empty\n */\n requiredCheck($el) {\n if (!$el.attr('required')) return true;\n\n var isGood = true;\n\n switch ($el[0].type) {\n case 'checkbox':\n isGood = $el[0].checked;\n break;\n\n case 'select':\n case 'select-one':\n case 'select-multiple':\n var opt = $el.find('option:selected');\n if (!opt.length || !opt.val()) isGood = false;\n break;\n\n default:\n if (!$el.val() || !$el.val().length) isGood = false;\n }\n\n return isGood;\n }\n\n /**\n * Get:\n * - Based on $el, the first element(s) corresponding to `formErrorSelector` in this order:\n * 1. The element's direct sibling('s).\n * 2. The element's parent's children.\n * - Element(s) with the attribute `[data-form-error-for]` set with the element's id.\n *\n * This allows for multiple form errors per input, though if none are found, no form errors will be shown.\n *\n * @param {Object} $el - jQuery object to use as reference to find the form error selector.\n * @param {String[]} [failedValidators] - List of failed validators.\n * @returns {Object} jQuery object with the selector.\n */\n findFormError($el, failedValidators) {\n var id = $el.length ? $el[0].id : '';\n var $error = $el.siblings(this.options.formErrorSelector);\n\n if (!$error.length) {\n $error = $el.parent().find(this.options.formErrorSelector);\n }\n\n if (id) {\n $error = $error.add(this.$element.find(`[data-form-error-for=\"${id}\"]`));\n }\n\n if (!!failedValidators) {\n $error = $error.not('[data-form-error-on]')\n\n failedValidators.forEach((v) => {\n $error = $error.add($el.siblings(`[data-form-error-on=\"${v}\"]`));\n $error = $error.add(this.$element.find(`[data-form-error-for=\"${id}\"][data-form-error-on=\"${v}\"]`));\n });\n }\n\n return $error;\n }\n\n /**\n * Get the first element in this order:\n * 2. The <label> with the attribute `[for=\"someInputId\"]`\n * 3. The `.closest()` <label>\n *\n * @param {Object} $el - jQuery object to check for required attribute\n * @returns {Boolean} Boolean value depends on whether or not attribute is checked or empty\n */\n findLabel($el) {\n var id = $el[0].id;\n var $label = this.$element.find(`label[for=\"${id}\"]`);\n\n if (!$label.length) {\n return $el.closest('label');\n }\n\n return $label;\n }\n\n /**\n * Get the set of labels associated with a set of radio els in this order\n * 2. The <label> with the attribute `[for=\"someInputId\"]`\n * 3. The `.closest()` <label>\n *\n * @param {Object} $el - jQuery object to check for required attribute\n * @returns {Boolean} Boolean value depends on whether or not attribute is checked or empty\n */\n findRadioLabels($els) {\n var labels = $els.map((i, el) => {\n var id = el.id;\n var $label = this.$element.find(`label[for=\"${id}\"]`);\n\n if (!$label.length) {\n $label = $(el).closest('label');\n }\n return $label[0];\n });\n\n return $(labels);\n }\n\n /**\n * Get the set of labels associated with a set of checkbox els in this order\n * 2. The <label> with the attribute `[for=\"someInputId\"]`\n * 3. The `.closest()` <label>\n *\n * @param {Object} $el - jQuery object to check for required attribute\n * @returns {Boolean} Boolean value depends on whether or not attribute is checked or empty\n */\n findCheckboxLabels($els) {\n var labels = $els.map((i, el) => {\n var id = el.id;\n var $label = this.$element.find(`label[for=\"${id}\"]`);\n\n if (!$label.length) {\n $label = $(el).closest('label');\n }\n return $label[0];\n });\n\n return $(labels);\n }\n\n /**\n * Adds the CSS error class as specified by the Abide settings to the label, input, and the form\n * @param {Object} $el - jQuery object to add the class to\n * @param {String[]} [failedValidators] - List of failed validators.\n */\n addErrorClasses($el, failedValidators) {\n var $label = this.findLabel($el);\n var $formError = this.findFormError($el, failedValidators);\n\n if ($label.length) {\n $label.addClass(this.options.labelErrorClass);\n }\n\n if ($formError.length) {\n $formError.addClass(this.options.formErrorClass);\n }\n\n $el.addClass(this.options.inputErrorClass).attr({\n 'data-invalid': '',\n 'aria-invalid': true\n });\n }\n\n /**\n * Adds [for] and [role=alert] attributes to all form error targetting $el,\n * and [aria-describedby] attribute to $el toward the first form error.\n * @param {Object} $el - jQuery object\n */\n addA11yAttributes($el) {\n let $errors = this.findFormError($el);\n let $labels = $errors.filter('label');\n let $error = $errors.first();\n if (!$errors.length) return;\n\n // Set [aria-describedby] on the input toward the first form error if it is not set\n if (typeof $el.attr('aria-describedby') === 'undefined') {\n // Get the first error ID or create one\n let errorId = $error.attr('id');\n if (typeof errorId === 'undefined') {\n errorId = GetYoDigits(6, 'abide-error');\n $error.attr('id', errorId);\n }\n\n $el.attr('aria-describedby', errorId);\n }\n\n if ($labels.filter('[for]').length < $labels.length) {\n // Get the input ID or create one\n let elemId = $el.attr('id');\n if (typeof elemId === 'undefined') {\n elemId = GetYoDigits(6, 'abide-input');\n $el.attr('id', elemId);\n }\n\n // For each label targeting $el, set [for] if it is not set.\n $labels.each((i, label) => {\n const $label = $(label);\n if (typeof $label.attr('for') === 'undefined')\n $label.attr('for', elemId);\n });\n }\n\n // For each error targeting $el, set [role=alert] if it is not set.\n $errors.each((i, label) => {\n const $label = $(label);\n if (typeof $label.attr('role') === 'undefined')\n $label.attr('role', 'alert');\n }).end();\n }\n\n /**\n * Adds [aria-live] attribute to the given global form error $el.\n * @param {Object} $el - jQuery object to add the attribute to\n */\n addGlobalErrorA11yAttributes($el) {\n if (typeof $el.attr('aria-live') === 'undefined')\n $el.attr('aria-live', this.options.a11yErrorLevel);\n }\n\n /**\n * Remove CSS error classes etc from an entire radio button group\n * @param {String} groupName - A string that specifies the name of a radio button group\n *\n */\n removeRadioErrorClasses(groupName) {\n var $els = this.$element.find(`:radio[name=\"${groupName}\"]`);\n var $labels = this.findRadioLabels($els);\n var $formErrors = this.findFormError($els);\n\n if ($labels.length) {\n $labels.removeClass(this.options.labelErrorClass);\n }\n\n if ($formErrors.length) {\n $formErrors.removeClass(this.options.formErrorClass);\n }\n\n $els.removeClass(this.options.inputErrorClass).attr({\n 'data-invalid': null,\n 'aria-invalid': null\n });\n\n }\n\n /**\n * Remove CSS error classes etc from an entire checkbox group\n * @param {String} groupName - A string that specifies the name of a checkbox group\n *\n */\n removeCheckboxErrorClasses(groupName) {\n var $els = this.$element.find(`:checkbox[name=\"${groupName}\"]`);\n var $labels = this.findCheckboxLabels($els);\n var $formErrors = this.findFormError($els);\n\n if ($labels.length) {\n $labels.removeClass(this.options.labelErrorClass);\n }\n\n if ($formErrors.length) {\n $formErrors.removeClass(this.options.formErrorClass);\n }\n\n $els.removeClass(this.options.inputErrorClass).attr({\n 'data-invalid': null,\n 'aria-invalid': null\n });\n\n }\n\n /**\n * Removes CSS error class as specified by the Abide settings from the label, input, and the form\n * @param {Object} $el - jQuery object to remove the class from\n */\n removeErrorClasses($el) {\n // radios need to clear all of the els\n if ($el[0].type == 'radio') {\n return this.removeRadioErrorClasses($el.attr('name'));\n }\n // checkboxes need to clear all of the els\n else if ($el[0].type == 'checkbox') {\n return this.removeCheckboxErrorClasses($el.attr('name'));\n }\n\n var $label = this.findLabel($el);\n var $formError = this.findFormError($el);\n\n if ($label.length) {\n $label.removeClass(this.options.labelErrorClass);\n }\n\n if ($formError.length) {\n $formError.removeClass(this.options.formErrorClass);\n }\n\n $el.removeClass(this.options.inputErrorClass).attr({\n 'data-invalid': null,\n 'aria-invalid': null\n });\n }\n\n /**\n * Goes through a form to find inputs and proceeds to validate them in ways specific to their type.\n * Ignores inputs with data-abide-ignore, type=\"hidden\" or disabled attributes set\n * @fires Abide#invalid\n * @fires Abide#valid\n * @param {Object} element - jQuery object to validate, should be an HTML input\n * @returns {Boolean} goodToGo - If the input is valid or not.\n */\n validateInput($el) {\n var clearRequire = this.requiredCheck($el),\n validator = $el.attr('data-validator'),\n failedValidators = [],\n manageErrorClasses = true;\n\n // skip validation if disabled\n if (this._validationIsDisabled()) {\n return true;\n }\n\n // don't validate ignored inputs or hidden inputs or disabled inputs\n if ($el.is('[data-abide-ignore]') || $el.is('[type=\"hidden\"]') || $el.is('[disabled]')) {\n return true;\n }\n\n switch ($el[0].type) {\n case 'radio':\n this.validateRadio($el.attr('name')) || failedValidators.push('required');\n break;\n\n case 'checkbox':\n this.validateCheckbox($el.attr('name')) || failedValidators.push('required');\n // validateCheckbox() adds/removes error classes\n manageErrorClasses = false;\n break;\n\n case 'select':\n case 'select-one':\n case 'select-multiple':\n clearRequire || failedValidators.push('required');\n break;\n\n default:\n clearRequire || failedValidators.push('required');\n this.validateText($el) || failedValidators.push('pattern');\n }\n\n if (validator) {\n const required = $el.attr('required') ? true : false;\n\n validator.split(' ').forEach((v) => {\n this.options.validators[v]($el, required, $el.parent()) || failedValidators.push(v);\n });\n }\n\n if ($el.attr('data-equalto')) {\n this.options.validators.equalTo($el) || failedValidators.push('equalTo');\n }\n\n var goodToGo = failedValidators.length === 0;\n var message = (goodToGo ? 'valid' : 'invalid') + '.zf.abide';\n\n if (goodToGo) {\n // Re-validate inputs that depend on this one with equalto\n const dependentElements = this.$element.find(`[data-equalto=\"${$el.attr('id')}\"]`);\n if (dependentElements.length) {\n let _this = this;\n dependentElements.each(function() {\n if ($(this).val()) {\n _this.validateInput($(this));\n }\n });\n }\n }\n\n if (manageErrorClasses) {\n this.removeErrorClasses($el);\n\n if (!goodToGo) {\n this.addErrorClasses($el, failedValidators);\n }\n }\n\n /**\n * Fires when the input is done checking for validation. Event trigger is either `valid.zf.abide` or `invalid.zf.abide`\n * Trigger includes the DOM element of the input.\n * @event Abide#valid\n * @event Abide#invalid\n */\n $el.trigger(message, [$el]);\n\n return goodToGo;\n }\n\n /**\n * Goes through a form and if there are any invalid inputs, it will display the form error element\n * @returns {Boolean} noError - true if no errors were detected...\n * @fires Abide#formvalid\n * @fires Abide#forminvalid\n */\n validateForm() {\n var acc = [];\n var _this = this;\n var checkboxGroupName;\n\n // Remember first form submission to prevent specific checkbox validation (more than one required) until form got initially submitted\n if (!this.initialized) {\n this.initialized = true;\n }\n\n // skip validation if disabled\n if (this._validationIsDisabled()) {\n this.formnovalidate = null;\n return true;\n }\n\n this.$inputs.each(function() {\n\n // Only use one checkbox per group since validateCheckbox() iterates over all associated checkboxes\n if ($(this)[0].type === 'checkbox') {\n if ($(this).attr('name') === checkboxGroupName) return true;\n checkboxGroupName = $(this).attr('name');\n }\n\n acc.push(_this.validateInput($(this)));\n });\n\n var noError = acc.indexOf(false) === -1;\n\n this.$element.find('[data-abide-error]').each((i, elem) => {\n const $elem = $(elem);\n // Ensure a11y attributes are set\n if (this.options.a11yAttributes) this.addGlobalErrorA11yAttributes($elem);\n // Show or hide the error\n $elem.css('display', (noError ? 'none' : 'block'));\n });\n\n /**\n * Fires when the form is finished validating. Event trigger is either `formvalid.zf.abide` or `forminvalid.zf.abide`.\n * Trigger includes the element of the form.\n * @event Abide#formvalid\n * @event Abide#forminvalid\n */\n this.$element.trigger((noError ? 'formvalid' : 'forminvalid') + '.zf.abide', [this.$element]);\n\n return noError;\n }\n\n /**\n * Determines whether or a not a text input is valid based on the pattern specified in the attribute. If no matching pattern is found, returns true.\n * @param {Object} $el - jQuery object to validate, should be a text input HTML element\n * @param {String} pattern - string value of one of the RegEx patterns in Abide.options.patterns\n * @returns {Boolean} Boolean value depends on whether or not the input value matches the pattern specified\n */\n validateText($el, pattern) {\n // A pattern can be passed to this function, or it will be infered from the input's \"pattern\" attribute, or it's \"type\" attribute\n pattern = (pattern || $el.attr('data-pattern') || $el.attr('pattern') || $el.attr('type'));\n var inputText = $el.val();\n var valid = true;\n\n if (inputText.length) {\n // If the pattern attribute on the element is in Abide's list of patterns, then test that regexp\n if (this.options.patterns.hasOwnProperty(pattern)) {\n valid = this.options.patterns[pattern].test(inputText);\n }\n // If the pattern name isn't also the type attribute of the field, then test it as a regexp\n else if (pattern !== $el.attr('type')) {\n valid = new RegExp(pattern).test(inputText);\n }\n }\n\n return valid;\n }\n\n /**\n * Determines whether or a not a radio input is valid based on whether or not it is required and selected. Although the function targets a single `<input>`, it validates by checking the `required` and `checked` properties of all radio buttons in its group.\n * @param {String} groupName - A string that specifies the name of a radio button group\n * @returns {Boolean} Boolean value depends on whether or not at least one radio input has been selected (if it's required)\n */\n validateRadio(groupName) {\n // If at least one radio in the group has the `required` attribute, the group is considered required\n // Per W3C spec, all radio buttons in a group should have `required`, but we're being nice\n var $group = this.$element.find(`:radio[name=\"${groupName}\"]`);\n var valid = false, required = false;\n\n // For the group to be required, at least one radio needs to be required\n $group.each((i, e) => {\n if ($(e).attr('required')) {\n required = true;\n }\n });\n if (!required) valid=true;\n\n if (!valid) {\n // For the group to be valid, at least one radio needs to be checked\n $group.each((i, e) => {\n if ($(e).prop('checked')) {\n valid = true;\n }\n });\n }\n\n return valid;\n }\n\n /**\n * Determines whether or a not a checkbox input is valid based on whether or not it is required and checked. Although the function targets a single `<input>`, it validates by checking the `required` and `checked` properties of all checkboxes in its group.\n * @param {String} groupName - A string that specifies the name of a checkbox group\n * @returns {Boolean} Boolean value depends on whether or not at least one checkbox input has been checked (if it's required)\n */\n validateCheckbox(groupName) {\n // If at least one checkbox in the group has the `required` attribute, the group is considered required\n // Per W3C spec, all checkboxes in a group should have `required`, but we're being nice\n var $group = this.$element.find(`:checkbox[name=\"${groupName}\"]`);\n var valid = false, required = false, minRequired = 1, checked = 0;\n\n // For the group to be required, at least one checkbox needs to be required\n $group.each((i, e) => {\n if ($(e).attr('required')) {\n required = true;\n }\n });\n if (!required) valid=true;\n\n if (!valid) {\n // Count checked checkboxes within the group\n // Use data-min-required if available (default: 1)\n $group.each((i, e) => {\n if ($(e).prop('checked')) {\n checked++;\n }\n if (typeof $(e).attr('data-min-required') !== 'undefined') {\n minRequired = parseInt($(e).attr('data-min-required'));\n }\n });\n\n // For the group to be valid, the minRequired amount of checkboxes have to be checked\n if (checked >= minRequired) {\n valid = true;\n }\n }\n\n // Skip validation if more than 1 checkbox have to be checked AND if the form hasn't got submitted yet (otherwise it will already show an error during the first fill in)\n if (this.initialized !== true && minRequired > 1) {\n return true;\n }\n\n // Refresh error class for all input\n $group.each((i, e) => {\n if (!valid) {\n this.addErrorClasses($(e), ['required']);\n } else {\n this.removeErrorClasses($(e));\n }\n });\n\n return valid;\n }\n\n /**\n * Determines if a selected input passes a custom validation function. Multiple validations can be used, if passed to the element with `data-validator=\"foo bar baz\"` in a space separated listed.\n * @param {Object} $el - jQuery input element.\n * @param {String} validators - a string of function names matching functions in the Abide.options.validators object.\n * @param {Boolean} required - self explanatory?\n * @returns {Boolean} - true if validations passed.\n */\n matchValidation($el, validators, required) {\n required = required ? true : false;\n\n var clear = validators.split(' ').map((v) => {\n return this.options.validators[v]($el, required, $el.parent());\n });\n return clear.indexOf(false) === -1;\n }\n\n /**\n * Resets form inputs and styles\n * @fires Abide#formreset\n */\n resetForm() {\n var $form = this.$element,\n opts = this.options;\n\n $(`.${opts.labelErrorClass}`, $form).not('small').removeClass(opts.labelErrorClass);\n $(`.${opts.inputErrorClass}`, $form).not('small').removeClass(opts.inputErrorClass);\n $(`${opts.formErrorSelector}.${opts.formErrorClass}`).removeClass(opts.formErrorClass);\n $form.find('[data-abide-error]').css('display', 'none');\n $(':input', $form).not(':button, :submit, :reset, :hidden, :radio, :checkbox, [data-abide-ignore]').val('').attr({\n 'data-invalid': null,\n 'aria-invalid': null\n });\n $(':input:radio', $form).not('[data-abide-ignore]').prop('checked',false).attr({\n 'data-invalid': null,\n 'aria-invalid': null\n });\n $(':input:checkbox', $form).not('[data-abide-ignore]').prop('checked',false).attr({\n 'data-invalid': null,\n 'aria-invalid': null\n });\n /**\n * Fires when the form has been reset.\n * @event Abide#formreset\n */\n $form.trigger('formreset.zf.abide', [$form]);\n }\n\n /**\n * Destroys an instance of Abide.\n * Removes error styles and classes from elements, without resetting their values.\n */\n _destroy() {\n var _this = this;\n this.$element\n .off('.abide')\n .find('[data-abide-error]')\n .css('display', 'none');\n\n this.$inputs\n .off('.abide')\n .each(function() {\n _this.removeErrorClasses($(this));\n });\n\n this.$submits\n .off('.abide');\n }\n}\n\n/**\n * Default settings for plugin\n */\nAbide.defaults = {\n /**\n * The default event to validate inputs. Checkboxes and radios validate immediately.\n * Remove or change this value for manual validation.\n * @option\n * @type {?string}\n * @default 'fieldChange'\n */\n validateOn: 'fieldChange',\n\n /**\n * Class to be applied to input labels on failed validation.\n * @option\n * @type {string}\n * @default 'is-invalid-label'\n */\n labelErrorClass: 'is-invalid-label',\n\n /**\n * Class to be applied to inputs on failed validation.\n * @option\n * @type {string}\n * @default 'is-invalid-input'\n */\n inputErrorClass: 'is-invalid-input',\n\n /**\n * Class selector to use to target Form Errors for show/hide.\n * @option\n * @type {string}\n * @default '.form-error'\n */\n formErrorSelector: '.form-error',\n\n /**\n * Class added to Form Errors on failed validation.\n * @option\n * @type {string}\n * @default 'is-visible'\n */\n formErrorClass: 'is-visible',\n\n /**\n * If true, automatically insert when possible:\n * - `[aria-describedby]` on fields\n * - `[role=alert]` on form errors and `[for]` on form error labels\n * - `[aria-live]` on global errors `[data-abide-error]` (see option `a11yErrorLevel`).\n * @option\n * @type {boolean}\n * @default true\n */\n a11yAttributes: true,\n\n /**\n * [aria-live] attribute value to be applied on global errors `[data-abide-error]`.\n * Options are: 'assertive', 'polite' and 'off'/null\n * @option\n * @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions\n * @type {string}\n * @default 'assertive'\n */\n a11yErrorLevel: 'assertive',\n\n /**\n * Set to true to validate text inputs on any value change.\n * @option\n * @type {boolean}\n * @default false\n */\n liveValidate: false,\n\n /**\n * Set to true to validate inputs on blur.\n * @option\n * @type {boolean}\n * @default false\n */\n validateOnBlur: false,\n\n patterns: {\n alpha : /^[a-zA-Z]+$/,\n alpha_numeric : /^[a-zA-Z0-9]+$/,\n integer : /^[-+]?\\d+$/,\n number : /^[-+]?\\d*(?:[\\.\\,]\\d+)?$/,\n\n // amex, visa, diners\n card : /^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|(?:222[1-9]|2[3-6][0-9]{2}|27[0-1][0-9]|2720)[0-9]{12}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\d{3})\\d{11})$/,\n cvv : /^([0-9]){3,4}$/,\n\n // http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#valid-e-mail-address\n email : /^[a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+$/,\n\n // From CommonRegexJS (@talyssonoc)\n // https://github.com/talyssonoc/CommonRegexJS/blob/e2901b9f57222bc14069dc8f0598d5f412555411/lib/commonregex.js#L76\n // For more restrictive URL Regexs, see https://mathiasbynens.be/demo/url-regex.\n url: /^((?:(https?|ftps?|file|ssh|sftp):\\/\\/|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}\\/)(?:[^\\s()<>]+|\\((?:[^\\s()<>]+|(?:\\([^\\s()<>]+\\)))*\\))+(?:\\((?:[^\\s()<>]+|(?:\\([^\\s()<>]+\\)))*\\)|[^\\s`!()\\[\\]{};:\\'\".,<>?\\xab\\xbb\\u201c\\u201d\\u2018\\u2019]))$/,\n\n // abc.de\n domain : /^([a-zA-Z0-9]([a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,8}$/,\n\n datetime : /^([0-2][0-9]{3})\\-([0-1][0-9])\\-([0-3][0-9])T([0-5][0-9])\\:([0-5][0-9])\\:([0-5][0-9])(Z|([\\-\\+]([0-1][0-9])\\:00))$/,\n // YYYY-MM-DD\n date : /(?:19|20)[0-9]{2}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31))$/,\n // HH:MM:SS\n time : /^(0[0-9]|1[0-9]|2[0-3])(:[0-5][0-9]){2}$/,\n dateISO : /^\\d{4}[\\/\\-]\\d{1,2}[\\/\\-]\\d{1,2}$/,\n // MM/DD/YYYY\n month_day_year : /^(0[1-9]|1[012])[- \\/.](0[1-9]|[12][0-9]|3[01])[- \\/.]\\d{4}$/,\n // DD/MM/YYYY\n day_month_year : /^(0[1-9]|[12][0-9]|3[01])[- \\/.](0[1-9]|1[012])[- \\/.]\\d{4}$/,\n\n // #FFF or #FFFFFF\n color : /^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/,\n\n // Domain || URL\n website: {\n test: (text) => {\n return Abide.defaults.patterns['domain'].test(text) || Abide.defaults.patterns['url'].test(text);\n }\n }\n },\n\n /**\n * Optional validation functions to be used. `equalTo` being the only default included function.\n * Functions should return only a boolean if the input is valid or not. Functions are given the following arguments:\n * el : The jQuery element to validate.\n * required : Boolean value of the required attribute be present or not.\n * parent : The direct parent of the input.\n * @option\n */\n validators: {\n equalTo: function (el, required, parent) {\n return $(`#${el.attr('data-equalto')}`).val() === el.val();\n }\n }\n}\n\nexport { Abide };\n","'use strict';\n\nimport $ from 'jquery';\nimport { Plugin } from './foundation.core.plugin';\nimport { onLoad, GetYoDigits } from './foundation.core.utils';\nimport { Keyboard } from './foundation.util.keyboard';\n\n/**\n * Accordion module.\n * @module foundation.accordion\n * @requires foundation.util.keyboard\n */\n\nclass Accordion extends Plugin {\n /**\n * Creates a new instance of an accordion.\n * @class\n * @name Accordion\n * @fires Accordion#init\n * @param {jQuery} element - jQuery object to make into an accordion.\n * @param {Object} options - a plain object with settings to override the default options.\n */\n _setup(element, options) {\n this.$element = element;\n this.options = $.extend({}, Accordion.defaults, this.$element.data(), options);\n\n this.className = 'Accordion'; // ie9 back compat\n this._init();\n\n Keyboard.register('Accordion', {\n 'ENTER': 'toggle',\n 'SPACE': 'toggle',\n 'ARROW_DOWN': 'next',\n 'ARROW_UP': 'previous'\n });\n }\n\n /**\n * Initializes the accordion by animating the preset active pane(s).\n * @private\n */\n _init() {\n this._isInitializing = true;\n\n this.$element.attr('role', 'tablist');\n this.$tabs = this.$element.children('[data-accordion-item]');\n\n this.$tabs.attr({'role': 'presentation'});\n\n this.$tabs.each(function(idx, el) {\n var $el = $(el),\n $content = $el.children('[data-tab-content]'),\n id = $content[0].id || GetYoDigits(6, 'accordion'),\n linkId = (el.id) ? `${el.id}-label` : `${id}-label`;\n\n $el.find('a:first').attr({\n 'aria-controls': id,\n 'role': 'tab',\n 'id': linkId,\n 'aria-expanded': false,\n 'aria-selected': false\n });\n\n $content.attr({'role': 'tabpanel', 'aria-labelledby': linkId, 'aria-hidden': true, 'id': id});\n });\n\n var $initActive = this.$element.find('.is-active').children('[data-tab-content]');\n if ($initActive.length) {\n // Save up the initial hash to return to it later when going back in history\n this._initialAnchor = $initActive.prev('a').attr('href');\n this._openSingleTab($initActive);\n }\n\n this._checkDeepLink = () => {\n var anchor = window.location.hash;\n\n if (!anchor.length) {\n // If we are still initializing and there is no anchor, then there is nothing to do\n if (this._isInitializing) return;\n // Otherwise, move to the initial anchor\n if (this._initialAnchor) anchor = this._initialAnchor;\n }\n\n var $anchor = anchor && $(anchor);\n var $link = anchor && this.$element.find(`[href$=\"${anchor}\"]`);\n // Whether the anchor element that has been found is part of this element\n var isOwnAnchor = !!($anchor.length && $link.length);\n\n if (isOwnAnchor) {\n // If there is an anchor for the hash, open it (if not already active)\n if ($anchor && $link && $link.length) {\n if (!$link.parent('[data-accordion-item]').hasClass('is-active')) {\n this._openSingleTab($anchor);\n }\n }\n // Otherwise, close everything\n else {\n this._closeAllTabs();\n }\n\n // Roll up a little to show the titles\n if (this.options.deepLinkSmudge) {\n onLoad($(window), () => {\n var offset = this.$element.offset();\n $('html, body').animate({ scrollTop: offset.top - this.options.deepLinkSmudgeOffset }, this.options.deepLinkSmudgeDelay);\n });\n }\n\n /**\n * Fires when the plugin has deeplinked at pageload\n * @event Accordion#deeplink\n */\n this.$element.trigger('deeplink.zf.accordion', [$link, $anchor]);\n }\n }\n\n //use browser to open a tab, if it exists in this tabset\n if (this.options.deepLink) {\n this._checkDeepLink();\n }\n\n this._events();\n\n this._isInitializing = false;\n }\n\n /**\n * Adds event handlers for items within the accordion.\n * @private\n */\n _events() {\n var _this = this;\n\n this.$tabs.each(function() {\n var $elem = $(this);\n var $tabContent = $elem.children('[data-tab-content]');\n if ($tabContent.length) {\n $elem.children('a').off('click.zf.accordion keydown.zf.accordion')\n .on('click.zf.accordion', function(e) {\n e.preventDefault();\n _this.toggle($tabContent);\n }).on('keydown.zf.accordion', function(e) {\n Keyboard.handleKey(e, 'Accordion', {\n toggle: function() {\n _this.toggle($tabContent);\n },\n next: function() {\n var $a = $elem.next().find('a').focus();\n if (!_this.options.multiExpand) {\n $a.trigger('click.zf.accordion')\n }\n },\n previous: function() {\n var $a = $elem.prev().find('a').focus();\n if (!_this.options.multiExpand) {\n $a.trigger('click.zf.accordion')\n }\n },\n handled: function() {\n e.preventDefault();\n }\n });\n });\n }\n });\n if (this.options.deepLink) {\n $(window).on('hashchange', this._checkDeepLink);\n }\n }\n\n /**\n * Toggles the selected content pane's open/close state.\n * @param {jQuery} $target - jQuery object of the pane to toggle (`.accordion-content`).\n * @function\n */\n toggle($target) {\n if ($target.closest('[data-accordion]').is('[disabled]')) {\n console.info('Cannot toggle an accordion that is disabled.');\n return;\n }\n if ($target.parent().hasClass('is-active')) {\n this.up($target);\n } else {\n this.down($target);\n }\n //either replace or update browser history\n if (this.options.deepLink) {\n var anchor = $target.prev('a').attr('href');\n\n if (this.options.updateHistory) {\n history.pushState({}, '', anchor);\n } else {\n history.replaceState({}, '', anchor);\n }\n }\n }\n\n /**\n * Opens the accordion tab defined by `$target`.\n * @param {jQuery} $target - Accordion pane to open (`.accordion-content`).\n * @fires Accordion#down\n * @function\n */\n down($target) {\n if ($target.closest('[data-accordion]').is('[disabled]')) {\n console.info('Cannot call down on an accordion that is disabled.');\n return;\n }\n\n if (this.options.multiExpand)\n this._openTab($target);\n else\n this._openSingleTab($target);\n }\n\n /**\n * Closes the tab defined by `$target`.\n * It may be ignored if the Accordion options don't allow it.\n *\n * @param {jQuery} $target - Accordion tab to close (`.accordion-content`).\n * @fires Accordion#up\n * @function\n */\n up($target) {\n if (this.$element.is('[disabled]')) {\n console.info('Cannot call up on an accordion that is disabled.');\n return;\n }\n\n // Don't close the item if it is already closed\n const $targetItem = $target.parent();\n if (!$targetItem.hasClass('is-active')) return;\n\n // Don't close the item if there is no other active item (unless with `allowAllClosed`)\n const $othersItems = $targetItem.siblings();\n if (!this.options.allowAllClosed && !$othersItems.hasClass('is-active')) return;\n\n this._closeTab($target);\n }\n\n /**\n * Make the tab defined by `$target` the only opened tab, closing all others tabs.\n * @param {jQuery} $target - Accordion tab to open (`.accordion-content`).\n * @function\n * @private\n */\n _openSingleTab($target) {\n // Close all the others active tabs.\n const $activeContents = this.$element.children('.is-active').children('[data-tab-content]');\n if ($activeContents.length) {\n this._closeTab($activeContents.not($target));\n }\n\n // Then open the target.\n this._openTab($target);\n }\n\n /**\n * Opens the tab defined by `$target`.\n * @param {jQuery} $target - Accordion tab to open (`.accordion-content`).\n * @fires Accordion#down\n * @function\n * @private\n */\n _openTab($target) {\n const $targetItem = $target.parent();\n const targetContentId = $target.attr('aria-labelledby');\n\n $target.attr('aria-hidden', false);\n $targetItem.addClass('is-active');\n\n $(`#${targetContentId}`).attr({\n 'aria-expanded': true,\n 'aria-selected': true\n });\n\n $target.stop().slideDown(this.options.slideSpeed, () => {\n /**\n * Fires when the tab is done opening.\n * @event Accordion#down\n */\n this.$element.trigger('down.zf.accordion', [$target]);\n });\n }\n\n /**\n * Closes the tab defined by `$target`.\n * @param {jQuery} $target - Accordion tab to close (`.accordion-content`).\n * @fires Accordion#up\n * @function\n * @private\n */\n _closeTab($target) {\n const $targetItem = $target.parent();\n const targetContentId = $target.attr('aria-labelledby');\n\n $target.attr('aria-hidden', true)\n $targetItem.removeClass('is-active');\n\n $(`#${targetContentId}`).attr({\n 'aria-expanded': false,\n 'aria-selected': false\n });\n\n $target.stop().slideUp(this.options.slideSpeed, () => {\n /**\n * Fires when the tab is done collapsing up.\n * @event Accordion#up\n */\n this.$element.trigger('up.zf.accordion', [$target]);\n });\n }\n\n /**\n * Closes all active tabs\n * @fires Accordion#up\n * @function\n * @private\n */\n _closeAllTabs() {\n var $activeTabs = this.$element.children('.is-active').children('[data-tab-content]');\n if ($activeTabs.length) {\n this._closeTab($activeTabs);\n }\n }\n\n /**\n * Destroys an instance of an accordion.\n * @fires Accordion#destroyed\n * @function\n */\n _destroy() {\n this.$element.find('[data-tab-content]').stop(true).slideUp(0).css('display', '');\n this.$element.find('a').off('.zf.accordion');\n if (this.options.deepLink) {\n $(window).off('hashchange', this._checkDeepLink);\n }\n\n }\n}\n\nAccordion.defaults = {\n /**\n * Amount of time to animate the opening of an accordion pane.\n * @option\n * @type {number}\n * @default 250\n */\n slideSpeed: 250,\n /**\n * Allow the accordion to have multiple open panes.\n * @option\n * @type {boolean}\n * @default false\n */\n multiExpand: false,\n /**\n * Allow the accordion to close all panes.\n * @option\n * @type {boolean}\n * @default false\n */\n allowAllClosed: false,\n /**\n * Link the location hash to the open pane.\n * Set the location hash when the opened pane changes, and open and scroll to the corresponding pane when the location changes.\n * @option\n * @type {boolean}\n * @default false\n */\n deepLink: false,\n /**\n * If `deepLink` is enabled, adjust the deep link scroll to make sure the top of the accordion panel is visible\n * @option\n * @type {boolean}\n * @default false\n */\n deepLinkSmudge: false,\n /**\n * If `deepLinkSmudge` is enabled, animation time (ms) for the deep link adjustment\n * @option\n * @type {number}\n * @default 300\n */\n deepLinkSmudgeDelay: 300,\n /**\n * If `deepLinkSmudge` is enabled, the offset for scrollToTtop to prevent overlap by a sticky element at the top of the page\n * @option\n * @type {number}\n * @default 0\n */\n deepLinkSmudgeOffset: 0,\n /**\n * If `deepLink` is enabled, update the browser history with the open accordion\n * @option\n * @type {boolean}\n * @default false\n */\n updateHistory: false\n};\n\nexport { Accordion };\n","'use strict';\n\n\nimport $ from 'jquery';\nimport { Keyboard } from './foundation.util.keyboard';\nimport { Nest } from './foundation.util.nest';\nimport { GetYoDigits } from './foundation.core.utils';\nimport { Plugin } from './foundation.core.plugin';\n\n/**\n * AccordionMenu module.\n * @module foundation.accordionMenu\n * @requires foundation.util.keyboard\n * @requires foundation.util.nest\n */\n\nclass AccordionMenu extends Plugin {\n /**\n * Creates a new instance of an accordion menu.\n * @class\n * @name AccordionMenu\n * @fires AccordionMenu#init\n * @param {jQuery} element - jQuery object to make into an accordion menu.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element, options) {\n this.$element = element;\n this.options = $.extend({}, AccordionMenu.defaults, this.$element.data(), options);\n this.className = 'AccordionMenu'; // ie9 back compat\n\n this._init();\n\n Keyboard.register('AccordionMenu', {\n 'ENTER': 'toggle',\n 'SPACE': 'toggle',\n 'ARROW_RIGHT': 'open',\n 'ARROW_UP': 'up',\n 'ARROW_DOWN': 'down',\n 'ARROW_LEFT': 'close',\n 'ESCAPE': 'closeAll'\n });\n }\n\n\n\n /**\n * Initializes the accordion menu by hiding all nested menus.\n * @private\n */\n _init() {\n Nest.Feather(this.$element, 'accordion');\n\n var _this = this;\n\n this.$element.find('[data-submenu]').not('.is-active').slideUp(0);//.find('a').css('padding-left', '1rem');\n this.$element.attr({\n 'role': 'tree',\n 'aria-multiselectable': this.options.multiOpen\n });\n\n this.$menuLinks = this.$element.find('.is-accordion-submenu-parent');\n this.$menuLinks.each(function() {\n var linkId = this.id || GetYoDigits(6, 'acc-menu-link'),\n $elem = $(this),\n $sub = $elem.children('[data-submenu]'),\n subId = $sub[0].id || GetYoDigits(6, 'acc-menu'),\n isActive = $sub.hasClass('is-active');\n\n if (_this.options.parentLink) {\n let $anchor = $elem.children('a');\n $anchor.clone().prependTo($sub).wrap('<li data-is-parent-link class=\"is-submenu-parent-item is-submenu-item is-accordion-submenu-item\"></li>');\n }\n\n if (_this.options.submenuToggle) {\n $elem.addClass('has-submenu-toggle');\n $elem.children('a').after('<button id=\"' + linkId + '\" class=\"submenu-toggle\" aria-controls=\"' + subId + '\" aria-expanded=\"' + isActive + '\" title=\"' + _this.options.submenuToggleText + '\"><span class=\"submenu-toggle-text\">' + _this.options.submenuToggleText + '</span></button>');\n } else {\n $elem.attr({\n 'aria-controls': subId,\n 'aria-expanded': isActive,\n 'id': linkId\n });\n }\n $sub.attr({\n 'aria-labelledby': linkId,\n 'aria-hidden': !isActive,\n 'role': 'group',\n 'id': subId\n });\n });\n this.$element.find('li').attr({\n 'role': 'treeitem'\n });\n var initPanes = this.$element.find('.is-active');\n if (initPanes.length) {\n initPanes.each(function() {\n _this.down($(this));\n });\n }\n this._events();\n }\n\n /**\n * Adds event handlers for items within the menu.\n * @private\n */\n _events() {\n var _this = this;\n\n this.$element.find('li').each(function() {\n var $submenu = $(this).children('[data-submenu]');\n\n if ($submenu.length) {\n if (_this.options.submenuToggle) {\n $(this).children('.submenu-toggle').off('click.zf.accordionMenu').on('click.zf.accordionMenu', function(e) {\n _this.toggle($submenu);\n });\n } else {\n $(this).children('a').off('click.zf.accordionMenu').on('click.zf.accordionMenu', function(e) {\n e.preventDefault();\n _this.toggle($submenu);\n });\n }\n }\n }).on('keydown.zf.accordionMenu', function(e) {\n var $element = $(this),\n $elements = $element.parent('ul').children('li'),\n $prevElement,\n $nextElement,\n $target = $element.children('[data-submenu]');\n\n $elements.each(function(i) {\n if ($(this).is($element)) {\n $prevElement = $elements.eq(Math.max(0, i-1)).find('a').first();\n $nextElement = $elements.eq(Math.min(i+1, $elements.length-1)).find('a').first();\n\n if ($(this).children('[data-submenu]:visible').length) { // has open sub menu\n $nextElement = $element.find('li:first-child').find('a').first();\n }\n if ($(this).is(':first-child')) { // is first element of sub menu\n $prevElement = $element.parents('li').first().find('a').first();\n } else if ($prevElement.parents('li').first().children('[data-submenu]:visible').length) { // if previous element has open sub menu\n $prevElement = $prevElement.parents('li').find('li:last-child').find('a').first();\n }\n if ($(this).is(':last-child')) { // is last element of sub menu\n $nextElement = $element.parents('li').first().next('li').find('a').first();\n }\n\n return;\n }\n });\n\n Keyboard.handleKey(e, 'AccordionMenu', {\n open: function() {\n if ($target.is(':hidden')) {\n _this.down($target);\n $target.find('li').first().find('a').first().focus();\n }\n },\n close: function() {\n if ($target.length && !$target.is(':hidden')) { // close active sub of this item\n _this.up($target);\n } else if ($element.parent('[data-submenu]').length) { // close currently open sub\n _this.up($element.parent('[data-submenu]'));\n $element.parents('li').first().find('a').first().focus();\n }\n },\n up: function() {\n $prevElement.focus();\n return true;\n },\n down: function() {\n $nextElement.focus();\n return true;\n },\n toggle: function() {\n if (_this.options.submenuToggle) {\n return false;\n }\n if ($element.children('[data-submenu]').length) {\n _this.toggle($element.children('[data-submenu]'));\n return true;\n }\n },\n closeAll: function() {\n _this.hideAll();\n },\n handled: function(preventDefault) {\n if (preventDefault) {\n e.preventDefault();\n }\n }\n });\n });//.attr('tabindex', 0);\n }\n\n /**\n * Closes all panes of the menu.\n * @function\n */\n hideAll() {\n this.up(this.$element.find('[data-submenu]'));\n }\n\n /**\n * Opens all panes of the menu.\n * @function\n */\n showAll() {\n this.down(this.$element.find('[data-submenu]'));\n }\n\n /**\n * Toggles the open/close state of a submenu.\n * @function\n * @param {jQuery} $target - the submenu to toggle\n */\n toggle($target) {\n if (!$target.is(':animated')) {\n if (!$target.is(':hidden')) {\n this.up($target);\n }\n else {\n this.down($target);\n }\n }\n }\n\n /**\n * Opens the sub-menu defined by `$target`.\n * @param {jQuery} $target - Sub-menu to open.\n * @fires AccordionMenu#down\n */\n down($target) {\n // If having multiple submenus active is disabled, close all the submenus\n // that are not parents or children of the targeted submenu.\n if (!this.options.multiOpen) {\n // The \"branch\" of the targetted submenu, from the component root to\n // the active submenus nested in it.\n const $targetBranch = $target.parentsUntil(this.$element)\n .add($target)\n .add($target.find('.is-active'));\n // All the active submenus that are not in the branch.\n const $othersActiveSubmenus = this.$element.find('.is-active').not($targetBranch);\n\n this.up($othersActiveSubmenus);\n }\n\n $target\n .addClass('is-active')\n .attr({ 'aria-hidden': false });\n\n if (this.options.submenuToggle) {\n $target.prev('.submenu-toggle').attr({'aria-expanded': true});\n }\n else {\n $target.parent('.is-accordion-submenu-parent').attr({'aria-expanded': true});\n }\n\n $target.slideDown(this.options.slideSpeed, () => {\n /**\n * Fires when the menu is done opening.\n * @event AccordionMenu#down\n */\n this.$element.trigger('down.zf.accordionMenu', [$target]);\n });\n }\n\n /**\n * Closes the sub-menu defined by `$target`. All sub-menus inside the target will be closed as well.\n * @param {jQuery} $target - Sub-menu to close.\n * @fires AccordionMenu#up\n */\n up($target) {\n const $submenus = $target.find('[data-submenu]');\n const $allmenus = $target.add($submenus);\n\n $submenus.slideUp(0);\n $allmenus\n .removeClass('is-active')\n .attr('aria-hidden', true);\n\n if (this.options.submenuToggle) {\n $allmenus.prev('.submenu-toggle').attr('aria-expanded', false);\n }\n else {\n $allmenus.parent('.is-accordion-submenu-parent').attr('aria-expanded', false);\n }\n\n $target.slideUp(this.options.slideSpeed, () => {\n /**\n * Fires when the menu is done collapsing up.\n * @event AccordionMenu#up\n */\n this.$element.trigger('up.zf.accordionMenu', [$target]);\n });\n }\n\n /**\n * Destroys an instance of accordion menu.\n * @fires AccordionMenu#destroyed\n */\n _destroy() {\n this.$element.find('[data-submenu]').slideDown(0).css('display', '');\n this.$element.find('a').off('click.zf.accordionMenu');\n this.$element.find('[data-is-parent-link]').detach();\n\n if (this.options.submenuToggle) {\n this.$element.find('.has-submenu-toggle').removeClass('has-submenu-toggle');\n this.$element.find('.submenu-toggle').remove();\n }\n\n Nest.Burn(this.$element, 'accordion');\n }\n}\n\nAccordionMenu.defaults = {\n /**\n * Adds the parent link to the submenu.\n * @option\n * @type {boolean}\n * @default false\n */\n parentLink: false,\n /**\n * Amount of time to animate the opening of a submenu in ms.\n * @option\n * @type {number}\n * @default 250\n */\n slideSpeed: 250,\n /**\n * Adds a separate submenu toggle button. This allows the parent item to have a link.\n * @option\n * @example true\n */\n submenuToggle: false,\n /**\n * The text used for the submenu toggle if enabled. This is used for screen readers only.\n * @option\n * @example true\n */\n submenuToggleText: 'Toggle menu',\n /**\n * Allow the menu to have multiple open panes.\n * @option\n * @type {boolean}\n * @default true\n */\n multiOpen: true\n};\n\nexport { AccordionMenu };\n","\"use strict\";\n\nimport $ from 'jquery';\nimport { GetYoDigits } from './foundation.core.utils';\nimport { MediaQuery } from './foundation.util.mediaQuery';\n\nvar FOUNDATION_VERSION = '6.6.2';\n\n// Global Foundation object\n// This is attached to the window, or used as a module for AMD/Browserify\nvar Foundation = {\n version: FOUNDATION_VERSION,\n\n /**\n * Stores initialized plugins.\n */\n _plugins: {},\n\n /**\n * Stores generated unique ids for plugin instances\n */\n _uuids: [],\n\n /**\n * Defines a Foundation plugin, adding it to the `Foundation` namespace and the list of plugins to initialize when reflowing.\n * @param {Object} plugin - The constructor of the plugin.\n */\n plugin: function(plugin, name) {\n // Object key to use when adding to global Foundation object\n // Examples: Foundation.Reveal, Foundation.OffCanvas\n var className = (name || functionName(plugin));\n // Object key to use when storing the plugin, also used to create the identifying data attribute for the plugin\n // Examples: data-reveal, data-off-canvas\n var attrName = hyphenate(className);\n\n // Add to the Foundation object and the plugins list (for reflowing)\n this._plugins[attrName] = this[className] = plugin;\n },\n /**\n * @function\n * Populates the _uuids array with pointers to each individual plugin instance.\n * Adds the `zfPlugin` data-attribute to programmatically created plugins to allow use of $(selector).foundation(method) calls.\n * Also fires the initialization event for each plugin, consolidating repetitive code.\n * @param {Object} plugin - an instance of a plugin, usually `this` in context.\n * @param {String} name - the name of the plugin, passed as a camelCased string.\n * @fires Plugin#init\n */\n registerPlugin: function(plugin, name){\n var pluginName = name ? hyphenate(name) : functionName(plugin.constructor).toLowerCase();\n plugin.uuid = GetYoDigits(6, pluginName);\n\n if(!plugin.$element.attr(`data-${pluginName}`)){ plugin.$element.attr(`data-${pluginName}`, plugin.uuid); }\n if(!plugin.$element.data('zfPlugin')){ plugin.$element.data('zfPlugin', plugin); }\n /**\n * Fires when the plugin has initialized.\n * @event Plugin#init\n */\n plugin.$element.trigger(`init.zf.${pluginName}`);\n\n this._uuids.push(plugin.uuid);\n\n return;\n },\n /**\n * @function\n * Removes the plugins uuid from the _uuids array.\n * Removes the zfPlugin data attribute, as well as the data-plugin-name attribute.\n * Also fires the destroyed event for the plugin, consolidating repetitive code.\n * @param {Object} plugin - an instance of a plugin, usually `this` in context.\n * @fires Plugin#destroyed\n */\n unregisterPlugin: function(plugin){\n var pluginName = hyphenate(functionName(plugin.$element.data('zfPlugin').constructor));\n\n this._uuids.splice(this._uuids.indexOf(plugin.uuid), 1);\n plugin.$element.removeAttr(`data-${pluginName}`).removeData('zfPlugin')\n /**\n * Fires when the plugin has been destroyed.\n * @event Plugin#destroyed\n */\n .trigger(`destroyed.zf.${pluginName}`);\n for(var prop in plugin){\n plugin[prop] = null;//clean up script to prep for garbage collection.\n }\n return;\n },\n\n /**\n * @function\n * Causes one or more active plugins to re-initialize, resetting event listeners, recalculating positions, etc.\n * @param {String} plugins - optional string of an individual plugin key, attained by calling `$(element).data('pluginName')`, or string of a plugin class i.e. `'dropdown'`\n * @default If no argument is passed, reflow all currently active plugins.\n */\n reInit: function(plugins){\n var isJQ = plugins instanceof $;\n try{\n if(isJQ){\n plugins.each(function(){\n $(this).data('zfPlugin')._init();\n });\n }else{\n var type = typeof plugins,\n _this = this,\n fns = {\n 'object': function(plgs){\n plgs.forEach(function(p){\n p = hyphenate(p);\n $('[data-'+ p +']').foundation('_init');\n });\n },\n 'string': function(){\n plugins = hyphenate(plugins);\n $('[data-'+ plugins +']').foundation('_init');\n },\n 'undefined': function(){\n this['object'](Object.keys(_this._plugins));\n }\n };\n fns[type](plugins);\n }\n }catch(err){\n console.error(err);\n }finally{\n return plugins;\n }\n },\n\n /**\n * Initialize plugins on any elements within `elem` (and `elem` itself) that aren't already initialized.\n * @param {Object} elem - jQuery object containing the element to check inside. Also checks the element itself, unless it's the `document` object.\n * @param {String|Array} plugins - A list of plugins to initialize. Leave this out to initialize everything.\n */\n reflow: function(elem, plugins) {\n\n // If plugins is undefined, just grab everything\n if (typeof plugins === 'undefined') {\n plugins = Object.keys(this._plugins);\n }\n // If plugins is a string, convert it to an array with one item\n else if (typeof plugins === 'string') {\n plugins = [plugins];\n }\n\n var _this = this;\n\n // Iterate through each plugin\n $.each(plugins, function(i, name) {\n // Get the current plugin\n var plugin = _this._plugins[name];\n\n // Localize the search to all elements inside elem, as well as elem itself, unless elem === document\n var $elem = $(elem).find('[data-'+name+']').addBack('[data-'+name+']').filter(function () {\n return typeof $(this).data(\"zfPlugin\") === 'undefined';\n });\n\n // For each plugin found, initialize it\n $elem.each(function() {\n var $el = $(this),\n opts = { reflow: true };\n\n if($el.attr('data-options')){\n $el.attr('data-options').split(';').forEach(function(option, _index){\n var opt = option.split(':').map(function(el){ return el.trim(); });\n if(opt[0]) opts[opt[0]] = parseValue(opt[1]);\n });\n }\n try{\n $el.data('zfPlugin', new plugin($(this), opts));\n }catch(er){\n console.error(er);\n }finally{\n return;\n }\n });\n });\n },\n getFnName: functionName,\n\n addToJquery: function($) {\n // TODO: consider not making this a jQuery function\n // TODO: need way to reflow vs. re-initialize\n /**\n * The Foundation jQuery method.\n * @param {String|Array} method - An action to perform on the current jQuery object.\n */\n var foundation = function(method) {\n var type = typeof method,\n $noJS = $('.no-js');\n\n if($noJS.length){\n $noJS.removeClass('no-js');\n }\n\n if(type === 'undefined'){//needs to initialize the Foundation object, or an individual plugin.\n MediaQuery._init();\n Foundation.reflow(this);\n }else if(type === 'string'){//an individual method to invoke on a plugin or group of plugins\n var args = Array.prototype.slice.call(arguments, 1);//collect all the arguments, if necessary\n var plugClass = this.data('zfPlugin');//determine the class of plugin\n\n if(typeof plugClass !== 'undefined' && typeof plugClass[method] !== 'undefined'){//make sure both the class and method exist\n if(this.length === 1){//if there's only one, call it directly.\n plugClass[method].apply(plugClass, args);\n }else{\n this.each(function(i, el){//otherwise loop through the jQuery collection and invoke the method on each\n plugClass[method].apply($(el).data('zfPlugin'), args);\n });\n }\n }else{//error for no class or no method\n throw new ReferenceError(\"We're sorry, '\" + method + \"' is not an available method for \" + (plugClass ? functionName(plugClass) : 'this element') + '.');\n }\n }else{//error for invalid argument type\n throw new TypeError(`We're sorry, ${type} is not a valid parameter. You must use a string representing the method you wish to invoke.`);\n }\n return this;\n };\n $.fn.foundation = foundation;\n return $;\n }\n};\n\nFoundation.util = {\n /**\n * Function for applying a debounce effect to a function call.\n * @function\n * @param {Function} func - Function to be called at end of timeout.\n * @param {Number} delay - Time in ms to delay the call of `func`.\n * @returns function\n */\n throttle: function (func, delay) {\n var timer = null;\n\n return function () {\n var context = this, args = arguments;\n\n if (timer === null) {\n timer = setTimeout(function () {\n func.apply(context, args);\n timer = null;\n }, delay);\n }\n };\n }\n};\n\nwindow.Foundation = Foundation;\n\n// Polyfill for requestAnimationFrame\n(function() {\n if (!Date.now || !window.Date.now)\n window.Date.now = Date.now = function() { return new Date().getTime(); };\n\n var vendors = ['webkit', 'moz'];\n for (var i = 0; i < vendors.length && !window.requestAnimationFrame; ++i) {\n var vp = vendors[i];\n window.requestAnimationFrame = window[vp+'RequestAnimationFrame'];\n window.cancelAnimationFrame = (window[vp+'CancelAnimationFrame']\n || window[vp+'CancelRequestAnimationFrame']);\n }\n if (/iP(ad|hone|od).*OS 6/.test(window.navigator.userAgent)\n || !window.requestAnimationFrame || !window.cancelAnimationFrame) {\n var lastTime = 0;\n window.requestAnimationFrame = function(callback) {\n var now = Date.now();\n var nextTime = Math.max(lastTime + 16, now);\n return setTimeout(function() { callback(lastTime = nextTime); },\n nextTime - now);\n };\n window.cancelAnimationFrame = clearTimeout;\n }\n /**\n * Polyfill for performance.now, required by rAF\n */\n if(!window.performance || !window.performance.now){\n window.performance = {\n start: Date.now(),\n now: function(){ return Date.now() - this.start; }\n };\n }\n})();\nif (!Function.prototype.bind) {\n Function.prototype.bind = function(oThis) {\n if (typeof this !== 'function') {\n // closest thing possible to the ECMAScript 5\n // internal IsCallable function\n throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable');\n }\n\n var aArgs = Array.prototype.slice.call(arguments, 1),\n fToBind = this,\n fNOP = function() {},\n fBound = function() {\n return fToBind.apply(this instanceof fNOP\n ? this\n : oThis,\n aArgs.concat(Array.prototype.slice.call(arguments)));\n };\n\n if (this.prototype) {\n // native functions don't have a prototype\n fNOP.prototype = this.prototype;\n }\n fBound.prototype = new fNOP();\n\n return fBound;\n };\n}\n// Polyfill to get the name of a function in IE9\nfunction functionName(fn) {\n if (typeof Function.prototype.name === 'undefined') {\n var funcNameRegex = /function\\s([^(]{1,})\\(/;\n var results = (funcNameRegex).exec((fn).toString());\n return (results && results.length > 1) ? results[1].trim() : \"\";\n }\n else if (typeof fn.prototype === 'undefined') {\n return fn.constructor.name;\n }\n else {\n return fn.prototype.constructor.name;\n }\n}\nfunction parseValue(str){\n if ('true' === str) return true;\n else if ('false' === str) return false;\n else if (!isNaN(str * 1)) return parseFloat(str);\n return str;\n}\n// Convert PascalCase to kebab-case\n// Thank you: http://stackoverflow.com/a/8955580\nfunction hyphenate(str) {\n return str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();\n}\n\nexport {Foundation};\n","'use strict';\n\nimport $ from 'jquery';\nimport { GetYoDigits } from './foundation.core.utils';\n\n// Abstract class for providing lifecycle hooks. Expect plugins to define AT LEAST\n// {function} _setup (replaces previous constructor),\n// {function} _destroy (replaces previous destroy)\nclass Plugin {\n\n constructor(element, options) {\n this._setup(element, options);\n var pluginName = getPluginName(this);\n this.uuid = GetYoDigits(6, pluginName);\n\n if(!this.$element.attr(`data-${pluginName}`)){ this.$element.attr(`data-${pluginName}`, this.uuid); }\n if(!this.$element.data('zfPlugin')){ this.$element.data('zfPlugin', this); }\n /**\n * Fires when the plugin has initialized.\n * @event Plugin#init\n */\n this.$element.trigger(`init.zf.${pluginName}`);\n }\n\n destroy() {\n this._destroy();\n var pluginName = getPluginName(this);\n this.$element.removeAttr(`data-${pluginName}`).removeData('zfPlugin')\n /**\n * Fires when the plugin has been destroyed.\n * @event Plugin#destroyed\n */\n .trigger(`destroyed.zf.${pluginName}`);\n for(var prop in this){\n this[prop] = null;//clean up script to prep for garbage collection.\n }\n }\n}\n\n// Convert PascalCase to kebab-case\n// Thank you: http://stackoverflow.com/a/8955580\nfunction hyphenate(str) {\n return str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();\n}\n\nfunction getPluginName(obj) {\n return hyphenate(obj.className);\n}\n\nexport {Plugin};\n","\"use strict\";\n\nimport $ from 'jquery';\n\n// Core Foundation Utilities, utilized in a number of places.\n\n /**\n * Returns a boolean for RTL support\n */\nfunction rtl() {\n return $('html').attr('dir') === 'rtl';\n}\n\n/**\n * returns a random base-36 uid with namespacing\n * @function\n * @param {Number} length - number of random base-36 digits desired. Increase for more random strings.\n * @param {String} namespace - name of plugin to be incorporated in uid, optional.\n * @default {String} '' - if no plugin name is provided, nothing is appended to the uid.\n * @returns {String} - unique id\n */\nfunction GetYoDigits(length = 6, namespace){\n let str = '';\n const chars = '0123456789abcdefghijklmnopqrstuvwxyz';\n const charsLength = chars.length;\n for (let i = 0; i < length; i++) {\n str += chars[Math.floor(Math.random() * charsLength)];\n }\n return namespace ? `${str}-${namespace}` : str;\n}\n\n/**\n * Escape a string so it can be used as a regexp pattern\n * @function\n * @see https://stackoverflow.com/a/9310752/4317384\n *\n * @param {String} str - string to escape.\n * @returns {String} - escaped string\n */\nfunction RegExpEscape(str){\n return str.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&');\n}\n\nfunction transitionend($elem){\n var transitions = {\n 'transition': 'transitionend',\n 'WebkitTransition': 'webkitTransitionEnd',\n 'MozTransition': 'transitionend',\n 'OTransition': 'otransitionend'\n };\n var elem = document.createElement('div'),\n end;\n\n for (let transition in transitions){\n if (typeof elem.style[transition] !== 'undefined'){\n end = transitions[transition];\n }\n }\n if (end) {\n return end;\n } else {\n setTimeout(function(){\n $elem.triggerHandler('transitionend', [$elem]);\n }, 1);\n return 'transitionend';\n }\n}\n\n/**\n * Return an event type to listen for window load.\n *\n * If `$elem` is passed, an event will be triggered on `$elem`. If window is already loaded, the event will still be triggered.\n * If `handler` is passed, attach it to the event on `$elem`.\n * Calling `onLoad` without handler allows you to get the event type that will be triggered before attaching the handler by yourself.\n * @function\n *\n * @param {Object} [] $elem - jQuery element on which the event will be triggered if passed.\n * @param {Function} [] handler - function to attach to the event.\n * @returns {String} - event type that should or will be triggered.\n */\nfunction onLoad($elem, handler) {\n const didLoad = document.readyState === 'complete';\n const eventType = (didLoad ? '_didLoad' : 'load') + '.zf.util.onLoad';\n const cb = () => $elem.triggerHandler(eventType);\n\n if ($elem) {\n if (handler) $elem.one(eventType, handler);\n\n if (didLoad)\n setTimeout(cb);\n else\n $(window).one('load', cb);\n }\n\n return eventType;\n}\n\n/**\n * Retuns an handler for the `mouseleave` that ignore disappeared mouses.\n *\n * If the mouse \"disappeared\" from the document (like when going on a browser UI element, See https://git.io/zf-11410),\n * the event is ignored.\n * - If the `ignoreLeaveWindow` is `true`, the event is ignored when the user actually left the window\n * (like by switching to an other window with [Alt]+[Tab]).\n * - If the `ignoreReappear` is `true`, the event will be ignored when the mouse will reappear later on the document\n * outside of the element it left.\n *\n * @function\n *\n * @param {Function} [] handler - handler for the filtered `mouseleave` event to watch.\n * @param {Object} [] options - object of options:\n * - {Boolean} [false] ignoreLeaveWindow - also ignore when the user switched windows.\n * - {Boolean} [false] ignoreReappear - also ignore when the mouse reappeared outside of the element it left.\n * @returns {Function} - filtered handler to use to listen on the `mouseleave` event.\n */\nfunction ignoreMousedisappear(handler, { ignoreLeaveWindow = false, ignoreReappear = false } = {}) {\n return function leaveEventHandler(eLeave, ...rest) {\n const callback = handler.bind(this, eLeave, ...rest);\n\n // The mouse left: call the given callback if the mouse entered elsewhere\n if (eLeave.relatedTarget !== null) {\n return callback();\n }\n\n // Otherwise, check if the mouse actually left the window.\n // In firefox if the user switched between windows, the window sill have the focus by the time\n // the event is triggered. We have to debounce the event to test this case.\n setTimeout(function leaveEventDebouncer() {\n if (!ignoreLeaveWindow && document.hasFocus && !document.hasFocus()) {\n return callback();\n }\n\n // Otherwise, wait for the mouse to reeapear outside of the element,\n if (!ignoreReappear) {\n $(document).one('mouseenter', function reenterEventHandler(eReenter) {\n if (!$(eLeave.currentTarget).has(eReenter.target).length) {\n // Fill where the mouse finally entered.\n eLeave.relatedTarget = eReenter.target;\n callback();\n }\n });\n }\n\n }, 0);\n };\n}\n\n\nexport { rtl, GetYoDigits, RegExpEscape, transitionend, onLoad, ignoreMousedisappear };\n","'use strict';\n\nimport $ from 'jquery';\nimport { Keyboard } from './foundation.util.keyboard';\nimport { Nest } from './foundation.util.nest';\nimport { GetYoDigits, transitionend } from './foundation.core.utils';\nimport { Box } from './foundation.util.box';\nimport { Plugin } from './foundation.core.plugin';\n\n/**\n * Drilldown module.\n * @module foundation.drilldown\n * @requires foundation.util.keyboard\n * @requires foundation.util.nest\n * @requires foundation.util.box\n */\n\nclass Drilldown extends Plugin {\n /**\n * Creates a new instance of a drilldown menu.\n * @class\n * @name Drilldown\n * @param {jQuery} element - jQuery object to make into an accordion menu.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element, options) {\n this.$element = element;\n this.options = $.extend({}, Drilldown.defaults, this.$element.data(), options);\n this.className = 'Drilldown'; // ie9 back compat\n\n this._init();\n\n Keyboard.register('Drilldown', {\n 'ENTER': 'open',\n 'SPACE': 'open',\n 'ARROW_RIGHT': 'next',\n 'ARROW_UP': 'up',\n 'ARROW_DOWN': 'down',\n 'ARROW_LEFT': 'previous',\n 'ESCAPE': 'close',\n 'TAB': 'down',\n 'SHIFT_TAB': 'up'\n });\n }\n\n /**\n * Initializes the drilldown by creating jQuery collections of elements\n * @private\n */\n _init() {\n Nest.Feather(this.$element, 'drilldown');\n\n if(this.options.autoApplyClass) {\n this.$element.addClass('drilldown');\n }\n\n this.$element.attr({\n 'role': 'tree',\n 'aria-multiselectable': false\n });\n this.$submenuAnchors = this.$element.find('li.is-drilldown-submenu-parent').children('a');\n this.$submenus = this.$submenuAnchors.parent('li').children('[data-submenu]').attr('role', 'group');\n this.$menuItems = this.$element.find('li').not('.js-drilldown-back').attr('role', 'treeitem').find('a');\n\n // Set the main menu as current by default (unless a submenu is selected)\n // Used to set the wrapper height when the drilldown is closed/reopened from any (sub)menu\n this.$currentMenu = this.$element;\n\n this.$element.attr('data-mutate', (this.$element.attr('data-drilldown') || GetYoDigits(6, 'drilldown')));\n\n this._prepareMenu();\n this._registerEvents();\n\n this._keyboardEvents();\n }\n\n /**\n * prepares drilldown menu by setting attributes to links and elements\n * sets a min height to prevent content jumping\n * wraps the element if not already wrapped\n * @private\n * @function\n */\n _prepareMenu() {\n var _this = this;\n // if(!this.options.holdOpen){\n // this._menuLinkEvents();\n // }\n this.$submenuAnchors.each(function(){\n var $link = $(this);\n var $sub = $link.parent();\n if(_this.options.parentLink){\n $link.clone().prependTo($sub.children('[data-submenu]')).wrap('<li data-is-parent-link class=\"is-submenu-parent-item is-submenu-item is-drilldown-submenu-item\" role=\"none\"></li>');\n }\n $link.data('savedHref', $link.attr('href')).removeAttr('href').attr('tabindex', 0);\n $link.children('[data-submenu]')\n .attr({\n 'aria-hidden': true,\n 'tabindex': 0,\n 'role': 'group'\n });\n _this._events($link);\n });\n this.$submenus.each(function(){\n var $menu = $(this),\n $back = $menu.find('.js-drilldown-back');\n if(!$back.length){\n switch (_this.options.backButtonPosition) {\n case \"bottom\":\n $menu.append(_this.options.backButton);\n break;\n case \"top\":\n $menu.prepend(_this.options.backButton);\n break;\n default:\n console.error(\"Unsupported backButtonPosition value '\" + _this.options.backButtonPosition + \"'\");\n }\n }\n _this._back($menu);\n });\n\n this.$submenus.addClass('invisible');\n if(!this.options.autoHeight) {\n this.$submenus.addClass('drilldown-submenu-cover-previous');\n }\n\n // create a wrapper on element if it doesn't exist.\n if(!this.$element.parent().hasClass('is-drilldown')){\n this.$wrapper = $(this.options.wrapper).addClass('is-drilldown');\n if(this.options.animateHeight) this.$wrapper.addClass('animate-height');\n this.$element.wrap(this.$wrapper);\n }\n // set wrapper\n this.$wrapper = this.$element.parent();\n this.$wrapper.css(this._getMaxDims());\n }\n\n _resize() {\n this.$wrapper.css({'max-width': 'none', 'min-height': 'none'});\n // _getMaxDims has side effects (boo) but calling it should update all other necessary heights & widths\n this.$wrapper.css(this._getMaxDims());\n }\n\n /**\n * Adds event handlers to elements in the menu.\n * @function\n * @private\n * @param {jQuery} $elem - the current menu item to add handlers to.\n */\n _events($elem) {\n var _this = this;\n\n $elem.off('click.zf.drilldown')\n .on('click.zf.drilldown', function(e){\n if($(e.target).parentsUntil('ul', 'li').hasClass('is-drilldown-submenu-parent')){\n e.preventDefault();\n }\n\n // if(e.target !== e.currentTarget.firstElementChild){\n // return false;\n // }\n _this._show($elem.parent('li'));\n\n if(_this.options.closeOnClick){\n var $body = $('body');\n $body.off('.zf.drilldown').on('click.zf.drilldown', function(e){\n if (e.target === _this.$element[0] || $.contains(_this.$element[0], e.target)) { return; }\n e.preventDefault();\n _this._hideAll();\n $body.off('.zf.drilldown');\n });\n }\n });\n }\n\n /**\n * Adds event handlers to the menu element.\n * @function\n * @private\n */\n _registerEvents() {\n if(this.options.scrollTop){\n this._bindHandler = this._scrollTop.bind(this);\n this.$element.on('open.zf.drilldown hide.zf.drilldown close.zf.drilldown closed.zf.drilldown',this._bindHandler);\n }\n this.$element.on('mutateme.zf.trigger', this._resize.bind(this));\n }\n\n /**\n * Scroll to Top of Element or data-scroll-top-element\n * @function\n * @fires Drilldown#scrollme\n */\n _scrollTop() {\n var _this = this;\n var $scrollTopElement = _this.options.scrollTopElement!=''?$(_this.options.scrollTopElement):_this.$element,\n scrollPos = parseInt($scrollTopElement.offset().top+_this.options.scrollTopOffset, 10);\n $('html, body').stop(true).animate({ scrollTop: scrollPos }, _this.options.animationDuration, _this.options.animationEasing,function(){\n /**\n * Fires after the menu has scrolled\n * @event Drilldown#scrollme\n */\n if(this===$('html')[0])_this.$element.trigger('scrollme.zf.drilldown');\n });\n }\n\n /**\n * Adds keydown event listener to `li`'s in the menu.\n * @private\n */\n _keyboardEvents() {\n var _this = this;\n\n this.$menuItems.add(this.$element.find('.js-drilldown-back > a, .is-submenu-parent-item > a')).on('keydown.zf.drilldown', function(e){\n var $element = $(this),\n $elements = $element.parent('li').parent('ul').children('li').children('a'),\n $prevElement,\n $nextElement;\n\n $elements.each(function(i) {\n if ($(this).is($element)) {\n $prevElement = $elements.eq(Math.max(0, i-1));\n $nextElement = $elements.eq(Math.min(i+1, $elements.length-1));\n return;\n }\n });\n\n Keyboard.handleKey(e, 'Drilldown', {\n next: function() {\n if ($element.is(_this.$submenuAnchors)) {\n _this._show($element.parent('li'));\n $element.parent('li').one(transitionend($element), function(){\n $element.parent('li').find('ul li a').not('.js-drilldown-back a').first().focus();\n });\n return true;\n }\n },\n previous: function() {\n _this._hide($element.parent('li').parent('ul'));\n $element.parent('li').parent('ul').one(transitionend($element), function(){\n setTimeout(function() {\n $element.parent('li').parent('ul').parent('li').children('a').first().focus();\n }, 1);\n });\n return true;\n },\n up: function() {\n $prevElement.focus();\n // Don't tap focus on first element in root ul\n return !$element.is(_this.$element.find('> li:first-child > a'));\n },\n down: function() {\n $nextElement.focus();\n // Don't tap focus on last element in root ul\n return !$element.is(_this.$element.find('> li:last-child > a'));\n },\n close: function() {\n // Don't close on element in root ul\n if (!$element.is(_this.$element.find('> li > a'))) {\n _this._hide($element.parent().parent());\n $element.parent().parent().siblings('a').focus();\n }\n },\n open: function() {\n if (_this.options.parentLink && $element.attr('href')) { // Link with href\n return false;\n } else if (!$element.is(_this.$menuItems)) { // not menu item means back button\n _this._hide($element.parent('li').parent('ul'));\n $element.parent('li').parent('ul').one(transitionend($element), function(){\n setTimeout(function() {\n $element.parent('li').parent('ul').parent('li').children('a').first().focus();\n }, 1);\n });\n return true;\n } else if ($element.is(_this.$submenuAnchors)) { // Sub menu item\n _this._show($element.parent('li'));\n $element.parent('li').one(transitionend($element), function(){\n $element.parent('li').find('ul li a').not('.js-drilldown-back a').first().focus();\n });\n return true;\n }\n },\n handled: function(preventDefault) {\n if (preventDefault) {\n e.preventDefault();\n }\n }\n });\n }); // end keyboardAccess\n }\n\n /**\n * Closes all open elements, and returns to root menu.\n * @function\n * @fires Drilldown#close\n * @fires Drilldown#closed\n */\n _hideAll() {\n var $elem = this.$element.find('.is-drilldown-submenu.is-active')\n $elem.addClass('is-closing');\n\n if (this.options.autoHeight) {\n const calcHeight = $elem.parent().closest('ul').data('calcHeight');\n this.$wrapper.css({ height: calcHeight });\n }\n\n /**\n * Fires when the menu is closing.\n * @event Drilldown#close\n */\n this.$element.trigger('close.zf.drilldown');\n\n $elem.one(transitionend($elem), () => {\n $elem.removeClass('is-active is-closing');\n\n /**\n * Fires when the menu is fully closed.\n * @event Drilldown#closed\n */\n this.$element.trigger('closed.zf.drilldown');\n });\n }\n\n /**\n * Adds event listener for each `back` button, and closes open menus.\n * @function\n * @fires Drilldown#back\n * @param {jQuery} $elem - the current sub-menu to add `back` event.\n */\n _back($elem) {\n var _this = this;\n $elem.off('click.zf.drilldown');\n $elem.children('.js-drilldown-back')\n .on('click.zf.drilldown', function(e){\n // console.log('mouseup on back');\n _this._hide($elem);\n\n // If there is a parent submenu, call show\n let parentSubMenu = $elem.parent('li').parent('ul').parent('li');\n if (parentSubMenu.length) {\n _this._show(parentSubMenu);\n }\n });\n }\n\n /**\n * Adds event listener to menu items w/o submenus to close open menus on click.\n * @function\n * @private\n */\n _menuLinkEvents() {\n var _this = this;\n this.$menuItems.not('.is-drilldown-submenu-parent')\n .off('click.zf.drilldown')\n .on('click.zf.drilldown', function(e){\n setTimeout(function(){\n _this._hideAll();\n }, 0);\n });\n }\n\n /**\n * Sets the CSS classes for submenu to show it.\n * @function\n * @private\n * @param {jQuery} $elem - the target submenu (`ul` tag)\n * @param {boolean} trigger - trigger drilldown event\n */\n _setShowSubMenuClasses($elem, trigger) {\n $elem.addClass('is-active').removeClass('invisible').attr('aria-hidden', false);\n $elem.parent('li').attr('aria-expanded', true);\n if (trigger === true) {\n this.$element.trigger('open.zf.drilldown', [$elem]);\n }\n }\n\n /**\n * Sets the CSS classes for submenu to hide it.\n * @function\n * @private\n * @param {jQuery} $elem - the target submenu (`ul` tag)\n * @param {boolean} trigger - trigger drilldown event\n */\n _setHideSubMenuClasses($elem, trigger) {\n $elem.removeClass('is-active').addClass('invisible').attr('aria-hidden', true);\n $elem.parent('li').attr('aria-expanded', false);\n if (trigger === true) {\n $elem.trigger('hide.zf.drilldown', [$elem]);\n }\n }\n\n /**\n * Opens a specific drilldown (sub)menu no matter which (sub)menu in it is currently visible.\n * Compared to _show() this lets you jump into any submenu without clicking through every submenu on the way to it.\n * @function\n * @fires Drilldown#open\n * @param {jQuery} $elem - the target (sub)menu (`ul` tag)\n * @param {boolean} autoFocus - if true the first link in the target (sub)menu gets auto focused\n */\n _showMenu($elem, autoFocus) {\n\n var _this = this;\n\n // Reset drilldown\n var $expandedSubmenus = this.$element.find('li[aria-expanded=\"true\"] > ul[data-submenu]');\n $expandedSubmenus.each(function(index) {\n _this._setHideSubMenuClasses($(this));\n });\n\n // Save the menu as the currently displayed one.\n this.$currentMenu = $elem;\n\n // If target menu is root, focus first link & exit\n if ($elem.is('[data-drilldown]')) {\n if (autoFocus === true) $elem.find('li[role=\"treeitem\"] > a').first().focus();\n if (this.options.autoHeight) this.$wrapper.css('height', $elem.data('calcHeight'));\n return;\n }\n\n // Find all submenus on way to root incl. the element itself\n var $submenus = $elem.children().first().parentsUntil('[data-drilldown]', '[data-submenu]');\n\n // Open target menu and all submenus on its way to root\n $submenus.each(function(index) {\n\n // Update height of first child (target menu) if autoHeight option true\n if (index === 0 && _this.options.autoHeight) {\n _this.$wrapper.css('height', $(this).data('calcHeight'));\n }\n\n var isLastChild = index == $submenus.length - 1;\n\n // Add transitionsend listener to last child (root due to reverse order) to open target menu's first link\n // Last child makes sure the event gets always triggered even if going through several menus\n if (isLastChild === true) {\n $(this).one(transitionend($(this)), () => {\n if (autoFocus === true) {\n $elem.find('li[role=\"treeitem\"] > a').first().focus();\n }\n });\n }\n\n _this._setShowSubMenuClasses($(this), isLastChild);\n });\n }\n\n /**\n * Opens a submenu.\n * @function\n * @fires Drilldown#open\n * @param {jQuery} $elem - the current element with a submenu to open, i.e. the `li` tag.\n */\n _show($elem) {\n const $submenu = $elem.children('[data-submenu]');\n\n $elem.attr('aria-expanded', true);\n\n this.$currentMenu = $submenu;\n $submenu.addClass('is-active').removeClass('invisible').attr('aria-hidden', false);\n if (this.options.autoHeight) {\n this.$wrapper.css({ height: $submenu.data('calcHeight') });\n }\n\n /**\n * Fires when the submenu has opened.\n * @event Drilldown#open\n */\n this.$element.trigger('open.zf.drilldown', [$elem]);\n }\n\n /**\n * Hides a submenu\n * @function\n * @fires Drilldown#hide\n * @param {jQuery} $elem - the current sub-menu to hide, i.e. the `ul` tag.\n */\n _hide($elem) {\n if(this.options.autoHeight) this.$wrapper.css({height:$elem.parent().closest('ul').data('calcHeight')});\n var _this = this;\n $elem.parent('li').attr('aria-expanded', false);\n $elem.attr('aria-hidden', true);\n $elem.addClass('is-closing')\n .one(transitionend($elem), function(){\n $elem.removeClass('is-active is-closing');\n $elem.blur().addClass('invisible');\n });\n /**\n * Fires when the submenu has closed.\n * @event Drilldown#hide\n */\n $elem.trigger('hide.zf.drilldown', [$elem]);\n }\n\n /**\n * Iterates through the nested menus to calculate the min-height, and max-width for the menu.\n * Prevents content jumping.\n * @function\n * @private\n */\n _getMaxDims() {\n var maxHeight = 0, result = {}, _this = this;\n\n // Recalculate menu heights and total max height\n this.$submenus.add(this.$element).each(function(){\n var numOfElems = $(this).children('li').length;\n var height = Box.GetDimensions(this).height;\n\n maxHeight = height > maxHeight ? height : maxHeight;\n\n if(_this.options.autoHeight) {\n $(this).data('calcHeight',height);\n }\n });\n\n if (this.options.autoHeight)\n result['height'] = this.$currentMenu.data('calcHeight');\n else\n result['min-height'] = `${maxHeight}px`;\n\n result['max-width'] = `${this.$element[0].getBoundingClientRect().width}px`;\n\n return result;\n }\n\n /**\n * Destroys the Drilldown Menu\n * @function\n */\n _destroy() {\n if(this.options.scrollTop) this.$element.off('.zf.drilldown',this._bindHandler);\n this._hideAll();\n\t this.$element.off('mutateme.zf.trigger');\n Nest.Burn(this.$element, 'drilldown');\n this.$element.unwrap()\n .find('.js-drilldown-back, .is-submenu-parent-item').remove()\n .end().find('.is-active, .is-closing, .is-drilldown-submenu').removeClass('is-active is-closing is-drilldown-submenu')\n .end().find('[data-submenu]').removeAttr('aria-hidden tabindex role');\n this.$submenuAnchors.each(function() {\n $(this).off('.zf.drilldown');\n });\n\n this.$element.find('[data-is-parent-link]').detach();\n this.$submenus.removeClass('drilldown-submenu-cover-previous invisible');\n\n this.$element.find('a').each(function(){\n var $link = $(this);\n $link.removeAttr('tabindex');\n if($link.data('savedHref')){\n $link.attr('href', $link.data('savedHref')).removeData('savedHref');\n }else{ return; }\n });\n };\n}\n\nDrilldown.defaults = {\n /**\n * Drilldowns depend on styles in order to function properly; in the default build of Foundation these are\n * on the `drilldown` class. This option auto-applies this class to the drilldown upon initialization.\n * @option\n * @type {boolean}\n * @default true\n */\n autoApplyClass: true,\n /**\n * Markup used for JS generated back button. Prepended or appended (see backButtonPosition) to submenu lists and deleted on `destroy` method, 'js-drilldown-back' class required. Remove the backslash (`\\`) if copy and pasting.\n * @option\n * @type {string}\n * @default '<li class=\"js-drilldown-back\"><a tabindex=\"0\">Back</a></li>'\n */\n backButton: '<li class=\"js-drilldown-back\"><a tabindex=\"0\">Back</a></li>',\n /**\n * Position the back button either at the top or bottom of drilldown submenus. Can be `'left'` or `'bottom'`.\n * @option\n * @type {string}\n * @default top\n */\n backButtonPosition: 'top',\n /**\n * Markup used to wrap drilldown menu. Use a class name for independent styling; the JS applied class: `is-drilldown` is required. Remove the backslash (`\\`) if copy and pasting.\n * @option\n * @type {string}\n * @default '<div></div>'\n */\n wrapper: '<div></div>',\n /**\n * Adds the parent link to the submenu.\n * @option\n * @type {boolean}\n * @default false\n */\n parentLink: false,\n /**\n * Allow the menu to return to root list on body click.\n * @option\n * @type {boolean}\n * @default false\n */\n closeOnClick: false,\n /**\n * Allow the menu to auto adjust height.\n * @option\n * @type {boolean}\n * @default false\n */\n autoHeight: false,\n /**\n * Animate the auto adjust height.\n * @option\n * @type {boolean}\n * @default false\n */\n animateHeight: false,\n /**\n * Scroll to the top of the menu after opening a submenu or navigating back using the menu back button\n * @option\n * @type {boolean}\n * @default false\n */\n scrollTop: false,\n /**\n * String jquery selector (for example 'body') of element to take offset().top from, if empty string the drilldown menu offset().top is taken\n * @option\n * @type {string}\n * @default ''\n */\n scrollTopElement: '',\n /**\n * ScrollTop offset\n * @option\n * @type {number}\n * @default 0\n */\n scrollTopOffset: 0,\n /**\n * Scroll animation duration\n * @option\n * @type {number}\n * @default 500\n */\n animationDuration: 500,\n /**\n * Scroll animation easing. Can be `'swing'` or `'linear'`.\n * @option\n * @type {string}\n * @see {@link https://api.jquery.com/animate|JQuery animate}\n * @default 'swing'\n */\n animationEasing: 'swing'\n // holdOpen: false\n};\n\nexport {Drilldown};\n","'use strict';\n\nimport $ from 'jquery';\nimport { Keyboard } from './foundation.util.keyboard';\nimport { GetYoDigits, ignoreMousedisappear } from './foundation.core.utils';\nimport { Positionable } from './foundation.positionable';\n\nimport { Triggers } from './foundation.util.triggers';\nimport { Touch } from './foundation.util.touch'\n\n/**\n * Dropdown module.\n * @module foundation.dropdown\n * @requires foundation.util.keyboard\n * @requires foundation.util.box\n * @requires foundation.util.touch\n * @requires foundation.util.triggers\n */\nclass Dropdown extends Positionable {\n /**\n * Creates a new instance of a dropdown.\n * @class\n * @name Dropdown\n * @param {jQuery} element - jQuery object to make into a dropdown.\n * Object should be of the dropdown panel, rather than its anchor.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element, options) {\n this.$element = element;\n this.options = $.extend({}, Dropdown.defaults, this.$element.data(), options);\n this.className = 'Dropdown'; // ie9 back compat\n\n // Touch and Triggers init are idempotent, just need to make sure they are initialized\n Touch.init($);\n Triggers.init($);\n\n this._init();\n\n Keyboard.register('Dropdown', {\n 'ENTER': 'toggle',\n 'SPACE': 'toggle',\n 'ESCAPE': 'close'\n });\n }\n\n /**\n * Initializes the plugin by setting/checking options and attributes, adding helper variables, and saving the anchor.\n * @function\n * @private\n */\n _init() {\n var $id = this.$element.attr('id');\n\n this.$anchors = $(`[data-toggle=\"${$id}\"]`).length ? $(`[data-toggle=\"${$id}\"]`) : $(`[data-open=\"${$id}\"]`);\n this.$anchors.attr({\n 'aria-controls': $id,\n 'data-is-focus': false,\n 'data-yeti-box': $id,\n 'aria-haspopup': true,\n 'aria-expanded': false\n });\n\n this._setCurrentAnchor(this.$anchors.first());\n\n if(this.options.parentClass){\n this.$parent = this.$element.parents('.' + this.options.parentClass);\n }else{\n this.$parent = null;\n }\n\n // Set [aria-labelledby] on the Dropdown if it is not set\n if (typeof this.$element.attr('aria-labelledby') === 'undefined') {\n // Get the anchor ID or create one\n if (typeof this.$currentAnchor.attr('id') === 'undefined') {\n this.$currentAnchor.attr('id', GetYoDigits(6, 'dd-anchor'));\n }\n\n this.$element.attr('aria-labelledby', this.$currentAnchor.attr('id'));\n }\n\n this.$element.attr({\n 'aria-hidden': 'true',\n 'data-yeti-box': $id,\n 'data-resize': $id,\n });\n\n super._init();\n this._events();\n }\n\n _getDefaultPosition() {\n // handle legacy classnames\n var position = this.$element[0].className.match(/(top|left|right|bottom)/g);\n if(position) {\n return position[0];\n } else {\n return 'bottom'\n }\n }\n\n _getDefaultAlignment() {\n // handle legacy float approach\n var horizontalPosition = /float-(\\S+)/.exec(this.$currentAnchor.attr('class'));\n if(horizontalPosition) {\n return horizontalPosition[1];\n }\n\n return super._getDefaultAlignment();\n }\n\n\n\n /**\n * Sets the position and orientation of the dropdown pane, checks for collisions if allow-overlap is not true.\n * Recursively calls itself if a collision is detected, with a new position class.\n * @function\n * @private\n */\n _setPosition() {\n this.$element.removeClass(`has-position-${this.position} has-alignment-${this.alignment}`);\n super._setPosition(this.$currentAnchor, this.$element, this.$parent);\n this.$element.addClass(`has-position-${this.position} has-alignment-${this.alignment}`);\n }\n\n /**\n * Make it a current anchor.\n * Current anchor as the reference for the position of Dropdown panes.\n * @param {HTML} el - DOM element of the anchor.\n * @function\n * @private\n */\n _setCurrentAnchor(el) {\n this.$currentAnchor = $(el);\n }\n\n /**\n * Adds event listeners to the element utilizing the triggers utility library.\n * @function\n * @private\n */\n _events() {\n var _this = this,\n hasTouch = 'ontouchstart' in window || (typeof window.ontouchstart !== 'undefined');\n\n this.$element.on({\n 'open.zf.trigger': this.open.bind(this),\n 'close.zf.trigger': this.close.bind(this),\n 'toggle.zf.trigger': this.toggle.bind(this),\n 'resizeme.zf.trigger': this._setPosition.bind(this)\n });\n\n this.$anchors.off('click.zf.trigger')\n .on('click.zf.trigger', function(e) {\n _this._setCurrentAnchor(this);\n\n if (\n // if forceFollow false, always prevent default action\n (_this.options.forceFollow === false) ||\n // if forceFollow true and hover option true, only prevent default action on 1st click\n // on 2nd click (dropown opened) the default action (e.g. follow a href) gets executed\n (hasTouch && _this.options.hover && _this.$element.hasClass('is-open') === false)\n ) {\n e.preventDefault();\n }\n });\n\n if(this.options.hover){\n this.$anchors.off('mouseenter.zf.dropdown mouseleave.zf.dropdown')\n .on('mouseenter.zf.dropdown', function(){\n _this._setCurrentAnchor(this);\n\n var bodyData = $('body').data();\n if(typeof(bodyData.whatinput) === 'undefined' || bodyData.whatinput === 'mouse') {\n clearTimeout(_this.timeout);\n _this.timeout = setTimeout(function(){\n _this.open();\n _this.$anchors.data('hover', true);\n }, _this.options.hoverDelay);\n }\n }).on('mouseleave.zf.dropdown', ignoreMousedisappear(function(){\n clearTimeout(_this.timeout);\n _this.timeout = setTimeout(function(){\n _this.close();\n _this.$anchors.data('hover', false);\n }, _this.options.hoverDelay);\n }));\n if(this.options.hoverPane){\n this.$element.off('mouseenter.zf.dropdown mouseleave.zf.dropdown')\n .on('mouseenter.zf.dropdown', function(){\n clearTimeout(_this.timeout);\n }).on('mouseleave.zf.dropdown', ignoreMousedisappear(function(){\n clearTimeout(_this.timeout);\n _this.timeout = setTimeout(function(){\n _this.close();\n _this.$anchors.data('hover', false);\n }, _this.options.hoverDelay);\n }));\n }\n }\n this.$anchors.add(this.$element).on('keydown.zf.dropdown', function(e) {\n\n var $target = $(this),\n visibleFocusableElements = Keyboard.findFocusable(_this.$element);\n\n Keyboard.handleKey(e, 'Dropdown', {\n open: function() {\n if ($target.is(_this.$anchors) && !$target.is('input, textarea')) {\n _this.open();\n _this.$element.attr('tabindex', -1).focus();\n e.preventDefault();\n }\n },\n close: function() {\n _this.close();\n _this.$anchors.focus();\n }\n });\n });\n }\n\n /**\n * Adds an event handler to the body to close any dropdowns on a click.\n * @function\n * @private\n */\n _addBodyHandler() {\n var $body = $(document.body).not(this.$element),\n _this = this;\n $body.off('click.zf.dropdown tap.zf.dropdown')\n .on('click.zf.dropdown tap.zf.dropdown', function (e) {\n if(_this.$anchors.is(e.target) || _this.$anchors.find(e.target).length) {\n return;\n }\n if(_this.$element.is(e.target) || _this.$element.find(e.target).length) {\n return;\n }\n _this.close();\n $body.off('click.zf.dropdown tap.zf.dropdown');\n });\n }\n\n /**\n * Opens the dropdown pane, and fires a bubbling event to close other dropdowns.\n * @function\n * @fires Dropdown#closeme\n * @fires Dropdown#show\n */\n open() {\n // var _this = this;\n /**\n * Fires to close other open dropdowns, typically when dropdown is opening\n * @event Dropdown#closeme\n */\n this.$element.trigger('closeme.zf.dropdown', this.$element.attr('id'));\n this.$anchors.addClass('hover')\n .attr({'aria-expanded': true});\n // this.$element/*.show()*/;\n\n this.$element.addClass('is-opening');\n this._setPosition();\n this.$element.removeClass('is-opening').addClass('is-open')\n .attr({'aria-hidden': false});\n\n if(this.options.autoFocus){\n var $focusable = Keyboard.findFocusable(this.$element);\n if($focusable.length){\n $focusable.eq(0).focus();\n }\n }\n\n if(this.options.closeOnClick){ this._addBodyHandler(); }\n\n if (this.options.trapFocus) {\n Keyboard.trapFocus(this.$element);\n }\n\n /**\n * Fires once the dropdown is visible.\n * @event Dropdown#show\n */\n this.$element.trigger('show.zf.dropdown', [this.$element]);\n }\n\n /**\n * Closes the open dropdown pane.\n * @function\n * @fires Dropdown#hide\n */\n close() {\n if(!this.$element.hasClass('is-open')){\n return false;\n }\n this.$element.removeClass('is-open')\n .attr({'aria-hidden': true});\n\n this.$anchors.removeClass('hover')\n .attr('aria-expanded', false);\n\n /**\n * Fires once the dropdown is no longer visible.\n * @event Dropdown#hide\n */\n this.$element.trigger('hide.zf.dropdown', [this.$element]);\n\n if (this.options.trapFocus) {\n Keyboard.releaseFocus(this.$element);\n }\n }\n\n /**\n * Toggles the dropdown pane's visibility.\n * @function\n */\n toggle() {\n if(this.$element.hasClass('is-open')){\n if(this.$anchors.data('hover')) return;\n this.close();\n }else{\n this.open();\n }\n }\n\n /**\n * Destroys the dropdown.\n * @function\n */\n _destroy() {\n this.$element.off('.zf.trigger').hide();\n this.$anchors.off('.zf.dropdown');\n $(document.body).off('click.zf.dropdown tap.zf.dropdown');\n\n }\n}\n\nDropdown.defaults = {\n /**\n * Class that designates bounding container of Dropdown (default: window)\n * @option\n * @type {?string}\n * @default null\n */\n parentClass: null,\n /**\n * Amount of time to delay opening a submenu on hover event.\n * @option\n * @type {number}\n * @default 250\n */\n hoverDelay: 250,\n /**\n * Allow submenus to open on hover events\n * @option\n * @type {boolean}\n * @default false\n */\n hover: false,\n /**\n * Don't close dropdown when hovering over dropdown pane\n * @option\n * @type {boolean}\n * @default false\n */\n hoverPane: false,\n /**\n * Number of pixels between the dropdown pane and the triggering element on open.\n * @option\n * @type {number}\n * @default 0\n */\n vOffset: 0,\n /**\n * Number of pixels between the dropdown pane and the triggering element on open.\n * @option\n * @type {number}\n * @default 0\n */\n hOffset: 0,\n /**\n * Position of dropdown. Can be left, right, bottom, top, or auto.\n * @option\n * @type {string}\n * @default 'auto'\n */\n position: 'auto',\n /**\n * Alignment of dropdown relative to anchor. Can be left, right, bottom, top, center, or auto.\n * @option\n * @type {string}\n * @default 'auto'\n */\n alignment: 'auto',\n /**\n * Allow overlap of container/window. If false, dropdown will first try to position as defined by data-position and data-alignment, but reposition if it would cause an overflow.\n * @option\n * @type {boolean}\n * @default false\n */\n allowOverlap: false,\n /**\n * Allow overlap of only the bottom of the container. This is the most common\n * behavior for dropdowns, allowing the dropdown to extend the bottom of the\n * screen but not otherwise influence or break out of the container.\n * @option\n * @type {boolean}\n * @default true\n */\n allowBottomOverlap: true,\n /**\n * Allow the plugin to trap focus to the dropdown pane if opened with keyboard commands.\n * @option\n * @type {boolean}\n * @default false\n */\n trapFocus: false,\n /**\n * Allow the plugin to set focus to the first focusable element within the pane, regardless of method of opening.\n * @option\n * @type {boolean}\n * @default false\n */\n autoFocus: false,\n /**\n * Allows a click on the body to close the dropdown.\n * @option\n * @type {boolean}\n * @default false\n */\n closeOnClick: false,\n /**\n * If true the default action of the toggle (e.g. follow a link with href) gets executed on click. If hover option is also true the default action gets prevented on first click for mobile / touch devices and executed on second click.\n * @option\n * @type {boolean}\n * @default true\n */\n forceFollow: true\n};\n\nexport {Dropdown};\n","'use strict';\n\nimport $ from 'jquery';\nimport { Plugin } from './foundation.core.plugin';\nimport { rtl as Rtl, ignoreMousedisappear } from './foundation.core.utils';\nimport { Keyboard } from './foundation.util.keyboard';\nimport { Nest } from './foundation.util.nest';\nimport { Box } from './foundation.util.box';\nimport { Touch } from './foundation.util.touch'\n\n\n/**\n * DropdownMenu module.\n * @module foundation.dropdownMenu\n * @requires foundation.util.keyboard\n * @requires foundation.util.box\n * @requires foundation.util.nest\n * @requires foundation.util.touch\n */\n\nclass DropdownMenu extends Plugin {\n /**\n * Creates a new instance of DropdownMenu.\n * @class\n * @name DropdownMenu\n * @fires DropdownMenu#init\n * @param {jQuery} element - jQuery object to make into a dropdown menu.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element, options) {\n this.$element = element;\n this.options = $.extend({}, DropdownMenu.defaults, this.$element.data(), options);\n this.className = 'DropdownMenu'; // ie9 back compat\n\n Touch.init($); // Touch init is idempotent, we just need to make sure it's initialied.\n\n this._init();\n\n Keyboard.register('DropdownMenu', {\n 'ENTER': 'open',\n 'SPACE': 'open',\n 'ARROW_RIGHT': 'next',\n 'ARROW_UP': 'up',\n 'ARROW_DOWN': 'down',\n 'ARROW_LEFT': 'previous',\n 'ESCAPE': 'close'\n });\n }\n\n /**\n * Initializes the plugin, and calls _prepareMenu\n * @private\n * @function\n */\n _init() {\n Nest.Feather(this.$element, 'dropdown');\n\n var subs = this.$element.find('li.is-dropdown-submenu-parent');\n this.$element.children('.is-dropdown-submenu-parent').children('.is-dropdown-submenu').addClass('first-sub');\n\n this.$menuItems = this.$element.find('li[role=\"none\"]');\n this.$tabs = this.$element.children('li[role=\"none\"]');\n this.$tabs.find('ul.is-dropdown-submenu').addClass(this.options.verticalClass);\n\n if (this.options.alignment === 'auto') {\n if (this.$element.hasClass(this.options.rightClass) || Rtl() || this.$element.parents('.top-bar-right').is('*')) {\n this.options.alignment = 'right';\n subs.addClass('opens-left');\n } else {\n this.options.alignment = 'left';\n subs.addClass('opens-right');\n }\n } else {\n if (this.options.alignment === 'right') {\n subs.addClass('opens-left');\n } else {\n subs.addClass('opens-right');\n }\n }\n this.changed = false;\n this._events();\n };\n\n _isVertical() {\n return this.$tabs.css('display') === 'block' || this.$element.css('flex-direction') === 'column';\n }\n\n _isRtl() {\n return this.$element.hasClass('align-right') || (Rtl() && !this.$element.hasClass('align-left'));\n }\n\n /**\n * Adds event listeners to elements within the menu\n * @private\n * @function\n */\n _events() {\n var _this = this,\n hasTouch = 'ontouchstart' in window || (typeof window.ontouchstart !== 'undefined'),\n parClass = 'is-dropdown-submenu-parent';\n\n // used for onClick and in the keyboard handlers\n var handleClickFn = function(e) {\n var $elem = $(e.target).parentsUntil('ul', `.${parClass}`),\n hasSub = $elem.hasClass(parClass),\n hasClicked = $elem.attr('data-is-click') === 'true',\n $sub = $elem.children('.is-dropdown-submenu');\n\n if (hasSub) {\n if (hasClicked) {\n if (!_this.options.closeOnClick\n || (!_this.options.clickOpen && !hasTouch)\n || (_this.options.forceFollow && hasTouch)) {\n return;\n }\n e.stopImmediatePropagation();\n e.preventDefault();\n _this._hide($elem);\n }\n else {\n e.stopImmediatePropagation();\n e.preventDefault();\n _this._show($sub);\n $elem.add($elem.parentsUntil(_this.$element, `.${parClass}`)).attr('data-is-click', true);\n }\n }\n };\n\n if (this.options.clickOpen || hasTouch) {\n this.$menuItems.on('click.zf.dropdownMenu touchstart.zf.dropdownMenu', handleClickFn);\n }\n\n // Handle Leaf element Clicks\n if(_this.options.closeOnClickInside){\n this.$menuItems.on('click.zf.dropdownMenu', function(e) {\n var $elem = $(this),\n hasSub = $elem.hasClass(parClass);\n if(!hasSub){\n _this._hide();\n }\n });\n }\n\n if (!this.options.disableHover) {\n this.$menuItems.on('mouseenter.zf.dropdownMenu', function (e) {\n var $elem = $(this),\n hasSub = $elem.hasClass(parClass);\n\n if (hasSub) {\n clearTimeout($elem.data('_delay'));\n $elem.data('_delay', setTimeout(function () {\n _this._show($elem.children('.is-dropdown-submenu'));\n }, _this.options.hoverDelay));\n }\n }).on('mouseleave.zf.dropdownMenu', ignoreMousedisappear(function (e) {\n var $elem = $(this),\n hasSub = $elem.hasClass(parClass);\n if (hasSub && _this.options.autoclose) {\n if ($elem.attr('data-is-click') === 'true' && _this.options.clickOpen) { return false; }\n\n clearTimeout($elem.data('_delay'));\n $elem.data('_delay', setTimeout(function () {\n _this._hide($elem);\n }, _this.options.closingTime));\n }\n }));\n }\n this.$menuItems.on('keydown.zf.dropdownMenu', function(e) {\n var $element = $(e.target).parentsUntil('ul', '[role=\"none\"]'),\n isTab = _this.$tabs.index($element) > -1,\n $elements = isTab ? _this.$tabs : $element.siblings('li').add($element),\n $prevElement,\n $nextElement;\n\n $elements.each(function(i) {\n if ($(this).is($element)) {\n $prevElement = $elements.eq(i-1);\n $nextElement = $elements.eq(i+1);\n return;\n }\n });\n\n var nextSibling = function() {\n $nextElement.children('a:first').focus();\n e.preventDefault();\n }, prevSibling = function() {\n $prevElement.children('a:first').focus();\n e.preventDefault();\n }, openSub = function() {\n var $sub = $element.children('ul.is-dropdown-submenu');\n if ($sub.length) {\n _this._show($sub);\n $element.find('li > a:first').focus();\n e.preventDefault();\n } else { return; }\n }, closeSub = function() {\n //if ($element.is(':first-child')) {\n var close = $element.parent('ul').parent('li');\n close.children('a:first').focus();\n _this._hide(close);\n e.preventDefault();\n //}\n };\n var functions = {\n open: openSub,\n close: function() {\n _this._hide(_this.$element);\n _this.$menuItems.eq(0).children('a').focus(); // focus to first element\n e.preventDefault();\n }\n };\n\n if (isTab) {\n if (_this._isVertical()) { // vertical menu\n if (_this._isRtl()) { // right aligned\n $.extend(functions, {\n down: nextSibling,\n up: prevSibling,\n next: closeSub,\n previous: openSub\n });\n } else { // left aligned\n $.extend(functions, {\n down: nextSibling,\n up: prevSibling,\n next: openSub,\n previous: closeSub\n });\n }\n } else { // horizontal menu\n if (_this._isRtl()) { // right aligned\n $.extend(functions, {\n next: prevSibling,\n previous: nextSibling,\n down: openSub,\n up: closeSub\n });\n } else { // left aligned\n $.extend(functions, {\n next: nextSibling,\n previous: prevSibling,\n down: openSub,\n up: closeSub\n });\n }\n }\n } else { // not tabs -> one sub\n if (_this._isRtl()) { // right aligned\n $.extend(functions, {\n next: closeSub,\n previous: openSub,\n down: nextSibling,\n up: prevSibling\n });\n } else { // left aligned\n $.extend(functions, {\n next: openSub,\n previous: closeSub,\n down: nextSibling,\n up: prevSibling\n });\n }\n }\n Keyboard.handleKey(e, 'DropdownMenu', functions);\n\n });\n }\n\n /**\n * Adds an event handler to the body to close any dropdowns on a click.\n * @function\n * @private\n */\n _addBodyHandler() {\n const $body = $(document.body);\n this._removeBodyHandler();\n $body.on('click.zf.dropdownMenu tap.zf.dropdownMenu', (e) => {\n var isItself = !!$(e.target).closest(this.$element).length;\n if (isItself) return;\n\n this._hide();\n this._removeBodyHandler();\n });\n }\n\n /**\n * Remove the body event handler. See `_addBodyHandler`.\n * @function\n * @private\n */\n _removeBodyHandler() {\n $(document.body).off('click.zf.dropdownMenu tap.zf.dropdownMenu');\n }\n\n /**\n * Opens a dropdown pane, and checks for collisions first.\n * @param {jQuery} $sub - ul element that is a submenu to show\n * @function\n * @private\n * @fires DropdownMenu#show\n */\n _show($sub) {\n var idx = this.$tabs.index(this.$tabs.filter(function(i, el) {\n return $(el).find($sub).length > 0;\n }));\n var $sibs = $sub.parent('li.is-dropdown-submenu-parent').siblings('li.is-dropdown-submenu-parent');\n this._hide($sibs, idx);\n $sub.css('visibility', 'hidden').addClass('js-dropdown-active')\n .parent('li.is-dropdown-submenu-parent').addClass('is-active');\n var clear = Box.ImNotTouchingYou($sub, null, true);\n if (!clear) {\n var oldClass = this.options.alignment === 'left' ? '-right' : '-left',\n $parentLi = $sub.parent('.is-dropdown-submenu-parent');\n $parentLi.removeClass(`opens${oldClass}`).addClass(`opens-${this.options.alignment}`);\n clear = Box.ImNotTouchingYou($sub, null, true);\n if (!clear) {\n $parentLi.removeClass(`opens-${this.options.alignment}`).addClass('opens-inner');\n }\n this.changed = true;\n }\n $sub.css('visibility', '');\n if (this.options.closeOnClick) { this._addBodyHandler(); }\n /**\n * Fires when the new dropdown pane is visible.\n * @event DropdownMenu#show\n */\n this.$element.trigger('show.zf.dropdownMenu', [$sub]);\n }\n\n /**\n * Hides a single, currently open dropdown pane, if passed a parameter, otherwise, hides everything.\n * @function\n * @param {jQuery} $elem - element with a submenu to hide\n * @param {Number} idx - index of the $tabs collection to hide\n * @fires DropdownMenu#hide\n * @private\n */\n _hide($elem, idx) {\n var $toClose;\n if ($elem && $elem.length) {\n $toClose = $elem;\n } else if (typeof idx !== 'undefined') {\n $toClose = this.$tabs.not(function(i, el) {\n return i === idx;\n });\n }\n else {\n $toClose = this.$element;\n }\n var somethingToClose = $toClose.hasClass('is-active') || $toClose.find('.is-active').length > 0;\n\n if (somethingToClose) {\n var $activeItem = $toClose.find('li.is-active');\n $activeItem.add($toClose).attr({\n 'data-is-click': false\n }).removeClass('is-active');\n\n $toClose.find('ul.js-dropdown-active').removeClass('js-dropdown-active');\n\n if (this.changed || $toClose.find('opens-inner').length) {\n var oldClass = this.options.alignment === 'left' ? 'right' : 'left';\n $toClose.find('li.is-dropdown-submenu-parent').add($toClose)\n .removeClass(`opens-inner opens-${this.options.alignment}`)\n .addClass(`opens-${oldClass}`);\n this.changed = false;\n }\n\n clearTimeout($activeItem.data('_delay'));\n this._removeBodyHandler();\n\n /**\n * Fires when the open menus are closed.\n * @event DropdownMenu#hide\n */\n this.$element.trigger('hide.zf.dropdownMenu', [$toClose]);\n }\n }\n\n /**\n * Destroys the plugin.\n * @function\n */\n _destroy() {\n this.$menuItems.off('.zf.dropdownMenu').removeAttr('data-is-click')\n .removeClass('is-right-arrow is-left-arrow is-down-arrow opens-right opens-left opens-inner');\n $(document.body).off('.zf.dropdownMenu');\n Nest.Burn(this.$element, 'dropdown');\n }\n}\n\n/**\n * Default settings for plugin\n */\nDropdownMenu.defaults = {\n /**\n * Disallows hover events from opening submenus\n * @option\n * @type {boolean}\n * @default false\n */\n disableHover: false,\n /**\n * Allow a submenu to automatically close on a mouseleave event, if not clicked open.\n * @option\n * @type {boolean}\n * @default true\n */\n autoclose: true,\n /**\n * Amount of time to delay opening a submenu on hover event.\n * @option\n * @type {number}\n * @default 50\n */\n hoverDelay: 50,\n /**\n * Allow a submenu to open/remain open on parent click event. Allows cursor to move away from menu.\n * @option\n * @type {boolean}\n * @default false\n */\n clickOpen: false,\n /**\n * Amount of time to delay closing a submenu on a mouseleave event.\n * @option\n * @type {number}\n * @default 500\n */\n\n closingTime: 500,\n /**\n * Position of the menu relative to what direction the submenus should open. Handled by JS. Can be `'auto'`, `'left'` or `'right'`.\n * @option\n * @type {string}\n * @default 'auto'\n */\n alignment: 'auto',\n /**\n * Allow clicks on the body to close any open submenus.\n * @option\n * @type {boolean}\n * @default true\n */\n closeOnClick: true,\n /**\n * Allow clicks on leaf anchor links to close any open submenus.\n * @option\n * @type {boolean}\n * @default true\n */\n closeOnClickInside: true,\n /**\n * Class applied to vertical oriented menus, Foundation default is `vertical`. Update this if using your own class.\n * @option\n * @type {string}\n * @default 'vertical'\n */\n verticalClass: 'vertical',\n /**\n * Class applied to right-side oriented menus, Foundation default is `align-right`. Update this if using your own class.\n * @option\n * @type {string}\n * @default 'align-right'\n */\n rightClass: 'align-right',\n /**\n * Boolean to force overide the clicking of links to perform default action, on second touch event for mobile.\n * @option\n * @type {boolean}\n * @default true\n */\n forceFollow: true\n};\n\nexport {DropdownMenu};\n","'use strict';\n\nimport $ from 'jquery';\nimport { MediaQuery } from './foundation.util.mediaQuery';\nimport { onImagesLoaded } from './foundation.util.imageLoader';\nimport { GetYoDigits } from './foundation.core.utils';\nimport { Plugin } from './foundation.core.plugin';\n\n/**\n * Equalizer module.\n * @module foundation.equalizer\n * @requires foundation.util.mediaQuery\n * @requires foundation.util.imageLoader if equalizer contains images\n */\n\nclass Equalizer extends Plugin {\n /**\n * Creates a new instance of Equalizer.\n * @class\n * @name Equalizer\n * @fires Equalizer#init\n * @param {Object} element - jQuery object to add the trigger to.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element, options){\n this.$element = element;\n this.options = $.extend({}, Equalizer.defaults, this.$element.data(), options);\n this.className = 'Equalizer'; // ie9 back compat\n\n this._init();\n }\n\n /**\n * Initializes the Equalizer plugin and calls functions to get equalizer functioning on load.\n * @private\n */\n _init() {\n var eqId = this.$element.attr('data-equalizer') || '';\n var $watched = this.$element.find(`[data-equalizer-watch=\"${eqId}\"]`);\n\n MediaQuery._init();\n\n this.$watched = $watched.length ? $watched : this.$element.find('[data-equalizer-watch]');\n this.$element.attr('data-resize', (eqId || GetYoDigits(6, 'eq')));\n this.$element.attr('data-mutate', (eqId || GetYoDigits(6, 'eq')));\n\n this.hasNested = this.$element.find('[data-equalizer]').length > 0;\n this.isNested = this.$element.parentsUntil(document.body, '[data-equalizer]').length > 0;\n this.isOn = false;\n this._bindHandler = {\n onResizeMeBound: this._onResizeMe.bind(this),\n onPostEqualizedBound: this._onPostEqualized.bind(this)\n };\n\n var imgs = this.$element.find('img');\n var tooSmall;\n if(this.options.equalizeOn){\n tooSmall = this._checkMQ();\n $(window).on('changed.zf.mediaquery', this._checkMQ.bind(this));\n }else{\n this._events();\n }\n if((typeof tooSmall !== 'undefined' && tooSmall === false) || typeof tooSmall === 'undefined'){\n if(imgs.length){\n onImagesLoaded(imgs, this._reflow.bind(this));\n }else{\n this._reflow();\n }\n }\n }\n\n /**\n * Removes event listeners if the breakpoint is too small.\n * @private\n */\n _pauseEvents() {\n this.isOn = false;\n this.$element.off({\n '.zf.equalizer': this._bindHandler.onPostEqualizedBound,\n 'resizeme.zf.trigger': this._bindHandler.onResizeMeBound,\n\t 'mutateme.zf.trigger': this._bindHandler.onResizeMeBound\n });\n }\n\n /**\n * function to handle $elements resizeme.zf.trigger, with bound this on _bindHandler.onResizeMeBound\n * @private\n */\n _onResizeMe(e) {\n this._reflow();\n }\n\n /**\n * function to handle $elements postequalized.zf.equalizer, with bound this on _bindHandler.onPostEqualizedBound\n * @private\n */\n _onPostEqualized(e) {\n if(e.target !== this.$element[0]){ this._reflow(); }\n }\n\n /**\n * Initializes events for Equalizer.\n * @private\n */\n _events() {\n var _this = this;\n this._pauseEvents();\n if(this.hasNested){\n this.$element.on('postequalized.zf.equalizer', this._bindHandler.onPostEqualizedBound);\n }else{\n this.$element.on('resizeme.zf.trigger', this._bindHandler.onResizeMeBound);\n\t this.$element.on('mutateme.zf.trigger', this._bindHandler.onResizeMeBound);\n }\n this.isOn = true;\n }\n\n /**\n * Checks the current breakpoint to the minimum required size.\n * @private\n */\n _checkMQ() {\n var tooSmall = !MediaQuery.is(this.options.equalizeOn);\n if(tooSmall){\n if(this.isOn){\n this._pauseEvents();\n this.$watched.css('height', 'auto');\n }\n }else{\n if(!this.isOn){\n this._events();\n }\n }\n return tooSmall;\n }\n\n /**\n * A noop version for the plugin\n * @private\n */\n _killswitch() {\n return;\n }\n\n /**\n * Calls necessary functions to update Equalizer upon DOM change\n * @private\n */\n _reflow() {\n if(!this.options.equalizeOnStack){\n if(this._isStacked()){\n this.$watched.css('height', 'auto');\n return false;\n }\n }\n if (this.options.equalizeByRow) {\n this.getHeightsByRow(this.applyHeightByRow.bind(this));\n }else{\n this.getHeights(this.applyHeight.bind(this));\n }\n }\n\n /**\n * Manually determines if the first 2 elements are *NOT* stacked.\n * @private\n */\n _isStacked() {\n if (!this.$watched[0] || !this.$watched[1]) {\n return true;\n }\n return this.$watched[0].getBoundingClientRect().top !== this.$watched[1].getBoundingClientRect().top;\n }\n\n /**\n * Finds the outer heights of children contained within an Equalizer parent and returns them in an array\n * @param {Function} cb - A non-optional callback to return the heights array to.\n * @returns {Array} heights - An array of heights of children within Equalizer container\n */\n getHeights(cb) {\n var heights = [];\n for(var i = 0, len = this.$watched.length; i < len; i++){\n this.$watched[i].style.height = 'auto';\n heights.push(this.$watched[i].offsetHeight);\n }\n cb(heights);\n }\n\n /**\n * Finds the outer heights of children contained within an Equalizer parent and returns them in an array\n * @param {Function} cb - A non-optional callback to return the heights array to.\n * @returns {Array} groups - An array of heights of children within Equalizer container grouped by row with element,height and max as last child\n */\n getHeightsByRow(cb) {\n var lastElTopOffset = (this.$watched.length ? this.$watched.first().offset().top : 0),\n groups = [],\n group = 0;\n //group by Row\n groups[group] = [];\n for(var i = 0, len = this.$watched.length; i < len; i++){\n this.$watched[i].style.height = 'auto';\n //maybe could use this.$watched[i].offsetTop\n var elOffsetTop = $(this.$watched[i]).offset().top;\n if (elOffsetTop!=lastElTopOffset) {\n group++;\n groups[group] = [];\n lastElTopOffset=elOffsetTop;\n }\n groups[group].push([this.$watched[i],this.$watched[i].offsetHeight]);\n }\n\n for (var j = 0, ln = groups.length; j < ln; j++) {\n var heights = $(groups[j]).map(function(){ return this[1]; }).get();\n var max = Math.max.apply(null, heights);\n groups[j].push(max);\n }\n cb(groups);\n }\n\n /**\n * Changes the CSS height property of each child in an Equalizer parent to match the tallest\n * @param {array} heights - An array of heights of children within Equalizer container\n * @fires Equalizer#preequalized\n * @fires Equalizer#postequalized\n */\n applyHeight(heights) {\n var max = Math.max.apply(null, heights);\n /**\n * Fires before the heights are applied\n * @event Equalizer#preequalized\n */\n this.$element.trigger('preequalized.zf.equalizer');\n\n this.$watched.css('height', max);\n\n /**\n * Fires when the heights have been applied\n * @event Equalizer#postequalized\n */\n this.$element.trigger('postequalized.zf.equalizer');\n }\n\n /**\n * Changes the CSS height property of each child in an Equalizer parent to match the tallest by row\n * @param {array} groups - An array of heights of children within Equalizer container grouped by row with element,height and max as last child\n * @fires Equalizer#preequalized\n * @fires Equalizer#preequalizedrow\n * @fires Equalizer#postequalizedrow\n * @fires Equalizer#postequalized\n */\n applyHeightByRow(groups) {\n /**\n * Fires before the heights are applied\n */\n this.$element.trigger('preequalized.zf.equalizer');\n for (var i = 0, len = groups.length; i < len ; i++) {\n var groupsILength = groups[i].length,\n max = groups[i][groupsILength - 1];\n if (groupsILength<=2) {\n $(groups[i][0][0]).css({'height':'auto'});\n continue;\n }\n /**\n * Fires before the heights per row are applied\n * @event Equalizer#preequalizedrow\n */\n this.$element.trigger('preequalizedrow.zf.equalizer');\n for (var j = 0, lenJ = (groupsILength-1); j < lenJ ; j++) {\n $(groups[i][j][0]).css({'height':max});\n }\n /**\n * Fires when the heights per row have been applied\n * @event Equalizer#postequalizedrow\n */\n this.$element.trigger('postequalizedrow.zf.equalizer');\n }\n /**\n * Fires when the heights have been applied\n */\n this.$element.trigger('postequalized.zf.equalizer');\n }\n\n /**\n * Destroys an instance of Equalizer.\n * @function\n */\n _destroy() {\n this._pauseEvents();\n this.$watched.css('height', 'auto');\n }\n}\n\n/**\n * Default settings for plugin\n */\nEqualizer.defaults = {\n /**\n * Enable height equalization when stacked on smaller screens.\n * @option\n * @type {boolean}\n * @default false\n */\n equalizeOnStack: false,\n /**\n * Enable height equalization row by row.\n * @option\n * @type {boolean}\n * @default false\n */\n equalizeByRow: false,\n /**\n * String representing the minimum breakpoint size the plugin should equalize heights on.\n * @option\n * @type {string}\n * @default ''\n */\n equalizeOn: ''\n};\n\nexport {Equalizer};\n","'use strict';\n\nimport $ from 'jquery';\nimport { MediaQuery } from './foundation.util.mediaQuery';\nimport { Plugin } from './foundation.core.plugin';\nimport { GetYoDigits } from './foundation.core.utils';\nimport { Triggers } from './foundation.util.triggers';\n\n/**\n * Interchange module.\n * @module foundation.interchange\n * @requires foundation.util.mediaQuery\n */\n\nclass Interchange extends Plugin {\n /**\n * Creates a new instance of Interchange.\n * @class\n * @name Interchange\n * @fires Interchange#init\n * @param {Object} element - jQuery object to add the trigger to.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element, options) {\n this.$element = element;\n this.options = $.extend({}, Interchange.defaults, this.$element.data(), options);\n this.rules = [];\n this.currentPath = '';\n this.className = 'Interchange'; // ie9 back compat\n\n // Triggers init is idempotent, just need to make sure it is initialized\n Triggers.init($);\n \n this._init();\n this._events();\n }\n\n /**\n * Initializes the Interchange plugin and calls functions to get interchange functioning on load.\n * @function\n * @private\n */\n _init() {\n MediaQuery._init();\n\n var id = this.$element[0].id || GetYoDigits(6, 'interchange');\n this.$element.attr({\n 'data-resize': id,\n 'id': id\n });\n\n this._parseOptions();\n this._addBreakpoints();\n this._generateRules();\n this._reflow();\n }\n\n /**\n * Initializes events for Interchange.\n * @function\n * @private\n */\n _events() {\n this.$element.off('resizeme.zf.trigger').on('resizeme.zf.trigger', () => this._reflow());\n }\n\n /**\n * Calls necessary functions to update Interchange upon DOM change\n * @function\n * @private\n */\n _reflow() {\n var match;\n\n // Iterate through each rule, but only save the last match\n for (var i in this.rules) {\n if(this.rules.hasOwnProperty(i)) {\n var rule = this.rules[i];\n if (window.matchMedia(rule.query).matches) {\n match = rule;\n }\n }\n }\n\n if (match) {\n this.replace(match.path);\n }\n }\n\n /**\n * Check options valifity and set defaults for:\n * - `data-interchange-type`: if set, enforce the type of replacement (auto, src, background or html)\n * @function\n * @private\n */\n _parseOptions() {\n var types = ['auto', 'src', 'background', 'html'];\n if (typeof this.options.type === 'undefined')\n this.options.type = 'auto';\n else if (types.indexOf(this.options.type) === -1) {\n console.log(`Warning: invalid value \"${this.options.type}\" for Interchange option \"type\"`);\n this.options.type = 'auto';\n }\n }\n\n /**\n * Gets the Foundation breakpoints and adds them to the Interchange.SPECIAL_QUERIES object.\n * @function\n * @private\n */\n _addBreakpoints() {\n for (var i in MediaQuery.queries) {\n if (MediaQuery.queries.hasOwnProperty(i)) {\n var query = MediaQuery.queries[i];\n Interchange.SPECIAL_QUERIES[query.name] = query.value;\n }\n }\n }\n\n /**\n * Checks the Interchange element for the provided media query + content pairings\n * @function\n * @private\n * @param {Object} element - jQuery object that is an Interchange instance\n * @returns {Array} scenarios - Array of objects that have 'mq' and 'path' keys with corresponding keys\n */\n _generateRules(element) {\n var rulesList = [];\n var rules;\n\n if (this.options.rules) {\n rules = this.options.rules;\n }\n else {\n rules = this.$element.data('interchange');\n }\n\n rules = typeof rules === 'string' ? rules.match(/\\[.*?, .*?\\]/g) : rules;\n\n for (var i in rules) {\n if(rules.hasOwnProperty(i)) {\n var rule = rules[i].slice(1, -1).split(', ');\n var path = rule.slice(0, -1).join('');\n var query = rule[rule.length - 1];\n\n if (Interchange.SPECIAL_QUERIES[query]) {\n query = Interchange.SPECIAL_QUERIES[query];\n }\n\n rulesList.push({\n path: path,\n query: query\n });\n }\n }\n\n this.rules = rulesList;\n }\n\n /**\n * Update the `src` property of an image, or change the HTML of a container, to the specified path.\n * @function\n * @param {String} path - Path to the image or HTML partial.\n * @fires Interchange#replaced\n */\n replace(path) {\n if (this.currentPath === path) return;\n\n var trigger = 'replaced.zf.interchange';\n\n var type = this.options.type;\n if (type === 'auto') {\n if (this.$element[0].nodeName === 'IMG')\n type = 'src';\n else if (path.match(/\\.(gif|jpe?g|png|svg|tiff)([?#].*)?/i))\n type = 'background';\n else\n type = 'html';\n }\n\n // Replacing images\n if (type === 'src') {\n this.$element.attr('src', path)\n .on('load', () => { this.currentPath = path; })\n .trigger(trigger);\n }\n // Replacing background images\n else if (type === 'background') {\n path = path.replace(/\\(/g, '%28').replace(/\\)/g, '%29');\n this.$element\n .css({ 'background-image': 'url(' + path + ')' })\n .trigger(trigger);\n }\n // Replacing HTML\n else if (type === 'html') {\n $.get(path, (response) => {\n this.$element\n .html(response)\n .trigger(trigger);\n $(response).foundation();\n this.currentPath = path;\n });\n }\n\n /**\n * Fires when content in an Interchange element is done being loaded.\n * @event Interchange#replaced\n */\n // this.$element.trigger('replaced.zf.interchange');\n }\n\n /**\n * Destroys an instance of interchange.\n * @function\n */\n _destroy() {\n this.$element.off('resizeme.zf.trigger')\n }\n}\n\n/**\n * Default settings for plugin\n */\nInterchange.defaults = {\n /**\n * Rules to be applied to Interchange elements. Set with the `data-interchange` array notation.\n * @option\n * @type {?array}\n * @default null\n */\n rules: null,\n\n /**\n * Type of the responsive ressource to replace. It can take the following options:\n * - `auto` (default): choose the type according to the element tag or the ressource extension,\n * - `src`: replace the `[src]` attribute, recommended for images `<img>`.\n * - `background`: replace the `background-image` CSS property.\n * - `html`: replace the element content.\n * @option\n * @type {string}\n * @default 'auto'\n */\n type: 'auto'\n};\n\nInterchange.SPECIAL_QUERIES = {\n 'landscape': 'screen and (orientation: landscape)',\n 'portrait': 'screen and (orientation: portrait)',\n 'retina': 'only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2/1), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx)'\n};\n\nexport {Interchange};\n","'use strict';\n\n\nimport $ from 'jquery';\nimport { Plugin } from './foundation.core.plugin';\nimport { onLoad, GetYoDigits } from './foundation.core.utils';\nimport { SmoothScroll } from './foundation.smoothScroll';\n\nimport { Triggers } from './foundation.util.triggers';\n\n/**\n * Magellan module.\n * @module foundation.magellan\n * @requires foundation.smoothScroll\n * @requires foundation.util.triggers\n */\n\nclass Magellan extends Plugin {\n /**\n * Creates a new instance of Magellan.\n * @class\n * @name Magellan\n * @fires Magellan#init\n * @param {Object} element - jQuery object to add the trigger to.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element, options) {\n this.$element = element;\n this.options = $.extend({}, Magellan.defaults, this.$element.data(), options);\n this.className = 'Magellan'; // ie9 back compat\n\n // Triggers init is idempotent, just need to make sure it is initialized\n Triggers.init($);\n\n this._init();\n this.calcPoints();\n }\n\n /**\n * Initializes the Magellan plugin and calls functions to get equalizer functioning on load.\n * @private\n */\n _init() {\n var id = this.$element[0].id || GetYoDigits(6, 'magellan');\n var _this = this;\n this.$targets = $('[data-magellan-target]');\n this.$links = this.$element.find('a');\n this.$element.attr({\n 'data-resize': id,\n 'data-scroll': id,\n 'id': id\n });\n this.$active = $();\n this.scrollPos = parseInt(window.pageYOffset, 10);\n\n this._events();\n }\n\n /**\n * Calculates an array of pixel values that are the demarcation lines between locations on the page.\n * Can be invoked if new elements are added or the size of a location changes.\n * @function\n */\n calcPoints() {\n var _this = this,\n body = document.body,\n html = document.documentElement;\n\n this.points = [];\n this.winHeight = Math.round(Math.max(window.innerHeight, html.clientHeight));\n this.docHeight = Math.round(Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight));\n\n this.$targets.each(function(){\n var $tar = $(this),\n pt = Math.round($tar.offset().top - _this.options.threshold);\n $tar.targetPoint = pt;\n _this.points.push(pt);\n });\n }\n\n /**\n * Initializes events for Magellan.\n * @private\n */\n _events() {\n var _this = this;\n\n $(window).one('load', function(){\n if(_this.options.deepLinking){\n if(location.hash){\n _this.scrollToLoc(location.hash);\n }\n }\n _this.calcPoints();\n _this._updateActive();\n });\n\n _this.onLoadListener = onLoad($(window), function () {\n _this.$element\n .on({\n 'resizeme.zf.trigger': _this.reflow.bind(_this),\n 'scrollme.zf.trigger': _this._updateActive.bind(_this)\n })\n .on('click.zf.magellan', 'a[href^=\"#\"]', function (e) {\n e.preventDefault();\n var arrival = this.getAttribute('href');\n _this.scrollToLoc(arrival);\n });\n });\n\n this._deepLinkScroll = function(e) {\n if(_this.options.deepLinking) {\n _this.scrollToLoc(window.location.hash);\n }\n };\n\n $(window).on('hashchange', this._deepLinkScroll);\n }\n\n /**\n * Function to scroll to a given location on the page.\n * @param {String} loc - a properly formatted jQuery id selector. Example: '#foo'\n * @function\n */\n scrollToLoc(loc) {\n this._inTransition = true;\n var _this = this;\n\n var options = {\n animationEasing: this.options.animationEasing,\n animationDuration: this.options.animationDuration,\n threshold: this.options.threshold,\n offset: this.options.offset\n };\n\n SmoothScroll.scrollToLoc(loc, options, function() {\n _this._inTransition = false;\n })\n }\n\n /**\n * Calls necessary functions to update Magellan upon DOM change\n * @function\n */\n reflow() {\n this.calcPoints();\n this._updateActive();\n }\n\n /**\n * Updates the visibility of an active location link, and updates the url hash for the page, if deepLinking enabled.\n * @private\n * @function\n * @fires Magellan#update\n */\n _updateActive(/*evt, elem, scrollPos*/) {\n if(this._inTransition) return;\n\n const newScrollPos = parseInt(window.pageYOffset, 10);\n const isScrollingUp = this.scrollPos > newScrollPos;\n this.scrollPos = newScrollPos;\n\n let activeIdx;\n // Before the first point: no link\n if(newScrollPos < this.points[0]){ /* do nothing */ }\n // At the bottom of the page: last link\n else if(newScrollPos + this.winHeight === this.docHeight){ activeIdx = this.points.length - 1; }\n // Otherwhise, use the last visible link\n else{\n const visibleLinks = this.points.filter((p, i) => {\n return (p - this.options.offset - (isScrollingUp ? this.options.threshold : 0)) <= newScrollPos;\n });\n activeIdx = visibleLinks.length ? visibleLinks.length - 1 : 0;\n }\n\n // Get the new active link\n const $oldActive = this.$active;\n let activeHash = '';\n if(typeof activeIdx !== 'undefined'){\n this.$active = this.$links.filter('[href=\"#' + this.$targets.eq(activeIdx).data('magellan-target') + '\"]');\n if (this.$active.length) activeHash = this.$active[0].getAttribute('href');\n }else{\n this.$active = $();\n }\n const isNewActive = !(!this.$active.length && !$oldActive.length) && !this.$active.is($oldActive);\n const isNewHash = activeHash !== window.location.hash;\n\n // Update the active link element\n if(isNewActive) {\n $oldActive.removeClass(this.options.activeClass);\n this.$active.addClass(this.options.activeClass);\n }\n\n // Update the hash (it may have changed with the same active link)\n if(this.options.deepLinking && isNewHash){\n if(window.history.pushState){\n // Set or remove the hash (see: https://stackoverflow.com/a/5298684/4317384\n const url = activeHash ? activeHash : window.location.pathname + window.location.search;\n if(this.options.updateHistory){\n window.history.pushState({}, '', url);\n }else{\n window.history.replaceState({}, '', url);\n }\n }else{\n window.location.hash = activeHash;\n }\n }\n\n if (isNewActive) {\n /**\n * Fires when magellan is finished updating to the new active element.\n * @event Magellan#update\n */\n \tthis.$element.trigger('update.zf.magellan', [this.$active]);\n\t }\n }\n\n /**\n * Destroys an instance of Magellan and resets the url of the window.\n * @function\n */\n _destroy() {\n this.$element.off('.zf.trigger .zf.magellan')\n .find(`.${this.options.activeClass}`).removeClass(this.options.activeClass);\n\n if(this.options.deepLinking){\n var hash = this.$active[0].getAttribute('href');\n window.location.hash.replace(hash, '');\n }\n\n $(window).off('hashchange', this._deepLinkScroll)\n if (this.onLoadListener) $(window).off(this.onLoadListener);\n }\n}\n\n/**\n * Default settings for plugin\n */\nMagellan.defaults = {\n /**\n * Amount of time, in ms, the animated scrolling should take between locations.\n * @option\n * @type {number}\n * @default 500\n */\n animationDuration: 500,\n /**\n * Animation style to use when scrolling between locations. Can be `'swing'` or `'linear'`.\n * @option\n * @type {string}\n * @default 'linear'\n * @see {@link https://api.jquery.com/animate|Jquery animate}\n */\n animationEasing: 'linear',\n /**\n * Number of pixels to use as a marker for location changes.\n * @option\n * @type {number}\n * @default 50\n */\n threshold: 50,\n /**\n * Class applied to the active locations link on the magellan container.\n * @option\n * @type {string}\n * @default 'is-active'\n */\n activeClass: 'is-active',\n /**\n * Allows the script to manipulate the url of the current page, and if supported, alter the history.\n * @option\n * @type {boolean}\n * @default false\n */\n deepLinking: false,\n /**\n * Update the browser history with the active link, if deep linking is enabled.\n * @option\n * @type {boolean}\n * @default false\n */\n updateHistory: false,\n /**\n * Number of pixels to offset the scroll of the page on item click if using a sticky nav bar.\n * @option\n * @type {number}\n * @default 0\n */\n offset: 0\n}\n\nexport {Magellan};\n","'use strict';\n\nimport $ from 'jquery';\nimport { Plugin } from './foundation.core.plugin';\nimport { onLoad, transitionend, RegExpEscape } from './foundation.core.utils';\nimport { Keyboard } from './foundation.util.keyboard';\nimport { MediaQuery } from './foundation.util.mediaQuery';\n\nimport { Triggers } from './foundation.util.triggers';\n\n/**\n * OffCanvas module.\n * @module foundation.offCanvas\n * @requires foundation.util.keyboard\n * @requires foundation.util.mediaQuery\n * @requires foundation.util.triggers\n */\n\nclass OffCanvas extends Plugin {\n /**\n * Creates a new instance of an off-canvas wrapper.\n * @class\n * @name OffCanvas\n * @fires OffCanvas#init\n * @param {Object} element - jQuery object to initialize.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element, options) {\n this.className = 'OffCanvas'; // ie9 back compat\n this.$element = element;\n this.options = $.extend({}, OffCanvas.defaults, this.$element.data(), options);\n this.contentClasses = { base: [], reveal: [] };\n this.$lastTrigger = $();\n this.$triggers = $();\n this.position = 'left';\n this.$content = $();\n this.nested = !!(this.options.nested);\n this.$sticky = $();\n this.isInCanvas = false;\n\n // Defines the CSS transition/position classes of the off-canvas content container.\n $(['push', 'overlap']).each((index, val) => {\n this.contentClasses.base.push('has-transition-'+val);\n });\n $(['left', 'right', 'top', 'bottom']).each((index, val) => {\n this.contentClasses.base.push('has-position-'+val);\n this.contentClasses.reveal.push('has-reveal-'+val);\n });\n\n // Triggers init is idempotent, just need to make sure it is initialized\n Triggers.init($);\n MediaQuery._init();\n\n this._init();\n this._events();\n\n Keyboard.register('OffCanvas', {\n 'ESCAPE': 'close'\n });\n\n }\n\n /**\n * Initializes the off-canvas wrapper by adding the exit overlay (if needed).\n * @function\n * @private\n */\n _init() {\n var id = this.$element.attr('id');\n\n this.$element.attr('aria-hidden', 'true');\n\n // Find off-canvas content, either by ID (if specified), by siblings or by closest selector (fallback)\n if (this.options.contentId) {\n this.$content = $('#'+this.options.contentId);\n } else if (this.$element.siblings('[data-off-canvas-content]').length) {\n this.$content = this.$element.siblings('[data-off-canvas-content]').first();\n } else {\n this.$content = this.$element.closest('[data-off-canvas-content]').first();\n }\n\n if (!this.options.contentId) {\n // Assume that the off-canvas element is nested if it isn't a sibling of the content\n this.nested = this.$element.siblings('[data-off-canvas-content]').length === 0;\n\n } else if (this.options.contentId && this.options.nested === null) {\n // Warning if using content ID without setting the nested option\n // Once the element is nested it is required to work properly in this case\n console.warn('Remember to use the nested option if using the content ID option!');\n }\n\n if (this.nested === true) {\n // Force transition overlap if nested\n this.options.transition = 'overlap';\n // Remove appropriate classes if already assigned in markup\n this.$element.removeClass('is-transition-push');\n }\n\n this.$element.addClass(`is-transition-${this.options.transition} is-closed`);\n\n // Find triggers that affect this element and add aria-expanded to them\n this.$triggers = $(document)\n .find('[data-open=\"'+id+'\"], [data-close=\"'+id+'\"], [data-toggle=\"'+id+'\"]')\n .attr('aria-expanded', 'false')\n .attr('aria-controls', id);\n\n // Get position by checking for related CSS class\n this.position = this.$element.is('.position-left, .position-top, .position-right, .position-bottom') ? this.$element.attr('class').match(/position\\-(left|top|right|bottom)/)[1] : this.position;\n\n // Add an overlay over the content if necessary\n if (this.options.contentOverlay === true) {\n var overlay = document.createElement('div');\n var overlayPosition = $(this.$element).css(\"position\") === 'fixed' ? 'is-overlay-fixed' : 'is-overlay-absolute';\n overlay.setAttribute('class', 'js-off-canvas-overlay ' + overlayPosition);\n this.$overlay = $(overlay);\n if(overlayPosition === 'is-overlay-fixed') {\n $(this.$overlay).insertAfter(this.$element);\n } else {\n this.$content.append(this.$overlay);\n }\n }\n\n // Get the revealOn option from the class.\n var revealOnRegExp = new RegExp(RegExpEscape(this.options.revealClass) + '([^\\\\s]+)', 'g');\n var revealOnClass = revealOnRegExp.exec(this.$element[0].className);\n if (revealOnClass) {\n this.options.isRevealed = true;\n this.options.revealOn = this.options.revealOn || revealOnClass[1];\n }\n\n // Ensure the `reveal-on-*` class is set.\n if (this.options.isRevealed === true && this.options.revealOn) {\n this.$element.first().addClass(`${this.options.revealClass}${this.options.revealOn}`);\n this._setMQChecker();\n }\n\n if (this.options.transitionTime) {\n this.$element.css('transition-duration', this.options.transitionTime);\n }\n\n // Find fixed elements that should stay fixed while off-canvas is opened\n this.$sticky = this.$content.find('[data-off-canvas-sticky]');\n if (this.$sticky.length > 0 && this.options.transition === 'push') {\n // If there's at least one match force contentScroll:false because the absolute top value doesn't get recalculated on scroll\n // Limit to push transition since there's no transform scope for overlap\n this.options.contentScroll = false;\n }\n\n let inCanvasFor = this.$element.attr('class').match(/\\bin-canvas-for-(\\w+)/);\n if (inCanvasFor && inCanvasFor.length === 2) {\n // Set `inCanvasOn` option if found in-canvas-for-[BREAKPONT] CSS class\n this.options.inCanvasOn = inCanvasFor[1];\n } else if (this.options.inCanvasOn) {\n // Ensure the CSS class is set\n this.$element.addClass(`in-canvas-for-${this.options.inCanvasOn}`);\n }\n\n if (this.options.inCanvasOn) {\n this._checkInCanvas();\n }\n\n // Initally remove all transition/position CSS classes from off-canvas content container.\n this._removeContentClasses();\n }\n\n /**\n * Adds event handlers to the off-canvas wrapper and the exit overlay.\n * @function\n * @private\n */\n _events() {\n this.$element.off('.zf.trigger .zf.offCanvas').on({\n 'open.zf.trigger': this.open.bind(this),\n 'close.zf.trigger': this.close.bind(this),\n 'toggle.zf.trigger': this.toggle.bind(this),\n 'keydown.zf.offCanvas': this._handleKeyboard.bind(this)\n });\n\n if (this.options.closeOnClick === true) {\n var $target = this.options.contentOverlay ? this.$overlay : this.$content;\n $target.on({'click.zf.offCanvas': this.close.bind(this)});\n }\n\n if (this.options.inCanvasOn) {\n $(window).on('changed.zf.mediaquery', () => {\n this._checkInCanvas();\n });\n }\n\n }\n\n /**\n * Applies event listener for elements that will reveal at certain breakpoints.\n * @private\n */\n _setMQChecker() {\n var _this = this;\n\n this.onLoadListener = onLoad($(window), function () {\n if (MediaQuery.atLeast(_this.options.revealOn)) {\n _this.reveal(true);\n }\n });\n\n $(window).on('changed.zf.mediaquery', function () {\n if (MediaQuery.atLeast(_this.options.revealOn)) {\n _this.reveal(true);\n } else {\n _this.reveal(false);\n }\n });\n }\n\n /**\n * Checks if InCanvas on current breakpoint and adjust off-canvas accordingly\n * @private\n */\n _checkInCanvas() {\n this.isInCanvas = MediaQuery.atLeast(this.options.inCanvasOn);\n if (this.isInCanvas === true) {\n this.close();\n }\n }\n\n /**\n * Removes the CSS transition/position classes of the off-canvas content container.\n * Removing the classes is important when another off-canvas gets opened that uses the same content container.\n * @param {Boolean} hasReveal - true if related off-canvas element is revealed.\n * @private\n */\n _removeContentClasses(hasReveal) {\n if (typeof hasReveal !== 'boolean') {\n this.$content.removeClass(this.contentClasses.base.join(' '));\n } else if (hasReveal === false) {\n this.$content.removeClass(`has-reveal-${this.position}`);\n }\n }\n\n /**\n * Adds the CSS transition/position classes of the off-canvas content container, based on the opening off-canvas element.\n * Beforehand any transition/position class gets removed.\n * @param {Boolean} hasReveal - true if related off-canvas element is revealed.\n * @private\n */\n _addContentClasses(hasReveal) {\n this._removeContentClasses(hasReveal);\n if (typeof hasReveal !== 'boolean') {\n this.$content.addClass(`has-transition-${this.options.transition} has-position-${this.position}`);\n } else if (hasReveal === true) {\n this.$content.addClass(`has-reveal-${this.position}`);\n }\n }\n\n /**\n * Preserves the fixed behavior of sticky elements on opening an off-canvas with push transition.\n * Since the off-canvas container has got a transform scope in such a case, it is done by calculating position absolute values.\n * @private\n */\n _fixStickyElements() {\n this.$sticky.each((_, el) => {\n const $el = $(el);\n\n // If sticky element is currently fixed, adjust its top value to match absolute position due to transform scope\n // Limit to push transition because postion:fixed works without problems for overlap (no transform scope)\n if ($el.css('position') === 'fixed') {\n\n // Save current inline styling to restore it if undoing the absolute fixing\n let topVal = parseInt($el.css('top'), 10);\n $el.data('offCanvasSticky', { top: topVal });\n\n let absoluteTopVal = $(document).scrollTop() + topVal;\n $el.css({ top: `${absoluteTopVal}px`, width: '100%', transition: 'none' });\n }\n });\n }\n\n /**\n * Restores the original fixed styling of sticky elements after having closed an off-canvas that got pseudo fixed beforehand.\n * This reverts the changes of _fixStickyElements()\n * @private\n */\n _unfixStickyElements() {\n this.$sticky.each((_, el) => {\n const $el = $(el);\n let stickyData = $el.data('offCanvasSticky');\n\n // If sticky element has got data object with prior values (meaning it was originally fixed) restore these values once off-canvas is closed\n if (typeof stickyData === 'object') {\n $el.css({ top: `${stickyData.top}px`, width: '', transition: '' })\n $el.data('offCanvasSticky', '');\n }\n });\n }\n\n /**\n * Handles the revealing/hiding the off-canvas at breakpoints, not the same as open.\n * @param {Boolean} isRevealed - true if element should be revealed.\n * @function\n */\n reveal(isRevealed) {\n if (isRevealed) {\n this.close();\n this.isRevealed = true;\n this.$element.attr('aria-hidden', 'false');\n this.$element.off('open.zf.trigger toggle.zf.trigger');\n this.$element.removeClass('is-closed');\n } else {\n this.isRevealed = false;\n this.$element.attr('aria-hidden', 'true');\n this.$element.off('open.zf.trigger toggle.zf.trigger').on({\n 'open.zf.trigger': this.open.bind(this),\n 'toggle.zf.trigger': this.toggle.bind(this)\n });\n this.$element.addClass('is-closed');\n }\n this._addContentClasses(isRevealed);\n }\n\n /**\n * Stops scrolling of the body when OffCanvas is open on mobile Safari and other troublesome browsers.\n * @function\n * @private\n */\n _stopScrolling(event) {\n return false;\n }\n\n /**\n * Tag the element given as context whether it can be scrolled up and down.\n * Used to allow or prevent it to scroll. See `_stopScrollPropagation`.\n *\n * Taken and adapted from http://stackoverflow.com/questions/16889447/prevent-full-page-scrolling-ios\n * Only really works for y, not sure how to extend to x or if we need to.\n *\n * @function\n * @private\n */\n _recordScrollable(event) {\n let elem = this; // called from event handler context with this as elem\n\n // If the element is scrollable (content overflows), then...\n if (elem.scrollHeight !== elem.clientHeight) {\n // If we're at the top, scroll down one pixel to allow scrolling up\n if (elem.scrollTop === 0) {\n elem.scrollTop = 1;\n }\n // If we're at the bottom, scroll up one pixel to allow scrolling down\n if (elem.scrollTop === elem.scrollHeight - elem.clientHeight) {\n elem.scrollTop = elem.scrollHeight - elem.clientHeight - 1;\n }\n }\n elem.allowUp = elem.scrollTop > 0;\n elem.allowDown = elem.scrollTop < (elem.scrollHeight - elem.clientHeight);\n elem.lastY = event.originalEvent.pageY;\n }\n\n /**\n * Prevent the given event propagation if the element given as context can scroll.\n * Used to preserve the element scrolling on mobile (`touchmove`) when the document\n * scrolling is prevented. See https://git.io/zf-9707.\n * @function\n * @private\n */\n _stopScrollPropagation(event) {\n let elem = this; // called from event handler context with this as elem\n let parent; // off-canvas elem if called from inner scrollbox\n let up = event.pageY < elem.lastY;\n let down = !up;\n elem.lastY = event.pageY;\n\n if((up && elem.allowUp) || (down && elem.allowDown)) {\n // It is not recommended to stop event propagation (the user cannot watch it),\n // but in this case this is the only solution we have.\n event.stopPropagation();\n\n // If elem is inner scrollbox we are scrolling the outer off-canvas down/up once the box end has been reached\n // This lets the user continue to touch move the off-canvas without the need to place the finger outside the scrollbox\n if (elem.hasAttribute('data-off-canvas-scrollbox')) {\n parent = elem.closest('[data-off-canvas], [data-off-canvas-scrollbox-outer]');\n if (elem.scrollTop <= 1 && parent.scrollTop > 0) {\n parent.scrollTop--;\n } else if (elem.scrollTop >= elem.scrollHeight - elem.clientHeight - 1 && parent.scrollTop < parent.scrollHeight - parent.clientHeight) {\n parent.scrollTop++;\n }\n }\n\n } else {\n event.preventDefault();\n }\n }\n\n /**\n * Opens the off-canvas menu.\n * @function\n * @param {Object} event - Event object passed from listener.\n * @param {jQuery} trigger - element that triggered the off-canvas to open.\n * @fires OffCanvas#opened\n * @todo also trigger 'open' event?\n */\n open(event, trigger) {\n if (this.$element.hasClass('is-open') || this.isRevealed || this.isInCanvas) { return; }\n var _this = this;\n\n if (trigger) {\n this.$lastTrigger = trigger;\n }\n\n if (this.options.forceTo === 'top') {\n window.scrollTo(0, 0);\n } else if (this.options.forceTo === 'bottom') {\n window.scrollTo(0,document.body.scrollHeight);\n }\n\n if (this.options.transitionTime && this.options.transition !== 'overlap') {\n this.$element.siblings('[data-off-canvas-content]').css('transition-duration', this.options.transitionTime);\n } else {\n this.$element.siblings('[data-off-canvas-content]').css('transition-duration', '');\n }\n\n this.$element.addClass('is-open').removeClass('is-closed');\n\n this.$triggers.attr('aria-expanded', 'true');\n this.$element.attr('aria-hidden', 'false');\n\n this.$content.addClass('is-open-' + this.position);\n\n // If `contentScroll` is set to false, add class and disable scrolling on touch devices.\n if (this.options.contentScroll === false) {\n $('body').addClass('is-off-canvas-open').on('touchmove', this._stopScrolling);\n this.$element.on('touchstart', this._recordScrollable);\n this.$element.on('touchmove', this._stopScrollPropagation);\n this.$element.on('touchstart', '[data-off-canvas-scrollbox]', this._recordScrollable);\n this.$element.on('touchmove', '[data-off-canvas-scrollbox]', this._stopScrollPropagation);\n }\n\n if (this.options.contentOverlay === true) {\n this.$overlay.addClass('is-visible');\n }\n\n if (this.options.closeOnClick === true && this.options.contentOverlay === true) {\n this.$overlay.addClass('is-closable');\n }\n\n if (this.options.autoFocus === true) {\n this.$element.one(transitionend(this.$element), function() {\n if (!_this.$element.hasClass('is-open')) {\n return; // exit if prematurely closed\n }\n var canvasFocus = _this.$element.find('[data-autofocus]');\n if (canvasFocus.length) {\n canvasFocus.eq(0).focus();\n } else {\n _this.$element.find('a, button').eq(0).focus();\n }\n });\n }\n\n if (this.options.trapFocus === true) {\n this.$content.attr('tabindex', '-1');\n Keyboard.trapFocus(this.$element);\n }\n\n if (this.options.transition === 'push') {\n this._fixStickyElements();\n }\n\n this._addContentClasses();\n\n /**\n * Fires when the off-canvas menu opens.\n * @event OffCanvas#opened\n */\n this.$element.trigger('opened.zf.offCanvas');\n\n /**\n * Fires when the off-canvas menu open transition is done.\n * @event OffCanvas#openedEnd\n */\n this.$element.one(transitionend(this.$element), () => {\n this.$element.trigger('openedEnd.zf.offCanvas');\n });\n }\n\n /**\n * Closes the off-canvas menu.\n * @function\n * @param {Function} cb - optional cb to fire after closure.\n * @fires OffCanvas#close\n * @fires OffCanvas#closed\n */\n close(cb) {\n if (!this.$element.hasClass('is-open') || this.isRevealed) { return; }\n\n /**\n * Fires when the off-canvas menu closes.\n * @event OffCanvas#close\n */\n this.$element.trigger('close.zf.offCanvas');\n\n var _this = this;\n\n this.$element.removeClass('is-open');\n\n this.$element.attr('aria-hidden', 'true');\n\n this.$content.removeClass('is-open-left is-open-top is-open-right is-open-bottom');\n\n if (this.options.contentOverlay === true) {\n this.$overlay.removeClass('is-visible');\n }\n\n if (this.options.closeOnClick === true && this.options.contentOverlay === true) {\n this.$overlay.removeClass('is-closable');\n }\n\n this.$triggers.attr('aria-expanded', 'false');\n\n\n // Listen to transitionEnd: add class, re-enable scrolling and release focus when done.\n this.$element.one(transitionend(this.$element), (e) => {\n\n this.$element.addClass('is-closed');\n this._removeContentClasses();\n\n if (this.options.transition === 'push') {\n this._unfixStickyElements();\n }\n\n // If `contentScroll` is set to false, remove class and re-enable scrolling on touch devices.\n if (this.options.contentScroll === false) {\n $('body').removeClass('is-off-canvas-open').off('touchmove', this._stopScrolling);\n this.$element.off('touchstart', this._recordScrollable);\n this.$element.off('touchmove', this._stopScrollPropagation);\n this.$element.off('touchstart', '[data-off-canvas-scrollbox]', this._recordScrollable);\n this.$element.off('touchmove', '[data-off-canvas-scrollbox]', this._stopScrollPropagation);\n }\n\n if (this.options.trapFocus === true) {\n this.$content.removeAttr('tabindex');\n Keyboard.releaseFocus(this.$element);\n }\n\n /**\n * Fires when the off-canvas menu close transition is done.\n * @event OffCanvas#closed\n */\n this.$element.trigger('closed.zf.offCanvas');\n });\n }\n\n /**\n * Toggles the off-canvas menu open or closed.\n * @function\n * @param {Object} event - Event object passed from listener.\n * @param {jQuery} trigger - element that triggered the off-canvas to open.\n */\n toggle(event, trigger) {\n if (this.$element.hasClass('is-open')) {\n this.close(event, trigger);\n }\n else {\n this.open(event, trigger);\n }\n }\n\n /**\n * Handles keyboard input when detected. When the escape key is pressed, the off-canvas menu closes, and focus is restored to the element that opened the menu.\n * @function\n * @private\n */\n _handleKeyboard(e) {\n Keyboard.handleKey(e, 'OffCanvas', {\n close: () => {\n this.close();\n this.$lastTrigger.focus();\n return true;\n },\n handled: () => {\n e.preventDefault();\n }\n });\n }\n\n /**\n * Destroys the OffCanvas plugin.\n * @function\n */\n _destroy() {\n this.close();\n this.$element.off('.zf.trigger .zf.offCanvas');\n this.$overlay.off('.zf.offCanvas');\n if (this.onLoadListener) $(window).off(this.onLoadListener);\n }\n}\n\nOffCanvas.defaults = {\n /**\n * Allow the user to click outside of the menu to close it.\n * @option\n * @type {boolean}\n * @default true\n */\n closeOnClick: true,\n\n /**\n * Adds an overlay on top of `[data-off-canvas-content]`.\n * @option\n * @type {boolean}\n * @default true\n */\n contentOverlay: true,\n\n /**\n * Target an off-canvas content container by ID that may be placed anywhere. If null the closest content container will be taken.\n * @option\n * @type {?string}\n * @default null\n */\n contentId: null,\n\n /**\n * Define the off-canvas element is nested in an off-canvas content. This is required when using the contentId option for a nested element.\n * @option\n * @type {boolean}\n * @default null\n */\n nested: null,\n\n /**\n * Enable/disable scrolling of the main content when an off canvas panel is open.\n * @option\n * @type {boolean}\n * @default true\n */\n contentScroll: true,\n\n /**\n * Amount of time the open and close transition requires, including the appropriate milliseconds (`ms`) or seconds (`s`) unit (e.g. `500ms`, `.75s`) If none selected, pulls from body style.\n * @option\n * @type {string}\n * @default null\n */\n transitionTime: null,\n\n /**\n * Type of transition for the OffCanvas menu. Options are 'push', 'detached' or 'slide'.\n * @option\n * @type {string}\n * @default push\n */\n transition: 'push',\n\n /**\n * Force the page to scroll to top or bottom on open.\n * @option\n * @type {?string}\n * @default null\n */\n forceTo: null,\n\n /**\n * Allow the OffCanvas to remain open for certain breakpoints.\n * @option\n * @type {boolean}\n * @default false\n */\n isRevealed: false,\n\n /**\n * Breakpoint at which to reveal. JS will use a RegExp to target standard classes, if changing classnames, pass your class with the `revealClass` option.\n * @option\n * @type {?string}\n * @default null\n */\n revealOn: null,\n\n /**\n * Breakpoint at which the off-canvas gets moved into canvas content and acts as regular page element.\n * @option\n * @type {?string}\n * @default null\n */\n inCanvasOn: null,\n\n /**\n * Force focus to the offcanvas on open. If true, will focus the opening trigger on close.\n * @option\n * @type {boolean}\n * @default true\n */\n autoFocus: true,\n\n /**\n * Class used to force an OffCanvas to remain open. Foundation defaults for this are `reveal-for-large` & `reveal-for-medium`.\n * @option\n * @type {string}\n * @default reveal-for-\n * @todo improve the regex testing for this.\n */\n revealClass: 'reveal-for-',\n\n /**\n * Triggers optional focus trapping when opening an OffCanvas. Sets tabindex of [data-off-canvas-content] to -1 for accessibility purposes.\n * @option\n * @type {boolean}\n * @default false\n */\n trapFocus: false\n}\n\nexport {OffCanvas};\n","'use strict';\n\nimport $ from 'jquery';\nimport { Keyboard } from './foundation.util.keyboard';\nimport { Motion } from './foundation.util.motion';\nimport { Timer } from './foundation.util.timer';\nimport { onImagesLoaded } from './foundation.util.imageLoader';\nimport { GetYoDigits } from './foundation.core.utils';\nimport { Plugin } from './foundation.core.plugin';\nimport { Touch } from './foundation.util.touch'\n\n\n/**\n * Orbit module.\n * @module foundation.orbit\n * @requires foundation.util.keyboard\n * @requires foundation.util.motion\n * @requires foundation.util.timer\n * @requires foundation.util.imageLoader\n * @requires foundation.util.touch\n */\n\nclass Orbit extends Plugin {\n /**\n * Creates a new instance of an orbit carousel.\n * @class\n * @name Orbit\n * @param {jQuery} element - jQuery object to make into an Orbit Carousel.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element, options){\n this.$element = element;\n this.options = $.extend({}, Orbit.defaults, this.$element.data(), options);\n this.className = 'Orbit'; // ie9 back compat\n\n Touch.init($); // Touch init is idempotent, we just need to make sure it's initialied.\n\n this._init();\n\n Keyboard.register('Orbit', {\n 'ltr': {\n 'ARROW_RIGHT': 'next',\n 'ARROW_LEFT': 'previous'\n },\n 'rtl': {\n 'ARROW_LEFT': 'next',\n 'ARROW_RIGHT': 'previous'\n }\n });\n }\n\n /**\n * Initializes the plugin by creating jQuery collections, setting attributes, and starting the animation.\n * @function\n * @private\n */\n _init() {\n // @TODO: consider discussion on PR #9278 about DOM pollution by changeSlide\n this._reset();\n\n this.$wrapper = this.$element.find(`.${this.options.containerClass}`);\n this.$slides = this.$element.find(`.${this.options.slideClass}`);\n\n var $images = this.$element.find('img'),\n initActive = this.$slides.filter('.is-active'),\n id = this.$element[0].id || GetYoDigits(6, 'orbit');\n\n this.$element.attr({\n 'data-resize': id,\n 'id': id\n });\n\n if (!initActive.length) {\n this.$slides.eq(0).addClass('is-active');\n }\n\n if (!this.options.useMUI) {\n this.$slides.addClass('no-motionui');\n }\n\n if ($images.length) {\n onImagesLoaded($images, this._prepareForOrbit.bind(this));\n } else {\n this._prepareForOrbit();//hehe\n }\n\n if (this.options.bullets) {\n this._loadBullets();\n }\n\n this._events();\n\n if (this.options.autoPlay && this.$slides.length > 1) {\n this.geoSync();\n }\n\n if (this.options.accessible) { // allow wrapper to be focusable to enable arrow navigation\n this.$wrapper.attr('tabindex', 0);\n }\n }\n\n /**\n * Creates a jQuery collection of bullets, if they are being used.\n * @function\n * @private\n */\n _loadBullets() {\n this.$bullets = this.$element.find(`.${this.options.boxOfBullets}`).find('button');\n }\n\n /**\n * Sets a `timer` object on the orbit, and starts the counter for the next slide.\n * @function\n */\n geoSync() {\n var _this = this;\n this.timer = new Timer(\n this.$element,\n {\n duration: this.options.timerDelay,\n infinite: false\n },\n function() {\n _this.changeSlide(true);\n });\n this.timer.start();\n }\n\n /**\n * Sets wrapper and slide heights for the orbit.\n * @function\n * @private\n */\n _prepareForOrbit() {\n var _this = this;\n this._setWrapperHeight();\n }\n\n /**\n * Calulates the height of each slide in the collection, and uses the tallest one for the wrapper height.\n * @function\n * @private\n * @param {Function} cb - a callback function to fire when complete.\n */\n _setWrapperHeight(cb) {//rewrite this to `for` loop\n var max = 0, temp, counter = 0, _this = this;\n\n this.$slides.each(function() {\n temp = this.getBoundingClientRect().height;\n $(this).attr('data-slide', counter);\n\n // hide all slides but the active one\n if (!/mui/g.test($(this)[0].className) && _this.$slides.filter('.is-active')[0] !== _this.$slides.eq(counter)[0]) {\n $(this).css({'display': 'none'});\n }\n max = temp > max ? temp : max;\n counter++;\n });\n\n if (counter === this.$slides.length) {\n this.$wrapper.css({'height': max}); //only change the wrapper height property once.\n if(cb) {cb(max);} //fire callback with max height dimension.\n }\n }\n\n /**\n * Sets the max-height of each slide.\n * @function\n * @private\n */\n _setSlideHeight(height) {\n this.$slides.each(function() {\n $(this).css('max-height', height);\n });\n }\n\n /**\n * Adds event listeners to basically everything within the element.\n * @function\n * @private\n */\n _events() {\n var _this = this;\n\n //***************************************\n //**Now using custom event - thanks to:**\n //** Yohai Ararat of Toronto **\n //***************************************\n //\n this.$element.off('.resizeme.zf.trigger').on({\n 'resizeme.zf.trigger': this._prepareForOrbit.bind(this)\n })\n if (this.$slides.length > 1) {\n\n if (this.options.swipe) {\n this.$slides.off('swipeleft.zf.orbit swiperight.zf.orbit')\n .on('swipeleft.zf.orbit', function(e){\n e.preventDefault();\n _this.changeSlide(true);\n }).on('swiperight.zf.orbit', function(e){\n e.preventDefault();\n _this.changeSlide(false);\n });\n }\n //***************************************\n\n if (this.options.autoPlay) {\n this.$slides.on('click.zf.orbit', function() {\n _this.$element.data('clickedOn', _this.$element.data('clickedOn') ? false : true);\n _this.timer[_this.$element.data('clickedOn') ? 'pause' : 'start']();\n });\n\n if (this.options.pauseOnHover) {\n this.$element.on('mouseenter.zf.orbit', function() {\n _this.timer.pause();\n }).on('mouseleave.zf.orbit', function() {\n if (!_this.$element.data('clickedOn')) {\n _this.timer.start();\n }\n });\n }\n }\n\n if (this.options.navButtons) {\n var $controls = this.$element.find(`.${this.options.nextClass}, .${this.options.prevClass}`);\n $controls.attr('tabindex', 0)\n //also need to handle enter/return and spacebar key presses\n .on('click.zf.orbit touchend.zf.orbit', function(e){\n\t e.preventDefault();\n _this.changeSlide($(this).hasClass(_this.options.nextClass));\n });\n }\n\n if (this.options.bullets) {\n this.$bullets.on('click.zf.orbit touchend.zf.orbit', function() {\n if (/is-active/g.test(this.className)) { return false; }//if this is active, kick out of function.\n var idx = $(this).data('slide'),\n ltr = idx > _this.$slides.filter('.is-active').data('slide'),\n $slide = _this.$slides.eq(idx);\n\n _this.changeSlide(ltr, $slide, idx);\n });\n }\n\n if (this.options.accessible) {\n this.$wrapper.add(this.$bullets).on('keydown.zf.orbit', function(e) {\n // handle keyboard event with keyboard util\n Keyboard.handleKey(e, 'Orbit', {\n next: function() {\n _this.changeSlide(true);\n },\n previous: function() {\n _this.changeSlide(false);\n },\n handled: function() { // if bullet is focused, make sure focus moves\n if ($(e.target).is(_this.$bullets)) {\n _this.$bullets.filter('.is-active').focus();\n }\n }\n });\n });\n }\n }\n }\n\n /**\n * Resets Orbit so it can be reinitialized\n */\n _reset() {\n // Don't do anything if there are no slides (first run)\n if (typeof this.$slides == 'undefined') {\n return;\n }\n\n if (this.$slides.length > 1) {\n // Remove old events\n this.$element.off('.zf.orbit').find('*').off('.zf.orbit')\n\n // Restart timer if autoPlay is enabled\n if (this.options.autoPlay) {\n this.timer.restart();\n }\n\n // Reset all sliddes\n this.$slides.each(function(el) {\n $(el).removeClass('is-active is-active is-in')\n .removeAttr('aria-live')\n .hide();\n });\n\n // Show the first slide\n this.$slides.first().addClass('is-active').show();\n\n // Triggers when the slide has finished animating\n this.$element.trigger('slidechange.zf.orbit', [this.$slides.first()]);\n\n // Select first bullet if bullets are present\n if (this.options.bullets) {\n this._updateBullets(0);\n }\n }\n }\n\n /**\n * Changes the current slide to a new one.\n * @function\n * @param {Boolean} isLTR - if true the slide moves from right to left, if false the slide moves from left to right.\n * @param {jQuery} chosenSlide - the jQuery element of the slide to show next, if one is selected.\n * @param {Number} idx - the index of the new slide in its collection, if one chosen.\n * @fires Orbit#slidechange\n */\n changeSlide(isLTR, chosenSlide, idx) {\n if (!this.$slides) {return; } // Don't freak out if we're in the middle of cleanup\n var $curSlide = this.$slides.filter('.is-active').eq(0);\n\n if (/mui/g.test($curSlide[0].className)) { return false; } //if the slide is currently animating, kick out of the function\n\n var $firstSlide = this.$slides.first(),\n $lastSlide = this.$slides.last(),\n dirIn = isLTR ? 'Right' : 'Left',\n dirOut = isLTR ? 'Left' : 'Right',\n _this = this,\n $newSlide;\n\n if (!chosenSlide) { //most of the time, this will be auto played or clicked from the navButtons.\n $newSlide = isLTR ? //if wrapping enabled, check to see if there is a `next` or `prev` sibling, if not, select the first or last slide to fill in. if wrapping not enabled, attempt to select `next` or `prev`, if there's nothing there, the function will kick out on next step. CRAZY NESTED TERNARIES!!!!!\n (this.options.infiniteWrap ? $curSlide.next(`.${this.options.slideClass}`).length ? $curSlide.next(`.${this.options.slideClass}`) : $firstSlide : $curSlide.next(`.${this.options.slideClass}`))//pick next slide if moving left to right\n :\n (this.options.infiniteWrap ? $curSlide.prev(`.${this.options.slideClass}`).length ? $curSlide.prev(`.${this.options.slideClass}`) : $lastSlide : $curSlide.prev(`.${this.options.slideClass}`));//pick prev slide if moving right to left\n } else {\n $newSlide = chosenSlide;\n }\n\n if ($newSlide.length) {\n /**\n * Triggers before the next slide starts animating in and only if a next slide has been found.\n * @event Orbit#beforeslidechange\n */\n this.$element.trigger('beforeslidechange.zf.orbit', [$curSlide, $newSlide]);\n\n if (this.options.bullets) {\n idx = idx || this.$slides.index($newSlide); //grab index to update bullets\n this._updateBullets(idx);\n }\n\n if (this.options.useMUI && !this.$element.is(':hidden')) {\n Motion.animateIn(\n $newSlide.addClass('is-active'),\n this.options[`animInFrom${dirIn}`],\n function(){\n $newSlide.css({'display': 'block'}).attr('aria-live', 'polite');\n });\n\n Motion.animateOut(\n $curSlide.removeClass('is-active'),\n this.options[`animOutTo${dirOut}`],\n function(){\n $curSlide.removeAttr('aria-live');\n if(_this.options.autoPlay && !_this.timer.isPaused){\n _this.timer.restart();\n }\n //do stuff?\n });\n } else {\n $curSlide.removeClass('is-active is-in').removeAttr('aria-live').hide();\n $newSlide.addClass('is-active is-in').attr('aria-live', 'polite').show();\n if (this.options.autoPlay && !this.timer.isPaused) {\n this.timer.restart();\n }\n }\n /**\n * Triggers when the slide has finished animating in.\n * @event Orbit#slidechange\n */\n this.$element.trigger('slidechange.zf.orbit', [$newSlide]);\n }\n }\n\n /**\n * Updates the active state of the bullets, if displayed.\n * Move the descriptor of the current slide `[data-slide-active-label]` to the newly active bullet.\n * If no `[data-slide-active-label]` is set, will move the exceeding `span` element.\n *\n * @function\n * @private\n * @param {Number} idx - the index of the current slide.\n */\n _updateBullets(idx) {\n var $oldBullet = this.$bullets.filter('.is-active');\n var $othersBullets = this.$bullets.not('.is-active');\n var $newBullet = this.$bullets.eq(idx);\n\n $oldBullet.removeClass('is-active').blur();\n $newBullet.addClass('is-active');\n\n // Find the descriptor for the current slide to move it to the new slide button\n var activeStateDescriptor = $oldBullet.children('[data-slide-active-label]').last();\n\n // If not explicitely given, search for the last \"exceeding\" span element (compared to others bullets).\n if (!activeStateDescriptor.length) {\n var spans = $oldBullet.children('span');\n var spanCountInOthersBullets = $othersBullets.toArray().map(b => $(b).children('span').length);\n\n // If there is an exceeding span element, use it as current slide descriptor\n if (spanCountInOthersBullets.every(count => count < spans.length)) {\n activeStateDescriptor = spans.last();\n activeStateDescriptor.attr('data-slide-active-label', '');\n }\n }\n\n // Move the current slide descriptor to the new slide button\n if (activeStateDescriptor.length) {\n activeStateDescriptor.detach();\n $newBullet.append(activeStateDescriptor);\n }\n }\n\n /**\n * Destroys the carousel and hides the element.\n * @function\n */\n _destroy() {\n this.$element.off('.zf.orbit').find('*').off('.zf.orbit').end().hide();\n }\n}\n\nOrbit.defaults = {\n /**\n * Tells the JS to look for and loadBullets.\n * @option\n * @type {boolean}\n * @default true\n */\n bullets: true,\n /**\n * Tells the JS to apply event listeners to nav buttons\n * @option\n * @type {boolean}\n * @default true\n */\n navButtons: true,\n /**\n * motion-ui animation class to apply\n * @option\n * @type {string}\n * @default 'slide-in-right'\n */\n animInFromRight: 'slide-in-right',\n /**\n * motion-ui animation class to apply\n * @option\n * @type {string}\n * @default 'slide-out-right'\n */\n animOutToRight: 'slide-out-right',\n /**\n * motion-ui animation class to apply\n * @option\n * @type {string}\n * @default 'slide-in-left'\n *\n */\n animInFromLeft: 'slide-in-left',\n /**\n * motion-ui animation class to apply\n * @option\n * @type {string}\n * @default 'slide-out-left'\n */\n animOutToLeft: 'slide-out-left',\n /**\n * Allows Orbit to automatically animate on page load.\n * @option\n * @type {boolean}\n * @default true\n */\n autoPlay: true,\n /**\n * Amount of time, in ms, between slide transitions\n * @option\n * @type {number}\n * @default 5000\n */\n timerDelay: 5000,\n /**\n * Allows Orbit to infinitely loop through the slides\n * @option\n * @type {boolean}\n * @default true\n */\n infiniteWrap: true,\n /**\n * Allows the Orbit slides to bind to swipe events for mobile, requires an additional util library\n * @option\n * @type {boolean}\n * @default true\n */\n swipe: true,\n /**\n * Allows the timing function to pause animation on hover.\n * @option\n * @type {boolean}\n * @default true\n */\n pauseOnHover: true,\n /**\n * Allows Orbit to bind keyboard events to the slider, to animate frames with arrow keys\n * @option\n * @type {boolean}\n * @default true\n */\n accessible: true,\n /**\n * Class applied to the container of Orbit\n * @option\n * @type {string}\n * @default 'orbit-container'\n */\n containerClass: 'orbit-container',\n /**\n * Class applied to individual slides.\n * @option\n * @type {string}\n * @default 'orbit-slide'\n */\n slideClass: 'orbit-slide',\n /**\n * Class applied to the bullet container. You're welcome.\n * @option\n * @type {string}\n * @default 'orbit-bullets'\n */\n boxOfBullets: 'orbit-bullets',\n /**\n * Class applied to the `next` navigation button.\n * @option\n * @type {string}\n * @default 'orbit-next'\n */\n nextClass: 'orbit-next',\n /**\n * Class applied to the `previous` navigation button.\n * @option\n * @type {string}\n * @default 'orbit-previous'\n */\n prevClass: 'orbit-previous',\n /**\n * Boolean to flag the js to use motion ui classes or not. Default to true for backwards compatibility.\n * @option\n * @type {boolean}\n * @default true\n */\n useMUI: true\n};\n\nexport {Orbit};\n","'use strict';\n\nimport { Box } from './foundation.util.box';\nimport { Plugin } from './foundation.core.plugin';\nimport { rtl as Rtl } from './foundation.core.utils';\n\nconst POSITIONS = ['left', 'right', 'top', 'bottom'];\nconst VERTICAL_ALIGNMENTS = ['top', 'bottom', 'center'];\nconst HORIZONTAL_ALIGNMENTS = ['left', 'right', 'center'];\n\nconst ALIGNMENTS = {\n 'left': VERTICAL_ALIGNMENTS,\n 'right': VERTICAL_ALIGNMENTS,\n 'top': HORIZONTAL_ALIGNMENTS,\n 'bottom': HORIZONTAL_ALIGNMENTS\n}\n\nfunction nextItem(item, array) {\n var currentIdx = array.indexOf(item);\n if(currentIdx === array.length - 1) {\n return array[0];\n } else {\n return array[currentIdx + 1];\n }\n}\n\n\nclass Positionable extends Plugin {\n /**\n * Abstract class encapsulating the tether-like explicit positioning logic\n * including repositioning based on overlap.\n * Expects classes to define defaults for vOffset, hOffset, position,\n * alignment, allowOverlap, and allowBottomOverlap. They can do this by\n * extending the defaults, or (for now recommended due to the way docs are\n * generated) by explicitly declaring them.\n *\n **/\n\n _init() {\n this.triedPositions = {};\n this.position = this.options.position === 'auto' ? this._getDefaultPosition() : this.options.position;\n this.alignment = this.options.alignment === 'auto' ? this._getDefaultAlignment() : this.options.alignment;\n this.originalPosition = this.position;\n this.originalAlignment = this.alignment;\n }\n\n _getDefaultPosition () {\n return 'bottom';\n }\n\n _getDefaultAlignment() {\n switch(this.position) {\n case 'bottom':\n case 'top':\n return Rtl() ? 'right' : 'left';\n case 'left':\n case 'right':\n return 'bottom';\n }\n }\n\n /**\n * Adjusts the positionable possible positions by iterating through alignments\n * and positions.\n * @function\n * @private\n */\n _reposition() {\n if(this._alignmentsExhausted(this.position)) {\n this.position = nextItem(this.position, POSITIONS);\n this.alignment = ALIGNMENTS[this.position][0];\n } else {\n this._realign();\n }\n }\n\n /**\n * Adjusts the dropdown pane possible positions by iterating through alignments\n * on the current position.\n * @function\n * @private\n */\n _realign() {\n this._addTriedPosition(this.position, this.alignment)\n this.alignment = nextItem(this.alignment, ALIGNMENTS[this.position])\n }\n\n _addTriedPosition(position, alignment) {\n this.triedPositions[position] = this.triedPositions[position] || []\n this.triedPositions[position].push(alignment);\n }\n\n _positionsExhausted() {\n var isExhausted = true;\n for(var i = 0; i < POSITIONS.length; i++) {\n isExhausted = isExhausted && this._alignmentsExhausted(POSITIONS[i]);\n }\n return isExhausted;\n }\n\n _alignmentsExhausted(position) {\n return this.triedPositions[position] && this.triedPositions[position].length == ALIGNMENTS[position].length;\n }\n\n\n // When we're trying to center, we don't want to apply offset that's going to\n // take us just off center, so wrap around to return 0 for the appropriate\n // offset in those alignments. TODO: Figure out if we want to make this\n // configurable behavior... it feels more intuitive, especially for tooltips, but\n // it's possible someone might actually want to start from center and then nudge\n // slightly off.\n _getVOffset() {\n return this.options.vOffset;\n }\n\n _getHOffset() {\n return this.options.hOffset;\n }\n\n _setPosition($anchor, $element, $parent) {\n if($anchor.attr('aria-expanded') === 'false'){ return false; }\n\n if (!this.options.allowOverlap) {\n // restore original position & alignment before checking overlap\n this.position = this.originalPosition;\n this.alignment = this.originalAlignment;\n }\n\n $element.offset(Box.GetExplicitOffsets($element, $anchor, this.position, this.alignment, this._getVOffset(), this._getHOffset()));\n\n if(!this.options.allowOverlap) {\n var minOverlap = 100000000;\n // default coordinates to how we start, in case we can't figure out better\n var minCoordinates = {position: this.position, alignment: this.alignment};\n while(!this._positionsExhausted()) {\n let overlap = Box.OverlapArea($element, $parent, false, false, this.options.allowBottomOverlap);\n if(overlap === 0) {\n return;\n }\n\n if(overlap < minOverlap) {\n minOverlap = overlap;\n minCoordinates = {position: this.position, alignment: this.alignment};\n }\n\n this._reposition();\n\n $element.offset(Box.GetExplicitOffsets($element, $anchor, this.position, this.alignment, this._getVOffset(), this._getHOffset()));\n }\n // If we get through the entire loop, there was no non-overlapping\n // position available. Pick the version with least overlap.\n this.position = minCoordinates.position;\n this.alignment = minCoordinates.alignment;\n $element.offset(Box.GetExplicitOffsets($element, $anchor, this.position, this.alignment, this._getVOffset(), this._getHOffset()));\n }\n }\n\n}\n\nPositionable.defaults = {\n /**\n * Position of positionable relative to anchor. Can be left, right, bottom, top, or auto.\n * @option\n * @type {string}\n * @default 'auto'\n */\n position: 'auto',\n /**\n * Alignment of positionable relative to anchor. Can be left, right, bottom, top, center, or auto.\n * @option\n * @type {string}\n * @default 'auto'\n */\n alignment: 'auto',\n /**\n * Allow overlap of container/window. If false, dropdown positionable first\n * try to position as defined by data-position and data-alignment, but\n * reposition if it would cause an overflow.\n * @option\n * @type {boolean}\n * @default false\n */\n allowOverlap: false,\n /**\n * Allow overlap of only the bottom of the container. This is the most common\n * behavior for dropdowns, allowing the dropdown to extend the bottom of the\n * screen but not otherwise influence or break out of the container.\n * @option\n * @type {boolean}\n * @default true\n */\n allowBottomOverlap: true,\n /**\n * Number of pixels the positionable should be separated vertically from anchor\n * @option\n * @type {number}\n * @default 0\n */\n vOffset: 0,\n /**\n * Number of pixels the positionable should be separated horizontally from anchor\n * @option\n * @type {number}\n * @default 0\n */\n hOffset: 0,\n}\n\nexport {Positionable};\n","'use strict';\n\nimport $ from 'jquery';\nimport { MediaQuery } from './foundation.util.mediaQuery';\nimport { GetYoDigits } from './foundation.core.utils';\nimport { Plugin }from './foundation.core.plugin';\n\nimport { Accordion } from './foundation.accordion';\nimport { Tabs } from './foundation.tabs';\n\n// The plugin matches the plugin classes with these plugin instances.\nvar MenuPlugins = {\n tabs: {\n cssClass: 'tabs',\n plugin: Tabs,\n open: (plugin, target) => plugin.selectTab(target),\n close: null /* not supported */,\n toggle: null /* not supported */,\n },\n accordion: {\n cssClass: 'accordion',\n plugin: Accordion,\n open: (plugin, target) => plugin.down($(target)),\n close: (plugin, target) => plugin.up($(target)),\n toggle: (plugin, target) => plugin.toggle($(target)),\n }\n};\n\n\n/**\n * ResponsiveAccordionTabs module.\n * @module foundation.responsiveAccordionTabs\n * @requires foundation.util.motion\n * @requires foundation.accordion\n * @requires foundation.tabs\n */\n\nclass ResponsiveAccordionTabs extends Plugin{\n constructor(element, options) {\n super(element, options);\n return this.options.reflow && this.storezfData || this;\n }\n\n /**\n * Creates a new instance of a responsive accordion tabs.\n * @class\n * @name ResponsiveAccordionTabs\n * @fires ResponsiveAccordionTabs#init\n * @param {jQuery} element - jQuery object to make into Responsive Accordion Tabs.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element, options) {\n this.$element = $(element);\n this.$element.data('zfPluginBase', this);\n this.options = $.extend({}, ResponsiveAccordionTabs.defaults, this.$element.data(), options);\n\n this.rules = this.$element.data('responsive-accordion-tabs');\n this.currentMq = null;\n this.currentRule = null;\n this.currentPlugin = null;\n this.className = 'ResponsiveAccordionTabs'; // ie9 back compat\n if (!this.$element.attr('id')) {\n this.$element.attr('id',GetYoDigits(6, 'responsiveaccordiontabs'));\n }\n\n this._init();\n this._events();\n }\n\n /**\n * Initializes the Menu by parsing the classes from the 'data-responsive-accordion-tabs' attribute on the element.\n * @function\n * @private\n */\n _init() {\n MediaQuery._init();\n\n // The first time an Interchange plugin is initialized, this.rules is converted from a string of \"classes\" to an object of rules\n if (typeof this.rules === 'string') {\n let rulesTree = {};\n\n // Parse rules from \"classes\" pulled from data attribute\n let rules = this.rules.split(' ');\n\n // Iterate through every rule found\n for (let i = 0; i < rules.length; i++) {\n let rule = rules[i].split('-');\n let ruleSize = rule.length > 1 ? rule[0] : 'small';\n let rulePlugin = rule.length > 1 ? rule[1] : rule[0];\n\n if (MenuPlugins[rulePlugin] !== null) {\n rulesTree[ruleSize] = MenuPlugins[rulePlugin];\n }\n }\n\n this.rules = rulesTree;\n }\n\n this._getAllOptions();\n\n if (!$.isEmptyObject(this.rules)) {\n this._checkMediaQueries();\n }\n }\n\n _getAllOptions() {\n //get all defaults and options\n var _this = this;\n _this.allOptions = {};\n for (var key in MenuPlugins) {\n if (MenuPlugins.hasOwnProperty(key)) {\n var obj = MenuPlugins[key];\n try {\n var dummyPlugin = $('<ul></ul>');\n var tmpPlugin = new obj.plugin(dummyPlugin,_this.options);\n for (var keyKey in tmpPlugin.options) {\n if (tmpPlugin.options.hasOwnProperty(keyKey) && keyKey !== 'zfPlugin') {\n var objObj = tmpPlugin.options[keyKey];\n _this.allOptions[keyKey] = objObj;\n }\n }\n tmpPlugin.destroy();\n }\n catch(e) {\n }\n }\n }\n }\n\n /**\n * Initializes events for the Menu.\n * @function\n * @private\n */\n _events() {\n this._changedZfMediaQueryHandler = this._checkMediaQueries.bind(this);\n $(window).on('changed.zf.mediaquery', this._changedZfMediaQueryHandler);\n }\n\n /**\n * Checks the current screen width against available media queries. If the media query has changed, and the plugin needed has changed, the plugins will swap out.\n * @function\n * @private\n */\n _checkMediaQueries() {\n var matchedMq, _this = this;\n // Iterate through each rule and find the last matching rule\n $.each(this.rules, function(key) {\n if (MediaQuery.atLeast(key)) {\n matchedMq = key;\n }\n });\n\n // No match? No dice\n if (!matchedMq) return;\n\n // Plugin already initialized? We good\n if (this.currentPlugin instanceof this.rules[matchedMq].plugin) return;\n\n // Remove existing plugin-specific CSS classes\n $.each(MenuPlugins, function(key, value) {\n _this.$element.removeClass(value.cssClass);\n });\n\n // Add the CSS class for the new plugin\n this.$element.addClass(this.rules[matchedMq].cssClass);\n\n // Create an instance of the new plugin\n if (this.currentPlugin) {\n //don't know why but on nested elements data zfPlugin get's lost\n if (!this.currentPlugin.$element.data('zfPlugin') && this.storezfData) this.currentPlugin.$element.data('zfPlugin',this.storezfData);\n this.currentPlugin.destroy();\n }\n this._handleMarkup(this.rules[matchedMq].cssClass);\n this.currentRule = this.rules[matchedMq];\n this.currentPlugin = new this.currentRule.plugin(this.$element, this.options);\n this.storezfData = this.currentPlugin.$element.data('zfPlugin');\n\n }\n\n _handleMarkup(toSet){\n var _this = this, fromString = 'accordion';\n var $panels = $('[data-tabs-content='+this.$element.attr('id')+']');\n if ($panels.length) fromString = 'tabs';\n if (fromString === toSet) {\n return;\n }\n\n var tabsTitle = _this.allOptions.linkClass?_this.allOptions.linkClass:'tabs-title';\n var tabsPanel = _this.allOptions.panelClass?_this.allOptions.panelClass:'tabs-panel';\n\n this.$element.removeAttr('role');\n var $liHeads = this.$element.children('.'+tabsTitle+',[data-accordion-item]').removeClass(tabsTitle).removeClass('accordion-item').removeAttr('data-accordion-item');\n var $liHeadsA = $liHeads.children('a').removeClass('accordion-title');\n\n if (fromString === 'tabs') {\n $panels = $panels.children('.'+tabsPanel).removeClass(tabsPanel).removeAttr('role').removeAttr('aria-hidden').removeAttr('aria-labelledby');\n $panels.children('a').removeAttr('role').removeAttr('aria-controls').removeAttr('aria-selected');\n } else {\n $panels = $liHeads.children('[data-tab-content]').removeClass('accordion-content');\n }\n\n $panels.css({display:'',visibility:''});\n $liHeads.css({display:'',visibility:''});\n if (toSet === 'accordion') {\n $panels.each(function(key,value){\n $(value).appendTo($liHeads.get(key)).addClass('accordion-content').attr('data-tab-content','').removeClass('is-active').css({height:''});\n $('[data-tabs-content='+_this.$element.attr('id')+']').after('<div id=\"tabs-placeholder-'+_this.$element.attr('id')+'\"></div>').detach();\n $liHeads.addClass('accordion-item').attr('data-accordion-item','');\n $liHeadsA.addClass('accordion-title');\n });\n } else if (toSet === 'tabs') {\n var $tabsContent = $('[data-tabs-content='+_this.$element.attr('id')+']');\n var $placeholder = $('#tabs-placeholder-'+_this.$element.attr('id'));\n if ($placeholder.length) {\n $tabsContent = $('<div class=\"tabs-content\"></div>').insertAfter($placeholder).attr('data-tabs-content',_this.$element.attr('id'));\n $placeholder.remove();\n } else {\n $tabsContent = $('<div class=\"tabs-content\"></div>').insertAfter(_this.$element).attr('data-tabs-content',_this.$element.attr('id'));\n }\n $panels.each(function(key,value){\n var tempValue = $(value).appendTo($tabsContent).addClass(tabsPanel);\n var hash = $liHeadsA.get(key).hash.slice(1);\n var id = $(value).attr('id') || GetYoDigits(6, 'accordion');\n if (hash !== id) {\n if (hash !== '') {\n $(value).attr('id',hash);\n } else {\n hash = id;\n $(value).attr('id',hash);\n $($liHeadsA.get(key)).attr('href',$($liHeadsA.get(key)).attr('href').replace('#','')+'#'+hash);\n }\n }\n var isActive = $($liHeads.get(key)).hasClass('is-active');\n if (isActive) {\n tempValue.addClass('is-active');\n }\n });\n $liHeads.addClass(tabsTitle);\n };\n }\n\n /**\n * Opens the plugin pane defined by `target`.\n * @param {jQuery | String} target - jQuery object or string of the id of the pane to open.\n * @see Accordion.down\n * @see Tabs.selectTab\n * @function\n */\n open(_target) {\n if (this.currentRule && typeof this.currentRule.open === 'function') {\n return this.currentRule.open(this.currentPlugin, ...arguments);\n }\n }\n\n /**\n * Closes the plugin pane defined by `target`. Not availaible for Tabs.\n * @param {jQuery | String} target - jQuery object or string of the id of the pane to close.\n * @see Accordion.up\n * @function\n */\n close(_target) {\n if (this.currentRule && typeof this.currentRule.close === 'function') {\n return this.currentRule.close(this.currentPlugin, ...arguments);\n }\n }\n\n /**\n * Toggles the plugin pane defined by `target`. Not availaible for Tabs.\n * @param {jQuery | String} target - jQuery object or string of the id of the pane to toggle.\n * @see Accordion.toggle\n * @function\n */\n toggle(_target) {\n if (this.currentRule && typeof this.currentRule.toggle === 'function') {\n return this.currentRule.toggle(this.currentPlugin, ...arguments);\n }\n }\n\n /**\n * Destroys the instance of the current plugin on this element, as well as the window resize handler that switches the plugins out.\n * @function\n */\n _destroy() {\n if (this.currentPlugin) this.currentPlugin.destroy();\n $(window).off('changed.zf.mediaquery', this._changedZfMediaQueryHandler);\n }\n}\n\nResponsiveAccordionTabs.defaults = {};\n\nexport {ResponsiveAccordionTabs};\n","'use strict';\n\nimport $ from 'jquery';\n\nimport { MediaQuery } from './foundation.util.mediaQuery';\nimport { GetYoDigits } from './foundation.core.utils';\nimport { Plugin } from './foundation.core.plugin';\n\nimport { DropdownMenu } from './foundation.dropdownMenu';\nimport { Drilldown } from './foundation.drilldown';\nimport { AccordionMenu } from './foundation.accordionMenu';\n\nlet MenuPlugins = {\n dropdown: {\n cssClass: 'dropdown',\n plugin: DropdownMenu\n },\n drilldown: {\n cssClass: 'drilldown',\n plugin: Drilldown\n },\n accordion: {\n cssClass: 'accordion-menu',\n plugin: AccordionMenu\n }\n};\n\n // import \"foundation.util.triggers.js\";\n\n\n/**\n * ResponsiveMenu module.\n * @module foundation.responsiveMenu\n * @requires foundation.util.triggers\n * @requires foundation.util.mediaQuery\n */\n\nclass ResponsiveMenu extends Plugin {\n /**\n * Creates a new instance of a responsive menu.\n * @class\n * @name ResponsiveMenu\n * @fires ResponsiveMenu#init\n * @param {jQuery} element - jQuery object to make into a dropdown menu.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element, options) {\n this.$element = $(element);\n this.rules = this.$element.data('responsive-menu');\n this.currentMq = null;\n this.currentPlugin = null;\n this.className = 'ResponsiveMenu'; // ie9 back compat\n\n this._init();\n this._events();\n }\n\n /**\n * Initializes the Menu by parsing the classes from the 'data-ResponsiveMenu' attribute on the element.\n * @function\n * @private\n */\n _init() {\n\n MediaQuery._init();\n // The first time an Interchange plugin is initialized, this.rules is converted from a string of \"classes\" to an object of rules\n if (typeof this.rules === 'string') {\n let rulesTree = {};\n\n // Parse rules from \"classes\" pulled from data attribute\n let rules = this.rules.split(' ');\n\n // Iterate through every rule found\n for (let i = 0; i < rules.length; i++) {\n let rule = rules[i].split('-');\n let ruleSize = rule.length > 1 ? rule[0] : 'small';\n let rulePlugin = rule.length > 1 ? rule[1] : rule[0];\n\n if (MenuPlugins[rulePlugin] !== null) {\n rulesTree[ruleSize] = MenuPlugins[rulePlugin];\n }\n }\n\n this.rules = rulesTree;\n }\n\n if (!$.isEmptyObject(this.rules)) {\n this._checkMediaQueries();\n }\n // Add data-mutate since children may need it.\n this.$element.attr('data-mutate', (this.$element.attr('data-mutate') || GetYoDigits(6, 'responsive-menu')));\n }\n\n /**\n * Initializes events for the Menu.\n * @function\n * @private\n */\n _events() {\n var _this = this;\n\n $(window).on('changed.zf.mediaquery', function() {\n _this._checkMediaQueries();\n });\n // $(window).on('resize.zf.ResponsiveMenu', function() {\n // _this._checkMediaQueries();\n // });\n }\n\n /**\n * Checks the current screen width against available media queries. If the media query has changed, and the plugin needed has changed, the plugins will swap out.\n * @function\n * @private\n */\n _checkMediaQueries() {\n var matchedMq, _this = this;\n // Iterate through each rule and find the last matching rule\n $.each(this.rules, function(key) {\n if (MediaQuery.atLeast(key)) {\n matchedMq = key;\n }\n });\n\n // No match? No dice\n if (!matchedMq) return;\n\n // Plugin already initialized? We good\n if (this.currentPlugin instanceof this.rules[matchedMq].plugin) return;\n\n // Remove existing plugin-specific CSS classes\n $.each(MenuPlugins, function(key, value) {\n _this.$element.removeClass(value.cssClass);\n });\n\n // Add the CSS class for the new plugin\n this.$element.addClass(this.rules[matchedMq].cssClass);\n\n // Create an instance of the new plugin\n if (this.currentPlugin) this.currentPlugin.destroy();\n this.currentPlugin = new this.rules[matchedMq].plugin(this.$element, {});\n }\n\n /**\n * Destroys the instance of the current plugin on this element, as well as the window resize handler that switches the plugins out.\n * @function\n */\n _destroy() {\n this.currentPlugin.destroy();\n $(window).off('.zf.ResponsiveMenu');\n }\n}\n\nResponsiveMenu.defaults = {};\n\nexport {ResponsiveMenu};\n","'use strict';\n\nimport $ from 'jquery';\n\nimport { MediaQuery } from './foundation.util.mediaQuery';\nimport { Motion } from './foundation.util.motion';\nimport { Plugin } from './foundation.core.plugin';\n\n/**\n * ResponsiveToggle module.\n * @module foundation.responsiveToggle\n * @requires foundation.util.mediaQuery\n * @requires foundation.util.motion\n */\n\nclass ResponsiveToggle extends Plugin {\n /**\n * Creates a new instance of Tab Bar.\n * @class\n * @name ResponsiveToggle\n * @fires ResponsiveToggle#init\n * @param {jQuery} element - jQuery object to attach tab bar functionality to.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element, options) {\n this.$element = $(element);\n this.options = $.extend({}, ResponsiveToggle.defaults, this.$element.data(), options);\n this.className = 'ResponsiveToggle'; // ie9 back compat\n\n this._init();\n this._events();\n }\n\n /**\n * Initializes the tab bar by finding the target element, toggling element, and running update().\n * @function\n * @private\n */\n _init() {\n MediaQuery._init();\n var targetID = this.$element.data('responsive-toggle');\n if (!targetID) {\n console.error('Your tab bar needs an ID of a Menu as the value of data-tab-bar.');\n }\n\n this.$targetMenu = $(`#${targetID}`);\n this.$toggler = this.$element.find('[data-toggle]').filter(function() {\n var target = $(this).data('toggle');\n return (target === targetID || target === \"\");\n });\n this.options = $.extend({}, this.options, this.$targetMenu.data());\n\n // If they were set, parse the animation classes\n if(this.options.animate) {\n let input = this.options.animate.split(' ');\n\n this.animationIn = input[0];\n this.animationOut = input[1] || null;\n }\n\n this._update();\n }\n\n /**\n * Adds necessary event handlers for the tab bar to work.\n * @function\n * @private\n */\n _events() {\n var _this = this;\n\n this._updateMqHandler = this._update.bind(this);\n\n $(window).on('changed.zf.mediaquery', this._updateMqHandler);\n\n this.$toggler.on('click.zf.responsiveToggle', this.toggleMenu.bind(this));\n }\n\n /**\n * Checks the current media query to determine if the tab bar should be visible or hidden.\n * @function\n * @private\n */\n _update() {\n // Mobile\n if (!MediaQuery.atLeast(this.options.hideFor)) {\n this.$element.show();\n this.$targetMenu.hide();\n }\n\n // Desktop\n else {\n this.$element.hide();\n this.$targetMenu.show();\n }\n }\n\n /**\n * Toggles the element attached to the tab bar. The toggle only happens if the screen is small enough to allow it.\n * @function\n * @fires ResponsiveToggle#toggled\n */\n toggleMenu() {\n if (!MediaQuery.atLeast(this.options.hideFor)) {\n /**\n * Fires when the element attached to the tab bar toggles.\n * @event ResponsiveToggle#toggled\n */\n if(this.options.animate) {\n if (this.$targetMenu.is(':hidden')) {\n Motion.animateIn(this.$targetMenu, this.animationIn, () => {\n this.$element.trigger('toggled.zf.responsiveToggle');\n this.$targetMenu.find('[data-mutate]').triggerHandler('mutateme.zf.trigger');\n });\n }\n else {\n Motion.animateOut(this.$targetMenu, this.animationOut, () => {\n this.$element.trigger('toggled.zf.responsiveToggle');\n });\n }\n }\n else {\n this.$targetMenu.toggle(0);\n this.$targetMenu.find('[data-mutate]').trigger('mutateme.zf.trigger');\n this.$element.trigger('toggled.zf.responsiveToggle');\n }\n }\n };\n\n _destroy() {\n this.$element.off('.zf.responsiveToggle');\n this.$toggler.off('.zf.responsiveToggle');\n\n $(window).off('changed.zf.mediaquery', this._updateMqHandler);\n }\n}\n\nResponsiveToggle.defaults = {\n /**\n * The breakpoint after which the menu is always shown, and the tab bar is hidden.\n * @option\n * @type {string}\n * @default 'medium'\n */\n hideFor: 'medium',\n\n /**\n * To decide if the toggle should be animated or not.\n * @option\n * @type {boolean}\n * @default false\n */\n animate: false\n};\n\nexport { ResponsiveToggle };\n","'use strict';\n\nimport $ from 'jquery';\nimport { Plugin } from './foundation.core.plugin';\nimport { onLoad } from './foundation.core.utils';\nimport { Keyboard } from './foundation.util.keyboard';\nimport { MediaQuery } from './foundation.util.mediaQuery';\nimport { Motion } from './foundation.util.motion';\nimport { Triggers } from './foundation.util.triggers';\nimport { Touch } from './foundation.util.touch'\n\n/**\n * Reveal module.\n * @module foundation.reveal\n * @requires foundation.util.keyboard\n * @requires foundation.util.touch\n * @requires foundation.util.triggers\n * @requires foundation.util.mediaQuery\n * @requires foundation.util.motion if using animations\n */\n\nclass Reveal extends Plugin {\n /**\n * Creates a new instance of Reveal.\n * @class\n * @name Reveal\n * @param {jQuery} element - jQuery object to use for the modal.\n * @param {Object} options - optional parameters.\n */\n _setup(element, options) {\n this.$element = element;\n this.options = $.extend({}, Reveal.defaults, this.$element.data(), options);\n this.className = 'Reveal'; // ie9 back compat\n this._init();\n\n // Touch and Triggers init are idempotent, just need to make sure they are initialized\n Touch.init($);\n Triggers.init($);\n\n Keyboard.register('Reveal', {\n 'ESCAPE': 'close',\n });\n }\n\n /**\n * Initializes the modal by adding the overlay and close buttons, (if selected).\n * @private\n */\n _init() {\n MediaQuery._init();\n this.id = this.$element.attr('id');\n this.isActive = false;\n this.cached = {mq: MediaQuery.current};\n\n this.$anchor = $(`[data-open=\"${this.id}\"]`).length ? $(`[data-open=\"${this.id}\"]`) : $(`[data-toggle=\"${this.id}\"]`);\n this.$anchor.attr({\n 'aria-controls': this.id,\n 'aria-haspopup': true,\n 'tabindex': 0\n });\n\n if (this.options.fullScreen || this.$element.hasClass('full')) {\n this.options.fullScreen = true;\n this.options.overlay = false;\n }\n if (this.options.overlay && !this.$overlay) {\n this.$overlay = this._makeOverlay(this.id);\n }\n\n this.$element.attr({\n 'role': 'dialog',\n 'aria-hidden': true,\n 'data-yeti-box': this.id,\n 'data-resize': this.id\n });\n\n if(this.$overlay) {\n this.$element.detach().appendTo(this.$overlay);\n } else {\n this.$element.detach().appendTo($(this.options.appendTo));\n this.$element.addClass('without-overlay');\n }\n this._events();\n if (this.options.deepLink && window.location.hash === ( `#${this.id}`)) {\n this.onLoadListener = onLoad($(window), () => this.open());\n }\n }\n\n /**\n * Creates an overlay div to display behind the modal.\n * @private\n */\n _makeOverlay() {\n var additionalOverlayClasses = '';\n\n if (this.options.additionalOverlayClasses) {\n additionalOverlayClasses = ' ' + this.options.additionalOverlayClasses;\n }\n\n return $('<div></div>')\n .addClass('reveal-overlay' + additionalOverlayClasses)\n .appendTo(this.options.appendTo);\n }\n\n /**\n * Updates position of modal\n * TODO: Figure out if we actually need to cache these values or if it doesn't matter\n * @private\n */\n _updatePosition() {\n var width = this.$element.outerWidth();\n var outerWidth = $(window).width();\n var height = this.$element.outerHeight();\n var outerHeight = $(window).height();\n var left, top = null;\n if (this.options.hOffset === 'auto') {\n left = parseInt((outerWidth - width) / 2, 10);\n } else {\n left = parseInt(this.options.hOffset, 10);\n }\n if (this.options.vOffset === 'auto') {\n if (height > outerHeight) {\n top = parseInt(Math.min(100, outerHeight / 10), 10);\n } else {\n top = parseInt((outerHeight - height) / 4, 10);\n }\n } else if (this.options.vOffset !== null) {\n top = parseInt(this.options.vOffset, 10);\n }\n\n if (top !== null) {\n this.$element.css({top: top + 'px'});\n }\n\n // only worry about left if we don't have an overlay or we have a horizontal offset,\n // otherwise we're perfectly in the middle\n if (!this.$overlay || (this.options.hOffset !== 'auto')) {\n this.$element.css({left: left + 'px'});\n this.$element.css({margin: '0px'});\n }\n\n }\n\n /**\n * Adds event handlers for the modal.\n * @private\n */\n _events() {\n var _this = this;\n\n this.$element.on({\n 'open.zf.trigger': this.open.bind(this),\n 'close.zf.trigger': (event, $element) => {\n if ((event.target === _this.$element[0]) ||\n ($(event.target).parents('[data-closable]')[0] === $element)) { // only close reveal when it's explicitly called\n return this.close.apply(this);\n }\n },\n 'toggle.zf.trigger': this.toggle.bind(this),\n 'resizeme.zf.trigger': function() {\n _this._updatePosition();\n }\n });\n\n if (this.options.closeOnClick && this.options.overlay) {\n this.$overlay.off('.zf.reveal').on('click.zf.dropdown tap.zf.dropdown', function(e) {\n if (e.target === _this.$element[0] ||\n $.contains(_this.$element[0], e.target) ||\n !$.contains(document, e.target)) {\n return;\n }\n _this.close();\n });\n }\n if (this.options.deepLink) {\n $(window).on(`hashchange.zf.reveal:${this.id}`, this._handleState.bind(this));\n }\n }\n\n /**\n * Handles modal methods on back/forward button clicks or any other event that triggers hashchange.\n * @private\n */\n _handleState(e) {\n if(window.location.hash === ( '#' + this.id) && !this.isActive){ this.open(); }\n else{ this.close(); }\n }\n\n /**\n * Disables the scroll when Reveal is shown to prevent the background from shifting\n * @param {number} scrollTop - Scroll to visually apply, window current scroll by default\n */\n _disableScroll(scrollTop) {\n scrollTop = scrollTop || $(window).scrollTop();\n if ($(document).height() > $(window).height()) {\n $(\"html\")\n .css(\"top\", -scrollTop);\n }\n }\n\n /**\n * Reenables the scroll when Reveal closes\n * @param {number} scrollTop - Scroll to restore, html \"top\" property by default (as set by `_disableScroll`)\n */\n _enableScroll(scrollTop) {\n scrollTop = scrollTop || parseInt($(\"html\").css(\"top\"));\n if ($(document).height() > $(window).height()) {\n $(\"html\")\n .css(\"top\", \"\");\n $(window).scrollTop(-scrollTop);\n }\n }\n\n\n /**\n * Opens the modal controlled by `this.$anchor`, and closes all others by default.\n * @function\n * @fires Reveal#closeme\n * @fires Reveal#open\n */\n open() {\n // either update or replace browser history\n const hash = `#${this.id}`;\n if (this.options.deepLink && window.location.hash !== hash) {\n\n if (window.history.pushState) {\n if (this.options.updateHistory) {\n window.history.pushState({}, '', hash);\n } else {\n window.history.replaceState({}, '', hash);\n }\n } else {\n window.location.hash = hash;\n }\n }\n\n // Remember anchor that opened it to set focus back later, have general anchors as fallback\n this.$activeAnchor = $(document.activeElement).is(this.$anchor) ? $(document.activeElement) : this.$anchor;\n\n this.isActive = true;\n\n // Make elements invisible, but remove display: none so we can get size and positioning\n this.$element\n .css({ 'visibility': 'hidden' })\n .show()\n .scrollTop(0);\n if (this.options.overlay) {\n this.$overlay.css({'visibility': 'hidden'}).show();\n }\n\n this._updatePosition();\n\n this.$element\n .hide()\n .css({ 'visibility': '' });\n\n if(this.$overlay) {\n this.$overlay.css({'visibility': ''}).hide();\n if(this.$element.hasClass('fast')) {\n this.$overlay.addClass('fast');\n } else if (this.$element.hasClass('slow')) {\n this.$overlay.addClass('slow');\n }\n }\n\n\n if (!this.options.multipleOpened) {\n /**\n * Fires immediately before the modal opens.\n * Closes any other modals that are currently open\n * @event Reveal#closeme\n */\n this.$element.trigger('closeme.zf.reveal', this.id);\n }\n\n if ($('.reveal:visible').length === 0) {\n this._disableScroll();\n }\n\n var _this = this;\n\n // Motion UI method of reveal\n if (this.options.animationIn) {\n function afterAnimation(){\n _this.$element\n .attr({\n 'aria-hidden': false,\n 'tabindex': -1\n })\n .focus();\n _this._addGlobalClasses();\n Keyboard.trapFocus(_this.$element);\n }\n if (this.options.overlay) {\n Motion.animateIn(this.$overlay, 'fade-in');\n }\n Motion.animateIn(this.$element, this.options.animationIn, () => {\n if(this.$element) { // protect against object having been removed\n this.focusableElements = Keyboard.findFocusable(this.$element);\n afterAnimation();\n }\n });\n }\n // jQuery method of reveal\n else {\n if (this.options.overlay) {\n this.$overlay.show(0);\n }\n this.$element.show(this.options.showDelay);\n }\n\n // handle accessibility\n this.$element\n .attr({\n 'aria-hidden': false,\n 'tabindex': -1\n })\n .focus();\n Keyboard.trapFocus(this.$element);\n\n this._addGlobalClasses();\n\n this._addGlobalListeners();\n\n /**\n * Fires when the modal has successfully opened.\n * @event Reveal#open\n */\n this.$element.trigger('open.zf.reveal');\n }\n\n /**\n * Adds classes and listeners on document required by open modals.\n *\n * The following classes are added and updated:\n * - `.is-reveal-open` - Prevents the scroll on document\n * - `.zf-has-scroll` - Displays a disabled scrollbar on document if required like if the\n * scroll was not disabled. This prevent a \"shift\" of the page content due\n * the scrollbar disappearing when the modal opens.\n *\n * @private\n */\n _addGlobalClasses() {\n const updateScrollbarClass = () => {\n $('html').toggleClass('zf-has-scroll', !!($(document).height() > $(window).height()));\n };\n\n this.$element.on('resizeme.zf.trigger.revealScrollbarListener', () => updateScrollbarClass());\n updateScrollbarClass();\n $('html').addClass('is-reveal-open');\n }\n\n /**\n * Removes classes and listeners on document that were required by open modals.\n * @private\n */\n _removeGlobalClasses() {\n this.$element.off('resizeme.zf.trigger.revealScrollbarListener');\n $('html').removeClass('is-reveal-open');\n $('html').removeClass('zf-has-scroll');\n }\n\n /**\n * Adds extra event handlers for the body and window if necessary.\n * @private\n */\n _addGlobalListeners() {\n var _this = this;\n if(!this.$element) { return; } // If we're in the middle of cleanup, don't freak out\n this.focusableElements = Keyboard.findFocusable(this.$element);\n\n if (!this.options.overlay && this.options.closeOnClick && !this.options.fullScreen) {\n $('body').on('click.zf.dropdown tap.zf.dropdown', function(e) {\n if (e.target === _this.$element[0] ||\n $.contains(_this.$element[0], e.target) ||\n !$.contains(document, e.target)) { return; }\n _this.close();\n });\n }\n\n if (this.options.closeOnEsc) {\n $(window).on('keydown.zf.reveal', function(e) {\n Keyboard.handleKey(e, 'Reveal', {\n close: function() {\n if (_this.options.closeOnEsc) {\n _this.close();\n }\n }\n });\n });\n }\n }\n\n /**\n * Closes the modal.\n * @function\n * @fires Reveal#closed\n */\n close() {\n if (!this.isActive || !this.$element.is(':visible')) {\n return false;\n }\n var _this = this;\n\n // Motion UI method of hiding\n if (this.options.animationOut) {\n if (this.options.overlay) {\n Motion.animateOut(this.$overlay, 'fade-out');\n }\n\n Motion.animateOut(this.$element, this.options.animationOut, finishUp);\n }\n // jQuery method of hiding\n else {\n this.$element.hide(this.options.hideDelay);\n\n if (this.options.overlay) {\n this.$overlay.hide(0, finishUp);\n }\n else {\n finishUp();\n }\n }\n\n // Conditionals to remove extra event listeners added on open\n if (this.options.closeOnEsc) {\n $(window).off('keydown.zf.reveal');\n }\n\n if (!this.options.overlay && this.options.closeOnClick) {\n $('body').off('click.zf.dropdown tap.zf.dropdown');\n }\n\n this.$element.off('keydown.zf.reveal');\n\n function finishUp() {\n\n // Get the current top before the modal is closed and restore the scroll after.\n // TODO: use component properties instead of HTML properties\n // See https://github.com/foundation/foundation-sites/pull/10786\n var scrollTop = parseInt($(\"html\").css(\"top\"));\n\n if ($('.reveal:visible').length === 0) {\n _this._removeGlobalClasses(); // also remove .is-reveal-open from the html element when there is no opened reveal\n }\n\n Keyboard.releaseFocus(_this.$element);\n\n _this.$element.attr('aria-hidden', true);\n\n if ($('.reveal:visible').length === 0) {\n _this._enableScroll(scrollTop);\n }\n\n /**\n * Fires when the modal is done closing.\n * @event Reveal#closed\n */\n _this.$element.trigger('closed.zf.reveal');\n }\n\n /**\n * Resets the modal content\n * This prevents a running video to keep going in the background\n */\n if (this.options.resetOnClose) {\n this.$element.html(this.$element.html());\n }\n\n this.isActive = false;\n // If deepLink and we did not switched to an other modal...\n if (_this.options.deepLink && window.location.hash === `#${this.id}`) {\n // Remove the history hash\n if (window.history.replaceState) {\n const urlWithoutHash = window.location.pathname + window.location.search;\n if (this.options.updateHistory) {\n window.history.pushState({}, '', urlWithoutHash); // remove the hash\n } else {\n window.history.replaceState('', document.title, urlWithoutHash);\n }\n } else {\n window.location.hash = '';\n }\n }\n\n this.$activeAnchor.focus();\n }\n\n /**\n * Toggles the open/closed state of a modal.\n * @function\n */\n toggle() {\n if (this.isActive) {\n this.close();\n } else {\n this.open();\n }\n };\n\n /**\n * Destroys an instance of a modal.\n * @function\n */\n _destroy() {\n if (this.options.overlay) {\n this.$element.appendTo($(this.options.appendTo)); // move $element outside of $overlay to prevent error unregisterPlugin()\n this.$overlay.hide().off().remove();\n }\n this.$element.hide().off();\n this.$anchor.off('.zf');\n $(window).off(`.zf.reveal:${this.id}`)\n if (this.onLoadListener) $(window).off(this.onLoadListener);\n\n if ($('.reveal:visible').length === 0) {\n this._removeGlobalClasses(); // also remove .is-reveal-open from the html element when there is no opened reveal\n }\n };\n}\n\nReveal.defaults = {\n /**\n * Motion-UI class to use for animated elements. If none used, defaults to simple show/hide.\n * @option\n * @type {string}\n * @default ''\n */\n animationIn: '',\n /**\n * Motion-UI class to use for animated elements. If none used, defaults to simple show/hide.\n * @option\n * @type {string}\n * @default ''\n */\n animationOut: '',\n /**\n * Time, in ms, to delay the opening of a modal after a click if no animation used.\n * @option\n * @type {number}\n * @default 0\n */\n showDelay: 0,\n /**\n * Time, in ms, to delay the closing of a modal after a click if no animation used.\n * @option\n * @type {number}\n * @default 0\n */\n hideDelay: 0,\n /**\n * Allows a click on the body/overlay to close the modal.\n * @option\n * @type {boolean}\n * @default true\n */\n closeOnClick: true,\n /**\n * Allows the modal to close if the user presses the `ESCAPE` key.\n * @option\n * @type {boolean}\n * @default true\n */\n closeOnEsc: true,\n /**\n * If true, allows multiple modals to be displayed at once.\n * @option\n * @type {boolean}\n * @default false\n */\n multipleOpened: false,\n /**\n * Distance, in pixels, the modal should push down from the top of the screen.\n * @option\n * @type {number|string}\n * @default auto\n */\n vOffset: 'auto',\n /**\n * Distance, in pixels, the modal should push in from the side of the screen.\n * @option\n * @type {number|string}\n * @default auto\n */\n hOffset: 'auto',\n /**\n * Allows the modal to be fullscreen, completely blocking out the rest of the view. JS checks for this as well.\n * @option\n * @type {boolean}\n * @default false\n */\n fullScreen: false,\n /**\n * Allows the modal to generate an overlay div, which will cover the view when modal opens.\n * @option\n * @type {boolean}\n * @default true\n */\n overlay: true,\n /**\n * Allows the modal to remove and reinject markup on close. Should be true if using video elements w/o using provider's api, otherwise, videos will continue to play in the background.\n * @option\n * @type {boolean}\n * @default false\n */\n resetOnClose: false,\n /**\n * Link the location hash to the modal.\n * Set the location hash when the modal is opened/closed, and open/close the modal when the location changes.\n * @option\n * @type {boolean}\n * @default false\n */\n deepLink: false,\n /**\n * If `deepLink` is enabled, update the browser history with the open modal\n * @option\n * @default false\n */\n updateHistory: false,\n /**\n * Allows the modal to append to custom div.\n * @option\n * @type {string}\n * @default \"body\"\n */\n appendTo: \"body\",\n /**\n * Allows adding additional class names to the reveal overlay.\n * @option\n * @type {string}\n * @default ''\n */\n additionalOverlayClasses: ''\n};\n\nexport {Reveal};\n","'use strict';\n\nimport $ from 'jquery';\nimport { Keyboard } from './foundation.util.keyboard';\nimport { Move } from './foundation.util.motion';\nimport { GetYoDigits, rtl as Rtl } from './foundation.core.utils';\n\nimport { Plugin } from './foundation.core.plugin';\n\nimport { Touch } from './foundation.util.touch';\n\nimport { Triggers } from './foundation.util.triggers';\n/**\n * Slider module.\n * @module foundation.slider\n * @requires foundation.util.motion\n * @requires foundation.util.triggers\n * @requires foundation.util.keyboard\n * @requires foundation.util.touch\n */\n\nclass Slider extends Plugin {\n /**\n * Creates a new instance of a slider control.\n * @class\n * @name Slider\n * @param {jQuery} element - jQuery object to make into a slider control.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element, options) {\n this.$element = element;\n this.options = $.extend({}, Slider.defaults, this.$element.data(), options);\n this.className = 'Slider'; // ie9 back compat\n\n // Touch and Triggers inits are idempotent, we just need to make sure it's initialied.\n Touch.init($);\n Triggers.init($);\n\n this._init();\n\n Keyboard.register('Slider', {\n 'ltr': {\n 'ARROW_RIGHT': 'increase',\n 'ARROW_UP': 'increase',\n 'ARROW_DOWN': 'decrease',\n 'ARROW_LEFT': 'decrease',\n 'SHIFT_ARROW_RIGHT': 'increase_fast',\n 'SHIFT_ARROW_UP': 'increase_fast',\n 'SHIFT_ARROW_DOWN': 'decrease_fast',\n 'SHIFT_ARROW_LEFT': 'decrease_fast',\n 'HOME': 'min',\n 'END': 'max'\n },\n 'rtl': {\n 'ARROW_LEFT': 'increase',\n 'ARROW_RIGHT': 'decrease',\n 'SHIFT_ARROW_LEFT': 'increase_fast',\n 'SHIFT_ARROW_RIGHT': 'decrease_fast'\n }\n });\n }\n\n /**\n * Initilizes the plugin by reading/setting attributes, creating collections and setting the initial position of the handle(s).\n * @function\n * @private\n */\n _init() {\n this.inputs = this.$element.find('input');\n this.handles = this.$element.find('[data-slider-handle]');\n\n this.$handle = this.handles.eq(0);\n this.$input = this.inputs.length ? this.inputs.eq(0) : $(`#${this.$handle.attr('aria-controls')}`);\n this.$fill = this.$element.find('[data-slider-fill]').css(this.options.vertical ? 'height' : 'width', 0);\n\n var _this = this;\n if (this.options.disabled || this.$element.hasClass(this.options.disabledClass)) {\n this.options.disabled = true;\n this.$element.addClass(this.options.disabledClass);\n }\n if (!this.inputs.length) {\n this.inputs = $().add(this.$input);\n this.options.binding = true;\n }\n\n this._setInitAttr(0);\n\n if (this.handles[1]) {\n this.options.doubleSided = true;\n this.$handle2 = this.handles.eq(1);\n this.$input2 = this.inputs.length > 1 ? this.inputs.eq(1) : $(`#${this.$handle2.attr('aria-controls')}`);\n\n if (!this.inputs[1]) {\n this.inputs = this.inputs.add(this.$input2);\n }\n\n // this.$handle.triggerHandler('click.zf.slider');\n this._setInitAttr(1);\n }\n\n // Set handle positions\n this.setHandles();\n\n this._events();\n }\n\n setHandles() {\n if(this.handles[1]) {\n this._setHandlePos(this.$handle, this.inputs.eq(0).val(), () => {\n this._setHandlePos(this.$handle2, this.inputs.eq(1).val());\n });\n } else {\n this._setHandlePos(this.$handle, this.inputs.eq(0).val());\n }\n }\n\n _reflow() {\n this.setHandles();\n }\n /**\n * @function\n * @private\n * @param {Number} value - floating point (the value) to be transformed using to a relative position on the slider (the inverse of _value)\n */\n _pctOfBar(value) {\n var pctOfBar = percent(value - this.options.start, this.options.end - this.options.start)\n\n switch(this.options.positionValueFunction) {\n case \"pow\":\n pctOfBar = this._logTransform(pctOfBar);\n break;\n case \"log\":\n pctOfBar = this._powTransform(pctOfBar);\n break;\n }\n\n return pctOfBar.toFixed(2)\n }\n\n /**\n * @function\n * @private\n * @param {Number} pctOfBar - floating point, the relative position of the slider (typically between 0-1) to be transformed to a value\n */\n _value(pctOfBar) {\n switch(this.options.positionValueFunction) {\n case \"pow\":\n pctOfBar = this._powTransform(pctOfBar);\n break;\n case \"log\":\n pctOfBar = this._logTransform(pctOfBar);\n break;\n }\n\n var value\n if (this.options.vertical) {\n // linear interpolation which is working with negative values for start\n // https://math.stackexchange.com/a/1019084\n value = parseFloat(this.options.end) + pctOfBar * (this.options.start - this.options.end)\n } else {\n value = (this.options.end - this.options.start) * pctOfBar + parseFloat(this.options.start);\n }\n\n return value\n }\n\n /**\n * @function\n * @private\n * @param {Number} value - floating point (typically between 0-1) to be transformed using the log function\n */\n _logTransform(value) {\n return baseLog(this.options.nonLinearBase, ((value*(this.options.nonLinearBase-1))+1))\n }\n\n /**\n * @function\n * @private\n * @param {Number} value - floating point (typically between 0-1) to be transformed using the power function\n */\n _powTransform(value) {\n return (Math.pow(this.options.nonLinearBase, value) - 1) / (this.options.nonLinearBase - 1)\n }\n\n /**\n * Sets the position of the selected handle and fill bar.\n * @function\n * @private\n * @param {jQuery} $hndl - the selected handle to move.\n * @param {Number} location - floating point between the start and end values of the slider bar.\n * @param {Function} cb - callback function to fire on completion.\n * @fires Slider#moved\n * @fires Slider#changed\n */\n _setHandlePos($hndl, location, cb) {\n // don't move if the slider has been disabled since its initialization\n if (this.$element.hasClass(this.options.disabledClass)) {\n return;\n }\n //might need to alter that slightly for bars that will have odd number selections.\n location = parseFloat(location);//on input change events, convert string to number...grumble.\n\n // prevent slider from running out of bounds, if value exceeds the limits set through options, override the value to min/max\n if (location < this.options.start) { location = this.options.start; }\n else if (location > this.options.end) { location = this.options.end; }\n\n var isDbl = this.options.doubleSided;\n\n if (isDbl) { //this block is to prevent 2 handles from crossing eachother. Could/should be improved.\n if (this.handles.index($hndl) === 0) {\n var h2Val = parseFloat(this.$handle2.attr('aria-valuenow'));\n location = location >= h2Val ? h2Val - this.options.step : location;\n } else {\n var h1Val = parseFloat(this.$handle.attr('aria-valuenow'));\n location = location <= h1Val ? h1Val + this.options.step : location;\n }\n }\n\n var _this = this,\n vert = this.options.vertical,\n hOrW = vert ? 'height' : 'width',\n lOrT = vert ? 'top' : 'left',\n handleDim = $hndl[0].getBoundingClientRect()[hOrW],\n elemDim = this.$element[0].getBoundingClientRect()[hOrW],\n //percentage of bar min/max value based on click or drag point\n pctOfBar = this._pctOfBar(location),\n //number of actual pixels to shift the handle, based on the percentage obtained above\n pxToMove = (elemDim - handleDim) * pctOfBar,\n //percentage of bar to shift the handle\n movement = (percent(pxToMove, elemDim) * 100).toFixed(this.options.decimal);\n //fixing the decimal value for the location number, is passed to other methods as a fixed floating-point value\n location = parseFloat(location.toFixed(this.options.decimal));\n // declare empty object for css adjustments, only used with 2 handled-sliders\n var css = {};\n\n this._setValues($hndl, location);\n\n // TODO update to calculate based on values set to respective inputs??\n if (isDbl) {\n var isLeftHndl = this.handles.index($hndl) === 0,\n //empty variable, will be used for min-height/width for fill bar\n dim,\n //percentage w/h of the handle compared to the slider bar\n handlePct = ~~(percent(handleDim, elemDim) * 100);\n //if left handle, the math is slightly different than if it's the right handle, and the left/top property needs to be changed for the fill bar\n if (isLeftHndl) {\n //left or top percentage value to apply to the fill bar.\n css[lOrT] = `${movement}%`;\n //calculate the new min-height/width for the fill bar.\n dim = parseFloat(this.$handle2[0].style[lOrT]) - movement + handlePct;\n //this callback is necessary to prevent errors and allow the proper placement and initialization of a 2-handled slider\n //plus, it means we don't care if 'dim' isNaN on init, it won't be in the future.\n if (cb && typeof cb === 'function') { cb(); }//this is only needed for the initialization of 2 handled sliders\n } else {\n //just caching the value of the left/bottom handle's left/top property\n var handlePos = parseFloat(this.$handle[0].style[lOrT]);\n //calculate the new min-height/width for the fill bar. Use isNaN to prevent false positives for numbers <= 0\n //based on the percentage of movement of the handle being manipulated, less the opposing handle's left/top position, plus the percentage w/h of the handle itself\n dim = movement - (isNaN(handlePos) ? (this.options.initialStart - this.options.start)/((this.options.end-this.options.start)/100) : handlePos) + handlePct;\n }\n // assign the min-height/width to our css object\n css[`min-${hOrW}`] = `${dim}%`;\n }\n\n this.$element.one('finished.zf.animate', function() {\n /**\n * Fires when the handle is done moving.\n * @event Slider#moved\n */\n _this.$element.trigger('moved.zf.slider', [$hndl]);\n });\n\n //because we don't know exactly how the handle will be moved, check the amount of time it should take to move.\n var moveTime = this.$element.data('dragging') ? 1000/60 : this.options.moveTime;\n\n Move(moveTime, $hndl, function() {\n // adjusting the left/top property of the handle, based on the percentage calculated above\n // if movement isNaN, that is because the slider is hidden and we cannot determine handle width,\n // fall back to next best guess.\n if (isNaN(movement)) {\n $hndl.css(lOrT, `${pctOfBar * 100}%`);\n }\n else {\n $hndl.css(lOrT, `${movement}%`);\n }\n\n if (!_this.options.doubleSided) {\n //if single-handled, a simple method to expand the fill bar\n _this.$fill.css(hOrW, `${pctOfBar * 100}%`);\n } else {\n //otherwise, use the css object we created above\n _this.$fill.css(css);\n }\n });\n\n\n /**\n * Fires when the value has not been change for a given time.\n * @event Slider#changed\n */\n clearTimeout(_this.timeout);\n _this.timeout = setTimeout(function(){\n _this.$element.trigger('changed.zf.slider', [$hndl]);\n }, _this.options.changedDelay);\n }\n\n /**\n * Sets the initial attribute for the slider element.\n * @function\n * @private\n * @param {Number} idx - index of the current handle/input to use.\n */\n _setInitAttr(idx) {\n var initVal = (idx === 0 ? this.options.initialStart : this.options.initialEnd)\n var id = this.inputs.eq(idx).attr('id') || GetYoDigits(6, 'slider');\n this.inputs.eq(idx).attr({\n 'id': id,\n 'max': this.options.end,\n 'min': this.options.start,\n 'step': this.options.step\n });\n this.inputs.eq(idx).val(initVal);\n this.handles.eq(idx).attr({\n 'role': 'slider',\n 'aria-controls': id,\n 'aria-valuemax': this.options.end,\n 'aria-valuemin': this.options.start,\n 'aria-valuenow': initVal,\n 'aria-orientation': this.options.vertical ? 'vertical' : 'horizontal',\n 'tabindex': 0\n });\n }\n\n /**\n * Sets the input and `aria-valuenow` values for the slider element.\n * @function\n * @private\n * @param {jQuery} $handle - the currently selected handle.\n * @param {Number} val - floating point of the new value.\n */\n _setValues($handle, val) {\n var idx = this.options.doubleSided ? this.handles.index($handle) : 0;\n this.inputs.eq(idx).val(val);\n $handle.attr('aria-valuenow', val);\n }\n\n /**\n * Handles events on the slider element.\n * Calculates the new location of the current handle.\n * If there are two handles and the bar was clicked, it determines which handle to move.\n * @function\n * @private\n * @param {Object} e - the `event` object passed from the listener.\n * @param {jQuery} $handle - the current handle to calculate for, if selected.\n * @param {Number} val - floating point number for the new value of the slider.\n * TODO clean this up, there's a lot of repeated code between this and the _setHandlePos fn.\n */\n _handleEvent(e, $handle, val) {\n var value, hasVal;\n if (!val) {//click or drag events\n e.preventDefault();\n var _this = this,\n vertical = this.options.vertical,\n param = vertical ? 'height' : 'width',\n direction = vertical ? 'top' : 'left',\n eventOffset = vertical ? e.pageY : e.pageX,\n barDim = this.$element[0].getBoundingClientRect()[param],\n windowScroll = vertical ? $(window).scrollTop() : $(window).scrollLeft();\n\n var elemOffset = this.$element.offset()[direction];\n\n // touch events emulated by the touch util give position relative to screen, add window.scroll to event coordinates...\n // best way to guess this is simulated is if clientY == pageY\n if (e.clientY === e.pageY) { eventOffset = eventOffset + windowScroll; }\n var eventFromBar = eventOffset - elemOffset;\n var barXY;\n if (eventFromBar < 0) {\n barXY = 0;\n } else if (eventFromBar > barDim) {\n barXY = barDim;\n } else {\n barXY = eventFromBar;\n }\n var offsetPct = percent(barXY, barDim);\n\n value = this._value(offsetPct);\n\n // turn everything around for RTL, yay math!\n if (Rtl() && !this.options.vertical) {value = this.options.end - value;}\n\n value = _this._adjustValue(null, value);\n //boolean flag for the setHandlePos fn, specifically for vertical sliders\n hasVal = false;\n\n if (!$handle) {//figure out which handle it is, pass it to the next function.\n var firstHndlPos = absPosition(this.$handle, direction, barXY, param),\n secndHndlPos = absPosition(this.$handle2, direction, barXY, param);\n $handle = firstHndlPos <= secndHndlPos ? this.$handle : this.$handle2;\n }\n\n } else {//change event on input\n value = this._adjustValue(null, val);\n hasVal = true;\n }\n\n this._setHandlePos($handle, value);\n }\n\n /**\n * Adjustes value for handle in regard to step value. returns adjusted value\n * @function\n * @private\n * @param {jQuery} $handle - the selected handle.\n * @param {Number} value - value to adjust. used if $handle is falsy\n */\n _adjustValue($handle, value) {\n var val,\n step = this.options.step,\n div = parseFloat(step/2),\n left, prev_val, next_val;\n if (!!$handle) {\n val = parseFloat($handle.attr('aria-valuenow'));\n }\n else {\n val = value;\n }\n if (val >= 0) {\n left = val % step;\n } else {\n left = step + (val % step);\n }\n prev_val = val - left;\n next_val = prev_val + step;\n if (left === 0) {\n return val;\n }\n val = val >= prev_val + div ? next_val : prev_val;\n return val;\n }\n\n /**\n * Adds event listeners to the slider elements.\n * @function\n * @private\n */\n _events() {\n this._eventsForHandle(this.$handle);\n if(this.handles[1]) {\n this._eventsForHandle(this.$handle2);\n }\n }\n\n\n /**\n * Adds event listeners a particular handle\n * @function\n * @private\n * @param {jQuery} $handle - the current handle to apply listeners to.\n */\n _eventsForHandle($handle) {\n var _this = this,\n curHandle;\n\n const handleChangeEvent = function(e) {\n const idx = _this.inputs.index($(this));\n _this._handleEvent(e, _this.handles.eq(idx), $(this).val());\n };\n\n // IE only triggers the change event when the input loses focus which strictly follows the HTML specification\n // listen for the enter key and trigger a change\n // @see https://html.spec.whatwg.org/multipage/input.html#common-input-element-events\n this.inputs.off('keyup.zf.slider').on('keyup.zf.slider', function (e) {\n if(e.keyCode == 13) handleChangeEvent.call(this, e);\n });\n\n this.inputs.off('change.zf.slider').on('change.zf.slider', handleChangeEvent);\n\n if (this.options.clickSelect) {\n this.$element.off('click.zf.slider').on('click.zf.slider', function(e) {\n if (_this.$element.data('dragging')) { return false; }\n\n if (!$(e.target).is('[data-slider-handle]')) {\n if (_this.options.doubleSided) {\n _this._handleEvent(e);\n } else {\n _this._handleEvent(e, _this.$handle);\n }\n }\n });\n }\n\n if (this.options.draggable) {\n this.handles.addTouch();\n\n var $body = $('body');\n $handle\n .off('mousedown.zf.slider')\n .on('mousedown.zf.slider', function(e) {\n $handle.addClass('is-dragging');\n _this.$fill.addClass('is-dragging');//\n _this.$element.data('dragging', true);\n\n curHandle = $(e.currentTarget);\n\n $body.on('mousemove.zf.slider', function(e) {\n e.preventDefault();\n _this._handleEvent(e, curHandle);\n\n }).on('mouseup.zf.slider', function(e) {\n _this._handleEvent(e, curHandle);\n\n $handle.removeClass('is-dragging');\n _this.$fill.removeClass('is-dragging');\n _this.$element.data('dragging', false);\n\n $body.off('mousemove.zf.slider mouseup.zf.slider');\n });\n })\n // prevent events triggered by touch\n .on('selectstart.zf.slider touchmove.zf.slider', function(e) {\n e.preventDefault();\n });\n }\n\n $handle.off('keydown.zf.slider').on('keydown.zf.slider', function(e) {\n var _$handle = $(this),\n idx = _this.options.doubleSided ? _this.handles.index(_$handle) : 0,\n oldValue = parseFloat(_this.inputs.eq(idx).val()),\n newValue;\n\n // handle keyboard event with keyboard util\n Keyboard.handleKey(e, 'Slider', {\n decrease: function() {\n newValue = oldValue - _this.options.step;\n },\n increase: function() {\n newValue = oldValue + _this.options.step;\n },\n decrease_fast: function() {\n newValue = oldValue - _this.options.step * 10;\n },\n increase_fast: function() {\n newValue = oldValue + _this.options.step * 10;\n },\n min: function() {\n newValue = _this.options.start;\n },\n max: function() {\n newValue = _this.options.end;\n },\n handled: function() { // only set handle pos when event was handled specially\n e.preventDefault();\n _this._setHandlePos(_$handle, newValue);\n }\n });\n /*if (newValue) { // if pressed key has special function, update value\n e.preventDefault();\n _this._setHandlePos(_$handle, newValue);\n }*/\n });\n }\n\n /**\n * Destroys the slider plugin.\n */\n _destroy() {\n this.handles.off('.zf.slider');\n this.inputs.off('.zf.slider');\n this.$element.off('.zf.slider');\n\n clearTimeout(this.timeout);\n }\n}\n\nSlider.defaults = {\n /**\n * Minimum value for the slider scale.\n * @option\n * @type {number}\n * @default 0\n */\n start: 0,\n /**\n * Maximum value for the slider scale.\n * @option\n * @type {number}\n * @default 100\n */\n end: 100,\n /**\n * Minimum value change per change event.\n * @option\n * @type {number}\n * @default 1\n */\n step: 1,\n /**\n * Value at which the handle/input *(left handle/first input)* should be set to on initialization.\n * @option\n * @type {number}\n * @default 0\n */\n initialStart: 0,\n /**\n * Value at which the right handle/second input should be set to on initialization.\n * @option\n * @type {number}\n * @default 100\n */\n initialEnd: 100,\n /**\n * Allows the input to be located outside the container and visible. Set to by the JS\n * @option\n * @type {boolean}\n * @default false\n */\n binding: false,\n /**\n * Allows the user to click/tap on the slider bar to select a value.\n * @option\n * @type {boolean}\n * @default true\n */\n clickSelect: true,\n /**\n * Set to true and use the `vertical` class to change alignment to vertical.\n * @option\n * @type {boolean}\n * @default false\n */\n vertical: false,\n /**\n * Allows the user to drag the slider handle(s) to select a value.\n * @option\n * @type {boolean}\n * @default true\n */\n draggable: true,\n /**\n * Disables the slider and prevents event listeners from being applied. Double checked by JS with `disabledClass`.\n * @option\n * @type {boolean}\n * @default false\n */\n disabled: false,\n /**\n * Allows the use of two handles. Double checked by the JS. Changes some logic handling.\n * @option\n * @type {boolean}\n * @default false\n */\n doubleSided: false,\n /**\n * Potential future feature.\n */\n // steps: 100,\n /**\n * Number of decimal places the plugin should go to for floating point precision.\n * @option\n * @type {number}\n * @default 2\n */\n decimal: 2,\n /**\n * Time delay for dragged elements.\n */\n // dragDelay: 0,\n /**\n * Time, in ms, to animate the movement of a slider handle if user clicks/taps on the bar. Needs to be manually set if updating the transition time in the Sass settings.\n * @option\n * @type {number}\n * @default 200\n */\n moveTime: 200,//update this if changing the transition time in the sass\n /**\n * Class applied to disabled sliders.\n * @option\n * @type {string}\n * @default 'disabled'\n */\n disabledClass: 'disabled',\n /**\n * Will invert the default layout for a vertical<span data-tooltip title=\"who would do this???\"> </span>slider.\n * @option\n * @type {boolean}\n * @default false\n */\n invertVertical: false,\n /**\n * Milliseconds before the `changed.zf-slider` event is triggered after value change.\n * @option\n * @type {number}\n * @default 500\n */\n changedDelay: 500,\n /**\n * Basevalue for non-linear sliders\n * @option\n * @type {number}\n * @default 5\n */\n nonLinearBase: 5,\n /**\n * Basevalue for non-linear sliders, possible values are: `'linear'`, `'pow'` & `'log'`. Pow and Log use the nonLinearBase setting.\n * @option\n * @type {string}\n * @default 'linear'\n */\n positionValueFunction: 'linear',\n};\n\nfunction percent(frac, num) {\n return (frac / num);\n}\nfunction absPosition($handle, dir, clickPos, param) {\n return Math.abs(($handle.position()[dir] + ($handle[param]() / 2)) - clickPos);\n}\nfunction baseLog(base, value) {\n return Math.log(value)/Math.log(base)\n}\n\nexport {Slider};\n","import $ from 'jquery';\nimport { GetYoDigits } from './foundation.core.utils';\nimport { Plugin } from './foundation.core.plugin';\n\n/**\n * SmoothScroll module.\n * @module foundation.smoothScroll\n */\nclass SmoothScroll extends Plugin {\n /**\n * Creates a new instance of SmoothScroll.\n * @class\n * @name SmoothScroll\n * @fires SmoothScroll#init\n * @param {Object} element - jQuery object to add the trigger to.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element, options) {\n this.$element = element;\n this.options = $.extend({}, SmoothScroll.defaults, this.$element.data(), options);\n this.className = 'SmoothScroll'; // ie9 back compat\n\n this._init();\n }\n\n /**\n * Initialize the SmoothScroll plugin\n * @private\n */\n _init() {\n const id = this.$element[0].id || GetYoDigits(6, 'smooth-scroll');\n this.$element.attr({ id });\n\n this._events();\n }\n\n /**\n * Initializes events for SmoothScroll.\n * @private\n */\n _events() {\n this._linkClickListener = this._handleLinkClick.bind(this);\n this.$element.on('click.zf.smoothScroll', this._linkClickListener);\n this.$element.on('click.zf.smoothScroll', 'a[href^=\"#\"]', this._linkClickListener);\n }\n\n /**\n * Handle the given event to smoothly scroll to the anchor pointed by the event target.\n * @param {*} e - event\n * @function\n * @private\n */\n _handleLinkClick(e) {\n // Follow the link if it does not point to an anchor.\n if (!$(e.currentTarget).is('a[href^=\"#\"]')) return;\n\n const arrival = e.currentTarget.getAttribute('href');\n\n this._inTransition = true;\n\n SmoothScroll.scrollToLoc(arrival, this.options, () => {\n this._inTransition = false;\n });\n\n e.preventDefault();\n };\n\n /**\n * Function to scroll to a given location on the page.\n * @param {String} loc - A properly formatted jQuery id selector. Example: '#foo'\n * @param {Object} options - The options to use.\n * @param {Function} callback - The callback function.\n * @static\n * @function\n */\n static scrollToLoc(loc, options = SmoothScroll.defaults, callback) {\n const $loc = $(loc);\n\n // Do nothing if target does not exist to prevent errors\n if (!$loc.length) return false;\n\n var scrollPos = Math.round($loc.offset().top - options.threshold / 2 - options.offset);\n\n $('html, body').stop(true).animate(\n { scrollTop: scrollPos },\n options.animationDuration,\n options.animationEasing,\n () => {\n if (typeof callback === 'function'){\n callback();\n }\n }\n );\n }\n\n /**\n * Destroys the SmoothScroll instance.\n * @function\n */\n _destroy() {\n this.$element.off('click.zf.smoothScroll', this._linkClickListener)\n this.$element.off('click.zf.smoothScroll', 'a[href^=\"#\"]', this._linkClickListener);\n }\n}\n\n/**\n * Default settings for plugin.\n */\nSmoothScroll.defaults = {\n /**\n * Amount of time, in ms, the animated scrolling should take between locations.\n * @option\n * @type {number}\n * @default 500\n */\n animationDuration: 500,\n /**\n * Animation style to use when scrolling between locations. Can be `'swing'` or `'linear'`.\n * @option\n * @type {string}\n * @default 'linear'\n * @see {@link https://api.jquery.com/animate|Jquery animate}\n */\n animationEasing: 'linear',\n /**\n * Number of pixels to use as a marker for location changes.\n * @option\n * @type {number}\n * @default 50\n */\n threshold: 50,\n /**\n * Number of pixels to offset the scroll of the page on item click if using a sticky nav bar.\n * @option\n * @type {number}\n * @default 0\n */\n offset: 0\n}\n\nexport {SmoothScroll}\n","'use strict';\n\nimport $ from 'jquery';\nimport { Plugin } from './foundation.core.plugin';\nimport { onLoad, GetYoDigits } from './foundation.core.utils';\nimport { MediaQuery } from './foundation.util.mediaQuery';\nimport { Triggers } from './foundation.util.triggers';\n\n/**\n * Sticky module.\n * @module foundation.sticky\n * @requires foundation.util.triggers\n * @requires foundation.util.mediaQuery\n */\n\nclass Sticky extends Plugin {\n /**\n * Creates a new instance of a sticky thing.\n * @class\n * @name Sticky\n * @param {jQuery} element - jQuery object to make sticky.\n * @param {Object} options - options object passed when creating the element programmatically.\n */\n _setup(element, options) {\n this.$element = element;\n this.options = $.extend({}, Sticky.defaults, this.$element.data(), options);\n this.className = 'Sticky'; // ie9 back compat\n\n // Triggers init is idempotent, just need to make sure it is initialized\n Triggers.init($);\n\n this._init();\n }\n\n /**\n * Initializes the sticky element by adding classes, getting/setting dimensions, breakpoints and attributes\n * @function\n * @private\n */\n _init() {\n MediaQuery._init();\n\n var $parent = this.$element.parent('[data-sticky-container]'),\n id = this.$element[0].id || GetYoDigits(6, 'sticky'),\n _this = this;\n\n if($parent.length){\n this.$container = $parent;\n } else {\n this.wasWrapped = true;\n this.$element.wrap(this.options.container);\n this.$container = this.$element.parent();\n }\n this.$container.addClass(this.options.containerClass);\n\n this.$element.addClass(this.options.stickyClass).attr({ 'data-resize': id, 'data-mutate': id });\n if (this.options.anchor !== '') {\n $('#' + _this.options.anchor).attr({ 'data-mutate': id });\n }\n\n this.scrollCount = this.options.checkEvery;\n this.isStuck = false;\n this.onLoadListener = onLoad($(window), function () {\n //We calculate the container height to have correct values for anchor points offset calculation.\n _this.containerHeight = _this.$element.css(\"display\") == \"none\" ? 0 : _this.$element[0].getBoundingClientRect().height;\n _this.$container.css('height', _this.containerHeight);\n _this.elemHeight = _this.containerHeight;\n if (_this.options.anchor !== '') {\n _this.$anchor = $('#' + _this.options.anchor);\n } else {\n _this._parsePoints();\n }\n\n _this._setSizes(function () {\n var scroll = window.pageYOffset;\n _this._calc(false, scroll);\n //Unstick the element will ensure that proper classes are set.\n if (!_this.isStuck) {\n _this._removeSticky((scroll >= _this.topPoint) ? false : true);\n }\n });\n _this._events(id.split('-').reverse().join('-'));\n });\n }\n\n /**\n * If using multiple elements as anchors, calculates the top and bottom pixel values the sticky thing should stick and unstick on.\n * @function\n * @private\n */\n _parsePoints() {\n var top = this.options.topAnchor == \"\" ? 1 : this.options.topAnchor,\n btm = this.options.btmAnchor== \"\" ? document.documentElement.scrollHeight : this.options.btmAnchor,\n pts = [top, btm],\n breaks = {};\n for (var i = 0, len = pts.length; i < len && pts[i]; i++) {\n var pt;\n if (typeof pts[i] === 'number') {\n pt = pts[i];\n } else {\n var place = pts[i].split(':'),\n anchor = $(`#${place[0]}`);\n\n pt = anchor.offset().top;\n if (place[1] && place[1].toLowerCase() === 'bottom') {\n pt += anchor[0].getBoundingClientRect().height;\n }\n }\n breaks[i] = pt;\n }\n\n\n this.points = breaks;\n return;\n }\n\n /**\n * Adds event handlers for the scrolling element.\n * @private\n * @param {String} id - pseudo-random id for unique scroll event listener.\n */\n _events(id) {\n var _this = this,\n scrollListener = this.scrollListener = `scroll.zf.${id}`;\n if (this.isOn) { return; }\n if (this.canStick) {\n this.isOn = true;\n $(window).off(scrollListener)\n .on(scrollListener, function(e) {\n if (_this.scrollCount === 0) {\n _this.scrollCount = _this.options.checkEvery;\n _this._setSizes(function() {\n _this._calc(false, window.pageYOffset);\n });\n } else {\n _this.scrollCount--;\n _this._calc(false, window.pageYOffset);\n }\n });\n }\n\n this.$element.off('resizeme.zf.trigger')\n .on('resizeme.zf.trigger', function(e, el) {\n _this._eventsHandler(id);\n });\n\n this.$element.on('mutateme.zf.trigger', function (e, el) {\n _this._eventsHandler(id);\n });\n\n if(this.$anchor) {\n this.$anchor.on('mutateme.zf.trigger', function (e, el) {\n _this._eventsHandler(id);\n });\n }\n }\n\n /**\n * Handler for events.\n * @private\n * @param {String} id - pseudo-random id for unique scroll event listener.\n */\n _eventsHandler(id) {\n var _this = this,\n scrollListener = this.scrollListener = `scroll.zf.${id}`;\n\n _this._setSizes(function() {\n _this._calc(false);\n if (_this.canStick) {\n if (!_this.isOn) {\n _this._events(id);\n }\n } else if (_this.isOn) {\n _this._pauseListeners(scrollListener);\n }\n });\n }\n\n /**\n * Removes event handlers for scroll and change events on anchor.\n * @fires Sticky#pause\n * @param {String} scrollListener - unique, namespaced scroll listener attached to `window`\n */\n _pauseListeners(scrollListener) {\n this.isOn = false;\n $(window).off(scrollListener);\n\n /**\n * Fires when the plugin is paused due to resize event shrinking the view.\n * @event Sticky#pause\n * @private\n */\n this.$element.trigger('pause.zf.sticky');\n }\n\n /**\n * Called on every `scroll` event and on `_init`\n * fires functions based on booleans and cached values\n * @param {Boolean} checkSizes - true if plugin should recalculate sizes and breakpoints.\n * @param {Number} scroll - current scroll position passed from scroll event cb function. If not passed, defaults to `window.pageYOffset`.\n */\n _calc(checkSizes, scroll) {\n if (checkSizes) { this._setSizes(); }\n\n if (!this.canStick) {\n if (this.isStuck) {\n this._removeSticky(true);\n }\n return false;\n }\n\n if (!scroll) { scroll = window.pageYOffset; }\n\n if (scroll >= this.topPoint) {\n if (scroll <= this.bottomPoint) {\n if (!this.isStuck) {\n this._setSticky();\n }\n } else {\n if (this.isStuck) {\n this._removeSticky(false);\n }\n }\n } else {\n if (this.isStuck) {\n this._removeSticky(true);\n }\n }\n }\n\n /**\n * Causes the $element to become stuck.\n * Adds `position: fixed;`, and helper classes.\n * @fires Sticky#stuckto\n * @function\n * @private\n */\n _setSticky() {\n var _this = this,\n stickTo = this.options.stickTo,\n mrgn = stickTo === 'top' ? 'marginTop' : 'marginBottom',\n notStuckTo = stickTo === 'top' ? 'bottom' : 'top',\n css = {};\n\n css[mrgn] = `${this.options[mrgn]}em`;\n css[stickTo] = 0;\n css[notStuckTo] = 'auto';\n this.isStuck = true;\n this.$element.removeClass(`is-anchored is-at-${notStuckTo}`)\n .addClass(`is-stuck is-at-${stickTo}`)\n .css(css)\n /**\n * Fires when the $element has become `position: fixed;`\n * Namespaced to `top` or `bottom`, e.g. `sticky.zf.stuckto:top`\n * @event Sticky#stuckto\n */\n .trigger(`sticky.zf.stuckto:${stickTo}`);\n this.$element.on(\"transitionend webkitTransitionEnd oTransitionEnd otransitionend MSTransitionEnd\", function() {\n _this._setSizes();\n });\n }\n\n /**\n * Causes the $element to become unstuck.\n * Removes `position: fixed;`, and helper classes.\n * Adds other helper classes.\n * @param {Boolean} isTop - tells the function if the $element should anchor to the top or bottom of its $anchor element.\n * @fires Sticky#unstuckfrom\n * @private\n */\n _removeSticky(isTop) {\n var stickTo = this.options.stickTo,\n stickToTop = stickTo === 'top',\n css = {},\n anchorPt = (this.points ? this.points[1] - this.points[0] : this.anchorHeight) - this.elemHeight,\n mrgn = stickToTop ? 'marginTop' : 'marginBottom',\n topOrBottom = isTop ? 'top' : 'bottom';\n\n css[mrgn] = 0;\n\n css['bottom'] = 'auto';\n if(isTop) {\n css['top'] = 0;\n } else {\n css['top'] = anchorPt;\n }\n\n this.isStuck = false;\n this.$element.removeClass(`is-stuck is-at-${stickTo}`)\n .addClass(`is-anchored is-at-${topOrBottom}`)\n .css(css)\n /**\n * Fires when the $element has become anchored.\n * Namespaced to `top` or `bottom`, e.g. `sticky.zf.unstuckfrom:bottom`\n * @event Sticky#unstuckfrom\n */\n .trigger(`sticky.zf.unstuckfrom:${topOrBottom}`);\n }\n\n /**\n * Sets the $element and $container sizes for plugin.\n * Calls `_setBreakPoints`.\n * @param {Function} cb - optional callback function to fire on completion of `_setBreakPoints`.\n * @private\n */\n _setSizes(cb) {\n this.canStick = MediaQuery.is(this.options.stickyOn);\n if (!this.canStick) {\n if (cb && typeof cb === 'function') { cb(); }\n }\n\n var _this = this,\n newElemWidth = this.$container[0].getBoundingClientRect().width,\n comp = window.getComputedStyle(this.$container[0]),\n pdngl = parseInt(comp['padding-left'], 10),\n pdngr = parseInt(comp['padding-right'], 10);\n\n if (this.$anchor && this.$anchor.length) {\n this.anchorHeight = this.$anchor[0].getBoundingClientRect().height;\n } else {\n this._parsePoints();\n }\n\n this.$element.css({\n 'max-width': `${newElemWidth - pdngl - pdngr}px`\n });\n\n // Recalculate the height only if it is \"dynamic\"\n if (this.options.dynamicHeight || !this.containerHeight) {\n // Get the sticked element height and apply it to the container to \"hold the place\"\n var newContainerHeight = this.$element[0].getBoundingClientRect().height || this.containerHeight;\n newContainerHeight = this.$element.css(\"display\") == \"none\" ? 0 : newContainerHeight;\n this.$container.css('height', newContainerHeight);\n this.containerHeight = newContainerHeight;\n }\n this.elemHeight = this.containerHeight;\n\n if (!this.isStuck) {\n if (this.$element.hasClass('is-at-bottom')) {\n var anchorPt = (this.points ? this.points[1] - this.$container.offset().top : this.anchorHeight) - this.elemHeight;\n this.$element.css('top', anchorPt);\n }\n }\n\n this._setBreakPoints(this.containerHeight, function() {\n if (cb && typeof cb === 'function') { cb(); }\n });\n }\n\n /**\n * Sets the upper and lower breakpoints for the element to become sticky/unsticky.\n * @param {Number} elemHeight - px value for sticky.$element height, calculated by `_setSizes`.\n * @param {Function} cb - optional callback function to be called on completion.\n * @private\n */\n _setBreakPoints(elemHeight, cb) {\n if (!this.canStick) {\n if (cb && typeof cb === 'function') { cb(); }\n else { return false; }\n }\n var mTop = emCalc(this.options.marginTop),\n mBtm = emCalc(this.options.marginBottom),\n topPoint = this.points ? this.points[0] : this.$anchor.offset().top,\n bottomPoint = this.points ? this.points[1] : topPoint + this.anchorHeight,\n // topPoint = this.$anchor.offset().top || this.points[0],\n // bottomPoint = topPoint + this.anchorHeight || this.points[1],\n winHeight = window.innerHeight;\n\n if (this.options.stickTo === 'top') {\n topPoint -= mTop;\n bottomPoint -= (elemHeight + mTop);\n } else if (this.options.stickTo === 'bottom') {\n topPoint -= (winHeight - (elemHeight + mBtm));\n bottomPoint -= (winHeight - mBtm);\n } else {\n //this would be the stickTo: both option... tricky\n }\n\n this.topPoint = topPoint;\n this.bottomPoint = bottomPoint;\n\n if (cb && typeof cb === 'function') { cb(); }\n }\n\n /**\n * Destroys the current sticky element.\n * Resets the element to the top position first.\n * Removes event listeners, JS-added css properties and classes, and unwraps the $element if the JS added the $container.\n * @function\n */\n _destroy() {\n this._removeSticky(true);\n\n this.$element.removeClass(`${this.options.stickyClass} is-anchored is-at-top`)\n .css({\n height: '',\n top: '',\n bottom: '',\n 'max-width': ''\n })\n .off('resizeme.zf.trigger')\n .off('mutateme.zf.trigger');\n if (this.$anchor && this.$anchor.length) {\n this.$anchor.off('change.zf.sticky');\n }\n if (this.scrollListener) $(window).off(this.scrollListener)\n if (this.onLoadListener) $(window).off(this.onLoadListener)\n\n if (this.wasWrapped) {\n this.$element.unwrap();\n } else {\n this.$container.removeClass(this.options.containerClass)\n .css({\n height: ''\n });\n }\n }\n}\n\nSticky.defaults = {\n /**\n * Customizable container template. Add your own classes for styling and sizing.\n * @option\n * @type {string}\n * @default '&lt;div data-sticky-container&gt;&lt;/div&gt;'\n */\n container: '<div data-sticky-container></div>',\n /**\n * Location in the view the element sticks to. Can be `'top'` or `'bottom'`.\n * @option\n * @type {string}\n * @default 'top'\n */\n stickTo: 'top',\n /**\n * If anchored to a single element, the id of that element.\n * @option\n * @type {string}\n * @default ''\n */\n anchor: '',\n /**\n * If using more than one element as anchor points, the id of the top anchor.\n * @option\n * @type {string}\n * @default ''\n */\n topAnchor: '',\n /**\n * If using more than one element as anchor points, the id of the bottom anchor.\n * @option\n * @type {string}\n * @default ''\n */\n btmAnchor: '',\n /**\n * Margin, in `em`'s to apply to the top of the element when it becomes sticky.\n * @option\n * @type {number}\n * @default 1\n */\n marginTop: 1,\n /**\n * Margin, in `em`'s to apply to the bottom of the element when it becomes sticky.\n * @option\n * @type {number}\n * @default 1\n */\n marginBottom: 1,\n /**\n * Breakpoint string that is the minimum screen size an element should become sticky.\n * @option\n * @type {string}\n * @default 'medium'\n */\n stickyOn: 'medium',\n /**\n * Class applied to sticky element, and removed on destruction. Foundation defaults to `sticky`.\n * @option\n * @type {string}\n * @default 'sticky'\n */\n stickyClass: 'sticky',\n /**\n * Class applied to sticky container. Foundation defaults to `sticky-container`.\n * @option\n * @type {string}\n * @default 'sticky-container'\n */\n containerClass: 'sticky-container',\n /**\n * If true (by default), keep the sticky container the same height as the element. Otherwise, the container height is set once and does not change.\n * @option\n * @type {boolean}\n * @default true\n */\n dynamicHeight: true,\n /**\n * Number of scroll events between the plugin's recalculating sticky points. Setting it to `0` will cause it to recalc every scroll event, setting it to `-1` will prevent recalc on scroll.\n * @option\n * @type {number}\n * @default -1\n */\n checkEvery: -1\n};\n\n/**\n * Helper function to calculate em values\n * @param Number {em} - number of em's to calculate into pixels\n */\nfunction emCalc(em) {\n return parseInt(window.getComputedStyle(document.body, null).fontSize, 10) * em;\n}\n\nexport {Sticky};\n","'use strict';\n\nimport $ from 'jquery';\nimport { Plugin } from './foundation.core.plugin';\nimport { onLoad } from './foundation.core.utils';\nimport { Keyboard } from './foundation.util.keyboard';\nimport { onImagesLoaded } from './foundation.util.imageLoader';\n/**\n * Tabs module.\n * @module foundation.tabs\n * @requires foundation.util.keyboard\n * @requires foundation.util.imageLoader if tabs contain images\n */\n\nclass Tabs extends Plugin {\n /**\n * Creates a new instance of tabs.\n * @class\n * @name Tabs\n * @fires Tabs#init\n * @param {jQuery} element - jQuery object to make into tabs.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element, options) {\n this.$element = element;\n this.options = $.extend({}, Tabs.defaults, this.$element.data(), options);\n this.className = 'Tabs'; // ie9 back compat\n\n this._init();\n Keyboard.register('Tabs', {\n 'ENTER': 'open',\n 'SPACE': 'open',\n 'ARROW_RIGHT': 'next',\n 'ARROW_UP': 'previous',\n 'ARROW_DOWN': 'next',\n 'ARROW_LEFT': 'previous'\n // 'TAB': 'next',\n // 'SHIFT_TAB': 'previous'\n });\n }\n\n /**\n * Initializes the tabs by showing and focusing (if autoFocus=true) the preset active tab.\n * @private\n */\n _init() {\n var _this = this;\n this._isInitializing = true;\n\n this.$element.attr({'role': 'tablist'});\n this.$tabTitles = this.$element.find(`.${this.options.linkClass}`);\n this.$tabContent = $(`[data-tabs-content=\"${this.$element[0].id}\"]`);\n\n this.$tabTitles.each(function(){\n var $elem = $(this),\n $link = $elem.find('a'),\n isActive = $elem.hasClass(`${_this.options.linkActiveClass}`),\n hash = $link.attr('data-tabs-target') || $link[0].hash.slice(1),\n linkId = $link[0].id ? $link[0].id : `${hash}-label`,\n $tabContent = $(`#${hash}`);\n\n $elem.attr({'role': 'presentation'});\n\n $link.attr({\n 'role': 'tab',\n 'aria-controls': hash,\n 'aria-selected': isActive,\n 'id': linkId,\n 'tabindex': isActive ? '0' : '-1'\n });\n\n $tabContent.attr({\n 'role': 'tabpanel',\n 'aria-labelledby': linkId\n });\n\n // Save up the initial hash to return to it later when going back in history\n if (isActive) {\n _this._initialAnchor = `#${hash}`;\n }\n\n if(!isActive) {\n $tabContent.attr('aria-hidden', 'true');\n }\n\n if(isActive && _this.options.autoFocus){\n _this.onLoadListener = onLoad($(window), function() {\n $('html, body').animate({ scrollTop: $elem.offset().top }, _this.options.deepLinkSmudgeDelay, () => {\n $link.focus();\n });\n });\n }\n });\n\n if(this.options.matchHeight) {\n var $images = this.$tabContent.find('img');\n\n if ($images.length) {\n onImagesLoaded($images, this._setHeight.bind(this));\n } else {\n this._setHeight();\n }\n }\n\n // Current context-bound function to open tabs on page load or history hashchange\n this._checkDeepLink = () => {\n var anchor = window.location.hash;\n\n if (!anchor.length) {\n // If we are still initializing and there is no anchor, then there is nothing to do\n if (this._isInitializing) return;\n // Otherwise, move to the initial anchor\n if (this._initialAnchor) anchor = this._initialAnchor;\n }\n\n var anchorNoHash = anchor.indexOf('#') >= 0 ? anchor.slice(1) : anchor;\n var $anchor = anchorNoHash && $(`#${anchorNoHash}`);\n var $link = anchor && this.$element.find(`[href$=\"${anchor}\"],[data-tabs-target=\"${anchorNoHash}\"]`).first();\n // Whether the anchor element that has been found is part of this element\n var isOwnAnchor = !!($anchor.length && $link.length);\n\n if (isOwnAnchor) {\n // If there is an anchor for the hash, select it\n if ($anchor && $anchor.length && $link && $link.length) {\n this.selectTab($anchor, true);\n }\n // Otherwise, collapse everything\n else {\n this._collapse();\n }\n\n // Roll up a little to show the titles\n if (this.options.deepLinkSmudge) {\n var offset = this.$element.offset();\n $('html, body').animate({ scrollTop: offset.top }, this.options.deepLinkSmudgeDelay);\n }\n\n /**\n * Fires when the plugin has deeplinked at pageload\n * @event Tabs#deeplink\n */\n this.$element.trigger('deeplink.zf.tabs', [$link, $anchor]);\n }\n }\n\n //use browser to open a tab, if it exists in this tabset\n if (this.options.deepLink) {\n this._checkDeepLink();\n }\n\n this._events();\n\n this._isInitializing = false;\n }\n\n /**\n * Adds event handlers for items within the tabs.\n * @private\n */\n _events() {\n this._addKeyHandler();\n this._addClickHandler();\n this._setHeightMqHandler = null;\n\n if (this.options.matchHeight) {\n this._setHeightMqHandler = this._setHeight.bind(this);\n\n $(window).on('changed.zf.mediaquery', this._setHeightMqHandler);\n }\n\n if(this.options.deepLink) {\n $(window).on('hashchange', this._checkDeepLink);\n }\n }\n\n /**\n * Adds click handlers for items within the tabs.\n * @private\n */\n _addClickHandler() {\n var _this = this;\n\n this.$element\n .off('click.zf.tabs')\n .on('click.zf.tabs', `.${this.options.linkClass}`, function(e){\n e.preventDefault();\n _this._handleTabChange($(this));\n });\n }\n\n /**\n * Adds keyboard event handlers for items within the tabs.\n * @private\n */\n _addKeyHandler() {\n var _this = this;\n\n this.$tabTitles.off('keydown.zf.tabs').on('keydown.zf.tabs', function(e){\n if (e.which === 9) return;\n\n\n var $element = $(this),\n $elements = $element.parent('ul').children('li'),\n $prevElement,\n $nextElement;\n\n $elements.each(function(i) {\n if ($(this).is($element)) {\n if (_this.options.wrapOnKeys) {\n $prevElement = i === 0 ? $elements.last() : $elements.eq(i-1);\n $nextElement = i === $elements.length -1 ? $elements.first() : $elements.eq(i+1);\n } else {\n $prevElement = $elements.eq(Math.max(0, i-1));\n $nextElement = $elements.eq(Math.min(i+1, $elements.length-1));\n }\n return;\n }\n });\n\n // handle keyboard event with keyboard util\n Keyboard.handleKey(e, 'Tabs', {\n open: function() {\n $element.find('[role=\"tab\"]').focus();\n _this._handleTabChange($element);\n },\n previous: function() {\n $prevElement.find('[role=\"tab\"]').focus();\n _this._handleTabChange($prevElement);\n },\n next: function() {\n $nextElement.find('[role=\"tab\"]').focus();\n _this._handleTabChange($nextElement);\n },\n handled: function() {\n e.preventDefault();\n }\n });\n });\n }\n\n /**\n * Opens the tab `$targetContent` defined by `$target`. Collapses active tab.\n * @param {jQuery} $target - Tab to open.\n * @param {boolean} historyHandled - browser has already handled a history update\n * @fires Tabs#change\n * @function\n */\n _handleTabChange($target, historyHandled) {\n\n // With `activeCollapse`, if the target is the active Tab, collapse it.\n if ($target.hasClass(`${this.options.linkActiveClass}`)) {\n if(this.options.activeCollapse) {\n this._collapse();\n }\n return;\n }\n\n var $oldTab = this.$element.\n find(`.${this.options.linkClass}.${this.options.linkActiveClass}`),\n $tabLink = $target.find('[role=\"tab\"]'),\n target = $tabLink.attr('data-tabs-target'),\n anchor = target && target.length ? `#${target}` : $tabLink[0].hash,\n $targetContent = this.$tabContent.find(anchor);\n\n //close old tab\n this._collapseTab($oldTab);\n\n //open new tab\n this._openTab($target);\n\n //either replace or update browser history\n if (this.options.deepLink && !historyHandled) {\n if (this.options.updateHistory) {\n history.pushState({}, '', anchor);\n } else {\n history.replaceState({}, '', anchor);\n }\n }\n\n /**\n * Fires when the plugin has successfully changed tabs.\n * @event Tabs#change\n */\n this.$element.trigger('change.zf.tabs', [$target, $targetContent]);\n\n //fire to children a mutation event\n $targetContent.find(\"[data-mutate]\").trigger(\"mutateme.zf.trigger\");\n }\n\n /**\n * Opens the tab `$targetContent` defined by `$target`.\n * @param {jQuery} $target - Tab to open.\n * @function\n */\n _openTab($target) {\n var $tabLink = $target.find('[role=\"tab\"]'),\n hash = $tabLink.attr('data-tabs-target') || $tabLink[0].hash.slice(1),\n $targetContent = this.$tabContent.find(`#${hash}`);\n\n $target.addClass(`${this.options.linkActiveClass}`);\n\n $tabLink.attr({\n 'aria-selected': 'true',\n 'tabindex': '0'\n });\n\n $targetContent\n .addClass(`${this.options.panelActiveClass}`).removeAttr('aria-hidden');\n }\n\n /**\n * Collapses `$targetContent` defined by `$target`.\n * @param {jQuery} $target - Tab to collapse.\n * @function\n */\n _collapseTab($target) {\n var $target_anchor = $target\n .removeClass(`${this.options.linkActiveClass}`)\n .find('[role=\"tab\"]')\n .attr({\n 'aria-selected': 'false',\n 'tabindex': -1\n });\n\n $(`#${$target_anchor.attr('aria-controls')}`)\n .removeClass(`${this.options.panelActiveClass}`)\n .attr({ 'aria-hidden': 'true' })\n }\n\n /**\n * Collapses the active Tab.\n * @fires Tabs#collapse\n * @function\n */\n _collapse() {\n var $activeTab = this.$element.find(`.${this.options.linkClass}.${this.options.linkActiveClass}`);\n\n if ($activeTab.length) {\n this._collapseTab($activeTab);\n\n /**\n * Fires when the plugin has successfully collapsed tabs.\n * @event Tabs#collapse\n */\n this.$element.trigger('collapse.zf.tabs', [$activeTab]);\n }\n }\n\n /**\n * Public method for selecting a content pane to display.\n * @param {jQuery | String} elem - jQuery object or string of the id of the pane to display.\n * @param {boolean} historyHandled - browser has already handled a history update\n * @function\n */\n selectTab(elem, historyHandled) {\n var idStr, hashIdStr;\n\n if (typeof elem === 'object') {\n idStr = elem[0].id;\n } else {\n idStr = elem;\n }\n\n if (idStr.indexOf('#') < 0) {\n hashIdStr = `#${idStr}`;\n } else {\n hashIdStr = idStr;\n idStr = idStr.slice(1);\n }\n\n var $target = this.$tabTitles.has(`[href$=\"${hashIdStr}\"],[data-tabs-target=\"${idStr}\"]`).first();\n\n this._handleTabChange($target, historyHandled);\n };\n\n /**\n * Sets the height of each panel to the height of the tallest panel.\n * If enabled in options, gets called on media query change.\n * If loading content via external source, can be called directly or with _reflow.\n * If enabled with `data-match-height=\"true\"`, tabs sets to equal height\n * @function\n * @private\n */\n _setHeight() {\n var max = 0,\n _this = this; // Lock down the `this` value for the root tabs object\n\n this.$tabContent\n .find(`.${this.options.panelClass}`)\n .css('height', '')\n .each(function() {\n\n var panel = $(this),\n isActive = panel.hasClass(`${_this.options.panelActiveClass}`); // get the options from the parent instead of trying to get them from the child\n\n if (!isActive) {\n panel.css({'visibility': 'hidden', 'display': 'block'});\n }\n\n var temp = this.getBoundingClientRect().height;\n\n if (!isActive) {\n panel.css({\n 'visibility': '',\n 'display': ''\n });\n }\n\n max = temp > max ? temp : max;\n })\n .css('height', `${max}px`);\n }\n\n /**\n * Destroys an instance of tabs.\n * @fires Tabs#destroyed\n */\n _destroy() {\n this.$element\n .find(`.${this.options.linkClass}`)\n .off('.zf.tabs').hide().end()\n .find(`.${this.options.panelClass}`)\n .hide();\n\n if (this.options.matchHeight) {\n if (this._setHeightMqHandler != null) {\n $(window).off('changed.zf.mediaquery', this._setHeightMqHandler);\n }\n }\n\n if (this.options.deepLink) {\n $(window).off('hashchange', this._checkDeepLink);\n }\n\n if (this.onLoadListener) {\n $(window).off(this.onLoadListener);\n }\n }\n}\n\nTabs.defaults = {\n /**\n * Link the location hash to the active pane.\n * Set the location hash when the active pane changes, and open the corresponding pane when the location changes.\n * @option\n * @type {boolean}\n * @default false\n */\n deepLink: false,\n\n /**\n * If `deepLink` is enabled, adjust the deep link scroll to make sure the top of the tab panel is visible\n * @option\n * @type {boolean}\n * @default false\n */\n deepLinkSmudge: false,\n\n /**\n * If `deepLinkSmudge` is enabled, animation time (ms) for the deep link adjustment\n * @option\n * @type {number}\n * @default 300\n */\n deepLinkSmudgeDelay: 300,\n\n /**\n * If `deepLink` is enabled, update the browser history with the open tab\n * @option\n * @type {boolean}\n * @default false\n */\n updateHistory: false,\n\n /**\n * Allows the window to scroll to content of active pane on load.\n * Not recommended if more than one tab panel per page.\n * @option\n * @type {boolean}\n * @default false\n */\n autoFocus: false,\n\n /**\n * Allows keyboard input to 'wrap' around the tab links.\n * @option\n * @type {boolean}\n * @default true\n */\n wrapOnKeys: true,\n\n /**\n * Allows the tab content panes to match heights if set to true.\n * @option\n * @type {boolean}\n * @default false\n */\n matchHeight: false,\n\n /**\n * Allows active tabs to collapse when clicked.\n * @option\n * @type {boolean}\n * @default false\n */\n activeCollapse: false,\n\n /**\n * Class applied to `li`'s in tab link list.\n * @option\n * @type {string}\n * @default 'tabs-title'\n */\n linkClass: 'tabs-title',\n\n /**\n * Class applied to the active `li` in tab link list.\n * @option\n * @type {string}\n * @default 'is-active'\n */\n linkActiveClass: 'is-active',\n\n /**\n * Class applied to the content containers.\n * @option\n * @type {string}\n * @default 'tabs-panel'\n */\n panelClass: 'tabs-panel',\n\n /**\n * Class applied to the active content container.\n * @option\n * @type {string}\n * @default 'is-active'\n */\n panelActiveClass: 'is-active'\n};\n\nexport {Tabs};\n","'use strict';\n\nimport $ from 'jquery';\nimport { Motion } from './foundation.util.motion';\nimport { Plugin } from './foundation.core.plugin';\nimport { RegExpEscape } from './foundation.core.utils';\nimport { Triggers } from './foundation.util.triggers';\n\n/**\n * Toggler module.\n * @module foundation.toggler\n * @requires foundation.util.motion\n * @requires foundation.util.triggers\n */\n\nclass Toggler extends Plugin {\n /**\n * Creates a new instance of Toggler.\n * @class\n * @name Toggler\n * @fires Toggler#init\n * @param {Object} element - jQuery object to add the trigger to.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element, options) {\n this.$element = element;\n this.options = $.extend({}, Toggler.defaults, element.data(), options);\n this.className = '';\n this.className = 'Toggler'; // ie9 back compat\n\n // Triggers init is idempotent, just need to make sure it is initialized\n Triggers.init($);\n\n this._init();\n this._events();\n }\n\n /**\n * Initializes the Toggler plugin by parsing the toggle class from data-toggler, or animation classes from data-animate.\n * @function\n * @private\n */\n _init() {\n // Collect triggers to set ARIA attributes to\n var id = this.$element[0].id,\n $triggers = $(`[data-open~=\"${id}\"], [data-close~=\"${id}\"], [data-toggle~=\"${id}\"]`);\n\n var input;\n // Parse animation classes if they were set\n if (this.options.animate) {\n input = this.options.animate.split(' ');\n\n this.animationIn = input[0];\n this.animationOut = input[1] || null;\n\n // - aria-expanded: according to the element visibility.\n $triggers.attr('aria-expanded', !this.$element.is(':hidden'));\n }\n // Otherwise, parse toggle class\n else {\n input = this.options.toggler;\n if (typeof input !== 'string' || !input.length) {\n throw new Error(`The 'toogler' option containing the target class is required, got \"${input}\"`);\n }\n // Allow for a . at the beginning of the string\n this.className = input[0] === '.' ? input.slice(1) : input;\n\n // - aria-expanded: according to the elements class set.\n $triggers.attr('aria-expanded', this.$element.hasClass(this.className));\n }\n\n // - aria-controls: adding the element id to it if not already in it.\n $triggers.each((index, trigger) => {\n const $trigger = $(trigger);\n const controls = $trigger.attr('aria-controls') || '';\n\n const containsId = new RegExp(`\\\\b${RegExpEscape(id)}\\\\b`).test(controls);\n if (!containsId) $trigger.attr('aria-controls', controls ? `${controls} ${id}` : id);\n });\n }\n\n /**\n * Initializes events for the toggle trigger.\n * @function\n * @private\n */\n _events() {\n this.$element.off('toggle.zf.trigger').on('toggle.zf.trigger', this.toggle.bind(this));\n }\n\n /**\n * Toggles the target class on the target element. An event is fired from the original trigger depending on if the resultant state was \"on\" or \"off\".\n * @function\n * @fires Toggler#on\n * @fires Toggler#off\n */\n toggle() {\n this[ this.options.animate ? '_toggleAnimate' : '_toggleClass']();\n }\n\n _toggleClass() {\n this.$element.toggleClass(this.className);\n\n var isOn = this.$element.hasClass(this.className);\n if (isOn) {\n /**\n * Fires if the target element has the class after a toggle.\n * @event Toggler#on\n */\n this.$element.trigger('on.zf.toggler');\n }\n else {\n /**\n * Fires if the target element does not have the class after a toggle.\n * @event Toggler#off\n */\n this.$element.trigger('off.zf.toggler');\n }\n\n this._updateARIA(isOn);\n this.$element.find('[data-mutate]').trigger('mutateme.zf.trigger');\n }\n\n _toggleAnimate() {\n var _this = this;\n\n if (this.$element.is(':hidden')) {\n Motion.animateIn(this.$element, this.animationIn, function() {\n _this._updateARIA(true);\n this.trigger('on.zf.toggler');\n this.find('[data-mutate]').trigger('mutateme.zf.trigger');\n });\n }\n else {\n Motion.animateOut(this.$element, this.animationOut, function() {\n _this._updateARIA(false);\n this.trigger('off.zf.toggler');\n this.find('[data-mutate]').trigger('mutateme.zf.trigger');\n });\n }\n }\n\n _updateARIA(isOn) {\n var id = this.$element[0].id;\n $(`[data-open=\"${id}\"], [data-close=\"${id}\"], [data-toggle=\"${id}\"]`)\n .attr({\n 'aria-expanded': isOn ? true : false\n });\n }\n\n /**\n * Destroys the instance of Toggler on the element.\n * @function\n */\n _destroy() {\n this.$element.off('.zf.toggler');\n }\n}\n\nToggler.defaults = {\n /**\n * Class of the element to toggle. It can be provided with or without \".\"\n * @option\n * @type {string}\n */\n toggler: undefined,\n /**\n * Tells the plugin if the element should animated when toggled.\n * @option\n * @type {boolean}\n * @default false\n */\n animate: false\n};\n\nexport {Toggler};\n","'use strict';\n\nimport $ from 'jquery';\n\nimport { GetYoDigits, ignoreMousedisappear } from './foundation.core.utils';\nimport { MediaQuery } from './foundation.util.mediaQuery';\nimport { Triggers } from './foundation.util.triggers';\nimport { Positionable } from './foundation.positionable';\n\n/**\n * Tooltip module.\n * @module foundation.tooltip\n * @requires foundation.util.box\n * @requires foundation.util.mediaQuery\n * @requires foundation.util.triggers\n */\n\nclass Tooltip extends Positionable {\n /**\n * Creates a new instance of a Tooltip.\n * @class\n * @name Tooltip\n * @fires Tooltip#init\n * @param {jQuery} element - jQuery object to attach a tooltip to.\n * @param {Object} options - object to extend the default configuration.\n */\n _setup(element, options) {\n this.$element = element;\n this.options = $.extend({}, Tooltip.defaults, this.$element.data(), options);\n this.className = 'Tooltip'; // ie9 back compat\n\n this.isActive = false;\n this.isClick = false;\n\n // Triggers init is idempotent, just need to make sure it is initialized\n Triggers.init($);\n\n this._init();\n }\n\n /**\n * Initializes the tooltip by setting the creating the tip element, adding it's text, setting private variables and setting attributes on the anchor.\n * @private\n */\n _init() {\n MediaQuery._init();\n var elemId = this.$element.attr('aria-describedby') || GetYoDigits(6, 'tooltip');\n\n this.options.tipText = this.options.tipText || this.$element.attr('title');\n this.template = this.options.template ? $(this.options.template) : this._buildTemplate(elemId);\n\n if (this.options.allowHtml) {\n this.template.appendTo(document.body)\n .html(this.options.tipText)\n .hide();\n } else {\n this.template.appendTo(document.body)\n .text(this.options.tipText)\n .hide();\n }\n\n this.$element.attr({\n 'title': '',\n 'aria-describedby': elemId,\n 'data-yeti-box': elemId,\n 'data-toggle': elemId,\n 'data-resize': elemId\n }).addClass(this.options.triggerClass);\n\n super._init();\n this._events();\n }\n\n _getDefaultPosition() {\n // handle legacy classnames\n var elementClassName = this.$element[0].className;\n if (this.$element[0] instanceof SVGElement) {\n elementClassName = elementClassName.baseVal;\n }\n var position = elementClassName.match(/\\b(top|left|right|bottom)\\b/g);\n return position ? position[0] : 'top';\n }\n\n _getDefaultAlignment() {\n return 'center';\n }\n\n _getHOffset() {\n if(this.position === 'left' || this.position === 'right') {\n return this.options.hOffset + this.options.tooltipWidth;\n } else {\n return this.options.hOffset\n }\n }\n\n _getVOffset() {\n if(this.position === 'top' || this.position === 'bottom') {\n return this.options.vOffset + this.options.tooltipHeight;\n } else {\n return this.options.vOffset\n }\n }\n\n /**\n * builds the tooltip element, adds attributes, and returns the template.\n * @private\n */\n _buildTemplate(id) {\n var templateClasses = (`${this.options.tooltipClass} ${this.options.templateClasses}`).trim();\n var $template = $('<div></div>').addClass(templateClasses).attr({\n 'role': 'tooltip',\n 'aria-hidden': true,\n 'data-is-active': false,\n 'data-is-focus': false,\n 'id': id\n });\n return $template;\n }\n\n /**\n * sets the position class of an element and recursively calls itself until there are no more possible positions to attempt, or the tooltip element is no longer colliding.\n * if the tooltip is larger than the screen width, default to full width - any user selected margin\n * @private\n */\n _setPosition() {\n super._setPosition(this.$element, this.template);\n }\n\n /**\n * reveals the tooltip, and fires an event to close any other open tooltips on the page\n * @fires Tooltip#closeme\n * @fires Tooltip#show\n * @function\n */\n show() {\n if (this.options.showOn !== 'all' && !MediaQuery.is(this.options.showOn)) {\n // console.error('The screen is too small to display this tooltip');\n return false;\n }\n\n var _this = this;\n this.template.css('visibility', 'hidden').show();\n this._setPosition();\n this.template.removeClass('top bottom left right').addClass(this.position)\n this.template.removeClass('align-top align-bottom align-left align-right align-center').addClass('align-' + this.alignment);\n\n /**\n * Fires to close all other open tooltips on the page\n * @event Closeme#tooltip\n */\n this.$element.trigger('closeme.zf.tooltip', this.template.attr('id'));\n\n\n this.template.attr({\n 'data-is-active': true,\n 'aria-hidden': false\n });\n _this.isActive = true;\n // console.log(this.template);\n this.template.stop().hide().css('visibility', '').fadeIn(this.options.fadeInDuration, function() {\n //maybe do stuff?\n });\n /**\n * Fires when the tooltip is shown\n * @event Tooltip#show\n */\n this.$element.trigger('show.zf.tooltip');\n }\n\n /**\n * Hides the current tooltip, and resets the positioning class if it was changed due to collision\n * @fires Tooltip#hide\n * @function\n */\n hide() {\n // console.log('hiding', this.$element.data('yeti-box'));\n var _this = this;\n this.template.stop().attr({\n 'aria-hidden': true,\n 'data-is-active': false\n }).fadeOut(this.options.fadeOutDuration, function() {\n _this.isActive = false;\n _this.isClick = false;\n });\n /**\n * fires when the tooltip is hidden\n * @event Tooltip#hide\n */\n this.$element.trigger('hide.zf.tooltip');\n }\n\n /**\n * adds event listeners for the tooltip and its anchor\n * TODO combine some of the listeners like focus and mouseenter, etc.\n * @private\n */\n _events() {\n const _this = this;\n const hasTouch = 'ontouchstart' in window || (typeof window.ontouchstart !== 'undefined');\n const $template = this.template;\n var isFocus = false;\n\n // `disableForTouch: Fully disable the tooltip on touch devices\n if (hasTouch && this.options.disableForTouch) return;\n\n if (!this.options.disableHover) {\n this.$element\n .on('mouseenter.zf.tooltip', function(e) {\n if (!_this.isActive) {\n _this.timeout = setTimeout(function() {\n _this.show();\n }, _this.options.hoverDelay);\n }\n })\n .on('mouseleave.zf.tooltip', ignoreMousedisappear(function(e) {\n clearTimeout(_this.timeout);\n if (!isFocus || (_this.isClick && !_this.options.clickOpen)) {\n _this.hide();\n }\n }));\n }\n\n if (hasTouch) {\n this.$element\n .on('tap.zf.tooltip touchend.zf.tooltip', function (e) {\n _this.isActive ? _this.hide() : _this.show();\n });\n }\n\n if (this.options.clickOpen) {\n this.$element.on('mousedown.zf.tooltip', function(e) {\n if (_this.isClick) {\n //_this.hide();\n // _this.isClick = false;\n } else {\n _this.isClick = true;\n if ((_this.options.disableHover || !_this.$element.attr('tabindex')) && !_this.isActive) {\n _this.show();\n }\n }\n });\n } else {\n this.$element.on('mousedown.zf.tooltip', function(e) {\n _this.isClick = true;\n });\n }\n\n this.$element.on({\n // 'toggle.zf.trigger': this.toggle.bind(this),\n // 'close.zf.trigger': this.hide.bind(this)\n 'close.zf.trigger': this.hide.bind(this)\n });\n\n this.$element\n .on('focus.zf.tooltip', function(e) {\n isFocus = true;\n if (_this.isClick) {\n // If we're not showing open on clicks, we need to pretend a click-launched focus isn't\n // a real focus, otherwise on hover and come back we get bad behavior\n if(!_this.options.clickOpen) { isFocus = false; }\n return false;\n } else {\n _this.show();\n }\n })\n\n .on('focusout.zf.tooltip', function(e) {\n isFocus = false;\n _this.isClick = false;\n _this.hide();\n })\n\n .on('resizeme.zf.trigger', function() {\n if (_this.isActive) {\n _this._setPosition();\n }\n });\n }\n\n /**\n * adds a toggle method, in addition to the static show() & hide() functions\n * @function\n */\n toggle() {\n if (this.isActive) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n /**\n * Destroys an instance of tooltip, removes template element from the view.\n * @function\n */\n _destroy() {\n this.$element.attr('title', this.template.text())\n .off('.zf.trigger .zf.tooltip')\n .removeClass(this.options.triggerClass)\n .removeClass('top right left bottom')\n .removeAttr('aria-describedby data-disable-hover data-resize data-toggle data-tooltip data-yeti-box');\n\n this.template.remove();\n }\n}\n\nTooltip.defaults = {\n /**\n * Time, in ms, before a tooltip should open on hover.\n * @option\n * @type {number}\n * @default 200\n */\n hoverDelay: 200,\n /**\n * Time, in ms, a tooltip should take to fade into view.\n * @option\n * @type {number}\n * @default 150\n */\n fadeInDuration: 150,\n /**\n * Time, in ms, a tooltip should take to fade out of view.\n * @option\n * @type {number}\n * @default 150\n */\n fadeOutDuration: 150,\n /**\n * Disables hover events from opening the tooltip if set to true\n * @option\n * @type {boolean}\n * @default false\n */\n disableHover: false,\n /**\n * Disable the tooltip for touch devices.\n * This can be useful to make elements with a tooltip on it trigger their\n * action on the first tap instead of displaying the tooltip.\n * @option\n * @type {booelan}\n * @default false\n */\n disableForTouch: false,\n /**\n * Optional addtional classes to apply to the tooltip template on init.\n * @option\n * @type {string}\n * @default ''\n */\n templateClasses: '',\n /**\n * Non-optional class added to tooltip templates. Foundation default is 'tooltip'.\n * @option\n * @type {string}\n * @default 'tooltip'\n */\n tooltipClass: 'tooltip',\n /**\n * Class applied to the tooltip anchor element.\n * @option\n * @type {string}\n * @default 'has-tip'\n */\n triggerClass: 'has-tip',\n /**\n * Minimum breakpoint size at which to open the tooltip.\n * @option\n * @type {string}\n * @default 'small'\n */\n showOn: 'small',\n /**\n * Custom template to be used to generate markup for tooltip.\n * @option\n * @type {string}\n * @default ''\n */\n template: '',\n /**\n * Text displayed in the tooltip template on open.\n * @option\n * @type {string}\n * @default ''\n */\n tipText: '',\n touchCloseText: 'Tap to close.',\n /**\n * Allows the tooltip to remain open if triggered with a click or touch event.\n * @option\n * @type {boolean}\n * @default true\n */\n clickOpen: true,\n /**\n * Position of tooltip. Can be left, right, bottom, top, or auto.\n * @option\n * @type {string}\n * @default 'auto'\n */\n position: 'auto',\n /**\n * Alignment of tooltip relative to anchor. Can be left, right, bottom, top, center, or auto.\n * @option\n * @type {string}\n * @default 'auto'\n */\n alignment: 'auto',\n /**\n * Allow overlap of container/window. If false, tooltip will first try to\n * position as defined by data-position and data-alignment, but reposition if\n * it would cause an overflow. @option\n * @type {boolean}\n * @default false\n */\n allowOverlap: false,\n /**\n * Allow overlap of only the bottom of the container. This is the most common\n * behavior for dropdowns, allowing the dropdown to extend the bottom of the\n * screen but not otherwise influence or break out of the container.\n * Less common for tooltips.\n * @option\n * @type {boolean}\n * @default false\n */\n allowBottomOverlap: false,\n /**\n * Distance, in pixels, the template should push away from the anchor on the Y axis.\n * @option\n * @type {number}\n * @default 0\n */\n vOffset: 0,\n /**\n * Distance, in pixels, the template should push away from the anchor on the X axis\n * @option\n * @type {number}\n * @default 0\n */\n hOffset: 0,\n /**\n * Distance, in pixels, the template spacing auto-adjust for a vertical tooltip\n * @option\n * @type {number}\n * @default 14\n */\n tooltipHeight: 14,\n /**\n * Distance, in pixels, the template spacing auto-adjust for a horizontal tooltip\n * @option\n * @type {number}\n * @default 12\n */\n tooltipWidth: 12,\n /**\n * Allow HTML in tooltip. Warning: If you are loading user-generated content into tooltips,\n * allowing HTML may open yourself up to XSS attacks.\n * @option\n * @type {boolean}\n * @default false\n */\n allowHtml: false\n};\n\n/**\n * TODO utilize resize event trigger\n */\n\nexport {Tooltip};\n","'use strict';\n\nvar Box = {\n ImNotTouchingYou: ImNotTouchingYou,\n OverlapArea: OverlapArea,\n GetDimensions: GetDimensions,\n GetExplicitOffsets: GetExplicitOffsets\n}\n\n/**\n * Compares the dimensions of an element to a container and determines collision events with container.\n * @function\n * @param {jQuery} element - jQuery object to test for collisions.\n * @param {jQuery} parent - jQuery object to use as bounding container.\n * @param {Boolean} lrOnly - set to true to check left and right values only.\n * @param {Boolean} tbOnly - set to true to check top and bottom values only.\n * @default if no parent object passed, detects collisions with `window`.\n * @returns {Boolean} - true if collision free, false if a collision in any direction.\n */\nfunction ImNotTouchingYou(element, parent, lrOnly, tbOnly, ignoreBottom) {\n return OverlapArea(element, parent, lrOnly, tbOnly, ignoreBottom) === 0;\n}\n\nfunction OverlapArea(element, parent, lrOnly, tbOnly, ignoreBottom) {\n var eleDims = GetDimensions(element),\n topOver, bottomOver, leftOver, rightOver;\n if (parent) {\n var parDims = GetDimensions(parent);\n\n bottomOver = (parDims.height + parDims.offset.top) - (eleDims.offset.top + eleDims.height);\n topOver = eleDims.offset.top - parDims.offset.top;\n leftOver = eleDims.offset.left - parDims.offset.left;\n rightOver = (parDims.width + parDims.offset.left) - (eleDims.offset.left + eleDims.width);\n }\n else {\n bottomOver = (eleDims.windowDims.height + eleDims.windowDims.offset.top) - (eleDims.offset.top + eleDims.height);\n topOver = eleDims.offset.top - eleDims.windowDims.offset.top;\n leftOver = eleDims.offset.left - eleDims.windowDims.offset.left;\n rightOver = eleDims.windowDims.width - (eleDims.offset.left + eleDims.width);\n }\n\n bottomOver = ignoreBottom ? 0 : Math.min(bottomOver, 0);\n topOver = Math.min(topOver, 0);\n leftOver = Math.min(leftOver, 0);\n rightOver = Math.min(rightOver, 0);\n\n if (lrOnly) {\n return leftOver + rightOver;\n }\n if (tbOnly) {\n return topOver + bottomOver;\n }\n\n // use sum of squares b/c we care about overlap area.\n return Math.sqrt((topOver * topOver) + (bottomOver * bottomOver) + (leftOver * leftOver) + (rightOver * rightOver));\n}\n\n/**\n * Uses native methods to return an object of dimension values.\n * @function\n * @param {jQuery || HTML} element - jQuery object or DOM element for which to get the dimensions. Can be any element other that document or window.\n * @returns {Object} - nested object of integer pixel values\n * TODO - if element is window, return only those values.\n */\nfunction GetDimensions(elem){\n elem = elem.length ? elem[0] : elem;\n\n if (elem === window || elem === document) {\n throw new Error(\"I'm sorry, Dave. I'm afraid I can't do that.\");\n }\n\n var rect = elem.getBoundingClientRect(),\n parRect = elem.parentNode.getBoundingClientRect(),\n winRect = document.body.getBoundingClientRect(),\n winY = window.pageYOffset,\n winX = window.pageXOffset;\n\n return {\n width: rect.width,\n height: rect.height,\n offset: {\n top: rect.top + winY,\n left: rect.left + winX\n },\n parentDims: {\n width: parRect.width,\n height: parRect.height,\n offset: {\n top: parRect.top + winY,\n left: parRect.left + winX\n }\n },\n windowDims: {\n width: winRect.width,\n height: winRect.height,\n offset: {\n top: winY,\n left: winX\n }\n }\n }\n}\n\n/**\n * Returns an object of top and left integer pixel values for dynamically rendered elements,\n * such as: Tooltip, Reveal, and Dropdown. Maintained for backwards compatibility, and where\n * you don't know alignment, but generally from\n * 6.4 forward you should use GetExplicitOffsets, as GetOffsets conflates position and alignment.\n * @function\n * @param {jQuery} element - jQuery object for the element being positioned.\n * @param {jQuery} anchor - jQuery object for the element's anchor point.\n * @param {String} position - a string relating to the desired position of the element, relative to it's anchor\n * @param {Number} vOffset - integer pixel value of desired vertical separation between anchor and element.\n * @param {Number} hOffset - integer pixel value of desired horizontal separation between anchor and element.\n * @param {Boolean} isOverflow - if a collision event is detected, sets to true to default the element to full width - any desired offset.\n * TODO alter/rewrite to work with `em` values as well/instead of pixels\n */\nfunction GetExplicitOffsets(element, anchor, position, alignment, vOffset, hOffset, isOverflow) {\n var $eleDims = GetDimensions(element),\n $anchorDims = anchor ? GetDimensions(anchor) : null;\n\n var topVal, leftVal;\n\n if ($anchorDims !== null) {\n // set position related attribute\n switch (position) {\n case 'top':\n topVal = $anchorDims.offset.top - ($eleDims.height + vOffset);\n break;\n case 'bottom':\n topVal = $anchorDims.offset.top + $anchorDims.height + vOffset;\n break;\n case 'left':\n leftVal = $anchorDims.offset.left - ($eleDims.width + hOffset);\n break;\n case 'right':\n leftVal = $anchorDims.offset.left + $anchorDims.width + hOffset;\n break;\n }\n\n // set alignment related attribute\n switch (position) {\n case 'top':\n case 'bottom':\n switch (alignment) {\n case 'left':\n leftVal = $anchorDims.offset.left + hOffset;\n break;\n case 'right':\n leftVal = $anchorDims.offset.left - $eleDims.width + $anchorDims.width - hOffset;\n break;\n case 'center':\n leftVal = isOverflow ? hOffset : (($anchorDims.offset.left + ($anchorDims.width / 2)) - ($eleDims.width / 2)) + hOffset;\n break;\n }\n break;\n case 'right':\n case 'left':\n switch (alignment) {\n case 'bottom':\n topVal = $anchorDims.offset.top - vOffset + $anchorDims.height - $eleDims.height;\n break;\n case 'top':\n topVal = $anchorDims.offset.top + vOffset\n break;\n case 'center':\n topVal = ($anchorDims.offset.top + vOffset + ($anchorDims.height / 2)) - ($eleDims.height / 2)\n break;\n }\n break;\n }\n }\n\n return {top: topVal, left: leftVal};\n}\n\nexport {Box};\n","'use strict';\n\nimport $ from 'jquery';\n\n/**\n * Runs a callback function when images are fully loaded.\n * @param {Object} images - Image(s) to check if loaded.\n * @param {Func} callback - Function to execute when image is fully loaded.\n */\nfunction onImagesLoaded(images, callback){\n var self = this,\n unloaded = images.length;\n\n if (unloaded === 0) {\n callback();\n }\n\n images.each(function(){\n // Check if image is loaded\n if (this.complete && typeof this.naturalWidth !== 'undefined') {\n singleImageLoaded();\n }\n else {\n // If the above check failed, simulate loading on detached element.\n var image = new Image();\n // Still count image as loaded if it finalizes with an error.\n var events = \"load.zf.images error.zf.images\";\n $(image).one(events, function me(event){\n // Unbind the event listeners. We're using 'one' but only one of the two events will have fired.\n $(this).off(events, me);\n singleImageLoaded();\n });\n image.src = $(this).attr('src');\n }\n });\n\n function singleImageLoaded() {\n unloaded--;\n if (unloaded === 0) {\n callback();\n }\n }\n}\n\nexport { onImagesLoaded };\n","/*******************************************\n * *\n * This util was created by Marius Olbertz *\n * Please thank Marius on GitHub /owlbertz *\n * or the web http://www.mariusolbertz.de/ *\n * *\n ******************************************/\n\n'use strict';\n\nimport $ from 'jquery';\nimport { rtl as Rtl } from './foundation.core.utils';\n\nconst keyCodes = {\n 9: 'TAB',\n 13: 'ENTER',\n 27: 'ESCAPE',\n 32: 'SPACE',\n 35: 'END',\n 36: 'HOME',\n 37: 'ARROW_LEFT',\n 38: 'ARROW_UP',\n 39: 'ARROW_RIGHT',\n 40: 'ARROW_DOWN'\n}\n\nvar commands = {}\n\n// Functions pulled out to be referenceable from internals\nfunction findFocusable($element) {\n if(!$element) {return false; }\n return $element.find('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]').filter(function() {\n if (!$(this).is(':visible') || $(this).attr('tabindex') < 0) { return false; } //only have visible elements and those that have a tabindex greater or equal 0\n return true;\n });\n}\n\nfunction parseKey(event) {\n var key = keyCodes[event.which || event.keyCode] || String.fromCharCode(event.which).toUpperCase();\n\n // Remove un-printable characters, e.g. for `fromCharCode` calls for CTRL only events\n key = key.replace(/\\W+/, '');\n\n if (event.shiftKey) key = `SHIFT_${key}`;\n if (event.ctrlKey) key = `CTRL_${key}`;\n if (event.altKey) key = `ALT_${key}`;\n\n // Remove trailing underscore, in case only modifiers were used (e.g. only `CTRL_ALT`)\n key = key.replace(/_$/, '');\n\n return key;\n}\n\nvar Keyboard = {\n keys: getKeyCodes(keyCodes),\n\n /**\n * Parses the (keyboard) event and returns a String that represents its key\n * Can be used like Foundation.parseKey(event) === Foundation.keys.SPACE\n * @param {Event} event - the event generated by the event handler\n * @return String key - String that represents the key pressed\n */\n parseKey: parseKey,\n\n /**\n * Handles the given (keyboard) event\n * @param {Event} event - the event generated by the event handler\n * @param {String} component - Foundation component's name, e.g. Slider or Reveal\n * @param {Objects} functions - collection of functions that are to be executed\n */\n handleKey(event, component, functions) {\n var commandList = commands[component],\n keyCode = this.parseKey(event),\n cmds,\n command,\n fn;\n\n if (!commandList) return console.warn('Component not defined!');\n\n // Ignore the event if it was already handled\n if (event.zfIsKeyHandled === true) return;\n\n // This component does not differentiate between ltr and rtl\n if (typeof commandList.ltr === 'undefined') {\n cmds = commandList; // use plain list\n } else { // merge ltr and rtl: if document is rtl, rtl overwrites ltr and vice versa\n if (Rtl()) cmds = $.extend({}, commandList.ltr, commandList.rtl);\n\n else cmds = $.extend({}, commandList.rtl, commandList.ltr);\n }\n command = cmds[keyCode];\n\n fn = functions[command];\n // Execute the handler if found\n if (fn && typeof fn === 'function') {\n var returnValue = fn.apply();\n\n // Mark the event as \"handled\" to prevent future handlings\n event.zfIsKeyHandled = true;\n\n // Execute function when event was handled\n if (functions.handled || typeof functions.handled === 'function') {\n functions.handled(returnValue);\n }\n } else {\n // Execute function when event was not handled\n if (functions.unhandled || typeof functions.unhandled === 'function') {\n functions.unhandled();\n }\n }\n },\n\n /**\n * Finds all focusable elements within the given `$element`\n * @param {jQuery} $element - jQuery object to search within\n * @return {jQuery} $focusable - all focusable elements within `$element`\n */\n\n findFocusable: findFocusable,\n\n /**\n * Returns the component name name\n * @param {Object} component - Foundation component, e.g. Slider or Reveal\n * @return String componentName\n */\n\n register(componentName, cmds) {\n commands[componentName] = cmds;\n },\n\n\n // TODO9438: These references to Keyboard need to not require global. Will 'this' work in this context?\n //\n /**\n * Traps the focus in the given element.\n * @param {jQuery} $element jQuery object to trap the foucs into.\n */\n trapFocus($element) {\n var $focusable = findFocusable($element),\n $firstFocusable = $focusable.eq(0),\n $lastFocusable = $focusable.eq(-1);\n\n $element.on('keydown.zf.trapfocus', function(event) {\n if (event.target === $lastFocusable[0] && parseKey(event) === 'TAB') {\n event.preventDefault();\n $firstFocusable.focus();\n }\n else if (event.target === $firstFocusable[0] && parseKey(event) === 'SHIFT_TAB') {\n event.preventDefault();\n $lastFocusable.focus();\n }\n });\n },\n /**\n * Releases the trapped focus from the given element.\n * @param {jQuery} $element jQuery object to release the focus for.\n */\n releaseFocus($element) {\n $element.off('keydown.zf.trapfocus');\n }\n}\n\n/*\n * Constants for easier comparing.\n * Can be used like Foundation.parseKey(event) === Foundation.keys.SPACE\n */\nfunction getKeyCodes(kcs) {\n var k = {};\n for (var kc in kcs) k[kcs[kc]] = kcs[kc];\n return k;\n}\n\nexport {Keyboard};\n","'use strict';\n\nimport $ from 'jquery';\n\n// Default set of media queries\nconst defaultQueries = {\n 'default' : 'only screen',\n landscape : 'only screen and (orientation: landscape)',\n portrait : 'only screen and (orientation: portrait)',\n retina : 'only screen and (-webkit-min-device-pixel-ratio: 2),' +\n 'only screen and (min--moz-device-pixel-ratio: 2),' +\n 'only screen and (-o-min-device-pixel-ratio: 2/1),' +\n 'only screen and (min-device-pixel-ratio: 2),' +\n 'only screen and (min-resolution: 192dpi),' +\n 'only screen and (min-resolution: 2dppx)'\n };\n\n\n// matchMedia() polyfill - Test a CSS media type/query in JS.\n// Authors & copyright © 2012: Scott Jehl, Paul Irish, Nicholas Zakas, David Knight. MIT license\n/* eslint-disable */\nwindow.matchMedia || (window.matchMedia = (function () {\n \"use strict\";\n\n // For browsers that support matchMedium api such as IE 9 and webkit\n var styleMedia = (window.styleMedia || window.media);\n\n // For those that don't support matchMedium\n if (!styleMedia) {\n var style = document.createElement('style'),\n script = document.getElementsByTagName('script')[0],\n info = null;\n\n style.type = 'text/css';\n style.id = 'matchmediajs-test';\n\n if (!script) {\n document.head.appendChild(style);\n } else {\n script.parentNode.insertBefore(style, script);\n }\n\n // 'style.currentStyle' is used by IE <= 8 and 'window.getComputedStyle' for all other browsers\n info = ('getComputedStyle' in window) && window.getComputedStyle(style, null) || style.currentStyle;\n\n styleMedia = {\n matchMedium: function (media) {\n var text = '@media ' + media + '{ #matchmediajs-test { width: 1px; } }';\n\n // 'style.styleSheet' is used by IE <= 8 and 'style.textContent' for all other browsers\n if (style.styleSheet) {\n style.styleSheet.cssText = text;\n } else {\n style.textContent = text;\n }\n\n // Test if media query is true or false\n return info.width === '1px';\n }\n };\n }\n\n return function(media) {\n return {\n matches: styleMedia.matchMedium(media || 'all'),\n media: media || 'all'\n };\n };\n})());\n/* eslint-enable */\n\nvar MediaQuery = {\n queries: [],\n\n current: '',\n\n /**\n * Initializes the media query helper, by extracting the breakpoint list from the CSS and activating the breakpoint watcher.\n * @function\n * @private\n */\n _init() {\n\n // make sure the initialization is only done once when calling _init() several times\n if (this.isInitialized === true) {\n return;\n } else {\n this.isInitialized = true;\n }\n\n var self = this;\n var $meta = $('meta.foundation-mq');\n if(!$meta.length){\n $('<meta class=\"foundation-mq\">').appendTo(document.head);\n }\n\n var extractedStyles = $('.foundation-mq').css('font-family');\n var namedQueries;\n\n namedQueries = parseStyleToObject(extractedStyles);\n\n self.queries = []; // reset\n\n for (var key in namedQueries) {\n if(namedQueries.hasOwnProperty(key)) {\n self.queries.push({\n name: key,\n value: `only screen and (min-width: ${namedQueries[key]})`\n });\n }\n }\n\n this.current = this._getCurrentSize();\n\n this._watcher();\n },\n\n /**\n * Reinitializes the media query helper.\n * Useful if your CSS breakpoint configuration has just been loaded or has changed since the initialization.\n * @function\n * @private\n */\n _reInit() {\n this.isInitialized = false;\n this._init();\n },\n\n /**\n * Checks if the screen is at least as wide as a breakpoint.\n * @function\n * @param {String} size - Name of the breakpoint to check.\n * @returns {Boolean} `true` if the breakpoint matches, `false` if it's smaller.\n */\n atLeast(size) {\n var query = this.get(size);\n\n if (query) {\n return window.matchMedia(query).matches;\n }\n\n return false;\n },\n\n /**\n * Checks if the screen is within the given breakpoint.\n * If smaller than the breakpoint of larger than its upper limit it returns false.\n * @function\n * @param {String} size - Name of the breakpoint to check.\n * @returns {Boolean} `true` if the breakpoint matches, `false` otherwise.\n */\n only(size) {\n return size === this._getCurrentSize();\n },\n\n /**\n * Checks if the screen is within a breakpoint or smaller.\n * @function\n * @param {String} size - Name of the breakpoint to check.\n * @returns {Boolean} `true` if the breakpoint matches, `false` if it's larger.\n */\n upTo(size) {\n const nextSize = this.next(size);\n\n // If the next breakpoint does not match, the screen is smaller than\n // the upper limit of this breakpoint.\n if (nextSize) {\n return !this.atLeast(nextSize);\n }\n\n // If there is no next breakpoint, the \"size\" breakpoint does not have\n // an upper limit and the screen will always be within it or smaller.\n return true;\n },\n\n /**\n * Checks if the screen matches to a breakpoint.\n * @function\n * @param {String} size - Name of the breakpoint to check, either 'small only' or 'small'. Omitting 'only' falls back to using atLeast() method.\n * @returns {Boolean} `true` if the breakpoint matches, `false` if it does not.\n */\n is(size) {\n const parts = size.trim().split(' ').filter(p => !!p.length);\n const [bpSize, bpModifier = ''] = parts;\n\n // Only the breakpont\n if (bpModifier === 'only') {\n return this.only(bpSize);\n }\n // At least the breakpoint (included)\n if (!bpModifier || bpModifier === 'up') {\n return this.atLeast(bpSize);\n }\n // Up to the breakpoint (included)\n if (bpModifier === 'down') {\n return this.upTo(bpSize);\n }\n\n throw new Error(`\n Invalid breakpoint passed to MediaQuery.is().\n Expected a breakpoint name formatted like \"<size> <modifier>\", got \"${size}\".\n `);\n },\n\n /**\n * Gets the media query of a breakpoint.\n * @function\n * @param {String} size - Name of the breakpoint to get.\n * @returns {String|null} - The media query of the breakpoint, or `null` if the breakpoint doesn't exist.\n */\n get(size) {\n for (var i in this.queries) {\n if(this.queries.hasOwnProperty(i)) {\n var query = this.queries[i];\n if (size === query.name) return query.value;\n }\n }\n\n return null;\n },\n\n /**\n * Get the breakpoint following the given breakpoint.\n * @function\n * @param {String} size - Name of the breakpoint.\n * @returns {String|null} - The name of the following breakpoint, or `null` if the passed breakpoint was the last one.\n */\n next(size) {\n const queryIndex = this.queries.findIndex((q) => this._getQueryName(q) === size);\n if (queryIndex === -1) {\n throw new Error(`\n Unknown breakpoint \"${size}\" passed to MediaQuery.next().\n Ensure it is present in your Sass \"$breakpoints\" setting.\n `);\n }\n\n const nextQuery = this.queries[queryIndex + 1];\n return nextQuery ? nextQuery.name : null;\n },\n\n /**\n * Returns the name of the breakpoint related to the given value.\n * @function\n * @private\n * @param {String|Object} value - Breakpoint name or query object.\n * @returns {String} Name of the breakpoint.\n */\n _getQueryName(value) {\n if (typeof value === 'string')\n return value;\n if (typeof value === 'object')\n return value.name;\n throw new TypeError(`\n Invalid value passed to MediaQuery._getQueryName().\n Expected a breakpoint name (String) or a breakpoint query (Object), got \"${value}\" (${typeof value})\n `);\n },\n\n /**\n * Gets the current breakpoint name by testing every breakpoint and returning the last one to match (the biggest one).\n * @function\n * @private\n * @returns {String} Name of the current breakpoint.\n */\n _getCurrentSize() {\n var matched;\n\n for (var i = 0; i < this.queries.length; i++) {\n var query = this.queries[i];\n\n if (window.matchMedia(query.value).matches) {\n matched = query;\n }\n }\n\n return matched && this._getQueryName(matched);\n },\n\n /**\n * Activates the breakpoint watcher, which fires an event on the window whenever the breakpoint changes.\n * @function\n * @private\n */\n _watcher() {\n $(window).off('resize.zf.mediaquery').on('resize.zf.mediaquery', () => {\n var newSize = this._getCurrentSize(), currentSize = this.current;\n\n if (newSize !== currentSize) {\n // Change the current media query\n this.current = newSize;\n\n // Broadcast the media query change on the window\n $(window).trigger('changed.zf.mediaquery', [newSize, currentSize]);\n }\n });\n }\n};\n\n\n\n// Thank you: https://github.com/sindresorhus/query-string\nfunction parseStyleToObject(str) {\n var styleObject = {};\n\n if (typeof str !== 'string') {\n return styleObject;\n }\n\n str = str.trim().slice(1, -1); // browsers re-quote string style values\n\n if (!str) {\n return styleObject;\n }\n\n styleObject = str.split('&').reduce(function(ret, param) {\n var parts = param.replace(/\\+/g, ' ').split('=');\n var key = parts[0];\n var val = parts[1];\n key = decodeURIComponent(key);\n\n // missing `=` should be `null`:\n // http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters\n val = typeof val === 'undefined' ? null : decodeURIComponent(val);\n\n if (!ret.hasOwnProperty(key)) {\n ret[key] = val;\n } else if (Array.isArray(ret[key])) {\n ret[key].push(val);\n } else {\n ret[key] = [ret[key], val];\n }\n return ret;\n }, {});\n\n return styleObject;\n}\n\nexport {MediaQuery};\n","'use strict';\n\nimport $ from 'jquery';\nimport { transitionend } from './foundation.core.utils';\n\n/**\n * Motion module.\n * @module foundation.motion\n */\n\nconst initClasses = ['mui-enter', 'mui-leave'];\nconst activeClasses = ['mui-enter-active', 'mui-leave-active'];\n\nconst Motion = {\n animateIn: function(element, animation, cb) {\n animate(true, element, animation, cb);\n },\n\n animateOut: function(element, animation, cb) {\n animate(false, element, animation, cb);\n }\n}\n\nfunction Move(duration, elem, fn){\n var anim, prog, start = null;\n // console.log('called');\n\n if (duration === 0) {\n fn.apply(elem);\n elem.trigger('finished.zf.animate', [elem]).triggerHandler('finished.zf.animate', [elem]);\n return;\n }\n\n function move(ts){\n if(!start) start = ts;\n // console.log(start, ts);\n prog = ts - start;\n fn.apply(elem);\n\n if(prog < duration){ anim = window.requestAnimationFrame(move, elem); }\n else{\n window.cancelAnimationFrame(anim);\n elem.trigger('finished.zf.animate', [elem]).triggerHandler('finished.zf.animate', [elem]);\n }\n }\n anim = window.requestAnimationFrame(move);\n}\n\n/**\n * Animates an element in or out using a CSS transition class.\n * @function\n * @private\n * @param {Boolean} isIn - Defines if the animation is in or out.\n * @param {Object} element - jQuery or HTML object to animate.\n * @param {String} animation - CSS class to use.\n * @param {Function} cb - Callback to run when animation is finished.\n */\nfunction animate(isIn, element, animation, cb) {\n element = $(element).eq(0);\n\n if (!element.length) return;\n\n var initClass = isIn ? initClasses[0] : initClasses[1];\n var activeClass = isIn ? activeClasses[0] : activeClasses[1];\n\n // Set up the animation\n reset();\n\n element\n .addClass(animation)\n .css('transition', 'none');\n\n requestAnimationFrame(() => {\n element.addClass(initClass);\n if (isIn) element.show();\n });\n\n // Start the animation\n requestAnimationFrame(() => {\n // will trigger the browser to synchronously calculate the style and layout\n // also called reflow or layout thrashing\n // see https://gist.github.com/paulirish/5d52fb081b3570c81e3a\n element[0].offsetWidth;\n element\n .css('transition', '')\n .addClass(activeClass);\n });\n\n // Clean up the animation when it finishes\n element.one(transitionend(element), finish);\n\n // Hides the element (for out animations), resets the element, and runs a callback\n function finish() {\n if (!isIn) element.hide();\n reset();\n if (cb) cb.apply(element);\n }\n\n // Resets transitions and removes motion-specific classes\n function reset() {\n element[0].style.transitionDuration = 0;\n element.removeClass(`${initClass} ${activeClass} ${animation}`);\n }\n}\n\nexport { Move, Motion };\n\n","'use strict';\n\nimport $ from 'jquery';\n\nconst Nest = {\n Feather(menu, type = 'zf') {\n menu.attr('role', 'menubar');\n menu.find('a').attr({'role': 'menuitem'});\n\n var items = menu.find('li').attr({'role': 'none'}),\n subMenuClass = `is-${type}-submenu`,\n subItemClass = `${subMenuClass}-item`,\n hasSubClass = `is-${type}-submenu-parent`,\n applyAria = (type !== 'accordion'); // Accordions handle their own ARIA attriutes.\n\n items.each(function() {\n var $item = $(this),\n $sub = $item.children('ul');\n\n if ($sub.length) {\n $item.addClass(hasSubClass);\n if(applyAria) {\n $item.attr({\n 'aria-haspopup': true,\n 'aria-label': $item.children('a:first').text()\n });\n // Note: Drilldowns behave differently in how they hide, and so need\n // additional attributes. We should look if this possibly over-generalized\n // utility (Nest) is appropriate when we rework menus in 6.4\n if(type === 'drilldown') {\n $item.attr({'aria-expanded': false});\n }\n }\n $sub\n .addClass(`submenu ${subMenuClass}`)\n .attr({\n 'data-submenu': '',\n 'role': 'menubar'\n });\n if(type === 'drilldown') {\n $sub.attr({'aria-hidden': true});\n }\n }\n\n if ($item.parent('[data-submenu]').length) {\n $item.addClass(`is-submenu-item ${subItemClass}`);\n }\n });\n\n return;\n },\n\n Burn(menu, type) {\n var //items = menu.find('li'),\n subMenuClass = `is-${type}-submenu`,\n subItemClass = `${subMenuClass}-item`,\n hasSubClass = `is-${type}-submenu-parent`;\n\n menu\n .find('>li, > li > ul, .menu, .menu > li, [data-submenu] > li')\n .removeClass(`${subMenuClass} ${subItemClass} ${hasSubClass} is-submenu-item submenu is-active`)\n .removeAttr('data-submenu').css('display', '');\n\n }\n}\n\nexport {Nest};\n","'use strict';\n\nimport $ from 'jquery';\n\nfunction Timer(elem, options, cb) {\n var _this = this,\n duration = options.duration,//options is an object for easily adding features later.\n nameSpace = Object.keys(elem.data())[0] || 'timer',\n remain = -1,\n start,\n timer;\n\n this.isPaused = false;\n\n this.restart = function() {\n remain = -1;\n clearTimeout(timer);\n this.start();\n }\n\n this.start = function() {\n this.isPaused = false;\n // if(!elem.data('paused')){ return false; }//maybe implement this sanity check if used for other things.\n clearTimeout(timer);\n remain = remain <= 0 ? duration : remain;\n elem.data('paused', false);\n start = Date.now();\n timer = setTimeout(function(){\n if(options.infinite){\n _this.restart();//rerun the timer.\n }\n if (cb && typeof cb === 'function') { cb(); }\n }, remain);\n elem.trigger(`timerstart.zf.${nameSpace}`);\n }\n\n this.pause = function() {\n this.isPaused = true;\n //if(elem.data('paused')){ return false; }//maybe implement this sanity check if used for other things.\n clearTimeout(timer);\n elem.data('paused', true);\n var end = Date.now();\n remain = remain - (end - start);\n elem.trigger(`timerpaused.zf.${nameSpace}`);\n }\n}\n\nexport {Timer};\n","//**************************************************\n//**Work inspired by multiple jquery swipe plugins**\n//**Done by Yohai Ararat ***************************\n//**************************************************\n\nimport $ from 'jquery';\n\nvar Touch = {};\n\nvar startPosX,\n startPosY,\n startTime,\n elapsedTime,\n startEvent,\n isMoving = false,\n didMoved = false;\n\nfunction onTouchEnd(e) {\n this.removeEventListener('touchmove', onTouchMove);\n this.removeEventListener('touchend', onTouchEnd);\n\n // If the touch did not move, consider it as a \"tap\"\n if (!didMoved) {\n var tapEvent = $.Event('tap', startEvent || e);\n $(this).trigger(tapEvent);\n }\n\n startEvent = null;\n isMoving = false;\n didMoved = false;\n}\n\nfunction onTouchMove(e) {\n if ($.spotSwipe.preventDefault) { e.preventDefault(); }\n\n if(isMoving) {\n var x = e.touches[0].pageX;\n var y = e.touches[0].pageY;\n var dx = startPosX - x;\n var dy = startPosY - y;\n var dir;\n didMoved = true;\n elapsedTime = new Date().getTime() - startTime;\n if(Math.abs(dx) >= $.spotSwipe.moveThreshold && elapsedTime <= $.spotSwipe.timeThreshold) {\n dir = dx > 0 ? 'left' : 'right';\n }\n // else if(Math.abs(dy) >= $.spotSwipe.moveThreshold && elapsedTime <= $.spotSwipe.timeThreshold) {\n // dir = dy > 0 ? 'down' : 'up';\n // }\n if(dir) {\n e.preventDefault();\n onTouchEnd.apply(this, arguments);\n $(this)\n .trigger($.Event('swipe', Object.assign({}, e)), dir)\n .trigger($.Event(`swipe${dir}`, Object.assign({}, e)));\n }\n }\n\n}\n\nfunction onTouchStart(e) {\n\n if (e.touches.length == 1) {\n startPosX = e.touches[0].pageX;\n startPosY = e.touches[0].pageY;\n startEvent = e;\n isMoving = true;\n didMoved = false;\n startTime = new Date().getTime();\n this.addEventListener('touchmove', onTouchMove, false);\n this.addEventListener('touchend', onTouchEnd, false);\n }\n}\n\nfunction init() {\n this.addEventListener && this.addEventListener('touchstart', onTouchStart, false);\n}\n\nfunction teardown() {\n this.removeEventListener('touchstart', onTouchStart);\n}\n\nclass SpotSwipe {\n constructor($) {\n this.version = '1.0.0';\n this.enabled = 'ontouchstart' in document.documentElement;\n this.preventDefault = false;\n this.moveThreshold = 75;\n this.timeThreshold = 200;\n this.$ = $;\n this._init();\n }\n\n _init() {\n var $ = this.$;\n $.event.special.swipe = { setup: init };\n $.event.special.tap = { setup: init };\n\n $.each(['left', 'up', 'down', 'right'], function () {\n $.event.special[`swipe${this}`] = { setup: function(){\n $(this).on('swipe', $.noop);\n } };\n });\n }\n}\n\n/****************************************************\n * As far as I can tell, both setupSpotSwipe and *\n * setupTouchHandler should be idempotent, *\n * because they directly replace functions & *\n * values, and do not add event handlers directly. *\n ****************************************************/\n\nTouch.setupSpotSwipe = function($) {\n $.spotSwipe = new SpotSwipe($);\n};\n\n/****************************************************\n * Method for adding pseudo drag events to elements *\n ***************************************************/\nTouch.setupTouchHandler = function($) {\n $.fn.addTouch = function(){\n this.each(function(i,el){\n $(el).bind('touchstart touchmove touchend touchcancel', function(event) {\n //we pass the original event object because the jQuery event\n //object is normalized to w3c specs and does not provide the TouchList\n handleTouch(event);\n });\n });\n\n var handleTouch = function(event){\n var touches = event.changedTouches,\n first = touches[0],\n eventTypes = {\n touchstart: 'mousedown',\n touchmove: 'mousemove',\n touchend: 'mouseup'\n },\n type = eventTypes[event.type],\n simulatedEvent\n ;\n\n if('MouseEvent' in window && typeof window.MouseEvent === 'function') {\n simulatedEvent = new window.MouseEvent(type, {\n 'bubbles': true,\n 'cancelable': true,\n 'screenX': first.screenX,\n 'screenY': first.screenY,\n 'clientX': first.clientX,\n 'clientY': first.clientY\n });\n } else {\n simulatedEvent = document.createEvent('MouseEvent');\n simulatedEvent.initMouseEvent(type, true, true, window, 1, first.screenX, first.screenY, first.clientX, first.clientY, false, false, false, false, 0/*left*/, null);\n }\n first.target.dispatchEvent(simulatedEvent);\n };\n };\n};\n\nTouch.init = function ($) {\n\n if(typeof($.spotSwipe) === 'undefined') {\n Touch.setupSpotSwipe($);\n Touch.setupTouchHandler($);\n }\n};\n\nexport {Touch};\n","'use strict';\n\nimport $ from 'jquery';\nimport { onLoad } from './foundation.core.utils';\nimport { Motion } from './foundation.util.motion';\n\nconst MutationObserver = (function () {\n var prefixes = ['WebKit', 'Moz', 'O', 'Ms', ''];\n for (var i=0; i < prefixes.length; i++) {\n if (`${prefixes[i]}MutationObserver` in window) {\n return window[`${prefixes[i]}MutationObserver`];\n }\n }\n return false;\n}());\n\nconst triggers = (el, type) => {\n el.data(type).split(' ').forEach(id => {\n $(`#${id}`)[ type === 'close' ? 'trigger' : 'triggerHandler'](`${type}.zf.trigger`, [el]);\n });\n};\n\nvar Triggers = {\n Listeners: {\n Basic: {},\n Global: {}\n },\n Initializers: {}\n}\n\nTriggers.Listeners.Basic = {\n openListener: function() {\n triggers($(this), 'open');\n },\n closeListener: function() {\n let id = $(this).data('close');\n if (id) {\n triggers($(this), 'close');\n }\n else {\n $(this).trigger('close.zf.trigger');\n }\n },\n toggleListener: function() {\n let id = $(this).data('toggle');\n if (id) {\n triggers($(this), 'toggle');\n } else {\n $(this).trigger('toggle.zf.trigger');\n }\n },\n closeableListener: function(e) {\n let animation = $(this).data('closable');\n\n // Only close the first closable element. See https://git.io/zf-7833\n e.stopPropagation();\n\n if(animation !== ''){\n Motion.animateOut($(this), animation, function() {\n $(this).trigger('closed.zf');\n });\n }else{\n $(this).fadeOut().trigger('closed.zf');\n }\n },\n toggleFocusListener: function() {\n let id = $(this).data('toggle-focus');\n $(`#${id}`).triggerHandler('toggle.zf.trigger', [$(this)]);\n }\n};\n\n// Elements with [data-open] will reveal a plugin that supports it when clicked.\nTriggers.Initializers.addOpenListener = ($elem) => {\n $elem.off('click.zf.trigger', Triggers.Listeners.Basic.openListener);\n $elem.on('click.zf.trigger', '[data-open]', Triggers.Listeners.Basic.openListener);\n}\n\n// Elements with [data-close] will close a plugin that supports it when clicked.\n// If used without a value on [data-close], the event will bubble, allowing it to close a parent component.\nTriggers.Initializers.addCloseListener = ($elem) => {\n $elem.off('click.zf.trigger', Triggers.Listeners.Basic.closeListener);\n $elem.on('click.zf.trigger', '[data-close]', Triggers.Listeners.Basic.closeListener);\n}\n\n// Elements with [data-toggle] will toggle a plugin that supports it when clicked.\nTriggers.Initializers.addToggleListener = ($elem) => {\n $elem.off('click.zf.trigger', Triggers.Listeners.Basic.toggleListener);\n $elem.on('click.zf.trigger', '[data-toggle]', Triggers.Listeners.Basic.toggleListener);\n}\n\n// Elements with [data-closable] will respond to close.zf.trigger events.\nTriggers.Initializers.addCloseableListener = ($elem) => {\n $elem.off('close.zf.trigger', Triggers.Listeners.Basic.closeableListener);\n $elem.on('close.zf.trigger', '[data-closeable], [data-closable]', Triggers.Listeners.Basic.closeableListener);\n}\n\n// Elements with [data-toggle-focus] will respond to coming in and out of focus\nTriggers.Initializers.addToggleFocusListener = ($elem) => {\n $elem.off('focus.zf.trigger blur.zf.trigger', Triggers.Listeners.Basic.toggleFocusListener);\n $elem.on('focus.zf.trigger blur.zf.trigger', '[data-toggle-focus]', Triggers.Listeners.Basic.toggleFocusListener);\n}\n\n\n\n// More Global/complex listeners and triggers\nTriggers.Listeners.Global = {\n resizeListener: function($nodes) {\n if(!MutationObserver){//fallback for IE 9\n $nodes.each(function(){\n $(this).triggerHandler('resizeme.zf.trigger');\n });\n }\n //trigger all listening elements and signal a resize event\n $nodes.attr('data-events', \"resize\");\n },\n scrollListener: function($nodes) {\n if(!MutationObserver){//fallback for IE 9\n $nodes.each(function(){\n $(this).triggerHandler('scrollme.zf.trigger');\n });\n }\n //trigger all listening elements and signal a scroll event\n $nodes.attr('data-events', \"scroll\");\n },\n closeMeListener: function(e, pluginId){\n let plugin = e.namespace.split('.')[0];\n let plugins = $(`[data-${plugin}]`).not(`[data-yeti-box=\"${pluginId}\"]`);\n\n plugins.each(function(){\n let _this = $(this);\n _this.triggerHandler('close.zf.trigger', [_this]);\n });\n }\n}\n\n// Global, parses whole document.\nTriggers.Initializers.addClosemeListener = function(pluginName) {\n var yetiBoxes = $('[data-yeti-box]'),\n plugNames = ['dropdown', 'tooltip', 'reveal'];\n\n if(pluginName){\n if(typeof pluginName === 'string'){\n plugNames.push(pluginName);\n }else if(typeof pluginName === 'object' && typeof pluginName[0] === 'string'){\n plugNames = plugNames.concat(pluginName);\n }else{\n console.error('Plugin names must be strings');\n }\n }\n if(yetiBoxes.length){\n let listeners = plugNames.map((name) => {\n return `closeme.zf.${name}`;\n }).join(' ');\n\n $(window).off(listeners).on(listeners, Triggers.Listeners.Global.closeMeListener);\n }\n}\n\nfunction debounceGlobalListener(debounce, trigger, listener) {\n let timer, args = Array.prototype.slice.call(arguments, 3);\n $(window).off(trigger).on(trigger, function(e) {\n if (timer) { clearTimeout(timer); }\n timer = setTimeout(function(){\n listener.apply(null, args);\n }, debounce || 10);//default time to emit scroll event\n });\n}\n\nTriggers.Initializers.addResizeListener = function(debounce){\n let $nodes = $('[data-resize]');\n if($nodes.length){\n debounceGlobalListener(debounce, 'resize.zf.trigger', Triggers.Listeners.Global.resizeListener, $nodes);\n }\n}\n\nTriggers.Initializers.addScrollListener = function(debounce){\n let $nodes = $('[data-scroll]');\n if($nodes.length){\n debounceGlobalListener(debounce, 'scroll.zf.trigger', Triggers.Listeners.Global.scrollListener, $nodes);\n }\n}\n\nTriggers.Initializers.addMutationEventsListener = function($elem) {\n if(!MutationObserver){ return false; }\n let $nodes = $elem.find('[data-resize], [data-scroll], [data-mutate]');\n\n //element callback\n var listeningElementsMutation = function (mutationRecordsList) {\n var $target = $(mutationRecordsList[0].target);\n\n //trigger the event handler for the element depending on type\n switch (mutationRecordsList[0].type) {\n case \"attributes\":\n if ($target.attr(\"data-events\") === \"scroll\" && mutationRecordsList[0].attributeName === \"data-events\") {\n $target.triggerHandler('scrollme.zf.trigger', [$target, window.pageYOffset]);\n }\n if ($target.attr(\"data-events\") === \"resize\" && mutationRecordsList[0].attributeName === \"data-events\") {\n $target.triggerHandler('resizeme.zf.trigger', [$target]);\n }\n if (mutationRecordsList[0].attributeName === \"style\") {\n $target.closest(\"[data-mutate]\").attr(\"data-events\",\"mutate\");\n $target.closest(\"[data-mutate]\").triggerHandler('mutateme.zf.trigger', [$target.closest(\"[data-mutate]\")]);\n }\n break;\n\n case \"childList\":\n $target.closest(\"[data-mutate]\").attr(\"data-events\",\"mutate\");\n $target.closest(\"[data-mutate]\").triggerHandler('mutateme.zf.trigger', [$target.closest(\"[data-mutate]\")]);\n break;\n\n default:\n return false;\n //nothing\n }\n };\n\n if ($nodes.length) {\n //for each element that needs to listen for resizing, scrolling, or mutation add a single observer\n for (var i = 0; i <= $nodes.length - 1; i++) {\n var elementObserver = new MutationObserver(listeningElementsMutation);\n elementObserver.observe($nodes[i], { attributes: true, childList: true, characterData: false, subtree: true, attributeFilter: [\"data-events\", \"style\"] });\n }\n }\n}\n\nTriggers.Initializers.addSimpleListeners = function() {\n let $document = $(document);\n\n Triggers.Initializers.addOpenListener($document);\n Triggers.Initializers.addCloseListener($document);\n Triggers.Initializers.addToggleListener($document);\n Triggers.Initializers.addCloseableListener($document);\n Triggers.Initializers.addToggleFocusListener($document);\n\n}\n\nTriggers.Initializers.addGlobalListeners = function() {\n let $document = $(document);\n Triggers.Initializers.addMutationEventsListener($document);\n Triggers.Initializers.addResizeListener();\n Triggers.Initializers.addScrollListener();\n Triggers.Initializers.addClosemeListener();\n}\n\n\nTriggers.init = function ($, Foundation) {\n onLoad($(window), function () {\n if ($.triggersInitialized !== true) {\n Triggers.Initializers.addSimpleListeners();\n Triggers.Initializers.addGlobalListeners();\n $.triggersInitialized = true;\n }\n });\n\n if(Foundation) {\n Foundation.Triggers = Triggers;\n // Legacy included to be backwards compatible for now.\n Foundation.IHearYou = Triggers.Initializers.addGlobalListeners\n }\n}\n\nexport {Triggers};\n","module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__;"],"sourceRoot":""}
1
+ {"version":3,"file":"foundation.js","mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACVuB;AAC2B;AACI;;AAEtD;AACA;AACA;AACA;AAHA,IAKMG,KAAK,0BAAAC,OAAA;EAAA,SAAAD,MAAA;IAAAE,eAAA,OAAAF,KAAA;IAAA,OAAAG,UAAA,OAAAH,KAAA,EAAAI,SAAA;EAAA;EAAAC,SAAA,CAAAL,KAAA,EAAAC,OAAA;EAAA,OAAAK,YAAA,CAAAN,KAAA;IAAAO,GAAA;IAAAC,KAAA;IACT;AACF;AACA;AACA;AACA;AACA;AACA;AACA;IACE,SAAAC,MAAMA,CAACC,OAAO,EAAgB;MAAA,IAAdC,OAAO,GAAAP,SAAA,CAAAQ,MAAA,QAAAR,SAAA,QAAAS,SAAA,GAAAT,SAAA,MAAG,CAAC,CAAC;MAC1B,IAAI,CAACU,QAAQ,GAAGJ,OAAO;MACvB,IAAI,CAACC,OAAO,GAAId,oDAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,EAAEG,KAAK,CAACgB,QAAQ,EAAE,IAAI,CAACF,QAAQ,CAACG,IAAI,CAAC,CAAC,EAAEN,OAAO,CAAC;MACjF,IAAI,CAACO,SAAS,GAAG,IAAI;MACrB,IAAI,CAACC,cAAc,GAAG,IAAI;MAE1B,IAAI,CAACC,SAAS,GAAG,OAAO,CAAC,CAAC;MAC1B,IAAI,CAACC,KAAK,CAAC,CAAC;IACd;;IAEA;AACF;AACA;AACA;EAHE;IAAAd,GAAA;IAAAC,KAAA,EAIA,SAAAa,KAAKA,CAAA,EAA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AE,KAAK;EACnB;AACF;AACA;AACA;AACA;AACA;EACED,mBAAmB,EAAE,IAAI;EACzB;AACF;AACA;AACA;AACA;AACA;EACEE,SAAS,EAAE,IAAI;EACf;AACF;AACA;AACA;AACA;AACA;EACE9B,UAAU,EAAE,EAAE;EACd;AACF;AACA;AACA;AACA;AACA;EACEyB,SAAS,EAAE,KAAK;EAChB;AACF;AACA;AACA;AACA;AACA;;EAEEM,WAAW,EAAE,GAAG;EAChB;AACF;AACA;AACA;AACA;AACA;EACEvC,SAAS,EAAE,MAAM;EACjB;AACF;AACA;AACA;AACA;AACA;EACEnD,YAAY,EAAE,IAAI;EAClB;AACF;AACA;AACA;AACA;AACA;EACEsF,kBAAkB,EAAE,IAAI;EACxB;AACF;AACA;AACA;AACA;AACA;EACEX,aAAa,EAAE,UAAU;EACzB;AACF;AACA;AACA;AACA;AACA;EACEC,UAAU,EAAE,aAAa;EACzB;AACF;AACA;AACA;AACA;AACA;EACEtB,WAAW,EAAE;AACf,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC/dsB;AACmC;AACK;AACT;AACJ;;AAElD;AACA;AACA;AACA;AACA;AACA;AALA,IAOMqD,SAAS,0BAAArhB,OAAA;EAAA,SAAAqhB,UAAA;IAAAphB,eAAA,OAAAohB,SAAA;IAAA,OAAAnhB,UAAA,OAAAmhB,SAAA,EAAAlhB,SAAA;EAAA;EAAAC,SAAA,CAAAihB,SAAA,EAAArhB,OAAA;EAAA,OAAAK,YAAA,CAAAghB,SAAA;IAAA/gB,GAAA;IAAAC,KAAA;IACb;AACF;AACA;AACA;AACA;AACA;AACA;AACA;IACE,SAAAC,MAAMA,CAACC,OAAO,EAAEC,OAAO,EAAC;MACtB,IAAI,CAACG,QAAQ,GAAGJ,OAAO;MACvB,IAAI,CAACC,OAAO,GAAId,oDAAQ,CAAC,CAAC,CAAC,EAAEyhB,SAAS,CAACtgB,QAAQ,EAAE,IAAI,CAACF,QAAQ,CAACG,IAAI,CAAC,C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IAAI,CAAC/W,cAAc,EAAEtmB,6CAAC,CAACgM,MAAM,CAAC,CAACvJ,GAAG,CAAC,IAAI,CAAC6jB,cAAc,CAAC;MAE3D,IAAI,IAAI,CAAC0V,UAAU,EAAE;QACnB,IAAI,CAAC/6B,QAAQ,CAAC4b,MAAM,CAAC,CAAC;MACxB,CAAC,MAAM;QACL,IAAI,CAACkf,UAAU,CAACn1B,WAAW,CAAC,IAAI,CAAC9F,OAAO,CAACkqB,cAAc,CAAC,CACxCriB,GAAG,CAAC;UACHkT,MAAM,EAAE;QACV,CAAC,CAAC;MACnB;IACF;EAAC;AAAA,EAhZkB5b,2DAAM;AAmZ3B67B,MAAM,CAAC36B,QAAQ,GAAG;EAChB;AACF;AACA;AACA;AACA;AACA;EACE86B,SAAS,EAAE,mCAAmC;EAC9C;AACF;AACA;AACA;AACA;AACA;EACE2B,OAAO,EAAE,KAAK;EACd;AACF;AACA;AACA;AACA;AACA;EACE7xB,MAAM,EAAE,EAAE;EACV;AACF;AACA;AACA;AACA;AACA;EACEgxB,SAAS,EAAE,EAAE;EACb;AACF;AACA;AACA;AACA;AACA;EACEE,SAAS,EAAE,EAAE;EACb;AACF;AACA;AACA;AACA;AACA;EACE+B,SAAS,EAAE,CAAC;EACZ;AACF;AACA;AACA;AACA;AACA;EACEE,YAAY,EAAE,CAAC;EACf;AACF;AACA;AACA;AACA;AACA;EACEb,QAAQ,EAAE,QAAQ;EAClB;AACF;AACA;AACA;AACA;AACA;EACEnC,WAAW,EAAE,QAAQ;EACrB;AACF;AACA;AACA;AACA;AACA;EACElR,cAAc,EAAE,kBAAkB;EAClC;AACF;AACA;AACA;AACA;AACA;EACE2T,aAAa,EAAE,IAAI;EACnB;AACF;AACA;AACA;AACA;AACA;EACEvC,UAAU,EAAE,CAAC;AACf,CAAC;;AAED;AACA;AACA;AACA;AACA,SAAS2C,MAAMA,CAACI,EAAE,EAAE;EAClB,OAAO51B,QAAQ,CAACyC,MAAM,CAACwyB,gBAAgB,CAAC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EAAY;AA8RlCwkB,OAAO,CAACngC,QAAQ,GAAG;EACjB;AACF;AACA;AACA;AACA;AACA;EACEsd,UAAU,EAAE,GAAG;EACf;AACF;AACA;AACA;AACA;AACA;EACE8jB,cAAc,EAAE,GAAG;EACnB;AACF;AACA;AACA;AACA;AACA;EACEE,eAAe,EAAE,GAAG;EACpB;AACF;AACA;AACA;AACA;AACA;EACEniB,YAAY,EAAE,KAAK;EACnB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACEqiB,eAAe,EAAE,KAAK;EACtB;AACF;AACA;AACA;AACA;AACA;EACET,eAAe,EAAE,EAAE;EACnB;AACF;AACA;AACA;AACA;AACA;EACEC,YAAY,EAAE,SAAS;EACvB;AACF;AACA;AACA;AACA;AACA;EACEP,YAAY,EAAE,SAAS;EACvB;AACF;AACA;AACA;AACA;AACA;EACES,MAAM,EAAE,OAAO;EACf;AACF;AACA;AACA;AACA;AACA;EACEZ,QAAQ,EAAE,EAAE;EACZ;AACF;AACA;AACA;AACA;AACA;EACED,OAAO,EAAE,EAAE;EACXoB,cAAc,EAAE,eAAe;EAC/B;AACF;AACA;AACA;AACA;AACA;EACE1iB,SAAS,EAAE,IAAI;EACf;AACF;AACA;AACA;AACA;AACA;EACEtC,QAAQ,EAAE,MAAM;EAChB;AACF;AACA;AACA;AACA;AACA;EACEK,SAAS,EAAE,MAAM;EACjB;AACF;AACA;AACA;AACA;AACA;AACA;EACEmB,YAAY,EAAE,KAAK;EACnB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEC,kBAAkB,EAAE,KAAK;EACzB;AACF;AACA;AACA;AACA;AACA;EACEH,OAAO,EAAE,CAAC;EACV;AACF;AACA;AACA;AACA;AACA;EACEC,OAAO,EAAE,CAAC;EACV;AACF;AACA;AACA;AACA;AACA;EACE8iB,aAAa,EAAE,EAAE;EACjB;AACF;AACA;AACA;AACA;AACA;EACED,YAAY,EAAE,EAAE;EACd;AACJ;AACA;AACA;AACA;AACA;AACA;EACEL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;AACjCtZ,wDAAU,CAACI,MAAM,CAACshB,uEAAc,EAAE,gBAAgB,CAAC;AACnD1hB,wDAAU,CAACI,MAAM,CAACuhB,2EAAgB,EAAE,kBAAkB,CAAC;AACvD3hB,wDAAU,CAACI,MAAM,CAACiiB,uDAAM,EAAE,QAAQ,CAAC;AACnCriB,wDAAU,CAACI,MAAM,CAACokB,uDAAM,EAAE,QAAQ,CAAC;AACnCxkB,wDAAU,CAACI,MAAM,CAACoT,mEAAY,EAAE,cAAc,CAAC;AAC/CxT,wDAAU,CAACI,MAAM,CAACkqB,uDAAM,EAAE,QAAQ,CAAC;AACnCtqB,wDAAU,CAACI,MAAM,CAACwe,mDAAI,EAAE,MAAM,CAAC;AAC/B5e,wDAAU,CAACI,MAAM,CAACivB,yDAAO,EAAE,SAAS,CAAC;AACrCrvB,wDAAU,CAACI,MAAM,CAAC0vB,yDAAO,EAAE,SAAS,CAAC;AACrC9vB,wDAAU,CAACI,MAAM,CAAC8e,yFAAuB,EAAE,yBAAyB,CAAC;AAkC5C;AAGzB,+DAAelf,wDAAU,E","sources":["webpack://foundation-sites/webpack/universalModuleDefinition","webpack://foundation-sites/./js/foundation.abide.js","webpack://foundation-sites/./js/foundation.accordion.js","webpack://foundation-sites/./js/foundation.accordionMenu.js","webpack://foundation-sites/./js/foundation.core.js","webpack://foundation-sites/./js/foundation.core.plugin.js","webpack://foundation-sites/./js/foundation.core.utils.js","webpack://foundation-sites/./js/foundation.drilldown.js","webpack://foundation-sites/./js/foundation.dropdown.js","webpack://foundation-sites/./js/foundation.dropdownMenu.js","webpack://foundation-sites/./js/foundation.equalizer.js","webpack://foundation-sites/./js/foundation.interchange.js","webpack://foundation-sites/./js/foundation.magellan.js","webpack://foundation-sites/./js/foundation.offcanvas.js","webpack://foundation-sites/./js/foundation.orbit.js","webpack://foundation-sites/./js/foundation.positionable.js","webpack://foundation-sites/./js/foundation.responsiveAccordionTabs.js","webpack://foundation-sites/./js/foundation.responsiveMenu.js","webpack://foundation-sites/./js/foundation.responsiveToggle.js","webpack://foundation-sites/./js/foundation.reveal.js","webpack://foundation-sites/./js/foundation.slider.js","webpack://foundation-sites/./js/foundation.smoothScroll.js","webpack://foundation-sites/./js/foundation.sticky.js","webpack://foundation-sites/./js/foundation.tabs.js","webpack://foundation-sites/./js/foundation.toggler.js","webpack://foundation-sites/./js/foundation.tooltip.js","webpack://foundation-sites/./js/foundation.util.box.js","webpack://foundation-sites/./js/foundation.util.imageLoader.js","webpack://foundation-sites/./js/foundation.util.keyboard.js","webpack://foundation-sites/./js/foundation.util.mediaQuery.js","webpack://foundation-sites/./js/foundation.util.motion.js","webpack://foundation-sites/./js/foundation.util.nest.js","webpack://foundation-sites/./js/foundation.util.timer.js","webpack://foundation-sites/./js/foundation.util.touch.js","webpack://foundation-sites/./js/foundation.util.triggers.js","webpack://foundation-sites/external umd {\"root\":[\"jQuery\"],\"amd\":\"jquery\",\"commonjs\":\"jquery\",\"commonjs2\":\"jquery\"}","webpack://foundation-sites/webpack/bootstrap","webpack://foundation-sites/webpack/runtime/compat get default export","webpack://foundation-sites/webpack/runtime/define property getters","webpack://foundation-sites/webpack/runtime/hasOwnProperty shorthand","webpack://foundation-sites/webpack/runtime/make namespace object","webpack://foundation-sites/./js/entries/foundation.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"jquery\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"jquery\"], factory);\n\telse {\n\t\tvar a = typeof exports === 'object' ? factory(require(\"jquery\")) : factory(root[\"jQuery\"]);\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(self, function(__WEBPACK_EXTERNAL_MODULE_jquery__) {\nreturn ","import $ from 'jquery';\nimport { Plugin } from './foundation.core.plugin';\nimport { GetYoDigits } from './foundation.core.utils';\n\n/**\n * Abide module.\n * @module foundation.abide\n */\n\nclass Abide extends Plugin {\n /**\n * Creates a new instance of Abide.\n * @class\n * @name Abide\n * @fires Abide#init\n * @param {Object} element - jQuery object to add the trigger to.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element, options = {}) {\n this.$element = element;\n this.options = $.extend(true, {}, Abide.defaults, this.$element.data(), options);\n this.isEnabled = true;\n this.formnovalidate = null;\n\n this.className = 'Abide'; // ie9 back compat\n this._init();\n }\n\n /**\n * Initializes the Abide plugin and calls functions to get Abide functioning on load.\n * @private\n */\n _init() {\n this.$inputs = $.merge( // Consider as input to validate:\n this.$element.find('input').not('[type=\"submit\"]'), // * all input fields expect submit\n this.$element.find('textarea, select') // * all textareas and select fields\n );\n this.$submits = this.$element.find('[type=\"submit\"]');\n const $globalErrors = this.$element.find('[data-abide-error]');\n\n // Add a11y attributes to all fields\n if (this.options.a11yAttributes) {\n this.$inputs.each((i, input) => this.addA11yAttributes($(input)));\n $globalErrors.each((i, error) => this.addGlobalErrorA11yAttributes($(error)));\n }\n\n this._events();\n }\n\n /**\n * Initializes events for Abide.\n * @private\n */\n _events() {\n this.$element.off('.abide')\n .on('reset.zf.abide', () => {\n this.resetForm();\n })\n .on('submit.zf.abide', () => {\n return this.validateForm();\n });\n\n this.$submits\n .off('click.zf.abide keydown.zf.abide')\n .on('click.zf.abide keydown.zf.abide', (e) => {\n if (!e.key || (e.key === ' ' || e.key === 'Enter')) {\n e.preventDefault();\n this.formnovalidate = e.target.getAttribute('formnovalidate') !== null;\n this.$element.submit();\n }\n });\n\n if (this.options.validateOn === 'fieldChange') {\n this.$inputs\n .off('change.zf.abide')\n .on('change.zf.abide', (e) => {\n this.validateInput($(e.target));\n });\n }\n\n if (this.options.liveValidate) {\n this.$inputs\n .off('input.zf.abide')\n .on('input.zf.abide', (e) => {\n this.validateInput($(e.target));\n });\n }\n\n if (this.options.validateOnBlur) {\n this.$inputs\n .off('blur.zf.abide')\n .on('blur.zf.abide', (e) => {\n this.validateInput($(e.target));\n });\n }\n }\n\n /**\n * Calls necessary functions to update Abide upon DOM change\n * @private\n */\n _reflow() {\n this._init();\n }\n\n /**\n * Checks whether the submitted form should be validated or not, consodering formnovalidate and isEnabled\n * @returns {Boolean}\n * @private\n */\n _validationIsDisabled() {\n if (this.isEnabled === false) { // whole validation disabled\n return true;\n } else if (typeof this.formnovalidate === 'boolean') { // triggered by $submit\n return this.formnovalidate;\n }\n // triggered by Enter in non-submit input\n return this.$submits.length ? this.$submits[0].getAttribute('formnovalidate') !== null : false;\n }\n\n /**\n * Enables the whole validation\n */\n enableValidation() {\n this.isEnabled = true;\n }\n\n /**\n * Disables the whole validation\n */\n disableValidation() {\n this.isEnabled = false;\n }\n\n /**\n * Checks whether or not a form element has the required attribute and if it's checked or not\n * @param {Object} element - jQuery object to check for required attribute\n * @returns {Boolean} Boolean value depends on whether or not attribute is checked or empty\n */\n requiredCheck($el) {\n if (!$el.attr('required')) return true;\n\n var isGood = true;\n\n switch ($el[0].type) {\n case 'checkbox':\n isGood = $el[0].checked;\n break;\n\n case 'select':\n case 'select-one':\n case 'select-multiple':\n var opt = $el.find('option:selected');\n if (!opt.length || !opt.val()) isGood = false;\n break;\n\n default:\n if (!$el.val() || !$el.val().length) isGood = false;\n }\n\n return isGood;\n }\n\n /**\n * Get:\n * - Based on $el, the first element(s) corresponding to `formErrorSelector` in this order:\n * 1. The element's direct sibling('s).\n * 2. The element's parent's children.\n * - Element(s) with the attribute `[data-form-error-for]` set with the element's id.\n *\n * This allows for multiple form errors per input, though if none are found, no form errors will be shown.\n *\n * @param {Object} $el - jQuery object to use as reference to find the form error selector.\n * @param {String[]} [failedValidators] - List of failed validators.\n * @returns {Object} jQuery object with the selector.\n */\n findFormError($el, failedValidators) {\n var id = $el.length ? $el[0].id : '';\n var $error = $el.siblings(this.options.formErrorSelector);\n\n if (!$error.length) {\n $error = $el.parent().find(this.options.formErrorSelector);\n }\n\n if (id) {\n $error = $error.add(this.$element.find(`[data-form-error-for=\"${id}\"]`));\n }\n\n if (!!failedValidators) {\n $error = $error.not('[data-form-error-on]')\n\n failedValidators.forEach((v) => {\n $error = $error.add($el.siblings(`[data-form-error-on=\"${v}\"]`));\n $error = $error.add(this.$element.find(`[data-form-error-for=\"${id}\"][data-form-error-on=\"${v}\"]`));\n });\n }\n\n return $error;\n }\n\n /**\n * Get the first element in this order:\n * 2. The <label> with the attribute `[for=\"someInputId\"]`\n * 3. The `.closest()` <label>\n *\n * @param {Object} $el - jQuery object to check for required attribute\n * @returns {Boolean} Boolean value depends on whether or not attribute is checked or empty\n */\n findLabel($el) {\n var id = $el[0].id;\n var $label = this.$element.find(`label[for=\"${id}\"]`);\n\n if (!$label.length) {\n return $el.closest('label');\n }\n\n return $label;\n }\n\n /**\n * Get the set of labels associated with a set of radio els in this order\n * 2. The <label> with the attribute `[for=\"someInputId\"]`\n * 3. The `.closest()` <label>\n *\n * @param {Object} $el - jQuery object to check for required attribute\n * @returns {Boolean} Boolean value depends on whether or not attribute is checked or empty\n */\n findRadioLabels($els) {\n var labels = $els.map((i, el) => {\n var id = el.id;\n var $label = this.$element.find(`label[for=\"${id}\"]`);\n\n if (!$label.length) {\n $label = $(el).closest('label');\n }\n return $label[0];\n });\n\n return $(labels);\n }\n\n /**\n * Get the set of labels associated with a set of checkbox els in this order\n * 2. The <label> with the attribute `[for=\"someInputId\"]`\n * 3. The `.closest()` <label>\n *\n * @param {Object} $el - jQuery object to check for required attribute\n * @returns {Boolean} Boolean value depends on whether or not attribute is checked or empty\n */\n findCheckboxLabels($els) {\n var labels = $els.map((i, el) => {\n var id = el.id;\n var $label = this.$element.find(`label[for=\"${id}\"]`);\n\n if (!$label.length) {\n $label = $(el).closest('label');\n }\n return $label[0];\n });\n\n return $(labels);\n }\n\n /**\n * Adds the CSS error class as specified by the Abide settings to the label, input, and the form\n * @param {Object} $el - jQuery object to add the class to\n * @param {String[]} [failedValidators] - List of failed validators.\n */\n addErrorClasses($el, failedValidators) {\n var $label = this.findLabel($el);\n var $formError = this.findFormError($el, failedValidators);\n\n if ($label.length) {\n $label.addClass(this.options.labelErrorClass);\n }\n\n if ($formError.length) {\n $formError.addClass(this.options.formErrorClass);\n }\n\n $el.addClass(this.options.inputErrorClass).attr({\n 'data-invalid': '',\n 'aria-invalid': true\n });\n\n if ($formError.filter(':visible').length) {\n this.addA11yErrorDescribe($el, $formError);\n }\n }\n\n /**\n * Adds [for] and [role=alert] attributes to all form error targetting $el,\n * and [aria-describedby] attribute to $el toward the first form error.\n * @param {Object} $el - jQuery object\n */\n addA11yAttributes($el) {\n let $errors = this.findFormError($el);\n let $labels = $errors.filter('label');\n if (!$errors.length) return;\n\n let $error = $errors.filter(':visible').first();\n if ($error.length) {\n this.addA11yErrorDescribe($el, $error);\n }\n\n if ($labels.filter('[for]').length < $labels.length) {\n // Get the input ID or create one\n let elemId = $el.attr('id');\n if (typeof elemId === 'undefined') {\n elemId = GetYoDigits(6, 'abide-input');\n $el.attr('id', elemId);\n }\n\n // For each label targeting $el, set [for] if it is not set.\n $labels.each((i, label) => {\n const $label = $(label);\n if (typeof $label.attr('for') === 'undefined')\n $label.attr('for', elemId);\n });\n }\n\n // For each error targeting $el, set [role=alert] if it is not set.\n $errors.each((i, label) => {\n const $label = $(label);\n if (typeof $label.attr('role') === 'undefined')\n $label.attr('role', 'alert');\n }).end();\n }\n\n addA11yErrorDescribe($el, $error) {\n if ($el.attr('type') === 'hidden') return;\n if (typeof $el.attr('aria-describedby') !== 'undefined') return;\n\n // Set [aria-describedby] on the input toward the first form error if it is not set\n // Get the first error ID or create one\n let errorId = $error.attr('id');\n if (typeof errorId === 'undefined') {\n errorId = GetYoDigits(6, 'abide-error');\n $error.attr('id', errorId);\n }\n\n $el.attr('aria-describedby', errorId).data('abide-describedby', true);\n }\n\n /**\n * Adds [aria-live] attribute to the given global form error $el.\n * @param {Object} $el - jQuery object to add the attribute to\n */\n addGlobalErrorA11yAttributes($el) {\n if (typeof $el.attr('aria-live') === 'undefined')\n $el.attr('aria-live', this.options.a11yErrorLevel);\n }\n\n /**\n * Remove CSS error classes etc from an entire radio button group\n * @param {String} groupName - A string that specifies the name of a radio button group\n *\n */\n removeRadioErrorClasses(groupName) {\n var $els = this.$element.find(`:radio[name=\"${groupName}\"]`);\n var $labels = this.findRadioLabels($els);\n var $formErrors = this.findFormError($els);\n\n if ($labels.length) {\n $labels.removeClass(this.options.labelErrorClass);\n }\n\n if ($formErrors.length) {\n $formErrors.removeClass(this.options.formErrorClass);\n }\n\n $els.removeClass(this.options.inputErrorClass).attr({\n 'data-invalid': null,\n 'aria-invalid': null\n });\n\n }\n\n /**\n * Remove CSS error classes etc from an entire checkbox group\n * @param {String} groupName - A string that specifies the name of a checkbox group\n *\n */\n removeCheckboxErrorClasses(groupName) {\n var $els = this.$element.find(`:checkbox[name=\"${groupName}\"]`);\n var $labels = this.findCheckboxLabels($els);\n var $formErrors = this.findFormError($els);\n\n if ($labels.length) {\n $labels.removeClass(this.options.labelErrorClass);\n }\n\n if ($formErrors.length) {\n $formErrors.removeClass(this.options.formErrorClass);\n }\n\n $els.removeClass(this.options.inputErrorClass).attr({\n 'data-invalid': null,\n 'aria-invalid': null\n });\n\n }\n\n /**\n * Removes CSS error class as specified by the Abide settings from the label, input, and the form\n * @param {Object} $el - jQuery object to remove the class from\n */\n removeErrorClasses($el) {\n // radios need to clear all of the els\n if ($el[0].type === 'radio') {\n return this.removeRadioErrorClasses($el.attr('name'));\n }\n // checkboxes need to clear all of the els\n else if ($el[0].type === 'checkbox') {\n return this.removeCheckboxErrorClasses($el.attr('name'));\n }\n\n var $label = this.findLabel($el);\n var $formError = this.findFormError($el);\n\n if ($label.length) {\n $label.removeClass(this.options.labelErrorClass);\n }\n\n if ($formError.length) {\n $formError.removeClass(this.options.formErrorClass);\n }\n\n $el.removeClass(this.options.inputErrorClass).attr({\n 'data-invalid': null,\n 'aria-invalid': null\n });\n\n if ($el.data('abide-describedby')) {\n $el.removeAttr('aria-describedby').removeData('abide-describedby');\n }\n }\n\n /**\n * Goes through a form to find inputs and proceeds to validate them in ways specific to their type.\n * Ignores inputs with data-abide-ignore, type=\"hidden\" or disabled attributes set\n * @fires Abide#invalid\n * @fires Abide#valid\n * @param {Object} element - jQuery object to validate, should be an HTML input\n * @returns {Boolean} goodToGo - If the input is valid or not.\n */\n validateInput($el) {\n var clearRequire = this.requiredCheck($el),\n validator = $el.attr('data-validator'),\n failedValidators = [],\n manageErrorClasses = true;\n\n // skip validation if disabled\n if (this._validationIsDisabled()) {\n return true;\n }\n\n // don't validate ignored inputs or hidden inputs or disabled inputs\n if ($el.is('[data-abide-ignore]') || $el.is('[type=\"hidden\"]') || $el.is('[disabled]')) {\n return true;\n }\n\n switch ($el[0].type) {\n case 'radio':\n this.validateRadio($el.attr('name')) || failedValidators.push('required');\n break;\n\n case 'checkbox':\n this.validateCheckbox($el.attr('name')) || failedValidators.push('required');\n // validateCheckbox() adds/removes error classes\n manageErrorClasses = false;\n break;\n\n case 'select':\n case 'select-one':\n case 'select-multiple':\n clearRequire || failedValidators.push('required');\n break;\n\n default:\n clearRequire || failedValidators.push('required');\n this.validateText($el) || failedValidators.push('pattern');\n }\n\n if (validator) {\n const required = $el.attr('required') ? true : false;\n\n validator.split(' ').forEach((v) => {\n this.options.validators[v]($el, required, $el.parent()) || failedValidators.push(v);\n });\n }\n\n if ($el.attr('data-equalto')) {\n this.options.validators.equalTo($el) || failedValidators.push('equalTo');\n }\n\n var goodToGo = failedValidators.length === 0;\n var message = (goodToGo ? 'valid' : 'invalid') + '.zf.abide';\n\n if (goodToGo) {\n // Re-validate inputs that depend on this one with equalto\n const dependentElements = this.$element.find(`[data-equalto=\"${$el.attr('id')}\"]`);\n if (dependentElements.length) {\n let _this = this;\n dependentElements.each(function() {\n if ($(this).val()) {\n _this.validateInput($(this));\n }\n });\n }\n }\n\n if (manageErrorClasses) {\n this.removeErrorClasses($el);\n if (!goodToGo) {\n this.addErrorClasses($el, failedValidators);\n }\n }\n\n /**\n * Fires when the input is done checking for validation. Event trigger is either `valid.zf.abide` or `invalid.zf.abide`\n * Trigger includes the DOM element of the input.\n * @event Abide#valid\n * @event Abide#invalid\n */\n $el.trigger(message, [$el]);\n\n return goodToGo;\n }\n\n /**\n * Goes through a form and if there are any invalid inputs, it will display the form error element\n * @returns {Boolean} noError - true if no errors were detected...\n * @fires Abide#formvalid\n * @fires Abide#forminvalid\n */\n validateForm() {\n var acc = [];\n var _this = this;\n var checkboxGroupName;\n\n // Remember first form submission to prevent specific checkbox validation (more than one required) until form got initially submitted\n if (!this.initialized) {\n this.initialized = true;\n }\n\n // skip validation if disabled\n if (this._validationIsDisabled()) {\n this.formnovalidate = null;\n return true;\n }\n\n this.$inputs.each(function() {\n\n // Only use one checkbox per group since validateCheckbox() iterates over all associated checkboxes\n if ($(this)[0].type === 'checkbox') {\n if ($(this).attr('name') === checkboxGroupName) return true;\n checkboxGroupName = $(this).attr('name');\n }\n\n acc.push(_this.validateInput($(this)));\n });\n\n var noError = acc.indexOf(false) === -1;\n\n this.$element.find('[data-abide-error]').each((i, elem) => {\n const $elem = $(elem);\n // Ensure a11y attributes are set\n if (this.options.a11yAttributes) this.addGlobalErrorA11yAttributes($elem);\n // Show or hide the error\n $elem.css('display', (noError ? 'none' : 'block'));\n });\n\n /**\n * Fires when the form is finished validating. Event trigger is either `formvalid.zf.abide` or `forminvalid.zf.abide`.\n * Trigger includes the element of the form.\n * @event Abide#formvalid\n * @event Abide#forminvalid\n */\n this.$element.trigger((noError ? 'formvalid' : 'forminvalid') + '.zf.abide', [this.$element]);\n\n return noError;\n }\n\n /**\n * Determines whether or a not a text input is valid based on the pattern specified in the attribute. If no matching pattern is found, returns true.\n * @param {Object} $el - jQuery object to validate, should be a text input HTML element\n * @param {String} pattern - string value of one of the RegEx patterns in Abide.options.patterns\n * @returns {Boolean} Boolean value depends on whether or not the input value matches the pattern specified\n */\n validateText($el, pattern) {\n // A pattern can be passed to this function, or it will be infered from the input's \"pattern\" attribute, or it's \"type\" attribute\n pattern = (pattern || $el.attr('data-pattern') || $el.attr('pattern') || $el.attr('type'));\n var inputText = $el.val();\n var valid = true;\n\n if (inputText.length) {\n // If the pattern attribute on the element is in Abide's list of patterns, then test that regexp\n if (this.options.patterns.hasOwnProperty(pattern)) {\n valid = this.options.patterns[pattern].test(inputText);\n }\n // If the pattern name isn't also the type attribute of the field, then test it as a regexp\n else if (pattern !== $el.attr('type')) {\n valid = new RegExp(pattern).test(inputText);\n }\n }\n\n return valid;\n }\n\n /**\n * Determines whether or a not a radio input is valid based on whether or not it is required and selected. Although the function targets a single `<input>`, it validates by checking the `required` and `checked` properties of all radio buttons in its group.\n * @param {String} groupName - A string that specifies the name of a radio button group\n * @returns {Boolean} Boolean value depends on whether or not at least one radio input has been selected (if it's required)\n */\n validateRadio(groupName) {\n // If at least one radio in the group has the `required` attribute, the group is considered required\n // Per W3C spec, all radio buttons in a group should have `required`, but we're being nice\n var $group = this.$element.find(`:radio[name=\"${groupName}\"]`);\n var valid = false, required = false;\n\n // For the group to be required, at least one radio needs to be required\n $group.each((i, e) => {\n if ($(e).attr('required')) {\n required = true;\n }\n });\n if (!required) valid=true;\n\n if (!valid) {\n // For the group to be valid, at least one radio needs to be checked\n $group.each((i, e) => {\n if ($(e).prop('checked')) {\n valid = true;\n }\n });\n }\n\n return valid;\n }\n\n /**\n * Determines whether or a not a checkbox input is valid based on whether or not it is required and checked. Although the function targets a single `<input>`, it validates by checking the `required` and `checked` properties of all checkboxes in its group.\n * @param {String} groupName - A string that specifies the name of a checkbox group\n * @returns {Boolean} Boolean value depends on whether or not at least one checkbox input has been checked (if it's required)\n */\n validateCheckbox(groupName) {\n // If at least one checkbox in the group has the `required` attribute, the group is considered required\n // Per W3C spec, all checkboxes in a group should have `required`, but we're being nice\n var $group = this.$element.find(`:checkbox[name=\"${groupName}\"]`);\n var valid = false, required = false, minRequired = 1, checked = 0;\n\n // For the group to be required, at least one checkbox needs to be required\n $group.each((i, e) => {\n if ($(e).attr('required')) {\n required = true;\n }\n });\n if (!required) valid=true;\n\n if (!valid) {\n // Count checked checkboxes within the group\n // Use data-min-required if available (default: 1)\n $group.each((i, e) => {\n if ($(e).prop('checked')) {\n checked++;\n }\n if (typeof $(e).attr('data-min-required') !== 'undefined') {\n minRequired = parseInt($(e).attr('data-min-required'), 10);\n }\n });\n\n // For the group to be valid, the minRequired amount of checkboxes have to be checked\n if (checked >= minRequired) {\n valid = true;\n }\n }\n\n // Skip validation if more than 1 checkbox have to be checked AND if the form hasn't got submitted yet (otherwise it will already show an error during the first fill in)\n if (this.initialized !== true && minRequired > 1) {\n return true;\n }\n\n // Refresh error class for all input\n $group.each((i, e) => {\n if (!valid) {\n this.addErrorClasses($(e), ['required']);\n } else {\n this.removeErrorClasses($(e));\n }\n });\n\n return valid;\n }\n\n /**\n * Determines if a selected input passes a custom validation function. Multiple validations can be used, if passed to the element with `data-validator=\"foo bar baz\"` in a space separated listed.\n * @param {Object} $el - jQuery input element.\n * @param {String} validators - a string of function names matching functions in the Abide.options.validators object.\n * @param {Boolean} required - self explanatory?\n * @returns {Boolean} - true if validations passed.\n */\n matchValidation($el, validators, required) {\n required = required ? true : false;\n\n var clear = validators.split(' ').map((v) => {\n return this.options.validators[v]($el, required, $el.parent());\n });\n return clear.indexOf(false) === -1;\n }\n\n /**\n * Resets form inputs and styles\n * @fires Abide#formreset\n */\n resetForm() {\n var $form = this.$element,\n opts = this.options;\n\n $(`.${opts.labelErrorClass}`, $form).not('small').removeClass(opts.labelErrorClass);\n $(`.${opts.inputErrorClass}`, $form).not('small').removeClass(opts.inputErrorClass);\n $(`${opts.formErrorSelector}.${opts.formErrorClass}`).removeClass(opts.formErrorClass);\n $form.find('[data-abide-error]').css('display', 'none');\n $(':input', $form).not(':button, :submit, :reset, :hidden, :radio, :checkbox, [data-abide-ignore]').val('').attr({\n 'data-invalid': null,\n 'aria-invalid': null\n });\n $(':input:radio', $form).not('[data-abide-ignore]').prop('checked',false).attr({\n 'data-invalid': null,\n 'aria-invalid': null\n });\n $(':input:checkbox', $form).not('[data-abide-ignore]').prop('checked',false).attr({\n 'data-invalid': null,\n 'aria-invalid': null\n });\n /**\n * Fires when the form has been reset.\n * @event Abide#formreset\n */\n $form.trigger('formreset.zf.abide', [$form]);\n }\n\n /**\n * Destroys an instance of Abide.\n * Removes error styles and classes from elements, without resetting their values.\n */\n _destroy() {\n var _this = this;\n this.$element\n .off('.abide')\n .find('[data-abide-error]')\n .css('display', 'none');\n\n this.$inputs\n .off('.abide')\n .each(function() {\n _this.removeErrorClasses($(this));\n });\n\n this.$submits\n .off('.abide');\n }\n}\n\n/**\n * Default settings for plugin\n */\nAbide.defaults = {\n /**\n * The default event to validate inputs. Checkboxes and radios validate immediately.\n * Remove or change this value for manual validation.\n * @option\n * @type {?string}\n * @default 'fieldChange'\n */\n validateOn: 'fieldChange',\n\n /**\n * Class to be applied to input labels on failed validation.\n * @option\n * @type {string}\n * @default 'is-invalid-label'\n */\n labelErrorClass: 'is-invalid-label',\n\n /**\n * Class to be applied to inputs on failed validation.\n * @option\n * @type {string}\n * @default 'is-invalid-input'\n */\n inputErrorClass: 'is-invalid-input',\n\n /**\n * Class selector to use to target Form Errors for show/hide.\n * @option\n * @type {string}\n * @default '.form-error'\n */\n formErrorSelector: '.form-error',\n\n /**\n * Class added to Form Errors on failed validation.\n * @option\n * @type {string}\n * @default 'is-visible'\n */\n formErrorClass: 'is-visible',\n\n /**\n * If true, automatically insert when possible:\n * - `[aria-describedby]` on fields\n * - `[role=alert]` on form errors and `[for]` on form error labels\n * - `[aria-live]` on global errors `[data-abide-error]` (see option `a11yErrorLevel`).\n * @option\n * @type {boolean}\n * @default true\n */\n a11yAttributes: true,\n\n /**\n * [aria-live] attribute value to be applied on global errors `[data-abide-error]`.\n * Options are: 'assertive', 'polite' and 'off'/null\n * @option\n * @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions\n * @type {string}\n * @default 'assertive'\n */\n a11yErrorLevel: 'assertive',\n\n /**\n * Set to true to validate text inputs on any value change.\n * @option\n * @type {boolean}\n * @default false\n */\n liveValidate: false,\n\n /**\n * Set to true to validate inputs on blur.\n * @option\n * @type {boolean}\n * @default false\n */\n validateOnBlur: false,\n\n patterns: {\n alpha : /^[a-zA-Z]+$/,\n // eslint-disable-next-line camelcase\n alpha_numeric : /^[a-zA-Z0-9]+$/,\n integer : /^[-+]?\\d+$/,\n number : /^[-+]?\\d*(?:[\\.\\,]\\d+)?$/,\n\n // amex, visa, diners\n card : /^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|(?:222[1-9]|2[3-6][0-9]{2}|27[0-1][0-9]|2720)[0-9]{12}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\d{3})\\d{11})$/,\n cvv : /^([0-9]){3,4}$/,\n\n // http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#valid-e-mail-address\n email : /^[a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+$/,\n\n // From CommonRegexJS (@talyssonoc)\n // https://github.com/talyssonoc/CommonRegexJS/blob/e2901b9f57222bc14069dc8f0598d5f412555411/lib/commonregex.js#L76\n // For more restrictive URL Regexs, see https://mathiasbynens.be/demo/url-regex.\n url: /^((?:(https?|ftps?|file|ssh|sftp):\\/\\/|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}\\/)(?:[^\\s()<>]+|\\((?:[^\\s()<>]+|(?:\\([^\\s()<>]+\\)))*\\))+(?:\\((?:[^\\s()<>]+|(?:\\([^\\s()<>]+\\)))*\\)|[^\\s`!()\\[\\]{};:\\'\".,<>?\\xab\\xbb\\u201c\\u201d\\u2018\\u2019]))$/,\n\n // abc.de\n domain : /^([a-zA-Z0-9]([a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,8}$/,\n\n datetime : /^([0-2][0-9]{3})\\-([0-1][0-9])\\-([0-3][0-9])T([0-5][0-9])\\:([0-5][0-9])\\:([0-5][0-9])(Z|([\\-\\+]([0-1][0-9])\\:00))$/,\n // YYYY-MM-DD\n date : /(?:19|20)[0-9]{2}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31))$/,\n // HH:MM:SS\n time : /^(0[0-9]|1[0-9]|2[0-3])(:[0-5][0-9]){2}$/,\n dateISO : /^\\d{4}[\\/\\-]\\d{1,2}[\\/\\-]\\d{1,2}$/,\n // MM/DD/YYYY\n // eslint-disable-next-line camelcase\n month_day_year : /^(0[1-9]|1[012])[- \\/.](0[1-9]|[12][0-9]|3[01])[- \\/.]\\d{4}$/,\n // DD/MM/YYYY\n // eslint-disable-next-line camelcase\n day_month_year : /^(0[1-9]|[12][0-9]|3[01])[- \\/.](0[1-9]|1[012])[- \\/.]\\d{4}$/,\n\n // #FFF or #FFFFFF\n color : /^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/,\n\n // Domain || URL\n website: {\n test: (text) => {\n return Abide.defaults.patterns.domain.test(text) || Abide.defaults.patterns.url.test(text);\n }\n }\n },\n\n /**\n * Optional validation functions to be used. `equalTo` being the only default included function.\n * Functions should return only a boolean if the input is valid or not. Functions are given the following arguments:\n * el : The jQuery element to validate.\n * @option\n */\n validators: {\n equalTo: function (el) {\n return $(`#${el.attr('data-equalto')}`).val() === el.val();\n }\n }\n}\n\nexport { Abide };\n","import $ from 'jquery';\nimport { Plugin } from './foundation.core.plugin';\nimport { onLoad, GetYoDigits } from './foundation.core.utils';\nimport { Keyboard } from './foundation.util.keyboard';\n\n/**\n * Accordion module.\n * @module foundation.accordion\n * @requires foundation.util.keyboard\n */\n\nclass Accordion extends Plugin {\n /**\n * Creates a new instance of an accordion.\n * @class\n * @name Accordion\n * @fires Accordion#init\n * @param {jQuery} element - jQuery object to make into an accordion.\n * @param {Object} options - a plain object with settings to override the default options.\n */\n _setup(element, options) {\n this.$element = element;\n this.options = $.extend({}, Accordion.defaults, this.$element.data(), options);\n\n this.className = 'Accordion'; // ie9 back compat\n this._init();\n\n Keyboard.register('Accordion', {\n 'ENTER': 'toggle',\n 'SPACE': 'toggle',\n 'ARROW_DOWN': 'next',\n 'ARROW_UP': 'previous',\n 'HOME': 'first',\n 'END': 'last',\n });\n }\n\n /**\n * Initializes the accordion by animating the preset active pane(s).\n * @private\n */\n _init() {\n this._isInitializing = true;\n\n this.$tabs = this.$element.children('[data-accordion-item]');\n\n\n this.$tabs.each(function(idx, el) {\n var $el = $(el),\n $content = $el.children('[data-tab-content]'),\n id = $content[0].id || GetYoDigits(6, 'accordion'),\n linkId = (el.id) ? `${el.id}-label` : `${id}-label`;\n\n $el.find('a:first').attr({\n 'aria-controls': id,\n 'id': linkId,\n 'aria-expanded': false\n });\n\n $content.attr({'role': 'region', 'aria-labelledby': linkId, 'aria-hidden': true, 'id': id});\n });\n\n var $initActive = this.$element.find('.is-active').children('[data-tab-content]');\n if ($initActive.length) {\n // Save up the initial hash to return to it later when going back in history\n this._initialAnchor = $initActive.prev('a').attr('href');\n this._openSingleTab($initActive);\n }\n\n this._checkDeepLink = () => {\n var anchor = window.location.hash;\n\n if (!anchor.length) {\n // If we are still initializing and there is no anchor, then there is nothing to do\n if (this._isInitializing) return;\n // Otherwise, move to the initial anchor\n if (this._initialAnchor) anchor = this._initialAnchor;\n }\n\n var $anchor = anchor && $(anchor);\n var $link = anchor && this.$element.find(`[href$=\"${anchor}\"]`);\n // Whether the anchor element that has been found is part of this element\n var isOwnAnchor = !!($anchor.length && $link.length);\n\n if (isOwnAnchor) {\n // If there is an anchor for the hash, open it (if not already active)\n if ($anchor && $link && $link.length) {\n if (!$link.parent('[data-accordion-item]').hasClass('is-active')) {\n this._openSingleTab($anchor);\n }\n }\n // Otherwise, close everything\n else {\n this._closeAllTabs();\n }\n\n // Roll up a little to show the titles\n if (this.options.deepLinkSmudge) {\n onLoad($(window), () => {\n var offset = this.$element.offset();\n $('html, body').animate({ scrollTop: offset.top - this.options.deepLinkSmudgeOffset }, this.options.deepLinkSmudgeDelay);\n });\n }\n\n /**\n * Fires when the plugin has deeplinked at pageload\n * @event Accordion#deeplink\n */\n this.$element.trigger('deeplink.zf.accordion', [$link, $anchor]);\n }\n }\n\n //use browser to open a tab, if it exists in this tabset\n if (this.options.deepLink) {\n this._checkDeepLink();\n }\n\n this._events();\n\n this._isInitializing = false;\n }\n\n /**\n * Adds event handlers for items within the accordion.\n * @private\n */\n _events() {\n var _this = this;\n\n this.$tabs.each(function() {\n var $elem = $(this);\n var $tabContent = $elem.children('[data-tab-content]');\n if ($tabContent.length) {\n $elem.children('a').off('click.zf.accordion keydown.zf.accordion')\n .on('click.zf.accordion', function(e) {\n e.preventDefault();\n _this.toggle($tabContent);\n }).on('keydown.zf.accordion', function(e) {\n Keyboard.handleKey(e, 'Accordion', {\n toggle: function() {\n _this.toggle($tabContent);\n },\n next: function() {\n var $a = $elem.next().find('a').focus();\n if (!_this.options.multiExpand) {\n $a.trigger('click.zf.accordion')\n }\n },\n previous: function() {\n var $a = $elem.prev().find('a').focus();\n if (!_this.options.multiExpand) {\n $a.trigger('click.zf.accordion')\n }\n },\n first: function() {\n var $a = _this.$tabs.first().find('.accordion-title').focus();\n if (!_this.options.multiExpand) {\n $a.trigger('click.zf.accordion');\n }\n },\n last: function() {\n var $a = _this.$tabs.last().find('.accordion-title').focus();\n if (!_this.options.multiExpand) {\n $a.trigger('click.zf.accordion');\n }\n },\n handled: function() {\n e.preventDefault();\n }\n });\n });\n }\n });\n if (this.options.deepLink) {\n $(window).on('hashchange', this._checkDeepLink);\n }\n }\n\n /**\n * Toggles the selected content pane's open/close state.\n * @param {jQuery} $target - jQuery object of the pane to toggle (`.accordion-content`).\n * @function\n */\n toggle($target) {\n if ($target.closest('[data-accordion]').is('[disabled]')) {\n console.info('Cannot toggle an accordion that is disabled.');\n return;\n }\n if ($target.parent().hasClass('is-active')) {\n this.up($target);\n } else {\n this.down($target);\n }\n //either replace or update browser history\n if (this.options.deepLink) {\n var anchor = $target.prev('a').attr('href');\n\n if (this.options.updateHistory) {\n history.pushState({}, '', anchor);\n } else {\n history.replaceState({}, '', anchor);\n }\n }\n }\n\n /**\n * Opens the accordion tab defined by `$target`.\n * @param {jQuery} $target - Accordion pane to open (`.accordion-content`).\n * @fires Accordion#down\n * @function\n */\n down($target) {\n if ($target.closest('[data-accordion]').is('[disabled]')) {\n console.info('Cannot call down on an accordion that is disabled.');\n return;\n }\n\n if (this.options.multiExpand)\n this._openTab($target);\n else\n this._openSingleTab($target);\n }\n\n /**\n * Closes the tab defined by `$target`.\n * It may be ignored if the Accordion options don't allow it.\n *\n * @param {jQuery} $target - Accordion tab to close (`.accordion-content`).\n * @fires Accordion#up\n * @function\n */\n up($target) {\n if (this.$element.is('[disabled]')) {\n console.info('Cannot call up on an accordion that is disabled.');\n return;\n }\n\n // Don't close the item if it is already closed\n const $targetItem = $target.parent();\n if (!$targetItem.hasClass('is-active')) return;\n\n // Don't close the item if there is no other active item (unless with `allowAllClosed`)\n const $othersItems = $targetItem.siblings();\n if (!this.options.allowAllClosed && !$othersItems.hasClass('is-active')) return;\n\n this._closeTab($target);\n }\n\n /**\n * Make the tab defined by `$target` the only opened tab, closing all others tabs.\n * @param {jQuery} $target - Accordion tab to open (`.accordion-content`).\n * @function\n * @private\n */\n _openSingleTab($target) {\n // Close all the others active tabs.\n const $activeContents = this.$element.children('.is-active').children('[data-tab-content]');\n if ($activeContents.length) {\n this._closeTab($activeContents.not($target));\n }\n\n // Then open the target.\n this._openTab($target);\n }\n\n /**\n * Opens the tab defined by `$target`.\n * @param {jQuery} $target - Accordion tab to open (`.accordion-content`).\n * @fires Accordion#down\n * @function\n * @private\n */\n _openTab($target) {\n const $targetItem = $target.parent();\n const targetContentId = $target.attr('aria-labelledby');\n\n $target.attr('aria-hidden', false);\n $targetItem.addClass('is-active');\n\n $(`#${targetContentId}`).attr({\n 'aria-expanded': true\n });\n\n $target.finish().slideDown(this.options.slideSpeed, () => {\n /**\n * Fires when the tab is done opening.\n * @event Accordion#down\n */\n this.$element.trigger('down.zf.accordion', [$target]);\n });\n }\n\n /**\n * Closes the tab defined by `$target`.\n * @param {jQuery} $target - Accordion tab to close (`.accordion-content`).\n * @fires Accordion#up\n * @function\n * @private\n */\n _closeTab($target) {\n const $targetItem = $target.parent();\n const targetContentId = $target.attr('aria-labelledby');\n\n $target.attr('aria-hidden', true)\n $targetItem.removeClass('is-active');\n\n $(`#${targetContentId}`).attr({\n 'aria-expanded': false\n });\n\n $target.finish().slideUp(this.options.slideSpeed, () => {\n /**\n * Fires when the tab is done collapsing up.\n * @event Accordion#up\n */\n this.$element.trigger('up.zf.accordion', [$target]);\n });\n }\n\n /**\n * Closes all active tabs\n * @fires Accordion#up\n * @function\n * @private\n */\n _closeAllTabs() {\n var $activeTabs = this.$element.children('.is-active').children('[data-tab-content]');\n if ($activeTabs.length) {\n this._closeTab($activeTabs);\n }\n }\n\n /**\n * Destroys an instance of an accordion.\n * @fires Accordion#destroyed\n * @function\n */\n _destroy() {\n this.$element.find('[data-tab-content]').stop(true).slideUp(0).css('display', '');\n this.$element.find('a').off('.zf.accordion');\n if (this.options.deepLink) {\n $(window).off('hashchange', this._checkDeepLink);\n }\n\n }\n}\n\nAccordion.defaults = {\n /**\n * Amount of time to animate the opening of an accordion pane.\n * @option\n * @type {number}\n * @default 250\n */\n slideSpeed: 250,\n /**\n * Allow the accordion to have multiple open panes.\n * @option\n * @type {boolean}\n * @default false\n */\n multiExpand: false,\n /**\n * Allow the accordion to close all panes.\n * @option\n * @type {boolean}\n * @default false\n */\n allowAllClosed: false,\n /**\n * Link the location hash to the open pane.\n * Set the location hash when the opened pane changes, and open and scroll to the corresponding pane when the location changes.\n * @option\n * @type {boolean}\n * @default false\n */\n deepLink: false,\n /**\n * If `deepLink` is enabled, adjust the deep link scroll to make sure the top of the accordion panel is visible\n * @option\n * @type {boolean}\n * @default false\n */\n deepLinkSmudge: false,\n /**\n * If `deepLinkSmudge` is enabled, animation time (ms) for the deep link adjustment\n * @option\n * @type {number}\n * @default 300\n */\n deepLinkSmudgeDelay: 300,\n /**\n * If `deepLinkSmudge` is enabled, the offset for scrollToTtop to prevent overlap by a sticky element at the top of the page\n * @option\n * @type {number}\n * @default 0\n */\n deepLinkSmudgeOffset: 0,\n /**\n * If `deepLink` is enabled, update the browser history with the open accordion\n * @option\n * @type {boolean}\n * @default false\n */\n updateHistory: false\n};\n\nexport { Accordion };\n","import $ from 'jquery';\nimport { Keyboard } from './foundation.util.keyboard';\nimport { Nest } from './foundation.util.nest';\nimport { GetYoDigits } from './foundation.core.utils';\nimport { Plugin } from './foundation.core.plugin';\n\n/**\n * AccordionMenu module.\n * @module foundation.accordionMenu\n * @requires foundation.util.keyboard\n * @requires foundation.util.nest\n */\n\nclass AccordionMenu extends Plugin {\n /**\n * Creates a new instance of an accordion menu.\n * @class\n * @name AccordionMenu\n * @fires AccordionMenu#init\n * @param {jQuery} element - jQuery object to make into an accordion menu.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element, options) {\n this.$element = element;\n this.options = $.extend({}, AccordionMenu.defaults, this.$element.data(), options);\n this.className = 'AccordionMenu'; // ie9 back compat\n\n this._init();\n\n Keyboard.register('AccordionMenu', {\n 'ENTER': 'toggle',\n 'SPACE': 'toggle',\n 'ARROW_RIGHT': 'open',\n 'ARROW_UP': 'up',\n 'ARROW_DOWN': 'down',\n 'ARROW_LEFT': 'close',\n 'ESCAPE': 'closeAll'\n });\n }\n\n\n\n /**\n * Initializes the accordion menu by hiding all nested menus.\n * @private\n */\n _init() {\n Nest.Feather(this.$element, 'accordion');\n\n var _this = this;\n\n this.$element.find('[data-submenu]').not('.is-active').slideUp(0);//.find('a').css('padding-left', '1rem');\n this.$element.attr({\n 'aria-multiselectable': this.options.multiOpen\n });\n\n this.$menuLinks = this.$element.find('.is-accordion-submenu-parent');\n this.$menuLinks.each(function() {\n var linkId = this.id || GetYoDigits(6, 'acc-menu-link'),\n $elem = $(this),\n $sub = $elem.children('[data-submenu]'),\n subId = $sub[0].id || GetYoDigits(6, 'acc-menu'),\n isActive = $sub.hasClass('is-active');\n\n if (_this.options.parentLink) {\n let $anchor = $elem.children('a');\n $anchor.clone().prependTo($sub).wrap('<li data-is-parent-link class=\"is-submenu-parent-item is-submenu-item is-accordion-submenu-item\"></li>');\n }\n\n if (_this.options.submenuToggle) {\n $elem.addClass('has-submenu-toggle');\n $elem.children('a').after('<button id=\"' + linkId + '\" class=\"submenu-toggle\" aria-controls=\"' + subId + '\" aria-expanded=\"' + isActive + '\" title=\"' + _this.options.submenuToggleText + '\"><span class=\"submenu-toggle-text\">' + _this.options.submenuToggleText + '</span></button>');\n } else {\n $elem.attr({\n 'aria-controls': subId,\n 'aria-expanded': isActive,\n 'id': linkId\n });\n }\n $sub.attr({\n 'aria-labelledby': linkId,\n 'aria-hidden': !isActive,\n 'role': 'group',\n 'id': subId\n });\n });\n var initPanes = this.$element.find('.is-active');\n if (initPanes.length) {\n initPanes.each(function() {\n _this.down($(this));\n });\n }\n this._events();\n }\n\n /**\n * Adds event handlers for items within the menu.\n * @private\n */\n _events() {\n var _this = this;\n\n this.$element.find('li').each(function() {\n var $submenu = $(this).children('[data-submenu]');\n\n if ($submenu.length) {\n if (_this.options.submenuToggle) {\n $(this).children('.submenu-toggle').off('click.zf.accordionMenu').on('click.zf.accordionMenu', function() {\n _this.toggle($submenu);\n });\n } else {\n $(this).children('a').off('click.zf.accordionMenu').on('click.zf.accordionMenu', function(e) {\n e.preventDefault();\n _this.toggle($submenu);\n });\n }\n }\n }).on('keydown.zf.accordionMenu', function(e) {\n var $element = $(this),\n $elements = $element.parent('ul').children('li'),\n $prevElement,\n $nextElement,\n $target = $element.children('[data-submenu]');\n\n $elements.each(function(i) {\n if ($(this).is($element)) {\n $prevElement = $elements.eq(Math.max(0, i-1)).find('a').first();\n $nextElement = $elements.eq(Math.min(i+1, $elements.length-1)).find('a').first();\n\n if ($(this).children('[data-submenu]:visible').length) { // has open sub menu\n $nextElement = $element.find('li:first-child').find('a').first();\n }\n if ($(this).is(':first-child')) { // is first element of sub menu\n $prevElement = $element.parents('li').first().find('a').first();\n } else if ($prevElement.parents('li').first().children('[data-submenu]:visible').length) { // if previous element has open sub menu\n $prevElement = $prevElement.parents('li').find('li:last-child').find('a').first();\n }\n if ($(this).is(':last-child')) { // is last element of sub menu\n $nextElement = $element.parents('li').first().next('li').find('a').first();\n }\n\n return;\n }\n });\n\n Keyboard.handleKey(e, 'AccordionMenu', {\n open: function() {\n if ($target.is(':hidden')) {\n _this.down($target);\n $target.find('li').first().find('a').first().focus();\n }\n },\n close: function() {\n if ($target.length && !$target.is(':hidden')) { // close active sub of this item\n _this.up($target);\n } else if ($element.parent('[data-submenu]').length) { // close currently open sub\n _this.up($element.parent('[data-submenu]'));\n $element.parents('li').first().find('a').first().focus();\n }\n },\n up: function() {\n $prevElement.focus();\n return true;\n },\n down: function() {\n $nextElement.focus();\n return true;\n },\n toggle: function() {\n if (_this.options.submenuToggle) {\n return false;\n }\n if ($element.children('[data-submenu]').length) {\n _this.toggle($element.children('[data-submenu]'));\n return true;\n }\n },\n closeAll: function() {\n _this.hideAll();\n },\n handled: function(preventDefault) {\n if (preventDefault) {\n e.preventDefault();\n }\n }\n });\n });//.attr('tabindex', 0);\n }\n\n /**\n * Closes all panes of the menu.\n * @function\n */\n hideAll() {\n this.up(this.$element.find('[data-submenu]'));\n }\n\n /**\n * Opens all panes of the menu.\n * @function\n */\n showAll() {\n this.down(this.$element.find('[data-submenu]'));\n }\n\n /**\n * Toggles the open/close state of a submenu.\n * @function\n * @param {jQuery} $target - the submenu to toggle\n */\n toggle($target) {\n if (!$target.is(':animated')) {\n if (!$target.is(':hidden')) {\n this.up($target);\n }\n else {\n this.down($target);\n }\n }\n }\n\n /**\n * Opens the sub-menu defined by `$target`.\n * @param {jQuery} $target - Sub-menu to open.\n * @fires AccordionMenu#down\n */\n down($target) {\n // If having multiple submenus active is disabled, close all the submenus\n // that are not parents or children of the targeted submenu.\n if (!this.options.multiOpen) {\n // The \"branch\" of the targetted submenu, from the component root to\n // the active submenus nested in it.\n const $targetBranch = $target.parentsUntil(this.$element)\n .add($target)\n .add($target.find('.is-active'));\n // All the active submenus that are not in the branch.\n const $othersActiveSubmenus = this.$element.find('.is-active').not($targetBranch);\n\n this.up($othersActiveSubmenus);\n }\n\n $target\n .addClass('is-active')\n .attr({ 'aria-hidden': false });\n\n if (this.options.submenuToggle) {\n $target.prev('.submenu-toggle').attr({'aria-expanded': true});\n }\n else {\n $target.parent('.is-accordion-submenu-parent').attr({'aria-expanded': true});\n }\n\n $target.slideDown(this.options.slideSpeed, () => {\n /**\n * Fires when the menu is done opening.\n * @event AccordionMenu#down\n */\n this.$element.trigger('down.zf.accordionMenu', [$target]);\n });\n }\n\n /**\n * Closes the sub-menu defined by `$target`. All sub-menus inside the target will be closed as well.\n * @param {jQuery} $target - Sub-menu to close.\n * @fires AccordionMenu#up\n */\n up($target) {\n const $submenus = $target.find('[data-submenu]');\n const $allmenus = $target.add($submenus);\n\n $submenus.slideUp(0);\n $allmenus\n .removeClass('is-active')\n .attr('aria-hidden', true);\n\n if (this.options.submenuToggle) {\n $allmenus.prev('.submenu-toggle').attr('aria-expanded', false);\n }\n else {\n $allmenus.parent('.is-accordion-submenu-parent').attr('aria-expanded', false);\n }\n\n $target.slideUp(this.options.slideSpeed, () => {\n /**\n * Fires when the menu is done collapsing up.\n * @event AccordionMenu#up\n */\n this.$element.trigger('up.zf.accordionMenu', [$target]);\n });\n }\n\n /**\n * Destroys an instance of accordion menu.\n * @fires AccordionMenu#destroyed\n */\n _destroy() {\n this.$element.find('[data-submenu]').slideDown(0).css('display', '');\n this.$element.find('a').off('click.zf.accordionMenu');\n this.$element.find('[data-is-parent-link]').detach();\n\n if (this.options.submenuToggle) {\n this.$element.find('.has-submenu-toggle').removeClass('has-submenu-toggle');\n this.$element.find('.submenu-toggle').remove();\n }\n\n Nest.Burn(this.$element, 'accordion');\n }\n}\n\nAccordionMenu.defaults = {\n /**\n * Adds the parent link to the submenu.\n * @option\n * @type {boolean}\n * @default false\n */\n parentLink: false,\n /**\n * Amount of time to animate the opening of a submenu in ms.\n * @option\n * @type {number}\n * @default 250\n */\n slideSpeed: 250,\n /**\n * Adds a separate submenu toggle button. This allows the parent item to have a link.\n * @option\n * @example true\n */\n submenuToggle: false,\n /**\n * The text used for the submenu toggle if enabled. This is used for screen readers only.\n * @option\n * @example true\n */\n submenuToggleText: 'Toggle menu',\n /**\n * Allow the menu to have multiple open panes.\n * @option\n * @type {boolean}\n * @default true\n */\n multiOpen: true\n};\n\nexport { AccordionMenu };\n","import $ from 'jquery';\nimport { GetYoDigits } from './foundation.core.utils';\nimport { MediaQuery } from './foundation.util.mediaQuery';\n\nvar FOUNDATION_VERSION = '6.9.0';\n\n// Global Foundation object\n// This is attached to the window, or used as a module for AMD/Browserify\nvar Foundation = {\n version: FOUNDATION_VERSION,\n\n /**\n * Stores initialized plugins.\n */\n _plugins: {},\n\n /**\n * Stores generated unique ids for plugin instances\n */\n _uuids: [],\n\n /**\n * Defines a Foundation plugin, adding it to the `Foundation` namespace and the list of plugins to initialize when reflowing.\n * @param {Object} plugin - The constructor of the plugin.\n */\n plugin: function(plugin, name) {\n // Object key to use when adding to global Foundation object\n // Examples: Foundation.Reveal, Foundation.OffCanvas\n var className = (name || functionName(plugin));\n // Object key to use when storing the plugin, also used to create the identifying data attribute for the plugin\n // Examples: data-reveal, data-off-canvas\n var attrName = hyphenate(className);\n\n // Add to the Foundation object and the plugins list (for reflowing)\n this._plugins[attrName] = this[className] = plugin;\n },\n /**\n * @function\n * Populates the _uuids array with pointers to each individual plugin instance.\n * Adds the `zfPlugin` data-attribute to programmatically created plugins to allow use of $(selector).foundation(method) calls.\n * Also fires the initialization event for each plugin, consolidating repetitive code.\n * @param {Object} plugin - an instance of a plugin, usually `this` in context.\n * @param {String} name - the name of the plugin, passed as a camelCased string.\n * @fires Plugin#init\n */\n registerPlugin: function(plugin, name){\n var pluginName = name ? hyphenate(name) : functionName(plugin.constructor).toLowerCase();\n plugin.uuid = GetYoDigits(6, pluginName);\n\n if(!plugin.$element.attr(`data-${pluginName}`)){ plugin.$element.attr(`data-${pluginName}`, plugin.uuid); }\n if(!plugin.$element.data('zfPlugin')){ plugin.$element.data('zfPlugin', plugin); }\n /**\n * Fires when the plugin has initialized.\n * @event Plugin#init\n */\n plugin.$element.trigger(`init.zf.${pluginName}`);\n\n this._uuids.push(plugin.uuid);\n\n return;\n },\n /**\n * @function\n * Removes the plugins uuid from the _uuids array.\n * Removes the zfPlugin data attribute, as well as the data-plugin-name attribute.\n * Also fires the destroyed event for the plugin, consolidating repetitive code.\n * @param {Object} plugin - an instance of a plugin, usually `this` in context.\n * @fires Plugin#destroyed\n */\n unregisterPlugin: function(plugin){\n var pluginName = hyphenate(functionName(plugin.$element.data('zfPlugin').constructor));\n\n this._uuids.splice(this._uuids.indexOf(plugin.uuid), 1);\n plugin.$element.removeAttr(`data-${pluginName}`).removeData('zfPlugin')\n /**\n * Fires when the plugin has been destroyed.\n * @event Plugin#destroyed\n */\n .trigger(`destroyed.zf.${pluginName}`);\n for(var prop in plugin){\n if(typeof plugin[prop] === 'function'){\n plugin[prop] = null; //clean up script to prep for garbage collection.\n }\n }\n return;\n },\n\n /**\n * @function\n * Causes one or more active plugins to re-initialize, resetting event listeners, recalculating positions, etc.\n * @param {String} plugins - optional string of an individual plugin key, attained by calling `$(element).data('pluginName')`, or string of a plugin class i.e. `'dropdown'`\n * @default If no argument is passed, reflow all currently active plugins.\n */\n reInit: function(plugins){\n var isJQ = plugins instanceof $;\n try{\n if(isJQ){\n plugins.each(function(){\n $(this).data('zfPlugin')._init();\n });\n }else{\n var type = typeof plugins,\n _this = this,\n fns = {\n 'object': function(plgs){\n plgs.forEach(function(p){\n p = hyphenate(p);\n $('[data-'+ p +']').foundation('_init');\n });\n },\n 'string': function(){\n plugins = hyphenate(plugins);\n $('[data-'+ plugins +']').foundation('_init');\n },\n 'undefined': function(){\n this.object(Object.keys(_this._plugins));\n }\n };\n fns[type](plugins);\n }\n }catch(err){\n console.error(err);\n }finally{\n return plugins;\n }\n },\n\n /**\n * Initialize plugins on any elements within `elem` (and `elem` itself) that aren't already initialized.\n * @param {Object} elem - jQuery object containing the element to check inside. Also checks the element itself, unless it's the `document` object.\n * @param {String|Array} plugins - A list of plugins to initialize. Leave this out to initialize everything.\n */\n reflow: function(elem, plugins) {\n\n // If plugins is undefined, just grab everything\n if (typeof plugins === 'undefined') {\n plugins = Object.keys(this._plugins);\n }\n // If plugins is a string, convert it to an array with one item\n else if (typeof plugins === 'string') {\n plugins = [plugins];\n }\n\n var _this = this;\n\n // Iterate through each plugin\n $.each(plugins, function(i, name) {\n // Get the current plugin\n var plugin = _this._plugins[name];\n\n // Localize the search to all elements inside elem, as well as elem itself, unless elem === document\n var $elem = $(elem).find('[data-'+name+']').addBack('[data-'+name+']').filter(function () {\n return typeof $(this).data(\"zfPlugin\") === 'undefined';\n });\n\n // For each plugin found, initialize it\n $elem.each(function() {\n var $el = $(this),\n opts = { reflow: true };\n\n if($el.attr('data-options')){\n $el.attr('data-options').split(';').forEach(function(option){\n var opt = option.split(':').map(function(el){ return el.trim(); });\n if(opt[0]) opts[opt[0]] = parseValue(opt[1]);\n });\n }\n try{\n $el.data('zfPlugin', new plugin($(this), opts));\n }catch(er){\n console.error(er);\n }finally{\n return;\n }\n });\n });\n },\n getFnName: functionName,\n\n addToJquery: function() {\n // TODO: consider not making this a jQuery function\n // TODO: need way to reflow vs. re-initialize\n /**\n * The Foundation jQuery method.\n * @param {String|Array} method - An action to perform on the current jQuery object.\n */\n var foundation = function(method) {\n var type = typeof method,\n $noJS = $('.no-js');\n\n if($noJS.length){\n $noJS.removeClass('no-js');\n }\n\n if(type === 'undefined'){//needs to initialize the Foundation object, or an individual plugin.\n MediaQuery._init();\n Foundation.reflow(this);\n }else if(type === 'string'){//an individual method to invoke on a plugin or group of plugins\n var args = Array.prototype.slice.call(arguments, 1);//collect all the arguments, if necessary\n var plugClass = this.data('zfPlugin');//determine the class of plugin\n\n if(typeof plugClass !== 'undefined' && typeof plugClass[method] !== 'undefined'){//make sure both the class and method exist\n if(this.length === 1){//if there's only one, call it directly.\n plugClass[method].apply(plugClass, args);\n }else{\n this.each(function(i, el){//otherwise loop through the jQuery collection and invoke the method on each\n plugClass[method].apply($(el).data('zfPlugin'), args);\n });\n }\n }else{//error for no class or no method\n throw new ReferenceError(\"We're sorry, '\" + method + \"' is not an available method for \" + (plugClass ? functionName(plugClass) : 'this element') + '.');\n }\n }else{//error for invalid argument type\n throw new TypeError(`We're sorry, ${type} is not a valid parameter. You must use a string representing the method you wish to invoke.`);\n }\n return this;\n };\n $.fn.foundation = foundation;\n return $;\n }\n};\n\nFoundation.util = {\n /**\n * Function for applying a debounce effect to a function call.\n * @function\n * @param {Function} func - Function to be called at end of timeout.\n * @param {Number} delay - Time in ms to delay the call of `func`.\n * @returns function\n */\n throttle: function (func, delay) {\n var timer = null;\n\n return function () {\n var context = this, args = arguments;\n\n if (timer === null) {\n timer = setTimeout(function () {\n func.apply(context, args);\n timer = null;\n }, delay);\n }\n };\n }\n};\n\nwindow.Foundation = Foundation;\n\n// Polyfill for requestAnimationFrame\n(function() {\n if (!Date.now || !window.Date.now)\n window.Date.now = Date.now = function() { return new Date().getTime(); };\n\n var vendors = ['webkit', 'moz'];\n for (var i = 0; i < vendors.length && !window.requestAnimationFrame; ++i) {\n var vp = vendors[i];\n window.requestAnimationFrame = window[vp+'RequestAnimationFrame'];\n window.cancelAnimationFrame = (window[vp+'CancelAnimationFrame']\n || window[vp+'CancelRequestAnimationFrame']);\n }\n if (/iP(ad|hone|od).*OS 6/.test(window.navigator.userAgent)\n || !window.requestAnimationFrame || !window.cancelAnimationFrame) {\n var lastTime = 0;\n window.requestAnimationFrame = function(callback) {\n var now = Date.now();\n var nextTime = Math.max(lastTime + 16, now);\n return setTimeout(function() { callback(lastTime = nextTime); },\n nextTime - now);\n };\n window.cancelAnimationFrame = clearTimeout;\n }\n /**\n * Polyfill for performance.now, required by rAF\n */\n if(!window.performance || !window.performance.now){\n window.performance = {\n start: Date.now(),\n now: function(){ return Date.now() - this.start; }\n };\n }\n})();\nif (!Function.prototype.bind) {\n /* eslint-disable no-extend-native */\n Function.prototype.bind = function(oThis) {\n if (typeof this !== 'function') {\n // closest thing possible to the ECMAScript 5\n // internal IsCallable function\n throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable');\n }\n\n var aArgs = Array.prototype.slice.call(arguments, 1),\n fToBind = this,\n fNOP = function() {},\n fBound = function() {\n return fToBind.apply(this instanceof fNOP\n ? this\n : oThis,\n aArgs.concat(Array.prototype.slice.call(arguments)));\n };\n\n if (this.prototype) {\n // native functions don't have a prototype\n fNOP.prototype = this.prototype;\n }\n fBound.prototype = new fNOP();\n\n return fBound;\n };\n}\n// Polyfill to get the name of a function in IE9\nfunction functionName(fn) {\n if (typeof Function.prototype.name === 'undefined') {\n var funcNameRegex = /function\\s([^(]{1,})\\(/;\n var results = (funcNameRegex).exec((fn).toString());\n return (results && results.length > 1) ? results[1].trim() : \"\";\n }\n else if (typeof fn.prototype === 'undefined') {\n return fn.constructor.name;\n }\n else {\n return fn.prototype.constructor.name;\n }\n}\nfunction parseValue(str){\n if ('true' === str) return true;\n else if ('false' === str) return false;\n else if (!isNaN(str * 1)) return parseFloat(str);\n return str;\n}\n// Convert PascalCase to kebab-case\n// Thank you: http://stackoverflow.com/a/8955580\nfunction hyphenate(str) {\n return str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();\n}\n\nexport {Foundation};\n","import { GetYoDigits } from './foundation.core.utils';\n\n// Abstract class for providing lifecycle hooks. Expect plugins to define AT LEAST\n// {function} _setup (replaces previous constructor),\n// {function} _destroy (replaces previous destroy)\nclass Plugin {\n\n constructor(element, options) {\n this._setup(element, options);\n var pluginName = getPluginName(this);\n this.uuid = GetYoDigits(6, pluginName);\n\n if(!this.$element.attr(`data-${pluginName}`)){ this.$element.attr(`data-${pluginName}`, this.uuid); }\n if(!this.$element.data('zfPlugin')){ this.$element.data('zfPlugin', this); }\n /**\n * Fires when the plugin has initialized.\n * @event Plugin#init\n */\n this.$element.trigger(`init.zf.${pluginName}`);\n }\n\n destroy() {\n this._destroy();\n var pluginName = getPluginName(this);\n this.$element.removeAttr(`data-${pluginName}`).removeData('zfPlugin')\n /**\n * Fires when the plugin has been destroyed.\n * @event Plugin#destroyed\n */\n .trigger(`destroyed.zf.${pluginName}`);\n for(var prop in this){\n if (this.hasOwnProperty(prop)) {\n this[prop] = null; //clean up script to prep for garbage collection.\n }\n }\n }\n}\n\n// Convert PascalCase to kebab-case\n// Thank you: http://stackoverflow.com/a/8955580\nfunction hyphenate(str) {\n return str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();\n}\n\nfunction getPluginName(obj) {\n return hyphenate(obj.className);\n}\n\nexport {Plugin};\n","import $ from 'jquery';\n\n// Core Foundation Utilities, utilized in a number of places.\n\n /**\n * Returns a boolean for RTL support\n */\nfunction rtl() {\n return $('html').attr('dir') === 'rtl';\n}\n\n/**\n * returns a random base-36 uid with namespacing\n * @function\n * @param {Number} length - number of random base-36 digits desired. Increase for more random strings.\n * @param {String} namespace - name of plugin to be incorporated in uid, optional.\n * @default {String} '' - if no plugin name is provided, nothing is appended to the uid.\n * @returns {String} - unique id\n */\nfunction GetYoDigits(length = 6, namespace){\n let str = '';\n const chars = '0123456789abcdefghijklmnopqrstuvwxyz';\n const charsLength = chars.length;\n for (let i = 0; i < length; i++) {\n str += chars[Math.floor(Math.random() * charsLength)];\n }\n return namespace ? `${str}-${namespace}` : str;\n}\n\n/**\n * Escape a string so it can be used as a regexp pattern\n * @function\n * @see https://stackoverflow.com/a/9310752/4317384\n *\n * @param {String} str - string to escape.\n * @returns {String} - escaped string\n */\nfunction RegExpEscape(str){\n return str.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&');\n}\n\nfunction transitionend($elem){\n var transitions = {\n 'transition': 'transitionend',\n 'WebkitTransition': 'webkitTransitionEnd',\n 'MozTransition': 'transitionend',\n 'OTransition': 'otransitionend'\n };\n var elem = document.createElement('div'),\n end;\n\n for (let transition in transitions){\n if (typeof elem.style[transition] !== 'undefined'){\n end = transitions[transition];\n }\n }\n if (end) {\n return end;\n } else {\n setTimeout(function(){\n $elem.triggerHandler('transitionend', [$elem]);\n }, 1);\n return 'transitionend';\n }\n}\n\n/**\n * Return an event type to listen for window load.\n *\n * If `$elem` is passed, an event will be triggered on `$elem`. If window is already loaded, the event will still be triggered.\n * If `handler` is passed, attach it to the event on `$elem`.\n * Calling `onLoad` without handler allows you to get the event type that will be triggered before attaching the handler by yourself.\n * @function\n *\n * @param {Object} [] $elem - jQuery element on which the event will be triggered if passed.\n * @param {Function} [] handler - function to attach to the event.\n * @returns {String} - event type that should or will be triggered.\n */\nfunction onLoad($elem, handler) {\n const didLoad = document.readyState === 'complete';\n const eventType = (didLoad ? '_didLoad' : 'load') + '.zf.util.onLoad';\n const cb = () => $elem.triggerHandler(eventType);\n\n if ($elem) {\n if (handler) $elem.one(eventType, handler);\n\n if (didLoad)\n setTimeout(cb);\n else\n $(window).one('load', cb);\n }\n\n return eventType;\n}\n\n/**\n * Retuns an handler for the `mouseleave` that ignore disappeared mouses.\n *\n * If the mouse \"disappeared\" from the document (like when going on a browser UI element, See https://git.io/zf-11410),\n * the event is ignored.\n * - If the `ignoreLeaveWindow` is `true`, the event is ignored when the user actually left the window\n * (like by switching to an other window with [Alt]+[Tab]).\n * - If the `ignoreReappear` is `true`, the event will be ignored when the mouse will reappear later on the document\n * outside of the element it left.\n *\n * @function\n *\n * @param {Function} [] handler - handler for the filtered `mouseleave` event to watch.\n * @param {Object} [] options - object of options:\n * - {Boolean} [false] ignoreLeaveWindow - also ignore when the user switched windows.\n * - {Boolean} [false] ignoreReappear - also ignore when the mouse reappeared outside of the element it left.\n * @returns {Function} - filtered handler to use to listen on the `mouseleave` event.\n */\nfunction ignoreMousedisappear(handler, { ignoreLeaveWindow = false, ignoreReappear = false } = {}) {\n return function leaveEventHandler(eLeave, ...rest) {\n const callback = handler.bind(this, eLeave, ...rest);\n\n // The mouse left: call the given callback if the mouse entered elsewhere\n if (eLeave.relatedTarget !== null) {\n return callback();\n }\n\n // Otherwise, check if the mouse actually left the window.\n // In firefox if the user switched between windows, the window sill have the focus by the time\n // the event is triggered. We have to debounce the event to test this case.\n setTimeout(function leaveEventDebouncer() {\n if (!ignoreLeaveWindow && document.hasFocus && !document.hasFocus()) {\n return callback();\n }\n\n // Otherwise, wait for the mouse to reeapear outside of the element,\n if (!ignoreReappear) {\n $(document).one('mouseenter', function reenterEventHandler(eReenter) {\n if (!$(eLeave.currentTarget).has(eReenter.target).length) {\n // Fill where the mouse finally entered.\n eLeave.relatedTarget = eReenter.target;\n callback();\n }\n });\n }\n\n }, 0);\n };\n}\n\n\nexport { rtl, GetYoDigits, RegExpEscape, transitionend, onLoad, ignoreMousedisappear };\n","import $ from 'jquery';\nimport { Keyboard } from './foundation.util.keyboard';\nimport { Nest } from './foundation.util.nest';\nimport { GetYoDigits, transitionend } from './foundation.core.utils';\nimport { Box } from './foundation.util.box';\nimport { Plugin } from './foundation.core.plugin';\n\n/**\n * Drilldown module.\n * @module foundation.drilldown\n * @requires foundation.util.keyboard\n * @requires foundation.util.nest\n * @requires foundation.util.box\n */\n\nclass Drilldown extends Plugin {\n /**\n * Creates a new instance of a drilldown menu.\n * @class\n * @name Drilldown\n * @param {jQuery} element - jQuery object to make into an accordion menu.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element, options) {\n this.$element = element;\n this.options = $.extend({}, Drilldown.defaults, this.$element.data(), options);\n this.className = 'Drilldown'; // ie9 back compat\n\n this._init();\n\n Keyboard.register('Drilldown', {\n 'ENTER': 'open',\n 'SPACE': 'open',\n 'ARROW_RIGHT': 'next',\n 'ARROW_UP': 'up',\n 'ARROW_DOWN': 'down',\n 'ARROW_LEFT': 'previous',\n 'ESCAPE': 'close',\n });\n }\n\n /**\n * Initializes the drilldown by creating jQuery collections of elements\n * @private\n */\n _init() {\n Nest.Feather(this.$element, 'drilldown');\n\n if(this.options.autoApplyClass) {\n this.$element.addClass('drilldown');\n }\n\n this.$element.attr({\n 'aria-multiselectable': false\n });\n this.$submenuAnchors = this.$element.find('li.is-drilldown-submenu-parent').children('a');\n this.$submenus = this.$submenuAnchors.parent('li').children('[data-submenu]').attr('role', 'group');\n this.$menuItems = this.$element.find('li').not('.js-drilldown-back').find('a');\n\n // Set the main menu as current by default (unless a submenu is selected)\n // Used to set the wrapper height when the drilldown is closed/reopened from any (sub)menu\n this.$currentMenu = this.$element;\n\n this.$element.attr('data-mutate', (this.$element.attr('data-drilldown') || GetYoDigits(6, 'drilldown')));\n\n this._prepareMenu();\n this._registerEvents();\n\n this._keyboardEvents();\n }\n\n /**\n * prepares drilldown menu by setting attributes to links and elements\n * sets a min height to prevent content jumping\n * wraps the element if not already wrapped\n * @private\n * @function\n */\n _prepareMenu() {\n var _this = this;\n // if(!this.options.holdOpen){\n // this._menuLinkEvents();\n // }\n this.$submenuAnchors.each(function(){\n var $link = $(this);\n var $sub = $link.parent();\n if(_this.options.parentLink){\n $link.clone().prependTo($sub.children('[data-submenu]')).wrap('<li data-is-parent-link class=\"is-submenu-parent-item is-submenu-item is-drilldown-submenu-item\" role=\"none\"></li>');\n }\n $link.data('savedHref', $link.attr('href')).removeAttr('href').attr('tabindex', 0);\n $link.children('[data-submenu]')\n .attr({\n 'aria-hidden': true,\n 'tabindex': 0,\n 'role': 'group'\n });\n _this._events($link);\n });\n this.$submenus.each(function(){\n var $menu = $(this),\n $back = $menu.find('.js-drilldown-back');\n if(!$back.length) {\n switch (_this.options.backButtonPosition) {\n case \"bottom\":\n $menu.append(_this.options.backButton);\n break;\n case \"top\":\n $menu.prepend(_this.options.backButton);\n break;\n default:\n console.error(\"Unsupported backButtonPosition value '\" + _this.options.backButtonPosition + \"'\");\n }\n }\n _this._back($menu);\n });\n\n this.$submenus.addClass('invisible');\n if(!this.options.autoHeight) {\n this.$submenus.addClass('drilldown-submenu-cover-previous');\n }\n\n // create a wrapper on element if it doesn't exist.\n if(!this.$element.parent().hasClass('is-drilldown')){\n this.$wrapper = $(this.options.wrapper).addClass('is-drilldown');\n if(this.options.animateHeight) this.$wrapper.addClass('animate-height');\n this.$element.wrap(this.$wrapper);\n }\n // set wrapper\n this.$wrapper = this.$element.parent();\n this.$wrapper.css(this._getMaxDims());\n }\n\n _resize() {\n this.$wrapper.css({'max-width': 'none', 'min-height': 'none'});\n // _getMaxDims has side effects (boo) but calling it should update all other necessary heights & widths\n this.$wrapper.css(this._getMaxDims());\n }\n\n /**\n * Adds event handlers to elements in the menu.\n * @function\n * @private\n * @param {jQuery} $elem - the current menu item to add handlers to.\n */\n _events($elem) {\n var _this = this;\n\n $elem.off('click.zf.drilldown')\n .on('click.zf.drilldown', function(e) {\n if($(e.target).parentsUntil('ul', 'li').hasClass('is-drilldown-submenu-parent')){\n e.preventDefault();\n }\n\n // if(e.target !== e.currentTarget.firstElementChild){\n // return false;\n // }\n _this._show($elem.parent('li'));\n\n if(_this.options.closeOnClick){\n var $body = $('body');\n $body.off('.zf.drilldown').on('click.zf.drilldown', function(ev) {\n if (ev.target === _this.$element[0] || $.contains(_this.$element[0], ev.target)) { return; }\n ev.preventDefault();\n _this._hideAll();\n $body.off('.zf.drilldown');\n });\n }\n });\n }\n\n /**\n * Adds event handlers to the menu element.\n * @function\n * @private\n */\n _registerEvents() {\n if(this.options.scrollTop){\n this._bindHandler = this._scrollTop.bind(this);\n this.$element.on('open.zf.drilldown hide.zf.drilldown close.zf.drilldown closed.zf.drilldown',this._bindHandler);\n }\n this.$element.on('mutateme.zf.trigger', this._resize.bind(this));\n }\n\n /**\n * Scroll to Top of Element or data-scroll-top-element\n * @function\n * @fires Drilldown#scrollme\n */\n _scrollTop() {\n var _this = this;\n var $scrollTopElement = _this.options.scrollTopElement !== ''?$(_this.options.scrollTopElement):_this.$element,\n scrollPos = parseInt($scrollTopElement.offset().top+_this.options.scrollTopOffset, 10);\n $('html, body').stop(true).animate({ scrollTop: scrollPos }, _this.options.animationDuration, _this.options.animationEasing,function(){\n /**\n * Fires after the menu has scrolled\n * @event Drilldown#scrollme\n */\n if(this===$('html')[0])_this.$element.trigger('scrollme.zf.drilldown');\n });\n }\n\n /**\n * Adds keydown event listener to `li`'s in the menu.\n * @private\n */\n _keyboardEvents() {\n var _this = this;\n\n this.$menuItems.add(this.$element.find('.js-drilldown-back > a, .is-submenu-parent-item > a')).on('keydown.zf.drilldown', function(e){\n var $element = $(this),\n $elements = $element.parent('li').parent('ul').children('li').children('a'),\n $prevElement,\n $nextElement;\n\n $elements.each(function(i) {\n if ($(this).is($element)) {\n $prevElement = $elements.eq(Math.max(0, i-1));\n $nextElement = $elements.eq(Math.min(i+1, $elements.length-1));\n return;\n }\n });\n\n Keyboard.handleKey(e, 'Drilldown', {\n next: function() {\n if ($element.is(_this.$submenuAnchors)) {\n _this._show($element.parent('li'));\n $element.parent('li').one(transitionend($element), function(){\n $element.parent('li').find('ul li a').not('.js-drilldown-back a').first().focus();\n });\n return true;\n }\n },\n previous: function() {\n _this._hide($element.parent('li').parent('ul'));\n $element.parent('li').parent('ul').one(transitionend($element), function(){\n setTimeout(function() {\n $element.parent('li').parent('ul').parent('li').children('a').first().focus();\n }, 1);\n });\n return true;\n },\n up: function() {\n $prevElement.focus();\n // Don't tap focus on first element in root ul\n return !$element.is(_this.$element.find('> li:first-child > a'));\n },\n down: function() {\n $nextElement.focus();\n // Don't tap focus on last element in root ul\n return !$element.is(_this.$element.find('> li:last-child > a'));\n },\n close: function() {\n // Don't close on element in root ul\n if (!$element.is(_this.$element.find('> li > a'))) {\n _this._hide($element.parent().parent());\n $element.parent().parent().siblings('a').focus();\n }\n },\n open: function() {\n if (_this.options.parentLink && $element.attr('href')) { // Link with href\n return false;\n } else if (!$element.is(_this.$menuItems)) { // not menu item means back button\n _this._hide($element.parent('li').parent('ul'));\n $element.parent('li').parent('ul').one(transitionend($element), function(){\n setTimeout(function() {\n $element.parent('li').parent('ul').parent('li').children('a').first().focus();\n }, 1);\n });\n return true;\n } else if ($element.is(_this.$submenuAnchors)) { // Sub menu item\n _this._show($element.parent('li'));\n $element.parent('li').one(transitionend($element), function(){\n $element.parent('li').find('ul li a').not('.js-drilldown-back a').first().focus();\n });\n return true;\n }\n },\n handled: function(preventDefault) {\n if (preventDefault) {\n e.preventDefault();\n }\n }\n });\n }); // end keyboardAccess\n }\n\n /**\n * Closes all open elements, and returns to root menu.\n * @function\n * @fires Drilldown#close\n * @fires Drilldown#closed\n */\n _hideAll() {\n var $elem = this.$element.find('.is-drilldown-submenu.is-active')\n $elem.addClass('is-closing');\n $elem.parent().closest('ul').removeClass('invisible');\n\n if (this.options.autoHeight) {\n const calcHeight = $elem.parent().closest('ul').data('calcHeight');\n this.$wrapper.css({ height: calcHeight });\n }\n\n /**\n * Fires when the menu is closing.\n * @event Drilldown#close\n */\n this.$element.trigger('close.zf.drilldown');\n\n $elem.one(transitionend($elem), () => {\n $elem.removeClass('is-active is-closing');\n\n /**\n * Fires when the menu is fully closed.\n * @event Drilldown#closed\n */\n this.$element.trigger('closed.zf.drilldown');\n });\n }\n\n /**\n * Adds event listener for each `back` button, and closes open menus.\n * @function\n * @fires Drilldown#back\n * @param {jQuery} $elem - the current sub-menu to add `back` event.\n */\n _back($elem) {\n var _this = this;\n $elem.off('click.zf.drilldown');\n $elem.children('.js-drilldown-back')\n .on('click.zf.drilldown', function() {\n _this._hide($elem);\n\n // If there is a parent submenu, call show\n let parentSubMenu = $elem.parent('li').parent('ul').parent('li');\n if (parentSubMenu.length) {\n _this._show(parentSubMenu);\n }\n else {\n _this.$currentMenu = _this.$element;\n }\n });\n }\n\n /**\n * Adds event listener to menu items w/o submenus to close open menus on click.\n * @function\n * @private\n */\n _menuLinkEvents() {\n var _this = this;\n this.$menuItems.not('.is-drilldown-submenu-parent')\n .off('click.zf.drilldown')\n .on('click.zf.drilldown', function() {\n setTimeout(function() {\n _this._hideAll();\n }, 0);\n });\n }\n\n /**\n * Sets the CSS classes for submenu to show it.\n * @function\n * @private\n * @param {jQuery} $elem - the target submenu (`ul` tag)\n * @param {boolean} trigger - trigger drilldown event\n */\n _setShowSubMenuClasses($elem, trigger) {\n $elem.addClass('is-active').removeClass('invisible').attr('aria-hidden', false);\n $elem.parent('li').attr('aria-expanded', true);\n if (trigger === true) {\n this.$element.trigger('open.zf.drilldown', [$elem]);\n }\n }\n\n /**\n * Sets the CSS classes for submenu to hide it.\n * @function\n * @private\n * @param {jQuery} $elem - the target submenu (`ul` tag)\n * @param {boolean} trigger - trigger drilldown event\n */\n _setHideSubMenuClasses($elem, trigger) {\n $elem.removeClass('is-active').addClass('invisible').attr('aria-hidden', true);\n $elem.parent('li').attr('aria-expanded', false);\n if (trigger === true) {\n $elem.trigger('hide.zf.drilldown', [$elem]);\n }\n }\n\n /**\n * Opens a specific drilldown (sub)menu no matter which (sub)menu in it is currently visible.\n * Compared to _show() this lets you jump into any submenu without clicking through every submenu on the way to it.\n * @function\n * @fires Drilldown#open\n * @param {jQuery} $elem - the target (sub)menu (`ul` tag)\n * @param {boolean} autoFocus - if true the first link in the target (sub)menu gets auto focused\n */\n _showMenu($elem, autoFocus) {\n\n var _this = this;\n\n // Reset drilldown\n var $expandedSubmenus = this.$element.find('li[aria-expanded=\"true\"] > ul[data-submenu]');\n $expandedSubmenus.each(function() {\n _this._setHideSubMenuClasses($(this));\n });\n\n // Save the menu as the currently displayed one.\n this.$currentMenu = $elem;\n\n // If target menu is root, focus first link & exit\n if ($elem.is('[data-drilldown]')) {\n if (autoFocus === true) $elem.find('li > a').first().focus();\n if (this.options.autoHeight) this.$wrapper.css('height', $elem.data('calcHeight'));\n return;\n }\n\n // Find all submenus on way to root incl. the element itself\n var $submenus = $elem.children().first().parentsUntil('[data-drilldown]', '[data-submenu]');\n\n // Open target menu and all submenus on its way to root\n $submenus.each(function(index) {\n\n // Update height of first child (target menu) if autoHeight option true\n if (index === 0 && _this.options.autoHeight) {\n _this.$wrapper.css('height', $(this).data('calcHeight'));\n }\n\n var isLastChild = index === $submenus.length - 1;\n\n // Add transitionsend listener to last child (root due to reverse order) to open target menu's first link\n // Last child makes sure the event gets always triggered even if going through several menus\n if (isLastChild === true) {\n $(this).one(transitionend($(this)), () => {\n if (autoFocus === true) {\n $elem.find('li > a').first().focus();\n }\n });\n }\n\n _this._setShowSubMenuClasses($(this), isLastChild);\n });\n }\n\n /**\n * Opens a submenu.\n * @function\n * @fires Drilldown#open\n * @param {jQuery} $elem - the current element with a submenu to open, i.e. the `li` tag.\n */\n _show($elem) {\n const $submenu = $elem.children('[data-submenu]');\n\n $elem.attr('aria-expanded', true);\n\n this.$currentMenu = $submenu;\n\n //hide drilldown parent menu when submenu is open\n // this removes it from the dom so that the tab key will take the user to the next visible element\n $elem.parent().closest('ul').addClass('invisible');\n\n // add visible class to submenu to override invisible class above\n $submenu.addClass('is-active visible').removeClass('invisible').attr('aria-hidden', false);\n\n if (this.options.autoHeight) {\n this.$wrapper.css({ height: $submenu.data('calcHeight') });\n }\n\n /**\n * Fires when the submenu has opened.\n * @event Drilldown#open\n */\n this.$element.trigger('open.zf.drilldown', [$elem]);\n }\n\n /**\n * Hides a submenu\n * @function\n * @fires Drilldown#hide\n * @param {jQuery} $elem - the current sub-menu to hide, i.e. the `ul` tag.\n */\n _hide($elem) {\n if(this.options.autoHeight) this.$wrapper.css({height:$elem.parent().closest('ul').data('calcHeight')});\n $elem.parent().closest('ul').removeClass('invisible');\n $elem.parent('li').attr('aria-expanded', false);\n $elem.attr('aria-hidden', true);\n $elem.addClass('is-closing')\n .one(transitionend($elem), function(){\n $elem.removeClass('is-active is-closing visible');\n $elem.blur().addClass('invisible');\n });\n /**\n * Fires when the submenu has closed.\n * @event Drilldown#hide\n */\n $elem.trigger('hide.zf.drilldown', [$elem]);\n }\n\n /**\n * Iterates through the nested menus to calculate the min-height, and max-width for the menu.\n * Prevents content jumping.\n * @function\n * @private\n */\n _getMaxDims() {\n var maxHeight = 0, result = {}, _this = this;\n\n // Recalculate menu heights and total max height\n this.$submenus.add(this.$element).each(function(){\n var height = Box.GetDimensions(this).height;\n\n maxHeight = height > maxHeight ? height : maxHeight;\n\n if(_this.options.autoHeight) {\n $(this).data('calcHeight',height);\n }\n });\n\n if (this.options.autoHeight)\n result.height = this.$currentMenu.data('calcHeight');\n else\n result['min-height'] = `${maxHeight}px`;\n\n result['max-width'] = `${this.$element[0].getBoundingClientRect().width}px`;\n\n return result;\n }\n\n /**\n * Destroys the Drilldown Menu\n * @function\n */\n _destroy() {\n $('body').off('.zf.drilldown');\n if(this.options.scrollTop) this.$element.off('.zf.drilldown',this._bindHandler);\n this._hideAll();\n\t this.$element.off('mutateme.zf.trigger');\n Nest.Burn(this.$element, 'drilldown');\n this.$element.unwrap()\n .find('.js-drilldown-back, .is-submenu-parent-item').remove()\n .end().find('.is-active, .is-closing, .is-drilldown-submenu').removeClass('is-active is-closing is-drilldown-submenu').off('transitionend otransitionend webkitTransitionEnd')\n .end().find('[data-submenu]').removeAttr('aria-hidden tabindex role');\n this.$submenuAnchors.each(function() {\n $(this).off('.zf.drilldown');\n });\n\n this.$element.find('[data-is-parent-link]').detach();\n this.$submenus.removeClass('drilldown-submenu-cover-previous invisible');\n\n this.$element.find('a').each(function(){\n var $link = $(this);\n $link.removeAttr('tabindex');\n if($link.data('savedHref')){\n $link.attr('href', $link.data('savedHref')).removeData('savedHref');\n }else{ return; }\n });\n };\n}\n\nDrilldown.defaults = {\n /**\n * Drilldowns depend on styles in order to function properly; in the default build of Foundation these are\n * on the `drilldown` class. This option auto-applies this class to the drilldown upon initialization.\n * @option\n * @type {boolean}\n * @default true\n */\n autoApplyClass: true,\n /**\n * Markup used for JS generated back button. Prepended or appended (see backButtonPosition) to submenu lists and deleted on `destroy` method, 'js-drilldown-back' class required. Remove the backslash (`\\`) if copy and pasting.\n * @option\n * @type {string}\n * @default '<li class=\"js-drilldown-back\"><a tabindex=\"0\">Back</a></li>'\n */\n backButton: '<li class=\"js-drilldown-back\"><a tabindex=\"0\">Back</a></li>',\n /**\n * Position the back button either at the top or bottom of drilldown submenus. Can be `'left'` or `'bottom'`.\n * @option\n * @type {string}\n * @default top\n */\n backButtonPosition: 'top',\n /**\n * Markup used to wrap drilldown menu. Use a class name for independent styling; the JS applied class: `is-drilldown` is required. Remove the backslash (`\\`) if copy and pasting.\n * @option\n * @type {string}\n * @default '<div></div>'\n */\n wrapper: '<div></div>',\n /**\n * Adds the parent link to the submenu.\n * @option\n * @type {boolean}\n * @default false\n */\n parentLink: false,\n /**\n * Allow the menu to return to root list on body click.\n * @option\n * @type {boolean}\n * @default false\n */\n closeOnClick: false,\n /**\n * Allow the menu to auto adjust height.\n * @option\n * @type {boolean}\n * @default false\n */\n autoHeight: false,\n /**\n * Animate the auto adjust height.\n * @option\n * @type {boolean}\n * @default false\n */\n animateHeight: false,\n /**\n * Scroll to the top of the menu after opening a submenu or navigating back using the menu back button\n * @option\n * @type {boolean}\n * @default false\n */\n scrollTop: false,\n /**\n * String jquery selector (for example 'body') of element to take offset().top from, if empty string the drilldown menu offset().top is taken\n * @option\n * @type {string}\n * @default ''\n */\n scrollTopElement: '',\n /**\n * ScrollTop offset\n * @option\n * @type {number}\n * @default 0\n */\n scrollTopOffset: 0,\n /**\n * Scroll animation duration\n * @option\n * @type {number}\n * @default 500\n */\n animationDuration: 500,\n /**\n * Scroll animation easing. Can be `'swing'` or `'linear'`.\n * @option\n * @type {string}\n * @see {@link https://api.jquery.com/animate|JQuery animate}\n * @default 'swing'\n */\n animationEasing: 'swing'\n // holdOpen: false\n};\n\nexport {Drilldown};\n","import $ from 'jquery';\nimport { Keyboard } from './foundation.util.keyboard';\nimport { GetYoDigits, ignoreMousedisappear } from './foundation.core.utils';\nimport { Positionable } from './foundation.positionable';\n\nimport { Triggers } from './foundation.util.triggers';\nimport { Touch } from './foundation.util.touch'\n\n/**\n * Dropdown module.\n * @module foundation.dropdown\n * @requires foundation.util.keyboard\n * @requires foundation.util.box\n * @requires foundation.util.touch\n * @requires foundation.util.triggers\n */\nclass Dropdown extends Positionable {\n /**\n * Creates a new instance of a dropdown.\n * @class\n * @name Dropdown\n * @param {jQuery} element - jQuery object to make into a dropdown.\n * Object should be of the dropdown panel, rather than its anchor.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element, options) {\n this.$element = element;\n this.options = $.extend({}, Dropdown.defaults, this.$element.data(), options);\n this.className = 'Dropdown'; // ie9 back compat\n\n // Touch and Triggers init are idempotent, just need to make sure they are initialized\n Touch.init($);\n Triggers.init($);\n\n this._init();\n\n Keyboard.register('Dropdown', {\n 'ENTER': 'toggle',\n 'SPACE': 'toggle',\n 'ESCAPE': 'close'\n });\n }\n\n /**\n * Initializes the plugin by setting/checking options and attributes, adding helper variables, and saving the anchor.\n * @function\n * @private\n */\n _init() {\n var $id = this.$element.attr('id');\n\n this.$anchors = $(`[data-toggle=\"${$id}\"]`).length ? $(`[data-toggle=\"${$id}\"]`) : $(`[data-open=\"${$id}\"]`);\n this.$anchors.attr({\n 'aria-controls': $id,\n 'data-is-focus': false,\n 'data-yeti-box': $id,\n 'aria-haspopup': true,\n 'aria-expanded': false\n });\n\n this._setCurrentAnchor(this.$anchors.first());\n\n if(this.options.parentClass){\n this.$parent = this.$element.parents('.' + this.options.parentClass);\n }else{\n this.$parent = null;\n }\n\n // Set [aria-labelledby] on the Dropdown if it is not set\n if (typeof this.$element.attr('aria-labelledby') === 'undefined') {\n // Get the anchor ID or create one\n if (typeof this.$currentAnchor.attr('id') === 'undefined') {\n this.$currentAnchor.attr('id', GetYoDigits(6, 'dd-anchor'));\n }\n\n this.$element.attr('aria-labelledby', this.$currentAnchor.attr('id'));\n }\n\n this.$element.attr({\n 'aria-hidden': 'true',\n 'data-yeti-box': $id,\n 'data-resize': $id,\n });\n\n super._init();\n this._events();\n }\n\n _getDefaultPosition() {\n // handle legacy classnames\n var position = this.$element[0].className.match(/(top|left|right|bottom)/g);\n if(position) {\n return position[0];\n } else {\n return 'bottom'\n }\n }\n\n _getDefaultAlignment() {\n // handle legacy float approach\n var horizontalPosition = /float-(\\S+)/.exec(this.$currentAnchor.attr('class'));\n if(horizontalPosition) {\n return horizontalPosition[1];\n }\n\n return super._getDefaultAlignment();\n }\n\n\n\n /**\n * Sets the position and orientation of the dropdown pane, checks for collisions if allow-overlap is not true.\n * Recursively calls itself if a collision is detected, with a new position class.\n * @function\n * @private\n */\n _setPosition() {\n this.$element.removeClass(`has-position-${this.position} has-alignment-${this.alignment}`);\n super._setPosition(this.$currentAnchor, this.$element, this.$parent);\n this.$element.addClass(`has-position-${this.position} has-alignment-${this.alignment}`);\n }\n\n /**\n * Make it a current anchor.\n * Current anchor as the reference for the position of Dropdown panes.\n * @param {HTML} el - DOM element of the anchor.\n * @function\n * @private\n */\n _setCurrentAnchor(el) {\n this.$currentAnchor = $(el);\n }\n\n /**\n * Adds event listeners to the element utilizing the triggers utility library.\n * @function\n * @private\n */\n _events() {\n var _this = this,\n hasTouch = 'ontouchstart' in window || (typeof window.ontouchstart !== 'undefined');\n\n this.$element.on({\n 'open.zf.trigger': this.open.bind(this),\n 'close.zf.trigger': this.close.bind(this),\n 'toggle.zf.trigger': this.toggle.bind(this),\n 'resizeme.zf.trigger': this._setPosition.bind(this)\n });\n\n this.$anchors.off('click.zf.trigger')\n .on('click.zf.trigger', function(e) {\n _this._setCurrentAnchor(this);\n\n if (\n // if forceFollow false, always prevent default action\n (_this.options.forceFollow === false) ||\n // if forceFollow true and hover option true, only prevent default action on 1st click\n // on 2nd click (dropown opened) the default action (e.g. follow a href) gets executed\n (hasTouch && _this.options.hover && _this.$element.hasClass('is-open') === false)\n ) {\n e.preventDefault();\n }\n });\n\n if(this.options.hover){\n this.$anchors.off('mouseenter.zf.dropdown mouseleave.zf.dropdown')\n .on('mouseenter.zf.dropdown', function(){\n _this._setCurrentAnchor(this);\n\n var bodyData = $('body').data();\n if(typeof(bodyData.whatinput) === 'undefined' || bodyData.whatinput === 'mouse') {\n clearTimeout(_this.timeout);\n _this.timeout = setTimeout(function(){\n _this.open();\n _this.$anchors.data('hover', true);\n }, _this.options.hoverDelay);\n }\n }).on('mouseleave.zf.dropdown', ignoreMousedisappear(function(){\n clearTimeout(_this.timeout);\n _this.timeout = setTimeout(function(){\n _this.close();\n _this.$anchors.data('hover', false);\n }, _this.options.hoverDelay);\n }));\n if(this.options.hoverPane){\n this.$element.off('mouseenter.zf.dropdown mouseleave.zf.dropdown')\n .on('mouseenter.zf.dropdown', function(){\n clearTimeout(_this.timeout);\n }).on('mouseleave.zf.dropdown', ignoreMousedisappear(function(){\n clearTimeout(_this.timeout);\n _this.timeout = setTimeout(function(){\n _this.close();\n _this.$anchors.data('hover', false);\n }, _this.options.hoverDelay);\n }));\n }\n }\n this.$anchors.add(this.$element).on('keydown.zf.dropdown', function(e) {\n\n var $target = $(this);\n\n Keyboard.handleKey(e, 'Dropdown', {\n open: function() {\n if ($target.is(_this.$anchors) && !$target.is('input, textarea')) {\n _this.open();\n _this.$element.attr('tabindex', -1).focus();\n e.preventDefault();\n }\n },\n close: function() {\n _this.close();\n _this.$anchors.focus();\n }\n });\n });\n }\n\n /**\n * Adds an event handler to the body to close any dropdowns on a click.\n * @function\n * @private\n */\n _addBodyHandler() {\n var $body = $(document.body).not(this.$element),\n _this = this;\n $body.off('click.zf.dropdown tap.zf.dropdown')\n .on('click.zf.dropdown tap.zf.dropdown', function (e) {\n if(_this.$anchors.is(e.target) || _this.$anchors.find(e.target).length) {\n return;\n }\n if(_this.$element.is(e.target) || _this.$element.find(e.target).length) {\n return;\n }\n _this.close();\n $body.off('click.zf.dropdown tap.zf.dropdown');\n });\n }\n\n /**\n * Opens the dropdown pane, and fires a bubbling event to close other dropdowns.\n * @function\n * @fires Dropdown#closeme\n * @fires Dropdown#show\n */\n open() {\n // var _this = this;\n /**\n * Fires to close other open dropdowns, typically when dropdown is opening\n * @event Dropdown#closeme\n */\n this.$element.trigger('closeme.zf.dropdown', this.$element.attr('id'));\n this.$anchors.addClass('hover')\n .attr({'aria-expanded': true});\n // this.$element/*.show()*/;\n\n this.$element.addClass('is-opening');\n this._setPosition();\n this.$element.removeClass('is-opening').addClass('is-open')\n .attr({'aria-hidden': false});\n\n if(this.options.autoFocus){\n var $focusable = Keyboard.findFocusable(this.$element);\n if($focusable.length){\n $focusable.eq(0).focus();\n }\n }\n\n if(this.options.closeOnClick){ this._addBodyHandler(); }\n\n if (this.options.trapFocus) {\n Keyboard.trapFocus(this.$element);\n }\n\n /**\n * Fires once the dropdown is visible.\n * @event Dropdown#show\n */\n this.$element.trigger('show.zf.dropdown', [this.$element]);\n }\n\n /**\n * Closes the open dropdown pane.\n * @function\n * @fires Dropdown#hide\n */\n close() {\n if(!this.$element.hasClass('is-open')){\n return false;\n }\n this.$element.removeClass('is-open')\n .attr({'aria-hidden': true});\n\n this.$anchors.removeClass('hover')\n .attr('aria-expanded', false);\n\n /**\n * Fires once the dropdown is no longer visible.\n * @event Dropdown#hide\n */\n this.$element.trigger('hide.zf.dropdown', [this.$element]);\n\n if (this.options.trapFocus) {\n Keyboard.releaseFocus(this.$element);\n }\n }\n\n /**\n * Toggles the dropdown pane's visibility.\n * @function\n */\n toggle() {\n if(this.$element.hasClass('is-open')){\n if(this.$anchors.data('hover')) return;\n this.close();\n }else{\n this.open();\n }\n }\n\n /**\n * Destroys the dropdown.\n * @function\n */\n _destroy() {\n this.$element.off('.zf.trigger').hide();\n this.$anchors.off('.zf.dropdown');\n $(document.body).off('click.zf.dropdown tap.zf.dropdown');\n\n }\n}\n\nDropdown.defaults = {\n /**\n * Class that designates bounding container of Dropdown (default: window)\n * @option\n * @type {?string}\n * @default null\n */\n parentClass: null,\n /**\n * Amount of time to delay opening a submenu on hover event.\n * @option\n * @type {number}\n * @default 250\n */\n hoverDelay: 250,\n /**\n * Allow submenus to open on hover events\n * @option\n * @type {boolean}\n * @default false\n */\n hover: false,\n /**\n * Don't close dropdown when hovering over dropdown pane\n * @option\n * @type {boolean}\n * @default false\n */\n hoverPane: false,\n /**\n * Number of pixels between the dropdown pane and the triggering element on open.\n * @option\n * @type {number}\n * @default 0\n */\n vOffset: 0,\n /**\n * Number of pixels between the dropdown pane and the triggering element on open.\n * @option\n * @type {number}\n * @default 0\n */\n hOffset: 0,\n /**\n * Position of dropdown. Can be left, right, bottom, top, or auto.\n * @option\n * @type {string}\n * @default 'auto'\n */\n position: 'auto',\n /**\n * Alignment of dropdown relative to anchor. Can be left, right, bottom, top, center, or auto.\n * @option\n * @type {string}\n * @default 'auto'\n */\n alignment: 'auto',\n /**\n * Allow overlap of container/window. If false, dropdown will first try to position as defined by data-position and data-alignment, but reposition if it would cause an overflow.\n * @option\n * @type {boolean}\n * @default false\n */\n allowOverlap: false,\n /**\n * Allow overlap of only the bottom of the container. This is the most common\n * behavior for dropdowns, allowing the dropdown to extend the bottom of the\n * screen but not otherwise influence or break out of the container.\n * @option\n * @type {boolean}\n * @default true\n */\n allowBottomOverlap: true,\n /**\n * Allow the plugin to trap focus to the dropdown pane if opened with keyboard commands.\n * @option\n * @type {boolean}\n * @default false\n */\n trapFocus: false,\n /**\n * Allow the plugin to set focus to the first focusable element within the pane, regardless of method of opening.\n * @option\n * @type {boolean}\n * @default false\n */\n autoFocus: false,\n /**\n * Allows a click on the body to close the dropdown.\n * @option\n * @type {boolean}\n * @default false\n */\n closeOnClick: false,\n /**\n * If true the default action of the toggle (e.g. follow a link with href) gets executed on click. If hover option is also true the default action gets prevented on first click for mobile / touch devices and executed on second click.\n * @option\n * @type {boolean}\n * @default true\n */\n forceFollow: true\n};\n\nexport {Dropdown};\n","import $ from 'jquery';\nimport { Plugin } from './foundation.core.plugin';\nimport { rtl as Rtl, ignoreMousedisappear } from './foundation.core.utils';\nimport { Keyboard } from './foundation.util.keyboard';\nimport { Nest } from './foundation.util.nest';\nimport { Box } from './foundation.util.box';\nimport { Touch } from './foundation.util.touch'\n\n\n/**\n * DropdownMenu module.\n * @module foundation.dropdownMenu\n * @requires foundation.util.keyboard\n * @requires foundation.util.box\n * @requires foundation.util.nest\n * @requires foundation.util.touch\n */\n\nclass DropdownMenu extends Plugin {\n /**\n * Creates a new instance of DropdownMenu.\n * @class\n * @name DropdownMenu\n * @fires DropdownMenu#init\n * @param {jQuery} element - jQuery object to make into a dropdown menu.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element, options) {\n this.$element = element;\n this.options = $.extend({}, DropdownMenu.defaults, this.$element.data(), options);\n this.className = 'DropdownMenu'; // ie9 back compat\n\n Touch.init($); // Touch init is idempotent, we just need to make sure it's initialied.\n\n this._init();\n\n Keyboard.register('DropdownMenu', {\n 'ENTER': 'open',\n 'SPACE': 'open',\n 'ARROW_RIGHT': 'next',\n 'ARROW_UP': 'up',\n 'ARROW_DOWN': 'down',\n 'ARROW_LEFT': 'previous',\n 'ESCAPE': 'close'\n });\n }\n\n /**\n * Initializes the plugin, and calls _prepareMenu\n * @private\n * @function\n */\n _init() {\n Nest.Feather(this.$element, 'dropdown');\n\n var subs = this.$element.find('li.is-dropdown-submenu-parent');\n this.$element.children('.is-dropdown-submenu-parent').children('.is-dropdown-submenu').addClass('first-sub');\n\n this.$menuItems = this.$element.find('li[role=\"none\"]');\n this.$tabs = this.$element.children('li[role=\"none\"]');\n this.$tabs.find('ul.is-dropdown-submenu').addClass(this.options.verticalClass);\n\n if (this.options.alignment === 'auto') {\n if (this.$element.hasClass(this.options.rightClass) || Rtl() || this.$element.parents('.top-bar-right').is('*')) {\n this.options.alignment = 'right';\n subs.addClass('opens-left');\n } else {\n this.options.alignment = 'left';\n subs.addClass('opens-right');\n }\n } else {\n if (this.options.alignment === 'right') {\n subs.addClass('opens-left');\n } else {\n subs.addClass('opens-right');\n }\n }\n this.changed = false;\n this._events();\n };\n\n _isVertical() {\n return this.$tabs.css('display') === 'block' || this.$element.css('flex-direction') === 'column';\n }\n\n _isRtl() {\n return this.$element.hasClass('align-right') || (Rtl() && !this.$element.hasClass('align-left'));\n }\n\n /**\n * Adds event listeners to elements within the menu\n * @private\n * @function\n */\n _events() {\n var _this = this,\n hasTouch = 'ontouchstart' in window || (typeof window.ontouchstart !== 'undefined'),\n parClass = 'is-dropdown-submenu-parent';\n\n // used for onClick and in the keyboard handlers\n var handleClickFn = function(e) {\n var $elem = $(e.target).parentsUntil('ul', `.${parClass}`),\n hasSub = $elem.hasClass(parClass),\n hasClicked = $elem.attr('data-is-click') === 'true',\n $sub = $elem.children('.is-dropdown-submenu');\n\n if (hasSub) {\n if (hasClicked) {\n if (!_this.options.closeOnClick\n || (!_this.options.clickOpen && !hasTouch)\n || (_this.options.forceFollow && hasTouch)) {\n return;\n }\n e.stopImmediatePropagation();\n e.preventDefault();\n _this._hide($elem);\n }\n else {\n e.stopImmediatePropagation();\n e.preventDefault();\n _this._show($sub);\n $elem.add($elem.parentsUntil(_this.$element, `.${parClass}`)).attr('data-is-click', true);\n }\n }\n };\n\n if (this.options.clickOpen || hasTouch) {\n this.$menuItems.on('click.zf.dropdownMenu touchstart.zf.dropdownMenu', handleClickFn);\n }\n\n // Handle Leaf element Clicks\n if(_this.options.closeOnClickInside){\n this.$menuItems.on('click.zf.dropdownMenu', function() {\n var $elem = $(this),\n hasSub = $elem.hasClass(parClass);\n if(!hasSub){\n _this._hide();\n }\n });\n }\n\n if (hasTouch && this.options.disableHoverOnTouch) this.options.disableHover = true;\n\n if (!this.options.disableHover) {\n this.$menuItems.on('mouseenter.zf.dropdownMenu', function () {\n var $elem = $(this),\n hasSub = $elem.hasClass(parClass);\n\n if (hasSub) {\n clearTimeout($elem.data('_delay'));\n $elem.data('_delay', setTimeout(function () {\n _this._show($elem.children('.is-dropdown-submenu'));\n }, _this.options.hoverDelay));\n }\n }).on('mouseleave.zf.dropdownMenu', ignoreMousedisappear(function () {\n var $elem = $(this),\n hasSub = $elem.hasClass(parClass);\n if (hasSub && _this.options.autoclose) {\n if ($elem.attr('data-is-click') === 'true' && _this.options.clickOpen) { return false; }\n\n clearTimeout($elem.data('_delay'));\n $elem.data('_delay', setTimeout(function () {\n _this._hide($elem);\n }, _this.options.closingTime));\n }\n }));\n }\n this.$menuItems.on('keydown.zf.dropdownMenu', function(e) {\n var $element = $(e.target).parentsUntil('ul', '[role=\"none\"]'),\n isTab = _this.$tabs.index($element) > -1,\n $elements = isTab ? _this.$tabs : $element.siblings('li').add($element),\n $prevElement,\n $nextElement;\n\n $elements.each(function(i) {\n if ($(this).is($element)) {\n $prevElement = $elements.eq(i-1);\n $nextElement = $elements.eq(i+1);\n return;\n }\n });\n\n var nextSibling = function() {\n $nextElement.children('a:first').focus();\n e.preventDefault();\n }, prevSibling = function() {\n $prevElement.children('a:first').focus();\n e.preventDefault();\n }, openSub = function() {\n var $sub = $element.children('ul.is-dropdown-submenu');\n if ($sub.length) {\n _this._show($sub);\n $element.find('li > a:first').focus();\n e.preventDefault();\n } else { return; }\n }, closeSub = function() {\n //if ($element.is(':first-child')) {\n var close = $element.parent('ul').parent('li');\n close.children('a:first').focus();\n _this._hide(close);\n e.preventDefault();\n //}\n };\n var functions = {\n open: openSub,\n close: function() {\n _this._hide(_this.$element);\n _this.$menuItems.eq(0).children('a').focus(); // focus to first element\n e.preventDefault();\n }\n };\n\n if (isTab) {\n if (_this._isVertical()) { // vertical menu\n if (_this._isRtl()) { // right aligned\n $.extend(functions, {\n down: nextSibling,\n up: prevSibling,\n next: closeSub,\n previous: openSub\n });\n } else { // left aligned\n $.extend(functions, {\n down: nextSibling,\n up: prevSibling,\n next: openSub,\n previous: closeSub\n });\n }\n } else { // horizontal menu\n if (_this._isRtl()) { // right aligned\n $.extend(functions, {\n next: prevSibling,\n previous: nextSibling,\n down: openSub,\n up: closeSub\n });\n } else { // left aligned\n $.extend(functions, {\n next: nextSibling,\n previous: prevSibling,\n down: openSub,\n up: closeSub\n });\n }\n }\n } else { // not tabs -> one sub\n if (_this._isRtl()) { // right aligned\n $.extend(functions, {\n next: closeSub,\n previous: openSub,\n down: nextSibling,\n up: prevSibling\n });\n } else { // left aligned\n $.extend(functions, {\n next: openSub,\n previous: closeSub,\n down: nextSibling,\n up: prevSibling\n });\n }\n }\n Keyboard.handleKey(e, 'DropdownMenu', functions);\n\n });\n }\n\n /**\n * Adds an event handler to the body to close any dropdowns on a click.\n * @function\n * @private\n */\n _addBodyHandler() {\n const $body = $(document.body);\n this._removeBodyHandler();\n $body.on('click.zf.dropdownMenu tap.zf.dropdownMenu', (e) => {\n var isItself = !!$(e.target).closest(this.$element).length;\n if (isItself) return;\n\n this._hide();\n this._removeBodyHandler();\n });\n }\n\n /**\n * Remove the body event handler. See `_addBodyHandler`.\n * @function\n * @private\n */\n _removeBodyHandler() {\n $(document.body).off('click.zf.dropdownMenu tap.zf.dropdownMenu');\n }\n\n /**\n * Opens a dropdown pane, and checks for collisions first.\n * @param {jQuery} $sub - ul element that is a submenu to show\n * @function\n * @private\n * @fires DropdownMenu#show\n */\n _show($sub) {\n var idx = this.$tabs.index(this.$tabs.filter(function(i, el) {\n return $(el).find($sub).length > 0;\n }));\n var $sibs = $sub.parent('li.is-dropdown-submenu-parent').siblings('li.is-dropdown-submenu-parent');\n this._hide($sibs, idx);\n $sub.css('visibility', 'hidden').addClass('js-dropdown-active')\n .parent('li.is-dropdown-submenu-parent').addClass('is-active');\n var clear = Box.ImNotTouchingYou($sub, null, true);\n if (!clear) {\n var oldClass = this.options.alignment === 'left' ? '-right' : '-left',\n $parentLi = $sub.parent('.is-dropdown-submenu-parent');\n $parentLi.removeClass(`opens${oldClass}`).addClass(`opens-${this.options.alignment}`);\n clear = Box.ImNotTouchingYou($sub, null, true);\n if (!clear) {\n $parentLi.removeClass(`opens-${this.options.alignment}`).addClass('opens-inner');\n }\n this.changed = true;\n }\n $sub.css('visibility', '');\n if (this.options.closeOnClick) { this._addBodyHandler(); }\n /**\n * Fires when the new dropdown pane is visible.\n * @event DropdownMenu#show\n */\n this.$element.trigger('show.zf.dropdownMenu', [$sub]);\n }\n\n /**\n * Hides a single, currently open dropdown pane, if passed a parameter, otherwise, hides everything.\n * @function\n * @param {jQuery} $elem - element with a submenu to hide\n * @param {Number} idx - index of the $tabs collection to hide\n * @fires DropdownMenu#hide\n * @private\n */\n _hide($elem, idx) {\n var $toClose;\n if ($elem && $elem.length) {\n $toClose = $elem;\n } else if (typeof idx !== 'undefined') {\n $toClose = this.$tabs.not(function(i) {\n return i === idx;\n });\n }\n else {\n $toClose = this.$element;\n }\n var somethingToClose = $toClose.hasClass('is-active') || $toClose.find('.is-active').length > 0;\n\n if (somethingToClose) {\n var $activeItem = $toClose.find('li.is-active');\n $activeItem.add($toClose).attr({\n 'data-is-click': false\n }).removeClass('is-active');\n\n $toClose.find('ul.js-dropdown-active').removeClass('js-dropdown-active');\n\n if (this.changed || $toClose.find('opens-inner').length) {\n var oldClass = this.options.alignment === 'left' ? 'right' : 'left';\n $toClose.find('li.is-dropdown-submenu-parent').add($toClose)\n .removeClass(`opens-inner opens-${this.options.alignment}`)\n .addClass(`opens-${oldClass}`);\n this.changed = false;\n }\n\n clearTimeout($activeItem.data('_delay'));\n this._removeBodyHandler();\n\n /**\n * Fires when the open menus are closed.\n * @event DropdownMenu#hide\n */\n this.$element.trigger('hide.zf.dropdownMenu', [$toClose]);\n }\n }\n\n /**\n * Destroys the plugin.\n * @function\n */\n _destroy() {\n this.$menuItems.off('.zf.dropdownMenu').removeAttr('data-is-click')\n .removeClass('is-right-arrow is-left-arrow is-down-arrow opens-right opens-left opens-inner');\n $(document.body).off('.zf.dropdownMenu');\n Nest.Burn(this.$element, 'dropdown');\n }\n}\n\n/**\n * Default settings for plugin\n */\nDropdownMenu.defaults = {\n /**\n * Disallows hover events from opening submenus\n * @option\n * @type {boolean}\n * @default false\n */\n disableHover: false,\n /**\n * Disallows hover on touch devices\n * @option\n * @type {boolean}\n * @default true\n */\n disableHoverOnTouch: true,\n /**\n * Allow a submenu to automatically close on a mouseleave event, if not clicked open.\n * @option\n * @type {boolean}\n * @default true\n */\n autoclose: true,\n /**\n * Amount of time to delay opening a submenu on hover event.\n * @option\n * @type {number}\n * @default 50\n */\n hoverDelay: 50,\n /**\n * Allow a submenu to open/remain open on parent click event. Allows cursor to move away from menu.\n * @option\n * @type {boolean}\n * @default false\n */\n clickOpen: false,\n /**\n * Amount of time to delay closing a submenu on a mouseleave event.\n * @option\n * @type {number}\n * @default 500\n */\n\n closingTime: 500,\n /**\n * Position of the menu relative to what direction the submenus should open. Handled by JS. Can be `'auto'`, `'left'` or `'right'`.\n * @option\n * @type {string}\n * @default 'auto'\n */\n alignment: 'auto',\n /**\n * Allow clicks on the body to close any open submenus.\n * @option\n * @type {boolean}\n * @default true\n */\n closeOnClick: true,\n /**\n * Allow clicks on leaf anchor links to close any open submenus.\n * @option\n * @type {boolean}\n * @default true\n */\n closeOnClickInside: true,\n /**\n * Class applied to vertical oriented menus, Foundation default is `vertical`. Update this if using your own class.\n * @option\n * @type {string}\n * @default 'vertical'\n */\n verticalClass: 'vertical',\n /**\n * Class applied to right-side oriented menus, Foundation default is `align-right`. Update this if using your own class.\n * @option\n * @type {string}\n * @default 'align-right'\n */\n rightClass: 'align-right',\n /**\n * Boolean to force overide the clicking of links to perform default action, on second touch event for mobile.\n * @option\n * @type {boolean}\n * @default true\n */\n forceFollow: true\n};\n\nexport {DropdownMenu};\n","import $ from 'jquery';\nimport { MediaQuery } from './foundation.util.mediaQuery';\nimport { onImagesLoaded } from './foundation.util.imageLoader';\nimport { GetYoDigits } from './foundation.core.utils';\nimport { Plugin } from './foundation.core.plugin';\n\n/**\n * Equalizer module.\n * @module foundation.equalizer\n * @requires foundation.util.mediaQuery\n * @requires foundation.util.imageLoader if equalizer contains images\n */\n\nclass Equalizer extends Plugin {\n /**\n * Creates a new instance of Equalizer.\n * @class\n * @name Equalizer\n * @fires Equalizer#init\n * @param {Object} element - jQuery object to add the trigger to.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element, options){\n this.$element = element;\n this.options = $.extend({}, Equalizer.defaults, this.$element.data(), options);\n this.className = 'Equalizer'; // ie9 back compat\n\n this._init();\n }\n\n /**\n * Initializes the Equalizer plugin and calls functions to get equalizer functioning on load.\n * @private\n */\n _init() {\n var eqId = this.$element.attr('data-equalizer') || '';\n var $watched = this.$element.find(`[data-equalizer-watch=\"${eqId}\"]`);\n\n MediaQuery._init();\n\n this.$watched = $watched.length ? $watched : this.$element.find('[data-equalizer-watch]');\n this.$element.attr('data-resize', (eqId || GetYoDigits(6, 'eq')));\n this.$element.attr('data-mutate', (eqId || GetYoDigits(6, 'eq')));\n\n this.hasNested = this.$element.find('[data-equalizer]').length > 0;\n this.isNested = this.$element.parentsUntil(document.body, '[data-equalizer]').length > 0;\n this.isOn = false;\n this._bindHandler = {\n onResizeMeBound: this._onResizeMe.bind(this),\n onPostEqualizedBound: this._onPostEqualized.bind(this)\n };\n\n var imgs = this.$element.find('img');\n var tooSmall;\n if(this.options.equalizeOn){\n tooSmall = this._checkMQ();\n $(window).on('changed.zf.mediaquery', this._checkMQ.bind(this));\n }else{\n this._events();\n }\n if((typeof tooSmall !== 'undefined' && tooSmall === false) || typeof tooSmall === 'undefined'){\n if(imgs.length){\n onImagesLoaded(imgs, this._reflow.bind(this));\n }else{\n this._reflow();\n }\n }\n }\n\n /**\n * Removes event listeners if the breakpoint is too small.\n * @private\n */\n _pauseEvents() {\n this.isOn = false;\n this.$element.off({\n '.zf.equalizer': this._bindHandler.onPostEqualizedBound,\n 'resizeme.zf.trigger': this._bindHandler.onResizeMeBound,\n\t 'mutateme.zf.trigger': this._bindHandler.onResizeMeBound\n });\n }\n\n /**\n * function to handle $elements resizeme.zf.trigger, with bound this on _bindHandler.onResizeMeBound\n * @private\n */\n _onResizeMe() {\n this._reflow();\n }\n\n /**\n * function to handle $elements postequalized.zf.equalizer, with bound this on _bindHandler.onPostEqualizedBound\n * @private\n */\n _onPostEqualized(e) {\n if(e.target !== this.$element[0]){ this._reflow(); }\n }\n\n /**\n * Initializes events for Equalizer.\n * @private\n */\n _events() {\n this._pauseEvents();\n if(this.hasNested){\n this.$element.on('postequalized.zf.equalizer', this._bindHandler.onPostEqualizedBound);\n }else{\n this.$element.on('resizeme.zf.trigger', this._bindHandler.onResizeMeBound);\n\t this.$element.on('mutateme.zf.trigger', this._bindHandler.onResizeMeBound);\n }\n this.isOn = true;\n }\n\n /**\n * Checks the current breakpoint to the minimum required size.\n * @private\n */\n _checkMQ() {\n var tooSmall = !MediaQuery.is(this.options.equalizeOn);\n if(tooSmall){\n if(this.isOn){\n this._pauseEvents();\n this.$watched.css('height', 'auto');\n }\n }else{\n if(!this.isOn){\n this._events();\n }\n }\n return tooSmall;\n }\n\n /**\n * A noop version for the plugin\n * @private\n */\n _killswitch() {\n return;\n }\n\n /**\n * Calls necessary functions to update Equalizer upon DOM change\n * @private\n */\n _reflow() {\n if(!this.options.equalizeOnStack){\n if(this._isStacked()){\n this.$watched.css('height', 'auto');\n return false;\n }\n }\n if (this.options.equalizeByRow) {\n this.getHeightsByRow(this.applyHeightByRow.bind(this));\n }else{\n this.getHeights(this.applyHeight.bind(this));\n }\n }\n\n /**\n * Manually determines if the first 2 elements are *NOT* stacked.\n * @private\n */\n _isStacked() {\n if (!this.$watched[0] || !this.$watched[1]) {\n return true;\n }\n return this.$watched[0].getBoundingClientRect().top !== this.$watched[1].getBoundingClientRect().top;\n }\n\n /**\n * Finds the outer heights of children contained within an Equalizer parent and returns them in an array\n * @param {Function} cb - A non-optional callback to return the heights array to.\n * @returns {Array} heights - An array of heights of children within Equalizer container\n */\n getHeights(cb) {\n var heights = [];\n for(var i = 0, len = this.$watched.length; i < len; i++){\n this.$watched[i].style.height = 'auto';\n heights.push(this.$watched[i].offsetHeight);\n }\n cb(heights);\n }\n\n /**\n * Finds the outer heights of children contained within an Equalizer parent and returns them in an array\n * @param {Function} cb - A non-optional callback to return the heights array to.\n * @returns {Array} groups - An array of heights of children within Equalizer container grouped by row with element,height and max as last child\n */\n getHeightsByRow(cb) {\n var lastElTopOffset = (this.$watched.length ? this.$watched.first().offset().top : 0),\n groups = [],\n group = 0;\n //group by Row\n groups[group] = [];\n for(var i = 0, len = this.$watched.length; i < len; i++){\n this.$watched[i].style.height = 'auto';\n //maybe could use this.$watched[i].offsetTop\n var elOffsetTop = $(this.$watched[i]).offset().top;\n if (elOffsetTop !== lastElTopOffset) {\n group++;\n groups[group] = [];\n lastElTopOffset=elOffsetTop;\n }\n groups[group].push([this.$watched[i],this.$watched[i].offsetHeight]);\n }\n\n for (var j = 0, ln = groups.length; j < ln; j++) {\n var heights = $(groups[j]).map(function(){ return this[1]; }).get();\n var max = Math.max.apply(null, heights);\n groups[j].push(max);\n }\n cb(groups);\n }\n\n /**\n * Changes the CSS height property of each child in an Equalizer parent to match the tallest\n * @param {array} heights - An array of heights of children within Equalizer container\n * @fires Equalizer#preequalized\n * @fires Equalizer#postequalized\n */\n applyHeight(heights) {\n var max = Math.max.apply(null, heights);\n /**\n * Fires before the heights are applied\n * @event Equalizer#preequalized\n */\n this.$element.trigger('preequalized.zf.equalizer');\n\n this.$watched.css('height', max);\n\n /**\n * Fires when the heights have been applied\n * @event Equalizer#postequalized\n */\n this.$element.trigger('postequalized.zf.equalizer');\n }\n\n /**\n * Changes the CSS height property of each child in an Equalizer parent to match the tallest by row\n * @param {array} groups - An array of heights of children within Equalizer container grouped by row with element,height and max as last child\n * @fires Equalizer#preequalized\n * @fires Equalizer#preequalizedrow\n * @fires Equalizer#postequalizedrow\n * @fires Equalizer#postequalized\n */\n applyHeightByRow(groups) {\n /**\n * Fires before the heights are applied\n */\n this.$element.trigger('preequalized.zf.equalizer');\n for (var i = 0, len = groups.length; i < len ; i++) {\n var groupsILength = groups[i].length,\n max = groups[i][groupsILength - 1];\n if (groupsILength<=2) {\n $(groups[i][0][0]).css({'height':'auto'});\n continue;\n }\n /**\n * Fires before the heights per row are applied\n * @event Equalizer#preequalizedrow\n */\n this.$element.trigger('preequalizedrow.zf.equalizer');\n for (var j = 0, lenJ = (groupsILength-1); j < lenJ ; j++) {\n $(groups[i][j][0]).css({'height':max});\n }\n /**\n * Fires when the heights per row have been applied\n * @event Equalizer#postequalizedrow\n */\n this.$element.trigger('postequalizedrow.zf.equalizer');\n }\n /**\n * Fires when the heights have been applied\n */\n this.$element.trigger('postequalized.zf.equalizer');\n }\n\n /**\n * Destroys an instance of Equalizer.\n * @function\n */\n _destroy() {\n this._pauseEvents();\n this.$watched.css('height', 'auto');\n }\n}\n\n/**\n * Default settings for plugin\n */\nEqualizer.defaults = {\n /**\n * Enable height equalization when stacked on smaller screens.\n * @option\n * @type {boolean}\n * @default false\n */\n equalizeOnStack: false,\n /**\n * Enable height equalization row by row.\n * @option\n * @type {boolean}\n * @default false\n */\n equalizeByRow: false,\n /**\n * String representing the minimum breakpoint size the plugin should equalize heights on.\n * @option\n * @type {string}\n * @default ''\n */\n equalizeOn: ''\n};\n\nexport {Equalizer};\n","import $ from 'jquery';\nimport { MediaQuery } from './foundation.util.mediaQuery';\nimport { Plugin } from './foundation.core.plugin';\nimport { GetYoDigits } from './foundation.core.utils';\nimport { Triggers } from './foundation.util.triggers';\n\n/**\n * Interchange module.\n * @module foundation.interchange\n * @requires foundation.util.mediaQuery\n */\n\nclass Interchange extends Plugin {\n /**\n * Creates a new instance of Interchange.\n * @class\n * @name Interchange\n * @fires Interchange#init\n * @param {Object} element - jQuery object to add the trigger to.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element, options) {\n this.$element = element;\n this.options = $.extend({}, Interchange.defaults, this.$element.data(), options);\n this.rules = [];\n this.currentPath = '';\n this.className = 'Interchange'; // ie9 back compat\n\n // Triggers init is idempotent, just need to make sure it is initialized\n Triggers.init($);\n\n this._init();\n this._events();\n }\n\n /**\n * Initializes the Interchange plugin and calls functions to get interchange functioning on load.\n * @function\n * @private\n */\n _init() {\n MediaQuery._init();\n\n var id = this.$element[0].id || GetYoDigits(6, 'interchange');\n this.$element.attr({\n 'data-resize': id,\n 'id': id\n });\n\n this._parseOptions();\n this._addBreakpoints();\n this._generateRules();\n this._reflow();\n }\n\n /**\n * Initializes events for Interchange.\n * @function\n * @private\n */\n _events() {\n this.$element.off('resizeme.zf.trigger').on('resizeme.zf.trigger', () => this._reflow());\n }\n\n /**\n * Calls necessary functions to update Interchange upon DOM change\n * @function\n * @private\n */\n _reflow() {\n var match;\n\n // Iterate through each rule, but only save the last match\n for (var i in this.rules) {\n if(this.rules.hasOwnProperty(i)) {\n var rule = this.rules[i];\n if (window.matchMedia(rule.query).matches) {\n match = rule;\n }\n }\n }\n\n if (match) {\n this.replace(match.path);\n }\n }\n\n /**\n * Check options valifity and set defaults for:\n * - `data-interchange-type`: if set, enforce the type of replacement (auto, src, background or html)\n * @function\n * @private\n */\n _parseOptions() {\n var types = ['auto', 'src', 'background', 'html'];\n if (typeof this.options.type === 'undefined')\n this.options.type = 'auto';\n else if (types.indexOf(this.options.type) === -1) {\n console.warn(`Warning: invalid value \"${this.options.type}\" for Interchange option \"type\"`);\n this.options.type = 'auto';\n }\n }\n\n /**\n * Gets the Foundation breakpoints and adds them to the Interchange.SPECIAL_QUERIES object.\n * @function\n * @private\n */\n _addBreakpoints() {\n for (var i in MediaQuery.queries) {\n if (MediaQuery.queries.hasOwnProperty(i)) {\n var query = MediaQuery.queries[i];\n Interchange.SPECIAL_QUERIES[query.name] = query.value;\n }\n }\n }\n\n /**\n * Checks the Interchange element for the provided media query + content pairings\n * @function\n * @private\n * @returns {Array} scenarios - Array of objects that have 'mq' and 'path' keys with corresponding keys\n */\n _generateRules() {\n var rulesList = [];\n var rules;\n\n if (this.options.rules) {\n rules = this.options.rules;\n }\n else {\n rules = this.$element.data('interchange');\n }\n\n rules = typeof rules === 'string' ? rules.match(/\\[.*?, .*?\\]/g) : rules;\n\n for (var i in rules) {\n if(rules.hasOwnProperty(i)) {\n var rule = rules[i].slice(1, -1).split(', ');\n var path = rule.slice(0, -1).join('');\n var query = rule[rule.length - 1];\n\n if (Interchange.SPECIAL_QUERIES[query]) {\n query = Interchange.SPECIAL_QUERIES[query];\n }\n\n rulesList.push({\n path: path,\n query: query\n });\n }\n }\n\n this.rules = rulesList;\n }\n\n /**\n * Update the `src` property of an image, or change the HTML of a container, to the specified path.\n * @function\n * @param {String} path - Path to the image or HTML partial.\n * @fires Interchange#replaced\n */\n replace(path) {\n if (this.currentPath === path) return;\n\n var trigger = 'replaced.zf.interchange';\n\n var type = this.options.type;\n if (type === 'auto') {\n if (this.$element[0].nodeName === 'IMG')\n type = 'src';\n else if (path.match(/\\.(gif|jpe?g|png|svg|tiff)([?#].*)?/i))\n type = 'background';\n else\n type = 'html';\n }\n\n // Replacing images\n if (type === 'src') {\n this.$element.attr('src', path)\n .on('load', () => { this.currentPath = path; })\n .trigger(trigger);\n }\n // Replacing background images\n else if (type === 'background') {\n path = path.replace(/\\(/g, '%28').replace(/\\)/g, '%29');\n this.$element\n .css({ 'background-image': 'url(' + path + ')' })\n .trigger(trigger);\n }\n // Replacing HTML\n else if (type === 'html') {\n $.get(path, (response) => {\n this.$element\n .html(response)\n .trigger(trigger);\n $(response).foundation();\n this.currentPath = path;\n });\n }\n\n /**\n * Fires when content in an Interchange element is done being loaded.\n * @event Interchange#replaced\n */\n // this.$element.trigger('replaced.zf.interchange');\n }\n\n /**\n * Destroys an instance of interchange.\n * @function\n */\n _destroy() {\n this.$element.off('resizeme.zf.trigger')\n }\n}\n\n/**\n * Default settings for plugin\n */\nInterchange.defaults = {\n /**\n * Rules to be applied to Interchange elements. Set with the `data-interchange` array notation.\n * @option\n * @type {?array}\n * @default null\n */\n rules: null,\n\n /**\n * Type of the responsive ressource to replace. It can take the following options:\n * - `auto` (default): choose the type according to the element tag or the ressource extension,\n * - `src`: replace the `[src]` attribute, recommended for images `<img>`.\n * - `background`: replace the `background-image` CSS property.\n * - `html`: replace the element content.\n * @option\n * @type {string}\n * @default 'auto'\n */\n type: 'auto'\n};\n\nInterchange.SPECIAL_QUERIES = {\n 'landscape': 'screen and (orientation: landscape)',\n 'portrait': 'screen and (orientation: portrait)',\n 'retina': 'only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2/1), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx)'\n};\n\nexport {Interchange};\n","import $ from 'jquery';\nimport { Plugin } from './foundation.core.plugin';\nimport { onLoad, GetYoDigits } from './foundation.core.utils';\nimport { SmoothScroll } from './foundation.smoothScroll';\n\nimport { Triggers } from './foundation.util.triggers';\n\n/**\n * Magellan module.\n * @module foundation.magellan\n * @requires foundation.smoothScroll\n * @requires foundation.util.triggers\n */\n\nclass Magellan extends Plugin {\n /**\n * Creates a new instance of Magellan.\n * @class\n * @name Magellan\n * @fires Magellan#init\n * @param {Object} element - jQuery object to add the trigger to.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element, options) {\n this.$element = element;\n this.options = $.extend({}, Magellan.defaults, this.$element.data(), options);\n this.className = 'Magellan'; // ie9 back compat\n\n // Triggers init is idempotent, just need to make sure it is initialized\n Triggers.init($);\n\n this._init();\n this.calcPoints();\n }\n\n /**\n * Initializes the Magellan plugin and calls functions to get equalizer functioning on load.\n * @private\n */\n _init() {\n var id = this.$element[0].id || GetYoDigits(6, 'magellan');\n this.$targets = $('[data-magellan-target]');\n this.$links = this.$element.find('a');\n this.$element.attr({\n 'data-resize': id,\n 'data-scroll': id,\n 'id': id\n });\n this.$active = $();\n this.scrollPos = parseInt(window.pageYOffset, 10);\n\n this._events();\n }\n\n /**\n * Calculates an array of pixel values that are the demarcation lines between locations on the page.\n * Can be invoked if new elements are added or the size of a location changes.\n * @function\n */\n calcPoints() {\n var _this = this,\n body = document.body,\n html = document.documentElement;\n\n this.points = [];\n this.winHeight = Math.round(Math.max(window.innerHeight, html.clientHeight));\n this.docHeight = Math.round(Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight));\n\n this.$targets.each(function(){\n var $tar = $(this),\n pt = Math.round($tar.offset().top - _this.options.threshold);\n $tar.targetPoint = pt;\n _this.points.push(pt);\n });\n }\n\n /**\n * Initializes events for Magellan.\n * @private\n */\n _events() {\n var _this = this;\n\n $(window).one('load', function(){\n if(_this.options.deepLinking){\n if(location.hash){\n _this.scrollToLoc(location.hash);\n }\n }\n _this.calcPoints();\n _this._updateActive();\n });\n\n _this.onLoadListener = onLoad($(window), function () {\n _this.$element\n .on({\n 'resizeme.zf.trigger': _this.reflow.bind(_this),\n 'scrollme.zf.trigger': _this._updateActive.bind(_this)\n })\n .on('click.zf.magellan', 'a[href^=\"#\"]', function (e) {\n e.preventDefault();\n var arrival = this.getAttribute('href');\n _this.scrollToLoc(arrival);\n });\n });\n\n this._deepLinkScroll = function() {\n if(_this.options.deepLinking) {\n _this.scrollToLoc(window.location.hash);\n }\n };\n\n $(window).on('hashchange', this._deepLinkScroll);\n }\n\n /**\n * Function to scroll to a given location on the page.\n * @param {String} loc - a properly formatted jQuery id selector. Example: '#foo'\n * @function\n */\n scrollToLoc(loc) {\n this._inTransition = true;\n var _this = this;\n\n var options = {\n animationEasing: this.options.animationEasing,\n animationDuration: this.options.animationDuration,\n threshold: this.options.threshold,\n offset: this.options.offset\n };\n\n SmoothScroll.scrollToLoc(loc, options, function() {\n _this._inTransition = false;\n })\n }\n\n /**\n * Calls necessary functions to update Magellan upon DOM change\n * @function\n */\n reflow() {\n this.calcPoints();\n this._updateActive();\n }\n\n /**\n * Updates the visibility of an active location link, and updates the url hash for the page, if deepLinking enabled.\n * @private\n * @function\n * @fires Magellan#update\n */\n _updateActive(/*evt, elem, scrollPos*/) {\n if(this._inTransition) return;\n\n const newScrollPos = parseInt(window.pageYOffset, 10);\n const isScrollingUp = this.scrollPos > newScrollPos;\n this.scrollPos = newScrollPos;\n\n let activeIdx;\n // Before the first point: no link\n if(newScrollPos < this.points[0] - this.options.offset - (isScrollingUp ? this.options.threshold : 0)){ /* do nothing */ }\n // At the bottom of the page: last link\n else if(newScrollPos + this.winHeight === this.docHeight){ activeIdx = this.points.length - 1; }\n // Otherwhise, use the last visible link\n else{\n const visibleLinks = this.points.filter((p) => {\n return (p - this.options.offset - (isScrollingUp ? this.options.threshold : 0)) <= newScrollPos;\n });\n activeIdx = visibleLinks.length ? visibleLinks.length - 1 : 0;\n }\n\n // Get the new active link\n const $oldActive = this.$active;\n let activeHash = '';\n if(typeof activeIdx !== 'undefined'){\n this.$active = this.$links.filter('[href=\"#' + this.$targets.eq(activeIdx).data('magellan-target') + '\"]');\n if (this.$active.length) activeHash = this.$active[0].getAttribute('href');\n }else{\n this.$active = $();\n }\n const isNewActive = !(!this.$active.length && !$oldActive.length) && !this.$active.is($oldActive);\n const isNewHash = activeHash !== window.location.hash;\n\n // Update the active link element\n if(isNewActive) {\n $oldActive.removeClass(this.options.activeClass);\n this.$active.addClass(this.options.activeClass);\n }\n\n // Update the hash (it may have changed with the same active link)\n if(this.options.deepLinking && isNewHash){\n if(window.history.pushState){\n // Set or remove the hash (see: https://stackoverflow.com/a/5298684/4317384\n const url = activeHash ? activeHash : window.location.pathname + window.location.search;\n if(this.options.updateHistory){\n window.history.pushState({}, '', url);\n }else{\n window.history.replaceState({}, '', url);\n }\n }else{\n window.location.hash = activeHash;\n }\n }\n\n if (isNewActive) {\n /**\n * Fires when magellan is finished updating to the new active element.\n * @event Magellan#update\n */\n \tthis.$element.trigger('update.zf.magellan', [this.$active]);\n\t }\n }\n\n /**\n * Destroys an instance of Magellan and resets the url of the window.\n * @function\n */\n _destroy() {\n this.$element.off('.zf.trigger .zf.magellan')\n .find(`.${this.options.activeClass}`).removeClass(this.options.activeClass);\n\n if(this.options.deepLinking){\n var hash = this.$active[0].getAttribute('href');\n window.location.hash.replace(hash, '');\n }\n\n $(window).off('hashchange', this._deepLinkScroll)\n if (this.onLoadListener) $(window).off(this.onLoadListener);\n }\n}\n\n/**\n * Default settings for plugin\n */\nMagellan.defaults = {\n /**\n * Amount of time, in ms, the animated scrolling should take between locations.\n * @option\n * @type {number}\n * @default 500\n */\n animationDuration: 500,\n /**\n * Animation style to use when scrolling between locations. Can be `'swing'` or `'linear'`.\n * @option\n * @type {string}\n * @default 'linear'\n * @see {@link https://api.jquery.com/animate|Jquery animate}\n */\n animationEasing: 'linear',\n /**\n * Number of pixels to use as a marker for location changes.\n * @option\n * @type {number}\n * @default 50\n */\n threshold: 50,\n /**\n * Class applied to the active locations link on the magellan container.\n * @option\n * @type {string}\n * @default 'is-active'\n */\n activeClass: 'is-active',\n /**\n * Allows the script to manipulate the url of the current page, and if supported, alter the history.\n * @option\n * @type {boolean}\n * @default false\n */\n deepLinking: false,\n /**\n * Update the browser history with the active link, if deep linking is enabled.\n * @option\n * @type {boolean}\n * @default false\n */\n updateHistory: false,\n /**\n * Number of pixels to offset the scroll of the page on item click if using a sticky nav bar.\n * @option\n * @type {number}\n * @default 0\n */\n offset: 0\n}\n\nexport {Magellan};\n","import $ from 'jquery';\nimport { Plugin } from './foundation.core.plugin';\nimport { onLoad, transitionend, RegExpEscape } from './foundation.core.utils';\nimport { Keyboard } from './foundation.util.keyboard';\nimport { MediaQuery } from './foundation.util.mediaQuery';\n\nimport { Triggers } from './foundation.util.triggers';\n\n/**\n * OffCanvas module.\n * @module foundation.offCanvas\n * @requires foundation.util.keyboard\n * @requires foundation.util.mediaQuery\n * @requires foundation.util.triggers\n */\n\nclass OffCanvas extends Plugin {\n /**\n * Creates a new instance of an off-canvas wrapper.\n * @class\n * @name OffCanvas\n * @fires OffCanvas#init\n * @param {Object} element - jQuery object to initialize.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element, options) {\n this.className = 'OffCanvas'; // ie9 back compat\n this.$element = element;\n this.options = $.extend({}, OffCanvas.defaults, this.$element.data(), options);\n this.contentClasses = { base: [], reveal: [] };\n this.$lastTrigger = $();\n this.$triggers = $();\n this.position = 'left';\n this.$content = $();\n this.nested = !!(this.options.nested);\n this.$sticky = $();\n this.isInCanvas = false;\n\n // Defines the CSS transition/position classes of the off-canvas content container.\n $(['push', 'overlap']).each((index, val) => {\n this.contentClasses.base.push('has-transition-'+val);\n });\n $(['left', 'right', 'top', 'bottom']).each((index, val) => {\n this.contentClasses.base.push('has-position-'+val);\n this.contentClasses.reveal.push('has-reveal-'+val);\n });\n\n // Triggers init is idempotent, just need to make sure it is initialized\n Triggers.init($);\n MediaQuery._init();\n\n this._init();\n this._events();\n\n Keyboard.register('OffCanvas', {\n 'ESCAPE': 'close'\n });\n\n }\n\n /**\n * Initializes the off-canvas wrapper by adding the exit overlay (if needed).\n * @function\n * @private\n */\n _init() {\n var id = this.$element.attr('id');\n\n this.$element.attr('aria-hidden', 'true');\n\n // Find off-canvas content, either by ID (if specified), by siblings or by closest selector (fallback)\n if (this.options.contentId) {\n this.$content = $('#'+this.options.contentId);\n } else if (this.$element.siblings('[data-off-canvas-content]').length) {\n this.$content = this.$element.siblings('[data-off-canvas-content]').first();\n } else {\n this.$content = this.$element.closest('[data-off-canvas-content]').first();\n }\n\n if (!this.options.contentId) {\n // Assume that the off-canvas element is nested if it isn't a sibling of the content\n this.nested = this.$element.siblings('[data-off-canvas-content]').length === 0;\n\n } else if (this.options.contentId && this.options.nested === null) {\n // Warning if using content ID without setting the nested option\n // Once the element is nested it is required to work properly in this case\n console.warn('Remember to use the nested option if using the content ID option!');\n }\n\n if (this.nested === true) {\n // Force transition overlap if nested\n this.options.transition = 'overlap';\n // Remove appropriate classes if already assigned in markup\n this.$element.removeClass('is-transition-push');\n }\n\n this.$element.addClass(`is-transition-${this.options.transition} is-closed`);\n\n // Find triggers that affect this element and add aria-expanded to them\n this.$triggers = $(document)\n .find('[data-open=\"'+id+'\"], [data-close=\"'+id+'\"], [data-toggle=\"'+id+'\"]')\n .attr('aria-expanded', 'false')\n .attr('aria-controls', id);\n\n // Get position by checking for related CSS class\n this.position = this.$element.is('.position-left, .position-top, .position-right, .position-bottom') ? this.$element.attr('class').match(/position\\-(left|top|right|bottom)/)[1] : this.position;\n\n // Add an overlay over the content if necessary\n if (this.options.contentOverlay === true) {\n var overlay = document.createElement('div');\n var overlayPosition = $(this.$element).css(\"position\") === 'fixed' ? 'is-overlay-fixed' : 'is-overlay-absolute';\n overlay.setAttribute('class', 'js-off-canvas-overlay ' + overlayPosition);\n this.$overlay = $(overlay);\n if(overlayPosition === 'is-overlay-fixed') {\n $(this.$overlay).insertAfter(this.$element);\n } else {\n this.$content.append(this.$overlay);\n }\n }\n\n // Get the revealOn option from the class.\n var revealOnRegExp = new RegExp(RegExpEscape(this.options.revealClass) + '([^\\\\s]+)', 'g');\n var revealOnClass = revealOnRegExp.exec(this.$element[0].className);\n if (revealOnClass) {\n this.options.isRevealed = true;\n this.options.revealOn = this.options.revealOn || revealOnClass[1];\n }\n\n // Ensure the `reveal-on-*` class is set.\n if (this.options.isRevealed === true && this.options.revealOn) {\n this.$element.first().addClass(`${this.options.revealClass}${this.options.revealOn}`);\n this._setMQChecker();\n }\n\n if (this.options.transitionTime) {\n this.$element.css('transition-duration', this.options.transitionTime);\n }\n\n // Find fixed elements that should stay fixed while off-canvas is opened\n this.$sticky = this.$content.find('[data-off-canvas-sticky]');\n if (this.$sticky.length > 0 && this.options.transition === 'push') {\n // If there's at least one match force contentScroll:false because the absolute top value doesn't get recalculated on scroll\n // Limit to push transition since there's no transform scope for overlap\n this.options.contentScroll = false;\n }\n\n let inCanvasFor = this.$element.attr('class').match(/\\bin-canvas-for-(\\w+)/);\n if (inCanvasFor && inCanvasFor.length === 2) {\n // Set `inCanvasOn` option if found in-canvas-for-[BREAKPONT] CSS class\n this.options.inCanvasOn = inCanvasFor[1];\n } else if (this.options.inCanvasOn) {\n // Ensure the CSS class is set\n this.$element.addClass(`in-canvas-for-${this.options.inCanvasOn}`);\n }\n\n if (this.options.inCanvasOn) {\n this._checkInCanvas();\n }\n\n // Initally remove all transition/position CSS classes from off-canvas content container.\n this._removeContentClasses();\n }\n\n /**\n * Adds event handlers to the off-canvas wrapper and the exit overlay.\n * @function\n * @private\n */\n _events() {\n this.$element.off('.zf.trigger .zf.offCanvas').on({\n 'open.zf.trigger': this.open.bind(this),\n 'close.zf.trigger': this.close.bind(this),\n 'toggle.zf.trigger': this.toggle.bind(this),\n 'keydown.zf.offCanvas': this._handleKeyboard.bind(this)\n });\n\n if (this.options.closeOnClick === true) {\n var $target = this.options.contentOverlay ? this.$overlay : this.$content;\n $target.on({'click.zf.offCanvas': this.close.bind(this)});\n }\n\n if (this.options.inCanvasOn) {\n $(window).on('changed.zf.mediaquery', () => {\n this._checkInCanvas();\n });\n }\n\n }\n\n /**\n * Applies event listener for elements that will reveal at certain breakpoints.\n * @private\n */\n _setMQChecker() {\n var _this = this;\n\n this.onLoadListener = onLoad($(window), function () {\n if (MediaQuery.atLeast(_this.options.revealOn)) {\n _this.reveal(true);\n }\n });\n\n $(window).on('changed.zf.mediaquery', function () {\n if (MediaQuery.atLeast(_this.options.revealOn)) {\n _this.reveal(true);\n } else {\n _this.reveal(false);\n }\n });\n }\n\n /**\n * Checks if InCanvas on current breakpoint and adjust off-canvas accordingly\n * @private\n */\n _checkInCanvas() {\n this.isInCanvas = MediaQuery.atLeast(this.options.inCanvasOn);\n if (this.isInCanvas === true) {\n this.close();\n }\n }\n\n /**\n * Removes the CSS transition/position classes of the off-canvas content container.\n * Removing the classes is important when another off-canvas gets opened that uses the same content container.\n * @param {Boolean} hasReveal - true if related off-canvas element is revealed.\n * @private\n */\n _removeContentClasses(hasReveal) {\n if (typeof hasReveal !== 'boolean') {\n this.$content.removeClass(this.contentClasses.base.join(' '));\n } else if (hasReveal === false) {\n this.$content.removeClass(`has-reveal-${this.position}`);\n }\n }\n\n /**\n * Adds the CSS transition/position classes of the off-canvas content container, based on the opening off-canvas element.\n * Beforehand any transition/position class gets removed.\n * @param {Boolean} hasReveal - true if related off-canvas element is revealed.\n * @private\n */\n _addContentClasses(hasReveal) {\n this._removeContentClasses(hasReveal);\n if (typeof hasReveal !== 'boolean') {\n this.$content.addClass(`has-transition-${this.options.transition} has-position-${this.position}`);\n } else if (hasReveal === true) {\n this.$content.addClass(`has-reveal-${this.position}`);\n }\n }\n\n /**\n * Preserves the fixed behavior of sticky elements on opening an off-canvas with push transition.\n * Since the off-canvas container has got a transform scope in such a case, it is done by calculating position absolute values.\n * @private\n */\n _fixStickyElements() {\n this.$sticky.each((_, el) => {\n const $el = $(el);\n\n // If sticky element is currently fixed, adjust its top value to match absolute position due to transform scope\n // Limit to push transition because postion:fixed works without problems for overlap (no transform scope)\n if ($el.css('position') === 'fixed') {\n\n // Save current inline styling to restore it if undoing the absolute fixing\n let topVal = parseInt($el.css('top'), 10);\n $el.data('offCanvasSticky', { top: topVal });\n\n let absoluteTopVal = $(document).scrollTop() + topVal;\n $el.css({ top: `${absoluteTopVal}px`, width: '100%', transition: 'none' });\n }\n });\n }\n\n /**\n * Restores the original fixed styling of sticky elements after having closed an off-canvas that got pseudo fixed beforehand.\n * This reverts the changes of _fixStickyElements()\n * @private\n */\n _unfixStickyElements() {\n this.$sticky.each((_, el) => {\n const $el = $(el);\n let stickyData = $el.data('offCanvasSticky');\n\n // If sticky element has got data object with prior values (meaning it was originally fixed) restore these values once off-canvas is closed\n if (typeof stickyData === 'object') {\n $el.css({ top: `${stickyData.top}px`, width: '', transition: '' })\n $el.data('offCanvasSticky', '');\n }\n });\n }\n\n /**\n * Handles the revealing/hiding the off-canvas at breakpoints, not the same as open.\n * @param {Boolean} isRevealed - true if element should be revealed.\n * @function\n */\n reveal(isRevealed) {\n if (isRevealed) {\n this.close();\n this.isRevealed = true;\n this.$element.attr('aria-hidden', 'false');\n this.$element.off('open.zf.trigger toggle.zf.trigger');\n this.$element.removeClass('is-closed');\n } else {\n this.isRevealed = false;\n this.$element.attr('aria-hidden', 'true');\n this.$element.off('open.zf.trigger toggle.zf.trigger').on({\n 'open.zf.trigger': this.open.bind(this),\n 'toggle.zf.trigger': this.toggle.bind(this)\n });\n this.$element.addClass('is-closed');\n }\n this._addContentClasses(isRevealed);\n }\n\n /**\n * Stops scrolling of the body when OffCanvas is open on mobile Safari and other troublesome browsers.\n * @function\n * @private\n */\n _stopScrolling() {\n return false;\n }\n\n /**\n * Save current finger y-position\n * @param event\n * @private\n */\n _recordScrollable(event) {\n const elem = this;\n elem.lastY = event.touches[0].pageY;\n }\n\n /**\n * Prevent further scrolling when it hits the edges\n * @param event\n * @private\n */\n _preventDefaultAtEdges(event) {\n const elem = this;\n const _this = event.data;\n const delta = elem.lastY - event.touches[0].pageY;\n elem.lastY = event.touches[0].pageY;\n\n if (!_this._canScroll(delta, elem)) {\n event.preventDefault();\n }\n }\n\n /**\n * Handle continuous scrolling of scrollbox\n * Don't bubble up to _preventDefaultAtEdges\n * @param event\n * @private\n */\n _scrollboxTouchMoved(event) {\n const elem = this;\n const _this = event.data;\n const parent = elem.closest('[data-off-canvas], [data-off-canvas-scrollbox-outer]');\n const delta = elem.lastY - event.touches[0].pageY;\n parent.lastY = elem.lastY = event.touches[0].pageY;\n\n event.stopPropagation();\n\n if (!_this._canScroll(delta, elem)) {\n if (!_this._canScroll(delta, parent)) {\n event.preventDefault();\n } else {\n parent.scrollTop += delta;\n }\n }\n }\n\n /**\n * Detect possibility of scrolling\n * @param delta\n * @param elem\n * @returns boolean\n * @private\n */\n _canScroll(delta, elem) {\n const up = delta < 0;\n const down = delta > 0;\n const allowUp = elem.scrollTop > 0;\n const allowDown = elem.scrollTop < elem.scrollHeight - elem.clientHeight;\n return up && allowUp || down && allowDown;\n }\n\n /**\n * Opens the off-canvas menu.\n * @function\n * @param {Object} event - Event object passed from listener.\n * @param {jQuery} trigger - element that triggered the off-canvas to open.\n * @fires OffCanvas#opened\n * @todo also trigger 'open' event?\n */\n open(event, trigger) {\n if (this.$element.hasClass('is-open') || this.isRevealed || this.isInCanvas) { return; }\n var _this = this;\n\n if (trigger) {\n this.$lastTrigger = trigger;\n }\n\n if (this.options.forceTo === 'top') {\n window.scrollTo(0, 0);\n } else if (this.options.forceTo === 'bottom') {\n window.scrollTo(0,document.body.scrollHeight);\n }\n\n if (this.options.transitionTime && this.options.transition !== 'overlap') {\n this.$element.siblings('[data-off-canvas-content]').css('transition-duration', this.options.transitionTime);\n } else {\n this.$element.siblings('[data-off-canvas-content]').css('transition-duration', '');\n }\n\n this.$element.addClass('is-open').removeClass('is-closed');\n\n this.$triggers.attr('aria-expanded', 'true');\n this.$element.attr('aria-hidden', 'false');\n\n this.$content.addClass('is-open-' + this.position);\n\n // If `contentScroll` is set to false, add class and disable scrolling on touch devices.\n if (this.options.contentScroll === false) {\n $('body').addClass('is-off-canvas-open').on('touchmove', this._stopScrolling);\n this.$element.on('touchstart', this._recordScrollable);\n this.$element.on('touchmove', this, this._preventDefaultAtEdges);\n this.$element.on('touchstart', '[data-off-canvas-scrollbox]', this._recordScrollable);\n this.$element.on('touchmove', '[data-off-canvas-scrollbox]', this, this._scrollboxTouchMoved);\n }\n\n if (this.options.contentOverlay === true) {\n this.$overlay.addClass('is-visible');\n }\n\n if (this.options.closeOnClick === true && this.options.contentOverlay === true) {\n this.$overlay.addClass('is-closable');\n }\n\n if (this.options.autoFocus === true) {\n this.$element.one(transitionend(this.$element), function() {\n if (!_this.$element.hasClass('is-open')) {\n return; // exit if prematurely closed\n }\n var canvasFocus = _this.$element.find('[data-autofocus]');\n if (canvasFocus.length) {\n canvasFocus.eq(0).focus();\n } else {\n _this.$element.find('a, button').eq(0).focus();\n }\n });\n }\n\n if (this.options.trapFocus === true) {\n this.$content.attr('tabindex', '-1');\n Keyboard.trapFocus(this.$element);\n }\n\n if (this.options.transition === 'push') {\n this._fixStickyElements();\n }\n\n this._addContentClasses();\n\n /**\n * Fires when the off-canvas menu opens.\n * @event OffCanvas#opened\n */\n this.$element.trigger('opened.zf.offCanvas');\n\n /**\n * Fires when the off-canvas menu open transition is done.\n * @event OffCanvas#openedEnd\n */\n this.$element.one(transitionend(this.$element), () => {\n this.$element.trigger('openedEnd.zf.offCanvas');\n });\n }\n\n /**\n * Closes the off-canvas menu.\n * @function\n * @param {Function} cb - optional cb to fire after closure.\n * @fires OffCanvas#close\n * @fires OffCanvas#closed\n */\n close() {\n if (!this.$element.hasClass('is-open') || this.isRevealed) { return; }\n\n /**\n * Fires when the off-canvas menu closes.\n * @event OffCanvas#close\n */\n this.$element.trigger('close.zf.offCanvas');\n\n this.$element.removeClass('is-open');\n\n this.$element.attr('aria-hidden', 'true');\n\n this.$content.removeClass('is-open-left is-open-top is-open-right is-open-bottom');\n\n if (this.options.contentOverlay === true) {\n this.$overlay.removeClass('is-visible');\n }\n\n if (this.options.closeOnClick === true && this.options.contentOverlay === true) {\n this.$overlay.removeClass('is-closable');\n }\n\n this.$triggers.attr('aria-expanded', 'false');\n\n\n // Listen to transitionEnd: add class, re-enable scrolling and release focus when done.\n this.$element.one(transitionend(this.$element), () => {\n\n this.$element.addClass('is-closed');\n this._removeContentClasses();\n\n if (this.options.transition === 'push') {\n this._unfixStickyElements();\n }\n\n // If `contentScroll` is set to false, remove class and re-enable scrolling on touch devices.\n if (this.options.contentScroll === false) {\n $('body').removeClass('is-off-canvas-open').off('touchmove', this._stopScrolling);\n this.$element.off('touchstart', this._recordScrollable);\n this.$element.off('touchmove', this._preventDefaultAtEdges);\n this.$element.off('touchstart', '[data-off-canvas-scrollbox]', this._recordScrollable);\n this.$element.off('touchmove', '[data-off-canvas-scrollbox]', this._scrollboxTouchMoved);\n }\n\n if (this.options.trapFocus === true) {\n this.$content.removeAttr('tabindex');\n Keyboard.releaseFocus(this.$element);\n }\n\n /**\n * Fires when the off-canvas menu close transition is done.\n * @event OffCanvas#closed\n */\n this.$element.trigger('closed.zf.offCanvas');\n });\n }\n\n /**\n * Toggles the off-canvas menu open or closed.\n * @function\n * @param {Object} event - Event object passed from listener.\n * @param {jQuery} trigger - element that triggered the off-canvas to open.\n */\n toggle(event, trigger) {\n if (this.$element.hasClass('is-open')) {\n this.close(event, trigger);\n }\n else {\n this.open(event, trigger);\n }\n }\n\n /**\n * Handles keyboard input when detected. When the escape key is pressed, the off-canvas menu closes, and focus is restored to the element that opened the menu.\n * @function\n * @private\n */\n _handleKeyboard(e) {\n Keyboard.handleKey(e, 'OffCanvas', {\n close: () => {\n this.close();\n this.$lastTrigger.focus();\n return true;\n },\n handled: () => {\n e.preventDefault();\n }\n });\n }\n\n /**\n * Destroys the OffCanvas plugin.\n * @function\n */\n _destroy() {\n this.close();\n this.$element.off('.zf.trigger .zf.offCanvas');\n this.$overlay.off('.zf.offCanvas');\n if (this.onLoadListener) $(window).off(this.onLoadListener);\n }\n}\n\nOffCanvas.defaults = {\n /**\n * Allow the user to click outside of the menu to close it.\n * @option\n * @type {boolean}\n * @default true\n */\n closeOnClick: true,\n\n /**\n * Adds an overlay on top of `[data-off-canvas-content]`.\n * @option\n * @type {boolean}\n * @default true\n */\n contentOverlay: true,\n\n /**\n * Target an off-canvas content container by ID that may be placed anywhere. If null the closest content container will be taken.\n * @option\n * @type {?string}\n * @default null\n */\n contentId: null,\n\n /**\n * Define the off-canvas element is nested in an off-canvas content. This is required when using the contentId option for a nested element.\n * @option\n * @type {boolean}\n * @default null\n */\n nested: null,\n\n /**\n * Enable/disable scrolling of the main content when an off canvas panel is open.\n * @option\n * @type {boolean}\n * @default true\n */\n contentScroll: true,\n\n /**\n * Amount of time the open and close transition requires, including the appropriate milliseconds (`ms`) or seconds (`s`) unit (e.g. `500ms`, `.75s`) If none selected, pulls from body style.\n * @option\n * @type {string}\n * @default null\n */\n transitionTime: null,\n\n /**\n * Type of transition for the OffCanvas menu. Options are 'push', 'detached' or 'slide'.\n * @option\n * @type {string}\n * @default push\n */\n transition: 'push',\n\n /**\n * Force the page to scroll to top or bottom on open.\n * @option\n * @type {?string}\n * @default null\n */\n forceTo: null,\n\n /**\n * Allow the OffCanvas to remain open for certain breakpoints.\n * @option\n * @type {boolean}\n * @default false\n */\n isRevealed: false,\n\n /**\n * Breakpoint at which to reveal. JS will use a RegExp to target standard classes, if changing classnames, pass your class with the `revealClass` option.\n * @option\n * @type {?string}\n * @default null\n */\n revealOn: null,\n\n /**\n * Breakpoint at which the off-canvas gets moved into canvas content and acts as regular page element.\n * @option\n * @type {?string}\n * @default null\n */\n inCanvasOn: null,\n\n /**\n * Force focus to the offcanvas on open. If true, will focus the opening trigger on close.\n * @option\n * @type {boolean}\n * @default true\n */\n autoFocus: true,\n\n /**\n * Class used to force an OffCanvas to remain open. Foundation defaults for this are `reveal-for-large` & `reveal-for-medium`.\n * @option\n * @type {string}\n * @default reveal-for-\n * @todo improve the regex testing for this.\n */\n revealClass: 'reveal-for-',\n\n /**\n * Triggers optional focus trapping when opening an OffCanvas. Sets tabindex of [data-off-canvas-content] to -1 for accessibility purposes.\n * @option\n * @type {boolean}\n * @default false\n */\n trapFocus: false\n}\n\nexport {OffCanvas};\n","import $ from 'jquery';\nimport { Keyboard } from './foundation.util.keyboard';\nimport { Motion } from './foundation.util.motion';\nimport { Timer } from './foundation.util.timer';\nimport { onImagesLoaded } from './foundation.util.imageLoader';\nimport { GetYoDigits } from './foundation.core.utils';\nimport { Plugin } from './foundation.core.plugin';\nimport { Touch } from './foundation.util.touch'\n\n\n/**\n * Orbit module.\n * @module foundation.orbit\n * @requires foundation.util.keyboard\n * @requires foundation.util.motion\n * @requires foundation.util.timer\n * @requires foundation.util.imageLoader\n * @requires foundation.util.touch\n */\n\nclass Orbit extends Plugin {\n /**\n * Creates a new instance of an orbit carousel.\n * @class\n * @name Orbit\n * @param {jQuery} element - jQuery object to make into an Orbit Carousel.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element, options){\n this.$element = element;\n this.options = $.extend({}, Orbit.defaults, this.$element.data(), options);\n this.className = 'Orbit'; // ie9 back compat\n\n Touch.init($); // Touch init is idempotent, we just need to make sure it's initialied.\n\n this._init();\n\n Keyboard.register('Orbit', {\n 'ltr': {\n 'ARROW_RIGHT': 'next',\n 'ARROW_LEFT': 'previous'\n },\n 'rtl': {\n 'ARROW_LEFT': 'next',\n 'ARROW_RIGHT': 'previous'\n }\n });\n }\n\n /**\n * Initializes the plugin by creating jQuery collections, setting attributes, and starting the animation.\n * @function\n * @private\n */\n _init() {\n // @TODO: consider discussion on PR #9278 about DOM pollution by changeSlide\n this._reset();\n\n this.$wrapper = this.$element.find(`.${this.options.containerClass}`);\n this.$slides = this.$element.find(`.${this.options.slideClass}`);\n\n var $images = this.$element.find('img'),\n initActive = this.$slides.filter('.is-active'),\n id = this.$element[0].id || GetYoDigits(6, 'orbit');\n\n this.$element.attr({\n 'data-resize': id,\n 'id': id\n });\n\n if (!initActive.length) {\n this.$slides.eq(0).addClass('is-active');\n }\n\n if (!this.options.useMUI) {\n this.$slides.addClass('no-motionui');\n }\n\n if ($images.length) {\n onImagesLoaded($images, this._prepareForOrbit.bind(this));\n } else {\n this._prepareForOrbit();//hehe\n }\n\n if (this.options.bullets) {\n this._loadBullets();\n }\n\n this._events();\n\n if (this.options.autoPlay && this.$slides.length > 1) {\n this.geoSync();\n }\n\n if (this.options.accessible) { // allow wrapper to be focusable to enable arrow navigation\n this.$wrapper.attr('tabindex', 0);\n }\n }\n\n /**\n * Creates a jQuery collection of bullets, if they are being used.\n * @function\n * @private\n */\n _loadBullets() {\n this.$bullets = this.$element.find(`.${this.options.boxOfBullets}`).find('button');\n }\n\n /**\n * Sets a `timer` object on the orbit, and starts the counter for the next slide.\n * @function\n */\n geoSync() {\n var _this = this;\n this.timer = new Timer(\n this.$element,\n {\n duration: this.options.timerDelay,\n infinite: false\n },\n function() {\n _this.changeSlide(true);\n });\n this.timer.start();\n }\n\n /**\n * Sets wrapper and slide heights for the orbit.\n * @function\n * @private\n */\n _prepareForOrbit() {\n this._setWrapperHeight();\n }\n\n /**\n * Calulates the height of each slide in the collection, and uses the tallest one for the wrapper height.\n * @function\n * @private\n * @param {Function} cb - a callback function to fire when complete.\n */\n _setWrapperHeight(cb) {//rewrite this to `for` loop\n var max = 0, temp, counter = 0, _this = this;\n\n this.$slides.each(function() {\n temp = this.getBoundingClientRect().height;\n $(this).attr('data-slide', counter);\n\n // hide all slides but the active one\n if (!/mui/g.test($(this)[0].className) && _this.$slides.filter('.is-active')[0] !== _this.$slides.eq(counter)[0]) {\n $(this).css({'display': 'none'});\n }\n max = temp > max ? temp : max;\n counter++;\n });\n\n if (counter === this.$slides.length) {\n this.$wrapper.css({'height': max}); //only change the wrapper height property once.\n if(cb) {cb(max);} //fire callback with max height dimension.\n }\n }\n\n /**\n * Sets the max-height of each slide.\n * @function\n * @private\n */\n _setSlideHeight(height) {\n this.$slides.each(function() {\n $(this).css('max-height', height);\n });\n }\n\n /**\n * Adds event listeners to basically everything within the element.\n * @function\n * @private\n */\n _events() {\n var _this = this;\n\n //***************************************\n //**Now using custom event - thanks to:**\n //** Yohai Ararat of Toronto **\n //***************************************\n //\n this.$element.off('.resizeme.zf.trigger').on({\n 'resizeme.zf.trigger': this._prepareForOrbit.bind(this)\n })\n if (this.$slides.length > 1) {\n\n if (this.options.swipe) {\n this.$slides.off('swipeleft.zf.orbit swiperight.zf.orbit')\n .on('swipeleft.zf.orbit', function(e){\n e.preventDefault();\n _this.changeSlide(true);\n }).on('swiperight.zf.orbit', function(e){\n e.preventDefault();\n _this.changeSlide(false);\n });\n }\n //***************************************\n\n if (this.options.autoPlay) {\n this.$slides.on('click.zf.orbit', function() {\n _this.$element.data('clickedOn', _this.$element.data('clickedOn') ? false : true);\n _this.timer[_this.$element.data('clickedOn') ? 'pause' : 'start']();\n });\n\n if (this.options.pauseOnHover) {\n this.$element.on('mouseenter.zf.orbit', function() {\n _this.timer.pause();\n }).on('mouseleave.zf.orbit', function() {\n if (!_this.$element.data('clickedOn')) {\n _this.timer.start();\n }\n });\n }\n }\n\n if (this.options.navButtons) {\n var $controls = this.$element.find(`.${this.options.nextClass}, .${this.options.prevClass}`);\n $controls.attr('tabindex', 0)\n //also need to handle enter/return and spacebar key presses\n .on('click.zf.orbit touchend.zf.orbit', function(e){\n\t e.preventDefault();\n _this.changeSlide($(this).hasClass(_this.options.nextClass));\n });\n }\n\n if (this.options.bullets) {\n this.$bullets.on('click.zf.orbit touchend.zf.orbit', function() {\n if (/is-active/g.test(this.className)) { return false; }//if this is active, kick out of function.\n var idx = $(this).data('slide'),\n ltr = idx > _this.$slides.filter('.is-active').data('slide'),\n $slide = _this.$slides.eq(idx);\n\n _this.changeSlide(ltr, $slide, idx);\n });\n }\n\n if (this.options.accessible) {\n this.$wrapper.add(this.$bullets).on('keydown.zf.orbit', function(e) {\n // handle keyboard event with keyboard util\n Keyboard.handleKey(e, 'Orbit', {\n next: function() {\n _this.changeSlide(true);\n },\n previous: function() {\n _this.changeSlide(false);\n },\n handled: function() { // if bullet is focused, make sure focus moves\n if ($(e.target).is(_this.$bullets)) {\n _this.$bullets.filter('.is-active').focus();\n }\n }\n });\n });\n }\n }\n }\n\n /**\n * Resets Orbit so it can be reinitialized\n */\n _reset() {\n // Don't do anything if there are no slides (first run)\n if (typeof this.$slides === 'undefined') {\n return;\n }\n\n if (this.$slides.length > 1) {\n // Remove old events\n this.$element.off('.zf.orbit').find('*').off('.zf.orbit')\n\n // Restart timer if autoPlay is enabled\n if (this.options.autoPlay) {\n this.timer.restart();\n }\n\n // Reset all sliddes\n this.$slides.each(function(el) {\n $(el).removeClass('is-active is-active is-in')\n .removeAttr('aria-live')\n .hide();\n });\n\n // Show the first slide\n this.$slides.first().addClass('is-active').show();\n\n // Triggers when the slide has finished animating\n this.$element.trigger('slidechange.zf.orbit', [this.$slides.first()]);\n\n // Select first bullet if bullets are present\n if (this.options.bullets) {\n this._updateBullets(0);\n }\n }\n }\n\n /**\n * Changes the current slide to a new one.\n * @function\n * @param {Boolean} isLTR - if true the slide moves from right to left, if false the slide moves from left to right.\n * @param {jQuery} chosenSlide - the jQuery element of the slide to show next, if one is selected.\n * @param {Number} idx - the index of the new slide in its collection, if one chosen.\n * @fires Orbit#slidechange\n */\n changeSlide(isLTR, chosenSlide, idx) {\n if (!this.$slides) {return; } // Don't freak out if we're in the middle of cleanup\n var $curSlide = this.$slides.filter('.is-active').eq(0);\n\n if (/mui/g.test($curSlide[0].className)) { return false; } //if the slide is currently animating, kick out of the function\n\n var $firstSlide = this.$slides.first(),\n $lastSlide = this.$slides.last(),\n dirIn = isLTR ? 'Right' : 'Left',\n dirOut = isLTR ? 'Left' : 'Right',\n _this = this,\n $newSlide;\n\n if (!chosenSlide) { //most of the time, this will be auto played or clicked from the navButtons.\n $newSlide = isLTR ? //if wrapping enabled, check to see if there is a `next` or `prev` sibling, if not, select the first or last slide to fill in. if wrapping not enabled, attempt to select `next` or `prev`, if there's nothing there, the function will kick out on next step. CRAZY NESTED TERNARIES!!!!!\n (this.options.infiniteWrap ? $curSlide.next(`.${this.options.slideClass}`).length ? $curSlide.next(`.${this.options.slideClass}`) : $firstSlide : $curSlide.next(`.${this.options.slideClass}`))//pick next slide if moving left to right\n :\n (this.options.infiniteWrap ? $curSlide.prev(`.${this.options.slideClass}`).length ? $curSlide.prev(`.${this.options.slideClass}`) : $lastSlide : $curSlide.prev(`.${this.options.slideClass}`));//pick prev slide if moving right to left\n } else {\n $newSlide = chosenSlide;\n }\n\n if ($newSlide.length) {\n /**\n * Triggers before the next slide starts animating in and only if a next slide has been found.\n * @event Orbit#beforeslidechange\n */\n this.$element.trigger('beforeslidechange.zf.orbit', [$curSlide, $newSlide]);\n\n if (this.options.bullets) {\n idx = idx || this.$slides.index($newSlide); //grab index to update bullets\n this._updateBullets(idx);\n }\n\n if (this.options.useMUI && !this.$element.is(':hidden')) {\n Motion.animateIn(\n $newSlide.addClass('is-active'),\n this.options[`animInFrom${dirIn}`],\n function(){\n $newSlide.css({'display': 'block'}).attr('aria-live', 'polite');\n });\n\n Motion.animateOut(\n $curSlide.removeClass('is-active'),\n this.options[`animOutTo${dirOut}`],\n function(){\n $curSlide.removeAttr('aria-live');\n if(_this.options.autoPlay && !_this.timer.isPaused){\n _this.timer.restart();\n }\n //do stuff?\n });\n } else {\n $curSlide.removeClass('is-active is-in').removeAttr('aria-live').hide();\n $newSlide.addClass('is-active is-in').attr('aria-live', 'polite').show();\n if (this.options.autoPlay && !this.timer.isPaused) {\n this.timer.restart();\n }\n }\n /**\n * Triggers when the slide has finished animating in.\n * @event Orbit#slidechange\n */\n this.$element.trigger('slidechange.zf.orbit', [$newSlide]);\n }\n }\n\n /**\n * Updates the active state of the bullets, if displayed.\n * Move the descriptor of the current slide `[data-slide-active-label]` to the newly active bullet.\n * If no `[data-slide-active-label]` is set, will move the exceeding `span` element.\n *\n * @function\n * @private\n * @param {Number} idx - the index of the current slide.\n */\n _updateBullets(idx) {\n var $oldBullet = this.$bullets.filter('.is-active');\n var $othersBullets = this.$bullets.not('.is-active');\n var $newBullet = this.$bullets.eq(idx);\n\n $oldBullet.removeClass('is-active').blur();\n $newBullet.addClass('is-active');\n\n // Find the descriptor for the current slide to move it to the new slide button\n var activeStateDescriptor = $oldBullet.children('[data-slide-active-label]').last();\n\n // If not explicitely given, search for the last \"exceeding\" span element (compared to others bullets).\n if (!activeStateDescriptor.length) {\n var spans = $oldBullet.children('span');\n var spanCountInOthersBullets = $othersBullets.toArray().map(b => $(b).children('span').length);\n\n // If there is an exceeding span element, use it as current slide descriptor\n if (spanCountInOthersBullets.every(count => count < spans.length)) {\n activeStateDescriptor = spans.last();\n activeStateDescriptor.attr('data-slide-active-label', '');\n }\n }\n\n // Move the current slide descriptor to the new slide button\n if (activeStateDescriptor.length) {\n activeStateDescriptor.detach();\n $newBullet.append(activeStateDescriptor);\n }\n }\n\n /**\n * Destroys the carousel and hides the element.\n * @function\n */\n _destroy() {\n this.$element.off('.zf.orbit').find('*').off('.zf.orbit').end().hide();\n }\n}\n\nOrbit.defaults = {\n /**\n * Tells the JS to look for and loadBullets.\n * @option\n * @type {boolean}\n * @default true\n */\n bullets: true,\n /**\n * Tells the JS to apply event listeners to nav buttons\n * @option\n * @type {boolean}\n * @default true\n */\n navButtons: true,\n /**\n * motion-ui animation class to apply\n * @option\n * @type {string}\n * @default 'slide-in-right'\n */\n animInFromRight: 'slide-in-right',\n /**\n * motion-ui animation class to apply\n * @option\n * @type {string}\n * @default 'slide-out-right'\n */\n animOutToRight: 'slide-out-right',\n /**\n * motion-ui animation class to apply\n * @option\n * @type {string}\n * @default 'slide-in-left'\n *\n */\n animInFromLeft: 'slide-in-left',\n /**\n * motion-ui animation class to apply\n * @option\n * @type {string}\n * @default 'slide-out-left'\n */\n animOutToLeft: 'slide-out-left',\n /**\n * Allows Orbit to automatically animate on page load.\n * @option\n * @type {boolean}\n * @default true\n */\n autoPlay: true,\n /**\n * Amount of time, in ms, between slide transitions\n * @option\n * @type {number}\n * @default 5000\n */\n timerDelay: 5000,\n /**\n * Allows Orbit to infinitely loop through the slides\n * @option\n * @type {boolean}\n * @default true\n */\n infiniteWrap: true,\n /**\n * Allows the Orbit slides to bind to swipe events for mobile, requires an additional util library\n * @option\n * @type {boolean}\n * @default true\n */\n swipe: true,\n /**\n * Allows the timing function to pause animation on hover.\n * @option\n * @type {boolean}\n * @default true\n */\n pauseOnHover: true,\n /**\n * Allows Orbit to bind keyboard events to the slider, to animate frames with arrow keys\n * @option\n * @type {boolean}\n * @default true\n */\n accessible: true,\n /**\n * Class applied to the container of Orbit\n * @option\n * @type {string}\n * @default 'orbit-container'\n */\n containerClass: 'orbit-container',\n /**\n * Class applied to individual slides.\n * @option\n * @type {string}\n * @default 'orbit-slide'\n */\n slideClass: 'orbit-slide',\n /**\n * Class applied to the bullet container. You're welcome.\n * @option\n * @type {string}\n * @default 'orbit-bullets'\n */\n boxOfBullets: 'orbit-bullets',\n /**\n * Class applied to the `next` navigation button.\n * @option\n * @type {string}\n * @default 'orbit-next'\n */\n nextClass: 'orbit-next',\n /**\n * Class applied to the `previous` navigation button.\n * @option\n * @type {string}\n * @default 'orbit-previous'\n */\n prevClass: 'orbit-previous',\n /**\n * Boolean to flag the js to use motion ui classes or not. Default to true for backwards compatibility.\n * @option\n * @type {boolean}\n * @default true\n */\n useMUI: true\n};\n\nexport {Orbit};\n","import { Box } from './foundation.util.box';\nimport { Plugin } from './foundation.core.plugin';\nimport { rtl as Rtl } from './foundation.core.utils';\n\nconst POSITIONS = ['left', 'right', 'top', 'bottom'];\nconst VERTICAL_ALIGNMENTS = ['top', 'bottom', 'center'];\nconst HORIZONTAL_ALIGNMENTS = ['left', 'right', 'center'];\n\nconst ALIGNMENTS = {\n 'left': VERTICAL_ALIGNMENTS,\n 'right': VERTICAL_ALIGNMENTS,\n 'top': HORIZONTAL_ALIGNMENTS,\n 'bottom': HORIZONTAL_ALIGNMENTS\n}\n\nfunction nextItem(item, array) {\n var currentIdx = array.indexOf(item);\n if(currentIdx === array.length - 1) {\n return array[0];\n } else {\n return array[currentIdx + 1];\n }\n}\n\n\nclass Positionable extends Plugin {\n /**\n * Abstract class encapsulating the tether-like explicit positioning logic\n * including repositioning based on overlap.\n * Expects classes to define defaults for vOffset, hOffset, position,\n * alignment, allowOverlap, and allowBottomOverlap. They can do this by\n * extending the defaults, or (for now recommended due to the way docs are\n * generated) by explicitly declaring them.\n *\n **/\n\n _init() {\n this.triedPositions = {};\n this.position = this.options.position === 'auto' ? this._getDefaultPosition() : this.options.position;\n this.alignment = this.options.alignment === 'auto' ? this._getDefaultAlignment() : this.options.alignment;\n this.originalPosition = this.position;\n this.originalAlignment = this.alignment;\n }\n\n _getDefaultPosition () {\n return 'bottom';\n }\n\n _getDefaultAlignment() {\n switch(this.position) {\n case 'bottom':\n case 'top':\n return Rtl() ? 'right' : 'left';\n case 'left':\n case 'right':\n return 'bottom';\n }\n }\n\n /**\n * Adjusts the positionable possible positions by iterating through alignments\n * and positions.\n * @function\n * @private\n */\n _reposition() {\n if(this._alignmentsExhausted(this.position)) {\n this.position = nextItem(this.position, POSITIONS);\n this.alignment = ALIGNMENTS[this.position][0];\n } else {\n this._realign();\n }\n }\n\n /**\n * Adjusts the dropdown pane possible positions by iterating through alignments\n * on the current position.\n * @function\n * @private\n */\n _realign() {\n this._addTriedPosition(this.position, this.alignment)\n this.alignment = nextItem(this.alignment, ALIGNMENTS[this.position])\n }\n\n _addTriedPosition(position, alignment) {\n this.triedPositions[position] = this.triedPositions[position] || []\n this.triedPositions[position].push(alignment);\n }\n\n _positionsExhausted() {\n var isExhausted = true;\n for(var i = 0; i < POSITIONS.length; i++) {\n isExhausted = isExhausted && this._alignmentsExhausted(POSITIONS[i]);\n }\n return isExhausted;\n }\n\n _alignmentsExhausted(position) {\n return this.triedPositions[position] && this.triedPositions[position].length === ALIGNMENTS[position].length;\n }\n\n\n // When we're trying to center, we don't want to apply offset that's going to\n // take us just off center, so wrap around to return 0 for the appropriate\n // offset in those alignments. TODO: Figure out if we want to make this\n // configurable behavior... it feels more intuitive, especially for tooltips, but\n // it's possible someone might actually want to start from center and then nudge\n // slightly off.\n _getVOffset() {\n return this.options.vOffset;\n }\n\n _getHOffset() {\n return this.options.hOffset;\n }\n\n _setPosition($anchor, $element, $parent) {\n if($anchor.attr('aria-expanded') === 'false'){ return false; }\n\n if (!this.options.allowOverlap) {\n // restore original position & alignment before checking overlap\n this.position = this.originalPosition;\n this.alignment = this.originalAlignment;\n }\n\n $element.offset(Box.GetExplicitOffsets($element, $anchor, this.position, this.alignment, this._getVOffset(), this._getHOffset()));\n\n if(!this.options.allowOverlap) {\n var minOverlap = 100000000;\n // default coordinates to how we start, in case we can't figure out better\n var minCoordinates = {position: this.position, alignment: this.alignment};\n while(!this._positionsExhausted()) {\n let overlap = Box.OverlapArea($element, $parent, false, false, this.options.allowBottomOverlap);\n if(overlap === 0) {\n return;\n }\n\n if(overlap < minOverlap) {\n minOverlap = overlap;\n minCoordinates = {position: this.position, alignment: this.alignment};\n }\n\n this._reposition();\n\n $element.offset(Box.GetExplicitOffsets($element, $anchor, this.position, this.alignment, this._getVOffset(), this._getHOffset()));\n }\n // If we get through the entire loop, there was no non-overlapping\n // position available. Pick the version with least overlap.\n this.position = minCoordinates.position;\n this.alignment = minCoordinates.alignment;\n $element.offset(Box.GetExplicitOffsets($element, $anchor, this.position, this.alignment, this._getVOffset(), this._getHOffset()));\n }\n }\n\n}\n\nPositionable.defaults = {\n /**\n * Position of positionable relative to anchor. Can be left, right, bottom, top, or auto.\n * @option\n * @type {string}\n * @default 'auto'\n */\n position: 'auto',\n /**\n * Alignment of positionable relative to anchor. Can be left, right, bottom, top, center, or auto.\n * @option\n * @type {string}\n * @default 'auto'\n */\n alignment: 'auto',\n /**\n * Allow overlap of container/window. If false, dropdown positionable first\n * try to position as defined by data-position and data-alignment, but\n * reposition if it would cause an overflow.\n * @option\n * @type {boolean}\n * @default false\n */\n allowOverlap: false,\n /**\n * Allow overlap of only the bottom of the container. This is the most common\n * behavior for dropdowns, allowing the dropdown to extend the bottom of the\n * screen but not otherwise influence or break out of the container.\n * @option\n * @type {boolean}\n * @default true\n */\n allowBottomOverlap: true,\n /**\n * Number of pixels the positionable should be separated vertically from anchor\n * @option\n * @type {number}\n * @default 0\n */\n vOffset: 0,\n /**\n * Number of pixels the positionable should be separated horizontally from anchor\n * @option\n * @type {number}\n * @default 0\n */\n hOffset: 0,\n}\n\nexport {Positionable};\n","import $ from 'jquery';\nimport { MediaQuery } from './foundation.util.mediaQuery';\nimport { GetYoDigits } from './foundation.core.utils';\nimport { Plugin }from './foundation.core.plugin';\n\nimport { Accordion } from './foundation.accordion';\nimport { Tabs } from './foundation.tabs';\n\n// The plugin matches the plugin classes with these plugin instances.\nvar MenuPlugins = {\n tabs: {\n cssClass: 'tabs',\n plugin: Tabs,\n open: (plugin, target) => plugin.selectTab(target),\n close: null /* not supported */,\n toggle: null /* not supported */,\n },\n accordion: {\n cssClass: 'accordion',\n plugin: Accordion,\n open: (plugin, target) => plugin.down($(target)),\n close: (plugin, target) => plugin.up($(target)),\n toggle: (plugin, target) => plugin.toggle($(target)),\n }\n};\n\n\n/**\n * ResponsiveAccordionTabs module.\n * @module foundation.responsiveAccordionTabs\n * @requires foundation.util.motion\n * @requires foundation.accordion\n * @requires foundation.tabs\n */\n\nclass ResponsiveAccordionTabs extends Plugin{\n constructor(element, options) {\n super(element, options);\n return this.options.reflow && this.storezfData || this;\n }\n\n /**\n * Creates a new instance of a responsive accordion tabs.\n * @class\n * @name ResponsiveAccordionTabs\n * @fires ResponsiveAccordionTabs#init\n * @param {jQuery} element - jQuery object to make into Responsive Accordion Tabs.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element, options) {\n this.$element = $(element);\n this.$element.data('zfPluginBase', this);\n this.options = $.extend({}, ResponsiveAccordionTabs.defaults, this.$element.data(), options);\n\n this.rules = this.$element.data('responsive-accordion-tabs');\n this.currentMq = null;\n this.currentRule = null;\n this.currentPlugin = null;\n this.className = 'ResponsiveAccordionTabs'; // ie9 back compat\n if (!this.$element.attr('id')) {\n this.$element.attr('id',GetYoDigits(6, 'responsiveaccordiontabs'));\n }\n\n this._init();\n this._events();\n }\n\n /**\n * Initializes the Menu by parsing the classes from the 'data-responsive-accordion-tabs' attribute on the element.\n * @function\n * @private\n */\n _init() {\n MediaQuery._init();\n\n // The first time an Interchange plugin is initialized, this.rules is converted from a string of \"classes\" to an object of rules\n if (typeof this.rules === 'string') {\n let rulesTree = {};\n\n // Parse rules from \"classes\" pulled from data attribute\n let rules = this.rules.split(' ');\n\n // Iterate through every rule found\n for (let i = 0; i < rules.length; i++) {\n let rule = rules[i].split('-');\n let ruleSize = rule.length > 1 ? rule[0] : 'small';\n let rulePlugin = rule.length > 1 ? rule[1] : rule[0];\n\n if (MenuPlugins[rulePlugin] !== null) {\n rulesTree[ruleSize] = MenuPlugins[rulePlugin];\n }\n }\n\n this.rules = rulesTree;\n }\n\n this._getAllOptions();\n\n if (!$.isEmptyObject(this.rules)) {\n this._checkMediaQueries();\n }\n }\n\n _getAllOptions() {\n //get all defaults and options\n var _this = this;\n _this.allOptions = {};\n for (var key in MenuPlugins) {\n if (MenuPlugins.hasOwnProperty(key)) {\n var obj = MenuPlugins[key];\n try {\n var dummyPlugin = $('<ul></ul>');\n var tmpPlugin = new obj.plugin(dummyPlugin,_this.options);\n for (var keyKey in tmpPlugin.options) {\n if (tmpPlugin.options.hasOwnProperty(keyKey) && keyKey !== 'zfPlugin') {\n var objObj = tmpPlugin.options[keyKey];\n _this.allOptions[keyKey] = objObj;\n }\n }\n tmpPlugin.destroy();\n }\n catch(e) {\n console.warn(`Warning: Problems getting Accordion/Tab options: ${e}`);\n }\n }\n }\n }\n\n /**\n * Initializes events for the Menu.\n * @function\n * @private\n */\n _events() {\n this._changedZfMediaQueryHandler = this._checkMediaQueries.bind(this);\n $(window).on('changed.zf.mediaquery', this._changedZfMediaQueryHandler);\n }\n\n /**\n * Checks the current screen width against available media queries. If the media query has changed, and the plugin needed has changed, the plugins will swap out.\n * @function\n * @private\n */\n _checkMediaQueries() {\n var matchedMq, _this = this;\n // Iterate through each rule and find the last matching rule\n $.each(this.rules, function(key) {\n if (MediaQuery.atLeast(key)) {\n matchedMq = key;\n }\n });\n\n // No match? No dice\n if (!matchedMq) return;\n\n // Plugin already initialized? We good\n if (this.currentPlugin instanceof this.rules[matchedMq].plugin) return;\n\n // Remove existing plugin-specific CSS classes\n $.each(MenuPlugins, function(key, value) {\n _this.$element.removeClass(value.cssClass);\n });\n\n // Add the CSS class for the new plugin\n this.$element.addClass(this.rules[matchedMq].cssClass);\n\n // Create an instance of the new plugin\n if (this.currentPlugin) {\n //don't know why but on nested elements data zfPlugin get's lost\n if (!this.currentPlugin.$element.data('zfPlugin') && this.storezfData) this.currentPlugin.$element.data('zfPlugin',this.storezfData);\n this.currentPlugin.destroy();\n }\n this._handleMarkup(this.rules[matchedMq].cssClass);\n this.currentRule = this.rules[matchedMq];\n this.currentPlugin = new this.currentRule.plugin(this.$element, this.options);\n this.storezfData = this.currentPlugin.$element.data('zfPlugin');\n\n }\n\n _handleMarkup(toSet){\n var _this = this, fromString = 'accordion';\n var $panels = $('[data-tabs-content='+this.$element.attr('id')+']');\n if ($panels.length) fromString = 'tabs';\n if (fromString === toSet) {\n return;\n }\n\n var tabsTitle = _this.allOptions.linkClass?_this.allOptions.linkClass:'tabs-title';\n var tabsPanel = _this.allOptions.panelClass?_this.allOptions.panelClass:'tabs-panel';\n\n this.$element.removeAttr('role');\n var $liHeads = this.$element.children('.'+tabsTitle+',[data-accordion-item]').removeClass(tabsTitle).removeClass('accordion-item').removeAttr('data-accordion-item');\n var $liHeadsA = $liHeads.children('a').removeClass('accordion-title');\n\n if (fromString === 'tabs') {\n $panels = $panels.children('.'+tabsPanel).removeClass(tabsPanel).removeAttr('role').removeAttr('aria-hidden').removeAttr('aria-labelledby');\n $panels.children('a').removeAttr('role').removeAttr('aria-controls').removeAttr('aria-selected');\n } else {\n $panels = $liHeads.children('[data-tab-content]').removeClass('accordion-content');\n }\n\n $panels.css({display:'',visibility:''});\n $liHeads.css({display:'',visibility:''});\n if (toSet === 'accordion') {\n $panels.each(function(key,value){\n $(value).appendTo($liHeads.get(key)).addClass('accordion-content').attr('data-tab-content','').removeClass('is-active').css({height:''});\n $('[data-tabs-content='+_this.$element.attr('id')+']').after('<div id=\"tabs-placeholder-'+_this.$element.attr('id')+'\"></div>').detach();\n $liHeads.addClass('accordion-item').attr('data-accordion-item','');\n $liHeadsA.addClass('accordion-title');\n });\n } else if (toSet === 'tabs') {\n var $tabsContent = $('[data-tabs-content='+_this.$element.attr('id')+']');\n var $placeholder = $('#tabs-placeholder-'+_this.$element.attr('id'));\n if ($placeholder.length) {\n $tabsContent = $('<div class=\"tabs-content\"></div>').insertAfter($placeholder).attr('data-tabs-content',_this.$element.attr('id'));\n $placeholder.remove();\n } else {\n $tabsContent = $('<div class=\"tabs-content\"></div>').insertAfter(_this.$element).attr('data-tabs-content',_this.$element.attr('id'));\n }\n $panels.each(function(key,value){\n var tempValue = $(value).appendTo($tabsContent).addClass(tabsPanel);\n var hash = $liHeadsA.get(key).hash.slice(1);\n var id = $(value).attr('id') || GetYoDigits(6, 'accordion');\n if (hash !== id) {\n if (hash !== '') {\n $(value).attr('id',hash);\n } else {\n hash = id;\n $(value).attr('id',hash);\n $($liHeadsA.get(key)).attr('href',$($liHeadsA.get(key)).attr('href').replace('#','')+'#'+hash);\n }\n }\n var isActive = $($liHeads.get(key)).hasClass('is-active');\n if (isActive) {\n tempValue.addClass('is-active');\n }\n });\n $liHeads.addClass(tabsTitle);\n };\n }\n\n /**\n * Opens the plugin pane defined by `target`.\n * @param {jQuery | String} target - jQuery object or string of the id of the pane to open.\n * @see Accordion.down\n * @see Tabs.selectTab\n * @function\n */\n open() {\n if (this.currentRule && typeof this.currentRule.open === 'function') {\n return this.currentRule.open(this.currentPlugin, ...arguments);\n }\n }\n\n /**\n * Closes the plugin pane defined by `target`. Not availaible for Tabs.\n * @param {jQuery | String} target - jQuery object or string of the id of the pane to close.\n * @see Accordion.up\n * @function\n */\n close() {\n if (this.currentRule && typeof this.currentRule.close === 'function') {\n return this.currentRule.close(this.currentPlugin, ...arguments);\n }\n }\n\n /**\n * Toggles the plugin pane defined by `target`. Not availaible for Tabs.\n * @param {jQuery | String} target - jQuery object or string of the id of the pane to toggle.\n * @see Accordion.toggle\n * @function\n */\n toggle() {\n if (this.currentRule && typeof this.currentRule.toggle === 'function') {\n return this.currentRule.toggle(this.currentPlugin, ...arguments);\n }\n }\n\n /**\n * Destroys the instance of the current plugin on this element, as well as the window resize handler that switches the plugins out.\n * @function\n */\n _destroy() {\n if (this.currentPlugin) this.currentPlugin.destroy();\n $(window).off('changed.zf.mediaquery', this._changedZfMediaQueryHandler);\n }\n}\n\nResponsiveAccordionTabs.defaults = {};\n\nexport {ResponsiveAccordionTabs};\n","import $ from 'jquery';\n\nimport { MediaQuery } from './foundation.util.mediaQuery';\nimport { GetYoDigits } from './foundation.core.utils';\nimport { Plugin } from './foundation.core.plugin';\n\nimport { DropdownMenu } from './foundation.dropdownMenu';\nimport { Drilldown } from './foundation.drilldown';\nimport { AccordionMenu } from './foundation.accordionMenu';\n\nlet MenuPlugins = {\n dropdown: {\n cssClass: 'dropdown',\n plugin: DropdownMenu\n },\n drilldown: {\n cssClass: 'drilldown',\n plugin: Drilldown\n },\n accordion: {\n cssClass: 'accordion-menu',\n plugin: AccordionMenu\n }\n};\n\n // import \"foundation.util.triggers.js\";\n\n\n/**\n * ResponsiveMenu module.\n * @module foundation.responsiveMenu\n * @requires foundation.util.triggers\n * @requires foundation.util.mediaQuery\n */\n\nclass ResponsiveMenu extends Plugin {\n /**\n * Creates a new instance of a responsive menu.\n * @class\n * @name ResponsiveMenu\n * @fires ResponsiveMenu#init\n * @param {jQuery} element - jQuery object to make into a dropdown menu.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element) {\n this.$element = $(element);\n this.rules = this.$element.data('responsive-menu');\n this.currentMq = null;\n this.currentPlugin = null;\n this.className = 'ResponsiveMenu'; // ie9 back compat\n\n this._init();\n this._events();\n }\n\n /**\n * Initializes the Menu by parsing the classes from the 'data-ResponsiveMenu' attribute on the element.\n * @function\n * @private\n */\n _init() {\n\n MediaQuery._init();\n // The first time an Interchange plugin is initialized, this.rules is converted from a string of \"classes\" to an object of rules\n if (typeof this.rules === 'string') {\n let rulesTree = {};\n\n // Parse rules from \"classes\" pulled from data attribute\n let rules = this.rules.split(' ');\n\n // Iterate through every rule found\n for (let i = 0; i < rules.length; i++) {\n let rule = rules[i].split('-');\n let ruleSize = rule.length > 1 ? rule[0] : 'small';\n let rulePlugin = rule.length > 1 ? rule[1] : rule[0];\n\n if (MenuPlugins[rulePlugin] !== null) {\n rulesTree[ruleSize] = MenuPlugins[rulePlugin];\n }\n }\n\n this.rules = rulesTree;\n }\n\n if (!$.isEmptyObject(this.rules)) {\n this._checkMediaQueries();\n }\n // Add data-mutate since children may need it.\n this.$element.attr('data-mutate', (this.$element.attr('data-mutate') || GetYoDigits(6, 'responsive-menu')));\n }\n\n /**\n * Initializes events for the Menu.\n * @function\n * @private\n */\n _events() {\n var _this = this;\n\n $(window).on('changed.zf.mediaquery', function() {\n _this._checkMediaQueries();\n });\n // $(window).on('resize.zf.ResponsiveMenu', function() {\n // _this._checkMediaQueries();\n // });\n }\n\n /**\n * Checks the current screen width against available media queries. If the media query has changed, and the plugin needed has changed, the plugins will swap out.\n * @function\n * @private\n */\n _checkMediaQueries() {\n var matchedMq, _this = this;\n // Iterate through each rule and find the last matching rule\n $.each(this.rules, function(key) {\n if (MediaQuery.atLeast(key)) {\n matchedMq = key;\n }\n });\n\n // No match? No dice\n if (!matchedMq) return;\n\n // Plugin already initialized? We good\n if (this.currentPlugin instanceof this.rules[matchedMq].plugin) return;\n\n // Remove existing plugin-specific CSS classes\n $.each(MenuPlugins, function(key, value) {\n _this.$element.removeClass(value.cssClass);\n });\n\n // Add the CSS class for the new plugin\n this.$element.addClass(this.rules[matchedMq].cssClass);\n\n // Create an instance of the new plugin\n if (this.currentPlugin) this.currentPlugin.destroy();\n this.currentPlugin = new this.rules[matchedMq].plugin(this.$element, {});\n }\n\n /**\n * Destroys the instance of the current plugin on this element, as well as the window resize handler that switches the plugins out.\n * @function\n */\n _destroy() {\n this.currentPlugin.destroy();\n $(window).off('.zf.ResponsiveMenu');\n }\n}\n\nResponsiveMenu.defaults = {};\n\nexport {ResponsiveMenu};\n","import $ from 'jquery';\n\nimport { MediaQuery } from './foundation.util.mediaQuery';\nimport { Motion } from './foundation.util.motion';\nimport { Plugin } from './foundation.core.plugin';\n\n/**\n * ResponsiveToggle module.\n * @module foundation.responsiveToggle\n * @requires foundation.util.mediaQuery\n * @requires foundation.util.motion\n */\n\nclass ResponsiveToggle extends Plugin {\n /**\n * Creates a new instance of Tab Bar.\n * @class\n * @name ResponsiveToggle\n * @fires ResponsiveToggle#init\n * @param {jQuery} element - jQuery object to attach tab bar functionality to.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element, options) {\n this.$element = $(element);\n this.options = $.extend({}, ResponsiveToggle.defaults, this.$element.data(), options);\n this.className = 'ResponsiveToggle'; // ie9 back compat\n\n this._init();\n this._events();\n }\n\n /**\n * Initializes the tab bar by finding the target element, toggling element, and running update().\n * @function\n * @private\n */\n _init() {\n MediaQuery._init();\n var targetID = this.$element.data('responsive-toggle');\n if (!targetID) {\n console.error('Your tab bar needs an ID of a Menu as the value of data-tab-bar.');\n }\n\n this.$targetMenu = $(`#${targetID}`);\n this.$toggler = this.$element.find('[data-toggle]').filter(function() {\n var target = $(this).data('toggle');\n return (target === targetID || target === \"\");\n });\n this.options = $.extend({}, this.options, this.$targetMenu.data());\n\n // If they were set, parse the animation classes\n if(this.options.animate) {\n let input = this.options.animate.split(' ');\n\n this.animationIn = input[0];\n this.animationOut = input[1] || null;\n }\n\n this._update();\n }\n\n /**\n * Adds necessary event handlers for the tab bar to work.\n * @function\n * @private\n */\n _events() {\n this._updateMqHandler = this._update.bind(this);\n\n $(window).on('changed.zf.mediaquery', this._updateMqHandler);\n\n this.$toggler.on('click.zf.responsiveToggle', this.toggleMenu.bind(this));\n }\n\n /**\n * Checks the current media query to determine if the tab bar should be visible or hidden.\n * @function\n * @private\n */\n _update() {\n // Mobile\n if (!MediaQuery.atLeast(this.options.hideFor)) {\n this.$element.show();\n this.$targetMenu.hide();\n }\n\n // Desktop\n else {\n this.$element.hide();\n this.$targetMenu.show();\n }\n }\n\n /**\n * Toggles the element attached to the tab bar. The toggle only happens if the screen is small enough to allow it.\n * @function\n * @fires ResponsiveToggle#toggled\n */\n toggleMenu() {\n if (!MediaQuery.atLeast(this.options.hideFor)) {\n /**\n * Fires when the element attached to the tab bar toggles.\n * @event ResponsiveToggle#toggled\n */\n if(this.options.animate) {\n if (this.$targetMenu.is(':hidden')) {\n Motion.animateIn(this.$targetMenu, this.animationIn, () => {\n this.$element.trigger('toggled.zf.responsiveToggle');\n this.$targetMenu.find('[data-mutate]').triggerHandler('mutateme.zf.trigger');\n });\n }\n else {\n Motion.animateOut(this.$targetMenu, this.animationOut, () => {\n this.$element.trigger('toggled.zf.responsiveToggle');\n });\n }\n }\n else {\n this.$targetMenu.toggle(0);\n this.$targetMenu.find('[data-mutate]').trigger('mutateme.zf.trigger');\n this.$element.trigger('toggled.zf.responsiveToggle');\n }\n }\n };\n\n _destroy() {\n this.$element.off('.zf.responsiveToggle');\n this.$toggler.off('.zf.responsiveToggle');\n\n $(window).off('changed.zf.mediaquery', this._updateMqHandler);\n }\n}\n\nResponsiveToggle.defaults = {\n /**\n * The breakpoint after which the menu is always shown, and the tab bar is hidden.\n * @option\n * @type {string}\n * @default 'medium'\n */\n hideFor: 'medium',\n\n /**\n * To decide if the toggle should be animated or not.\n * @option\n * @type {boolean}\n * @default false\n */\n animate: false\n};\n\nexport { ResponsiveToggle };\n","import $ from 'jquery';\nimport { Plugin } from './foundation.core.plugin';\nimport { onLoad } from './foundation.core.utils';\nimport { Keyboard } from './foundation.util.keyboard';\nimport { MediaQuery } from './foundation.util.mediaQuery';\nimport { Motion } from './foundation.util.motion';\nimport { Triggers } from './foundation.util.triggers';\nimport { Touch } from './foundation.util.touch'\n\n/**\n * Reveal module.\n * @module foundation.reveal\n * @requires foundation.util.keyboard\n * @requires foundation.util.touch\n * @requires foundation.util.triggers\n * @requires foundation.util.mediaQuery\n * @requires foundation.util.motion if using animations\n */\n\nclass Reveal extends Plugin {\n /**\n * Creates a new instance of Reveal.\n * @class\n * @name Reveal\n * @param {jQuery} element - jQuery object to use for the modal.\n * @param {Object} options - optional parameters.\n */\n _setup(element, options) {\n this.$element = element;\n this.options = $.extend({}, Reveal.defaults, this.$element.data(), options);\n this.className = 'Reveal'; // ie9 back compat\n this._init();\n\n // Touch and Triggers init are idempotent, just need to make sure they are initialized\n Touch.init($);\n Triggers.init($);\n\n Keyboard.register('Reveal', {\n 'ESCAPE': 'close',\n });\n }\n\n /**\n * Initializes the modal by adding the overlay and close buttons, (if selected).\n * @private\n */\n _init() {\n MediaQuery._init();\n this.id = this.$element.attr('id');\n this.isActive = false;\n this.cached = {mq: MediaQuery.current};\n\n this.$anchor = $(`[data-open=\"${this.id}\"]`).length ? $(`[data-open=\"${this.id}\"]`) : $(`[data-toggle=\"${this.id}\"]`);\n this.$anchor.attr({\n 'aria-controls': this.id,\n 'aria-haspopup': 'dialog',\n 'tabindex': 0\n });\n\n if (this.options.fullScreen || this.$element.hasClass('full')) {\n this.options.fullScreen = true;\n this.options.overlay = false;\n }\n if (this.options.overlay && !this.$overlay) {\n this.$overlay = this._makeOverlay(this.id);\n }\n\n this.$element.attr({\n 'role': 'dialog',\n 'aria-hidden': true,\n 'data-yeti-box': this.id,\n 'data-resize': this.id\n });\n\n if(this.$overlay) {\n this.$element.detach().appendTo(this.$overlay);\n } else {\n this.$element.detach().appendTo($(this.options.appendTo));\n this.$element.addClass('without-overlay');\n }\n this._events();\n if (this.options.deepLink && window.location.hash === ( `#${this.id}`)) {\n this.onLoadListener = onLoad($(window), () => this.open());\n }\n }\n\n /**\n * Creates an overlay div to display behind the modal.\n * @private\n */\n _makeOverlay() {\n var additionalOverlayClasses = '';\n\n if (this.options.additionalOverlayClasses) {\n additionalOverlayClasses = ' ' + this.options.additionalOverlayClasses;\n }\n\n return $('<div></div>')\n .addClass('reveal-overlay' + additionalOverlayClasses)\n .appendTo(this.options.appendTo);\n }\n\n /**\n * Updates position of modal\n * TODO: Figure out if we actually need to cache these values or if it doesn't matter\n * @private\n */\n _updatePosition() {\n var width = this.$element.outerWidth();\n var outerWidth = $(window).width();\n var height = this.$element.outerHeight();\n var outerHeight = $(window).height();\n var left, top = null;\n if (this.options.hOffset === 'auto') {\n left = parseInt((outerWidth - width) / 2, 10);\n } else {\n left = parseInt(this.options.hOffset, 10);\n }\n if (this.options.vOffset === 'auto') {\n if (height > outerHeight) {\n top = parseInt(Math.min(100, outerHeight / 10), 10);\n } else {\n top = parseInt((outerHeight - height) / 4, 10);\n }\n } else if (this.options.vOffset !== null) {\n top = parseInt(this.options.vOffset, 10);\n }\n\n if (top !== null) {\n this.$element.css({top: top + 'px'});\n }\n\n // only worry about left if we don't have an overlay or we have a horizontal offset,\n // otherwise we're perfectly in the middle\n if (!this.$overlay || (this.options.hOffset !== 'auto')) {\n this.$element.css({left: left + 'px'});\n this.$element.css({margin: '0px'});\n }\n\n }\n\n /**\n * Adds event handlers for the modal.\n * @private\n */\n _events() {\n var _this = this;\n\n this.$element.on({\n 'open.zf.trigger': this.open.bind(this),\n 'close.zf.trigger': (event, $element) => {\n if ((event.target === _this.$element[0]) ||\n ($(event.target).parents('[data-closable]')[0] === $element)) { // only close reveal when it's explicitly called\n return this.close.apply(this);\n }\n },\n 'toggle.zf.trigger': this.toggle.bind(this),\n 'resizeme.zf.trigger': function() {\n _this._updatePosition();\n }\n });\n\n if (this.options.closeOnClick && this.options.overlay) {\n this.$overlay.off('.zf.reveal').on('click.zf.dropdown tap.zf.dropdown', function(e) {\n if (e.target === _this.$element[0] ||\n $.contains(_this.$element[0], e.target) ||\n !$.contains(document, e.target)) {\n return;\n }\n _this.close();\n });\n }\n if (this.options.deepLink) {\n $(window).on(`hashchange.zf.reveal:${this.id}`, this._handleState.bind(this));\n }\n }\n\n /**\n * Handles modal methods on back/forward button clicks or any other event that triggers hashchange.\n * @private\n */\n _handleState() {\n if(window.location.hash === ( '#' + this.id) && !this.isActive){ this.open(); }\n else{ this.close(); }\n }\n\n /**\n * Disables the scroll when Reveal is shown to prevent the background from shifting\n * @param {number} scrollTop - Scroll to visually apply, window current scroll by default\n */\n _disableScroll(scrollTop) {\n scrollTop = scrollTop || $(window).scrollTop();\n if ($(document).height() > $(window).height()) {\n $(\"html\")\n .css(\"top\", -scrollTop);\n }\n }\n\n /**\n * Reenables the scroll when Reveal closes\n * @param {number} scrollTop - Scroll to restore, html \"top\" property by default (as set by `_disableScroll`)\n */\n _enableScroll(scrollTop) {\n scrollTop = scrollTop || parseInt($(\"html\").css(\"top\"), 10);\n if ($(document).height() > $(window).height()) {\n $(\"html\")\n .css(\"top\", \"\");\n $(window).scrollTop(-scrollTop);\n }\n }\n\n\n /**\n * Opens the modal controlled by `this.$anchor`, and closes all others by default.\n * @function\n * @fires Reveal#closeme\n * @fires Reveal#open\n */\n open() {\n // either update or replace browser history\n const hash = `#${this.id}`;\n if (this.options.deepLink && window.location.hash !== hash) {\n\n if (window.history.pushState) {\n if (this.options.updateHistory) {\n window.history.pushState({}, '', hash);\n } else {\n window.history.replaceState({}, '', hash);\n }\n } else {\n window.location.hash = hash;\n }\n }\n\n // Remember anchor that opened it to set focus back later, have general anchors as fallback\n this.$activeAnchor = $(document.activeElement).is(this.$anchor) ? $(document.activeElement) : this.$anchor;\n\n this.isActive = true;\n\n // Make elements invisible, but remove display: none so we can get size and positioning\n this.$element\n .css({ 'visibility': 'hidden' })\n .show()\n .scrollTop(0);\n if (this.options.overlay) {\n this.$overlay.css({'visibility': 'hidden'}).show();\n }\n\n this._updatePosition();\n\n this.$element\n .hide()\n .css({ 'visibility': '' });\n\n if(this.$overlay) {\n this.$overlay.css({'visibility': ''}).hide();\n if(this.$element.hasClass('fast')) {\n this.$overlay.addClass('fast');\n } else if (this.$element.hasClass('slow')) {\n this.$overlay.addClass('slow');\n }\n }\n\n\n if (!this.options.multipleOpened) {\n /**\n * Fires immediately before the modal opens.\n * Closes any other modals that are currently open\n * @event Reveal#closeme\n */\n this.$element.trigger('closeme.zf.reveal', this.id);\n }\n\n if ($('.reveal:visible').length === 0) {\n this._disableScroll();\n }\n\n var _this = this;\n\n // Motion UI method of reveal\n if (this.options.animationIn) {\n function afterAnimation(){\n _this.$element\n .attr({\n 'aria-hidden': false,\n 'tabindex': -1\n })\n .focus();\n _this._addGlobalClasses();\n Keyboard.trapFocus(_this.$element);\n }\n if (this.options.overlay) {\n Motion.animateIn(this.$overlay, 'fade-in');\n }\n Motion.animateIn(this.$element, this.options.animationIn, () => {\n if(this.$element) { // protect against object having been removed\n this.focusableElements = Keyboard.findFocusable(this.$element);\n afterAnimation();\n }\n });\n }\n // jQuery method of reveal\n else {\n if (this.options.overlay) {\n this.$overlay.show(0);\n }\n this.$element.show(this.options.showDelay);\n }\n\n // handle accessibility\n this.$element\n .attr({\n 'aria-hidden': false,\n 'tabindex': -1\n })\n .focus();\n Keyboard.trapFocus(this.$element);\n\n this._addGlobalClasses();\n\n this._addGlobalListeners();\n\n /**\n * Fires when the modal has successfully opened.\n * @event Reveal#open\n */\n this.$element.trigger('open.zf.reveal');\n }\n\n /**\n * Adds classes and listeners on document required by open modals.\n *\n * The following classes are added and updated:\n * - `.is-reveal-open` - Prevents the scroll on document\n * - `.zf-has-scroll` - Displays a disabled scrollbar on document if required like if the\n * scroll was not disabled. This prevent a \"shift\" of the page content due\n * the scrollbar disappearing when the modal opens.\n *\n * @private\n */\n _addGlobalClasses() {\n const updateScrollbarClass = () => {\n $('html').toggleClass('zf-has-scroll', !!($(document).height() > $(window).height()));\n };\n\n this.$element.on('resizeme.zf.trigger.revealScrollbarListener', () => updateScrollbarClass());\n updateScrollbarClass();\n $('html').addClass('is-reveal-open');\n }\n\n /**\n * Removes classes and listeners on document that were required by open modals.\n * @private\n */\n _removeGlobalClasses() {\n this.$element.off('resizeme.zf.trigger.revealScrollbarListener');\n $('html').removeClass('is-reveal-open');\n $('html').removeClass('zf-has-scroll');\n }\n\n /**\n * Adds extra event handlers for the body and window if necessary.\n * @private\n */\n _addGlobalListeners() {\n var _this = this;\n if(!this.$element) { return; } // If we're in the middle of cleanup, don't freak out\n this.focusableElements = Keyboard.findFocusable(this.$element);\n\n if (!this.options.overlay && this.options.closeOnClick && !this.options.fullScreen) {\n $('body').on('click.zf.dropdown tap.zf.dropdown', function(e) {\n if (e.target === _this.$element[0] ||\n $.contains(_this.$element[0], e.target) ||\n !$.contains(document, e.target)) { return; }\n _this.close();\n });\n }\n\n if (this.options.closeOnEsc) {\n $(window).on('keydown.zf.reveal', function(e) {\n Keyboard.handleKey(e, 'Reveal', {\n close: function() {\n if (_this.options.closeOnEsc) {\n _this.close();\n }\n }\n });\n });\n }\n }\n\n /**\n * Closes the modal.\n * @function\n * @fires Reveal#closed\n */\n close() {\n if (!this.isActive || !this.$element.is(':visible')) {\n return false;\n }\n var _this = this;\n\n // Motion UI method of hiding\n if (this.options.animationOut) {\n if (this.options.overlay) {\n Motion.animateOut(this.$overlay, 'fade-out');\n }\n\n Motion.animateOut(this.$element, this.options.animationOut, finishUp);\n }\n // jQuery method of hiding\n else {\n this.$element.hide(this.options.hideDelay);\n\n if (this.options.overlay) {\n this.$overlay.hide(0, finishUp);\n }\n else {\n finishUp();\n }\n }\n\n // Conditionals to remove extra event listeners added on open\n if (this.options.closeOnEsc) {\n $(window).off('keydown.zf.reveal');\n }\n\n if (!this.options.overlay && this.options.closeOnClick) {\n $('body').off('click.zf.dropdown tap.zf.dropdown');\n }\n\n this.$element.off('keydown.zf.reveal');\n\n function finishUp() {\n\n // Get the current top before the modal is closed and restore the scroll after.\n // TODO: use component properties instead of HTML properties\n // See https://github.com/foundation/foundation-sites/pull/10786\n var scrollTop = parseInt($(\"html\").css(\"top\"), 10);\n\n if ($('.reveal:visible').length === 0) {\n _this._removeGlobalClasses(); // also remove .is-reveal-open from the html element when there is no opened reveal\n }\n\n Keyboard.releaseFocus(_this.$element);\n\n _this.$element.attr('aria-hidden', true);\n\n if ($('.reveal:visible').length === 0) {\n _this._enableScroll(scrollTop);\n }\n\n /**\n * Fires when the modal is done closing.\n * @event Reveal#closed\n */\n _this.$element.trigger('closed.zf.reveal');\n }\n\n /**\n * Resets the modal content\n * This prevents a running video to keep going in the background\n */\n if (this.options.resetOnClose) {\n this.$element.html(this.$element.html());\n }\n\n this.isActive = false;\n // If deepLink and we did not switched to an other modal...\n if (_this.options.deepLink && window.location.hash === `#${this.id}`) {\n // Remove the history hash\n if (window.history.replaceState) {\n const urlWithoutHash = window.location.pathname + window.location.search;\n if (this.options.updateHistory) {\n window.history.pushState({}, '', urlWithoutHash); // remove the hash\n } else {\n window.history.replaceState('', document.title, urlWithoutHash);\n }\n } else {\n window.location.hash = '';\n }\n }\n\n this.$activeAnchor.focus();\n }\n\n /**\n * Toggles the open/closed state of a modal.\n * @function\n */\n toggle() {\n if (this.isActive) {\n this.close();\n } else {\n this.open();\n }\n };\n\n /**\n * Destroys an instance of a modal.\n * @function\n */\n _destroy() {\n if (this.options.overlay) {\n this.$element.appendTo($(this.options.appendTo)); // move $element outside of $overlay to prevent error unregisterPlugin()\n this.$overlay.hide().off().remove();\n }\n this.$element.hide().off();\n this.$anchor.off('.zf');\n $(window).off(`.zf.reveal:${this.id}`)\n if (this.onLoadListener) $(window).off(this.onLoadListener);\n\n if ($('.reveal:visible').length === 0) {\n this._removeGlobalClasses(); // also remove .is-reveal-open from the html element when there is no opened reveal\n }\n };\n}\n\nReveal.defaults = {\n /**\n * Motion-UI class to use for animated elements. If none used, defaults to simple show/hide.\n * @option\n * @type {string}\n * @default ''\n */\n animationIn: '',\n /**\n * Motion-UI class to use for animated elements. If none used, defaults to simple show/hide.\n * @option\n * @type {string}\n * @default ''\n */\n animationOut: '',\n /**\n * Time, in ms, to delay the opening of a modal after a click if no animation used.\n * @option\n * @type {number}\n * @default 0\n */\n showDelay: 0,\n /**\n * Time, in ms, to delay the closing of a modal after a click if no animation used.\n * @option\n * @type {number}\n * @default 0\n */\n hideDelay: 0,\n /**\n * Allows a click on the body/overlay to close the modal.\n * @option\n * @type {boolean}\n * @default true\n */\n closeOnClick: true,\n /**\n * Allows the modal to close if the user presses the `ESCAPE` key.\n * @option\n * @type {boolean}\n * @default true\n */\n closeOnEsc: true,\n /**\n * If true, allows multiple modals to be displayed at once.\n * @option\n * @type {boolean}\n * @default false\n */\n multipleOpened: false,\n /**\n * Distance, in pixels, the modal should push down from the top of the screen.\n * @option\n * @type {number|string}\n * @default auto\n */\n vOffset: 'auto',\n /**\n * Distance, in pixels, the modal should push in from the side of the screen.\n * @option\n * @type {number|string}\n * @default auto\n */\n hOffset: 'auto',\n /**\n * Allows the modal to be fullscreen, completely blocking out the rest of the view. JS checks for this as well.\n * @option\n * @type {boolean}\n * @default false\n */\n fullScreen: false,\n /**\n * Allows the modal to generate an overlay div, which will cover the view when modal opens.\n * @option\n * @type {boolean}\n * @default true\n */\n overlay: true,\n /**\n * Allows the modal to remove and reinject markup on close. Should be true if using video elements w/o using provider's api, otherwise, videos will continue to play in the background.\n * @option\n * @type {boolean}\n * @default false\n */\n resetOnClose: false,\n /**\n * Link the location hash to the modal.\n * Set the location hash when the modal is opened/closed, and open/close the modal when the location changes.\n * @option\n * @type {boolean}\n * @default false\n */\n deepLink: false,\n /**\n * If `deepLink` is enabled, update the browser history with the open modal\n * @option\n * @default false\n */\n updateHistory: false,\n /**\n * Allows the modal to append to custom div.\n * @option\n * @type {string}\n * @default \"body\"\n */\n appendTo: \"body\",\n /**\n * Allows adding additional class names to the reveal overlay.\n * @option\n * @type {string}\n * @default ''\n */\n additionalOverlayClasses: ''\n};\n\nexport {Reveal};\n","import $ from 'jquery';\nimport { Keyboard } from './foundation.util.keyboard';\nimport { Move } from './foundation.util.motion';\nimport { GetYoDigits, rtl as Rtl } from './foundation.core.utils';\n\nimport { Plugin } from './foundation.core.plugin';\n\nimport { Touch } from './foundation.util.touch';\n\nimport { Triggers } from './foundation.util.triggers';\n/**\n * Slider module.\n * @module foundation.slider\n * @requires foundation.util.motion\n * @requires foundation.util.triggers\n * @requires foundation.util.keyboard\n * @requires foundation.util.touch\n */\n\nclass Slider extends Plugin {\n /**\n * Creates a new instance of a slider control.\n * @class\n * @name Slider\n * @param {jQuery} element - jQuery object to make into a slider control.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element, options) {\n this.$element = element;\n this.options = $.extend({}, Slider.defaults, this.$element.data(), options);\n this.className = 'Slider'; // ie9 back compat\n this.initialized = false;\n\n // Touch and Triggers inits are idempotent, we just need to make sure it's initialied.\n Touch.init($);\n Triggers.init($);\n\n this._init();\n\n Keyboard.register('Slider', {\n 'ltr': {\n 'ARROW_RIGHT': 'increase',\n 'ARROW_UP': 'increase',\n 'ARROW_DOWN': 'decrease',\n 'ARROW_LEFT': 'decrease',\n 'SHIFT_ARROW_RIGHT': 'increaseFast',\n 'SHIFT_ARROW_UP': 'increaseFast',\n 'SHIFT_ARROW_DOWN': 'decreaseFast',\n 'SHIFT_ARROW_LEFT': 'decreaseFast',\n 'HOME': 'min',\n 'END': 'max'\n },\n 'rtl': {\n 'ARROW_LEFT': 'increase',\n 'ARROW_RIGHT': 'decrease',\n 'SHIFT_ARROW_LEFT': 'increaseFast',\n 'SHIFT_ARROW_RIGHT': 'decreaseFast'\n }\n });\n }\n\n /**\n * Initilizes the plugin by reading/setting attributes, creating collections and setting the initial position of the handle(s).\n * @function\n * @private\n */\n _init() {\n this.inputs = this.$element.find('input');\n this.handles = this.$element.find('[data-slider-handle]');\n\n this.$handle = this.handles.eq(0);\n this.$input = this.inputs.length ? this.inputs.eq(0) : $(`#${this.$handle.attr('aria-controls')}`);\n this.$fill = this.$element.find('[data-slider-fill]').css(this.options.vertical ? 'height' : 'width', 0);\n\n if (this.options.disabled || this.$element.hasClass(this.options.disabledClass)) {\n this.options.disabled = true;\n this.$element.addClass(this.options.disabledClass);\n }\n if (!this.inputs.length) {\n this.inputs = $().add(this.$input);\n this.options.binding = true;\n }\n\n this._setInitAttr(0);\n\n if (this.handles[1]) {\n this.options.doubleSided = true;\n this.$handle2 = this.handles.eq(1);\n this.$input2 = this.inputs.length > 1 ? this.inputs.eq(1) : $(`#${this.$handle2.attr('aria-controls')}`);\n\n if (!this.inputs[1]) {\n this.inputs = this.inputs.add(this.$input2);\n }\n\n // this.$handle.triggerHandler('click.zf.slider');\n this._setInitAttr(1);\n }\n\n // Set handle positions\n this.setHandles();\n\n this._events();\n this.initialized = true;\n }\n\n setHandles() {\n if(this.handles[1]) {\n this._setHandlePos(this.$handle, this.inputs.eq(0).val(), () => {\n this._setHandlePos(this.$handle2, this.inputs.eq(1).val());\n });\n } else {\n this._setHandlePos(this.$handle, this.inputs.eq(0).val());\n }\n }\n\n _reflow() {\n this.setHandles();\n }\n /**\n * @function\n * @private\n * @param {Number} value - floating point (the value) to be transformed using to a relative position on the slider (the inverse of _value)\n */\n _pctOfBar(value) {\n var pctOfBar = percent(value - this.options.start, this.options.end - this.options.start)\n\n switch(this.options.positionValueFunction) {\n case \"pow\":\n pctOfBar = this._logTransform(pctOfBar);\n break;\n case \"log\":\n pctOfBar = this._powTransform(pctOfBar);\n break;\n }\n\n return pctOfBar.toFixed(2)\n }\n\n /**\n * @function\n * @private\n * @param {Number} pctOfBar - floating point, the relative position of the slider (typically between 0-1) to be transformed to a value\n */\n _value(pctOfBar) {\n switch(this.options.positionValueFunction) {\n case \"pow\":\n pctOfBar = this._powTransform(pctOfBar);\n break;\n case \"log\":\n pctOfBar = this._logTransform(pctOfBar);\n break;\n }\n\n var value\n if (this.options.vertical) {\n // linear interpolation which is working with negative values for start\n // https://math.stackexchange.com/a/1019084\n value = parseFloat(this.options.end) + pctOfBar * (this.options.start - this.options.end)\n } else {\n value = (this.options.end - this.options.start) * pctOfBar + parseFloat(this.options.start);\n }\n\n return value\n }\n\n /**\n * @function\n * @private\n * @param {Number} value - floating point (typically between 0-1) to be transformed using the log function\n */\n _logTransform(value) {\n return baseLog(this.options.nonLinearBase, ((value*(this.options.nonLinearBase-1))+1))\n }\n\n /**\n * @function\n * @private\n * @param {Number} value - floating point (typically between 0-1) to be transformed using the power function\n */\n _powTransform(value) {\n return (Math.pow(this.options.nonLinearBase, value) - 1) / (this.options.nonLinearBase - 1)\n }\n\n /**\n * Sets the position of the selected handle and fill bar.\n * @function\n * @private\n * @param {jQuery} $hndl - the selected handle to move.\n * @param {Number} location - floating point between the start and end values of the slider bar.\n * @param {Function} cb - callback function to fire on completion.\n * @fires Slider#moved\n * @fires Slider#changed\n */\n _setHandlePos($hndl, location, cb) {\n // don't move if the slider has been disabled since its initialization\n if (this.$element.hasClass(this.options.disabledClass)) {\n return;\n }\n //might need to alter that slightly for bars that will have odd number selections.\n location = parseFloat(location);//on input change events, convert string to number...grumble.\n\n // prevent slider from running out of bounds, if value exceeds the limits set through options, override the value to min/max\n if (location < this.options.start) { location = this.options.start; }\n else if (location > this.options.end) { location = this.options.end; }\n\n var isDbl = this.options.doubleSided;\n\n if (isDbl) { //this block is to prevent 2 handles from crossing eachother. Could/should be improved.\n if (this.handles.index($hndl) === 0) {\n var h2Val = parseFloat(this.$handle2.attr('aria-valuenow'));\n location = location >= h2Val ? h2Val - this.options.step : location;\n } else {\n var h1Val = parseFloat(this.$handle.attr('aria-valuenow'));\n location = location <= h1Val ? h1Val + this.options.step : location;\n }\n }\n\n var _this = this,\n vert = this.options.vertical,\n hOrW = vert ? 'height' : 'width',\n lOrT = vert ? 'top' : 'left',\n handleDim = $hndl[0].getBoundingClientRect()[hOrW],\n elemDim = this.$element[0].getBoundingClientRect()[hOrW],\n //percentage of bar min/max value based on click or drag point\n pctOfBar = this._pctOfBar(location),\n //number of actual pixels to shift the handle, based on the percentage obtained above\n pxToMove = (elemDim - handleDim) * pctOfBar,\n //percentage of bar to shift the handle\n movement = (percent(pxToMove, elemDim) * 100).toFixed(this.options.decimal);\n //fixing the decimal value for the location number, is passed to other methods as a fixed floating-point value\n location = parseFloat(location.toFixed(this.options.decimal));\n // declare empty object for css adjustments, only used with 2 handled-sliders\n var css = {};\n\n this._setValues($hndl, location);\n\n // TODO update to calculate based on values set to respective inputs??\n if (isDbl) {\n var isLeftHndl = this.handles.index($hndl) === 0,\n //empty variable, will be used for min-height/width for fill bar\n dim,\n //percentage w/h of the handle compared to the slider bar\n handlePct = Math.floor(percent(handleDim, elemDim) * 100);\n //if left handle, the math is slightly different than if it's the right handle, and the left/top property needs to be changed for the fill bar\n if (isLeftHndl) {\n //left or top percentage value to apply to the fill bar.\n css[lOrT] = `${movement}%`;\n //calculate the new min-height/width for the fill bar.\n dim = parseFloat(this.$handle2[0].style[lOrT]) - movement + handlePct;\n //this callback is necessary to prevent errors and allow the proper placement and initialization of a 2-handled slider\n //plus, it means we don't care if 'dim' isNaN on init, it won't be in the future.\n if (cb && typeof cb === 'function') { cb(); }//this is only needed for the initialization of 2 handled sliders\n } else {\n //just caching the value of the left/bottom handle's left/top property\n var handlePos = parseFloat(this.$handle[0].style[lOrT]);\n //calculate the new min-height/width for the fill bar. Use isNaN to prevent false positives for numbers <= 0\n //based on the percentage of movement of the handle being manipulated, less the opposing handle's left/top position, plus the percentage w/h of the handle itself\n dim = movement - (isNaN(handlePos) ? (this.options.initialStart - this.options.start)/((this.options.end-this.options.start)/100) : handlePos) + handlePct;\n }\n // assign the min-height/width to our css object\n css[`min-${hOrW}`] = `${dim}%`;\n }\n\n //because we don't know exactly how the handle will be moved, check the amount of time it should take to move.\n var moveTime = this.$element.data('dragging') ? 1000/60 : this.options.moveTime;\n\n Move(moveTime, $hndl, function() {\n // adjusting the left/top property of the handle, based on the percentage calculated above\n // if movement isNaN, that is because the slider is hidden and we cannot determine handle width,\n // fall back to next best guess.\n if (isNaN(movement)) {\n $hndl.css(lOrT, `${pctOfBar * 100}%`);\n }\n else {\n $hndl.css(lOrT, `${movement}%`);\n }\n\n if (!_this.options.doubleSided) {\n //if single-handled, a simple method to expand the fill bar\n _this.$fill.css(hOrW, `${pctOfBar * 100}%`);\n } else {\n //otherwise, use the css object we created above\n _this.$fill.css(css);\n }\n });\n\n if (this.initialized) {\n this.$element.one('finished.zf.animate', function() {\n /**\n * Fires when the handle is done moving.\n * @event Slider#moved\n */\n _this.$element.trigger('moved.zf.slider', [$hndl]);\n });\n /**\n * Fires when the value has not been change for a given time.\n * @event Slider#changed\n */\n clearTimeout(_this.timeout);\n _this.timeout = setTimeout(function(){\n _this.$element.trigger('changed.zf.slider', [$hndl]);\n }, _this.options.changedDelay);\n }\n }\n\n /**\n * Sets the initial attribute for the slider element.\n * @function\n * @private\n * @param {Number} idx - index of the current handle/input to use.\n */\n _setInitAttr(idx) {\n var initVal = (idx === 0 ? this.options.initialStart : this.options.initialEnd)\n var id = this.inputs.eq(idx).attr('id') || GetYoDigits(6, 'slider');\n this.inputs.eq(idx).attr({\n 'id': id,\n 'max': this.options.end,\n 'min': this.options.start,\n 'step': this.options.step\n });\n this.inputs.eq(idx).val(initVal);\n this.handles.eq(idx).attr({\n 'role': 'slider',\n 'aria-controls': id,\n 'aria-valuemax': this.options.end,\n 'aria-valuemin': this.options.start,\n 'aria-valuenow': initVal,\n 'aria-orientation': this.options.vertical ? 'vertical' : 'horizontal',\n 'tabindex': 0\n });\n }\n\n /**\n * Sets the input and `aria-valuenow` values for the slider element.\n * @function\n * @private\n * @param {jQuery} $handle - the currently selected handle.\n * @param {Number} val - floating point of the new value.\n */\n _setValues($handle, val) {\n var idx = this.options.doubleSided ? this.handles.index($handle) : 0;\n this.inputs.eq(idx).val(val);\n $handle.attr('aria-valuenow', val);\n }\n\n /**\n * Handles events on the slider element.\n * Calculates the new location of the current handle.\n * If there are two handles and the bar was clicked, it determines which handle to move.\n * @function\n * @private\n * @param {Object} e - the `event` object passed from the listener.\n * @param {jQuery} $handle - the current handle to calculate for, if selected.\n * @param {Number} val - floating point number for the new value of the slider.\n * TODO clean this up, there's a lot of repeated code between this and the _setHandlePos fn.\n */\n _handleEvent(e, $handle, val) {\n var value;\n if (!val) {//click or drag events\n e.preventDefault();\n var _this = this,\n vertical = this.options.vertical,\n param = vertical ? 'height' : 'width',\n direction = vertical ? 'top' : 'left',\n eventOffset = vertical ? e.pageY : e.pageX,\n barDim = this.$element[0].getBoundingClientRect()[param],\n windowScroll = vertical ? $(window).scrollTop() : $(window).scrollLeft();\n\n var elemOffset = this.$element.offset()[direction];\n\n // touch events emulated by the touch util give position relative to screen, add window.scroll to event coordinates...\n // best way to guess this is simulated is if clientY == pageY\n if (e.clientY === e.pageY) { eventOffset = eventOffset + windowScroll; }\n var eventFromBar = eventOffset - elemOffset;\n var barXY;\n if (eventFromBar < 0) {\n barXY = 0;\n } else if (eventFromBar > barDim) {\n barXY = barDim;\n } else {\n barXY = eventFromBar;\n }\n var offsetPct = percent(barXY, barDim);\n\n value = this._value(offsetPct);\n\n // turn everything around for RTL, yay math!\n if (Rtl() && !this.options.vertical) {value = this.options.end - value;}\n\n value = _this._adjustValue(null, value);\n\n if (!$handle) {//figure out which handle it is, pass it to the next function.\n var firstHndlPos = absPosition(this.$handle, direction, barXY, param),\n secndHndlPos = absPosition(this.$handle2, direction, barXY, param);\n $handle = firstHndlPos <= secndHndlPos ? this.$handle : this.$handle2;\n }\n\n } else {//change event on input\n value = this._adjustValue(null, val);\n }\n\n this._setHandlePos($handle, value);\n }\n\n /**\n * Adjustes value for handle in regard to step value. returns adjusted value\n * @function\n * @private\n * @param {jQuery} $handle - the selected handle.\n * @param {Number} value - value to adjust. used if $handle is falsy\n */\n _adjustValue($handle, value) {\n var val,\n step = this.options.step,\n div = parseFloat(step/2),\n left, previousVal, nextVal;\n if (!!$handle) {\n val = parseFloat($handle.attr('aria-valuenow'));\n }\n else {\n val = value;\n }\n if (val >= 0) {\n left = val % step;\n } else {\n left = step + (val % step);\n }\n previousVal = val - left;\n nextVal = previousVal + step;\n if (left === 0) {\n return val;\n }\n val = val >= previousVal + div ? nextVal : previousVal;\n return val;\n }\n\n /**\n * Adds event listeners to the slider elements.\n * @function\n * @private\n */\n _events() {\n this._eventsForHandle(this.$handle);\n if(this.handles[1]) {\n this._eventsForHandle(this.$handle2);\n }\n }\n\n\n /**\n * Adds event listeners a particular handle\n * @function\n * @private\n * @param {jQuery} $handle - the current handle to apply listeners to.\n */\n _eventsForHandle($handle) {\n var _this = this,\n curHandle;\n\n const handleChangeEvent = function(e) {\n const idx = _this.inputs.index($(this));\n _this._handleEvent(e, _this.handles.eq(idx), $(this).val());\n };\n\n // IE only triggers the change event when the input loses focus which strictly follows the HTML specification\n // listen for the enter key and trigger a change\n // @see https://html.spec.whatwg.org/multipage/input.html#common-input-element-events\n this.inputs.off('keyup.zf.slider').on('keyup.zf.slider', function (e) {\n if(e.keyCode === 13) handleChangeEvent.call(this, e);\n });\n\n this.inputs.off('change.zf.slider').on('change.zf.slider', handleChangeEvent);\n\n if (this.options.clickSelect) {\n this.$element.off('click.zf.slider').on('click.zf.slider', function(e) {\n if (_this.$element.data('dragging')) { return false; }\n\n if (!$(e.target).is('[data-slider-handle]')) {\n if (_this.options.doubleSided) {\n _this._handleEvent(e);\n } else {\n _this._handleEvent(e, _this.$handle);\n }\n }\n });\n }\n\n if (this.options.draggable) {\n this.handles.addTouch();\n\n var $body = $('body');\n $handle\n .off('mousedown.zf.slider')\n .on('mousedown.zf.slider', function(e) {\n $handle.addClass('is-dragging');\n _this.$fill.addClass('is-dragging');//\n _this.$element.data('dragging', true);\n\n curHandle = $(e.currentTarget);\n\n $body.on('mousemove.zf.slider', function(ev) {\n ev.preventDefault();\n _this._handleEvent(ev, curHandle);\n\n }).on('mouseup.zf.slider', function(ev) {\n _this._handleEvent(ev, curHandle);\n\n $handle.removeClass('is-dragging');\n _this.$fill.removeClass('is-dragging');\n _this.$element.data('dragging', false);\n\n $body.off('mousemove.zf.slider mouseup.zf.slider');\n });\n })\n // prevent events triggered by touch\n .on('selectstart.zf.slider touchmove.zf.slider', function(e) {\n e.preventDefault();\n });\n }\n\n $handle.off('keydown.zf.slider').on('keydown.zf.slider', function(e) {\n var _$handle = $(this),\n idx = _this.options.doubleSided ? _this.handles.index(_$handle) : 0,\n oldValue = parseFloat($handle.attr('aria-valuenow')),\n newValue;\n\n // handle keyboard event with keyboard util\n Keyboard.handleKey(e, 'Slider', {\n decrease: function() {\n newValue = oldValue - _this.options.step;\n },\n increase: function() {\n newValue = oldValue + _this.options.step;\n },\n decreaseFast: function() {\n newValue = oldValue - _this.options.step * 10;\n },\n increaseFast: function() {\n newValue = oldValue + _this.options.step * 10;\n },\n min: function() {\n newValue = _this.options.start;\n },\n max: function() {\n newValue = _this.options.end;\n },\n handled: function() { // only set handle pos when event was handled specially\n e.preventDefault();\n _this._setHandlePos(_$handle, newValue);\n }\n });\n /*if (newValue) { // if pressed key has special function, update value\n e.preventDefault();\n _this._setHandlePos(_$handle, newValue);\n }*/\n });\n }\n\n /**\n * Destroys the slider plugin.\n */\n _destroy() {\n this.handles.off('.zf.slider');\n this.inputs.off('.zf.slider');\n this.$element.off('.zf.slider');\n\n clearTimeout(this.timeout);\n }\n}\n\nSlider.defaults = {\n /**\n * Minimum value for the slider scale.\n * @option\n * @type {number}\n * @default 0\n */\n start: 0,\n /**\n * Maximum value for the slider scale.\n * @option\n * @type {number}\n * @default 100\n */\n end: 100,\n /**\n * Minimum value change per change event.\n * @option\n * @type {number}\n * @default 1\n */\n step: 1,\n /**\n * Value at which the handle/input *(left handle/first input)* should be set to on initialization.\n * @option\n * @type {number}\n * @default 0\n */\n initialStart: 0,\n /**\n * Value at which the right handle/second input should be set to on initialization.\n * @option\n * @type {number}\n * @default 100\n */\n initialEnd: 100,\n /**\n * Allows the input to be located outside the container and visible. Set to by the JS\n * @option\n * @type {boolean}\n * @default false\n */\n binding: false,\n /**\n * Allows the user to click/tap on the slider bar to select a value.\n * @option\n * @type {boolean}\n * @default true\n */\n clickSelect: true,\n /**\n * Set to true and use the `vertical` class to change alignment to vertical.\n * @option\n * @type {boolean}\n * @default false\n */\n vertical: false,\n /**\n * Allows the user to drag the slider handle(s) to select a value.\n * @option\n * @type {boolean}\n * @default true\n */\n draggable: true,\n /**\n * Disables the slider and prevents event listeners from being applied. Double checked by JS with `disabledClass`.\n * @option\n * @type {boolean}\n * @default false\n */\n disabled: false,\n /**\n * Allows the use of two handles. Double checked by the JS. Changes some logic handling.\n * @option\n * @type {boolean}\n * @default false\n */\n doubleSided: false,\n /**\n * Potential future feature.\n */\n // steps: 100,\n /**\n * Number of decimal places the plugin should go to for floating point precision.\n * @option\n * @type {number}\n * @default 2\n */\n decimal: 2,\n /**\n * Time delay for dragged elements.\n */\n // dragDelay: 0,\n /**\n * Time, in ms, to animate the movement of a slider handle if user clicks/taps on the bar. Needs to be manually set if updating the transition time in the Sass settings.\n * @option\n * @type {number}\n * @default 200\n */\n moveTime: 200,//update this if changing the transition time in the sass\n /**\n * Class applied to disabled sliders.\n * @option\n * @type {string}\n * @default 'disabled'\n */\n disabledClass: 'disabled',\n /**\n * Will invert the default layout for a vertical<span data-tooltip title=\"who would do this???\"> </span>slider.\n * @option\n * @type {boolean}\n * @default false\n */\n invertVertical: false,\n /**\n * Milliseconds before the `changed.zf-slider` event is triggered after value change.\n * @option\n * @type {number}\n * @default 500\n */\n changedDelay: 500,\n /**\n * Basevalue for non-linear sliders\n * @option\n * @type {number}\n * @default 5\n */\n nonLinearBase: 5,\n /**\n * Basevalue for non-linear sliders, possible values are: `'linear'`, `'pow'` & `'log'`. Pow and Log use the nonLinearBase setting.\n * @option\n * @type {string}\n * @default 'linear'\n */\n positionValueFunction: 'linear',\n};\n\nfunction percent(frac, num) {\n return (frac / num);\n}\nfunction absPosition($handle, dir, clickPos, param) {\n return Math.abs(($handle.position()[dir] + ($handle[param]() / 2)) - clickPos);\n}\nfunction baseLog(base, value) {\n return Math.log(value)/Math.log(base)\n}\n\nexport {Slider};\n","import $ from 'jquery';\nimport { GetYoDigits } from './foundation.core.utils';\nimport { Plugin } from './foundation.core.plugin';\n\n/**\n * SmoothScroll module.\n * @module foundation.smoothScroll\n */\nclass SmoothScroll extends Plugin {\n /**\n * Creates a new instance of SmoothScroll.\n * @class\n * @name SmoothScroll\n * @fires SmoothScroll#init\n * @param {Object} element - jQuery object to add the trigger to.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element, options) {\n this.$element = element;\n this.options = $.extend({}, SmoothScroll.defaults, this.$element.data(), options);\n this.className = 'SmoothScroll'; // ie9 back compat\n\n this._init();\n }\n\n /**\n * Initialize the SmoothScroll plugin\n * @private\n */\n _init() {\n const id = this.$element[0].id || GetYoDigits(6, 'smooth-scroll');\n this.$element.attr({ id });\n\n this._events();\n }\n\n /**\n * Initializes events for SmoothScroll.\n * @private\n */\n _events() {\n this._linkClickListener = this._handleLinkClick.bind(this);\n this.$element.on('click.zf.smoothScroll', this._linkClickListener);\n this.$element.on('click.zf.smoothScroll', 'a[href^=\"#\"]', this._linkClickListener);\n }\n\n /**\n * Handle the given event to smoothly scroll to the anchor pointed by the event target.\n * @param {*} e - event\n * @function\n * @private\n */\n _handleLinkClick(e) {\n // Follow the link if it does not point to an anchor.\n if (!$(e.currentTarget).is('a[href^=\"#\"]')) return;\n\n const arrival = e.currentTarget.getAttribute('href');\n\n this._inTransition = true;\n\n SmoothScroll.scrollToLoc(arrival, this.options, () => {\n this._inTransition = false;\n });\n\n e.preventDefault();\n };\n\n /**\n * Function to scroll to a given location on the page.\n * @param {String} loc - A properly formatted jQuery id selector. Example: '#foo'\n * @param {Object} options - The options to use.\n * @param {Function} callback - The callback function.\n * @static\n * @function\n */\n static scrollToLoc(loc, options = SmoothScroll.defaults, callback) {\n const $loc = $(loc);\n\n // Do nothing if target does not exist to prevent errors\n if (!$loc.length) return false;\n\n var scrollPos = Math.round($loc.offset().top - options.threshold / 2 - options.offset);\n\n $('html, body').stop(true).animate(\n { scrollTop: scrollPos },\n options.animationDuration,\n options.animationEasing,\n () => {\n if (typeof callback === 'function'){\n callback();\n }\n }\n );\n }\n\n /**\n * Destroys the SmoothScroll instance.\n * @function\n */\n _destroy() {\n this.$element.off('click.zf.smoothScroll', this._linkClickListener)\n this.$element.off('click.zf.smoothScroll', 'a[href^=\"#\"]', this._linkClickListener);\n }\n}\n\n/**\n * Default settings for plugin.\n */\nSmoothScroll.defaults = {\n /**\n * Amount of time, in ms, the animated scrolling should take between locations.\n * @option\n * @type {number}\n * @default 500\n */\n animationDuration: 500,\n /**\n * Animation style to use when scrolling between locations. Can be `'swing'` or `'linear'`.\n * @option\n * @type {string}\n * @default 'linear'\n * @see {@link https://api.jquery.com/animate|Jquery animate}\n */\n animationEasing: 'linear',\n /**\n * Number of pixels to use as a marker for location changes.\n * @option\n * @type {number}\n * @default 50\n */\n threshold: 50,\n /**\n * Number of pixels to offset the scroll of the page on item click if using a sticky nav bar.\n * @option\n * @type {number}\n * @default 0\n */\n offset: 0\n}\n\nexport {SmoothScroll}\n","import $ from 'jquery';\nimport { Plugin } from './foundation.core.plugin';\nimport { onLoad, GetYoDigits } from './foundation.core.utils';\nimport { MediaQuery } from './foundation.util.mediaQuery';\nimport { Triggers } from './foundation.util.triggers';\n\n/**\n * Sticky module.\n * @module foundation.sticky\n * @requires foundation.util.triggers\n * @requires foundation.util.mediaQuery\n */\n\nclass Sticky extends Plugin {\n /**\n * Creates a new instance of a sticky thing.\n * @class\n * @name Sticky\n * @param {jQuery} element - jQuery object to make sticky.\n * @param {Object} options - options object passed when creating the element programmatically.\n */\n _setup(element, options) {\n this.$element = element;\n this.options = $.extend({}, Sticky.defaults, this.$element.data(), options);\n this.className = 'Sticky'; // ie9 back compat\n\n // Triggers init is idempotent, just need to make sure it is initialized\n Triggers.init($);\n\n this._init();\n }\n\n /**\n * Initializes the sticky element by adding classes, getting/setting dimensions, breakpoints and attributes\n * @function\n * @private\n */\n _init() {\n MediaQuery._init();\n\n var $parent = this.$element.parent('[data-sticky-container]'),\n id = this.$element[0].id || GetYoDigits(6, 'sticky'),\n _this = this;\n\n if($parent.length){\n this.$container = $parent;\n } else {\n this.wasWrapped = true;\n this.$element.wrap(this.options.container);\n this.$container = this.$element.parent();\n }\n this.$container.addClass(this.options.containerClass);\n\n this.$element.addClass(this.options.stickyClass).attr({ 'data-resize': id, 'data-mutate': id });\n if (this.options.anchor !== '') {\n $('#' + _this.options.anchor).attr({ 'data-mutate': id });\n }\n\n this.scrollCount = this.options.checkEvery;\n this.isStuck = false;\n this.onLoadListener = onLoad($(window), function () {\n //We calculate the container height to have correct values for anchor points offset calculation.\n _this.containerHeight = _this.$element.css(\"display\") === \"none\" ? 0 : _this.$element[0].getBoundingClientRect().height;\n _this.$container.css('height', _this.containerHeight);\n _this.elemHeight = _this.containerHeight;\n if (_this.options.anchor !== '') {\n _this.$anchor = $('#' + _this.options.anchor);\n } else {\n _this._parsePoints();\n }\n\n _this._setSizes(function () {\n var scroll = window.pageYOffset;\n _this._calc(false, scroll);\n //Unstick the element will ensure that proper classes are set.\n if (!_this.isStuck) {\n _this._removeSticky((scroll >= _this.topPoint) ? false : true);\n }\n });\n _this._events(id.split('-').reverse().join('-'));\n });\n }\n\n /**\n * If using multiple elements as anchors, calculates the top and bottom pixel values the sticky thing should stick and unstick on.\n * @function\n * @private\n */\n _parsePoints() {\n var top = this.options.topAnchor === \"\" ? 1 : this.options.topAnchor,\n btm = this.options.btmAnchor === \"\" ? document.documentElement.scrollHeight : this.options.btmAnchor,\n pts = [top, btm],\n breaks = {};\n for (var i = 0, len = pts.length; i < len && pts[i]; i++) {\n var pt;\n if (typeof pts[i] === 'number') {\n pt = pts[i];\n } else {\n var place = pts[i].split(':'),\n anchor = $(`#${place[0]}`);\n\n pt = anchor.offset().top;\n if (place[1] && place[1].toLowerCase() === 'bottom') {\n pt += anchor[0].getBoundingClientRect().height;\n }\n }\n breaks[i] = pt;\n }\n\n\n this.points = breaks;\n return;\n }\n\n /**\n * Adds event handlers for the scrolling element.\n * @private\n * @param {String} id - pseudo-random id for unique scroll event listener.\n */\n _events(id) {\n var _this = this,\n scrollListener = this.scrollListener = `scroll.zf.${id}`;\n if (this.isOn) { return; }\n if (this.canStick) {\n this.isOn = true;\n $(window).off(scrollListener)\n .on(scrollListener, function() {\n if (_this.scrollCount === 0) {\n _this.scrollCount = _this.options.checkEvery;\n _this._setSizes(function() {\n _this._calc(false, window.pageYOffset);\n });\n } else {\n _this.scrollCount--;\n _this._calc(false, window.pageYOffset);\n }\n });\n }\n\n this.$element.off('resizeme.zf.trigger')\n .on('resizeme.zf.trigger', function() {\n _this._eventsHandler(id);\n });\n\n this.$element.on('mutateme.zf.trigger', function () {\n _this._eventsHandler(id);\n });\n\n if(this.$anchor) {\n this.$anchor.on('mutateme.zf.trigger', function () {\n _this._eventsHandler(id);\n });\n }\n }\n\n /**\n * Handler for events.\n * @private\n * @param {String} id - pseudo-random id for unique scroll event listener.\n */\n _eventsHandler(id) {\n var _this = this,\n scrollListener = this.scrollListener = `scroll.zf.${id}`;\n\n _this._setSizes(function() {\n _this._calc(false);\n if (_this.canStick) {\n if (!_this.isOn) {\n _this._events(id);\n }\n } else if (_this.isOn) {\n _this._pauseListeners(scrollListener);\n }\n });\n }\n\n /**\n * Removes event handlers for scroll and change events on anchor.\n * @fires Sticky#pause\n * @param {String} scrollListener - unique, namespaced scroll listener attached to `window`\n */\n _pauseListeners(scrollListener) {\n this.isOn = false;\n $(window).off(scrollListener);\n\n /**\n * Fires when the plugin is paused due to resize event shrinking the view.\n * @event Sticky#pause\n * @private\n */\n this.$element.trigger('pause.zf.sticky');\n }\n\n /**\n * Called on every `scroll` event and on `_init`\n * fires functions based on booleans and cached values\n * @param {Boolean} checkSizes - true if plugin should recalculate sizes and breakpoints.\n * @param {Number} scroll - current scroll position passed from scroll event cb function. If not passed, defaults to `window.pageYOffset`.\n */\n _calc(checkSizes, scroll) {\n if (checkSizes) { this._setSizes(); }\n\n if (!this.canStick) {\n if (this.isStuck) {\n this._removeSticky(true);\n }\n return false;\n }\n\n if (!scroll) { scroll = window.pageYOffset; }\n\n if (scroll >= this.topPoint) {\n if (scroll <= this.bottomPoint) {\n if (!this.isStuck) {\n this._setSticky();\n }\n } else {\n if (this.isStuck) {\n this._removeSticky(false);\n }\n }\n } else {\n if (this.isStuck) {\n this._removeSticky(true);\n }\n }\n }\n\n /**\n * Causes the $element to become stuck.\n * Adds `position: fixed;`, and helper classes.\n * @fires Sticky#stuckto\n * @function\n * @private\n */\n _setSticky() {\n var _this = this,\n stickTo = this.options.stickTo,\n mrgn = stickTo === 'top' ? 'marginTop' : 'marginBottom',\n notStuckTo = stickTo === 'top' ? 'bottom' : 'top',\n css = {};\n\n css[mrgn] = `${this.options[mrgn]}em`;\n css[stickTo] = 0;\n css[notStuckTo] = 'auto';\n this.isStuck = true;\n this.$element.removeClass(`is-anchored is-at-${notStuckTo}`)\n .addClass(`is-stuck is-at-${stickTo}`)\n .css(css)\n /**\n * Fires when the $element has become `position: fixed;`\n * Namespaced to `top` or `bottom`, e.g. `sticky.zf.stuckto:top`\n * @event Sticky#stuckto\n */\n .trigger(`sticky.zf.stuckto:${stickTo}`);\n this.$element.on(\"transitionend webkitTransitionEnd oTransitionEnd otransitionend MSTransitionEnd\", function() {\n _this._setSizes();\n });\n }\n\n /**\n * Causes the $element to become unstuck.\n * Removes `position: fixed;`, and helper classes.\n * Adds other helper classes.\n * @param {Boolean} isTop - tells the function if the $element should anchor to the top or bottom of its $anchor element.\n * @fires Sticky#unstuckfrom\n * @private\n */\n _removeSticky(isTop) {\n var stickTo = this.options.stickTo,\n stickToTop = stickTo === 'top',\n css = {},\n anchorPt = (this.points ? this.points[1] - this.points[0] : this.anchorHeight) - this.elemHeight,\n mrgn = stickToTop ? 'marginTop' : 'marginBottom',\n topOrBottom = isTop ? 'top' : 'bottom';\n\n css[mrgn] = 0;\n\n css.bottom = 'auto';\n if(isTop) {\n css.top = 0;\n } else {\n css.top = anchorPt;\n }\n\n this.isStuck = false;\n this.$element.removeClass(`is-stuck is-at-${stickTo}`)\n .addClass(`is-anchored is-at-${topOrBottom}`)\n .css(css)\n /**\n * Fires when the $element has become anchored.\n * Namespaced to `top` or `bottom`, e.g. `sticky.zf.unstuckfrom:bottom`\n * @event Sticky#unstuckfrom\n */\n .trigger(`sticky.zf.unstuckfrom:${topOrBottom}`);\n }\n\n /**\n * Sets the $element and $container sizes for plugin.\n * Calls `_setBreakPoints`.\n * @param {Function} cb - optional callback function to fire on completion of `_setBreakPoints`.\n * @private\n */\n _setSizes(cb) {\n this.canStick = MediaQuery.is(this.options.stickyOn);\n if (!this.canStick) {\n if (cb && typeof cb === 'function') { cb(); }\n }\n\n var newElemWidth = this.$container[0].getBoundingClientRect().width,\n comp = window.getComputedStyle(this.$container[0]),\n pdngl = parseInt(comp['padding-left'], 10),\n pdngr = parseInt(comp['padding-right'], 10);\n\n if (this.$anchor && this.$anchor.length) {\n this.anchorHeight = this.$anchor[0].getBoundingClientRect().height;\n } else {\n this._parsePoints();\n }\n\n this.$element.css({\n 'max-width': `${newElemWidth - pdngl - pdngr}px`\n });\n\n // Recalculate the height only if it is \"dynamic\"\n if (this.options.dynamicHeight || !this.containerHeight) {\n // Get the sticked element height and apply it to the container to \"hold the place\"\n var newContainerHeight = this.$element[0].getBoundingClientRect().height || this.containerHeight;\n newContainerHeight = this.$element.css(\"display\") === \"none\" ? 0 : newContainerHeight;\n this.$container.css('height', newContainerHeight);\n this.containerHeight = newContainerHeight;\n }\n this.elemHeight = this.containerHeight;\n\n if (!this.isStuck) {\n if (this.$element.hasClass('is-at-bottom')) {\n var anchorPt = (this.points ? this.points[1] - this.$container.offset().top : this.anchorHeight) - this.elemHeight;\n this.$element.css('top', anchorPt);\n }\n }\n\n this._setBreakPoints(this.containerHeight, function() {\n if (cb && typeof cb === 'function') { cb(); }\n });\n }\n\n /**\n * Sets the upper and lower breakpoints for the element to become sticky/unsticky.\n * @param {Number} elemHeight - px value for sticky.$element height, calculated by `_setSizes`.\n * @param {Function} cb - optional callback function to be called on completion.\n * @private\n */\n _setBreakPoints(elemHeight, cb) {\n if (!this.canStick) {\n if (cb && typeof cb === 'function') { cb(); }\n else { return false; }\n }\n var mTop = emCalc(this.options.marginTop),\n mBtm = emCalc(this.options.marginBottom),\n topPoint = this.points ? this.points[0] : this.$anchor.offset().top,\n bottomPoint = this.points ? this.points[1] : topPoint + this.anchorHeight,\n // topPoint = this.$anchor.offset().top || this.points[0],\n // bottomPoint = topPoint + this.anchorHeight || this.points[1],\n winHeight = window.innerHeight;\n\n if (this.options.stickTo === 'top') {\n topPoint -= mTop;\n bottomPoint -= (elemHeight + mTop);\n } else if (this.options.stickTo === 'bottom') {\n topPoint -= (winHeight - (elemHeight + mBtm));\n bottomPoint -= (winHeight - mBtm);\n } else {\n //this would be the stickTo: both option... tricky\n }\n\n this.topPoint = topPoint;\n this.bottomPoint = bottomPoint;\n\n if (cb && typeof cb === 'function') { cb(); }\n }\n\n /**\n * Destroys the current sticky element.\n * Resets the element to the top position first.\n * Removes event listeners, JS-added css properties and classes, and unwraps the $element if the JS added the $container.\n * @function\n */\n _destroy() {\n this._removeSticky(true);\n\n this.$element.removeClass(`${this.options.stickyClass} is-anchored is-at-top`)\n .css({\n height: '',\n top: '',\n bottom: '',\n 'max-width': ''\n })\n .off('resizeme.zf.trigger')\n .off('mutateme.zf.trigger');\n if (this.$anchor && this.$anchor.length) {\n this.$anchor.off('change.zf.sticky');\n }\n if (this.scrollListener) $(window).off(this.scrollListener)\n if (this.onLoadListener) $(window).off(this.onLoadListener)\n\n if (this.wasWrapped) {\n this.$element.unwrap();\n } else {\n this.$container.removeClass(this.options.containerClass)\n .css({\n height: ''\n });\n }\n }\n}\n\nSticky.defaults = {\n /**\n * Customizable container template. Add your own classes for styling and sizing.\n * @option\n * @type {string}\n * @default '&lt;div data-sticky-container&gt;&lt;/div&gt;'\n */\n container: '<div data-sticky-container></div>',\n /**\n * Location in the view the element sticks to. Can be `'top'` or `'bottom'`.\n * @option\n * @type {string}\n * @default 'top'\n */\n stickTo: 'top',\n /**\n * If anchored to a single element, the id of that element.\n * @option\n * @type {string}\n * @default ''\n */\n anchor: '',\n /**\n * If using more than one element as anchor points, the id of the top anchor.\n * @option\n * @type {string}\n * @default ''\n */\n topAnchor: '',\n /**\n * If using more than one element as anchor points, the id of the bottom anchor.\n * @option\n * @type {string}\n * @default ''\n */\n btmAnchor: '',\n /**\n * Margin, in `em`'s to apply to the top of the element when it becomes sticky.\n * @option\n * @type {number}\n * @default 1\n */\n marginTop: 1,\n /**\n * Margin, in `em`'s to apply to the bottom of the element when it becomes sticky.\n * @option\n * @type {number}\n * @default 1\n */\n marginBottom: 1,\n /**\n * Breakpoint string that is the minimum screen size an element should become sticky.\n * @option\n * @type {string}\n * @default 'medium'\n */\n stickyOn: 'medium',\n /**\n * Class applied to sticky element, and removed on destruction. Foundation defaults to `sticky`.\n * @option\n * @type {string}\n * @default 'sticky'\n */\n stickyClass: 'sticky',\n /**\n * Class applied to sticky container. Foundation defaults to `sticky-container`.\n * @option\n * @type {string}\n * @default 'sticky-container'\n */\n containerClass: 'sticky-container',\n /**\n * If true (by default), keep the sticky container the same height as the element. Otherwise, the container height is set once and does not change.\n * @option\n * @type {boolean}\n * @default true\n */\n dynamicHeight: true,\n /**\n * Number of scroll events between the plugin's recalculating sticky points. Setting it to `0` will cause it to recalc every scroll event, setting it to `-1` will prevent recalc on scroll.\n * @option\n * @type {number}\n * @default -1\n */\n checkEvery: -1\n};\n\n/**\n * Helper function to calculate em values\n * @param Number {em} - number of em's to calculate into pixels\n */\nfunction emCalc(em) {\n return parseInt(window.getComputedStyle(document.body, null).fontSize, 10) * em;\n}\n\nexport {Sticky};\n","import $ from 'jquery';\nimport { Plugin } from './foundation.core.plugin';\nimport { onLoad } from './foundation.core.utils';\nimport { Keyboard } from './foundation.util.keyboard';\nimport { onImagesLoaded } from './foundation.util.imageLoader';\n/**\n * Tabs module.\n * @module foundation.tabs\n * @requires foundation.util.keyboard\n * @requires foundation.util.imageLoader if tabs contain images\n */\n\nclass Tabs extends Plugin {\n /**\n * Creates a new instance of tabs.\n * @class\n * @name Tabs\n * @fires Tabs#init\n * @param {jQuery} element - jQuery object to make into tabs.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element, options) {\n this.$element = element;\n this.options = $.extend({}, Tabs.defaults, this.$element.data(), options);\n this.className = 'Tabs'; // ie9 back compat\n\n this._init();\n Keyboard.register('Tabs', {\n 'ENTER': 'open',\n 'SPACE': 'open',\n 'ARROW_RIGHT': 'next',\n 'ARROW_UP': 'previous',\n 'ARROW_DOWN': 'next',\n 'ARROW_LEFT': 'previous'\n // 'TAB': 'next',\n // 'SHIFT_TAB': 'previous'\n });\n }\n\n /**\n * Initializes the tabs by showing and focusing (if autoFocus=true) the preset active tab.\n * @private\n */\n _init() {\n var _this = this;\n this._isInitializing = true;\n\n this.$element.attr({'role': 'tablist'});\n this.$tabTitles = this.$element.find(`.${this.options.linkClass}`);\n this.$tabContent = $(`[data-tabs-content=\"${this.$element[0].id}\"]`);\n\n this.$tabTitles.each(function(){\n var $elem = $(this),\n $link = $elem.find('a'),\n isActive = $elem.hasClass(`${_this.options.linkActiveClass}`),\n hash = $link.attr('data-tabs-target') || $link[0].hash.slice(1),\n linkId = $link[0].id ? $link[0].id : `${hash}-label`,\n $tabContent = $(`#${hash}`);\n\n $elem.attr({'role': 'presentation'});\n\n $link.attr({\n 'role': 'tab',\n 'aria-controls': hash,\n 'aria-selected': isActive,\n 'id': linkId,\n 'tabindex': isActive ? '0' : '-1'\n });\n\n $tabContent.attr({\n 'role': 'tabpanel',\n 'aria-labelledby': linkId\n });\n\n // Save up the initial hash to return to it later when going back in history\n if (isActive) {\n _this._initialAnchor = `#${hash}`;\n }\n\n if(!isActive) {\n $tabContent.attr('aria-hidden', 'true');\n }\n\n if(isActive && _this.options.autoFocus){\n _this.onLoadListener = onLoad($(window), function() {\n $('html, body').animate({ scrollTop: $elem.offset().top }, _this.options.deepLinkSmudgeDelay, () => {\n $link.focus();\n });\n });\n }\n });\n\n if(this.options.matchHeight) {\n var $images = this.$tabContent.find('img');\n\n if ($images.length) {\n onImagesLoaded($images, this._setHeight.bind(this));\n } else {\n this._setHeight();\n }\n }\n\n // Current context-bound function to open tabs on page load or history hashchange\n this._checkDeepLink = () => {\n var anchor = window.location.hash;\n\n if (!anchor.length) {\n // If we are still initializing and there is no anchor, then there is nothing to do\n if (this._isInitializing) return;\n // Otherwise, move to the initial anchor\n if (this._initialAnchor) anchor = this._initialAnchor;\n }\n\n var anchorNoHash = anchor.indexOf('#') >= 0 ? anchor.slice(1) : anchor;\n var $anchor = anchorNoHash && $(`#${anchorNoHash}`);\n var $link = anchor && this.$element.find(`[href$=\"${anchor}\"],[data-tabs-target=\"${anchorNoHash}\"]`).first();\n // Whether the anchor element that has been found is part of this element\n var isOwnAnchor = !!($anchor.length && $link.length);\n\n if (isOwnAnchor) {\n // If there is an anchor for the hash, select it\n if ($anchor && $anchor.length && $link && $link.length) {\n this.selectTab($anchor, true);\n }\n // Otherwise, collapse everything\n else {\n this._collapse();\n }\n\n // Roll up a little to show the titles\n if (this.options.deepLinkSmudge) {\n var offset = this.$element.offset();\n $('html, body').animate({ scrollTop: offset.top - this.options.deepLinkSmudgeOffset}, this.options.deepLinkSmudgeDelay);\n }\n\n /**\n * Fires when the plugin has deeplinked at pageload\n * @event Tabs#deeplink\n */\n this.$element.trigger('deeplink.zf.tabs', [$link, $anchor]);\n }\n }\n\n //use browser to open a tab, if it exists in this tabset\n if (this.options.deepLink) {\n this._checkDeepLink();\n }\n\n this._events();\n\n this._isInitializing = false;\n }\n\n /**\n * Adds event handlers for items within the tabs.\n * @private\n */\n _events() {\n this._addKeyHandler();\n this._addClickHandler();\n this._setHeightMqHandler = null;\n\n if (this.options.matchHeight) {\n this._setHeightMqHandler = this._setHeight.bind(this);\n\n $(window).on('changed.zf.mediaquery', this._setHeightMqHandler);\n }\n\n if(this.options.deepLink) {\n $(window).on('hashchange', this._checkDeepLink);\n }\n }\n\n /**\n * Adds click handlers for items within the tabs.\n * @private\n */\n _addClickHandler() {\n var _this = this;\n\n this.$element\n .off('click.zf.tabs')\n .on('click.zf.tabs', `.${this.options.linkClass}`, function(e){\n e.preventDefault();\n _this._handleTabChange($(this));\n });\n }\n\n /**\n * Adds keyboard event handlers for items within the tabs.\n * @private\n */\n _addKeyHandler() {\n var _this = this;\n\n this.$tabTitles.off('keydown.zf.tabs').on('keydown.zf.tabs', function(e){\n if (e.which === 9) return;\n\n\n var $element = $(this),\n $elements = $element.parent('ul').children('li'),\n $prevElement,\n $nextElement;\n\n $elements.each(function(i) {\n if ($(this).is($element)) {\n if (_this.options.wrapOnKeys) {\n $prevElement = i === 0 ? $elements.last() : $elements.eq(i-1);\n $nextElement = i === $elements.length -1 ? $elements.first() : $elements.eq(i+1);\n } else {\n $prevElement = $elements.eq(Math.max(0, i-1));\n $nextElement = $elements.eq(Math.min(i+1, $elements.length-1));\n }\n return;\n }\n });\n\n // handle keyboard event with keyboard util\n Keyboard.handleKey(e, 'Tabs', {\n open: function() {\n $element.find('[role=\"tab\"]').focus();\n _this._handleTabChange($element);\n },\n previous: function() {\n $prevElement.find('[role=\"tab\"]').focus();\n _this._handleTabChange($prevElement);\n },\n next: function() {\n $nextElement.find('[role=\"tab\"]').focus();\n _this._handleTabChange($nextElement);\n },\n handled: function() {\n e.preventDefault();\n }\n });\n });\n }\n\n /**\n * Opens the tab `$targetContent` defined by `$target`. Collapses active tab.\n * @param {jQuery} $target - Tab to open.\n * @param {boolean} historyHandled - browser has already handled a history update\n * @fires Tabs#change\n * @function\n */\n _handleTabChange($target, historyHandled) {\n\n // With `activeCollapse`, if the target is the active Tab, collapse it.\n if ($target.hasClass(`${this.options.linkActiveClass}`)) {\n if(this.options.activeCollapse) {\n this._collapse();\n }\n return;\n }\n\n var $oldTab = this.$element.\n find(`.${this.options.linkClass}.${this.options.linkActiveClass}`),\n $tabLink = $target.find('[role=\"tab\"]'),\n target = $tabLink.attr('data-tabs-target'),\n anchor = target && target.length ? `#${target}` : $tabLink[0].hash,\n $targetContent = this.$tabContent.find(anchor);\n\n //close old tab\n this._collapseTab($oldTab);\n\n //open new tab\n this._openTab($target);\n\n //either replace or update browser history\n if (this.options.deepLink && !historyHandled) {\n if (this.options.updateHistory) {\n history.pushState({}, '', location.pathname + location.search + anchor);\n } else {\n history.replaceState({}, '', location.pathname + location.search + anchor);\n }\n }\n\n /**\n * Fires when the plugin has successfully changed tabs.\n * @event Tabs#change\n */\n this.$element.trigger('change.zf.tabs', [$target, $targetContent]);\n\n //fire to children a mutation event\n $targetContent.find(\"[data-mutate]\").trigger(\"mutateme.zf.trigger\");\n }\n\n /**\n * Opens the tab `$targetContent` defined by `$target`.\n * @param {jQuery} $target - Tab to open.\n * @function\n */\n _openTab($target) {\n var $tabLink = $target.find('[role=\"tab\"]'),\n hash = $tabLink.attr('data-tabs-target') || $tabLink[0].hash.slice(1),\n $targetContent = this.$tabContent.find(`#${hash}`);\n\n $target.addClass(`${this.options.linkActiveClass}`);\n\n $tabLink.attr({\n 'aria-selected': 'true',\n 'tabindex': '0'\n });\n\n $targetContent\n .addClass(`${this.options.panelActiveClass}`).removeAttr('aria-hidden');\n }\n\n /**\n * Collapses `$targetContent` defined by `$target`.\n * @param {jQuery} $target - Tab to collapse.\n * @function\n */\n _collapseTab($target) {\n var $targetAnchor = $target\n .removeClass(`${this.options.linkActiveClass}`)\n .find('[role=\"tab\"]')\n .attr({\n 'aria-selected': 'false',\n 'tabindex': -1\n });\n\n $(`#${$targetAnchor.attr('aria-controls')}`)\n .removeClass(`${this.options.panelActiveClass}`)\n .attr({ 'aria-hidden': 'true' })\n }\n\n /**\n * Collapses the active Tab.\n * @fires Tabs#collapse\n * @function\n */\n _collapse() {\n var $activeTab = this.$element.find(`.${this.options.linkClass}.${this.options.linkActiveClass}`);\n\n if ($activeTab.length) {\n this._collapseTab($activeTab);\n\n /**\n * Fires when the plugin has successfully collapsed tabs.\n * @event Tabs#collapse\n */\n this.$element.trigger('collapse.zf.tabs', [$activeTab]);\n }\n }\n\n /**\n * Public method for selecting a content pane to display.\n * @param {jQuery | String} elem - jQuery object or string of the id of the pane to display.\n * @param {boolean} historyHandled - browser has already handled a history update\n * @function\n */\n selectTab(elem, historyHandled) {\n var idStr, hashIdStr;\n\n if (typeof elem === 'object') {\n idStr = elem[0].id;\n } else {\n idStr = elem;\n }\n\n if (idStr.indexOf('#') < 0) {\n hashIdStr = `#${idStr}`;\n } else {\n hashIdStr = idStr;\n idStr = idStr.slice(1);\n }\n\n var $target = this.$tabTitles.has(`[href$=\"${hashIdStr}\"],[data-tabs-target=\"${idStr}\"]`).first();\n\n this._handleTabChange($target, historyHandled);\n };\n\n /**\n * Sets the height of each panel to the height of the tallest panel.\n * If enabled in options, gets called on media query change.\n * If loading content via external source, can be called directly or with _reflow.\n * If enabled with `data-match-height=\"true\"`, tabs sets to equal height\n * @function\n * @private\n */\n _setHeight() {\n var max = 0,\n _this = this; // Lock down the `this` value for the root tabs object\n\n if (!this.$tabContent) {\n return;\n }\n\n this.$tabContent\n .find(`.${this.options.panelClass}`)\n .css('min-height', '')\n .each(function() {\n\n var panel = $(this),\n isActive = panel.hasClass(`${_this.options.panelActiveClass}`); // get the options from the parent instead of trying to get them from the child\n\n if (!isActive) {\n panel.css({'visibility': 'hidden', 'display': 'block'});\n }\n\n var temp = this.getBoundingClientRect().height;\n\n if (!isActive) {\n panel.css({\n 'visibility': '',\n 'display': ''\n });\n }\n\n max = temp > max ? temp : max;\n })\n .css('min-height', `${max}px`);\n }\n\n /**\n * Destroys an instance of tabs.\n * @fires Tabs#destroyed\n */\n _destroy() {\n this.$element\n .find(`.${this.options.linkClass}`)\n .off('.zf.tabs').hide().end()\n .find(`.${this.options.panelClass}`)\n .hide();\n\n if (this.options.matchHeight) {\n if (this._setHeightMqHandler != null) {\n $(window).off('changed.zf.mediaquery', this._setHeightMqHandler);\n }\n }\n\n if (this.options.deepLink) {\n $(window).off('hashchange', this._checkDeepLink);\n }\n\n if (this.onLoadListener) {\n $(window).off(this.onLoadListener);\n }\n }\n}\n\nTabs.defaults = {\n /**\n * Link the location hash to the active pane.\n * Set the location hash when the active pane changes, and open the corresponding pane when the location changes.\n * @option\n * @type {boolean}\n * @default false\n */\n deepLink: false,\n\n /**\n * If `deepLink` is enabled, adjust the deep link scroll to make sure the top of the tab panel is visible\n * @option\n * @type {boolean}\n * @default false\n */\n deepLinkSmudge: false,\n\n /**\n * If `deepLinkSmudge` is enabled, animation time (ms) for the deep link adjustment\n * @option\n * @type {number}\n * @default 300\n */\n deepLinkSmudgeDelay: 300,\n\n /**\n * If `deepLinkSmudge` is enabled, animation offset from the top for the deep link adjustment\n * @option\n * @type {number}\n * @default 0\n */\n deepLinkSmudgeOffset: 0,\n\n /**\n * If `deepLink` is enabled, update the browser history with the open tab\n * @option\n * @type {boolean}\n * @default false\n */\n updateHistory: false,\n\n /**\n * Allows the window to scroll to content of active pane on load.\n * Not recommended if more than one tab panel per page.\n * @option\n * @type {boolean}\n * @default false\n */\n autoFocus: false,\n\n /**\n * Allows keyboard input to 'wrap' around the tab links.\n * @option\n * @type {boolean}\n * @default true\n */\n wrapOnKeys: true,\n\n /**\n * Allows the tab content panes to match heights if set to true.\n * @option\n * @type {boolean}\n * @default false\n */\n matchHeight: false,\n\n /**\n * Allows active tabs to collapse when clicked.\n * @option\n * @type {boolean}\n * @default false\n */\n activeCollapse: false,\n\n /**\n * Class applied to `li`'s in tab link list.\n * @option\n * @type {string}\n * @default 'tabs-title'\n */\n linkClass: 'tabs-title',\n\n /**\n * Class applied to the active `li` in tab link list.\n * @option\n * @type {string}\n * @default 'is-active'\n */\n linkActiveClass: 'is-active',\n\n /**\n * Class applied to the content containers.\n * @option\n * @type {string}\n * @default 'tabs-panel'\n */\n panelClass: 'tabs-panel',\n\n /**\n * Class applied to the active content container.\n * @option\n * @type {string}\n * @default 'is-active'\n */\n panelActiveClass: 'is-active'\n};\n\nexport {Tabs};\n","import $ from 'jquery';\nimport { Motion } from './foundation.util.motion';\nimport { Plugin } from './foundation.core.plugin';\nimport { RegExpEscape } from './foundation.core.utils';\nimport { Triggers } from './foundation.util.triggers';\n\n/**\n * Toggler module.\n * @module foundation.toggler\n * @requires foundation.util.motion\n * @requires foundation.util.triggers\n */\n\nclass Toggler extends Plugin {\n /**\n * Creates a new instance of Toggler.\n * @class\n * @name Toggler\n * @fires Toggler#init\n * @param {Object} element - jQuery object to add the trigger to.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element, options) {\n this.$element = element;\n this.options = $.extend({}, Toggler.defaults, element.data(), options);\n this.className = '';\n this.className = 'Toggler'; // ie9 back compat\n\n // Triggers init is idempotent, just need to make sure it is initialized\n Triggers.init($);\n\n this._init();\n this._events();\n }\n\n /**\n * Initializes the Toggler plugin by parsing the toggle class from data-toggler, or animation classes from data-animate.\n * @function\n * @private\n */\n _init() {\n // Collect triggers to set ARIA attributes to\n var id = this.$element[0].id,\n $triggers = $(`[data-open~=\"${id}\"], [data-close~=\"${id}\"], [data-toggle~=\"${id}\"]`);\n\n var input;\n // Parse animation classes if they were set\n if (this.options.animate) {\n input = this.options.animate.split(' ');\n\n this.animationIn = input[0];\n this.animationOut = input[1] || null;\n\n // - aria-expanded: according to the element visibility.\n $triggers.attr('aria-expanded', !this.$element.is(':hidden'));\n }\n // Otherwise, parse toggle class\n else {\n input = this.options.toggler;\n if (typeof input !== 'string' || !input.length) {\n throw new Error(`The 'toggler' option containing the target class is required, got \"${input}\"`);\n }\n // Allow for a . at the beginning of the string\n this.className = input[0] === '.' ? input.slice(1) : input;\n\n // - aria-expanded: according to the elements class set.\n $triggers.attr('aria-expanded', this.$element.hasClass(this.className));\n }\n\n // - aria-controls: adding the element id to it if not already in it.\n $triggers.each((index, trigger) => {\n const $trigger = $(trigger);\n const controls = $trigger.attr('aria-controls') || '';\n\n const containsId = new RegExp(`\\\\b${RegExpEscape(id)}\\\\b`).test(controls);\n if (!containsId) $trigger.attr('aria-controls', controls ? `${controls} ${id}` : id);\n });\n }\n\n /**\n * Initializes events for the toggle trigger.\n * @function\n * @private\n */\n _events() {\n this.$element.off('toggle.zf.trigger').on('toggle.zf.trigger', this.toggle.bind(this));\n }\n\n /**\n * Toggles the target class on the target element. An event is fired from the original trigger depending on if the resultant state was \"on\" or \"off\".\n * @function\n * @fires Toggler#on\n * @fires Toggler#off\n */\n toggle() {\n this[ this.options.animate ? '_toggleAnimate' : '_toggleClass']();\n }\n\n _toggleClass() {\n this.$element.toggleClass(this.className);\n\n var isOn = this.$element.hasClass(this.className);\n if (isOn) {\n /**\n * Fires if the target element has the class after a toggle.\n * @event Toggler#on\n */\n this.$element.trigger('on.zf.toggler');\n }\n else {\n /**\n * Fires if the target element does not have the class after a toggle.\n * @event Toggler#off\n */\n this.$element.trigger('off.zf.toggler');\n }\n\n this._updateARIA(isOn);\n this.$element.find('[data-mutate]').trigger('mutateme.zf.trigger');\n }\n\n _toggleAnimate() {\n var _this = this;\n\n if (this.$element.is(':hidden')) {\n Motion.animateIn(this.$element, this.animationIn, function() {\n _this._updateARIA(true);\n this.trigger('on.zf.toggler');\n this.find('[data-mutate]').trigger('mutateme.zf.trigger');\n });\n }\n else {\n Motion.animateOut(this.$element, this.animationOut, function() {\n _this._updateARIA(false);\n this.trigger('off.zf.toggler');\n this.find('[data-mutate]').trigger('mutateme.zf.trigger');\n });\n }\n }\n\n _updateARIA(isOn) {\n var id = this.$element[0].id;\n $(`[data-open=\"${id}\"], [data-close=\"${id}\"], [data-toggle=\"${id}\"]`)\n .attr({\n 'aria-expanded': isOn ? true : false\n });\n }\n\n /**\n * Destroys the instance of Toggler on the element.\n * @function\n */\n _destroy() {\n this.$element.off('.zf.toggler');\n }\n}\n\nToggler.defaults = {\n /**\n * Class of the element to toggle. It can be provided with or without \".\"\n * @option\n * @type {string}\n */\n toggler: undefined,\n /**\n * Tells the plugin if the element should animated when toggled.\n * @option\n * @type {boolean}\n * @default false\n */\n animate: false\n};\n\nexport {Toggler};\n","import $ from 'jquery';\nimport { GetYoDigits, ignoreMousedisappear } from './foundation.core.utils';\nimport { MediaQuery } from './foundation.util.mediaQuery';\nimport { Triggers } from './foundation.util.triggers';\nimport { Positionable } from './foundation.positionable';\n\n/**\n * Tooltip module.\n * @module foundation.tooltip\n * @requires foundation.util.box\n * @requires foundation.util.mediaQuery\n * @requires foundation.util.triggers\n */\n\nclass Tooltip extends Positionable {\n /**\n * Creates a new instance of a Tooltip.\n * @class\n * @name Tooltip\n * @fires Tooltip#init\n * @param {jQuery} element - jQuery object to attach a tooltip to.\n * @param {Object} options - object to extend the default configuration.\n */\n _setup(element, options) {\n this.$element = element;\n this.options = $.extend({}, Tooltip.defaults, this.$element.data(), options);\n this.className = 'Tooltip'; // ie9 back compat\n\n this.isActive = false;\n this.isClick = false;\n\n // Triggers init is idempotent, just need to make sure it is initialized\n Triggers.init($);\n\n this._init();\n }\n\n /**\n * Initializes the tooltip by setting the creating the tip element, adding it's text, setting private variables and setting attributes on the anchor.\n * @private\n */\n _init() {\n MediaQuery._init();\n var elemId = this.$element.attr('aria-describedby') || GetYoDigits(6, 'tooltip');\n\n this.options.tipText = this.options.tipText || this.$element.attr('title');\n this.template = this.options.template ? $(this.options.template) : this._buildTemplate(elemId);\n\n if (this.options.allowHtml) {\n this.template.appendTo(document.body)\n .html(this.options.tipText)\n .hide();\n } else {\n this.template.appendTo(document.body)\n .text(this.options.tipText)\n .hide();\n }\n\n this.$element.attr({\n 'title': '',\n 'aria-describedby': elemId,\n 'data-yeti-box': elemId,\n 'data-toggle': elemId,\n 'data-resize': elemId\n }).addClass(this.options.triggerClass);\n\n super._init();\n this._events();\n }\n\n _getDefaultPosition() {\n // handle legacy classnames\n var elementClassName = this.$element[0].className;\n if (this.$element[0] instanceof SVGElement) {\n elementClassName = elementClassName.baseVal;\n }\n var position = elementClassName.match(/\\b(top|left|right|bottom)\\b/g);\n return position ? position[0] : 'top';\n }\n\n _getDefaultAlignment() {\n return 'center';\n }\n\n _getHOffset() {\n if(this.position === 'left' || this.position === 'right') {\n return this.options.hOffset + this.options.tooltipWidth;\n } else {\n return this.options.hOffset\n }\n }\n\n _getVOffset() {\n if(this.position === 'top' || this.position === 'bottom') {\n return this.options.vOffset + this.options.tooltipHeight;\n } else {\n return this.options.vOffset\n }\n }\n\n /**\n * builds the tooltip element, adds attributes, and returns the template.\n * @private\n */\n _buildTemplate(id) {\n var templateClasses = (`${this.options.tooltipClass} ${this.options.templateClasses}`).trim();\n var $template = $('<div></div>').addClass(templateClasses).attr({\n 'role': 'tooltip',\n 'aria-hidden': true,\n 'data-is-active': false,\n 'data-is-focus': false,\n 'id': id\n });\n return $template;\n }\n\n /**\n * sets the position class of an element and recursively calls itself until there are no more possible positions to attempt, or the tooltip element is no longer colliding.\n * if the tooltip is larger than the screen width, default to full width - any user selected margin\n * @private\n */\n _setPosition() {\n super._setPosition(this.$element, this.template);\n }\n\n /**\n * reveals the tooltip, and fires an event to close any other open tooltips on the page\n * @fires Tooltip#closeme\n * @fires Tooltip#show\n * @function\n */\n show() {\n if (this.options.showOn !== 'all' && !MediaQuery.is(this.options.showOn)) {\n // console.error('The screen is too small to display this tooltip');\n return false;\n }\n\n var _this = this;\n this.template.css('visibility', 'hidden').show();\n this._setPosition();\n this.template.removeClass('top bottom left right').addClass(this.position)\n this.template.removeClass('align-top align-bottom align-left align-right align-center').addClass('align-' + this.alignment);\n\n /**\n * Fires to close all other open tooltips on the page\n * @event Closeme#tooltip\n */\n this.$element.trigger('closeme.zf.tooltip', this.template.attr('id'));\n\n\n this.template.attr({\n 'data-is-active': true,\n 'aria-hidden': false\n });\n _this.isActive = true;\n this.template.stop().hide().css('visibility', '').fadeIn(this.options.fadeInDuration, function() {\n //maybe do stuff?\n });\n /**\n * Fires when the tooltip is shown\n * @event Tooltip#show\n */\n this.$element.trigger('show.zf.tooltip');\n }\n\n /**\n * Hides the current tooltip, and resets the positioning class if it was changed due to collision\n * @fires Tooltip#hide\n * @function\n */\n hide() {\n var _this = this;\n this.template.stop().attr({\n 'aria-hidden': true,\n 'data-is-active': false\n }).fadeOut(this.options.fadeOutDuration, function() {\n _this.isActive = false;\n _this.isClick = false;\n });\n /**\n * fires when the tooltip is hidden\n * @event Tooltip#hide\n */\n this.$element.trigger('hide.zf.tooltip');\n }\n\n /**\n * adds event listeners for the tooltip and its anchor\n * TODO combine some of the listeners like focus and mouseenter, etc.\n * @private\n */\n _events() {\n const _this = this;\n const hasTouch = 'ontouchstart' in window || (typeof window.ontouchstart !== 'undefined');\n var isFocus = false;\n\n // `disableForTouch: Fully disable the tooltip on touch devices\n if (hasTouch && this.options.disableForTouch) return;\n\n if (!this.options.disableHover) {\n this.$element\n .on('mouseenter.zf.tooltip', function() {\n if (!_this.isActive) {\n _this.timeout = setTimeout(function() {\n _this.show();\n }, _this.options.hoverDelay);\n }\n })\n .on('mouseleave.zf.tooltip', ignoreMousedisappear(function() {\n clearTimeout(_this.timeout);\n if (!isFocus || (_this.isClick && !_this.options.clickOpen)) {\n _this.hide();\n }\n }));\n }\n\n if (hasTouch) {\n this.$element\n .on('tap.zf.tooltip touchend.zf.tooltip', function () {\n _this.isActive ? _this.hide() : _this.show();\n });\n }\n\n if (this.options.clickOpen) {\n this.$element.on('mousedown.zf.tooltip', function() {\n if (_this.isClick) {\n //_this.hide();\n // _this.isClick = false;\n } else {\n _this.isClick = true;\n if ((_this.options.disableHover || !_this.$element.attr('tabindex')) && !_this.isActive) {\n _this.show();\n }\n }\n });\n } else {\n this.$element.on('mousedown.zf.tooltip', function() {\n _this.isClick = true;\n });\n }\n\n this.$element.on({\n // 'toggle.zf.trigger': this.toggle.bind(this),\n // 'close.zf.trigger': this.hide.bind(this)\n 'close.zf.trigger': this.hide.bind(this)\n });\n\n this.$element\n .on('focus.zf.tooltip', function() {\n isFocus = true;\n if (_this.isClick) {\n // If we're not showing open on clicks, we need to pretend a click-launched focus isn't\n // a real focus, otherwise on hover and come back we get bad behavior\n if(!_this.options.clickOpen) { isFocus = false; }\n return false;\n } else {\n _this.show();\n }\n })\n\n .on('focusout.zf.tooltip', function() {\n isFocus = false;\n _this.isClick = false;\n _this.hide();\n })\n\n .on('resizeme.zf.trigger', function() {\n if (_this.isActive) {\n _this._setPosition();\n }\n });\n }\n\n /**\n * adds a toggle method, in addition to the static show() & hide() functions\n * @function\n */\n toggle() {\n if (this.isActive) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n /**\n * Destroys an instance of tooltip, removes template element from the view.\n * @function\n */\n _destroy() {\n this.$element.attr('title', this.template.text())\n .off('.zf.trigger .zf.tooltip')\n .removeClass(this.options.triggerClass)\n .removeClass('top right left bottom')\n .removeAttr('aria-describedby data-disable-hover data-resize data-toggle data-tooltip data-yeti-box');\n\n this.template.remove();\n }\n}\n\nTooltip.defaults = {\n /**\n * Time, in ms, before a tooltip should open on hover.\n * @option\n * @type {number}\n * @default 200\n */\n hoverDelay: 200,\n /**\n * Time, in ms, a tooltip should take to fade into view.\n * @option\n * @type {number}\n * @default 150\n */\n fadeInDuration: 150,\n /**\n * Time, in ms, a tooltip should take to fade out of view.\n * @option\n * @type {number}\n * @default 150\n */\n fadeOutDuration: 150,\n /**\n * Disables hover events from opening the tooltip if set to true\n * @option\n * @type {boolean}\n * @default false\n */\n disableHover: false,\n /**\n * Disable the tooltip for touch devices.\n * This can be useful to make elements with a tooltip on it trigger their\n * action on the first tap instead of displaying the tooltip.\n * @option\n * @type {booelan}\n * @default false\n */\n disableForTouch: false,\n /**\n * Optional addtional classes to apply to the tooltip template on init.\n * @option\n * @type {string}\n * @default ''\n */\n templateClasses: '',\n /**\n * Non-optional class added to tooltip templates. Foundation default is 'tooltip'.\n * @option\n * @type {string}\n * @default 'tooltip'\n */\n tooltipClass: 'tooltip',\n /**\n * Class applied to the tooltip anchor element.\n * @option\n * @type {string}\n * @default 'has-tip'\n */\n triggerClass: 'has-tip',\n /**\n * Minimum breakpoint size at which to open the tooltip.\n * @option\n * @type {string}\n * @default 'small'\n */\n showOn: 'small',\n /**\n * Custom template to be used to generate markup for tooltip.\n * @option\n * @type {string}\n * @default ''\n */\n template: '',\n /**\n * Text displayed in the tooltip template on open.\n * @option\n * @type {string}\n * @default ''\n */\n tipText: '',\n touchCloseText: 'Tap to close.',\n /**\n * Allows the tooltip to remain open if triggered with a click or touch event.\n * @option\n * @type {boolean}\n * @default true\n */\n clickOpen: true,\n /**\n * Position of tooltip. Can be left, right, bottom, top, or auto.\n * @option\n * @type {string}\n * @default 'auto'\n */\n position: 'auto',\n /**\n * Alignment of tooltip relative to anchor. Can be left, right, bottom, top, center, or auto.\n * @option\n * @type {string}\n * @default 'auto'\n */\n alignment: 'auto',\n /**\n * Allow overlap of container/window. If false, tooltip will first try to\n * position as defined by data-position and data-alignment, but reposition if\n * it would cause an overflow. @option\n * @type {boolean}\n * @default false\n */\n allowOverlap: false,\n /**\n * Allow overlap of only the bottom of the container. This is the most common\n * behavior for dropdowns, allowing the dropdown to extend the bottom of the\n * screen but not otherwise influence or break out of the container.\n * Less common for tooltips.\n * @option\n * @type {boolean}\n * @default false\n */\n allowBottomOverlap: false,\n /**\n * Distance, in pixels, the template should push away from the anchor on the Y axis.\n * @option\n * @type {number}\n * @default 0\n */\n vOffset: 0,\n /**\n * Distance, in pixels, the template should push away from the anchor on the X axis\n * @option\n * @type {number}\n * @default 0\n */\n hOffset: 0,\n /**\n * Distance, in pixels, the template spacing auto-adjust for a vertical tooltip\n * @option\n * @type {number}\n * @default 14\n */\n tooltipHeight: 14,\n /**\n * Distance, in pixels, the template spacing auto-adjust for a horizontal tooltip\n * @option\n * @type {number}\n * @default 12\n */\n tooltipWidth: 12,\n /**\n * Allow HTML in tooltip. Warning: If you are loading user-generated content into tooltips,\n * allowing HTML may open yourself up to XSS attacks.\n * @option\n * @type {boolean}\n * @default false\n */\n allowHtml: false\n};\n\n/**\n * TODO utilize resize event trigger\n */\n\nexport {Tooltip};\n","var Box = {\n ImNotTouchingYou: ImNotTouchingYou,\n OverlapArea: OverlapArea,\n GetDimensions: GetDimensions,\n GetExplicitOffsets: GetExplicitOffsets\n}\n\n/**\n * Compares the dimensions of an element to a container and determines collision events with container.\n * @function\n * @param {jQuery} element - jQuery object to test for collisions.\n * @param {jQuery} parent - jQuery object to use as bounding container.\n * @param {Boolean} lrOnly - set to true to check left and right values only.\n * @param {Boolean} tbOnly - set to true to check top and bottom values only.\n * @default if no parent object passed, detects collisions with `window`.\n * @returns {Boolean} - true if collision free, false if a collision in any direction.\n */\nfunction ImNotTouchingYou(element, parent, lrOnly, tbOnly, ignoreBottom) {\n return OverlapArea(element, parent, lrOnly, tbOnly, ignoreBottom) === 0;\n}\n\nfunction OverlapArea(element, parent, lrOnly, tbOnly, ignoreBottom) {\n var eleDims = GetDimensions(element),\n topOver, bottomOver, leftOver, rightOver;\n if (parent) {\n var parDims = GetDimensions(parent);\n\n bottomOver = (parDims.height + parDims.offset.top) - (eleDims.offset.top + eleDims.height);\n topOver = eleDims.offset.top - parDims.offset.top;\n leftOver = eleDims.offset.left - parDims.offset.left;\n rightOver = (parDims.width + parDims.offset.left) - (eleDims.offset.left + eleDims.width);\n }\n else {\n bottomOver = (eleDims.windowDims.height + eleDims.windowDims.offset.top) - (eleDims.offset.top + eleDims.height);\n topOver = eleDims.offset.top - eleDims.windowDims.offset.top;\n leftOver = eleDims.offset.left - eleDims.windowDims.offset.left;\n rightOver = eleDims.windowDims.width - (eleDims.offset.left + eleDims.width);\n }\n\n bottomOver = ignoreBottom ? 0 : Math.min(bottomOver, 0);\n topOver = Math.min(topOver, 0);\n leftOver = Math.min(leftOver, 0);\n rightOver = Math.min(rightOver, 0);\n\n if (lrOnly) {\n return leftOver + rightOver;\n }\n if (tbOnly) {\n return topOver + bottomOver;\n }\n\n // use sum of squares b/c we care about overlap area.\n return Math.sqrt((topOver * topOver) + (bottomOver * bottomOver) + (leftOver * leftOver) + (rightOver * rightOver));\n}\n\n/**\n * Uses native methods to return an object of dimension values.\n * @function\n * @param {jQuery || HTML} element - jQuery object or DOM element for which to get the dimensions. Can be any element other that document or window.\n * @returns {Object} - nested object of integer pixel values\n * TODO - if element is window, return only those values.\n */\nfunction GetDimensions(elem){\n elem = elem.length ? elem[0] : elem;\n\n if (elem === window || elem === document) {\n throw new Error(\"I'm sorry, Dave. I'm afraid I can't do that.\");\n }\n\n var rect = elem.getBoundingClientRect(),\n parRect = elem.parentNode.getBoundingClientRect(),\n winRect = document.body.getBoundingClientRect(),\n winY = window.pageYOffset,\n winX = window.pageXOffset;\n\n return {\n width: rect.width,\n height: rect.height,\n offset: {\n top: rect.top + winY,\n left: rect.left + winX\n },\n parentDims: {\n width: parRect.width,\n height: parRect.height,\n offset: {\n top: parRect.top + winY,\n left: parRect.left + winX\n }\n },\n windowDims: {\n width: winRect.width,\n height: winRect.height,\n offset: {\n top: winY,\n left: winX\n }\n }\n }\n}\n\n/**\n * Returns an object of top and left integer pixel values for dynamically rendered elements,\n * such as: Tooltip, Reveal, and Dropdown. Maintained for backwards compatibility, and where\n * you don't know alignment, but generally from\n * 6.4 forward you should use GetExplicitOffsets, as GetOffsets conflates position and alignment.\n * @function\n * @param {jQuery} element - jQuery object for the element being positioned.\n * @param {jQuery} anchor - jQuery object for the element's anchor point.\n * @param {String} position - a string relating to the desired position of the element, relative to it's anchor\n * @param {Number} vOffset - integer pixel value of desired vertical separation between anchor and element.\n * @param {Number} hOffset - integer pixel value of desired horizontal separation between anchor and element.\n * @param {Boolean} isOverflow - if a collision event is detected, sets to true to default the element to full width - any desired offset.\n * TODO alter/rewrite to work with `em` values as well/instead of pixels\n */\nfunction GetExplicitOffsets(element, anchor, position, alignment, vOffset, hOffset, isOverflow) {\n var $eleDims = GetDimensions(element),\n $anchorDims = anchor ? GetDimensions(anchor) : null;\n\n var topVal, leftVal;\n\n if ($anchorDims !== null) {\n // set position related attribute\n switch (position) {\n case 'top':\n topVal = $anchorDims.offset.top - ($eleDims.height + vOffset);\n break;\n case 'bottom':\n topVal = $anchorDims.offset.top + $anchorDims.height + vOffset;\n break;\n case 'left':\n leftVal = $anchorDims.offset.left - ($eleDims.width + hOffset);\n break;\n case 'right':\n leftVal = $anchorDims.offset.left + $anchorDims.width + hOffset;\n break;\n }\n\n // set alignment related attribute\n switch (position) {\n case 'top':\n case 'bottom':\n switch (alignment) {\n case 'left':\n leftVal = $anchorDims.offset.left + hOffset;\n break;\n case 'right':\n leftVal = $anchorDims.offset.left - $eleDims.width + $anchorDims.width - hOffset;\n break;\n case 'center':\n leftVal = isOverflow ? hOffset : (($anchorDims.offset.left + ($anchorDims.width / 2)) - ($eleDims.width / 2)) + hOffset;\n break;\n }\n break;\n case 'right':\n case 'left':\n switch (alignment) {\n case 'bottom':\n topVal = $anchorDims.offset.top - vOffset + $anchorDims.height - $eleDims.height;\n break;\n case 'top':\n topVal = $anchorDims.offset.top + vOffset\n break;\n case 'center':\n topVal = ($anchorDims.offset.top + vOffset + ($anchorDims.height / 2)) - ($eleDims.height / 2)\n break;\n }\n break;\n }\n }\n\n return {top: topVal, left: leftVal};\n}\n\nexport {Box};\n","import $ from 'jquery';\n\n/**\n * Runs a callback function when images are fully loaded.\n * @param {Object} images - Image(s) to check if loaded.\n * @param {Func} callback - Function to execute when image is fully loaded.\n */\nfunction onImagesLoaded(images, callback){\n var unloaded = images.length;\n\n if (unloaded === 0) {\n callback();\n }\n\n images.each(function(){\n // Check if image is loaded\n if (this.complete && typeof this.naturalWidth !== 'undefined') {\n singleImageLoaded();\n }\n else {\n // If the above check failed, simulate loading on detached element.\n var image = new Image();\n // Still count image as loaded if it finalizes with an error.\n var events = \"load.zf.images error.zf.images\";\n $(image).one(events, function me(){\n // Unbind the event listeners. We're using 'one' but only one of the two events will have fired.\n $(this).off(events, me);\n singleImageLoaded();\n });\n image.src = $(this).attr('src');\n }\n });\n\n function singleImageLoaded() {\n unloaded--;\n if (unloaded === 0) {\n callback();\n }\n }\n}\n\nexport { onImagesLoaded };\n","/*******************************************\n * *\n * This util was created by Marius Olbertz *\n * Please thank Marius on GitHub /owlbertz *\n * or the web http://www.mariusolbertz.de/ *\n * *\n ******************************************/\n\nimport $ from 'jquery';\nimport { rtl as Rtl } from './foundation.core.utils';\n\nconst keyCodes = {\n 9: 'TAB',\n 13: 'ENTER',\n 27: 'ESCAPE',\n 32: 'SPACE',\n 35: 'END',\n 36: 'HOME',\n 37: 'ARROW_LEFT',\n 38: 'ARROW_UP',\n 39: 'ARROW_RIGHT',\n 40: 'ARROW_DOWN'\n}\n\nvar commands = {}\n\n// Functions pulled out to be referenceable from internals\nfunction findFocusable($element) {\n if(!$element) {return false; }\n return $element.find('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]').filter(function() {\n if (!$(this).is(':visible') || $(this).attr('tabindex') < 0) { return false; } //only have visible elements and those that have a tabindex greater or equal 0\n return true;\n })\n .sort( function( a, b ) {\n if ($(a).attr('tabindex') === $(b).attr('tabindex')) {\n return 0;\n }\n let aTabIndex = parseInt($(a).attr('tabindex'), 10),\n bTabIndex = parseInt($(b).attr('tabindex'), 10);\n // Undefined is treated the same as 0\n if (typeof $(a).attr('tabindex') === 'undefined' && bTabIndex > 0) {\n return 1;\n }\n if (typeof $(b).attr('tabindex') === 'undefined' && aTabIndex > 0) {\n return -1;\n }\n if (aTabIndex === 0 && bTabIndex > 0) {\n return 1;\n }\n if (bTabIndex === 0 && aTabIndex > 0) {\n return -1;\n }\n if (aTabIndex < bTabIndex) {\n return -1;\n }\n if (aTabIndex > bTabIndex) {\n return 1;\n }\n });\n}\n\nfunction parseKey(event) {\n var key = keyCodes[event.which || event.keyCode] || String.fromCharCode(event.which).toUpperCase();\n\n // Remove un-printable characters, e.g. for `fromCharCode` calls for CTRL only events\n key = key.replace(/\\W+/, '');\n\n if (event.shiftKey) key = `SHIFT_${key}`;\n if (event.ctrlKey) key = `CTRL_${key}`;\n if (event.altKey) key = `ALT_${key}`;\n\n // Remove trailing underscore, in case only modifiers were used (e.g. only `CTRL_ALT`)\n key = key.replace(/_$/, '');\n\n return key;\n}\n\nvar Keyboard = {\n keys: getKeyCodes(keyCodes),\n\n /**\n * Parses the (keyboard) event and returns a String that represents its key\n * Can be used like Foundation.parseKey(event) === Foundation.keys.SPACE\n * @param {Event} event - the event generated by the event handler\n * @return String key - String that represents the key pressed\n */\n parseKey: parseKey,\n\n /**\n * Handles the given (keyboard) event\n * @param {Event} event - the event generated by the event handler\n * @param {String} component - Foundation component's name, e.g. Slider or Reveal\n * @param {Objects} functions - collection of functions that are to be executed\n */\n handleKey(event, component, functions) {\n var commandList = commands[component],\n keyCode = this.parseKey(event),\n cmds,\n command,\n fn;\n\n if (!commandList) return console.warn('Component not defined!');\n\n // Ignore the event if it was already handled\n if (event.zfIsKeyHandled === true) return;\n\n // This component does not differentiate between ltr and rtl\n if (typeof commandList.ltr === 'undefined') {\n cmds = commandList; // use plain list\n } else { // merge ltr and rtl: if document is rtl, rtl overwrites ltr and vice versa\n if (Rtl()) cmds = $.extend({}, commandList.ltr, commandList.rtl);\n\n else cmds = $.extend({}, commandList.rtl, commandList.ltr);\n }\n command = cmds[keyCode];\n\n fn = functions[command];\n // Execute the handler if found\n if (fn && typeof fn === 'function') {\n var returnValue = fn.apply();\n\n // Mark the event as \"handled\" to prevent future handlings\n event.zfIsKeyHandled = true;\n\n // Execute function when event was handled\n if (functions.handled || typeof functions.handled === 'function') {\n functions.handled(returnValue);\n }\n } else {\n // Execute function when event was not handled\n if (functions.unhandled || typeof functions.unhandled === 'function') {\n functions.unhandled();\n }\n }\n },\n\n /**\n * Finds all focusable elements within the given `$element`\n * @param {jQuery} $element - jQuery object to search within\n * @return {jQuery} $focusable - all focusable elements within `$element`\n */\n\n findFocusable: findFocusable,\n\n /**\n * Returns the component name name\n * @param {Object} component - Foundation component, e.g. Slider or Reveal\n * @return String componentName\n */\n\n register(componentName, cmds) {\n commands[componentName] = cmds;\n },\n\n\n // TODO9438: These references to Keyboard need to not require global. Will 'this' work in this context?\n //\n /**\n * Traps the focus in the given element.\n * @param {jQuery} $element jQuery object to trap the foucs into.\n */\n trapFocus($element) {\n var $focusable = findFocusable($element),\n $firstFocusable = $focusable.eq(0),\n $lastFocusable = $focusable.eq(-1);\n\n $element.on('keydown.zf.trapfocus', function(event) {\n if (event.target === $lastFocusable[0] && parseKey(event) === 'TAB') {\n event.preventDefault();\n $firstFocusable.focus();\n }\n else if (event.target === $firstFocusable[0] && parseKey(event) === 'SHIFT_TAB') {\n event.preventDefault();\n $lastFocusable.focus();\n }\n });\n },\n /**\n * Releases the trapped focus from the given element.\n * @param {jQuery} $element jQuery object to release the focus for.\n */\n releaseFocus($element) {\n $element.off('keydown.zf.trapfocus');\n }\n}\n\n/*\n * Constants for easier comparing.\n * Can be used like Foundation.parseKey(event) === Foundation.keys.SPACE\n */\nfunction getKeyCodes(kcs) {\n var k = {};\n for (var kc in kcs) {\n if (kcs.hasOwnProperty(kc)) k[kcs[kc]] = kcs[kc];\n }\n return k;\n}\n\nexport {Keyboard};\n","import $ from 'jquery';\n\n// Default set of media queries\n// const defaultQueries = {\n// 'default' : 'only screen',\n// landscape : 'only screen and (orientation: landscape)',\n// portrait : 'only screen and (orientation: portrait)',\n// retina : 'only screen and (-webkit-min-device-pixel-ratio: 2),' +\n// 'only screen and (min--moz-device-pixel-ratio: 2),' +\n// 'only screen and (-o-min-device-pixel-ratio: 2/1),' +\n// 'only screen and (min-device-pixel-ratio: 2),' +\n// 'only screen and (min-resolution: 192dpi),' +\n// 'only screen and (min-resolution: 2dppx)'\n// };\n\n\n// matchMedia() polyfill - Test a CSS media type/query in JS.\n// Authors & copyright © 2012: Scott Jehl, Paul Irish, Nicholas Zakas, David Knight. MIT license\n/* eslint-disable */\nwindow.matchMedia || (window.matchMedia = (function () {\n \"use strict\";\n\n // For browsers that support matchMedium api such as IE 9 and webkit\n var styleMedia = (window.styleMedia || window.media);\n\n // For those that don't support matchMedium\n if (!styleMedia) {\n var style = document.createElement('style'),\n script = document.getElementsByTagName('script')[0],\n info = null;\n\n style.type = 'text/css';\n style.id = 'matchmediajs-test';\n\n if (!script) {\n document.head.appendChild(style);\n } else {\n script.parentNode.insertBefore(style, script);\n }\n\n // 'style.currentStyle' is used by IE <= 8 and 'window.getComputedStyle' for all other browsers\n info = ('getComputedStyle' in window) && window.getComputedStyle(style, null) || style.currentStyle;\n\n styleMedia = {\n matchMedium: function (media) {\n var text = '@media ' + media + '{ #matchmediajs-test { width: 1px; } }';\n\n // 'style.styleSheet' is used by IE <= 8 and 'style.textContent' for all other browsers\n if (style.styleSheet) {\n style.styleSheet.cssText = text;\n } else {\n style.textContent = text;\n }\n\n // Test if media query is true or false\n return info.width === '1px';\n }\n };\n }\n\n return function(media) {\n return {\n matches: styleMedia.matchMedium(media || 'all'),\n media: media || 'all'\n };\n };\n})());\n/* eslint-enable */\n\nvar MediaQuery = {\n queries: [],\n\n current: '',\n\n /**\n * Initializes the media query helper, by extracting the breakpoint list from the CSS and activating the breakpoint watcher.\n * @function\n * @private\n */\n _init() {\n\n // make sure the initialization is only done once when calling _init() several times\n if (this.isInitialized === true) {\n return this;\n } else {\n this.isInitialized = true;\n }\n\n var self = this;\n var $meta = $('meta.foundation-mq');\n if(!$meta.length){\n $('<meta class=\"foundation-mq\" name=\"foundation-mq\" content>').appendTo(document.head);\n }\n\n var extractedStyles = $('.foundation-mq').css('font-family');\n var namedQueries;\n\n namedQueries = parseStyleToObject(extractedStyles);\n\n self.queries = []; // reset\n\n for (var key in namedQueries) {\n if(namedQueries.hasOwnProperty(key)) {\n self.queries.push({\n name: key,\n value: `only screen and (min-width: ${namedQueries[key]})`\n });\n }\n }\n\n this.current = this._getCurrentSize();\n\n this._watcher();\n },\n\n /**\n * Reinitializes the media query helper.\n * Useful if your CSS breakpoint configuration has just been loaded or has changed since the initialization.\n * @function\n * @private\n */\n _reInit() {\n this.isInitialized = false;\n this._init();\n },\n\n /**\n * Checks if the screen is at least as wide as a breakpoint.\n * @function\n * @param {String} size - Name of the breakpoint to check.\n * @returns {Boolean} `true` if the breakpoint matches, `false` if it's smaller.\n */\n atLeast(size) {\n var query = this.get(size);\n\n if (query) {\n return window.matchMedia(query).matches;\n }\n\n return false;\n },\n\n /**\n * Checks if the screen is within the given breakpoint.\n * If smaller than the breakpoint of larger than its upper limit it returns false.\n * @function\n * @param {String} size - Name of the breakpoint to check.\n * @returns {Boolean} `true` if the breakpoint matches, `false` otherwise.\n */\n only(size) {\n return size === this._getCurrentSize();\n },\n\n /**\n * Checks if the screen is within a breakpoint or smaller.\n * @function\n * @param {String} size - Name of the breakpoint to check.\n * @returns {Boolean} `true` if the breakpoint matches, `false` if it's larger.\n */\n upTo(size) {\n const nextSize = this.next(size);\n\n // If the next breakpoint does not match, the screen is smaller than\n // the upper limit of this breakpoint.\n if (nextSize) {\n return !this.atLeast(nextSize);\n }\n\n // If there is no next breakpoint, the \"size\" breakpoint does not have\n // an upper limit and the screen will always be within it or smaller.\n return true;\n },\n\n /**\n * Checks if the screen matches to a breakpoint.\n * @function\n * @param {String} size - Name of the breakpoint to check, either 'small only' or 'small'. Omitting 'only' falls back to using atLeast() method.\n * @returns {Boolean} `true` if the breakpoint matches, `false` if it does not.\n */\n is(size) {\n const parts = size.trim().split(' ').filter(p => !!p.length);\n const [bpSize, bpModifier = ''] = parts;\n\n // Only the breakpont\n if (bpModifier === 'only') {\n return this.only(bpSize);\n }\n // At least the breakpoint (included)\n if (!bpModifier || bpModifier === 'up') {\n return this.atLeast(bpSize);\n }\n // Up to the breakpoint (included)\n if (bpModifier === 'down') {\n return this.upTo(bpSize);\n }\n\n throw new Error(`\n Invalid breakpoint passed to MediaQuery.is().\n Expected a breakpoint name formatted like \"<size> <modifier>\", got \"${size}\".\n `);\n },\n\n /**\n * Gets the media query of a breakpoint.\n * @function\n * @param {String} size - Name of the breakpoint to get.\n * @returns {String|null} - The media query of the breakpoint, or `null` if the breakpoint doesn't exist.\n */\n get(size) {\n for (var i in this.queries) {\n if(this.queries.hasOwnProperty(i)) {\n var query = this.queries[i];\n if (size === query.name) return query.value;\n }\n }\n\n return null;\n },\n\n /**\n * Get the breakpoint following the given breakpoint.\n * @function\n * @param {String} size - Name of the breakpoint.\n * @returns {String|null} - The name of the following breakpoint, or `null` if the passed breakpoint was the last one.\n */\n next(size) {\n const queryIndex = this.queries.findIndex((q) => this._getQueryName(q) === size);\n if (queryIndex === -1) {\n throw new Error(`\n Unknown breakpoint \"${size}\" passed to MediaQuery.next().\n Ensure it is present in your Sass \"$breakpoints\" setting.\n `);\n }\n\n const nextQuery = this.queries[queryIndex + 1];\n return nextQuery ? nextQuery.name : null;\n },\n\n /**\n * Returns the name of the breakpoint related to the given value.\n * @function\n * @private\n * @param {String|Object} value - Breakpoint name or query object.\n * @returns {String} Name of the breakpoint.\n */\n _getQueryName(value) {\n if (typeof value === 'string')\n return value;\n if (typeof value === 'object')\n return value.name;\n throw new TypeError(`\n Invalid value passed to MediaQuery._getQueryName().\n Expected a breakpoint name (String) or a breakpoint query (Object), got \"${value}\" (${typeof value})\n `);\n },\n\n /**\n * Gets the current breakpoint name by testing every breakpoint and returning the last one to match (the biggest one).\n * @function\n * @private\n * @returns {String} Name of the current breakpoint.\n */\n _getCurrentSize() {\n var matched;\n\n for (var i = 0; i < this.queries.length; i++) {\n var query = this.queries[i];\n\n if (window.matchMedia(query.value).matches) {\n matched = query;\n }\n }\n\n return matched && this._getQueryName(matched);\n },\n\n /**\n * Activates the breakpoint watcher, which fires an event on the window whenever the breakpoint changes.\n * @function\n * @private\n */\n _watcher() {\n $(window).on('resize.zf.trigger', () => {\n var newSize = this._getCurrentSize(), currentSize = this.current;\n\n if (newSize !== currentSize) {\n // Change the current media query\n this.current = newSize;\n\n // Broadcast the media query change on the window\n $(window).trigger('changed.zf.mediaquery', [newSize, currentSize]);\n }\n });\n }\n};\n\n\n\n// Thank you: https://github.com/sindresorhus/query-string\nfunction parseStyleToObject(str) {\n var styleObject = {};\n\n if (typeof str !== 'string') {\n return styleObject;\n }\n\n str = str.trim().slice(1, -1); // browsers re-quote string style values\n\n if (!str) {\n return styleObject;\n }\n\n styleObject = str.split('&').reduce(function(ret, param) {\n var parts = param.replace(/\\+/g, ' ').split('=');\n var key = parts[0];\n var val = parts[1];\n key = decodeURIComponent(key);\n\n // missing `=` should be `null`:\n // http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters\n val = typeof val === 'undefined' ? null : decodeURIComponent(val);\n\n if (!ret.hasOwnProperty(key)) {\n ret[key] = val;\n } else if (Array.isArray(ret[key])) {\n ret[key].push(val);\n } else {\n ret[key] = [ret[key], val];\n }\n return ret;\n }, {});\n\n return styleObject;\n}\n\nexport {MediaQuery};\n","import $ from 'jquery';\nimport { transitionend } from './foundation.core.utils';\n\n/**\n * Motion module.\n * @module foundation.motion\n */\n\nconst initClasses = ['mui-enter', 'mui-leave'];\nconst activeClasses = ['mui-enter-active', 'mui-leave-active'];\n\nconst Motion = {\n animateIn: function(element, animation, cb) {\n animate(true, element, animation, cb);\n },\n\n animateOut: function(element, animation, cb) {\n animate(false, element, animation, cb);\n }\n}\n\nfunction Move(duration, elem, fn){\n var anim, prog, start = null;\n\n if (duration === 0) {\n fn.apply(elem);\n elem.trigger('finished.zf.animate', [elem]).triggerHandler('finished.zf.animate', [elem]);\n return;\n }\n\n function move(ts){\n if(!start) start = ts;\n prog = ts - start;\n fn.apply(elem);\n\n if(prog < duration){ anim = window.requestAnimationFrame(move, elem); }\n else{\n window.cancelAnimationFrame(anim);\n elem.trigger('finished.zf.animate', [elem]).triggerHandler('finished.zf.animate', [elem]);\n }\n }\n anim = window.requestAnimationFrame(move);\n}\n\n/**\n * Animates an element in or out using a CSS transition class.\n * @function\n * @private\n * @param {Boolean} isIn - Defines if the animation is in or out.\n * @param {Object} element - jQuery or HTML object to animate.\n * @param {String} animation - CSS class to use.\n * @param {Function} cb - Callback to run when animation is finished.\n */\nfunction animate(isIn, element, animation, cb) {\n element = $(element).eq(0);\n\n if (!element.length) return;\n\n var initClass = isIn ? initClasses[0] : initClasses[1];\n var activeClass = isIn ? activeClasses[0] : activeClasses[1];\n\n // Set up the animation\n reset();\n\n element\n .addClass(animation)\n .css('transition', 'none');\n\n requestAnimationFrame(() => {\n element.addClass(initClass);\n if (isIn) element.show();\n });\n\n // Start the animation\n requestAnimationFrame(() => {\n // will trigger the browser to synchronously calculate the style and layout\n // also called reflow or layout thrashing\n // see https://gist.github.com/paulirish/5d52fb081b3570c81e3a\n element[0].offsetWidth;\n element\n .css('transition', '')\n .addClass(activeClass);\n });\n\n // Clean up the animation when it finishes\n element.one(transitionend(element), finish);\n\n // Hides the element (for out animations), resets the element, and runs a callback\n function finish() {\n if (!isIn) element.hide();\n reset();\n if (cb) cb.apply(element);\n }\n\n // Resets transitions and removes motion-specific classes\n function reset() {\n element[0].style.transitionDuration = 0;\n element.removeClass(`${initClass} ${activeClass} ${animation}`);\n }\n}\n\nexport { Move, Motion };\n\n","import $ from 'jquery';\n\nconst Nest = {\n Feather(menu, type = 'zf') {\n menu.attr('role', 'menubar');\n menu.find('a').attr({'role': 'menuitem'});\n\n var items = menu.find('li').attr({'role': 'none'}),\n subMenuClass = `is-${type}-submenu`,\n subItemClass = `${subMenuClass}-item`,\n hasSubClass = `is-${type}-submenu-parent`,\n applyAria = (type !== 'accordion'); // Accordions handle their own ARIA attriutes.\n\n items.each(function() {\n var $item = $(this),\n $sub = $item.children('ul');\n\n if ($sub.length) {\n $item.addClass(hasSubClass);\n if(applyAria) {\n const firstItem = $item.children('a:first');\n firstItem.attr({\n 'aria-haspopup': true,\n 'aria-label': firstItem.attr('aria-label') || firstItem.text()\n });\n // Note: Drilldowns behave differently in how they hide, and so need\n // additional attributes. We should look if this possibly over-generalized\n // utility (Nest) is appropriate when we rework menus in 6.4\n if(type === 'drilldown') {\n $item.attr({'aria-expanded': false});\n }\n }\n $sub\n .addClass(`submenu ${subMenuClass}`)\n .attr({\n 'data-submenu': '',\n 'role': 'menubar'\n });\n if(type === 'drilldown') {\n $sub.attr({'aria-hidden': true});\n }\n }\n\n if ($item.parent('[data-submenu]').length) {\n $item.addClass(`is-submenu-item ${subItemClass}`);\n }\n });\n\n return;\n },\n\n Burn(menu, type) {\n var //items = menu.find('li'),\n subMenuClass = `is-${type}-submenu`,\n subItemClass = `${subMenuClass}-item`,\n hasSubClass = `is-${type}-submenu-parent`;\n\n menu\n .find('>li, > li > ul, .menu, .menu > li, [data-submenu] > li')\n .removeClass(`${subMenuClass} ${subItemClass} ${hasSubClass} is-submenu-item submenu is-active`)\n .removeAttr('data-submenu').css('display', '');\n\n }\n}\n\nexport {Nest};\n","function Timer(elem, options, cb) {\n var _this = this,\n duration = options.duration,//options is an object for easily adding features later.\n nameSpace = Object.keys(elem.data())[0] || 'timer',\n remain = -1,\n start,\n timer;\n\n this.isPaused = false;\n\n this.restart = function() {\n remain = -1;\n clearTimeout(timer);\n this.start();\n }\n\n this.start = function() {\n this.isPaused = false;\n // if(!elem.data('paused')){ return false; }//maybe implement this sanity check if used for other things.\n clearTimeout(timer);\n remain = remain <= 0 ? duration : remain;\n elem.data('paused', false);\n start = Date.now();\n timer = setTimeout(function(){\n if(options.infinite){\n _this.restart();//rerun the timer.\n }\n if (cb && typeof cb === 'function') { cb(); }\n }, remain);\n elem.trigger(`timerstart.zf.${nameSpace}`);\n }\n\n this.pause = function() {\n this.isPaused = true;\n //if(elem.data('paused')){ return false; }//maybe implement this sanity check if used for other things.\n clearTimeout(timer);\n elem.data('paused', true);\n var end = Date.now();\n remain = remain - (end - start);\n elem.trigger(`timerpaused.zf.${nameSpace}`);\n }\n}\n\nexport {Timer};\n","//**************************************************\n//**Work inspired by multiple jquery swipe plugins**\n//**Done by Yohai Ararat ***************************\n//**************************************************\n\nimport $ from 'jquery';\n\nvar Touch = {};\n\nvar startPosX,\n startTime,\n elapsedTime,\n startEvent,\n isMoving = false,\n didMoved = false;\n\nfunction onTouchEnd(e) {\n this.removeEventListener('touchmove', onTouchMove);\n this.removeEventListener('touchend', onTouchEnd);\n\n // If the touch did not move, consider it as a \"tap\"\n if (!didMoved) {\n var tapEvent = $.Event('tap', startEvent || e);\n $(this).trigger(tapEvent);\n }\n\n startEvent = null;\n isMoving = false;\n didMoved = false;\n}\n\nfunction onTouchMove(e) {\n if (true === $.spotSwipe.preventDefault) { e.preventDefault(); }\n\n if(isMoving) {\n var x = e.touches[0].pageX;\n // var y = e.touches[0].pageY;\n var dx = startPosX - x;\n // var dy = startPosY - y;\n var dir;\n didMoved = true;\n elapsedTime = new Date().getTime() - startTime;\n if(Math.abs(dx) >= $.spotSwipe.moveThreshold && elapsedTime <= $.spotSwipe.timeThreshold) {\n dir = dx > 0 ? 'left' : 'right';\n }\n // else if(Math.abs(dy) >= $.spotSwipe.moveThreshold && elapsedTime <= $.spotSwipe.timeThreshold) {\n // dir = dy > 0 ? 'down' : 'up';\n // }\n if(dir) {\n e.preventDefault();\n onTouchEnd.apply(this, arguments);\n $(this)\n .trigger($.Event('swipe', Object.assign({}, e)), dir)\n .trigger($.Event(`swipe${dir}`, Object.assign({}, e)));\n }\n }\n\n}\n\nfunction onTouchStart(e) {\n\n if (e.touches.length === 1) {\n startPosX = e.touches[0].pageX;\n startEvent = e;\n isMoving = true;\n didMoved = false;\n startTime = new Date().getTime();\n this.addEventListener('touchmove', onTouchMove, { passive : true === $.spotSwipe.preventDefault });\n this.addEventListener('touchend', onTouchEnd, false);\n }\n}\n\nfunction init() {\n this.addEventListener && this.addEventListener('touchstart', onTouchStart, { passive : true });\n}\n\n// function teardown() {\n// this.removeEventListener('touchstart', onTouchStart);\n// }\n\nclass SpotSwipe {\n constructor() {\n this.version = '1.0.0';\n this.enabled = 'ontouchstart' in document.documentElement;\n this.preventDefault = false;\n this.moveThreshold = 75;\n this.timeThreshold = 200;\n this._init();\n }\n\n _init() {\n $.event.special.swipe = { setup: init };\n $.event.special.tap = { setup: init };\n\n $.each(['left', 'up', 'down', 'right'], function () {\n $.event.special[`swipe${this}`] = { setup: function(){\n $(this).on('swipe', $.noop);\n } };\n });\n }\n}\n\n/****************************************************\n * As far as I can tell, both setupSpotSwipe and *\n * setupTouchHandler should be idempotent, *\n * because they directly replace functions & *\n * values, and do not add event handlers directly. *\n ****************************************************/\n\nTouch.setupSpotSwipe = function() {\n $.spotSwipe = new SpotSwipe($);\n};\n\n/****************************************************\n * Method for adding pseudo drag events to elements *\n ***************************************************/\nTouch.setupTouchHandler = function() {\n $.fn.addTouch = function(){\n this.each(function(i, el){\n $(el).bind('touchstart touchmove touchend touchcancel', function(event) {\n //we pass the original event object because the jQuery event\n //object is normalized to w3c specs and does not provide the TouchList\n handleTouch(event);\n });\n });\n\n var handleTouch = function(event) {\n var touches = event.changedTouches,\n first = touches[0],\n eventTypes = {\n touchstart: 'mousedown',\n touchmove: 'mousemove',\n touchend: 'mouseup'\n },\n type = eventTypes[event.type],\n simulatedEvent\n ;\n\n if('MouseEvent' in window && typeof window.MouseEvent === 'function') {\n simulatedEvent = new window.MouseEvent(type, {\n 'bubbles': true,\n 'cancelable': true,\n 'screenX': first.screenX,\n 'screenY': first.screenY,\n 'clientX': first.clientX,\n 'clientY': first.clientY\n });\n } else {\n simulatedEvent = document.createEvent('MouseEvent');\n simulatedEvent.initMouseEvent(type, true, true, window, 1, first.screenX, first.screenY, first.clientX, first.clientY, false, false, false, false, 0/*left*/, null);\n }\n first.target.dispatchEvent(simulatedEvent);\n };\n };\n};\n\nTouch.init = function () {\n if(typeof($.spotSwipe) === 'undefined') {\n Touch.setupSpotSwipe($);\n Touch.setupTouchHandler($);\n }\n};\n\nexport {Touch};\n","import $ from 'jquery';\nimport { onLoad } from './foundation.core.utils';\nimport { Motion } from './foundation.util.motion';\n\nconst MutationObserver = (function () {\n var prefixes = ['WebKit', 'Moz', 'O', 'Ms', ''];\n for (var i=0; i < prefixes.length; i++) {\n if (`${prefixes[i]}MutationObserver` in window) {\n return window[`${prefixes[i]}MutationObserver`];\n }\n }\n return false;\n})();\n\nconst triggers = (el, type) => {\n el.data(type).split(' ').forEach(id => {\n $(`#${id}`)[ type === 'close' ? 'trigger' : 'triggerHandler'](`${type}.zf.trigger`, [el]);\n });\n};\n\nvar Triggers = {\n Listeners: {\n Basic: {},\n Global: {}\n },\n Initializers: {}\n}\n\nTriggers.Listeners.Basic = {\n openListener: function() {\n triggers($(this), 'open');\n },\n closeListener: function() {\n let id = $(this).data('close');\n if (id) {\n triggers($(this), 'close');\n }\n else {\n $(this).trigger('close.zf.trigger');\n }\n },\n toggleListener: function() {\n let id = $(this).data('toggle');\n if (id) {\n triggers($(this), 'toggle');\n } else {\n $(this).trigger('toggle.zf.trigger');\n }\n },\n closeableListener: function(e) {\n let animation = $(this).data('closable');\n\n // Only close the first closable element. See https://git.io/zf-7833\n e.stopPropagation();\n\n if(animation !== ''){\n Motion.animateOut($(this), animation, function() {\n $(this).trigger('closed.zf');\n });\n }else{\n $(this).fadeOut().trigger('closed.zf');\n }\n },\n toggleFocusListener: function() {\n let id = $(this).data('toggle-focus');\n $(`#${id}`).triggerHandler('toggle.zf.trigger', [$(this)]);\n }\n};\n\n// Elements with [data-open] will reveal a plugin that supports it when clicked.\nTriggers.Initializers.addOpenListener = ($elem) => {\n $elem.off('click.zf.trigger', Triggers.Listeners.Basic.openListener);\n $elem.on('click.zf.trigger', '[data-open]', Triggers.Listeners.Basic.openListener);\n}\n\n// Elements with [data-close] will close a plugin that supports it when clicked.\n// If used without a value on [data-close], the event will bubble, allowing it to close a parent component.\nTriggers.Initializers.addCloseListener = ($elem) => {\n $elem.off('click.zf.trigger', Triggers.Listeners.Basic.closeListener);\n $elem.on('click.zf.trigger', '[data-close]', Triggers.Listeners.Basic.closeListener);\n}\n\n// Elements with [data-toggle] will toggle a plugin that supports it when clicked.\nTriggers.Initializers.addToggleListener = ($elem) => {\n $elem.off('click.zf.trigger', Triggers.Listeners.Basic.toggleListener);\n $elem.on('click.zf.trigger', '[data-toggle]', Triggers.Listeners.Basic.toggleListener);\n}\n\n// Elements with [data-closable] will respond to close.zf.trigger events.\nTriggers.Initializers.addCloseableListener = ($elem) => {\n $elem.off('close.zf.trigger', Triggers.Listeners.Basic.closeableListener);\n $elem.on('close.zf.trigger', '[data-closeable], [data-closable]', Triggers.Listeners.Basic.closeableListener);\n}\n\n// Elements with [data-toggle-focus] will respond to coming in and out of focus\nTriggers.Initializers.addToggleFocusListener = ($elem) => {\n $elem.off('focus.zf.trigger blur.zf.trigger', Triggers.Listeners.Basic.toggleFocusListener);\n $elem.on('focus.zf.trigger blur.zf.trigger', '[data-toggle-focus]', Triggers.Listeners.Basic.toggleFocusListener);\n}\n\n\n\n// More Global/complex listeners and triggers\nTriggers.Listeners.Global = {\n resizeListener: function($nodes) {\n if(!MutationObserver){//fallback for IE 9\n $nodes.each(function(){\n $(this).triggerHandler('resizeme.zf.trigger');\n });\n }\n //trigger all listening elements and signal a resize event\n $nodes.attr('data-events', \"resize\");\n },\n scrollListener: function($nodes) {\n if(!MutationObserver){//fallback for IE 9\n $nodes.each(function(){\n $(this).triggerHandler('scrollme.zf.trigger');\n });\n }\n //trigger all listening elements and signal a scroll event\n $nodes.attr('data-events', \"scroll\");\n },\n closeMeListener: function(e, pluginId){\n let plugin = e.namespace.split('.')[0];\n let plugins = $(`[data-${plugin}]`).not(`[data-yeti-box=\"${pluginId}\"]`);\n\n plugins.each(function(){\n let _this = $(this);\n _this.triggerHandler('close.zf.trigger', [_this]);\n });\n }\n}\n\n// Global, parses whole document.\nTriggers.Initializers.addClosemeListener = function(pluginName) {\n var yetiBoxes = $('[data-yeti-box]'),\n plugNames = ['dropdown', 'tooltip', 'reveal'];\n\n if(pluginName){\n if(typeof pluginName === 'string'){\n plugNames.push(pluginName);\n }else if(typeof pluginName === 'object' && typeof pluginName[0] === 'string'){\n plugNames = plugNames.concat(pluginName);\n }else{\n console.error('Plugin names must be strings');\n }\n }\n if(yetiBoxes.length){\n let listeners = plugNames.map((name) => {\n return `closeme.zf.${name}`;\n }).join(' ');\n\n $(window).off(listeners).on(listeners, Triggers.Listeners.Global.closeMeListener);\n }\n}\n\nfunction debounceGlobalListener(debounce, trigger, listener) {\n let timer, args = Array.prototype.slice.call(arguments, 3);\n $(window).on(trigger, function() {\n if (timer) { clearTimeout(timer); }\n timer = setTimeout(function(){\n listener.apply(null, args);\n }, debounce || 10); //default time to emit scroll event\n });\n}\n\nTriggers.Initializers.addResizeListener = function(debounce){\n let $nodes = $('[data-resize]');\n if($nodes.length){\n debounceGlobalListener(debounce, 'resize.zf.trigger', Triggers.Listeners.Global.resizeListener, $nodes);\n }\n}\n\nTriggers.Initializers.addScrollListener = function(debounce){\n let $nodes = $('[data-scroll]');\n if($nodes.length){\n debounceGlobalListener(debounce, 'scroll.zf.trigger', Triggers.Listeners.Global.scrollListener, $nodes);\n }\n}\n\nTriggers.Initializers.addMutationEventsListener = function($elem) {\n if(!MutationObserver){ return false; }\n let $nodes = $elem.find('[data-resize], [data-scroll], [data-mutate]');\n\n //element callback\n var listeningElementsMutation = function (mutationRecordsList) {\n var $target = $(mutationRecordsList[0].target);\n\n //trigger the event handler for the element depending on type\n switch (mutationRecordsList[0].type) {\n case \"attributes\":\n if ($target.attr(\"data-events\") === \"scroll\" && mutationRecordsList[0].attributeName === \"data-events\") {\n $target.triggerHandler('scrollme.zf.trigger', [$target, window.pageYOffset]);\n }\n if ($target.attr(\"data-events\") === \"resize\" && mutationRecordsList[0].attributeName === \"data-events\") {\n $target.triggerHandler('resizeme.zf.trigger', [$target]);\n }\n if (mutationRecordsList[0].attributeName === \"style\") {\n $target.closest(\"[data-mutate]\").attr(\"data-events\",\"mutate\");\n $target.closest(\"[data-mutate]\").triggerHandler('mutateme.zf.trigger', [$target.closest(\"[data-mutate]\")]);\n }\n break;\n\n case \"childList\":\n $target.closest(\"[data-mutate]\").attr(\"data-events\",\"mutate\");\n $target.closest(\"[data-mutate]\").triggerHandler('mutateme.zf.trigger', [$target.closest(\"[data-mutate]\")]);\n break;\n\n default:\n return false;\n //nothing\n }\n };\n\n if ($nodes.length) {\n //for each element that needs to listen for resizing, scrolling, or mutation add a single observer\n for (var i = 0; i <= $nodes.length - 1; i++) {\n var elementObserver = new MutationObserver(listeningElementsMutation);\n elementObserver.observe($nodes[i], { attributes: true, childList: true, characterData: false, subtree: true, attributeFilter: [\"data-events\", \"style\"] });\n }\n }\n}\n\nTriggers.Initializers.addSimpleListeners = function() {\n let $document = $(document);\n\n Triggers.Initializers.addOpenListener($document);\n Triggers.Initializers.addCloseListener($document);\n Triggers.Initializers.addToggleListener($document);\n Triggers.Initializers.addCloseableListener($document);\n Triggers.Initializers.addToggleFocusListener($document);\n\n}\n\nTriggers.Initializers.addGlobalListeners = function() {\n let $document = $(document);\n Triggers.Initializers.addMutationEventsListener($document);\n Triggers.Initializers.addResizeListener(250);\n Triggers.Initializers.addScrollListener();\n Triggers.Initializers.addClosemeListener();\n}\n\n\nTriggers.init = function (__, Foundation) {\n onLoad($(window), function () {\n if ($.triggersInitialized !== true) {\n Triggers.Initializers.addSimpleListeners();\n Triggers.Initializers.addGlobalListeners();\n $.triggersInitialized = true;\n }\n });\n\n if(Foundation) {\n Foundation.Triggers = Triggers;\n // Legacy included to be backwards compatible for now.\n Foundation.IHearYou = Triggers.Initializers.addGlobalListeners\n }\n}\n\nexport {Triggers};\n","module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import $ from 'jquery';\n\nimport { Foundation } from '../foundation.core';\nimport * as CoreUtils from '../foundation.core.utils';\nimport { Box } from '../foundation.util.box'\nimport { onImagesLoaded } from '../foundation.util.imageLoader';\nimport { Keyboard } from '../foundation.util.keyboard';\nimport { MediaQuery } from '../foundation.util.mediaQuery';\nimport { Motion, Move } from '../foundation.util.motion';\nimport { Nest } from '../foundation.util.nest';\nimport { Timer } from '../foundation.util.timer';\nimport { Touch } from '../foundation.util.touch';\nimport { Triggers } from '../foundation.util.triggers';\nimport { Abide } from '../foundation.abide';\nimport { Accordion } from '../foundation.accordion';\nimport { AccordionMenu } from '../foundation.accordionMenu';\nimport { Drilldown } from '../foundation.drilldown';\nimport { Dropdown } from '../foundation.dropdown';\nimport { DropdownMenu } from '../foundation.dropdownMenu';\nimport { Equalizer } from '../foundation.equalizer';\nimport { Interchange } from '../foundation.interchange';\nimport { Magellan } from '../foundation.magellan';\nimport { OffCanvas } from '../foundation.offcanvas';\nimport { Orbit } from '../foundation.orbit';\nimport { ResponsiveMenu } from '../foundation.responsiveMenu';\nimport { ResponsiveToggle } from '../foundation.responsiveToggle';\nimport { Reveal } from '../foundation.reveal';\nimport { Slider } from '../foundation.slider';\nimport { SmoothScroll } from '../foundation.smoothScroll';\nimport { Sticky } from '../foundation.sticky';\nimport { Tabs } from '../foundation.tabs';\nimport { Toggler } from '../foundation.toggler';\nimport { Tooltip } from '../foundation.tooltip';\nimport { ResponsiveAccordionTabs } from '../foundation.responsiveAccordionTabs';\n\nFoundation.addToJquery($);\n\n// Add Foundation Utils to Foundation global namespace for backwards\n// compatibility.\nFoundation.rtl = CoreUtils.rtl;\nFoundation.GetYoDigits = CoreUtils.GetYoDigits;\nFoundation.transitionend = CoreUtils.transitionend;\nFoundation.RegExpEscape = CoreUtils.RegExpEscape;\nFoundation.onLoad = CoreUtils.onLoad;\n\nFoundation.Box = Box;\nFoundation.onImagesLoaded = onImagesLoaded;\nFoundation.Keyboard = Keyboard;\nFoundation.MediaQuery = MediaQuery;\nFoundation.Motion = Motion;\nFoundation.Move = Move;\nFoundation.Nest = Nest;\nFoundation.Timer = Timer;\n\n// Touch and Triggers previously were almost purely sede effect driven,\n// so no need to add it to Foundation, just init them.\nTouch.init($);\nTriggers.init($, Foundation);\nMediaQuery._init();\n\nFoundation.plugin(Abide, 'Abide');\nFoundation.plugin(Accordion, 'Accordion');\nFoundation.plugin(AccordionMenu, 'AccordionMenu');\nFoundation.plugin(Drilldown, 'Drilldown');\nFoundation.plugin(Dropdown, 'Dropdown');\nFoundation.plugin(DropdownMenu, 'DropdownMenu');\nFoundation.plugin(Equalizer, 'Equalizer');\nFoundation.plugin(Interchange, 'Interchange');\nFoundation.plugin(Magellan, 'Magellan');\nFoundation.plugin(OffCanvas, 'OffCanvas');\nFoundation.plugin(Orbit, 'Orbit');\nFoundation.plugin(ResponsiveMenu, 'ResponsiveMenu');\nFoundation.plugin(ResponsiveToggle, 'ResponsiveToggle');\nFoundation.plugin(Reveal, 'Reveal');\nFoundation.plugin(Slider, 'Slider');\nFoundation.plugin(SmoothScroll, 'SmoothScroll');\nFoundation.plugin(Sticky, 'Sticky');\nFoundation.plugin(Tabs, 'Tabs');\nFoundation.plugin(Toggler, 'Toggler');\nFoundation.plugin(Tooltip, 'Tooltip');\nFoundation.plugin(ResponsiveAccordionTabs, 'ResponsiveAccordionTabs');\n\nexport {\n Foundation,\n CoreUtils,\n Box,\n onImagesLoaded,\n Keyboard,\n MediaQuery,\n Motion,\n Nest,\n Timer,\n Touch,\n Triggers,\n Abide,\n Accordion,\n AccordionMenu,\n Drilldown,\n Dropdown,\n DropdownMenu,\n Equalizer,\n Interchange,\n Magellan,\n OffCanvas,\n Orbit,\n ResponsiveMenu,\n ResponsiveToggle,\n Reveal,\n Slider,\n SmoothScroll,\n Sticky,\n Tabs,\n Toggler,\n Tooltip,\n ResponsiveAccordionTabs\n}\n\nexport default Foundation;\n\n"],"names":["$","Plugin","GetYoDigits","Abide","_Plugin","_classCallCheck","_callSuper","arguments","_inherits","_createClass","key","value","_setup","element","options","length","undefined","$element","extend","defaults","data","isEnabled","formnovalidate","className","_init","_this2","$inputs","merge","find","not","$submits","$globalErrors","a11yAttributes","each","i","input","addA11yAttributes","error","addGlobalErrorA11yAttributes","_events","_this3","off","on","resetForm","validateForm","e","preventDefault","target","getAttribute","submit","validateOn","validateInput","liveValidate","validateOnBlur","_reflow","_validationIsDisabled","enableValidation","disableValidation","requiredCheck","$el","attr","isGood","type","checked","opt","val","findFormError","failedValidators","_this4","id","$error","siblings","formErrorSelector","parent","add","concat","forEach","v","findLabel","$label","closest","findRadioLabels","$els","_this5","labels","map","el","findCheckboxLabels","_this6","addErrorClasses","$formError","addClass","labelErrorClass","formErrorClass","inputErrorClass","filter","addA11yErrorDescribe","$errors","$labels","first","elemId","label","end","errorId","a11yErrorLevel","removeRadioErrorClasses","groupName","$formErrors","removeClass","removeCheckboxErrorClasses","removeErrorClasses","removeAttr","removeData","_this7","clearRequire","validator","manageErrorClasses","is","validateRadio","push","validateCheckbox","validateText","required","split","validators","equalTo","goodToGo","message","dependentElements","_this","trigger","_this8","acc","checkboxGroupName","initialized","noError","indexOf","elem","$elem","css","pattern","inputText","valid","patterns","hasOwnProperty","test","RegExp","$group","prop","_this9","minRequired","parseInt","matchValidation","_this10","clear","$form","opts","_destroy","alpha","alpha_numeric","integer","number","card","cvv","email","url","domain","datetime","date","time","dateISO","month_day_year","day_month_year","color","website","text","onLoad","Keyboard","Accordion","register","_isInitializing","$tabs","children","idx","$content","linkId","$initActive","_initialAnchor","prev","_openSingleTab","_checkDeepLink","anchor","window","location","hash","$anchor","$link","isOwnAnchor","hasClass","_closeAllTabs","deepLinkSmudge","offset","animate","scrollTop","top","deepLinkSmudgeOffset","deepLinkSmudgeDelay","deepLink","$tabContent","toggle","handleKey","next","$a","focus","multiExpand","previous","last","handled","$target","console","info","up","down","updateHistory","history","pushState","replaceState","_openTab","$targetItem","$othersItems","allowAllClosed","_closeTab","$activeContents","targetContentId","finish","slideDown","slideSpeed","slideUp","$activeTabs","stop","Nest","AccordionMenu","Feather","multiOpen","$menuLinks","$sub","subId","isActive","parentLink","clone","prependTo","wrap","submenuToggle","after","submenuToggleText","initPanes","$submenu","$elements","$prevElement","$nextElement","eq","Math","max","min","parents","open","close","closeAll","hideAll","showAll","$targetBranch","parentsUntil","$othersActiveSubmenus","$submenus","$allmenus","detach","remove","Burn","MediaQuery","FOUNDATION_VERSION","Foundation","version","_plugins","_uuids","plugin","name","functionName","attrName","hyphenate","registerPlugin","pluginName","constructor","toLowerCase","uuid","unregisterPlugin","splice","reInit","plugins","isJQ","_typeof","fns","object","plgs","p","foundation","string","Object","keys","err","reflow","addBack","option","trim","parseValue","er","getFnName","addToJquery","method","$noJS","args","Array","prototype","slice","call","plugClass","apply","ReferenceError","TypeError","fn","util","throttle","func","delay","timer","context","setTimeout","Date","now","getTime","vendors","requestAnimationFrame","vp","cancelAnimationFrame","navigator","userAgent","lastTime","callback","nextTime","clearTimeout","performance","start","Function","bind","oThis","aArgs","fToBind","fNOP","fBound","funcNameRegex","results","exec","toString","str","isNaN","parseFloat","replace","getPluginName","destroy","obj","rtl","namespace","chars","charsLength","floor","random","RegExpEscape","transitionend","transitions","document","createElement","transition","style","triggerHandler","handler","didLoad","readyState","eventType","cb","one","ignoreMousedisappear","_ref","_ref$ignoreLeaveWindo","ignoreLeaveWindow","_ref$ignoreReappear","ignoreReappear","leaveEventHandler","eLeave","_len","rest","_key","relatedTarget","leaveEventDebouncer","hasFocus","reenterEventHandler","eReenter","currentTarget","has","Box","Drilldown","autoApplyClass","$submenuAnchors","$menuItems","$currentMenu","_prepareMenu","_registerEvents","_keyboardEvents","$menu","$back","backButtonPosition","append","backButton","prepend","_back","autoHeight","$wrapper","wrapper","animateHeight","_getMaxDims","_resize","_show","closeOnClick","$body","ev","contains","_hideAll","_bindHandler","_scrollTop","$scrollTopElement","scrollTopElement","scrollPos","scrollTopOffset","animationDuration","animationEasing","_hide","calcHeight","height","parentSubMenu","_menuLinkEvents","_setShowSubMenuClasses","_setHideSubMenuClasses","_showMenu","autoFocus","$expandedSubmenus","index","isLastChild","blur","maxHeight","result","GetDimensions","getBoundingClientRect","width","unwrap","Positionable","Triggers","Touch","Dropdown","_Positionable","init","$id","$anchors","_setCurrentAnchor","parentClass","$parent","$currentAnchor","_superPropGet","_getDefaultPosition","position","match","_getDefaultAlignment","horizontalPosition","_setPosition","alignment","hasTouch","ontouchstart","forceFollow","hover","bodyData","whatinput","timeout","hoverDelay","hoverPane","_addBodyHandler","body","$focusable","findFocusable","trapFocus","releaseFocus","hide","vOffset","hOffset","allowOverlap","allowBottomOverlap","Rtl","DropdownMenu","subs","verticalClass","rightClass","changed","_isVertical","_isRtl","parClass","handleClickFn","hasSub","hasClicked","clickOpen","stopImmediatePropagation","closeOnClickInside","disableHoverOnTouch","disableHover","autoclose","closingTime","isTab","nextSibling","prevSibling","openSub","closeSub","functions","_removeBodyHandler","isItself","$sibs","ImNotTouchingYou","oldClass","$parentLi","$toClose","somethingToClose","$activeItem","onImagesLoaded","Equalizer","eqId","$watched","hasNested","isNested","isOn","onResizeMeBound","_onResizeMe","onPostEqualizedBound","_onPostEqualized","imgs","tooSmall","equalizeOn","_checkMQ","_pauseEvents","_killswitch","equalizeOnStack","_isStacked","equalizeByRow","getHeightsByRow","applyHeightByRow","getHeights","applyHeight","heights","len","offsetHeight","lastElTopOffset","groups","group","elOffsetTop","j","ln","get","groupsILength","lenJ","Interchange","rules","currentPath","_parseOptions","_addBreakpoints","_generateRules","rule","matchMedia","query","matches","path","types","warn","queries","SPECIAL_QUERIES","rulesList","join","nodeName","response","html","SmoothScroll","Magellan","calcPoints","$targets","$links","$active","pageYOffset","documentElement","points","winHeight","round","innerHeight","clientHeight","docHeight","scrollHeight","$tar","pt","threshold","targetPoint","deepLinking","scrollToLoc","_updateActive","onLoadListener","arrival","_deepLinkScroll","loc","_inTransition","newScrollPos","isScrollingUp","activeIdx","visibleLinks","$oldActive","activeHash","isNewActive","isNewHash","activeClass","pathname","search","OffCanvas","contentClasses","base","reveal","$lastTrigger","$triggers","nested","$sticky","isInCanvas","contentId","contentOverlay","overlay","overlayPosition","setAttribute","$overlay","insertAfter","revealOnRegExp","revealClass","revealOnClass","isRevealed","revealOn","_setMQChecker","transitionTime","contentScroll","inCanvasFor","inCanvasOn","_checkInCanvas","_removeContentClasses","_handleKeyboard","atLeast","hasReveal","_addContentClasses","_fixStickyElements","_","topVal","absoluteTopVal","_unfixStickyElements","stickyData","_stopScrolling","_recordScrollable","event","lastY","touches","pageY","_preventDefaultAtEdges","delta","_canScroll","_scrollboxTouchMoved","stopPropagation","allowUp","allowDown","forceTo","scrollTo","canvasFocus","Motion","Timer","Orbit","_reset","containerClass","$slides","slideClass","$images","initActive","useMUI","_prepareForOrbit","bullets","_loadBullets","autoPlay","geoSync","accessible","$bullets","boxOfBullets","duration","timerDelay","infinite","changeSlide","_setWrapperHeight","temp","counter","_setSlideHeight","swipe","pauseOnHover","pause","navButtons","$controls","nextClass","prevClass","ltr","$slide","restart","show","_updateBullets","isLTR","chosenSlide","$curSlide","$firstSlide","$lastSlide","dirIn","dirOut","$newSlide","infiniteWrap","animateIn","animateOut","isPaused","$oldBullet","$othersBullets","$newBullet","activeStateDescriptor","spans","spanCountInOthersBullets","toArray","b","every","count","animInFromRight","animOutToRight","animInFromLeft","animOutToLeft","POSITIONS","VERTICAL_ALIGNMENTS","HORIZONTAL_ALIGNMENTS","ALIGNMENTS","nextItem","item","array","currentIdx","triedPositions","originalPosition","originalAlignment","_reposition","_alignmentsExhausted","_realign","_addTriedPosition","_positionsExhausted","isExhausted","_getVOffset","_getHOffset","GetExplicitOffsets","minOverlap","minCoordinates","overlap","OverlapArea","Tabs","MenuPlugins","tabs","cssClass","selectTab","accordion","ResponsiveAccordionTabs","_possibleConstructorReturn","storezfData","currentMq","currentRule","currentPlugin","rulesTree","ruleSize","rulePlugin","_getAllOptions","isEmptyObject","_checkMediaQueries","allOptions","dummyPlugin","tmpPlugin","keyKey","objObj","_changedZfMediaQueryHandler","matchedMq","_handleMarkup","toSet","fromString","$panels","tabsTitle","linkClass","tabsPanel","panelClass","$liHeads","$liHeadsA","display","visibility","appendTo","$tabsContent","$placeholder","tempValue","_this$currentRule","_this$currentRule2","_this$currentRule3","dropdown","drilldown","ResponsiveMenu","ResponsiveToggle","targetID","$targetMenu","$toggler","animationIn","animationOut","_update","_updateMqHandler","toggleMenu","hideFor","Reveal","cached","mq","current","fullScreen","_makeOverlay","additionalOverlayClasses","_updatePosition","outerWidth","outerHeight","left","margin","closeZfTrigger","resizemeZfTrigger","_handleState","_disableScroll","_enableScroll","$activeAnchor","activeElement","multipleOpened","afterAnimation","_addGlobalClasses","focusableElements","showDelay","_addGlobalListeners","updateScrollbarClass","toggleClass","_removeGlobalClasses","closeOnEsc","finishUp","hideDelay","resetOnClose","urlWithoutHash","title","Move","Slider","inputs","handles","$handle","$input","$fill","vertical","disabled","disabledClass","binding","_setInitAttr","doubleSided","$handle2","$input2","setHandles","_setHandlePos","_pctOfBar","pctOfBar","percent","positionValueFunction","_logTransform","_powTransform","toFixed","_value","baseLog","nonLinearBase","pow","$hndl","isDbl","h2Val","step","h1Val","vert","hOrW","lOrT","handleDim","elemDim","pxToMove","movement","decimal","_setValues","isLeftHndl","dim","handlePct","handlePos","initialStart","moveTime","changedDelay","initVal","initialEnd","_handleEvent","param","direction","eventOffset","pageX","barDim","windowScroll","scrollLeft","elemOffset","clientY","eventFromBar","barXY","offsetPct","_adjustValue","firstHndlPos","absPosition","secndHndlPos","div","previousVal","nextVal","_eventsForHandle","curHandle","handleChangeEvent","keyCode","clickSelect","draggable","addTouch","_$handle","oldValue","newValue","decrease","increase","decreaseFast","increaseFast","invertVertical","frac","num","dir","clickPos","abs","log","_linkClickListener","_handleLinkClick","$loc","Sticky","$container","wasWrapped","container","stickyClass","scrollCount","checkEvery","isStuck","containerHeight","elemHeight","_parsePoints","_setSizes","scroll","_calc","_removeSticky","topPoint","reverse","topAnchor","btm","btmAnchor","pts","breaks","place","scrollListener","canStick","_eventsHandler","_pauseListeners","checkSizes","bottomPoint","_setSticky","stickTo","mrgn","notStuckTo","isTop","stickToTop","anchorPt","anchorHeight","topOrBottom","bottom","stickyOn","newElemWidth","comp","getComputedStyle","pdngl","pdngr","dynamicHeight","newContainerHeight","_setBreakPoints","mTop","emCalc","marginTop","mBtm","marginBottom","em","fontSize","$tabTitles","linkActiveClass","matchHeight","_setHeight","anchorNoHash","_collapse","_addKeyHandler","_addClickHandler","_setHeightMqHandler","_handleTabChange","which","wrapOnKeys","historyHandled","activeCollapse","$oldTab","$tabLink","$targetContent","_collapseTab","panelActiveClass","$targetAnchor","$activeTab","idStr","hashIdStr","panel","Toggler","toggler","Error","$trigger","controls","containsId","_toggleClass","_updateARIA","_toggleAnimate","Tooltip","isClick","tipText","template","_buildTemplate","allowHtml","triggerClass","elementClassName","SVGElement","baseVal","tooltipWidth","tooltipHeight","templateClasses","tooltipClass","$template","showOn","fadeIn","fadeInDuration","fadeOut","fadeOutDuration","isFocus","disableForTouch","touchCloseText","lrOnly","tbOnly","ignoreBottom","eleDims","topOver","bottomOver","leftOver","rightOver","parDims","windowDims","sqrt","rect","parRect","parentNode","winRect","winY","winX","pageXOffset","parentDims","isOverflow","$eleDims","$anchorDims","leftVal","images","unloaded","complete","naturalWidth","singleImageLoaded","image","Image","events","me","src","keyCodes","commands","sort","a","aTabIndex","bTabIndex","parseKey","String","fromCharCode","toUpperCase","shiftKey","ctrlKey","altKey","getKeyCodes","component","commandList","cmds","command","zfIsKeyHandled","returnValue","unhandled","componentName","$firstFocusable","$lastFocusable","kcs","k","kc","styleMedia","media","script","getElementsByTagName","head","appendChild","insertBefore","currentStyle","matchMedium","styleSheet","cssText","textContent","isInitialized","self","$meta","extractedStyles","namedQueries","parseStyleToObject","_getCurrentSize","_watcher","_reInit","size","only","upTo","nextSize","parts","_parts","_slicedToArray","bpSize","_parts$","bpModifier","queryIndex","findIndex","q","_getQueryName","nextQuery","matched","newSize","currentSize","styleObject","reduce","ret","decodeURIComponent","isArray","initClasses","activeClasses","animation","anim","prog","move","ts","isIn","initClass","reset","offsetWidth","transitionDuration","menu","items","subMenuClass","subItemClass","hasSubClass","applyAria","$item","firstItem","nameSpace","remain","startPosX","startTime","elapsedTime","startEvent","isMoving","didMoved","onTouchEnd","removeEventListener","onTouchMove","tapEvent","Event","spotSwipe","x","dx","moveThreshold","timeThreshold","assign","onTouchStart","addEventListener","passive","SpotSwipe","enabled","special","setup","tap","noop","setupSpotSwipe","setupTouchHandler","handleTouch","changedTouches","eventTypes","touchstart","touchmove","touchend","simulatedEvent","MouseEvent","screenX","screenY","clientX","createEvent","initMouseEvent","dispatchEvent","MutationObserver","prefixes","triggers","Listeners","Basic","Global","Initializers","openListener","closeListener","toggleListener","closeableListener","toggleFocusListener","addOpenListener","addCloseListener","addToggleListener","addCloseableListener","addToggleFocusListener","resizeListener","$nodes","closeMeListener","pluginId","addClosemeListener","yetiBoxes","plugNames","listeners","debounceGlobalListener","debounce","listener","addResizeListener","addScrollListener","addMutationEventsListener","listeningElementsMutation","mutationRecordsList","attributeName","elementObserver","observe","attributes","childList","characterData","subtree","attributeFilter","addSimpleListeners","$document","addGlobalListeners","__","triggersInitialized","IHearYou","CoreUtils"],"sourceRoot":""}