require.config({paths:{"bootstrap-tour":"/webjars/wiki%3Aen/bootstrap-tour/0.11.0/js/bootstrap-tour.min.js?r=1"},shim:{"bootstrap-tour":{deps:["bootstrap","jquery"],exports:"Tour"}}});require(["jquery","xwiki-meta"],function(e,g){var f=function(h){return h.replace(/[^a-zA-Z0-9\-]/g,function(i){return"_"+i.charCodeAt(0)+"_"})};var d=function(l,k){var h=e('<div id="tourResumeContainer" style="position: fixed; bottom: 0; right: 0; z-index: 2000; width: 300px; text-align: right;"></div>').appendTo(e(document.body));var i=e('<button id="tourResume" class="btn btn-default btn-xs"><span class="fa fa-info-circle"></span> Show tour</button>').appendTo(h);h.hide();h.fadeIn();i.click(function(){if(k){i.popover("destroy")}l.start(true);i.remove()});var j="You can restart the tour by clicking this button at anytime";if(k){i.popover({animation:true,content:j,placement:"top",container:"#tourResumeContainer"});i.popover("show");setTimeout(function(){i.popover("destroy")},7000)}};var c=function(i){var h=e('<button class="btn btn-xs btn-default" data-role="end" style="position: absolute; top: 3px; right: 5px;"><span class="fa fa-times"></span></button>').appendTo(e(".tour"));e(".tour .popover-title").css("padding-right",h.outerWidth()+10+"px")};var b=function(h,j){var i='<div class="popover tour" style="min-width: 300px;">\n  <div class="arrow"></div>\n  <h3 class="popover-title"></h3>\n  <div class="popover-content"></div>\n  <div class="popover-navigation row">\n    <div class="col-xs-6 text-left">\n';if(j.prev>-1){i+='      <button class="btn btn-default btn-sm" data-role="prev">\u00AB Prev</button>\n'}i+='    </div>\n    <div class="col-xs-6 text-right">\n';if(j.next>-1){i+='      <button class="btn btn-primary btn-sm" data-role="next">Next \u00BB</button>\n'}else{i+='      <button class="btn btn-success btn-sm" data-role="end">End tour</button>\n'}i+="    </div>\n  </div></div>";return i};var a=function(h){var i="/webjars/wiki%3Aen/bootstrap-tour/0.11.0/css/bootstrap-tour.min.css";e("<link>").attr("rel","stylesheet").attr("type","text/css").attr("href",i).appendTo(e(document.head));require(["bootstrap-tour"],function(l){var j=f("tour_"+h.name);var o=new l({name:j,storage:window.localStorage,onEnd:function(){d(o,true)},onShown:c,orphan:true,template:b});for(var k=0;k<h.steps.length;k++){if(e(h.steps[k].element).length||h.steps[k].element==""){o.addStep(h.steps[k])}}var n=function(q){var p=RegExp("[?&]"+q+"=([^&]*)").exec(window.location.search);return p&&decodeURIComponent(p[1].replace(/\+/g," "))};var m=n("startTour")=="true";o.init();if(m){o.restart()}else{o.start()}if(window.localStorage.getItem(j+"_end")=="yes"){d(o,false)}})};e(document).ready(function(){if(e(window).innerWidth()<=768){return}var h={url:new XWiki.Document("TourJson","TourCode").getURL("get","xpage=plain&outputSyntax=plain"),dataType:"json",data:{tourDoc:g.document}};e.ajax(h).success(function(k){for(var j=0;j<k.tours.length;++j){var l=k.tours[j];if(l.steps.length>0){a(l)}}})})});