").parent().attr("hidden",a)),i._toggleImmediate(l,!0),i.toggleElement(s[0]._wrapper,a,e).then(function(){s.hasClass(i.clsOpen)===a&&(a||i._toggleImmediate(l,!1),s[0]._wrapper=null,l.unwrap())})}})}}})}function gt(t){t.component("alert",{mixins:[He,Me],args:"animation",props:{close:String},defaults:{animation:[!0],close:".uk-alert-close",duration:150,hideProps:{opacity:0}},events:[{name:"click",delegate:function(){return this.close},handler:function(t){t.preventDefault(),this.closeAlert()}}],methods:{closeAlert:function(){var t=this;this.toggleElement(this.$el).then(function(){return t.$destroy(!0)})}}})}function mt(t){t.component("cover",{mixins:[He],props:{automute:Boolean,width:Number,height:Number},defaults:{automute:!0},computed:{el:function(){return this.$el[0]},parent:function(){return this.$el.parent()[0]}},ready:function(){if(this.$el.is("iframe")&&(this.$el.css("pointerEvents","none"),this.automute)){var t=this.$el.attr("src");this.$el.attr("src",t+(~t.indexOf("?")?"&":"?")+"enablejsapi=1&api=1").on("load",function(t){return t.target.contentWindow.postMessage('{"event": "command", "func": "mute", "method":"setVolume", "value":0}',"*")})}},update:{write:function(){0!==this.el.offsetHeight&&this.$el.css({width:"",height:""}).css(ee.cover({width:this.width||this.el.clientWidth,height:this.height||this.el.clientHeight},{width:this.parent.offsetWidth,height:this.parent.offsetHeight}))},events:["load","resize"]},events:{loadedmetadata:function(){this.$emit()}}})}function vt(t){function e(){n||(n=!0,Gt.on("click",function(t){for(var e;i&&i!==e&&!l(t.target,i.$el)&&(!i.toggle||!l(t.target,i.toggle.$el));)e=i,i.hide(!1)}))}var i;t.component("drop",{mixins:[Le,Me],args:"pos",props:{mode:"list",toggle:Boolean,boundary:"jQuery",boundaryAlign:Boolean,delayShow:Number,delayHide:Number,clsDrop:String},defaults:{mode:["click","hover"],toggle:"- :first",boundary:window,boundaryAlign:!1,delayShow:0,delayHide:800,clsDrop:!1,hoverIdle:200,animation:["uk-animation-fade"],cls:"uk-open"},init:function(){this.tracker=new Y,this.clsDrop=this.clsDrop||"uk-"+this.$options.name,this.clsPos=this.clsDrop,this.$el.addClass(this.clsDrop)},ready:function(){this.updateAria(this.$el),this.toggle&&(this.toggle=t.toggle(g(this.toggle,this.$el),{target:this.$el,mode:this.mode}))},events:[{name:"click",delegate:function(){return"."+this.clsDrop+"-close"},handler:function(t){t.preventDefault(),this.hide(!1)}},{name:"click",delegate:function(){return'a[href^="#"]'},handler:function(t){if(!t.isDefaultPrevented()){var e=Vt(t.target).attr("href");1===e.length&&t.preventDefault(),1!==e.length&&l(e,this.$el)||this.hide(!1)}}},{name:"toggle",handler:function(t,e){e&&!this.$el.is(e.target)||(t.preventDefault(),this.isToggled()?this.hide(!1):this.show(e,!1))}},{name:ge,filter:function(){return~this.mode.indexOf("hover")},handler:function(t){nt(t)||(i&&i!==this&&i.toggle&&~i.toggle.mode.indexOf("hover")&&!l(t.target,i.$el)&&!l(t.target,i.toggle.$el)&&i.hide(!1),t.preventDefault(),this.show(this.toggle))}},{name:"toggleshow",handler:function(t,e){e&&!this.$el.is(e.target)||(t.preventDefault(),this.show(e||this.toggle))}},{name:"togglehide "+me,handler:function(t,e){nt(t)||e&&!this.$el.is(e.target)||(t.preventDefault(),this.toggle&&~this.toggle.mode.indexOf("hover")&&this.hide())}},{name:"beforeshow",self:!0,handler:function(){this.clearTimers()}},{name:"show",self:!0,handler:function(){this.tracker.init(),this.toggle.$el.addClass(this.cls).attr("aria-expanded","true"),e()}},{name:"beforehide",self:!0,handler:function(){this.clearTimers()}},{name:"hide",handler:function(t){var e=t.target;if(!this.$el.is(e))return void(i=null===i&&l(e,this.$el)&&this.isToggled()?this:i);i=this.isActive()?null:i,this.toggle.$el.removeClass(this.cls).attr("aria-expanded","false").blur().find("a, button").blur(),this.tracker.cancel()}}],update:{write:function(){this.isToggled()&&!Kt.inProgress(this.$el)&&this.position()},events:["resize"]},methods:{show:function(t,e){var n=this;void 0===e&&(e=!0);var o=function(){n.isToggled()||(n.position(),n.toggleElement(n.$el,!0))},s=function(){if(n.toggle=t||n.toggle,n.clearTimers(),!n.isActive()){if(e&&i&&i!==n&&i.isDelaying)return void(n.showTimer=setTimeout(n.show,10));if(n.isParentOf(i)){if(!i.hideTimer)return;i.hide(!1)}else if(i&&!n.isChildOf(i)&&!n.isParentOf(i))for(var s;i&&i!==s;)s=i,i.hide(!1);e&&n.delayShow?n.showTimer=setTimeout(o,n.delayShow):o(),i=n}};t&&this.toggle&&!this.toggle.$el.is(t.$el)?(this.$el.one("hide",s),this.hide(!1)):s()},hide:function(t){var e=this;void 0===t&&(t=!0);var i=function(){return e.toggleNow(e.$el,!1)};this.clearTimers(),this.isDelaying=this.tracker.movesTo(this.$el),t&&this.isDelaying?this.hideTimer=setTimeout(this.hide,this.hoverIdle):t&&this.delayHide?this.hideTimer=setTimeout(i,this.delayHide):i()},clearTimers:function(){clearTimeout(this.showTimer),clearTimeout(this.hideTimer),this.showTimer=null,this.hideTimer=null,this.isDelaying=!1},isActive:function(){return i===this},isChildOf:function(t){return t&&t!==this&&l(this.$el,t.$el)},isParentOf:function(t){return t&&t!==this&&l(t.$el,this.$el)},position:function(){c(this.$el,this.clsDrop+"-(stack|boundary)").css({top:"",left:""}),this.$el.show().toggleClass(this.clsDrop+"-boundary",this.boundaryAlign);var t=X(this.boundary),e=this.boundaryAlign?t:X(this.toggle.$el);if("justify"===this.align){var i="y"===this.getAxis()?"width":"height";this.$el.css(i,e[i])}else this.$el.outerWidth()>Math.max(t.right-e.left,e.right-t.left)&&(this.$el.addClass(this.clsDrop+"-stack"),this.$el.trigger("stack",[this]));this.positionAt(this.$el,this.boundaryAlign?this.boundary:this.toggle.$el,this.boundary),this.$el[0].style.display=""}}}),t.drop.getActive=function(){return i};var n}function wt(t){t.component("dropdown",t.components.drop.extend({name:"dropdown"}))}function yt(t){t.component("form-custom",{mixins:[He],args:"target",props:{target:Boolean},defaults:{target:!1},computed:{input:function(){return this.$el.find(":input:first")},state:function(){return this.input.next()},target:function(){return this.$props.target&&g(!0===this.$props.target?"> :input:first + :first":this.$props.target,this.$el)}},connected:function(){this.input.trigger("change")},events:[{name:"focusin focusout mouseenter mouseleave",delegate:":input:first",handler:function(t){var e=t.type;this.state.toggleClass("uk-"+(~e.indexOf("focus")?"focus":"hover"),~["focusin","mouseenter"].indexOf(e))}},{name:"change",handler:function(){this.target&&this.target[this.target.is(":input")?"val":"text"](this.input[0].files&&this.input[0].files[0]?this.input[0].files[0].name:this.input.is("select")?this.input.find("option:selected").text():this.input.val())}}]})}function bt(t){t.component("gif",{update:{read:function(){var t=d(this.$el);!this.isInView&&t&&(this.$el[0].src=this.$el[0].src),this.isInView=t},events:["scroll","load","resize"]}})}function $t(t){t.component("grid",t.components.margin.extend({mixins:[He],name:"grid",defaults:{margin:"uk-grid-margin",clsStack:"uk-grid-stack"},update:{write:function(){this.$el.toggleClass(this.clsStack,this.stacks)},events:["load","resize"]}}))}function xt(t){t.component("height-match",{args:"target",props:{target:String,row:Boolean},defaults:{target:"> *",row:!0},computed:{elements:function(){return Vt(this.target,this.$el)}},update:{read:function(){var t=this,e=!1;this.elements.css("minHeight",""),this.rows=this.row?this.elements.toArray().reduce(function(t,i){return e!==i.offsetTop?t.push([i]):t[t.length-1].push(i),e=i.offsetTop,t},[]).map(function(e){return t.match(Vt(e))}):[this.match(this.elements)]},write:function(){this.rows.forEach(function(t){var e=t.height,i=t.elements;return i&&i.each(function(t,i){return i.style.minHeight=e+"px"})})},events:["resize"]},methods:{match:function(t){if(t.length<2)return{};var e=0,i=[];return t=t.each(function(t,n){var o,s,r;0===n.offsetHeight&&(o=Vt(n),s=o.attr("style")||null,r=o.attr("hidden")||null,o.attr({style:s+";display:block !important;",hidden:null})),e=Math.max(e,n.offsetHeight),i.push(n.offsetHeight),o&&o.attr({style:s,hidden:r})}).filter(function(t){return i[t]
0&&this.$el.css("min-height",e=this.$el.outerHeight()+o)}else{var s=G(this.$el);if(s=this.$el.outerHeight()&&this.$el.css("height",e)},events:["load","resize"]}})}function Ct(t){i(function(){if(ue){var e="uk-hover";Qt.on("tap",function(t){var i=t.target;return Vt("."+e).filter(function(t,e){return!l(i,e)}).removeClass(e)}),Object.defineProperty(t,"hoverSelector",{set:function(t){Qt.on("tap",t,function(t){return t.currentTarget.classList.add(e)})}}),t.hoverSelector=".uk-animation-toggle, .uk-transition-toggle, [uk-hover]"}})}function Tt(e){function i(t,i){e.component(t,e.components.icon.extend({name:t,mixins:i?[i]:[],defaults:{icon:t}}))}var n={},o={spinner:Ke,totop:ti,"close-icon":Fe,"close-large":We,"navbar-toggle-icon":ze,"overlay-icon":qe,"pagination-next":Ye,"pagination-previous":Re,"search-icon":Ue,"search-large":Ve,"search-navbar":Xe,"slidenav-next":Ge,"slidenav-next-large":Qe,"slidenav-previous":Je,"slidenav-previous-large":Ze};e.component("icon",e.components.svg.extend({attrs:["icon","ratio"],mixins:[He],name:"icon",args:"icon",props:["icon"],defaults:{exclude:["id","style","class","src"]},init:function(){this.$el.addClass("uk-icon"),Jt&&(this.icon=H(H(this.icon,"left","right"),"previous","next"))},update:{read:function(){if(this.delay){var t=this.getIcon();t&&this.delay(t)}},events:["load"]},methods:{getSvg:function(){var t=this,e=this.getIcon();return e?w.resolve(e):"complete"!==document.readyState?w(function(e){t.delay=e}):w.reject("Icon not found.")},getIcon:function(){return o[this.icon]?(n[this.icon]||(n[this.icon]=this.parse(o[this.icon])),n[this.icon]):null}}})),["navbar-toggle-icon","overlay-icon","pagination-previous","pagination-next","totop"].forEach(function(t){return i(t)}),["slidenav-previous","slidenav-next"].forEach(function(t){return i(t,{init:function(){this.$el.addClass("uk-slidenav"),this.$el.hasClass("uk-slidenav-large")&&(this.icon+="-large")}})}),i("search-icon",{init:function(){this.$el.hasClass("uk-search-icon")&&this.$el.parents(".uk-search-large").length?this.icon="search-large":this.$el.parents(".uk-search-navbar").length&&(this.icon="search-navbar")}}),i("close",{init:function(){this.icon="close-"+(this.$el.hasClass("uk-close-large")?"large":"icon")}}),i("spinner",{connected:function(){var t=this;this.height=this.width=this.$el.width(),this.svg.then(function(e){var i=Vt(e).find("circle"),n=Math.floor(t.width/2);e.setAttribute("viewBox","0 0 "+t.width+" "+t.width),i.attr({cx:n,cy:n,r:n-parseFloat(i.css("stroke-width")||0)})})}}),e.icon.add=function(e){return t.extend(o,e)}}function _t(t){t.component("margin",{props:{margin:String,firstColumn:Boolean},defaults:{margin:"uk-margin-small-top",firstColumn:"uk-first-column"},update:{read:function(){var t=this;if(0===this.$el[0].offsetHeight)return void(this.hidden=!0);this.hidden=!1,this.stacks=!0;var e=this.$el.children().filter(function(t,e){return e.offsetHeight>0});this.rows=[[e.get(0)]],e.slice(1).each(function(e,i){for(var n=Math.ceil(i.offsetTop),o=n+i.offsetHeight,s=t.rows.length-1;s>=0;s--){var r=t.rows[s],a=Math.ceil(r[0].offsetTop);if(n>=a+r[0].offsetHeight){t.rows.push([i]);break}if(o>a){if(t.stacks=!1,i.offsetLeftthis.panel.outerHeight(!0)).css("display",this.$el.hasClass("uk-flex")?"":"block")},events:["resize"]},events:[{name:"beforeshow",self:!0,handler:function(){this.$el.css("display","block").height()}},{name:"hidden",self:!0,handler:function(){this.$el.css("display","").removeClass("uk-flex uk-flex-center uk-flex-middle")}}]}),e.component("overflow-auto",{mixins:[He],computed:{panel:function(){return this.$el.closest(".uk-modal-dialog")}},connected:function(){this.$el.css("min-height",150)},update:{write:function(){var t=this.$el.css("max-height");this.$el.css("max-height",150).css("max-height",Math.max(150,150-(this.panel.outerHeight(!0)-window.innerHeight))),t!==this.$el.css("max-height")&&this.$el.trigger("resize")},events:["load","resize"]}}),e.modal.dialog=function(t,i){var n=e.modal('",i);return n.$el.on("hidden",function(t){t.target===t.currentTarget&&n.$destroy(!0)}),n.show(),n},e.modal.alert=function(i,n){return n=t.extend({bgClose:!1,escClose:!1,labels:e.modal.labels},n),w(function(t){return e.modal.dialog('\n '+(k(i)?i:Vt(i).html())+'
\n \n ",n).$el.on("hide",t)})},e.modal.confirm=function(i,n){return n=t.extend({bgClose:!1,escClose:!1,labels:e.modal.labels},n),w(function(t,o){return e.modal.dialog('\n '+(k(i)?i:Vt(i).html())+'
\n \n ",n).$el.on("click",".uk-modal-footer button",function(e){return 0===Vt(e.target).index()?o():t()})})},e.modal.prompt=function(i,n,o){return o=t.extend({bgClose:!1,escClose:!1,labels:e.modal.labels},o),w(function(t){var s=!1,r=e.modal.dialog('\n \n ",o),a=r.$el.find("input").val(n);r.$el.on("submit","form",function(e){e.preventDefault(),t(a.val()),s=!0,r.hide()}).on("hide",function(){s||t(null)})})},e.modal.labels={ok:"Ok",cancel:"Cancel"}}function Et(t){t.component("nav",t.components.accordion.extend({name:"nav",defaults:{targets:"> .uk-parent",toggle:"> a",content:"ul:first"}}))}function At(e){e.component("navbar",{mixins:[He],props:{dropdown:String,mode:"list",align:String,offset:Number,boundary:Boolean,boundaryAlign:Boolean,clsDrop:String,delayShow:Number,delayHide:Number,dropbar:Boolean,dropbarMode:String,dropbarAnchor:"jQuery",duration:Number},defaults:{dropdown:".uk-navbar-nav > li",align:Jt?"right":"left",clsDrop:"uk-navbar-dropdown",mode:void 0,offset:void 0,delayShow:void 0,delayHide:void 0,boundaryAlign:void 0,flip:"x",boundary:!0,dropbar:!1,dropbarMode:"slide",dropbarAnchor:!1,duration:200},computed:{boundary:function(){return!0===this.$props.boundary||this.boundaryAlign?this.$el:this.$props.boundary},pos:function(){return"bottom-"+this.align}},ready:function(){this.dropbar&&e.navbarDropbar(g(this.dropbar,this.$el)||Vt("
").insertAfter(this.dropbarAnchor||this.$el),{clsDrop:this.clsDrop,mode:this.dropbarMode,duration:this.duration,navbar:this})},update:function(){e.drop(Vt(this.dropdown+" ."+this.clsDrop,this.$el),t.extend({},this))},events:[{name:ge,delegate:function(){return this.dropdown},handler:function(t){var e=t.currentTarget,i=this.getActive();i&&i.toggle&&!l(i.toggle.$el,e)&&!i.tracker.movesTo(i.$el)&&i.hide(!1)}}],methods:{getActive:function(){var t=e.drop.getActive();return t&&"click"!==t.mode&&l(t.toggle.$el,this.$el)&&t}}}),e.component("navbar-dropbar",{mixins:[He],defaults:{clsDrop:"",mode:"slide",navbar:null,duration:200},init:function(){"slide"===this.mode&&this.$el.addClass("uk-navbar-dropbar-slide")},events:[{name:"beforeshow",el:function(){return this.navbar.$el},handler:function(t,e){var i=e.$el;if("bottom"===e.dir&&!l(i,this.$el))return i.appendTo(this.$el),e.show(),!1}},{name:"mouseleave",handler:function(){var t=this.navbar.getActive();t&&!this.$el.is(":hover")&&t.hide()}},{name:"beforeshow",handler:function(t,e){var i=e.$el;this.clsDrop&&i.addClass(this.clsDrop+"-dropbar"),this.transitionTo(i.outerHeight(!0))}},{name:"beforehide",handler:function(t,e){var i=e.$el,n=this.navbar.getActive();if(this.$el.is(":hover")&&n&&n.$el.is(i))return!1}},{name:"hide",handler:function(t,e){var i=e.$el,n=this.navbar.getActive();(!n||n&&n.$el.is(i))&&this.transitionTo(0)}}],methods:{transitionTo:function(t){var e=this;return this.$el.height(this.$el[0].offsetHeight?this.$el.height():0),Zt.cancel(this.$el).then(function(){return Zt.start(e.$el,{height:t},e.duration)})}}})}function Ot(t){t.component("offcanvas",{mixins:[je],args:"mode",props:{content:String,mode:String,flip:Boolean,overlay:Boolean},defaults:{content:".uk-offcanvas-content:first",mode:"slide",flip:!1,overlay:!1,clsPage:"uk-offcanvas-page",clsContainer:"uk-offcanvas-container",clsPanel:"uk-offcanvas-bar",clsFlip:"uk-offcanvas-flip",clsContent:"uk-offcanvas-content",clsContentAnimation:"uk-offcanvas-content-animation",clsSidebarAnimation:"uk-offcanvas-bar-animation",clsMode:"uk-offcanvas",clsOverlay:"uk-offcanvas-overlay",selClose:".uk-offcanvas-close"},computed:{content:function(){return Vt(g(this.$props.content,this.$el))},clsFlip:function(){return this.flip?this.$props.clsFlip:""},clsOverlay:function(){return this.overlay?this.$props.clsOverlay:""},clsMode:function(){return this.$props.clsMode+"-"+this.mode},clsSidebarAnimation:function(){return"none"===this.mode||"reveal"===this.mode?"":this.$props.clsSidebarAnimation},clsContentAnimation:function(){return"push"!==this.mode&&"reveal"!==this.mode?"":this.$props.clsContentAnimation},transitionElement:function(){return"reveal"===this.mode?this.panel.parent():this.panel}},update:{write:function(){this.isToggled()&&((this.overlay||this.clsContentAnimation)&&this.content.width(window.innerWidth-this.scrollbarWidth),this.overlay&&(this.content.height(window.innerHeight),Pe&&this.content.scrollTop(Pe.y)))},events:["resize"]},events:[{name:"beforeshow",self:!0,handler:function(){Pe=Pe||{x:window.pageXOffset,y:window.pageYOffset},"reveal"!==this.mode||this.panel.parent().hasClass(this.clsMode)||this.panel.wrap("").parent().addClass(this.clsMode),Qt.css("overflow-y",(!this.clsContentAnimation||this.flip)&&this.scrollbarWidth&&this.overlay?"scroll":""),this.body.addClass(this.clsContainer+" "+this.clsFlip+" "+this.clsOverlay).height(),this.content.addClass(this.clsContentAnimation),this.panel.addClass(this.clsSidebarAnimation+" "+("reveal"!==this.mode?this.clsMode:"")),this.$el.addClass(this.clsOverlay).css("display","block").height()}},{name:"beforehide",self:!0,handler:function(){this.content.removeClass(this.clsContentAnimation),("none"===this.mode||this.getActive()&&this.getActive()!==this)&&this.panel.trigger(we)}},{name:"hidden",self:!0,handler:function(){"reveal"===this.mode&&this.panel.unwrap(),this.overlay||(Pe={x:window.pageXOffset,y:window.pageYOffset}),this.panel.removeClass(this.clsSidebarAnimation+" "+this.clsMode),this.$el.removeClass(this.clsOverlay).css("display",""),this.body.removeClass(this.clsContainer+" "+this.clsFlip+" "+this.clsOverlay).scrollTop(Pe.y),Qt.css("overflow-y",""),this.content.width("").height(""),window.scrollTo(Pe.x,Pe.y),Pe=null}},{name:"swipeLeft swipeRight",handler:function(t){this.isToggled()&&nt(t)&&("swipeLeft"===t.type&&!this.flip||"swipeRight"===t.type&&this.flip)&&this.hide()}}]})}function Dt(t){t.component("responsive",{props:["width","height"],init:function(){this.$el.addClass("uk-responsive-width")},update:{write:function(){this.$el.is(":visible")&&this.width&&this.height&&this.$el.height(ee.fit({height:this.height,width:this.width},{width:this.$el.parent().width(),height:this.height||this.$el.height()}).height)},events:["load","resize"]}})}function It(t){t.component("scroll",{props:{duration:Number,transition:String,offset:Number},defaults:{duration:1e3,
-transition:"easeOutExpo",offset:0},methods:{scrollToElement:function(t){var e=this;t=Vt(t);var i=G(t)-this.offset,n=document.documentElement.offsetHeight,o=window.innerHeight;i+o>n&&(i=n-o),Vt("html,body").stop().animate({scrollTop:Math.round(i)},this.duration,this.transition).promise().then(function(){return e.$el.trigger("scrolled",[e])})}},events:{click:function(t){t.isDefaultPrevented()||(t.preventDefault(),this.scrollToElement(Vt(this.$el[0].hash).length?this.$el[0].hash:"body"))}}}),Vt.easing.easeOutExpo||(Vt.easing.easeOutExpo=function(t,e,i,n,o){return e===o?i+n:n*(1-Math.pow(2,-10*e/o))+i})}function Nt(t){t.component("scrollspy",{args:"cls",props:{cls:"list",target:String,hidden:Boolean,offsetTop:Number,offsetLeft:Number,repeat:Boolean,delay:Number},defaults:{cls:["uk-scrollspy-inview"],target:!1,hidden:!0,offsetTop:0,offsetLeft:0,repeat:!1,delay:0,inViewClass:"uk-scrollspy-inview"},init:function(){this.$emitSync()},computed:{elements:function(){return this.target&&Vt(this.target,this.$el)||this.$el}},update:[{write:function(){this.hidden&&this.elements.filter(":not(."+this.inViewClass+")").css("visibility","hidden")}},{read:function(){var t=this;this.elements.each(function(e,i){if(!i._scrollspy){var n=Vt(i).attr("uk-scrollspy-class");i._scrollspy={toggles:n&&n.split(",")||t.cls}}i._scrollspy.show=d(i,t.offsetTop,t.offsetLeft)})},write:function(){var t=this,e=1===this.elements.length?1:0;this.elements.each(function(i,n){var o=Vt(n),s=n._scrollspy;s.show?s.inview||s.timer||(s.timer=setTimeout(function(){o.css("visibility","").addClass(t.inViewClass).toggleClass(s.toggles[0]).trigger("inview"),s.inview=!0,delete s.timer},t.delay*e++)):s.inview&&t.repeat&&(s.timer&&(clearTimeout(s.timer),delete s.timer),o.removeClass(t.inViewClass).toggleClass(s.toggles[0]).css("visibility",t.hidden?"hidden":"").trigger("outview"),s.inview=!1),s.toggles.reverse()})},events:["scroll","load","resize"]}]})}function Bt(t){t.component("scrollspy-nav",{props:{cls:String,closest:String,scroll:Boolean,overflow:Boolean,offset:Number},defaults:{cls:"uk-active",closest:!1,scroll:!1,overflow:!0,offset:0},computed:{links:function(){return this.$el.find('a[href^="#"]').filter(function(t,e){return e.hash})},elements:function(){return this.closest?this.links.closest(this.closest):this.links},targets:function(){return Vt(this.links.toArray().map(function(t){return t.hash}).join(","))}},update:[{read:function(){this.scroll&&t.scroll(this.links,{offset:this.offset||0})}},{read:function(){var t=this,e=window.pageYOffset+this.offset,i=document.documentElement.scrollHeight-window.innerHeight+this.offset;this.active=!1,this.targets.each(function(n,o){o=Vt(o);var s=G(o),r=n+1===t.targets.length;if(!t.overflow&&(0===n&&s>e||r&&s+o[0].offsetTop
=i)for(var a=t.targets.length-1;a>n;a--)if(d(t.targets.eq(a))){o=t.targets.eq(a);break}return!(t.active=E(t.links.filter('[href="#'+o.attr("id")+'"]')))}})},write:function(){this.links.blur(),this.elements.removeClass(this.cls),this.active&&this.$el.trigger("active",[this.active,(this.closest?this.active.closest(this.closest):this.active).addClass(this.cls)])},events:["scroll","load","resize"]}]})}function Pt(e){e.component("sticky",{mixins:[He],attrs:!0,props:{top:null,bottom:Boolean,offset:Number,animation:String,clsActive:String,clsInactive:String,clsFixed:String,widthElement:"jQuery",showOnUp:Boolean,media:"media",target:Number},defaults:{top:0,bottom:!1,offset:0,animation:"",clsActive:"uk-active",clsInactive:"",clsFixed:"uk-sticky-fixed",widthElement:!1,showOnUp:!1,media:!1,target:!1},connected:function(){this.placeholder=Vt('
'),this.widthElement=this.$props.widthElement||this.placeholder,this.isActive||this.$el.addClass(this.clsInactive)},disconnected:function(){this.isActive&&(this.isActive=!1,this.hide(),this.$el.removeClass(this.clsInactive)),this.placeholder.remove(),this.placeholder=null,this.widthElement=null},ready:function(){var t=this;if(this.target&&location.hash&&window.pageYOffset>0){var e=g(location.hash);e&&ae(function(){var i=G(e),n=G(t.$el),o=t.$el[0].offsetHeight;n+o>=i&&n<=i+e[0].offsetHeight&&window.scrollTo(0,i-o-t.target-t.offset)})}},update:[{write:function(){var e,i=this,n=this.$el[0].offsetHeight;this.placeholder.css("height","absolute"!==this.$el.css("position")?n:"").css(this.$el.css(["marginTop","marginBottom","marginLeft","marginRight"])),document.documentElement.contains(this.placeholder[0])||this.placeholder.insertAfter(this.$el).attr("hidden",!0),this.width=this.widthElement.attr("hidden",null)[0].offsetWidth,this.widthElement.attr("hidden",!this.isActive),this.topOffset=G(this.isActive?this.placeholder:this.$el),this.bottomOffset=this.topOffset+n,["top","bottom"].forEach(function(n){i[n]=i.$props[n],i[n]&&(t.isNumeric(i[n])?i[n]=i[n+"Offset"]+parseFloat(i[n]):k(i[n])&&i[n].match(/^-?\d+vh$/)?i[n]=window.innerHeight*parseFloat(i[n])/100:(e=!0===i[n]?i.$el.parent():g(i[n],i.$el))&&(i[n]=G(e)+e[0].offsetHeight))}),this.top=Math.max(parseFloat(this.top),this.topOffset)-this.offset,this.bottom=this.bottom&&this.bottom-n,this.inactive=this.media&&!window.matchMedia(this.media).matches,this.isActive&&this.update()},events:["load","resize"]},{read:function(){this.offsetTop=G(this.$el)},write:function(t){var e=this;void 0===t&&(t={});var i=t.dir,n=window.pageYOffset;if(!(n<0||!this.$el.is(":visible")||this.disabled||this.showOnUp&&!i))if(this.inactive||nthis.top;this.bottom&&e>this.bottom-this.offset&&(t=this.bottom-e),this.$el.css({position:"fixed",top:t+"px",width:this.width}).addClass(this.clsFixed).toggleClass(this.clsActive,i).toggleClass(this.clsInactive,!i)}}})}function Ht(e){e.component("svg",{attrs:!0,props:{id:String,icon:String,src:String,style:String,width:Number,height:Number,ratio:Number,class:String},defaults:{ratio:1,id:!1,exclude:["src"],class:""},init:function(){this.class+=" uk-svg"},connected:function(){var t=this;if(!this.icon&&this.src&&~this.src.indexOf("#")){var e=this.src.split("#");e.length>1&&(this.src=e[0],this.icon=e[1])}this.width=this.$props.width,this.height=this.$props.height,this.svg=this.getSvg().then(function(e){return w(function(i,n){return $e.mutate(function(){var o,s;if(!e)return void n("SVG not found.");if(t.icon)if(o=e.getElementById(t.icon)){var r=o.outerHTML;if(!r){var a=document.createElement("div");a.appendChild(o.cloneNode(!0)),r=a.innerHTML}r=r.replace(//g,"svg>"),s=ii.parseFromString(r,"image/svg+xml").documentElement}else e.querySelector("symbol")||(s=e.documentElement.cloneNode(!0));else s=e.documentElement.cloneNode(!0);if(!s)return void n("SVG not found.");var l=s.getAttribute("viewBox");l&&(l=l.split(" "),t.width=t.width||l[2],t.height=t.height||l[3]),t.width*=t.ratio,t.height*=t.ratio;for(var h in t.$options.props)t[h]&&!~t.exclude.indexOf(h)&&s.setAttribute(h,t[h]);t.id||s.removeAttribute("id"),t.width&&!t.height&&s.removeAttribute("height"),t.height&&!t.width&&s.removeAttribute("width");var c=t.$el[0];p(c)||"CANVAS"===c.tagName?(t.$el.attr({hidden:!0,id:null}),c.nextSibling?c.parentNode.insertBefore(s,c.nextSibling):c.parentNode.appendChild(s)):c.appendChild(s),i(s)})})}).then(null,function(){}),this._isReady||this.$emitSync()},disconnected:function(){p(this.$el)&&this.$el.attr({hidden:null,id:this.id||null}),this.svg&&(this.svg.then(function(t){return t&&t.parentNode&&t.parentNode.removeChild(t)}),this.svg=null)},methods:{getSvg:function(){var e=this;return this.src?ei[this.src]?ei[this.src]:(ei[this.src]=w(function(i,n){0===e.src.lastIndexOf("data:",0)?i(e.parse(decodeURIComponent(e.src.split(",")[1]))):t.ajax(e.src,{dataType:"html"}).then(function(t){i(e.parse(t))},function(){n("SVG not found.")})}),ei[this.src]):w.reject()},parse:function(t){var e=ii.parseFromString(t,"image/svg+xml");return e.documentElement&&"svg"===e.documentElement.nodeName?e:null}}})}function Mt(t){t.component("switcher",{mixins:[Me],args:"connect",props:{connect:String,toggle:String,active:Number,swiping:Boolean},defaults:{connect:!1,toggle:" > *",active:0,swiping:!0,cls:"uk-active",clsContainer:"uk-switcher",attrItem:"uk-switcher-item",queued:!0},connected:function(){this.$emitSync()},computed:{connects:function(){return g(this.connect,this.$el)||Vt(this.$el.next("."+this.clsContainer))},toggles:function(){return Vt(this.toggle,this.$el)}},events:[{name:"click",delegate:function(){return this.toggle+":not(.uk-disabled)"},handler:function(t){t.preventDefault(),this.show(t.currentTarget)}},{name:"click",el:function(){return this.connects},delegate:function(){return"["+this.attrItem+"],[data-"+this.attrItem+"]"},handler:function(t){t.preventDefault(),this.show(Vt(t.currentTarget)[t.currentTarget.hasAttribute(this.attrItem)?"attr":"data"](this.attrItem))}},{name:"swipeRight swipeLeft",filter:function(){return this.swiping},el:function(){return this.connects},handler:function(t){nt(t)&&(t.preventDefault(),window.getSelection().toString()||this.show("swipeLeft"===t.type?"next":"previous"))}}],update:function(){this.updateAria(this.connects.children()),this.show(E(this.toggles.filter("."+this.cls+":first"))||E(this.toggles.eq(this.active))||this.toggles.first())},methods:{show:function(t){for(var e,i=this,n=this.toggles.length,o=this.connects.children("."+this.cls).index(),s=o>=0,r=f(t,this.toggles,o),a="previous"===t?-1:1,l=0;l=0&&e.hasClass(this.cls)||o===r||(this.toggles.removeClass(this.cls).attr("aria-expanded",!1),e.addClass(this.cls).attr("aria-expanded",!0),s?this.toggleElement(this.connects.children(":nth-child("+(o+1)+"),:nth-child("+(r+1)+")")):this.toggleNow(this.connects.children(":nth-child("+(r+1)+")")))}}})}function jt(t){t.component("tab",t.components.switcher.extend({mixins:[He],name:"tab",props:{media:"media"},defaults:{media:960,attrItem:"uk-tab-item"},init:function(){var e=this.$el.hasClass("uk-tab-left")&&"uk-tab-left"||this.$el.hasClass("uk-tab-right")&&"uk-tab-right";e&&t.toggle(this.$el,{cls:e,mode:"media",media:this.media})}}))}function Lt(e){e.component("toggle",{mixins:[e.mixin.togglable],args:"target",props:{href:String,target:null,mode:"list",media:"media"},defaults:{href:!1,target:!1,mode:"click",queued:!0,media:!1},computed:{target:function(){return g(this.$props.target||this.href,this.$el)||this.$el}},events:[{name:ge+" "+me,filter:function(){return~this.mode.indexOf("hover")},handler:function(t){nt(t)||this.toggle("toggle"+(t.type===ge?"show":"hide"))}},{name:"click",filter:function(){return~this.mode.indexOf("click")||ue},handler:function(t){if(nt(t)||~this.mode.indexOf("click")){var e=Vt(t.target).closest("a[href]");(Vt(t.target).closest('a[href="#"], button').length||e.length&&(this.cls||!this.target.is(":visible")||"#"===e.attr("href")[0]&&this.target.is(e.attr("href"))))&&t.preventDefault(),this.toggle()}}}],update:{write:function(){if(~this.mode.indexOf("media")&&this.media){var t=this.isToggled(this.target);(window.matchMedia(this.media).matches?!t:t)&&this.toggle()}},events:["load","resize"]},methods:{toggle:function(e){var i=t.Event(e||"toggle");this.target.triggerHandler(i,[this]),i.isDefaultPrevented()||this.toggleElement(this.target)}}})}function Ft(t){t.component("leader",{mixins:[He],props:{fill:String,media:"media"},defaults:{fill:"",media:!1,clsWrapper:"uk-leader-fill",clsHide:"uk-leader-hide",attrFill:"data-fill"},computed:{fill:function(){return this.$props.fill||j("leader-fill")}},connected:function(){this.wrapper=this.$el.wrapInner('').children().first()},disconnected:function(){this.wrapper.contents().unwrap()},update:[{read:function(){var t=this._width;this._width=Math.floor(this.$el[0].offsetWidth/2),this._changed=t!==this._width,this._hide=this.media&&!window.matchMedia(this.media).matches},write:function(){this.wrapper.toggleClass(this.clsHide,this._hide),this._changed&&this.wrapper.attr(this.attrFill,Array(this._width).join(this.fill))},events:["load","resize"]}]})}function Wt(t){function e(t){var e=t-Date.now();return{total:e,seconds:e/1e3%60,minutes:e/1e3/60%60,hours:e/1e3/60/60%24,days:e/1e3/60/60/24}}Wt.installed||t.component("countdown",{mixins:[t.mixin.class],attrs:!0,props:{date:String,clsWrapper:String},defaults:{date:"",clsWrapper:".uk-countdown-%unit%"},computed:{date:function(){return Date.parse(this.$props.date)},days:function(){return this.$el.find(this.clsWrapper.replace("%unit%","days"))},hours:function(){return this.$el.find(this.clsWrapper.replace("%unit%","hours"))},minutes:function(){return this.$el.find(this.clsWrapper.replace("%unit%","minutes"))},seconds:function(){return this.$el.find(this.clsWrapper.replace("%unit%","seconds"))},units:function(){var t=this;return["days","hours","minutes","seconds"].filter(function(e){return t[e].length})}},connected:function(){this.start()},disconnected:function(){var t=this;this.stop(),this.units.forEach(function(e){return t[e].empty()})},update:{write:function(){var t=this,i=e(this.date);i.total<=0&&(this.stop(),i.days=i.hours=i.minutes=i.seconds=0),this.units.forEach(function(e){var n=String(Math.floor(i[e]));if(n=n.length<2?"0"+n:n,t[e].text()!==n){var o=t[e];n=n.split(""),n.length!==o.children().length&&o.empty().append(n.map(function(){return" "}).join("")),n.forEach(function(t,e){return o[0].childNodes[e].innerText=t})}})}},methods:{start:function(){var t=this;this.stop(),this.date&&this.units.length&&(this.$emit(),this.timer=setInterval(function(){return t.$emit()},1e3))},stop:function(){this.timer&&(clearInterval(this.timer),this.timer=null)}}})}function zt(t){if(!zt.installed){var e=t.util,i=e.$,n=e.ajax,o=e.doc,s=e.Event,r=e.extend,a=e.Dimensions,l=e.getIndex,h=e.Transition;t.component("lightbox",{name:"lightbox",props:{toggle:String,duration:Number,inverse:Boolean},defaults:{toggle:"a",duration:400,dark:!1,attrItem:"uk-lightbox-item",items:[],index:0},computed:{toggles:function(){var t=this;return i(this.toggle,this.$el).each(function(e,i){return t.items.push({source:i.getAttribute("href"),title:i.getAttribute("title"),type:i.getAttribute("type")})})}},events:[{name:"click",delegate:function(){return this.toggle+":not(.uk-disabled)"},handler:function(t){t.preventDefault(),this.show(this.toggles.index(t.currentTarget))}},{name:"showitem",handler:function(t){this.getItem().content&&(this.$update(),t.stopImmediatePropagation())}}],update:{write:function(){var t=this,e=this.getItem();if(this.modal&&e.content){var n=this.modal.panel,o={width:n.width(),height:n.height()},s={width:window.innerWidth-(n.outerWidth(!0)-o.width),height:window.innerHeight-(n.outerHeight(!0)-o.height)},r=a.fit({width:e.width,height:e.height},s);h.stop(n),h.stop(this.modal.content),this.modal.content&&this.modal.content.remove(),this.modal.content=i(e.content).css("opacity",0).appendTo(n),n.css(o),h.start(n,r,this.duration).then(function(){h.start(t.modal.content,{opacity:1},400).then(function(){n.find("[uk-transition-hide]").show(),n.find("[uk-transition-show]").hide()})})}},events:["resize"]},methods:{show:function(e){var n=this;this.index=l(e,this.items,this.index),this.modal||(this.modal=t.modal.dialog('\n \n \n ',{center:!0}),this.modal.$el.css("overflow","hidden").addClass("uk-modal-lightbox"),this.modal.panel.css({width:200,height:200}),this.modal.caption=i('
').appendTo(this.modal.panel),this.items.length>1&&i('\n ').appendTo(this.modal.panel.addClass("uk-slidenav-position")),this.modal.$el.on("hidden",this.hide).on("click","["+this.attrItem+"]",function(t){t.preventDefault(),n.show(i(t.currentTarget).attr(n.attrItem))}).on("swipeRight swipeLeft",function(t){t.preventDefault(),window.getSelection().toString()||n.show("swipeLeft"===t.type?"next":"previous")})),this.modal.panel.find("[uk-transition-hide]").hide(),this.modal.panel.find("[uk-transition-show]").show(),this.modal.content&&this.modal.content.remove(),this.modal.caption.text(this.getItem().title);var r=s("showitem");this.$el.trigger(r),r.isImmediatePropagationStopped()||this.setError(this.getItem()),o.on("keydown."+this.$options.name,function(t){switch(t.keyCode){case 37:n.show("previous");break;case 39:n.show("next")}})},hide:function(){var t=this;o.off("keydown."+this.$options.name),this.modal.hide().then(function(){t.modal.$destroy(!0),t.modal=null})},getItem:function(){return this.items[this.index]||{source:"",title:"",type:""}},setItem:function(t,e,i,n){void 0===i&&(i=200),void 0===n&&(n=200),r(t,{content:e,width:i,height:n}),this.$update()},setError:function(t){this.setItem(t,'Loading resource failed!
',400,300)}}}),t.mixin({events:{showitem:function(t){var e=this,i=this.getItem();if("image"===i.type||!i.source||i.source.match(/\.(jp(e)?g|png|gif|svg)$/i)){var n=new Image;n.onerror=function(){return e.setError(i)},n.onload=function(){return e.setItem(i,' ',n.width,n.height)},n.src=i.source,t.stopImmediatePropagation()}}}},"lightbox"),t.mixin({events:{showitem:function(t){var e=this,n=this.getItem();if("video"===n.type||!n.source||n.source.match(/\.(mp4|webm|ogv)$/i)){var o=i(' ').on("loadedmetadata",function(){return e.setItem(n,o.attr({width:o[0].videoWidth,height:o[0].videoHeight}),o[0].videoWidth,o[0].videoHeight)}).attr("src",n.source);t.stopImmediatePropagation()}}}},"lightbox"),t.mixin({events:{showitem:function(t){var e,i=this,n=this.getItem();if((e=n.source.match(/\/\/.*?youtube\.[a-z]+\/watch\?v=([^&]+)&?(.*)/))||n.source.match(/youtu\.be\/(.*)/)){var o=e[1],s=new Image,r=!1,a=function(t,e){return i.setItem(n,'',t,e)};s.onerror=function(){return a(640,320)},s.onload=function(){120===s.width&&90===s.height?r?a(640,320):(r=!0,s.src="//img.youtube.com/vi/"+o+"/0.jpg"):a(s.width,s.height)},s.src="//img.youtube.com/vi/"+o+"/maxresdefault.jpg",t.stopImmediatePropagation()}}}},"lightbox"),t.mixin({events:{showitem:function(t){var e,i=this,o=this.getItem();if(e=o.source.match(/(\/\/.*?)vimeo\.[a-z]+\/([0-9]+).*?/)){var s=e[2],r=function(t,e){return i.setItem(o,'',t,e)};n({type:"GET",url:"http://vimeo.com/api/oembed.json?url="+encodeURI(o.source),jsonp:"callback",dataType:"jsonp"}).then(function(t){return r(t.width,t.height)}),t.stopImmediatePropagation()}}}},"lightbox")}}function qt(t){if(!qt.installed){var e=t.util,i=e.$,n=e.each,o=e.pointerEnter,s=e.pointerLeave,r=e.Transition,a={};t.component("notification",{functional:!0,args:["message","status"],defaults:{message:"",status:"",timeout:5e3,group:null,pos:"top-center",onClose:null,clsClose:"uk-notification-close"},created:function(){a[this.pos]||(a[this.pos]=i('
').appendTo(t.container)),this.$mount(i('").appendTo(a[this.pos].show())[0])},ready:function(){var t=this,e=parseInt(this.$el.css("margin-bottom"),10);r.start(this.$el.css({opacity:0,marginTop:-1*this.$el.outerHeight(),marginBottom:0}),{opacity:1,marginTop:0,marginBottom:e}).then(function(){t.timeout&&(t.timer=setTimeout(t.close,t.timeout),t.$el.on(o,function(){return clearTimeout(t.timer)}).on(s,function(){return t.timer=setTimeout(t.close,t.timeout)}))})},events:{click:function(t){i(t.target).closest('a[href="#"]').length&&t.preventDefault(),this.close()}},methods:{close:function(t){var e=this,i=function(){e.onClose&&e.onClose(),e.$el.trigger("close",[e]).remove(),a[e.pos].children().length||a[e.pos].hide()};this.timer&&clearTimeout(this.timer),t?i():r.start(this.$el,{opacity:0,marginTop:-1*this.$el.outerHeight(),marginBottom:0}).then(i)}}}),t.notification.closeAll=function(e,i){n(t.instances,function(t,n){"notification"!==n.$options.name||e&&e!==n.group||n.close(i)})}}}function Yt(t){function e(i){return t.getComponent(i,"sortable")||i.parentNode&&e(i.parentNode)}function i(){var t=setTimeout(function(){return r.trigger("click")},0),e=function(i){i.preventDefault(),i.stopPropagation(),clearTimeout(t),u(r,"click",e,!0)};c(r,"click",e,!0)}if(!Yt.installed){var n=t.mixin,o=t.util,s=o.$,r=o.docElement,a=o.extend,l=o.getDimensions,h=o.isWithin,c=o.on,u=o.off,d=o.offsetTop,f=o.pointerDown,p=o.pointerMove,g=o.pointerUp,m=o.promise,v=o.win;t.component("sortable",{mixins:[n.class],props:{group:String,animation:Number,threshold:Number,clsItem:String,clsPlaceholder:String,clsDrag:String,clsDragState:String,clsBase:String,clsNoDrag:String,clsEmpty:String,clsCustom:String,handle:String},defaults:{group:!1,animation:150,threshold:5,clsItem:"uk-sortable-item",clsPlaceholder:"uk-sortable-placeholder",clsDrag:"uk-sortable-drag",clsDragState:"uk-drag",clsBase:"uk-sortable",clsNoDrag:"uk-sortable-nodrag",clsEmpty:"uk-sortable-empty",clsCustom:"",handle:!1},init:function(){var t=this;["init","start","move","end"].forEach(function(e){var i=t[e];t[e]=function(e){e=e.originalEvent||e,t.scrollY=window.scrollY;var n=e.touches&&e.touches[0]||e,o=n.pageX,s=n.pageY;t.pos={x:o,y:s},i(e)}})},events:(w={},w[f]="init",w),update:{write:function(){var t=this;if(this.clsEmpty&&this.$el.toggleClass(this.clsEmpty,!this.$el.children().length),this.drag){this.drag.offset({top:this.pos.y+this.origin.top,left:this.pos.x+this.origin.left});var e=d(this.drag),i=e+this.drag[0].offsetHeight;e>0&&ewindow.innerHeight+this.scrollY&&setTimeout(function(){return v.scrollTop(t.scrollY+5)},5)}}},methods:{init:function(t){var e=s(t.target),i=this.$el.children().filter(function(e,i){return h(t.target,i)});!i.length||e.is(":input")||this.handle&&!h(e,this.handle)||t.button&&0!==t.button||h(e,"."+this.clsNoDrag)||(t.preventDefault(),t.stopPropagation(),this.touched=[this],this.placeholder=i,this.origin=a({target:e,index:this.placeholder.index()},this.pos),r.on(p,this.move),r.on(g,this.end),v.on("scroll",this.scroll),this.threshold||this.start(t))},start:function(e){this.drag=s(this.placeholder[0].outerHTML.replace(/^$/i,"div>")).attr("uk-no-boot","").addClass(this.clsDrag+" "+this.clsCustom).css({boxSizing:"border-box",width:this.placeholder.outerWidth(),height:this.placeholder.outerHeight()}).css(this.placeholder.css(["paddingLeft","paddingRight","paddingTop","paddingBottom"])).appendTo(t.container),this.drag.children().first().height(this.placeholder.children().height());var i=l(this.placeholder),n=i.left,o=i.top;a(this.origin,{left:n-this.pos.x,top:o-this.pos.y}),this.placeholder.addClass(this.clsPlaceholder),this.$el.children().addClass(this.clsItem),r.addClass(this.clsDragState),this.$el.trigger("start",[this,this.placeholder,this.drag]),this.move(e)},move:function(t){if(!this.drag)return void((Math.abs(this.pos.x-this.origin.x)>this.threshold||Math.abs(this.pos.y-this.origin.y)>this.threshold)&&this.start(t));this.$emit();var i="mousemove"===t.type?t.target:document.elementFromPoint(this.pos.x-document.body.scrollLeft,this.pos.y-document.body.scrollTop),n=e(i),o=e(this.placeholder[0]),r=n!==o;if(n&&!h(i,this.placeholder)&&(!r||n.group&&n.group===o.group)){if(i=n.$el.is(i.parentNode)&&s(i)||n.$el.children().has(i),r)o.remove(this.placeholder);else if(!i.length)return;n.insert(this.placeholder,i),~this.touched.indexOf(n)||this.touched.push(n)}},scroll:function(){var t=window.scrollY;t!==this.scrollY&&(this.pos.y+=t-this.scrollY,this.scrollY=t,this.$emit())},end:function(t){if(r.off(p,this.move),r.off(g,this.end),v.off("scroll",this.scroll),!this.drag)return void("mouseup"!==t.type&&h(t.target,"a[href]")&&(location.href=s(t.target).closest("a[href]").attr("href")));i();var n=e(this.placeholder[0]);this===n?this.origin.index!==this.placeholder.index()&&this.$el.trigger("change",[this,this.placeholder,"moved"]):(n.$el.trigger("change",[n,this.placeholder,"added"]),this.$el.trigger("change",[this,this.placeholder,"removed"])),this.$el.trigger("stop",[this]),this.drag.remove(),this.drag=null,this.touched.forEach(function(t){return t.$el.children().removeClass(t.clsPlaceholder+" "+t.clsItem)}),r.removeClass(this.clsDragState)},insert:function(t,e){var i=this;this.$el.children().addClass(this.clsItem);var n=function(){e.length?!i.$el.has(t).length||t.prevAll().filter(e).length?t.insertBefore(e):t.insertAfter(e):i.$el.append(t)};this.animation?this.animate(n):n()},remove:function(t){this.$el.has(t).length&&(this.animation?this.animate(function(){return t.detach()}):t.detach())},animate:function(t){var e=this,i=[],n=this.$el.children().toArray().map(function(t){return t=s(t),i.push(a({position:"absolute",pointerEvents:"none",width:t.outerWidth(),height:t.outerHeight()},t.position())),t}),o={position:"",width:"",height:"",pointerEvents:"",top:"",left:""};t(),n.forEach(function(t){return t.stop()}),this.$el.children().css(o),this.$updateSync("update",!0),this.$el.css("min-height",this.$el.height());var r=n.map(function(t){return t.position()});m.all(n.map(function(t,n){return t.css(i[n]).animate(r[n],e.animation).promise()})).then(function(){e.$el.css("min-height","").children().css(o),e.$updateSync("update",!0)})}}});var w}}function Rt(t){if(!Rt.installed){var e,i=t.util,n=t.mixin,o=i.$,s=i.doc,r=i.fastdom,a=i.flipPosition,l=i.isTouch,h=i.isWithin,c=i.pointerDown,u=i.pointerEnter,d=i.pointerLeave;t.component("tooltip",{attrs:!0,mixins:[n.togglable,n.position],props:{delay:Number,container:Boolean,title:String},defaults:{pos:"top",title:"",delay:0,animation:["uk-animation-scale-up"],duration:100,cls:"uk-active",clsPos:"uk-tooltip",container:!0},computed:{container:function(){return o(!0===this.$props.container&&t.container||this.$props.container||t.container)}},connected:function(){var t=this;r.mutate(function(){return t.$el.removeAttr("title").attr("aria-expanded",!1)})},disconnected:function(){this.hide()},methods:{show:function(){var t=this;e!==this&&(e&&e.hide(),e=this,s.on("click."+this.$options.name,function(e){h(e.target,t.$el)||t.hide()}),clearTimeout(this.showTimer),this.tooltip=o('").appendTo(this.container),this.$el.attr("aria-expanded",!0),this.positionAt(this.tooltip,this.$el),this.origin="y"===this.getAxis()?a(this.dir)+"-"+this.align:this.align+"-"+a(this.dir),this.showTimer=setTimeout(function(){t.toggleElement(t.tooltip,!0),t.hideTimer=setInterval(function(){t.$el.is(":visible")||t.hide()},150)},this.delay))},hide:function(){this.$el.is("input")&&this.$el[0]===document.activeElement||(e=e!==this&&e||!1,clearTimeout(this.showTimer),clearInterval(this.hideTimer),this.$el.attr("aria-expanded",!1),this.toggleElement(this.tooltip,!1),this.tooltip&&this.tooltip.remove(),this.tooltip=!1,s.off("click."+this.$options.name))}},events:(f={blur:"hide"},f["focus "+u+" "+c]=function(t){t.type===c&&l(t)||this.show()},f[d]=function(t){l(t)||this.hide()},f)});var f}}function Ut(t){function e(t,e){return e.match(new RegExp("^"+t.replace(/\//g,"\\/").replace(/\*\*/g,"(\\/[^\\/]+)*").replace(/\*/g,"[^\\/]+").replace(/((?!\\))\?/g,"$1.")+"$","i"))}function i(t,e){for(var i=[],n=0;ni[t]?n.ratio(e,t,i[t]):e}),e},cover:function(e,i){var n=this;return e=this.fit(e,i),t.each(e,function(t){return e=e[t]0||navigator.pointerEnabled&&navigator.maxTouchPoints>0,de=ue?le?"touchstart":"pointerdown":"mousedown",fe=ue?le?"touchmove":"pointermove":"mousemove",pe=ue?le?"touchend":"pointerup":"mouseup",ge=ue&&he?"pointerenter":"mouseenter",me=ue&&he?"pointerleave":"mouseleave",ve=ue&&le?"touchcancel":"pointercancel",we=L("transition","transition-end"),ye=L("animation","animation-start"),be=L("animation","animation-end"),$e={reads:[],writes:[],measure:function(t){return this.reads.push(t),F(this),t},mutate:function(t){return this.writes.push(t),F(this),t},clear:function(t){return q(this.reads,t)||q(this.writes,t)}};Y.prototype={positions:[],position:null,init:function(){var t=this;this.positions=[],this.position=null;var e=!1;this.handler=function(i){e||setTimeout(function(){var n=Date.now(),o=t.positions.length;o&&n-t.positions[o-1].time>100&&t.positions.splice(0,o),t.positions.push({time:n,x:i.pageX,y:i.pageY}),t.positions.length>5&&t.positions.shift(),e=!1},5),e=!0},Gt.on("mousemove",this.handler)},cancel:function(){this.handler&&Gt.off("mousemove",this.handler)},movesTo:function(t){if(this.positions.length<2)return!1;var e=X(t),i=this.positions[this.positions.length-1],n=this.positions[0];if(e.left<=i.x&&i.x<=e.right&&e.top<=i.y&&i.y<=e.bottom)return!1;var o=[[{x:e.left,y:e.top},{x:e.right,y:e.bottom}],[{x:e.right,y:e.top},{x:e.left,y:e.bottom}]];return e.right<=i.x||(e.left>=i.x?(o[0].reverse(),o[1].reverse()):e.bottom<=i.y?o[0].reverse():e.top>=i.y&&o[1].reverse()),!!o.reduce(function(t,e){return t+(R(n,e[0])R(i,e[1]))},0)}};var xe={};xe.args=xe.created=xe.events=xe.init=xe.ready=xe.connected=xe.disconnected=xe.destroy=function(e,i){return e=e&&!t.isArray(e)?[e]:e,i?e?e.concat(i):t.isArray(i)?i:[i]:e},xe.update=function(e,i){return xe.args(e,t.isFunction(i)?{write:i}:i)},xe.props=function(e,i){return t.isArray(i)&&(i=i.reduce(function(t,e){return t[e]=String,t},{})),xe.methods(e,i)},xe.computed=xe.defaults=xe.methods=function(e,i){return i?e?t.extend(!0,{},e,i):i:e};var ke,Ce,Te,_e,Se,Ee=function(t,e){return T(e)?t:e},Ae={x:["width","left","right"],y:["height","top","bottom"]},Oe={};i(function(){var e,i,o,s=0,r=0;"MSGesture"in window&&(_e=new MSGesture,_e.target=document.body),n(document,"click",function(){return Se=!0},!0);var a=function(t){var e=t.velocityX>1?"Right":t.velocityX<-1?"Left":t.velocityY>1?"Down":t.velocityY<-1?"Up":null;e&&void 0!==Oe.el&&(Oe.el.trigger("swipe"),Oe.el.trigger("swipe"+e))};n(document,"MSGestureEnd",a),n(document,"gestureend",a),n(document,de,function(t){o=t.touches?t.touches[0]:t,e=Date.now(),i=e-(Oe.last||e),Oe.el=Vt("tagName"in o.target?o.target:o.target.parentNode),ke&&clearTimeout(ke),Oe.x1=o.pageX,Oe.y1=o.pageY,i>0&&i<=250&&(Oe.isDoubleTap=!0),Oe.last=e,!_e||"pointerdown"!==t.type&&"touchstart"!==t.type||_e.addPointer(t.pointerId),Se=t.button>0}),n(document,fe,function(t){o=t.touches?t.touches[0]:t,Oe.x2=o.pageX,Oe.y2=o.pageY,s+=Math.abs(Oe.x1-Oe.x2),r+=Math.abs(Oe.y1-Oe.y2)}),n(document,pe,function(){Oe.x2&&Math.abs(Oe.x1-Oe.x2)>30||Oe.y2&&Math.abs(Oe.y1-Oe.y2)>30?Te=setTimeout(function(){void 0!==Oe.el&&(Oe.el.trigger("swipe"),Oe.el.trigger("swipe"+et(Oe.x1,Oe.x2,Oe.y1,Oe.y2))),Oe={}},0):"last"in Oe&&(isNaN(s)||s<30&&r<30?Ce=setTimeout(function(){var e=t.Event("tap");e.cancelTouch=it,void 0!==Oe.el&&Oe.el.trigger(e),Oe.isDoubleTap?(void 0!==Oe.el&&Oe.el.trigger("doubleTap"),Oe={}):ke=setTimeout(function(){ke=null,void 0!==Oe.el&&(Oe.el.trigger("singleTap"),Se||Oe.el.trigger("click")),Oe={}},300)}):Oe={},s=r=0)}),n(document,ve,it),n(window,"scroll",it)});var De=!1;n(document,"touchstart",function(){return De=!0},!0),n(document,"click",function(){De=!1}),n(document,"touchcancel",function(){return De=!1},!0);var Ie=Object.freeze({win:Xt,doc:Gt,docElement:Qt,isRtl:Jt,isReady:e,ready:i,on:n,off:o,transition:s,Transition:Zt,animate:r,Animation:Kt,isJQuery:a,isWithin:l,attrFilter:h,removeClass:c,createEvent:u,isInView:d,getIndex:f,isVoidElement:p,Dimensions:ee,query:g,Observer:re,requestAnimationFrame:ae,hasPromise:ce,hasTouch:ue,pointerDown:de,pointerMove:fe,pointerUp:pe,pointerEnter:ge,pointerLeave:me,pointerCancel:ve,transitionend:we,animationstart:ye,animationend:be,getStyle:M,getCssVar:j,fastdom:$e,$:Vt,bind:m,hasOwn:v,promise:w,classify:y,hyphenate:b,camelize:$,isString:k,isNumber:C,isUndefined:T,isContextSelector:_,getContextSelectors:S,toJQuery:E,toNode:A,toBoolean:O,toNumber:D,toList:I,toMedia:N,coerce:B,toMs:P,swap:H,ajax:t.ajax,contains:t.contains,each:t.each,Event:t.Event,extend:t.extend,map:t.map,merge:t.merge,isArray:t.isArray,isNumeric:t.isNumeric,isFunction:t.isFunction,isPlainObject:t.isPlainObject,MouseTracker:Y,mergeOptions:U,position:V,getDimensions:X,offsetTop:G,flipPosition:tt,isTouch:nt}),Ne=function(t){this._init(t)};Ne.util=Ie,Ne.data="__uikit__",Ne.prefix="uk-",Ne.options={},Ne.instances={},Ne.elements=[],function(t){var e=t.data;t.use=function(t){if(!t.installed)return t.call(null,this),t.installed=!0,this},t.mixin=function(e,i){i=(k(i)?t.components[i]:i)||this,e=U({},e),e.mixins=i.options.mixins,delete i.options.mixins,i.options=U(e,i.options)},t.extend=function(t){t=t||{};var e=this,i=t.name||e.options.name,n=ot(i||"UIkitComponent");return n.prototype=Object.create(e.prototype),n.prototype.constructor=n,n.options=U(e.options,t),n.super=e,n.extend=e.extend,n},t.update=function(i,n,o){if(void 0===o&&(o=!1),i=u(i||"update"),!n)return void rt(t.instances,i);if(n=A(n),o)do{rt(n[e],i),n=n.parentNode}while(n);else st(n,function(t){return rt(t[e],i)})};var i;Object.defineProperty(t,"container",{get:function(){return i||document.body},set:function(t){i=t}})}(Ne),function(t){t.prototype._callHook=function(t){var e=this,i=this.$options[t];i&&i.forEach(function(t){return t.call(e)})},t.prototype._callReady=function(){this._isReady||(this._isReady=!0,this._callHook("ready"),this._callUpdate())},t.prototype._callConnected=function(){var e=this;this._connected||(~t.elements.indexOf(this.$options.el)||t.elements.push(this.$options.el),t.instances[this._uid]=this,this._initEvents(),this._callHook("connected"),this._connected=!0,this._initObserver(),this._isReady||i(function(){return e._callReady()}),this._callUpdate())},t.prototype._callDisconnected=function(){if(this._connected){this._observer&&(this._observer.disconnect(),this._observer=null);var e=t.elements.indexOf(this.$options.el);~e&&t.elements.splice(e,1),delete t.instances[this._uid],this._initEvents(!0),this._callHook("disconnected"),this._connected=!1}},t.prototype._callUpdate=function(t){var e=this;t=u(t||"update"),"update"===t.type&&(this._computeds={});var i=this.$options.update;i&&i.forEach(function(i,n){if("update"===t.type||i.events&&~i.events.indexOf(t.type)){if(t.sync)return i.read&&i.read.call(e,t),void(i.write&&i.write.call(e,t));i.read&&!~$e.reads.indexOf(e._frames.reads[n])&&(e._frames.reads[n]=$e.measure(function(){i.read.call(e,t),delete e._frames.reads[n]})),i.write&&!~$e.writes.indexOf(e._frames.writes[n])&&(e._frames.writes[n]=$e.mutate(function(){i.write.call(e,t),delete e._frames.writes[n]}))}})}}(Ne),function(e){var i=0;e.prototype.props={},e.prototype._init=function(t){t=t||{},t=this.$options=U(this.constructor.options,t,this),this.$el=null,this.$name=e.prefix+b(this.$options.name),this.$props={},this._uid=i++,this._initData(),this._initMethods(),this._initComputeds(),this._callHook("created"),this._frames={reads:{},writes:{}},t.el&&this.$mount(t.el)},e.prototype._initData=function(){var e=this,i=t.extend(!0,{},this.$options.defaults),n=this.$options.data||{},o=this.$options.args||[],s=this.$options.props||{};if(i){o.length&&t.isArray(n)&&(n=n.slice(0,o.length).reduce(function(e,i,n){return t.isPlainObject(i)?t.extend(e,i):e[o[n]]=i,e},{}));for(var r in i)e.$props[r]=e[r]=v(n,r)?B(s[r],n[r],e.$options.el):i[r]}},e.prototype._initMethods=function(){var t=this,e=this.$options.methods;if(e)for(var i in e)t[i]=m(e[i],t)},e.prototype._initComputeds=function(){var t=this,e=this.$options.computed;if(this._computeds={},e)for(var i in e)at(t,i,e[i])},e.prototype._initProps=function(e){var i=this;this._computeds={},t.extend(this.$props,e||this._getProps());var n=[this.$options.computed,this.$options.methods];for(var o in i.$props)ct(n,o)&&(i[o]=i.$props[o])},e.prototype._initEvents=function(t){var e=this,i=this.$options.events;i&&i.forEach(function(i){if(v(i,"handler"))lt(e,t,i);else for(var n in i)lt(e,t,i[n],n)})},e.prototype._initObserver=function(){var e=this;if(!this._observer&&this.$options.props&&this.$options.attrs&&re){var i=t.isArray(this.$options.attrs)?this.$options.attrs:Object.keys(this.$options.props).map(function(t){return b(t)});this._observer=new re(function(){var t=e._getProps();i.some(function(i){return!ut(t[i],e.$props[i])})&&e.$reset(t)}),this._observer.observe(this.$options.el,{attributes:!0,attributeFilter:i.concat([this.$name,"data-"+this.$name])})}},e.prototype._getProps=function(){var t,e,i={},n=this.$el[0],o=this.$options.args||[],s=this.$options.props||{},r=n.getAttribute(this.$name)||n.getAttribute("data-"+this.$name);if(!s)return i;for(t in s)if(e=b(t),n.hasAttribute(e)){var a=B(s[t],n.getAttribute(e),n);if("target"===e&&(!a||0===a.lastIndexOf("_",0)))continue;i[t]=a}if(!r)return i;if("{"===r[0])try{r=JSON.parse(r)}catch(t){console.warn("Invalid JSON."),r={}}else if(o.length&&!~r.indexOf(":")){l={},l[o[0]]=r,r=l;var l}else{var h={};r.split(";").forEach(function(t){var e=t.split(/:(.+)/),i=e[0],n=e[1];i&&n&&(h[i.trim()]=n.trim())}),r=h}for(t in r||{})e=$(t),void 0!==s[e]&&(i[e]=B(s[e],r[t],n));return i}}(Ne),function(t){var e=t.data;t.prototype.$mount=function(t){var i=this.$options.name;if(t[e]||(t[e]={}),t[e][i])return void console.warn('Component "'+i+'" is already mounted on element: ',t);t[e][i]=this,this.$el=Vt(t),this._initProps(),this._callHook("init"),document.documentElement.contains(t)&&this._callConnected()},t.prototype.$emit=function(t){this._callUpdate(t)},t.prototype.$emitSync=function(t){this._callUpdate(u(t||"update",!0,!1,{sync:!0}))},t.prototype.$update=function(e,i){t.update(e,this.$el,i)},t.prototype.$updateSync=function(t,e){this.$update(u(t||"update",!0,!1,{sync:!0}),e)},t.prototype.$reset=function(t){this._callDisconnected(),this._initProps(t),this._callConnected()},t.prototype.$destroy=function(t){void 0===t&&(t=!1);var i=this.$options.el;i&&this._callDisconnected(),this._callHook("destroy"),i&&i[e]&&(delete i[e][this.$options.name],Object.keys(i[e]).length||delete i[e],t&&this.$el.remove())}}(Ne),function(e){var i=e.data;e.components={},e.component=function(i,n){var o=$(i);return t.isPlainObject(n)?(n.name=o,n=e.extend(n)):n.options.name=o,e.components[o]=n,e[o]=function(i,n){for(var s=arguments.length,r=Array(s);s--;)r[s]=arguments[s];return t.isPlainObject(i)?new e.components[o]({data:i}):e.components[o].options.functional?new e.components[o]({data:[].concat(r)}):Vt(i).toArray().map(function(t){return e.getComponent(t,o)||new e.components[o]({el:t,data:n||{}})})[0]},e._initialized&&!n.options.functional&&$e.measure(function(){return e[o]("[uk-"+i+"],[data-uk-"+i+"]")}),e.components[o]},e.getComponents=function(t){return t&&(t=a(t)?t[0]:t)&&t[i]||{}},e.getComponent=function(t,i){return e.getComponents(t)[i]},e.connect=function(t){var n;if(t[i])for(n in t[i])t[i][n]._callConnected();for(var o=0;o ',We=' ',ze=' ',qe=' ',Ye=' ',Re=' ',Ue=' ',Ve=' ',Xe=' ',Ge=' ',Qe=' ',Je=' ',Ze=' ',Ke=' ',ti=' ',ei={},ii=new DOMParser;return Ne.version="3.0.0-beta.22",function(t){t.mixin.class=He,t.mixin.modal=je,t.mixin.position=Le,t.mixin.togglable=Me}(Ne),function(t){var e,i,o,s=null,r=0;Xt.on("load",t.update).on("resize",function(e){o||(ae(function(){t.update(e),o=!1}),o=!0)}).on("scroll",function(n){null===s&&(s=0),s!==window.pageYOffset&&(e=sFile Failed to Upload!'+xhr.status)
- // $('#file-uploaded')[0].checked = false;
- },
- cache: false,
- contentType: false,
- processData: false
- });
-}
-
-function handleLoadExampleFile() {
- $("#file-input-operation").val('example');
- $("#file-title-text").html('');
- $('#file-input').val('');
- var formData = new FormData($("form#file-input-form")[0]);
- $.ajax({
- url: "importing-controller",
- type: 'POST',
- data: formData,
- async: false,
- success: function (data) {
- $('#file-upload-response').html(JSON.parse(data).respond)
- // if (data.indexOf('successfully!') != -1) {
- // $('#file-uploaded')[0].checked = true;
- // }
- },
- error: function (xhr, ajaxOptions, thrownError) {
- $('#file-upload-response').html('File Failed to Upload! '+xhr.status)
- // $('#file-uploaded')[0].checked = false;
- },
- cache: false,
- contentType: false,
- processData: false
- });
-}
-
-$( window ).resize(function() {
- $("#file-input-label").width($(".file-upload-wrapper").width() - 250 +"px");
-});
-
-(function(){
-
- function getCookie(name) {
- var value = "; " + document.cookie;
- var parts = value.split("; " + name + "=");
- if (parts.length == 2) return parts.pop().split(";").shift();
- }
-
-////////// UPLOAD FUNCTIONS
-
- $( '.inputfile' ).each( function()
- {
- var $input = $( this ),
- $label = $input.next( 'label' ),
- labelVal = $label.html();
-
- $input.on( 'change', function( e )
- {
- var fileName = '';
-
- if( this.files && this.files.length > 1 )
- fileName = ( this.getAttribute( 'data-multiple-caption' ) || '' ).replace( '{count}', this.files.length );
- else if( e.target.value )
- fileName = e.target.value.split( '\\' ).pop();
-
- if( fileName )
- $label.find( 'span' ).html( fileName );
- else
- $label.html( labelVal );
- });
-
- // Firefox bug fix
- $input
- .on( 'focus', function(){ $input.addClass( 'has-focus' ); })
- .on( 'blur', function(){ $input.removeClass( 'has-focus' ); });
- });
-
- function handleProfileUploadButton() {
- $("form#profile-input-form").submit(function(){
- if ($('#profile-input')[0].value === "") {
- window.alert("You must specify a profile to import.");
- return false;
- }
- // $('#user-id').val(getCookie("madgikmining"));
- $("#profile-input-operation").val('normal');
- var formData = new FormData($(this)[0]);
- $.ajax({
- url: "upload-profile-controller",
- type: 'POST',
- data: formData,
- async: false,
- success: function (data) {
- $('#profile-upload-response').html(JSON.parse(data).respond);
- obj = JSON && JSON.parse(data) || $.parseJSON(data);
- console.log(obj);
- for (var key1 in obj) {
- if (obj.hasOwnProperty(key1)) {
- if (key1==="poswords") {
- // delete all poswords from the lists
- deleteAllPosWords(0);
- for (var key2 in obj[key1]) {
- createWord(1, generateId(1), key2, obj[key1][key2]);
- }
- } else if (key1 === "negwords") {
- deleteAllNegWords(0);
- for (var key2 in obj[key1]) {
- createWord(0, generateId(0), key2, obj[key1][key2]);
- }
- } else if (key1 === "filters") {
- for (var key2 in obj[key1]) {
- console.log(key2, obj[key1][key2]);
- }
- }
- }
- }
- },
- error: function (xhr, ajaxOptions, thrownError) {
- $('#profile-upload-response').html('File Failed to Upload! '+xhr.status)
- // $('#profile-uploaded')[0].checked = false;
- },
- cache: false,
- contentType: false,
- processData: false
- });
-
- return false;
- });
- }
-
- function handleFileUploadButton() {
- $("form#file-input-form").submit(function(){
- if ($('#file-input')[0].value === "") {
- window.alert("You must specify a data file to import.");
- return false;
- }
- // $('#user-id').val(getCookie("madgikmining"));
- $("#file-input-operation").val('normal');
- var formData = new FormData($(this)[0]);
- $.ajax({
- url: "importing-controller",
- type: 'POST',
- data: formData,
- async: false,
- success: function (data) {
- $('#file-upload-response').html(JSON.parse(data).respond)
- // if (data.indexOf('successfully!') != -1) {
- // $('#file-uploaded')[0].checked = true;
- // }
- },
- error: function (xhr, ajaxOptions, thrownError) {
- $('#file-upload-response').html('File Failed to Upload! '+xhr.status)
- // $('#file-uploaded')[0].checked = false;
- },
- cache: false,
- contentType: false,
- processData: false
- });
-
- return false;
- });
- }
-
- function handleZipFileUploadButton() {
- $("form#zip-file-input-form").submit(function(){
- if ($('#zip-file-input')[0].value === "") {
- window.alert("You must specify a data file to import.");
- return false;
- }
- // $('#user-id').val(getCookie("madgikmining"));
- var formData = new FormData($(this)[0]);
- $.ajax({
- url: "importing-text-controller",
- type: 'POST',
- data: formData,
- async: false,
- success: function (data) {
- $('#zip-file-upload-response').html(JSON.parse(data).respond)
- if (data.indexOf('successfully!') != -1) {
- $('#docs-file-uploaded')[0].checked = true;
- }
- },
- error: function (xhr, ajaxOptions, thrownError) {
- $('#zip-file-upload-response').html('File Failed to Upload! '+xhr.status);
- $('#docs-file-uploaded')[0].checked = false;
- },
- cache: false,
- contentType: false,
- processData: false
- });
-
- return false;
- });
- }
-
- function handleDocsUploadSelect() {
- $('select#textUploadSelect').change(function(){
- $('#docs-file-uploaded')[0].checked = false;
- if($(this).val()=="1") {
- $('#docUploadText').show();
- $('#docUploadText').children(".title").html("Choose .PDF document file to upload");
- $('#docPasteExample').css('display', 'none');
- $('#docPasteText').html("");
- }
- else if ($(this).val()=="2") {
- $('#docUploadText').show();
- $('#docUploadText').children(".title").html("Choose .TXT document with JSON format file to upload");
- $('#docPasteExample').css('display', 'none');
- $('#docPasteText').html("");
- }
- else {
- $('#docUploadText').css('display', 'none');
- $('#docPasteExample').css('display', 'inline');
- $('#docPasteText').html('');
- }
- });
- }
-
-
-
-/////////// LIST FUNCTIONS
-
- var count_pos = 0, count_neg = 0;
-
- function updatetextereas(){
- // Create the positive and negative words input to send to the server with json format
- $('#pos-words-text').html('');
- $('#neg-words-text').html('');
- pos_words_list = {};
- neg_words_list = {};
- for(var key in localStorage){
- if (key === null)
- continue;
- var json_string = localStorage.getItem(key);
- data = JSON.parse(json_string);
- if(key.indexOf('positive') === 0){
- pos_words_list[data.text] = data.weight;
- } else if(key.indexOf('negative') === 0) {
- neg_words_list[data.text] = data.weight;
- }
- }
- $('#pos-words-text').html(JSON.stringify(pos_words_list));
- $('#neg-words-text').html(JSON.stringify(neg_words_list));
- }
-
- function updateCounter(is_pos){
- if (is_pos === 1) {
- $('#count-pos').text(count_pos);
- var deleteButton = $('#clear-all-pos');
- if(count_pos === 0){
- deleteButton.attr('disabled', 'disabled').addClass('disabled');
- }
- else{
- deleteButton.removeAttr('disabled').removeClass('disabled');
- }
- } else {
- $('#count-neg').text(count_neg);
- var deleteButton = $('#clear-all-neg');
- if(count_neg === 0){
- deleteButton.attr('disabled', 'disabled').addClass('disabled');
- }
- else{
- deleteButton.removeAttr('disabled').removeClass('disabled');
- }
- }
- }
- //generates a unique id
- function generateId(is_pos){
- if (is_pos) {
- return "positive-" + +new Date();
- } else {
- return "negative-" + +new Date();
- }
- }
- //saves a text-weight pair in json format to localStorage
- var saveWord = function(id, content_word, content_weight){
- var obj = {};
- obj["text"] = content_word;
- obj["weight"] = content_weight;
- localStorage.setItem(id, JSON.stringify(obj));
- };
-
- // var editWord = function(is_pos, id){
- // var $this = $('#' + id);
- // $this.focus()
- // .append($(' ', {
- // "class": "btn icon-save save-button",
- // click: function(){
- // $this.attr('contenteditable', 'false');
- // var newcontent = $this.text(), saved = $('.save-notification');
- // if(!newcontent) {
- // var confirmation = confirm('Delete this item?');
- // if(confirmation) {
- // removeWord(id);
- // }
- // }
- // else{
- // localStorage.setItem(id, newcontent);
- // saved.show();
- // setTimeout(function(){
- // saved.hide();
- // },2000);
- // $(this).remove();
- // $('.icon-pencil').show();
- // }
- // }
- // }));
- // };
-
- var clickedElement=null;
- var saveEditBox = function(element) {
- var new_val = $(".thVal").val();
- if (element.hasClass("phrase") || (new_val != '' && !isNaN(new_val) && new_val >= 0 && new_val <= 100)) {
- $(element).html($(".thVal").val().trim());
- } else {
- $(element).html(1);
- }
- updatetextereas();
- }
- // a fucntion to catch double click on positive and negative phrases edit boxes
- var addDoubleClick = function(element){
- $(element).click(function (event) {
- if($(event.target).attr('class')!="thVal") {
- event.stopPropagation();
- // save previous clicked box
- if (clickedElement)
- saveEditBox(clickedElement);
- var currentEle = $(this);
- var value = $(this).html();
- editValue(currentEle, value, currentEle.hasClass("phrase")?1:0);
- }
- });
- }
-
- var editValue = function(currentEle, value, isPhrase) {
- clickedElement = currentEle;
- $(document).off('click');
- if (isPhrase) {
- $(currentEle).html(' ');
- } else {
- $(currentEle).html(' ');
- }
- $(".thVal").focus();
- $(".thVal").keyup(function (event) {
- // Handle Enter key
- if (event.keyCode == 13) {
- var new_val = $(".thVal").val();
- if (isPhrase || (new_val != '' && !isNaN(new_val) && new_val >= 0 && new_val <= 100)) {
- $(currentEle).html($(".thVal").val().trim());
- } else {
- $(currentEle).html(1);
- }
- updatetextereas();
- clickedElement = null;
- }
- // Handle Esc key
- else if (event.keyCode == 27) {
- $(currentEle).html(value);
- clickedElement = null;
- }
- });
- // Handle clicks outside editboxes
- $(document).click(function (event) {
- if($(event.target).attr('class')!="thVal") {
- saveEditBox(currentEle);
- $(document).off('click');
- clickedElement = null;
- }
- });
- }
-
- //removes item from localStorage
- var deleteWord = function(is_pos, id){
- localStorage.removeItem(id);
- if (is_pos === 1) {
- count_pos--;
- } else {
- count_neg--;
- }
- updateCounter(is_pos);
- updatetextereas();
- };
-
- var removeWord = function(is_pos, id){
- var item = $('#' + id );
-
- item.addClass('removed-item')
- .one('webkitAnimationEnd oanimationend msAnimationEnd animationend', function(e) {
- $(this).remove();
- });
-
- deleteWord(is_pos, id);
- };
-
- var createWord = function(is_pos, id, content_word, content_weight){
- // create added line with content
- var word = '' + content_word + '
' + content_weight +'
'
- // Choose List to add word (positive or negative)
- var list
- if (is_pos === 1) {
- list = $('#word-pos li');
- } else {
- list = $('#word-neg li');
- }
-
- // if content is correct and not empty append to list
- if(!$('#'+ id).length){
- word = $(word).addClass('new-item');
- if (is_pos === 1) {
- $('#word-pos').append(word);
- } else {
- $('#word-neg').append(word);
- }
-
- // add all the item's extra functionality
- var createdItem = $('#'+ id);
- // delete button
- createdItem.append($(' ', {
- "class" :"btn icon-trash delete-button",
- "contenteditable" : "false",
- click: function(){
- var confirmation = confirm('Delete this word?');
- if(confirmation) {
- removeWord(is_pos, id);
- }
- }
- }));
- addDoubleClick($(createdItem).find("div.phrase"))
- addDoubleClick($(createdItem).find("div.weight"))
- // // edit button
- // createdItem.append($(' ', {
- // "class" :"btn icon-pencil edit-button",
- // "contenteditable" : "false",
- // click: function(){
- // createdItem.attr('contenteditable', 'true');
- // editWord(is_pos, id);
- // $(this).hide();
- // }
- // }));
- createdItem.on('keydown', function(ev){
- if(ev.keyCode === 13) return false;
- });
-
- // save word to clients local storage
- saveWord(id, content_word, content_weight);
- if (is_pos === 1) {
- count_pos++;
- updateCounter(1);
- } else {
- count_neg++;
- updateCounter(0);
- }
- updatetextereas();
- }
- };
- //handler for input
- var handleInput = function(){
- $('#word-form-pos').on('submit', function(event){
- event.preventDefault();
- var input_word = $('#text-pos');
- word = input_word.val();
- var input_weight = $('#weight-pos');
- weight = input_weight.val();
- if (word && weight){
- var id = generateId(1);
- createWord(1, id, word, weight);
- input_word.val('');
- input_weight.val('1');
- }
- });
- $('#word-form-neg').on('submit', function(event){
- event.preventDefault();
- var input_word = $('#text-neg');
- word = input_word.val();
- var input_weight = $('#weight-neg');
- weight = input_weight.val();
- if (word && weight){
- var id = generateId(0);
- createWord(0, id, word, weight);
- input_word.val('');
- input_weight.val('1');
- }
- });
- };
-
- var loadDefaultWords = function(){
- localStorage.clear();
- // Add some positive words
- createWord(1, generateId(1), 'European Commission', 1);
- createWord(1, generateId(1), 'FP7', 1);
- createWord(1, generateId(1), 'grants', 1);
- // Add some negative words
- createWord(0, generateId(0), 'FP6', 1);
- createWord(0, generateId(0), 'NIH', 1);
- createWord(0, generateId(0), 'NSF', 1);
- createWord(0, generateId(0), 'Wellcome Trust', 1);
- createWord(0, generateId(0), 'po box', 1);
- };
-
- // var loadWords = function(){
- // if(localStorage.length!==0){
- // for(var key in localStorage){
- // var text = localStorage.getItem(key);
- // if(key.indexOf('positive') === 0){
- // createWord(1, key, text);
- // } else if(key.indexOf('negative') === 0) {
- // createWord(0, key, text);
- // }
- // }
- // }
- // };
- var deleteAllPosWords = function(warnUser = 1) {
- if(!warnUser || confirm('Are you sure you want to delete all the items in the list? There is no turning back after that.')){ //remove items from DOM
- var items = $('li[id ^= positive]');
- items.addClass('removed-item').one('webkitAnimationEnd oanimationend msAnimationEnd animationend', function(e) {
- $(this).remove();
- });
-
- //look for items in localStorage that start with word- and remove them
- var keys = [];
- for(var key in localStorage){
- if(key.indexOf('positive') === 0){
- localStorage.removeItem(key);
- }
- }
- count_pos = 0;
- updateCounter(1);
- }
- updatetextereas();
- };
-
- var deleteAllNegWords = function(warnUser = 1) {
- if(!warnUser || confirm('Are you sure you want to delete all the items in the list? There is no turning back after that.')){ //remove items from DOM
- var items = $('li[id ^= negative]');
- items.addClass('removed-item').one('webkitAnimationEnd oanimationend msAnimationEnd animationend', function(e) {
- $(this).remove();
- });
-
- //look for items in localStorage that start with word- and remove them
- var keys = [];
- for(var key in localStorage){
- if(key.indexOf('negative') === 0){
- localStorage.removeItem(key);
- }
- }
- count_neg = 0;
- updateCounter(0);
- }
- updatetextereas();
- };
-
- //handler for the "delete all" button
- var handleDeleteButton = function(){
- $('#clear-all-pos').on('click', deleteAllPosWords);
- $('#clear-all-neg').on('click', deleteAllNegWords);
- };
-
- var init = function(){
- //$('#text').focus();
- //loadWords();
- loadDefaultWords();
- handleDeleteButton();
- handleInput();
- updateCounter(1);
- updateCounter(0);
- updatetextereas();
- handleFileUploadButton();
- handleZipFileUploadButton();
- handleDocsUploadSelect();
- handleProfileUploadButton();
- };
- //start all
- init();
-
-})();
-
-
diff --git a/interactive-mining-backend/madoap/src/static/interactiveminingExample.txt b/interactive-mining-backend/madoap/src/static/interactiveminingExample.txt
deleted file mode 100644
index 5e5120a..0000000
--- a/interactive-mining-backend/madoap/src/static/interactiveminingExample.txt
+++ /dev/null
@@ -1 +0,0 @@
-Acknowledgements : This work was supported in part by the European Commission under FP7 grants 246686 and 283595.
\ No newline at end of file
diff --git a/interactive-mining-backend/madoap/src/static/interactivemining_styles.css b/interactive-mining-backend/madoap/src/static/interactivemining_styles.css
deleted file mode 100644
index 38c840c..0000000
--- a/interactive-mining-backend/madoap/src/static/interactivemining_styles.css
+++ /dev/null
@@ -1,471 +0,0 @@
-@import "http://netdna.bootstrapcdn.com/font-awesome/2.0/css/font-awesome.css";
-
-
-
-/*GENERAL*/
-
-h4 {
- font-weight: normal;
- margin: 20px 4px 0px;
-}
-
-.file-upload-wrapper,
-.list-wrapper,
-.filters-wrapper,
-.acknowledgement-wrapper {
- margin-right: 30px;
- margin-bottom: 30px;
- background-color: #f5f5f5;
- border: 1px solid #e1e1e1;
- padding: 10px;
-}
-
-.file-upload-wrapper {
- /*float: left;*/
- max-width: 850px;
- min-width: 500px;
-}
-
-.list-wrapper {
- float: left;
- width: 400px;
-}
-
-.filters-wrapper,
-.acknowledgement-wrapper {
- max-width: 850px;
- min-width: 500px;
-}
-
-.textarea {
- width: 858px;
- max-width: 98%;
- max-height: 1024px;
- height: 112px;
- display: block;
- background-color: #e8f8d4;
- border: 1px solid #cccccc;
- -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
- -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
- -webkit-transition: border linear 0.1s, box-shadow linear 0.1s;
- -moz-transition: border linear 0.1s, box-shadow linear 0.1s;
- -o-transition: border linear 0.1s, box-shadow linear 0.1s;
- transition: border linear 0.1s, box-shadow linear 0.1s;
- padding: 4px 6px;
- margin-bottom: 30px;
- font-size: 14px;
- line-height: 20px;
- color: #555555;
- vertical-align: middle;
- -webkit-border-radius: 4px;
- -moz-border-radius: 4px;
- border-radius: 4px;
-
-}
-
-.textarea:focus {
- border-color: rgba(82, 168, 236, 0.8);
- outline: 0;
- outline: thin dotted \9;
- -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
- -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
-}
-
-
-/*FILE INPUT*/
-.js .inputfile {
- width: 0.1px;
- height: 0.1px;
- opacity: 0;
- overflow: hidden;
- position: absolute;
- z-index: -1;
-}
-
-.inputfile {
- box-sizing: border-box;
-}
-
-.inputfile + label {
- display: inline-table;
- border-radius: 2px;
- width: 70.5%;
- /* 20px */
- text-overflow: ellipsis;
- white-space: nowrap;
- cursor: pointer;
- overflow: hidden;
- /* 10px 20px */
- color: #444;
- border: 1px solid #c8c6c6;
- background-color: #fff;
- padding: 0;
-}
-
-.no-js .inputfile + label {
- display: none;
-}
-
-.inputfile:focus + label,
-.inputfile.has-focus + label {
- outline: 1px dotted #000;
- outline: -webkit-focus-ring-color auto 5px;
-}
-
-.inputfile + label svg {
- width: 1em;
- height: 1em;
- vertical-align: middle;
- fill: currentColor;
- margin-top: -0.25em;
- /* 4px */
- margin-right: 0.25em;
- /* 4px */
-}
-
-.inputfile:focus + label,
-.inputfile.has-focus + label,
-.inputfile + label:hover {
- border-color: #9095A2;
-}
-
-.inputfile + label span,
-.inputfile + label strong {
- padding: 0.3rem 0.6rem;
- /* 10px 20px */
-}
-
-.inputfile + label span {
- width: 200px;
- /*min-height: 2em;*/
- display: inline-block;
- text-overflow: ellipsis;
- white-space: nowrap;
- overflow: hidden;
- vertical-align: top;
-}
-
-.inputfile + label strong {
- height: 100%;
- color: #e5e9f1;
- background-color: #5882fa;
- display: inline-block;
-}
-
-.inputfile:focus + label strong,
-.inputfile.has-focus + label strong,
-.inputfile + label:hover strong {
- background-color: #476DDA;
-}
-
-
-/*LISTS*/
-
-li [class^=icon-],li [class*=" icon-"] {
- width: 40px !important;
- height: 25px !important;
- font-size: 22px;
- display: block !important;
- position: absolute !important;
- float: none !important;
-}
-
-header, footer {
- width: 100%;
- position: relative;
- padding: 5px 5px;
-}
-
-header .scroll_holder {
- float: right;
- visibility: hidden;
-}
-
-header .scroller {
- overflow-y: scroll;
- height: 1px;
-}
-
-header .word-form input[type='text'] {
- width: 45%;
- height: 24px;
-}
-header .word-form input[type='number'] {
- width: 27%;
- height: 24px;
-}
-
-header .word-form input[type='submit'] {
- width: 18%;
-}
-
-footer button {
- float: right;
-}
-
-::-webkit-input-placeholder {
- color: rgba(255,255,255,0.2);
-}
-
-:-moz-placeholder {
- color: rgba(255,255,255,0.2);
-}
-
-::-moz-placeholder {
- color: rgba(255,255,255,0.2);
-}
-
-:-ms-input-placeholder {
- color: rgba(255,255,255,0.2);
-}
-
-.page-header {
- width: 100%;
- color: #fff;
- padding: 5px 30px;
- font: normal 18px/1.5 Lato,Arial,sans-serif;
- overflow: hidden;
-}
-
-.page-header a {
- color: inherit;
- text-decoration: none;
-}
-
-button::-moz-focus-inner {
- border: 0;
- padding: 0;
-}
-
-input[type='text']:focus {
- outline: none;
-}
-
-.icon-trash,.icon-pencil,.icon-save {
- position: absolute;
- top: 3px;
- color: #aaa;
- cursor: pointer;
- right: 52px;
-}
-
-.icon-trash {
- right: 10px;
-}
-
-.notification {
- position: fixed;
- top: 0;
- left: 50%;
- z-index: 3;
- padding: 5px 10px;
- color: #fff;
- display: none;
- box-shadow: 0 4px 0 -2px rgba(0,0,0,0.1);
-}
-
-.undo-button {
- background-color: orange;
- cursor: pointer;
- margin-left: -100px;
-}
-
-.save-notification {
- background-color: #2ecc71;
- margin-left: -50px;
-}
-
-button.disabled .icon-trash,.clear-all.disabled .icon-trash {
- color: #888;
-}
-
-button .icon-trash {
- float: none;
- margin-right: 10px;
- opacity: 1 !important;
- position: static;
-}
-
-.count {
- float: left;
-}
-
-#count-pos.count:after {
- content: " positive word(s)";
-}
-#count-neg.count:after {
- content: " negative word(s)";
-}
-
-.words {
- list-style-type: none;
- max-width: 500px;
- width: 100%;
- background-color: #EFEFEF;
- padding: 2px 5px;
- height: 162px;
- overflow-y: scroll;
- overflow-x: hidden;
- list-style: none;
- margin: 0;
- position: relative;
-}
-
-.words li {
- z-index: 1;
- font-weight: 400;
-/*box-shadow: 0 7px 0 -4px rgba(0, 0, 0, 0.2);*/
- color: #666;
- text-align: left;
- line-height: 31px;
- /*background-color: #fff;*/
- margin-bottom: 2px;
- /*padding: 0px 65px 0px 7px;*/
- position: relative;
- opacity: 0;
- word-wrap: break-word;
- -webkit-transition: all .1s ease;
- -o-transition: all .1s ease;
- transition: all .1s ease;
-}
-
-.words li:focus {
- outline: none;
-}
-
-li[contenteditable='true'] {
- color: #000;
-}
-
-.words li .phrase {
- width: 47%;
- display: inline-block;
- background-color: #fff;
- margin-right: 8px;
- padding-left: 8px;
- border: 1px solid #ccc;
- border-radius: 5px;
-}
-
-.words li .weight {
- width: 29%;
- display: inline-block;
- background-color: #fff;
- padding-left: 8px;
- border: 1px solid #ccc;
- border-radius: 5px;
-}
-
-.words li .phrase:hover, .words li .weight:hover {
- background-color: #fefefe;
- border: 1px solid #999;
-}
-
-
-
-
-
-/*ANIMATIONS*/
-li.new-item {
- opacity:0;
- -webkit-animation:fadeIn .1s linear forwards;
- -o-animation:fadeIn .1s linear forwards;
- animation:fadeIn .1s linear forwards
-}
-@keyframes fadeIn {
- to {
- opacity:1
- }
-}
-
-@keyframes openspace {
- to {
- height: auto
- }
-}
-
-li.removed-item {
- -webkit-animation: removed-item-animation .3s cubic-bezier(.55,-0.04,.91,.94) forwards;
- -o-animation: removed-item-animation .3s cubic-bezier(.55,-0.04,.91,.94) forwards;
- animation: removed-item-animation .3s cubic-bezier(.55,-0.04,.91,.94) forwards
-}
-
-@keyframes removed-item-animation {
- from {
- opacity: 1;
- }
-
- to {
- opacity: 0
- }
-}
-
-@-webkit-keyframes new-item-animation {
- from {
- opacity: 0;
- -webkit-transform: scale(0);
- transform: scale(0)
- }
-
- to {
- opacity: 1;
- -webkit-transform: scale(1);
- transform: scale(1)
- }
-}
-
-@-o-keyframes new-item-animation {
- from {
- opacity: 0;
- -o-transform: scale(0);
- transform: scale(0)
- }
-
- to {
- opacity: 1;
- -o-transform: scale(1);
- transform: scale(1)
- }
-}
-
-@-webkit-keyframes openspace {
- to {
- height: auto
- }
-}
-
-@-o-keyframes openspace {
- to {
- height: auto
- }
-}
-
-@-webkit-keyframes removed-item-animation {
- from {
- opacity: 1;
- -webkit-transform: scale(1);
- transform: scale(1)
- }
-
- to {
- -webkit-transform: scale(0);
- transform: scale(0);
- opacity: 0
- }
-}
-
-@-o-keyframes removed-item-animation {
- from {
- opacity: 1;
- -o-transform: scale(1);
- transform: scale(1)
- }
-
- to {
- -o-transform: scale(0);
- transform: scale(0);
- opacity: 0
- }
-}
diff --git a/interactive-mining-backend/madoap/src/static/jquery.sticky-sidebar.js b/interactive-mining-backend/madoap/src/static/jquery.sticky-sidebar.js
deleted file mode 100644
index 1a0efdb..0000000
--- a/interactive-mining-backend/madoap/src/static/jquery.sticky-sidebar.js
+++ /dev/null
@@ -1,745 +0,0 @@
-/**
- * Sticky Sidebar JavaScript Plugin.
- * @version 3.3.0
- * @author Ahmed Bouhuolia
- * @license The MIT License (MIT)
- */
-const StickySidebar = (() => {
-
- // ---------------------------------
- // # Define Constants
- // ---------------------------------
- //
- const EVENT_KEY = '.stickySidebar';
- const VERSION = '3.2.0';
-
- const DEFAULTS = {
-
- /**
- * Additional top spacing of the element when it becomes sticky.
- * @type {Numeric|Function}
- */
- topSpacing: 0,
-
- /**
- * Additional bottom spacing of the element when it becomes sticky.
- * @type {Numeric|Function}
- */
- bottomSpacing: 0,
-
- /**
- * Container sidebar selector to know what the beginning and end of sticky element.
- * @type {String|False}
- */
- containerSelector: false,
-
- /**
- * Inner wrapper selector.
- * @type {String}
- */
- innerWrapperSelector: '.inner-wrapper-sticky',
-
- /**
- * The name of CSS class to apply to elements when they have become stuck.
- * @type {String|False}
- */
- stickyClass: 'is-affixed',
-
- /**
- * Detect when sidebar and its container change height so re-calculate their dimensions.
- * @type {Boolean}
- */
- resizeSensor: true,
-
- /**
- * The sidebar returns to its normal position if its width below this value.
- * @type {Numeric}
- */
- minWidth: false
- };
-
- // ---------------------------------
- // # Class Definition
- // ---------------------------------
- //
- /**
- * Sticky Sidebar Class.
- * @public
- */
- class StickySidebar{
-
- /**
- * Sticky Sidebar Constructor.
- * @constructor
- * @param {HTMLElement|String} sidebar - The sidebar element or sidebar selector.
- * @param {Object} options - The options of sticky sidebar.
- */
- constructor(sidebar, options = {}){
- this.options = StickySidebar.extend(DEFAULTS, options);
-
- // Sidebar element query if there's no one, throw error.
- this.sidebar = ('string' === typeof sidebar ) ? document.querySelector(sidebar) : sidebar;
- if( 'undefined' === typeof this.sidebar )
- throw new Error("There is no specific sidebar element.");
-
- this.sidebarInner = false;
- this.container = this.sidebar.parentElement;
-
- // Current Affix Type of sidebar element.
- this.affixedType = 'STATIC';
- this.direction = 'down';
- this.support = {
- transform: false,
- transform3d: false
- };
-
- this._initialized = false;
- this._reStyle = false;
- this._breakpoint = false;
- this._resizeListeners = [];
-
- // Dimensions of sidebar, container and screen viewport.
- this.dimensions = {
- translateY: 0,
- topSpacing: 0,
- lastTopSpacing: 0,
- bottomSpacing: 0,
- lastBottomSpacing: 0,
- sidebarHeight: 0,
- sidebarWidth: 0,
- containerTop: 0,
- containerHeight: 0,
- viewportHeight: 0,
- viewportTop: 0,
- lastViewportTop: 0,
- };
-
- // Bind event handlers for referencability.
- ['handleEvent'].forEach( (method) => {
- this[method] = this[method].bind(this);
- });
-
- // Initialize sticky sidebar for first time.
- this.initialize();
- }
-
- /**
- * Initializes the sticky sidebar by adding inner wrapper, define its container,
- * min-width breakpoint, calculating dimensions, adding helper classes and inline style.
- * @private
- */
- initialize(){
- this._setSupportFeatures();
-
- // Get sticky sidebar inner wrapper, if not found, will create one.
- if( this.options.innerWrapperSelector ){
- this.sidebarInner = this.sidebar.querySelector(this.options.innerWrapperSelector);
-
- if( null === this.sidebarInner )
- this.sidebarInner = false;
- }
-
- if( ! this.sidebarInner ){
- let wrapper = document.createElement('div');
- wrapper.setAttribute('class', 'inner-wrapper-sticky');
- this.sidebar.appendChild(wrapper);
-
- while( this.sidebar.firstChild != wrapper )
- wrapper.appendChild(this.sidebar.firstChild);
-
- this.sidebarInner = this.sidebar.querySelector('.inner-wrapper-sticky');
- }
-
- // Container wrapper of the sidebar.
- if( this.options.containerSelector ){
- let containers = document.querySelectorAll(this.options.containerSelector);
- containers = Array.prototype.slice.call(containers);
-
- containers.forEach((container, item) => {
- if( ! container.contains(this.sidebar) ) return;
- this.container = container;
- });
-
- if( ! containers.length )
- throw new Error("The container does not contains on the sidebar.");
- }
-
- // If top/bottom spacing is not function parse value to integer.
- if( 'function' !== typeof this.options.topSpacing )
- this.options.topSpacing = parseInt(this.options.topSpacing) || 0;
-
- if( 'function' !== typeof this.options.bottomSpacing )
- this.options.bottomSpacing = parseInt(this.options.bottomSpacing) || 0;
-
- // Breakdown sticky sidebar if screen width below `options.minWidth`.
- this._widthBreakpoint();
-
- // Calculate dimensions of sidebar, container and viewport.
- this.calcDimensions();
-
- // Affix sidebar in proper position.
- this.stickyPosition();
-
- // Bind all events.
- this.bindEvents();
-
- // Inform other properties the sticky sidebar is initialized.
- this._initialized = true;
- }
-
- /**
- * Bind all events of sticky sidebar plugin.
- * @protected
- */
- bindEvents(){
- window.addEventListener('resize', this, {passive: true});
- window.addEventListener('scroll', this, {passive: true});
-
- this.sidebar.addEventListener('update' + EVENT_KEY, this);
-
- if( this.options.resizeSensor && 'undefined' !== typeof ResizeSensor ){
- new ResizeSensor(this.sidebarInner, this.handleEvent);
- new ResizeSensor(this.container, this.handleEvent);
- }
- }
-
- /**
- * Handles all events of the plugin.
- * @param {Object} event - Event object passed from listener.
- */
- handleEvent(event){
- this.updateSticky(event);
- }
-
- /**
- * Calculates dimensions of sidebar, container and screen viewpoint
- * @public
- */
- calcDimensions(){
- if( this._breakpoint ) return;
- var dims = this.dimensions;
-
- // Container of sticky sidebar dimensions.
- dims.containerTop = StickySidebar.offsetRelative(this.container).top;
- dims.containerHeight = this.container.clientHeight;
- dims.containerBottom = dims.containerTop + dims.containerHeight;
-
- // Sidebar dimensions.
- dims.sidebarHeight = this.sidebarInner.offsetHeight;
- dims.sidebarWidth = this.sidebar.offsetWidth;
-
- // Screen viewport dimensions.
- dims.viewportHeight = window.innerHeight;
-
- this._calcDimensionsWithScroll();
- }
-
- /**
- * Some dimensions values need to be up-to-date when scrolling the page.
- * @private
- */
- _calcDimensionsWithScroll(){
- var dims = this.dimensions;
-
- dims.sidebarLeft = StickySidebar.offsetRelative(this.sidebar).left;
-
- dims.viewportTop = document.documentElement.scrollTop || document.body.scrollTop;
- dims.viewportBottom = dims.viewportTop + dims.viewportHeight;
- dims.viewportLeft = document.documentElement.scrollLeft || document.body.scrollLeft;
-
- dims.topSpacing = this.options.topSpacing;
- dims.bottomSpacing = this.options.bottomSpacing;
-
- if( 'function' === typeof dims.topSpacing )
- dims.topSpacing = parseInt(dims.topSpacing(this.sidebar)) || 0;
-
- if( 'function' === typeof dims.bottomSpacing )
- dims.bottomSpacing = parseInt(dims.bottomSpacing(this.sidebar)) || 0;
-
- if( 'VIEWPORT-TOP' === this.affixedType ){
- // Adjust translate Y in the case decrease top spacing value.
- if( dims.topSpacing < dims.lastTopSpacing ){
- dims.translateY += dims.lastTopSpacing - dims.topSpacing;
- this._reStyle = true;
- }
-
- } else if( 'VIEWPORT-BOTTOM' === this.affixedType ){
- // Adjust translate Y in the case decrease bottom spacing value.
- if( dims.bottomSpacing < dims.lastBottomSpacing ){
- dims.translateY += dims.lastBottomSpacing - dims.bottomSpacing;
- this._reStyle = true;
- }
- }
-
- dims.lastTopSpacing = dims.topSpacing;
- dims.lastBottomSpacing = dims.bottomSpacing;
- }
-
- /**
- * Determine whether the sidebar is bigger than viewport.
- * @public
- * @return {Boolean}
- */
- isSidebarFitsViewport(){
- return this.dimensions.sidebarHeight < this.dimensions.viewportHeight;
- }
-
- /**
- * Observe browser scrolling direction top and down.
- */
- observeScrollDir(){
- var dims = this.dimensions;
- if( dims.lastViewportTop === dims.viewportTop ) return;
-
- var furthest = 'down' === this.direction ? Math.min : Math.max;
-
- // If the browser is scrolling not in the same direction.
- if( dims.viewportTop === furthest(dims.viewportTop, dims.lastViewportTop) )
- this.direction = 'down' === this.direction ? 'up' : 'down';
- }
-
- /**
- * Gets affix type of sidebar according to current scrollTop and scrollLeft.
- * Holds all logical affix of the sidebar when scrolling up and down and when sidebar
- * is bigger than viewport and vice versa.
- * @public
- * @return {String|False} - Proper affix type.
- */
- getAffixType(){
- var dims = this.dimensions, affixType = false;
-
- this._calcDimensionsWithScroll();
-
- var sidebarBottom = dims.sidebarHeight + dims.containerTop;
- var colliderTop = dims.viewportTop + dims.topSpacing;
- var colliderBottom = dims.viewportBottom - dims.bottomSpacing;
-
- // When browser is scrolling top.
- if( 'up' === this.direction ){
- if( colliderTop <= dims.containerTop ){
- dims.translateY = 0;
- affixType = 'STATIC';
-
- } else if( colliderTop <= dims.translateY + dims.containerTop ){
- dims.translateY = colliderTop - dims.containerTop;
- affixType = 'VIEWPORT-TOP';
-
- } else if( ! this.isSidebarFitsViewport() && dims.containerTop <= colliderTop ){
- affixType = 'VIEWPORT-UNBOTTOM';
- }
- // When browser is scrolling up.
- } else {
- // When sidebar element is not bigger than screen viewport.
- if( this.isSidebarFitsViewport() ){
-
- if( dims.sidebarHeight + colliderTop >= dims.containerBottom ){
- dims.translateY = dims.containerBottom - sidebarBottom;
- affixType = 'CONTAINER-BOTTOM';
-
- } else if( colliderTop >= dims.containerTop ){
- dims.translateY = colliderTop - dims.containerTop;
- affixType = 'VIEWPORT-TOP';
- }
- // When sidebar element is bigger than screen viewport.
- } else {
-
- if( dims.containerBottom <= colliderBottom ){
- dims.translateY = dims.containerBottom - sidebarBottom;
- affixType = 'CONTAINER-BOTTOM';
-
- } else if( sidebarBottom + dims.translateY <= colliderBottom ){
- dims.translateY = colliderBottom - sidebarBottom;
- affixType = 'VIEWPORT-BOTTOM';
-
- } else if( dims.containerTop + dims.translateY <= colliderTop ){
- affixType = 'VIEWPORT-UNBOTTOM';
- }
- }
- }
-
- // Make sure the translate Y is not bigger than container height.
- dims.translateY = Math.max(0, dims.translateY);
- dims.translateY = Math.min(dims.containerHeight, dims.translateY);
-
- dims.lastViewportTop = dims.viewportTop;
- return affixType;
- }
-
- /**
- * Gets inline style of sticky sidebar wrapper and inner wrapper according
- * to its affix type.
- * @private
- * @param {String} affixType - Affix type of sticky sidebar.
- * @return {Object}
- */
- _getStyle(affixType){
- if( 'undefined' === typeof affixType ) return;
-
- var style = {inner: {}, outer: {}};
- var dims = this.dimensions;
-
- switch( affixType ){
- case 'VIEWPORT-TOP':
- style.inner = {position: 'fixed', top: dims.topSpacing,
- left: dims.sidebarLeft - dims.viewportLeft, width: dims.sidebarWidth};
- break;
- case 'VIEWPORT-BOTTOM':
- style.inner = {position: 'fixed', top: 'auto', left: dims.sidebarLeft,
- bottom: dims.bottomSpacing, width: dims.sidebarWidth};
- break;
- case 'CONTAINER-BOTTOM':
- case 'VIEWPORT-UNBOTTOM':
- let translate = this._getTranslate(0, dims.translateY + 'px');
-
- if( translate )
- style.inner = {transform: translate};
- else
- style.inner = {position: 'absolute', top: dims.translateY, width: dims.sidebarWidth};
- break;
- }
-
- switch( affixType ){
- case 'VIEWPORT-TOP':
- case 'VIEWPORT-BOTTOM':
- case 'VIEWPORT-UNBOTTOM':
- case 'CONTAINER-BOTTOM':
- style.outer = {height: dims.sidebarHeight, position: 'relative'};
- break;
- }
-
- style.outer = StickySidebar.extend({height: '', position: ''}, style.outer);
- style.inner = StickySidebar.extend({position: 'relative', top: '', left: '',
- bottom: '', width: '', transform: this._getTranslate()}, style.inner);
-
- return style;
- }
-
- /**
- * Cause the sidebar to be sticky according to affix type by adding inline
- * style, adding helper class and trigger events.
- * @function
- * @protected
- * @param {string} force - Update sticky sidebar position by force.
- */
- stickyPosition(force){
- if( this._breakpoint ) return;
-
- force = this._reStyle || force || false;
-
- var offsetTop = this.options.topSpacing;
- var offsetBottom = this.options.bottomSpacing;
-
- var affixType = this.getAffixType();
- var style = this._getStyle(affixType);
-
- if( (this.affixedType != affixType || force) && affixType ){
- let affixEvent = 'affix.' + affixType.toLowerCase().replace('viewport-', '') + EVENT_KEY;
- StickySidebar.eventTrigger(this.sidebar, affixEvent);
-
- if( 'STATIC' === affixType )
- StickySidebar.removeClass(this.sidebar, this.options.stickyClass);
- else
- StickySidebar.addClass(this.sidebar, this.options.stickyClass);
-
- for( let key in style.outer ){
- let _unit = ('number' === typeof style.outer[key]) ? 'px' : '';
- this.sidebar.style[key] = style.outer[key];
- }
-
- for( let key in style.inner ){
- let _unit = ('number' === typeof style.inner[key]) ? 'px' : '';
- this.sidebarInner.style[key] = style.inner[key] + _unit;
- }
-
- let affixedEvent = 'affixed.'+ affixType.toLowerCase().replace('viewport-', '') + EVENT_KEY;
- StickySidebar.eventTrigger(this.sidebar, affixedEvent);
- } else {
- if( this._initialized ) this.sidebarInner.style.left = style.inner.left;
- }
-
- this.affixedType = affixType;
- }
-
- /**
- * Breakdown sticky sidebar when window width is below `options.minWidth` value.
- * @protected
- */
- _widthBreakpoint(){
-
- if( window.innerWidth <= this.options.minWidth ){
- this._breakpoint = true;
- this.affixedType = 'STATIC';
-
- this.sidebar.removeAttribute('style');
- StickySidebar.removeClass(this.sidebar, this.options.stickyClass);
- this.sidebarInner.removeAttribute('style');
- } else {
- this._breakpoint = false;
- }
- }
-
- /**
- * Switches between functions stack for each event type, if there's no
- * event, it will re-initialize sticky sidebar.
- * @public
- */
- updateSticky(event = {}){
- if( this._running ) return;
- this._running = true;
-
- ((eventType) => {
-
- requestAnimationFrame(() => {
- switch( eventType ){
- // When browser is scrolling and re-calculate just dimensions
- // within scroll.
- case 'scroll':
- this._calcDimensionsWithScroll();
- this.observeScrollDir();
- this.stickyPosition();
- break;
-
- // When browser is resizing or there's no event, observe width
- // breakpoint and re-calculate dimensions.
- case 'resize':
- default:
- this._widthBreakpoint();
- this.calcDimensions();
- this.stickyPosition(true);
- break;
- }
- this._running = false;
- });
- })(event.type);
- }
-
- /**
- * Set browser support features to the public property.
- * @private
- */
- _setSupportFeatures(){
- var support = this.support;
-
- support.transform = StickySidebar.supportTransform();
- support.transform3d = StickySidebar.supportTransform(true);
- }
-
- /**
- * Get translate value, if the browser supports transfrom3d, it will adopt it.
- * and the same with translate. if browser doesn't support both return false.
- * @param {Number} y - Value of Y-axis.
- * @param {Number} x - Value of X-axis.
- * @param {Number} z - Value of Z-axis.
- * @return {String|False}
- */
- _getTranslate(y = 0, x = 0, z = 0){
- if( this.support.transform3d ) return 'translate3d(' + y +', '+ x +', '+ z +')';
- else if( this.support.translate ) return 'translate('+ y +', '+ x +')';
- else return false;
- }
-
- /**
- * Destroy sticky sidebar plugin.
- * @public
- */
- destroy(){
- window.removeEventListener('resize', this);
- window.removeEventListener('scroll', this);
-
- this.sidebar.classList.remove(this.options.stickyClass);
- this.sidebar.style.minHeight = '';
-
- this.sidebar.removeEventListener('update' + EVENT_KEY, this);
-
- var styleReset = {inner: {}, outer: {}};
-
- styleReset.inner = {position: '', top: '', left: '', bottom: '', width: '', transform: ''};
- styleReset.outer = {height: '', position: ''};
-
- for( let key in styleReset.outer )
- this.sidebar.style[key] = styleReset.outer[key];
-
- for( let key in styleReset.inner )
- this.sidebarInner.style[key] = styleReset.inner[key];
-
- if( this.options.resizeSensor && 'undefined' !== typeof ResizeSensor ){
- ResizeSensor.detach(this.sidebarInner, this.handleEvent);
- ResizeSensor.detach(this.container, this.handleEvent);
- }
- }
-
- /**
- * Determine if the browser supports CSS transform feature.
- * @function
- * @static
- * @param {Boolean} transform3d - Detect transform with translate3d.
- * @return {String}
- */
- static supportTransform(transform3d){
- var result = false,
- property = (transform3d) ? 'perspective' : 'transform',
- upper = property.charAt(0).toUpperCase() + property.slice(1),
- prefixes = ['Webkit', 'Moz', 'O', 'ms'],
- support = document.createElement('support'),
- style = support.style;
-
- (property + ' ' + prefixes.join(upper + ' ') + upper).split(' ').forEach(function(property, i) {
- if (style[property] !== undefined) {
- result = property;
- return false;
- }
- });
- return result;
- }
-
- /**
- * Trigger custom event.
- * @static
- * @param {DOMObject} element - Target element on the DOM.
- * @param {String} eventName - Event name.
- * @param {Object} data -
- */
- static eventTrigger(element, eventName, data){
- try{
- var event = new CustomEvent(eventName, {detail: data});
- } catch(e){
- var event = document.createEvent('CustomEvent');
- event.initCustomEvent(eventName, true, true, data);
- }
- element.dispatchEvent(event);
- }
-
- /**
- * Extend options object with defaults.
- * @function
- * @static
- */
- static extend(defaults, options){
- var results = {};
- for( let key in defaults ){
- if( 'undefined' !== typeof options[key] ) results[key] = options[key];
- else results[key] = defaults[key];
- }
- return results;
- }
-
- /**
- * Get current coordinates left and top of specific element.
- * @static
- */
- static offsetRelative(element){
- var result = {left: 0, top: 0};
-
- do{
- let offsetTop = element.offsetTop;
- let offsetLeft = element.offsetLeft;
-
- if( ! isNaN(offsetTop) )
- result.top += offsetTop;
-
- if( ! isNaN(offsetLeft) )
- result.left += offsetLeft;
-
- element = ( 'BODY' === element.tagName ) ?
- element.parentElement : element.offsetParent;
- } while(element)
- return result;
- }
-
- /**
- * Add specific class name to specific element.
- * @static
- * @param {ObjectDOM} element
- * @param {String} className
- */
- static addClass(element, className){
- if( ! StickySidebar.hasClass(element, className) ){
- if (element.classList)
- element.classList.add(className);
- else
- element.className += ' ' + className;
- }
- }
-
- /**
- * Remove specific class name to specific element
- * @static
- * @param {ObjectDOM} element
- * @param {String} className
- */
- static removeClass(element, className){
- if( StickySidebar.hasClass(element, className) ){
- if (element.classList)
- element.classList.remove(className);
- else
- element.className = element.className.replace(new RegExp('(^|\\b)' + className.split(' ').join('|') + '(\\b|$)', 'gi'), ' ');
- }
- }
-
- /**
- * Determine weather the element has specific class name.
- * @static
- * @param {ObjectDOM} element
- * @param {String} className
- */
- static hasClass(element, className){
- if (element.classList)
- return element.classList.contains(className);
- else
- return new RegExp('(^| )' + className + '( |$)', 'gi').test(element.className);
- }
- }
-
- return StickySidebar;
- })();
-
-
- // Global
- // -------------------------
- window.StickySidebar = StickySidebar;
-
-(() => {
- if( 'undefined' === typeof window ) return;
-
- const plugin = window.$ || window.jQuery || window.Zepto;
- const DATA_NAMESPACE = 'stickySidebar';
-
- // Make sure the site has jquery or zepto plugin.
- if( plugin ){
- /**
- * Sticky Sidebar Plugin Defintion.
- * @param {Object|String} - config
- */
- function _jQueryPlugin(config){
- return this.each(function(){
- var $this = plugin(this),
- data = plugin(this).data(DATA_NAMESPACE);
-
- if( ! data ){
- data = new StickySidebar(this, typeof config == 'object' && config);
- $this.data(DATA_NAMESPACE, data);
- }
-
- if( 'string' === typeof config){
- if (data[config] === undefined && ['destroy', 'updateSticky'].indexOf(config) === -1)
- throw new Error('No method named "'+ config +'"');
-
- data[config]();
- }
- });
- }
-
- plugin.fn.stickySidebar = _jQueryPlugin;
- plugin.fn.stickySidebar.Constructor = StickySidebar;
-
- const old = plugin.fn.stickySidebar;
-
- /**
- * Sticky Sidebar No Conflict.
- */
- plugin.fn.stickySidebar.noConflict = function(){
- plugin.fn.stickySidebar = old;
- return this;
- };
- }
-})();
diff --git a/interactive-mining-backend/madoap/src/static/save-profile.js b/interactive-mining-backend/madoap/src/static/save-profile.js
deleted file mode 100644
index e3fcbe1..0000000
--- a/interactive-mining-backend/madoap/src/static/save-profile.js
+++ /dev/null
@@ -1,15 +0,0 @@
-(function(){
-
- function getCookie(name) {
- var value = "; " + document.cookie;
- var parts = value.split("; " + name + "=");
- if (parts.length == 2) return parts.pop().split(";").shift();
- }
-
- var init = function(){
- };
-
- //start all
- init();
-
-})();
diff --git a/interactive-mining-backend/madoap/src/static/styles.css b/interactive-mining-backend/madoap/src/static/styles.css
deleted file mode 100644
index 97d9c60..0000000
--- a/interactive-mining-backend/madoap/src/static/styles.css
+++ /dev/null
@@ -1,364 +0,0 @@
-/* styles.css for template #124
- spyka.net Webmaster */
-html {
- position: relative;
- min-width: 1268px;
- height:100%;
-}
-
-body {
- margin:0 auto;
- padding:0;
- width:100%;
- height:100%;
- font-family:Arial, Helvetica, sans-serif;
- background-image:url('BG_Footer_2.jpg');
- background-repeat:no-repeat;
- background-position:bottom right;
- background-color:#f9f9f9;
- background-attachment:fixed;
-
-}
-/* Global */
-a {
- font-weight:bold;
- text-decoration:underline;
- color:#333;
- position: relative;
-}
-a:hover {
- color:#5882FA;
-}
-h1 {
- font-size:20px;
- margin:20px 0 15px 0;
-}
-h2 {
- font-size:1.2em;
- font-family:Arial, Helvetica, sans-serif;
- font-weight:normal;
- border-bottom:1px solid #CCC;
- color:#5882FA;
-}
-h3 {
- font-family:Verdana, Arial, Helvetica, sans-serif;
- font-size:0.9em;
- color:#333;
- border-bottom:3px solid #5882FA;
-}
-h4 {
- font-size:1.0em;
- font-family:Arial, Helvetica, sans-serif;
- font-weight:bold;
- padding:0;
- margin:0 0 0 10px;
- color:#5882FA;
-}
-
-p {
- margin-left:20px;
- font-size:0.8em;
-}
-
-table.standard-table { border: 1px solid #777; border-collapse: collapse; }
-table.standard-table td { padding: 5px; border: 1px solid #888; text-align: left; vertical-align: top; }
-table.standard-table td.header, table.standard-table th { border: 1px solid #777; padding: 0 5px; background: #eee; text-align: left; font-weight: bold; }
-
-ul {
- list-style-type:square;
- padding-left:30px;
- margin-left:30px;
- font-size:0.8em;
-}
-
-li {
- margin-top:0.2em;
- margin-bottom:0.2em;
-}
-
-blockquote {
- border:1px solid #ddd;
- background-color:#eee;
- padding:4px;
- font-size:0.9em;
- font-style:italic;
-}
- blockquote p {
- margin:3px;
- padding:0;
- }
-/* Layout */
-div#container {
- margin:auto;
-
- height:100%;
- background-color:transparent;
-}
-div#page {
- width:80%;
- height:100%;
- float:left;
- border-left:1px solid #999;
- padding-left:10px;
- padding-right: 0px;
- padding-bottom:0px;
-}
-div#page p
-{
- margin-left:0px;
- font-size:0.8em;
-}
-div#fullpage {
- width:90%;
- float:left;
-
- padding-left:30px;
- padding-bottom:30px;
- overflow: hidden;
-}
-div#fullpage p
-{
- margin-left:0px;
- font-size:0.8em;
-}
-/* Header */
-div#header {
- padding:1px 0 30px 0;
-
-}
- div#header h1 {
- font-family:Arial, Helvetica, sans-serif;
- color:#5882FA;
- font-size:1.6em;
- padding:0;
- margin:30px 0 0 20px;
- font-weight:bold;
- }
- div#header h2 {
- font-family:Arial, Helvetica, sans-serif;
- color:#333333;
- font-size:1.0em;
- padding:0;
- margin:0 0 0 20px;
- font-weight:bold;
- border-bottom:0;
- }
-/* Navigation menu */
-div#menu {
- height:20px;
- border-bottom:20px solid #5882FA;
-
-}
- div#menu ul {
- padding:0;
- list-style-type:none;
- margin:0 0 0 0px;
- font-family:Arial, Helvetica, sans-serif;
- font-size:0.75em;
- }
- div#menu ul li {
- float:left;
- display:inline;
- padding:0 7px;
- margin:0;
- }
- div#menu ul li a {
- display:block;
- float:left;
- font-weight:bold;
- padding:1px 15px 0 15px;
- height:2px;
- color:#999;
- text-decoration:none;
- border:none;
- }
- div#menu ul li a:hover {
- text-decoration:underline;
- }
- div#menu ul li a.current:hover {
- text-decoration:none;
- }
- div#menu ul li a.current {
- position:relative; /* for IE6 */
- color:#fff;
- margin-top:-5px;
- padding-top:5px;
- height:20px;
- border:1px solid #5882FA;
- border-bottom:none;
- background-color:#5882FA;
- }
-/* Content */
-div#content {
-
- padding:14px 5px;
-}
-/* Sidebar */
-div#sidebar {
- width:18%;
- float:left;
- padding:0;
- margin:0;
-}
- div#sidebar p {
- margin-left:10px;
- margin-right:5px;
- }
-
- div#sidebar ul {
- padding-left:15px;
- margin-left:15px;
- margin-right:5px;
- }
-
-/* Footer */
-div#footer {
- position:fixed;
- bottom:0;
- width:100%;
- height:40px;
- background-color: #f9f9f9;
-}
-
- div#footer p {
- padding:10px 0 10px 0;
- width:100%;
- border-top:1px solid #ccc;
- margin:5px 0 0 0;
- font-size:0.8em;
- text-align:center;
- }
- div#footer p a {
- text-decoration:underline;
- }
-
-div#info a {position:relative;}
-div#info a span {display: none;}
-
-
-
-div#info a:hover span {
- display: block;
- width:200px;
- position: absolute;
- padding: 5px; margin: 10px; z-index: 100;
- color: #333300; background: white;
- font: 10px Verdana, sans-serif; text-align: center;}
-
-div#plain {
- }
-
- div#plain ul {
- padding:0;
- list-style-type:none;
- margin:10px 0 10px 0;
- /* border-top:1px solid #ccc; /* /* uncomment to add table-like border */
- }
- div#plain ul li {
- margin:0;
- padding:0;
- /* border-bottom:1px solid #ccc; /* /* uncomment to add table-like border */
- }
- div#plain ul li a {
- display:block;
- color: black;
- padding:7px 10px;
- border-right:none;
- text-decoration:none;
- }
- div#plain ul li a:hover {
- border-right:none;
- text-decoration:underline;
- }
-
- a#qbutton{
- font-size:11px;
- font-weight:lighter;
- text-decoration:none;
- }
- a#qbutton{
- font-size:13px;
- font-weight:bold;
- text-decoration:none;
- }
-
-.google-visualization-table-table {
- font-family: arial, helvetica;
- font-size: 0.80em !important;
-}
-
-.btn {
- display: inline-block;
- padding: 4px 12px;
- margin-bottom: 0;
- font-size: 14px;
- line-height: 20px;
- color: #333333;
- text-align: center;
- text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
- vertical-align: middle;
- cursor: pointer;
- background-color: #f5f5f5;
- background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
- background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));
- background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6);
- background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
- background-image: linear-gradient(to bottom, #ffffff, #e6e6e6);
- background-repeat: repeat-x;
- border: 1px solid #cccccc;
- border-color: #e6e6e6 #e6e6e6 #bfbfbf;
- border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
- border-bottom-color: #b3b3b3;
- -webkit-border-radius: 4px;
- -moz-border-radius: 4px;
- border-radius: 4px;
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);
- filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
- -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
- -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
- box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
-}
-
-.btn:hover {
- color: #333333;
- background-color: #e6e6e6;
- text-decoration: none;
- background-position: 0 -15px;
- -webkit-transition: background-position 0.1s linear;
- -moz-transition: background-position 0.1s linear;
- -o-transition: background-position 0.1s linear;
- transition: background-position 0.1s linear;
-}
-.btn:active {
- background-image: none;
- outline: 0;
- -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
- -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
- box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
-}
-
-.btn:focus, .btn:hover {
- outline: 0;
-}
-.example {
- color: #ffffff;
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
- background-color: #5bb75b;
- background-image: -moz-linear-gradient(top, #62c462, #51a351);
- background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351));
- background-image: -webkit-linear-gradient(top, #62c462, #51a351);
- background-image: -o-linear-gradient(top, #62c462, #51a351);
- background-image: linear-gradient(to bottom, #62c462, #51a351);
- background-repeat: repeat-x;
- border-color: #51a351 #51a351 #387038;
- border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
-}
-.example:focus {
- background-color: #51a351
-}
-
-.example:hover {
- color: #333333;
- background-color: #51a351;
- *background-color: #499249;
-}
diff --git a/interactive-mining-backend/madoap/src/static/tablestyles.css b/interactive-mining-backend/madoap/src/static/tablestyles.css
deleted file mode 100644
index 6164731..0000000
--- a/interactive-mining-backend/madoap/src/static/tablestyles.css
+++ /dev/null
@@ -1,152 +0,0 @@
-table.top{
-border: 0px ;
-border-spacing:10px;
-font-family:"Bookman Old Style";
-}
-.usimilar{
-display:none;
-}
-
-.uprofile{
-display:none;
-}
-
-div#uprofile td.innerheader{
- background-color:#ccff66;
- border:1px ridge;
- width:110;
- /*font-weight: bold; */
- }
-
-div#uprofile td.username{
-background-color:#ccff66;
-}
-
-table.userProfile{
- width:100%;
-border: 2px ridge;
-border-spacing:0px;
-border-color:#333333;
-background-color:#333333;
-}
-
-.username {
-font-family:"Bookman Old Style";
-font-size:36px;
-text-align:center;
-}
-
-td.username{
-background-color:#999999;
-}
-
-tr.username{
-border:#333333;
-}
-
-table.innerprofile{
-/*border-spacing: 0pt;*/
-/*padding:3px;*/
-width:100%;
-border-spacing:0px;
-border:1px solid;
-border-color:#333333;
-}
-
-table.innerprofile td{
-/*dding:3px;*/
-border-spacing:0px;
-border:1px solid;
-border-color:#333333;
-}
-
-td.innerheader{
-background-color:#cccccc;
-border:1px ridge;
-width:110;
-/*font-weight: bold; */
-}
-
-
-
-
-
-tr.innerheader{
-
-border:1px ridge;
-
-}
-
-table.inner{
-border:0px;
-width:100%;
-border-spacing:0px;
-background-color:#ffffff;
-border-color:#ffffff;
-}
-
-
-td.innerprofile{
-background-color:#ffffff;
-border-color:#333333;
-border:1px solid;
-}
-
- html {
-
-}
-body {
- margin:0 auto;
- padding:0;
- width:100%;
- height:100%;
- font-family:Arial, Helvetica, sans-serif;
- /*background-color:#999;*/
-}
-/* Global */
-a {
- font-weight:bold;
- text-decoration:underline;
- color:#333;
- position: relative;
-}
-a:hover {
- color:#5882FA;
-}
-
-.extra {
-
- text-decoration:none;
-}
-
- a span.extra {display: none;
- text-decoration:none;
-
-}
-
-
- a:hover span.extra {
- text-decoration:none;
- display: block;
- width:130px;
- position: absolute;
- padding: 5px;
- /*margin: 5px; */
- z-index: 10000;
- color: #000000;
- background: white;
- font: 10px Verdana, sans-serif;
- left:10px;
- top:15px
- }
-
-
-
- #term-vis {
- padding:50px;
-margin-left:auto;
-margin-right:auto;
-width:70%;
-border:1px solid rgb(204, 204, 204);
-text-align:center;
- }
diff --git a/interactive-mining-backend/madoap/src/static/tc.js b/interactive-mining-backend/madoap/src/static/tc.js
deleted file mode 100644
index f27e6ca..0000000
--- a/interactive-mining-backend/madoap/src/static/tc.js
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
-
-A list of terms, where the size and color of each term is determined
-by a number (typically numebr of times it appears in some text).
-Uses the Google Visalization API.
-
-Data Format
- First column is the text (string)
- Second column is the weight (positive number)
- Third optional column ia a link (string)
-
-Configuration options:
- target Target for link: '_top' (defailt) '_blank'
-
-Methods
- none
-
-Events
- select
-
-*/
-function changecss(theClass,element,value) {
- //Last Updated on June 23, 2009
- //documentation for this script at
- //http://www.shawnolson.net/a/503/altering-css-class-attributes-with-javascript.html
- var cssRules;
- alert("class is:"+theClass+" element:"+element+"value: "+value);
- var added = false;
- for (var S = 0; S < document.styleSheets.length; S++){
-
- if (document.styleSheets[S]['rules']) {
- cssRules = 'rules';
- } else if (document.styleSheets[S]['cssRules']) {
- cssRules = 'cssRules';
- } else {
- //no rules found... browser unknown
- }
-
- for (var R = 0; R < document.styleSheets[S][cssRules].length; R++) {
- if (document.styleSheets[S][cssRules][R].selectorText == theClass) {
- alert("found");
- if(document.styleSheets[S][cssRules][R].style[element]){
- document.styleSheets[S][cssRules][R].style[element] = value;
- added=true;
- break;
- }
- }
- }
- if(!added){ alert("not added");
- if(document.styleSheets[S].insertRule){
- document.styleSheets[S].insertRule(theClass+' { '+element+': '+value+'; }',document.styleSheets[S][cssRules].length);
- } else if (document.styleSheets[S].addRule) {
- document.styleSheets[S].addRule(theClass,element+': '+value+';');
- }
- }
- }
- }
-
-
-TermCloud = function(container) {
- this.container = container;
-}
-
-TermCloud.MIN_UNIT_SIZE = 1;
-TermCloud.MAX_UNIT_SIZE = 7;
-TermCloud.RANGE_UNIT_SIZE = TermCloud.MAX_UNIT_SIZE - TermCloud.MIN_UNIT_SIZE;
-
-TermCloud.prototype.draw = function(data, options) {
-// var initcolor=168;
-// for ( var i=1; i<10;i++){
-// changecss('.term-cloud-'+i,'color','rgb('+initcolor+','+initcolor+','+initcolor+')');
-// alert("ok");
-// initcolor+=16;
-// }
- var cols = data.getNumberOfColumns();
- var valid = (cols >= 2 && cols <= 3 && data.getColumnType(0) == 'string' &&
- data.getColumnType(1) == 'number');
- if (valid && cols == 3) {
- valid = data.getColumnType(2) == 'string';
- }
-
- if (!valid) {
- this.container.innerHTML = 'TermCloud Error: Invalid data format. First column must be a string, second a number, and optional third column a string ';
- return;
- }
-
- options = options || {};
- morethanone=false;
- var linkTarget = options.target || '_top';
-
- // Compute frequency range
- var minFreq = 999999;
- var maxFreq = 0;
- for (var rowInd = 0; rowInd < data.getNumberOfRows(); rowInd++) {
- var f = data.getValue(rowInd, 1);
- if (f > 0) {
- minFreq = Math.min(minFreq, f);
- maxFreq = Math.max(maxFreq, f);
- }
- var teststr = data.getValue(rowInd, 0);
- if (teststr.indexOf(' ')>=0){
- morethanone=true;
-
- }
- }
- var label=data.getColumnLabel(1);
-
- if (minFreq > maxFreq) {
- minFreq = maxFreq;
- }
- if (minFreq == maxFreq) {
- minFreq--;
- //maxFreq++;
- }
- var range = maxFreq - minFreq;
- range = Math.max(range, 4);
-
- var html = [];
- html.push('');
-
- this.container.innerHTML = html.join('');
-};
-
-TermCloud.prototype.escapeHtml = function(text) {
- if (text == null) {
- return '';
- }
- return text.replace(/&/g, '&').
- replace(//g, '>').
- replace(/"/g, '"');
-};
diff --git a/interactive-mining-backend/madoap/src/static/tcgrey.css b/interactive-mining-backend/madoap/src/static/tcgrey.css
deleted file mode 100644
index a299778..0000000
--- a/interactive-mining-backend/madoap/src/static/tcgrey.css
+++ /dev/null
@@ -1,17 +0,0 @@
-.term-cloud {font-family: arial; font-size: 12px; }
-.term-cloud-1 {font-size: 12px; color: rgb(128,128,128) ; }
-.term-cloud-2 {font-size: 16px; color: rgb(112,112,112); }
-.term-cloud-3 {font-size: 18px; color: rgb(96,96,96); }
-.term-cloud-4 {font-size: 22px; color: rgb(80,80,80); }
-.term-cloud-5 {font-size: 26px; color: rgb(64,64,64); }
-.term-cloud-6 {font-size: 32px; color: rgb(48,48,48); }
-.term-cloud-7 {font-size: 36px; color: rgb(32,32,32); }
-.term-cloud-8 {font-size: 40px; color: rgb(16,16,16); }
-.term-cloud-9 {font-size: 44px; color: rgb(0,0,0); }
-.term-cloud-error {font-family: arial; font-size: 10px; color: red; }
-.term-cloud-link {text-decoration: none; }
-a.term-cloud { position: relative;}
-a:hover.term-cloud-link {text-decoration:underline } /*border-bottom:1px solid black;*/
-/*term-cloud-link:hover {text-decoration: underline; }*/
-
-
diff --git a/interactive-mining-backend/madoap/src/static/upload-codes.js b/interactive-mining-backend/madoap/src/static/upload-codes.js
deleted file mode 100644
index a037bb2..0000000
--- a/interactive-mining-backend/madoap/src/static/upload-codes.js
+++ /dev/null
@@ -1,437 +0,0 @@
-(function(){
-
- function getCookie(name) {
- var value = "; " + document.cookie;
- var parts = value.split("; " + name + "=");
- if (parts.length == 2) return parts.pop().split(";").shift();
- }
-
- ////////// UPLOAD FUNCTIONS
-
- $( '.inputfile' ).each( function() {
- var $input = $( this ),
- $label = $input.next( 'label' ),
- labelVal = $label.html();
-
- $input.on( 'change', function( e )
- {
- var fileName = '';
-
- if( this.files && this.files.length > 1 )
- fileName = ( this.getAttribute( 'data-multiple-caption' ) || '' ).replace( '{count}', this.files.length );
- else if( e.target.value )
- fileName = e.target.value.split( '\\' ).pop();
-
- if( fileName )
- $label.find( 'span' ).html( fileName );
- else
- $label.html( labelVal );
- });
-
- // Firefox bug fix
- $input
- .on( 'focus', function(){ $input.addClass( 'has-focus' ); })
- .on( 'blur', function(){ $input.removeClass( 'has-focus' ); });
- });
-
- //generates a unique id
- var generateId = function(){
- return "row-" + +new Date() + Math.random().toFixed(5).substring(2);
- }
-
- var onUserStartTyping = function() {
- $("#initial-type-input").on( 'keypress', function( e ){
- triggerDataTable();
- var value = $(this).val();
- var newId = generateId();
- addDataToTable(newId, value, "");
- var currentEle = $('#'+ newId).find("td.code");
- editValue(currentEle, value, 0);
- });
- }
-
- var handleAddRowButton = function() {
- $('#add-row-below').on('focus', function( e ) {
- var newId = generateId();
- addDataToTable(newId, "", "");
- $('#'+ newId).find("td.code").trigger("click");
- });
- }
-
- var handleNextButton = function() {
- $('#next-button').on('click', function( e ) {
- console.log(JSON.stringify(tableDataToArray()));
- var formData = new FormData();
- formData.append("concepts", JSON.stringify(tableDataToArray()));
- $.ajax({
- url: "upload-codes",
- type: 'POST',
- data: formData,
- async: false,
- success: function (data) {
- console.log(JSON.parse(data).respond)
- window.location="configure-profile"
- },
- error: function (xhr, ajaxOptions, thrownError) {
- $('#file-upload-response').html('File Failed to Upload! '+xhr.responseText)
- // $('#file-uploaded')[0].checked = false;
- UIkit.notification({
- message: xhr.responseText,
- status: 'danger',
- pos: 'top-center',
- timeout: 0
- });
- },
- cache: false,
- contentType: false,
- processData: false
- });
- });
- }
-
- var tableDataToArray = function() {
- var data = {};
- $("#data-table tbody tr").each(function(i, v){
- // data[i] = Array();
- // $(this).children('td').each(function(ii, vv){
- // data[i][ii] = $(this).text();
- // });
- if ($(v).find("td.code").text() === '')
- return true;
- data[$(v).find("td.code").text()] = $(v).find("td.acknowl").text();
- })
- return data
- }
-
- var clickedElement=null;
- var saveEditBox = function(element) {
- codeElement = element.find(".code");
- ackowElement = element.find(".acknowl");
- codeElement2 = element.find(".code .thVal");
- ackowElement2 = element.find(".acknowl .thVal");
- var codeValue2 = codeElement2.val().trim();
- var ackowValue2 = ackowElement2.val().trim();
- $(codeElement).html(codeValue2);
- $(ackowElement).html(ackowValue2);
- if (codeValue2 == "") {
- codeElement.addClass("empty");
- }
- if (ackowValue2 == "") {
- ackowElement.addClass("empty");
- }
- }
-
- var editValue = function(currentEle, target) {
- clickedElement = currentEle;
- // Locate code ande acknow
- codeElement = currentEle.find(".code");
- ackowElement = currentEle.find(".acknowl");
- // remove empty class if any
- codeElement.removeClass("empty");
- ackowElement.removeClass("empty");
- $(document).off('click');
- // get elements lines number
- var divHeight = ackowElement.outerHeight(true);
- var lineHeight = parseInt(ackowElement.css('line-height'));
- var lines = divHeight / lineHeight;
-
- var codeValue = codeElement.html();
- input1 = $(' ');
- input1.val(codeValue);
- $(codeElement).html(input1);
-
-
- var ackowValue = ackowElement.html();
- input2 = $('');
- input2.val(ackowValue);
- $(ackowElement).html(input2);
-
-
- if (target === "code") {
- $(".code .thVal").focus();
- } else {
- $(".acknowl .thVal").focus();
- }
- $(".thVal").keyup(function (event) {
- // Handle Enter key
- if (event.keyCode == 13) {
- var parent = $(".thVal").parent().parent();
- codeElement2 = parent.find(".code .thVal");
- ackowElement2 = parent.find(".acknowl .thVal");
- var codeValue2 = codeElement2.val().trim();
- var ackowValue2 = ackowElement2.val().trim();
- $(codeElement).html(codeValue2);
- $(ackowElement).html(ackowValue2);
- if (codeValue2 == "") {
- codeElement.addClass("empty");
- }
- if (ackowValue2 == "") {
- ackowElement.addClass("empty");
- }
- clickedElement = null;
- }
- // Handle Esc key
- else if (event.keyCode == 27) {
- $(codeElement).html(codeValue);
- $(ackowElement).html(ackowValue);
- if (codeValue == "") {
- codeElement.addClass("empty");
- }
- if (ackowValue == "") {
- ackowElement.addClass("empty");
- }
- clickedElement = null;
- }
- });
- // Handle clicks outside editboxes
- $(document).click(function (event) {
- if($(event.target).hasClass('thVal')===false) {
- saveEditBox(currentEle);
- $(document).off('click');
- clickedElement = null;
- }
- });
- }
-
- // a fucntion to catch double click on positive and negative phrases edit boxes
- var addDoubleClick = function(element){
- $(element).click(function (event) {
- console.log($(event.target));
- if($(event.target).hasClass('thVal')===false) {
- event.stopPropagation();
- // save previous clicked box
- if (clickedElement)
- saveEditBox(clickedElement);
- var currentEle = $(this).parent();
- editValue(currentEle, $(event.target).hasClass('code')?"code":$(event.target).hasClass('acknowl')?"acknowl":"code");
- }
- });
- }
-
- var removeDataRow = function(id){
- var item = $('#' + id );
-
- item.addClass('removed-item')
- .one('webkitAnimationEnd oanimationend msAnimationEnd animationend', function(e) {
- $(this).remove();
- // fix # column numbering
- count_table_rows = 1;
- $("#data-table tbody tr").each(function(i, v){
- // data[i] = Array();
- // $(this).children('td').each(function(ii, vv){
- // data[i][ii] = $(this).text();
- // });
- $(v).find("td.num").text(count_table_rows);
- count_table_rows++;
- })
- if (count_table_rows === 1) {
- $('#next-button').attr('disabled', 'disabled').addClass('disabled');
- }
- });
- };
-
- var count_table_rows = 1;
-
- var addDataToTable = function(id, code, acknowledgment) {
- // '+count_table_rows+'
- var row = '' + code + ' ' + acknowledgment +' '
- table = $('#data-table tbody');
-
- // if content is correct and not empty append to table
- $('#data-table tbody').append(row);
-
- count_table_rows++;
- if (count_table_rows != 1) {
- $("#next-button").removeAttr('disabled').removeClass('disabled');
- }
-
- // add all the item's extra functionality
- var createdItem = $('#'+ id);
- // delete button
- createdItem.append($(' ', {"class":"edit"}).append($(' ', {"class":"uk-icon-link", "uk-icon":"icon: pencil", "contenteditable" : "false"})));
- createdItem.append($(' ', {"class":"delete"}).append($(' ', {
- "class" :"uk-icon-link",
- "uk-icon" : "icon: trash",
- "contenteditable" : "false",
- click: function(){
- var confirmation = confirm('Delete this word?');
- if(confirmation) {
- removeDataRow(id);
- }
- }
- })));
- addDoubleClick($(createdItem).find("td.code"));
- addDoubleClick($(createdItem).find("td.acknowl"));
- addDoubleClick($(createdItem).find("td.edit"));
- createdItem.on('keydown', function(ev){
- if(ev.keyCode === 13) return false;
- });
- }
-
- var triggerDataTable = function() {
- $("#initial-type-input").remove();
- $("#data-table").show();
- }
-
- var handleFileUploadButton = function() {
- $("form#codes-file-input-form").on('change', function(){
- if ($('#codes-file-input')[0].value === "") {
- window.alert("You must specify a data file to import.");
- return false;
- }
- var formData = new FormData($(this)[0]);
- $.ajax({
- url: "upload-codes",
- type: 'POST',
- data: formData,
- async: false,
- cache: false,
- contentType: false,
- processData: false,
- success: function (data) {
- // TODO check for error
- $('#codes-file-upload-response').html(JSON.parse(data).respond)
- respond = JSON && JSON.parse(data).respond || $.parseJSON(data).respond;
- UIkit.notification({
- message: respond,
- status: 'success',
- pos: 'top-center',
- timeout: 5000
- });
- obj = JSON && JSON.parse(data).data || $.parseJSON(data).data;
- // console.log(obj);
- for (var key1 in obj) {
- if (obj.hasOwnProperty(key1)) {
- addDataToTable(generateId(), key1, obj[key1]);
- }
- }
- triggerDataTable();
- },
- error: function (xhr, ajaxOptions, thrownError) {
- $('#codes-file-upload-response').html('File Failed to Upload! '+xhr.responseText)
- // $('#file-uploaded')[0].checked = false;
- UIkit.notification({
- message: xhr.responseText,
- status: 'danger',
- pos: 'top-center',
- timeout: 0
- });
- }
- });
- $("#codes-file-input")[0].value = "";
-
- return false;
- });
-
- var bar = document.getElementById('js-progressbar');
- UIkit.upload('.js-upload', {
- url: 'upload-codes',
- multiple: false,
- name: 'upload',
- loadStart: function (e) {
- bar.removeAttribute('hidden');
- bar.max = e.total;
- bar.value = e.loaded;
- },
- progress: function (e) {
- bar.max = e.total;
- bar.value = e.loaded;
- },
- loadEnd: function (e) {
- bar.max = e.total;
- bar.value = e.loaded;
- },
- completeAll: function (data) {
- console.log(data.responseText);
- setTimeout(function () {
- bar.setAttribute('hidden', 'hidden');
- }, 1000);
- $('#codes-file-upload-response').html(JSON.parse(data.responseText).respond)
- respond = JSON && JSON.parse(data.responseText).respond || $.parseJSON(data.responseText).respond;
- obj = JSON && JSON.parse(data.responseText).data || $.parseJSON(data.responseText).data;
- // console.log(obj);
- // clear already inserted data
- $('#data-table tbody').empty();
- count_table_rows = 1;
- // add newly added data
- var dataCounter = 0;
- for (var key1 in obj) {
- if (obj.hasOwnProperty(key1)) {
- addDataToTable(generateId(), key1, obj[key1]);
- dataCounter++;
- }
- }
- UIkit.notification({
- message: ''+dataCounter+' Codes loaded successfully!',
- status: 'success',
- pos: 'top-center',
- timeout: 5000
- });
- triggerDataTable();
- },
- error: function (xhr, ajaxOptions, thrownError) {
- $('#codes-file-upload-response').html('File Failed to Upload! '+xhr.responseText)
- // $('#file-uploaded')[0].checked = false;
- UIkit.notification({
- message: xhr.responseText,
- status: 'danger',
- pos: 'top-center',
- timeout: 0
- });
- }
- });
-
- }
-
- var checkAlreadyUserState = function() {
- var formData = new FormData();
- formData.append("already", "");
- $.ajax({
- url: "upload-codes",
- type: 'POST',
- data: formData,
- async: false,
- success: function (data) {
- obj = JSON && JSON.parse(data).data || $.parseJSON(data).data;
- // console.log(obj);
- var numOfCodes = 0;
- for (var key1 in obj) {
- if (obj.hasOwnProperty(key1)) {
- addDataToTable(generateId(), key1, obj[key1]);
- }
- numOfCodes++
- }
- if (numOfCodes != 0) {
- triggerDataTable();
- } else {
- localStorage.clear();
- }
- },
- error: function (xhr, ajaxOptions, thrownError) {
- $('#codes-file-upload-response').html('File Failed to Upload! '+xhr.responseText)
- // $('#file-uploaded')[0].checked = false;
- UIkit.notification({
- message: xhr.responseText,
- status: 'danger',
- pos: 'top-center',
- timeout: 0
- });
- },
- cache: false,
- contentType: false,
- processData: false
- });
- }
-
- var init = function(){
- checkAlreadyUserState();
- handleFileUploadButton();
- onUserStartTyping();
- handleAddRowButton();
- handleNextButton();
- };
-
- //start all
- init();
-
-})();
diff --git a/interactive-mining-backend/madoap/src/templates/base.html b/interactive-mining-backend/madoap/src/templates/base.html
deleted file mode 100644
index 53a2adf..0000000
--- a/interactive-mining-backend/madoap/src/templates/base.html
+++ /dev/null
@@ -1,69 +0,0 @@
-
-
-
-
-
-
-{% block jsimports %}{% end %}
-{% block loadfun %}
-
-{% end %}
-
-
-
-
-
-
-
-
-
-
-
-
-
- {% block content %}{% end %}
-
-
-
-
-
-
-
-
-
-
diff --git a/interactive-mining-backend/madoap/src/templates/base_v2.html b/interactive-mining-backend/madoap/src/templates/base_v2.html
deleted file mode 100644
index 80395f8..0000000
--- a/interactive-mining-backend/madoap/src/templates/base_v2.html
+++ /dev/null
@@ -1,276 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {% block jsimports %}{% end %}
- {% block loadfun %}
-
- {% end %}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {% block content %}{% end %}
-
-
-
-
-
-
-
-
-
- OpenAIRE uses cookies in order to function properly.
- Cookies are small pieces of data that websites store in your browser to allow us to give you the best browsing experience possible.
- By using the OpenAIRE portal you accept our use of cookies. Read more
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/interactive-mining-backend/madoap/src/templates/configure_profile.html b/interactive-mining-backend/madoap/src/templates/configure_profile.html
deleted file mode 100644
index aadf1b7..0000000
--- a/interactive-mining-backend/madoap/src/templates/configure_profile.html
+++ /dev/null
@@ -1,270 +0,0 @@
-{% extends "base_v2.html" %}
-{% block configure_profile %} class="current" {% end %}
-{% block content %}
-Configure profile
-
-
-
-
-
-
-
-
-
-
-
-
Matching results
-
-
-
- 0 documents uploaded
-
-
-
-
-
-
Run mining
-
-
-
-
-
-
-
-
-
-
- Satisfied with the results?
- Save your profile
-
-
-
-
-
-
-
Working on it, please wait...
-
-
-
-
-{% end %}
\ No newline at end of file
diff --git a/interactive-mining-backend/madoap/src/templates/configure_profile2.html b/interactive-mining-backend/madoap/src/templates/configure_profile2.html
deleted file mode 100644
index 58c0fe2..0000000
--- a/interactive-mining-backend/madoap/src/templates/configure_profile2.html
+++ /dev/null
@@ -1,308 +0,0 @@
-{% extends "base_v2.html" %}
-{% block configure_profile %} class="current" {% end %}
-{% block content %}
-Configure profile
-
-
-
-
-
-
-
-
-
Preconfigured rules
-
-
-
-
- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
- Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
- Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur, sed do eiusmod.
-
-
-
-
-
-
-
- Satisfied with the results?
- Save your profile
-
-
-
-
-
-
-
-
-
-
Matching results
-
-
-
- 0 documents uploaded
-
-
-
-
-
-
Apply rules
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Working on it, please wait...
-
-
-
-
-{% end %}
\ No newline at end of file
diff --git a/interactive-mining-backend/madoap/src/templates/create_upload_profile.html b/interactive-mining-backend/madoap/src/templates/create_upload_profile.html
deleted file mode 100644
index 90f4f71..0000000
--- a/interactive-mining-backend/madoap/src/templates/create_upload_profile.html
+++ /dev/null
@@ -1,28 +0,0 @@
-{% extends "base_v2.html" %}
-{% block create_upload %} class="current" {% end %}
-{% block content %}
-Profile create
-
-
-
-
-{% end %}
\ No newline at end of file
diff --git a/interactive-mining-backend/madoap/src/templates/error_template.html b/interactive-mining-backend/madoap/src/templates/error_template.html
deleted file mode 100644
index a2d7358..0000000
--- a/interactive-mining-backend/madoap/src/templates/error_template.html
+++ /dev/null
@@ -1,204 +0,0 @@
-{% autoescape None %}
-
-
-
-
-
- {{escape(str(exception_type))}} at {{escape(request_path)}}
-
-
-
-
-
-
{{escape(str(exception_type))}} at {{escape(request_path)}}
-
-
-
{{exception_value}}
-
-
-
- Python
- {{escape(frames[0].filename)}} in {{escape(frames[0].function)}}, line {{frames[0].lineno}}
-
-
-
- Web
- {{escape(request_method)}} {{escape(request_path)}}
-
-
-
-
-
-
Traceback (innermost first)
-
-
- {%for frame in frames%}
-
- {{escape(frame.filename)}}
in {{escape(frame.function)}}
-
- {%if frame.context_line%}
-
-
- {%if frame.pre_context%}
-
- {%for line in frame.pre_context%}
- {{escape(line)}}
- {%end%}
-
- {%end%}
-
-
- {{escape(frame.context_line)}} ...
-
-
- {%if frame.post_context%}
-
- {%for line in frame.post_context%}
- {{escape(line)}}
- {%end%}
-
- {%end%}
-
-
- {%end%}
-
- {%if frame.vars%}
-
- {%end%}
-
- {{dicttable(frame.vars, kls='vars', id=('v' + str(frame.id)))}}
-
- {%end%}
-
-
-
-
- {%if response_output or response_headers%}
-
Response so far
-
HEADERS
- {{dicttable_items(response_headers)}}
-
-
BODY
-
- {{escape(response_output)}}
-
-
-
Request information
-
HEADERS
- {{dicttable(request_headers)}}
-
-
BODY
- {{escape(request_input)}}
-
-
COOKIES
- {{dicttable(request_cookies)}}
- {%end%}
-
-
-
-
- You're seeing this because you have the debug
setting
- set to True
. Set that to False
if you don't want to see this.
-
-
-
-
\ No newline at end of file
diff --git a/interactive-mining-backend/madoap/src/templates/interactivemining.html b/interactive-mining-backend/madoap/src/templates/interactivemining.html
deleted file mode 100644
index bca7484..0000000
--- a/interactive-mining-backend/madoap/src/templates/interactivemining.html
+++ /dev/null
@@ -1,196 +0,0 @@
-{% extends "base.html" %}
-{% block interactive %} class="current" {% end %}
-{% block content %}
-
-Query Generator
-
-
-
-
-
-
Add your Text File of codes
-
-
-
-
-
Add your positive words or phrases
-
-
-
-
-
Add your negative words or phrases
-
-
-
-
-
-
Insert your Text here:
-
- Upload a single .pdf file containing a document
- Upload a single .txt file containing your documents in json format
- Paste your custom text
-
-
-
-
Add your Zip File of .PDF files
-
-
-
-
-
-
-
-
-{% end %}
\ No newline at end of file
diff --git a/interactive-mining-backend/madoap/src/templates/madappbar.html b/interactive-mining-backend/madoap/src/templates/madappbar.html
deleted file mode 100644
index ebf650c..0000000
--- a/interactive-mining-backend/madoap/src/templates/madappbar.html
+++ /dev/null
@@ -1,43 +0,0 @@
-{% extends "base.html" %}
-{% block profileclass %} class="current" {% end %}
-{% block content %}
-
-Statistics
-
-
-
- {% block service %}
-
Welcome to OpenAIRE statistics service
- {% end %}
-
-{% end %}
diff --git a/interactive-mining-backend/madoap/src/templates/madappview.html b/interactive-mining-backend/madoap/src/templates/madappview.html
deleted file mode 100644
index 4e4b29b..0000000
--- a/interactive-mining-backend/madoap/src/templates/madappview.html
+++ /dev/null
@@ -1,403 +0,0 @@
-{% autoescape None %}
-{% extends "madappbar.html" %}
-{% block jsimports %}
-{{app['title']}}
-
-
-
-
-
-{% block loadfun %}
-
-{% end %}
-
-{% end %}
-
-{% block service %}
-
-
- {{app["title"]}}
- {% if settings.DEBUG %}
- Show query
-
- {% end %}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {% if 'template' in app %}
-
- {{ app['template'] }}
-
- {% else %}
-
- {% end %}
-
-{% end %}
diff --git a/interactive-mining-backend/madoap/src/templates/save_profile.html b/interactive-mining-backend/madoap/src/templates/save_profile.html
deleted file mode 100644
index aa53191..0000000
--- a/interactive-mining-backend/madoap/src/templates/save_profile.html
+++ /dev/null
@@ -1,47 +0,0 @@
-{% extends "base_v2.html" %}
-{% block save_profile %} class="current" {% end %}
-{% block content %}
-Save profile
-
-
-
-
-
-
-{% end %}
\ No newline at end of file
diff --git a/interactive-mining-backend/madoap/src/templates/upload_codes.html b/interactive-mining-backend/madoap/src/templates/upload_codes.html
deleted file mode 100644
index 3ce725a..0000000
--- a/interactive-mining-backend/madoap/src/templates/upload_codes.html
+++ /dev/null
@@ -1,112 +0,0 @@
-{% extends "base_v2.html" %}
-{% block upload_codes %} class="current" {% end %}
-{% block content %}
-Upload project codes
-
-
-
-
-
-
Input options
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
-
-
-
-
-
-
-
- Upload matching context .tsv file type
-
-
-
-
- Choose file
-
-
-
-
-
-
-
-
-
-
or
-
-
-
-
-
-
-
- Keyword
- Context
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Next
-
-
-
-
-
-{% end %}
\ No newline at end of file