text: "use strict";function RootUI(){this.version="1.0.9"}RootUI.prototype.accordion=function(){var e,t=$(arguments[0]),i=arguments[1],n="string"==typeof i,o=[].slice.call(arguments,1);return t.each(function(){var t,a,s,r,c,d,l,u,p,f=$.isPlainObject(i)?$.extend(!0,{},RootUI.prototype.accordion.settings,i):$.extend({},RootUI.prototype.accordion.settings),v=f.selector,m=f.className,h=f.metadata,g=(f.namespace,f.namespace,"module-"+f.namespace),w=$(this),b=w.data(g),y=this;p={initialize:function(){p.setup(),p.instantiate(),p.bind.events()},instantiate:function(){b=p,w.data(g,p)},setup:function(){p.set.initialLoad(),p.set.headers(),p.set.items(),p.set.contents(),p.set.id(),f.firstAutoOpen&&p.change(f.path),p.remove.initialLoad()},invoke:function(t,i,n){var a,s,r,c=b;return i=i||o,n=y||n,"string"==typeof t&&void 0!==c&&(t=t.split(/[\. ]/),a=t.length-1,$.each(t,function(e,i){var n=e!=a?i+t[e+1].charAt(0).toUpperCase()+t[e+1].slice(1):t;if($.isPlainObject(c[n])&&e!=a)c=c[n];else{if(void 0!==c[n])return s=c[n],!1;if(!$.isPlainObject(c[i])||e==a)return void 0!==c[i]&&(s=c[i],!1);c=c[i]}})),$.isFunction(s)?r=s.apply(n,i):void 0!==s&&(r=s),$.isArray(e)?e.push(r):void 0!==e?e=[e,r]:void 0!==r&&(e=r),s},change:function(e,t){if(d||f.onChanging.call(y),void 0!==t&&(e=t),e){if("allOpen"===e)return p.active.item(e),p.active.content(e),!1;if("allClose"===e)return p.inactive.item(e),p.inactive.content(e),!1;var i=p.is.active(e);if(i){if(!f.collapsible)return!1;p.current(e),p.close(e),f.closeNested&&(p.inactive.nastedItem(),p.inactive.nastedContent())}else f.exclusive&&(f.closeNested&&(p.inactive.nastedItem(),p.inactive.nastedContent()),p.close("allClose")),p.current(e),p.open(e);return!1}var n=void 0!==a.eq(0).data(h.accordion);e=n?a.eq(0).data(h.accordion):a.eq(0),p.current(e),p.open(),d||f.onChange.call(y)},current:function(e){p.set.currentItem(e),p.set.currentContent(e)},open:function(e){f.onOpening.call(y),p.active.item(e),p.active.content(e)},close:function(e){f.onClosing.call(y),p.inactive.item(e),p.inactive.content(e)},destroy:function(){p.close("allClose"),p.unbind.events(),w.removeData(g)},active:{item:function(e){var t;t="allOpen"===e?a:r,t.addClass(m.active)},content:function(e){var t,i;i=d?0:f.duration,t="allOpen"===e?s:c,t.addClass(m.active).stop(!0,!0).slideDown({duration:i,easing:f.easing},function(){f.onOpen.call(y)})}},inactive:{item:function(e){var t;t="allClose"===e?a:r,void 0!==t&&t.removeClass(m.active)},content:function(e){var t,i;i=d?0:f.duration,t="allClose"===e?s:c,void 0!==t&&t.removeClass(m.active).stop(!0,!0).slideUp({duration:i,easing:f.easing},function(){f.onClose.call(y)})},nastedItem:function(){c.find(v.item).removeClass(m.active)},nastedContent:function(){var e;e=d?0:f.duration,c.find(v.content).removeClass(m.active).stop().slideUp({duration:e,easing:f.easing})}},each:{},create:{},is:{active:function(e){switch(typeof e){case"object":return $(e).hasClass(m.active);case"string":return t.find(v.item+"[data-"+h.accordion+'="'+e+'"]').hasClass(m.active);case"number":return t.eq(e).find(v.item).hasClass(m.active)}}},should:{},get:{current:{metadata:function(){return r.attr("data-"+h.accordion)},index:function(){return a.index(r)}},select:{metadata:function(e){return $(e).attr("data-"+h.accordion)},index:function(e){return a.index(e)}}},set:{initialLoad:function(){d=!0},headers:function(){t=w.find(v.header).first().parent().children(v.header)},items:function(){a=t.find(v.item)},contents:function(){s=t.first().siblings(v.content)},currentItem:function(e){switch(typeof e){case"object":r=$(e);break;case"string":var t=a.filter(v.item+"[data-"+h.accordion+'="'+e+'"]'),i=t.length;r=i?t:a.first();break;case"number":t=a.eq(e),i=t.length;r=i?t:a.first()}},currentContent:function(e){switch(typeof e){case"object":c=$(e).parent(v.header).next(v.content);break;case"string":var t=s.filter(v.content+"[data-"+h.accordion+'="'+e+'"]'),i=t.length;c=i?t:s.first();break;case"number":t=s.eq(e),i=t.length;c=i?t:s.first()}},id:function(){u=(Math.random().toString(16)+"000000000").substr(2,8),l="."+u}},remove:{initialLoad:function(){d=!1}},bind:{events:function(){t.on("click"+l,v.item,p.event.click)}},unbind:{events:function(){t.off("click"+l)}},event:{click:function(e){if(!f.block){var t=$(this).data(h.accordion);t?p.change(t):p.change(this)}e.preventDefault()}}},n?(void 0===b&&p.initialize(),p.invoke(i)):(void 0!==b&&b.invoke("destroy"),p.initialize())}),void 0!==e?e:this},RootUI.prototype.accordion.settings={name:"Accordion",namespace:"accordion",metadata:{accordion:"accordion"},selector:{accordion:".accordion",header:".accordion-header",item:".accordion-item",content:".accordion-content"},className:{active:"is-active"},firstAutoOpen:!0,collapsible:!0,exclusive:!0,closeNested:!1,path:!1,block:!1,duration:250,easing:"swing",onOpening:function(){},onOpen:function(){},onClosing:function(){},onClose:function(){},onChanging:function(){},onChange:function(){}},RootUI.prototype.checker=function(){var e,t=$(arguments[0]),i=arguments[1],n="string"==typeof i,o=[].slice.call(arguments,1);return t.each(function(){var t,a=$.extend(!0,{},RootUI.prototype.checker.settings,i),s=a.selector,r=a.className,c=a.namespace,d="."+c,l="module-"+c,u=$(this),p=$(this).children(s.input),f=(p[0],null),v=!1,m=!1,h=u.data(l),g=this;t={initialize:function(){t.bind.events(),t.instantiate(),t.setup()},instantiate:function(){h=t,u.data(l,t)},setup:function(){t.set.initialLoad(),t.is.indeterminate()?t.indeterminate():t.is.checked()?t.check():t.uncheck(),t.is.disabled()&&t.disable(),t.remove.initialLoad(),a.onLoad.call(g)},invoke:function(t,i,n){var a,s,r,c=h;return i=i||o,n=g||n,"string"==typeof t&&void 0!==c&&(t=t.split(/[\. ]/),a=t.length-1,$.each(t,function(e,i){var n=e!=a?i+t[e+1].charAt(0).toUpperCase()+t[e+1].slice(1):t;if($.isPlainObject(c[n])&&e!=a)c=c[n];else{if(void 0!==c[n])return s=c[n],!1;if(!$.isPlainObject(c[i])||e==a)return void 0!==c[i]&&(s=c[i],!1);c=c[i]}})),$.isFunction(s)?r=s.apply(n,i):void 0!==s&&(r=s),$.isArray(e)?e.push(r):void 0!==e?e=[e,r]:void 0!==r&&(e=r),s},check:function(){t.can.change()&&t.should.allowCheck()&&(t.set.checked(),t.should.ignoreCallbacks()||(a.onChecked.call(g),a.onChange.call(g)))},uncheck:function(){t.can.change()&&t.should.allowUncheck()&&(t.set.unchecked(),t.should.ignoreCallbacks()||(a.onUnchecked.call(g),a.onChange.call(g)))},indeterminate:function(){t.can.change()&&t.should.allowIndeterminate()&&(t.set.indeterminate(),t.should.ignoreCallbacks()||(a.onIndeterminate.call(g),a.onChange.call(g)))},determinate:function(){t.can.change()&&t.should.allowDeterminate()&&(t.set.determinate(),t.should.ignoreCallbacks()||(a.onDeterminate.call(g),a.onChange.call(g)))},enable:function(){t.is.enabled()&&!t.is.initialLoad()||(t.set.enabled(),t.should.ignoreCallbacks()||a.onEnable.call(g))},disable:function(){t.is.disabled()&&!t.is.initialLoad()||(t.set.disabled(),t.should.ignoreCallbacks()||a.onDisable.call(g))},toggle:function(){t.can.change()&&(t.is.indeterminate()||t.is.unchecked()?t.check():t.is.checked()&&t.can.uncheck()&&t.uncheck())},readonly:function(){t.is.readonly()||t.set.readonly(),t.should.ignoreCallbacks()||a.onReadonly.call(g)},write:function(){t.is.readonly()&&t.set.wrote(),t.should.ignoreCallbacks()||a.onWrite.call(g)},each:{},create:{},is:{initialLoad:function(){return v},checked:function(){return void 0!==p.prop("checked")&&p.prop("checked")},unchecked:function(){return!t.is.checked()},enabled:function(){return!t.is.disabled()},disabled:function(){return void 0!==p.prop("disabled")&&p.prop("disabled")},indeterminate:function(){return void 0!==p.prop("indeterminate")&&p.prop("indeterminate")},determinate:function(){return!t.is.indeterminate()},readonly:function(){return u.hasClass(r.readonly)},wrote:function(){return!t.is.readonly()},radio:function(){return"radio"==p.attr("type")}},should:{allowCheck:function(){return(!t.is.determinate()||!t.is.checked())&&!1!==a.beforeChecked.apply(g)},allowUncheck:function(){return(!t.is.determinate()||!t.is.unchecked())&&!1!==a.beforeUnchecked.apply(g)},allowIndeterminate:function(){return!(t.is.indeterminate()&&!t.should.forceCallbacks())&&!1!==a.beforeIndeterminate.apply(g)},allowDeterminate:function(){return!(t.is.determinate()&&!t.should.forceCallbacks())&&!1!==a.beforeDeterminate.apply(g)},forceCallbacks:function(){return t.is.initialLoad()&&a.fireOnInit},ignoreCallbacks:function(){return t.is.initialLoad()&&!a.fireOnInit}},can:{change:function(){return!(t.is.disabled()||t.is.readonly())},uncheck:function(){return"boolean"==typeof a.uncheckable?a.uncheckable:!t.is.radio()}},get:{},set:{initialLoad:function(){v=!0},checked:function(){u.removeClass(r.indeterminate).addClass(r.checked),p.prop("indeterminate",!1).prop("checked",!0)},unchecked:function(){u.removeClass(r.indeterminate).removeClass(r.checked),p.prop("indeterminate",!1).prop("checked",!1)},indeterminate:function(){u.addClass(r.indeterminate).removeClass(r.checked),p.prop("indeterminate",!0).prop("checked",!1)},determinate:function(){u.removeClass(r.indeterminate),p.prop("indeterminate",!1)},enabled:function(){u.removeClass(r.disabled),p.prop("disabled",!1)},disabled:function(){u.addClass(r.disabled),p.prop("disabled","disabled")},readonly:function(){u.addClass(r.readonly),p.prop("readonly",!0)},wrote:function(){u.removeClass(r.readonly),p.prop("readonly",!1)}},remove:{initialLoad:function(){v=!1}},bind:{events:function(){u.on("click",+d,s.label,t.event.click).on("keydown"+d,s.input,t.event.keydown).on("keyup"+d,s.input,t.event.keyup)}},event:{click:function(e){f=$(e.target),f.is(s.link)||t.is.enabled()&&(t.toggle(),p.focus(),e.preventDefault())},keydown:function(e){var i=e.which,n={enter:13,space:32};e.ctrlKey||i!=n.space&&i!=n.enter?m=!1:(t.toggle(),m=!0)},keyup:function(e){m&&e.preventDefault()}}},n?(void 0===h&&t.initialize(),t.invoke(i)):(void 0!==h&&h.invoke("destroy"),t.initialize())}),void 0!==e?e:this},RootUI.prototype.checker.settings={name:"Checker",namespace:"checker",selector:{input:'input[type="checkbox"], input[type="radio"]',label:"label"},className:{checked:"is-checked",disabled:"is-disabled",indeterminate:"is-indeterminate",readonly:"is-readonly"},uncheckable:"auto",fireOnInit:!1,onLoad:function(){},onChange:function(){},onChecked:function(){},onUnchecked:function(){},onDeterminate:function(){},onIndeterminate:function(){},onEnable:function(){},onDisable:function(){},onReadonly:function(){},onWrite:function(){},beforeChecked:function(){},beforeUnchecked:function(){},beforeDeterminate:function(){},beforeIndeterminate:function(){}},RootUI.prototype.modal=function(){var e,t=$(arguments[0]),i=$(window),n=$("body"),o=arguments[1],a="string"==typeof o,s=[].slice.call(arguments,1);return t.each(function(){var t,r,c=$.isPlainObject(o)?$.extend(!0,{},RootUI.prototype.modal.settings,o):$.extend({},RootUI.prototype.modal.settings),d=(c.selector,c.className),l=(c.metadata,c.namespace,c.namespace,"module-"+c.namespace),u=$(this),p=u.data(l),f=this;r={initialize:function(){r.bind.events(),r.instantiate()},instantiate:function(){p=r,u.data(l,r)},setup:function(){},invoke:function(t,i,n){var o,a,r,c=p;return i=i||s,n=f||n,"string"==typeof t&&void 0!==c&&(t=t.split(/[\. ]/),o=t.length-1,$.each(t,function(e,i){var n=e!=o?i+t[e+1].charAt(0).toUpperCase()+t[e+1].slice(1):t;if($.isPlainObject(c[n])&&e!=o)c=c[n];else{if(void 0!==c[n])return a=c[n],!1;if(!$.isPlainObject(c[i])||e==o)return void 0!==c[i]&&(a=c[i],!1);c=c[i]}})),$.isFunction(a)?r=a.apply(n,i):void 0!==a&&(r=a),$.isArray(e)?e.push(r):void 0!==e?e=[e,r]:void 0!==r&&(e=r),a},show:function(){r.is.show()||(c.onShow.call(f),r.set.show(),c.scrollLock&&(r.set.offsetY(),r.set.positionTop(),r.set.fixed()),c.onVisible.call(f))},hide:function(){r.is.show()&&(c.onHide.call(f),r.set.hide(),c.scrollLock&&(r.remove.fixed(),r.remove.positionTop(),r.set.scrollTop()),c.onHidden.call(f))},each:{},create:{},is:{show:function(){return u.hasClass(d.show)},hide:function(){return!r.is.show()}},should:{},get:{offsetY:function(){return i.scrollTop()}},set:{show:function(){u.addClass(d.show)},hide:function(){u.removeClass(d.show)},fixed:function(){n.addClass(d.fixed)},offsetY:function(){t=i.scrollTop()},scrollTop:function(){i.scrollTop(t)},positionTop:function(){n.css("top",-t)}},remove:{fixed:function(){n.removeClass(d.fixed)},positionTop:function(){n.css("top","")}},bind:{events:function(){"click"!=c.on&&"mousedown"!=c.on||u.on("mousedown",r.event.mousedown)}},event:{mousedown:function(e){e.target==this&&r.hide()}}},a?(void 0===p&&r.initialize(),r.invoke(o)):(void 0!==p&&p.invoke("destroy"),r.initialize())}),void 0!==e?e:this},RootUI.prototype.modal.settings={name:"Modal",namespace:"modal",metadata:{modal:"modal"},className:{show:"is-show",fixed:"is-fixed"},on:"click",scrollLock:!0,onShow:function(){},onVisible:function(){},onHide:function(){},onHidden:function(){}},RootUI.prototype.select=function(){var e,t=$(arguments[0]),i=$(window),n=$(document),o=$("html"),a=$("body"),s=arguments[1],r=(arguments[2],"string"==typeof s),c=[].slice.call(arguments,1);return t.each(function(){var t,d,l,u=$.isPlainObject(s)?$.extend(!0,{},RootUI.prototype.select.settings,s):$.extend({},RootUI.prototype.select.settings),p=u.selector,f=u.className,v=u.metadata,m=(u.namespace,"."+u.namespace),h="module-"+u.namespace,g=$(this),w=g.data(h),b=this;l={initialize:function(){l.setup(),l.instantiate(),l.bind.events()},instantiate:function(){w=l,g.data(h,l)},setup:function(){l.set.initialLoad(),u.usePseudo&&(l.create.pseudo(),l.set.origin.tabIndex(),l.set.origin.hidden(),u.useModal&&l.set.modal()),!1!==u.selectedValue&&l.change(u.selectedValue),u.onLoad.call(b),l.remove.initialLoad()},invoke:function(t,i,n){var o,a,s,r=w;return i=i||c,n=b||n,"string"==typeof t&&void 0!==r&&(t=t.split(/[\. ]/),o=t.length-1,$.each(t,function(e,i){var n=e!=o?i+t[e+1].charAt(0).toUpperCase()+t[e+1].slice(1):t;if($.isPlainObject(r[n])&&e!=o)r=r[n];else{if(void 0!==r[n])return a=r[n],!1;if(!$.isPlainObject(r[i])||e==o)return void 0!==r[i]&&(a=r[i],!1);r=r[i]}})),$.isFunction(a)?s=a.apply(n,i):void 0!==a&&(s=a),$.isArray(e)?e.push(s):void 0!==e?e=[e,s]:void 0!==s&&(e=s),a},active:function(){if(l.is.active())return!1;l.set.active(),l.is.spaceFull()?l.set.upward():l.remove.upward(),u.useModal&&u.scrollLock&&(l.set.offsetY(),l.set.positionTop(),l.set.fixed()),l.focus.pseudo.selectedItem(),u.onActive.call(b)},inactive:function(){if(!l.is.active())return!1;l.set.inactive(),l.remove.upward(),u.useModal&&u.scrollLock&&(l.remove.fixed(),l.remove.positionTop(),l.set.scrollTop()),l.focus.pseudo.selected(),u.onInactive.call(b)},change:function(e,i){var n,o,a=l.get.value();if(u.usePseudo){switch(typeof e){case"object":n=$(e).attr("data-"+v.value),o=e;break;case"string":if("string"==typeof i){n=i,o=g.find(p.pseudo.item+"[data-"+v.value+"="+n+"]").get(0);break}if("number"==typeof i){var s=g.find(p.pseudo.option);n=s.eq(i).find(p.pseudo.item).attr("data-"+v.value),o=s.eq(i).find(p.pseudo.item).get(0);break}default:return!1}var r=void 0!==o;if(n===a||!r)return!1;l.set.origin.selected(o),l.set.pseudo.selected(),l.set.pseudo.selectedItem()}else l.set.origin.selected(e);t||u.onChange.call(b)},destroy:function(){l.unbind.events(),l.inactive(),u.useModal&&l.remove.modal(),l.remove.origin.tabIndex(),l.remove.origin.hidden(),l.remove.pseudo.select(),l.remove.data()},each:{},create:{pseudo:function(){g.append(u.tag.select).children().last().addClass(f.pseudo.select).append(u.tag.selected).children().addClass(f.pseudo.selected),l.set.pseudo.selected(),g.find(p.pseudo.select).append(u.tag.list).children().last().addClass(f.pseudo.list);var e,t,i,n,o=g.find(p.origin.option),a=g.find(p.pseudo.list);a.children().length&&(a=a.children()),o.each(function(o,s){var r=$(s).parent().prop("tagName");if("SELECT"==r)a.append(u.tag.option),i=a.children().last().addClass(f.pseudo.option);else if("OPTGROUP"==r){var c=$(s).prev().length>0;c||(a.append(u.tag.optgroup),e=a.children().last(),e.addClass(f.pseudo.optgroup),e.prepend(u.tag.label),t=e.children().first().addClass(f.pseudo.label),t.text($(s).parent().attr(v.label)),e=t.next()&&e.children().last()),e.append(u.tag.option),i=e.children().last().addClass(f.pseudo.option)}i.append(u.tag.item),n=i.children().addClass(f.pseudo.item);var d=$(s).attr(v.value),l=$(s).text();n.attr("data-"+v.value,d).text(l)}),l.set.pseudo.selectedItem()}},is:{active:function(){return g.hasClass(f.active)},inactive:function(){return!l.is.active()},modal:function(){return g.hasClass(f.modal)},spaceFull:function(){var e=i.height(),t=i.scrollTop(),n=g.offset().top,o=g.outerHeight(),a=g.find(p.pseudo.list).outerHeight();return e+t<=n+o+a},ie:function(){return o.attr("data-"+v.browser)==u.value.ie}},should:{},get:{value:function(){return g.find(p.origin.option+p.origin.selected)[0].value},text:function(){return g.find(p.origin.option+p.origin.selected)[0].text},offsetY:function(){return i.scrollTop()},origin:{selected:function(){return g.find(p.origin.option+p.origin.selected)[0]}},focused:{index:function(){var e,t=g.find(p.pseudo.option);return t.each(function(t){if($(this).find(p.pseudo.item+":focus").length)return e=t,!1}),e}},selected:{index:function(){var e,t=g.find(p.pseudo.option);return t.each(function(t){if($(this).find(p.pseudo.item).hasClass(f.selected))return e=t,!1}),e}}},set:{initialLoad:function(){t=!0},active:function(){g.addClass(f.active)},inactive:function(){g.removeClass(f.active)},modal:function(){g.addClass(f.modal)},fixed:function(){a.addClass(f.fixed)},offsetY:function(){d=i.scrollTop()},scrollTop:function(){i.scrollTop(d)},positionTop:function(){a.css("top",-d)},origin:{selected:function(e){var t;if(u.usePseudo)t=$(e).attr("data-"+v.value);else switch(typeof e){case"string":t=e;break;case"number":t=g.find(p.origin.option).eq(e).val()}g.find(p.origin.select).val(t)},tabIndex:function(){g.find(p.origin.select).attr("tabindex",-1)},hidden:function(){g.find(p.origin.select).addClass(f.hidden)}},pseudo:{selected:function(){var e=l.get.value(),t=l.get.text();g.find(p.pseudo.selected).attr("data-"+v.value,e).text(t)},selectedItem:function(){var e=l.get.value();g.find(p.pseudo.item).removeClass(f.selected),g.find(p.pseudo.item+"[data-"+v.value+"="+e+"]").addClass(f.selected)}},upward:function(){g.addClass(f.upward)}},remove:{initialLoad:function(){t=!1},fixed:function(){a.removeClass(f.fixed)},positionTop:function(){a.css("top","")},data:function(){g.removeData(h)},modal:function(){g.removeClass(f.modal)},upward:function(){g.removeClass(f.upward)},origin:{tabIndex:function(){g.find(p.origin.select).attr("tabindex","")},hidden:function(){g.find(p.origin.select).removeClass(f.hidden)}},pseudo:{select:function(){g.find(p.pseudo.select).remove()}}},focus:{pseudo:{selected:function(){g.find(p.pseudo.selected).focus()},selectedItem:function(){var e=l.get.value();g.find(p.pseudo.item+"[data-"+v.value+"="+e+"]").focus()},nextItem:function(){var e=g.find(p.pseudo.option),t=l.get.focused.index();e.eq(t+1).children(p.pseudo.item).focus()},prevItem:function(){var e=g.find(p.pseudo.option),t=l.get.focused.index();t-1>=0&&e.eq(t-1).children(p.pseudo.item).focus()}}},select:{pseudo:{nextItem:function(){var e=g.find(p.pseudo.option),t=l.get.selected.index();if(e.eq(t+1).length){var i=e.eq(t+1).children(p.pseudo.item).get(0);l.change(i)}},prevItem:function(){var e=g.find(p.pseudo.option),t=l.get.selected.index();if(t-1>=0){var i=e.eq(t-1).children(p.pseudo.item).get(0);l.change(i)}}}},bind:{events:function(){n.on("click"+m,l.event.click.document),g.on("click",p.origin.select,l.event.click.origin.select).on("keydown",p.origin.select,l.event.keydown.origin.select).on("change",p.origin.select,l.event.change.origin.select).on("click",p.pseudo.selected,l.event.click.pseudo.selected).on("click",p.pseudo.item,l.event.click.pseudo.item).on("keydown",p.pseudo.selected,l.event.keydown.pseudo.selected).on("keydown",p.pseudo.item,l.event.keydown.pseudo.item),u.useModal&&g.on("click",p.pseudo.modal,l.event.click.pseudo.modal)}},unbind:{events:function(){n.off("click"+m),g.off("click",p.origin.select).off("click",p.pseudo.selected).off("click",p.pseudo.item).off("keydown",p.pseudo.selected).off("keydown",p.pseudo.item),u.useModal&&g.off("click",p.pseudo.modal)}},event:{click:{document:function(e){var t=$(e.target),i=t.closest(g).length>0,n=l.is.active(),o=t.is(u.ignoreTarget)||t.closest(u.ignoreTarget).length;o||i||!n||l.inactive()},origin:{select:function(){var e=l.is.ie(),t=l.is.active();e||(t?l.inactive():l.active())}},pseudo:{selected:function(){var e=l.is.active();e?l.inactive():l.active()},item:function(e){var t=e.currentTarget;l.change(t),l.inactive()},modal:function(e){var t=l.is.active(),i=$(e.target).closest(p.pseudo.selected).length;!i&&t&&l.inactive()}}},keydown:{origin:{select:function(e){var t=l.is.ie(),i=l.is.active(),n=e.which,o={enter:13,space:32};switch(!0){case!e.ctrlKey&&n==o.enter:t?l.inactive():i?l.inactive():l.active();break;case!e.ctrlKey&&n==o.space:l.active()}}},pseudo:{selected:function(e){var t=e.which,i={enter:13,left:37,up:38,right:39,down:40};t===i.left||t===i.up?(l.select.pseudo.prevItem(),e.preventDefault()):t!==i.right&&t!==i.down||(l.select.pseudo.nextItem(),e.preventDefault())},item:function(e){var t=e.which,i={enter:13,left:37,up:38,right:39,down:40};if(t===i.left||t===i.up)l.focus.pseudo.prevItem(),e.preventDefault();else if(t===i.right||t===i.down)l.focus.pseudo.nextItem(),e.preventDefault();else if(t===i.enter){var n=e.currentTarget;l.change(n),l.focus.pseudo.selected()}}}},change:{origin:{select:function(){u.usePseudo&&(l.set.pseudo.selected(),l.set.pseudo.selectedItem()),u.onChange()}}}}},r?(void 0===w&&l.initialize(),l.invoke(s)):(void 0!==w&&w.invoke("destroy"),l.initialize())}),void 0!==e?e:this},RootUI.prototype.select.settings={name:"select",namespace:"select",metadata:{value:"value",label:"label",select:"select",selected:"selected",method:"method",browser:"browser-name"},selector:{origin:{select:"select",optgroup:"optgroup",option:"option",selected:":selected"},pseudo:{select:".pseudo-select",selected:".pseudo-selected",optgroup:".pseudo-optgroup",label:".pseudo-label",option:".pseudo-option",list:".pseudo-list",item:".pseudo-item"}},className:{modal:"select-modal",active:"is-active",hidden:"is-hidden",selected:"is-selected",fixed:"is-fixed",upward:"is-upward",pseudo:{select:"pseudo-select",selected:"pseudo-selected",optgroup:"pseudo-optgroup",label:"pseudo-label",option:"pseudo-option",list:"pseudo-list",item:"pseudo-item",modal:"pseudo-modal"}},value:{ie:"IE"},tag:{select:"<div></div>",selected:'<button type="button"></button>',list:"<div><ul></ul></div>",optgroup:"<li><ul></ul></li>",label:"<span></span>",option:"<li></li>",item:'<button type="button"></button>'},usePseudo:!0,useModal:!1,scrollLock:!0,selectedValue:!1,ignoreTarget:!1,onLoad:function(){},onActive:function(){},onInactive:function(){},onChange:function(){}},RootUI.prototype.tab=function(){var e,t=$(arguments[0]),i=$(window),n=arguments[1],o="string"==typeof n,a=[].slice.call(arguments,1);return t.each(function(){var t,s,r,c,d,l,u,p,f=$.isPlainObject(n)?$.extend(!0,{},RootUI.prototype.tab.settings,n):$.extend({},RootUI.prototype.tab.settings),v=f.selector,m=f.className,h=f.metadata,g=(f.namespace,f.namespace,"module-"+f.namespace),w=$(this),b=w.data(g),y=this;p={initialize:function(){p.setup(),p.instantiate(),p.bind.events()},instantiate:function(){b=p,w.data(g,p)},setup:function(){p.set.navigation(),p.set.items(),p.set.contents(),p.set.id();var e=f.path,t=f.history;if(e)t&&p.set.location(e);else if(t){var i=p.get.hash();i&&(e=i)}p.default(e)},invoke:function(t,i,n){var o,s,r,c=b;return i=i||a,n=y||n,"string"==typeof t&&void 0!==c&&(t=t.split(/[\. ]/),o=t.length-1,$.each(t,function(e,i){var n=e!=o?i+t[e+1].charAt(0).toUpperCase()+t[e+1].slice(1):t;if($.isPlainObject(c[n])&&e!=o)c=c[n];else{if(void 0!==c[n])return s=c[n],!1;if(!$.isPlainObject(c[i])||e==o)return void 0!==c[i]&&(s=c[i],!1);c=c[i]}})),$.isFunction(s)?r=s.apply(n,i):void 0!==s&&(r=s),$.isArray(e)?e.push(r):void 0!==e?e=[e,r]:void 0!==r&&(e=r),s},current:function(e){p.set.currentItem(e),p.set.currentContent(e)},open:function(){p.active.item(),p.active.content()},close:function(){p.inactive.item(),p.inactive.content()},default:function(e){if(f.history){var i=w.find(v.item+"[data-"+h.tab+'="'+e+'"]').length>0;if(i){var n=p.utilities.pathToArray(e);$.each(n,function(i){var o=n.slice(0,i+1),a=p.utilities.arrayToPath(o),s=t.find(v.item+"[data-"+h.tab+'="'+a+'"]').length>0;if(s)return e=a,!1})}}p.current(e),p.open()},change:function(e,t){p.close(),void 0===t?p.default(e):p.default(t),f.onChange.call(y)},destroy:function(){p.close(),p.unbind.events(),w.removeData(g)},active:{item:function(){c.addClass(m.active)},content:function(){d.addClass(m.active)}},inactive:{item:function(){c.removeClass(m.active)},content:function(){d.removeClass(m.active)}},get:{hash:function(){return window.location.hash.slice(2)},activePath:function(){return s.filter(v.active).data(h.tab)}},set:{navigation:function(){t=w.find(v.nav).first()},items:function(){s=t.find(v.item)},contents:function(){r=w.find(v.content)},currentItem:function(e){var t=s.filter("[data-"+h.tab+'="'+e+'"]');c=t.length?t:s.first()},currentContent:function(e){var t=r.filter("[data-"+h.tab+'="'+e+'"]');d=t.length?t:r.first()},location:function(e){window.location.hash=f.pathDivider+e},id:function(){u=(Math.random().toString(16)+"000000000").substr(2,8),l="."+u}},remove:{data:function(){w.removeData(g)}},utilities:{pathToArray:function(e){return"string"==typeof e?e.split(f.pathDivider):[e]},arrayToPath:function(e){return!!$.isArray(e)&&e.join(f.pathDivider)}},bind:{events:function(){f.history&&i.on("hashchange"+l,p.event.hashchange),s.on("click",p.event.click.item)}},unbind:{events:function(){i.off(l),s.off("click")}},event:{hashchange:function(){if(f.history){var e=p.get.hash(),t=w.find("[data-"+h.tab+'="'+e+'"]').length,i=w.closest("[data-"+h.tab+'="'+e+'"]').length;(t||i)&&p.change(e)}},click:{item:function(e){var t=$(this).data(h.tab);f.history?p.set.location(t):p.change(t),e.preventDefault()}}}},o?(void 0===b&&p.initialize(),p.invoke(n)):(void 0!==b&&b.invoke("destroy"),p.initialize())}),void 0!==e?e:this},RootUI.prototype.tab.settings={name:"Tab",namespace:"tab",metadata:{tab:"tab"},selector:{tab:".tab",nav:".tab-nav",item:".tab-item",content:".tab-content",active:".is-active"},className:{active:"is-active"},history:!1,path:!1,pathDivider:"/",onChange:function(){}},RootUI.prototype.circular=function(){var e,t=$(arguments[0]),i=$(window),n=($("body"),arguments[1]),o="string"==typeof n,a=[].slice.call(arguments,1);return t.each(function(){var t,s,r,c,d,l,u,p,f,v,m,h,g,w,b,y,k,x,C,I,T,A,R,z=$.isPlainObject(n)?$.extend(!0,{},RootUI.prototype.circular.settings,n):$.extend({},RootUI.prototype.circular.settings),U=z.selector,O=z.className,M=(z.metadata,z.namespace,z.namespace,"module-"+z.namespace),N=$(this),S=this,L=N.data(M),E=N.find(U.list),P=N.find(U.item),D=N.find(U.dot),j=!1,V=!1,B=!1,q=!1,F=57.29577951308232,_=0,G=0,H=0,W=0,Y=0,X=0,K=0;R={initialize:function(){R.setup(),R.instantiate(),R.bind.events()},instantiate:function(){L=R,N.data(M,R)},setup:function(){R.set.initOption(),R.set.itemsPosition(),R.set.id(),0==m&&R.set.initAngle(),g&&R.set.itemsOpacity(),B=R.has.minMaxRotate()},destroy:function(){R.unbind.events(),R.remove.raf(),R.remove.timer(),R.set.close(),P.css("opacity","")},invoke:function(t,i,n){var o,s,r,c=L;return i=i||a,n=S||n,"string"==typeof t&&void 0!==c&&(t=t.split(/[\. ]/),o=t.length-1,$.each(t,function(e,i){var n=e!=o?i+t[e+1].charAt(0).toUpperCase()+t[e+1].slice(1):t;if($.isPlainObject(c[n])&&e!=o)c=c[n];else{if(void 0!==c[n])return s=c[n],!1;if(!$.isPlainObject(c[i])||e==o)return void 0!==c[i]&&(s=c[i],!1);c=c[i]}})),$.isFunction(s)?r=s.apply(n,i):void 0!==s&&(r=s),$.isArray(e)?e.push(r):void 0!==e?e=[e,r]:void 0!==r&&(e=r),s},open:function(){m&&(V=!0,0==w&&(w=360/v),X=B?b:h,_=G=X+180,d=new Date,l=_,R.throw(),R.set.timer()),R.set.open(),z.onOpen.call(S)},close:function(){R.remove.raf(),R.remove.timer(),R.set.close(),z.onClose.call(S)},drag:function(){var e=W;void 0!==r&&j&&R.updateAngleToMouse(),R.updateAngle(),R.set.rotate(),R.set.raf(R.drag),Math.abs(W-e)&&z.onDragging.call(S)},throw:function(){if(q=!0,w?c=+new Date:(R.applySpeed(),R.applyInertia()),R.updateAngle(),R.set.rotate(),R.set.raf(R.throw),B&&0==w&&(_<=y||_>=b))return R.clear(),_<y?_=y:_>b&&(_=b),R.set.rotate(),!1;z.onThrowing.call(S),0==w&&Math.abs(Y)<x&&R.clear()},updateAngleToMouse:function(){var e=S.getBoundingClientRect(),i={x:e.left+e.width/2,y:e.top+e.height/2},n=Math.atan2(r.y-i.y,r.x-i.x)+Math.PI,o=n*F;void 0===t&&(s=G,t=o);var a=G;W=o-t,G=s+W;var c=G;if(B){var d=R.get.normalizeAngle(a),l=R.get.normalizeAngle(c);l-d>100?K-=1:l-d<-100&&(K+=1)}Y=R.get.differenceBetweenAngles(c,a)},updateAngle:function(){j||0==w?(_=R.get.normalizeAngle(G),B&&(H=_+360*K,_=H,_>b+T?_=b+T:_<y-T&&(_=y-T))):(_=R.set.easing(0,c-d,l,X-l,I),_<.001&&_>-.001?_=G=0:G=_),g&&R.set.itemsOpacity()},applySpeed:function(){C>0&&0!==Y&&0==j&&(G+=Y/5*k)},applyInertia:function(){C>0&&(Y*=C)},clear:function(){R.set.clear(),z.onStop.call(S)},each:{},create:{},is:{open:function(){return N.hasClass(O.open)},overAngle:function(){return _>b||_<y}},has:{minMaxRotate:function(){return y+b>0&&y>=0&&b>=0}},should:{},get:{itemsLength:function(){return N.find(U.item).length},differenceBetweenAngles:function(e,t){var i=e*(Math.PI/180),n=t*(Math.PI/180),o=Math.atan2(Math.sin(i-n),Math.cos(i-n)),a=o*(180/Math.PI);return Math.round(100*a/100)},normalizeAngle:function(e){var t=e;return t%=360,t<0&&(t=360+t),t}},set:{initOption:function(){v="auto"===z.itemsLength?R.get.itemsLength():z.itemsLength,m=!!z.openAnimation&&z.openAnimation,g=!("auto"===z.visibleItem||0==z.visibleItem||z.visibleItem<=0)&&z.visibleItem,w=z.snap?z.snap:0,b=z.maxRotation?z.maxRotation:0,y=z.minRotation?z.minRotation:0,h="auto"===z.initAngle?b:z.initAngle,A=z.correctAngle?z.correctAngle:0,k=z.velocity?z.velocity:1,x=z.minSpeed?z.minSpeed:.001,C=z.inertia?z.inertia:0,I=z.duration?z.duration:1e3,T=!1!==z.threshold?z.threshold:10},initDrag:function(){Y=0,t=void 0,s=void 0,r=void 0},initAngle:function(){_=h,R.set.rotate()},itemsPosition:function(){var e=E.innerWidth()/2-P.outerWidth()/2,t=2*Math.PI/v;P.each(function(i){var n,o,a=(i+A/(360/v))*t;n=Math.round(e*Math.cos(a)),o=Math.round(e*Math.sin(a)),$(this).css({top:o,left:n})})},itemsOpacity:function(){var e=b||h,t=_.toFixed(1)-e,i=w||360/v;P.each(function(e){var n,o=t+i*e;o+i>360&&(o-=360),o<0?(n=Math.max(0,Math.min(1,1.3-Math.abs(o)/i)),$(this).css("opacity",n)):o>(g-1)*i?(n=Math.max(0,Math.min(1,1.3-Math.abs(g-1-o/i))),$(this).css("opacity",n)):$(this).css("opacity",1),V&&e>g&&$(this).css("opacity",0)})},open:function(){N.addClass(O.open)},close:function(){N.removeClass(O.open)},clear:function(){0==z.snap&&(w=z.snap),q=!1,W=0,R.remove.raf()},target:function(){X=Math.round(_/w)*w+Math.round(5*Y*k/w)*w,B&&(X>b?X=b:X<y&&(X=y))},easing:function(e,t,i,n,o){return-n*((t=t/o-1)*t*t*t-1)+i},raf:function(e){p=window.requestAnimationFrame(e)},timer:function(){f=setTimeout(function(){R.clear()},I)},rotate:function(){E.css("transform","rotate("+_+"deg)"),P.css("transform","rotate("+-_+"deg)")},id:function(){u=(Math.random().toString(16)+"000000000").substr(2,8),"."+u}},remove:{raf:function(){window.cancelAnimationFrame(p)},timer:function(){clearTimeout(f)}},bind:{events:function(){"ontouchstart"in document.documentElement?(E.on("touchstart",R.event.onRotationStart),i.on("touchmove",R.event.onRotated).on("touchend",R.event.onRotationStop)):(E.on("mousedown",R.event.onRotationStart),i.on("mousemove",R.event.onRotated).on("mouseup",R.event.onRotationStop)),D.on("click",R.event.click.dot)}},unbind:{events:function(){"ontouchstart"in document.documentElement?(E.off("touchstart"),i.off("touchmove").off("touchend")):(E.off("mousedown"),i.off("mousemove").off("mouseup")),D.off("click")}},event:{click:{dot:function(){var e=R.is.open();e?R.close():R.open()}},
  onRotationStart:function(){1==q?R.set.clear():W=0,j=!0,V=!1,K=0,G=_,R.remove.timer(),R.set.initDrag(),R.set.raf(R.drag)},onRotated:function(e){if(!0===j)if(e.stopPropagation(),e.preventDefault(),void 0!==e.originalEvent.touches){var t=e.originalEvent.touches[0];r={x:t.clientX,y:t.clientY}}else r={x:e.clientX,y:e.clientY}},onRotationStop:function(){j&&(R.remove.raf(),(Math.abs(W)||B)&&(w&&(d=new Date,l=_,R.set.target(),R.set.timer()),(w||C)&&R.throw()),j=!1)}}},o?(void 0===L&&R.initialize(),R.invoke(n)):(void 0!==L&&L.invoke("destroy"),R.initialize())}),void 0!==e?e:this},RootUI.prototype.circular.settings={name:"Circular",namespace:"circular",className:{open:"is-open"},selector:{dot:".circular-dot-item",list:".circular-list-outer",item:".circular-list-outer-item"},itemsLength:"auto",initAngle:"auto",openAnimation:"auto",visibleItem:"auto",snap:0,maxRotation:0,minRotation:0,velocity:1,correctAngle:0,minSpeed:.01,inertia:.98,duration:1e3,threshold:10,onOpen:function(){},onClose:function(){},onDragging:function(){},onThrowing:function(){},onStop:function(){}},RootUI.prototype.checkResize=function(){var e=$(arguments[0]),t=arguments[1],i=$(window);return e.each(function(){var e,n,o=$.isPlainObject(t)?$.extend(!0,{},RootUI.prototype.checkResize.settings,t):$.extend({},RootUI.prototype.checkResize.settings),a=(o.selector,o.className),s=(o.attr,o.namespace,$(this));n={initialize:function(){n.setup(),n.bind.events()},setup:function(){},each:{},create:{},is:{resizing:function(){return s.hasClass(a.resizing)}},get:{},set:{resize:function(){clearTimeout(e),s.addClass(a.resizing),e=setTimeout(function(){s.removeClass(a.resizing)},o.duration)}},bind:{events:function(){i.on("resize",n.event.resize)}},event:{resize:function(){var e=n.is.resizing();e||n.set.resize()}}},n.initialize()}),this},RootUI.prototype.checkResize.settings={name:"CheckResize",namespace:"checkResize",selector:{},className:{resizing:"is-resizing"},attr:{dataGroup:"data-group",dataTarget:"data-target",dataName:"data-name"},duration:250},function(e,t){var i="0.7.21",n="",o="?",a="function",s="undefined",r="object",c="string",d="major",l="model",u="name",p="type",f="vendor",v="version",m="architecture",h="console",g="mobile",w="tablet",b="smarttv",y="wearable",k="embedded",x={extend:function(e,t){var i={};for(var n in e)t[n]&&t[n].length%2==0?i[n]=t[n].concat(e[n]):i[n]=e[n];return i},has:function(e,t){return"string"==typeof e&&-1!==t.toLowerCase().indexOf(e.toLowerCase())},lowerize:function(e){return e.toLowerCase()},major:function(e){return typeof e===c?e.replace(/[^\d\.]/g,"").split(".")[0]:t},trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},C={rgx:function(e,i){for(var n,o,s,c,d,l,u=0;u<i.length&&!d;){var p=i[u],f=i[u+1];for(n=o=0;n<p.length&&!d;)if(d=p[n++].exec(e),d)for(s=0;s<f.length;s++)l=d[++o],c=f[s],typeof c===r&&c.length>0?2==c.length?typeof c[1]==a?this[c[0]]=c[1].call(this,l):this[c[0]]=c[1]:3==c.length?typeof c[1]!==a||c[1].exec&&c[1].test?this[c[0]]=l?l.replace(c[1],c[2]):t:this[c[0]]=l?c[1].call(this,l,c[2]):t:4==c.length&&(this[c[0]]=l?c[3].call(this,l.replace(c[1],c[2])):t):this[c]=l||t;u+=2}},str:function(e,i){for(var n in i)if(typeof i[n]===r&&i[n].length>0){for(var a=0;a<i[n].length;a++)if(x.has(i[n][a],e))return n===o?t:n}else if(x.has(i[n],e))return n===o?t:n;return e}},$={browser:{oldsafari:{version:{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}}},device:{amazon:{model:{"Fire Phone":["SD","KF"]}},sprint:{model:{"Evo Shift 4G":"7373KT"},vendor:{HTC:"APA",Sprint:"Sprint"}}},os:{windows:{version:{ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2000:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"}}}},I={browser:[[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]+).+version\/([\w\.-]+)/i,/(opera).+version\/([\w\.]+)/i,/(opera)[\/\s]+([\w\.]+)/i],[u,v],[/(opios)[\/\s]+([\w\.]+)/i],[[u,"Opera Mini"],v],[/\s(opr)\/([\w\.]+)/i],[[u,"Opera"],v],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]*)/i,/(avant\s|iemobile|slim)(?:browser)?[\/\s]?([\w\.]*)/i,/(bidubrowser|baidubrowser)[\/\s]?([\w\.]+)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(rekonq)\/([\w\.]*)/i,/(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon)\/([\w\.-]+)/i],[u,v],[/(konqueror)\/([\w\.]+)/i],[[u,"Konqueror"],v],[/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i],[[u,"IE"],v],[/(edge|edgios|edga|edg)\/((\d+)?[\w\.]+)/i],[[u,"Edge"],v],[/(yabrowser)\/([\w\.]+)/i],[[u,"Yandex"],v],[/(Avast)\/([\w\.]+)/i],[[u,"Avast Secure Browser"],v],[/(AVG)\/([\w\.]+)/i],[[u,"AVG Secure Browser"],v],[/(puffin)\/([\w\.]+)/i],[[u,"Puffin"],v],[/(focus)\/([\w\.]+)/i],[[u,"Firefox Focus"],v],[/(opt)\/([\w\.]+)/i],[[u,"Opera Touch"],v],[/((?:[\s\/])uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[[u,"UCBrowser"],v],[/(comodo_dragon)\/([\w\.]+)/i],[[u,/_/g," "],v],[/(windowswechat qbcore)\/([\w\.]+)/i],[[u,"WeChat(Win) Desktop"],v],[/(micromessenger)\/([\w\.]+)/i],[[u,"WeChat"],v],[/(brave)\/([\w\.]+)/i],[[u,"Brave"],v],[/(whale)\/([\w\.]+)/i],[[u,"Whale"],v],[/(qqbrowserlite)\/([\w\.]+)/i],[u,v],[/(QQ)\/([\d\.]+)/i],[u,v],[/m?(qqbrowser)[\/\s]?([\w\.]+)/i],[u,v],[/(baiduboxapp)[\/\s]?([\w\.]+)/i],[u,v],[/(2345Explorer)[\/\s]?([\w\.]+)/i],[u,v],[/(MetaSr)[\/\s]?([\w\.]+)/i],[u],[/(LBBROWSER)/i],[u],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[v,[u,"MIUI Browser"]],[/;fbav\/([\w\.]+);/i],[v,[u,"Facebook"]],[/safari\s(line)\/([\w\.]+)/i,/android.+(line)\/([\w\.]+)\/iab/i],[u,v],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[v,[u,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[u,/(.+)/,"$1 WebView"],v],[/((?:oculus|samsung)browser)\/([\w\.]+)/i],[[u,/(.+(?:g|us))(.+)/,"$1 $2"],v],[/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i],[v,[u,"Android Browser"]],[/(sailfishbrowser)\/([\w\.]+)/i],[[u,"Sailfish Browser"],v],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[u,v],[/(dolfin)\/([\w\.]+)/i],[[u,"Dolphin"],v],[/(qihu|qhbrowser|qihoobrowser|360browser)/i],[[u,"360 Browser"]],[/((?:android.+)crmo|crios)\/([\w\.]+)/i],[[u,"Chrome"],v],[/(coast)\/([\w\.]+)/i],[[u,"Opera Coast"],v],[/fxios\/([\w\.-]+)/i],[v,[u,"Firefox"]],[/version\/([\w\.]+).+?mobile\/\w+\s(safari)/i],[v,[u,"Mobile Safari"]],[/version\/([\w\.]+).+?(mobile\s?safari|safari)/i],[v,u],[/webkit.+?(gsa)\/([\w\.]+).+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[[u,"GSA"],v],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[u,[v,C.str,$.browser.oldsafari.version]],[/(webkit|khtml)\/([\w\.]+)/i],[u,v],[/(navigator|netscape)\/([\w\.-]+)/i],[[u,"Netscape"],v],[/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([\w\.-]+)$/i,/(mozilla)\/([\w\.]+).+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\/\s]?([\w\.]+)/i,/(links)\s\(([\w\.]+)/i,/(gobrowser)\/?([\w\.]*)/i,/(ice\s?browser)\/v?([\w\._]+)/i,/(mosaic)[\/\s]([\w\.]+)/i],[u,v]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[[m,"amd64"]],[/(ia32(?=;))/i],[[m,x.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[[m,"ia32"]],[/windows\s(ce|mobile);\sppc;/i],[[m,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[[m,/ower/,"",x.lowerize]],[/(sun4\w)[;\)]/i],[[m,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|arm(?:64|(?=v\d+[;l]))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i],[[m,x.lowerize]]],device:[[/\((ipad|playbook);[\w\s\),;-]+(rim|apple)/i],[l,f,[p,w]],[/applecoremedia\/[\w\.]+ \((ipad)/],[l,[f,"Apple"],[p,w]],[/(apple\s{0,1}tv)/i],[[l,"Apple TV"],[f,"Apple"],[p,b]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad)/i,/(hp).+(tablet)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i],[f,l,[p,w]],[/(kf[A-z]+)\sbuild\/.+silk\//i],[l,[f,"Amazon"],[p,w]],[/(sd|kf)[0349hijorstuw]+\sbuild\/.+silk\//i],[[l,C.str,$.device.amazon.model],[f,"Amazon"],[p,g]],[/android.+aft([bms])\sbuild/i],[l,[f,"Amazon"],[p,b]],[/\((ip[honed|\s\w*]+);.+(apple)/i],[l,f,[p,g]],[/\((ip[honed|\s\w*]+);/i],[l,[f,"Apple"],[p,g]],[/(blackberry)[\s-]?(\w+)/i,/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]*)/i,/(hp)\s([\w\s]+\w)/i,/(asus)-?(\w+)/i],[f,l,[p,g]],[/\(bb10;\s(\w+)/i],[l,[f,"BlackBerry"],[p,g]],[/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone|p00c)/i],[l,[f,"Asus"],[p,w]],[/(sony)\s(tablet\s[ps])\sbuild\//i,/(sony)?(?:sgp.+)\sbuild\//i],[[f,"Sony"],[l,"Xperia Tablet"],[p,w]],[/android.+\s([c-g]\d{4}|so[-l]\w+)(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[l,[f,"Sony"],[p,g]],[/\s(ouya)\s/i,/(nintendo)\s([wids3u]+)/i],[f,l,[p,h]],[/android.+;\s(shield)\sbuild/i],[l,[f,"Nvidia"],[p,h]],[/(playstation\s[34portablevi]+)/i],[l,[f,"Sony"],[p,h]],[/(sprint\s(\w+))/i],[[f,C.str,$.device.sprint.vendor],[l,C.str,$.device.sprint.model],[p,g]],[/(htc)[;_\s-]+([\w\s]+(?=\)|\sbuild)|\w+)/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[f,[l,/_/g," "],[p,g]],[/(nexus\s9)/i],[l,[f,"HTC"],[p,w]],[/d\/huawei([\w\s-]+)[;\)]/i,/(nexus\s6p|vog-l29|ane-lx1|eml-l29)/i],[l,[f,"Huawei"],[p,g]],[/android.+(bah2?-a?[lw]\d{2})/i],[l,[f,"Huawei"],[p,w]],[/(microsoft);\s(lumia[\s\w]+)/i],[f,l,[p,g]],[/[\s\(;](xbox(?:\sone)?)[\s\);]/i],[l,[f,"Microsoft"],[p,h]],[/(kin\.[onetw]{3})/i],[[l,/\./g," "],[f,"Microsoft"],[p,g]],[/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?:?(\s4g)?)[\w\s]+build\//i,/mot[\s-]?(\w*)/i,/(XT\d{3,4}) build\//i,/(nexus\s6)/i],[l,[f,"Motorola"],[p,g]],[/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[l,[f,"Motorola"],[p,w]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[f,x.trim],[l,x.trim],[p,b]],[/hbbtv.+maple;(\d+)/i],[[l,/^/,"SmartTV"],[f,"Samsung"],[p,b]],[/\(dtv[\);].+(aquos)/i],[l,[f,"Sharp"],[p,b]],[/android.+((sch-i[89]0\d|shw-m380s|gt-p\d{4}|gt-n\d+|sgh-t8[56]9|nexus 10))/i,/((SM-T\w+))/i],[[f,"Samsung"],l,[p,w]],[/smart-tv.+(samsung)/i],[f,[p,b],l],[/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+))/i,/(sam[sung]*)[\s-]*(\w+-?[\w-]*)/i,/sec-((sgh\w+))/i],[[f,"Samsung"],l,[p,g]],[/sie-(\w*)/i],[l,[f,"Siemens"],[p,g]],[/(maemo|nokia).*(n900|lumia\s\d+)/i,/(nokia)[\s_-]?([\w-]*)/i],[[f,"Nokia"],l,[p,g]],[/android[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[l,[f,"Acer"],[p,w]],[/android.+([vl]k\-?\d{3})\s+build/i],[l,[f,"LG"],[p,w]],[/android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i],[[f,"LG"],l,[p,w]],[/(lg) netcast\.tv/i],[f,l,[p,b]],[/(nexus\s[45])/i,/lg[e;\s\/-]+(\w*)/i,/android.+lg(\-?[\d\w]+)\s+build/i],[l,[f,"LG"],[p,g]],[/(lenovo)\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+))/i],[f,l,[p,w]],[/android.+(ideatab[a-z0-9\-\s]+)/i],[l,[f,"Lenovo"],[p,w]],[/(lenovo)[_\s-]?([\w-]+)/i],[f,l,[p,g]],[/linux;.+((jolla));/i],[f,l,[p,g]],[/((pebble))app\/[\d\.]+\s/i],[f,l,[p,y]],[/android.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[f,l,[p,g]],[/crkey/i],[[l,"Chromecast"],[f,"Google"],[p,b]],[/android.+;\s(glass)\s\d/i],[l,[f,"Google"],[p,y]],[/android.+;\s(pixel c)[\s)]/i],[l,[f,"Google"],[p,w]],[/android.+;\s(pixel( [23])?( xl)?)[\s)]/i],[l,[f,"Google"],[p,g]],[/android.+;\s(\w+)\s+build\/hm\1/i,/android.+(hm[\s\-_]*note?[\s_]*(?:\d\w)?)\s+build/i,/android.+(mi[\s\-_]*(?:a\d|one|one[\s_]plus|note lte)?[\s_]*(?:\d?\w?)[\s_]*(?:plus)?)\s+build/i,/android.+(redmi[\s\-_]*(?:note)?(?:[\s_]*[\w\s]+))\s+build/i],[[l,/_/g," "],[f,"Xiaomi"],[p,g]],[/android.+(mi[\s\-_]*(?:pad)(?:[\s_]*[\w\s]+))\s+build/i],[[l,/_/g," "],[f,"Xiaomi"],[p,w]],[/android.+;\s(m[1-5]\snote)\sbuild/i],[l,[f,"Meizu"],[p,g]],[/(mz)-([\w-]{2,})/i],[[f,"Meizu"],l,[p,g]],[/android.+a000(1)\s+build/i,/android.+oneplus\s(a\d{4})[\s)]/i],[l,[f,"OnePlus"],[p,g]],[/android.+[;\/]\s*(RCT[\d\w]+)\s+build/i],[l,[f,"RCA"],[p,w]],[/android.+[;\/\s]+(Venue[\d\s]{2,7})\s+build/i],[l,[f,"Dell"],[p,w]],[/android.+[;\/]\s*(Q[T|M][\d\w]+)\s+build/i],[l,[f,"Verizon"],[p,w]],[/android.+[;\/]\s+(Barnes[&\s]+Noble\s+|BN[RT])(V?.*)\s+build/i],[[f,"Barnes & Noble"],l,[p,w]],[/android.+[;\/]\s+(TM\d{3}.*\b)\s+build/i],[l,[f,"NuVision"],[p,w]],[/android.+;\s(k88)\sbuild/i],[l,[f,"ZTE"],[p,w]],[/android.+[;\/]\s*(gen\d{3})\s+build.*49h/i],[l,[f,"Swiss"],[p,g]],[/android.+[;\/]\s*(zur\d{3})\s+build/i],[l,[f,"Swiss"],[p,w]],[/android.+[;\/]\s*((Zeki)?TB.*\b)\s+build/i],[l,[f,"Zeki"],[p,w]],[/(android).+[;\/]\s+([YR]\d{2})\s+build/i,/android.+[;\/]\s+(Dragon[\-\s]+Touch\s+|DT)(\w{5})\sbuild/i],[[f,"Dragon Touch"],l,[p,w]],[/android.+[;\/]\s*(NS-?\w{0,9})\sbuild/i],[l,[f,"Insignia"],[p,w]],[/android.+[;\/]\s*((NX|Next)-?\w{0,9})\s+build/i],[l,[f,"NextBook"],[p,w]],[/android.+[;\/]\s*(Xtreme\_)?(V(1[045]|2[015]|30|40|60|7[05]|90))\s+build/i],[[f,"Voice"],l,[p,g]],[/android.+[;\/]\s*(LVTEL\-)?(V1[12])\s+build/i],[[f,"LvTel"],l,[p,g]],[/android.+;\s(PH-1)\s/i],[l,[f,"Essential"],[p,g]],[/android.+[;\/]\s*(V(100MD|700NA|7011|917G).*\b)\s+build/i],[l,[f,"Envizen"],[p,w]],[/android.+[;\/]\s*(Le[\s\-]+Pan)[\s\-]+(\w{1,9})\s+build/i],[f,l,[p,w]],[/android.+[;\/]\s*(Trio[\s\-]*.*)\s+build/i],[l,[f,"MachSpeed"],[p,w]],[/android.+[;\/]\s*(Trinity)[\-\s]*(T\d{3})\s+build/i],[f,l,[p,w]],[/android.+[;\/]\s*TU_(1491)\s+build/i],[l,[f,"Rotor"],[p,w]],[/android.+(KS(.+))\s+build/i],[l,[f,"Amazon"],[p,w]],[/android.+(Gigaset)[\s\-]+(Q\w{1,9})\s+build/i],[f,l,[p,w]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[p,x.lowerize],f,l],[/[\s\/\(](smart-?tv)[;\)]/i],[[p,b]],[/(android[\w\.\s\-]{0,9});.+build/i],[l,[f,"Generic"]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[v,[u,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[v,[u,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[u,v],[/rv\:([\w\.]{1,9}).+(gecko)/i],[v,u]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[u,v],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],[u,[v,C.str,$.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[u,"Windows"],[v,C.str,$.os.windows.version]],[/\((bb)(10);/i],[[u,"BlackBerry"],v],[/(blackberry)\w*\/?([\w\.]*)/i,/(tizen|kaios)[\/\s]([\w\.]+)/i,/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i],[u,v],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]*)/i],[[u,"Symbian"],v],[/\((series40);/i],[u],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[u,"Firefox OS"],v],[/(nintendo|playstation)\s([wids34portablevu]+)/i,/(mint)[\/\s\(]?(\w*)/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|(?=\s)arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\/\s-]?(?!chrom)([\w\.-]*)/i,/(hurd|linux)\s?([\w\.]*)/i,/(gnu)\s?([\w\.]*)/i],[u,v],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[u,"Chromium OS"],v],[/(sunos)\s?([\w\.\d]*)/i],[[u,"Solaris"],v],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]*)/i],[u,v],[/(haiku)\s(\w+)/i],[u,v],[/cfnetwork\/.+darwin/i,/ip[honead]{2,4}(?:.*os\s([\w]+)\slike\smac|;\sopera)/i],[[v,/_/g,"."],[u,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)/i],[[u,"Mac OS"],[v,/_/g,"."]],[/((?:open)?solaris)[\/\s-]?([\w\.]*)/i,/(aix)\s((\d)(?=\.|\)|\s)[\w\.])*/i,/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms|fuchsia)/i,/(unix)\s?([\w\.]*)/i],[u,v]]},T=function(i,o){if("object"==typeof i&&(o=i,i=t),!(this instanceof T))return new T(i,o).getResult();var a=i||(e&&e.navigator&&e.navigator.userAgent?e.navigator.userAgent:n),s=o?x.extend(I,o):I;return this.getBrowser=function(){var e={name:t,version:t};return C.rgx.call(e,a,s.browser),e.major=x.major(e.version),e},this.getCPU=function(){var e={architecture:t};return C.rgx.call(e,a,s.cpu),e},this.getDevice=function(){var e={vendor:t,model:t,type:t};return C.rgx.call(e,a,s.device),e},this.getEngine=function(){var e={name:t,version:t};return C.rgx.call(e,a,s.engine),e},this.getOS=function(){var e={name:t,version:t};return C.rgx.call(e,a,s.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return a},this.setUA=function(e){return a=e,this},this};T.VERSION=i,T.BROWSER={NAME:u,MAJOR:d,VERSION:v},T.CPU={ARCHITECTURE:m},T.DEVICE={MODEL:l,VENDOR:f,TYPE:p,CONSOLE:h,MOBILE:g,SMARTTV:b,TABLET:w,WEARABLE:y,EMBEDDED:k},T.ENGINE={NAME:u,VERSION:v},T.OS={NAME:u,VERSION:v},typeof exports!==s?(typeof module!==s&&module.exports&&(exports=module.exports=T),exports.UAParser=T):"function"==typeof define&&define.amd?define(function(){return T}):e&&(e.UAParser=T);var A=e&&(e.jQuery||e.Zepto);if(A&&!A.ua){var R=new T;A.ua=R.getResult(),A.ua.get=function(){return R.getUA()},A.ua.set=function(e){R.setUA(e);var t=R.getResult();for(var i in t)A.ua[i]=t[i]}}}("object"==typeof window?window:this),RootUI.prototype.userAgent=function(){var e,t=$(arguments[0]),i=arguments[1],n="string"==typeof i,o=[].slice.call(arguments,1),a=new UAParser,s=a.getResult(),r=s.browser.name,c=s.browser.major,d=s.device.vendor,l=s.device.model,u=s.device.type,p=s.os.name,f=s.os.version,v=s.engine.name,m=s.engine.version;return t.each(function(){var t,a=$.isPlainObject(i)?$.extend(!0,{},RootUI.prototype.userAgent.settings,i):$.extend({},RootUI.prototype.userAgent.settings),s=(a.selector,a.className,a.attr),h=(a.namespace,a.userAgent,a.accessibility,a.namespace,"module-"+a.namespace),g=$(this),w=g.data(h),b=this;t={initialize:function(){t.setup(),t.instantiate(),t.bind.events()},instantiate:function(){w=t,g.data(h,t)},setup:function(){var e=t.has.agent();void 0===e&&t.set.agent()},invoke:function(t,i,n){var a,s,r,c=w;return i=i||o,n=b||n,"string"==typeof t&&void 0!==c&&(t=t.split(/[\. ]/),a=t.length-1,$.each(t,function(e,i){var n=e!=a?i+t[e+1].charAt(0).toUpperCase()+t[e+1].slice(1):t;if($.isPlainObject(c[n])&&e!=a)c=c[n];else{if(void 0!==c[n])return s=c[n],!1;if(!$.isPlainObject(c[i])||e==a)return void 0!==c[i]&&(s=c[i],!1);c=c[i]}})),$.isFunction(s)?r=s.apply(n,i):void 0!==s&&(r=s),$.isArray(e)?e.push(r):void 0!==e?e=[e,r]:void 0!==r&&(e=r),s},each:{},create:{},is:{},has:{agent:function(){return g.attr(s.dataBrowserName)}},get:{browserName:function(){return r},browserVersion:function(){return c||!1},deviceVender:function(){return d||!1},deviceModel:function(){return l||!1},deviceType:function(){return u||!1},osName:function(){return p||!1},osVersion:function(){return f||!1},engineName:function(){return v||!1},engineVersion:function(){return m||!1}},set:{agent:function(){g.attr({"data-browser-name":r,"data-browser-version":c,"data-device-vendor":d,"data-device-model":l,"data-device-type":u,"data-os-name":p,"data-os-version":f,"data-engine-name":v,"data-engine-version":m})}},bind:{events:function(){g.on("click",t.event.click)}},event:{click:function(){}}},n?(void 0===w&&t.initialize(),t.invoke(i)):(void 0!==w&&w.invoke("destroy"),t.initialize())}),void 0!==e?e:this},RootUI.prototype.userAgent.settings={name:"UserAgent",namespace:"userAgent",selector:{html:"html",body:"body"},className:{resizing:"resizing"},attr:{dataGroup:"data-group",dataTarget:"data-target",dataName:"data-name",dataBrowserName:"data-browser-name",dataBrowserVersion:"data-browser-version",dataDeviceVendor:"data-device-vendor",dataDeviceModel:"data-device-model",dataDeviceType:"data-device-type",dataOsName:"data-os-name",dataOsVersion:"data-os-version",dataEngine:"data-engine"}},RootUI.prototype.usingType=function(){var e=$(arguments[0]),t=arguments[1],i=$(document);return e.each(function(){var e,n=$.isPlainObject(t)?$.extend(!0,{},RootUI.prototype.usingType.settings,t):$.extend({},RootUI.prototype.usingType.settings),o=(n.selector,n.className),a=(n.attr,n.namespace,$(this));e={initialize:function(){e.setup(),e.bind.events()},setup:function(){e.set.usingMouse()},each:{},create:{},is:{usingTab:function(){return a.hasClass(o.usingTab)},usingMouse:function(){return a.hasClass(o.usingMouse)}},get:{},set:{usingTab:function(){a.removeClass(o.usingMouse).addClass(o.usingTab)},usingMouse:function(){a.removeClass(o.usingTab).addClass(o.usingMouse)}},bind:{events:function(){i.on("mousedown",e.event.mousedown).on("keydown",e.event.keydown)}},event:{mousedown:function(){e.is.usingTab()&&e.set.usingMouse()},keydown:function(t){e.is.usingMouse()&&9==t.keyCode&&e.set.usingTab()}}},e.initialize()}),this},RootUI.prototype.usingType.settings={name:"UsingType",namespace:"usingType",selector:{},className:{usingTab:"using-tab",usingMouse:"using-mouse"},attr:{dataGroup:"data-group",dataTarget:"data-target",dataName:"data-name"}},RootUI.prototype.viewport=function(){var e=$(arguments[0]),t=arguments[1],i=$(window);return e.each(function(){var e,n=$.isPlainObject(t)?$.extend(!0,{},RootUI.prototype.viewport.settings,t):$.extend({},RootUI.prototype.viewport.settings),o=n.selector,a=(n.className,n.attr),s=(n.namespace,$(o.html),$(this));e={initialize:function(){e.setup(),e.bind.events()},setup:function(){n.vh&&e.set.viewportHeight()},each:{},create:{},is:{},get:{},set:{viewportHeight:function(){document.documentElement.style.setProperty(a.vh,i.innerHeight()/100+"px")}},bind:{events:function(){i.on("resize",e.event.resize),s.on("click",e.event.click)}},event:{resize:function(){e.set.viewportHeight()},click:function(){}}},e.initialize()}),this},RootUI.prototype.viewport.settings={name:"Viewport",namespace:"viewport",selector:{html:"html"},className:{},attr:{dataGroup:"data-group",dataTarget:"data-target",dataName:"data-name",vh:"--vh"},vh:!0},RootUI.prototype.scrollLock=function(){var e,t=$(arguments[0]),i=arguments[1],n="string"==typeof i,o=[].slice.call(arguments,1);return t.each(function(){var t,a=$.isPlainObject(i)?$.extend(!0,{},RootUI.prototype.scrollLock.settings,i):$.extend({},RootUI.prototype.scrollLock.settings),s=(a.namespace,"module-"+a.namespace),r=$(this),c=r.data(s),d=this,l=0,u=[32,33,34,35,36,37,38,39,40],p={},f=!1;t={initialize:function(){t.setup(),t.instantiate(),t.bind.events()},instantiate:function(){c=t,r.data(s,t)},setup:function(){t.set.ie()},invoke:function(t,i,n){var a,s,r,l=c;return i=i||o,n=d||n,"string"==typeof t&&void 0!==l&&(t=t.split(/[\. ]/),a=t.length-1,$.each(t,function(e,i){var n=e!=a?i+t[e+1].charAt(0).toUpperCase()+t[e+1].slice(1):t;if($.isPlainObject(l[n])&&e!=a)l=l[n];else{if(void 0!==l[n])return s=l[n],!1;if(!$.isPlainObject(l[i])||e==a)return void 0!==l[i]&&(s=l[i],!1);l=l[i]}})),$.isFunction(s)?r=s.apply(n,i):void 0!==s&&(r=s),$.isArray(e)?e.push(r):void 0!==e?e=[e,r]:void 0!==r&&(e=r),s},prevent:function(e){e.preventDefault()},enableScroll:function(){window.removeEventListener("touchmove",t.prevent),window.removeEventListener("mousewheel",t.prevent),window.removeEventListener("DOMMouseScroll",t.prevent),window.removeEventListener("scroll",t.event.scroll),window.removeEventListener("keydown",t.event.keydown)},disableScroll:function(){t.set.pos(),window.addEventListener("touchmove",t.prevent,{passive:!1}),window.addEventListener("mousewheel",t.prevent,{passive:!1}),window.addEventListener("DOMMouseScroll",t.prevent,{passive:!1}),window.addEventListener("scroll",t.event.scroll),window.addEventListener("keydown",t.event.keydown)},get:{},set:{ie:function(){var e=window.navigator.userAgent;f=e.indexOf("msie 9")>=0||e.indexOf("rv:11.0")>=0||e.indexOf("msie 10")>=0},touchstart:function(e){var t=e.originalEvent.touches[0];l=t.clientY},touchmove:function(e){var t=e.originalEvent.touches[0],i=t.clientY-l,n=d.scrollTop,o=d.scrollHeight,a=d.clientHeight;if(a>=o||0===n&&i>0||o-n<=a&&i<0)return!1;e.stopPropagation()},pos:function(){p={x:$(window).scrollLeft(),y:$(window).scrollTop()}}},bind:{events:function(){r.on("touchstart",t.event.touchstart).on("touchmove",t.event.touchmove).on("mousewheel",t.event.mousewheel)}},event:{touchstart:function(e){t.set.touchstart(e)},touchmove:function(e){t.set.touchmove(e)},mousewheel:function(e){if(f){var t=e.originalEvent,i=t.wheelDelta||-t.detail;this.scrollTop+=30*(i<0?1:-1),t.preventDefault()}else e.stopPropagation()},scroll:function(){$(window).scrollLeft(p.x),$(window).scrollTop(p.y)},keydown:function(e){for(var t=0;t<u.length;t++)if(e.keyCode===u[t])return void e.preventDefault()}}},n?(void 0===c&&t.initialize(),t.invoke(i)):t.initialize()}),void 0!==e?e:this},RootUI.prototype.scrollLock.settings={name:"ScrollLock",namespace:"scrollLock",selector:{},className:{},attr:{dataGroup:"data-group",dataTarget:"data-target",dataName:"data-name"}},RootUI.prototype.circletimer=function(){var e,t=$(arguments[0]),i=($(window),$("body"),arguments[1]),n=(arguments[2],"string"==typeof i),o=[].slice.call(arguments,1);return t.each(function(){var t,a,s,r,c=$.isPlainObject(i)?$.extend(!0,{},RootUI.prototype.circletimer.settings,i):$.extend({},RootUI.prototype.circletimer.settings),d=(c.selector,c.className,c.metadata,c.namespace,c.namespace,"module-"+c.namespace),l=$(this),u=l.data(d),p=this;r={initialize:function(){r.instantiate(),r.setup(),r.bind.events()},instantiate:function(){u=r,l.data(d,r)},setup:function(){r.create.circle()},destroy:function(){},invoke:function(t,i,n){var a,s,r,c=u;return i=i||o,n=p||n,"string"==typeof t&&void 0!==c&&(t=t.split(/[\. ]/),a=t.length-1,$.each(t,function(e,i){var n=e!=a?i+t[e+1].charAt(0).toUpperCase()+t[e+1].slice(1):t;if($.isPlainObject(c[n])&&e!=a)c=c[n];else{if(void 0!==c[n])return s=c[n],!1;if(!$.isPlainObject(c[i])||e==a)return void 0!==c[i]&&(s=c[i],!1);c=c[i]}})),$.isFunction(s)?r=s.apply(n,i):void 0!==s&&(r=s),$.isArray(e)?e.push(r):void 0!==e?e=[e,r]:void 0!==r&&(e=r),s},start:function(){var e,i;null!=t&&t!==c.timeout||(e=null,t=0),null!=a&&window.cancelAnimationFrame(a),s=$(this).find("circle"),i=function(n){var o,a;null!=e&&(t+=n-e),e=n,o=c.clockwise?-1:1,a=50*o*Math.PI*t/c.timeout,a<-157&&(a=-157),r.set.circleOffset(a),t<c.timeout?(r.set.raf(i),c.onUpdate.call(p,t)):(t=c.timeout,c.onUpdate.call(p,t),c.onComplete.call(p))},r.set.raf(i)},stop:function(){r.remove.raf(),r.set.circleOffset(0),t=0,c.onUpdate.call(p,t)},pause:function(){r.remove.raf()},add:function(e,i){var n=i;n<t?t-=n:t=0},each:{},create:{circle:function(){var e=document.createElementNS("http://www.w3.org/2000/svg","circle"),t=document.createElementNS("http://www.w3.org/2000/svg","svg");e.setAttributeNS(null,"r","25%"),e.setAttributeNS(null,"cx","50%"),e.setAttributeNS(null,"cy","50%"),e.setAttributeNS(null,"stroke-dasharray",50*Math.PI+"%"),t.appendChild(e),l.append(t)}},is:{},should:{},get:{timeElapsed:function(){return t}},set:{raf:function(e){a=window.requestAnimationFrame(e)},circleOffset:function(e){s.css("stroke-dashoffset",e+"%")}},remove:{raf:function(){window.cancelAnimationFrame(a)}},bind:{events:function(){}},event:{}},n?(void 0===u&&r.initialize(),r.invoke(i)):(void 0!==u&&u.invoke("destroy"),r.initialize())}),void 0!==e?e:this},RootUI.prototype.circletimer.settings={name:"Circletimer",namespace:"circletimer",metadata:{},selector:{},className:{wrapper:"circle-timer-wrapper"},timeout:5e3,clockwise:!0,onUpdate:function(){},onComplete:function(){}};