1var Accordion=function(t){this.options=t,this.initialize()};Accordion.prototype.option=function(t,e){try{var o;if(void 0===e)return void 0===(o=Accordion.obj_get_if_set(this.options,t))&&(o=Accordion.obj_get_if_set(Accordion.options_default(),t)),o;this.options[t]=e}catch(t){throw t}},Accordion.prototype.item_is_expanded=function(t){return"true"==t.getAttribute("data-accordion-expanded")},Accordion.prototype.resize_handler=function(t){try{var e=document.querySelectorAll(this.option("selector_bundle"));t=t||{};for(var o=0;o<e.length;o++)for(var i=e[o].querySelectorAll(this.option("selector_item")),n=0;n<i.length;n++){var r=i[n];this.item_is_expanded(r)?this.item_expanded_height_reapply(r,{immediate:!0}):this.item_expanded_height_calculate(r)}}catch(t){throw t}},Accordion.prototype.item_get_content=function(t){return t.querySelector(this.option("selector_content"))},Accordion.prototype.initialize=function(){if(void 0===this.option("selector_bundle")||""==this.option("selector_bundle"))throw"No bundle selector specified";for(var t=document.querySelectorAll(this.option("selector_bundle")),e=0;e<t.length;e++){var o=t[e],i=o.querySelectorAll(this.option("selector_item"));o.setAttribute("role","tablist"),o.setAttribute("id",this.option("id_prefix_bundle")+"-"+e.toString());for(var n=0;n<i.length;n++)this.item_initialize(i[n],n,o,e);this.bundle_collapse(o,{first_initialize:!0,except_first:this.option("auto_expand_first_item")}),1==this.option("auto_expand_first_item")&&this.item_expand(i[0])}var r=this;window.addEventListener("resize",(function(){r.resize_handler()})),window.addEventListener("accordion-resize",(function(){r.resize_handler()}))},Accordion.prototype.item_initialize=function(t,e,o,i,n){try{var r,c=this,l=t.querySelector(this.option("selector_heading")),a=t.querySelector(this.option("selector_content")),s=i.toString()+"_"+e.toString(),d=this.option("selector_bundle").replace(/[^A-Za-z0-9-_]*/g,"")+"_"+s,_={item:t,bundle:o,accordion_object:c};t.setAttribute("data-accordion-item-id",d),t.setAttribute("data-accordion-bundle-id",o.getAttribute("id")),l.setAttribute("data-accordion-header-for",d),l.setAttribute("role","tab"),l.setAttribute("aria-controls",c.option("id_prefix_content")+"-"+s),a.setAttribute("id",c.option("id_prefix_content")+"-"+s),a.setAttribute("role","tabpanel"),l.addEventListener("click",(function(t){var e,o=t.currentTarget.getAttribute("data-accordion-header-for");if(null!=o){t.preventDefault(),t.stopPropagation();var i=document.querySelector(c.option("selector_item")+"[data-accordion-item-id="+o+"]"),n=document.querySelector(c.option("selector_item")+"."+c.option("class_name_expanded"));c.item_is_expanded(i)?((e=c.option("callbacks.close.before"))&&e.call(t,_),c.item_collapse(i),(e=c.option("callbacks.close.after"))&&e.call(t,_)):(n&&c.item_collapse(n),(e=c.option("callbacks.open.before"))&&e.call(t,_),c.item_expand(i,{from_click:!0,scroll_to_top:c.option("scroll_to_top")}),(e=c.option("callbacks.open.after"))&&e.call(t,_))}})),this.item_expanded_height_calculate(t),(r=this.option("callbacks.item.initialize.after"))&&r.call(event,_)}catch(t){throw t}},Accordion.prototype.tabbables_toggle=function(t,e,o){try{o=o||{};for(var i=t.querySelectorAll(this.option("selector_tabbable_elements")),n="disable"==e?"-1":"0",r=0;r<i.length;r++)i[r].setAttribute("tabindex",n)}catch(t){throw t}},Accordion.prototype.item_expanded_height_calculate=function(t,e){try{e=e||{};var o,i=t.querySelector(this.option("selector_content")),n=i.firstElementChild;if(!n)throw"Could not find a content stage. Make sure you have an inner div inside your accordion content.";o=n.scrollHeight,i.setAttribute("data-expanded-height",parseInt(o)+parseInt(this.option("height_buffer")))}catch(t){throw t}},Accordion.prototype.item_expanded_height_reapply=function(t,e){try{this.item_expanded_height_calculate(t),this.height_apply_expanded(t,e)}catch(t){throw t}},Accordion.prototype.bundle_collapse=function(t,e){try{e=e||{};for(var o,i=!0,n=t.querySelectorAll(this.option("selector_item")),r=(n[0],0);r<n.length;r++)o=n[r],i=!0,void 0!==e.except_first&&1==e.except_first&&(i=!1),void 0!==e.except_item&&e.except_item==o&&(i=!1),i&&this.item_collapse(o)}catch(t){throw t}},Accordion.prototype.height_apply_collapsed=function(t,e){t.querySelector(this.option("selector_content")).style.height="0"+this.option("height_units")},Accordion.prototype.height_apply_expanded=function(t,e){e=e||{};var o=t.querySelector(this.option("selector_content"));void 0!==e.immediate&&e.immediate&&(o.style.transitionDuration="0s"),o.style.height=o.getAttribute("data-expanded-height")+this.option("height_units"),void 0!==e.immediate&&e.immediate&&o.style.removeProperty("transition-duration")},Accordion.prototype.active_attributes_apply=function(t){try{var e=t.querySelector(this.option("selector_heading")),o=t.querySelector(this.option("selector_content"));t.setAttribute("data-accordion-expanded",!0),t.classList.add(this.option("class_name_expanded")),e.setAttribute("aria-expanded",!0),o.setAttribute("aria-hidden",!1),this.tabbables_toggle(o,"enable")}catch(t){throw t}},Accordion.prototype.bundle_by_item=function(t){try{if(t.getAttribute("data-accordion-bundle-id"))return document.getElementById(t.getAttribute("data-accordion-bundle-id"));throw"Error Getting Bundle ID for Item "+t}catch(t){throw t}},Accordion.prototype.item_collapse=function(t){try{var e=t.querySelector(this.option("selector_heading")),o=t.querySelector(this.option("selector_content"));t.classList.remove(this.option("class_name_expanded")),t.setAttribute("data-accordion-expanded",!1),this.height_apply_collapsed(t),e.setAttribute("aria-expanded",!1),o.setAttribute("aria-hidden",!0),this.tabbables_toggle(o,"disable")}catch(t){throw t}},Accordion.prototype.item_expand=function(t,e){try{e=e||{};t.querySelector(this.option("selector_content"));this.active_attributes_apply(t),this.height_apply_expanded(t),void 0!==e.shadow_expand&&0!=e.shadow_expand||(void 0!==this.option("item_expand_unique")&&1==this.option("item_expand_unique")&&this.bundle_collapse(this.bundle_by_item(t),{except_item:t}),void 0!==e.scroll_to_top&&0!=e.scroll_to_top.enabled&&(1==this.option("scroll_to_top.transition.enabled")?Accordion.scroll_to_element(this.option("scroll_to_top.selector_scroll_element"),Accordion.scroll_position(this.option("scroll_to_top.selector_scroll_element")),t.offsetTop,Accordion.scroll_position,this.option("scroll_to_top.transition.duration"),this.option("scroll_to_top.transition.function_scroll_ease"),this.option("scroll_to_top.transition.animation_interval")):Accordion.scroll_position(this.option("scroll_to_top.selector_scroll_element"),t.offsetTop)))}catch(t){throw t}},Accordion.scroll_position=function(t,e){return void 0===e?t==window?(window.pageYOffset||document.documentElement.scrollTop)-(document.documentElement.clientTop||0):document.querySelector(t).scrollTop:t==window?t.scrollTo(0,e):document.querySelector(t).scrollTop=e},Accordion.scroll_to_element=function(t,e,o,i,n,r,c){var l=o-e,a=(new Date).getTime(),s=a+n;i(t,e),t.animation_loop&&clearInterval(t.animation_loop);var d=setInterval((function(){var c=(new Date).getTime(),_=r((c-a)/n);_>1&&(_=1),i(t,_*l+e),c>=s&&(clearInterval(d),i(t,o),t.animation_loop=!1)}),c);t.animation_loop=d},"undefined"!=typeof module&&module.exports&&(module.exports=Accordion),Accordion.obj_get_if_set=function(obj,keys){try{var ret=void 0;return eval("ret = obj."+keys),ret}catch(t){return}},Accordion.options_default=function(){return{selector_bundle:".accordion",selector_item:".accordion__item",selector_heading:".accordion__item__heading a",selector_content:".accordion__item__content",id_prefix_content:"accordion-content",id_prefix_bundle:"accordion-bundle",selector_tabbable_elements:"input, a",scroll_to_top:{enabled:!0,selector_scroll_element:window,transition:{enabled:!0,duration:450,function_scroll_ease:function(t){return t<.5?2*t*t:(4-2*t)*t-1},animation_interval:20}},class_name_expanded:"expanded",auto_expand_first_item:!1,item_expand_unique:!1,height_buffer:0,height_units:"px",callbacks:{open:{before:null,after:null},close:{before:null,after:null},item:{initialize:{after:null}}},css_style_apply:!1,css_styles:{collapsed:{content:{height:"0px"}},expanded:{}}}};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.