function getJSONList(n,t,i,r){var u=$(n),f=n.replace("#",""),e=$.getJSON(t,function(){console.log("success")}).done(function(t){$.each(t,function(n,t){return u.append('<li class="list-group-item"><p><a href="'+t.url+'">'+t.title+'<\/a><\/p><small class="label label-default"><span class="minister-name"><a href="'+t.minURL+'">'+t.minister+'<\/a><\/span> <span class="timestamp">'+t.time+"<\/span><\/small><\/li>"),n===i?!1:void 0});u.after('<nav class="pagination-bar" aria-label="Page navigation"><ul id="'+f+'-pagination" class="pagination pagination-sm"><\/ul><\/nav>');var e=n+"-pagination";console.log($(e));$(e).jPages({containerID:f,perPage:r,startPage:1,startRange:1,midRange:5,endRange:1})}).fail(function(){console.log("error")}).always(function(){console.log("complete")})}(function(n,t){n===undefined&&window!==undefined&&(n=window);typeof define=="function"&&define.amd?define(["jquery"],function(n){return t(n)}):typeof module=="object"&&module.exports?module.exports=t(require("jquery")):t(n.jQuery)})(this,function(n){(function(n){"use strict";function ct(t,i){var u=t.nodeName.toLowerCase(),f,r,e;if(n.inArray(u,i)!==-1)return n.inArray(u,ot)!==-1?Boolean(t.nodeValue.match(st)||t.nodeValue.match(ht)):!0;for(f=n(i).filter(function(n,t){return t instanceof RegExp}),r=0,e=f.length;r<e;r++)if(u.match(f[r]))return!0;return!1}function p(n,t,i){var l,u,a,o,f,v,r,s,h,y,e,p,c;if(i&&typeof i=="function")return i(n);for(l=Object.keys(t),u=0,a=n.length;u<a;u++)for(o=n[u].querySelectorAll("*"),f=0,v=o.length;f<v;f++){if(r=o[f],s=r.nodeName.toLowerCase(),l.indexOf(s)===-1){r.parentNode.removeChild(r);continue}for(h=[].slice.call(r.attributes),y=[].concat(t["*"]||[],t[s]||[]),e=0,p=h.length;e<p;e++)c=h[e],ct(c,y)||r.removeAttribute(c.nodeName)}}function lt(n,t){return n.length===t.length&&n.every(function(n,i){return n===t[i]})}function d(n,t){var u=n.selectedOptions,f=[],i,r,e;if(t){for(r=0,e=u.length;r<e;r++)i=u[r],i.disabled||i.parentNode.tagName==="OPTGROUP"&&i.parentNode.disabled||f.push(i);return f}return u}function a(n,t){for(var r=[],f=t||n.selectedOptions,i,u=0,e=f.length;u<e;u++)i=f[u],i.disabled||i.parentNode.tagName==="OPTGROUP"&&i.parentNode.disabled||r.push(i.value);return n.multiple?r:r.length?r[0]:null}function nt(n,t,i,r){for(var o,u,s=["display","subtext","tokens"],f=!1,e=0;e<s.length;e++)if(o=s[e],u=n[o],u&&(u=u.toString(),o==="display"&&(u=u.replace(/<[^>]+>/g,"")),r&&(u=tt(u)),u=u.toUpperCase(),f=i==="contains"?u.indexOf(t)>=0:u.startsWith(t),f))break;return f}function o(n){return parseInt(n,10)||0}function pt(n){return at[n]}function tt(n){return n=n.toString(),n&&n.replace(vt,pt).replace(yt,"")}function ut(i){var h=arguments,r=i,e,o,i,s,c;if([].shift.apply(h),!u.success){try{u.full=(n.fn.dropdown.Constructor.VERSION||"").split(" ")[0].split(".")}catch(l){f.BootstrapVersion?u.full=f.BootstrapVersion.split(" ")[0].split("."):(u.full=[u.major,"0","0"],console.warn("There was an issue retrieving Bootstrap's version. Ensure Bootstrap is being loaded before bootstrap-select and there is no namespace collision. If loading Bootstrap asynchronously, the version may need to be manually specified via $.fn.selectpicker.Constructor.BootstrapVersion.",l))}u.major=u.full[0];u.success=!0}if(u.major==="4")for(e=[],f.DEFAULTS.style===t.BUTTONCLASS&&e.push({name:"style",className:"BUTTONCLASS"}),f.DEFAULTS.iconBase===t.ICONBASE&&e.push({name:"iconBase",className:"ICONBASE"}),f.DEFAULTS.tickIcon===t.TICKICON&&e.push({name:"tickIcon",className:"TICKICON"}),t.DIVIDER="dropdown-divider",t.SHOW="show",t.BUTTONCLASS="btn-light",t.POPOVERHEADER="popover-header",t.ICONBASE="",t.TICKICON="bs-ok-default",o=0;o<e.length;o++)i=e[o],f.DEFAULTS[i.name]=t[i.className];return c=this.each(function(){var e=n(this),t,i,u,o,l,c;if(e.is("select")){if(t=e.data("selectpicker"),i=typeof r=="object"&&r,t){if(i)for(c in i)i.hasOwnProperty(c)&&(t.options[c]=i[c])}else{u=e.data();for(o in u)u.hasOwnProperty(o)&&n.inArray(o,et)!==-1&&delete u[o];l=n.extend({},f.DEFAULTS,n.fn.selectpicker.defaults||{},u,i);l.template=n.extend({},f.DEFAULTS.template,n.fn.selectpicker.defaults?n.fn.selectpicker.defaults.template:{},u.template,i.template);e.data("selectpicker",t=new f(this,l))}typeof r=="string"&&(s=t[r]instanceof Function?t[r].apply(t,h):t.options[r])}}),typeof s!="undefined"?s:c}var et=["sanitize","whiteList","sanitizeFn"],ot=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],st=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,ht=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i,c,w,b,k,l,h,g,ft,y;"classList"in document.createElement("_")||function(t){var r;if("Element"in t){var u="classList",e="prototype",f=t.Element[e],i=Object,o=function(){var t=n(this);return{add:function(n){return n=Array.prototype.slice.call(arguments).join(" "),t.addClass(n)},remove:function(n){return n=Array.prototype.slice.call(arguments).join(" "),t.removeClass(n)},toggle:function(n,i){return t.toggleClass(n,i)},contains:function(n){return t.hasClass(n)}}};if(i.defineProperty){r={get:o,enumerable:!0,configurable:!0};try{i.defineProperty(f,u,r)}catch(s){(s.number===undefined||s.number===-2146823252)&&(r.enumerable=!1,i.defineProperty(f,u,r))}}else i[e].__defineGetter__&&f.__defineGetter__(u,o)}}(window);c=document.createElement("_");c.classList.add("c1","c2");c.classList.contains("c2")||(w=DOMTokenList.prototype.add,b=DOMTokenList.prototype.remove,DOMTokenList.prototype.add=function(){Array.prototype.forEach.call(arguments,w.bind(this))},DOMTokenList.prototype.remove=function(){Array.prototype.forEach.call(arguments,b.bind(this))});c.classList.toggle("c3",!1);c.classList.contains("c3")&&(k=DOMTokenList.prototype.toggle,DOMTokenList.prototype.toggle=function(n,t){return 1 in arguments&&!this.contains(n)==!t?t:k.call(this,n)});c=null;String.prototype.startsWith||function(){var n=function(){try{var n={},t=Object.defineProperty,i=t(n,n,n)&&t}catch(r){}return i}(),i={}.toString,t=function(n){var u,f,r;if(this==null)throw new TypeError;if(u=String(this),n&&i.call(n)=="[object RegExp]")throw new TypeError;var e=u.length,o=String(n),s=o.length,h=arguments.length>1?arguments[1]:undefined,t=h?Number(h):0;if(t!=t&&(t=0),f=Math.min(Math.max(t,0),e),s+f>e)return!1;for(r=-1;++r<s;)if(u.charCodeAt(f+r)!=o.charCodeAt(r))return!1;return!0};n?n(String.prototype,"startsWith",{value:t,configurable:!0,writable:!0}):String.prototype.startsWith=t}();Object.keys||(Object.keys=function(n,t,i){i=[];for(t in n)i.hasOwnProperty.call(n,t)&&i.push(t);return i});HTMLSelectElement&&!HTMLSelectElement.prototype.hasOwnProperty("selectedOptions")&&Object.defineProperty(HTMLSelectElement.prototype,"selectedOptions",{get:function(){return this.querySelectorAll(":checked")}});l={useDefault:!1,_set:n.valHooks.select.set};n.valHooks.select.set=function(t,i){return i&&!l.useDefault&&n(t).data("selected",!0),l._set.apply(this,arguments)};h=null;g=function(){try{return new Event("change"),!0}catch(n){return!1}}();n.fn.triggerNative=function(n){var i=this[0],t;i.dispatchEvent?(g?t=new Event(n,{bubbles:!0}):(t=document.createEvent("Event"),t.initEvent(n,!0,!1)),i.dispatchEvent(t)):i.fireEvent?(t=document.createEventObject(),t.eventType=n,i.fireEvent("on"+n,t)):this.trigger(n)};var at={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","Ĳ":"IJ","ĳ":"ij","Œ":"Oe","œ":"oe","ŉ":"'n","ſ":"s"},vt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,yt=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\u1ab0-\\u1aff\\u1dc0-\\u1dff]","g");var wt=function(n){var i=function(t){return n[t]},t="(?:"+Object.keys(n).join("|")+")",r=RegExp(t),u=RegExp(t,"g");return function(n){return n=n==null?"":""+n,r.test(n)?n.replace(u,i):n}},v=wt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"}),bt={32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",65:"A",66:"B",67:"C",68:"D",69:"E",70:"F",71:"G",72:"H",73:"I",74:"J",75:"K",76:"L",77:"M",78:"N",79:"O",80:"P",81:"Q",82:"R",83:"S",84:"T",85:"U",86:"V",87:"W",88:"X",89:"Y",90:"Z",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9"},e={ESCAPE:27,ENTER:13,SPACE:32,TAB:9,ARROW_UP:38,ARROW_DOWN:40},u={success:!1,major:"3"};try{u.full=(n.fn.dropdown.Constructor.VERSION||"").split(" ")[0].split(".");u.major=u.full[0];u.success=!0}catch(gt){}var it=0,i=".bs.select",t={DISABLED:"disabled",DIVIDER:"divider",SHOW:"open",DROPUP:"dropup",MENU:"dropdown-menu",MENURIGHT:"dropdown-menu-right",MENULEFT:"dropdown-menu-left",BUTTONCLASS:"btn-default",POPOVERHEADER:"popover-title",ICONBASE:"glyphicon",TICKICON:"glyphicon-ok"},rt={MENU:"."+t.MENU},r={span:document.createElement("span"),i:document.createElement("i"),subtext:document.createElement("small"),a:document.createElement("a"),li:document.createElement("li"),whitespace:document.createTextNode(" "),fragment:document.createDocumentFragment()};r.a.setAttribute("role","option");u.major==="4"&&(r.a.className="dropdown-item");r.subtext.className="text-muted";r.text=r.span.cloneNode(!1);r.text.className="text";r.checkMark=r.span.cloneNode(!1);var kt=new RegExp(e.ARROW_UP+"|"+e.ARROW_DOWN),dt=new RegExp("^"+e.TAB+"$|"+e.ESCAPE),s={li:function(n,t,i){var u=r.li.cloneNode(!1);return n&&(n.nodeType===1||n.nodeType===11?u.appendChild(n):u.innerHTML=n),typeof t!="undefined"&&t!==""&&(u.className=t),typeof i!="undefined"&&i!==null&&u.classList.add("optgroup-"+i),u},a:function(n,t,i){var u=r.a.cloneNode(!0);return n&&(n.nodeType===11?u.appendChild(n):u.insertAdjacentHTML("beforeend",n)),typeof t!="undefined"&&t!==""&&u.classList.add.apply(u.classList,t.split(" ")),i&&u.setAttribute("style",i),u},text:function(n,t){var i=r.text.cloneNode(!1),u,f,e;if(n.content?i.innerHTML=n.content:(i.textContent=n.text,n.icon&&(e=r.whitespace.cloneNode(!1),f=(t===!0?r.i:r.span).cloneNode(!1),f.className=this.options.iconBase+" "+n.icon,r.fragment.appendChild(f),r.fragment.appendChild(e)),n.subtext&&(u=r.subtext.cloneNode(!1),u.textContent=n.subtext,i.appendChild(u))),t===!0)while(i.childNodes.length>0)r.fragment.appendChild(i.childNodes[0]);else r.fragment.appendChild(i);return r.fragment},label:function(n){var t=r.text.cloneNode(!1),i,u,f;return t.innerHTML=n.display,n.icon&&(f=r.whitespace.cloneNode(!1),u=r.span.cloneNode(!1),u.className=this.options.iconBase+" "+n.icon,r.fragment.appendChild(u),r.fragment.appendChild(f)),n.subtext&&(i=r.subtext.cloneNode(!1),i.textContent=n.subtext,t.appendChild(i)),r.fragment.appendChild(t),r.fragment}},f=function(t,i){var u=this,r;l.useDefault||(n.valHooks.select.set=l._set,l.useDefault=!0);this.$element=n(t);this.$newElement=null;this.$button=null;this.$menu=null;this.options=i;this.selectpicker={main:{},search:{},current:{},view:{},isSearching:!1,keydown:{keyHistory:"",resetKeyHistory:{start:function(){return setTimeout(function(){u.selectpicker.keydown.keyHistory=""},800)}}}};this.sizeInfo={};this.options.title===null&&(this.options.title=this.$element.attr("title"));r=this.options.windowPadding;typeof r=="number"&&(this.options.windowPadding=[r,r,r,r]);this.val=f.prototype.val;this.render=f.prototype.render;this.refresh=f.prototype.refresh;this.setStyle=f.prototype.setStyle;this.selectAll=f.prototype.selectAll;this.deselectAll=f.prototype.deselectAll;this.destroy=f.prototype.destroy;this.remove=f.prototype.remove;this.show=f.prototype.show;this.hide=f.prototype.hide;this.init()};f.VERSION="1.13.14";f.DEFAULTS={noneSelectedText:"Nothing selected",noneResultsText:"No results matched {0}",countSelectedText:function(n){return n==1?"{0} item selected":"{0} items selected"},maxOptionsText:function(n,t){return[n==1?"Limit reached ({n} item max)":"Limit reached ({n} items max)",t==1?"Group limit reached ({n} item max)":"Group limit reached ({n} items max)"]},selectAllText:"Select All",deselectAllText:"Deselect All",doneButton:!1,doneButtonText:"Close",multipleSeparator:", ",styleBase:"btn",style:t.BUTTONCLASS,size:"auto",title:null,selectedTextFormat:"values",width:!1,container:!1,hideDisabled:!1,showSubtext:!1,showIcon:!0,showContent:!0,dropupAuto:!0,header:!1,liveSearch:!1,liveSearchPlaceholder:null,liveSearchNormalize:!1,liveSearchStyle:"contains",actionsBox:!1,iconBase:t.ICONBASE,tickIcon:t.TICKICON,showTick:!1,template:{caret:'<span class="caret"><\/span>'},maxOptions:!1,mobile:!1,selectOnTab:!1,dropdownAlignRight:!1,windowPadding:0,virtualScroll:600,display:!1,sanitize:!0,sanitizeFn:null,whiteList:{"*":["class","dir","id","lang","role","tabindex","style",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]}};f.prototype={constructor:f,init:function(){var n=this,r=this.$element.attr("id");if(it++,this.selectId="bs-select-"+it,this.$element[0].classList.add("bs-select-hidden"),this.multiple=this.$element.prop("multiple"),this.autofocus=this.$element.prop("autofocus"),this.$element[0].classList.contains("show-tick")&&(this.options.showTick=!0),this.$newElement=this.createDropdown(),this.buildData(),this.$element.after(this.$newElement).prependTo(this.$newElement),this.$button=this.$newElement.children("button"),this.$menu=this.$newElement.children(rt.MENU),this.$menuInner=this.$menu.children(".inner"),this.$searchbox=this.$menu.find("input"),this.$element[0].classList.remove("bs-select-hidden"),this.options.dropdownAlignRight===!0&&this.$menu[0].classList.add(t.MENURIGHT),typeof r!="undefined"&&this.$button.attr("data-id",r),this.checkDisabled(),this.clickListener(),this.options.liveSearch?(this.liveSearchListener(),this.focusedParent=this.$searchbox[0]):this.focusedParent=this.$menuInner[0],this.setStyle(),this.render(),this.setWidth(),this.options.container)this.selectPosition();else this.$element.on("hide"+i,function(){if(n.isVirtual()){var t=n.$menuInner[0],i=t.firstChild.cloneNode(!1);t.replaceChild(i,t.firstChild);t.scrollTop=0}});this.$menu.data("this",this);this.$newElement.data("this",this);this.options.mobile&&this.mobile();this.$newElement.on({"hide.bs.dropdown":function(t){n.$element.trigger("hide"+i,t)},"hidden.bs.dropdown":function(t){n.$element.trigger("hidden"+i,t)},"show.bs.dropdown":function(t){n.$element.trigger("show"+i,t)},"shown.bs.dropdown":function(t){n.$element.trigger("shown"+i,t)}});if(n.$element[0].hasAttribute("required"))this.$element.on("invalid"+i,function(){n.$button[0].classList.add("bs-invalid");n.$element.on("shown"+i+".invalid",function(){n.$element.val(n.$element.val()).off("shown"+i+".invalid")}).on("rendered"+i,function(){this.validity.valid&&n.$button[0].classList.remove("bs-invalid");n.$element.off("rendered"+i)});n.$button.on("blur"+i,function(){n.$element.trigger("focus").trigger("blur");n.$button.off("blur"+i)})});setTimeout(function(){n.buildList();n.$element.trigger("loaded"+i)})},createDropdown:function(){var h=this.multiple||this.options.showTick?" show-tick":"",c=this.multiple?' aria-multiselectable="true"':"",i="",l=this.autofocus?" autofocus":"";u.major<4&&this.$element.parent().hasClass("input-group")&&(i=" input-group-btn");var r,f="",e="",o="",s="";return this.options.header&&(f='<div class="'+t.POPOVERHEADER+'"><button type="button" class="close" aria-hidden="true">&times;<\/button>'+this.options.header+"<\/div>"),this.options.liveSearch&&(e='<div class="bs-searchbox"><input type="search" class="form-control" autocomplete="off"'+(this.options.liveSearchPlaceholder===null?"":' placeholder="'+v(this.options.liveSearchPlaceholder)+'"')+' role="combobox" aria-label="Search" aria-controls="'+this.selectId+'" aria-autocomplete="list"><\/div>'),this.multiple&&this.options.actionsBox&&(o='<div class="bs-actionsbox"><div class="btn-group btn-group-sm btn-block"><button type="button" class="actions-btn bs-select-all btn '+t.BUTTONCLASS+'">'+this.options.selectAllText+'<\/button><button type="button" class="actions-btn bs-deselect-all btn '+t.BUTTONCLASS+'">'+this.options.deselectAllText+"<\/button><\/div><\/div>"),this.multiple&&this.options.doneButton&&(s='<div class="bs-donebutton"><div class="btn-group btn-block"><button type="button" class="btn btn-sm '+t.BUTTONCLASS+'">'+this.options.doneButtonText+"<\/button><\/div><\/div>"),r='<div class="dropdown bootstrap-select'+h+i+'"><button type="button" class="'+this.options.styleBase+' dropdown-toggle" '+(this.options.display==="static"?'data-display="static"':"")+'data-toggle="dropdown"'+l+' role="combobox" aria-owns="'+this.selectId+'" aria-haspopup="listbox" aria-expanded="false"><div class="filter-option"><div class="filter-option-inner"><div class="filter-option-inner-inner"><\/div><\/div> <\/div>'+(u.major==="4"?"":'<span class="bs-caret">'+this.options.template.caret+"<\/span>")+'<\/button><div class="'+t.MENU+" "+(u.major==="4"?"":t.SHOW)+'">'+f+e+o+'<div class="inner '+t.SHOW+'" role="listbox" id="'+this.selectId+'" tabindex="-1" '+c+'><ul class="'+t.MENU+" inner "+(u.major==="4"?t.SHOW:"")+'" role="presentation"><\/ul><\/div>'+s+"<\/div><\/div>",n(r)},setPositionData:function(){var t,n,i;for(this.selectpicker.view.canHighlight=[],this.selectpicker.view.size=0,t=0;t<this.selectpicker.current.data.length;t++)n=this.selectpicker.current.data[t],i=!0,n.type==="divider"?(i=!1,n.height=this.sizeInfo.dividerHeight):n.type==="optgroup-label"?(i=!1,n.height=this.sizeInfo.dropdownHeaderHeight):n.height=this.sizeInfo.liHeight,n.disabled&&(i=!1),this.selectpicker.view.canHighlight.push(i),i&&(this.selectpicker.view.size++,n.posinset=this.selectpicker.view.size),n.position=(t===0?0:this.selectpicker.current.data[t-1].position)+n.height},isVirtual:function(){return this.options.virtualScroll!==!1&&this.selectpicker.main.elements.length>=this.options.virtualScroll||this.options.virtualScroll===!0},createView:function(r,u,f){function a(n,t){var f=e.selectpicker.current.elements.length,k=[],l,a,ut,ft,s,d,et,ot,st=!0,o=e.isVirtual(),b,i,yt,nt,tt,h,it,rt,c,pt;for(e.selectpicker.view.scrollTop=n,l=Math.ceil(e.sizeInfo.menuInnerHeight/e.sizeInfo.liHeight*1.5),a=Math.round(f/l)||1,i=0;i<a;i++){if(b=(i+1)*l,i===a-1&&(b=f),k[i]=[i*l+(i?1:0),b],!f)break;s===undefined&&n-1<=e.selectpicker.current.data[b-1].position-e.sizeInfo.menuInnerHeight&&(s=i)}if(s===undefined&&(s=0),d=[e.selectpicker.view.position0,e.selectpicker.view.position1],ut=Math.max(0,s-1),ft=Math.min(a-1,s+1),e.selectpicker.view.position0=o===!1?0:Math.max(0,k[ut][0])||0,e.selectpicker.view.position1=o===!1?f:Math.min(f,k[ft][1])||0,et=d[0]!==e.selectpicker.view.position0||d[1]!==e.selectpicker.view.position1,e.activeIndex!==undefined&&(w=e.selectpicker.main.elements[e.prevActiveIndex],v=e.selectpicker.main.elements[e.activeIndex],y=e.selectpicker.main.elements[e.selectedIndex],t&&(e.activeIndex!==e.selectedIndex&&e.defocusItem(v),e.activeIndex=undefined),e.activeIndex&&e.activeIndex!==e.selectedIndex&&e.defocusItem(y)),e.prevActiveIndex!==undefined&&e.prevActiveIndex!==e.activeIndex&&e.prevActiveIndex!==e.selectedIndex&&e.defocusItem(w),(t||et)&&(ot=e.selectpicker.view.visibleElements?e.selectpicker.view.visibleElements.slice():[],e.selectpicker.view.visibleElements=o===!1?e.selectpicker.current.elements:e.selectpicker.current.elements.slice(e.selectpicker.view.position0,e.selectpicker.view.position1),e.setOptionStatus(),(r||o===!1&&t)&&(st=!lt(ot,e.selectpicker.view.visibleElements)),(t||o===!0)&&st)){var u=e.$menuInner[0],ht=document.createDocumentFragment(),wt=u.firstChild.cloneNode(!1),ct,at,vt=e.selectpicker.view.visibleElements,g=[];for(u.replaceChild(wt,u.firstChild),i=0,yt=vt.length;i<yt;i++)nt=vt[i],e.options.sanitize&&(tt=nt.lastChild,tt&&(h=e.selectpicker.current.data[i+e.selectpicker.view.position0],h&&h.content&&!h.sanitized&&(g.push(tt),h.sanitized=!0))),ht.appendChild(nt);e.options.sanitize&&g.length&&p(g,e.options.whiteList,e.options.sanitizeFn);o===!0?(ct=e.selectpicker.view.position0===0?0:e.selectpicker.current.data[e.selectpicker.view.position0-1].position,at=e.selectpicker.view.position1>f-1?0:e.selectpicker.current.data[f-1].position-e.selectpicker.current.data[e.selectpicker.view.position1-1].position,u.firstChild.style.marginTop=ct+"px",u.firstChild.style.marginBottom=at+"px"):(u.firstChild.style.marginTop=0,u.firstChild.style.marginBottom=0);u.firstChild.appendChild(ht);o===!0&&e.sizeInfo.hasScrollBar&&(it=u.firstChild.offsetWidth,t&&it<e.sizeInfo.menuInnerInnerWidth&&e.sizeInfo.totalMenuWidth>e.sizeInfo.selectWidth?u.firstChild.style.minWidth=e.sizeInfo.menuInnerInnerWidth+"px":it>e.sizeInfo.menuInnerInnerWidth&&(e.$menu[0].style.minWidth=0,rt=u.firstChild.offsetWidth,rt>e.sizeInfo.menuInnerInnerWidth&&(e.sizeInfo.menuInnerInnerWidth=rt,u.firstChild.style.minWidth=e.sizeInfo.menuInnerInnerWidth+"px"),e.$menu[0].style.minWidth=""))}e.prevActiveIndex=e.activeIndex;e.options.liveSearch?r&&t&&(c=0,e.selectpicker.view.canHighlight[c]||(c=1+e.selectpicker.view.canHighlight.slice(1).indexOf(!0)),pt=e.selectpicker.view.visibleElements[c],e.defocusItem(e.selectpicker.view.currentActive),e.activeIndex=(e.selectpicker.current.data[c]||{}).index,e.focusItem(pt)):e.$menuInner.trigger("focus")}var e=this,o=0,v=[],y,w,s,h,c,l;this.selectpicker.isSearching=r;this.selectpicker.current=r?this.selectpicker.search:this.selectpicker.main;this.setPositionData();u&&(f?o=this.$menuInner[0].scrollTop:e.multiple||(s=e.$element[0],h=(s.options[s.selectedIndex]||{}).liIndex,typeof h=="number"&&e.options.size!==!1&&(c=e.selectpicker.main.data[h],l=c&&c.position,l&&(o=l-(e.sizeInfo.menuInnerHeight+e.sizeInfo.liHeight)/2))));a(o,!0);this.$menuInner.off("scroll.createView").on("scroll.createView",function(n,t){e.noScroll||a(this.scrollTop,t);e.noScroll=!1});n(window).off("resize"+i+"."+this.selectId+".createView").on("resize"+i+"."+this.selectId+".createView",function(){var n=e.$newElement.hasClass(t.SHOW);n&&a(e.$menuInner[0].scrollTop)})},focusItem:function(n,t,i){if(n){t=t||this.selectpicker.main.data[this.activeIndex];var r=n.firstChild;r&&(r.setAttribute("aria-setsize",this.selectpicker.view.size),r.setAttribute("aria-posinset",t.posinset),i!==!0&&(this.focusedParent.setAttribute("aria-activedescendant",r.id),n.classList.add("active"),r.classList.add("active")))}},defocusItem:function(n){n&&(n.classList.remove("active"),n.firstChild&&n.firstChild.classList.remove("active"))},setPlaceholder:function(){var i=!1,f;if(this.options.title&&!this.multiple){this.selectpicker.view.titleOption||(this.selectpicker.view.titleOption=document.createElement("option"));i=!0;var t=this.$element[0],r=!1,u=!this.selectpicker.view.titleOption.parentNode;u&&(this.selectpicker.view.titleOption.className="bs-title-option",this.selectpicker.view.titleOption.value="",f=n(t.options[t.selectedIndex]),r=f.attr("selected")===undefined&&this.$element.data("selected")===undefined);(u||this.selectpicker.view.titleOption.index!==0)&&t.insertBefore(this.selectpicker.view.titleOption,t.firstChild);r&&(t.selectedIndex=0)}return i},buildData:function(){function f(t){var i=n[n.length-1];i&&i.type==="divider"&&(i.optID||t.optID)||(t=t||{},t.type="divider",n.push(t))}function o(t,i){if(i=i||{},i.divider=t.getAttribute("data-divider")==="true",i.divider)f({optID:i.optID});else{var u=n.length,e=t.style.cssText,o=e?v(e):"",r=(t.className||"")+(i.optgroupClass||"");i.optID&&(r="opt "+r);i.optionClass=r.trim();i.inlineStyle=o;i.text=t.textContent;i.content=t.getAttribute("data-content");i.tokens=t.getAttribute("data-tokens");i.subtext=t.getAttribute("data-subtext");i.icon=t.getAttribute("data-icon");t.liIndex=u;i.display=i.content||i.text;i.type="option";i.index=u;i.option=t;i.selected=!!t.selected;i.disabled=i.disabled||!!t.disabled;n.push(i)}}function h(i,r){var e=r[i],w=r[i-1],b=r[i+1],c=e.querySelectorAll("option"+u),s,l,y,h,a,p;if(c.length){for(s={display:v(e.label),subtext:e.getAttribute("data-subtext"),icon:e.getAttribute("data-icon"),type:"optgroup-label",optgroupClass:" "+(e.className||"")},t++,w&&f({optID:t}),s.optID=t,n.push(s),h=0,a=c.length;h<a;h++)p=c[h],h===0&&(l=n.length-1,y=l+a),o(p,{headerIndex:l,lastIndex:y,optID:s.optID,optgroupClass:s.optgroupClass,disabled:e.disabled});b&&f({optID:t})}}var u=':not([hidden]):not([data-hidden="true"])',n=[],t=0,i=this.setPlaceholder()?1:0,r,s,e;for(this.options.hideDisabled&&(u+=":not(:disabled)"),r=this.$element[0].querySelectorAll("select > *"+u),s=r.length;i<s;i++)e=r[i],e.tagName!=="OPTGROUP"?o(e,{}):h(i,r);this.selectpicker.main.data=this.selectpicker.current.data=n},buildList:function(){function c(r){var u,f=0;switch(r.type){case"divider":u=s.li(!1,t.DIVIDER,r.optID?r.optID+"div":undefined);break;case"option":u=s.li(s.a(s.text.call(n,r),r.optionClass,r.inlineStyle),"",r.optID);u.firstChild&&(u.firstChild.id=n.selectId+"-"+r.index);break;case"optgroup-label":u=s.li(s.label.call(n,r),"dropdown-header"+r.optgroupClass,r.optID)}i.push(u);r.display&&(f+=r.display.length);r.subtext&&(f+=r.subtext.length);r.icon&&(f+=1);f>e&&(e=f,n.selectpicker.view.widestOption=i[i.length-1])}var n=this,f=this.selectpicker.main.data,i=[],e=0,o,u,h;for((n.options.showTick||n.multiple)&&!r.checkMark.parentNode&&(r.checkMark.className=this.options.iconBase+" "+n.options.tickIcon+" check-mark",r.a.appendChild(r.checkMark)),o=f.length,u=0;u<o;u++)h=f[u],c(h);this.selectpicker.main.elements=this.selectpicker.current.elements=i},findLis:function(){return this.$menuInner.find(".inner > li")},render:function(){var f=this,k=this.$element[0],ft=this.setPlaceholder()&&k.selectedIndex===0,g=d(k,this.options.hideDisabled),t=g.length,e=this.$button[0],nt=e.querySelector(".filter-option-inner-inner"),et=document.createTextNode(this.options.multipleSeparator),n=r.fragment.cloneNode(!1),v,y,rt=!1,o,l,tt,ut,it,b;if(e.classList.toggle("bs-placeholder",f.multiple?!t:!a(k,g)),this.tabIndex(),this.options.selectedTextFormat==="static")n=s.text.call(this,{text:this.options.title},!0);else if(v=this.multiple&&this.options.selectedTextFormat.indexOf("count")!==-1&&t>1,v&&(y=this.options.selectedTextFormat.split(">"),v=y.length>1&&t>y[1]||y.length===1&&t>=2),v===!1){if(!ft){for(o=0;o<t;o++)if(o<50){var w=g[o],h=this.selectpicker.main.data[w.liIndex],c={};this.multiple&&o>0&&n.appendChild(et.cloneNode(!1));w.title?c.text=w.title:h&&(h.content&&f.options.showContent?(c.content=h.content.toString(),rt=!0):(f.options.showIcon&&(c.icon=h.icon),f.options.showSubtext&&!f.multiple&&h.subtext&&(c.subtext=" "+h.subtext),c.text=w.textContent.trim()));n.appendChild(s.text.call(this,c,!0))}else break;t>49&&n.appendChild(document.createTextNode("..."))}}else l=':not([hidden]):not([data-hidden="true"]):not([data-divider="true"])',this.options.hideDisabled&&(l+=":not(:disabled)"),tt=this.$element[0].querySelectorAll("select > option"+l+", optgroup"+l+" option"+l).length,ut=typeof this.options.countSelectedText=="function"?this.options.countSelectedText(t,tt):this.options.countSelectedText,n=s.text.call(this,{text:ut.replace("{0}",t.toString()).replace("{1}",tt.toString())},!0);this.options.title==undefined&&(this.options.title=this.$element.attr("title"));n.childNodes.length||(n=s.text.call(this,{text:typeof this.options.title!="undefined"?this.options.title:this.options.noneSelectedText},!0));e.title=n.textContent.replace(/<[^>]*>?/g,"").trim();this.options.sanitize&&rt&&p([n],f.options.whiteList,f.options.sanitizeFn);nt.innerHTML="";nt.appendChild(n);u.major<4&&this.$newElement[0].classList.contains("bs3-has-addon")&&(it=e.querySelector(".filter-expand"),b=nt.cloneNode(!0),b.className="filter-expand",it?e.replaceChild(b,it):e.appendChild(b));this.$element.trigger("rendered"+i)},setStyle:function(n,t){var i=this.$button[0],r=this.$newElement[0],e=this.options.style.trim(),f;this.$element.attr("class")&&this.$newElement.addClass(this.$element.attr("class").replace(/selectpicker|mobile-device|bs-select-hidden|validate\[.*\]/gi,""));u.major<4&&(r.classList.add("bs3"),r.parentNode.classList.contains("input-group")&&(r.previousElementSibling||r.nextElementSibling)&&(r.previousElementSibling||r.nextElementSibling).classList.contains("input-group-addon")&&r.classList.add("bs3-has-addon"));f=n?n.trim():e;t=="add"?f&&i.classList.add.apply(i.classList,f.split(" ")):t=="remove"?f&&i.classList.remove.apply(i.classList,f.split(" ")):(e&&i.classList.remove.apply(i.classList,e.split(" ")),f&&i.classList.add.apply(i.classList,f.split(" ")))},liHeight:function(i){var nt;if(i||this.options.size!==!1&&!Object.keys(this.sizeInfo).length){var c=document.createElement("div"),f=document.createElement("div"),a=document.createElement("div"),s=document.createElement("ul"),k=document.createElement("li"),l=document.createElement("li"),d=document.createElement("li"),g=document.createElement("a"),v=document.createElement("span"),y=this.options.header&&this.$menu.find("."+t.POPOVERHEADER).length>0?this.$menu.find("."+t.POPOVERHEADER)[0].cloneNode(!0):null,h=this.options.liveSearch?document.createElement("div"):null,p=this.options.actionsBox&&this.multiple&&this.$menu.find(".bs-actionsbox").length>0?this.$menu.find(".bs-actionsbox")[0].cloneNode(!0):null,w=this.options.doneButton&&this.multiple&&this.$menu.find(".bs-donebutton").length>0?this.$menu.find(".bs-donebutton")[0].cloneNode(!0):null,it=this.$element.find("option")[0];this.sizeInfo.selectWidth=this.$newElement[0].offsetWidth;v.className="text";g.className="dropdown-item "+(it?it.className:"");c.className=this.$menu[0].parentNode.className+" "+t.SHOW;c.style.width=0;this.options.width==="auto"&&(f.style.minWidth=0);f.className=t.MENU+" "+t.SHOW;a.className="inner "+t.SHOW;s.className=t.MENU+" inner "+(u.major==="4"?t.SHOW:"");k.className=t.DIVIDER;l.className="dropdown-header";v.appendChild(document.createTextNode("​"));g.appendChild(v);d.appendChild(g);l.appendChild(v.cloneNode(!0));this.selectpicker.view.widestOption&&s.appendChild(this.selectpicker.view.widestOption.cloneNode(!0));s.appendChild(d);s.appendChild(k);s.appendChild(l);y&&f.appendChild(y);h&&(nt=document.createElement("input"),h.className="bs-searchbox",nt.className="form-control",h.appendChild(nt),f.appendChild(h));p&&f.appendChild(p);a.appendChild(s);f.appendChild(a);w&&f.appendChild(w);c.appendChild(f);document.body.appendChild(c);var ut=d.offsetHeight,ft=l?l.offsetHeight:0,et=y?y.offsetHeight:0,ot=h?h.offsetHeight:0,st=p?p.offsetHeight:0,ht=w?w.offsetHeight:0,ct=n(k).outerHeight(!0),r=window.getComputedStyle?window.getComputedStyle(f):!1,tt=f.offsetWidth,e=r?null:n(f),b={vert:o(r?r.paddingTop:e.css("paddingTop"))+o(r?r.paddingBottom:e.css("paddingBottom"))+o(r?r.borderTopWidth:e.css("borderTopWidth"))+o(r?r.borderBottomWidth:e.css("borderBottomWidth")),horiz:o(r?r.paddingLeft:e.css("paddingLeft"))+o(r?r.paddingRight:e.css("paddingRight"))+o(r?r.borderLeftWidth:e.css("borderLeftWidth"))+o(r?r.borderRightWidth:e.css("borderRightWidth"))},lt={vert:b.vert+o(r?r.marginTop:e.css("marginTop"))+o(r?r.marginBottom:e.css("marginBottom"))+2,horiz:b.horiz+o(r?r.marginLeft:e.css("marginLeft"))+o(r?r.marginRight:e.css("marginRight"))+2},rt;a.style.overflowY="scroll";rt=f.offsetWidth-tt;document.body.removeChild(c);this.sizeInfo.liHeight=ut;this.sizeInfo.dropdownHeaderHeight=ft;this.sizeInfo.headerHeight=et;this.sizeInfo.searchHeight=ot;this.sizeInfo.actionsHeight=st;this.sizeInfo.doneButtonHeight=ht;this.sizeInfo.dividerHeight=ct;this.sizeInfo.menuPadding=b;this.sizeInfo.menuExtras=lt;this.sizeInfo.menuWidth=tt;this.sizeInfo.menuInnerInnerWidth=tt-b.horiz;this.sizeInfo.totalMenuWidth=this.sizeInfo.menuWidth;this.sizeInfo.scrollBarWidth=rt;this.sizeInfo.selectHeight=this.$newElement[0].offsetHeight;this.setPositionData()}},getSelectPosition:function(){var u=this,f=n(window),e=u.$newElement.offset(),i=n(u.options.container),t,r;u.options.container&&i.length&&!i.is("body")?(t=i.offset(),t.top+=parseInt(i.css("borderTopWidth")),t.left+=parseInt(i.css("borderLeftWidth"))):t={top:0,left:0};r=u.options.windowPadding;this.sizeInfo.selectOffsetTop=e.top-t.top-f.scrollTop();this.sizeInfo.selectOffsetBot=f.height()-this.sizeInfo.selectOffsetTop-this.sizeInfo.selectHeight-t.top-r[2];this.sizeInfo.selectOffsetLeft=e.left-t.left-f.scrollLeft();this.sizeInfo.selectOffsetRight=f.width()-this.sizeInfo.selectOffsetLeft-this.sizeInfo.selectWidth-t.left-r[1];this.sizeInfo.selectOffsetTop-=r[0];this.sizeInfo.selectOffsetLeft-=r[3]},setMenuSize:function(){var f;this.getSelectPosition();var b=this.sizeInfo.selectWidth,y=this.sizeInfo.liHeight,e=this.sizeInfo.headerHeight,o=this.sizeInfo.searchHeight,s=this.sizeInfo.actionsHeight,h=this.sizeInfo.doneButtonHeight,k=this.sizeInfo.dividerHeight,i=this.sizeInfo.menuPadding,r,n,p=0,c,l,a,v,w,u;if(this.options.dropupAuto&&(w=y*this.selectpicker.current.elements.length+i.vert,u=this.sizeInfo.selectOffsetTop-this.sizeInfo.selectOffsetBot>this.sizeInfo.menuExtras.vert&&w+this.sizeInfo.menuExtras.vert+50>this.sizeInfo.selectOffsetBot,this.selectpicker.isSearching===!0&&(u=this.selectpicker.dropup),this.$newElement.toggleClass(t.DROPUP,u),this.selectpicker.dropup=u),this.options.size==="auto")l=this.selectpicker.current.elements.length>3?this.sizeInfo.liHeight*3+this.sizeInfo.menuExtras.vert-2:0,n=this.sizeInfo.selectOffsetBot-this.sizeInfo.menuExtras.vert,c=l+e+o+s+h,v=Math.max(l-i.vert,0),this.$newElement.hasClass(t.DROPUP)&&(n=this.sizeInfo.selectOffsetTop-this.sizeInfo.menuExtras.vert),a=n,r=n-e-o-s-h-i.vert;else if(this.options.size&&this.options.size!="auto"&&this.selectpicker.current.elements.length>this.options.size){for(f=0;f<this.options.size;f++)this.selectpicker.current.data[f].type==="divider"&&p++;n=y*this.options.size+p*k+i.vert;r=n-i.vert;a=n+e+o+s+h;c=v=""}this.$menu.css({"max-height":a+"px",overflow:"hidden","min-height":c+"px"});this.$menuInner.css({"max-height":r+"px","overflow-y":"auto","min-height":v+"px"});this.sizeInfo.menuInnerHeight=Math.max(r,1);this.selectpicker.current.data.length&&this.selectpicker.current.data[this.selectpicker.current.data.length-1].position>this.sizeInfo.menuInnerHeight&&(this.sizeInfo.hasScrollBar=!0,this.sizeInfo.totalMenuWidth=this.sizeInfo.menuWidth+this.sizeInfo.scrollBarWidth);this.options.dropdownAlignRight==="auto"&&this.$menu.toggleClass(t.MENURIGHT,this.sizeInfo.selectOffsetLeft>this.sizeInfo.selectOffsetRight&&this.sizeInfo.selectOffsetRight<this.sizeInfo.totalMenuWidth-b);this.dropdown&&this.dropdown._popper&&this.dropdown._popper.update()},setSize:function(t){if(this.liHeight(t),this.options.header&&this.$menu.css("padding-top",0),this.options.size!==!1){var r=this,u=n(window);if(this.setMenuSize(),this.options.liveSearch)this.$searchbox.off("input.setMenuSize propertychange.setMenuSize").on("input.setMenuSize propertychange.setMenuSize",function(){return r.setMenuSize()});if(this.options.size==="auto")u.off("resize"+i+"."+this.selectId+".setMenuSize scroll"+i+"."+this.selectId+".setMenuSize").on("resize"+i+"."+this.selectId+".setMenuSize scroll"+i+"."+this.selectId+".setMenuSize",function(){return r.setMenuSize()});else this.options.size&&this.options.size!="auto"&&this.selectpicker.current.elements.length>this.options.size&&u.off("resize"+i+"."+this.selectId+".setMenuSize scroll"+i+"."+this.selectId+".setMenuSize")}this.createView(!1,!0,t)},setWidth:function(){var n=this;this.options.width==="auto"?requestAnimationFrame(function(){n.$menu.css("min-width","0");n.$element.on("loaded"+i,function(){n.liHeight();n.setMenuSize();var t=n.$newElement.clone().appendTo("body"),i=t.css("width","auto").children("button").outerWidth();t.remove();n.sizeInfo.selectWidth=Math.max(n.sizeInfo.totalMenuWidth,i);n.$newElement.css("width",n.sizeInfo.selectWidth+"px")})}):this.options.width==="fit"?(this.$menu.css("min-width",""),this.$newElement.css("width","").addClass("fit-width")):this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width",this.options.width)):(this.$menu.css("min-width",""),this.$newElement.css("width",""));this.$newElement.hasClass("fit-width")&&this.options.width!=="fit"&&this.$newElement[0].classList.remove("fit-width")},selectPosition:function(){this.$bsContainer=n('<div class="bs-container" />');var r=this,f=n(this.options.container),o,e,s,h=function(i){var h={},c=r.options.display||(n.fn.dropdown.Constructor.Default?n.fn.dropdown.Constructor.Default.display:!1);r.$bsContainer.addClass(i.attr("class").replace(/form-control|fit-width/gi,"")).toggleClass(t.DROPUP,i.hasClass(t.DROPUP));o=i.offset();f.is("body")?e={top:0,left:0}:(e=f.offset(),e.top+=parseInt(f.css("borderTopWidth"))-f.scrollTop(),e.left+=parseInt(f.css("borderLeftWidth"))-f.scrollLeft());s=i.hasClass(t.DROPUP)?0:i[0].offsetHeight;(u.major<4||c==="static")&&(h.top=o.top-e.top+s,h.left=o.left-e.left);h.width=i[0].offsetWidth;r.$bsContainer.css(h)};this.$button.on("click.bs.dropdown.data-api",function(){r.isDisabled()||(h(r.$newElement),r.$bsContainer.appendTo(r.options.container).toggleClass(t.SHOW,!r.$button.hasClass(t.SHOW)).append(r.$menu))});n(window).off("resize"+i+"."+this.selectId+" scroll"+i+"."+this.selectId).on("resize"+i+"."+this.selectId+" scroll"+i+"."+this.selectId,function(){var n=r.$newElement.hasClass(t.SHOW);n&&h(r.$newElement)});this.$element.on("hide"+i,function(){r.$menu.data("height",r.$menu.height());r.$bsContainer.detach()})},setOptionStatus:function(n){var t=this,r,i,u;if(t.noScroll=!1,t.selectpicker.view.visibleElements&&t.selectpicker.view.visibleElements.length)for(r=0;r<t.selectpicker.view.visibleElements.length;r++)i=t.selectpicker.current.data[r+t.selectpicker.view.position0],u=i.option,u&&(n!==!0&&t.setDisabled(i.index,i.disabled),t.setSelected(i.index,u.selected))},setSelected:function(n,t){var r=this.selectpicker.main.elements[n],u=this.selectpicker.main.data[n],f=this.activeIndex!==undefined,s=this.activeIndex===n,e,i,o=s||t&&!this.multiple&&!f;u.selected=t;i=r.firstChild;t&&(this.selectedIndex=n);r.classList.toggle("selected",t);o?(this.focusItem(r,u),this.selectpicker.view.currentActive=r,this.activeIndex=n):this.defocusItem(r);i&&(i.classList.toggle("selected",t),t?i.setAttribute("aria-selected",!0):this.multiple?i.setAttribute("aria-selected",!1):i.removeAttribute("aria-selected"));o||f||!t||this.prevActiveIndex===undefined||(e=this.selectpicker.main.elements[this.prevActiveIndex],this.defocusItem(e))},setDisabled:function(n,i){var f=this.selectpicker.main.elements[n],r;this.selectpicker.main.data[n].disabled=i;r=f.firstChild;f.classList.toggle(t.DISABLED,i);r&&(u.major==="4"&&r.classList.toggle(t.DISABLED,i),i?(r.setAttribute("aria-disabled",i),r.setAttribute("tabindex",-1)):(r.removeAttribute("aria-disabled"),r.setAttribute("tabindex",0)))},isDisabled:function(){return this.$element[0].disabled},checkDisabled:function(){this.isDisabled()?(this.$newElement[0].classList.add(t.DISABLED),this.$button.addClass(t.DISABLED).attr("tabindex",-1).attr("aria-disabled",!0)):(this.$button[0].classList.contains(t.DISABLED)&&(this.$newElement[0].classList.remove(t.DISABLED),this.$button.removeClass(t.DISABLED).attr("aria-disabled",!1)),this.$button.attr("tabindex")!=-1||this.$element.data("tabindex")||this.$button.removeAttr("tabindex"))},tabIndex:function(){this.$element.data("tabindex")!==this.$element.attr("tabindex")&&this.$element.attr("tabindex")!==-98&&this.$element.attr("tabindex")!=="-98"&&(this.$element.data("tabindex",this.$element.attr("tabindex")),this.$button.attr("tabindex",this.$element.data("tabindex")));this.$element.attr("tabindex",-98)},clickListener:function(){function e(){r.options.liveSearch?r.$searchbox.trigger("focus"):r.$menuInner.trigger("focus")}function o(){r.dropdown&&r.dropdown._popper&&r.dropdown._popper.state.isCreated?e():requestAnimationFrame(o)}var r=this,f=n(document);f.data("spaceSelect",!1);this.$button.on("keyup",function(n){/(32)/.test(n.keyCode.toString(10))&&f.data("spaceSelect")&&(n.preventDefault(),f.data("spaceSelect",!1))});this.$newElement.on("show.bs.dropdown",function(){u.major>3&&!r.dropdown&&(r.dropdown=r.$button.data("bs.dropdown"),r.dropdown._menu=r.$menu[0])});this.$button.on("click.bs.dropdown.data-api",function(){r.$newElement.hasClass(t.SHOW)||r.setSize()});this.$element.on("shown"+i,function(){r.$menuInner[0].scrollTop!==r.selectpicker.view.scrollTop&&(r.$menuInner[0].scrollTop=r.selectpicker.view.scrollTop);u.major>3?requestAnimationFrame(o):e()});this.$menuInner.on("mouseenter","li a",function(){var n=this.parentElement,t=r.isVirtual()?r.selectpicker.view.position0:0,i=Array.prototype.indexOf.call(n.parentElement.children,n),u=r.selectpicker.current.data[i+t];r.focusItem(n,u,!0)});this.$menuInner.on("click","li a",function(u,f){var w=n(this),c=r.$element[0],lt=r.isVirtual()?r.selectpicker.view.position0:0,ft=r.selectpicker.current.data[w.parent().index()+lt],l=ft.index,at=a(c),et=c.selectedIndex,ot=c.options[et],b=!0,g,nt,p,tt;if(r.multiple&&r.options.maxOptions!==1&&u.stopPropagation(),u.preventDefault(),!r.isDisabled()&&!w.parent().hasClass(t.DISABLED)){var s=ft.option,st=n(s),ht=s.selected,k=st.parent("optgroup"),ct=k.find("option"),e=r.options.maxOptions,o=k.data("maxOptions")||!1;if(l===r.activeIndex&&(f=!0),f||(r.prevActiveIndex=r.activeIndex,r.activeIndex=undefined),r.multiple){if(s.selected=!ht,r.setSelected(l,!ht),w.trigger("blur"),(e!==!1||o!==!1)&&(g=e<d(c).length,nt=o<k.find("option:selected").length,e&&g||o&&nt))if(e&&e==1)c.selectedIndex=-1,s.selected=!0,r.setOptionStatus(!0);else if(o&&o==1){for(p=0;p<ct.length;p++)tt=ct[p],tt.selected=!1,r.setSelected(tt.liIndex,!1);s.selected=!0;r.setSelected(l,!0)}else{var it=typeof r.options.maxOptionsText=="string"?[r.options.maxOptionsText,r.options.maxOptionsText]:r.options.maxOptionsText,v=typeof it=="function"?it(e,o):it,rt=v[0].replace("{n}",e),ut=v[1].replace("{n}",o),y=n('<div class="notify"><\/div>');v[2]&&(rt=rt.replace("{var}",v[2][e>1?0:1]),ut=ut.replace("{var}",v[2][o>1?0:1]));s.selected=!1;r.$menu.append(y);e&&g&&(y.append(n("<div>"+rt+"<\/div>")),b=!1,r.$element.trigger("maxReached"+i));o&&nt&&(y.append(n("<div>"+ut+"<\/div>")),b=!1,r.$element.trigger("maxReachedGrp"+i));setTimeout(function(){r.setSelected(l,!1)},10);y[0].classList.add("fadeOut");setTimeout(function(){y.remove()},1050)}}else ot&&(ot.selected=!1),s.selected=!0,r.setSelected(l,!0);!r.multiple||r.multiple&&r.options.maxOptions===1?r.$button.trigger("focus"):r.options.liveSearch&&r.$searchbox.trigger("focus");b&&(r.multiple||et!==c.selectedIndex)&&(h=[s.index,st.prop("selected"),at],r.$element.triggerNative("change"))}});this.$menu.on("click","li."+t.DISABLED+" a, ."+t.POPOVERHEADER+", ."+t.POPOVERHEADER+" :not(.close)",function(t){t.currentTarget==this&&(t.preventDefault(),t.stopPropagation(),r.options.liveSearch&&!n(t.target).hasClass("close")?r.$searchbox.trigger("focus"):r.$button.trigger("focus"))});this.$menuInner.on("click",".divider, .dropdown-header",function(n){n.preventDefault();n.stopPropagation();r.options.liveSearch?r.$searchbox.trigger("focus"):r.$button.trigger("focus")});this.$menu.on("click","."+t.POPOVERHEADER+" .close",function(){r.$button.trigger("click")});this.$searchbox.on("click",function(n){n.stopPropagation()});this.$menu.on("click",".actions-btn",function(t){r.options.liveSearch?r.$searchbox.trigger("focus"):r.$button.trigger("focus");t.preventDefault();t.stopPropagation();n(this).hasClass("bs-select-all")?r.selectAll():r.deselectAll()});this.$element.on("change"+i,function(){r.render();r.$element.trigger("changed"+i,h);h=null}).on("focus"+i,function(){r.options.mobile||r.$button.trigger("focus")})},liveSearchListener:function(){var n=this,t=document.createElement("li");this.$button.on("click.bs.dropdown.data-api",function(){!n.$searchbox.val()||n.$searchbox.val("")});this.$searchbox.on("click.bs.dropdown.data-api focus.bs.dropdown.data-api touchend.bs.dropdown.data-api",function(n){n.stopPropagation()});this.$searchbox.on("input propertychange",function(){var e=n.$searchbox.val(),r,i,h;if(n.selectpicker.search.elements=[],n.selectpicker.search.data=[],e){var i,o=[],s=e.toUpperCase(),u={},f=[],y=n._searchStyle(),c=n.options.liveSearchNormalize;for(c&&(s=tt(s)),i=0;i<n.selectpicker.main.data.length;i++)r=n.selectpicker.main.data[i],u[i]||(u[i]=nt(r,s,y,c)),u[i]&&r.headerIndex!==undefined&&f.indexOf(r.headerIndex)===-1&&(r.headerIndex>0&&(u[r.headerIndex-1]=!0,f.push(r.headerIndex-1)),u[r.headerIndex]=!0,f.push(r.headerIndex),u[r.lastIndex+1]=!0),u[i]&&r.type!=="optgroup-label"&&f.push(i);for(i=0,h=f.length;i<h;i++){var l=f[i],p=f[i-1],r=n.selectpicker.main.data[l],a=n.selectpicker.main.data[p];(r.type!=="divider"||r.type==="divider"&&a&&a.type!=="divider"&&h-1!==i)&&(n.selectpicker.search.data.push(r),o.push(n.selectpicker.main.elements[l]))}n.activeIndex=undefined;n.noScroll=!0;n.$menuInner.scrollTop(0);n.selectpicker.search.elements=o;n.createView(!0);o.length||(t.className="no-results",t.innerHTML=n.options.noneResultsText.replace("{0}",'"'+v(e)+'"'),n.$menuInner[0].firstChild.appendChild(t))}else n.$menuInner.scrollTop(0),n.createView(!1)})},_searchStyle:function(){return this.options.liveSearchStyle||"contains"},val:function(n){var r=this.$element[0],f,u;return typeof n!="undefined"?(f=a(r),h=[null,null,f],this.$element.val(n).trigger("changed"+i,h),this.$newElement.hasClass(t.SHOW)&&(this.multiple?this.setOptionStatus(!0):(u=(r.options[r.selectedIndex]||{}).liIndex,typeof u=="number"&&(this.setSelected(this.selectedIndex,!1),this.setSelected(u,!0)))),this.render(),h=null,this.$element):this.$element.val()},changeAll:function(n){var t,u;if(this.multiple){typeof n=="undefined"&&(n=!0);var i=this.$element[0],f=0,e=0,s=a(i);i.classList.add("bs-select-hidden");for(var r=0,o=this.selectpicker.current.data,c=o.length;r<c;r++)t=o[r],u=t.option,u&&!t.disabled&&t.type!=="divider"&&(t.selected&&f++,u.selected=n,n===!0&&e++);(i.classList.remove("bs-select-hidden"),f!==e)&&(this.setOptionStatus(),h=[null,null,s],this.$element.triggerNative("change"))}},selectAll:function(){return this.changeAll(!0)},deselectAll:function(){return this.changeAll(!1)},toggle:function(n){n=n||window.event;n&&n.stopPropagation();this.$button.trigger("click.bs.dropdown.data-api")},keydown:function(i){var l=n(this),ut=l.hasClass("dropdown-toggle"),ot=ut?l.closest(".dropdown"):l.closest(rt.MENU),r=ot.data("this"),w=r.findLis(),u,k,f,o,h,y=!1,g=i.which===e.TAB&&!ut&&!r.options.selectOnTab,ft=kt.test(i.which)||g,d=r.$menuInner[0].scrollTop,st=r.isVirtual(),s=st===!0?r.selectpicker.view.position0:0,a,tt,v,p,b,it,et,c;if(!(i.which>=112)||!(i.which<=123)){if(k=r.$newElement.hasClass(t.SHOW),!k&&(ft||i.which>=48&&i.which<=57||i.which>=96&&i.which<=105||i.which>=65&&i.which<=90)&&(r.$button.trigger("click.bs.dropdown.data-api"),r.options.liveSearch)){r.$searchbox.trigger("focus");return}if(i.which===e.ESCAPE&&k&&(i.preventDefault(),r.$button.trigger("click.bs.dropdown.data-api").trigger("focus")),ft){if(!w.length)return;f=r.selectpicker.main.elements[r.activeIndex];u=f?Array.prototype.indexOf.call(f.parentElement.children,f):-1;u!==-1&&r.defocusItem(f);i.which===e.ARROW_UP?(u!==-1&&u--,u+s<0&&(u+=w.length),r.selectpicker.view.canHighlight[u+s]||(u=r.selectpicker.view.canHighlight.slice(0,u+s).lastIndexOf(!0)-s,u===-1&&(u=w.length-1))):(i.which===e.ARROW_DOWN||g)&&(u++,u+s>=r.selectpicker.view.canHighlight.length&&(u=0),r.selectpicker.view.canHighlight[u+s]||(u=u+1+r.selectpicker.view.canHighlight.slice(u+s+1).indexOf(!0)));i.preventDefault();a=s+u;i.which===e.ARROW_UP?s===0&&u===w.length-1?(r.$menuInner[0].scrollTop=r.$menuInner[0].scrollHeight,a=r.selectpicker.current.elements.length-1):(o=r.selectpicker.current.data[a],h=o.position-o.height,y=h<d):(i.which===e.ARROW_DOWN||g)&&(u===0?(r.$menuInner[0].scrollTop=0,a=0):(o=r.selectpicker.current.data[a],h=o.position-r.sizeInfo.menuInnerHeight,y=h>d));f=r.selectpicker.current.elements[a];r.activeIndex=r.selectpicker.current.data[a].index;r.focusItem(f);r.selectpicker.view.currentActive=f;y&&(r.$menuInner[0].scrollTop=h);r.options.liveSearch?r.$searchbox.trigger("focus"):l.trigger("focus")}else if(!l.is("input")&&!dt.test(i.which)||i.which===e.SPACE&&r.selectpicker.keydown.keyHistory){for(v=[],i.preventDefault(),r.selectpicker.keydown.keyHistory+=bt[i.which],r.selectpicker.keydown.resetKeyHistory.cancel&&clearTimeout(r.selectpicker.keydown.resetKeyHistory.cancel),r.selectpicker.keydown.resetKeyHistory.cancel=r.selectpicker.keydown.resetKeyHistory.start(),p=r.selectpicker.keydown.keyHistory,/^(.)\1+$/.test(p)&&(p=p.charAt(0)),b=0;b<r.selectpicker.current.data.length;b++)it=r.selectpicker.current.data[b],et=nt(it,p,"startsWith",!0),et&&r.selectpicker.view.canHighlight[b]&&v.push(it.index);v.length&&(c=0,w.removeClass("active").find("a").removeClass("active"),p.length===1&&(c=v.indexOf(r.activeIndex),c===-1||c===v.length-1?c=0:c++),tt=v[c],o=r.selectpicker.main.data[tt],d-o.position>0?(h=o.position-o.height,y=!0):(h=o.position-r.sizeInfo.menuInnerHeight,y=o.position>d+r.sizeInfo.menuInnerHeight),f=r.selectpicker.main.elements[tt],r.activeIndex=v[c],r.focusItem(f),f&&f.firstChild.focus(),y&&(r.$menuInner[0].scrollTop=h),l.trigger("focus"))}k&&(i.which===e.SPACE&&!r.selectpicker.keydown.keyHistory||i.which===e.ENTER||i.which===e.TAB&&r.options.selectOnTab)&&(i.which!==e.SPACE&&i.preventDefault(),r.options.liveSearch&&i.which===e.SPACE||(r.$menuInner.find(".active a").trigger("click",!0),l.trigger("focus"),r.options.liveSearch||(i.preventDefault(),n(document).data("spaceSelect",!0))))}},mobile:function(){this.$element[0].classList.add("mobile-device")},refresh:function(){var t=n.extend({},this.options,this.$element.data());this.options=t;this.checkDisabled();this.setStyle();this.render();this.buildData();this.buildList();this.setWidth();this.setSize(!0);this.$element.trigger("refreshed"+i)},hide:function(){this.$newElement.hide()},show:function(){this.$newElement.show()},remove:function(){this.$newElement.remove();this.$element.remove()},destroy:function(){this.$newElement.before(this.$element).remove();this.$bsContainer?this.$bsContainer.remove():this.$menu.remove();this.$element.off(i).removeData("selectpicker").removeClass("bs-select-hidden selectpicker");n(window).off(i+"."+this.selectId)}};ft=n.fn.selectpicker;n.fn.selectpicker=ut;n.fn.selectpicker.Constructor=f;n.fn.selectpicker.noConflict=function(){return n.fn.selectpicker=ft,this};y=n.fn.dropdown.Constructor._dataApiKeydownHandler||n.fn.dropdown.Constructor.prototype.keydown;n(document).off("keydown.bs.dropdown.data-api").on("keydown.bs.dropdown.data-api",':not(.bootstrap-select) > [data-toggle="dropdown"]',y).on("keydown.bs.dropdown.data-api",":not(.bootstrap-select) > .dropdown-menu",y).on("keydown"+i,'.bootstrap-select [data-toggle="dropdown"], .bootstrap-select [role="listbox"], .bootstrap-select .bs-searchbox input',f.prototype.keydown).on("focusin.modal",'.bootstrap-select [data-toggle="dropdown"], .bootstrap-select [role="listbox"], .bootstrap-select .bs-searchbox input',function(n){n.stopPropagation()});n(window).on("load"+i+".data-api",function(){n(".selectpicker").each(function(){var t=n(this);ut.call(t,t.data())})})})(n)}),function(n,t){var i,g,nt,tt,it,r,h,v,c,rt,y,f,u,p,e,l,w,b,ut,k,o,a,d,s;i=function(n){return new i.prototype.init(n)};typeof require!="undefined"&&typeof exports!="undefined"&&typeof module!="undefined"?module.exports=i:n.Globalize=i;i.cultures={};i.prototype={constructor:i,init:function(n){return this.cultures=i.cultures,this.cultureSelector=n,this}};i.prototype.init.prototype=i.prototype;i.cultures["default"]={name:"en",englishName:"English",nativeName:"English",isRTL:!1,language:"en",numberFormat:{pattern:["-n"],decimals:2,",":",",".":".",groupSizes:[3],"+":"+","-":"-",NaN:"NaN",negativeInfinity:"-Infinity",positiveInfinity:"Infinity",percent:{pattern:["-n %","n %"],decimals:2,groupSizes:[3],",":",",".":".",symbol:"%"},currency:{pattern:["($n)","$n"],decimals:2,groupSizes:[3],",":",",".":".",symbol:"$"}},calendars:{standard:{name:"Gregorian_USEnglish","/":"/",":":":",firstDay:0,days:{names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],namesAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],namesShort:["Su","Mo","Tu","We","Th","Fr","Sa"]},months:{names:["January","February","March","April","May","June","July","August","September","October","November","December",""],namesAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""]},AM:["AM","am","AM"],PM:["PM","pm","PM"],eras:[{name:"A.D.",start:null,offset:0}],twoDigitYearMax:2029,patterns:{d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",t:"h:mm tt",T:"h:mm:ss tt",f:"dddd, MMMM dd, yyyy h:mm tt",F:"dddd, MMMM dd, yyyy h:mm:ss tt",M:"MMMM dd",Y:"yyyy MMMM",S:"yyyy'-'MM'-'dd'T'HH':'mm':'ss"}}},messages:{}};i.cultures["default"].calendar=i.cultures["default"].calendars.standard;i.cultures.en=i.cultures["default"];i.cultureSelector="en";g=/^0x[a-f0-9]+$/i;nt=/^[+\-]?infinity$/i;tt=/^[+\-]?\d*\.?\d*(e[+\-]?\d+)?$/;it=/^\s+|\s+$/g;r=function(n,t){if(n.indexOf)return n.indexOf(t);for(var i=0,r=n.length;i<r;i++)if(n[i]===t)return i;return-1};h=function(n,t){return n.substr(n.length-t.length)===t};v=function(){var e,u,r,i,o,s,n=arguments[0]||{},f=1,l=arguments.length,h=!1;for(typeof n=="boolean"&&(h=n,n=arguments[1]||{},f=2),typeof n=="object"||rt(n)||(n={});f<l;f++)if((e=arguments[f])!=null)for(u in e)(r=n[u],i=e[u],n!==i)&&(h&&i&&(y(i)||(o=c(i)))?(o?(o=!1,s=r&&c(r)?r:[]):s=r&&y(r)?r:{},n[u]=v(h,s,i)):i!==t&&(n[u]=i));return n};c=Array.isArray||function(n){return Object.prototype.toString.call(n)==="[object Array]"};rt=function(n){return Object.prototype.toString.call(n)==="[object Function]"};y=function(n){return Object.prototype.toString.call(n)==="[object Object]"};f=function(n,t){return n.indexOf(t)===0};u=function(n){return(n+"").replace(it,"")};p=function(n){return isNaN(n)?NaN:Math[n<0?"ceil":"floor"](n)};e=function(n,t,i){for(var r=n.length;r<t;r+=1)n=i?"0"+n:n+"0";return n};l=function(n,t){for(var u,f=0,i=!1,r=0,e=n.length;r<e;r++){u=n.charAt(r);switch(u){case"'":i?t.push("'"):f++;i=!1;break;case"\\":i&&t.push("\\");i=!i;break;default:t.push(u);i=!1}}return f};w=function(n,t){t=t||"F";var i,u=n.patterns,r=t.length;if(r===1){if(i=u[t],!i)throw"Invalid date format string '"+t+"'.";t=i}else r===2&&t.charAt(0)==="%"&&(t=t.charAt(1));return t};b=function(n,t,i){function e(n,t){var i,r=n+"";return t>1&&r.length<t?(i=st[t-2]+r,i.substr(i.length-t,t)):r}function ct(){return c||ut?c:(c=ht.test(t),ut=!0,c)}function it(n,t){if(v)return v[t];switch(t){case 0:return n.getFullYear();case 1:return n.getMonth();case 2:return n.getDate();default:throw"Invalid part value "+t;}}var u=i.calendar,d=u.convert,r,g,rt,nt,tt,p,f,ot,h;if(!t||!t.length||t==="i")return i&&i.name.length?d?r=b(n,u.patterns.F,i):(g=new Date(n.getTime()),rt=o(n,u.eras),g.setFullYear(a(n,u,rt)),r=g.toLocaleString()):r=n.toString(),r;nt=u.eras;tt=t==="s";t=w(u,t);r=[];var s,st=["0","00","000"],c,ut,ht=/([^d]|^)(d|dd)([^d]|$)/g,ft=0,et=k(),v;for(!tt&&d&&(v=d.fromGregorian(n));;){var lt=et.lastIndex,y=et.exec(t),at=t.slice(lt,y?y.index:t.length);if(ft+=l(at,r),!y)break;if(ft%2){r.push(y[0]);continue}p=y[0];f=p.length;switch(p){case"ddd":case"dddd":ot=f===3?u.days.namesAbbr:u.days.names;r.push(ot[n.getDay()]);break;case"d":case"dd":c=!0;r.push(e(it(n,2),f));break;case"MMM":case"MMMM":h=it(n,1);r.push(u.monthsGenitive&&ct()?u.monthsGenitive[f===3?"namesAbbr":"names"][h]:u.months[f===3?"namesAbbr":"names"][h]);break;case"M":case"MM":r.push(e(it(n,1)+1,f));break;case"y":case"yy":case"yyyy":h=v?v[0]:a(n,u,o(n,nt),tt);f<4&&(h=h%100);r.push(e(h,f));break;case"h":case"hh":s=n.getHours()%12;s===0&&(s=12);r.push(e(s,f));break;case"H":case"HH":r.push(e(n.getHours(),f));break;case"m":case"mm":r.push(e(n.getMinutes(),f));break;case"s":case"ss":r.push(e(n.getSeconds(),f));break;case"t":case"tt":h=n.getHours()<12?u.AM?u.AM[0]:" ":u.PM?u.PM[0]:" ";r.push(f===1?h.charAt(0):h);break;case"f":case"ff":case"fff":r.push(e(n.getMilliseconds(),3).substr(0,f));break;case"z":case"zz":s=n.getTimezoneOffset()/60;r.push((s<=0?"+":"-")+e(Math.floor(Math.abs(s)),f));break;case"zzz":s=n.getTimezoneOffset()/60;r.push((s<=0?"+":"-")+e(Math.floor(Math.abs(s)),2)+":"+e(Math.abs(n.getTimezoneOffset()%60),2));break;case"g":case"gg":u.eras&&r.push(u.eras[o(n,nt)].name);break;case"/":r.push(u["/"]);break;default:throw"Invalid date format pattern '"+p+"'.";}}return r.join("")},function(){var n;n=function(n,t,i){var l=i.groupSizes,c=l[0],a=1,p=Math.pow(10,t),v=Math.round(n*p)/p;isFinite(v)||(v=n);n=v;var r=n+"",u="",o=r.split(/e/i),f=o.length>1?parseInt(o[1],10):0;r=o[0];o=r.split(".");r=o[0];u=o.length>1?o[1]:"";f>0?(u=e(u,f,!1),r+=u.slice(0,f),u=u.substr(f)):f<0&&(f=-f,r=e(r,f+1,!0),u=r.slice(-f,r.length)+u,r=r.slice(0,-f));u=t>0?i["."]+(u.length>t?u.slice(0,t):e(u,t)):"";for(var s=r.length-1,y=i[","],h="";s>=0;){if(c===0||c>s)return r.slice(0,s+1)+(h.length?y+h+u:u);h=r.slice(s-c+1,s+1)+(h.length?y+h:"");s-=c;a<l.length&&(c=l[a],a++)}return r.slice(0,s+1)+y+h+u};ut=function(t,i,r){var a,f,v,o,y,l;if(!isFinite(t))return t===Infinity?r.numberFormat.positiveInfinity:t===-Infinity?r.numberFormat.negativeInfinity:r.numberFormat.NaN;if(!i||i==="i")return r.name.length?t.toLocaleString():t.toString();i=i||"D";var s=r.numberFormat,u=Math.abs(t),h=-1,c;i.length>1&&(h=parseInt(i.slice(1),10));a=i.charAt(0).toUpperCase();switch(a){case"D":c="n";u=p(u);h!==-1&&(u=e(""+u,h,!0));t<0&&(u="-"+u);break;case"N":f=s;case"C":f=f||s.currency;case"P":f=f||s.percent;c=t<0?f.pattern[0]:f.pattern[1]||"n";h===-1&&(h=f.decimals);u=n(u*(a==="P"?100:1),h,f);break;default:throw"Bad number format specifier: "+a;}for(v=/n|\$|-|%/g,o="";;){if(y=v.lastIndex,l=v.exec(c),o+=c.slice(y,l?l.index:c.length),!l)break;switch(l[0]){case"n":o+=u;break;case"$":o+=s.currency.symbol;break;case"-":/[1-9]/.test(u)&&(o+=s["-"]);break;case"%":o+=s.percent.symbol}}return o}}();k=function(){return/\/|dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|y|hh|h|HH|H|mm|m|ss|s|tt|t|fff|ff|f|zzz|zz|z|gg|g/g};o=function(n,t){var r,u,i,f;if(!t)return 0;for(u=n.getTime(),i=0,f=t.length;i<f;i++)if(r=t[i].start,r===null||u>=r)return i;return 0};a=function(n,t,i,r){var u=n.getFullYear();return!r&&t.eras&&(u-=t.eras[i].offset),u},function(){var e,s,h,c,n,i,t;e=function(n,t){if(t<100){var r=new Date,f=o(r),u=a(r,n,f),i=n.twoDigitYearMax;i=typeof i=="string"?(new Date).getFullYear()%100+parseInt(i,10):i;t+=u-u%100;t>i&&(t-=100)}return t};s=function(n,u,f){var e,s=n.days,o=n._upperDays;return o||(n._upperDays=o=[t(s.names),t(s.namesAbbr),t(s.namesShort)]),u=i(u),f?(e=r(o[1],u),e===-1&&(e=r(o[2],u))):e=r(o[0],u),e};h=function(n,u,f){var h=n.months,c=n.monthsGenitive||n.months,e=n._upperMonths,s=n._upperMonthsGen,o;return e||(n._upperMonths=e=[t(h.names),t(h.namesAbbr)],n._upperMonthsGen=s=[t(c.names),t(c.namesAbbr)]),u=i(u),o=r(f?e[1]:e[0],u),o<0&&(o=r(f?s[1]:s[0],u)),o};c=function(n,t){var f=n._parseRegExp,o,y,e,p,i,b,d;if(f){if(o=f[t],o)return o}else n._parseRegExp=f={};for(var s=w(n,t).replace(/([\^\$\.\*\+\?\|\[\]\(\)\{\}])/g,"\\\\$1"),r=["^"],c=[],h=0,a=0,v=k(),u;(u=v.exec(s))!==null;){if(y=s.slice(h,u.index),h=v.lastIndex,a+=l(y,r),a%2){r.push(u[0]);continue}e=u[0];p=e.length;switch(e){case"dddd":case"ddd":case"MMMM":case"MMM":case"gg":case"g":i="(\\D+)";break;case"tt":case"t":i="(\\D*)";break;case"yyyy":case"fff":case"ff":case"f":i="(\\d{"+p+"})";break;case"dd":case"d":case"MM":case"M":case"yy":case"y":case"HH":case"H":case"hh":case"h":case"mm":case"m":case"ss":case"s":i="(\\d\\d?)";break;case"zzz":i="([+-]?\\d\\d?:\\d{2})";break;case"zz":case"z":i="([+-]?\\d\\d?)";break;case"/":i="(\\/)";break;default:throw"Invalid date format pattern '"+e+"'.";}i&&r.push(i);c.push(u[0])}return l(s.slice(h),r),r.push("$"),b=r.join("").replace(/\s+/g,"\\s+"),d={regExp:b,groups:c},f[t]=d};n=function(n,t,i){return n<t||n>i};i=function(n){return n.split(" ").join(" ").toUpperCase()};t=function(n){for(var r=[],t=0,u=n.length;t<u;t++)r[t]=i(n[t]);return r};d=function(t,i,r){var d,wt,l,ft,et,g,nt,kt,a,dt,tt,at;t=u(t);var o=r.calendar,vt=c(o,i),yt=new RegExp(vt.regExp).exec(t);if(yt===null)return null;var pt=vt.groups,ot=null,w=null,p=null,b=null,it=null,y=0,k,st=0,ht=0,ct=0,rt=null,lt=!1;for(d=0,wt=pt.length;d<wt;d++)if(l=yt[d+1],l){var bt=pt[d],ut=bt.length,v=parseInt(l,10);switch(bt){case"dd":case"d":if(b=v,n(b,1,31))return null;break;case"MMM":case"MMMM":if(p=h(o,l,ut===3),n(p,0,11))return null;break;case"M":case"MM":if(p=v-1,n(p,0,11))return null;break;case"y":case"yy":case"yyyy":if(w=ut<4?e(o,v):v,n(w,0,9999))return null;break;case"h":case"hh":if(y=v,y===12&&(y=0),n(y,0,11))return null;break;case"H":case"HH":if(y=v,n(y,0,23))return null;break;case"m":case"mm":if(st=v,n(st,0,59))return null;break;case"s":case"ss":if(ht=v,n(ht,0,59))return null;break;case"tt":case"t":if(lt=o.PM&&(l===o.PM[0]||l===o.PM[1]||l===o.PM[2]),!lt&&(!o.AM||l!==o.AM[0]&&l!==o.AM[1]&&l!==o.AM[2]))return null;break;case"f":case"ff":case"fff":if(ct=v*Math.pow(10,3-ut),n(ct,0,999))return null;break;case"ddd":case"dddd":if(it=s(o,l,ut===3),n(it,0,6))return null;break;case"zzz":if((ft=l.split(/:/),ft.length!==2)||(k=parseInt(ft[0],10),n(k,-12,13))||(et=parseInt(ft[1],10),n(et,0,59)))return null;rt=k*60+(f(l,"-")?-et:et);break;case"z":case"zz":if(k=v,n(k,-12,13))return null;rt=k*60;break;case"g":case"gg":if(g=l,!g||!o.eras)return null;for(g=u(g.toLowerCase()),nt=0,kt=o.eras.length;nt<kt;nt++)if(g===o.eras[nt].name.toLowerCase()){ot=nt;break}if(ot===null)return null}}if(a=new Date,tt=o.convert,dt=tt?tt.fromGregorian(a)[0]:a.getFullYear(),w===null?w=dt:o.eras&&(w+=o.eras[ot||0].offset),p===null&&(p=0),b===null&&(b=1),tt){if(a=tt.toGregorian(w,p,b),a===null)return null}else if((a.setFullYear(w,p,b),a.getDate()!==b)||it!==null&&a.getDay()!==it)return null;return lt&&y<12&&(y+=12),a.setHours(y,st,ht,ct),rt!==null&&(at=a.getMinutes()-(rt+a.getTimezoneOffset()),a.setHours(a.getHours()+parseInt(at/60,10),at%60)),a}}();s=function(n,t,i){var r=t["-"],u=t["+"],e;switch(i){case"n -":r=" "+r;u=" "+u;case"n-":h(n,r)?e=["-",n.substr(0,n.length-r.length)]:h(n,u)&&(e=["+",n.substr(0,n.length-u.length)]);break;case"- n":r+=" ";u+=" ";case"-n":f(n,r)?e=["-",n.substr(r.length)]:f(n,u)&&(e=["+",n.substr(u.length)]);break;case"(n)":f(n,"(")&&h(n,")")&&(e=["-",n.substr(1,n.length-2)])}return e||["",n]};i.prototype.findClosestCulture=function(n){return i.findClosestCulture.call(this,n)};i.prototype.format=function(n,t,r){return i.format.call(this,n,t,r)};i.prototype.localize=function(n,t){return i.localize.call(this,n,t)};i.prototype.parseInt=function(n,t,r){return i.parseInt.call(this,n,t,r)};i.prototype.parseFloat=function(n,t,r){return i.parseFloat.call(this,n,t,r)};i.prototype.culture=function(n){return i.culture.call(this,n)};i.addCultureInfo=function(n,t,i){var r={},u=!1;typeof n!="string"?(i=n,n=this.culture().name,r=this.cultures[n]):typeof t!="string"?(i=t,u=this.cultures[n]==null,r=this.cultures[n]||this.cultures["default"]):(u=!0,r=this.cultures[t]);this.cultures[n]=v(!0,{},r,i);u&&(this.cultures[n].calendar=this.cultures[n].calendars.standard)};i.findClosestCulture=function(n){var r,f,h,l,y,a;if(!n)return this.findClosestCulture(this.cultureSelector)||this.cultures["default"];if(typeof n=="string"&&(n=n.split(",")),c(n)){for(var i,o=this.cultures,v=n,s=v.length,e=[],t=0;t<s;t++)n=u(v[t]),h=n.split(";"),i=u(h[0]),h.length===1?f=1:(n=u(h[1]),n.indexOf("q=")===0?(n=n.substr(2),f=parseFloat(n),f=isNaN(f)?0:f):f=1),e.push({lang:i,pri:f});for(e.sort(function(n,t){return n.pri<t.pri?1:n.pri>t.pri?-1:0}),t=0;t<s;t++)if(i=e[t].lang,r=o[i],r)return r;for(t=0;t<s;t++){i=e[t].lang;do{if(l=i.lastIndexOf("-"),l===-1)break;if(i=i.substr(0,l),r=o[i],r)return r}while(1)}for(t=0;t<s;t++){i=e[t].lang;for(y in o)if(a=o[y],a.language==i)return a}}else if(typeof n=="object")return n;return r||null};i.format=function(n,t,i){var r=this.findClosestCulture(i);return n instanceof Date?n=b(n,t,r):typeof n=="number"&&(n=ut(n,t,r)),n};i.localize=function(n,t){return this.findClosestCulture(t).messages[n]||this.cultures["default"].messages[n]};i.parseDate=function(n,t,i){var r,o,f,u,s,e;if(i=this.findClosestCulture(i),t){if(typeof t=="string"&&(t=[t]),t.length)for(u=0,s=t.length;u<s;u++)if(e=t[u],e&&(r=d(n,e,i),r))break}else{f=i.calendar.patterns;for(o in f)if(r=d(n,f[o],i),r)break}return r||null};i.parseInt=function(n,t,r){return p(i.parseFloat(n,t,r))};i.parseFloat=function(n,t,i){var y,c,l,h,p,k,w,b,d,a,it;typeof t!="number"&&(i=t,t=10);var f=this.findClosestCulture(i),v=NaN,r=f.numberFormat;if(n.indexOf(f.numberFormat.currency.symbol)>-1&&(n=n.replace(f.numberFormat.currency.symbol,""),n=n.replace(f.numberFormat.currency["."],f.numberFormat["."])),n.indexOf(f.numberFormat.percent.symbol)>-1&&(n=n.replace(f.numberFormat.percent.symbol,"")),n=n.replace(/ /g,""),nt.test(n))v=parseFloat(n);else if(!t&&g.test(n))v=parseInt(n,16);else{var u=s(n,r,r.pattern[0]),e=u[0],o=u[1];e===""&&r.pattern[0]!=="(n)"&&(u=s(n,r,"(n)"),e=u[0],o=u[1]);e===""&&r.pattern[0]!=="-n"&&(u=s(n,r,"-n"),e=u[0],o=u[1]);e=e||"+";l=o.indexOf("e");l<0&&(l=o.indexOf("E"));l<0?(c=o,y=null):(c=o.substr(0,l),y=o.substr(l+1));k=r["."];w=c.indexOf(k);w<0?(h=c,p=null):(h=c.substr(0,w),p=c.substr(w+k.length));b=r[","];h=h.split(b).join("");d=b.replace(/\u00A0/g," ");b!==d&&(h=h.split(d).join(""));a=e+h;p!==null&&(a+="."+p);y!==null&&(it=s(y,r,"-n"),a+="e"+(it[0]||"+")+it[1]);tt.test(a)&&(v=parseFloat(a))}return v};i.culture=function(n){return typeof n!="undefined"&&(this.cultureSelector=n),this.findClosestCulture(n)||this.cultures["default"]}}(this),function(n){var t;t=typeof require!="undefined"&&typeof exports!="undefined"&&typeof module!="undefined"?require("globalize"):n.Globalize;t.addCultureInfo("en-AU","default",{name:"en-AU",englishName:"English (Australia)",nativeName:"English (Australia)",numberFormat:{currency:{pattern:["-$n","$n"]}},calendars:{standard:{firstDay:1,patterns:{d:"d/MM/yyyy",D:"dddd, d MMMM yyyy",f:"dddd, d MMMM yyyy h:mm tt",F:"dddd, d MMMM yyyy h:mm:ss tt",M:"dd MMMM",Y:"MMMM yyyy"}}}})}(this),function(n){function t(r){if(i[r])return i[r].exports;var u=i[r]={exports:{},id:r,loaded:!1};return n[r].call(u.exports,u,u.exports,t),u.loaded=!0,u.exports}var i={};return t.m=n,t.c=i,t.p="",t(0)}([function(n,t,i){"use strict";function r(n){return n&&n.__esModule?n:{"default":n}}i(1);i(3);var u=i(4),f=r(u),e=i(5),o=r(e);(function(){f.default.highlightNavItem();o.default.showHide()})()},function(n,t,i){"use strict";i(2);$(function(){if(!/^https/.test(window.location.protocol)){var n=7;$("form").filter('[action*="//find.search.qld.gov.au/"]').each(function(){function f(){i.empty()}function o(n){t[0].value=n;setTimeout(function(){t[0].setSelectionRange(u.length,t[0].value.length)},0)}function s(n){var t=i.find("a"),r=t.filter(".focus");r.length>0?(n=(t.index(r)+n)%t.length,r.removeClass("focus")):n=n>-1?0:-1;t=t.eq(n);t.addClass("focus");o(t.text())}var e=this,t=$(e.elements.query).filter('[name="query"]'),u="",i,r;t.attr("role","combobox").attr("autocomplete","off").attr("aria-autocomplete","both");i=$('<ul role="listbox" class="listbox"/>').generateId("suggestbox");t.after(i);t.attr("aria-owns",i.attr("id"));i.on("click","a",function(n){n.preventDefault();t.val($(this).text()).get(0).focus();f()});r={alt:18,backspace:8,"delete":46,down:40,enter:13,escape:27,left:37,right:39,tab:9,up:38};$(document).on("click",function(n){t.is(n.target)?n.stopImmediatePropagation():f()});t.on("keydown",function(n){switch(n.which){case r.up:case r.down:s(n.which===r.down?1:-1);break;case r.tab:f()}});t.on("keyup",function(n){switch(n.which){case r.escape:case r.enter:f()}});t.on("input",function(){if(u=this.value,u.length<3){f();return}$.ajax({cache:!0,dataType:"jsonp",url:"http://find.search.qld.gov.au/s/suggest.json?",data:{collection:$(e.elements.collection).filter('[name="collection"]').val()||"qld-gov",profile:$(e.elements.profile).filter('[name="profile"]').val()||"qld_preview",show:n,partial_query:u}}).done(function(n){if(n.length<1){f();return}var r=new RegExp(u.replace(/([.+*?\[^\]$(){}=!<>|:-\\,])/g,"\\$1"),"g"),e=u.replace(/</g,"&lt;");i.html($.map(n,function(n){var t=n.replace(/</g,"&lt;").replace(r,"<mark>"+e+"<\/mark>");return'<li><a href="http://find.search.qld.gov.au/s/search.html?collection=qld-gov&profile=qld&query='+encodeURIComponent(n)+'">'+t+"<\/a><\/li>"}).join("\n"));t.val()})})})}})},function(){!function(n){"use strict";n.fn.generateId=function(t){var i=1;return t=t?n.trim(t.toLowerCase().replace(/[^a-z0-9_]+/g," ")).replace(/\s+/g,"-"):"id",this.each(function(){var n;if(!this.getAttribute("id")){for(n=t;document.getElementById(n);)n=t+String(i),i++;this.setAttribute("id",n)}})}}(jQuery)},function(){"use strict";var n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol?"symbol":typeof n},t;(function(t){var l=1e4,a='<div class="alert alert-warning status warn hidden"><div class="inner"><h2>Please check your answers<\/h2><ol><\/ol><\/div><\/div>',r="input, select, textarea",u=function(){return!(this.disabled||this.validity.valid)},f="formValidation",i=function(n,t){var i=this.data(f)||this.data(f,{}).data(f);return typeof n!="undefined"?typeof t!="undefined"?(i[n]=t,t):typeof i[n]!="undefined"?i[n]:null:i},s=function(i,r){return this.map(function(u,f){var o=t(f),s=null,e=null;return(typeof r=="undefined"?"undefined":n(r))==="object"&&r.level==="group"?e=o.formValidation("group").find(i)[0]:o.is(":radio, :checkbox")?e=o.closest("fieldset").find(i)[0]:(s=o.closest("form").find('label[for="'+f.id+'"]'),e=s.children(i)[0],e||i===".hint"&&(s.append('<small class="hint"><\/small>'),e=s.children(i)[0])),e})},e=function(){var i=t(this),n=i.formValidation("alert"),e,f;this.validity.valid?(i.formValidation("question").find(".alert").filter(n).length>0?n.remove():(f=i.formValidation("group").find(r).filter(u),f.length>0?n.text(f.formValidation("getValidationMessage")):n.remove()),i.parentsUntil("form",".invalid").filter(function(){return t(this).find(r).filter(u).length===0}).removeClass("invalid").find(".alert").remove()):(n.length===0&&(n=t('<em class="alert"/>')),n.text(i.formValidation("getValidationMessage")),i.formValidation("group").hasClass("atomic")&&(e={level:"group"}),i.formValidation("label",e).parent().find('.label, abbr[title="(required)"]').eq(-1).after(n))},v=function(){var u=t(this).closest("form"),f=u.find(r).filter(function n(){if(this.disabled)return!1;if(this.type==="radio"){if(n.cache){if(n.cache[this.name]===!0)return!1}else n.cache={};n.cache[this.name]=!0}return this.validity&&!this.validity.valid}),s=i.call(u,"summaryElement")||i.call(u,"summaryElement",t(a)),e=s.find("ol"),o=!0;return f.length>0&&(e.find("li").remove(),f.each(function(){var n=t(this),r=n.formValidation("group"),u=n.formValidation("label",{level:r.length>0?"group":null}),s,f;s=u.length>0?u[0].id||u.generateId("label-"+this.id)[0].id:this.name;f=i.call(n,"summaryElement")||i.call(n,"summaryElement",t('<li><a href="#'+s+'"><\/a><\/li>'));r.length===0||r[0]!==o?(o=r[0],f.find("a").text(u.text().replace(/\?$/,"")+": "+n.formValidation("getValidationMessage")).end().appendTo(e)):f.remove()})),f.length},h=function(n){var o=v.call(this),f=t(this);return f.find(".invalid").filter(function(){return t(this).find(r).filter(u).length===0}).removeClass("invalid").find(".alert").remove(),o>0?(n.stopImmediatePropagation(),n.preventDefault(),function(n){var r=i.call(n,"summaryElement");n.prev(".status").not(r).remove();n.before(r.fadeIn());t(window).scrollTop(r.offset().top)}(f),f.find(r).filter(u).each(function(){e.call(this)}).parentsUntil("form",".questions > li").not(".section, .compact").addClass("invalid"),f.trigger("x-invalid"),!1):void 0},c=function(n){var f=n.timeStamp||t.now(),r=t(this),e=i.call(r,"summaryElement"),u;if(e&&e.remove(),u=i.call(r,"lastSubmitTimeStamp"),u&&f-u<l)return n.stopImmediatePropagation(),n.preventDefault(),!1;i.call(r,"lastSubmitTimeStamp",f)},o={alert:function(){return this.map(function(n,i){var r=t(i),u;return r.is(":radio, :checkbox")===!0?r.closest("fieldset").find("legend > .alert")[0]:(u=r.formValidation("group").filter(".atomic"),u.length>0?u.find("legend > .alert")[0]:t('label[for="'+i.id+'"] > .alert')[0])})},label:function(n){return s.call(this,".label",n)},hint:function(n){return s.call(this,".hint",n)},question:function(i){return(typeof i=="undefined"?"undefined":n(i))==="object"&&i.level==="group"?this.formValidation("group"):this.map(function(n,i){return t(i).parentsUntil("form",".questions > li")[0]})},group:function(){return this.map(function(n,i){return t(i).parentsUntil("form",".group").filter(function(){return t(this).children("fieldset").length>0})[0]})},validate:function(){return this.each(function(){t(this).closest("form").attr("novalidate",!0).unbind("submit",c).unbind("submit",h).bind("submit",h).bind("submit",c).find(r).unbind("change",e).bind("change",e)})},getValidationMessage:function(){var n=this[0].validity;return typeof n=="undefined"||n.valid===!0?"":n.valueMissing?"Must be completed":n.customError?this[0].validationMessage:n.typeMismatch?"Must be an email address":n.patternMismatch?"Must use the format shown":"Must be a valid answer"}};t.fn.formValidation=function(i){if(o[i])return o[i].apply(this,Array.prototype.slice.call(arguments,1));if((typeof i=="undefined"?"undefined":n(i))!=="object"&&i)t.error("Method "+i+" does not exist on jQuery.formValidation");else return o.init.apply(this,arguments)};t.fn.forcesForms=t.fn.formValidation})(jQuery),function(n){n.fn.generateId=function(t){var i=1;return t=t?n.trim(t.toLowerCase().replace(/[^a-z0-9_]+/g," ")).replace(/\s+/g,"-"):"id",this.each(function(){var n;if(!this.getAttribute("id")){for(n=t;document.getElementById(n);)n=t+String(i),i++;this.setAttribute("id",n)}})}}(jQuery);jQuery!=="undefined"&&function(t){var l=/^[A-Za-z0-9!#$%&'*+\-\/=\?\^_`\{\|\}~\.]+@[A-Za-z0-9\-]+(\.[A-Za-z0-9\-]+)*$/,o="input, select, textarea",i=t("<input>").get(0),r=n(i.validity)!=="object",h=!r&&t('<input type="radio" required checked>').get(0).validity.valueMissing===!0,u,a=function(){return!(this.disabled||this.validity.valid)},f=function(n){return t(n.form.elements[n.name]).filter('[name="'+n.name+'"]')},c=function(n,t,i,r,u){return typeof r=="string"&&(i=!!r),{customError:i,typeMismatch:!!n,patternMismatch:!!u,valueMissing:!!t,valid:!t&&!i&&!n&&!u}},e=function(n){var h=t(this),r=!!h.attr("required"),i=this.type==="radio"&&f(this),o,a=this.getAttribute("type")==="email"&&!!this.value&&!l.test(this.value),u,s,e;return i&&!r&&(r=i.filter("[required]").length>0),r&&(o=/^select$/i.test(this.nodeName)?this.selectedIndex===0&&this.options[0].value==="":i?i.filter(":checked").length===0:this.type==="checkbox"?!this.checked:!this.value),!this.getAttribute("pattern")||(this.value.length>0?(s=new RegExp("^(?:"+this.getAttribute("pattern")+")$"),u=!s.test(this.value)):u=!1),e=c(a,o,this.validity.customError||!1,n,u),i?f(this).each(function(){this.validity=e}):this.validity=e,this.validity.valid?this.validationMessage="":this.validity.customError?typeof n=="string"&&(this.validationMessage=n):this.validationMessage=this.validity.valueMissing?"Please answer this question":this.validity.typeMismatch?"Please type an email address":this.validity.patternMismatch?"Please use the format shown":"Please answer the question correctly",this.disabled||this.validity.valid},v=function(n){var t=n.target;e.call(t);t.type==="radio"&&f(t).each(function(){this.validity=t.validity;this.validationMessage=t.validationMessage})},y=function(n){var i=t(this),f=!!i.attr("novalidate"),s=!1;return r&&i.find(o).each(function(){s=!e.call(this);f||s&&t(this).triggerHandler("invalid")}),h&&u(this),!f&&i.find(o).filter(a).length>0?(n.stopImmediatePropagation(),n.preventDefault(),!1):void 0},s=function(){var s=t(o);r&&(s.filter(function(){return n(this.validity)!=="object"}).each(function(){this.validity=c(!1,!1,!1,"",!1);this.validationMessage=""}),s.unbind("change.constraintValidationAPI").bind("change.constraintValidationAPI",v));typeof i.validationMessage!="string"&&s.filter(function(){return typeof this.validationMessage!="string"}).each(function(){this.validationMessage=""});typeof i.checkValidity!="function"&&s.filter(function(){return typeof this.checkValidity!="function"}).each(function(){var n=this;this.checkValidity=function(){var i=e.call(n);return i||this.form.getAttribute("novalidate")||t(n).triggerHandler("invalid"),i}});typeof i.setCustomValidity!="function"&&s.filter(function(){return typeof this.setCustomValidity!="function"}).each(function(){var n=this;this.setCustomValidity=function(t){e.call(n,t)}});h&&(u=function(n){var r={},i,u;t("input",n).filter(":radio").filter('[required],[aria-required="true"]').each(function(){typeof r[this.name]=="undefined"&&(r[this.name]=!0,i=f(this),u=i.filter(":checked").length===0,u?i.attr("required","required"):i.attr("aria-required",!0).removeAttr("required"))})},t("form").each(u),r||s.filter(":radio").unbind("change.constraintValidationAPI").bind("change.constraintValidationAPI",function(){u(this.form)}));t("form").unbind("submit.constraintValidationAPI").bind("submit.constraintValidationAPI",y)};s();t(s);window.initConstraintValidationAPI=s}(jQuery),function(n){n.fn.simplyCountable=function(t){t=n.extend({counter:"#counter",countType:"characters",maxCount:140,strictMax:!1,countDirection:"down",safeClass:"safe",overClass:"over",thousandSeparator:",",onOverCount:function(){},onSafeCount:function(){},onMaxCount:function(){}},t);var i=[33,34,35,36,37,38,39,40];return n(this).each(function(){var u=n(this),r=n(t.counter),f;if(!r.length)return!1;f=function(){var i,e,c=function(n){return n-n*2+t.maxCount},f=function(){return t.countDirection==="up"?e:i},l=function(n){var r="",i;if(t.thousandSeparator)for(n=n.toString(),n.match(/^-/)&&(n=n.substr(1),r="-"),i=n.length-3;i>0;i-=3)n=n.substr(0,i)+t.thousandSeparator+n.substr(i);return r+n},h=function(n){u.val(n).trigger("change")},o,s;if(t.countType==="words"?(i=t.maxCount-n.trim(u.val()).split(/\s+/).length,u.val()===""&&(i+=1)):i=t.maxCount-u.val().length,e=c(i),t.strictMax&&i<=0){if(o=u.val(),i<0)t.onMaxCount(f(),u,r);t.countType==="words"?(s=o.match(new RegExp("\\s?(\\S+\\s+){"+t.maxCount+"}")),s&&h(s[0])):h(o.substring(0,t.maxCount));i=0;e=t.maxCount}if(r.text(l(f())),r.hasClass(t.safeClass)||r.hasClass(t.overClass)){if(i<0&&r.hasClass(t.safeClass)){r.removeClass(t.safeClass).addClass(t.overClass);t.onOverCount(f(),u,r)}else if(i>=0&&r.hasClass(t.overClass)){r.removeClass(t.overClass).addClass(t.safeClass);t.onSafeCount(f(),u,r)}}else i<0?r.addClass(t.overClass):r.addClass(t.safeClass)};f();u.on("keyup blur paste",function(t){switch(t.type){case"keyup":n.inArray(t.which,i)<0&&f();break;case"paste":setTimeout(f,t.type==="paste"?5:0);break;default:f()}})})}}(jQuery);jQuery!=="undefined"&&function(t){var h="relevant",c="irrelevant",i="button, input, select, textarea",e=function(){var n=t("<div hidden><\/div>"),i=n.appendTo("body").is(":hidden");return n.remove(),!i}(),r=function(n,i){return t(n.elements[i]).filter('[name="'+i+'"]')},l=function(){return t(this).closest("[hidden]").length===0},a=function(){return t(this).closest("[hidden]").length>0},u=function(n){return n.value},f=function(i,r){var u;for((typeof i=="undefined"?"undefined":n(i))!=="object"&&(i=[i]),u=0;u<r.length;u++)if(t.inArray(r[u],i)!==-1)return!0;return!1},o=function(){var n=t(this.form).data("relevance").dependencyMap[this.name],i=t.map(r(this.form,this.name).filter("select,:checked").filter(":visible"),u);t.each(n,function(n,t){t.items.relevance("relevant",f(t.values,i)!==t.negate)})},v=function(i){var o,e,s;o=this.closest("form");o.length&&(e=o.data("relevance"),(typeof e=="undefined"?"undefined":n(e))==="object"&&(e=e.dependencyMap,(typeof e=="undefined"?"undefined":n(e))==="object"&&(s=this.add(this.find("select,input")).filter("select,:radio,:checkbox"),s=t.unique(t.map(s,function(n){return n.name})),t.each(s,function(s,h){var c=e[h],l;(typeof c=="undefined"?"undefined":n(c))==="object"&&t.each(c,function(n,e){i===!1?e.items.relevance("relevant",!1):(l=t.map(r(o[0],h).filter("select,:checked").filter(":visible"),u),e.items.relevance("relevant",f(e.values,l)!==e.negate))})}))))},s={relevant:function(n){var t;return t=n?this.filter(a).trigger(h):this.filter(l).trigger(c),t.length&&v.call(t,n),this},show:function(){return this.add(this.find(i)).not(this.find("[hidden]").find(i)).each(function(){this.removeAttribute("disabled")}),e&&this.stop(!0,!0).slideDown(),this.removeAttr("hidden").removeAttr("aria-hidden")},hide:function(){return this.attr({hidden:"hidden","aria-hidden":"true"}),e?this.stop(!0,!0).hide(0,function(){var n=t(this);n.filter(i).add(n.find(i)).each(function(){this.setAttribute("disabled","disabled")})}):this.filter(i).add(this.find(i)).each(function(){this.setAttribute("disabled","disabled")}),this},relevantWhen:function(i){var h,e,s,c;return c=i.values||[i.value],i.name?s=i.name:i.id?s=document.getElementById(i.id).name:i.container&&(s=t(i.container).find("select,:radio,:checkbox").attr("name")),i.negate=i.negate===!0,h=this.closest("form"),e=h.data("relevance"),(typeof e=="undefined"?"undefined":n(e))!=="object"&&(e={},h.data("relevance",e)),n(e.dependencyMap)!=="object"&&(e.dependencyMap={}),n(e.dependencyMap[s])!=="object"&&(e.dependencyMap[s]=[],r(h[0],s).filter(":radio,:checkbox").bind("click",o).end().filter("select").bind("change",o)),e.dependencyMap[s].push({items:this,values:c,negate:i.negate}),this.relevance("relevant",f(c,t.map(r(h[0],s).filter("select,:checked").filter(":visible"),u))!==i.negate),this},instructions:function(n){return n=t.extend({instructionSelector:".relevance",questionSelector:".questions > li"},n),this.find(n.instructionSelector).each(function(){var h=t(this),e=h.text(),c=h.closest(n.questionSelector),i=c.prevAll(n.questionSelector),r,l,o,s=!1,a=!1;if(/If different to/.test(e))s=!0,i=i.eq(0),e=i.find(":checkbox").val(),a=!0;else for(e=e.replace(/^.*chose\s+\S([^'"’]+)\S\s+above.*$/,"$1"),r=0;r<i.length;)l=t.map(i.eq(r).find("option,:radio,:checkbox"),u),f(e,l)?(o=i.eq(r).find(n.questionSelector),o.length?(i=t(o.get().reverse()),r=0):(s=!0,i=i.eq(r),r=1)):r++;s&&(i=i.add(i.find("select,input")).filter("select,:radio,:checkbox"),c.relevance("relevantWhen",{name:i.attr("name"),value:e,negate:a}))}),this}};t(document).bind("relevant irrelevant",function(n){var i=t(n.target);n.type==="relevant"?i.relevance("show"):i.relevance("hide")});t.fn.relevance=function(i){if(s[i])return s[i].apply(this,Array.prototype.slice.call(arguments,1));if((typeof i=="undefined"?"undefined":n(i))!=="object"&&i)t.error("Method "+i+" does not exist on jQuery.relevance");else return this}}(jQuery),function(t){var i;if(n(t('<input type="file">')[0].files)!=="object"){t(".max-fsize").each(function(){var n=t(this),i;i=n.closest(".preamble").nextAll("form").eq(0);i.find(".actions").before("<p>"+n.parent().html()+"<\/p>")});return}i=function(n){if(n.nextAll(".fsize").remove(),n[0].files.length>0){var t=n[0].files[0].size/1024;t>=1024?(t=t/1024,n.after('<span class="fsize">File size: '+Math.round(t*10)/10+"MB<\/span>")):n.after('<span class="fsize">File size: '+Math.round(t*10)/10+"KB<\/span>")}};t(".max-fsize").each(function(){var n=t(this),r,u;u=parseInt(n.text().replace(/\D+/g,""),10)*1048576;r=n.closest(".preamble").nextAll("form").eq(0);r.find(":file").on("change",function(){var f=t(this),n,r;i(f);n=0;t(":file",this.form).each(function(t,i){var r=i.files.length?i.files[0].size:0;n+=r});r=n<=u;t(":file",this.form).filter(function(){return!!this.value}).each(function(n,t){t.setCustomValidity(r?"":"Attachments are too large")}).filter(function(){return!this.value}).each(function(n,t){t.setCustomValidity("")})})})}(jQuery),function(n){var t=function(n){var t=n.data[0],i=n.data[1],r=t.filter(function(){return this.value.length>1}).length>0;t.each(function(){this.setCustomValidity(r?"":i)})},i=function(n,i){if(i!==!0){var r=n.data[0];t(n);n.type==="change"&&r.not(n.target).triggerHandler("change",!0)}};n.fn.initXorConstraint=function(n){this.closest("form").on("submit",[this,n],t);this.on("change",[this,n],i)}}(jQuery),function(n){var t=function(){window.initConstraintValidationAPI();n("form").formValidation("validate")};t();n(t);n(".relevance","form").length>0&&n("form","#content").relevance("instructions")}(jQuery),function(n){n.fn.toggleRequired=function(t){return this.each(function(){var r=n(this.form.elements[this.name]),i=n(this).closest(".questions > li");t?(i.find('abbr[title="(required)"]').length===0&&i.find(".label").after(n(document.createElement("abbr")).attr("title","(required)").text("*").addClass("required")),r.attr("required","required")):(r.removeAttr("required"),i.find('abbr[title="(required)"]').remove())})}}(jQuery);t={oldIE:!1};t.date=function(){var n={},t={"2010-01-01":"New Year’s Day","2010-01-26":"Australia Day","2010-04-02":"Good Friday","2010-04-03":"Easter Saturday","2010-04-05":"Easter Monday","2010-04-26":"Anzac Day","2010-05-03":"Labour Day","2010-06-14":"Queen’s Birthday","2010-12-25":"Christmas Day","2010-12-27":"Boxing Day","2010-12-28":"Christmas Day holiday","2011-01-01":"New Year’s Day","2011-01-03":"New Year’s Day holiday","2011-02-26":"Australia Day","2011-04-22":"Good Friday","2011-04-23":"Easter Saturday","2011-04-25":"Anzac Day","2011-04-26":"Easter Monday","2011-05-02":"Labour Day","2011-06-13":"Queen’s Birthday","2011-12-25":"Christmas Day","2011-12-26":"Boxing Day","2011-12-27":"Christmas Day holiday","2012-01-01":"New Year’s Day","2012-01-02":"New Year’s Day holiday","2012-02-26":"Australia Day","2012-04-06":"Good Friday","2012-04-07":"Easter Saturday","2012-04-09":"Easter Monday","2012-04-25":"Anzac Day","2012-05-07":"Labour Day","2012-06-11":"Queen’s Diamond Jubilee","2012-10-01":"Queen’s Birthday","2012-12-25":"Christmas Day","2012-12-26":"Boxing Day","2013-01-01":"New Year’s Day","2013-01-28":"Australia Day holiday","2013-03-29":"Good Friday","2013-03-30":"Easter Saturday","2013-04-01":"Easter Monday","2013-04-25":"Anzac Day","2013-06-10":"Queen’s Birthday","2013-10-07":"Labour Day","2013-12-25":"Christmas Day","2013-12-26":"Boxing Day","2014-01-01":"New Year’s Day","2014-01-27":"Australia Day holiday","2014-04-18":"Good Friday","2014-04-19":"Easter Saturday","2014-04-21":"Easter Monday","2014-04-25":"Anzac Day","2014-06-09":"Queen’s Birthday","2014-10-06":"Labour Day","2014-12-25":"Christmas Day","2014-12-26":"Boxing Day","2015-01-01":"New Year’s Day","2015-01-26":"Australia Day holiday","2015-04-03":"Good Friday","2015-04-04":"Easter Saturday","2015-04-06":"Easter Monday","2015-04-25":"Anzac Day","2015-06-08":"Queen’s Birthday","2015-10-05":"Labour Day","2015-12-25":"Christmas Day","2015-12-26":"Boxing Day","2015-12-28":"Boxing Day holiday","2016-01-01":"New Year’s Day","2016-01-26":"Australia Day holiday","2016-03-25":"Good Friday","2016-03-26":"Easter Saturday","2016-03-28":"Easter Monday","2016-04-25":"Anzac Day","2016-06-13":"Queen’s Birthday","2016-10-03":"Labour Day","2016-12-25":"Christmas Day","2016-12-27":"Christmas Day holiday","2016-12-26":"Boxing Day","2017-01-01":"New Year’s Day","2017-01-02":"New Year’s Day holiday","2017-01-26":"Australia Day holiday","2017-04-14":"Good Friday","2017-04-15":"Easter Saturday","2017-04-17":"Easter Monday","2017-04-25":"Anzac Day","2017-06-12":"Queen’s Birthday","2017-10-02":"Labour Day","2017-12-25":"Christmas Day","2017-12-26":"Boxing Day","2018-01-01":"New Year’s Day","2018-01-26":"Australia Day holiday","2018-03-30":"Good Friday","2018-03-31":"Easter Saturday","2018-04-02":"Easter Monday","2018-04-25":"Anzac Day","2018-05-07":"Labour Day","2018-10-01":"Queen’s Birthday","2018-12-25":"Christmas Day","2018-12-26":"Boxing Day"};return n.isPublicHoliday=function(n){var i=n.getDate(),r=n.getMonth()+1,u=String(n.getFullYear()),f=u+(r<10?"-0":"-")+r+(i<10?"-0":"-")+i;return!!t[f]},n}(),function(n){n(".hint").filter(function(){return/Maximum:\s+\d+\s+words/.test(n(this).text())}).each(function(){var t=n(this),u=parseInt(t.text().replace(/Maximum:\s+(\d+)\s+words/,"$1"),10),i=t.closest("label").nextAll("textarea"),r;r=n("<span/>").generateId("word-count");t.append(" (",r," remaining)");i.simplyCountable({counter:"#"+r[0].id,countType:"words",countDirection:"down",maxCount:u,onOverCount:function(){i[0].setCustomValidity("Too many words")},onSafeCount:function(){i[0].setCustomValidity("")}})})}(jQuery)},function(n){"use strict";var t=function(){function n(n){return n.toLowerCase().replace(/ /g,"")}function t(){var t="",i;return $("#guide-title").length>0?t=$("#guide-title").text():$('meta[name="DCTERMS.alternative"]').length>0&&n($('meta[name="DCTERMS.alternative"]').eq(0).attr("content"))!==""?t=$('meta[name="DCTERMS.alternative"]').eq(0).attr("content"):(i=$("h1","#qg-primary-content").eq(0).clone(),i.find(".page-number").remove(),t=i.text()),n(t)}function i(){var i=t();$("#qg-section-nav ul>li").each(function(){n($(this).text())===$.trim(i)&&$(this).find("a").addClass("active")})}return{highlightNavItem:i}}();n.exports=t},function(n,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol?"symbol":typeof n},r=function(){var t="data-qg-showhide-target",r="data-qg-parent",u="data-qg-show",f="data-qg-aria-safe",e="data-qg-default",s=$("*["+t+"]"),n,o;return jQuery.fn.select=function(n){var t;return $(n).length?t=$(n):$(n,this).length&&(t=$(n,this)),t},n=function n(e,o,s){var a;o=o==undefined?!1:o;s=s==undefined?"fast":s;var h=$(e),c=h.select(h.attr(t)),v=!1,p="auto",y=!0,l="qg-aria-hidden";i(h.attr(r))!==undefined&&(v=$(h.attr(r)));i(h.attr(u))!==undefined&&(p=h.attr(u));i(h.attr(f))!==undefined&&(y=h.attr(f));switch(p){case"sm":l="qg-aria-hidden-show-sm";break;case"md":l="qg-aria-hidden-show-md";break;case"lg":l="qg-aria-hidden-show-lg"}o===!1&&(o=h.hasClass("active")?"hide":"show");o==="show"?(a="qg-temp-active-element",h.addClass(a),v&&v.find("*["+t+"]").each(function(){$(this).hasClass(a)||n(this,"hide")}),h.removeClass(a),h.addClass("active"),y?c.slideUp(0,function(){c.removeClass(l).slideDown(s)}):c.slideDown(s)):o==="hide"&&(h.removeClass("active"),y?c.slideUp(s,function(){c.addClass(l).slideDown(0)}):c.slideUp(s))},o=function(){s.each(function(){var t="hide";if(i($(this).attr(e))!==undefined&&(t=$(this).attr(e)),n(this,t,0),$(this).is("input[type=radio]"))$(this).on("change",function(){$(this).prop("checked",!0)&&n(this,"show")});else $(this).click(function(){n(this)})})},{showHide:o,breakpoints:{bsXs:480,bsSm:768,bsMd:992,bsLg:1200}}}();t.default=r}]);+function(n){"use strict";function r(i){return this.each(function(){var u=n(this),r=u.data("bs.tooltip"),f=typeof i=="object"&&i;(r||!/destroy|hide/.test(i))&&(r||u.data("bs.tooltip",r=new t(this,f)),typeof i=="string"&&r[i]())})}var t=function(n,t){this.type=null;this.options=null;this.enabled=null;this.timeout=null;this.hoverState=null;this.$element=null;this.inState=null;this.init("tooltip",n,t)},i;t.VERSION="3.3.7";t.TRANSITION_DURATION=150;t.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"><\/div><div class="tooltip-inner"><\/div><\/div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}};t.prototype.init=function(t,i,r){var f,e,u,o,s;if(this.enabled=!0,this.type=t,this.$element=n(i),this.options=this.getOptions(r),this.$viewport=this.options.viewport&&n(n.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(f=this.options.trigger.split(" "),e=f.length;e--;)if(u=f[e],u=="click")this.$element.on("click."+this.type,this.options.selector,n.proxy(this.toggle,this));else if(u!="manual"){o=u=="hover"?"mouseenter":"focusin";s=u=="hover"?"mouseleave":"focusout";this.$element.on(o+"."+this.type,this.options.selector,n.proxy(this.enter,this));this.$element.on(s+"."+this.type,this.options.selector,n.proxy(this.leave,this))}this.options.selector?this._options=n.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()};t.prototype.getDefaults=function(){return t.DEFAULTS};t.prototype.getOptions=function(t){return t=n.extend({},this.getDefaults(),this.$element.data(),t),t.delay&&typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),t};t.prototype.getDelegateOptions=function(){var t={},i=this.getDefaults();return this._options&&n.each(this._options,function(n,r){i[n]!=r&&(t[n]=r)}),t};t.prototype.enter=function(t){var i=t instanceof this.constructor?t:n(t.currentTarget).data("bs."+this.type);if(i||(i=new this.constructor(t.currentTarget,this.getDelegateOptions()),n(t.currentTarget).data("bs."+this.type,i)),t instanceof n.Event&&(i.inState[t.type=="focusin"?"focus":"hover"]=!0),i.tip().hasClass("in")||i.hoverState=="in"){i.hoverState="in";return}if(clearTimeout(i.timeout),i.hoverState="in",!i.options.delay||!i.options.delay.show)return i.show();i.timeout=setTimeout(function(){i.hoverState=="in"&&i.show()},i.options.delay.show)};t.prototype.isInStateTrue=function(){for(var n in this.inState)if(this.inState[n])return!0;return!1};t.prototype.leave=function(t){var i=t instanceof this.constructor?t:n(t.currentTarget).data("bs."+this.type);if(i||(i=new this.constructor(t.currentTarget,this.getDelegateOptions()),n(t.currentTarget).data("bs."+this.type,i)),t instanceof n.Event&&(i.inState[t.type=="focusout"?"focus":"hover"]=!1),!i.isInStateTrue()){if(clearTimeout(i.timeout),i.hoverState="out",!i.options.delay||!i.options.delay.hide)return i.hide();i.timeout=setTimeout(function(){i.hoverState=="out"&&i.hide()},i.options.delay.hide)}};t.prototype.show=function(){var c=n.Event("show.bs."+this.type),l,p,e,w,h;if(this.hasContent()&&this.enabled){if(this.$element.trigger(c),l=n.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]),c.isDefaultPrevented()||!l)return;var u=this,r=this.tip(),a=this.getUID(this.type);this.setContent();r.attr("id",a);this.$element.attr("aria-describedby",a);this.options.animation&&r.addClass("fade");var i=typeof this.options.placement=="function"?this.options.placement.call(this,r[0],this.$element[0]):this.options.placement,v=/\s?auto?\s?/i,y=v.test(i);y&&(i=i.replace(v,"")||"top");r.detach().css({top:0,left:0,display:"block"}).addClass(i).data("bs."+this.type,this);this.options.container?r.appendTo(this.options.container):r.insertAfter(this.$element);this.$element.trigger("inserted.bs."+this.type);var f=this.getPosition(),o=r[0].offsetWidth,s=r[0].offsetHeight;y&&(p=i,e=this.getPosition(this.$viewport),i=i=="bottom"&&f.bottom+s>e.bottom?"top":i=="top"&&f.top-s<e.top?"bottom":i=="right"&&f.right+o>e.width?"left":i=="left"&&f.left-o<e.left?"right":i,r.removeClass(p).addClass(i));w=this.getCalculatedOffset(i,f,o,s);this.applyPlacement(w,i);h=function(){var n=u.hoverState;u.$element.trigger("shown.bs."+u.type);u.hoverState=null;n=="out"&&u.leave(u)};n.support.transition&&this.$tip.hasClass("fade")?r.one("bsTransitionEnd",h).emulateTransitionEnd(t.TRANSITION_DURATION):h()}};t.prototype.applyPlacement=function(t,i){var r=this.tip(),l=r[0].offsetWidth,e=r[0].offsetHeight,o=parseInt(r.css("margin-top"),10),s=parseInt(r.css("margin-left"),10),h,f,u;isNaN(o)&&(o=0);isNaN(s)&&(s=0);t.top+=o;t.left+=s;n.offset.setOffset(r[0],n.extend({using:function(n){r.css({top:Math.round(n.top),left:Math.round(n.left)})}},t),0);r.addClass("in");h=r[0].offsetWidth;f=r[0].offsetHeight;i=="top"&&f!=e&&(t.top=t.top+e-f);u=this.getViewportAdjustedDelta(i,t,h,f);u.left?t.left+=u.left:t.top+=u.top;var c=/top|bottom/.test(i),a=c?u.left*2-l+h:u.top*2-e+f,v=c?"offsetWidth":"offsetHeight";r.offset(t);this.replaceArrow(a,r[0][v],c)};t.prototype.replaceArrow=function(n,t,i){this.arrow().css(i?"left":"top",50*(1-n/t)+"%").css(i?"top":"left","")};t.prototype.setContent=function(){var n=this.tip(),t=this.getTitle();n.find(".tooltip-inner")[this.options.html?"html":"text"](t);n.removeClass("fade in top bottom left right")};t.prototype.hide=function(i){function e(){r.hoverState!="in"&&u.detach();r.$element&&r.$element.removeAttr("aria-describedby").trigger("hidden.bs."+r.type);i&&i()}var r=this,u=n(this.$tip),f=n.Event("hide.bs."+this.type);if(this.$element.trigger(f),!f.isDefaultPrevented())return u.removeClass("in"),n.support.transition&&u.hasClass("fade")?u.one("bsTransitionEnd",e).emulateTransitionEnd(t.TRANSITION_DURATION):e(),this.hoverState=null,this};t.prototype.fixTitle=function(){var n=this.$element;(n.attr("title")||typeof n.attr("data-original-title")!="string")&&n.attr("data-original-title",n.attr("title")||"").attr("title","")};t.prototype.hasContent=function(){return this.getTitle()};t.prototype.getPosition=function(t){t=t||this.$element;var r=t[0],u=r.tagName=="BODY",i=r.getBoundingClientRect();i.width==null&&(i=n.extend({},i,{width:i.right-i.left,height:i.bottom-i.top}));var f=window.SVGElement&&r instanceof window.SVGElement,e=u?{top:0,left:0}:f?null:t.offset(),o={scroll:u?document.documentElement.scrollTop||document.body.scrollTop:t.scrollTop()},s=u?{width:n(window).width(),height:n(window).height()}:null;return n.extend({},i,o,s,e)};t.prototype.getCalculatedOffset=function(n,t,i,r){return n=="bottom"?{top:t.top+t.height,left:t.left+t.width/2-i/2}:n=="top"?{top:t.top-r,left:t.left+t.width/2-i/2}:n=="left"?{top:t.top+t.height/2-r/2,left:t.left-i}:{top:t.top+t.height/2-r/2,left:t.left+t.width}};t.prototype.getViewportAdjustedDelta=function(n,t,i,r){var f={top:0,left:0},e,u,o,s,h,c;return this.$viewport?(e=this.options.viewport&&this.options.viewport.padding||0,u=this.getPosition(this.$viewport),/right|left/.test(n)?(o=t.top-e-u.scroll,s=t.top+e-u.scroll+r,o<u.top?f.top=u.top-o:s>u.top+u.height&&(f.top=u.top+u.height-s)):(h=t.left-e,c=t.left+e+i,h<u.left?f.left=u.left-h:c>u.right&&(f.left=u.left+u.width-c)),f):f};t.prototype.getTitle=function(){var t=this.$element,n=this.options;return t.attr("data-original-title")||(typeof n.title=="function"?n.title.call(t[0]):n.title)};t.prototype.getUID=function(n){do n+=~~(Math.random()*1e6);while(document.getElementById(n));return n};t.prototype.tip=function(){if(!this.$tip&&(this.$tip=n(this.options.template),this.$tip.length!=1))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip};t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")};t.prototype.enable=function(){this.enabled=!0};t.prototype.disable=function(){this.enabled=!1};t.prototype.toggleEnabled=function(){this.enabled=!this.enabled};t.prototype.toggle=function(t){var i=this;t&&(i=n(t.currentTarget).data("bs."+this.type),i||(i=new this.constructor(t.currentTarget,this.getDelegateOptions()),n(t.currentTarget).data("bs."+this.type,i)));t?(i.inState.click=!i.inState.click,i.isInStateTrue()?i.enter(i):i.leave(i)):i.tip().hasClass("in")?i.leave(i):i.enter(i)};t.prototype.destroy=function(){var n=this;clearTimeout(this.timeout);this.hide(function(){n.$element.off("."+n.type).removeData("bs."+n.type);n.$tip&&n.$tip.detach();n.$tip=null;n.$arrow=null;n.$viewport=null;n.$element=null})};i=n.fn.tooltip;n.fn.tooltip=r;n.fn.tooltip.Constructor=t;n.fn.tooltip.noConflict=function(){return n.fn.tooltip=i,this}}(jQuery),function(n){n(function(){var r=250,t=300,i=n(".back-to-top");i.hide();n("#CssFailCheck").is(":visible")===!0&&n("head").prepend('<link rel="stylesheet" href="/assets/css/bootstrap.min.css">');n(window).scroll(function(){n(this).scrollTop()>r?i.fadeIn(t):i.fadeOut(t)});n("a[href^='#']").on("click",function(i){i.preventDefault();var r=this.hash;n("html, body").animate({scrollTop:n(r).offset().top},t,function(){window.location.hash=r})})})}(window.jQuery);typeof jQuery!="undefined"&&function(n){var t=37,i=39,u=function(r){n(r.target).is(".navtree > a")&&(console.log(r.keyCode==t&&n(r.target).find("i.fa-minus-square")),(r.keyCode==t&&n(r.target).find("i.fa-minus-square")=="[-]"||r.keyCode==i&&n(r.target).find("i.fa-plus-square")=="[+]")&&n(r.target).parent().find(".navtree-menu").trigger("click"))},r={};r[t]=r[i]=u;n(document).ready(function(){n("#navtree").click(function(t){var i=n(t.target).closest("a"),r=(i.find("i.fa").html()||"").replace(/^.*\[([+-])\].*$/,"$1");switch(r){case"+":return i.nextAll("ul").stop(!0,!0).show().end().html('<i class="fa fa-minus-square"><span class="text-hide">[-]<\/span><\/i><span class="sr-only sr-only-focusable">Close the '+i.next().text()+" submenu<\/span>"),!1;case"-":return i.nextAll("ul").stop(!0,!0).hide().end().html('<i class="fa fa-plus-square"><span class="text-hide">[+]<\/span><\/i><span class="sr-only sr-only-focusable">Open the '+i.next().text()+" submenu<\/span>"),!1}}).keypress(function(t){if(t.ctrlKey||t.shiftKey||t.altKey||t.metaKey)return!0;switch(t.charCode){case 42:return n("#qg-section-nav i.fa-plus-square").closest("a").trigger("click"),!1}var i=String.fromCharCode(t.charCode).toUpperCase();return i.match(/[A-Z]/)&&n(t.target).nextAll().add(n(t.target).parentsUntil("#qg-section-nav").nextAll()).find("a:visible").filter(function(){return n(this).text().charAt(0).toUpperCase()==i}).eq(0).focus(),!0});n("#qg-section-nav li.current-page > a").parents("li:has(ul)").addClass("navtree").each(function(){var t=n(this);t.prepend('<a href="#qg-section-nav" class="navtree-menu"><i class="fa fa-minus-square"><span class="text-hide">[-]<\/span><\/i><span class="sr-only sr-only-focusable">Close the '+t.children("a").text()+" submenu<\/span><\/a>")});n("#qg-section-nav li:not(.navtree) ul").parent().addClass("navtree").each(function(){var t=n(this);t.prepend('<a href="#qg-section-nav" class="navtree-menu"><i class="fa fa-plus-square"><span class="text-hide">[+]<\/span><\/i><span class="sr-only sr-only-focusable">Close the '+t.children("a").text()+" submenu<\/span><\/a>")}).end().hide()})}(jQuery)