function checkBookmark(n){loggedInUserName!=""&&$.ajax({url:"/Account/CheckBookmark",type:"GET",data:{contextItem:n.data("item-id")},context:this,success:function(t){if(t!=""){var i=t.split("|"),r=n.html().replace(i[1],i[0]);n.html(r)}},error:function(n){console.log("error",n)}})}function AddBookmark(n){$.ajax({url:"/Account/AddBookmark",type:"POST",data:{contextItem:n.data("item-id")},context:this,success:function(t){var r,u,i;t!=""&&(t!="Login Required"?(r=t.split("|"),u=n.html().replace(r[1],r[0]),n.html(u),i="Add",t=="Bookmark|Unbookmark"&&(i="Delete"),dataLayer.push({event:"Bookmark",action:i,label:n.data("tracking-link")})):openLoginPopup("bookmarks",n.data("item-id")))},error:function(n){console.log("error",n)}})}function AddBookmarkAfterLogin(n){$.ajax({url:"/Account/AddBookmark",type:"POST",data:{contextItem:n},context:this,success:function(n){n!=""&&n!="Login Required"&&location.reload()},error:function(n){console.log("error",n)}})}function checkFollow(n){loggedInUserName!=""&&$.ajax({url:"/Account/CheckFollow",type:"GET",data:{contextItem:n.data("item-id")},context:this,success:function(t){if(t!=""){var i=t.split("|"),r=n.html().replace(i[1],i[0]);n.html(r),i[1]=="Follow"?n.children(".icon").hide():n.children(".icon").show()}},error:function(n){console.log("error",n)}})}function AddFollow(n){$.ajax({url:"/Account/AddFollow",type:"POST",data:{contextItem:n.data("item-id")},context:this,success:function(t){var i,u,r;t!=""&&(t!="Login Required"?(i=t.split("|"),u=n.html().replace(i[1],i[0]),n.html(u),i[1]=="Follow"?n.children(".icon").hide():n.children(".icon").show(),i.length>1&&$(".followers .number").html(i[2]+"&nbsp;"),r="Add",i[0]=="Follow"&&(r="Delete"),dataLayer.push({event:"Follow",action:r,label:n.data("tracking-link")})):openLoginPopup("follow",n.data("item-id")))},error:function(n){console.log("error",n)}})}function AddFollowAfterLogin(n){$.ajax({url:"/Account/AddFollow",type:"POST",data:{contextItem:n},context:this,success:function(n){n!=""&&n!="Login Required"&&location.reload()},error:function(n){console.log("error",n)}})}function checkWatchLater(n){loggedInUserName!=""&&$.ajax({url:"/Account/CheckWatchLater",type:"GET",data:{contextItem:n.data("item-id")},context:this,success:function(t){if(t!=""){var i=t.split("|");$(n).find("div").replaceWith("<div>"+i[1]+"</div>")}},error:function(n){console.log("error",n)}})}function AddToWatchLater(n){$.ajax({url:"/Account/AddToWatchLater",type:"POST",data:{contextItem:n.data("item-id")},context:this,success:function(t){var r,i;t!=""&&(t!="Login Required"?(r=t.split("|"),$(n).find("div").replaceWith("<div>"+r[1]+"</div>"),i="Add",r[0].indexOf("Later")>=0&&(i="Delete"),dataLayer.push({event:"Later",action:i,label:n.data("tracking-link")})):openLoginPopup("watchlater",n.data("item-id")))},error:function(n){console.log("error",n)}})}function AddToWatchLaterAfterLogin(n){$.ajax({url:"/Account/AddToWatchLater",type:"POST",data:{contextItem:n},context:this,success:function(n){n!=""&&n!="Login Required"&&location.reload()},error:function(n){console.log("error",n)}})}function openLoginPopup(n,t){$("#IsCallFromOutSide").val("true"),$("#FunctionType").val(n),$("#FunctionParameterID").val(t),$("#LoginModal").modal()}function AddMyNotes(n,t){$.ajax({url:"/Account/AddMyNotes",type:"POST",data:{contextItem:n,Note:t},context:this,success:function(n){n!=""&&(n!="Login Required"?n=="Fail"&&alert("We cannot complete your request due to internal processing errors!"):openLoginPopup("mynote",t))},error:function(n){console.log("error",n)}})}function init(){var n=$("#MainNav > ul").find("li.has-dropdown"),r=$(".header-top").height(),u=$(".header-bottom").height(),t=$(".header-wrap").height(),i=t+u/2;styling(),displayFooterForm(),stickFooter(),showSearchField(),dropdownMenuFunctionality(n),mobileHeaderFunctionality(),showUserLinksPopUp(),swipingTertiaryNav(),showHideSidetoolTabs(),broadcastCompanionTabs(),inMyViewFinder(),photoEssayGallery(),showMoreOptions(),showBible(),initLearnLanding(),initButtons(),podcastModal(),floatingBible(),ProfileNavigation(),initMeetDrStanleyScrollBar(),weBelieveItemsSelect(),showTertiaryNavOnMyProfile(),dateDisplay(),searchAutocomplete(),initWorldMapAnimation(),hideTertiaryNav(),bindAnalyticsTracking(),getDonateOptions(),$(window).resize(function(){stickFooter(),resetDropdownArrowCoords(n),swipingTertiaryNav()}),$(window).scroll(function(){stickHeader(r,i),resetDropdownArrowCoords(n)})}function getDonateOptions(){$(document).on("click",".open-donation-details",function(n){n.preventDefault(),$(".modal.donation-details").remove(),$.ajax({url:"/GetInvolved/GetDonateOptions",type:"POST",data:null,success:function(n){n.length>0&&($("#Content").append(n),$(".modal.donation-details").modal("show"))},error:function(){}})})}function printIframe(n){var t=$("#"+n)[0];t.contentWindow.focus(),t.contentWindow.print()}function styling(){$(".main-navigation li:last-child").addClass("last-child"),$(".footer-social ul >li:last-child").addClass("last-child"),$("#Content .pagination.library-pager li:last-child").addClass("last-child"),$("#Content .channel-info-panel div:last-child").addClass("last-child"),$(".sermon-series-row",$(".browse-sermon-series")).last().addClass("last-child"),setTimeout(function(){$(".job-position-list").find(".job-position-listing").equalHeights()},4)}function swipingTertiaryNav(){function e(n,t,i){return n<t?t:n>i?i:n}function l(n,i,r,o){i=="left"?(t=e(t-r,u,f),c(e(t-r,u,f),o,i)):i=="right"&&(t=e(t+r,u,f),c(t,o,i))}function c(t,i){n.css("transition-duration",(i/1e3).toFixed(1)+"s"),n.css("left",t)}function a(){i.swipe("disable"),n.css("left",0)}var s=$(".tertiary-navigation > .nav-list").find("li"),r=0,i=$(".tertiary-navigation"),n=i.find(".nav-list"),t,h;if(n.length<1)return!1;t=n.position().left,h={enabled:!0,triggerOnTouchStart:!0,swipe:l,allowPageScroll:"vertical",threshold:10},s.each(function(){r+=$(this).outerWidth(!0)}),r+=1,s.parent(".nav-list").width(r);var y=$(".tertiary-nav > .nav > li:first-child"),v=$(".tertiary-nav > .nav > li:last-child"),o=$(window).width(),w=y.outerWidth(!0),p=v.outerWidth(!0),u=-(r-o/2-p/2),f=o/2-w;$(window).resize(function(){n.css("left",0)}),function(){n.outerWidth(!0)>$(window).width()?(i.swipe("enable"),i.swipe(h)):a()}()}function bindAnalyticsTracking(){$(".tracked").click(function(){dataLayer.push({event:"Banner",action:"Click",label:$(this).data("tracking-label")})})}function dropdownMenuFunctionality(n){function i(n){if(!n.data("calculated")){var t=n.offset().left+n.outerWidth()/2;n.find(".dropdown-navigation").find("li").each(function(){var i=t-$(this).offset().left;i>=0&&i<=$(this).outerWidth()&&$(this).hover(function(){n.addClass("arrow-active")},function(){n.removeClass("arrow-active")})}),n.data("calculated",!0)}}var t;if(n.hover(function(){var r=$(this);r.data("hovered",!0),r.hasClass("expanded-dropdown")||(t=window.setTimeout(function(){r.addClass("expanded-dropdown"),i(r)},200))},function(){var i=$(this);i.data("hovered",!1),window.clearTimeout(t),i.hasClass("expanded-dropdown")&&(t=window.setTimeout(function(){i.data("hovered")||i.removeClass("expanded-dropdown")},200))}),is_touch_device())n.on("click",function(n){$(this).find(".dropdown-navigation").css("visibility")=="hidden"?(n.preventDefault(),$(this).addClass("expanded-dropdown"),$(this).siblings("li.has-dropdown").removeClass("expanded-dropdown")):$(this).removeClass("expanded-dropdown")})}function resetDropdownArrowCoords(n){n.data("calculated",!1)}function mobileHeaderFunctionality(){var n=$("#MainMobileNav"),t=$(".header-mobile").find(".search-container"),i=n.find(".main-navigation ul"),f=i.find("li"),u=i.find("li.has-dropdown"),r=u.find(".expand-dropdown");r.on("click",function(n){n.preventDefault(),$(this).parent("li.has-dropdown").hasClass("expanded")?($(this).parent("li.has-dropdown").removeClass("expanded"),$(this).siblings(".dropdown-navigation").slideUp(200)):($(this).parent("li.has-dropdown").addClass("expanded"),$(this).parent("li.has-dropdown").siblings(".has-dropdown.expanded").removeClass("expanded").find(".dropdown-navigation").slideUp(200),$(this).parent("li.has-dropdown").siblings(".has-dropdown.expanded"),$(this).siblings(".dropdown-navigation").slideDown(200))});$("#ExpandMobileSearch").on("click",function(n){n.preventDefault(),$(this).hasClass("active")?($(this).removeClass("active"),t.slideUp(200)):($(this).addClass("active"),t.slideDown(200))});$("#ExpandMobileMenu").on("click",function(t){var i=$(window).height()-$(".header-mobile-panel .panel-wrap").outerHeight(!0);t.preventDefault(),$(this).hasClass("active")?($(this).removeClass("active"),n.removeClass("expanded"),$("body").removeClass("mobile-dropdown-active"),setTimeout(function(){n.height(0)},300)):($(this).addClass("active"),n.addClass("expanded"),$("body").addClass("mobile-dropdown-active"),n.height(i))});$(window).on("orientationchange",function(){$("body").removeClass("mobile-dropdown-active"),n.height(0).removeClass("expanded"),$("#ExpandMobileMenu").removeClass("active"),t.hide(),$("#ExpandMobileSearch").removeClass("active")})}function showUserLinksPopUp(){$("#UtilityBox .user-profile .login-link").each(function(){$(this).next(".register-link").andSelf().wrapAll('<div class="user-profile-links"/>')});var u=$(".user-container"),r=u.find(".user-name"),e=r.find("a"),n=u.find(".user-profile-links"),f=$("#UtilityBox .user-container"),i=$("#UtilityBox .user-profile-links"),t;r.hover(function(){var r=$(this);r.data("hovered",!0),n.hasClass("visible")||(t=window.setTimeout(function(){n.addClass("visible")},200))},function(){var r=$(this);r.data("hovered",!1),window.clearTimeout(t),n.hasClass("visible")&&(t=window.setTimeout(function(){r.data("hovered")||n.removeClass("visible")},200))}),f.hover(function(){var r=$(this);r.data("hovered",!0),!i.hasClass("visible")&&i.length>=1&&(t=window.setTimeout(function(){i.addClass("visible"),$("#UtilityBox").css("overflow","visible")},200))},function(){var r=$(this);r.data("hovered",!1),window.clearTimeout(t),i.hasClass("visible")&&(t=window.setTimeout(function(){r.data("hovered")||(i.removeClass("visible"),$("#UtilityBox").css("overflow","hidden"))},200))});r.on("click",function(t){var i=this;n.hasClass("visible")?n.removeClass("visible"):(t.preventDefault(),t.stopPropagation(),n.addClass("visible"))})}function showHideSidetoolTabs(){var i=$(".side-tools-container"),n=i.find(".nav > li"),t=i.find(".tab-content"),r=t.find(".tab-pane");if($(window).width()<=768){n.each(function(){$(this).hasClass("active")&&$(this).removeClass("active")}),r.each(function(){$(this).hasClass("active")&&$(this).removeClass("active")});n.find("a").on("click",function(){var n=$(this);n.parent("li").removeClass("not-active").addClass("active"),n.parent("li").siblings().removeClass("active").addClass("not-active"),t.find($(n.attr("href"))).addClass("active").siblings().removeClass("active")})}$(window).resize(function(){if(n.hasClass("active"))return!1;$(window).width()>768&&!n.hasClass("active")&&(n.first().addClass("active"),t.find(n.first().find("a").attr("href")).addClass("active"))})}function broadcastCompanionTabs(){var t=$(".bc-page .bc-container"),n=t.find(".bc-tabs > li"),i=t.find(".bc-content");n.each(function(){$(this).hasClass("active")&&$(this).siblings().removeClass("active").addClass("not-active")});n.find("a").on("click",function(){var n=$(this);n.parent("li").removeClass("not-active").addClass("active"),n.parent("li").siblings().removeClass("active").addClass("not-active"),i.find($(n.attr("href"))).addClass("active").siblings().removeClass("active")})}function displayFooterForm(){var t=$('form[name="footer-registration-form"]'),n=$(t).find(".input-container:first-child").children();if($(n))$(n).on("focus",function(){$(this).parent().siblings(".hidden").fadeIn(300).removeClass("hidden").css("display","block")})}function stickFooter(){var n,t;if($(window).width()<=768)return!1;n=$("footer").outerHeight(!0),$("#PageWrapper").css({marginBottom:-n}),$("head style#PageWrapperAfter").length<1?$("head").append('<style id="PageWrapperAfter">#PageWrapper:after{height:'+n+"px;}</style>"):(t="#PageWrapper:after{height:"+n+"px;}",$("head style#PageWrapperAfter").text(" "),$("head style#PageWrapperAfter").text(t))}function showSearchField(){$("#SearchExpand").on("click",function(n){n.preventDefault(),$(".header-middle-search").hasClass("expanded")?($(".header-middle-search").removeClass("expanded"),$(".header-middle-search").slideUp(300),$("#UtilityBox").find("#SearchExpand").removeClass("active")):($(".header-middle-search").addClass("expanded"),$("#UtilityBox").find("#SearchExpand").addClass("active"),$(".header-middle-search").slideDown(300),setTimeout(function(){$(".header-middle-search").find("input.search-field").focus()},100))})}function stickHeader(n,t){var i=$(window).scrollTop(),r=$(".header-mobile .panel-wrap").outerHeight(!0);$(window).width()>768?(n<i?$("#PageHeader").addClass("fixed-header"):($("#PageHeader").removeClass("fixed-header"),$(".header-middle-search").removeClass("expanded").hide(),$("#UtilityBox").find("#SearchExpand").removeClass("active")),t<i?$("#PageHeader").addClass("hidden-tert-nav"):$("#PageHeader").removeClass("hidden-tert-nav")):r<i?$("#PageHeader").addClass("fixed-header"):$("#PageHeader").removeClass("fixed-header")}function inMyViewFinder(){var n=$(".photo-gallery-container > div");$(n).mouseover(function(){$(this).find(".tip").is(":visible")||($(this).find(".tip").fadeIn("fast"),$(this).siblings().foggy({blurRadius:2,opacity:.8,cssFilterSupport:!0}))}).mouseleave(function(){$(this).find(".tip").is(":visible")&&($(this).find(".tip").fadeOut("fast"),$(this).siblings().foggy(!1))}),$(n).click(function(){$(this).toggleClass("full-width"),$(this).siblings().toggleClass("hidden"),$(this).find(".thumbnail-container").toggle(),$(this).find(".full-width-image-container").toggle()})}function photoEssayGallery(){$("#PhotoEssayCarousel").carousel({interval:!1,pause:"hover"}),$("[id^=carousel-selector-]").click(function(){var i=$(this).attr("id"),t=i.split("-"),n=t[t.length-1];n=parseInt(n),$("#PhotoEssayCarousel").carousel(n),$("[id^=carousel-selector-]").removeClass("selected"),$(this).addClass("selected")});var t=$(".item").length,n=$("div.active").index()+1;$(".order").html(""+n+" of "+t+"");$("#PhotoEssayCarousel").on("slid.bs.carousel",function(){var i=$(this).data("bs.carousel"),r=i.getItemIndex(i.$element.find(".item.active")),f=i.$items.length,u=r+1+" of "+f,t;$(".order").text(u),t=$(".item.active").data("slide-number"),t=parseInt(t),$("[id^=carousel-selector-]").removeClass("selected"),$("[id^=carousel-selector-"+t+"]").addClass("selected")})}function showMoreOptions(){var t=$(".load-more-btn.show-hidden"),n;t.on("click",function(t){if(n=$(this).parent().parent().find(".hidden-options-container"),n.length<1||$(this).attr("href").length>1)return!1;t.preventDefault(),n.hasClass("active")||(n.slideDown(200).addClass("active"),setTimeout(function(){n.children().unwrap()},300),$(this).parent(".load-more-container").fadeOut(200))})}function showBible(){var t=$("#MainContent .left-tab"),n=$("#MainContent .right-tab");$(t).find("a.show-bible").click(function(){t.find(".content-section").fadeToggle(),t.find(".bible-pane").fadeToggle()}),$(t).find(".back-link").click(function(){t.find(".bible-pane").fadeToggle(),t.find(".content-section").fadeToggle()}),$(n).find("a.show-bible").click(function(){n.find(".content-section").fadeToggle(),n.find(".bible-pane").fadeToggle()}),$(n).find(".back-link").click(function(){n.find(".bible-pane").fadeToggle(),n.find(".content-section").fadeToggle()})}function initMeetDrStanleyScrollBar(){if($("body").find(".about-us-timeline nav").length){if($(".about-us-timeline nav").customScrollbar({wheelSpeed:10,hScroll:!0}),$(".about-us-timeline").length){var n=$(".about-us-timeline .time-slot:first").attr("id"),t=$("#"+n+" .active").text(),u=$("#"+n+" .date").text(),r=$("#"+n+" .photo img").attr("src"),i=$("#"+n+" .description").html();$(".active-slide header h3").text(u),$(".active-slide header span").text(t),$(".active-slide img").attr({src:r,alt:t}),$(".active-slide div").html(i)}$(".time-slot a").click(function(){var i=$(this).text(),r=$(this).siblings(".date").text(),n=$(this).siblings(".photo").find("img").attr("src"),t=$(this).siblings(".description").html();return $(".active-slide header h3").text(r),$(".active-slide header span").text(i),$(".active-slide img").attr("src",n),$(".active-slide div").html(t),!1})}}function initLearnLanding(){function t(t){$('input[name="library-search-input"]').val()==""?($('.library-search-container button[name="library-search-button"]').show(),$('.library-search-container button[name="library-search-clear"]').hide()):($('.library-search-container button[name="library-search-button"]').hide(),$('.library-search-container button[name="library-search-clear"]').show()),t=$(t);var i=t.find('input[name="library-search-input"]').val();$.ajax({url:t.data("url"),type:"GET",data:{searchText:i},success:function(t){$(".learn-topics .learn-topics-grid").html(t);var i=$(".library-sort-container a.sort-option.active");i.length>0&&n(i)},error:function(){$(".learn-topics .learn-topics-grid").html("")}})}function n(n){var i=n.data("category"),t=n.closest(".learn-topics").find("ul.learn-topic-list");i=="all"?t.find("li").show():(t.find("li").hide(),t.find("article."+i).parent("li").show())}$('button[name="library-search-clear"]').on("click",function(n){return n.preventDefault(),$('input[name="library-search-input"]').val(""),t($(this).parent()),!1});$('button[name="library-search-button"]').on("click",function(n){return n.preventDefault(),t($(this).parent()),!1});$('form[name="library-search-form"]').on("submit",function(n){return n.preventDefault(),t(this),!1});$(".learn-topics .library-sort-container a.sort-option").on("click",function(t){t.preventDefault();var i=$(this);return i.data("category")=="all"?(i.siblings().andSelf().removeClass("active"),n(i)):i.hasClass("active")?(i.siblings().andSelf().removeClass("active"),i.closest(".learn-topics").find("ul.learn-topic-list li").show()):(i.siblings().andSelf().removeClass("active"),i.addClass("active"),n(i)),!1})}function initButtons(){$(".follow").each(function(){var n=$(this);checkFollow(n)});$(document).on("click",".follow",function(n){n.preventDefault();var t=$(this);AddFollow(t)})}function floatingBible(){$("#FloatingBible .nav-tabs li").on("click",function(){$("#FloatingBible").addClass("opened")});$("#HideBible").on("click",function(){$("#FloatingBible").removeClass("opened")})}function podcastModal(){$("#rssModal").on("show.bs.modal",function(n){var r=$(n.relatedTarget),i=r.data("podcast"),t=$(this);t.find("textarea").val(i)});$("#rssModal").on("shown.bs.modal",function(){var t=$(this);t.find("textarea").select()})}function ProfileNavigation(){var n=$("#ProfileNavigation");$(n).find(".profile-nav-title").on("click",function(){$(n).toggleClass("contracted")});$(window).resize(function(){$(window).width()<=1700&&!$(n).hasClass("contracted")&&$(n).addClass("contracted")})}function weBelieveItemsSelect(){$(".what-we-believe").length&&$(".what-we-believe dl dt").click(function(){$(this).hasClass("active")||($(".what-we-believe dl dt").removeClass("active"),$(".what-we-believe dl dd").removeClass("active"),$(this).addClass("active"),$(this).next("dd").addClass("active"))})}function showTertiaryNavOnMyProfile(){function r(){u&&f&&(t=$(window).width(),t>1050?($(n).hide(),$(i).show()):t<=1050&&($(i).hide(),$(n).show()))}var i=$("#ProfileNavigation"),u=i.length>0,n=$("body").find(".header-bottom"),f=n.length>0,t;r(),$(window).resize(function(){r()})}function searchAutocomplete(){function n(){$(window).width()<=768?$(".search-container .search-field").autocomplete("disable"):$(".search-container .search-field").autocomplete("enable")}$(".search-container .search-field").each(function(){$(this).autocomplete({minLength:2,appendTo:$(this).parents(".search-container").find(".autocomplete-result-container"),position:{my:"top",at:"bottom",of:$(this).parents(".search-container")},source:function(n,t){$.getJSON("/Search/Autocomplete",{term:$(".search-container .search-field").val(),data:{contentItemId:currentContextItemId}},t)},open:function(){$(this).parents(".search-container").addClass("autocompleted"),console.log($(this).parents(".search-container"))},close:function(){$(this).parents(".search-container").removeClass("autocompleted"),console.log("closed")},select:function(n,t){window.location.href=t.item.value,t.item.value=""}})}),n(),$(window).resize(function(){n()})}function initWorldMapAnimation(){var n=0;$(".world-map").on("inview",function(t,i){i==!0&n==0&&(n=1,setTimeout(function(){$(".ping-one .circle").each(function(n){var t=$(this);setTimeout(function(){t.addClass("animate")},n*400-100)})},1e3),setTimeout(function(){$(".ping-two .circle").each(function(n){var t=$(this);setTimeout(function(){t.addClass("animate")},n*400-100)})},2e3),setTimeout(function(){$(".ping-three .circle").each(function(n){var t=$(this);setTimeout(function(){t.addClass("animate")},n*400-100)})},500),setTimeout(function(){$(".ping-four .circle").each(function(n){var t=$(this);setTimeout(function(){t.addClass("animate")},n*400-100)})},1500))})}function is_touch_device(){return"ontouchstart"in window||"onmsgesturechange"in window}function dateDisplay(){$(".events-engagments .event-date .day:empty").siblings(".hyphen").hide()}function hideTertiaryNav(){$(".top-banners-container").length&&$(".header-bottom").addClass("hidden-xs")}function IsCookieExists(n){return document.cookie.indexOf(n)==-1?!1:!0}function getMatches(n,t){for(var r=[],i;i=t.exec(n);)r.push(i);return r}function saveNotesToLocalStorage(){typeof Storage!="undefined"&&(sessionStorage.savedNotes=JSON.stringify({sermonId:$("#NotesForm #sermonId").val(),notes:$("<div/>").text(tinyMCE.activeEditor.getContent({format:"raw"}).trim()).html()}),document.broadcastCompanionNotesChanged=!1)}function saveNotes(){$.ajax({type:"POST",url:"/api/Sitecore/BroadcastCompanion/SaveNotes",data:{notes:$("<div/>").text(tinyMCE.activeEditor.getContent({format:"raw"}).trim()).html(),sermonId:$("#NotesForm #sermonId").val()},success:function(){$("#BroadcastCompanionStatus").html('<div class="alert alert-success" role="alert"><button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>'+$("#BroadcastCompanionStatus").data("success-message")+"</div>"),$("#LoginModal").modal("hide"),typeof Storage!="undefined"&&(sessionStorage.savedNotes=undefined),dataLayer.push({event:"Note",action:"Add",label:$("#NotesForm").data("tracking-link")}),document.broadcastCompanionNotesChanged=!1},error:function(n){n.status===401?($("#IsCallFromOutSide").val("true"),$("#FunctionType").val("notes"),saveNotesToLocalStorage(),$("#LoginModal").modal()):($("#BroadcastCompanionStatus").html('<div class="alert alert-danger" role="alert"><button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>'+$("#BroadcastCompanionStatus").data("fail-message")+"</div>"),$("#LoginModal").modal("hide"))}})}function applyScripturizer(n){for(var f=n.html(),u=$(".panel-default .panel-collapse").map(function(){return $(this).data("scripture")}),i,r,t=0;t<u.length;t++)if(i=getMatches(u[t],lineRegex),i!=null&&(n.html(n.html().replace(u[t],'<a href="#" class="text-orange show-bible">'+u[t]+"</a>")),i.length>0))for(r=0;r<i.length;r++)n.html(ReplaceScriptures(n.html(),i[r]))}function ReplaceScriptures(n,t){var r=dictBooks[$.trim(t[1])],i,u;if(typeof r!="undefined"&&r!=null)for(i=0;i<r.length;i++)u=BuildScript(t,r[i]),n=n.replace(u,'<a href="#" class="text-orange show-bible" data-book="'+$.trim(t[1])+'">'+u+"</a>");return n}function BuildScript(n,t){var i=t;return i=i+" "+n[2],n[3]!=null&&(i=i+"-"+n[3]),i=i+":",n[4]!=null&&(i=i+n[4],n[5]!=null&&(i=i+"-"+n[5])),i}function getMatches(n,t){for(var r=[],u,f,i;u=t.exec(n);){for(f=!0,i=0;i<r.length;i++)if(r[i][0]==u[0]){f=!1;break}f&&r.push(u)}return r}(function(n){n.extend(n.fn,{validate:function(t){if(!this.length)return t&&t.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."),void 0;var i=n.data(this[0],"validator");return i?i:(this.attr("novalidate","novalidate"),i=new n.validator(t,this[0]),n.data(this[0],"validator",i),i.settings.onsubmit&&(this.validateDelegate(":submit","click",function(t){i.settings.submitHandler&&(i.submitButton=t.target),n(t.target).hasClass("cancel")&&(i.cancelSubmit=!0),void 0!==n(t.target).attr("formnovalidate")&&(i.cancelSubmit=!0)}),this.submit(function(t){function r(){var r;return i.settings.submitHandler?(i.submitButton&&(r=n("<input type='hidden'/>").attr("name",i.submitButton.name).val(n(i.submitButton).val()).appendTo(i.currentForm)),i.settings.submitHandler.call(i,i.currentForm,t),i.submitButton&&r.remove(),!1):!0}return i.settings.debug&&t.preventDefault(),i.cancelSubmit?(i.cancelSubmit=!1,r()):i.form()?i.pendingRequest?(i.formSubmitted=!0,!1):r():(i.focusInvalid(),!1)})),i)},valid:function(){if(n(this[0]).is("form"))return this.validate().form();var t=!0,i=n(this[0].form).validate();return this.each(function(){t=t&&i.element(this)}),t},removeAttrs:function(t){var r={},i=this;return n.each(t.split(/\s/),function(n,t){r[t]=i.attr(t),i.removeAttr(t)}),r},rules:function(t,i){var r=this[0],e,u,s;if(t){var o=n.data(r.form,"validator").settings,h=o.rules,f=n.validator.staticRules(r);switch(t){case"add":n.extend(f,n.validator.normalizeRule(i)),delete f.messages,h[r.name]=f,i.messages&&(o.messages[r.name]=n.extend(o.messages[r.name],i.messages));break;case"remove":return i?(e={},n.each(i.split(/\s/),function(n,t){e[t]=f[t],delete f[t]}),e):(delete h[r.name],f)}}return u=n.validator.normalizeRules(n.extend({},n.validator.classRules(r),n.validator.attributeRules(r),n.validator.dataRules(r),n.validator.staticRules(r)),r),u.required&&(s=u.required,delete u.required,u=n.extend({required:s},u)),u}}),n.extend(n.expr[":"],{blank:function(t){return!n.trim(""+n(t).val())},filled:function(t){return!!n.trim(""+n(t).val())},unchecked:function(t){return!n(t).prop("checked")}}),n.validator=function(t,i){this.settings=n.extend(!0,{},n.validator.defaults,t),this.currentForm=i,this.init()},n.validator.format=function(t,i){return 1===arguments.length?function(){var i=n.makeArray(arguments);return i.unshift(t),n.validator.format.apply(this,i)}:(arguments.length>2&&i.constructor!==Array&&(i=n.makeArray(arguments).slice(1)),i.constructor!==Array&&(i=[i]),n.each(i,function(n,i){t=t.replace(RegExp("\\{"+n+"\\}","g"),function(){return i})}),t)},n.extend(n.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusInvalid:!0,errorContainer:n([]),errorLabelContainer:n([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(n){this.lastActive=n,this.settings.focusCleanup&&!this.blockFocusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,n,this.settings.errorClass,this.settings.validClass),this.addWrapper(this.errorsFor(n)).hide())},onfocusout:function(n){this.checkable(n)||!(n.name in this.submitted)&&this.optional(n)||this.element(n)},onkeyup:function(n,t){(9!==t.which||""!==this.elementValue(n))&&(n.name in this.submitted||n===this.lastElement)&&this.element(n)},onclick:function(n){n.name in this.submitted?this.element(n):n.parentNode.name in this.submitted&&this.element(n.parentNode)},highlight:function(t,i,r){"radio"===t.type?this.findByName(t.name).addClass(i).removeClass(r):n(t).addClass(i).removeClass(r)},unhighlight:function(t,i,r){"radio"===t.type?this.findByName(t.name).removeClass(i).addClass(r):n(t).removeClass(i).addClass(r)}},setDefaults:function(t){n.extend(n.validator.defaults,t)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:n.validator.format("Please enter no more than {0} characters."),minlength:n.validator.format("Please enter at least {0} characters."),rangelength:n.validator.format("Please enter a value between {0} and {1} characters long."),range:n.validator.format("Please enter a value between {0} and {1}."),max:n.validator.format("Please enter a value less than or equal to {0}."),min:n.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){function i(t){var i=n.data(this[0].form,"validator"),r="on"+t.type.replace(/^validate/,"");i.settings[r]&&i.settings[r].call(i,this[0],t)}var r,t;this.labelContainer=n(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||n(this.currentForm),this.containers=n(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset(),r=this.groups={},n.each(this.settings.groups,function(t,i){"string"==typeof i&&(i=i.split(/\s/)),n.each(i,function(n,i){r[i]=t})}),t=this.settings.rules,n.each(t,function(i,r){t[i]=n.validator.normalizeRule(r)}),n(this.currentForm).validateDelegate(":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'] ,[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'] ","focusin focusout keyup",i).validateDelegate("[type='radio'], [type='checkbox'], select, option","click",i),this.settings.invalidHandler&&n(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),n.extend(this.submitted,this.errorMap),this.invalid=n.extend({},this.errorMap),this.valid()||n(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var n=0,t=this.currentElements=this.elements();t[n];n++)this.check(t[n]);return this.valid()},element:function(t){t=this.validationTargetFor(this.clean(t)),this.lastElement=t,this.prepareElement(t),this.currentElements=n(t);var i=this.check(t)!==!1;return i?delete this.invalid[t.name]:this.invalid[t.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),i},showErrors:function(t){if(t){n.extend(this.errorMap,t),this.errorList=[];for(var i in t)this.errorList.push({message:t[i],element:this.findByName(i)[0]});this.successList=n.grep(this.successList,function(n){return!(n.name in t)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){n.fn.resetForm&&n(this.currentForm).resetForm(),this.submitted={},this.lastElement=null,this.prepareForm(),this.hideErrors(),this.elements().removeClass(this.settings.errorClass).removeData("previousValue")},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(n){var t=0,i;for(i in n)t++;return t},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{n(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(t){}},findLastActive:function(){var t=this.lastActive;return t&&1===n.grep(this.errorList,function(n){return n.element.name===t.name}).length&&t},elements:function(){var i=this,t={};return n(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){return!this.name&&i.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.name in t||!i.objectLength(n(this).rules())?!1:(t[this.name]=!0,!0)})},clean:function(t){return n(t)[0]},errors:function(){var t=this.settings.errorClass.replace(" ",".");return n(this.settings.errorElement+"."+t,this.errorContext)},reset:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=n([]),this.toHide=n([]),this.currentElements=n([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(n){this.reset(),this.toHide=this.errorsFor(n)},elementValue:function(t){var r=n(t).attr("type"),i=n(t).val();return"radio"===r||"checkbox"===r?n("input[name='"+n(t).attr("name")+"']:checked").val():"string"==typeof i?i.replace(/\r/g,""):i},check:function(t){var i,r;t=this.validationTargetFor(this.clean(t));var u,f=n(t).rules(),e=!1,o=this.elementValue(t);for(i in f){r={method:i,parameters:f[i]};try{if(u=n.validator.methods[i].call(this,o,t,r.parameters),"dependency-mismatch"===u){e=!0;continue}if(e=!1,"pending"===u)return this.toHide=this.toHide.not(this.errorsFor(t)),void 0;if(!u)return this.formatAndAdd(t,r),!1}catch(s){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+t.id+", check the '"+r.method+"' method.",s),s;}}if(!e)return this.objectLength(f)&&this.successList.push(t),!0},customDataMessage:function(t,i){return n(t).data("msg-"+i.toLowerCase())||t.attributes&&n(t).attr("data-msg-"+i.toLowerCase())},customMessage:function(n,t){var i=this.settings.messages[n];return i&&(i.constructor===String?i:i[t])},findDefined:function(){for(var n=0;arguments.length>n;n++)if(void 0!==arguments[n])return arguments[n];return void 0},defaultMessage:function(t,i){return this.findDefined(this.customMessage(t.name,i),this.customDataMessage(t,i),!this.settings.ignoreTitle&&t.title||void 0,n.validator.messages[i],"<strong>Warning: No message defined for "+t.name+"</strong>")},formatAndAdd:function(t,i){var r=this.defaultMessage(t,i.method),u=/\$?\{(\d+)\}/g;"function"==typeof r?r=r.call(this,i.parameters,t):u.test(r)&&(r=n.validator.format(r.replace(u,"{$1}"),i.parameters)),this.errorList.push({message:r,element:t}),this.errorMap[t.name]=r,this.submitted[t.name]=r},addWrapper:function(n){return this.settings.wrapper&&(n=n.add(n.parent(this.settings.wrapper))),n},defaultShowErrors:function(){for(var i,t,n=0;this.errorList[n];n++)t=this.errorList[n],this.settings.highlight&&this.settings.highlight.call(this,t.element,this.settings.errorClass,this.settings.validClass),this.showLabel(t.element,t.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(n=0;this.successList[n];n++)this.showLabel(this.successList[n]);if(this.settings.unhighlight)for(n=0,i=this.validElements();i[n];n++)this.settings.unhighlight.call(this,i[n],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return n(this.errorList).map(function(){return this.element})},showLabel:function(t,i){var r=this.errorsFor(t);r.length?(r.removeClass(this.settings.validClass).addClass(this.settings.errorClass),r.html(i)):(r=n("<"+this.settings.errorElement+">").attr("for",this.idOrName(t)).addClass(this.settings.errorClass).html(i||""),this.settings.wrapper&&(r=r.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.append(r).length||(this.settings.errorPlacement?this.settings.errorPlacement(r,n(t)):r.insertAfter(t))),!i&&this.settings.success&&(r.text(""),"string"==typeof this.settings.success?r.addClass(this.settings.success):this.settings.success(r,t)),this.toShow=this.toShow.add(r)},errorsFor:function(t){var i=this.idOrName(t);return this.errors().filter(function(){return n(this).attr("for")===i})},idOrName:function(n){return this.groups[n.name]||(this.checkable(n)?n.name:n.id||n.name)},validationTargetFor:function(n){return this.checkable(n)&&(n=this.findByName(n.name).not(this.settings.ignore)[0]),n},checkable:function(n){return/radio|checkbox/i.test(n.type)},findByName:function(t){return n(this.currentForm).find("[name='"+t+"']")},getLength:function(t,i){switch(i.nodeName.toLowerCase()){case"select":return n("option:selected",i).length;case"input":if(this.checkable(i))return this.findByName(i.name).filter(":checked").length}return t.length},depend:function(n,t){return this.dependTypes[typeof n]?this.dependTypes[typeof n](n,t):!0},dependTypes:{boolean:function(n){return n},string:function(t,i){return!!n(t,i.form).length},"function":function(n,t){return n(t)}},optional:function(t){var i=this.elementValue(t);return!n.validator.methods.required.call(this,i,t)&&"dependency-mismatch"},startRequest:function(n){this.pending[n.name]||(this.pendingRequest++,this.pending[n.name]=!0)},stopRequest:function(t,i){this.pendingRequest--,0>this.pendingRequest&&(this.pendingRequest=0),delete this.pending[t.name],i&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(n(this.currentForm).submit(),this.formSubmitted=!1):!i&&0===this.pendingRequest&&this.formSubmitted&&(n(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(t){return n.data(t,"previousValue")||n.data(t,"previousValue",{old:null,valid:!0,message:this.defaultMessage(t,"remote")})}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(t,i){t.constructor===String?this.classRuleSettings[t]=i:n.extend(this.classRuleSettings,t)},classRules:function(t){var r={},i=n(t).attr("class");return i&&n.each(i.split(" "),function(){this in n.validator.classRuleSettings&&n.extend(r,n.validator.classRuleSettings[this])}),r},attributeRules:function(t){var u={},e=n(t),f=e[0].getAttribute("type"),r,i;for(r in n.validator.methods)"required"===r?(i=e.get(0).getAttribute(r),""===i&&(i=!0),i=!!i):i=e.attr(r),/min|max/.test(r)&&(null===f||/number|range|text/.test(f))&&(i=Number(i)),i?u[r]=i:f===r&&"range"!==f&&(u[r]=!0);return u.maxlength&&/-1|2147483647|524288/.test(u.maxlength)&&delete u.maxlength,u},dataRules:function(t){var r,i,u={},f=n(t);for(r in n.validator.methods)i=f.data("rule-"+r.toLowerCase()),void 0!==i&&(u[r]=i);return u},staticRules:function(t){var r={},i=n.data(t.form,"validator");return i.settings.rules&&(r=n.validator.normalizeRule(i.settings.rules[t.name])||{}),r},normalizeRules:function(t,i){return n.each(t,function(r,u){if(u===!1)return delete t[r],void 0;if(u.param||u.depends){var f=!0;switch(typeof u.depends){case"string":f=!!n(u.depends,i.form).length;break;case"function":f=u.depends.call(i,i)}f?t[r]=void 0!==u.param?u.param:!0:delete t[r]}}),n.each(t,function(r,u){t[r]=n.isFunction(u)?u(i):u}),n.each(["minlength","maxlength"],function(){t[this]&&(t[this]=Number(t[this]))}),n.each(["rangelength","range"],function(){var i;t[this]&&(n.isArray(t[this])?t[this]=[Number(t[this][0]),Number(t[this][1])]:"string"==typeof t[this]&&(i=t[this].split(/[\s,]+/),t[this]=[Number(i[0]),Number(i[1])]))}),n.validator.autoCreateRanges&&(t.min&&t.max&&(t.range=[t.min,t.max],delete t.min,delete t.max),t.minlength&&t.maxlength&&(t.rangelength=[t.minlength,t.maxlength],delete t.minlength,delete t.maxlength)),t},normalizeRule:function(t){if("string"==typeof t){var i={};n.each(t.split(/\s/),function(){i[this]=!0}),t=i}return t},addMethod:function(t,i,r){n.validator.methods[t]=i,n.validator.messages[t]=void 0!==r?r:n.validator.messages[t],3>i.length&&n.validator.addClassRules(t,n.validator.normalizeRule(t))},methods:{required:function(t,i,r){if(!this.depend(r,i))return"dependency-mismatch";if("select"===i.nodeName.toLowerCase()){var u=n(i).val();return u&&u.length>0}return this.checkable(i)?this.getLength(t,i)>0:n.trim(t).length>0},email:function(n,t){return this.optional(t)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(n)},url:function(n,t){return this.optional(t)||/^(https?|s?ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(n)},date:function(n,t){return this.optional(t)||!/Invalid|NaN/.test(""+new Date(n))},dateISO:function(n,t){return this.optional(t)||/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/.test(n)},number:function(n,t){return this.optional(t)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(n)},digits:function(n,t){return this.optional(t)||/^\d+$/.test(n)},creditcard:function(n,t){var i,f;if(this.optional(t))return"dependency-mismatch";if(/[^0-9 \-]+/.test(n))return!1;var e=0,r=0,u=!1;for(n=n.replace(/\D/g,""),i=n.length-1;i>=0;i--)f=n.charAt(i),r=parseInt(f,10),u&&(r*=2)>9&&(r-=9),e+=r,u=!u;return 0==e%10},minlength:function(t,i,r){var u=n.isArray(t)?t.length:this.getLength(n.trim(t),i);return this.optional(i)||u>=r},maxlength:function(t,i,r){var u=n.isArray(t)?t.length:this.getLength(n.trim(t),i);return this.optional(i)||r>=u},rangelength:function(t,i,r){var u=n.isArray(t)?t.length:this.getLength(n.trim(t),i);return this.optional(i)||u>=r[0]&&r[1]>=u},min:function(n,t,i){return this.optional(t)||n>=i},max:function(n,t,i){return this.optional(t)||i>=n},range:function(n,t,i){return this.optional(t)||n>=i[0]&&i[1]>=n},equalTo:function(t,i,r){var u=n(r);return this.settings.onfocusout&&u.unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){n(i).valid()}),t===u.val()},remote:function(t,i,r){var f,u,e;return this.optional(i)?"dependency-mismatch":(f=this.previousValue(i),this.settings.messages[i.name]||(this.settings.messages[i.name]={}),f.originalMessage=this.settings.messages[i.name].remote,this.settings.messages[i.name].remote=f.message,r="string"==typeof r&&{url:r}||r,f.old===t)?f.valid:(f.old=t,u=this,this.startRequest(i),e={},e[i.name]=t,n.ajax(n.extend(!0,{url:r,mode:"abort",port:"validate"+i.name,dataType:"json",data:e,success:function(r){var o,h,s,e;u.settings.messages[i.name].remote=f.originalMessage,o=r===!0||"true"===r,o?(h=u.formSubmitted,u.prepareElement(i),u.formSubmitted=h,u.successList.push(i),delete u.invalid[i.name],u.showErrors()):(s={},e=r||u.defaultMessage(i,"remote"),s[i.name]=f.message=n.isFunction(e)?e(t):e,u.invalid[i.name]=!0,u.showErrors(s)),f.valid=o,u.stopRequest(i,o)}},r)),"pending")}}}),n.format=n.validator.format})(jQuery),function(n){var t={},i;n.ajaxPrefilter?n.ajaxPrefilter(function(n,i,r){var u=n.port;"abort"===n.mode&&(t[u]&&t[u].abort(),t[u]=r)}):(i=n.ajax,n.ajax=function(r){var f=("mode"in r?r:n.ajaxSettings).mode,u=("port"in r?r:n.ajaxSettings).port;return"abort"===f?(t[u]&&t[u].abort(),t[u]=i.apply(this,arguments),t[u]):i.apply(this,arguments)})}(jQuery),function(n){n.extend(n.fn,{validateDelegate:function(t,i,r){return this.bind(i,function(i){var u=n(i.target);if(u.is(t))return r.apply(u,arguments)})}})}(jQuery),$(document).ready(function(){function i(n,t,i){if(typeof n!="undefined")return $.ajax({url:"/Comments/GetComments",type:"GET",data:{itemId:n,parentCommentId:t,currentPage:i}})}function u(t,i,u,f){if(f.find(".comment-text").val()!=""){n(f);var e=$("<div></div>").html(u).text().trim();if(e.Length==0)return;$.ajax({url:"/Comments/PostComment",type:"POST",data:{itemId:t,parentCommentId:i,commentText:e},success:function(t){f.find(".comment-text").val(""),n(f),r(t,f),f.hasClass("comment")&&f.find(".reply-container").slideUp(500)},error:function(t){t.status==401&&openLoginPopup("comments",contextItem),n(f)}})}}function r(n,t){var i=$(n).hide();i.find(".comment-reply").hide(),t.hasClass("comment")?(t.find(".comments-list").length==0&&t.append('<div class="comments-list" data-current-page="1"></div>'),t.find(".comments-list").prepend(i),t.find(".comments-list .comment:first").slideDown(750)):(t.closest(".comments-section").find(".comments-list").prepend(i),t.closest(".comments-section").find(".comments-list .comment:first").slideDown(750))}function n(n){var t=n.find(".post-btn");t.length>0&&(t.css("display")=="block"?(t.hide(),t.siblings(".processing-btn").show()):(t.siblings(".processing-btn").hide(),t.show()))}function t(){return console.log(typeof commentContentIdOverride!="undefined"),typeof commentContentIdOverride!="undefined"?commentContentIdOverride:currentContextItemId}var f=".comments-section .post-btn";$(".comments-section").on("click",".post-btn",function(){var f=$(this).siblings(".comment-text").val(),r=null,i=$(this).parent();$(this).closest(".comment").length>0&&(i=$(this).closest(".comment"),r=i.data("comment-id")),u(t(),r,f,i)});$(".comments-section").on("click",".comment-text",function(){if(!isAuthenticated){var t=$(this).closest("form").data("context-item");openLoginPopup("comments",t)}});$(".comments-section").on("click",".comment-reply",function(n){n.preventDefault(),$(this).next(".reply-container").slideToggle("slow")});$(".comments-section").on("click",".view-replies",function(n){n.preventDefault();var u=$(this).closest(".comment").data("comment-id"),r=this;$(r).closest(".comment").find(".comments-list").html('<div class="comment"><img src="/Skins/images/bx_loader.gif" /></div>'),i(t(),u,1).done(function(n){$(r).closest(".comment").find(".comments-list").html(n)}).fail(function(n){console.log(n)})});$(".comments-section").on("click",".load-more-container",function(n){n.preventDefault();var r=$(this).closest(".comments-list"),f=null,u=parseInt(r.data("current-page"))+1;$(this).closest(".comment").length>0&&(f=$(this).closest(".comment").data("comment-id")),r.data("current-page",u),$(this).remove(),r.append('<div class="comment text-center processing-img"><img src="/Skins/images/bx_loader.gif" /></div>'),i(t(),f,u).done(function(n){r.find(".processing-img").remove(),r.append(n)}).fail(function(n){console.log(n)})})}),$(function(){$("#showMore").on("click",function(n){n.preventDefault();var t=$("#noOfItemsToDisplay").val();return $("[name=section-"+t+"]").removeClass("hidden"),t+=1,$("#noOfItemsToDisplay").val(t),!1});if($(".submit-resume-container").hide(),$("#ApplyNow")!=null)$("#ApplyNow").on("click",function(n){n.preventDefault(),$(this).hide(),$(".job-description").hide(),$(".submit-resume-container").show()});$(".file-upload-button").on("click",function(n){n.preventDefault,$(this).next().trigger("click")});$("#Resume, #CoverLetter").on("change",function(){path=$(this).val().replace(/.*(\/|\\)/,""),$(this).siblings(".file-path").val(path)})}),function(n,t,i){var r={};r.UTIL={setupFormValidation:function(){n("#jobSubmissionForm").validate({rules:{FirstName:"required",LastName:"required",Country:"required",MobileNumber:"required",Email:{required:!0,email:!0},File:"required"},messages:{FirstName:"Please enter your First Name.",LastName:"Please enter your Last Name",Country:"Please enter Country.",MobileNumber:"Please enter Mobile.",Email:"Please enter a valid email address",File:"Please select file."},submitHandler:function(n){n.submit()}})}},n(i).ready(function(){r.UTIL.setupFormValidation()})}(jQuery,window,document),$(document).ready(function(){$(".bookmark").each(function(){var n=$(this);checkBookmark(n)});$(document).on("click",".bookmark",function(n){n.preventDefault();var t=$(this);AddBookmark(t)});$(".watchlater").each(function(){var n=$(this);checkWatchLater(n)});$(document).on("click",".watchlater",function(n){n.preventDefault();var t=$(this);AddToWatchLater(t)})}),function(n,t,i){var r={};r.UTIL={setupFormValidation:function(){n("#MySettingsForm").validate({rules:{Name:"required",LastName:"required",Email:{required:!0,email:!0}},messages:{Name:"Please enter your Name.",LastName:"Please enter your Last Name",Email:"Please enter a valid email address"},submitHandler:function(n){n.submit()}})}},n(i).ready(function(){r.UTIL.setupFormValidation()})}(jQuery,window,document),function(n,t,i){var r={};r.UTIL={setupFormValidation:function(){n("#createAccounForm").validate({errorClass:"error-msg",errorElement:"div",highlight:function(t){n(t).parents(".input-container").addClass("error")},unhighlight:function(t){n(t).parents(".input-container").removeClass("error")},rules:{Name:"required",LastName:"required",Email:{required:!0,email:!0,remote:function(){var i="/Account/IsEmailExist",t=n("#CreateAccountEmail").val();return{url:i,type:"GET",data:{email:t},dataFilter:function(n){var t=JSON.parse(n);return t.Success==!0?!1:!0}}}},Password:{required:!0,minlength:6},ConfirmPassword:{required:!0,minlength:6,equalTo:"#CreateAccountPassword"}},messages:{Name:"Please enter your First Name.",LastName:"Please enter your Last Name",Email:{required:"Please enter a valid email address",remote:"User already registered."},Password:{required:"Please enter password.",minlength:"Password must be at least 6 characters"},ConfirmPassword:{equalTo:"Please enter confirm password same as password",required:"Please enter password.",minlength:"Password must be at least 6 characters"}},submitHandler:function(n){n.submit()}}),n("#FormForgotPassword").validate({errorClass:"error-msg",errorElement:"div",highlight:function(t){n(t).parents(".input-container").addClass("error")},unhighlight:function(t){n(t).parents(".input-container").removeClass("error")},rules:{Email:{required:!0,email:!0,remote:function(){var i="/Account/IsEmailExist",t=n("#ForgotPasswordEmail").val();return{url:i,type:"GET",data:{email:t},dataFilter:function(n){var t=JSON.parse(n);return t.Success==!0?!0:!1}}}}},messages:{Email:{required:"Please enter a valid email address",remote:"User Not registered."}},submitHandler:function(n){n.submit()}})}},n(i).ready(function(){r.UTIL.setupFormValidation()})}(jQuery,window,document),$(document).ready(function(){$("body").data("initCompleted")||(init(),$("body").data("initCompleted",!0))}),$.fn.equalHeights=function(){return this.height(Math.max.apply(this,$.map(this,function(n){return $(n).height()})))},$.fn.focusing=function(n){this.focusin(function(){$(this).addClass("height-auto")}).focusout(function(){$(this).removeClass("height-auto").css({height:n})})},$(function(){var n="error",t;$("#login-button").bind("click",function(n){n.preventDefault(),$("#textarea-json").val("");var r="/Account/SitecoreLogin",i={};return i.Email=$("#email").val(),i.Password=$("#password").val(),i.RememberMe=$("#rememberMe:checked").val()?!0:!1,$.post(r,i,t),!1}),t=function(data){if(data.Success==!0&&data.Object!=null){var isCallFromOutSide=$("#IsCallFromOutSide").val(),functionType=$("#FunctionType").val(),funParamID=$("#FunctionParameterID").val();isCallFromOutSide=="true"||isCallFromOutSide==!0?functionType.toLowerCase()=="bookmarks"?eval(AddBookmarkAfterLogin(funParamID)):functionType.toLowerCase()=="follow"?eval(AddFollowAfterLogin(funParamID)):functionType.toLowerCase()=="watchlater"?eval(AddToWatchLaterAfterLogin(funParamID)):functionType.toLowerCase()=="notes"?eval(saveNotes()):functionType.toLowerCase()=="savestation"?eval(SaveFavoriteAfterLogin(funParamID)):functionType.toLowerCase()=="digitalexclusive"&&eval(digitalExclusiveCallback()):location.reload()}else $("#password").val(""),$("#email").parents(".input-container").addClass(n),$("#password").parents(".input-container").addClass(n),$("#generalValidator").show(),$("#generalValidator").text(data.ErrorMessage)},$("#createAccount").bind("click",function(n){n.preventDefault();var t=$(this).attr("href");t+="/?itemId="+$("#FunctionParameterID").val()+"&functionType="+$("#FunctionType").val()+"&returnUrl="+encodeURIComponent(window.location.pathname+location.search),window.location=t}),$("#password").keyup(function(){$("#passwordValidator").hide(),$("#password").parents(".input-container").removeClass(n)}),$("#password, #email").keypress(function(n){n.which==13&&$("#login-button").click()}),$("#email").keyup(function(){$("#emailValidator").hide(),$("#email").parents(".input-container").removeClass(n)})}),$(function(){$("#FooterRegistration").validate({errorClass:"error-msg",errorElement:"div",highlight:function(n){$(n).parents(".input-container").addClass("error")},unhighlight:function(n){$(n).parents(".input-container").removeClass("error")},rules:{FooterUserFirstName:"required",FooterUserLastName:"required",FooterUserEmail:{required:!0,email:!0}},messages:{FooterUserFirstName:"Please enter your first name.",FooterUserLastName:"Please enter your last name.",FooterUserEmail:{required:"Please enter your email address.",remote:"User already registered."}},invalidHandler:function(n,t){var i=t.numberOfInvalids()}});$("#FooterRegistrationSubmit").on("click",function(){if($("#FooterRegistration").valid()){var i="/Account/Subscribe",t={};return t.Email=$("#FooterUserEmail").val(),t.Name=$("#FooterUserFirstName").val(),t.LastName=$("#FooterUserLastName").val(),$.post(i,t,n),!1}return!1});var n=function(n){n.Success==!0&&n.Object!=null&&($("#FooterUserEmail").val(""),$("#FooterUserFirstName").val(""),$("#FooterUserLastName").val(""),window.location.replace("/newsletter-thank-you"))}}),$(function(){$("#NewsletterSignupForm").validate({errorClass:"error-msg",errorElement:"div",highlight:function(n){$(n).parents(".input-container").addClass("error")},unhighlight:function(n){$(n).parents(".input-container").removeClass("error")},rules:{NSFirstName:"required",NSLastName:"required",NSEmail:{required:!0,email:!0}},messages:{NSFirstName:"Please enter your first name.",NSLastName:"Please enter your last name.",NSEmail:{required:"Please enter your email address.",remote:"User already registered."}},invalidHandler:function(n,t){var i=t.numberOfInvalids()}});$("#NSSubmit").on("click",function(){if($("#NewsletterSignupForm").valid()){var i="/Account/Subscribe",t={};return t.Email=$("#NSEmail").val(),t.Name=$("#NSFirstName").val(),t.LastName=$("#NSLastName").val(),console.log(t),$.post(i,t,n),!1}return!1});var n=function(n){n.Success==!0&&n.Object!=null&&($("#NSFirstName").val(""),$("#NSLastName").val(""),$("#NSEmail").val(""),window.location.replace("/newsletter-thank-you"))}}),$(function(){if($("#sortByAllSermonSeriesVideos").change(function(){var t=$("#sortByAllSermonSeriesVideos").val(),n=window.location.href.split("?")[0]+"?sortBy="+t;document.location=n}),$("#ShowMoreSermonSeriesVideo").bind("click",function(){var i=parseInt($("#NoOfItemsToDisplay").val())+5,t=$("#sortByAllSermonSeriesVideos").val(),n=window.location.href.split("?")[0]+"?sortBy="+t+"&NoOfItems="+i;document.location=n}),$("#NoOfItemsToDisplay")){var n=parseInt($("#NoOfItemsToDisplay").val());$("html, body").animate({scrollTop:$(".current-page")})}}),$(function(){$("#FormChangePassword").validate({errorClass:"error-msg",errorElement:"div",highlight:function(n){$(n).parents(".input-container").addClass("error")},unhighlight:function(n){$(n).parents(".input-container").removeClass("error")},rules:{OldPassword:"required",NewPassword:"required",ConfirmPassword:{required:!0,equalTo:"#ChangeNewPassword"}},messages:{OldPassword:"Please Enter Old Password",NewPassword:"Please enter New password.",ConfirmPassword:"Please enter confirm password same as New password"},submitHandler:function(n){n.submit()}}),$("#FormChangePasswordSubmit").bind("click",function(){if($("#MessageBox")&&$("#MessageBox").hide(),$("#FormChangePassword").valid()){var i="/Account/ChangePassword",t={};return t.OldPassword=$("#OldPassword").val(),t.NewPassword=$("#ChangeNewPassword").val(),t.ConfirmPassword=$("#ChnageConfirmPassword").val(),$.post(i,t,n),!1}return!1});var n=function(n){if(n.Success==!0&&n.Object!=null){$("#OldPassword").val(""),$("#ChangeNewPassword").val(""),$("#ChnageConfirmPassword").val("");var t=window.location.href.split("?")[0]+"?message=Success";document.location=t}else alert(n.ErrorMessage);e.preventDefault()}}),jQuery.validator.addMethod("letterswithbasicpunc",function(n,t){return this.optional(t)||/^[a-z\-.,()'"\s]+$/i.test(n)},"Letters or punctuation only please"),function(n,t,i){var r={};n.validator.addMethod("lettersonly",function(n,t){return this.optional(t)||/^[a-z]+$/i.test(n)}),n.validator.setDefaults({ignore:":hidden:not(.selectpicker)"}),r.UTIL={setupFormValidation:function(){n("#FormMagazineSubscribe").validate({errorClass:"error-msg",errorElement:"div",highlight:function(t){n(t).parents(".input-container").addClass("error")},unhighlight:function(t){n(t).parents(".input-container").removeClass("error")},rules:{Name:"required",LastName:"required",Address:"required",City:{required:!0,letterswithbasicpunc:!0,minlength:2},ZipCode:"required",State:"required",Email:{required:!0,email:!0,remote:function(){var i="/Account/IsEmailExist",t=n("#SubscribeEmailId").val();return{url:i,type:"GET",data:{email:t},dataFilter:function(n){var t=JSON.parse(n);return t.Success==!0?!1:!0}}}},Password:{required:!0,minlength:6},ConfirmPassword:{required:!0,minlength:6,equalTo:"#SubscribePassword"}},messages:{Name:"Please enter your First Name.",LastName:"Please enter your Last Name",Address:"Please enter your Address.",City:{required:"Please enter your City.",letterswithbasicpunc:"Enter a valid City."},ZipCode:"Please enter your ZipCode.",State:"Please enter your State.",Email:{required:"Please enter a valid email address",remote:"User already registered."},Password:{required:"Please enter password.",minlength:"Password must be at least 6 characters"},ConfirmPassword:{equalTo:"Please enter confirm password same as password",required:"Please enter password.",minlength:"Password must be at least 6 characters"}},submitHandler:function(n){n.submit()}})}},n(i).ready(function(){r.UTIL.setupFormValidation()})}(jQuery,window,document),!function(n,t){"use strict";function cf(n,t){for(var r,u=[],i=0;i<n.length;++i){if(r=gt[n[i]]||sf(n[i]),!r)throw"module definition dependecy not found: "+n[i];u.push(r)}t.apply(null,u)}function i(n,i,r){if("string"!=typeof n)throw"invalid module definition, module id must be defined and be a string";if(i===t)throw"invalid module definition, dependencies must be specified";if(r===t)throw"invalid module definition, definition function must be specified";cf(i,function(){gt[n]=r.apply(null,arguments)})}function sf(t){for(var r=n,u=t.split(/[.\/]/),i=0;i<u.length;++i){if(!r[u[i]])return;r=r[u[i]]}return r}function hf(i){for(var e=0;e<i.length;e++){for(var f=n,o=i[e],r=o.split(/[.\/]/),u=0;u<r.length-1;++u)f[r[u]]===t&&(f[r[u]]={}),f=f[r[u]];f[r[r.length-1]]=gt[o]}}var gt={},k="tinymce/dom/EventUtils",ii="tinymce/dom/Sizzle",r="tinymce/util/Tools",u="tinymce/Env",ut="tinymce/dom/DomQuery",ei="tinymce/html/Styles",s="tinymce/dom/TreeWalker",oi="tinymce/dom/Range",c="tinymce/html/Entities",yu="tinymce/dom/StyleSheetLoader",o="tinymce/dom/DOMUtils",et="tinymce/dom/ScriptLoader",bt="tinymce/AddOnManager",a="tinymce/dom/RangeUtils",au="tinymce/NodeChange",y="tinymce/html/Node",l="tinymce/html/Schema",ni="tinymce/html/SaxParser",kt="tinymce/html/DomParser",er="tinymce/html/Writer",g="tinymce/html/Serializer",ir="tinymce/dom/Serializer",ar="tinymce/dom/TridentSelection",ti="tinymce/util/VK",sr="tinymce/dom/ControlSelection",nt="tinymce/dom/BookmarkManager",hr="tinymce/dom/Selection",dt="tinymce/dom/ElementUtils",nf="tinymce/fmt/Preview",tr="tinymce/Formatter",or="tinymce/UndoManager",ri="tinymce/EnterKey",rr="tinymce/ForceBlocks",lr="tinymce/EditorCommands",lt="tinymce/util/URI",b="tinymce/util/Class",ht="tinymce/util/EventDispatcher",ot="tinymce/ui/Selector",st="tinymce/ui/Collection",f="tinymce/ui/DomUtils",v="tinymce/ui/Control",d="tinymce/ui/Factory",cr="tinymce/ui/KeyboardNavigation",h="tinymce/ui/Container",w="tinymce/ui/DragHelper",fr="tinymce/ui/Scrollable",tt="tinymce/ui/Panel",vt="tinymce/ui/Movable",ur="tinymce/ui/Resizable",p="tinymce/ui/FloatPanel",yt="tinymce/ui/Window",pr="tinymce/ui/MessageBox",wr="tinymce/WindowManager",br="tinymce/util/Quirks",it="tinymce/util/Observable",yr="tinymce/EditorObservable",vr="tinymce/Shortcuts",ui="tinymce/Editor",hi="tinymce/util/I18n",ci="tinymce/FocusManager",rt="tinymce/EditorManager",bu="tinymce/LegacyInput",si="tinymce/util/XHR",fi="tinymce/util/JSON",wu="tinymce/util/JSONRequest",du="tinymce/util/JSONP",ku="tinymce/util/LocalStorage",vu="tinymce/Compat",at="tinymce/ui/Layout",ft="tinymce/ui/AbsoluteLayout",ki="tinymce/ui/Tooltip",e="tinymce/ui/Widget",wt="tinymce/ui/Button",pu="tinymce/ui/ButtonGroup",bi="tinymce/ui/Checkbox",pt="tinymce/ui/ComboBox",gu="tinymce/ui/ColorBox",di="tinymce/ui/PanelButton",ff="tinymce/ui/ColorButton",nr="tinymce/util/Color",of="tinymce/ui/ColorPicker",gi="tinymce/ui/Path",ef="tinymce/ui/ElementPath",wi="tinymce/ui/FormItem",ai="tinymce/ui/Form",uf="tinymce/ui/FieldSet",rf="tinymce/ui/FilePicker",tf="tinymce/ui/FitLayout",lu="tinymce/ui/FlexLayout",li="tinymce/ui/FlowLayout",nu="tinymce/ui/FormatControls",gr="tinymce/ui/GridLayout",iu="tinymce/ui/Iframe",tu="tinymce/ui/Label",vi="tinymce/ui/Toolbar",pi="tinymce/ui/MenuBar",ct="tinymce/ui/MenuButton",ou="tinymce/ui/ListBox",yi="tinymce/ui/MenuItem",hu="tinymce/ui/Menu",dr="tinymce/ui/Radio",fu="tinymce/ui/ResizeHandle",eu="tinymce/ui/Spacer",ru="tinymce/ui/SplitButton",uu="tinymce/ui/StackLayout",cu="tinymce/ui/TabPanel",su="tinymce/ui/TextBox",kr="tinymce/ui/Throbber";i(k,[],function(){function i(n,t,i,r){n.addEventListener?n.addEventListener(t,i,r||!1):n.attachEvent&&n.attachEvent("on"+t,i)}function r(n,t,i,r){n.removeEventListener?n.removeEventListener(t,i,r||!1):n.detachEvent&&n.detachEvent("on"+t,i)}function n(n,t){function s(){return!1}function h(){return!0}var o,i=t||{},l;for(o in n)f[o]||(i[o]=n[o]);if(i.target||(i.target=i.srcElement||document),n&&u.test(n.type)&&n.pageX===l&&n.clientX!==l){var c=i.target.ownerDocument||document,r=c.documentElement,e=c.body;i.pageX=n.clientX+(r&&r.scrollLeft||e&&e.scrollLeft||0)-(r&&r.clientLeft||e&&e.clientLeft||0),i.pageY=n.clientY+(r&&r.scrollTop||e&&e.scrollTop||0)-(r&&r.clientTop||e&&e.clientTop||0)}return i.preventDefault=function(){i.isDefaultPrevented=h,n&&(n.preventDefault?n.preventDefault():n.returnValue=!1)},i.stopPropagation=function(){i.isPropagationStopped=h,n&&(n.stopPropagation?n.stopPropagation():n.cancelBubble=!0)},i.stopImmediatePropagation=function(){i.isImmediatePropagationStopped=h,i.stopPropagation()},i.isDefaultPrevented||(i.isDefaultPrevented=s,i.isPropagationStopped=s,i.isImmediatePropagationStopped=s),i}function e(n,t,u){function e(){u.domLoaded||(u.domLoaded=!0,t(o))}function s(){("complete"===f.readyState||"interactive"===f.readyState&&f.body)&&(r(f,"readystatechange",s),e())}function h(){try{f.documentElement.doScroll("left")}catch(n){return void setTimeout(h,0)}e()}var f=n.document,o={type:"ready"};return u.domLoaded?void t(o):(f.addEventListener?"complete"===f.readyState?e():i(n,"DOMContentLoaded",e):(i(f,"readystatechange",s),f.documentElement.doScroll&&n.self===n.top&&h()),void i(n,"load",e))}function t(){function s(n,t){var u,r,o,i,e=f[t];if(u=e&&e[n.type])for(r=0,o=u.length;o>r;r++)if(i=u[r],i&&i.func.call(i.scope,n)===!1&&n.preventDefault(),n.isImmediatePropagationStopped())return}var t=this,f={},l,u,a,h,c;u=o+(+new Date).toString(32),h="onmouseenter"in document.documentElement,a="onfocusin"in document.documentElement,c={mouseenter:"mouseover",mouseleave:"mouseout"},l=1,t.domLoaded=!1,t.events=f,t.bind=function(r,o,v,y){function it(t){s(n(t||nt.event),w)}var w,b,tt,p,d,k,g,nt=window;if(r&&3!==r.nodeType&&8!==r.nodeType){for(r[u]?w=r[u]:(w=l++,r[u]=w,f[w]={}),y=y||r,o=o.split(" "),tt=o.length;tt--;)p=o[tt],k=it,d=g=!1,"DOMContentLoaded"===p&&(p="ready"),t.domLoaded&&"ready"===p&&"complete"==r.readyState?v.call(y,n({type:p})):(h||(d=c[p],d&&(k=function(t){var r,i;if(r=t.currentTarget,i=t.relatedTarget,i&&r.contains)i=r.contains(i);else for(;i&&i!==r;)i=i.parentNode;i||(t=n(t||nt.event),t.type="mouseout"===t.type?"mouseleave":"mouseenter",t.target=r,s(t,w))})),a||"focusin"!==p&&"focusout"!==p||(g=!0,d="focusin"===p?"focus":"blur",k=function(t){t=n(t||nt.event),t.type="focus"===t.type?"focusin":"focusout",s(t,w)}),b=f[w][p],b?"ready"===p&&t.domLoaded?v({type:p}):b.push({func:v,scope:y}):(f[w][p]=b=[{func:v,scope:y}],b.fakeName=d,b.capture=g,b.nativeHandler=k,"ready"===p?e(r,k,t):i(r,d||p,k,g)));return r=b=0,v}},t.unbind=function(n,i,e){var l,o,a,c,s,h;if(!n||3===n.nodeType||8===n.nodeType)return t;if(l=n[u]){if(h=f[l],i){for(i=i.split(" "),a=i.length;a--;)if(s=i[a],o=h[s]){if(e)for(c=o.length;c--;)if(o[c].func===e){var p=o.nativeHandler,y=o.fakeName,v=o.capture;o=o.slice(0,c).concat(o.slice(c+1)),o.nativeHandler=p,o.fakeName=y,o.capture=v,h[s]=o}e&&0!==o.length||(delete h[s],r(n,o.fakeName||s,o.nativeHandler,o.capture))}}else{for(s in h)o=h[s],r(n,o.fakeName||s,o.nativeHandler,o.capture);h={}}for(s in h)return t;delete f[l];try{delete n[u]}catch(w){n[u]=null}}return t},t.fire=function(i,r,f){var e;if(!i||3===i.nodeType||8===i.nodeType)return t;f=n(null,f),f.type=r,f.target=i;do e=i[u],e&&s(f,e),i=i.parentNode||i.ownerDocument||i.defaultView||i.parentWindow;while(i&&!f.isPropagationStopped());return t},t.clean=function(n){var f,r,i=t.unbind;if(!n||3===n.nodeType||8===n.nodeType)return t;if(n[u]&&i(n),n.getElementsByTagName||(n=n.document),n&&n.getElementsByTagName)for(i(n),r=n.getElementsByTagName("*"),f=r.length;f--;)n=r[f],n[u]&&i(n);return t},t.destroy=function(){f={}},t.cancel=function(n){return n&&(n.preventDefault(),n.stopImmediatePropagation()),!1}}var o="mce-data-",u=/^(?:mouse|contextmenu)|click/,f={keyLocation:1,layerX:1,layerY:1,returnValue:1};return t.Event=new t,t.Event.bind(window,"ready",function(){}),t}),i(ii,[],function(){if(!window.jQuery)throw new Error("Load jQuery first");return jQuery.find}),i(r,[],function(){function r(n){return null===n||n===t?"":(""+n).replace(l,"")}function e(n,r){return r?"array"==r&&i(n)?!0:typeof n==r:n!==t}function a(n){var r=n,t,u;if(!i(n))for(r=[],t=0,u=n.length;u>t;t++)r[t]=n[t];return r}function p(n,t,i){var r;for(n=n||[],t=t||",","string"==typeof n&&(n=n.split(t)),i=i||{},r=n.length;r--;)i[n[r]]={};return i}function n(n,i,r){var u,f;if(!n)return 0;if(r=r||n,n.length!==t){for(u=0,f=n.length;f>u;u++)if(i.call(r,n[u],u,n)===!1)return 0}else for(u in n)if(n.hasOwnProperty(u)&&i.call(r,n[u],u,n)===!1)return 0;return 1}function u(t,i){var r=[];return n(t,function(n){r.push(i(n))}),r}function v(t,i){var r=[];return n(t,function(n){(!i||i(n))&&r.push(n)}),r}function c(n,t,i){var e=this,f,u,r,o,h,s=0;if(n=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(n),r=n[3].match(/(^|\.)(\w+)$/i)[2],u=e.createNS(n[3].replace(/\.\w+$/,""),i),!u[r]){if("static"==n[2])return u[r]=t,void(this.onCreate&&this.onCreate(n[2],n[3],u[r]));t[r]||(t[r]=function(){},s=1),u[r]=t[r],e.extend(u[r].prototype,t),n[5]&&(f=e.resolve(n[5]).prototype,o=n[5].match(/\.(\w+)$/i)[1],h=u[r],u[r]=s?function(){return f[o].apply(this,arguments)}:function(){return this.parent=f[o],h.apply(this,arguments)},u[r].prototype[r]=u[r],e.each(f,function(n,t){u[r].prototype[t]=f[t]}),e.each(t,function(n,t){f[t]?u[r].prototype[t]=function(){return this.parent=f[t],n.apply(this,arguments)}:t!=r&&(u[r].prototype[t]=n)})),e.each(t["static"],function(n,t){u[r][t]=n})}}function y(n,t){var i,r;if(n)for(i=0,r=n.length;r>i;i++)if(n[i]===t)return i;return-1}function w(n,i){for(var r,o=arguments,f,u=1,e=o.length;e>u;u++){i=o[u];for(r in i)i.hasOwnProperty(r)&&(f=i[r],f!==t&&(n[r]=f))}return n}function f(t,i,r,u){u=u||this,t&&(r&&(t=t[r]),n(t,function(n,t){return i.call(u,n,t,r)===!1?!1:void f(n,i,r,u)}))}function s(n,t){var r,i;for(t=t||window,n=n.split("."),r=0;r<n.length;r++)i=n[r],t[i]||(t[i]={}),t=t[i];return t}function o(n,t){var i,r;for(t=t||window,n=n.split("."),i=0,r=n.length;r>i&&(t=t[n[i]],t);i++);return t}function h(n,t){return!n||e(n,"array")?n:u(n.split(t||","),r)}var l=/^\s*|\s*$/g,i=Array.isArray||function(n){return"[object Array]"===Object.prototype.toString.call(n)};return{trim:r,isArray:i,is:e,toArray:a,makeMap:p,each:n,map:u,grep:v,inArray:y,extend:w,create:c,walk:f,createNS:s,resolve:o,explode:h}}),i(u,[],function(){var e=navigator,n=e.userAgent,f,i,t,r,s,h,u,o;return f=window.opera&&window.opera.buildNumber,i=/WebKit/.test(n),t=!i&&!f&&/MSIE/gi.test(n)&&/Explorer/gi.test(e.appName),t=t&&/MSIE (\w+)\./.exec(n)[1],r=-1==n.indexOf("Trident/")||-1==n.indexOf("rv:")&&-1==e.appName.indexOf("Netscape")?!1:11,t=t||r,s=!i&&!r&&/Gecko/.test(n),h=-1!=n.indexOf("Mac"),u=/(iPad|iPhone)/.test(n),o=!u||n.match(/AppleWebKit\/(\d*)/)[1]>=534,{opera:f,webkit:i,ie:t,gecko:s,mac:h,iOS:u,contentEditable:o,transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",caretAfter:8!=t,range:window.getSelection&&"Range"in window,documentMode:t?document.documentMode||7:10}}),i(ut,[k,ii,r,u],function(n,i,r,u){function h(n){return"undefined"!=typeof n}function w(n){return"string"==typeof n}function nt(n,t){var r,u,i;for(t=t||d,i=t.createElement("div"),r=t.createDocumentFragment(),i.innerHTML=n;u=i.firstChild;)r.appendChild(u);return r}function s(n,t,i,r){var u;if(w(t))t=nt(t,y(n[0]));else if(t.length&&!t.nodeType){if(t=f.makeArray(t),r)for(u=t.length-1;u>=0;u--)s(n,t[u],i,r);else for(u=0;u<t.length;u++)s(n,t[u],i,r);return n}if(t.nodeType)for(u=n.length;u--;)i.call(n[u],t);return n}function it(n,t){return n&&t&&-1!==(" "+n.className+" ").indexOf(" "+t+" ")}function tt(n,t,i){var u,r;return t=f(t)[0],n.each(function(){var n=this;i&&u==n.parentNode?r.appendChild(n):(u=n.parentNode,r=t.cloneNode(!1),n.parentNode.insertBefore(r,n),r.appendChild(n))}),n}function f(n,t){return new f.fn.init(n,t)}function ct(n,t){var i;if(t.indexOf)return t.indexOf(n);for(i=t.length;i--;)if(t[i]===n)return i;return-1}function g(n){return null===n||n===o?"":(""+n).replace(ot,"")}function e(n,t){var f,u,r,e,i;if(n)if(f=n.length,f===e){for(u in n)if(n.hasOwnProperty(u)&&(i=n[u],t.call(i,u,i)===!1))break}else for(r=0;f>r&&(i=n[r],t.call(i,r,i)!==!1);r++);return n}function ut(n,t){var i=[];return e(n,function(n,r){t(r,n)&&i.push(r)}),i}function y(n){return n?9==n.nodeType?n:n.ownerDocument:d}function ft(n,i,r){var e=[],u=n[i];for("string"!=typeof r&&r instanceof f&&(r=r[0]);u&&9!==u.nodeType;){if(r!==t){if(u===r)break;if("string"==typeof r&&f(u).is(r))break}1===u.nodeType&&e.push(u),u=u[i]}return e}function v(n,i,r,u){var e=[];for(u instanceof f&&(u=u[0]);n;n=n[i])if(!r||n.nodeType===r){if(u!==t){if(n===u)break;if("string"==typeof u&&f(n).is(u))break}e.push(n)}return e}function rt(n,t,i){for(n=n[t];n;n=n[t])if(n.nodeType==i)return n;return null}function b(n,t,i){e(i,function(i,r){n[i]=n[i]||{},n[i][t]=r})}var d=document,p=Array.prototype.push,ht=Array.prototype.slice,st=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,c=n.Event,o,at=r.makeMap("fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom"," "),lt=r.makeMap("checked compact declare defer disabled ismap multiple nohref noshade nowrap readonly selected"," "),et={"for":"htmlFor","class":"className",readonly:"readOnly"},k={float:"cssFloat"},l={},a={},ot=/^\s*|\s*$/g;return f.fn=f.prototype={constructor:f,selector:"",context:null,length:0,init:function(n,t){var i=this,u,r;if(!n)return i;if(n.nodeType)return i.context=i[0]=n,i.length=1,i;if(t&&t.nodeType)i.context=t;else{if(t)return f(n).attr(t);i.context=t=document}if(w(n)){if(i.selector=n,u="<"===n.charAt(0)&&">"===n.charAt(n.length-1)&&n.length>=3?[null,n,null]:st.exec(n),!u)return f(t).find(n);if(u[1])for(r=nt(n,y(t)).firstChild;r;)p.call(i,r),r=r.nextSibling;else{if(r=y(t).getElementById(u[2]),!r)return i;if(r.id!==u[2])return i.find(n);i.length=1,i[0]=r}}else this.add(n,!1);return i},toArray:function(){return r.toArray(this)},add:function(n,t){var i=this,u,r;if(w(n))return i.add(f(n));if(n.nodeType)return i.add([n]);if(t!==!1)for(u=f.unique(i.toArray().concat(f.makeArray(n))),i.length=u.length,r=0;r<u.length;r++)i[r]=u[r];else p.apply(i,f.makeArray(n));return i},attr:function(n,t){var i=this,r;if("object"==typeof n)e(n,function(n,t){i.attr(n,t)});else{if(!h(t)){if(i[0]&&1===i[0].nodeType){if(r=l[n],r&&r.get)return r.get(i[0],n);if(lt[n])return i.prop(n)?n:o;t=i[0].getAttribute(n,2),null===t&&(t=o)}return t}this.each(function(){var i;if(1===this.nodeType){if(i=l[n],i&&i.set)return void i.set(this,t);null===t?this.removeAttribute(n,2):this.setAttribute(n,t,2)}})}return i},removeAttr:function(n){return this.attr(n,null)},prop:function(n,t){var i=this;if(n=et[n]||n,"object"==typeof n)e(n,function(n,t){i.prop(n,t)});else{if(!h(t))return i[0]&&i[0].nodeType&&n in i[0]?i[0][n]:t;this.each(function(){1==this.nodeType&&(this[n]=t)})}return i},css:function(n,t){function f(n){return n.replace(/-(\D)/g,function(n,t){return t.toUpperCase()})}function s(n){return n.replace(/[A-Z]/g,function(n){return"-"+n})}var u=this,r,i;if("object"==typeof n)e(n,function(n,t){u.css(n,t)});else if(h(t))n=f(n),"number"!=typeof t||at[n]||(t+="px"),u.each(function(){var r=this.style;if(i=a[n],i&&i.set)return void i.set(this,t);try{this.style[k[n]||n]=t}catch(u){}(null===t||""===t)&&(r.removeProperty?r.removeProperty(s(n)):r.removeAttribute(n))});else{if(r=u[0],i=a[n],i&&i.get)return i.get(r);if(r.ownerDocument.defaultView)try{return r.ownerDocument.defaultView.getComputedStyle(r,null).getPropertyValue(s(n))}catch(c){return o}else if(r.currentStyle)return r.currentStyle[f(n)]}return u},remove:function(){for(var i=this,n,t=this.length;t--;)n=i[t],c.clean(n),n.parentNode&&n.parentNode.removeChild(n);return this},empty:function(){for(var i=this,n,t=this.length;t--;)for(n=i[t];n.firstChild;)n.removeChild(n.firstChild);return this},html:function(n){var t=this,i;if(h(n)){i=t.length;try{for(;i--;)t[i].innerHTML=n}catch(r){f(t[i]).empty().append(n)}return t}return t[0]?t[0].innerHTML:""},text:function(n){var t=this,i;if(h(n)){for(i=t.length;i--;)"innerText"in t[i]?t[i].innerText=n:t[0].textContent=n;return t}return t[0]?t[0].innerText||t[0].textContent:""},append:function(){return s(this,arguments,function(n){1===this.nodeType&&this.appendChild(n)})},prepend:function(){return s(this,arguments,function(n){1===this.nodeType&&this.insertBefore(n,this.firstChild)},!0)},before:function(){var n=this;return n[0]&&n[0].parentNode?s(n,arguments,function(n){this.parentNode.insertBefore(n,this)}):n},after:function(){var n=this;return n[0]&&n[0].parentNode?s(n,arguments,function(n){this.parentNode.insertBefore(n,this.nextSibling)},!0):n},appendTo:function(n){return f(n).append(this),this},prependTo:function(n){return f(n).prepend(this),this},replaceWith:function(n){return this.before(n).remove()},wrap:function(n){return tt(this,n)},wrapAll:function(n){return tt(this,n,!0)},wrapInner:function(n){return this.each(function(){f(this).contents().wrapAll(n)}),this},unwrap:function(){return this.parent().each(function(){f(this).replaceWith(this.childNodes)})},clone:function(){var n=[];return this.each(function(){n.push(this.cloneNode(!0))}),f(n)},addClass:function(n){return this.toggleClass(n,!0)},removeClass:function(n){return this.toggleClass(n,!1)},toggleClass:function(n,t){var i=this;return"string"!=typeof n?i:(-1!==n.indexOf(" ")?e(n.split(" "),function(){i.toggleClass(this,t)}):i.each(function(i,r){var f,u;u=it(r,n),u!==t&&(f=r.className,u?r.className=g((" "+f+" ").replace(" "+n+" "," ")):r.className+=f?" "+n:n)}),i)},hasClass:function(n){return it(this[0],n)},each:function(n){return e(this,n)},on:function(n,t){return this.each(function(){c.bind(this,n,t)})},off:function(n,t){return this.each(function(){c.unbind(this,n,t)})},trigger:function(n){return this.each(function(){"object"==typeof n?c.fire(this,n.type,n):c.fire(this,n)})},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},slice:function(){return new f(ht.apply(this,arguments))},eq:function(n){return-1===n?this.slice(n):this.slice(n,+n+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},find:function(n){for(var i=[],t=0,r=this.length;r>t;t++)f.find(n,this[t],i);return f(i)},filter:function(n){return f("function"==typeof n?ut(this.toArray(),function(t,i){return n(i,t)}):f.filter(n,this.toArray()))},closest:function(n){var t=[];return n instanceof f&&(n=n[0]),this.each(function(i,r){for(;r;){if("string"==typeof n&&f(r).is(n)){t.push(r);break}if(r==n){t.push(r);break}r=r.parentNode}}),f(t)},offset:function(n){var i,r,t,f=0,e=0,u;return n?this.css(n):(i=this[0],i&&(r=i.ownerDocument,t=r.documentElement,i.getBoundingClientRect&&(u=i.getBoundingClientRect(),f=u.left+(t.scrollLeft||r.body.scrollLeft)-t.clientLeft,e=u.top+(t.scrollTop||r.body.scrollTop)-t.clientTop)),{left:f,top:e})},push:p,sort:[].sort,splice:[].splice},r.extend(f,{extend:r.extend,makeArray:r.toArray,inArray:ct,isArray:r.isArray,each:e,trim:g,grep:ut,find:i,expr:i.selectors,unique:i.uniqueSort,text:i.getText,contains:i.contains,filter:function(n,t,i){var r=t.length;for(i&&(n=":not("+n+")");r--;)1!=t[r].nodeType&&t.splice(r,1);return t=1===t.length?f.find.matchesSelector(t[0],n)?[t[0]]:[]:f.find.matches(n,t)}}),e({parent:function(n){var t=n.parentNode;return t&&11!==t.nodeType?t:null},parents:function(n){return ft(n,"parentNode")},next:function(n){return rt(n,"nextSibling",1)},prev:function(n){return rt(n,"previousSibling",1)},children:function(n){return v(n.firstChild,"nextSibling",1)},contents:function(n){return r.toArray(("iframe"===n.nodeName?n.contentDocument||n.contentWindow.document:n).childNodes)}},function(n,t){f.fn[n]=function(i){var u=this,r=[];return u.each(function(){var n=t.call(r,this,i,r);n&&(f.isArray(n)?r.push.apply(r,n):r.push(n))}),this.length>1&&(r=f.unique(r),0===n.indexOf("parents")&&(r=r.reverse())),r=f(r),i?r.filter(i):r}}),e({parentsUntil:function(n,t){return ft(n,"parentNode",t)},nextUntil:function(n,t){return v(n,"nextSibling",1,t).slice(1)},prevUntil:function(n,t){return v(n,"previousSibling",1,t).slice(1)}},function(n,t){f.fn[n]=function(i,r){var e=this,u=[];return e.each(function(){var n=t.call(u,this,i,u);n&&(f.isArray(n)?u.push.apply(u,n):u.push(n))}),this.length>1&&(u=f.unique(u),(0===n.indexOf("parents")||"prevUntil"===n)&&(u=u.reverse())),u=f(u),r?u.filter(r):u}}),f.fn.is=function(n){return!!n&&this.filter(n).length>0},f.fn.init.prototype=f.fn,f.overrideDefaults=function(n){function i(r,u){return t=t||n(),0===arguments.length&&(r=t.element),u||(u=t.context),new i.fn.init(r,u)}var t;return f.extend(i,this),i},u.ie&&u.ie<8&&(b(l,"get",{maxlength:function(n){var t=n.maxLength;return 2147483647===t?o:t},size:function(n){var t=n.size;return 20===t?o:t},"class":function(n){return n.className},style:function(n){var t=n.style.cssText;return 0===t.length?o:t}}),b(l,"set",{"class":function(n,t){n.className=t},style:function(n,t){n.style.cssText=t}})),u.ie&&u.ie<9&&(k.float="styleFloat",b(a,"set",{opacity:function(n,t){var i=n.style;null===t||""===t?i.removeAttribute("filter"):(i.zoom=1,i.filter="alpha(opacity="+100*t+")")}})),f.attrHooks=l,f.cssHooks=a,f}),i(ei,[],function(){return function(n,t){function h(n,t,i,r){function u(n){return n=parseInt(n,10).toString(16),n.length>1?n:"0"+n}return"#"+u(t)+u(i)+u(r)}var s=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,v=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,a=/\s*([^:]+):\s*([^;]+);?/g,c=/\s+$/,l,i,r={},u,e,f,o="﻿";for(n=n||{},t&&(e=t.getValidStyles(),f=t.getInvalidStyles()),u=("\\\" \\' \\; \\: ; : "+o).split(" "),i=0;i<u.length;i++)r[u[i]]=o+i,r[o+i]=u[i];return{toHex:function(n){return n.replace(s,h)},parse:function(t){function o(n,t,r){var e,s,o,h,f;if(e=u[n+"-top"+t],e&&(s=u[n+"-right"+t],s&&(o=u[n+"-bottom"+t],o&&(h=u[n+"-left"+t])))){for(f=[e,s,o,h],i=f.length-1;i--&&f[i]===f[i+1];);i>-1&&r||(u[n+t]=-1==i?f[0]:f.join(" "),delete u[n+"-top"+t],delete u[n+"-right"+t],delete u[n+"-bottom"+t],delete u[n+"-left"+t])}}function w(n){var t=u[n],i;if(t){for(t=t.split(" "),i=t.length;i--;)if(t[i]!==t[0])return!1;return u[n]=t[0],!0}}function g(n,t,i,r){w(t)&&w(i)&&w(r)&&(u[n]=u[t]+" "+u[i]+" "+u[r],delete u[t],delete u[i],delete u[r])}function k(n){return y=!0,r[n]}function p(n,t){return y&&(n=n.replace(/\uFEFF[0-9]/g,function(n){return r[n]})),t||(n=n.replace(/\\([\'\";:])/g,"$1")),n}function nt(t,i,r,u,f,e){if(f=f||e)return f=p(f),"'"+f.replace(/\'/g,"\\'")+"'";if(i=p(i||r||u),!n.allow_script_urls){var o=i.replace(/[\s\r\n]+/,"");if(/(java|vb)script:/i.test(o)||!n.allow_svg_data_urls&&/^data:image\/svg/i.test(o))return""}return b&&(i=b.call(d,i,"style")),"url('"+i.replace(/\'/g,"\\'")+"')"}var u={},l,e,f,y,b=n.url_converter,d=n.url_converter_scope||this;if(t){for(t=t.replace(/[\u0000-\u001F]/g,""),t=t.replace(/\\[\"\';:\uFEFF]/g,k).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(n){return n.replace(/[;:]/g,k)});l=a.exec(t);){if(e=l[1].replace(c,"").toLowerCase(),f=l[2].replace(c,""),f=f.replace(/\\[0-9a-f]+/g,function(n){return String.fromCharCode(parseInt(n.substr(1),16))}),e&&f.length>0){if(!n.allow_script_urls&&("behavior"==e||/expression\s*\(|\/\*|\*\//.test(f)))continue;"font-weight"===e&&"700"===f?f="bold":("color"===e||"background-color"===e)&&(f=f.toLowerCase()),f=f.replace(s,h),f=f.replace(v,nt),u[e]=y?p(f,!0):f}a.lastIndex=l.index+l[0].length}o("border","",!0),o("border","-width"),o("border","-color"),o("border","-style"),o("padding",""),o("margin",""),g("border","border-width","border-style","border-color"),"medium none"===u.border&&delete u.border,"none"===u["border-image"]&&delete u["border-image"]}return u},serialize:function(n,t){function o(t){var f,u,o,r;if(f=e[t])for(u=0,o=f.length;o>u;u++)t=f[u],r=n[t],r!==l&&r.length>0&&(i+=(i.length>0?" ":"")+t+": "+r+";")}function s(n,t){var i;return i=f["*"],i&&i[n]?!1:(i=f[t],i&&i[n]?!1:!0)}var i="",r,u;if(t&&e)o("*"),o(t);else for(r in n)u=n[r],u!==l&&u.length>0&&(!f||s(r,t))&&(i+=(i.length>0?" ":"")+r+": "+u+";");return i}}}}),i(s,[],function(){return function(n,t){function r(n,i,r,u){var e,f;if(n){if(!u&&n[i])return n[i];if(n!=t){if(e=n[r])return e;for(f=n.parentNode;f&&f!=t;f=f.parentNode)if(e=f[r])return e}}}var i=n;this.current=function(){return i},this.next=function(n){return i=r(i,"firstChild","nextSibling",n)},this.prev=function(n){return i=r(i,"lastChild","previousSibling",n)}}}),i(oi,[r],function(n){function t(i){function b(){return p.createDocumentFragment()}function d(n,t){et(o,n,t)}function k(n,t){et(c,n,t)}function ut(n){d(n.parentNode,a(n))}function st(n){d(n.parentNode,a(n)+1)}function ht(n){k(n.parentNode,a(n))}function rt(n){k(n.parentNode,a(n)+1)}function wt(n){n?(r[e]=r[u],r[s]=r[f]):(r[u]=r[e],r[f]=r[s]),r.collapsed=o}function ti(n){ut(n),rt(n)}function ni(n){d(n,0),k(n,1===n.nodeType?n.childNodes.length:n.nodeValue.length)}function ri(n,t){var a=r[u],l=r[f],p=r[e],v=r[s],o=t.startContainer,i=t.startOffset,c=t.endContainer,h=t.endOffset;return 0===n?y(a,l,o,i):1===n?y(p,v,o,i):2===n?y(p,v,c,h):3===n?y(a,l,c,h):void 0}function vt(){nt(h)}function at(){return nt(ii)}function ot(){return nt(l)}function pt(n){var t=this[u],r=this[f],o,e;3!==t.nodeType&&4!==t.nodeType||!t.nodeValue?(t.childNodes.length>0&&(e=t.childNodes[r]),e?t.insertBefore(n,e):3==t.nodeType?i.insertAfter(n,t):t.appendChild(n)):r?r>=t.nodeValue.length?i.insertAfter(n,t):(o=t.splitText(r),t.parentNode.insertBefore(n,o)):t.parentNode.insertBefore(n,t)}function yt(n){var t=r.extractContents();r.insertNode(n),n.appendChild(t),r.selectNode(n)}function lt(){return ft(new t(i),{startContainer:r[u],startOffset:r[f],endContainer:r[e],endOffset:r[s],collapsed:r.collapsed,commonAncestorContainer:r.commonAncestorContainer})}function g(n,t){var i;if(3==n.nodeType||0>t)return n;for(i=n.firstChild;i&&t>0;)--t,i=i.nextSibling;return i?i:n}function ct(){return r[u]==r[e]&&r[f]==r[s]}function y(n,t,r,u){var e,h,f,c,o,s;if(n==r)return t==u?0:u>t?-1:1;for(e=r;e&&e.parentNode!=n;)e=e.parentNode;if(e){for(h=0,f=n.firstChild;f!=e&&t>h;)h++,f=f.nextSibling;return h>=t?-1:1}for(e=n;e&&e.parentNode!=r;)e=e.parentNode;if(e){for(h=0,f=r.firstChild;f!=e&&u>h;)h++,f=f.nextSibling;return u>h?-1:1}for(c=i.findCommonAncestor(n,r),o=n;o&&o.parentNode!=c;)o=o.parentNode;for(o||(o=c),s=r;s&&s.parentNode!=c;)s=s.parentNode;if(s||(s=c),o==s)return 0;for(f=c.firstChild;f;){if(f==o)return-1;if(f==s)return 1;f=f.nextSibling}}function et(n,t,o){var c,h;for(n?(r[u]=t,r[f]=o):(r[e]=t,r[s]=o),c=r[e];c.parentNode;)c=c.parentNode;for(h=r[u];h.parentNode;)h=h.parentNode;h==c?y(r[u],r[f],r[e],r[s])>0&&r.collapse(n):r.collapse(n),r.collapsed=ct(),r.commonAncestorContainer=i.findCommonAncestor(r[u],r[e])}function nt(n){var i,l=0,a=0,t,h,f,o,s,c;if(r[u]==r[e])return kt(n);for(i=r[e],t=i.parentNode;t;i=t,t=t.parentNode){if(t==r[u])return bt(i,n);++l}for(i=r[u],t=i.parentNode;t;i=t,t=t.parentNode){if(t==r[e])return dt(i,n);++a}for(h=a-l,f=r[u];h>0;)f=f.parentNode,h--;for(o=r[e];0>h;)o=o.parentNode,h++;for(s=f.parentNode,c=o.parentNode;s!=c;s=s.parentNode,c=c.parentNode)f=s,o=c;return gt(f,o,n)}function kt(n){var i,y,v,t,a,k,d,e,c;if(n!=h&&(i=b()),r[f]==r[s])return i;if(3==r[u].nodeType)return(y=r[u].nodeValue,v=y.substring(r[f],r[s]),n!=l&&(t=r[u],e=r[f],c=r[s]-r[f],0===e&&c>=t.nodeValue.length-1?t.parentNode.removeChild(t):t.deleteData(e,c),r.collapse(o)),n==h)?void 0:(v.length>0&&i.appendChild(p.createTextNode(v)),i);for(t=g(r[u],r[f]),a=r[s]-r[f];t&&a>0;)k=t.nextSibling,d=w(t,n),i&&i.appendChild(d),--a,t=k;return n!=l&&r.collapse(o),i}function bt(n,t){var i,u,v,e,s,o;if(t!=h&&(i=b()),u=tt(n,t),i&&i.appendChild(u),v=a(n),e=v-r[f],0>=e)return t!=l&&(r.setEndBefore(n),r.collapse(c)),i;for(u=n.previousSibling;e>0;)s=u.previousSibling,o=w(u,t),i&&i.insertBefore(o,i.firstChild),--e,u=s;return t!=l&&(r.setEndBefore(n),r.collapse(c)),i}function dt(n,t){var u,e,i,f,v,c;for(t!=h&&(u=b()),i=it(n,t),u&&u.appendChild(i),e=a(n),++e,f=r[s]-e,i=n.nextSibling;i&&f>0;)v=i.nextSibling,c=w(i,t),u&&u.appendChild(c),--f,i=v;return t!=l&&(r.setStartAfter(n),r.collapse(o)),u}function gt(n,t,i){var f,u,c,y,s,e,v;for(i!=h&&(u=b()),f=it(n,i),u&&u.appendChild(f),c=a(n),y=a(t),++c,s=y-c,e=n.nextSibling;s>0;)v=e.nextSibling,f=w(e,i),u&&u.appendChild(f),e=v,--s;return f=tt(t,i),u&&u.appendChild(f),i!=l&&(r.setStartAfter(n),r.collapse(o)),u}function tt(n,t){var i=g(r[e],r[s]-1),u,f,y,p,l,a=i!=r[e];if(i==n)return v(i,a,c,t);for(u=i.parentNode,f=v(u,c,c,t);u;){for(;i;)y=i.previousSibling,p=v(i,a,c,t),t!=h&&f.insertBefore(p,f.firstChild),a=o,i=y;if(u==n)return f;i=u.previousSibling,u=u.parentNode,l=v(u,c,c,t),t!=h&&l.appendChild(f),f=l}}function it(n,t){var i=g(r[u],r[f]),a=i!=r[u],e,s,y,p,l;if(i==n)return v(i,a,o,t);for(e=i.parentNode,s=v(e,c,o,t);e;){for(;i;)y=i.nextSibling,p=v(i,a,o,t),t!=h&&s.appendChild(p),a=o,i=y;if(e==n)return s;i=e.nextSibling,e=e.parentNode,l=v(e,c,o,t),t!=h&&l.appendChild(s),s=l}}function v(n,t,u,e){var a,y,p,o,v;return t?w(n,e):3==n.nodeType?(a=n.nodeValue,u?(o=r[f],y=a.substring(o),p=a.substring(0,o)):(o=r[s],y=a.substring(0,o),p=a.substring(o)),e!=l&&(n.nodeValue=p),e==h)?void 0:(v=i.clone(n,c),v.nodeValue=y,v):e!=h?i.clone(n,c):void 0}function w(n,t){return t!=h?t==l?i.clone(n,o):n:void n.parentNode.removeChild(n)}function ui(){return i.create("body",null,ot()).outerText}var r=this,p=i.doc,ii=0,l=1,h=2,o=!0,c=!1,f="startOffset",u="startContainer",e="endContainer",s="endOffset",ft=n.extend,a=i.nodeIndex;return ft(r,{startContainer:p,startOffset:0,endContainer:p,endOffset:0,collapsed:o,commonAncestorContainer:p,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,setStart:d,setEnd:k,setStartBefore:ut,setStartAfter:st,setEndBefore:ht,setEndAfter:rt,collapse:wt,selectNode:ti,selectNodeContents:ni,compareBoundaryPoints:ri,deleteContents:vt,extractContents:at,cloneContents:ot,insertNode:pt,surroundContents:yt,cloneRange:lt,toStringIE:ui}),r}return t.prototype.toString=function(){return this.toStringIE()},t}),i(c,[r],function(n){function l(n){var t;return t=document.createElement("div"),t.innerHTML=n,t.textContent||t.innerText||n}function o(n,i){var r,u,e,f={};if(n){for(n=n.split(","),i=i||10,r=0;r<n.length;r+=2)u=String.fromCharCode(parseInt(n[r],i)),t[u]||(e="&"+n[r+1]+";",f[u]=e,f[e]=u);return f}}var h=n.makeMap,u,t,e,f=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,r=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,a=/[<>&\"\']/g,c=/&(#x|#)?([\w]+);/g,s={128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"},i;return t={'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","&":"&amp;","`":"&#96;"},e={"&lt;":"<","&gt;":">","&amp;":"&","&quot;":'"',"&apos;":"'"},u=o("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32),i={encodeRaw:function(n,i){return n.replace(i?f:r,function(n){return t[n]||n})},encodeAllRaw:function(n){return(""+n).replace(a,function(n){return t[n]||n})},encodeNumeric:function(n,i){return n.replace(i?f:r,function(n){return n.length>1?"&#"+(1024*(n.charCodeAt(0)-55296)+(n.charCodeAt(1)-56320)+65536)+";":t[n]||"&#"+n.charCodeAt(0)+";"})},encodeNamed:function(n,i,e){return e=e||u,n.replace(i?f:r,function(n){return t[n]||e[n]||n})},getEncodeFunc:function(n,e){function c(n,i){return n.replace(i?f:r,function(n){return t[n]||e[n]||"&#"+n.charCodeAt(0)+";"||n})}function s(n,t){return i.encodeNamed(n,t,e)}return e=o(e)||u,n=h(n.replace(/\+/g,",")),n.named&&n.numeric?c:n.named?e?s:i.encodeNamed:n.numeric?i.encodeNumeric:i.encodeRaw},decode:function(n){return n.replace(c,function(n,t,i){return t?(i=parseInt(i,2===t.length?16:10),i>65535?(i-=65536,String.fromCharCode(55296+(i>>10),56320+(1023&i))):s[i]||String.fromCharCode(i)):e[n]||u[n]||l(n)})}}}),i(yu,[],function(){return function(n,t){function u(t){n.getElementsByTagName("head")[0].appendChild(t)}function f(t,f,o){function v(){for(var t=s.passed,n=t.length;n--;)t[n]();s.status=2,s.passed=[],s.failed=[]}function l(){for(var t=s.failed,n=t.length;n--;)t[n]();s.status=3,s.passed=[],s.failed=[]}function b(){var n=navigator.userAgent.match(/WebKit\/(\d*)/);return!!(n&&n[1]<536)}function y(n,t){n()||(+new Date-p<r?window.setTimeout(t,0):l())}function a(){y(function(){for(var r=n.styleSheets,t,u=r.length,i;u--;)if(t=r[u],i=t.ownerNode?t.ownerNode:t.owningElement,i&&i.id===h.id)return v(),!0},a)}function w(){y(function(){try{var n=c.sheet.cssRules;return v(),!!n}catch(t){}},w)}var h,c,p,s;if(i[t]?s=i[t]:(s={passed:[],failed:[]},i[t]=s),f&&s.passed.push(f),o&&s.failed.push(o),1!=s.status){if(2==s.status)return void v();if(3==s.status)return void l();if(s.status=1,h=n.createElement("link"),h.rel="stylesheet",h.type="text/css",h.id="u"+e++,h.async=!1,h.defer=!1,p=+new Date,"onload"in h&&!b())h.onload=a,h.onerror=l;else{if(navigator.userAgent.indexOf("Firefox")>0)return c=n.createElement("style"),c.textContent='@import "'+t+'"',w(),void u(c);a()}u(h),h.href=t}}var e=0,i={},r;t=t||{},r=t.maxLoadTime||5e3,this.load=f}}),i(o,[ii,ut,ei,k,s,oi,c,u,r,yu],function(n,i,r,u,f,e,o,s,h,c){function b(n,t){var i={},u=t.keep_values,r;return r={set:function(i,r,u){t.url_converter&&(r=t.url_converter.call(t.url_converter_scope||n,r,u,i[0])),i.attr("data-mce-"+u,r).attr(u,r)},get:function(n,t){return n.attr("data-mce-"+t)||n.attr(t)}},i={style:{set:function(n,t){return null!==t&&"object"==typeof t?void n.css(t):(u&&n.attr("data-mce-style",t),void n.attr("style",t))},get:function(t){var i=t.attr("data-mce-style")||t.attr("style");return i=n.serializeStyle(n.parseStyle(i),t[0].nodeName)}}},u&&(i.href=i.src=r),i}function l(n,t){var f=this,e;f.doc=n,f.win=window,f.files={},f.counter=0,f.stdMode=!a||n.documentMode>=8,f.boxModel=!a||"CSS1Compat"==n.compatMode||f.stdMode,f.styleSheetLoader=new c(n),f.boundEvents=[],f.settings=t=t||{},f.schema=t.schema,f.styles=new r({url_converter:t.url_converter,url_converter_scope:t.url_converter_scope},t.schema),f.fixDoc(n),f.events=t.ownEvents?new u(t.proxy):u.Event,f.attrHooks=b(f,t),e=t.schema?t.schema.getBlockElements():{},f.$=i.overrideDefaults(function(){return{context:n,element:f.getRoot()}}),f.isBlock=function(n){if(!n)return!1;var t=n.nodeType;return t?!(1!==t||!e[n.nodeName]):!!e[n]}}var v=h.each,y=h.is,k=h.grep,d=h.trim,a=s.ie,w=/^([a-z0-9],?)+$/i,p=/^[ \t\r\n]*$/;return l.prototype={$$:function(n){return"string"==typeof n&&(n=this.get(n)),this.$(n)},root:null,fixDoc:function(n){var i=this.settings,t;if(a&&i.schema){"abbr article aside audio canvas details figcaption figure footer header hgroup mark menu meter nav output progress section summary time video".replace(/\w+/g,function(t){n.createElement(t)});for(t in i.schema.getCustomElements())n.createElement(t)}},clone:function(n,t){var r=this,i,u;return!a||1!==n.nodeType||t?n.cloneNode(t):(u=r.doc,t?i.firstChild:(i=u.createElement(n.nodeName),v(r.getAttribs(n),function(t){r.setAttrib(i,t.nodeName,r.getAttrib(n,t.nodeName))}),i))},getRoot:function(){var n=this;return n.settings.root_element||n.doc.body},getViewPort:function(n){var i,t;return n=n?n:this.win,i=n.document,t=this.boxModel?i.documentElement:i.body,{x:n.pageXOffset||t.scrollLeft,y:n.pageYOffset||t.scrollTop,w:n.innerWidth||t.clientWidth,h:n.innerHeight||t.clientHeight}},getRect:function(n){var r=this,i,t;return n=r.get(n),i=r.getPos(n),t=r.getSize(n),{x:i.x,y:i.y,w:t.w,h:t.h}},getSize:function(n){var r=this,t,i;return n=r.get(n),t=r.getStyle(n,"width"),i=r.getStyle(n,"height"),-1===t.indexOf("px")&&(t=0),-1===i.indexOf("px")&&(i=0),{w:parseInt(t,10)||n.offsetWidth||n.clientWidth,h:parseInt(i,10)||n.offsetHeight||n.clientHeight}},getParent:function(n,t,i){return this.getParents(n,t,i,!1)},getParents:function(n,i,r,u){var f=this,o,e=[];for(n=f.get(n),u=u===t,r=r||("BODY"!=f.getRoot().nodeName?f.getRoot().parentNode:null),y(i,"string")&&(o=i,i="*"===i?function(n){return 1==n.nodeType}:function(n){return f.is(n,o)});n&&n!=r&&n.nodeType&&9!==n.nodeType;){if(!i||i(n)){if(!u)return n;e.push(n)}n=n.parentNode}return u?e:null},get:function(n){var t;return n&&this.doc&&"string"==typeof n&&(t=n,n=this.doc.getElementById(n),n&&n.id!==t)?this.doc.getElementsByName(t)[1]:n},getNext:function(n,t){return this._findSib(n,t,"nextSibling")},getPrev:function(n,t){return this._findSib(n,t,"previousSibling")},select:function(t,i){var r=this;return n(t,r.get(i)||r.settings.root_element||r.doc,[])},is:function(i,r){var f,u;if(i.length===t){if("*"===r)return 1==i.nodeType;if(w.test(r)){for(r=r.toLowerCase().split(/,/),i=i.nodeName.toLowerCase(),f=r.length-1;f>=0;f--)if(r[f]==i)return!0;return!1}}return i.nodeType&&1!=i.nodeType?!1:(u=i.nodeType?[i]:i,n(r,u[0].ownerDocument||u[0],null,u).length>0)},add:function(n,t,i,r,u){var f=this;return this.run(n,function(n){var e;return e=y(t,"string")?f.doc.createElement(t):t,f.setAttribs(e,i),r&&(r.nodeType?e.appendChild(r):f.setHTML(e,r)),u?e:n.appendChild(e)})},create:function(n,t,i){return this.add(this.doc.createElement(n),n,t,i,1)},createHTML:function(n,t,i){var u="",r;u+="<"+n;for(r in t)t.hasOwnProperty(r)&&null!==t[r]&&"undefined"!=typeof t[r]&&(u+=" "+r+'="'+this.encode(t[r])+'"');return"undefined"!=typeof i?u+">"+i+"</"+n+">":u+" />"},createFragment:function(n){var i,r,u=this.doc,t;for(t=u.createElement("div"),i=u.createDocumentFragment(),n&&(t.innerHTML=n);r=t.firstChild;)i.appendChild(r);return i},remove:function(n,t){return n=this.$$(n),t?n.each(function(){for(var n;n=this.firstChild;)3==n.nodeType&&0===n.data.length?this.removeChild(n):this.parentNode.insertBefore(n,this)}).remove():n.remove(),n.length>1?n.toArray():n[0]},setStyle:function(n,t,i){n=this.$$(n).css(t,i),this.settings.update_styles&&n.attr("data-mce-style",null)},getStyle:function(n,i,r){return n=this.$$(n),r?n.css(i):(i=i.replace(/-(\D)/g,function(n,t){return t.toUpperCase()}),"float"==i&&(i=a?"styleFloat":"cssFloat"),n[0]&&n[0].style?n[0].style[i]:t)},setStyles:function(n,t){n=this.$$(n).css(t),this.settings.update_styles&&n.attr("data-mce-style",null)},removeAllAttribs:function(n){return this.run(n,function(n){for(var i=n.attributes,t=i.length-1;t>=0;t--)n.removeAttributeNode(i.item(t))})},setAttrib:function(n,t,i){var u=this,e,r,f=u.settings;""===i&&(i=null),n=u.$$(n),e=n.attr(t),n.length&&(r=u.attrHooks[t],r&&r.set?r.set(n,i,t):n.attr(t,i),e!=i&&f.onSetAttrib&&f.onSetAttrib({attrElm:n,attrName:t,attrValue:i}))},setAttribs:function(n,t){var i=this;i.$$(n).each(function(n,r){v(t,function(n,t){i.setAttrib(r,t,n)})})},getAttrib:function(n,t,i){var f=this,u,r;return n=f.$$(n),n.length&&(u=f.attrHooks[t],r=u&&u.get?u.get(n,t):n.attr(t)),"undefined"==typeof r&&(r=i||""),r},getPos:function(n,t){var h=this,e=0,f=0,r,o=h.doc,u=o.body,s;if(n=h.get(n),t=t||u,n){if(t===u&&n.getBoundingClientRect&&"static"===i(u).css("position"))return s=n.getBoundingClientRect(),t=h.boxModel?o.documentElement:u,e=s.left+(o.documentElement.scrollLeft||u.scrollLeft)-t.clientLeft,f=s.top+(o.documentElement.scrollTop||u.scrollTop)-t.clientTop,{x:e,y:f};for(r=n;r&&r!=t&&r.nodeType;)e+=r.offsetLeft||0,f+=r.offsetTop||0,r=r.offsetParent;for(r=n.parentNode;r&&r!=t&&r.nodeType;)e-=r.scrollLeft||0,f-=r.scrollTop||0,r=r.parentNode}return{x:e,y:f}},parseStyle:function(n){return this.styles.parse(n)},serializeStyle:function(n,t){return this.styles.serialize(n,t)},addStyle:function(n){var f=this,r=f.doc,u,t,i;if(f!==l.DOM&&r===document){if(i=l.DOM.addedStyles,i=i||[],i[n])return;i[n]=!0,l.DOM.addedStyles=i}t=r.getElementById("mceDefaultStyles"),t||(t=r.createElement("style"),t.id="mceDefaultStyles",t.type="text/css",u=r.getElementsByTagName("head")[0],u.firstChild?u.insertBefore(t,u.firstChild):u.appendChild(t)),t.styleSheet?t.styleSheet.cssText+=n:t.appendChild(r.createTextNode(n))},loadCSS:function(n){var i=this,t=i.doc,r;return i!==l.DOM&&t===document?void l.DOM.loadCSS(n):(n||(n=""),r=t.getElementsByTagName("head")[0],void v(n.split(","),function(n){var u;i.files[n]||(i.files[n]=!0,u=i.create("link",{rel:"stylesheet",href:n}),a&&t.documentMode&&t.recalc&&(u.onload=function(){t.recalc&&t.recalc(),u.onload=null}),r.appendChild(u))}))},addClass:function(n,t){this.$$(n).addClass(t)},removeClass:function(n,t){this.toggleClass(n,t,!1)},hasClass:function(n,t){return this.$$(n).hasClass(t)},toggleClass:function(n,t,r){this.$$(n).toggleClass(t,r).each(function(){""===this.className&&i(this).attr("class",null)})},show:function(n){this.$$(n).show()},hide:function(n){this.$$(n).hide()},isHidden:function(n){return"none"==this.$$(n).css("display")},uniqueId:function(n){return(n?n:"mce_")+this.counter++},setHTML:function(n,t){n=this.$$(n),a?n.each(function(n,r){if(r.canHaveHTML!==!1){for(;r.firstChild;)r.removeChild(r.firstChild);try{r.innerHTML="<br>"+t,r.removeChild(r.firstChild)}catch(u){i("<div>").html("<br>"+t).contents().slice(1).appendTo(r)}return t}}):n.html(t)},getOuterHTML:function(n){return n=this.get(n),1==n.nodeType?n.outerHTML:i("<div>").append(i(n).clone()).html()},setOuterHTML:function(n,t){var r=this;r.$$(n).each(function(){try{this.outerHTML=t}catch(n){r.remove(i(this).html(t),!0)}})},decode:o.decode,encode:o.encodeAllRaw,insertAfter:function(n,t){return t=this.get(t),this.run(n,function(n){var r,i;return r=t.parentNode,i=t.nextSibling,i?r.insertBefore(n,i):r.appendChild(n),n})},replace:function(n,t,i){var r=this;return r.run(t,function(t){return y(t,"array")&&(n=n.cloneNode(!0)),i&&v(k(t.childNodes),function(t){n.appendChild(t)}),t.parentNode.replaceChild(n,t)})},rename:function(n,t){var i=this,r;return n.nodeName!=t.toUpperCase()&&(r=i.create(t),v(i.getAttribs(n),function(t){i.setAttrib(r,t.nodeName,i.getAttrib(n,t.nodeName))}),i.replace(r,n,1)),r||n},findCommonAncestor:function(n,t){for(var i=n,r;i;){for(r=t;r&&i!=r;)r=r.parentNode;if(i==r)break;i=i.parentNode}return!i&&n.ownerDocument?n.ownerDocument.documentElement:i},toHex:function(n){return this.styles.toHex(h.trim(n))},run:function(n,t,i){var u=this,r;return"string"==typeof n&&(n=u.get(n)),n?(i=i||this,n.nodeType||!n.length&&0!==n.length?t.call(i,n):(r=[],v(n,function(n,f){n&&("string"==typeof n&&(n=u.get(n)),r.push(t.call(i,n,f)))}),r)):!1},getAttribs:function(n){var t,i;return(n=this.get(n),!n)?[]:a?(t=[],"OBJECT"==n.nodeName)?n.attributes:("OPTION"===n.nodeName&&this.getAttrib(n,"selected")&&t.push({specified:1,nodeName:"selected"}),i=/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi,n.cloneNode(!1).outerHTML.replace(i,"").replace(/[\w:\-]+/gi,function(n){t.push({specified:1,nodeName:n})}),t):n.attributes},isEmpty:function(n,t){var e=this,o,u,r,h,i,s=0;if(n=n.firstChild){h=new f(n,n.parentNode),t=t||(e.schema?e.schema.getNonEmptyElements():null);do{if(r=n.nodeType,1===r){if(n.getAttribute("data-mce-bogus"))continue;if(i=n.nodeName.toLowerCase(),t&&t[i]){if("br"===i){s++;continue}return!1}for(u=e.getAttribs(n),o=u.length;o--;)if(i=u[o].nodeName,"name"===i||"data-mce-bookmark"===i)return!1}if(8==r||3===r&&!p.test(n.nodeValue))return!1}while(n=h.next())}return 1>=s},createRng:function(){var n=this.doc;return n.createRange?n.createRange():new e(this)},nodeIndex:function(n,t){var u=0,r,i;if(n)for(r=n.nodeType,n=n.previousSibling;n;n=n.previousSibling)i=n.nodeType,(!t||3!=i||i!=r&&n.nodeValue.length)&&(u++,r=i);return u},split:function(n,t,i){function e(n){function o(n){var i=n.previousSibling&&"SPAN"==n.previousSibling.nodeName,t=n.nextSibling&&"SPAN"==n.nextSibling.nodeName;return i&&t}var u,t=n.childNodes,i=n.nodeType,f;if(1!=i||"bookmark"!=n.getAttribute("data-mce-type")){for(u=t.length-1;u>=0;u--)e(t[u]);if(9!=i){if(3==i&&n.nodeValue.length>0){if(f=d(n.nodeValue).length,!r.isBlock(n.parentNode)||f>0||0===f&&o(n))return}else if(1==i&&(t=n.childNodes,1==t.length&&t[0]&&1==t[0].nodeType&&"bookmark"==t[0].getAttribute("data-mce-type")&&n.parentNode.insertBefore(t[0],n),t.length||/^(br|hr|input|img)$/i.test(n.nodeName)))return;r.remove(n)}return n}}var r=this,u=r.createRng(),o,s,f;if(n&&t)return u.setStart(n.parentNode,r.nodeIndex(n)),u.setEnd(t.parentNode,r.nodeIndex(t)),o=u.extractContents(),u=r.createRng(),u.setStart(t.parentNode,r.nodeIndex(t)+1),u.setEnd(n.parentNode,r.nodeIndex(n)+1),s=u.extractContents(),f=n.parentNode,f.insertBefore(e(o),n),i?f.replaceChild(i,t):f.insertBefore(t,n),f.insertBefore(e(s),n),r.remove(n),i||t},bind:function(n,t,i,r){var u=this,f;if(h.isArray(n)){for(f=n.length;f--;)n[f]=u.bind(n[f],t,i,r);return n}return!u.settings.collect||n!==u.doc&&n!==u.win||u.boundEvents.push([n,t,i,r]),u.events.bind(n,t,i,r||u)},unbind:function(n,t,i){var f=this,u,r;if(h.isArray(n)){for(u=n.length;u--;)n[u]=f.unbind(n[u],t,i);return n}if(f.boundEvents&&(n===f.doc||n===f.win))for(u=f.boundEvents.length;u--;)r=f.boundEvents[u],n!=r[0]||t&&t!=r[1]||i&&i!=r[2]||this.events.unbind(r[0],r[1],r[2]);return this.events.unbind(n,t,i)},fire:function(n,t,i){return this.events.fire(n,t,i)},getContentEditable:function(n){var t;return n&&1==n.nodeType?(t=n.getAttribute("data-mce-contenteditable"),t&&"inherit"!==t?t:"inherit"!==n.contentEditable?n.contentEditable:null):null},getContentEditableParent:function(n){for(var i=this.getRoot(),t=null;n&&n!==i&&(t=this.getContentEditable(n),null===t);n=n.parentNode);return t},destroy:function(){var t=this,r,i;if(t.boundEvents){for(r=t.boundEvents.length;r--;)i=t.boundEvents[r],this.events.unbind(i[0],i[1],i[2]);t.boundEvents=null}n.setDocument&&n.setDocument(),t.win=t.doc=t.root=t.events=t.frag=null},isChildOf:function(n,t){for(;n;){if(t===n)return!0;n=n.parentNode}return!1},dumpRng:function(n){return"startContainer: "+n.startContainer.nodeName+", startOffset: "+n.startOffset+", endContainer: "+n.endContainer.nodeName+", endOffset: "+n.endOffset},_findSib:function(n,t,i){var u=this,r=t;if(n)for("string"==typeof r&&(r=function(n){return u.is(n,t)}),n=n[i];n;n=n[i])if(r(n))return n;return null}},l.DOM=new l(document),l}),i(et,[o,r],function(n,t){function r(){function l(n,t){function u(){e.remove(r),i&&(i.onreadystatechange=i.onload=i=null),t()}function o(){"undefined"!=typeof console&&console.log&&console.log("Failed to load: "+n)}var e=f,i,r;r=e.uniqueId(),i=document.createElement("script"),i.id=r,i.type="text/javascript",i.src=n,"onreadystatechange"in i?i.onreadystatechange=function(){/loaded|complete/.test(i.readyState)&&u()}:i.onload=u,i.onerror=o,(document.getElementsByTagName("head")[0]||document.body).appendChild(i)}var a=0,h=1,r=2,n={},s=[],t={},e=[],o=0,c;this.isDone=function(t){return n[t]==r},this.markDone=function(t){n[t]=r},this.add=this.load=function(i,r,u){var f=n[i];f==c&&(s.push(i),n[i]=a),r&&(t[i]||(t[i]=[]),t[i].push({func:r,scope:u||this}))},this.loadQueue=function(n,t){this.loadScripts(s,n,t)},this.loadScripts=function(f,s,a){function y(n){i(t[n],function(n){n.func.call(n.scope)}),t[n]=c}var v;e.push({func:s,scope:a||this}),(v=function(){var t=u(f);f.length=0,i(t,function(t){return n[t]==r?void y(t):void(n[t]!=h&&(n[t]=h,o++,l(t,function(){n[t]=r,o--,y(t),v()})))}),o||(i(e,function(n){n.func.call(n.scope)}),e.length=0)})()}}var f=n.DOM,i=t.each,u=t.grep;return r.ScriptLoader=new r,r}),i(bt,[et,r],function(n,i){function r(){var n=this;n.items=[],n.urls={},n.lookup={}}var u=i.each;return r.prototype={get:function(n){return this.lookup[n]?this.lookup[n].instance:t},dependencies:function(n){var t;return this.lookup[n]&&(t=this.lookup[n].dependencies),t||[]},requireLangPack:function(t,i){var u=r.language;if(u&&r.languageLoad!==!1){if(i)if(i=","+i+",",-1!=i.indexOf(","+u.substr(0,2)+","))u=u.substr(0,2);else if(-1==i.indexOf(","+u+","))return;n.ScriptLoader.add(this.urls[t]+"/langs/"+u+".js")}},add:function(n,t,i){return this.items.push(t),this.lookup[n]={instance:t,dependencies:i},t},createUrl:function(n,t){return"object"==typeof t?t:{prefix:n.prefix,resource:t,suffix:n.suffix}},addComponents:function(t,i){var r=this.urls[t];u(i,function(t){n.ScriptLoader.add(r+"/"+t)})},load:function(i,f,e,o){function c(){var r=h.dependencies(i);u(r,function(n){var i=h.createUrl(f,n);h.load(i.resource,i,t,t)}),e&&e.call(o?o:n)}var h=this,s=f;h.urls[i]||("object"==typeof f&&(s=f.prefix+f.resource+f.suffix),0!==s.indexOf("/")&&-1==s.indexOf("://")&&(s=r.baseURL+"/"+s),h.urls[i]=s.substring(0,s.lastIndexOf("/")),h.lookup[i]?c():n.ScriptLoader.add(s,c,o))}},r.PluginManager=new r,r.ThemeManager=new r,r}),i(a,[r,s],function(n,t){function u(n,t){var i=n.childNodes;return t--,t>i.length-1?t=i.length-1:0>t&&(t=0),i[t]||n}function i(n){this.walk=function(t,i){function p(n){var t;return t=n[0],3===t.nodeType&&t===e&&d>=t.nodeValue.length&&n.splice(0,1),t=n[n.length-1],0===b&&n.length>0&&t===o&&3===t.nodeType&&n.splice(n.length-1,1),n}function k(n,t,i){for(var r=[];n&&n!=i;n=n[t])r.push(n);return r}function w(n,t){do{if(n.parentNode==t)return n;n=n.parentNode}while(n)}function a(n,t,r){var u=r?"nextSibling":"previousSibling";for(f=n,y=f.parentNode;f&&f!=t;f=y)y=f.parentNode,s=k(f==n?f:f[u],u),s.length&&(r||s.reverse(),i(p(s)))}var e=t.startContainer,d=t.startOffset,o=t.endContainer,b=t.endOffset,h,c,l,f,y,s,v;if(v=n.select("td.mce-item-selected,th.mce-item-selected"),v.length>0)return void r(v,function(n){i([n])});if(1==e.nodeType&&e.hasChildNodes()&&(e=e.childNodes[d]),1==o.nodeType&&o.hasChildNodes()&&(o=u(o,b)),e==o)return i(p([e]));for(h=n.findCommonAncestor(e,o),f=e;f;f=f.parentNode){if(f===o)return a(e,h,!0);if(f===h)break}for(f=o;f;f=f.parentNode){if(f===e)return a(o,h);if(f===h)break}c=w(e,h)||e,l=w(o,h)||o,a(e,c,!0),s=k(c==e?c:c.nextSibling,"nextSibling",l==o?l.nextSibling:l),s.length&&i(p(s)),a(o,l)},this.split=function(n){function f(n,t){return n.splitText(t)}var r=n.startContainer,i=n.startOffset,t=n.endContainer,u=n.endOffset;return r==t&&3==r.nodeType?i>0&&i<r.nodeValue.length&&(t=f(r,i),r=t.previousSibling,u>i?(u-=i,r=t=f(t,u).previousSibling,u=t.nodeValue.length,i=0):u=0):(3==r.nodeType&&i>0&&i<r.nodeValue.length&&(r=f(r,i),i=0),3==t.nodeType&&u>0&&u<t.nodeValue.length&&(t=f(t,u).previousSibling,u=t.nodeValue.length)),{startContainer:r,startOffset:i,endContainer:t,endOffset:u}},this.normalize=function(i){function f(f){function p(i,r){for(var u=new t(i,n.getParent(i.parentNode,n.isBlock)||l);i=u[r?"prev":"next"]();)if("BR"===i.nodeName)return!0}function w(n,t){return n.previousSibling&&n.previousSibling.nodeName==t}function a(i,f){var v,h,a;if(f=f||o,a=n.getParent(f.parentNode,n.isBlock)||l,i&&"BR"==f.nodeName&&y&&n.isEmpty(a))return o=f.parentNode,s=n.nodeIndex(f),void(r=!0);for(v=new t(f,a);e=v[i?"prev":"next"]();){if("false"===n.getContentEditableParent(e))return;if(3===e.nodeType&&e.nodeValue.length>0)return o=e,s=i?e.nodeValue.length:0,void(r=!0);if(n.isBlock(e)||c[e.nodeName.toLowerCase()])return;h=e}u&&h&&(o=h,r=!0,s=0)}var o,s,v,l=n.getRoot(),e,c,h,y;if(o=i[(f?"start":"end")+"Container"],s=i[(f?"start":"end")+"Offset"],y=1==o.nodeType&&s===o.childNodes.length,c=n.schema.getNonEmptyElements(),h=f,1==o.nodeType&&s>o.childNodes.length-1&&(h=!1),9===o.nodeType&&(o=n.getRoot(),s=0),o===l){if(h&&(e=o.childNodes[s>0?s-1:0],e&&(c[e.nodeName]||"TABLE"==e.nodeName)))return;if(o.hasChildNodes()&&(s=Math.min(!h&&s>0?s-1:s,o.childNodes.length-1),o=o.childNodes[s],s=0,o.hasChildNodes()&&!/TABLE/.test(o.nodeName))){e=o,v=new t(o,l);do{if(3===e.nodeType&&e.nodeValue.length>0){s=h?0:e.nodeValue.length,o=e,r=!0;break}if(c[e.nodeName.toLowerCase()]){s=n.nodeIndex(e),o=e.parentNode,"IMG"!=e.nodeName||h||s++,r=!0;break}}while(e=h?v.next():v.prev())}}u&&(3===o.nodeType&&0===s&&a(!0),1===o.nodeType&&(e=o.childNodes[s],e||(e=o.childNodes[s-1]),!e||"BR"!==e.nodeName||w(e,"A")||p(e)||p(e,!0)||a(!0,e))),h&&!u&&3===o.nodeType&&s===o.nodeValue.length&&a(!1),r&&i["set"+(f?"Start":"End")](o,s)}var r,u;return u=i.collapsed,f(!0),u||f(),r&&u&&i.collapse(!0),r}}var r=n.each;return i.compareRanges=function(n,t){if(n&&t){if(!n.item&&!n.duplicate)return n.startContainer==t.startContainer&&n.startOffset==t.startOffset;if(n.item&&t.item&&n.item(0)===t.item(0)||n.isEqual&&t.isEqual&&t.isEqual(n))return!0}return!1},i}),i(au,[a],function(n){return function(t){function u(n){var u,r;if(r=t.$(n).parentsUntil(t.getBody()).add(n),r.length===i.length){for(u=r.length;u>=0&&r[u]===i[u];u--);if(-1===u)return i=r,!0}return i=r,!1}var r,i=[];"onselectionchange"in t.getDoc()||t.on("NodeChange Click MouseUp KeyUp Focus",function(i){var u,f;u=t.selection.getRng(),f={startContainer:u.startContainer,startOffset:u.startOffset,endContainer:u.endContainer,endOffset:u.endOffset},"nodechange"!=i.type&&n.compareRanges(f,r)||t.fire("SelectionChange"),r=f}),t.on("contextmenu",function(){t.fire("SelectionChange")}),t.on("SelectionChange",function(){var n=t.selection.getStart(!0);t.selection.isCollapsed()||u(n)||!t.dom.isChildOf(n,t.getBody())||t.nodeChanged({selectionChange:!0})}),t.on("MouseUp",function(n){n.isDefaultPrevented()||setTimeout(function(){t.nodeChanged()},0)}),this.nodeChanged=function(n){var f=t.selection,i,u,r;t.initialized&&f&&!t.settings.disable_nodechange&&!t.settings.readonly&&(r=t.getBody(),i=f.getStart()||r,i=i.ownerDocument!=t.getDoc()?t.getBody():i,"IMG"==i.nodeName&&f.isCollapsed()&&(i=i.parentNode),u=[],t.dom.getParent(i,function(n){return n===r?!0:void u.push(n)}),n=n||{},n.element=i,n.parents=u,t.fire("NodeChange",n))}}}),i(y,[],function(){function t(n,t,i){var u,r,e=i?"lastChild":"firstChild",f=i?"prev":"next";if(n[e])return n[e];if(n!==t){if(u=n[f])return u;for(r=n.parent;r&&r!==t;r=r.parent)if(u=r[f])return u}}function n(n,t){this.name=n,this.type=t,1===t&&(this.attributes=[],this.attributes.map={})}var r=/^[ \t\r\n]*$/,i={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11};return n.prototype={replace:function(n){var t=this;return n.parent&&n.remove(),t.insert(n,t),t.remove(),t},attr:function(n,t){var u=this,i,r,f;if("string"!=typeof n){for(r in n)u.attr(r,n[r]);return u}if(i=u.attributes){if(t!==f){if(null===t){if(n in i.map)for(delete i.map[n],r=i.length;r--;)if(i[r].name===n)return i=i.splice(r,1),u;return u}if(n in i.map){for(r=i.length;r--;)if(i[r].name===n){i[r].value=t;break}}else i.push({name:n,value:t});return i.map[n]=t,u}return i.map[n]}},clone:function(){var r=this,u=new n(r.name,r.type),f,o,e,t,i;if(e=r.attributes){for(i=[],i.map={},f=0,o=e.length;o>f;f++)t=e[f],"id"!==t.name&&(i[i.length]={name:t.name,value:t.value},i.map[t.name]=t.value);u.attributes=i}return u.value=r.value,u.shortEnded=r.shortEnded,u},wrap:function(n){var t=this;return t.parent.insert(n,t),n.append(t),t},unwrap:function(){for(var t=this,i,n=t.firstChild;n;)i=n.next,t.insert(n,t,!0),n=i;t.remove()},remove:function(){var n=this,r=n.parent,i=n.next,t=n.prev;return r&&(r.firstChild===n?(r.firstChild=i,i&&(i.prev=null)):t.next=i,r.lastChild===n?(r.lastChild=t,t&&(t.next=null)):i.prev=t,n.parent=n.next=n.prev=null),n},append:function(n){var t=this,i;return n.parent&&n.remove(),i=t.lastChild,i?(i.next=n,n.prev=i,t.lastChild=n):t.lastChild=t.firstChild=n,n.parent=t,n},insert:function(n,t,i){var r;return n.parent&&n.remove(),r=t.parent||this,i?(t===r.firstChild?r.firstChild=n:t.prev.next=n,n.prev=t.prev,n.next=t,t.prev=n):(t===r.lastChild?r.lastChild=n:t.next.prev=n,n.next=t.next,n.prev=t,t.next=n),n.parent=r,n},getAll:function(n){for(var u=this,r=[],i=u.firstChild;i;i=t(i,u))i.name===n&&r.push(i);return r},empty:function(){var i=this,r,u,n;if(i.firstChild){for(r=[],n=i.firstChild;n;n=t(n,i))r.push(n);for(u=r.length;u--;)n=r[u],n.parent=n.firstChild=n.lastChild=n.next=n.prev=null}return i.firstChild=i.lastChild=null,i},isEmpty:function(n){var e=this,i=e.firstChild,f,u;if(i)do{if(1===i.type){if(i.attributes.map["data-mce-bogus"])continue;if(n[i.name])return!1;for(f=i.attributes.length;f--;)if(u=i.attributes[f].name,"name"===u||0===u.indexOf("data-mce-bookmark"))return!1}if(8===i.type||3===i.type&&!r.test(i.value))return!1}while(i=t(i,e));return!0},walk:function(n){return t(this,null,n)}},n.create=function(t,r){var f,u;if(f=new n(t,i[t]||1),r)for(u in r)f.attr(u,r[u]);return f},n}),i(l,[r],function(n){function t(n,t){return n?n.split(t||" "):[]}function h(n){function u(n,i,r){function h(n,t){for(var u={},i=0,r=n.length;r>i;i++)u[n[i]]=t||{};return u}var o,u,e,f=arguments;for(r=r||[],i=i||"","string"==typeof r&&(r=t(r)),u=3;u<f.length;u++)"string"==typeof f[u]&&(f[u]=t(f[u])),r.push.apply(r,f[u]);for(n=t(n),o=n.length;o--;)e=[].concat(l,t(i)),s[n[o]]={attributes:h(e),attributesOrder:e,children:h(r,c)}}function f(n,i){var f,u,r,e;for(n=t(n),f=n.length,i=t(i);f--;)for(u=s[n[f]],r=0,e=i.length;e>r;r++)u.attributes[i[r]]={},u.attributesOrder.push(i[r])}var s={},l,h,o,e,v,a;return r[n]?r[n]:(l=t("id accesskey class dir lang style tabindex title"),h=t("address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul"),o=t("a abbr b bdo br button cite code del dfn em embed i iframe img input ins kbd label map noscript object q s samp script select small span strong sub sup textarea u var #text #comment"),"html4"!=n&&(l.push.apply(l,t("contenteditable contextmenu draggable dropzone hidden spellcheck translate")),h.push.apply(h,t("article aside details dialog figure header footer hgroup section nav")),o.push.apply(o,t("audio canvas command datalist mark meter output progress time wbr video ruby bdi keygen"))),"html5-strict"!=n&&(l.push("xml:lang"),a=t("acronym applet basefont big font strike tt"),o.push.apply(o,a),i(a,function(n){u(n,"",o)}),v=t("center dir isindex noframes"),h.push.apply(h,v),e=[].concat(h,o),i(v,function(n){u(n,"",e)})),e=e||[].concat(h,o),u("html","manifest","head body"),u("head","","base command link meta noscript script style title"),u("title hr noscript br"),u("base","href target"),u("link","href rel media hreflang type sizes hreflang"),u("meta","name http-equiv content charset"),u("style","media type scoped"),u("script","src async defer type charset"),u("body","onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload",e),u("address dt dd div caption","",e),u("h1 h2 h3 h4 h5 h6 pre p abbr code var samp kbd sub sup i b u bdo span legend em strong small s cite dfn","",o),u("blockquote","cite",e),u("ol","reversed start type","li"),u("ul","","li"),u("li","value",e),u("dl","","dt dd"),u("a","href target rel media hreflang type",o),u("q","cite",o),u("ins del","cite datetime",e),u("img","src alt usemap ismap width height"),u("iframe","src name width height",e),u("embed","src type width height"),u("object","data type typemustmatch name usemap form width height",e,"param"),u("param","name value"),u("map","name",e,"area"),u("area","alt coords shape href target rel media hreflang type"),u("table","border","caption colgroup thead tfoot tbody tr"+("html4"==n?" col":"")),u("colgroup","span","col"),u("col","span"),u("tbody thead tfoot","","tr"),u("tr","","td th"),u("td","colspan rowspan headers",e),u("th","colspan rowspan headers scope abbr",e),u("form","accept-charset action autocomplete enctype method name novalidate target",e),u("fieldset","disabled form name",e,"legend"),u("label","form for",o),u("input","accept alt autocomplete checked dirname disabled form formaction formenctype formmethod formnovalidate formtarget height list max maxlength min multiple name pattern readonly required size src step type value width"),u("button","disabled form formaction formenctype formmethod formnovalidate formtarget name type value","html4"==n?e:o),u("select","disabled form multiple name required size","option optgroup"),u("optgroup","disabled label","option"),u("option","disabled label selected value"),u("textarea","cols dirname disabled form maxlength name readonly required rows wrap"),u("menu","type label",e,"li"),u("noscript","",e),"html4"!=n&&(u("wbr"),u("ruby","",o,"rt rp"),u("figcaption","",e),u("mark rt rp summary bdi","",o),u("canvas","width height",e),u("video","src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered",e,"track source"),u("audio","src crossorigin preload autoplay mediagroup loop muted controls buffered volume",e,"track source"),u("source","src type media"),u("track","kind src srclang label default"),u("datalist","",o,"option"),u("article section nav aside header footer","",e),u("hgroup","","h1 h2 h3 h4 h5 h6"),u("figure","",e,"figcaption"),u("time","datetime",o),u("dialog","open",e),u("command","type label icon disabled checked radiogroup command"),u("output","for form name",o),u("progress","value max",o),u("meter","value min max low high optimum",o),u("details","open",e,"summary"),u("keygen","autofocus challenge disabled form keytype name")),"html5-strict"!=n&&(f("script","language xml:space"),f("style","xml:space"),f("object","declare classid code codebase codetype archive standby align border hspace vspace"),f("embed","align name hspace vspace"),f("param","valuetype type"),f("a","charset name rev shape coords"),f("br","clear"),f("applet","codebase archive code object alt name width height align hspace vspace"),f("img","name longdesc align border hspace vspace"),f("iframe","longdesc frameborder marginwidth marginheight scrolling align"),f("font basefont","size color face"),f("input","usemap align"),f("select","onchange"),f("textarea"),f("h1 h2 h3 h4 h5 h6 div p legend caption","align"),f("ul","type compact"),f("li","type"),f("ol dl menu dir","compact"),f("pre","width xml:space"),f("hr","align noshade size width"),f("isindex","prompt"),f("table","summary width frame rules cellspacing cellpadding align bgcolor"),f("col","width align char charoff valign"),f("colgroup","width align char charoff valign"),f("thead","align char charoff valign"),f("tr","align char charoff valign bgcolor"),f("th","axis align char charoff valign nowrap bgcolor width height"),f("form","accept"),f("td","abbr axis scope align char charoff valign nowrap bgcolor width height"),f("tfoot","align char charoff valign"),f("tbody","align char charoff valign"),f("area","nohref"),f("body","background bgcolor text link vlink alink")),"html4"!=n&&(f("input button select textarea","autofocus"),f("input textarea","placeholder"),f("a","download"),f("link script img","crossorigin"),f("iframe","sandbox seamless allowfullscreen")),i(t("a form meter progress dfn"),function(n){s[n]&&delete s[n].children[n]}),delete s.caption.children.table,r[n]=s,s)}function e(n,t){var r;return n&&(r={},"string"==typeof n&&(n={"*":n}),i(n,function(n,i){r[i]="map"==t?u(n,/[, ]/):o(n,/[, ]/)})),r}var r={},c={},u=n.makeMap,i=n.each,f=n.extend,o=n.explode,s=n.inArray;return function(n){function v(t,i,e){var o=n[t];return o?o=u(o,/[, ]/,u(o.toUpperCase(),/[, ]/)):(o=r[t],o||(o=u(i," ",u(i.toUpperCase()," ")),o=f(o,e),r[t]=o)),o}function ht(n){return new RegExp("^"+n.replace(/([?+*])/g,".$1")+"$")}function w(n){var b,rt,k,ut,r,i,h,p,w,f,nt,c,e,o,tt,v,g,d,a,ft=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)\])?$/,et=/^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,it=/[*?+]/;if(n)for(n=t(n,","),l["@"]&&(v=l["@"].attributes,g=l["@"].attributesOrder),b=0,rt=n.length;rt>b;b++)if(r=ft.exec(n[b])){if(o=r[1],w=r[2],tt=r[3],p=r[5],c={},e=[],i={attributes:c,attributesOrder:e},"#"===o&&(i.paddEmpty=!0),"-"===o&&(i.removeEmpty=!0),"!"===r[4]&&(i.removeEmptyAttrs=!0),v){for(d in v)c[d]=v[d];e.push.apply(e,g)}if(p)for(p=t(p,"|"),k=0,ut=p.length;ut>k;k++)if(r=et.exec(p[k])){if(h={},nt=r[1],f=r[2].replace(/::/g,":"),o=r[3],a=r[4],"!"===nt&&(i.attributesRequired=i.attributesRequired||[],i.attributesRequired.push(f),h.required=!0),"-"===nt){delete c[f],e.splice(s(e,f),1);continue}o&&("="===o&&(i.attributesDefault=i.attributesDefault||[],i.attributesDefault.push({name:f,value:a}),h.defaultValue=a),":"===o&&(i.attributesForced=i.attributesForced||[],i.attributesForced.push({name:f,value:a}),h.forcedValue=a),"<"===o&&(h.validValues=u(a,"?"))),it.test(f)?(i.attributePatterns=i.attributePatterns||[],h.pattern=ht(f),i.attributePatterns.push(h)):(c[f]||e.push(f),c[f]=h)}v||"@"!=w||(v=c,g=e),tt&&(i.outputName=w,l[tt]=i),it.test(w)?(i.pattern=ht(w),y.push(i)):l[w]=i}}function st(n){l={},y=[],w(n),i(b,function(n,t){a[t]=n.children})}function ot(n){var u=/^(~)?(.+)$/;n&&(r.text_block_elements=r.block_elements=null,i(t(n,","),function(n){var s=u.exec(n),o="~"===s[1],e=o?"span":"div",t=s[2],r;(a[t]=a[e],rt[t]=e,o||(p[t.toUpperCase()]={},p[t]={}),l[t])||(r=l[e],r=f({},r),delete r.removeEmptyAttrs,delete r.removeEmpty,l[t]=r),i(a,function(n,i){n[e]&&(a[i]=n=f({},a[i]),n[t]=n[e])})}))}function d(n){var r=/^([+\-]?)(\w+)\[([^\]]+)\]$/;n&&i(t(n,","),function(n){var u=r.exec(n),e,o;u&&(o=u[1],e=o?a[u[2]]:a[u[2]]={"#comment":{}},e=a[u[2]],i(t(u[3],"|"),function(n){"-"===o?(a[u[2]]=e=f({},a[u[2]]),delete e[n]):e[n]={}}))})}function g(n){var t=l[n],i;if(t)return t;for(i=y.length;i--;)if(t=y[i],t.pattern.test(n))return t}var c=this,l={},a={},y=[],ct,vt,b,at,lt,nt,et,tt,p,ut,k,ft,rt={},it={};n=n||{},b=h(n.schema),n.verify_html===!1&&(n.valid_elements="*[*]"),ct=e(n.valid_styles),vt=e(n.invalid_styles,"map"),tt=e(n.valid_classes,"map"),at=v("whitespace_elements","pre script noscript style textarea video audio iframe object"),lt=v("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),nt=v("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),et=v("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls"),ut=v("non_empty_elements","td th iframe video audio object script",nt),k=v("text_block_elements","h1 h2 h3 h4 h5 h6 p div address pre form blockquote center dir fieldset header footer article section hgroup aside nav figure"),p=v("block_elements","hr table tbody thead tfoot th tr td li ol ul caption dl dt dd noscript menu isindex option datalist select optgroup",k),ft=v("text_inline_elements","span strong b em i font strike u var cite dfn code mark q sup sub samp"),i((n.special||"script noscript style textarea").split(" "),function(n){it[n]=new RegExp("</"+n+"[^>]*>","gi")}),n.valid_elements?st(n.valid_elements):(i(b,function(n,t){l[t]={attributes:n.attributes,attributesOrder:n.attributesOrder},a[t]=n.children}),"html5"!=n.schema&&i(t("strong/b em/i"),function(n){n=t(n,"/"),l[n[1]].outputName=n[0]}),l.img.attributesDefault=[{name:"alt",value:""}],i(t("ol ul sub sup blockquote span font a table tbody tr strong em b i"),function(n){l[n]&&(l[n].removeEmpty=!0)}),i(t("p h1 h2 h3 h4 h5 h6 th td pre div address caption"),function(n){l[n].paddEmpty=!0}),i(t("span"),function(n){l[n].removeEmptyAttrs=!0})),ot(n.custom_elements),d(n.valid_children),w(n.extended_valid_elements),d("+ol[ul|ol],+ul[ul|ol]"),n.invalid_elements&&i(o(n.invalid_elements),function(n){l[n]&&delete l[n]}),g("span")||w("span[!data-mce-type|*]"),c.children=a,c.getValidStyles=function(){return ct},c.getInvalidStyles=function(){return vt},c.getValidClasses=function(){return tt},c.getBoolAttrs=function(){return et},c.getBlockElements=function(){return p},c.getTextBlockElements=function(){return k},c.getTextInlineElements=function(){return ft},c.getShortEndedElements=function(){return nt},c.getSelfClosingElements=function(){return lt},c.getNonEmptyElements=function(){return ut},c.getWhiteSpaceElements=function(){return at},c.getSpecialElements=function(){return it},c.isValidChild=function(n,t){var i=a[n];return!(!i||!i[t])},c.isValid=function(n,t){var u,r,i=g(n);if(i){if(!t||i.attributes[t])return!0;if(u=i.attributePatterns)for(r=u.length;r--;)if(u[r].pattern.test(n))return!0}return!1},c.getElementRule=g,c.getCustomElements=function(){return rt},c.addValidElements=w,c.setValidElements=st,c.addCustomElements=ot,c.addValidChildren=d,c.elements=l}}),i(ni,[l,c,r],function(n,t,i){function u(n,t,i){var f=1,e,r,u,o;for(o=n.getShortEndedElements(),u=/<([!?\/])?([A-Za-z0-9\-_\:\.]+)((?:\s+[^"\'>]+(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>]*))*|\/|\s+)>/g,u.lastIndex=e=i;r=u.exec(t);){if(e=u.lastIndex,"/"===r[1])f--;else if(!r[1]){if(r[2]in o)continue;f++}if(0===f)break}return e}function r(r,e){function s(){}var o=this;r=r||{},o.schema=e=e||new n,r.fix_self_closing!==!1&&(r.fix_self_closing=!0),f("comment cdata text start end pi doctype".split(" "),function(n){n&&(o[n]=r[n]||s)}),o.parse=function(n){function vt(n){for(var i,t=a.length;t--&&a[t].name!==n;);if(t>=0){for(i=a.length-1;i>=t;i--)n=a[i],n.valid&&l.end(n.name);a.length=t}}function ti(n,t,i,u,f){var o,h,c=/[\s\u0000-\u001F]+/g,e;if(t=t.toLowerCase(),i=t in pt?t:st(i||u||f||""),g&&!ft&&0!==t.indexOf("data-")){if(o=wt[t],!o&&rt){for(h=rt.length;h--&&(o=rt[h],!o.pattern.test(t)););-1===h&&(o=null)}if(!o)return;if(o.validValues&&!(i in o.validValues))return}if(ii[t]&&!r.allow_script_urls){e=i.replace(c,"");try{e=decodeURIComponent(e)}catch(l){e=unescape(e)}if(gt.test(e))return;if(!r.allow_html_data_urls&&ni.test(e)&&!/^data:image\//i.test(e))return}s.map[t]=i,s.push({name:t,value:i})}for(var l=this,o,h=0,f,ot,a=[],s,c,ut,b,ft,et,w,v,p,k,wt,rt,tt,it,nt,kt,y,at=0,st=t.decode,ii=i.makeMap("src,href,data,background,formaction,poster"),gt=/((java|vb)script|mhtml):/i,ni=/^data:/i,d=new RegExp("<(?:(?:!--([\\w\\W]*?)-->)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([^>]+)>)|(?:([A-Za-z0-9\\-_\\:\\.]+)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/|\\s+)>))","g"),ht=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g,yt=e.getShortEndedElements(),bt=r.self_closing_elements||e.getSelfClosingElements(),pt=e.getBoolAttrs(),g=r.validate,dt=r.remove_internals,ct=r.fix_self_closing,lt=e.getSpecialElements();o=d.exec(n);){if(h<o.index&&l.text(st(n.substr(h,o.index-h))),f=o[6])f=f.toLowerCase(),":"===f.charAt(0)&&(f=f.substr(1)),vt(f);else if(f=o[7]){if(f=f.toLowerCase(),":"===f.charAt(0)&&(f=f.substr(1)),et=f in yt,ct&&bt[f]&&a.length>0&&a[a.length-1].name===f&&vt(f),!g||(w=e.getElementRule(f))){if(v=!0,g&&(wt=w.attributes,rt=w.attributePatterns),(k=o[8])?(ft=-1!==k.indexOf("data-mce-type"),ft&&dt&&(v=!1),s=[],s.map={},k.replace(ht,ti)):(s=[],s.map={}),g&&!ft){if(tt=w.attributesRequired,it=w.attributesDefault,nt=w.attributesForced,kt=w.removeEmptyAttrs,kt&&!s.length&&(v=!1),nt)for(c=nt.length;c--;)p=nt[c],b=p.name,y=p.value,"{$uid}"===y&&(y="mce_"+at++),s.map[b]=y,s.push({name:b,value:y});if(it)for(c=it.length;c--;)p=it[c],b=p.name,b in s.map||(y=p.value,"{$uid}"===y&&(y="mce_"+at++),s.map[b]=y,s.push({name:b,value:y}));if(tt){for(c=tt.length;c--&&!(tt[c]in s.map););-1===c&&(v=!1)}if(p=s.map["data-mce-bogus"]){if("all"===p){h=u(e,n,d.lastIndex),d.lastIndex=h;continue}v=!1}}v&&l.start(f,s,et)}else v=!1;if(ot=lt[f]){ot.lastIndex=h=o.index+o[0].length,(o=ot.exec(n))?(v&&(ut=n.substr(h,o.index-h)),h=o.index+o[0].length):(ut=n.substr(h),h=n.length),v&&(ut.length>0&&l.text(ut,!0),l.end(f)),d.lastIndex=h;continue}et||(k&&k.indexOf("/")==k.length-1?v&&l.end(f):a.push({name:f,valid:v}))}else(f=o[1])?(">"===f.charAt(0)&&(f=" "+f),r.allow_conditional_comments||"[if"!==f.substr(0,3)||(f=" "+f),l.comment(f)):(f=o[2])?l.cdata(f):(f=o[3])?l.doctype(f):(f=o[4])&&l.pi(f,o[5]);h=o.index+o[0].length}for(h<n.length&&l.text(st(n.substr(h))),c=a.length-1;c>=0;c--)f=a[c],f.valid&&l.end(f.name)}}var f=i.each;return r.findEndTag=u,r}),i(kt,[y,l,ni,r],function(n,t,i,r){var e=r.makeMap,o=r.each,u=r.explode,f=r.extend;return function(r,s){function y(t){for(var i,u,f,y,a,l,c,o,r,b,k=e("tr,td,th,tbody,thead,tfoot,table"),w=s.getNonEmptyElements(),p=s.getTextBlockElements(),v=0;v<t.length;v++)if(i=t[v],i.parent&&!i.fixed)if(p[i.name]&&"li"==i.parent.name){for(r=i.next;r&&p[r.name];)r.name="li",r.fixed=!0,i.parent.insert(r,i.parent),r=r.next;i.unwrap(i)}else{for(f=[i],u=i.parent;u&&!s.isValidChild(u.name,i.name)&&!k[u.name];u=u.parent)f.push(u);if(u&&f.length>1){for(f.reverse(),y=a=h.filterNode(f[0].clone()),o=0;o<f.length-1;o++){for(s.isValidChild(a.name,f[o].name)?(l=h.filterNode(f[o].clone()),a.append(l)):l=a,c=f[o].firstChild;c&&c!=f[o+1];)b=c.next,l.append(c),c=b;a=l}y.isEmpty(w)?u.insert(i,f[0],!0):(u.insert(y,f[0],!0),u.insert(i,y)),u=f[0],(u.isEmpty(w)||u.firstChild===u.lastChild&&"br"===u.firstChild.name)&&u.empty().remove()}else if(i.parent){if("li"===i.name){if(r=i.prev,r&&("ul"===r.name||"ul"===r.name)){r.append(i);continue}if(r=i.next,r&&("ul"===r.name||"ul"===r.name)){r.insert(i,r.firstChild,!0);continue}i.wrap(h.filterNode(new n("ul",1)));continue}s.isValidChild(i.parent.name,"div")&&s.isValidChild("div",i.name)?i.wrap(h.filterNode(new n("div",1))):"style"===i.name||"script"===i.name?i.empty().remove():i.unwrap()}}}var h=this,v={},c=[],l={},a={};r=r||{},r.validate="validate"in r?r.validate:!0,r.root_name=r.root_name||"body",h.schema=s=s||new t,h.filterNode=function(n){var r,t,i;for((t in v)&&(i=l[t],i?i.push(n):l[t]=[n]),r=c.length;r--;)t=c[r].name,t in n.attributes.map&&(i=a[t],i?i.push(n):a[t]=[n]);return n},h.addNodeFilter=function(n,t){o(u(n),function(n){var i=v[n];i||(v[n]=i=[]),i.push(t)})},h.addAttributeFilter=function(n,t){o(u(n),function(n){for(var i=0;i<c.length;i++)if(c[i].name===n)return void c[i].callbacks.push(t);c.push({name:n,callbacks:[t]})})},h.parse=function(t,u){function wt(){function i(t){t&&(n=t.firstChild,n&&3==n.type&&(n.value=n.value.replace(it,"")),n=t.lastChild,n&&3==n.type&&(n.value=n.value.replace(ut,"")))}var n=d.firstChild,u,t;if(s.isValidChild(d.name,et.toLowerCase())){for(;n;)u=n.next,3==n.type||1==n.type&&"p"!==n.name&&!g[n.name]&&!n.attr("data-mce-type")?t?t.append(n):(t=k(et,1),t.attr(r.forced_root_block_attrs),d.insert(t,n),t.append(n)):(i(t),t=null),n=u;i(t)}}function k(t,i){var u=new n(t,i),r;return t in v&&(r=l[t],r?r.push(u):l[t]=[u]),u}function ot(n){for(var i,r,t=n.prev;t&&3===t.type;)i=t.value.replace(ut,""),i.length>0?(t.value=i,t=t.prev):(r=t.prev,t.remove(),t=r)}function bt(n){var t,i={};for(t in n)"li"!==t&&"p"!=t&&(i[t]=n[t]);return i}var vt,d,o,w,b,ft,p,yt,h,rt,tt,g,it,lt=[],nt,ut,pt,ht,st,ct,at,et;if(u=u||{},l={},a={},g=f(e("script,style,head,html,body,title,meta,param"),s.getBlockElements()),at=s.getNonEmptyElements(),ct=s.children,tt=r.validate,et="forced_root_block"in u?u.forced_root_block:r.forced_root_block,st=s.getWhiteSpaceElements(),it=/^[ \t\r\n]+/,ut=/[ \t\r\n]+$/,pt=/[ \t\r\n]+/g,ht=/^[ \t\r\n]+$/,vt=new i({validate:tt,allow_script_urls:r.allow_script_urls,allow_conditional_comments:r.allow_conditional_comments,self_closing_elements:bt(s.getSelfClosingElements()),cdata:function(n){o.append(k("#cdata",4)).value=n},text:function(n,t){var i;nt||(n=n.replace(pt," "),o.lastChild&&g[o.lastChild.name]&&(n=n.replace(it,""))),0!==n.length&&(i=k("#text",3),i.raw=!!t,o.append(i).value=n)},comment:function(n){o.append(k("#comment",8)).value=n},pi:function(n,t){o.append(k(n,7)).value=t,ot(o)},doctype:function(n){var t;t=o.append(k("#doctype",10)),t.value=n,ot(o)},start:function(n,t,i){var r,e,l,u,f;if(l=tt?s.getElementRule(n):{}){for(r=k(l.outputName||n,1),r.attributes=t,r.shortEnded=i,o.append(r),f=ct[o.name],f&&ct[r.name]&&!f[r.name]&&lt.push(r),e=c.length;e--;)u=c[e].name,u in t.map&&(h=a[u],h?h.push(r):a[u]=[r]);g[n]&&ot(r),i||(o=r),!nt&&st[n]&&(nt=!0)}},end:function(t){var i,f,r,u,e;if(f=tt?s.getElementRule(t):{}){if(g[t]&&!nt){if(i=o.firstChild,i&&3===i.type)if(r=i.value.replace(it,""),r.length>0)i.value=r,i=i.next;else for(u=i.next,i.remove(),i=u;i&&3===i.type;)r=i.value,u=i.next,(0===r.length||ht.test(r))&&(i.remove(),i=u),i=u;if(i=o.lastChild,i&&3===i.type)if(r=i.value.replace(ut,""),r.length>0)i.value=r,i=i.prev;else for(u=i.prev,i.remove(),i=u;i&&3===i.type;)r=i.value,u=i.prev,(0===r.length||ht.test(r))&&(i.remove(),i=u),i=u}if(nt&&st[t]&&(nt=!1),(f.removeEmpty||f.paddEmpty)&&o.isEmpty(at))if(f.paddEmpty)o.empty().append(new n("#text","3")).value=" ";else if(!o.attributes.map.name&&!o.attributes.map.id)return e=o.parent,g[o.name]?o.empty().remove():o.unwrap(),void(o=e);o=o.parent}}},s),d=o=new n(u.context||r.root_name,11),vt.parse(t),tt&&lt.length&&(u.context?u.invalid=!0:y(lt)),et&&("body"==d.name||u.isRootContent)&&wt(),!u.invalid){for(rt in l){for(h=v[rt],w=l[rt],p=w.length;p--;)w[p].parent||w.splice(p,1);for(b=0,ft=h.length;ft>b;b++)h[b](w,rt,u)}for(b=0,ft=c.length;ft>b;b++)if(h=c[b],h.name in a){for(w=a[h.name],p=w.length;p--;)w[p].parent||w.splice(p,1);for(p=0,yt=h.callbacks.length;yt>p;p++)h.callbacks[p](w,h.name,u)}}return d},r.remove_trailing_brs&&h.addNodeFilter("br",function(t){var h,y=t.length,r,l=f({},s.getBlockElements()),v=s.getNonEmptyElements(),i,e,u,c,o,a;for(l.body=1,h=0;y>h;h++)if(r=t[h],i=r.parent,l[r.parent.name]&&r===i.lastChild){for(u=r.prev;u;){if(c=u.name,"span"!==c||"bookmark"!==u.attr("data-mce-type")){if("br"!==c)break;if("br"===c){r=null;break}}u=u.prev}r&&(r.remove(),i.isEmpty(v)&&(o=s.getElementRule(i.name),o&&(o.removeEmpty?i.remove():o.paddEmpty&&(i.empty().append(new n("#text",3)).value=" "))))}else{for(e=r;i&&i.firstChild===e&&i.lastChild===e&&(e=i,!l[i.name]);)i=i.parent;e===i&&(a=new n("#text",3),a.value=" ",r.replace(a))}}),r.allow_html_in_named_anchor||h.addAttributeFilter("id,name",function(n){for(var r=n.length,i,f,u,t;r--;)if(t=n[r],"a"===t.name&&t.firstChild&&!t.attr("href")){u=t.parent,i=t.lastChild;do f=i.prev,u.insert(i,t),i=f;while(i)}}),r.validate&&s.getValidClasses()&&h.addAttributeFilter("class",function(n){for(var c=n.length,e,o,u,f,t,h=s.getValidClasses(),i,r;c--;){for(e=n[c],o=e.attr("class").split(" "),t="",u=0;u<o.length;u++)f=o[u],r=!1,i=h["*"],i&&i[f]&&(r=!0),i=h[e.name],r||!i||i[f]||(r=!0),r&&(t&&(t+=" "),t+=f);t.length||(t=null),e.attr("class",t)}})}}),i(er,[c,r],function(n,t){var i=t.makeMap;return function(t){var r=[],u,s,e,f,o;return t=t||{},u=t.indent,s=i(t.indent_before||""),e=i(t.indent_after||""),f=n.getEncodeFunc(t.entity_encoding||"raw",t.entities),o="html"==t.element_format,{start:function(n,t,i){var c,a,l,h;if(u&&s[n]&&r.length>0&&(h=r[r.length-1],h.length>0&&"\n"!==h&&r.push("\n")),r.push("<",n),t)for(c=0,a=t.length;a>c;c++)l=t[c],r.push(" ",l.name,'="',f(l.value,!0),'"');r[r.length]=!i||o?">":" />",i&&u&&e[n]&&r.length>0&&(h=r[r.length-1],h.length>0&&"\n"!==h&&r.push("\n"))},end:function(n){var t;r.push("</",n,">"),u&&e[n]&&r.length>0&&(t=r[r.length-1],t.length>0&&"\n"!==t&&r.push("\n"))},text:function(n,t){n.length>0&&(r[r.length]=t?n:f(n))},cdata:function(n){r.push("<![CDATA[",n,"]\]>")},comment:function(n){r.push("<!--",n,"-->")},pi:function(n,t){t?r.push("<?",n," ",t,"?>"):r.push("<?",n,"?>"),u&&r.push("\n")},doctype:function(n){r.push("<!DOCTYPE",n,">",u?"\n":"")},reset:function(){r.length=0},getContent:function(){return r.join("").replace(/\n$/,"")}}}}),i(g,[er,l],function(n,t){return function(i,r){var f=this,u=new n(i);i=i||{},i.validate="validate"in i?i.validate:!0,f.schema=r=r||new t,f.writer=u,f.serialize=function(n){function f(n){var p=t[n.type],y,v,i,o,c,h,s,l,a;if(p)p(n);else{if(y=n.name,v=n.shortEnded,i=n.attributes,e&&i&&i.length>1){for(h=[],h.map={},a=r.getElementRule(n.name),s=0,l=a.attributesOrder.length;l>s;s++)o=a.attributesOrder[s],o in i.map&&(c=i.map[o],h.map[o]=c,h.push({name:o,value:c}));for(s=0,l=i.length;l>s;s++)o=i[s].name,o in h.map||(c=i.map[o],h.map[o]=c,h.push({name:o,value:c}));i=h}if(u.start(n.name,i,v),!v){if(n=n.firstChild)do f(n);while(n=n.next);u.end(y)}}}var t,e;return e=i.validate,t={3:function(n){u.text(n.value,n.raw)},8:function(n){u.comment(n.value)},7:function(n){u.pi(n.name,n.value)},10:function(n){u.doctype(n.value)},4:function(n){u.cdata(n.value)},11:function(n){if(n=n.firstChild)do f(n);while(n=n.next)}},u.reset(),1!=n.type||i.inner?t[11](n):f(n),u.getContent()}}}),i(ir,[o,kt,c,g,y,l,u,r],function(n,t,i,r,u,f,e,o){var c=o.each,h=o.trim,s=n.DOM;return function(n,u){var l,a,o;return u&&(l=u.dom,a=u.schema),l=l||s,a=a||new f(n),n.entity_encoding=n.entity_encoding||"named",n.remove_trailing_brs="remove_trailing_brs"in n?n.remove_trailing_brs:!0,o=new t(n,a),o.addAttributeFilter("data-mce-tabindex",function(n,t){for(var r=n.length,i;r--;)i=n[r],i.attr("tabindex",i.attributes.map["data-mce-tabindex"]),i.attr(t,null)}),o.addAttributeFilter("src,href,style",function(t,i){for(var o=t.length,u,r,e="data-mce-"+i,f=n.url_converter,h=n.url_converter_scope,s;o--;)u=t[o],r=u.attributes.map[e],r!==s?(u.attr(i,r.length>0?r:null),u.attr(e,null)):(r=u.attributes.map[i],"style"===i?r=l.serializeStyle(l.parseStyle(r),u.name):f&&(r=f.call(h,r,i,u.name)),u.attr(i,r.length>0?r:null))}),o.addAttributeFilter("class",function(n){for(var r=n.length,i,t;r--;)i=n[r],t=i.attr("class"),t&&(t=i.attr("class").replace(/(?:^|\s)mce-item-\w+(?!\S)/g,""),i.attr("class",t.length>0?t:null))}),o.addAttributeFilter("data-mce-type",function(n,t,i){for(var u=n.length,r;u--;)r=n[u],"bookmark"!==r.attributes.map["data-mce-type"]||i.cleanup||r.remove()}),o.addNodeFilter("noscript",function(n){for(var r=n.length,t;r--;)t=n[r].firstChild,t&&(t.value=i.decode(t.value))}),o.addNodeFilter("script,style",function(n,t){function e(n){return n.replace(/(<!--\[CDATA\[|\]\]-->)/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*((<!--)?(\s*\/\/)?\s*<!\[CDATA\[|(<!--\s*)?\/\*\s*<!\[CDATA\[\s*\*\/|(\/\/)?\s*<!--|\/\*\s*<!--\s*\*\/)\s*[\r\n]*/gi,"").replace(/\s*(\/\*\s*\]\]>\s*\*\/(-->)?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")}for(var f=n.length,i,r,u;f--;)i=n[f],r=i.firstChild?i.firstChild.value:"","script"===t?(u=i.attr("type"),u&&i.attr("type","mce-no/type"==u?null:u.replace(/^mce\-/,"")),r.length>0&&(i.firstChild.value="// <![CDATA[\n"+e(r)+"\n// ]\]>")):r.length>0&&(i.firstChild.value="<!--\n"+e(r)+"\n-->")}),o.addNodeFilter("#comment",function(n){for(var i=n.length,t;i--;)t=n[i],0===t.value.indexOf("[CDATA[")?(t.name="#cdata",t.type=4,t.value=t.value.replace(/^\[CDATA\[|\]\]$/g,"")):0===t.value.indexOf("mce:protected ")&&(t.name="#text",t.type=3,t.raw=!0,t.value=unescape(t.value).substr(14))}),o.addNodeFilter("xml:namespace,input",function(n,t){for(var r=n.length,i;r--;)i=n[r],7===i.type?i.remove():1===i.type&&("input"!==t||"type"in i.attributes.map||i.attr("type","text"))}),n.fix_list_elements&&o.addNodeFilter("ul,ol",function(n){for(var r=n.length,t,i;r--;)t=n[r],i=t.parent,("ul"===i.name||"ol"===i.name)&&t.prev&&"li"===t.prev.name&&t.prev.append(t)}),o.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style,data-mce-selected,data-mce-expando,data-mce-type,data-mce-resize",function(n,t){for(var i=n.length;i--;)n[i].attr(t,null)}),{schema:a,addNodeFilter:o.addNodeFilter,addAttributeFilter:o.addAttributeFilter,serialize:function(t,i){var p=this,s,u,f,y,v;return e.ie&&l.select("script,style,select,map").length>0?(v=t.innerHTML,t=t.cloneNode(!1),l.setHTML(t,v)):t=t.cloneNode(!0),s=t.ownerDocument.implementation,s.createHTMLDocument&&(u=s.createHTMLDocument(""),c("BODY"==t.nodeName?t.childNodes:[t],function(n){u.body.appendChild(u.importNode(n,!0))}),t="BODY"!=t.nodeName?u.body.firstChild:u.body,f=l.doc,l.doc=u),i=i||{},i.format=i.format||"html",i.selection&&(i.forced_root_block=""),i.no_events||(i.node=t,p.onPreProcess(i)),y=new r(n,a),i.content=y.serialize(o.parse(h(i.getInner?t.innerHTML:l.getOuterHTML(t)),i)),i.cleanup||(i.content=i.content.replace(/\uFEFF/g,"")),i.no_events||p.onPostProcess(i),f&&(l.doc=f),i.node=null,i.content},addRules:function(n){a.addValidElements(n)},setRules:function(n){a.setValidElements(n)},onPreProcess:function(n){u&&u.fire("PreProcess",n)},onPostProcess:function(n){u&&u.fire("PostProcess",n)}}}}),i(ar,[],function(){function n(n){function r(t,i){var r,c=0,h,a,l,f,e,s,o=-1,u;if(r=t.duplicate(),r.collapse(i),u=r.parentElement(),u.ownerDocument===n.dom.doc){for(;"false"===u.contentEditable;)u=u.parentNode;if(!u.hasChildNodes())return{node:u,inside:1};for(l=u.children,h=l.length-1;h>=c;)if(s=Math.floor((c+h)/2),f=l[s],r.moveToElementText(f),o=r.compareEndPoints(i?"StartToStart":"EndToEnd",t),o>0)h=s-1;else{if(!(0>o))return{node:f};c=s+1}if(0>o)for(f?r.collapse(!1):(r.moveToElementText(u),r.collapse(!0),f=u,a=!0),e=0;0!==r.compareEndPoints(i?"StartToStart":"StartToEnd",t)&&0!==r.move("character",1)&&u==r.parentElement();)e++;else for(r.collapse(!0),e=0;0!==r.compareEndPoints(i?"StartToStart":"StartToEnd",t)&&0!==r.move("character",-1)&&u==r.parentElement();)e++;return{node:f,position:o,offset:e,inside:a}}}function f(){function h(n){var s=r(f,n),i,o,e=0,t,c,h;if(i=s.node,o=s.offset,s.inside&&!i.hasChildNodes())return void u[n?"setStart":"setEnd"](i,0);if(o===c)return void u[n?"setStartBefore":"setEndAfter"](i);if(s.position<0){if(t=s.inside?i.firstChild:i.nextSibling,!t)return void u[n?"setStartAfter":"setEndAfter"](i);if(!o)return void(3==t.nodeType?u[n?"setStart":"setEnd"](t,0):u[n?"setStartBefore":"setEndBefore"](t));for(;t;){if(3==t.nodeType&&(h=t.nodeValue,e+=h.length,e>=o)){i=t,e-=o,e=h.length-e;break}t=t.nextSibling}}else{if(t=i.previousSibling,!t)return u[n?"setStartBefore":"setEndBefore"](i);if(!o)return void(3==i.nodeType?u[n?"setStart":"setEnd"](t,i.nodeValue.length):u[n?"setStartAfter":"setEndAfter"](t));for(;t;){if(3==t.nodeType&&(e+=t.nodeValue.length,e>=o)){i=t,e-=o;break}t=t.previousSibling}}u[n?"setStart":"setEnd"](i,e)}var f=n.getRng(),u=t.createRng(),e,s,o,c,l;if(e=f.item?f.item(0):f.parentElement(),e.ownerDocument!=t.doc)return u;if(s=n.isCollapsed(),f.item)return u.setStart(e.parentNode,t.nodeIndex(e)),u.setEnd(u.startContainer,u.startOffset+1),u;try{h(!0),s||h()}catch(a){if(-2147024809!=a.number)throw a;l=i.getBookmark(2),o=f.duplicate(),o.collapse(!0),e=o.parentElement(),s||(o=f.duplicate(),o.collapse(!1),c=o.parentElement(),c.innerHTML=c.innerHTML),e.innerHTML=e.innerHTML,i.moveToBookmark(l),f=n.getRng(),h(!0),s||h()}return u}var i=this,t=n.dom,u=!1;this.getBookmark=function(i){function o(n){for(var u,r,f=[],i=n.parentNode,e=t.getRoot().parentNode;i!=e&&9!==i.nodeType;){for(u=i.children,r=u.length;r--;)if(n===u[r]){f.push(r);break}n=i,i=i.parentNode}return f}function e(n){var t;return t=r(f,n),t?{position:t.position,offset:t.offset,indexes:o(t.node),inside:t.inside}:void 0}var f=n.getRng(),u={};return 2===i&&(f.item?u.start={ctrl:!0,indexes:o(f.item(0))}:(u.start=e(!0),n.isCollapsed()||(u.end=e()))),u},this.moveToBookmark=function(n){function f(n){for(var f,u,r=t.getRoot(),i=n.length-1;i>=0;i--)u=r.children,f=n[i],f<=u.length-1&&(r=u[f]);return r}function u(t){var e=n[t?"start":"end"],s,u,h,o;e&&(s=e.position>0,u=r.createTextRange(),u.moveToElementText(f(e.indexes)),o=e.offset,o!==h?(u.collapse(e.inside||s),u.moveStart("character",s?-o:o)):u.collapse(t),i.setEndPoint(t?"StartToStart":"EndToStart",u),t&&i.collapse(!0))}var i,r=t.doc.body;n.start&&(n.start.ctrl?(i=r.createControlRange(),i.addElement(f(n.start.indexes)),i.select()):(i=r.createTextRange(),u(!0),u(),i.select()))},this.addRange=function(i){function p(n){var i,v,f,h,c;f=t.create("a"),i=n?r:y,v=n?o:s,h=e.duplicate(),(i==a||i==a.documentElement)&&(i=l,v=0),3==i.nodeType?(i.parentNode.insertBefore(f,i),h.moveToElementText(f),h.moveStart("character",v),t.remove(f),e.setEndPoint(n?"StartToStart":"EndToEnd",h)):(c=i.childNodes,c.length?(v>=c.length?t.insertAfter(f,c[c.length-1]):i.insertBefore(f,c[v]),h.moveToElementText(f)):i.canHaveHTML&&(i.innerHTML="<span>&#xFEFF;</span>",f=i.firstChild,h.moveToElementText(f),h.collapse(u)),e.setEndPoint(n?"StartToStart":"EndToEnd",h),t.remove(f))}var e,v,r,o,y,s,f,a=n.dom.doc,l=a.body,c,h;if(r=i.startContainer,o=i.startOffset,y=i.endContainer,s=i.endOffset,e=l.createTextRange(),r==y&&1==r.nodeType){if(o==s&&!r.hasChildNodes()){if(r.canHaveHTML)return f=r.previousSibling,f&&!f.hasChildNodes()&&t.isBlock(f)?f.innerHTML="&#xFEFF;":f=null,r.innerHTML="<span>&#xFEFF;</span><span>&#xFEFF;</span>",e.moveToElementText(r.lastChild),e.select(),t.doc.selection.clear(),r.innerHTML="",void(f&&(f.innerHTML=""));o=t.nodeIndex(r),r=r.parentNode}if(o==s-1)try{if(h=r.childNodes[o],v=l.createControlRange(),v.addElement(h),v.select(),c=n.getRng(),c.item&&h===c.item(0))return}catch(w){}}p(!0),p(),e.select()},this.getRangeAt=f}return n}),i(ti,[u],function(n){return{BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,modifierPressed:function(n){return n.shiftKey||n.ctrlKey||n.altKey},metaKeyPressed:function(t){return n.mac?t.metaKey:t.ctrlKey&&!t.altKey}}}),i(sr,[ti,r,u],function(n,t,i){return function(r,u){function vt(n){var t=u.settings.object_resizing;return t===!1||i.iOS?!1:("string"!=typeof t&&(t="table,img,div"),"false"===n.getAttribute("data-mce-resize")?!1:u.dom.is(n,t))}function ut(t){var r,i,p,a,v;r=t.screenX-gt,i=t.screenY-ii,h=r*l[2]+k,o=i*l[3]+d,h=5>h?5:h,o=5>o?5:o,p="IMG"==e.nodeName&&u.settings.resize_img_proportional!==!1?!n.modifierPressed(t):n.modifierPressed(t)||"IMG"==e.nodeName&&l[2]*l[3]!=0,p&&(ot(r)>ot(i)?(o=st(h*rt),h=st(o/rt)):(h=st(o/rt),o=st(h*rt))),f.setStyles(s,{width:h,height:o}),a=l.startPos.x+r,v=l.startPos.y+i,a=a>0?a:0,v=v>0?v:0,f.setStyles(it,{left:a,top:v,display:"block"}),it.innerHTML=h+" &times; "+o,l[2]<0&&s.clientWidth<=h&&f.setStyle(s,"left",nt+(k-h)),l[3]<0&&s.clientHeight<=o&&f.setStyle(s,"top",tt+(d-o)),r=c.scrollWidth-pt,i=c.scrollHeight-yt,r+i!==0&&f.setStyles(it,{left:a-r,top:v-i}),y||(u.fire("ObjectResizeStart",{target:e,width:k,height:d}),y=!0)}function et(){function n(n,t){t&&(e.style[n]||!u.schema.isValid(e.nodeName.toLowerCase(),n)?f.setStyle(e,n,t):f.setAttrib(e,n,t))}y=!1,n("width",h),n("height",o),f.unbind(a,"mousemove",ut),f.unbind(a,"mouseup",et),w!=a&&(f.unbind(w,"mousemove",ut),f.unbind(w,"mouseup",et)),f.remove(s),f.remove(it),b&&"TABLE"!=e.nodeName||ft(e),u.fire("ObjectResized",{target:e,width:h,height:o}),f.setAttrib(e,"style",f.getAttrib(e,"style")),u.nodeChanged()}function ft(n,t,r){var p,ft,b,ot,y;lt(),p=f.getPos(n,c),nt=p.x,tt=p.y,y=n.getBoundingClientRect(),ft=y.width||y.right-y.left,b=y.height||y.bottom-y.top,e!=n&&(at(),e=n,h=o=0),ot=u.fire("ObjectSelected",{target:n}),vt(n)&&!ot.isDefaultPrevented()?kt(v,function(n,u){function v(t){gt=t.screenX,ii=t.screenY,k=e.clientWidth,d=e.clientHeight,rt=d/k,l=n,n.startPos={x:ft*n[0]+nt,y:b*n[1]+tt},pt=c.scrollWidth,yt=c.scrollHeight,s=e.cloneNode(!0),f.addClass(s,"mce-clonedresizable"),f.setAttrib(s,"data-mce-bogus","all"),s.contentEditable=!1,s.unSelectabe=!0,f.setStyles(s,{left:nt,top:tt,margin:0}),s.removeAttribute("data-mce-selected"),c.appendChild(s),f.bind(a,"mousemove",ut),f.bind(a,"mouseup",et),w!=a&&(f.bind(w,"mousemove",ut),f.bind(w,"mouseup",et)),it=f.add(c,"div",{"class":"mce-resize-helper","data-mce-bogus":"all"},k+" &times; "+d)}var o,h;return t?void(u==t&&v(r)):(o=f.get("mceResizeHandle"+u),o?f.show(o):(h=c,o=f.add(h,"div",{id:"mceResizeHandle"+u,"data-mce-bogus":"all","class":"mce-resizehandle",unselectable:!0,style:"cursor:"+u+"-resize; margin:0; padding:0"}),i.ie&&(o.contentEditable=!1)),n.elm||(f.bind(o,"mousedown",function(n){n.stopImmediatePropagation(),n.preventDefault(),v(n)}),n.elm=o),void f.setStyles(o,{left:ft*n[0]+nt-o.offsetWidth/2,top:b*n[1]+tt-o.offsetHeight/2}))}):g(),e.setAttribute("data-mce-selected","1")}function g(){var t,n;lt(),e&&e.removeAttribute("data-mce-selected");for(t in v)n=f.get("mceResizeHandle"+t),n&&(f.unbind(n),f.remove(n))}function ct(n){function u(n,t){if(n)do if(n===t)return!0;while(n=n.parentNode)}var i,t;if(!y)return kt(f.select("img[data-mce-selected],hr[data-mce-selected]"),function(n){n.removeAttribute("data-mce-selected")}),t="mousedown"==n.type?n.target:r.getNode(),t=f.$(t).closest(b?"table":"table,img,hr")[0],u(t,c)&&(wt(),i=r.getStart(!0),u(i,t)&&u(r.getEnd(!0),t)&&(!b||t!=i&&"IMG"!==i.nodeName))?void ft(t):void g()}function ti(n,t,i){n&&n.attachEvent&&n.attachEvent("on"+t,i)}function ni(n,t,i){n&&n.detachEvent&&n.detachEvent("on"+t,i)}function ri(n){var i=n.srcElement,r,f,t,h,c,o,s;r=i.getBoundingClientRect(),o=ht.clientX-r.left,s=ht.clientY-r.top;for(f in v)if(t=v[f],h=i.offsetWidth*t[0],c=i.offsetHeight*t[1],ot(h-o)<8&&ot(c-s)<8){l=t;break}y=!0,u.fire("ObjectResizeStart",{target:e,width:e.clientWidth,height:e.clientHeight}),u.getDoc().selection.empty(),ft(i,f,ht)}function bt(n){var t=n.srcElement;if(t!=e){if(u.fire("ObjectSelected",{target:t}),at(),0===t.id.indexOf("mceResizeHandle"))return void(n.returnValue=!1);("IMG"==t.nodeName||"TABLE"==t.nodeName)&&(g(),e=t,ti(t,"resizestart",ri))}}function at(){ni(e,"resizestart",ri)}function lt(){var t,n;for(t in v)n=v[t],n.elm&&(f.unbind(n.elm),delete n.elm)}function wt(){try{u.getDoc().execCommand("enableObjectResizing",!1,!1)}catch(n){}}function dt(n){var t;if(b){t=a.body.createControlRange();try{return t.addElement(n),t.select(),!0}catch(i){}}}function ui(){e=s=null,b&&(at(),ni(c,"controlselect",bt))}var f=u.dom,kt=t.each,e,s,it,v,l,ht,gt,ii,nt,tt,k,d,rt,y,h,o,a=u.getDoc(),w=document,b=i.ie&&i.ie<11,ot=Math.abs,st=Math.round,c=u.getBody(),pt,yt,p;return v={n:[.5,0,0,-1],e:[1,.5,1,0],s:[.5,1,0,1],w:[0,.5,-1,0],nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]},p=".mce-content-body",u.contentStyles.push(p+" div.mce-resizehandle {position: absolute;border: 1px solid black;background: #FFF;width: 5px;height: 5px;z-index: 10000}"+p+" .mce-resizehandle:hover {background: #000}"+p+" img[data-mce-selected], hr[data-mce-selected] {outline: 1px solid black;resize: none}"+p+" .mce-clonedresizable {position: absolute;"+(i.gecko?"":"outline: 1px dashed black;")+"opacity: .5;filter: alpha(opacity=50);z-index: 10000}"+p+" .mce-resize-helper {background: #555;background: rgba(0,0,0,0.75);border-radius: 3px;border: 1px;color: white;display: none;font-family: sans-serif;font-size: 12px;white-space: nowrap;line-height: 14px;margin: 5px 10px;padding: 5px;position: absolute;z-index: 10001}"),u.on("init",function(){b?(u.on("ObjectResized",function(n){"TABLE"!=n.target.nodeName&&(g(),dt(n.target))}),ti(c,"controlselect",bt),u.on("mousedown",function(n){ht=n})):(wt(),i.ie>=11&&(u.on("mouseup",function(n){var t=n.target.nodeName;!y&&/^(TABLE|IMG|HR)$/.test(t)&&(u.selection.select(n.target,"TABLE"==t),u.nodeChanged())}),u.dom.bind(c,"mscontrolselect",function(n){/^(TABLE|IMG|HR)$/.test(n.target.nodeName)&&(n.preventDefault(),"IMG"==n.target.tagName&&window.setTimeout(function(){u.selection.select(n.target)},0))}))),u.on("nodechange ResizeEditor",ct),u.on("keydown keyup",function(n){e&&"TABLE"==e.nodeName&&ct(n)}),u.on("hide",g)}),u.on("remove",lt),{isResizable:vt,showResizeRect:ft,hideResizeRect:g,updateResizeRect:ct,controlSelect:dt,destroy:ui}}}),i(nt,[u,r],function(n,t){function i(i){var r=i.dom;this.getBookmark=function(n,u){function a(n,i){var u=0;return t.each(r.select(n),function(n,t){n==i&&(u=t)}),u}function y(n){function t(t){var i,r,u,f=t?"start":"end";i=n[f+"Container"],r=n[f+"Offset"],1==i.nodeType&&"TR"==i.nodeName&&(u=i.childNodes,i=u[Math.min(t?r:r-1,u.length-1)],i&&(r=t?0:i.childNodes.length,n["set"+(t?"Start":"End")](i,r)))}return t(!0),t(),n}function p(){function t(n,t){var i=n[t?"startContainer":"endContainer"],s=n[t?"startOffset":"endOffset"],h=[],f,o,c=0;if(3==i.nodeType){if(u)for(f=i.previousSibling;f&&3==f.nodeType;f=f.previousSibling)s+=f.nodeValue.length;h.push(s)}else o=i.childNodes,s>=o.length&&o.length&&(c=1,s=Math.max(0,o.length-1)),h.push(r.nodeIndex(o[s],u)+c);for(;i&&i!=e;i=i.parentNode)h.push(r.nodeIndex(i,u));return h}var f=i.getRng(!0),e=r.getRoot(),n={};return n.start=t(f,!0),i.isCollapsed()||(n.end=t(f)),n}var f,s,h,v,e,o,l="&#xFEFF;",c;if(2==n)return o=i.getNode(),e=o?o.nodeName:null,"IMG"==e?{name:e,index:a(e,o)}:i.tridentSel?i.tridentSel.getBookmark(n):p();if(n)return{rng:i.getRng()};if(f=i.getRng(),h=r.uniqueId(),v=i.isCollapsed(),c="overflow:hidden;line-height:0px",f.duplicate||f.item){if(f.item)return o=f.item(0),e=o.nodeName,{name:e,index:a(e,o)};s=f.duplicate();try{f.collapse(),f.pasteHTML('<span data-mce-type="bookmark" id="'+h+'_start" style="'+c+'">'+l+"</span>"),v||(s.collapse(!1),f.moveToElementText(s.parentElement()),0===f.compareEndPoints("StartToEnd",s)&&s.move("character",-1),s.pasteHTML('<span data-mce-type="bookmark" id="'+h+'_end" style="'+c+'">'+l+"</span>"))}catch(w){return null}}else{if(o=i.getNode(),e=o.nodeName,"IMG"==e)return{name:e,index:a(e,o)};s=y(f.cloneRange()),v||(s.collapse(!1),s.insertNode(r.create("span",{"data-mce-type":"bookmark",id:h+"_end",style:c},l))),f=y(f),f.collapse(!0),f.insertNode(r.create("span",{"data-mce-type":"bookmark",id:h+"_start",style:c},l))}return i.moveToBookmark({id:h,keep:1}),{id:h}},this.moveToBookmark=function(u){function a(n){var i=u[n?"start":"end"],e,t,r,o;if(i){for(r=i[0],t=v,e=i.length-1;e>=1;e--){if(o=t.childNodes,i[e]>o.length-1)return;t=o[i[e]]}3===t.nodeType&&(r=Math.min(i[0],t.nodeValue.length)),1===t.nodeType&&(r=Math.min(i[0],t.childNodes.length)),n?f.setStart(t,r):f.setEnd(t,r)}return!0}function c(i){var f=r.get(u.id+"_"+i),v,c,a,l,y=u.keep;if(f&&(v=f.parentNode,"start"==i?(y?(v=f.firstChild,c=1):c=r.nodeIndex(f),s=e=v,h=o=c):(y?(v=f.firstChild,c=1):c=r.nodeIndex(f),e=v,o=c),!y)){for(l=f.previousSibling,a=f.nextSibling,t.each(t.grep(f.childNodes),function(n){3==n.nodeType&&(n.nodeValue=n.nodeValue.replace(/\uFEFF/g,""))});f=r.get(u.id+"_"+i);)r.remove(f,1);l&&a&&l.nodeType==a.nodeType&&3==l.nodeType&&!n.opera&&(c=l.nodeValue.length,l.appendData(a.nodeValue),r.remove(a),"start"==i?(s=e=l,h=o=c):(e=l,o=c))}}function l(t){return!r.isBlock(t)||t.innerHTML||n.ie||(t.innerHTML='<br data-mce-bogus="1" />'),t}var f,v,s,e,h,o;if(u)if(u.start){if(f=r.createRng(),v=r.getRoot(),i.tridentSel)return i.tridentSel.moveToBookmark(u);a(!0)&&a()&&i.setRng(f)}else u.id?(c("start"),c("end"),s&&(f=r.createRng(),f.setStart(l(s),h),f.setEnd(l(e),o),i.setRng(f))):u.name?i.select(r.select(u.name)[u.index]):u.rng&&i.setRng(u.rng)}}return i.isBookmarkNode=function(n){return n&&"SPAN"===n.tagName&&"bookmark"===n.getAttribute("data-mce-type")},i}),i(hr,[s,ar,sr,a,nt,u,r],function(n,i,r,u,f,e,o){function c(n,t,u,e){var o=this;o.dom=n,o.win=t,o.serializer=u,o.editor=e,o.bookmarkManager=new f(o),o.controlSelection=new r(o,e),o.win.getSelection||(o.tridentSel=new i(o))}var s=o.each,l=o.trim,h=e.ie;return c.prototype={setCursorLocation:function(n,t){var i=this,r=i.dom.createRng();n?(r.setStart(n,t),r.setEnd(n,t),i.setRng(r),i.collapse(!1)):(i._moveEndPoint(r,i.editor.getBody(),!0),i.setRng(r))},getContent:function(n){var u=this,i=u.getRng(),r=u.dom.create("body"),s=u.getSel(),o,f,e;return n=n||{},o=f="",n.get=!0,n.format=n.format||"html",n.selection=!0,u.editor.fire("BeforeGetContent",n),"text"==n.format?u.isCollapsed()?"":i.text||(s.toString?s.toString():""):(i.cloneContents?(e=i.cloneContents(),e&&r.appendChild(e)):i.item!==t||i.htmlText!==t?(r.innerHTML="<br>"+(i.item?i.item(0).outerHTML:i.htmlText),r.removeChild(r.firstChild)):r.innerHTML=i.toString(),/^\s/.test(r.innerHTML)&&(o=" "),/\s+$/.test(r.innerHTML)&&(f=" "),n.getInner=!0,n.content=u.isCollapsed()?"":o+u.serializer.serialize(r,n)+f,u.editor.fire("GetContent",n),n.content)},setContent:function(n,t){var r=this,i=r.getRng(),o,u=r.win.document,e,f;if(t=t||{format:"html"},t.set=!0,t.selection=!0,n=t.content=n,t.no_events||r.editor.fire("BeforeSetContent",t),n=t.content,i.insertNode){n+='<span id="__caret">_</span>',i.startContainer==u&&i.endContainer==u?u.body.innerHTML=n:(i.deleteContents(),0===u.body.childNodes.length?u.body.innerHTML=n:i.createContextualFragment?i.insertNode(i.createContextualFragment(n)):(e=u.createDocumentFragment(),f=u.createElement("div"),e.appendChild(f),f.outerHTML=n,i.insertNode(e))),o=r.dom.get("__caret"),i=u.createRange(),i.setStartBefore(o),i.setEndBefore(o),r.setRng(i),r.dom.remove("__caret");try{r.setRng(i)}catch(s){}}else i.item&&(u.execCommand("Delete",!1,null),i=r.getRng()),/^\s+/.test(n)?(i.pasteHTML('<span id="__mce_tmp">_</span>'+n),r.dom.remove("__mce_tmp")):i.pasteHTML(n);t.no_events||r.editor.fire("SetContent",t)},getStart:function(n){var f=this,i=f.getRng(),t,e,u,r;if(i.duplicate||i.item){if(i.item)return i.item(0);for(u=i.duplicate(),u.collapse(1),t=u.parentElement(),t.ownerDocument!==f.dom.doc&&(t=f.dom.getRoot()),e=r=i.parentElement();r=r.parentNode;)if(r==t){t=e;break}return t}return t=i.startContainer,1==t.nodeType&&t.hasChildNodes()&&(n&&i.collapsed||(t=t.childNodes[Math.min(t.childNodes.length-1,i.startOffset)])),t&&3==t.nodeType?t.parentNode:t},getEnd:function(n){var u=this,i=u.getRng(),t,r;return i.duplicate||i.item?i.item?i.item(0):(i=i.duplicate(),i.collapse(0),t=i.parentElement(),t.ownerDocument!==u.dom.doc&&(t=u.dom.getRoot()),t&&"BODY"==t.nodeName?t.lastChild||t:t):(t=i.endContainer,r=i.endOffset,1==t.nodeType&&t.hasChildNodes()&&(n&&i.collapsed||(t=t.childNodes[r>0?r-1:r])),t&&3==t.nodeType?t.parentNode:t)},getBookmark:function(n,t){return this.bookmarkManager.getBookmark(n,t)},moveToBookmark:function(n){return this.bookmarkManager.moveToBookmark(n)},select:function(n,t){var i=this,f=i.dom,r=f.createRng(),u;if(i.lastFocusBookmark=null,n){if(!t&&i.controlSelection.controlSelect(n))return;u=f.nodeIndex(n),r.setStart(n.parentNode,u),r.setEnd(n.parentNode,u+1),t&&(i._moveEndPoint(r,n,!0),i._moveEndPoint(r,n)),i.setRng(r)}return n},isCollapsed:function(){var t=this,n=t.getRng(),i=t.getSel();return!n||n.item?!1:n.compareEndPoints?0===n.compareEndPoints("StartToEnd",n):!i||n.collapsed},collapse:function(n){var i=this,t=i.getRng(),r;t.item&&(r=t.item(0),t=i.win.document.body.createTextRange(),t.moveToElementText(r)),t.collapse(!!n),i.setRng(t)},getSel:function(){var n=this.win;return n.getSelection?n.getSelection():n.document.selection},getRng:function(n){function s(n,t,i){try{return t.compareBoundaryPoints(n,i)}catch(r){return-1}}var i=this,e,t,f,r=i.win.document,o,u;if(!n&&i.lastFocusBookmark)return u=i.lastFocusBookmark,u.startContainer?(t=r.createRange(),t.setStart(u.startContainer,u.startOffset),t.setEnd(u.endContainer,u.endOffset)):t=u,t;if(n&&i.tridentSel)return i.tridentSel.getRangeAt(0);try{(e=i.getSel())&&(t=e.rangeCount>0?e.getRangeAt(0):e.createRange?e.createRange():r.createRange())}catch(c){}if(h&&t&&t.setStart&&r.selection){try{o=r.selection.createRange()}catch(c){}o&&o.item&&(f=o.item(0),t=r.createRange(),t.setStartBefore(f),t.setEndAfter(f))}return t||(t=r.createRange?r.createRange():r.body.createTextRange()),t.setStart&&9===t.startContainer.nodeType&&t.collapsed&&(f=i.dom.getRoot(),t.setStart(f,0),t.setEnd(f,0)),i.selectedRange&&i.explicitRange&&(0===s(t.START_TO_START,t,i.selectedRange)&&0===s(t.END_TO_END,t,i.selectedRange)?t=i.explicitRange:(i.selectedRange=null,i.explicitRange=null)),t},setRng:function(n,t){var r=this,i;if(n)if(n.select)try{n.select()}catch(u){}else if(r.tridentSel){if(n.cloneRange)try{return void r.tridentSel.addRange(n)}catch(u){}}else if(i=r.getSel()){r.explicitRange=n;try{i.removeAllRanges(),i.addRange(n)}catch(u){}t===!1&&i.extend&&(i.collapse(n.endContainer,n.endOffset),i.extend(n.startContainer,n.startOffset)),r.selectedRange=i.rangeCount>0?i.getRangeAt(0):null}},setNode:function(n){var t=this;return t.setContent(t.dom.getOuterHTML(n)),n},getNode:function(){function s(n,t){for(var i=n;n&&3===n.nodeType&&0===n.length;)n=t?n.nextSibling:n.previousSibling;return n||i}var f=this,n=f.getRng(),i,t=n.startContainer,r=n.endContainer,u=n.startOffset,o=n.endOffset,e=f.dom.getRoot();return n?n.setStart?(i=n.commonAncestorContainer,!n.collapsed&&(t==r&&2>o-u&&t.hasChildNodes()&&(i=t.childNodes[u]),3===t.nodeType&&3===r.nodeType&&(t=t.length===u?s(t.nextSibling,!0):t.parentNode,r=0===o?s(r.previousSibling,!1):r.parentNode,t&&t===r))?t:i&&3==i.nodeType?i.parentNode:i):(i=n.item?n.item(0):n.parentElement(),i.ownerDocument!==f.win.document&&(i=e),i):e},getSelectedBlocks:function(t,i){var o=this,r=o.dom,u,e,f=[],s;if(e=r.getRoot(),t=r.getParent(t||o.getStart(),r.isBlock),i=r.getParent(i||o.getEnd(),r.isBlock),t&&t!=e&&f.push(t),t&&i&&t!=i)for(u=t,s=new n(t,e);(u=s.next())&&u!=i;)r.isBlock(u)&&f.push(u);return i&&t!=i&&i!=e&&f.push(i),f},isForward:function(){var r=this.dom,n=this.getSel(),t,i;return n&&n.anchorNode&&n.focusNode?(t=r.createRng(),t.setStart(n.anchorNode,n.anchorOffset),t.collapse(!0),i=r.createRng(),i.setStart(n.focusNode,n.focusOffset),i.collapse(!0),t.compareBoundaryPoints(t.START_TO_START,i)<=0):!0},normalize:function(){var n=this,t=n.getRng();return!h&&new u(n.dom).normalize(t)&&n.setRng(t,n.isForward()),t},selectorChanged:function(n,t){var i=this,r;return i.selectorChangedData||(i.selectorChangedData={},r={},i.editor.on("NodeChange",function(n){var e=n.element,u=i.dom,t=u.getParents(e,null,u.getRoot()),f={};s(i.selectorChangedData,function(n,i){s(t,function(e){if(u.is(e,i))return r[i]||(s(n,function(n){n(!0,{node:e,selector:i,parents:t})}),r[i]=n),f[i]=n,!1})}),s(r,function(n,i){f[i]||(delete r[i],s(n,function(n){n(!1,{node:e,selector:i,parents:t})}))})})),i.selectorChangedData[n]||(i.selectorChangedData[n]=[]),i.selectorChangedData[n].push(t),i},getScrollContainer:function(){for(var t,n=this.dom.getRoot();n&&"BODY"!=n.nodeName;){if(n.scrollHeight>n.clientHeight){t=n;break}n=n.parentNode}return t},scrollIntoView:function(n){function s(n){for(var i=0,r=0,t=n;t&&t.nodeType;)i+=t.offsetLeft||0,r+=t.offsetTop||0,t=t.offsetParent;return{x:i,y:r}}var t,e,f=this,o=f.dom,h=o.getRoot(),i,r,u;if("BODY"!=h.nodeName&&(u=f.getScrollContainer(),u))return t=s(n).y-s(u).y,r=u.clientHeight,i=u.scrollTop,void((i>t||t+25>i+r)&&(u.scrollTop=i>t?t:t-r+25));e=o.getViewPort(f.editor.getWin()),t=o.getPos(n).y,i=e.y,r=e.h,(t<e.y||t+25>i+r)&&f.editor.getWin().scrollTo(0,i>t?t:t-r+25)},placeCaretAt:function(n,t){var r=this.editor.getDoc(),i,u;if(r.caretPositionFromPoint)u=r.caretPositionFromPoint(n,t),i=r.createRange(),i.setStart(u.offsetNode,u.offset),i.collapse(!0);else if(r.caretRangeFromPoint)i=r.caretRangeFromPoint(n,t);else if(r.body.createTextRange){i=r.body.createTextRange();try{i.moveToPoint(n,t),i.collapse(!0)}catch(f){i.collapse(t<r.body.clientHeight)}}this.setRng(i)},_moveEndPoint:function(t,i,r){var u=i,f=new n(i,u),o=this.dom.schema.getNonEmptyElements();do{if(3==i.nodeType&&0!==l(i.nodeValue).length)return void(r?t.setStart(i,0):t.setEnd(i,i.nodeValue.length));if(o[i.nodeName]&&!/^(TD|TH)$/.test(i.nodeName))return void(r?t.setStartBefore(i):"BR"==i.nodeName?t.setEndBefore(i):t.setEndAfter(i));if(e.ie&&e.ie<11&&this.dom.isBlock(i)&&this.dom.isEmpty(i))return void(r?t.setStart(i,0):t.setEnd(i,0))}while(i=r?f.next():f.prev());"BODY"==u.nodeName&&(r?t.setStart(u,0):t.setEnd(u,u.childNodes.length))},destroy:function(){this.win=null,this.controlSelection.destroy()}},c}),i(dt,[nt,r],function(n,t){function r(t){this.compare=function(r,u){function e(n){var r={};return i(t.getAttribs(n),function(i){var u=i.nodeName.toLowerCase();0!==u.indexOf("_")&&"style"!==u&&"data-mce-style"!==u&&(r[u]=t.getAttrib(n,u))}),r}function f(n,t){var r,i;for(i in n)if(n.hasOwnProperty(i)){if((r=t[i],"undefined"==typeof r)||n[i]!=r)return!1;delete t[i]}for(i in t)if(t.hasOwnProperty(i))return!1;return!0}return r.nodeName!=u.nodeName?!1:f(e(r),e(u))&&f(t.parseStyle(t.getAttrib(r,"style")),t.parseStyle(t.getAttrib(u,"style")))?!n.isBookmarkNode(r)&&!n.isBookmarkNode(u):!1}}var i=t.each;return r}),i(nf,[r],function(n){function i(n,i){function s(n){return n.replace(/%(\w+)/g,"")}var h,u,r=n.dom,o="",f,e;if(e=n.settings.preview_styles,e===!1)return"";if(e||(e="font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow"),"string"==typeof i){if(i=n.formatter.get(i),!i)return;i=i[0]}return h=i.block||i.inline||"span",u=r.create(h),t(i.styles,function(n,t){n=s(n),n&&r.setStyle(u,t,n)}),t(i.attributes,function(n,t){n=s(n),n&&r.setAttrib(u,t,n)}),t(i.classes,function(n){n=s(n),r.hasClass(u,n)||r.addClass(u,n)}),n.fire("PreviewFormats"),r.setStyles(u,{position:"absolute",left:-65535}),n.getBody().appendChild(u),f=r.getStyle(n.getBody(),"fontSize",!0),f=/px$/.test(f)?parseInt(f,10):0,t(e.split(" "),function(t){var i=r.getStyle(u,t,!0);if(!("background-color"==t&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(i)&&(i=r.getStyle(n.getBody(),t,!0),"#ffffff"==r.toHex(i).toLowerCase())||"color"==t&&"#000000"==r.toHex(i).toLowerCase())){if("font-size"==t&&/em|%$/.test(i)){if(0===f)return;i=parseFloat(i,10)/(/%$/.test(i)?100:1),i=i*f+"px"}"border"==t&&i&&(o+="padding:0 2px;"),o+=t+":"+i+";"}}),n.fire("AfterPreviewFormats"),r.remove(u),o}var t=n.each;return{getCssText:i}}),i(tr,[s,a,nt,dt,r,nf],function(n,t,i,r,u,f){return function(e){function yt(n){return n.nodeType&&(n=n.nodeName),!!e.schema.getTextBlockElements()[n.toLowerCase()]}function it(n,t){return o.getParents(n,t,o.getRoot())}function pt(n){return 1===n.nodeType&&"_mce_caret"===n.id}function yi(){ot({valigntop:[{selector:"td,th",styles:{verticalAlign:"top"}}],valignmiddle:[{selector:"td,th",styles:{verticalAlign:"middle"}}],valignbottom:[{selector:"td,th",styles:{verticalAlign:"bottom"}}],alignleft:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"left"},defaultBlock:"div"},{selector:"img,table",collapsed:!1,styles:{float:"left"}}],aligncenter:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"center"},defaultBlock:"div"},{selector:"img",collapsed:!1,styles:{display:"block",marginLeft:"auto",marginRight:"auto"}},{selector:"table",collapsed:!1,styles:{marginLeft:"auto",marginRight:"auto"}}],alignright:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"right"},defaultBlock:"div"},{selector:"img,table",collapsed:!1,styles:{float:"right"}}],alignjustify:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"justify"},defaultBlock:"div"}],bold:[{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all"}],italic:[{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all"}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:!0},{inline:"u",remove:"all"}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:!0},{inline:"strike",remove:"all"}],forecolor:{inline:"span",styles:{color:"%value"},links:!0,remove_similar:!0},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},links:!0,remove_similar:!0},fontname:{inline:"span",styles:{fontFamily:"%value"}},fontsize:{inline:"span",styles:{fontSize:"%value"}},fontsize_class:{inline:"span",attributes:{"class":"%value"}},blockquote:{block:"blockquote",wrapper:1,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},code:{inline:"code"},link:{inline:"a",selector:"a",remove:"all",split:!0,deep:!0,onmatch:function(){return!0},onformat:function(n,t,i){s(i,function(t,i){o.setAttrib(n,i,t)})}},removeformat:[{selector:"b,strong,em,i,font,u,strike,sub,sup,dfn,code,samp,kbd,var,cite,mark,q",remove:"all",split:!0,expand:!1,block_expand:!0,deep:!0},{selector:"span",attributes:["style","class"],remove:"empty",split:!0,expand:!1,deep:!0},{selector:"*",attributes:["style","class"],split:!1,expand:!1,deep:!0}]}),s("p h1 h2 h3 h4 h5 h6 div address pre div dt dd samp".split(/\s/),function(n){ot(n,{block:n,remove:"all"})}),ot(e.settings.formats)}function pi(){e.addShortcut("ctrl+b","bold_desc","Bold"),e.addShortcut("ctrl+i","italic_desc","Italic"),e.addShortcut("ctrl+u","underline_desc","Underline");for(var n=1;6>=n;n++)e.addShortcut("ctrl+"+n,"",["FormatBlock",!1,"h"+n]);e.addShortcut("ctrl+7","",["FormatBlock",!1,"p"]),e.addShortcut("ctrl+8","",["FormatBlock",!1,"div"]),e.addShortcut("ctrl+9","",["FormatBlock",!1,"address"])}function w(n){return n?g[n]:g}function ot(n,t){n&&("string"!=typeof n?s(n,function(n,t){ot(t,n)}):(t=t.length?t:[t],s(t,function(n){n.deep===ft&&(n.deep=!n.selector),n.split===ft&&(n.split=!n.selector||n.inline),n.remove===ft&&n.selector&&!n.inline&&(n.remove="none"),n.selector&&n.inline&&(n.mixed=!0,n.block_expand=!0),"string"==typeof n.classes&&(n.classes=n.classes.split(/\s+/))}),g[n]=t))}function vi(n){return n&&g[n]&&delete g[n],g}function fi(n){var t;return e.dom.getParent(n,function(n){return t=e.dom.getStyle(n,"text-decoration"),t&&"none"!==t}),t}function si(n){var t;1===n.nodeType&&n.parentNode&&1===n.parentNode.nodeType&&(t=fi(n.parentNode),e.dom.getStyle(n,"color")&&t?e.dom.setStyle(n,"text-decoration",t):e.dom.getStyle(n,"textdecoration")===t&&e.dom.setStyle(n,"text-decoration",null))}function nt(t,i,r){function k(n,t){if(t=t||u,n){if(t.onformat&&t.onformat(n,t,i,r),s(t.styles,function(t,r){o.setStyle(n,r,b(t,i))}),t.styles){var f=o.getAttrib(n,"style");f&&n.setAttribute("data-mce-style",f)}s(t.attributes,function(t,r){o.setAttrib(n,r,b(t,i))}),s(t.classes,function(t){t=b(t,i),o.hasClass(n,t)||o.addClass(n,t)})}}function ot(){function s(t,i){var u=new n(i);for(r=u.current();r;r=u.prev())if(r.childNodes.length>1||r==t||"BR"==r.tagName)return r}var t=e.selection.getRng(),f=t.startContainer,u=t.endContainer,i,o;return f!=u&&0===t.endOffset&&(i=s(f,u),o=3==i.nodeType?i.length:i.childNodes.length,t.setEnd(i,o)),t}function it(n,r,e){var b=[],h,g,w=!0;h=u.inline||u.block,g=o.create(h),k(g),lt.walk(n,function(n){function c(n){var nt,it,rt,l,tt;return tt=w,nt=n.nodeName.toLowerCase(),it=n.parentNode.nodeName.toLowerCase(),1===n.nodeType&&d(n)&&(tt=w,w="true"===d(n),l=!0),p(nt,"br")?(r=0,void(u.block&&o.remove(n))):u.wrapper&&y(n,t,i)?void(r=0):w&&!l&&u.block&&!u.wrapper&&yt(nt)&&ct(it,h)?(n=o.rename(n,h),k(n),b.push(n),void(r=0)):u.selector&&(s(f,function(t){"collapsed"in t&&t.collapsed!==ft||o.is(n,t.selector)&&!pt(n)&&(k(n,t),rt=!0)}),!u.inline||rt)?void(r=0):void(!w||l||!ct(h,nt)||!ct(it,h)||!e&&3===n.nodeType&&1===n.nodeValue.length&&65279===n.nodeValue.charCodeAt(0)||pt(n)||u.inline&&a(n)?(r=0,s(st(n.childNodes),c),l&&(w=tt),r=0):(r||(r=o.clone(g,v),n.parentNode.insertBefore(r,n),b.push(r)),r.appendChild(n)))}var r;s(n,c)}),u.links===!0&&s(b,function(n){function t(n){"A"===n.nodeName&&k(n,u),s(st(n.childNodes),t)}t(n)}),s(b,function(n){function e(n){var t=0;return s(n.childNodes,function(n){rt(n)||l(n)||t++}),t}function h(n){var t,i;return s(n.childNodes,function(n){if(1==n.nodeType&&!l(n)&&!pt(n))return t=n,v}),t&&!l(t)&&dt(t,u)&&(i=o.clone(t,v),k(i),o.replace(i,n,c),o.remove(t,1)),i||n}var r;if(r=e(n),(b.length>1||!a(n))&&0===r)return void o.remove(n,1);if(u.inline||u.wrapper){if(u.exact||1!==r||(n=h(n)),s(f,function(t){s(o.select(t.inline,n),function(n){l(n)||ht(t,i,n,t.exact?n:null)})}),y(n.parentNode,t,i))return o.remove(n,1),n=0,c;u.merge_with_parents&&o.getParent(n.parentNode,function(r){if(y(r,t,i))return o.remove(n,1),n=0,c}),n&&u.merge_siblings!==!1&&(n=hi(ni(n),n),n=hi(n,ni(n,c)))}})}var f=w(t),u=f[0],ut,g,ft=!r&&h.isCollapsed(),tt;u&&(r?r.nodeType?(g=o.createRng(),g.setStartBefore(r),g.setEndAfter(r),it(et(g,f),null,!0)):it(r,null,!0):ft&&u.inline&&!o.select("td.mce-item-selected,th.mce-item-selected").length?ui("apply",t,i):(tt=e.selection.getNode(),at||!f[0].defaultBlock||o.getParent(tt,o.isBlock)||nt(f[0].defaultBlock),e.selection.setRng(ot()),ut=h.getBookmark(),it(et(h.getRng(c),f),ut),u.styles&&(u.styles.color||u.styles.textDecoration)&&(ri(tt,si,"childNodes"),si(tt)),h.moveToBookmark(ut),oi(h.getRng(c)),e.nodeChanged()))}function wt(n,t,i,r){function tt(n){var e,i,r,s,o;if(1===n.nodeType&&d(n)&&(s=b,b="true"===d(n),o=!0),e=st(n.childNodes),b&&!o)for(i=0,r=u.length;r>i&&!ht(u[i],t,n,n);i++);if(f.deep&&e.length){for(i=0,r=e.length;r>i;i++)tt(e[i]);o&&(b=s)}}function ft(i){var u;return s(it(i.parentNode).reverse(),function(i){var f;u||"_start"==i.id||"_end"==i.id||(f=y(i,n,t,r),f&&f.split!==!1&&(u=i))}),u}function ot(n,i,r,e){var h,s,c,y,l,p;if(n){for(p=n.parentNode,h=i.parentNode;h&&h!=p;h=h.parentNode){for(s=o.clone(h,v),l=0;l<u.length;l++)if(ht(u[l],t,s,s)){s=0;break}s&&(c&&s.appendChild(c),y||(y=s),c=s)}!e||f.mixed&&a(n)||(i=o.split(n,i)),c&&(r.parentNode.insertBefore(c,r),y.appendChild(r))}return i}function g(n){return ot(ft(n),n,n,!0)}function rt(n){var i=o.get(n?"_start":"_end"),t=i[n?"firstChild":"lastChild"];return l(t)&&(t=t[n?"firstChild":"lastChild"]),o.remove(i,!0),t}function k(n){var t,i,r=n.commonAncestorContainer;n=et(n,u,c),f.split&&(t=ei(n,c),i=ei(n),t!=i?(/^(TR|TH|TD)$/.test(t.nodeName)&&t.firstChild&&(t="TR"==t.nodeName?t.firstChild.firstChild||t:t.firstChild||t),r&&/^T(HEAD|BODY|FOOT|R)$/.test(r.nodeName)&&/^(TH|TD)$/.test(i.nodeName)&&i.firstChild&&(i=i.firstChild||i),t=ti(t,"span",{id:"_start","data-mce-type":"bookmark"}),i=ti(i,"span",{id:"_end","data-mce-type":"bookmark"}),g(t),g(i),t=rt(c),i=rt()):t=i=g(t),n.startContainer=t.parentNode,n.startOffset=ut(t),n.endContainer=i.parentNode,n.endOffset=ut(i)+1),lt.walk(n,function(n){s(n,function(n){tt(n),1===n.nodeType&&"underline"===e.dom.getStyle(n,"text-decoration")&&n.parentNode&&"underline"===fi(n.parentNode)&&ht({deep:!1,exact:!0,inline:"span",styles:{textDecoration:"underline"}},null,n)})})}var u=w(n),f=u[0],nt,p,b=!0;return i?void(i.nodeType?(p=o.createRng(),p.setStartBefore(i),p.setEndAfter(i),k(p)):k(i)):void(h.isCollapsed()&&f.inline&&!o.select("td.mce-item-selected,th.mce-item-selected").length?ui("remove",n,t,r):(nt=h.getBookmark(),k(h.getRng(c)),h.moveToBookmark(nt),f.inline&&kt(n,t,h.getStart())&&oi(h.getRng(!0)),e.nodeChanged()))}function li(n,t,i){var r=w(n);!kt(n,t,i)||"toggle"in r[0]&&!r[0].toggle?nt(n,t,i):wt(n,t,i)}function y(n,t,i,r){function h(n,t,u){var e,h,f=t[u],s;if(t.onmatch)return t.onmatch(n,t,u);if(f)if(f.length===ft){for(e in f)if(f.hasOwnProperty(e)){if(h="attributes"===u?o.getAttrib(n,e):ii(n,e),r&&!h&&!t.exact)return;if((!r||t.exact)&&!p(h,vt(b(f[e],i),e)))return}}else for(s=0;s<f.length;s++)if("attributes"===u?o.getAttrib(n,f[s]):ii(n,f[s]))return t;return t}var s=w(t),f,u,e;if(s&&n)for(u=0;u<s.length;u++)if(f=s[u],dt(n,f)&&h(n,f,"attributes")&&h(n,f,"styles")){if(e=f.classes)for(u=0;u<e.length;u++)if(!o.hasClass(n,e[u]))return;return f}}function kt(n,t,i){function u(i){var r=o.getRoot();return i===r?!1:(i=o.getParent(i,function(i){return i.parentNode===r||!!y(i,n,t,!0)}),y(i,n,t))}var r;return i?u(i):(i=h.getNode(),u(i)?c:(r=h.getStart(),r!=i&&u(r)?c:v))}function ai(n,t){var u,r=[],i={};return u=h.getStart(),o.getParent(u,function(u){for(var f,e=0;e<n.length;e++)f=n[e],!i[f]&&y(u,f,t)&&(i[f]=!0,r.push(f))},o.getRoot()),r}function wi(n){var r=w(n),e,f,i,t,u;if(r)for(e=h.getStart(),f=it(e),t=r.length-1;t>=0;t--){if(u=r[t].selector,!u||r[t].defaultBlock)return c;for(i=f.length-1;i>=0;i--)if(o.is(f[i],u))return c}return v}function gi(n,t,i){var r;return k||(k={},r={},e.on("NodeChange",function(n){var t=it(n.element),i={};t=u.grep(t,function(n){return 1==n.nodeType&&!n.getAttribute("data-mce-bogus")}),s(k,function(n,u){s(t,function(f){if(y(f,u,{},n.similar))return r[u]||(s(n,function(n){n(!0,{node:f,format:u,parents:t})}),r[u]=n),i[u]=n,!1})}),s(r,function(u,f){i[f]||(delete r[f],s(u,function(i){i(!1,{node:n.element,format:f,parents:t})}))})})),s(n.split(","),function(n){k[n]||(k[n]=[],k[n].similar=i),k[n].push(t)}),this}function nr(n){return f.getCssText(e,n)}function dt(n,t){return p(n,t.inline)?c:p(n,t.block)?c:t.selector?1==n.nodeType&&o.is(n,t.selector):void 0}function p(n,t){return n=n||"",t=t||"",n=""+(n.nodeName||n),t=""+(t.nodeName||t),n.toLowerCase()==t.toLowerCase()}function ii(n,t){return vt(o.getStyle(n,t),t)}function vt(n,t){return("color"==t||"backgroundColor"==t)&&(n=o.toHex(n)),"fontWeight"==t&&700==n&&(n="bold"),"fontFamily"==t&&(n=n.replace(/[\'\"]/g,"").replace(/,\s+/g,",")),""+n}function b(n,t){return"string"!=typeof n?n=n(t):t&&(n=n.replace(/%(\w+)/g,function(n,i){return t[i]||n})),n}function rt(n){return n&&3===n.nodeType&&/^([\t \r\n]+|)$/.test(n.nodeValue)}function ti(n,t,i){var r=o.create(t,i);return n.parentNode.insertBefore(r,n),r.appendChild(n),r}function et(t,i,r){function b(n){function y(n){return"BR"==n.nodeName&&n.getAttribute("data-mce-bogus")&&!n.nextSibling}var e,t,r,s,v;if(e=t=n?f:u,s=n?"previousSibling":"nextSibling",v=o.getRoot(),3==e.nodeType&&!rt(e)&&(n?c>0:h<e.nodeValue.length))return e;for(;;){if(!i[0].block_expand&&a(t))return t;for(r=t[s];r;r=r[s])if(!l(r)&&!rt(r)&&!y(r))return t;if(t.parentNode==v){e=t;break}t=t.parentNode}return e}function g(n,t){for(t===ft&&(t=3===n.nodeType?n.length:n.childNodes.length);n&&n.hasChildNodes();)n=n.childNodes[t],n&&(t=3===n.nodeType?n.length:n.childNodes.length);return{node:n,offset:t}}function tt(n){for(var t=n;t;){if(1===t.nodeType&&d(t))return"false"===d(t)?t:n;t=t.parentNode}return n}function et(t,i,u){function c(n,t){var i,f,e=n.nodeValue;return"undefined"==typeof t&&(t=u?e.length:0),u?(i=e.lastIndexOf(" ",t),f=e.lastIndexOf(" ",t),i=i>f?i:f,-1===i||r||i++):(i=e.indexOf(" ",t),f=e.indexOf(" ",t),i=-1!==i&&(-1===f||f>i)?i:f),i}var l,f,s,h;if(3===t.nodeType){if(s=c(t,i),-1!==s)return{container:t,offset:s};h=t}for(l=new n(t,o.getParent(t,a)||e.getBody());f=l[u?"prev":"next"]();)if(3===f.nodeType){if(h=f,s=c(f),-1!==s)return{container:f,offset:s}}else if(a(f))break;if(h)return i=u?0:h.length,{container:h,offset:i}}function k(n,r){var s,u,e,f;for(3==n.nodeType&&0===n.nodeValue.length&&n[r]&&(n=n[r]),s=it(n),u=0;u<s.length;u++)for(e=0;e<i.length;e++)if(f=i[e],!("collapsed"in f&&f.collapsed!==t.collapsed)&&o.is(s[u],f.selector))return s[u];return n}function nt(n,t){var r,u=o.getRoot();if(i[0].wrapper||(r=o.getParent(n,i[0].block,u)),r||(r=o.getParent(3==n.nodeType?n.parentNode:n,function(n){return n!=u&&yt(n)})),r&&i[0].wrapper&&(r=it(r,"ul,ol").reverse()[0]||r),!r)for(r=n;r[t]&&!a(r[t])&&(r=r[t],!p(r,"br")););return r||n}var w,s,y,f=t.startContainer,c=t.startOffset,u=t.endContainer,h=t.endOffset;if(1==f.nodeType&&f.hasChildNodes()&&(w=f.childNodes.length-1,f=f.childNodes[c>w?w:c],3==f.nodeType&&(c=0)),1==u.nodeType&&u.hasChildNodes()&&(w=u.childNodes.length-1,u=u.childNodes[h>w?w:h-1],3==u.nodeType&&(h=u.nodeValue.length)),f=tt(f),u=tt(u),(l(f.parentNode)||l(f))&&(f=l(f)?f:f.parentNode,f=f.nextSibling||f,3==f.nodeType&&(c=0)),(l(u.parentNode)||l(u))&&(u=l(u)?u:u.parentNode,u=u.previousSibling||u,3==u.nodeType&&(h=u.length)),i[0].inline&&(t.collapsed&&(y=et(f,c,!0),y&&(f=y.container,c=y.offset),y=et(u,h),y&&(u=y.container,h=y.offset)),s=g(u,h),s.node)){for(;s.node&&0===s.offset&&s.node.previousSibling;)s=g(s.node.previousSibling);s.node&&s.offset>0&&3===s.node.nodeType&&" "===s.node.nodeValue.charAt(s.offset-1)&&s.offset>1&&(u=s.node,u.splitText(s.offset-1))}return(i[0].inline||i[0].block_expand)&&(i[0].inline&&3==f.nodeType&&0!==c||(f=b(!0)),i[0].inline&&3==u.nodeType&&h!==u.nodeValue.length||(u=b())),i[0].selector&&i[0].expand!==v&&!i[0].inline&&(f=k(f,"previousSibling"),u=k(u,"nextSibling")),(i[0].block||i[0].selector)&&(f=nt(f,"previousSibling"),u=nt(u,"nextSibling"),i[0].block&&(a(f)||(f=b(!0)),a(u)||(u=b()))),1==f.nodeType&&(c=ut(f),f=f.parentNode),1==u.nodeType&&(h=ut(u)+1,u=u.parentNode),{startContainer:f,startOffset:c,endContainer:u,endOffset:h}}function di(n,t){return t.links&&"A"==n.tagName}function ht(n,t,i,r){var u,f,e;if(!dt(i,n)&&!di(i,n))return v;if("all"!=n.remove)for(s(n.styles,function(u,f){u=vt(b(u,t),f),"number"==typeof f&&(f=u,r=0),(n.remove_similar||!r||p(ii(r,f),u))&&o.setStyle(i,f,""),e=1}),e&&""===o.getAttrib(i,"style")&&(i.removeAttribute("style"),i.removeAttribute("data-mce-style")),s(n.attributes,function(n,u){var f;if(n=b(n,t),"number"==typeof u&&(u=n,r=0),!r||p(o.getAttrib(r,u),n)){if("class"==u&&(n=o.getAttrib(i,u),n&&(f="",s(n.split(/\s+/),function(n){/mce\w+/.test(n)&&(f+=(f?" ":"")+n)}),f)))return void o.setAttrib(i,u,f);"class"==u&&i.removeAttribute("className"),ki.test(u)&&i.removeAttribute("data-mce-"+u),i.removeAttribute(u)}}),s(n.classes,function(n){n=b(n,t),(!r||o.hasClass(r,n))&&o.removeClass(i,n)}),f=o.getAttribs(i),u=0;u<f.length;u++)if(0!==f[u].nodeName.indexOf("_"))return v;if("none"!=n.remove)return bi(i,n),c}function bi(n,t){function r(n,t,i){return n=ni(n,t,i),!n||"BR"==n.nodeName||a(n)}var u=n.parentNode,i;t.block&&(at?u==o.getRoot()&&(t.list_block&&p(n,t.list_block)||s(st(n.childNodes),function(n){ct(at,n.nodeName.toLowerCase())?i?i.appendChild(n):(i=ti(n,at),o.setAttribs(i,e.settings.forced_root_block_attrs)):i=0})):a(n)&&!a(u)&&(r(n,v)||r(n.firstChild,c,1)||n.insertBefore(o.create("br"),n.firstChild),r(n,c)||r(n.lastChild,v,1)||n.appendChild(o.create("br")))),t.selector&&t.inline&&!p(t.inline,n)||o.remove(n,1)}function ni(n,t,i){if(n)for(t=t?"nextSibling":"previousSibling",n=i?n:n[t];n;n=n[t])if(1==n.nodeType||!rt(n))return n}function hi(n,t){function f(n,t){for(i=n;i;i=i[t]){if(3==i.nodeType&&0!==i.nodeValue.length)return n;if(1==i.nodeType&&!l(i))return i}return n}var i,u,e=new r(o);if(n&&t&&(n=f(n,"previousSibling"),t=f(t,"nextSibling"),e.compare(n,t))){for(i=n.nextSibling;i&&i!=t;)u=i,i=i.nextSibling,n.appendChild(u);return o.remove(t),s(st(t.childNodes),function(t){n.appendChild(t)}),n}return t}function ei(t,i){var r,u,f;return r=t[i?"startContainer":"endContainer"],u=t[i?"startOffset":"endOffset"],1==r.nodeType&&(f=r.childNodes.length-1,!i&&u&&u--,r=r.childNodes[u>f?f:u]),3===r.nodeType&&i&&u>=r.nodeValue.length&&(r=new n(r,e.getBody()).next()||r),3!==r.nodeType||i||0!==u||(r=new n(r,e.getBody()).prev()||r),r}function ui(t,i,r,u){function v(n){var t=o.create("span",{id:s,"data-mce-bogus":!0,style:b?"color:red":""});return n&&t.appendChild(e.getDoc().createTextNode(tt)),t}function a(n,t){for(;n;){if(3===n.nodeType&&n.nodeValue!==tt||n.childNodes.length>1)return!1;t&&1===n.nodeType&&t.push(n),n=n.firstChild}return!0}function f(n){for(;n;){if(n.id===s)return n;n=n.parentNode}}function p(t){var i;if(t)for(i=new n(t,t),t=i.current();t;t=i.next())if(3===t.nodeType)return t}function c(n,t){var r,i;if(n)i=h.getRng(!0),a(n)?(t!==!1&&(i.setStartBefore(n),i.setEndBefore(n)),o.remove(n)):(r=p(n),r.nodeValue.charAt(0)===tt&&(r.deleteData(0,1),i.startContainer==r&&i.startOffset>0&&i.setStart(r,i.startOffset-1),i.endContainer==r&&i.endOffset>0&&i.setEnd(r,i.endOffset-1)),o.remove(n,1)),h.setRng(i);else if(n=f(h.getStart()),!n)for(;n=o.get(s);)c(n,!1)}function k(){var n,t,o,u,s,c,e;n=h.getRng(!0),u=n.startOffset,c=n.startContainer,e=c.nodeValue,t=f(h.getStart()),t&&(o=p(t)),e&&u>0&&u<e.length&&/\w/.test(e.charAt(u))&&/\w/.test(e.charAt(u-1))?(s=h.getBookmark(),n.collapse(!0),n=et(n,w(i)),n=lt.split(n),nt(i,r,n),h.moveToBookmark(s)):(t&&o.nodeValue===tt?nt(i,r,t):(t=v(!0),o=t.firstChild,n.insertNode(t),u=1,nt(i,r,t)),h.setCursorLocation(o,u))}function d(){var t=h.getRng(!0),c,k,b,a,n,f,l=[],e,s,p;for(c=t.startContainer,k=t.startOffset,n=c,3==c.nodeType&&(k!=c.nodeValue.length&&(a=!0),n=n.parentNode);n;){if(y(n,i,r,u)){f=n;break}n.nextSibling&&(a=!0),l.push(n),n=n.parentNode}if(f)if(a)b=h.getBookmark(),t.collapse(!0),t=et(t,w(i),!0),t=lt.split(t),wt(i,r,t),h.moveToBookmark(b);else{for(s=v(),n=s,e=l.length-1;e>=0;e--)n.appendChild(o.clone(l[e],!1)),n=n.firstChild;n.appendChild(o.doc.createTextNode(tt)),n=n.firstChild,p=o.getParent(f,yt),p&&o.isEmpty(p)?f.parentNode.replaceChild(s,f):o.insertAfter(s,f),h.setCursorLocation(n,1),o.isEmpty(f)&&o.remove(f)}}function l(){var n;n=f(h.getStart()),n&&!o.isEmpty(n)&&ri(n,function(n){1!=n.nodeType||n.id===s||o.isEmpty(n)||o.setAttrib(n,"data-mce-bogus",null)},"childNodes")}var s="_mce_caret",b=e.settings.caret_debug;e._hasCaretEvents||(bt=function(){var t=[],n;if(a(f(h.getStart()),t))for(n=t.length;n--;)o.setAttrib(t[n],"data-mce-bogus","1")},gt=function(n){var t=n.keyCode;c(),(8==t||37==t||39==t)&&c(f(h.getStart())),l()},e.on("SetContent",function(n){n.selection&&l()}),e._hasCaretEvents=!0),"apply"==t?k():d()}function oi(t){var i=t.startContainer,u=t.startOffset,c,f,r,e,s;if(3==i.nodeType&&u>=i.nodeValue.length&&(u=ut(i),i=i.parentNode,c=!0),1==i.nodeType)for(e=i.childNodes,i=e[Math.min(u,e.length-1)],f=new n(i,o.getParent(i,o.isBlock)),(u>e.length-1||c)&&f.next(),r=f.current();r;r=f.next())if(3==r.nodeType&&!rt(r))return s=o.create("a",{"data-mce-bogus":"all"},tt),r.parentNode.insertBefore(s,r),t.setStart(r,0),h.setRng(t),void o.remove(s)}var g={},o=e.dom,h=e.selection,lt=new t(o),ct=e.schema.isValidChild,a=o.isBlock,at=e.settings.forced_root_block,ut=o.nodeIndex,tt="﻿",ki=/^(src|href|style)$/,v=!1,c=!0,k,ft,d=o.getContentEditable,gt,bt,l=i.isBookmarkNode,s=u.each,st=u.grep,ri=u.walk,ci=u.extend;ci(this,{get:w,register:ot,unregister:vi,apply:nt,remove:wt,toggle:li,match:kt,matchAll:ai,matchNode:y,canApply:wi,formatChanged:gi,getCssText:nr}),yi(),pi(),e.on("BeforeGetContent",function(n){bt&&"raw"!=n.format&&bt()}),e.on("mouseup keydown",function(n){gt&&gt(n)})}}),i(or,[u,r,ni],function(n,t,i){var u=t.trim,r;return r=new RegExp(["<span[^>]+data-mce-bogus[^>]+>[​﻿]+<\\/span>",'\\s?data-mce-selected="[^"]+"'].join("|"),"gi"),function(t){function l(){for(var n=t.getContent({format:"raw",no_events:1}),o=/<(\w+) [^>]*data-mce-bogus="all"[^>]*>/g,l,f,s,e,h=t.schema,n=n.replace(r,""),c=h.getShortEndedElements();e=o.exec(n);)f=o.lastIndex,s=e[0].length,l=c[e[1]]?f:i.findEndTag(h,n,f),n=n.substring(0,f-s)+n.substring(l),o.lastIndex=f-s;return u(n)}function s(n){e.typing=!1,e.add({},n)}var e=this,o=0,f=[],a,c,h=0;return t.on("init",function(){e.add()}),t.on("BeforeExecCommand",function(n){var t=n.command;"Undo"!=t&&"Redo"!=t&&"mceRepaint"!=t&&e.beforeChange()}),t.on("ExecCommand",function(n){var t=n.command;"Undo"!=t&&"Redo"!=t&&"mceRepaint"!=t&&s(n)}),t.on("ObjectResizeStart",function(){e.beforeChange()}),t.on("SaveContent ObjectResized blur",s),t.on("DragEnd",s),t.on("KeyUp",function(i){var r=i.keyCode;(r>=33&&36>=r||r>=37&&40>=r||45==r||13==r||i.ctrlKey)&&(s(),t.nodeChanged()),(46==r||8==r||n.mac&&(91==r||93==r))&&t.nodeChanged(),c&&e.typing&&(t.isDirty()||(t.isNotDirty=!f[0]||l()==f[0].content,t.isNotDirty||t.fire("change",{level:f[0],lastLevel:null})),t.fire("TypingUndo"),c=!1,t.nodeChanged())}),t.on("KeyDown",function(n){var t=n.keyCode;return t>=33&&36>=t||t>=37&&40>=t||45==t?void(e.typing&&s(n)):void((16>t||t>20)&&224!=t&&91!=t&&!e.typing&&(e.beforeChange(),e.typing=!0,e.add({},n),c=!0))}),t.on("MouseDown",function(n){e.typing&&s(n)}),t.addShortcut("ctrl+z","","Undo"),t.addShortcut("ctrl+y,ctrl+shift+z","","Redo"),t.on("AddUndo Undo Redo ClearUndos",function(n){n.isDefaultPrevented()||t.nodeChanged()}),e={data:f,typing:!1,beforeChange:function(){h||(a=t.selection.getBookmark(2,!0))},add:function(n,i){var u,s=t.settings,r,e;if((n=n||{},n.content=l(),h||t.removed)||(r=f[o],t.fire("BeforeAddUndo",{level:n,lastLevel:r,originalEvent:i}).isDefaultPrevented())||r&&r.content==n.content)return null;if(f[o]&&(f[o].beforeBookmark=a),s.custom_undo_redo_levels&&f.length>s.custom_undo_redo_levels){for(u=0;u<f.length-1;u++)f[u]=f[u+1];f.length--,o=f.length}return n.bookmark=t.selection.getBookmark(2,!0),o<f.length-1&&(f.length=o+1),f.push(n),o=f.length-1,e={level:n,lastLevel:r,originalEvent:i},t.fire("AddUndo",e),o>0&&(t.isNotDirty=!1,t.fire("change",e)),n},undo:function(){var n;return e.typing&&(e.add(),e.typing=!1),o>0&&(n=f[--o],0===o&&(t.isNotDirty=!0),t.setContent(n.content,{format:"raw"}),t.selection.moveToBookmark(n.beforeBookmark),t.fire("undo",{level:n})),n},redo:function(){var n;return o<f.length-1&&(n=f[++o],t.setContent(n.content,{format:"raw"}),t.selection.moveToBookmark(n.bookmark),t.fire("redo",{level:n})),n},clear:function(){f=[],o=0,e.typing=!1,t.fire("ClearUndos")},hasUndo:function(){return o>0||e.typing&&f[0]&&l()!=f[0].content},hasRedo:function(){return o<f.length-1&&!this.typing},transact:function(n){e.beforeChange();try{h++,n()}finally{h--}e.add()}}}}),i(ri,[s,a,u],function(n,t,i){var r=i.ie&&i.ie<11;return function(u){function l(l){function at(n){return n&&f.isBlock(n)&&!/^(TD|TH|CAPTION|FORM)$/.test(n.nodeName)&&!/^(fixed|absolute)/i.test(n.style.position)&&"true"!==f.getContentEditable(n)}function lt(n){var t;f.isBlock(n)&&(t=o.getRng(),n.appendChild(f.create("span",null," ")),o.select(n),n.lastChild.outerHTML="",o.setRng(t))}function wt(n){var t=n,r=[],i;if(t){for(;t=t.firstChild;){if(f.isBlock(t))return;1!=t.nodeType||h[t.nodeName.toLowerCase()]||r.push(t)}for(i=r.length;i--;)t=r[i],!t.hasChildNodes()||t.firstChild==t.lastChild&&""===t.firstChild.nodeValue?f.remove(t):"A"==t.nodeName&&" "===(t.innerText||t.textContent)&&f.remove(t)}}function ft(t){function v(n){for(;n;){if(1==n.nodeType||3==n.nodeType&&n.data&&/[\r\n\s]/.test(n.data))return n;n=n.nextSibling}}var l,u,r,c=t,e,s;if(t){if((i.ie&&i.ie<9&&a&&a.firstChild&&a.firstChild==a.lastChild&&"BR"==a.firstChild.tagName&&f.remove(a.firstChild),/^(LI|DT|DD)$/.test(t.nodeName))&&(s=v(t.firstChild),s&&/^(UL|OL|DL)$/.test(s.nodeName)&&t.insertBefore(f.doc.createTextNode(" "),t.firstChild)),r=f.createRng(),i.ie||t.normalize(),t.hasChildNodes()){for(l=new n(t,t);u=l.current();){if(3==u.nodeType){r.setStart(u,0),r.setEnd(u,0);break}if(h[u.nodeName.toLowerCase()]){r.setStartBefore(u),r.setEndBefore(u);break}c=u,u=l.next()}u||(r.setStart(c,0),r.setEnd(c,0))}else"BR"==t.nodeName?t.nextSibling&&f.isBlock(t.nextSibling)?((!st||9>st)&&(e=f.create("br"),t.parentNode.insertBefore(e,t)),r.setStartBefore(t),r.setEndBefore(t)):(r.setStartAfter(t),r.setEndAfter(t)):(r.setStart(t,0),r.setEnd(t,0));o.setRng(r),f.remove(e),o.scrollIntoView(t)}}function ht(n){var t=e.forced_root_block;t&&t.toLowerCase()===n.tagName.toLowerCase()&&f.setAttribs(n,e.forced_root_block_attrs)}function ot(n){var u=v,t,i,o,h=s.getTextInlineElements();if(n||"TABLE"==nt?(t=f.create(n||p),ht(t)):t=a.cloneNode(!1),o=t,e.keep_styles!==!1)do if(h[u.nodeName]){if("_mce_caret"==u.id)continue;i=u.cloneNode(!1),f.setAttrib(i,"id",""),t.hasChildNodes()?(i.appendChild(t.firstChild),t.appendChild(i)):(o=i,t.appendChild(i))}while(u=u.parentNode);return r||(o.innerHTML='<br data-mce-bogus="1">'),t}function ct(t){var r,i,u;if(3==v.nodeType&&(t?d>0:d<v.nodeValue.length))return!1;if(v.parentNode==a&&it&&!t||t&&1==v.nodeType&&v==a.firstChild)return!0;if("TABLE"===v.nodeName||v.previousSibling&&"TABLE"==v.previousSibling.nodeName)return it&&!t||!it&&t;for(r=new n(v,a),3==v.nodeType&&(t&&0===d?r.prev():t||d!=v.nodeValue.length||r.next());i=r.current();){if(1===i.nodeType){if(!i.getAttribute("data-mce-bogus")&&(u=i.nodeName.toLowerCase(),h[u]&&"br"!==u))return!1}else if(3===i.nodeType&&!/^[ \t\r\n]*$/.test(i.nodeValue))return!1;t?r.prev():r.next()}return!0}function vt(n,t){var r,e,o,i,c,l,h=p||"P";if(e=f.getParent(n,f.isBlock),l=u.getBody().nodeName.toLowerCase(),!e||!at(e)){if(e=e||ut,!e.hasChildNodes())return r=f.create(h),ht(r),e.appendChild(r),b.setStart(r,0),b.setEnd(r,0),r;for(i=n;i.parentNode!=e;)i=i.parentNode;for(;i&&!f.isBlock(i);)o=i,i=i.previousSibling;if(o&&s.isValidChild(l,h.toLowerCase())){for(r=f.create(h),ht(r),o.parentNode.insertBefore(r,o),i=o;i&&!f.isBlock(i);)c=i.nextSibling,r.appendChild(i),i=c;b.setStart(n,t),b.setEnd(n,t)}}return n}function kt(){function t(n){for(var t=w[n?"firstChild":"lastChild"];t&&1!=t.nodeType;)t=t[n?"nextSibling":"previousSibling"];return t===a}function n(){var n=w.parentNode;return/^(LI|DT|DD)$/.test(n.nodeName)?n:w}var i=w.parentNode.nodeName;/^(OL|UL|LI)$/.test(i)&&(p="LI"),y=p?ot(p):f.create("BR"),t(!0)&&t()?"LI"==i?f.insertAfter(y,n()):f.replace(y,w):t(!0)?"LI"==i?(f.insertAfter(y,n()),y.appendChild(f.doc.createTextNode(" ")),y.appendChild(w)):w.parentNode.insertBefore(y,w):t()?(f.insertAfter(y,n()),lt(y)):(w=n(),tt=b.cloneRange(),tt.setStartAfter(a),tt.setEndAfter(w),k=tt.extractContents(),"LI"==p&&"LI"==k.firstChild.nodeName?(y=k.firstChild,f.insertAfter(k,w)):(f.insertAfter(k,w),f.insertAfter(y,w))),f.remove(a),ft(y),c.add()}function rt(){u.execCommand("InsertLineBreak",!1,l)}function pt(n){do 3===n.nodeType&&(n.nodeValue=n.nodeValue.replace(/^[\r\n]+/,"")),n=n.firstChild;while(n)}function bt(n){for(var i=f.getRoot(),r,t=n;t!==i&&"false"!==f.getContentEditable(t);)"true"===f.getContentEditable(t)&&(r=t),t=t.parentNode;return t!==i?r:i}function yt(n){var t;r||(n.normalize(),t=n.lastChild,(!t||/^(left|right)$/gi.test(f.getStyle(t,"float",!0)))&&f.add(n,"br"))}var b,tt,ut,v,d,a,st,g,y,k,w,nt,et,p,it;if(b=o.getRng(!0),!l.isDefaultPrevented()){if(!b.collapsed)return void u.execCommand("Delete");if(new t(f).normalize(b),v=b.startContainer,d=b.startOffset,p=(e.force_p_newlines?"p":"")||e.forced_root_block,p=p?p.toUpperCase():"",st=f.doc.documentMode,g=l.shiftKey,1==v.nodeType&&v.hasChildNodes()&&(it=d>v.childNodes.length-1,v=v.childNodes[Math.min(d,v.childNodes.length-1)]||v,d=it&&3==v.nodeType?v.nodeValue.length:0),ut=bt(v)){if(c.beforeChange(),!f.isBlock(ut)&&ut!=f.getRoot())return void((!p||g)&&rt());if((p&&!g||!p&&g)&&(v=vt(v,d)),a=f.getParent(v,f.isBlock),w=a?f.getParent(a.parentNode,f.isBlock):null,nt=a?a.nodeName.toUpperCase():"",et=w?w.nodeName.toUpperCase():"","LI"!=et||l.ctrlKey||(a=w,nt=et),/^(LI|DT|DD)$/.test(nt)){if(!p&&g)return void rt();if(f.isEmpty(a))return void kt()}if("PRE"==nt&&e.br_in_pre!==!1){if(!g)return void rt()}else if(!p&&!g&&"LI"!=nt||p&&g)return void rt();p&&a===u.getBody()||(p=p||"P",ct()?(y=/^(H[1-6]|PRE|FIGURE)$/.test(nt)&&"HGROUP"!=et?ot(p):ot(),e.end_container_on_empty_block&&at(w)&&f.isEmpty(a)?y=f.split(w,a):f.insertAfter(y,a),ft(y)):ct(!0)?(y=a.parentNode.insertBefore(ot(),a),lt(y),ft(a)):(tt=b.cloneRange(),tt.setEndAfter(a),k=tt.extractContents(),pt(k),y=k.firstChild,f.insertAfter(k,a),wt(y),yt(a),ft(y)),f.setAttrib(y,"id",""),u.fire("NewBlock",{newBlock:y}),c.add())}}}var f=u.dom,o=u.selection,e=u.settings,c=u.undoManager,s=u.schema,h=s.getNonEmptyElements();u.on("keydown",function(n){13==n.keyCode&&l(n)!==!1&&n.preventDefault()})}}),i(rr,[],function(){return function(n){function e(){var e=t.getStart(),l=n.getBody(),o,b,a,k,h,c,v,g=-16777215,d,p,s,w,y;if(y=u.forced_root_block,e&&1===e.nodeType&&y){for(;e&&e!=l;){if(i[e.nodeName])return;e=e.parentNode}if(o=t.getRng(),o.setStart){b=o.startContainer,a=o.startOffset,k=o.endContainer,h=o.endOffset;try{p=n.getDoc().activeElement===l}catch(nt){}}else o.item&&(e=o.item(0),o=n.getDoc().body.createTextRange(),o.moveToElementText(e)),p=o.parentElement().ownerDocument===n.getDoc(),s=o.duplicate(),s.collapse(!0),a=-1*s.move("character",g),s.collapsed||(s=o.duplicate(),s.collapse(!1),h=-1*s.move("character",g)-a);for(e=l.firstChild,w=l.nodeName.toLowerCase();e;)if((3===e.nodeType||1==e.nodeType&&!i[e.nodeName])&&r.isValidChild(w,y.toLowerCase())){if(3===e.nodeType&&0===e.nodeValue.length){v=e,e=e.nextSibling,f.remove(v);continue}c||(c=f.create(y,n.settings.forced_root_block_attrs),e.parentNode.insertBefore(c,e),d=!0),v=e,e=e.nextSibling,c.appendChild(v)}else c=null,e=e.nextSibling;if(d&&p){if(o.setStart)o.setStart(b,a),o.setEnd(k,h),t.setRng(o);else try{o=n.getDoc().body.createTextRange(),o.moveToElementText(l),o.collapse(!0),o.moveStart("character",a),h>0&&o.moveEnd("character",h),o.select()}catch(nt){}n.nodeChanged()}}}var u=n.settings,f=n.dom,t=n.selection,r=n.schema,i=r.getBlockElements();u.forced_root_block&&n.on("NodeChange",e)}}),i(lr,[g,u,r,dt,a,s],function(n,i,r,u,f,e){var s=r.each,a=r.extend,y=r.map,p=r.inArray,c=r.explode,w=i.gecko,v=i.ie,l=i.ie&&i.ie<11,o=!0,h=!1;return function(r){function ot(n,t,i){var r;return n=n.toLowerCase(),(r=rt.exec[n])?(r(n,t,i),o):h}function it(n){var t;return n=n.toLowerCase(),(t=rt.state[n])?t(n):-1}function ct(n){var t;return n=n.toLowerCase(),(t=rt.value[n])?t(n):h}function tt(n,t){t=t||"exec",s(n,function(n,i){s(i.toLowerCase().split(","),function(i){rt[t][i]=n})})}function ut(n,i,u){return i===t&&(i=h),u===t&&(u=null),r.getDoc().execCommand(n,i,u)}function st(n){return d.match(n)}function g(n,i){d.toggle(n,i?{value:i}:t),r.nodeChanged()}function ft(n){ht=k.getBookmark(n)}function et(){k.moveToBookmark(ht)}var b=r.dom,k=r.selection,rt={state:{},exec:{},value:{}},nt=r.settings,d=r.formatter,ht;a(this,{execCommand:ot,queryCommandState:it,queryCommandValue:ct,addCommands:tt}),tt({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){r.undoManager.add()},"Cut,Copy,Paste":function(n){var f=r.getDoc(),u,t;try{ut(n)}catch(e){u=o}(u||!f.queryCommandSupported(n))&&(t=r.translate("Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead."),i.mac&&(t=t.replace(/Ctrl\+/g,"⌘+")),r.windowManager.alert(t))},unlink:function(){if(k.isCollapsed()){var n=k.getNode();return void("A"==n.tagName&&r.dom.remove(n,!0))}d.remove("link")},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(n){var t=n.substring(7);"full"==t&&(t="justify"),s("left,center,right,justify".split(","),function(n){t!=n&&d.remove("align"+n)}),g("align"+t),ot("mceRepaint")},"InsertUnorderedList,InsertOrderedList":function(n){var t,i;ut(n),t=b.getParent(k.getNode(),"ol,ul"),t&&(i=t.parentNode,/^(H[1-6]|P|ADDRESS|PRE)$/.test(i.nodeName)&&(ft(),b.split(i,t),et()))},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(n){g(n)},"ForeColor,HiliteColor,FontName":function(n,t,i){g(n,i)},FontSize:function(n,t,i){var r,u;i>=1&&7>=i&&(u=c(nt.font_size_style_values),r=c(nt.font_size_classes),i=r?r[i-1]||i:u[i-1]||i),g(n,i)},RemoveFormat:function(n){d.remove(n)},mceBlockQuote:function(){g("blockquote")},FormatBlock:function(n,t,i){return g(i||"p")},mceCleanup:function(){var n=k.getBookmark();r.setContent(r.getContent({cleanup:o}),{cleanup:o}),k.moveToBookmark(n)},mceRemoveNode:function(n,t,i){var u=i||k.getNode();u!=r.getBody()&&(ft(),r.dom.remove(u,o),et())},mceSelectNodeDepth:function(n,t,i){var u=0;b.getParent(k.getNode(),function(n){if(1==n.nodeType&&u++==i)return k.select(n),h},r.getBody())},mceSelectNode:function(n,t,i){k.select(i)},mceInsertContent:function(t,i,f){function ft(n){function u(n){return t[n]&&3==t[n].nodeType}var r,t,i;return r=k.getRng(!0),t=r.startContainer,i=r.startOffset,3==t.nodeType&&(i>0?n=n.replace(/^&nbsp;/," "):u("previousSibling")||(n=n.replace(/^ /,"&nbsp;")),i<t.length?n=n.replace(/&nbsp;(<br>|)$/," "):u("nextSibling")||(n=n.replace(/(&nbsp;| )(<br>|)$/,"&nbsp;"))),n}function ut(n){if(nt)for(e=n.firstChild;e;e=e.walk(!0))ot[e.name]&&e.attr("data-mce-new","true")}function et(){if(nt){var t=r.getBody(),n=new u(b);s(b.select("*[data-mce-new]"),function(i){i.removeAttribute("data-mce-new");for(var r=i.parentNode;r&&r!=t;r=r.parentNode)n.compare(r,i)&&b.remove(i,!0)})}}var it,w,o,a,p,d,c,h,e,l,g,nt,ot=r.schema.getTextInlineElements(),rt,y,tt;if("string"!=typeof f&&(nt=f.merge,f=f.content),/^ | $/.test(f)&&(f=ft(f)),it=r.parser,w=new n({},r.schema),g='<span id="mce_marker" data-mce-type="bookmark">&#xFEFF;&#x200B;</span>',d={content:f,format:"html",selection:!0},r.fire("BeforeSetContent",d),f=d.content,-1==f.indexOf("{$caret}")&&(f+="{$caret}"),f=f.replace(/\{\$caret\}/,g),h=k.getRng(),rt=h.startContainer||(h.parentElement?h.parentElement():null),y=r.getBody(),rt===y&&k.isCollapsed()&&b.isBlock(y.firstChild)&&b.isEmpty(y.firstChild)&&(h=b.createRng(),h.setStart(y.firstChild,0),h.setEnd(y.firstChild,0),k.setRng(h)),k.isCollapsed()||r.getDoc().execCommand("Delete",!1,null),o=k.getNode(),tt={context:o.nodeName.toLowerCase()},p=it.parse(f,tt),ut(p),e=p.lastChild,"mce_marker"==e.attr("id"))for(c=e,e=e.prev;e;e=e.walk(!0))if(3==e.type||!b.isBlock(e.name)){r.schema.isValidChild(e.parent.name,"span")&&e.parent.insert(c,e,"br"===e.name);break}if(tt.invalid){for(k.setContent(g),o=k.getNode(),a=r.getBody(),9==o.nodeType?o=e=a:e=o;e!==a;)o=e,e=e.parentNode;f=o==a?a.innerHTML:b.getOuterHTML(o),f=w.serialize(it.parse(f.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i,function(){return w.serialize(p)}))),o==a?b.setHTML(a,f):b.setOuterHTML(o,f)}else f=w.serialize(p),e=o.firstChild,l=o.lastChild,!e||e===l&&"BR"===e.nodeName?b.setHTML(o,f):k.setContent(f);et(),c=b.get("mce_marker"),k.scrollIntoView(c),h=b.createRng(),e=c.previousSibling,e&&3==e.nodeType?(h.setStart(e,e.nodeValue.length),v||(l=c.nextSibling,l&&3==l.nodeType&&(e.appendData(l.data),l.parentNode.removeChild(l)))):(h.setStartBefore(c),h.setEndBefore(c)),b.remove(c),k.setRng(h),r.fire("SetContent",d),r.addVisual()},mceInsertRawHTML:function(n,t,i){k.setContent("tiny_mce_marker"),r.setContent(r.getContent().replace(/tiny_mce_marker/g,function(){return i}))},mceToggleFormat:function(n,t,i){g(i)},mceSetContent:function(n,t,i){r.setContent(i)},"Indent,Outdent":function(n){var t,u,i;t=nt.indentation,u=/[a-z%]+$/i.exec(t),t=parseInt(t,10),it("InsertUnorderedList")||it("InsertOrderedList")?ut(n):(nt.forced_root_block||b.getParent(k.getNode(),b.isBlock)||d.apply("div"),s(k.getSelectedBlocks(),function(f){if("LI"!=f.nodeName){var e=r.getParam("indent_use_margin",!1)?"margin":"padding";e+="rtl"==b.getStyle(f,"direction",!0)?"Right":"Left","outdent"==n?(i=Math.max(0,parseInt(f.style[e]||0,10)-t),b.setStyle(f,e,i?i+u:"")):(i=parseInt(f.style[e]||0,10)+t+u,b.setStyle(f,e,i))}}))},mceRepaint:function(){if(w)try{ft(o),k.getSel()&&k.getSel().selectAllChildren(r.getBody()),k.collapse(o),et()}catch(n){}},InsertHorizontalRule:function(){r.execCommand("mceInsertContent",!1,"<hr />")},mceToggleVisualAid:function(){r.hasVisual=!r.hasVisual,r.addVisual()},mceReplaceContent:function(n,t,i){r.execCommand("mceInsertContent",!1,i.replace(/\{\$selection\}/g,k.getContent({format:"text"})))},mceInsertLink:function(n,t,i){var r;"string"==typeof i&&(i={href:i}),r=b.getParent(k.getNode(),"a"),i.href=i.href.replace(" ","%20"),r&&i.href||d.remove("link"),i.href&&d.apply("link",i,r)},selectAll:function(){var t=b.getRoot(),n;k.getRng().setStart?(n=b.createRng(),n.setStart(t,0),n.setEnd(t,t.childNodes.length),k.setRng(n)):(n=k.getRng(),n.item||(n.moveToElementText(t),n.select()))},"delete":function(){ut("Delete");var n=r.getBody();b.isEmpty(n)&&(r.setContent(""),n.firstChild&&b.isBlock(n.firstChild)?r.selection.setCursorLocation(n.firstChild,0):r.selection.setCursorLocation(n,0))},mceNewDocument:function(){r.setContent("")},InsertLineBreak:function(n,t,i){function it(){for(var i=new e(u,c),n,t=r.schema.getNonEmptyElements();n=i.next();)if(t[n.nodeName.toLowerCase()]||n.length>0)return!0}var nt=i,s,w,v,h=k.getRng(!0),a,u,tt,p;new f(b).normalize(h),a=h.startOffset,u=h.startContainer,1==u.nodeType&&u.hasChildNodes()&&(tt=a>u.childNodes.length-1,u=u.childNodes[Math.min(a,u.childNodes.length-1)]||u,a=tt&&3==u.nodeType?u.nodeValue.length:0);var c=b.getParent(u,b.isBlock),g=c?c.nodeName.toUpperCase():"",y=c?b.getParent(c.parentNode,b.isBlock):null,d=y?y.nodeName.toUpperCase():"",rt=nt&&nt.ctrlKey;return"LI"!=d||rt||(c=y,g=d),u&&3==u.nodeType&&a>=u.nodeValue.length&&(l||it()||(s=b.create("br"),h.insertNode(s),h.setStartAfter(s),h.setEndAfter(s),w=!0)),s=b.create("br"),h.insertNode(s),p=b.doc.documentMode,l&&"PRE"==g&&(!p||8>p)&&s.parentNode.insertBefore(b.doc.createTextNode("\r"),s),v=b.create("span",{},"&nbsp;"),s.parentNode.insertBefore(v,s),k.scrollIntoView(v),b.remove(v),w?(h.setStartBefore(s),h.setEndBefore(s)):(h.setStartAfter(s),h.setEndAfter(s)),k.setRng(h),r.undoManager.add(),o}}),tt({"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(n){var r="align"+n.substring(7),i=k.isCollapsed()?[b.getParent(k.getNode(),b.isBlock)]:k.getSelectedBlocks(),t=y(i,function(n){return!!d.matchNode(n,r)});return-1!==p(t,o)},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(n){return st(n)},mceBlockQuote:function(){return st("blockquote")},Outdent:function(){var n;return nt.inline_styles&&((n=b.getParent(k.getStart(),b.isBlock))&&parseInt(n.style.paddingLeft,10)>0||(n=b.getParent(k.getEnd(),b.isBlock))&&parseInt(n.style.paddingLeft,10)>0)?o:it("InsertUnorderedList")||it("InsertOrderedList")||!nt.inline_styles&&!!b.getParent(k.getNode(),"BLOCKQUOTE")},"InsertUnorderedList,InsertOrderedList":function(n){var t=b.getParent(k.getNode(),"ul,ol");return t&&("insertunorderedlist"===n&&"UL"===t.tagName||"insertorderedlist"===n&&"OL"===t.tagName)}},"state"),tt({"FontSize,FontName":function(n){var i=0,t;return(t=b.getParent(k.getNode(),"span"))&&(i="fontsize"==n?t.style.fontSize:t.style.fontFamily.replace(/, /g,",").replace(/[\'\"]/g,"").toLowerCase()),i}},"value"),tt({Undo:function(){r.undoManager.undo()},Redo:function(){r.undoManager.redo()}})}}),i(lt,[r],function(n){function t(n,r){var e=this,o,h,s;if(n=f(n),r=e.settings=r||{},o=r.base_uri,/^([\w\-]+):([^\/]{2})/i.test(n)||/^\s*#/.test(n))return void(e.source=n);s=0===n.indexOf("//"),0!==n.indexOf("/")||s||(n=(o?o.protocol||"http":"http")+"://mce_host"+n),/^[\w\-]*:?\/\//.test(n)||(h=r.base_uri?r.base_uri.path:new t(location.href).directory,""===r.base_uri.protocol?n="//mce_host"+e.toAbsPath(h,n):(n=/([^#?]*)([#?]?.*)/.exec(n),n=(o&&o.protocol||"http")+"://mce_host"+e.toAbsPath(h,n[1])+n[2])),n=n.replace(/@@/g,"(mce_at)"),n=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(n),i(u,function(t,i){var r=n[i];r&&(r=r.replace(/\(mce_at\)/g,"@@")),e[t]=r}),o&&(e.protocol||(e.protocol=o.protocol),e.userInfo||(e.userInfo=o.userInfo),e.port||"mce_host"!==e.host||(e.port=o.port),e.host&&"mce_host"!==e.host||(e.host=o.host),e.source=""),s&&(e.protocol="")}var i=n.each,f=n.trim,u="source protocol authority userInfo user password host port relative path directory file query anchor".split(" "),r={ftp:21,http:80,https:443,mailto:25};return t.prototype={setPath:function(n){var t=this;n=/^(.*?)\/?(\w+)?$/.exec(n),t.path=n[0],t.directory=n[1],t.file=n[2],t.source="",t.getURI()},toRelative:function(n){var r=this,u,i,f;return"./"===n?n:(n=new t(n,{base_uri:r}),"mce_host"!=n.host&&r.host!=n.host&&n.host||r.port!=n.port||r.protocol!=n.protocol&&""!==n.protocol)?n.getURI():(i=r.getURI(),f=n.getURI(),i==f||"/"==i.charAt(i.length-1)&&i.substr(0,i.length-1)==f?i:(u=r.toRelPath(r.path,n.path),n.query&&(u+="?"+n.query),n.anchor&&(u+="#"+n.anchor),u))},toAbsolute:function(n,i){return n=new t(n,{base_uri:this}),n.getURI(i&&this.isSameOrigin(n))},isSameOrigin:function(n){if(this.host==n.host&&this.protocol==n.protocol){if(this.port==n.port)return!0;var t=r[this.protocol];if(t&&(this.port||t)==(n.port||t))return!0}return!1},toRelPath:function(n,t){var r,f=0,e="",i,u;if(n=n.substring(0,n.lastIndexOf("/")),n=n.split("/"),r=t.split("/"),n.length>=r.length)for(i=0,u=n.length;u>i;i++)if(i>=r.length||n[i]!=r[i]){f=i+1;break}if(n.length<r.length)for(i=0,u=r.length;u>i;i++)if(i>=n.length||n[i]!=r[i]){f=i+1;break}if(1===f)return t;for(i=0,u=n.length-(f-1);u>i;i++)e+="../";for(i=f-1,u=r.length;u>i;i++)e+=i!=f-1?"/"+r[i]:r[i];return e},toAbsPath:function(n,t){var r,e=0,f=[],o,u;for(o=/\/$/.test(t)?"/":"",n=n.split("/"),t=t.split("/"),i(n,function(n){n&&f.push(n)}),n=f,r=t.length-1,f=[];r>=0;r--)0!==t[r].length&&"."!==t[r]&&(".."!==t[r]?e>0?e--:f.push(t[r]):e++);return r=n.length-e,u=0>=r?f.reverse().join("/"):n.slice(0,r).join("/")+"/"+f.reverse().join("/"),0!==u.indexOf("/")&&(u="/"+u),o&&u.lastIndexOf("/")!==u.length-1&&(u+=o),u},getURI:function(n){var i,t=this;return(!t.source||n)&&(i="",n||(i+=t.protocol?t.protocol+"://":"//",t.userInfo&&(i+=t.userInfo+"@"),t.host&&(i+=t.host),t.port&&(i+=":"+t.port)),t.path&&(i+=t.path),t.query&&(i+="?"+t.query),t.anchor&&(i+="#"+t.anchor),t.source=i),t.source}},t}),i(b,[r],function(n){function u(){}var t=n.each,f=n.extend,r,i;return u.extend=r=function(n){function e(){var t,u,r,n=this;if(!i&&(n.init&&n.init.apply(n,arguments),u=n.Mixins))for(t=u.length;t--;)r=u[t],r.init&&r.init.apply(n,arguments)}function a(){return this}function l(n,t){return function(){var i=this,f=i._super,r;return i._super=u[n],r=t.apply(i,arguments),i._super=f,r}}var c=this,u=c.prototype,h,o,s;i=!0,h=new c,i=!1,n.Mixins&&(t(n.Mixins,function(t){t=t;for(var i in t)"init"!==i&&(n[i]=t[i])}),u.Mixins&&(n.Mixins=u.Mixins.concat(n.Mixins))),n.Methods&&t(n.Methods.split(","),function(t){n[t]=a}),n.Properties&&t(n.Properties.split(","),function(t){var i="_"+t;n[t]=function(n){var t=this,r;return n!==r?(t[i]=n,t):t[i]}}),n.Statics&&t(n.Statics,function(n,t){e[t]=n}),n.Defaults&&u.Defaults&&(n.Defaults=f({},u.Defaults,n.Defaults));for(o in n)s=n[o],h[o]="function"==typeof s&&u[o]?l(o,s):s;return e.prototype=h,e.constructor=e,e.extend=r,e},u}),i(ht,[r],function(n){function t(n){function u(){return!1}function f(){return!0}function l(i,r){var c,s,l,h;if(i=i.toLowerCase(),r=r||{},r.type=i,r.target||(r.target=e),r.preventDefault||(r.preventDefault=function(){r.isDefaultPrevented=f},r.stopPropagation=function(){r.isPropagationStopped=f},r.stopImmediatePropagation=function(){r.isImmediatePropagationStopped=f},r.isDefaultPrevented=u,r.isPropagationStopped=u,r.isImmediatePropagationStopped=u),n.beforeFire&&n.beforeFire(r),c=t[i])for(s=0,l=c.length;l>s;s++){if(c[s]=h=c[s],h.once&&o(i,h),r.isImmediatePropagationStopped())return r.stopPropagation(),r;if(h.call(e,r)===!1)return r.preventDefault(),r}return r}function s(n,f,e){var o,h,s;if(f===!1&&(f=u),f)for(h=n.toLowerCase().split(" "),s=h.length;s--;)n=h[s],o=t[n],o||(o=t[n]=[],r(n,!0)),e?o.unshift(f):o.push(f);return i}function o(n,u){var o,f,h,s,e;if(n)for(s=n.toLowerCase().split(" "),o=s.length;o--;){if(n=s[o],f=t[n],!n){for(h in t)r(h,!1),delete t[h];return i}if(f){if(u)for(e=f.length;e--;)f[e]===u&&(f=f.slice(0,e).concat(f.slice(e+1)),t[n]=f);else f.length=0;f.length||(r(n,!1),delete t[n])}}else{for(n in t)r(n,!1);t={}}return i}function c(n,t,i){return t.once=!0,s(n,t,i)}function h(n){return n=n.toLowerCase(),!(!t[n]||0===t[n].length)}var i=this,e,t={},r;n=n||{},e=n.scope||i,r=n.toggleEvent||u,i.fire=l,i.on=s,i.off=o,i.once=c,i.has=h}var i=n.makeMap("focus blur focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange mouseout mouseenter mouseleave wheel keydown keypress keyup input contextmenu dragstart dragend dragover draggesture dragdrop drop drag submit compositionstart compositionend compositionupdate touchstart touchend"," ");return t.isNative=function(n){return!!i[n.toLowerCase()]},t}),i(ot,[b],function(n){function u(n){for(var r=[],t=n.length,i;t--;)i=n[t],i.__checked||(r.push(i),i.__checked=1);for(t=r.length;t--;)delete r[t].__checked;return r}var f=/^([\w\\*]+)?(?:#([\w\\]+))?(?:\.([\w\\\.]+))?(?:\[\@?([\w\\]+)([\^\$\*!~]?=)([\w\\]+)\])?(?:\:(.+))?/i,r=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=/^\s*|\s*$/g,t,i=n.extend({init:function(n){function h(n){if(n)return n=n.toLowerCase(),function(t){return"*"===n||t.type===n}}function s(n){if(n)return function(t){return t._name===n}}function l(n){if(n)return n=n.split("."),function(t){for(var i=n.length;i--;)if(!t.hasClass(n[i]))return!1;return!0}}function c(n,t,i){if(n)return function(r){var u=r[n]?r[n]():"";return t?"="===t?u===i:"*="===t?u.indexOf(i)>=0:"~="===t?(" "+u+" ").indexOf(" "+i+" ")>=0:"!="===t?u!=i:"^="===t?0===u.indexOf(i):"$="===t?u.substr(u.length-i.length)===i:!1:!!i}}function i(n){var i;if(n)return n=/(?:not\((.+)\))|(.+)/i.exec(n),n[1]?(i=t(n[1],[]),function(n){return!o(n,i)}):(n=n[2],function(t,i,r){return"first"===n?0===i:"last"===n?i===r-1:"even"===n?i%2==0:"odd"===n?i%2==1:t[n]?t[n]():!1})}function u(n,t,r){function o(n){n&&t.push(n)}var u;return u=f.exec(n.replace(e,"")),o(h(u[1])),o(s(u[2])),o(l(u[3])),o(c(u[4],u[5],u[6])),o(i(u[7])),t.psuedo=!!u[7],t.direct=r,t}function t(n,i){var o=[],s,f,e;do if(r.exec(""),f=r.exec(n),f&&(n=f[3],o.push(f[1]),f[2])){s=f[3];break}while(f);for(s&&t(s,i),n=[],e=0;e<o.length;e++)">"!=o[e]&&n.push(u(o[e],[],">"===o[e-1]));return i.push(n),i}var o=this.match;this._selectors=t(n,[])},match:function(n,t){var h,v,u,s,a,r,f,e,o,y,c,l,i;for(t=t||this._selectors,h=0,v=t.length;v>h;h++){for(a=t[h],s=a.length,i=n,l=0,u=s-1;u>=0;u--)for(e=a[u];i;){if(e.psuedo)for(c=i.parent().items(),o=y=c.length;o--&&c[o]!==i;);for(r=0,f=e.length;f>r;r++)if(!e[r](i,o,y)){r=f+1;break}if(r===f){l++;break}if(u===s-1)break;i=i.parent()}if(l===s)return!0}return!1},find:function(n){function o(n,t,i){for(var u,s,r,h=t[i],e=0,c=n.length;c>e;e++){for(r=n[e],u=0,s=h.length;s>u;u++)if(!h[u](r,e,c)){u=s+1;break}if(u===s)i==t.length-1?f.push(r):r.items&&o(r.items(),t,i+1);else if(h.direct)return;r.items&&o(r.items(),t,i)}}var f=[],r,e,s=this._selectors;if(n.items){for(r=0,e=s.length;e>r;r++)o(n.items(),s[r],0);e>1&&(f=u(f))}return t||(t=i.Collection),new t(f)}});return i}),i(st,[r,ot,b],function(n,t,i){var r,u,f=Array.prototype.push,e=Array.prototype.slice;return u={length:0,init:function(n){n&&this.add(n)},add:function(t){var i=this;return n.isArray(t)?f.apply(i,t):t instanceof r?i.add(t.toArray()):f.call(i,t),i},set:function(n){var t=this,r=t.length,i;for(t.length=0,t.add(n),i=t.length;r>i;i++)delete t[i];return t},filter:function(n){var o=this,i,e,s=[],u,f;for("string"==typeof n?(n=new t(n),f=function(t){return n.match(t)}):f=n,i=0,e=o.length;e>i;i++)u=o[i],f(u)&&s.push(u);return new r(s)},slice:function(){return new r(e.apply(this,arguments))},eq:function(n){return-1===n?this.slice(n):this.slice(n,+n+1)},each:function(t){return n.each(this,t),this},toArray:function(){return n.toArray(this)},indexOf:function(n){for(var i=this,t=i.length;t--&&i[t]!==n;);return t},reverse:function(){return new r(n.toArray(this).reverse())},hasClass:function(n){return this[0]?this[0].hasClass(n):!1},prop:function(n,t){var r=this,u,i;return t!==u?(r.each(function(i){i[n]&&i[n](t)}),r):(i=r[0],i&&i[n]?i[n]():void 0)},exec:function(t){var i=this,r=n.toArray(arguments).slice(1);return i.each(function(n){n[t]&&n[t].apply(n,r)}),i},remove:function(){for(var n=this.length;n--;)this[n].remove();return this}},n.each("fire on off show hide addClass removeClass append prepend before after reflow".split(" "),function(t){u[t]=function(){var i=n.toArray(arguments);return this.each(function(n){t in n&&n[t].apply(n,i)}),this}}),n.each("text name disabled active selected checked visible parent value data".split(" "),function(n){u[n]=function(t){return this.prop(n,t)}}),r=i.extend(u),t.Collection=r,r}),i(f,[r,o],function(n,t){var i=0;return{id:function(){return"mceu_"+i++},createFragment:function(n){return t.DOM.createFragment(n)},getWindowSize:function(){return t.DOM.getViewPort()},getSize:function(n){var i,r,t;return n.getBoundingClientRect?(t=n.getBoundingClientRect(),i=Math.max(t.width||t.right-t.left,n.offsetWidth),r=Math.max(t.height||t.bottom-t.bottom,n.offsetHeight)):(i=n.offsetWidth,r=n.offsetHeight),{width:i,height:r}},getPos:function(n,i){return t.DOM.getPos(n,i)},getViewPort:function(n){return t.DOM.getViewPort(n)},get:function(n){return document.getElementById(n)},addClass:function(n,i){return t.DOM.addClass(n,i)},removeClass:function(n,i){return t.DOM.removeClass(n,i)},hasClass:function(n,i){return t.DOM.hasClass(n,i)},toggleClass:function(n,i,r){return t.DOM.toggleClass(n,i,r)},css:function(n,i,r){return t.DOM.setStyle(n,i,r)},getRuntimeStyle:function(n,i){return t.DOM.getStyle(n,i,!0)},on:function(n,i,r,u){return t.DOM.bind(n,i,r,u)},off:function(n,i,r){return t.DOM.unbind(n,i,r)},fire:function(n,i,r){return t.DOM.fire(n,i,r)},innerHtml:function(n,i){t.DOM.setHTML(n,i)}}}),i(v,[b,r,ht,st,f],function(n,t,i,r,u){function e(n){return n._eventDispatcher||(n._eventDispatcher=new i({scope:n,toggleEvent:function(t,r){r&&i.isNative(t)&&(n._nativeEvents||(n._nativeEvents={}),n._nativeEvents[t]=!0,n._rendered&&n.bindPendingEvents())}})),n._eventDispatcher}var h="onmousewheel"in document,s=!1,o="mce-",f=n.extend({Statics:{classPrefix:o},isRtl:function(){return f.rtl},classPrefix:o,init:function(n){var i=this,r,f;if(i.settings=n=t.extend({},i.Defaults,n),i._id=n.id||u.id(),i._text=i._name="",i._width=i._height=0,i._aria={role:n.role},this._elmCache={},r=n.classes)for(r=r.split(" "),r.map={},f=r.length;f--;)r.map[r[f]]=!0;i._classes=r||[],i.visible(!0),t.each("title text width height name classes visible disabled active value".split(" "),function(t){var u=n[t],r;u!==r?i[t](u):i["_"+t]===r&&(i["_"+t]=!1)}),i.on("click",function(){if(i.disabled())return!1}),n.classes&&t.each(n.classes.split(" "),function(n){i.addClass(n)}),i.settings=n,i._borderBox=i.parseBox(n.border),i._paddingBox=i.parseBox(n.padding),i._marginBox=i.parseBox(n.margin),n.hidden&&i.hide()},Properties:"parent,title,text,width,height,disabled,active,name,value",Methods:"renderHtml",getContainerElm:function(){return document.body},getParentCtrl:function(n){for(var i,t=this.getRoot().controlIdLookup;n&&t&&!(i=t[n.id]);)n=n.parentNode;return i},parseBox:function(n){var i,t=10;if(n)return"number"==typeof n?(n=n||0,{top:n,left:n,bottom:n,right:n}):(n=n.split(" "),i=n.length,1===i?n[1]=n[2]=n[3]=n[0]:2===i?(n[2]=n[0],n[3]=n[1]):3===i&&(n[3]=n[1]),{top:parseInt(n[0],t)||0,right:parseInt(n[1],t)||0,bottom:parseInt(n[2],t)||0,left:parseInt(n[3],t)||0})},borderBox:function(){return this._borderBox},paddingBox:function(){return this._paddingBox},marginBox:function(){return this._marginBox},measureBox:function(n,t){function r(t){var i=document.defaultView;return i?(t=t.replace(/[A-Z]/g,function(n){return"-"+n}),i.getComputedStyle(n,null).getPropertyValue(t)):n.currentStyle[t]}function i(n){var t=parseFloat(r(n),10);return isNaN(t)?0:t}return{top:i(t+"TopWidth"),right:i(t+"RightWidth"),bottom:i(t+"BottomWidth"),left:i(t+"LeftWidth")}},initLayoutRect:function(){var n=this,t=n.settings,f,b,o=n.getEl(),i,r,a,v,e,y,s,h;f=n._borderBox=n._borderBox||n.measureBox(o,"border"),n._paddingBox=n._paddingBox||n.measureBox(o,"padding"),n._marginBox=n._marginBox||n.measureBox(o,"margin"),h=u.getSize(o),y=t.minWidth,s=t.minHeight,a=y||h.width,v=s||h.height,i=t.width,r=t.height,e=t.autoResize,e="undefined"!=typeof e?e:!i&&!r,i=i||a,r=r||v;var l=f.left+f.right,c=f.top+f.bottom,w=t.maxWidth||65535,p=t.maxHeight||65535;return n._layoutRect=b={x:t.x||0,y:t.y||0,w:i,h:r,deltaW:l,deltaH:c,contentW:i-l,contentH:r-c,innerW:i-l,innerH:r-c,startMinWidth:y||0,startMinHeight:s||0,minW:Math.min(a,w),minH:Math.min(v,p),maxW:w,maxH:p,autoResize:e,scrollW:0},n._lastLayoutRect={},b},layoutRect:function(n){var o=this,t=o._layoutRect,u,i,s,e,r,h;return t||(t=o.initLayoutRect()),n?(s=t.deltaW,e=t.deltaH,n.x!==r&&(t.x=n.x),n.y!==r&&(t.y=n.y),n.minW!==r&&(t.minW=n.minW),n.minH!==r&&(t.minH=n.minH),i=n.w,i!==r&&(i=i<t.minW?t.minW:i,i=i>t.maxW?t.maxW:i,t.w=i,t.innerW=i-s),i=n.h,i!==r&&(i=i<t.minH?t.minH:i,i=i>t.maxH?t.maxH:i,t.h=i,t.innerH=i-e),i=n.innerW,i!==r&&(i=i<t.minW-s?t.minW-s:i,i=i>t.maxW-s?t.maxW-s:i,t.innerW=i,t.w=i+s),i=n.innerH,i!==r&&(i=i<t.minH-e?t.minH-e:i,i=i>t.maxH-e?t.maxH-e:i,t.innerH=i,t.h=i+e),n.contentW!==r&&(t.contentW=n.contentW),n.contentH!==r&&(t.contentH=n.contentH),u=o._lastLayoutRect,(u.x!==t.x||u.y!==t.y||u.w!==t.w||u.h!==t.h)&&(h=f.repaintControls,h&&h.map&&!h.map[o._id]&&(h.push(o),h.map[o._id]=!0),u.x=t.x,u.y=t.y,u.w=t.w,u.h=t.h),o):t},repaint:function(){var i=this,f,e,n,u,s=0,o=0,t,r;r=document.createRange?function(n){return n}:Math.round,f=i.getEl().style,n=i._layoutRect,t=i._lastRepaintRect||{},u=i._borderBox,s=u.left+u.right,o=u.top+u.bottom,n.x!==t.x&&(f.left=r(n.x)+"px",t.x=n.x),n.y!==t.y&&(f.top=r(n.y)+"px",t.y=n.y),n.w!==t.w&&(f.width=r(n.w-s)+"px",t.w=n.w),n.h!==t.h&&(f.height=r(n.h-o)+"px",t.h=n.h),i._hasBody&&n.innerW!==t.innerW&&(e=i.getEl("body").style,e.width=r(n.innerW)+"px",t.innerW=n.innerW),i._hasBody&&n.innerH!==t.innerH&&(e=e||i.getEl("body").style,e.height=r(n.innerH)+"px",t.innerH=n.innerH),i._lastRepaintRect=t,i.fire("repaint",{},!1)},on:function(n,t){function r(n){var t,r;return"string"!=typeof n?n:function(u){return t||i.parentsAndSelf().each(function(i){var u=i.settings.callbacks;if(u&&(t=u[n]))return r=i,!1}),t.call(r,u)}}var i=this;return e(i).on(n,r(t)),i},off:function(n,t){return e(this).off(n,t),this},fire:function(n,t,i){var u=this,r;if(t=t||{},t.control||(t.control=u),t=e(u).fire(n,t),i!==!1&&u.parent)for(r=u.parent();r&&!t.isPropagationStopped();)r.fire(n,t,!1),r=r.parent();return t},hasEventListeners:function(n){return e(this).has(n)},parents:function(n){for(var u=this,i=new r,t=u.parent();t;t=t.parent())i.add(t);return n&&(i=i.filter(n)),i},parentsAndSelf:function(n){return new r(this).add(this.parents(n))},next:function(){var n=this.parent().items();return n[n.indexOf(this)+1]},prev:function(){var n=this.parent().items();return n[n.indexOf(this)-1]},findCommonAncestor:function(n,t){for(var i;n;){for(i=t;i&&n!=i;)i=i.parent();if(n==i)break;n=n.parent()}return n},hasClass:function(n,t){var i=this._classes[t||"control"];return n=this.classPrefix+n,i&&!!i.map[n]},addClass:function(n,t){var r=this,i,u;return n=this.classPrefix+n,i=r._classes[t||"control"],i||(i=[],i.map={},r._classes[t||"control"]=i),i.map[n]||(i.map[n]=n,i.push(n),r._rendered&&(u=r.getEl(t),u&&(u.className=i.join(" ")))),r},removeClass:function(n,t){var u=this,i,r,f;if(n=this.classPrefix+n,i=u._classes[t||"control"],i&&i.map[n])for(delete i.map[n],r=i.length;r--;)i[r]===n&&i.splice(r,1);return u._rendered&&(f=u.getEl(t),f&&(f.className=i.join(" "))),u},toggleClass:function(n,t,i){var r=this;return t?r.addClass(n,i):r.removeClass(n,i),r},classes:function(n){var t=this._classes[n||"control"];return t?t.join(" "):""},innerHtml:function(n){return u.innerHtml(this.getEl(),n),this},getEl:function(n){var t=n?this._id+"-"+n:this._id;return this._elmCache[t]||(this._elmCache[t]=u.get(t)),this._elmCache[t]},visible:function(n){var t=this,i;return"undefined"!=typeof n?(t._visible!==n&&(t._rendered&&(t.getEl().style.display=n?"":"none"),t._visible=n,i=t.parent(),i&&(i._lastRect=null),t.fire(n?"show":"hide")),t):t._visible},show:function(){return this.visible(!0)},hide:function(){return this.visible(!1)},focus:function(){try{this.getEl().focus()}catch(n){}return this},blur:function(){return this.getEl().blur(),this},aria:function(n,t){var i=this,r=i.getEl(i.ariaTarget);return"undefined"==typeof t?i._aria[n]:(i._aria[n]=t,i._rendered&&r.setAttribute("role"==n?n:"aria-"+n,t),i)},encode:function(n,t){return t!==!1&&(n=this.translate(n)),(n||"").replace(/[&<>"]/g,function(n){return"&#"+n.charCodeAt(0)+";"})},translate:function(n){return f.translate?f.translate(n):n},before:function(n){var i=this,t=i.parent();return t&&t.insert(n,t.items().indexOf(i),!0),i},after:function(n){var i=this,t=i.parent();return t&&t.insert(n,t.items().indexOf(i)),i},remove:function(){var n=this,i=n.getEl(),t=n.parent(),e,o,r,f;if(n.items)for(r=n.items().toArray(),o=r.length;o--;)r[o].remove();return t&&t.items&&(e=[],t.items().each(function(t){t!==n&&e.push(t)}),t.items().set(e),t._lastRect=null),n._eventsRoot&&n._eventsRoot==n&&u.off(i),f=n.getRoot().controlIdLookup,f&&delete f[n._id],i&&i.parentNode&&i.parentNode.removeChild(i),n._rendered=!1,n},renderBefore:function(n){var t=this;return n.parentNode.insertBefore(u.createFragment(t.renderHtml()),n),t.postRender(),t},renderTo:function(n){var t=this;return n=n||t.getContainerElm(),n.appendChild(u.createFragment(t.renderHtml())),t.postRender(),t},postRender:function(){var n=this,f=n.settings,s,r,i,t,o,e,h;for(t in f)0===t.indexOf("on")&&n.on(t.substr(2),f[t]);if(n._eventsRoot){for(i=n.parent();!o&&i;i=i.parent())o=i._eventsRoot;if(o)for(t in o._nativeEvents)n._nativeEvents[t]=!0}n.bindPendingEvents(),f.style&&(s=n.getEl(),s&&(s.setAttribute("style",f.style),s.style.cssText=f.style)),n._visible||u.css(n.getEl(),"display","none"),n.settings.border&&(r=n.borderBox(),u.css(n.getEl(),{"border-top-width":r.top,"border-right-width":r.right,"border-bottom-width":r.bottom,"border-left-width":r.left})),e=n.getRoot(),e.controlIdLookup||(e.controlIdLookup={}),e.controlIdLookup[n._id]=n;for(h in n._aria)n.aria(h,n._aria[h]);n.fire("postrender",{},!1)},scrollIntoView:function(n){function c(n,t){for(var u,i=n,r=u=0;i&&i!=t&&i.nodeType;)r+=i.offsetLeft||0,u+=i.offsetTop||0,i=i.offsetParent;return{x:r,y:u}}var u=this.getEl(),t=u.parentNode,r,i,s,o,f,e,h=c(u,t);return r=h.x,i=h.y,s=u.offsetWidth,o=u.offsetHeight,f=t.clientWidth,e=t.clientHeight,"end"==n?(r-=f-s,i-=e-o):"center"==n&&(r-=f/2-s/2,i-=e/2-o/2),t.scrollLeft=r,t.scrollTop=i,this},bindPendingEvents:function(){function a(n){var i=t.getParentCtrl(n.target);i&&i.fire(n.type,n)}function v(){var t=n._lastHoverCtrl;t&&(t.fire("mouseleave",{target:t.getEl()}),t.parents().each(function(n){n.fire("mouseleave",{target:n.getEl()})}),n._lastHoverCtrl=null)}function y(i){var f=t.getParentCtrl(i.target),e=n._lastHoverCtrl,u=0,r,s,o;if(f!==e){if(n._lastHoverCtrl=f,s=f.parents().toArray().reverse(),s.push(f),e){for(o=e.parents().toArray().reverse(),o.push(e),u=0;u<o.length&&s[u]===o[u];u++);for(r=o.length-1;r>=u;r--)e=o[r],e.fire("mouseleave",{target:e.getEl()})}for(r=u;r<s.length;r++)f=s[r],f.fire("mouseenter",{target:f.getEl()})}}function l(n){n.preventDefault(),"mousewheel"==n.type?(n.deltaY=-1/40*n.wheelDelta,n.wheelDeltaX&&(n.deltaX=-1/40*n.wheelDeltaX)):(n.deltaX=0,n.deltaY=n.detail),n=t.fire("wheel",n)}var t=this,i,c,f,n,o,r,e;if(t._rendered=!0,o=t._nativeEvents){for(f=t.parents().toArray(),f.unshift(t),i=0,c=f.length;!n&&c>i;i++)n=f[i]._eventsRoot;for(n||(n=f[f.length-1]||t),t._eventsRoot=n,c=i,i=0;c>i;i++)f[i]._eventsRoot=n;e=n._delegates,e||(e=n._delegates={});for(r in o){if(!o)return!1;"wheel"!==r||s?("mouseenter"===r||"mouseleave"===r?n._hasMouseEnter||(u.on(n.getEl(),"mouseleave",v),u.on(n.getEl(),"mouseover",y),n._hasMouseEnter=1):e[r]||(u.on(n.getEl(),r,a),e[r]=!0),o[r]=!1):h?u.on(t.getEl(),"mousewheel",l):u.on(t.getEl(),"DOMMouseScroll",l)}}},getRoot:function(){for(var t,r,n=this,i=[];n;){if(n.rootControl){t=n.rootControl;break}i.push(n),t=n,n=n.parent()}for(t||(t=this),r=i.length;r--;)i[r].rootControl=t;return t},reflow:function(){return this.repaint(),this}});return f}),i(d,[],function(){var n={},t;return{add:function(t,i){n[t.toLowerCase()]=i},has:function(t){return!!n[t.toLowerCase()]},create:function(i,r){var u,e,f;if(!t){f=tinymce.ui;for(e in f)n[e.toLowerCase()]=f[e];t=!0}if("string"==typeof i?(r=r||{},r.type=i):(r=i,i=r.type),i=i.toLowerCase(),u=n[i],!u)throw new Error("Could not find control by type: "+i);return u=new u(r),u.type=i,u}}}),i(cr,[],function(){return function(n){function o(n){return n=n||t,n&&n.getAttribute("role")}function e(n){for(var r,i=n||t;i=i.parentNode;)if(r=o(i))return r}function v(n){var i=t;if(i)return i.getAttribute("aria-"+n)}function a(n){var t=n.tagName.toUpperCase();return"INPUT"==t||"TEXTAREA"==t}function b(n){return a(n)&&!n.hidden?!0:/^(button|menuitem|checkbox|tab|menuitemcheckbox|option|gridcell)$/.test(o(n))?!0:!1}function u(n){function i(n){if(1==n.nodeType&&"none"!=n.style.display){b(n)&&t.push(n);for(var r=0;r<n.childNodes.length;r++)i(n.childNodes[r])}}var t=[];return i(n||s.getEl()),t}function l(n){var u,t,i;for(n=n||r,t=n.parents().toArray(),t.unshift(n),i=0;i<t.length&&(u=t[i],!u.settings.ariaRoot);i++);return u}function w(n){var t=l(n),i=u(t.getEl());t.settings.ariaRemember&&"lastAriaIndex"in t?h(t.lastAriaIndex,i):h(0,i)}function h(n,t){return 0>n?n=t.length-1:n>=t.length&&(n=0),t[n]&&t[n].focus(),n}function i(n,i){var f=-1,e=l(),r;for(i=i||u(e.getEl()),r=0;r<i.length;r++)i[r]===t&&(f=r);f+=n,e.lastAriaIndex=h(f,i)}function p(){var n=e();"tablist"==n?i(-1,u(t.parentNode)):r.parent().submenu?c():i(-1)}function g(){var r=o(),n=e();"tablist"==n?i(1,u(t.parentNode)):"menuitem"==r&&"menu"==n&&v("haspopup")?f():i(1)}function d(){i(-1)}function k(){var n=o(),t=e();"menuitem"==n&&"menubar"==t?f():"button"==n&&v("haspopup")?f({key:"down"}):i(1)}function y(n){var f=e(),t;"tablist"==f?(t=u(r.getEl("body"))[0],t&&t.focus()):i(n.shiftKey?-1:1)}function c(){r.fire("cancel")}function f(n){n=n||{},r.fire("click",{target:t,aria:n})}var s=n.root,t,r;try{t=document.activeElement}catch(nt){t=document.body}return r=s.getParentCtrl(t),s.on("keydown",function(n){function i(n,i){a(t)||i(n)!==!1&&n.preventDefault()}if(!n.isDefaultPrevented())switch(n.keyCode){case 37:i(n,p);break;case 39:i(n,g);break;case 38:i(n,d);break;case 40:i(n,k);break;case 27:c();break;case 14:case 13:case 32:i(n,f);break;case 9:y(n)!==!1&&n.preventDefault()}}),s.on("focusin",function(n){t=n.target,r=n.control}),{focusFirst:w}}}),i(h,[v,st,ot,d,cr,r,f],function(n,t,i,r,u,f,e){var o={};return n.extend({layout:"",innerClass:"container-inner",init:function(n){var i=this;i._super(n),n=i.settings,i._fixed=n.fixed,i._items=new t,i.isRtl()&&i.addClass("rtl"),i.addClass("container"),i.addClass("container-body","body"),n.containerCls&&i.addClass(n.containerCls),i._layout=r.create((n.layout||i.layout)+"layout"),i.settings.items&&i.add(i.settings.items),i._hasBody=!0},items:function(){return this._items},find:function(n){return n=o[n]=o[n]||new i(n),n.find(this)},add:function(n){var t=this;return t.items().add(t.create(n)).parent(t),t},focus:function(n){var t=this,i,u,r;return n&&(u=t.keyboardNav||t.parents().eq(-1)[0].keyboardNav)?void u.focusFirst(t):(r=t.find("*"),t.statusbar&&r.add(t.statusbar.items()),r.each(function(n){return n.settings.autofocus?(i=null,!1):void(n.canFocus&&(i=i||n))}),i&&i.focus(),t)},replace:function(n,t){for(var i,u=this.items(),r=u.length;r--;)if(u[r]===n){u[r]=t;break}r>=0&&(i=t.getEl(),i&&i.parentNode.removeChild(i),i=n.getEl(),i&&i.parentNode.removeChild(i)),t.parent(this)},create:function(t){var e=this,i,u=[];return f.isArray(t)||(t=[t]),f.each(t,function(t){t&&(t instanceof n||("string"==typeof t&&(t={type:t}),i=f.extend({},e.settings.defaults,t),t.type=i.type=i.type||t.type||e.settings.defaultType||(i.defaults?i.defaults.type:null),t=r.create(i)),u.push(t))}),u},renderNew:function(){var n=this;return n.items().each(function(t,i){var r,u;t.parent(n),t._rendered||(r=n.getEl("body"),u=e.createFragment(t.renderHtml()),r.hasChildNodes()&&i<=r.childNodes.length-1?r.insertBefore(u,r.childNodes[i]):r.appendChild(u),t.postRender())}),n._layout.applyClasses(n),n._lastRect=null,n},append:function(n){return this.add(n).renderNew()},prepend:function(n){var t=this;return t.items().set(t.create(n).concat(t.items().toArray())),t.renderNew()},insert:function(n,t,i){var u=this,r,e,f;return n=u.create(n),r=u.items(),!i&&t<r.length-1&&(t+=1),t>=0&&t<r.length&&(e=r.slice(0,t).toArray(),f=r.slice(t).toArray(),r.set(e.concat(n,f))),u.renderNew()},fromJSON:function(n){var i=this,t;for(t in n)i.find("#"+t).value(n[t]);return i},toJSON:function(){var t=this,n={};return t.find("*").each(function(t){var r=t.name(),i=t.value();r&&"undefined"!=typeof i&&(n[r]=i)}),n},preRender:function(){},renderHtml:function(){var n=this,t=n._layout,i=this.settings.role;return n.preRender(),t.preRender(n),'<div id="'+n._id+'" class="'+n.classes()+'"'+(i?' role="'+this.settings.role+'"':"")+'><div id="'+n._id+'-body" class="'+n.classes("body")+'">'+(n.settings.html||"")+t.renderHtml(n)+"</div></div>"},postRender:function(){var n=this,t;return n.items().exec("postRender"),n._super(),n._layout.postRender(n),n._rendered=!0,n.settings.style&&e.css(n.getEl(),n.settings.style),n.settings.border&&(t=n.borderBox(),e.css(n.getEl(),{"border-top-width":t.top,"border-right-width":t.right,"border-bottom-width":t.bottom,"border-left-width":t.left})),n.parent()||(n.keyboardNav=new u({root:n})),n},initLayoutRect:function(){var n=this,t=n._super();return n._layout.recalc(n),t},recalc:function(){var t=this,n=t._layoutRect,i=t._lastRect;if(!i||i.w!=n.w||i.h!=n.h)return t._layout.recalc(t),n=t.layoutRect(),t._lastRect={x:n.x,y:n.y,w:n.w,h:n.h},!0},reflow:function(){var t;if(this.visible()){for(n.repaintControls=[],n.repaintControls.map={},this.recalc(),t=n.repaintControls.length;t--;)n.repaintControls[t].repaint();"flow"!==this.settings.layout&&"stack"!==this.settings.layout&&this.repaint(),n.repaintControls=[]}return this}})}),i(w,[f],function(n){function t(){var f=document,t,n,u,s,h,r,o,e,i=Math.max;return t=f.documentElement,n=f.body,u=i(t.scrollWidth,n.scrollWidth),s=i(t.clientWidth,n.clientWidth),h=i(t.offsetWidth,n.offsetWidth),r=i(t.scrollHeight,n.scrollHeight),o=i(t.clientHeight,n.clientHeight),e=i(t.offsetHeight,n.offsetHeight),{width:h>u?s:u,height:e>r?o:r}}return function(i,r){function s(){return u.getElementById(r.handle||i)}var f,u=document,l,a,e,o,c,h;r=r||{},a=function(i){var y=t(),a,v;i.preventDefault(),l=i.button,a=s(),c=i.screenX,h=i.screenY,v=window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue("cursor"):a.runtimeStyle.cursor,f=u.createElement("div"),n.css(f,{position:"absolute",top:0,left:0,width:y.width,height:y.height,zIndex:2147483647,opacity:.0001,cursor:v}),u.body.appendChild(f),n.on(u,"mousemove",o),n.on(u,"mouseup",e),r.start(i)},o=function(n){return n.button!==l?e(n):(n.deltaX=n.screenX-c,n.deltaY=n.screenY-h,n.preventDefault(),void r.drag(n))},e=function(t){n.off(u,"mousemove",o),n.off(u,"mouseup",e),f.parentNode.removeChild(f),r.stop&&r.stop(t)},this.destroy=function(){n.off(s())},n.on(s(),"mousedown",a)}}),i(fr,[f,w],function(n,t){return{init:function(){var n=this;n.on("repaint",n.renderScroll)},renderScroll:function(){function u(){function e(t,e,o,s,h,c){var v,y,k,a,d,b,l,p,w;if(y=i.getEl("scroll"+t)){if(p=e.toLowerCase(),w=o.toLowerCase(),i.getEl("absend")&&n.css(i.getEl("absend"),p,i.layoutRect()[s]-1),!h)return void n.css(y,"display","none");n.css(y,"display","block"),v=i.getEl("body"),k=i.getEl("scroll"+t+"t"),a=v["client"+o]-2*r,a-=f&&u?y["client"+c]:0,d=v["scroll"+o],b=a/d,l={},l[p]=v["offset"+e]+r,l[w]=a,n.css(y,l),l={},l[p]=v["scroll"+e]*b,l[w]=a*b,n.css(k,l)}}var f,u,t;t=i.getEl("body"),f=t.scrollWidth>t.clientWidth,u=t.scrollHeight>t.clientHeight,e("h","Left","Width","contentW",f,"Height"),e("v","Top","Height","contentH",u,"Width")}function f(){function u(u,f,e,o,s){var l,h=i._id+"-scroll"+u,c=i.classPrefix;i.getEl().appendChild(n.createFragment('<div id="'+h+'" class="'+c+"scrollbar "+c+"scrollbar-"+u+'"><div id="'+h+'t" class="'+c+'scrollbar-thumb"></div></div>')),i.draghelper=new t(h+"t",{start:function(){l=i.getEl("body")["scroll"+f],n.addClass(n.get(h),c+"active")},drag:function(n){var a,c,v,h,t=i.layoutRect();c=t.contentW>t.innerW,v=t.contentH>t.innerH,h=i.getEl("body")["client"+e]-2*r,h-=c&&v?i.getEl("scroll"+u)["client"+s]:0,a=h/i.getEl("body")["scroll"+e],i.getEl("body")["scroll"+f]=l+n["delta"+o]/a},stop:function(){n.removeClass(n.get(h),c+"active")}})}i.addClass("scroll"),u("v","Top","Height","Y","Width"),u("h","Left","Width","X","Height")}var i=this,r=2;i.settings.autoScroll&&(i._hasScroll||(i._hasScroll=!0,f(),i.on("wheel",function(n){var t=i.getEl("body");t.scrollLeft+=10*(n.deltaX||0),t.scrollTop+=10*n.deltaY,u()}),n.on(i.getEl("body"),"scroll",u)),u())}}}),i(tt,[h,fr],function(n,t){return n.extend({Defaults:{layout:"fit",containerCls:"panel"},Mixins:[t],renderHtml:function(){var n=this,i=n._layout,t=n.settings.html;return n.preRender(),i.preRender(n),"undefined"==typeof t?t='<div id="'+n._id+'-body" class="'+n.classes("body")+'">'+i.renderHtml(n)+"</div>":("function"==typeof t&&(t=t.call(n)),n._hasBody=!1),'<div id="'+n._id+'" class="'+n.classes()+'" hidefocus="1" tabindex="-1" role="group">'+(n._preBodyHtml||"")+t+"</div>"}})}),i(vt,[f],function(n){function t(t,i,r){var v,h,u,f,s,o,a,l,c,e;return c=n.getViewPort(),h=n.getPos(i),u=h.x,f=h.y,t._fixed&&"static"==n.getRuntimeStyle(document.body,"position")&&(u-=c.x,f-=c.y),v=t.getEl(),e=n.getSize(v),s=e.width,o=e.height,e=n.getSize(i),a=e.width,l=e.height,r=(r||"").split(""),"b"===r[0]&&(f+=l),"r"===r[1]&&(u+=a),"c"===r[0]&&(f+=Math.round(l/2)),"c"===r[1]&&(u+=Math.round(a/2)),"b"===r[3]&&(f-=o),"r"===r[4]&&(u-=s),"c"===r[3]&&(f-=Math.round(o/2)),"c"===r[4]&&(u-=Math.round(s/2)),{x:u,y:f,w:s,h:o}}return{testMoveRel:function(i,r){for(var u,f=n.getViewPort(),e=0;e<r.length;e++)if(u=t(this,i,r[e]),this._fixed){if(u.x>0&&u.x+u.w<f.w&&u.y>0&&u.y+u.h<f.h)return r[e]}else if(u.x>f.x&&u.x+u.w<f.w+f.x&&u.y>f.y&&u.y+u.h<f.h+f.y)return r[e];return r[0]},moveRel:function(n,i){"string"!=typeof i&&(i=this.testMoveRel(n,i));var r=t(this,n,i);return this.moveTo(r.x,r.y)},moveBy:function(n,t){var i=this,r=i.layoutRect();return i.moveTo(r.x+n,r.y+t),i},moveTo:function(t,i){function e(n,t,i){return 0>n?0:n+i>t?(n=t-i,0>n?0:n):n}var r=this,u,f;return r.settings.constrainToViewport&&(u=n.getViewPort(window),f=r.layoutRect(),t=e(t,u.w+u.x,f.w),i=e(i,u.h+u.y,f.h)),r._rendered?r.layoutRect({x:t,y:i}).repaint():(r.settings.x=t,r.settings.y=i),r.fire("move",{x:t,y:i}),r}}}),i(ur,[f],function(n){return{resizeToContent:function(){this._layoutRect.autoResize=!0,this._lastRect=null,this.reflow()},resizeTo:function(t,i){if(1>=t||1>=i){var r=n.getWindowSize();t=1>=t?t*r.w:t,i=1>=i?i*r.h:i}return this._layoutRect.autoResize=!1,this.layoutRect({minW:t,minH:i,w:t,h:i}).reflow()},resizeBy:function(n,t){var r=this,i=r.layoutRect();return r.resizeTo(i.w+n,i.h+t)}}}),i(p,[tt,vt,ur,f],function(n,t,i,r){function w(){function n(n,t){for(;n;){if(n==t)return!0;n=n.parent()}}c||(c=function(t){var f,i,r;if(2!=t.button)for(f=u.length;f--;)if(i=u[f],r=i.getParentCtrl(t.target),i.settings.autohide){if(r&&(n(r,i)||i.parent()===r))continue;t=i.fire("autohide",{target:t.target}),t.isDefaultPrevented()||i.hide()}},r.on(document,"click",c))}function y(){l||(l=function(){for(var n=u.length;n--;)a(u[n])},r.on(window,"scroll",l))}function p(){if(!s){var n=document.documentElement,i=n.clientWidth,t=n.clientHeight;s=function(){document.all&&i==n.clientWidth&&t==n.clientHeight||(i=n.clientWidth,t=n.clientHeight,e.hideAll())},r.on(window,"resize",s)}}function a(n){function i(t,i){for(var f,r=0;r<u.length;r++)if(u[r]!=n)for(f=u[r].parent();f&&(f=f.parent());)f==n&&u[r].fixed(t).moveBy(0,i).repaint()}var t=r.getViewPort().y;n.settings.autofix&&(n._fixed?n._autoFixY>t&&(n.fixed(!1).layoutRect({y:n._autoFixY}).repaint(),i(!1,n._autoFixY-t)):(n._autoFixY=n.layoutRect().y,n._autoFixY<t&&(n.fixed(!0).layoutRect({y:0}).repaint(),i(!0,t-n._autoFixY))))}function o(n,t){var i,o=e.zIndex||65535,s,u;if(n)f.push(t);else for(i=f.length;i--;)f[i]===t&&f.splice(i,1);if(f.length)for(i=0;i<f.length;i++)f[i].modal&&(o++,s=f[i]),f[i].getEl().style.zIndex=o,f[i].zIndex=o,o++;u=document.getElementById(t.classPrefix+"modal-block"),s?r.css(u,"z-index",s.zIndex-1):u&&(u.parentNode.removeChild(u),h=!1),e.currentZIndex=o}function v(n){for(var t=u.length;t--;)u[t]===n&&u.splice(t,1);for(t=f.length;t--;)f[t]===n&&f.splice(t,1)}var c,l,s,u=[],f=[],h,e=n.extend({Mixins:[t,i],init:function(n){var t=this;t._super(n),t._eventsRoot=t,t.addClass("floatpanel"),n.autohide&&(w(),p(),u.push(t)),n.autofix&&(y(),t.on("move",function(){a(this)})),t.on("postrender show",function(n){if(n.control==t){var u,i=t.classPrefix;t.modal&&!h&&(u=r.createFragment('<div id="'+i+'modal-block" class="'+i+"reset "+i+'fade"></div>'),u=u.firstChild,t.getContainerElm().appendChild(u),setTimeout(function(){r.addClass(u,i+"in"),r.addClass(t.getEl(),i+"in")},0),h=!0),o(!0,t)}}),t.on("show",function(){t.parents().each(function(n){if(n._fixed)return t.fixed(!0),!1})}),n.popover&&(t._preBodyHtml='<div class="'+t.classPrefix+'arrow"></div>',t.addClass("popover").addClass("bottom").addClass(t.isRtl()?"end":"start"))},fixed:function(n){var t=this,i;return t._fixed!=n&&(t._rendered&&(i=r.getViewPort(),n?t.layoutRect().y-=i.y:t.layoutRect().y+=i.y),t.toggleClass("fixed",n),t._fixed=n),t},show:function(){for(var t=this,i=t._super(),n=u.length;n--&&u[n]!==t;);return-1===n&&u.push(t),i},hide:function(){return v(this),o(!1,this),this._super()},hideAll:function(){e.hideAll()},close:function(){var n=this;return n.fire("close").isDefaultPrevented()||(n.remove(),o(!1,n)),n},remove:function(){v(this),this._super()},postRender:function(){var n=this;return n.settings.bodyRole&&this.getEl("body").setAttribute("role",n.settings.bodyRole),n._super()}});return e.hideAll=function(){for(var n,t=u.length;t--;)n=u[t],n&&n.settings.autohide&&(n.hide(),u.splice(t,1))},e}),i(yt,[p,tt,f,w],function(n,t,i,r){return n.extend({modal:!0,Defaults:{border:1,layout:"flex",containerCls:"panel",role:"dialog",callbacks:{submit:function(){this.fire("submit",{data:this.toJSON()})},close:function(){this.close()}}},init:function(n){var i=this;i._super(n),i.isRtl()&&i.addClass("rtl"),i.addClass("window"),i._fixed=!0,n.buttons&&(i.statusbar=new t({layout:"flex",border:"1 0 0 0",spacing:3,padding:10,align:"center",pack:i.isRtl()?"start":"end",defaults:{type:"button"},items:n.buttons}),i.statusbar.addClass("foot"),i.statusbar.parent(i)),i.on("click",function(n){-1!=n.target.className.indexOf(i.classPrefix+"close")&&i.close()}),i.on("cancel",function(){i.close()}),i.aria("describedby",i.describedBy||i._id+"-none"),i.aria("label",n.title),i._fullscreen=!1},recalc:function(){var n=this,e=n.statusbar,r,t,u,f;n._fullscreen&&(n.layoutRect(i.getWindowSize()),n.layoutRect().contentH=n.layoutRect().innerH),n._super(),r=n.layoutRect(),n.settings.title&&!n._fullscreen&&(t=r.headerW,t>r.w&&(u=r.x-Math.max(0,t/2),n.layoutRect({w:t,x:u}),f=!0)),e&&(e.layoutRect({w:n.layoutRect().innerW}).recalc(),t=e.layoutRect().minW+r.deltaW,t>r.w&&(u=r.x-Math.max(0,t-r.w),n.layoutRect({w:t,x:u}),f=!0)),f&&n.recalc()},initLayoutRect:function(){var t=this,n=t._super(),r=0,e,f,u;return t.settings.title&&!t._fullscreen&&(e=t.getEl("head"),f=i.getSize(e),n.headerW=f.width,n.headerH=f.height,r+=n.headerH),t.statusbar&&(r+=t.statusbar.layoutRect().h),n.deltaH+=r,n.minH+=r,n.h+=r,u=i.getWindowSize(),n.x=Math.max(0,u.w/2-n.w/2),n.y=Math.max(0,u.h/2-n.h/2),n},renderHtml:function(){var n=this,f=n._layout,t=n._id,u=n.classPrefix,i=n.settings,o="",e="",r=i.html;return n.preRender(),f.preRender(n),i.title&&(o='<div id="'+t+'-head" class="'+u+'window-head"><div id="'+t+'-title" class="'+u+'title">'+n.encode(i.title)+'</div><button type="button" class="'+u+'close" aria-hidden="true">×</button><div id="'+t+'-dragh" class="'+u+'dragh"></div></div>'),i.url&&(r='<iframe src="'+i.url+'" tabindex="-1"></iframe>'),"undefined"==typeof r&&(r=f.renderHtml(n)),n.statusbar&&(e=n.statusbar.renderHtml()),'<div id="'+t+'" class="'+n.classes()+'" hidefocus="1"><div class="'+n.classPrefix+'reset" role="application">'+o+'<div id="'+t+'-body" class="'+n.classes("body")+'">'+r+"</div>"+e+"</div></div>"},fullscreen:function(n){var t=this,o=document.documentElement,e,u=t.classPrefix,r,f;return n!=t._fullscreen&&((i.on(window,"resize",function(){var r,n;t._fullscreen&&(e?t._timer||(t._timer=setTimeout(function(){var n=i.getWindowSize();t.moveTo(0,0).resizeTo(n.w,n.h),t._timer=0},50)):(r=+new Date,n=i.getWindowSize(),t.moveTo(0,0).resizeTo(n.w,n.h),+new Date-r>50&&(e=!0)))}),r=t.layoutRect(),t._fullscreen=n,n)?(t._initial={x:r.x,y:r.y,w:r.w,h:r.h},t._borderBox=t.parseBox("0"),t.getEl("head").style.display="none",r.deltaH-=r.headerH+2,i.addClass(o,u+"fullscreen"),i.addClass(document.body,u+"fullscreen"),t.addClass("fullscreen"),f=i.getWindowSize(),t.moveTo(0,0).resizeTo(f.w,f.h)):(t._borderBox=t.parseBox(t.settings.border),t.getEl("head").style.display="",r.deltaH+=r.headerH,i.removeClass(o,u+"fullscreen"),i.removeClass(document.body,u+"fullscreen"),t.removeClass("fullscreen"),t.moveTo(t._initial.x,t._initial.y).resizeTo(t._initial.w,t._initial.h))),t.reflow()},postRender:function(){var n=this,t;setTimeout(function(){n.addClass("in")},0),n._super(),n.statusbar&&n.statusbar.postRender(),n.focus(),this.dragHelper=new r(n._id+"-dragh",{start:function(){t={x:n.layoutRect().x,y:n.layoutRect().y}},drag:function(i){n.moveTo(t.x+i.deltaX,t.y+i.deltaY)}}),n.on("submit",function(t){t.isDefaultPrevented()||n.close()})},submit:function(){return this.fire("submit",{data:this.toJSON()})},remove:function(){var n=this,t=n.classPrefix;n.dragHelper.destroy(),n._super(),n.statusbar&&this.statusbar.remove(),n._fullscreen&&(i.removeClass(document.documentElement,t+"fullscreen"),i.removeClass(document.body,t+"fullscreen"))},getContentWindow:function(){var n=this.getEl().getElementsByTagName("iframe")[0];return n?n.contentWindow:null}})}),i(pr,[yt],function(n){var t=n.extend({init:function(n){n={border:1,padding:20,layout:"flex",pack:"center",align:"center",containerCls:"panel",autoScroll:!0,buttons:{type:"button",text:"Ok",action:"ok"},items:{type:"label",multiline:!0,maxWidth:500,maxHeight:200}},this._super(n)},Statics:{OK:1,OK_CANCEL:2,YES_NO:3,YES_NO_CANCEL:4,msgBox:function(i){function r(n,t,i){return{type:"button",text:n,subtype:i?"primary":"",onClick:function(n){n.control.parents()[1].close(),f(t)}}}var u,f=i.callback||function(){};switch(i.buttons){case t.OK_CANCEL:u=[r("Ok",!0,!0),r("Cancel",!1)];break;case t.YES_NO:case t.YES_NO_CANCEL:u=[r("Yes",1,!0),r("No",0)],i.buttons==t.YES_NO_CANCEL&&u.push(r("Cancel",-1));break;default:u=[r("Ok",!0,!0)]}return new n({padding:20,x:i.x,y:i.y,minWidth:300,minHeight:100,layout:"flex",pack:"center",align:"center",buttons:u,title:i.title,role:"alertdialog",items:{type:"label",multiline:!0,maxWidth:500,maxHeight:200,text:i.text},onPostRender:function(){this.aria("describedby",this.items()[0]._id)},onClose:i.onClose,onCancel:function(){f(!1)}}).renderTo(document.body).reflow()},alert:function(n,i){return"string"==typeof n&&(n={text:n}),n.callback=i,t.msgBox(n)},confirm:function(n,i){return"string"==typeof n&&(n={text:n}),n.callback=i,n.buttons=t.OK_CANCEL,t.msgBox(n)}}});return t}),i(wr,[yt,pr],function(n,t){return function(i){function f(){if(r.length)return r[r.length-1]}var u=this,r=[];u.windows=r,i.on("remove",function(){for(var n=r.length;n--;)r[n].close()}),u.open=function(t,u){var f;return i.editorManager.setActive(i),t.title=t.title||" ",t.url=t.url||t.file,t.url&&(t.width=parseInt(t.width||320,10),t.height=parseInt(t.height||240,10)),t.body&&(t.items={defaults:t.defaults,type:t.bodyType||"form",items:t.body}),t.url||t.buttons||(t.buttons=[{text:"Ok",subtype:"primary",onclick:function(){f.find("form")[0].submit()}},{text:"Cancel",onclick:function(){f.close()}}]),f=new n(t),r.push(f),f.on("close",function(){for(var n=r.length;n--;)r[n]===f&&r.splice(n,1);r.length||i.focus()}),t.data&&f.on("postRender",function(){this.find("*").each(function(n){var i=n.name();i in t.data&&n.value(t.data[i])})}),f.features=t||{},f.params=u||{},1===r.length&&i.nodeChanged(),f.renderTo().reflow()},u.alert=function(n,r,u){t.alert(n,function(){r?r.call(u||this):i.focus()})},u.confirm=function(n,i,r){t.confirm(n,function(n){i.call(r||this,n)})},u.close=function(){f()&&f().close()},u.getParams=function(){return f()?f().params:null},u.setParams=function(n){f()&&(f().params=n)},u.getWindows=function(){return r}}}),i(br,[ti,a,y,c,u,r],function(n,t,i,r,u,f){return function(e){function c(n,t){try{e.getDoc().execCommand(n,!1,t)}catch(i){}}function w(){var n=e.getDoc().documentMode;return n?n:6}function h(n){return n.isDefaultPrevented()}function kt(){function t(n){var i=new r(function(){}),t,u;f.each(e.getBody().getElementsByTagName("*"),function(n){"SPAN"==n.tagName&&n.setAttribute("mce-data-marked",1),!n.hasAttribute("data-mce-style")&&n.hasAttribute("style")&&e.dom.setAttrib(n,"style",e.dom.getAttrib(n,"style"))}),i.observe(e.getDoc(),{childList:!0,attributes:!0,subtree:!0,attributeFilter:["style"]}),e.getDoc().execCommand(n?"ForwardDelete":"Delete",!1,null),t=e.selection.getRng(),u=t.startContainer.parentNode,f.each(i.takeRecords(),function(n){if(o.isChildOf(n.target,e.getBody())){if("style"==n.attributeName){var i=n.target.getAttribute("data-mce-style");i?n.target.setAttribute("style",i):n.target.removeAttribute("style")}f.each(n.addedNodes,function(n){if("SPAN"==n.nodeName&&!n.getAttribute("mce-data-marked")){var r,i;n==u&&(r=t.startOffset,i=n.firstChild),o.remove(n,!0),i&&(t.setStart(i,r),t.setEnd(i,r),e.selection.setRng(t))}})}}),i.disconnect(),f.each(e.dom.select("span[mce-data-marked]"),function(n){n.removeAttribute("mce-data-marked")})}var u=e.getDoc(),c="data:text/mce-internal,",r=window.MutationObserver,a,i;r||(a=!0,r=function(){function t(n){var t=n.relatedNode||n.target;i.push({target:t,addedNodes:[t]})}function r(n){var t=n.relatedNode||n.target;i.push({target:t,attributeName:n.attrName})}var i=[],n;this.observe=function(i){n=i,n.addEventListener("DOMSubtreeModified",t,!1),n.addEventListener("DOMNodeInsertedIntoDocument",t,!1),n.addEventListener("DOMNodeInserted",t,!1),n.addEventListener("DOMAttrModified",r,!1)},this.disconnect=function(){n.removeEventListener("DOMSubtreeModified",t,!1),n.removeEventListener("DOMNodeInsertedIntoDocument",t,!1),n.removeEventListener("DOMNodeInserted",t,!1),n.removeEventListener("DOMAttrModified",r,!1)},this.takeRecords=function(){return i}}),e.on("keydown",function(i){var r=i.keyCode==k,s=n.metaKeyPressed(i);if(!h(i)&&(r||i.keyCode==l)){var u=e.selection.getRng(),o=u.startContainer,f=u.startOffset;if(!s&&u.collapsed&&3==o.nodeType&&(r?f<o.data.length:f>0))return;i.preventDefault(),s&&e.selection.getSel().modify("extend",r?"forward":"backward","word"),t(r)}}),e.on("keypress",function(i){h(i)||s.isCollapsed()||!i.charCode||n.metaKeyPressed(i)||(i.preventDefault(),t(!0),e.selection.setContent(String.fromCharCode(i.charCode)))}),e.addCommand("Delete",function(){t()}),e.addCommand("ForwardDelete",function(){t(!0)}),a||(e.on("dragstart",function(n){var t;e.selection.isCollapsed()&&"IMG"==n.target.tagName&&s.select(n.target),i=s.getRng(),t=e.selection.getContent(),t.length>0&&n.dataTransfer.setData("URL","data:text/mce-internal,"+escape(t))}),e.on("drop",function(n){if(!h(n)){var r=n.dataTransfer.getData("URL");if(!r||-1==r.indexOf(c)||!u.caretRangeFromPoint)return;r=unescape(r.substr(c.length)),u.caretRangeFromPoint&&(n.preventDefault(),window.setTimeout(function(){var f=u.caretRangeFromPoint(n.x,n.y);i&&(s.setRng(i),i=null),t(),s.setRng(f),e.insertContent(r)},0))}}),e.on("cut",function(n){!h(n)&&n.clipboardData&&(n.preventDefault(),n.clipboardData.clearData(),n.clipboardData.setData("text/html",e.selection.getContent()),n.clipboardData.setData("text/plain",e.selection.getContent({format:"text"})),t(!0))}))}function bt(){function n(n){var t=o.create("body"),i=n.cloneContents();return t.appendChild(i),s.serializer.serialize(t,{format:"html"})}function i(i){var u,s,r,f;return i.setStart?(s=n(i),r=o.createRng(),r.selectNode(e.getBody()),f=n(r),s===f):i.item?!1:(u=i.duplicate(),u.moveToElementText(e.getBody()),t.compareRanges(i,u))}e.on("keydown",function(n){var u=n.keyCode,r,t;if(!h(n)&&(u==k||u==l)){if(r=e.selection.isCollapsed(),t=e.getBody(),r&&!o.isEmpty(t))return;if(!r&&!i(e.selection.getRng()))return;n.preventDefault(),e.setContent(""),t.firstChild&&o.isBlock(t.firstChild)?e.selection.setCursorLocation(t.firstChild,0):e.selection.setCursorLocation(t,0),e.nodeChanged()}})}function d(){e.shortcuts.add("ctrl+a",null,"SelectAll")}function dt(){e.settings.content_editable||(o.bind(e.getDoc(),"focusin",function(){s.setRng(s.getRng())}),o.bind(e.getDoc(),"mousedown mouseup",function(n){n.target==e.getDoc().documentElement&&(e.getBody().focus(),"mousedown"==n.type?s.placeCaretAt(n.clientX,n.clientY):s.setRng(s.getRng()))}))}function g(){e.on("keydown",function(n){if(!h(n)&&n.keyCode===l){if(!e.getBody().getElementsByTagName("hr").length)return;if(s.isCollapsed()&&0===s.getRng(!0).startOffset){var i=s.getNode(),t=i.previousSibling;if("HR"==i.nodeName)return o.remove(i),void n.preventDefault();t&&t.nodeName&&"hr"===t.nodeName.toLowerCase()&&(o.remove(t),n.preventDefault())}}})}function ni(){window.Range.prototype.getClientRects||e.on("mousedown",function(n){if(!h(n)&&"HTML"===n.target.nodeName){var t=e.getBody();t.blur(),setTimeout(function(){t.focus()},0)}})}function gt(){e.on("click",function(n){var t=n.target;/^(IMG|HR)$/.test(t.nodeName)&&(n.preventDefault(),s.getSel().setBaseAndExtent(t,0,t,1),e.nodeChanged()),"A"==t.nodeName&&o.hasClass(t,"mce-item-anchor")&&(n.preventDefault(),s.select(t))})}function vt(){function t(){var n=o.getAttribs(s.getStart().cloneNode(!1));return function(){var t=s.getStart();t!==e.getBody()&&(o.setAttrib(t,"style",null),v(n,function(n){t.setAttributeNode(n.cloneNode(!0))}))}}function n(){return!s.isCollapsed()&&o.getParent(s.getStart(),o.isBlock)!=o.getParent(s.getEnd(),o.isBlock)}e.on("keypress",function(i){var r;if(!h(i)&&(8==i.keyCode||46==i.keyCode)&&n())return r=t(),e.getDoc().execCommand("delete",!1,null),r(),i.preventDefault(),!1}),o.bind(e.getDoc(),"cut",function(i){var r;!h(i)&&n()&&(r=t(),setTimeout(function(){r()},0))})}function at(){document.body.setAttribute("role","application")}function p(){e.on("keydown",function(n){if(!h(n)&&n.keyCode===l&&s.isCollapsed()&&0===s.getRng(!0).startOffset){var t=s.getNode().previousSibling;if(t&&t.nodeName&&"table"===t.nodeName.toLowerCase())return n.preventDefault(),!1}})}function yt(){w()>7||(c("RespectVisibilityInDesign",!0),e.contentStyles.push(".mceHideBrInPre pre br {display: none}"),o.addClass(e.getBody(),"mceHideBrInPre"),y.addNodeFilter("pre",function(n){for(var e=n.length,u,f,r,t;e--;)for(u=n[e].getAll("br"),f=u.length;f--;)r=u[f],t=r.prev,t&&3===t.type&&"\n"!=t.value.charAt(t.value-1)?t.value+="\n":r.parent.insert(new i("#text",3),r,!0).value="\n"}),nt.addNodeFilter("pre",function(n){for(var u=n.length,i,r,f,t;u--;)for(i=n[u].getAll("br"),r=i.length;r--;)f=i[r],t=f.prev,t&&3==t.type&&(t.value=t.value.replace(/\r?\n$/,""))}))}function wt(){o.bind(e.getBody(),"mouseup",function(){var t,n=s.getNode();"IMG"==n.nodeName&&((t=o.getStyle(n,"width"))&&(o.setAttrib(n,"width",t.replace(/[^0-9%]+/g,"")),o.setStyle(n,"width","")),(t=o.getStyle(n,"height"))&&(o.setAttrib(n,"height",t.replace(/[^0-9%]+/g,"")),o.setStyle(n,"height","")))})}function pt(){e.on("keydown",function(t){var r,u,f,c,i;if(!h(t)&&t.keyCode==n.BACKSPACE&&(r=s.getRng(),u=r.startContainer,f=r.startOffset,c=o.getRoot(),i=u,r.collapsed&&0===f)){for(;i&&i.parentNode&&i.parentNode.firstChild==i&&i.parentNode!=c;)i=i.parentNode;"BLOCKQUOTE"===i.tagName&&(e.formatter.toggle("blockquote",null,i),r=o.createRng(),r.setStart(u,0),r.setEnd(u,0),s.setRng(r))}})}function oi(){function n(){e._refreshContentEditable(),c("StyleWithCSS",!1),c("enableInlineTableEditing",!1),a.object_resizing||c("enableObjectResizing",!1)}a.readonly||e.on("BeforeExecCommand MouseDown",n)}function ei(){function n(){v(o.select("a"),function(n){var t=n.parentNode,i=o.getRoot();if(t.lastChild===n){for(;t&&!o.isBlock(t);){if(t.parentNode.lastChild!==t||t===i)return;t=t.parentNode}o.add(t,"br",{"data-mce-bogus":1})}})}e.on("SetContent ExecCommand",function(t){("setcontent"==t.type||"mceInsertLink"===t.command)&&n()})}function si(){a.forced_root_block&&e.on("init",function(){c("DefaultParagraphSeparator",a.forced_root_block)})}function ci(){e.on("Undo Redo SetContent",function(n){n.initial||e.execCommand("mceRepaint")})}function hi(){e.on("keydown",function(n){var t;h(n)||n.keyCode!=l||(t=e.getDoc().selection.createRange(),t&&t.item&&(n.preventDefault(),e.undoManager.beforeChange(),o.remove(t.item(0)),e.undoManager.add()))})}function ii(){var n;w()>=10&&(n="",v("p div h1 h2 h3 h4 h5 h6".split(" "),function(t,i){n+=(i>0?",":"")+t+":empty"}),e.contentStyles.push(n+"{padding-right: 1px !important}"))}function ti(){w()<9&&(y.addNodeFilter("noscript",function(n){for(var r=n.length,t,i;r--;)t=n[r],i=t.firstChild,i&&t.attr("data-mce-innertext",i.value)}),nt.addNodeFilter("noscript",function(n){for(var e=n.length,u,t,f;e--;)u=n[e],t=n[e].firstChild,t?t.value=r.decode(t.value):(f=u.attributes.map["data-mce-innertext"],f&&(u.attr("data-mce-innertext",null),t=new i("#text",3),t.value=f,t.raw=!0,u.append(t)))}))}function ri(){function e(n,t){var i=s.createTextRange();try{i.moveToPoint(n,t)}catch(r){i=null}return i}function f(t){var r;t.button?(r=e(t.x,t.y),r&&(r.compareEndPoints("StartToStart",n)>0?r.setEndPoint("StartToStart",n):r.setEndPoint("EndToEnd",n),r.select())):i()}function i(){var u=t.selection.createRange();n&&!u.item&&0===u.compareEndPoints("StartToEnd",u)&&n.select(),o.unbind(t,"mouseup",i),o.unbind(t,"mousemove",f),n=r=0}var t=o.doc,s=t.body,r,n,u;t.documentElement.unselectable=!0,o.bind(t,"mousedown contextmenu",function(s){if("HTML"===s.target.nodeName){if(r&&i(),u=t.documentElement,u.scrollHeight>u.clientHeight)return;r=1,n=e(s.x,s.y),n&&(o.bind(t,"mouseup",i),o.bind(t,"mousemove",f),o.getRoot().focus(),n.select())}})}function fi(){e.on("keyup focusin mouseup",function(t){65==t.keyCode&&n.metaKeyPressed(t)||s.normalize()},!0)}function ui(){e.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}")}function ft(){e.inline||e.on("keydown",function(){document.activeElement==document.body&&e.getWin().focus()})}function b(){e.inline||(e.contentStyles.push("body {min-height: 150px}"),e.on("click",function(n){"HTML"==n.target.nodeName&&(e.getBody().focus(),e.selection.normalize(),e.nodeChanged())}))}function ut(){u.mac&&e.on("keydown",function(t){!n.metaKeyPressed(t)||37!=t.keyCode&&39!=t.keyCode||(t.preventDefault(),e.selection.getSel().modify("move",37==t.keyCode?"backward":"forward","word"))})}function rt(){c("AutoUrlDetect",!1)}function tt(){e.inline||e.on("focus blur beforegetcontent",function(){var n=e.dom.create("br");e.getBody().appendChild(n),n.parentNode.removeChild(n)},!0)}function it(){e.on("click",function(n){var t=n.target;do if("A"===t.tagName)return void n.preventDefault();while(t=t.parentNode)}),e.contentStyles.push(".mce-content-body {-webkit-touch-callout: none}")}function ht(){e.on("touchstart",function(n){var u,r,i,t;u=n.target,r=+new Date,t=n.changedTouches,!t||t.length>1||(i=t[0],e.once("touchend",function(n){var f=n.changedTouches[0],t;+new Date-r>500||Math.abs(i.clientX-f.clientX)>5||Math.abs(i.clientY-f.clientY)>5||(t={target:u},v("pageX pageY clientX clientY screenX screenY".split(" "),function(n){t[n]=f[n]}),t=e.fire("click",t),t.isDefaultPrevented()||(e.selection.placeCaretAt(f.clientX,f.clientY),e.nodeChanged()))}))})}function ct(){e.on("init",function(){e.dom.bind(e.getBody(),"submit",function(n){n.preventDefault()})})}function lt(){y.addNodeFilter("br",function(n){for(var t=n.length;t--;)"Apple-interchange-newline"==n[t].attr("class")&&n[t].remove()})}var v=f.each,l=n.BACKSPACE,k=n.DELETE,o=e.dom,s=e.selection,a=e.settings,y=e.parser,nt=e.serializer,st=u.gecko,ot=u.ie,et=u.webkit;pt(),bt(),fi(),et&&(kt(),dt(),gt(),si(),ct(),p(),lt(),ht(),u.iOS?(ft(),b(),it()):d()),ot&&u.ie<11&&(g(),at(),yt(),wt(),hi(),ii(),ti(),ri()),u.ie>=11&&(b(),tt(),p()),u.ie&&(d(),rt()),st&&(g(),ni(),vt(),oi(),ei(),ci(),ui(),ut(),p())}}),i(it,[ht],function(n){function t(t){return t._eventDispatcher||(t._eventDispatcher=new n({scope:t,toggleEvent:function(i,r){n.isNative(i)&&t.toggleNativeEvent&&t.toggleNativeEvent(i,r)}})),t._eventDispatcher}return{fire:function(n,i,r){var f=this,u;if(f.removed&&"remove"!==n)return i;if(i=t(f).fire(n,i,r),r!==!1&&f.parent)for(u=f.parent();u&&!i.isPropagationStopped();)u.fire(n,i,!1),u=u.parent();return i},on:function(n,i,r){return t(this).on(n,i,r)},off:function(n,i){return t(this).off(n,i)},once:function(n,i){return t(this).once(n,i)},hasEventListeners:function(n){return t(this).has(n)}}}),i(yr,[it,o,r],function(n,t,i){function f(n,t){return"selectionchange"==t?n.getDoc():!n.inline&&/^mouse|click|contextmenu|drop|dragover|dragend/.test(t)?n.getDoc().documentElement:n.settings.event_root?(n.eventRoot||(n.eventRoot=u.select(n.settings.event_root)[0]),n.eventRoot):n.getBody()}function o(n,t){var e=f(n,t),i;if(n.delegates||(n.delegates={}),!n.delegates[t])if(n.settings.event_root){if(r||(r={},n.editorManager.on("removeEditor",function(){var t;if(!n.editorManager.activeEditor&&r){for(t in r)n.dom.unbind(f(n,t));r=null}})),r[t])return;i=function(i){for(var e,o=i.target,f=n.editorManager.editors,r=f.length;r--;)e=f[r].getBody(),(e===o||u.isChildOf(o,e))&&(f[r].hidden||f[r].fire(t,i))},r[t]=i,u.bind(e,t,i)}else i=function(i){n.hidden||n.fire(t,i)},u.bind(e,t,i),n.delegates[t]=i}var u=t.DOM,r,e={bindPendingEventDelegates:function(){var n=this;i.each(n._pendingNativeEvents,function(t){o(n,t)})},toggleNativeEvent:function(n,t){var i=this;i.settings.readonly||"focus"!=n&&"blur"!=n&&(t?i.initialized?o(i,n):i._pendingNativeEvents?i._pendingNativeEvents.push(n):i._pendingNativeEvents=[n]:i.initialized&&(i.dom.unbind(f(i,n),n,i.delegates[n]),delete i.delegates[n]))},unbindAllNativeEvents:function(){var n=this,t;if(n.delegates){for(t in n.delegates)n.dom.unbind(f(n,t),t,n.delegates[t]);delete n.delegates}n.inline||(n.getBody().onload=null,n.dom.unbind(n.getWin()),n.dom.unbind(n.getDoc())),n.dom.unbind(n.getBody()),n.dom.unbind(n.getContainer())}};return e=i.extend({},n,e)}),i(vr,[r,u],function(n,t){var i=n.each,r=n.explode,u={f9:120,f10:121,f11:122};return function(f){var o=this,e={};f.on("keyup keypress keydown",function(n){(n.altKey||n.ctrlKey||n.metaKey)&&!n.isDefaultPrevented()&&i(e,function(i){var r=t.mac?n.metaKey:n.ctrlKey;if(i.ctrl==r&&i.alt==n.altKey&&i.shift==n.shiftKey)return n.keyCode==i.keyCode||n.charCode&&n.charCode==i.charCode?(n.preventDefault(),"keydown"==n.type&&i.func.call(i.scope),!0):void 0})}),o.add=function(t,o,s,h){var c;return c=s,"string"==typeof s?s=function(){f.execCommand(c,!1,null)}:n.isArray(c)&&(s=function(){f.execCommand(c[0],c[1],c[2])}),i(r(t.toLowerCase()),function(n){var t={func:s,scope:h||f,desc:f.translate(o),alt:!1,ctrl:!1,shift:!1};i(r(n,"+"),function(n){switch(n){case"alt":case"ctrl":case"shift":t[n]=!0;break;default:/^[0-9]{2,}$/.test(n)?t.keyCode=parseInt(n,10):(t.charCode=n.charCodeAt(0),t.keyCode=u[n]||n.toUpperCase().charCodeAt(0))}}),e[(t.ctrl?"ctrl":"")+","+(t.alt?"alt":"")+","+(t.shift?"shift":"")+","+t.keyCode]=t}),!0}}}),i(ui,[o,ut,bt,au,y,ir,g,hr,tr,or,ri,rr,lr,lt,et,k,wr,l,kt,br,u,r,yr,vr],function(n,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k,d,g,nt,tt,it,rt){function lt(n,t,u){var f=this,o,e;o=f.documentBaseUrl=u.documentBaseURL,e=u.baseURI,f.settings=t=ct({id:n,theme:"modern",delta_width:0,delta_height:0,popup_css:"",plugins:"",document_base_url:o,add_form_submit_trigger:!0,submit_patch:!0,add_unload_trigger:!0,convert_urls:!0,relative_urls:!0,remove_script_host:!0,object_resizing:!0,doctype:"<!DOCTYPE html>",visual:!0,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",forced_root_block:"p",hidden_input:!0,padd_empty_editor:!0,render_ui:!0,indentation:"30px",inline_styles:!0,convert_fonts_to_spans:!0,indent:"simple",indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,option,optgroup,datalist",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,option,optgroup,datalist",validate:!0,entity_encoding:"named",url_converter:f.convertURL,url_converter_scope:f,ie7_compat:!0},t),r.language=t.language||"en",r.languageLoad=t.language_load,r.baseURL=u.baseURL,f.id=t.id=n,f.isNotDirty=!0,f.plugins={},f.documentBaseURI=new y(t.document_base_url||o,{base_uri:e}),f.baseURI=e,f.contentCSS=[],f.contentStyles=[],f.shortcuts=new rt(f),f.execCommands={},f.queryStateCommands={},f.queryValueCommands={},f.loadedCSS={},t.target&&(f.targetElm=t.target),f.suffix=u.suffix,f.editorManager=u,f.inline=t.inline,u.fire("SetupEditor",f),f.execCallback("setup",f),f.$=i.overrideDefaults(function(){return{context:f.inline?f.getBody():f.getDoc(),element:f.getBody()}})}var ut=n.DOM,ht=r.ThemeManager,et=r.PluginManager,ct=tt.extend,ft=tt.each,pt=tt.explode,yt=tt.inArray,st=tt.trim,vt=tt.resolve,wt=w.Event,at=nt.gecko,ot=nt.ie;return lt.prototype={render:function(){function f(){ut.unbind(window,"ready",f),n.render()}function e(){var u=p.ScriptLoader,i;(t.language&&"en"!=t.language&&!t.language_url&&(t.language_url=n.editorManager.baseURL+"/langs/"+t.language+".js"),t.language_url&&u.add(t.language_url),t.theme&&"function"!=typeof t.theme&&"-"!=t.theme.charAt(0)&&!ht.urls[t.theme])&&(i=t.theme_url,i=i?n.documentBaseURI.toAbsolute(i):"themes/"+t.theme+"/theme"+r+".js",ht.load(t.theme,i)),tt.isArray(t.plugins)&&(t.plugins=t.plugins.join(" ")),ft(t.external_plugins,function(n,i){et.load(i,n),t.plugins+=" "+i}),ft(t.plugins.split(/[ ,]/),function(n){if(n=st(n),n&&!et.urls[n])if("-"==n.charAt(0)){n=n.substr(1,n.length);var t=et.dependencies(n);ft(t,function(n){var t={prefix:"plugins/",resource:n,suffix:"/plugin"+r+".js"};n=et.createUrl(t,n),et.load(n.resource,n)})}else et.load(n,{prefix:"plugins/",resource:n,suffix:"/plugin"+r+".js"})}),u.loadQueue(function(){n.removed||n.init()})}var n=this,t=n.settings,u=n.id,r=n.suffix,i;if(!wt.domLoaded)return void ut.bind(window,"ready",f);n.getElement()&&nt.contentEditable&&(t.inline?n.inline=!0:(n.orgVisibility=n.getElement().style.visibility,n.getElement().style.visibility="hidden"),i=n.getElement().form||ut.getParent(u,"form"),i&&(n.formElement=i,t.hidden_input&&!/TEXTAREA|INPUT/i.test(n.getElement().nodeName)&&(ut.insertAfter(ut.create("input",{type:"hidden",name:u}),u),n.hasHiddenInput=!0),n.formEventDelegate=function(t){n.fire(t.type,t)},ut.bind(i,"submit reset",n.formEventDelegate),n.on("reset",function(){n.setContent(n.startContent,{format:"raw"})}),!t.submit_patch||i.submit.nodeType||i.submit.length||i._mceOldSubmit||(i._mceOldSubmit=i.submit,i.submit=function(){return n.editorManager.triggerSave(),n.isNotDirty=!0,i._mceOldSubmit(i)})),n.windowManager=new b(n),"xml"==t.encoding&&n.on("GetContent",function(n){n.save&&(n.content=ut.encode(n.content))}),t.add_form_submit_trigger&&n.on("submit",function(){n.initialized&&n.save()}),t.add_unload_trigger&&(n._beforeUnload=function(){!n.initialized||n.destroyed||n.isHidden()||n.save({format:"raw",no_events:!0,set_dirty:!1})},n.editorManager.on("BeforeUnload",n._beforeUnload)),e())},init:function(){function w(t){var u=et.get(t),r,i;r=et.urls[t]||n.documentBaseUrl.replace(/\/$/,""),t=st(t),u&&-1===yt(k,t)&&(ft(et.dependencies(t),function(n){w(n)}),i=new u(n,r,n.$),n.plugins[t]=i,i.init&&(i.init(n,r),k.push(t)))}var n=this,t=n.settings,u=n.getElement(),s,r,l,a,i,b,c,f,e,p,h,k=[],v,y,o;if(n.rtl=this.editorManager.i18n.rtl,n.editorManager.add(n),t.aria_label=t.aria_label||ut.getAttrib(u,"aria-label",n.getLang("aria.rich_text_area")),t.theme&&("function"!=typeof t.theme?(t.theme=t.theme.replace(/-/,""),b=ht.get(t.theme),n.theme=new b(n,ht.urls[t.theme]),n.theme.init&&n.theme.init(n,ht.urls[t.theme]||n.documentBaseUrl.replace(/\/$/,""),n.$)):n.theme=t.theme),ft(t.plugins.replace(/\-/g,"").split(/[ ,]/),w),t.render_ui&&n.theme&&(n.orgDisplay=u.style.display,"function"!=typeof t.theme?(s=t.width||u.style.width||u.offsetWidth,r=t.height||u.style.height||u.offsetHeight,l=t.min_height||100,p=/^[0-9\.]+(|px)$/i,p.test(""+s)&&(s=Math.max(parseInt(s,10),100)),p.test(""+r)&&(r=Math.max(parseInt(r,10),l)),i=n.theme.renderUI({targetNode:u,width:s,height:r,deltaWidth:t.delta_width,deltaHeight:t.delta_height}),t.content_editable||(r=(i.iframeHeight||r)+("number"==typeof r?i.deltaHeight||0:""),l>r&&(r=l))):(i=t.theme(n,u),i.editorContainer.nodeType&&(i.editorContainer=i.editorContainer.id=i.editorContainer.id||n.id+"_parent"),i.iframeContainer.nodeType&&(i.iframeContainer=i.iframeContainer.id=i.iframeContainer.id||n.id+"_iframecontainer"),r=i.iframeHeight||u.offsetHeight),n.editorContainer=i.editorContainer),t.content_css&&ft(pt(t.content_css),function(t){n.contentCSS.push(n.documentBaseURI.toAbsolute(t))}),t.content_style&&n.contentStyles.push(t.content_style),t.content_editable)return u=a=i=null,n.initContentBody();for(n.iframeHTML=t.doctype+"<html><head>",t.document_base_url!=n.documentBaseUrl&&(n.iframeHTML+='<base href="'+n.documentBaseURI.getURI()+'" />'),!nt.caretAfter&&t.ie7_compat&&(n.iframeHTML+='<meta http-equiv="X-UA-Compatible" content="IE=7" />'),n.iframeHTML+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />',h=0;h<n.contentCSS.length;h++)v=n.contentCSS[h],n.iframeHTML+='<link type="text/css" rel="stylesheet" href="'+v+'" />',n.loadedCSS[v]=!0;if(f=t.body_id||"tinymce",-1!=f.indexOf("=")&&(f=n.getParam("body_id","","hash"),f=f[n.id]||f),e=t.body_class||"",-1!=e.indexOf("=")&&(e=n.getParam("body_class","","hash"),e=e[n.id]||""),t.content_security_policy&&(n.iframeHTML+='<meta http-equiv="Content-Security-Policy" content="'+t.content_security_policy+'" />'),n.iframeHTML+='</head><body id="'+f+'" class="mce-content-body '+e+'" data-id="'+n.id+'"><br></body></html>',y='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinymce.get("'+n.id+'");document.write(ed.iframeHTML);document.close();ed.initContentBody(true);})()',document.domain!=location.hostname&&(c=y),o=ut.create("iframe",{id:n.id+"_ifr",frameBorder:"0",allowTransparency:"true",title:n.editorManager.translate("Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help"),style:{width:"100%",height:r,display:"block"}}),o.onload=function(){o.onload=null,n.fire("load")},ut.setAttrib(o,"src",c||'javascript:""'),n.contentAreaContainer=i.iframeContainer,n.iframeElement=o,a=ut.add(i.iframeContainer,o),ot)try{n.getDoc()}catch(d){a.src=c=y}i.editorContainer&&(ut.get(i.editorContainer).style.display=n.orgDisplay,n.hidden=ut.isHidden(i.editorContainer)),n.getElement().style.display="none",ut.setAttrib(n.id,"aria-hidden",!0),c||n.initContentBody(),u=a=i=null},initContentBody:function(t){var i=this,r=i.settings,p=i.getElement(),y=i.getDoc(),o,w;r.inline||(i.getElement().style.visibility=i.orgVisibility),t||r.content_editable||(y.open(),y.write(i.iframeHTML),y.close()),r.content_editable&&(i.on("remove",function(){var n=this.getBody();ut.removeClass(n,"mce-content-body"),ut.removeClass(n,"mce-edit-focus"),ut.setAttrib(n,"contentEditable",null)}),ut.addClass(p,"mce-content-body"),i.contentDocument=y=r.content_document||document,i.contentWindow=r.content_window||window,i.bodyElement=p,r.content_document=r.content_window=null,r.root_name=p.nodeName.toLowerCase()),o=i.getBody(),o.disabled=!0,r.readonly||(i.inline&&"static"==ut.getStyle(o,"position",!0)&&(o.style.position="relative"),o.contentEditable=i.getParam("content_editable_state",!0)),o.disabled=!1,i.schema=new k(r),i.dom=new n(y,{keep_values:!0,url_converter:i.convertURL,url_converter_scope:i,hex_colors:r.force_hex_style_colors,class_filter:r.class_filter,update_styles:!0,root_element:i.inline?i.getBody():null,collect:r.content_editable,schema:i.schema,onSetAttrib:function(n){i.fire("SetAttrib",n)}}),i.parser=new d(r,i.schema),i.parser.addAttributeFilter("src,href,style,tabindex",function(n,t){for(var e=n.length,r,o=i.dom,u,f;e--;)r=n[e],u=r.attr(t),f="data-mce-"+t,r.attributes.map[f]||("style"===t?(u=o.serializeStyle(o.parseStyle(u),r.name),u.length||(u=null),r.attr(f,u),r.attr(t,u)):"tabindex"===t?(r.attr(f,u),r.attr(t,null)):r.attr(f,i.convertURL(u,t,r.name)))}),i.parser.addNodeFilter("script",function(n){for(var i=n.length,t;i--;)t=n[i],t.attr("type","mce-"+(t.attr("type")||"no/type"))}),i.parser.addNodeFilter("#cdata",function(n){for(var i=n.length,t;i--;)t=n[i],t.type=8,t.name="#comment",t.value="[CDATA["+t.value+"]]"}),i.parser.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(n){for(var r=n.length,t,u=i.schema.getNonEmptyElements();r--;)t=n[r],t.isEmpty(u)&&(t.append(new f("br",1)).shortEnded=!0)}),i.serializer=new e(r,i),i.selection=new s(i.dom,i.getWin(),i.serializer,i),i.formatter=new h(i),i.undoManager=new c(i),i.forceBlocks=new a(i),i.enterKey=new l(i),i.editorCommands=new v(i),i._nodeChangeDispatcher=new u(i),i.fire("PreInit"),r.browser_spellcheck||r.gecko_spellcheck||(y.body.spellcheck=!1,ut.setAttrib(o,"spellcheck","false")),i.fire("PostRender"),i.quirks=new g(i),r.directionality&&(o.dir=r.directionality),r.nowrap&&(o.style.whiteSpace="nowrap"),r.protect&&i.on("BeforeSetContent",function(n){ft(r.protect,function(t){n.content=n.content.replace(t,function(n){return"<!--mce:protected "+escape(n)+"-->"})})}),i.on("SetContent",function(){i.addVisual(i.getBody())}),r.padd_empty_editor&&i.on("PostProcess",function(n){n.content=n.content.replace(/^(<p[^>]*>(&nbsp;|&#160;|\s|\u00a0|)<\/p>[\r\n]*|<br \/>[\r\n]*)$/,"")}),i.load({initial:!0,format:"html"}),i.startContent=i.getContent({format:"raw"}),i.initialized=!0,i.bindPendingEventDelegates(),i.fire("init"),i.focus(!0),i.nodeChanged({initial:!0}),i.execCallback("init_instance_callback",i),i.contentStyles.length>0&&(w="",ft(i.contentStyles,function(n){w+=n+"\r\n"}),i.dom.addStyle(w)),ft(i.contentCSS,function(n){i.loadedCSS[n]||(i.dom.loadCSS(n),i.loadedCSS[n]=!0)}),r.auto_focus&&setTimeout(function(){var n;n=r.auto_focus===!0?i:i.editorManager.get(r.auto_focus),n.focus()},100),p=y=o=null},focus:function(n){var t=this,e=t.selection,f=t.settings.content_editable,i,u,o=t.getDoc(),r;if(!n){if(i=e.getRng(),i.item&&(u=i.item(0)),t._refreshContentEditable(),f||(nt.opera||t.getBody().focus(),t.getWin().focus()),at||f){if(r=t.getBody(),r.setActive)try{r.setActive()}catch(s){r.focus()}else r.focus();f&&e.normalize()}u&&u.ownerDocument==o&&(i=o.body.createControlRange(),i.addElement(u),i.select())}t.editorManager.setActive(t)},execCallback:function(n){var r=this,i=r.settings[n],t;if(i)return r.callbackLookup&&(t=r.callbackLookup[n])&&(i=t.func,t=t.scope),"string"==typeof i&&(t=i.replace(/\.\w+$/,""),t=t?vt(t):0,i=vt(i),r.callbackLookup=r.callbackLookup||{},r.callbackLookup[n]={func:i,scope:t}),i.apply(t||r,Array.prototype.slice.call(arguments,1))},translate:function(n){var i=this.settings.language||"en",t=this.editorManager.i18n;return n?t.data[i+"."+n]||n.replace(/\{\#([^\}]+)\}/g,function(n,r){return t.data[i+"."+r]||"{#"+r+"}"}):""},getLang:function(n,i){return this.editorManager.i18n.data[(this.settings.language||"en")+"."+n]||(i!==t?i:"{#"+n+"}")},getParam:function(n,t,i){var r=n in this.settings?this.settings[n]:t,u;return"hash"===i?(u={},"string"==typeof r?ft(r.split(r.indexOf("=")>0?/[;,](?![^=;,]*(?:[;,]|$))/:","),function(n){n=n.split("="),u[st(n[0])]=st(n.length>1?n[1]:n)}):u=r,u):r},nodeChanged:function(n){this._nodeChangeDispatcher.nodeChanged(n)},addButton:function(n,t){var i=this;t.cmd&&(t.onclick=function(){i.execCommand(t.cmd)}),t.text||t.icon||(t.icon=n),i.buttons=i.buttons||{},t.tooltip=t.tooltip||t.title,i.buttons[n]=t},addMenuItem:function(n,t){var i=this;t.cmd&&(t.onclick=function(){i.execCommand(t.cmd)}),i.menuItems=i.menuItems||{},i.menuItems[n]=t},addCommand:function(n,t,i){this.execCommands[n]={func:t,scope:i||this}},addQueryStateHandler:function(n,t,i){this.queryStateCommands[n]={func:t,scope:i||this}},addQueryValueHandler:function(n,t,i){this.queryValueCommands[n]={func:t,scope:i||this}},addShortcut:function(n,t,i,r){this.shortcuts.add(n,t,i,r)},execCommand:function(n,t,i,r){var u=this,f=0,e;if(/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint)$/.test(n)||r&&r.skip_focus||u.focus(),r=ct({},r),r=u.fire("BeforeExecCommand",{command:n,ui:t,value:i}),r.isDefaultPrevented())return!1;if((e=u.execCommands[n])&&e.func.call(e.scope,t,i)!==!0)return u.fire("ExecCommand",{command:n,ui:t,value:i}),!0;if(ft(u.plugins,function(r){if(r.execCommand&&r.execCommand(n,t,i))return u.fire("ExecCommand",{command:n,ui:t,value:i}),f=!0,!1}),f)return f;if(u.theme&&u.theme.execCommand&&u.theme.execCommand(n,t,i))return u.fire("ExecCommand",{command:n,ui:t,value:i}),!0;if(u.editorCommands.execCommand(n,t,i))return u.fire("ExecCommand",{command:n,ui:t,value:i}),!0;try{f=u.getDoc().execCommand(n,t,i)}catch(o){}return f?(u.fire("ExecCommand",{command:n,ui:t,value:i}),!0):!1},queryCommandState:function(n){var i=this,r,t;if(!i._isHidden()){if((r=i.queryStateCommands[n])&&(t=r.func.call(r.scope),t===!0||t===!1)||(t=i.editorCommands.queryCommandState(n),-1!==t))return t;try{return i.getDoc().queryCommandState(n)}catch(u){}}},queryCommandValue:function(n){var r=this,u,i;if(!r._isHidden()){if((u=r.queryValueCommands[n])&&(i=u.func.call(u.scope),i!==!0)||(i=r.editorCommands.queryCommandValue(n),i!==t))return i;try{return r.getDoc().queryCommandValue(n)}catch(f){}}},show:function(){var n=this;n.hidden&&(n.hidden=!1,n.inline?n.getBody().contentEditable=!0:(ut.show(n.getContainer()),ut.hide(n.id)),n.load(),n.fire("show"))},hide:function(){var n=this,t=n.getDoc();n.hidden||(ot&&t&&!n.inline&&t.execCommand("SelectAll"),n.save(),n.inline?(n.getBody().contentEditable=!1,n==n.editorManager.focusedEditor&&(n.editorManager.focusedEditor=null)):(ut.hide(n.getContainer()),ut.setStyle(n.id,"display",n.orgDisplay)),n.hidden=!0,n.fire("hide"))},isHidden:function(){return!!this.hidden},setProgressState:function(n,t){this.fire("ProgressState",{state:n,time:t})},load:function(n){var r=this,i=r.getElement(),u;if(i)return n=n||{},n.load=!0,u=r.setContent(i.value!==t?i.value:i.innerHTML,n),n.element=i,n.no_events||r.fire("LoadContent",n),n.element=i=null,u},save:function(n){var t=this,r=t.getElement(),i,u;if(r&&t.initialized)return n=n||{},n.save=!0,n.element=r,i=n.content=t.getContent(n),n.no_events||t.fire("SaveContent",n),i=n.content,/TEXTAREA|INPUT/i.test(r.nodeName)?r.value=i:(t.inline||(r.innerHTML=i),(u=ut.getParent(t.id,"form"))&&ft(u.elements,function(n){if(n.name==t.id)return n.value=i,!1})),n.element=r=null,n.set_dirty!==!1&&(t.isNotDirty=!0),i},setContent:function(n,t){var i=this,u=i.getBody(),r;return t=t||{},t.format=t.format||"html",t.set=!0,t.content=n,t.no_events||i.fire("BeforeSetContent",t),n=t.content,0===n.length||/^\s+$/.test(n)?(r=i.settings.forced_root_block,r&&i.schema.isValidChild(u.nodeName.toLowerCase(),r.toLowerCase())?(n=ot&&11>ot?"":'<br data-mce-bogus="1">',n=i.dom.createHTML(r,i.settings.forced_root_block_attrs,n)):ot||(n='<br data-mce-bogus="1">'),i.dom.setHTML(u,n),i.fire("SetContent",t)):("raw"!==t.format&&(n=new o({},i.schema).serialize(i.parser.parse(n,{isRootContent:!0}))),t.content=st(n),i.dom.setHTML(u,t.content),t.no_events||i.fire("SetContent",t)),t.content},getContent:function(n){var i=this,r,t=i.getBody();return n=n||{},n.format=n.format||"html",n.get=!0,n.getInner=!0,n.no_events||i.fire("BeforeGetContent",n),r="raw"==n.format?t.innerHTML:"text"==n.format?t.innerText||t.textContent:i.serializer.serialize(t,n),n.content="text"!=n.format?st(r):r,n.no_events||i.fire("GetContent",n),n.content},insertContent:function(n,t){t&&(n=ct({content:n},t)),this.execCommand("mceInsertContent",!1,n)},isDirty:function(){return!this.isNotDirty},getContainer:function(){var n=this;return n.container||(n.container=ut.get(n.editorContainer||n.id+"_parent")),n.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return this.targetElm||(this.targetElm=ut.get(this.id)),this.targetElm},getWin:function(){var n=this,t;return n.contentWindow||(t=n.iframeElement,t&&(n.contentWindow=t.contentWindow)),n.contentWindow},getDoc:function(){var n=this,t;return n.contentDocument||(t=n.getWin(),t&&(n.contentDocument=t.document)),n.contentDocument},getBody:function(){return this.bodyElement||this.getDoc().body},convertURL:function(n,t,i){var u=this,r=u.settings;return r.urlconverter_callback?u.execCallback("urlconverter_callback",n,i,!0,t):!r.convert_urls||i&&"LINK"==i.nodeName||0===n.indexOf("file:")||0===n.length?n:r.relative_urls?u.documentBaseURI.toRelative(n):n=u.documentBaseURI.toAbsolute(n,r.remove_script_host)},addVisual:function(n){var i=this,f=i.settings,r=i.dom,u;n=n||i.getBody(),i.hasVisual===t&&(i.hasVisual=f.visual),ft(r.select("table,a",n),function(n){var t;switch(n.nodeName){case"TABLE":return u=f.visual_table_class||"mce-item-table",t=r.getAttrib(n,"border"),void(t&&"0"!=t||!i.hasVisual?r.removeClass(n,u):r.addClass(n,u));case"A":return void(r.getAttrib(n,"href",!1)||(t=r.getAttrib(n,"name")||n.id,u=f.visual_anchor_class||"mce-item-anchor",t&&i.hasVisual?r.addClass(n,u):r.removeClass(n,u)))}}),i.fire("VisualAid",{element:n,hasVisual:i.hasVisual})},remove:function(){var n=this;n.removed||(n.save(),n.removed=1,n.unbindAllNativeEvents(),n.hasHiddenInput&&ut.remove(n.getElement().nextSibling),n.inline||(ot&&10>ot&&n.getDoc().execCommand("SelectAll",!1,null),ut.setStyle(n.id,"display",n.orgDisplay),n.getBody().onload=null),n.fire("remove"),n.editorManager.remove(n),ut.remove(n.getContainer()),n.destroy())},destroy:function(n){var t=this,i;if(!t.destroyed){if(!n&&!t.removed)return void t.remove();n||(t.editorManager.off("beforeunload",t._beforeUnload),t.theme&&t.theme.destroy&&t.theme.destroy(),t.selection.destroy(),t.dom.destroy()),i=t.formElement,i&&(i._mceOldSubmit&&(i.submit=i._mceOldSubmit,i._mceOldSubmit=null),ut.unbind(i,"submit reset",t.formEventDelegate)),t.contentAreaContainer=t.formElement=t.container=t.editorContainer=null,t.bodyElement=t.contentDocument=t.contentWindow=null,t.iframeElement=t.targetElm=null,t.selection&&(t.selection=t.selection.win=t.selection.dom=t.selection.dom.doc=null),t.destroyed=1}},_refreshContentEditable:function(){var i=this,n,t;i._isHidden()&&(n=i.getBody(),t=n.parentNode,t.removeChild(n),t.appendChild(n),n.focus())},_isHidden:function(){var n;return at?(n=this.selection.getSel(),!n||!n.rangeCount||0===n.rangeCount):0}},ct(lt.prototype,it),lt}),i(hi,[],function(){var n={};return{rtl:!1,add:function(t,i){for(var r in i)n[r]=i[r];this.rtl=this.rtl||"rtl"===n._dir},translate:function(t){if("undefined"==typeof t)return t;if("string"!=typeof t&&t.raw)return t.raw;if(t.push){var i=t.slice(1);t=(n[t[0]]||t[0]).replace(/\{([^\}]+)\}/g,function(n,t){return i[t]})}return n[t]||t},data:n}}),i(ci,[o,u],function(n,t){function e(n){function s(){try{return document.activeElement}catch(n){return document.body}}function l(n,t){return t&&t.startContainer?!n.isChildOf(t.startContainer,n.getRoot())||!n.isChildOf(t.endContainer,n.getRoot())?void 0:{startContainer:t.startContainer,startOffset:t.startOffset,endContainer:t.endContainer,endOffset:t.endOffset}:t}function a(n,t){var i;return t.startContainer?(i=n.getDoc().createRange(),i.setStart(t.startContainer,t.startOffset),i.setEnd(t.endContainer,t.endOffset)):i=t,i}function o(n){return!!i.getParent(n,e.isEditorUIElement)}function c(e){var h=e.editor;h.on("init",function(){(h.inline||t.ie)&&("onbeforedeactivate"in document&&t.ie<9?h.dom.bind(h.getBody(),"beforedeactivate",function(n){if(n.target==h.getBody())try{h.lastRng=h.selection.getRng()}catch(t){}}):h.on("nodechange mouseup keyup",function(n){var t=s();"nodechange"==n.type&&n.selectionChange||(t&&t.id==h.id+"_ifr"&&(t=h.getBody()),h.dom.isChildOf(t,h.getBody())&&(h.lastRng=h.selection.getRng()))}),t.webkit&&!u&&(u=function(){var i=n.activeEditor,t;i&&i.selection&&(t=i.selection.getRng(),t&&!t.collapsed&&(h.lastRng=t))},i.bind(document,"selectionchange",u)))}),h.on("setcontent",function(){h.lastRng=null}),h.on("mousedown",function(){h.selection.lastFocusBookmark=null}),h.on("focusin",function(){var t=n.focusedEditor;h.selection.lastFocusBookmark&&(h.selection.setRng(a(h,h.selection.lastFocusBookmark)),h.selection.lastFocusBookmark=null),t!=h&&(t&&t.fire("blur",{focusedEditor:h}),n.setActive(h),n.focusedEditor=h,h.fire("focus",{blurredEditor:t}),h.focus(!0)),h.lastRng=null}),h.on("focusout",function(){window.setTimeout(function(){var t=n.focusedEditor;o(s())||t!=h||(h.fire("blur",{focusedEditor:null}),n.focusedEditor=null,h.selection&&(h.selection.lastFocusBookmark=null))},0)}),f||(f=function(t){var i=n.activeEditor;i&&t.target.ownerDocument==document&&(i.selection&&t.target!=i.getBody()&&(i.selection.lastFocusBookmark=l(i.dom,i.lastRng)),t.target==document.body||o(t.target)||n.focusedEditor!=i||(i.fire("blur",{focusedEditor:null}),n.focusedEditor=null))},i.bind(document,"focusin",f)),h.inline&&!r&&(r=function(t){var i=n.activeEditor,r;i.inline&&!i.dom.isChildOf(t.target,i.getBody())&&(r=i.selection.getRng(),r.collapsed||(i.lastRng=r))},i.bind(document,"mouseup",r))}function h(t){n.focusedEditor==t.editor&&(n.focusedEditor=null),n.activeEditor||(i.unbind(document,"selectionchange",u),i.unbind(document,"focusin",f),i.unbind(document,"mouseup",r),u=f=r=null)}n.on("AddEditor",c),n.on("RemoveEditor",h)}var u,f,r,i=n.DOM;return e.isEditorUIElement=function(n){return-1!==n.className.toString().indexOf("mce-")},e}),i(rt,[ui,ut,o,lt,u,r,it,hi,ci],function(n,t,i,r,u,f,e,o,s){function v(n){var i=c.editors,r,t;for(delete i[n.id],t=0;t<i.length;t++)if(i[t]==n){i.splice(t,1),r=!0;break}return c.activeEditor==n&&(c.activeEditor=i[0]),c.focusedEditor==n&&(c.focusedEditor=null),r}function p(n){return n&&!(n.getContainer()||n.getBody()).parentNode&&(v(n),n.unbindAllNativeEvents(),n.destroy(!0),n=null),n}var h=i.DOM,w=f.explode,l=f.each,y=f.extend,b=0,a,c;return c={$:t,majorVersion:"4",minorVersion:"1.6",releaseDate:"2014-10-08",editors:[],i18n:o,activeEditor:null,setup:function(){var i=this,u,t,e="",o,n,h,f;if(t=document.location.href,/^[^:]+:\/\/\/?[^\/]+\//.test(t)&&(t=t.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(t)||(t+="/")),o=window.tinymce||window.tinyMCEPreInit)u=o.base||o.baseURL,e=o.suffix;else{for(h=document.getElementsByTagName("script"),f=0;f<h.length;f++)if(n=h[f].src,/tinymce(\.full|\.jquery|)(\.min|\.dev|)\.js/.test(n)){-1!=n.indexOf(".min")&&(e=".min"),u=n.substring(0,n.lastIndexOf("/"));break}!u&&document.currentScript&&(n=document.currentScript.src,-1!=n.indexOf(".min")&&(e=".min"),u=n.substring(0,n.lastIndexOf("/")))}i.baseURL=new r(t).toAbsolute(u),i.documentBaseURL=t,i.baseURI=new r(i.baseURL),i.suffix=e,i.focusManager=new s(i)},init:function(t){function u(n){var t=n.id;return t||(t=n.name,t=t&&!h.get(t)?n.name:h.uniqueId(),n.setAttribute("id",t)),t}function i(t,i,u){if(!p(r.get(t))){var f=new n(t,i,r);f.targetElm=f.targetElm||u,e.push(f),f.render()}}function f(n){var i=t[n];if(i)return i.apply(r,Array.prototype.slice.call(arguments,2))}function o(n,t){return t.constructor===RegExp?t.test(n.className):h.hasClass(n,t)}function s(){var n,r;if(h.unbind(window,"ready",s),f("onpageload"),t.types)return void l(t.types,function(n){l(h.select(n.selector),function(r){i(u(r),y({},t,n),r)})});if(t.selector)return void l(h.select(t.selector),function(n){i(u(n),t,n)});switch(t.target&&i(u(t.target),t),t.mode){case"exact":n=t.elements||"",n.length>0&&l(w(n),function(n){var r;(r=h.get(n))?i(n,t,r):l(document.forms,function(r){l(r.elements,function(r){r.name===n&&(n="mce_editor_"+b++,h.setAttrib(r,"id",n),i(n,t,r))})})});break;case"textareas":case"specific_textareas":l(h.select("textarea"),function(n){t.editor_deselector&&o(n,t.editor_deselector)||(!t.editor_selector||o(n,t.editor_selector))&&i(u(n),t,n)})}t.oninit&&(n=r=0,l(e,function(t){r++,t.initialized?n++:t.on("init",function(){n++,n==r&&f("oninit")}),n==r&&f("oninit")}))}var r=this,e=[];r.settings=t,h.bind(window,"ready",s)},get:function(n){return arguments.length?n in this.editors?this.editors[n]:null:this.editors},add:function(n){var t=this,i=t.editors;return i[n.id]=n,i.push(n),t.activeEditor=n,t.fire("AddEditor",{editor:n}),a||(a=function(){t.fire("BeforeUnload")},h.bind(window,"beforeunload",a)),n},createEditor:function(t,i){return this.add(new n(t,i,this))},remove:function(n){var u=this,r,i=u.editors,t;if(n)return"string"==typeof n?(n=n.selector||n,void l(h.select(n),function(n){t=i[n.id],t&&u.remove(t)})):(t=n,i[t.id]?(v(t)&&u.fire("RemoveEditor",{editor:t}),i.length||h.unbind(window,"beforeunload",a),t.remove(),t):null);for(r=i.length-1;r>=0;r--)u.remove(i[r])},execCommand:function(t,i,r){var u=this,f=u.get(r);switch(t){case"mceAddEditor":return u.get(r)||new n(r,u.settings,u).render(),!0;case"mceRemoveEditor":return f&&f.remove(),!0;case"mceToggleEditor":return f?(f.isHidden()?f.show():f.hide(),!0):(u.execCommand("mceAddEditor",0,r),!0)}return u.activeEditor?u.activeEditor.execCommand(t,i,r):!1},triggerSave:function(){l(this.editors,function(n){n.save()})},addI18n:function(n,t){o.add(n,t)},translate:function(n){return o.translate(n)},setActive:function(n){var t=this.activeEditor;this.activeEditor!=n&&(t&&t.fire("deactivate",{relatedTarget:n}),n.fire("activate",{relatedTarget:t})),this.activeEditor=n}},y(c,e),c.setup(),window.tinymce=window.tinyMCE=c,c}),i(bu,[rt,r],function(n,t){var i=t.each,r=t.explode;n.on("AddEditor",function(n){var t=n.editor;t.on("preInit",function(){function f(t,r){i(r,function(i,r){i&&n.setStyle(t,r,i)}),n.rename(t,"span")}function s(r){n=t.dom,u.convert_fonts_to_spans&&i(n.select("font,u,strike",r.node),function(t){e[t.nodeName.toLowerCase()](n,t)})}var e,o,n,u=t.settings;u.inline_styles&&(o=r(u.font_size_legacy_values),e={font:function(n,t){f(t,{backgroundColor:t.style.backgroundColor,color:t.color,fontFamily:t.face,fontSize:o[parseInt(t.size,10)-1]})},u:function(n,t){f(t,{textDecoration:"underline"})},strike:function(n,t){f(t,{textDecoration:"line-through"})}},t.on("PreProcess SetContent",s))})})}),i(si,[it,r],function(n,t){var i={send:function(n){function u(){!n.async||4==t.readyState||r++>1e4?(n.success&&1e4>r&&200==t.status?n.success.call(n.success_scope,""+t.responseText,t,n):n.error&&n.error.call(n.error_scope,r>1e4?"TIMED_OUT":"GENERAL",t,n),t=null):setTimeout(u,10)}var t,r=0;if(n.scope=n.scope||this,n.success_scope=n.success_scope||n.scope,n.error_scope=n.error_scope||n.scope,n.async=n.async===!1?!1:!0,n.data=n.data||"",t=new XMLHttpRequest){if(t.overrideMimeType&&t.overrideMimeType(n.content_type),t.open(n.type||(n.data?"POST":"GET"),n.url,n.async),n.crossDomain&&(t.withCredentials=!0),n.content_type&&t.setRequestHeader("Content-Type",n.content_type),t.setRequestHeader("X-Requested-With","XMLHttpRequest"),t=i.fire("beforeSend",{xhr:t,settings:n}).xhr,t.send(n.data),!n.async)return u();setTimeout(u,10)}}};return t.extend(i,n),i}),i(fi,[],function(){function n(t,i){var u,r,e,f;if(i=i||'"',null===t)return"null";if(e=typeof t,"string"==e)return r="\bb\tt\nn\ff\rr\"\"''\\\\",i+t.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(n,t){return'"'===i&&"'"===n?n:(u=r.indexOf(t),u+1?"\\"+r.charAt(u+1):(n=t.charCodeAt().toString(16),"\\u"+"0000".substring(n.length)+n))})+i;if("object"==e){if(t.hasOwnProperty&&"[object Array]"===Object.prototype.toString.call(t)){for(u=0,r="[";u<t.length;u++)r+=(u>0?",":"")+n(t[u],i);return r+"]"}r="{";for(f in t)t.hasOwnProperty(f)&&(r+="function"!=typeof t[f]?(r.length>1?","+i:i)+f+i+":"+n(t[f],i):"");return r+"}"}return""+t}return{serialize:n,parse:function(n){try{return window[String.fromCharCode(101)+"val"]("("+n+")")}catch(t){}}}}),i(wu,[fi,si,r],function(n,t,i){function r(n){this.settings=u({},n),this.count=0}var u=i.extend;return r.sendRPC=function(n){return(new r).send(n)},r.prototype={send:function(i){var r=i.error,f=i.success;i=u(this.settings,i),i.success=function(t,u){t=n.parse(t),"undefined"==typeof t&&(t={error:"JSON Parse error."}),t.error?r.call(i.error_scope||i.scope,t.error,u):f.call(i.success_scope||i.scope,t.result)},i.error=function(n,t){r&&r.call(i.error_scope||i.scope,n,t)},i.data=n.serialize({id:i.id||"c"+this.count++,method:i.method,params:i.params}),i.content_type="application/json",t.send(i)}},r}),i(du,[o],function(n){return{callbacks:{},count:0,send:function(i){var r=this,f=n.DOM,u=i.count!==t?i.count:r.count,e="tinymce_jsonp_"+u;r.callbacks[u]=function(n){f.remove(e),delete r.callbacks[u],i.callback(n)},f.add(f.doc.body,"script",{id:e,src:i.url,type:"text/javascript"}),r.count++}}}),i(ku,[],function(){function s(){u=[];for(var t in n)u.push(t);e.length=u.length}function h(){function h(n){var r,i;return i=n!==t?o+n:c.indexOf(",",o),-1===i||i>c.length?null:(r=c.substring(o,i),o=i+1,r)}var e,c,l,o=0,u;if(n={},f){i.load(r),c=i.getAttribute(r)||"";do{if(u=h(),null===u)break;if(e=h(parseInt(u,32)||0),null!==e){if(u=h(),null===u)break;l=h(parseInt(u,32)||0),e&&(n[e]=l)}}while(null!==e);s()}}function o(){var e,u="",t;if(f){for(t in n)e=n[t],u+=(u?",":"")+t.length.toString(32)+","+t+","+e.length.toString(32)+","+e;i.setAttribute(r,u);try{i.save(r)}catch(o){}s()}}var e,i,n,u,r,f;try{if(window.localStorage)return localStorage}catch(c){}return r="tinymce",i=document.documentElement,f=!!i.addBehavior,f&&i.addBehavior("#default#userData"),e={key:function(n){return u[n]},getItem:function(t){return t in n?n[t]:null},setItem:function(t,i){n[t]=""+i,o()},removeItem:function(t){delete n[t],o()},clear:function(){n={},o()}},h(),e}),i(vu,[o,k,et,bt,r,u],function(n,t,i,r,u,f){var e=window.tinymce;return e.DOM=n.DOM,e.ScriptLoader=i.ScriptLoader,e.PluginManager=r.PluginManager,e.ThemeManager=r.ThemeManager,e.dom=e.dom||{},e.dom.Event=t.Event,u.each(u,function(n,t){e[t]=n}),u.each("isOpera isWebKit isIE isGecko isMac".split(" "),function(n){e[n]=f[n.substr(2).toLowerCase()]}),{}}),i(at,[b,r],function(n,t){return n.extend({Defaults:{firstControlClass:"first",lastControlClass:"last"},init:function(n){this.settings=t.extend({},this.Defaults,n)},preRender:function(n){n.addClass(this.settings.containerClass,"body")},applyClasses:function(n){var f=this,i=f.settings,t,u,r;t=n.items().filter(":visible"),u=i.firstControlClass,r=i.lastControlClass,t.each(function(n){n.removeClass(u).removeClass(r),i.controlClass&&n.addClass(i.controlClass)}),t.eq(0).addClass(u),t.eq(-1).addClass(r)},renderHtml:function(n){var u=this,i=u.settings,t,r="";return t=n.items(),t.eq(0).addClass(i.firstControlClass),t.eq(-1).addClass(i.lastControlClass),t.each(function(n){i.controlClass&&n.addClass(i.controlClass),r+=n.renderHtml()}),r},recalc:function(){},postRender:function(){}})}),i(ft,[at],function(n){return n.extend({Defaults:{containerClass:"abs-layout",controlClass:"abs-layout-item"},recalc:function(n){n.items().filter(":visible").each(function(n){var t=n.settings;n.layoutRect({x:t.x,y:t.y,w:t.w,h:t.h}),n.recalc&&n.recalc()})},renderHtml:function(n){return'<div id="'+n._id+'-absend" class="'+n.classPrefix+'abs-end"></div>'+this._super(n)}})}),i(ki,[v,vt],function(n,t){return n.extend({Mixins:[t],Defaults:{classes:"widget tooltip tooltip-n"},text:function(n){var t=this;return"undefined"!=typeof n?(t._value=n,t._rendered&&(t.getEl().lastChild.innerHTML=t.encode(n)),t):t._value},renderHtml:function(){var n=this,t=n.classPrefix;return'<div id="'+n._id+'" class="'+n.classes()+'" role="presentation"><div class="'+t+'tooltip-arrow"></div><div class="'+t+'tooltip-inner">'+n.encode(n._text)+"</div></div>"},repaint:function(){var i=this,n,t;n=i.getEl().style,t=i._layoutRect,n.left=t.x+"px",n.top=t.y+"px",n.zIndex=131070}})}),i(e,[v,ki],function(n,t){var i,r=n.extend({init:function(n){var t=this;t._super(n),n=t.settings,t.canFocus=!0,n.tooltip&&r.tooltips!==!1&&(t.on("mouseenter",function(i){var r=t.tooltip().moveTo(-65535),u;i.control==t?(u=r.text(n.tooltip).show().testMoveRel(t.getEl(),["bc-tc","bc-tl","bc-tr"]),r.toggleClass("tooltip-n","bc-tc"==u),r.toggleClass("tooltip-nw","bc-tl"==u),r.toggleClass("tooltip-ne","bc-tr"==u),r.moveRel(t.getEl(),u)):r.hide()}),t.on("mouseleave mousedown click",function(){t.tooltip().hide()})),t.aria("label",n.ariaLabel||n.tooltip)},tooltip:function(){return i||(i=new t({type:"tooltip"}),i.renderTo()),i},active:function(n){var t=this,i;return n!==i&&(t.aria("pressed",n),t.toggleClass("active",n)),t._super(n)},disabled:function(n){var t=this,i;return n!==i&&(t.aria("disabled",n),t.toggleClass("disabled",n)),t._super(n)},postRender:function(){var n=this,t=n.settings;n._rendered=!0,n._super(),n.parent()||!t.width&&!t.height||(n.initLayoutRect(),n.repaint()),t.autofocus&&n.focus()},remove:function(){this._super(),i&&(i.remove(),i=null)}});return r}),i(wt,[e],function(n){return n.extend({Defaults:{classes:"widget btn",role:"button"},init:function(n){var t=this,i;t.on("click mousedown",function(n){n.preventDefault()}),t._super(n),i=n.size,n.subtype&&t.addClass(n.subtype),i&&t.addClass("btn-"+i)},icon:function(n){var t=this,u=t.classPrefix,r,i;return"undefined"==typeof n?t.settings.icon:((t.settings.icon=n,n=n?u+"ico "+u+"i-"+t.settings.icon:"",t._rendered)&&(r=t.getEl().firstChild,i=r.getElementsByTagName("i")[0],n?(i&&i==r.firstChild||(i=document.createElement("i"),r.insertBefore(i,r.firstChild)),i.className=n):i&&r.removeChild(i),t.text(t._text)),t)},repaint:function(){var n=this.getEl().firstChild.style;n.width=n.height="100%",this._super()},text:function(n){var t=this,i;return t._rendered&&(i=t.getEl().lastChild.lastChild,i&&(i.data=t.translate(n))),t._super(n)},renderHtml:function(){var t=this,u=t._id,r=t.classPrefix,i=t.settings.icon,n;return n=t.settings.image,n?(i="none","string"!=typeof n&&(n=window.getSelection?n[0]:n[1]),n=" style=\"background-image: url('"+n+"')\""):n="",i=t.settings.icon?r+"ico "+r+"i-"+i:"",'<div id="'+u+'" class="'+t.classes()+'" tabindex="-1" aria-labelledby="'+u+'"><button role="presentation" type="button" tabindex="-1">'+(i?'<i class="'+i+'"'+n+"></i>":"")+(t._text?(i?" ":"")+t.encode(t._text):"")+"</button></div>"}})}),i(pu,[h],function(n){return n.extend({Defaults:{defaultType:"button",role:"group"},renderHtml:function(){var n=this,t=n._layout;return n.addClass("btn-group"),n.preRender(),t.preRender(n),'<div id="'+n._id+'" class="'+n.classes()+'"><div id="'+n._id+'-body">'+(n.settings.html||"")+t.renderHtml(n)+"</div></div>"}})}),i(bi,[e],function(n){return n.extend({Defaults:{classes:"checkbox",role:"checkbox",checked:!1},init:function(n){var t=this;t._super(n),t.on("click mousedown",function(n){n.preventDefault()}),t.on("click",function(n){n.preventDefault(),t.disabled()||t.checked(!t.checked())}),t.checked(t.settings.checked)},checked:function(n){var t=this;return"undefined"!=typeof n?(n?t.addClass("checked"):t.removeClass("checked"),t._checked=n,t.aria("checked",n),t):t._checked},value:function(n){return this.checked(n)},renderHtml:function(){var n=this,i=n._id,t=n.classPrefix;return'<div id="'+i+'" class="'+n.classes()+'" unselectable="on" aria-labelledby="'+i+'-al" tabindex="-1"><i class="'+t+"ico "+t+'i-checkbox"></i><span id="'+i+'-al" class="'+t+'label">'+n.encode(n._text)+"</span></div>"}})}),i(pt,[e,d,f],function(n,t,i){return n.extend({init:function(n){var t=this;t._super(n),t.addClass("combobox"),t.subinput=!0,t.ariaTarget="inp",n=t.settings,n.menu=n.menu||n.values,n.menu&&(n.icon="caret"),t.on("click",function(i){for(var r=i.target,u=t.getEl();r&&r!=u;)r.id&&-1!=r.id.indexOf("-open")&&(t.fire("action"),n.menu&&(t.showMenu(),i.aria&&t.menu.items()[0].focus())),r=r.parentNode}),t.on("keydown",function(n){"INPUT"==n.target.nodeName&&13==n.keyCode&&t.parents().reverse().each(function(i){return n.preventDefault(),t.fire("change"),i.hasEventListeners("submit")&&i.toJSON?(i.fire("submit",{data:i.toJSON()}),!1):void 0})}),n.placeholder&&(t.addClass("placeholder"),t.on("focusin",function(){t._hasOnChange||(i.on(t.getEl("inp"),"change",function(){t.fire("change")}),t._hasOnChange=!0),t.hasClass("placeholder")&&(t.getEl("inp").value="",t.removeClass("placeholder"))}),t.on("focusout",function(){0===t.value().length&&(t.getEl("inp").value=n.placeholder,t.addClass("placeholder"))}))},showMenu:function(){var n=this,r=n.settings,i;n.menu||(i=r.menu||[],i.length?i={type:"menu",items:i}:i.type=i.type||"menu",n.menu=t.create(i).parent(n).renderTo(n.getContainerElm()),n.fire("createmenu"),n.menu.reflow(),n.menu.on("cancel",function(t){t.control===n.menu&&n.focus()}),n.menu.on("show hide",function(t){t.control.items().each(function(t){t.active(t.value()==n.value())})}).fire("show"),n.menu.on("select",function(t){n.value(t.control.value())}),n.on("focusin",function(t){"INPUT"==t.target.tagName.toUpperCase()&&n.menu.hide()}),n.aria("expanded",!0)),n.menu.show(),n.menu.layoutRect({w:n.layoutRect().w}),n.menu.moveRel(n.getEl(),n.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"])},value:function(n){var t=this;return"undefined"!=typeof n?(t._value=n,t.removeClass("placeholder"),t._rendered&&(t.getEl("inp").value=n),t):t._rendered?(n=t.getEl("inp").value,n!=t.settings.placeholder?n:""):t._value},disabled:function(n){var t=this;return t._rendered&&"undefined"!=typeof n&&(t.getEl("inp").disabled=n),t._super(n)},focus:function(){this.getEl("inp").focus()},repaint:function(){var n=this,o=n.getEl(),e=n.getEl("open"),u=n.layoutRect(),f,r,t;return f=e?u.w-i.getSize(e).width-10:u.w-10,t=document,t.all&&(!t.documentMode||t.documentMode<=8)&&(r=n.layoutRect().h-2+"px"),i.css(o.firstChild,{width:f,lineHeight:r}),n._super(),n},postRender:function(){var n=this;return i.on(this.getEl("inp"),"change",function(){n.fire("change")}),n._super()},remove:function(){i.off(this.getEl("inp")),this._super()},renderHtml:function(){var r=this,e=r._id,n=r.settings,i=r.classPrefix,s=n.value||n.placeholder||"",t,f,o="",u="";return"spellcheck"in n&&(u+=' spellcheck="'+n.spellcheck+'"'),n.maxLength&&(u+=' maxlength="'+n.maxLength+'"'),n.size&&(u+=' size="'+n.size+'"'),n.subtype&&(u+=' type="'+n.subtype+'"'),r.disabled()&&(u+=' disabled="disabled"'),t=n.icon,t&&"caret"!=t&&(t=i+"ico "+i+"i-"+n.icon),f=r._text,(t||f)&&(o='<div id="'+e+'-open" class="'+i+"btn "+i+'open" tabIndex="-1" role="button"><button id="'+e+'-action" type="button" hidefocus="1" tabindex="-1">'+("caret"!=t?'<i class="'+t+'"></i>':'<i class="'+i+'caret"></i>')+(f?(t?" ":"")+f:"")+"</button></div>",r.addClass("has-open")),'<div id="'+e+'" class="'+r.classes()+'"><input id="'+e+'-inp" class="'+i+"textbox "+i+'placeholder" value="'+s+'" hidefocus="1"'+u+" />"+o+"</div>"}})}),i(gu,[pt],function(n){return n.extend({init:function(n){var t=this;n.spellcheck=!1,n.onaction&&(n.icon="none"),t._super(n),t.addClass("colorbox"),t.on("change keyup postrender",function(){t.repaintColor(t.value())})},repaintColor:function(n){var t=this.getEl().getElementsByTagName("i")[0];if(t)try{t.style.background=n}catch(i){}},value:function(n){var t=this;return"undefined"!=typeof n&&t._rendered&&t.repaintColor(n),t._super(n)}})}),i(di,[wt,p],function(n,t){return n.extend({showPanel:function(){var n=this,r=n.settings,i;(n.active(!0),n.panel)?n.panel.show():(i=r.panel,i.type&&(i={layout:"grid",items:i}),i.role=i.role||"dialog",i.popover=!0,i.autohide=!0,i.ariaRoot=!0,n.panel=new t(i).on("hide",function(){n.active(!1)}).on("cancel",function(t){t.stopPropagation(),n.focus(),n.hidePanel()}).parent(n).renderTo(n.getContainerElm()),n.panel.fire("show"),n.panel.reflow()),n.panel.moveRel(n.getEl(),r.popoverAlign||(n.isRtl()?["bc-tr","bc-tc"]:["bc-tl","bc-tc"]))},hidePanel:function(){var n=this;n.panel&&n.panel.hide()},postRender:function(){var n=this;return n.aria("haspopup",!0),n.on("click",function(t){t.control===n&&(n.panel&&n.panel.visible()?n.hidePanel():(n.showPanel(),n.panel.focus(!!t.aria)))}),n._super()},remove:function(){return this.panel&&(this.panel.remove(),this.panel=null),this._super()}})}),i(ff,[di,o],function(n,t){var i=t.DOM;return n.extend({init:function(n){this._super(n),this.addClass("colorbutton")},color:function(n){return n?(this._color=n,this.getEl("preview").style.backgroundColor=n,this):this._color},renderHtml:function(){var n=this,r=n._id,t=n.classPrefix,i=n.settings.icon?t+"ico "+t+"i-"+n.settings.icon:"",u=n.settings.image?" style=\"background-image: url('"+n.settings.image+"')\"":"";return'<div id="'+r+'" class="'+n.classes()+'" role="button" tabindex="-1" aria-haspopup="true"><button role="presentation" hidefocus="1" type="button" tabindex="-1">'+(i?'<i class="'+i+'"'+u+"></i>":"")+'<span id="'+r+'-preview" class="'+t+'preview"></span>'+(n._text?(i?" ":"")+n._text:"")+'</button><button type="button" class="'+t+'open" hidefocus="1" tabindex="-1"> <i class="'+t+'caret"></i></button></div>'},postRender:function(){var n=this,t=n.settings.onclick;return n.on("click",function(r){r.aria&&"down"==r.aria.key||r.control!=n||i.getParent(r.target,"."+n.classPrefix+"open")||(r.stopImmediatePropagation(),t.call(n,r))}),delete n.settings.onclick,n._super()}})}),i(nr,[],function(){function r(r){function h(r,u,f){var s,c,h,l,e,o;return s=0,c=0,h=0,r/=255,u/=255,f/=255,e=i(r,i(u,f)),o=t(r,t(u,f)),e==o?(h=e,{h:0,s:0,v:100*h}):(l=r==e?u-f:f==e?r-u:f-r,s=r==e?3:f==e?1:5,s=60*(s-l/(o-e)),c=(o-e)/o,h=o,{h:n(s),s:n(100*c),v:n(100*h)})}function l(r,o,s){var a,h,c,l;if(r=(parseInt(r,10)||0)%360,o=parseInt(o,10)/100,s=parseInt(s,10)/100,o=t(0,i(o,1)),s=t(0,i(s,1)),0===o)return void(f=e=u=n(255*s));switch(a=r/60,h=s*o,c=h*(1-Math.abs(a%2-1)),l=s-h,Math.floor(a)){case 0:f=h,e=c,u=0;break;case 1:f=c,e=h,u=0;break;case 2:f=0,e=h,u=c;break;case 3:f=0,e=c,u=h;break;case 4:f=c,e=0,u=h;break;case 5:f=h,e=0,u=c;break;default:f=e=u=0}f=n(255*(f+l)),e=n(255*(e+l)),u=n(255*(u+l))}function a(){function n(n){return n=parseInt(n,10).toString(16),n.length>1?n:"0"+n}return"#"+n(f)+n(e)+n(u)}function v(){return{r:f,g:e,b:u}}function c(){return h(f,e,u)}function s(n){var t;return"object"==typeof n?"r"in n?(f=n.r,e=n.g,u=n.b):"v"in n&&l(n.h,n.s,n.v):(t=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)[^\)]*\)/gi.exec(n))?(f=parseInt(t[1],10),e=parseInt(t[2],10),u=parseInt(t[3],10)):(t=/#([0-F]{2})([0-F]{2})([0-F]{2})/gi.exec(n))?(f=parseInt(t[1],16),e=parseInt(t[2],16),u=parseInt(t[3],16)):(t=/#([0-F])([0-F])([0-F])/gi.exec(n))&&(f=parseInt(t[1]+t[1],16),e=parseInt(t[2]+t[2],16),u=parseInt(t[3]+t[3],16)),f=0>f?0:f>255?255:f,e=0>e?0:e>255?255:e,u=0>u?0:u>255?255:u,o}var o=this,f=0,e=0,u=0;r&&s(r),o.toRgb=v,o.toHsv=c,o.toHex=a,o.parse=s}var i=Math.min,t=Math.max,n=Math.round;return r}),i(of,[e,w,f,nr],function(n,t,i,r){return n.extend({Defaults:{classes:"widget colorpicker"},init:function(n){this._super(n)},postRender:function(){function l(n,t){var f=i.getPos(n),r,u;return r=t.pageX-f.x,u=t.pageY-f.y,r=Math.max(0,Math.min(r/n.clientWidth,1)),u=Math.max(0,Math.min(u/n.clientHeight,1)),{x:r,y:u}}function e(t,u){var e=(360-t.h)/360;i.css(h,{top:100*e+"%"}),u||i.css(o,{left:t.s+"%",top:100-t.v+"%"}),f.style.background=new r({s:100,v:100,h:t.h}).toHex(),n.color().parse({s:t.s,v:t.v,h:t.h})}function c(t){var i;i=l(f,t),u.s=100*i.x,u.v=100*(1-i.y),e(u),n.fire("change")}function v(t){var i;i=l(s,t),u=a.toHsv(),u.h=360*(1-i.y),e(u,!0),n.fire("change")}var n=this,a=n.color(),u,s,h,f,o;s=n.getEl("h"),h=n.getEl("hp"),f=n.getEl("sv"),o=n.getEl("svp"),n._repaint=function(){u=a.toHsv(),e(u)},n._super(),n._svdraghelper=new t(n._id+"-sv",{start:c,drag:c}),n._hdraghelper=new t(n._id+"-h",{start:v,drag:v}),n._repaint()},rgb:function(){return this.color().toRgb()},value:function(n){var t=this;return arguments.length?(t.color().parse(n),void(t._rendered&&t._repaint())):t.color().toHex()},color:function(){return this._color||(this._color=new r),this._color},renderHtml:function(){function e(){for(var e="",u="filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=",r=i.split(","),t=0,f=r.length-1;f>t;t++)e+='<div class="'+n+'colorpicker-h-chunk" style="height:'+100/f+"%;"+u+r[t]+",endColorstr="+r[t+1]+");-ms-"+u+r[t]+",endColorstr="+r[t+1]+')"></div>';return e}var r=this,t=r._id,n=r.classPrefix,u,i="#ff0000,#ff0080,#ff00ff,#8000ff,#0000ff,#0080ff,#00ffff,#00ff80,#00ff00,#80ff00,#ffff00,#ff8000,#ff0000",f="background: -ms-linear-gradient(top,"+i+");background: linear-gradient(to bottom,"+i+");";return u='<div id="'+t+'-h" class="'+n+'colorpicker-h" style="'+f+'">'+e()+'<div id="'+t+'-hp" class="'+n+'colorpicker-h-marker"></div></div>','<div id="'+t+'" class="'+r.classes()+'"><div id="'+t+'-sv" class="'+n+'colorpicker-sv"><div class="'+n+'colorpicker-overlay1"><div class="'+n+'colorpicker-overlay2"><div id="'+t+'-svp" class="'+n+'colorpicker-selector1"><div class="'+n+'colorpicker-selector2"></div></div></div></div></div>'+u+"</div>"}})}),i(gi,[e],function(n){return n.extend({init:function(n){var t=this;n.delimiter||(n.delimiter="»"),t._super(n),t.addClass("path"),t.canFocus=!0,t.on("click",function(n){var i,r=n.target;(i=r.getAttribute("data-index"))&&t.fire("select",{value:t.data()[i],index:i})})},focus:function(){var n=this;return n.getEl().firstChild.focus(),n},data:function(n){var t=this;return"undefined"!=typeof n?(t._data=n,t.update(),t):t._data},update:function(){this.innerHtml(this._getPathHtml())},postRender:function(){var n=this;n._super(),n.data(n.settings.data)},renderHtml:function(){var n=this;return'<div id="'+n._id+'" class="'+n.classes()+'">'+n._getPathHtml()+"</div>"},_getPathHtml:function(){for(var r=this,f=r._data||[],t="",i=r.classPrefix,n=0,u=f.length;u>n;n++)t+=(n>0?'<div class="'+i+'divider" aria-hidden="true"> '+r.settings.delimiter+" </div>":"")+'<div role="button" class="'+i+"path-item"+(n==u-1?" "+i+"last":"")+'" data-index="'+n+'" tabindex="-1" id="'+r._id+"-"+n+'" aria-level="'+n+'">'+f[n].name+"</div>";return t||(t='<div class="'+i+'path-item"> </div>'),t}})}),i(ef,[gi,rt],function(n,t){return n.extend({postRender:function(){function r(n){return 1===n.nodeType&&("BR"==n.nodeName||n.getAttribute("data-mce-bogus")||"bookmark"===n.getAttribute("data-mce-type"))?!0:!1}var i=this,n=t.activeEditor;return i.on("select",function(t){n.focus(),n.selection.select(this.data()[t.index].element),n.nodeChanged()}),n.on("nodeChange",function(t){for(var e,o=[],f=t.parents,u=f.length;u--;)if(1==f[u].nodeType&&!r(f[u])&&(e=n.fire("ResolveName",{name:f[u].nodeName.toLowerCase(),target:f[u]}),e.isDefaultPrevented()||o.push({name:e.name,element:f[u]}),e.isPropagationStopped()))break;i.data(o)}),i._super()}})}),i(wi,[h],function(n){return n.extend({Defaults:{layout:"flex",align:"center",defaults:{flex:1}},renderHtml:function(){var n=this,t=n._layout,i=n.classPrefix;return n.addClass("formitem"),t.preRender(n),'<div id="'+n._id+'" class="'+n.classes()+'" hidefocus="1" tabindex="-1">'+(n.settings.title?'<div id="'+n._id+'-title" class="'+i+'title">'+n.settings.title+"</div>":"")+'<div id="'+n._id+'-body" class="'+n.classes("body")+'">'+(n.settings.html||"")+t.renderHtml(n)+"</div></div>"}})}),i(ai,[h,wi,r],function(n,t,i){return n.extend({Defaults:{containerCls:"form",layout:"flex",direction:"column",align:"stretch",flex:1,padding:20,labelGap:30,spacing:10,callbacks:{submit:function(){this.submit()}}},preRender:function(){var n=this,r=n.items();n.settings.formItemDefaults||(n.settings.formItemDefaults={layout:"flex",autoResize:"overflow",defaults:{flex:1}}),r.each(function(r){var u,f=r.settings.label;f&&(u=new t(i.extend({items:{type:"label",id:r._id+"-l",text:f,flex:0,forId:r._id,disabled:r.disabled()}},n.settings.formItemDefaults)),u.type="formitem",r.aria("labelledby",r._id+"-l"),"undefined"==typeof r.settings.flex&&(r.settings.flex=1),n.replace(r,u),u.add(r))})},recalcLabels:function(){var n=this,t=0,r=[],i,f,u;if(n.settings.labelGapCalc!==!1)for(u="children"==n.settings.labelGapCalc?n.find("formitem"):n.items(),u.filter("formitem").each(function(n){var u=n.items()[0],i=u.getEl().clientWidth;t=i>t?i:t,r.push(u)}),f=n.settings.labelGap||0,i=r.length;i--;)r[i].settings.minWidth=t+f},visible:function(n){var t=this._super(n);return n===!0&&this._rendered&&this.recalcLabels(),t},submit:function(){return this.fire("submit",{data:this.toJSON()})},postRender:function(){var n=this;n._super(),n.recalcLabels(),n.fromJSON(n.settings.data)}})}),i(uf,[ai],function(n){return n.extend({Defaults:{containerCls:"fieldset",layout:"flex",direction:"column",align:"stretch",flex:1,padding:"25 15 5 15",labelGap:30,spacing:10,border:1},renderHtml:function(){var n=this,t=n._layout,i=n.classPrefix;return n.preRender(),t.preRender(n),'<fieldset id="'+n._id+'" class="'+n.classes()+'" hidefocus="1" tabindex="-1">'+(n.settings.title?'<legend id="'+n._id+'-title" class="'+i+'fieldset-title">'+n.settings.title+"</legend>":"")+'<div id="'+n._id+'-body" class="'+n.classes("body")+'">'+(n.settings.html||"")+t.renderHtml(n)+"</div></fieldset>"}})}),i(rf,[pt,r],function(n,t){return n.extend({init:function(n){var r=this,o=tinymce.activeEditor,f=o.settings,e,u,i;n.spellcheck=!1,i=f.file_picker_types||f.file_browser_callback_types,i&&(i=t.makeMap(i,/[, ]/)),(!i||i[n.filetype])&&(u=f.file_picker_callback,!u||i&&!i[n.filetype]?(u=f.file_browser_callback,!u||i&&!i[n.filetype]||(e=function(){u(r.getEl("inp").id,r.value(),n.filetype,window)})):e=function(){var i=r.fire("beforecall").meta;i=t.extend({filetype:n.filetype},i),u.call(o,function(n,t){r.value(n).fire("change",{meta:t})},r.value(),i)}),e&&(n.icon="browse",n.onaction=e),r._super(n)}})}),i(tf,[ft],function(n){return n.extend({recalc:function(n){var i=n.layoutRect(),t=n.paddingBox();n.items().filter(":visible").each(function(n){n.layoutRect({x:t.left,y:t.top,w:i.innerW-t.right-t.left,h:i.innerH-t.top-t.bottom}),n.recalc&&n.recalc()})}})}),i(lu,[ft],function(n){return n.extend({recalc:function(n){var f,y,s,r,u,p,ot,lt,st,d,e,w,o,i,gt,ct,kt=[],h,dt,ht,t,l,g,pt,a,wt,nt,c,v,et,bt,b,rt,it,tt,k,ut,yt,vt,at=Math.max,ni=Math.min,ft;for(s=n.items().filter(":visible"),r=n.layoutRect(),u=n._paddingBox,p=n.settings,w=n.isRtl()?p.direction||"row-reversed":p.direction,ot=p.align,lt=n.isRtl()?p.pack||"end":p.pack,st=p.spacing||0,("row-reversed"==w||"column-reverse"==w)&&(s=s.set(s.toArray().reverse()),w=w.split("-")[0]),"column"==w?(wt="y",pt="h",a="minH",nt="maxH",v="innerH",c="top",et="deltaH",bt="contentH",k="left",it="w",b="x",rt="innerW",tt="minW",ut="right",yt="deltaW",vt="contentW"):(wt="x",pt="w",a="minW",nt="maxW",v="innerW",c="left",et="deltaW",bt="contentW",k="top",it="h",b="y",rt="innerH",tt="minH",ut="bottom",yt="deltaH",vt="contentH"),e=r[v]-u[c]-u[c],g=d=0,f=0,y=s.length;y>f;f++)o=s[f],i=o.layoutRect(),gt=o.settings,ct=gt.flex,e-=y-1>f?st:0,ct>0&&(d+=ct,i[nt]&&kt.push(o),i.flex=ct),e-=i[a],h=u[k]+i[tt]+u[ut],h>g&&(g=h);if(t={},t[a]=0>e?r[a]-e+r[et]:r[v]-e+r[et],t[tt]=g+r[yt],t[bt]=r[v]-e,t[vt]=g,t.minW=ni(t.minW,r.maxW),t.minH=ni(t.minH,r.maxH),t.minW=at(t.minW,r.startMinWidth),t.minH=at(t.minH,r.startMinHeight),r.autoResize&&(t.minW!=r.minW||t.minH!=r.minH))(t.w=t.minW,t.h=t.minH,n.layoutRect(t),this.recalc(n),null===n._lastRect)&&(ft=n.parent(),ft&&(ft._lastRect=null,ft.recalc()));else{for(ht=e/d,f=0,y=kt.length;y>f;f++)o=kt[f],i=o.layoutRect(),dt=i[nt],h=i[a]+i.flex*ht,h>dt?(e-=i[nt]-i[a],d-=i.flex,i.flex=0,i.maxFlexSize=dt):i.maxFlexSize=0;for(ht=e/d,l=u[c],t={},0===d&&("end"==lt?l=e+u[c]:"center"==lt?(l=Math.round(r[v]/2-(r[v]-e)/2)+u[c],0>l&&(l=u[c])):"justify"==lt&&(l=u[c],st=Math.floor(e/(s.length-1)))),t[b]=u[k],f=0,y=s.length;y>f;f++)o=s[f],i=o.layoutRect(),h=i.maxFlexSize||i[a],"center"===ot?t[b]=Math.round(r[rt]/2-i[it]/2):"stretch"===ot?(t[it]=at(i[tt]||0,r[rt]-u[k]-u[ut]),t[b]=u[k]):"end"===ot&&(t[b]=r[rt]-i[it]-u.top),i.flex>0&&(h+=i.flex*ht),t[pt]=h,t[wt]=l,o.layoutRect(t),o.recalc&&o.recalc(),l+=h+st}}})}),i(li,[at],function(n){return n.extend({Defaults:{containerClass:"flow-layout",controlClass:"flow-layout-item",endClass:"break"},recalc:function(n){n.items().filter(":visible").each(function(n){n.recalc&&n.recalc()})}})}),i(nu,[v,e,p,r,rt,u],function(n,t,i,r,u,f){function o(n){function f(t,i){return function(){var r=this;n.on("nodeChange",function(u){var o=n.formatter,f=null;e(u.parents,function(n){return e(t,function(t){return i?o.matchNode(n,i,{value:t.value})&&(f=t.value):o.matchNode(n,t.value)&&(f=t.value),f?!1:void 0}),f?!1:void 0}),r.value(f)})}}function o(n){n=n.replace(/;$/,"").split(";");for(var t=n.length;t--;)n[t]=n[t].split("=");return n}function s(){function u(n){var t=[];if(n)return e(n,function(n){var r={text:n.title,icon:n.icon},e;n.items?r.menu=u(n.items):(e=n.format||"custom"+f++,n.format||(n.name=e,i.push(n)),r.format=e,r.cmd=n.cmd),t.push(r)}),t}function o(){var i;return i=u(n.settings.style_formats_merge?n.settings.style_formats?t.concat(n.settings.style_formats):t:n.settings.style_formats||t)}var f=0,i=[],t=[{title:"Headings",items:[{title:"Heading 1",format:"h1"},{title:"Heading 2",format:"h2"},{title:"Heading 3",format:"h3"},{title:"Heading 4",format:"h4"},{title:"Heading 5",format:"h5"},{title:"Heading 6",format:"h6"}]},{title:"Inline",items:[{title:"Bold",icon:"bold",format:"bold"},{title:"Italic",icon:"italic",format:"italic"},{title:"Underline",icon:"underline",format:"underline"},{title:"Strikethrough",icon:"strikethrough",format:"strikethrough"},{title:"Superscript",icon:"superscript",format:"superscript"},{title:"Subscript",icon:"subscript",format:"subscript"},{title:"Code",icon:"code",format:"code"}]},{title:"Blocks",items:[{title:"Paragraph",format:"p"},{title:"Blockquote",format:"blockquote"},{title:"Div",format:"div"},{title:"Pre",format:"pre"}]},{title:"Alignment",items:[{title:"Left",icon:"alignleft",format:"alignleft"},{title:"Center",icon:"aligncenter",format:"aligncenter"},{title:"Right",icon:"alignright",format:"alignright"},{title:"Justify",icon:"alignjustify",format:"alignjustify"}]}];return n.on("init",function(){e(i,function(t){n.formatter.register(t.name,t)})}),{type:"menu",items:o(),onPostRender:function(t){n.fire("renderFormatsMenu",{control:t.control})},itemDefaults:{preview:!0,textStyle:function(){if(this.settings.format)return n.formatter.getCssText(this.settings.format)},onPostRender:function(){var t=this;t.parent().on("show",function(){var i,r;i=t.settings.format,i&&(t.disabled(!n.formatter.canApply(i)),t.active(n.formatter.match(i))),r=t.settings.cmd,r&&t.active(n.queryCommandState(r))})},onclick:function(){this.settings.format&&r(this.settings.format),this.settings.cmd&&n.execCommand(this.settings.cmd)}}}}function t(t){return function(){function r(){return n.undoManager?n.undoManager[t]():!1}var i=this;t="redo"==t?"hasRedo":"hasUndo",i.disabled(!r()),n.on("Undo Redo AddUndo TypingUndo ClearUndos",function(){i.disabled(!r())})}}function h(){var t=this;n.on("VisualAid",function(n){t.active(n.hasVisual)}),t.active(n.hasVisual)}function r(t){t.control&&(t=t.control.value()),t&&n.execCommand("mceToggleFormat",!1,t)}var u;u=s(),e({bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",subscript:"Subscript",superscript:"Superscript"},function(t,i){n.addButton(i,{tooltip:t,onPostRender:function(){var t=this;n.formatter?n.formatter.formatChanged(i,function(n){t.active(n)}):n.on("init",function(){n.formatter.formatChanged(i,function(n){t.active(n)})})},onclick:function(){r(i)}})}),e({outdent:["Decrease indent","Outdent"],indent:["Increase indent","Indent"],cut:["Cut","Cut"],copy:["Copy","Copy"],paste:["Paste","Paste"],help:["Help","mceHelp"],selectall:["Select all","SelectAll"],removeformat:["Clear formatting","RemoveFormat"],visualaid:["Visual aids","mceToggleVisualAid"],newdocument:["New document","mceNewDocument"]},function(t,i){n.addButton(i,{tooltip:t[0],cmd:t[1]})}),e({blockquote:["Blockquote","mceBlockQuote"],numlist:["Numbered list","InsertOrderedList"],bullist:["Bullet list","InsertUnorderedList"],subscript:["Subscript","Subscript"],superscript:["Superscript","Superscript"],alignleft:["Align left","JustifyLeft"],aligncenter:["Align center","JustifyCenter"],alignright:["Align right","JustifyRight"],alignjustify:["Justify","JustifyFull"]},function(t,i){n.addButton(i,{tooltip:t[0],cmd:t[1],onPostRender:function(){var t=this;n.formatter?n.formatter.formatChanged(i,function(n){t.active(n)}):n.on("init",function(){n.formatter.formatChanged(i,function(n){t.active(n)})})}})}),n.addButton("undo",{tooltip:"Undo",onPostRender:t("undo"),cmd:"undo"}),n.addButton("redo",{tooltip:"Redo",onPostRender:t("redo"),cmd:"redo"}),n.addMenuItem("newdocument",{text:"New document",shortcut:"Ctrl+N",icon:"newdocument",cmd:"mceNewDocument"}),n.addMenuItem("undo",{text:"Undo",icon:"undo",shortcut:"Ctrl+Z",onPostRender:t("undo"),cmd:"undo"}),n.addMenuItem("redo",{text:"Redo",icon:"redo",shortcut:"Ctrl+Y",onPostRender:t("redo"),cmd:"redo"}),n.addMenuItem("visualaid",{text:"Visual aids",selectable:!0,onPostRender:h,cmd:"mceToggleVisualAid"}),e({cut:["Cut","Cut","Ctrl+X"],copy:["Copy","Copy","Ctrl+C"],paste:["Paste","Paste","Ctrl+V"],selectall:["Select all","SelectAll","Ctrl+A"],bold:["Bold","Bold","Ctrl+B"],italic:["Italic","Italic","Ctrl+I"],underline:["Underline","Underline"],strikethrough:["Strikethrough","Strikethrough"],subscript:["Subscript","Subscript"],superscript:["Superscript","Superscript"],removeformat:["Clear formatting","RemoveFormat"]},function(t,i){n.addMenuItem(i,{text:t[0],icon:i,shortcut:t[2],cmd:t[1]})}),n.on("mousedown",function(){i.hideAll()}),n.addButton("styleselect",{type:"menubutton",text:"Formats",menu:u}),n.addButton("formatselect",function(){var t=[],i=o(n.settings.block_formats||"Paragraph=p;Address=address;Pre=pre;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6");return e(i,function(i){t.push({text:i[0],value:i[1],textStyle:function(){return n.formatter.getCssText(i[1])}})}),{type:"listbox",text:i[0][0],values:t,fixedWidth:!0,onselect:r,onPostRender:f(t)}}),n.addButton("fontselect",function(){var r="Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",t=[],i=o(n.settings.font_formats||r);return e(i,function(n){t.push({text:{raw:n[0]},value:n[1],textStyle:-1==n[1].indexOf("dings")?"font-family:"+n[1]:""})}),{type:"listbox",text:"Font Family",tooltip:"Font Family",values:t,fixedWidth:!0,onPostRender:f(t,"fontname"),onselect:function(t){t.control.settings.value&&n.execCommand("FontName",!1,t.control.settings.value)}}}),n.addButton("fontsizeselect",function(){var t=[],r="8pt 10pt 12pt 14pt 18pt 24pt 36pt",i=n.settings.fontsize_formats||r;return e(i.split(" "),function(n){var r=n,u=n,i=n.split("=");i.length>1&&(r=i[0],u=i[1]),t.push({text:r,value:u})}),{type:"listbox",text:"Font Sizes",tooltip:"Font Sizes",values:t,fixedWidth:!0,onPostRender:f(t,"fontsize"),onclick:function(t){t.control.settings.value&&n.execCommand("FontSize",!1,t.control.settings.value)}}}),n.addMenuItem("formats",{text:"Formats",menu:u})}var e=r.each;u.on("AddEditor",function(t){t.editor.rtl&&(n.rtl=!0),o(t.editor)}),n.translate=function(n){return u.translate(n)},t.tooltips=!f.iOS}),i(gr,[ft],function(n){return n.extend({recalc:function(n){var e=n.settings,w,o,b,u,k,d,i,f,h,t,r,nt,g,ht,s,a,et,ut,c,l,ft,ot,v=[],y=[],ct,lt,at,rt,vt,pt,yt,it,p,st,tt;for(e=n.settings,b=n.items().filter(":visible"),u=n.layoutRect(),o=e.columns||Math.ceil(Math.sqrt(b.length)),w=Math.ceil(b.length/o),et=e.spacingH||e.spacing||0,ut=e.spacingV||e.spacing||0,c=e.alignH||e.align,l=e.alignV||e.align,s=n._paddingBox,vt=("reverseRows"in e)?e.reverseRows:n.isRtl(),c&&"string"==typeof c&&(c=[c]),l&&"string"==typeof l&&(l=[l]),t=0;o>t;t++)v.push(0);for(r=0;w>r;r++)y.push(0);for(r=0;w>r;r++)for(t=0;o>t&&(h=b[r*o+t],h);t++)f=h.layoutRect(),ct=f.minW,lt=f.minH,v[t]=ct>v[t]?ct:v[t],y[r]=lt>y[r]?lt:y[r];for(at=u.innerW-s.left-s.right,ft=0,t=0;o>t;t++)ft+=v[t]+(t>0?et:0),at-=(t>0?et:0)+v[t];for(rt=u.innerH-s.top-s.bottom,ot=0,r=0;w>r;r++)ot+=y[r]+(r>0?ut:0),rt-=(r>0?ut:0)+y[r];if(ft+=s.left+s.right,ot+=s.top+s.bottom,i={},i.minW=ft+(u.w-u.innerW),i.minH=ot+(u.h-u.innerH),i.contentW=i.minW-u.deltaW,i.contentH=i.minH-u.deltaH,i.minW=Math.min(i.minW,u.maxW),i.minH=Math.min(i.minH,u.maxH),i.minW=Math.max(i.minW,u.startMinWidth),i.minH=Math.max(i.minH,u.startMinHeight),u.autoResize&&(i.minW!=u.minW||i.minH!=u.minH))(i.w=i.minW,i.h=i.minH,n.layoutRect(i),this.recalc(n),null===n._lastRect)&&(tt=n.parent(),tt&&(tt._lastRect=null,tt.recalc()));else{if(u.autoResize&&(i=n.layoutRect(i),i.contentW=i.minW-u.deltaW,i.contentH=i.minH-u.deltaH),yt="start"==e.packV?0:rt>0?Math.floor(rt/w):0,it=0,p=e.flexWidths,p)for(t=0;t<p.length;t++)it+=p[t];else it=o;for(st=at/it,t=0;o>t;t++)v[t]+=p?p[t]*st:st;for(g=s.top,r=0;w>r;r++){for(nt=s.left,d=y[r]+yt,t=0;o>t&&(pt=vt?r*o+o-1-t:r*o+t,h=b[pt],h);t++)ht=h.settings,f=h.layoutRect(),k=Math.max(v[t],f.startMinWidth),f.x=nt,f.y=g,a=ht.alignH||(c?c[t]||c[0]:null),"center"==a?f.x=nt+k/2-f.w/2:"right"==a?f.x=nt+k-f.w:"stretch"==a&&(f.w=k),a=ht.alignV||(l?l[t]||l[0]:null),"center"==a?f.y=g+d/2-f.h/2:"bottom"==a?f.y=g+d-f.h:"stretch"==a&&(f.h=d),h.layoutRect(f),nt+=k+et,h.recalc&&h.recalc();g+=d+ut}}}})}),i(iu,[e],function(n){return n.extend({renderHtml:function(){var n=this;return n.addClass("iframe"),n.canFocus=!1,'<iframe id="'+n._id+'" class="'+n.classes()+'" tabindex="-1" src="'+(n.settings.url||"javascript:''")+'" frameborder="0"></iframe>'},src:function(n){this.getEl().src=n},html:function(n,t){var r=this,i=this.getEl().contentWindow.document.body;return i?(i.innerHTML=n,t&&t()):setTimeout(function(){r.html(n)},0),this}})}),i(tu,[e,f],function(n,t){return n.extend({init:function(n){var t=this;t._super(n),t.addClass("widget"),t.addClass("label"),t.canFocus=!1,n.multiline&&t.addClass("autoscroll"),n.strong&&t.addClass("strong")},initLayoutRect:function(){var i=this,n=i._super(),r;return i.settings.multiline&&(r=t.getSize(i.getEl()),r.width>n.maxW&&(n.minW=n.maxW,i.addClass("multiline")),i.getEl().style.width=n.minW+"px",n.startMinH=n.h=n.minH=Math.min(n.maxH,t.getSize(i.getEl()).height)),n},repaint:function(){var n=this;return n.settings.multiline||(n.getEl().style.lineHeight=n.layoutRect().h+"px"),n._super()},text:function(n){var t=this;return t._rendered&&n&&this.innerHtml(t.encode(n)),t._super(n)},renderHtml:function(){var n=this,t=n.settings.forId;return'<label id="'+n._id+'" class="'+n.classes()+'"'+(t?' for="'+t+'"':"")+">"+n.encode(n._text)+"</label>"}})}),i(vi,[h],function(n){return n.extend({Defaults:{role:"toolbar",layout:"flow"},init:function(n){var t=this;t._super(n),t.addClass("toolbar")},postRender:function(){var n=this;return n.items().addClass("toolbar-item"),n._super()}})}),i(pi,[vi],function(n){return n.extend({Defaults:{role:"menubar",containerCls:"menubar",ariaRoot:!0,defaults:{type:"menubutton"}}})}),i(ct,[wt,d,pi],function(n,t,i){function u(n,t){for(;n;){if(t===n)return!0;n=n.parentNode}return!1}var r=n.extend({init:function(n){var t=this;t._renderOpen=!0,t._super(n),t.addClass("menubtn"),n.fixedWidth&&t.addClass("fixed-width"),t.aria("haspopup",!0),t.hasPopup=!0},showMenu:function(){var n=this,r=n.settings,i;return n.menu&&n.menu.visible()?n.hideMenu():(n.menu||(i=r.menu||[],i.length?i={type:"menu",items:i}:i.type=i.type||"menu",n.menu=t.create(i).parent(n).renderTo(),n.fire("createmenu"),n.menu.reflow(),n.menu.on("cancel",function(t){t.control.parent()===n.menu&&(t.stopPropagation(),n.focus(),n.hideMenu())}),n.menu.on("select",function(){n.focus()}),n.menu.on("show hide",function(t){t.control==n.menu&&n.activeMenu("show"==t.type),n.aria("expanded","show"==t.type)}).fire("show")),n.menu.show(),n.menu.layoutRect({w:n.layoutRect().w}),void n.menu.moveRel(n.getEl(),n.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"]))},hideMenu:function(){var n=this;n.menu&&(n.menu.items().each(function(n){n.hideMenu&&n.hideMenu()}),n.menu.hide())},activeMenu:function(n){this.toggleClass("active",n)},renderHtml:function(){var n=this,f=n._id,u=n.classPrefix,r=n.settings.icon,t;return t=n.settings.image,t?(r="none","string"!=typeof t&&(t=window.getSelection?t[0]:t[1]),t=" style=\"background-image: url('"+t+"')\""):t="",r=n.settings.icon?u+"ico "+u+"i-"+r:"",n.aria("role",n.parent()instanceof i?"menuitem":"button"),'<div id="'+f+'" class="'+n.classes()+'" tabindex="-1" aria-labelledby="'+f+'"><button id="'+f+'-open" role="presentation" type="button" tabindex="-1">'+(r?'<i class="'+r+'"'+t+"></i>":"")+"<span>"+(n._text?(r?" ":"")+n.encode(n._text):"")+'</span> <i class="'+u+'caret"></i></button></div>'},postRender:function(){var n=this;return n.on("click",function(t){t.control===n&&u(t.target,n.getEl())&&(n.showMenu(),t.aria&&n.menu.items()[0].focus())}),n.on("mouseenter",function(t){var i=t.control,u=n.parent(),f;i&&u&&i instanceof r&&i.parent()==u&&(u.items().filter("MenuButton").each(function(n){n.hideMenu&&n!=i&&(n.menu&&n.menu.visible()&&(f=!0),n.hideMenu())}),f&&(i.focus(),i.showMenu()))}),n._super()},text:function(n){var i=this,t,r;if(i._rendered)for(r=i.getEl("open").getElementsByTagName("span"),t=0;t<r.length;t++)r[t].innerHTML=(i.settings.icon&&n?" ":"")+i.encode(n);return this._super(n)},remove:function(){this._super(),this.menu&&this.menu.remove()}});return r}),i(ou,[ct],function(n){return n.extend({init:function(n){function e(t){for(var u=0;u<t.length;u++){if(f=t[u].selected||n.value===t[u].value){r=r||t[u].text,i._value=t[u].value;break}t[u].menu&&e(t[u].menu)}}var i=this,t,f,r,u;i._values=t=n.values,t&&("undefined"!=typeof n.value&&e(t),!f&&t.length>0&&(r=t[0].text,i._value=t[0].value),n.menu=t),n.text=n.text||r||t[0].text,i._super(n),i.addClass("listbox"),i.on("select",function(t){var r=t.control;u&&(t.lastControl=u),n.multiple?r.active(!r.active()):i.value(t.control.settings.value),u=r})},value:function(n){function f(n,r){n.items().each(function(n){t=n.value()===r,t&&(i=i||n.text()),n.active(t),n.menu&&f(n.menu,r)})}function e(r){for(var u=0;u<r.length;u++)t=r[u].value==n,t&&(i=i||r[u].text),r[u].active=t,r[u].menu&&e(r[u].menu)}var r=this,t,i,u;return"undefined"!=typeof n&&(r.menu?f(r.menu,n):(u=r.settings.menu,e(u)),r.text(i||this.settings.text)),r._super(n)}})}),i(yi,[e,d,u],function(n,t,i){return n.extend({Defaults:{border:0,role:"menuitem"},init:function(n){var t=this;t.hasPopup=!0,t._super(n),n=t.settings,t.addClass("menu-item"),n.menu&&t.addClass("menu-item-expand"),n.preview&&t.addClass("menu-item-preview"),("-"===t._text||"|"===t._text)&&(t.addClass("menu-item-sep"),t.aria("role","separator"),t._text="-"),n.selectable&&(t.aria("role","menuitemcheckbox"),t.addClass("menu-item-checkbox"),n.icon="selected"),n.preview||n.selectable||t.addClass("menu-item-normal"),t.on("mousedown",function(n){n.preventDefault()}),n.menu&&!n.ariaHideMenu&&t.aria("haspopup",!0)},hasMenus:function(){return!!this.settings.menu},showMenu:function(){var i=this,f=i.settings,n,u=i.parent(),r;(u.items().each(function(n){n!==i&&n.hideMenu()}),f.menu)&&(n=i.menu,n?n.show():(n=f.menu,n.length?n={type:"menu",items:n}:n.type=n.type||"menu",u.settings.itemDefaults&&(n.itemDefaults=u.settings.itemDefaults),n=i.menu=t.create(n).parent(i).renderTo(),n.reflow(),n.on("cancel",function(t){t.stopPropagation(),i.focus(),n.hide()}),n.on("show hide",function(n){n.control.items().each(function(n){n.active(n.settings.selected)})}).fire("show"),n.on("hide",function(t){t.control===n&&i.removeClass("selected")}),n.submenu=!0),n._parentMenu=u,n.addClass("menu-sub"),r=n.testMoveRel(i.getEl(),i.isRtl()?["tl-tr","bl-br","tr-tl","br-bl"]:["tr-tl","br-bl","tl-tr","bl-br"]),n.moveRel(i.getEl(),r),n.rel=r,r="menu-sub-"+r,n.removeClass(n._lastRel),n.addClass(r),n._lastRel=r,i.addClass("selected"),i.aria("expanded",!0))},hideMenu:function(){var n=this;return n.menu&&(n.menu.items().each(function(n){n.hideMenu&&n.hideMenu()}),n.menu.hide(),n.aria("expanded",!1)),n},renderHtml:function(){var t=this,o=t._id,f=t.settings,r=t.classPrefix,e=t.encode(t._text),u=t.settings.icon,s="",n=f.shortcut;return u&&t.parent().addClass("menu-has-icons"),f.image&&(u="none",s=" style=\"background-image: url('"+f.image+"')\""),n&&i.mac&&(n=n.replace(/ctrl\+alt\+/i,"&#x2325;&#x2318;"),n=n.replace(/ctrl\+/i,"&#x2318;"),n=n.replace(/alt\+/i,"&#x2325;"),n=n.replace(/shift\+/i,"&#x21E7;")),u=r+"ico "+r+"i-"+(t.settings.icon||"none"),'<div id="'+o+'" class="'+t.classes()+'" tabindex="-1">'+("-"!==e?'<i class="'+u+'"'+s+"></i> ":"")+("-"!==e?'<span id="'+o+'-text" class="'+r+'text">'+e+"</span>":"")+(n?'<div id="'+o+'-shortcut" class="'+r+'menu-shortcut">'+n+"</div>":"")+(f.menu?'<div class="'+r+'caret"></div>':"")+"</div>"},postRender:function(){var n=this,r=n.settings,t=r.textStyle,i;return("function"==typeof t&&(t=t.call(this)),t)&&(i=n.getEl("text"),i&&i.setAttribute("style",t)),n.on("mouseenter click",function(t){t.control===n&&(r.menu||"click"!==t.type?(n.showMenu(),t.aria&&n.menu.focus(!0)):(n.fire("select"),n.parent().hideAll()))}),n._super(),n},active:function(n){return"undefined"!=typeof n&&this.aria("checked",n),this._super(n)},remove:function(){this._super(),this.menu&&this.menu.remove()}})}),i(hu,[p,yi,r],function(n,t,i){return n.extend({Defaults:{defaultType:"menuitem",border:1,layout:"stack",role:"application",bodyRole:"menu",ariaRoot:!0},init:function(n){var u=this,t,r;if(n.autohide=!0,n.constrainToViewport=!0,n.itemDefaults)for(t=n.items,r=t.length;r--;)t[r]=i.extend({},n.itemDefaults,t[r]);u._super(n),u.addClass("menu")},repaint:function(){return this.toggleClass("menu-align",!0),this._super(),this.getEl().style.height="",this.getEl("body").style.height="",this},cancel:function(){var n=this;n.hideAll(),n.fire("select")},hideAll:function(){var n=this;return this.find("menuitem").exec("hideMenu"),n._super()},preRender:function(){var n=this;return n.items().each(function(t){var i=t.settings;if(i.icon||i.selectable)return n._hasIcons=!0,!1}),n._super()}})}),i(dr,[bi],function(n){return n.extend({Defaults:{classes:"radio",role:"radio"}})}),i(fu,[e,w],function(n,t){return n.extend({renderHtml:function(){var n=this,t=n.classPrefix;return n.addClass("resizehandle"),"both"==n.settings.direction&&n.addClass("resizehandle-both"),n.canFocus=!1,'<div id="'+n._id+'" class="'+n.classes()+'"><i class="'+t+"ico "+t+'i-resize"></i></div>'},postRender:function(){var n=this;n._super(),n.resizeDragHelper=new t(this._id,{start:function(){n.fire("ResizeStart")},drag:function(t){"both"!=n.settings.direction&&(t.deltaX=0),n.fire("Resize",t)},stop:function(){n.fire("ResizeEnd")}})},remove:function(){return this.resizeDragHelper&&this.resizeDragHelper.destroy(),this._super()}})}),i(eu,[e],function(n){return n.extend({renderHtml:function(){var n=this;return n.addClass("spacer"),n.canFocus=!1,'<div id="'+n._id+'" class="'+n.classes()+'"></div>'}})}),i(ru,[ct,f],function(n,t){return n.extend({Defaults:{classes:"widget btn splitbtn",role:"button"},repaint:function(){var n=this,u=n.getEl(),r=n.layoutRect(),f,i;return n._super(),f=u.firstChild,i=u.lastChild,t.css(f,{width:r.w-t.getSize(i).width,height:r.h-2}),t.css(i,{height:r.h-2}),n},activeMenu:function(n){var i=this;t.toggleClass(i.getEl().lastChild,i.classPrefix+"active",n)},renderHtml:function(){var t=this,u=t._id,r=t.classPrefix,n,i=t.settings.icon;return n=t.settings.image,n?(i="none","string"!=typeof n&&(n=window.getSelection?n[0]:n[1]),n=" style=\"background-image: url('"+n+"')\""):n="",i=t.settings.icon?r+"ico "+r+"i-"+i:"",'<div id="'+u+'" class="'+t.classes()+'" role="button" tabindex="-1"><button type="button" hidefocus="1" tabindex="-1">'+(i?'<i class="'+i+'"'+n+"></i>":"")+(t._text?(i?" ":"")+t._text:"")+'</button><button type="button" class="'+r+'open" hidefocus="1" tabindex="-1">'+(t._menuBtnText?(i?" ":"")+t._menuBtnText:"")+' <i class="'+r+'caret"></i></button></div>'},postRender:function(){var n=this,t=n.settings.onclick;return n.on("click",function(n){var i=n.target;if(n.control==this)for(;i;){if(n.aria&&"down"!=n.aria.key||"BUTTON"==i.nodeName&&-1==i.className.indexOf("open"))return n.stopImmediatePropagation(),void t.call(this,n);i=i.parentNode}}),delete n.settings.onclick,n._super()}})}),i(uu,[li],function(n){return n.extend({Defaults:{containerClass:"stack-layout",controlClass:"stack-layout-item",endClass:"break"}})}),i(cu,[tt,f],function(n,t){return n.extend({Defaults:{layout:"absolute",defaults:{type:"panel"}},activateTab:function(n){var i;this.activeTabId&&(i=this.getEl(this.activeTabId),t.removeClass(i,this.classPrefix+"active"),i.setAttribute("aria-selected","false")),this.activeTabId="t"+n,i=this.getEl("t"+n),i.setAttribute("aria-selected","true"),t.addClass(i,this.classPrefix+"active"),this.items()[n].show().fire("showtab"),this.reflow(),this.items().each(function(t,i){n!=i&&t.hide()})},renderHtml:function(){var n=this,r=n._layout,i="",t=n.classPrefix;return n.preRender(),r.preRender(n),n.items().each(function(r,u){var f=n._id+"-t"+u;r.aria("role","tabpanel"),r.aria("labelledby",f),i+='<div id="'+f+'" class="'+t+'tab" unselectable="on" role="tab" aria-controls="'+r._id+'" aria-selected="false" tabIndex="-1">'+n.encode(r.settings.title)+"</div>"}),'<div id="'+n._id+'" class="'+n.classes()+'" hidefocus="1" tabindex="-1"><div id="'+n._id+'-head" class="'+t+'tabs" role="tablist">'+i+'</div><div id="'+n._id+'-body" class="'+n.classes("body")+'">'+r.renderHtml(n)+"</div></div>"},postRender:function(){var n=this;n._super(),n.settings.activeTab=n.settings.activeTab||0,n.activateTab(n.settings.activeTab),this.on("click",function(t){var r=t.target.parentNode,i;if(t.target.parentNode.id==n._id+"-head")for(i=r.childNodes.length;i--;)r.childNodes[i]==t.target&&n.activateTab(i)})},initLayoutRect:function(){var i=this,u,n,r,f;return n=t.getSize(i.getEl("head")).width,n=0>n?0:n,r=0,i.items().each(function(t){n=Math.max(n,t.layoutRect().minW),r=Math.max(r,t.layoutRect().minH)}),i.items().each(function(t){t.settings.x=0,t.settings.y=0,t.settings.w=n,t.settings.h=r,t.layoutRect({x:0,y:0,w:n,h:r})}),f=t.getSize(i.getEl("head")).height,i.settings.minWidth=n,i.settings.minHeight=r+f,u=i._super(),u.deltaH+=f,u.innerH=u.h-u.deltaH,u}})}),i(su,[e,f],function(n,t){return n.extend({init:function(n){var t=this;t._super(n),t._value=n.value||"",t.addClass("textbox"),n.multiline?t.addClass("multiline"):t.on("keydown",function(n){13==n.keyCode&&t.parents().reverse().each(function(t){return n.preventDefault(),t.hasEventListeners("submit")&&t.toJSON?(t.fire("submit",{data:t.toJSON()}),!1):void 0})})},disabled:function(n){var t=this;return t._rendered&&"undefined"!=typeof n&&(t.getEl().disabled=n),t._super(n)},value:function(n){var t=this;return"undefined"!=typeof n?(t._value=n,t._rendered&&(t.getEl().value=n),t):t._rendered?t.getEl().value:t._value},repaint:function(){var i=this,r,n,u,o=0,e=0,t,f;return r=i.getEl().style,n=i._layoutRect,t=i._lastRepaintRect||{},f=document,!i.settings.multiline&&f.all&&(!f.documentMode||f.documentMode<=8)&&(r.lineHeight=n.h-e+"px"),u=i._borderBox,o=u.left+u.right+8,e=u.top+u.bottom+(i.settings.multiline?8:0),n.x!==t.x&&(r.left=n.x+"px",t.x=n.x),n.y!==t.y&&(r.top=n.y+"px",t.y=n.y),n.w!==t.w&&(r.width=n.w-o+"px",t.w=n.w),n.h!==t.h&&(r.height=n.h-e+"px",t.h=n.h),i._lastRepaintRect=t,i.fire("repaint",{},!1),i},renderHtml:function(){var i=this,r=i._id,n=i.settings,u=i.encode(i._value,!1),t="";return"spellcheck"in n&&(t+=' spellcheck="'+n.spellcheck+'"'),n.maxLength&&(t+=' maxlength="'+n.maxLength+'"'),n.size&&(t+=' size="'+n.size+'"'),n.subtype&&(t+=' type="'+n.subtype+'"'),i.disabled()&&(t+=' disabled="disabled"'),n.multiline?'<textarea id="'+r+'" class="'+i.classes()+'" '+(n.rows?' rows="'+n.rows+'"':"")+' hidefocus="1"'+t+">"+u+"</textarea>":'<input id="'+r+'" class="'+i.classes()+'" value="'+u+'" hidefocus="1"'+t+" />"},postRender:function(){var n=this;return t.on(n.getEl(),"change",function(t){n.fire("change",t)}),n._super()},remove:function(){t.off(this.getEl()),this._super()}})}),i(kr,[f,v],function(n,t){return function(i,r){var u=this,f,e=t.classPrefix;u.show=function(t){return u.hide(),f=!0,window.setTimeout(function(){f&&i.appendChild(n.createFragment('<div class="'+e+"throbber"+(r?" "+e+"throbber-inline":"")+'"></div>'))},t||0),u},u.hide=function(){var n=i.lastChild;return n&&-1!=n.className.indexOf("throbber")&&n.parentNode.removeChild(n),f=!1,u}}}),hf([k,ii,r,u,ut,ei,s,oi,c,o,et,bt,y,l,ni,kt,er,g,ir,ar,ti,sr,nt,hr,dt,tr,or,ri,rr,lr,lt,b,ht,ot,st,f,v,d,cr,h,w,fr,tt,vt,ur,p,yt,pr,wr,br,it,yr,vr,ui,hi,ci,rt,bu,si,fi,wu,du,ku,vu,at,ft,ki,e,wt,pu,bi,pt,gu,di,ff,nr,of,gi,ef,wi,ai,uf,rf,tf,lu,li,nu,gr,iu,tu,vi,pi,ct,ou,yi,hu,dr,fu,eu,ru,uu,cu,su,kr])}(this),!function(n,t){var r,i;return i=t.document,r=function(){function r(i){var r;try{r=t.localStorage}catch(u){r=!1}this._options=n.extend({name:"tour",steps:[],container:"body",autoscroll:!0,keyboard:!0,storage:r,debug:!1,backdrop:!1,backdropPadding:0,redirect:!0,orphan:!1,duration:!1,delay:!1,basePath:"",template:'<div class="popover" role="tooltip"> <div class="arrow"></div> <h3 class="popover-title"></h3> <div class="popover-content"></div> <div class="popover-navigation"> <div class="btn-group"> <button class="btn btn-sm btn-default" data-role="prev">&laquo; Prev</button> <button class="btn btn-sm btn-default" data-role="next">Next &raquo;</button> <button class="btn btn-sm btn-default" data-role="pause-resume" data-pause-text="Pause" data-resume-text="Resume">Pause</button> </div> <button class="btn btn-sm btn-default" data-role="end">End tour</button> </div> </div>',afterSetState:function(){},afterGetState:function(){},afterRemoveState:function(){},onStart:function(){},onEnd:function(){},onShow:function(){},onShown:function(){},onHide:function(){},onHidden:function(){},onNext:function(){},onPrev:function(){},onPause:function(){},onResume:function(){}},i),this._force=!1,this._inited=!1,this.backdrop={overlay:null,$element:null,$background:null,backgroundShown:!1,overlayElementShown:!1}}return r.prototype.addSteps=function(n){for(var r,t=0,i=n.length;i>t;t++)r=n[t],this.addStep(r);return this},r.prototype.addStep=function(n){return this._options.steps.push(n),this},r.prototype.getStep=function(t){if(null!=this._options.steps[t])return n.extend({id:"step-"+t,path:"",placement:"right",title:"",content:"<p></p>",next:t===this._options.steps.length-1?-1:t+1,prev:t-1,animation:!0,container:this._options.container,autoscroll:this._options.autoscroll,backdrop:this._options.backdrop,backdropPadding:this._options.backdropPadding,redirect:this._options.redirect,orphan:this._options.orphan,duration:this._options.duration,delay:this._options.delay,template:this._options.template,onShow:this._options.onShow,onShown:this._options.onShown,onHide:this._options.onHide,onHidden:this._options.onHidden,onNext:this._options.onNext,onPrev:this._options.onPrev,onPause:this._options.onPause,onResume:this._options.onResume},this._options.steps[t])},r.prototype.init=function(n){return this._force=n,this.ended()?(this._debug("Tour ended, init prevented."),this):(this.setCurrentStep(),this._initMouseNavigation(),this._initKeyboardNavigation(),this._onResize(function(n){return function(){return n.showStep(n._current)}}(this)),null!==this._current&&this.showStep(this._current),this._inited=!0,this)},r.prototype.start=function(n){var t;return null==n&&(n=!1),this._inited||this.init(n),null===this._current&&(t=this._makePromise(null!=this._options.onStart?this._options.onStart(this):void 0),this._callOnPromiseDone(t,this.showStep,0)),this},r.prototype.next=function(){var n;return n=this.hideStep(this._current),this._callOnPromiseDone(n,this._showNextStep)},r.prototype.prev=function(){var n;return n=this.hideStep(this._current),this._callOnPromiseDone(n,this._showPrevStep)},r.prototype.goTo=function(n){var t;return t=this.hideStep(this._current),this._callOnPromiseDone(t,this.showStep,n)},r.prototype.end=function(){var u,r;return u=function(r){return function(){return n(i).off("click.tour-"+r._options.name),n(i).off("keyup.tour-"+r._options.name),n(t).off("resize.tour-"+r._options.name),r._setState("end","yes"),r._inited=!1,r._force=!1,r._clearTimer(),null!=r._options.onEnd?r._options.onEnd(r):void 0}}(this),r=this.hideStep(this._current),this._callOnPromiseDone(r,u)},r.prototype.ended=function(){return!this._force&&!!this._getState("end")},r.prototype.restart=function(){return this._removeState("current_step"),this._removeState("end"),this.start()},r.prototype.pause=function(){var n;return n=this.getStep(this._current),n&&n.duration?(this._paused=!0,this._duration-=+new Date-this._start,t.clearTimeout(this._timer),this._debug("Paused/Stopped step "+(this._current+1)+" timer ("+this._duration+" remaining)."),null!=n.onPause?n.onPause(this,this._duration):void 0):this},r.prototype.resume=function(){var n;return n=this.getStep(this._current),n&&n.duration?(this._paused=!1,this._start=+new Date,this._duration=this._duration||n.duration,this._timer=t.setTimeout(function(n){return function(){return n._isLast()?n.next():n.end()}}(this),this._duration),this._debug("Started step "+(this._current+1)+" timer with duration "+this._duration),null!=n.onResume&&this._duration!==n.duration?n.onResume(this,this._duration):void 0):this},r.prototype.hideStep=function(t){var u,r,i;if(i=this.getStep(t))return this._clearTimer(),r=this._makePromise(null!=i.onHide?i.onHide(this,t):void 0),u=function(r){return function(){var u;return u=n(i.element),u.data("bs.popover")||u.data("popover")||(u=n("body")),u.popover("destroy").removeClass("tour-"+r._options.name+"-element tour-"+r._options.name+"-"+t+"-element"),i.reflex&&u.removeClass("tour-step-element-reflex").off(""+r._reflexEvent(i.reflex)+".tour-"+r._options.name),i.backdrop&&r._hideBackdrop(),null!=i.onHidden?i.onHidden(r):void 0}}(this),this._callOnPromiseDone(r,u),r},r.prototype.showStep=function(n){var u,f,e,r;return this.ended()?(this._debug("Tour ended, showStep prevented."),this):(r=this.getStep(n))?(e=n<this._current,u=this._makePromise(null!=r.onShow?r.onShow(this,n):void 0),f=function(t){return function(){var o,f,u;if(t.setCurrentStep(n),f=function(){switch({}.toString.call(r.path)){case"[object Function]":return r.path();case"[object String]":return this._options.basePath+r.path;default:return r.path}}.call(t),o=[i.location.pathname,i.location.hash].join(""),t._isRedirect(f,o))return t._redirect(r,f),void 0;if(t._isOrphan(r)){if(!r.orphan)return t._debug("Skip the orphan step "+(t._current+1)+".\nOrphan option is false and the element does not exist or is hidden."),e?t._showPrevStep():t._showNextStep(),void 0;t._debug("Show the orphan step "+(t._current+1)+". Orphans option is true.")}return r.backdrop&&t._showBackdrop(t._isOrphan(r)?void 0:r.element),u=function(){if(t.getCurrentStep()===n)return null!=r.element&&r.backdrop&&t._showOverlayElement(r),t._showPopover(r,n),null!=r.onShown&&r.onShown(t),t._debug("Step "+(t._current+1)+" of "+t._options.steps.length)},r.autoscroll?t._scrollIntoView(r.element,u):u(),r.duration?t.resume():void 0}}(this),r.delay?(this._debug("Wait "+r.delay+" milliseconds to show the step "+(this._current+1)),t.setTimeout(function(n){return function(){return n._callOnPromiseDone(u,f)}}(this),r.delay)):this._callOnPromiseDone(u,f),u):void 0},r.prototype.getCurrentStep=function(){return this._current},r.prototype.setCurrentStep=function(n){return null!=n?(this._current=n,this._setState("current_step",n)):(this._current=this._getState("current_step"),this._current=null===this._current?null:parseInt(this._current,10)),this},r.prototype._setState=function(n,t){var r,i;if(this._options.storage){i=""+this._options.name+"_"+n;try{this._options.storage.setItem(i,t)}catch(u){r=u,r.code===DOMException.QUOTA_EXCEEDED_ERR&&this.debug("LocalStorage quota exceeded. State storage failed.")}return this._options.afterSetState(i,t)}return null==this._state&&(this._state={}),this._state[n]=t},r.prototype._removeState=function(n){var t;return this._options.storage?(t=""+this._options.name+"_"+n,this._options.storage.removeItem(t),this._options.afterRemoveState(t)):null!=this._state?delete this._state[n]:void 0},r.prototype._getState=function(n){var i,t;return this._options.storage?(i=""+this._options.name+"_"+n,t=this._options.storage.getItem(i)):null!=this._state&&(t=this._state[n]),(void 0===t||"null"===t)&&(t=null),this._options.afterGetState(n,t),t},r.prototype._showNextStep=function(){var t,i,n;return n=this.getStep(this._current),i=function(t){return function(){return t.showStep(n.next)}}(this),t=this._makePromise(null!=n.onNext?n.onNext(this):void 0),this._callOnPromiseDone(t,i)},r.prototype._showPrevStep=function(){var t,i,n;return n=this.getStep(this._current),i=function(t){return function(){return t.showStep(n.prev)}}(this),t=this._makePromise(null!=n.onPrev?n.onPrev(this):void 0),this._callOnPromiseDone(t,i)},r.prototype._debug=function(n){if(this._options.debug)return t.console.log("Bootstrap Tour '"+this._options.name+"' | "+n)},r.prototype._isRedirect=function(n,t){return null!=n&&""!==n&&("[object RegExp]"==={}.toString.call(n)&&!n.test(t)||"[object String]"==={}.toString.call(n)&&n.replace(/\?.*$/,"").replace(/\/?$/,"")!==t.replace(/\/?$/,""))},r.prototype._redirect=function(t,r){return n.isFunction(t.redirect)?t.redirect.call(this,r):t.redirect===!0?(this._debug("Redirect to "+r),i.location.href=r):void 0},r.prototype._isOrphan=function(t){return null==t.element||!n(t.element).length||n(t.element).is(":hidden")&&"http://www.w3.org/2000/svg"!==n(t.element)[0].namespaceURI},r.prototype._isLast=function(){return this._current<this._options.steps.length-1},r.prototype._showPopover=function(t,i){var r,f,u,e;return n(".tour-"+this._options.name).remove(),e=n.extend({},this._options),u=this._isOrphan(t),t.template=this._template(t,i),u&&(t.element="body",t.placement="top"),r=n(t.element),r.addClass("tour-"+this._options.name+"-element tour-"+this._options.name+"-"+i+"-element"),t.options&&n.extend(e,t.options),t.reflex&&!u&&(r.addClass("tour-step-element-reflex"),r.off(""+this._reflexEvent(t.reflex)+".tour-"+this._options.name),r.on(""+this._reflexEvent(t.reflex)+".tour-"+this._options.name,function(n){return function(){return n._isLast()?n.next():n.end()}}(this))),r.popover({placement:t.placement,trigger:"manual",title:t.title,content:t.content,html:!0,animation:t.animation,container:t.container,template:t.template,selector:t.element}).popover("show"),f=r.data("bs.popover")?r.data("bs.popover").tip():r.data("popover").tip(),f.attr("id",t.id),this._reposition(f,t),u?this._center(f):void 0},r.prototype._template=function(t,i){var r,f,e,u;return u=n.isFunction(t.template)?n(t.template(i,t)):n(t.template),r=u.find(".popover-navigation"),e=r.find('[data-role="prev"]'),f=r.find('[data-role="next"]'),this._isOrphan(t)&&u.addClass("orphan"),u.addClass("tour-"+this._options.name+" tour-"+this._options.name+"-"+i),t.prev<0&&r.find('[data-role="prev"]').addClass("disabled"),t.next<0&&r.find('[data-role="next"]').addClass("disabled"),t.duration||r.find('[data-role="pause-resume"]').remove(),u.clone().wrap("<div>").parent().html()},r.prototype._reflexEvent=function(n){return"[object Boolean]"==={}.toString.call(n)?"click":n},r.prototype._reposition=function(t,r){var s,h,o,c,e,f,u;if(c=t[0].offsetWidth,h=t[0].offsetHeight,u=t.offset(),e=u.left,f=u.top,s=n(i).outerHeight()-u.top-t.outerHeight(),0>s&&(u.top=u.top+s),o=n("html").outerWidth()-u.left-t.outerWidth(),0>o&&(u.left=u.left+o),u.top<0&&(u.top=0),u.left<0&&(u.left=0),t.offset(u),"bottom"===r.placement||"top"===r.placement){if(e!==u.left)return this._replaceArrow(t,2*(u.left-e),c,"left")}else if(f!==u.top)return this._replaceArrow(t,2*(u.top-f),h,"top")},r.prototype._center=function(i){return i.css("top",n(t).outerHeight()/2-i.outerHeight()/2)},r.prototype._replaceArrow=function(n,t,i,r){return n.find(".arrow").css(r,t?50*(1-t/i)+"%":"")},r.prototype._scrollIntoView=function(i,r){var u,s,h,o,f,e;return u=n(i),u.length?(s=n(t),o=u.offset().top,e=s.height(),f=Math.max(0,o-e/2),this._debug("Scroll into view. ScrollTop: "+f+". Element offset: "+o+". Window height: "+e+"."),h=0,n("body, html").stop(!0,!0).animate({scrollTop:Math.ceil(f)},function(n){return function(){if(2==++h)return r(),n._debug("Scroll into view.\nAnimation end element offset: "+u.offset().top+".\nWindow height: "+s.height()+".")}}(this))):r()},r.prototype._onResize=function(i,r){return n(t).on("resize.tour-"+this._options.name,function(){return clearTimeout(r),r=setTimeout(i,100)})},r.prototype._initMouseNavigation=function(){var t;return t=this,n(i).off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='prev']").off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='next']").off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='end']").off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='pause-resume']").on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='next']",function(n){return function(t){return t.preventDefault(),n.next()}}(this)).on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='prev']",function(n){return function(t){return t.preventDefault(),n.prev()}}(this)).on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='end']",function(n){return function(t){return t.preventDefault(),n.end()}}(this)).on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='pause-resume']",function(i){var r;return i.preventDefault(),r=n(this),r.text(t._paused?r.data("pause-text"):r.data("resume-text")),t._paused?t.resume():t.pause()})},r.prototype._initKeyboardNavigation=function(){if(this._options.keyboard)return n(i).on("keyup.tour-"+this._options.name,function(n){return function(t){if(t.which)switch(t.which){case 39:return t.preventDefault(),n._isLast()?n.next():n.end();case 37:if(t.preventDefault(),n._current>0)return n.prev();break;case 27:return t.preventDefault(),n.end()}}}(this))},r.prototype._makePromise=function(t){return t&&n.isFunction(t.then)?t:null},r.prototype._callOnPromiseDone=function(n,t,i){return n?n.then(function(n){return function(){return t.call(n,i)}}(this)):t.call(this,i)},r.prototype._showBackdrop=function(){if(!this.backdrop.backgroundShown)return this.backdrop=n("<div>",{"class":"tour-backdrop"}),this.backdrop.backgroundShown=!0,n("body").append(this.backdrop)},r.prototype._hideBackdrop=function(){return this._hideOverlayElement(),this._hideBackground()},r.prototype._hideBackground=function(){if(this.backdrop)return this.backdrop.remove(),this.backdrop.overlay=null,this.backdrop.backgroundShown=!1},r.prototype._showOverlayElement=function(t){var i,r;return i=n(t.element),i&&0!==i.length&&!this.backdrop.overlayElementShown?(this.backdrop.overlayElementShown=!0,this.backdrop.$element=i.addClass("tour-step-backdrop"),this.backdrop.$background=n("<div>",{"class":"tour-step-background"}),r={width:i.innerWidth(),height:i.innerHeight(),offset:i.offset()},this.backdrop.$background.appendTo("body"),t.backdropPadding&&(r=this._applyBackdropPadding(t.backdropPadding,r)),this.backdrop.$background.width(r.width).height(r.height).offset(r.offset)):void 0},r.prototype._hideOverlayElement=function(){if(this.backdrop.overlayElementShown)return this.backdrop.$element.removeClass("tour-step-backdrop"),this.backdrop.$background.remove(),this.backdrop.$element=null,this.backdrop.$background=null,this.backdrop.overlayElementShown=!1},r.prototype._applyBackdropPadding=function(n,t){return"object"==typeof n?(null==n.top&&(n.top=0),null==n.right&&(n.right=0),null==n.bottom&&(n.bottom=0),null==n.left&&(n.left=0),t.offset.top=t.offset.top-n.top,t.offset.left=t.offset.left-n.left,t.width=t.width+n.left+n.right,t.height=t.height+n.top+n.bottom):(t.offset.top=t.offset.top-n,t.offset.left=t.offset.left-n,t.width=t.width+2*n,t.height=t.height+2*n),t},r.prototype._clearTimer=function(){return t.clearTimeout(this._timer),this._timer=null,this._duration=null},r}(),t.Tour=r}(jQuery,window),$(function(){function t(){var n=!1;return function(t){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))&&(n=!0)}(navigator.userAgent||navigator.vendor||window.opera),n}if(!t()&&($(".home-banners").length>0&&(IsCookieExists("tourstart")||(document.cookie="tourstart=true;expires=Fri, 2 Aug 2030 01:00:00 UT;path=/")),$("#PageHeader").length&&($(".home-recent").length&&($(".most-recent-section").attr("id","MostRecentSection"),$(".most-recent-section .home-recent .functional-links:first").attr("id","TourFunctionalLinks")),$(".learn-introduction-section").length&&($(".library-section.learn-topics header h2").attr("id","BrowseByTopic"),$(".library-section.learn-topics .article-container:first .functional-links").attr("id","TourFunctionalLinks2")),$(".in-my-viewfinder-container").length&&$(".in-my-viewfinder-container").attr("id","ViewFinder"),$(".reading-options").length&&($(".reading-options").attr("id","ReadingOptions"),$(".user-container").attr("id","UserContainer")),IsCookieExists("tourstart")&IsCookieExists("tourend")==!1))){var n=new Tour({onEnd:function(){document.cookie="tourend=true;expires=Fri, 2 Aug 2030 01:00:00 UT;path=/"},steps:[{orphan:!0,content:"Welcome to the new intouch.org! Let us show you around.",template:"<div class='popover tour'><div class='arrow'></div><h3 class='popover-title'></h3><div class='popover-content'></div><div class='popover-navigation'><div class='btn-group'><button class='btn btn-default' data-role='next'>Start Tour</button></div><button class='btn btn-default' data-role='end'>No Thank You</button></div></div>"},{path:"/",element:"#MainNav",content:"It's now easier than ever to find what you love: Watch your favorite sermons or discover new favorites, read daily devotions and articles from the pages of In Touch Magazine, download radio podcasts, and more.",placement:"bottom",onShown:function(){$(".main-navigation").addClass("tour-glow")},onNext:function(){$(".main-navigation").removeClass("tour-glow")},onPrev:function(){$(".main-navigation").removeClass("tour-glow")}},{path:"/",element:"#MostRecentSection",content:"Every day, the most recent sermons, radio podcasts, and daily devotions will be right here, so you can find what you're looking for, quickly and easily.",placement:"top"},{path:"/",element:"#TourFunctionalLinks",content:"Save or bookmark anything on the site, and then come back later to watch, listen to, or read what matters most to you.",placement:"bottom"},{path:"/learn",element:"#BrowseByTopic",content:"Learn more about living the Christian life here in our Learning Center. Topics and subtopics allow you to search with ease and find just what you need.",placement:"top"},{path:"/learn",element:"#TourFunctionalLinks2",content:'Never miss new sermons, digital articles, or In Touch Magazine issues by "following" the topics and channels that matter to you most. Share what you love with friends and family so that they, too, can learn and grow!',placement:"bottom"},{path:"/watch/when-all-hope-is-gone",element:"#SideTools",content:"Go deeper in your relationship with Christ week after week as you follow along with Dr. Stanley's sermons. Get the most out of your viewing experience with helpful sermon outlines and newly integrated note-taking and Bible-reading widgets.",placement:"left"},{path:"/watch/when-all-hope-is-gone",element:"#SideTools",content:"Practical sermon outlines help you follow along as Dr. Stanley delivers his message.",placement:"left",onShow:function(){$(".side-tools-container ul.nav-tabs li").removeClass("active"),$(".side-tools-container ul.nav-tabs li:nth-child(1)").addClass("active"),$(".side-tools-container .tab-content .tab-pane").removeClass("active"),$(".side-tools-container .tab-content .tab-pane:nth-child(1)").addClass("active")},onShown:function(){$('a[href^="#SermonOutline"]').addClass("tour-glow2")},onNext:function(){$('a[href^="#SermonOutline"]').removeClass("tour-glow2")},onPrev:function(){$('a[href^="#SermonOutline"]').removeClass("tour-glow2")}},{path:"/watch/when-all-hope-is-gone",element:"#SideTools",content:"Take your own notes or add to the sermon outline while viewing one of Dr. Stanley's messages. And with an intouch.org account, you can save your notes and come back to them anytime you want, from anywhere!",placement:"left",onShow:function(){$(".side-tools-container ul.nav-tabs li").removeClass("active"),$(".side-tools-container ul.nav-tabs li:nth-child(2)").addClass("active"),$(".side-tools-container .tab-content .tab-pane").removeClass("active"),$(".side-tools-container .tab-content .tab-pane:nth-child(2)").addClass("active")},onShown:function(){$('a[href^="#MyNotes"]').addClass("tour-glow2")},onNext:function(){$('a[href^="#MyNotes"]').removeClass("tour-glow2")},onPrev:function(){$('a[href^="#MyNotes"]').removeClass("tour-glow2")}},{path:"/watch/when-all-hope-is-gone",element:"#SideTools",content:"Relevant scriptures referenced by Dr. Stanley in his message will populate here for further study, encouragement, and insight.",placement:"left",onShow:function(){$(".side-tools-container ul.nav-tabs li").removeClass("active"),$(".side-tools-container ul.nav-tabs li:nth-child(3)").addClass("active"),$(".side-tools-container .tab-content .tab-pane").removeClass("active"),$(".side-tools-container .tab-content .tab-pane:nth-child(3)").addClass("active")},onShown:function(){$('a[href^="#Bible"]').addClass("tour-glow2")},onNext:function(){$('a[href^="#Bible"]').removeClass("tour-glow2")},onPrev:function(){$('a[href^="#Bible"]').removeClass("tour-glow2")}},{path:"/read/magazine",orphan:!0,content:"Welcome to the In Touch Digital Magazine! <br /><br />Read daily devotions, explore featured articles, and search content from current and past issues."},{path:"/read/magazine",element:"#ViewFinder",content:"Did you know Dr. Stanley is an accomplished photographer? Take in the splendor of God's creation as captured by Dr. Stanley on his travels. Come back often to find something new!",placement:"top"},{path:"/read/magazine/features/when-jesus-invites-himself-over",orphan:!0,content:"Adjust viewing settings to read daily devotions with ease or listen to them right on the page. Search for and bookmark your favorites so you can save them for reading later or share with others online. <br /><br />Quickly find the most recent daily devotion or the devotion from any past date using the search bar and drop-down date menu on the right."},{path:"/read/magazine/features/when-jesus-invites-himself-over",element:"#ReadingOptions",content:"Reading online is made comfortable and convenient adjustable viewing options. Make the text background lighter or darker, and adjust the font size for an enjoyable reading experience.",placement:"bottom",onShow:function(){$(".reading-options .dropdown").addClass("open")}},{path:"/read/magazine/features/when-jesus-invites-himself-over",element:"#UserContainer",content:"Creating an account is quick and easy! Keep track of your favorite In Touch channels and stay informed on the newest resources from topics that matter most to you.",placement:"bottom"}]});n.init(),n.start(!0)}}),jQuery.validator.addMethod("cdnPostal",function(n,t){return this.optional(t)||n.match(/[a-zA-Z][0-9][a-zA-Z](-| |)[0-9][a-zA-Z][0-9]/)},"Please specify a valid canadian postal code."),jQuery.validator.addMethod("letterswithbasicpunc",function(n,t){return this.optional(t)||/^[a-z\-.,()'"\s]+$/i.test(n)},"Letters or punctuation only please"),function(n,t,i){var r={};r.UTIL={setupFormValidation:function(){n("#contactUsForm").validate({errorClass:"error-msg",errorElement:"div",highlight:function(t){n(t).parents(".input-container").addClass("error")},unhighlight:function(t){n(t).parents(".input-container").removeClass("error")},rules:{FirstName:"required",LastName:"required",Address1:"required",City:{required:!0,letterswithbasicpunc:!0,minlength:2},ZipCode:{required:!1,number:!1},Country:"required",State:"required",Email:{required:!0,email:!0},ConfirmEmail:{required:!0,email:!0},Category:"required",Note:"required"},messages:{FirstName:"Please enter your First Name",LastName:"Please enter your Last Name",Address1:"Please enter your Address",City:{required:"Please enter your City",letterswithbasicpunc:"Please enter a valid City"},ZipCode:"Please enter your ZipCode",Country:"Please enter your Country",State:"Please enter your State",Category:"Please enter a Category",Note:"Please add a note",Email:{required:"Please enter a valid email address",remote:"User already registered"},ConfirmEmail:{required:"Please enter a valid confirmation email address",equalTo:"Please make sure this matches the E-mail field"}},submitHandler:function(n){n.submit()}})}},n(i).ready(function(){r.UTIL.setupFormValidation()})}(jQuery,window,document),$(function(){$("#contactUsForm input").on("blur",function(){$(this).val($.trim($(this).val()))});$("#Country").change(function(){var n;if($(this).val()=="Canada"){for($(".international").show(),$("#ZipCode").rules("remove"),$("#ZipCode").rules("add",{required:!0,cdnPostal:!0,messages:{cdnPostal:"Enter a Valid Canadian Postal Code"}}),$("#State").empty(),n=0;n<CAStates.length-1;n+=2)$("#State").append($("<option/>",{value:CAStates[n+1],text:CAStates[n]}));$("#State").selectpicker("refresh"),$("#State").selectpicker("deselectAll"),$("#State").selectpicker("refresh"),$("#State").selectpicker("show"),$("#OtherState").hide()}else if($(this).val()=="United States"){for($(".international").show(),$("#ZipCode").rules("remove"),$("#ZipCode").rules("add",{required:!0,number:!0}),$("#State").empty(),n=0;n<USStates.length-1;n+=2)$("#State").append($("<option/>",{value:USStates[n+1],text:USStates[n]}));$("#State").selectpicker("refresh"),$("#State").selectpicker("deselectAll"),$("#State").selectpicker("refresh"),$("#State").selectpicker("show"),$("#OtherState").hide()}else $("#ZipCode").rules("remove"),$("#State").rules("remove"),$("#OtherState").show(),$("#State").selectpicker("hide")})}),$(document).ready(function(){function n(){var n=tinyMCE.activeEditor.getContent({format:"text"}).trim();return n==""||n==$("#"+tinyMCE.activeEditor.id).attr("placeholder")?!0:!1}$("#MyNotesField").length>0&&(document.broadcastCompanionNotesChanged=!1,$("#MyNotesField").data("override")!=!0&&tinyMCE.init({selector:"#MyNotesField",toolbar:!1,menubar:!1,statusbar:!1,resize:!0,visual:!1,content_css:"/Skins/css/tinyMCE.css",entity_encoding:"raw",setup:function(t){var i,r;t.on("KeyDown",function(n){var i=parseInt(n.which),t=[37,38,39,40];$.inArray(i,t,0)===-1&&(tinymce.activeEditor.formatter.match("usertext")||tinymce.activeEditor.formatter.apply("usertext")),document.broadcastCompanionNotesChanged=!0});t.on("init",function(){if(n()&&typeof Storage!==undefined&&sessionStorage.savedNotes!==undefined)try{var i=JSON.parse(sessionStorage.savedNotes);i.sermonId!==undefined&&i.sermonId==$("#NotesForm #sermonId").val()&&tinyMCE.activeEditor.setContent($("<div/>").html(i.notes).text())}catch(r){}});if(i=$("#"+t.id).attr("placeholder"),typeof i!="undefined"&&i!==!1){r=!1;t.on("init",function(){var n=t.getContent();n.length===0&&(t.setContent(i),n=i),r=n==i,!r}).on("focus",function(){tinyMCE.activeEditor.getContent({format:"text"}).trim()===$("#"+tinyMCE.activeEditor.id).attr("placeholder")&&t.setContent("")}).on("blur",function(){t.getContent().length===0&&t.setContent(i)})}},formats:{usertext:{inline:"span",classes:"editor-forecolor",styles:{color:"#000"}}},width:"100%"}),$("#CopySermonOutline").click(function(t){t.preventDefault(),$("#CopySermonOutline").data("copied")!==!0&&(n()?tinyMCE.activeEditor.setContent($("#SermonOutline .content-section").html(),{format:"raw"}):tinyMCE.activeEditor.dom.add(tinyMCE.activeEditor.getBody(),"div",{},$("#SermonOutline .content-section").html()),$("#CopySermonOutline").data("copied",!0),$("#MyNotes").scrollTop())}),$("#SaveNotesButton").click(function(n){n.preventDefault(),saveNotes()}),$(".create-account-link").click(function(){saveNotes()}),$(".facebook-login-link").click(function(){saveNotes()}),$("#SermonOutline").length>0?applyScripturizer($("#SermonOutline .content-section")):$("#CopySermonOutline").hide(),window.onbeforeunload=function(){if(document.broadcastCompanionNotesChanged)return"You have unsaved notes."})}),$(function(){$(document).on("click",".scripturizer-content .show-bible",function(n){var t,r,i;n.preventDefault(),t="",typeof $(this).data("book")=="undefined"?t=$(this).text():(r=getMatches($(this).text(),lineRegex),t=BuildScript(r[0],$(this).data("book"))),$("#FloatingBible").length>0?$('#FloatingBible .nav-tabs li a[data-tabname="Bible"]').click():$('.nav-tabs a[href="#Bible"]').tab("show"),i=$(".panel-collapse[data-scripture='"+t+"']").siblings(".panel-heading").find(".accordion-toggle"),i.hasClass("collapsed")&&i.click()})});var dictBooks={Genesis:"Gen.,Gen".split(","),Exodus:"Exod,Ex.".split(","),Numbers:"Numb,Num.,Nmb".split(","),Leviticus:"Levit,Lev.,Lev".split(","),Deuteronomy:"Deut.,Deut".split(","),Joshua:"Josh.,Josh".split(","),Judges:"Judg.,Judg,Jdg".split(","),Ruth:"Ru".split(","),"2 Samuel":"2 Sam.,2 Sam,2 Sml".split(","),Kings:"Kngs,Kin".split(","),Chronicles:"Chron.,Chron,Chr".split(","),Ezra:"Ez".split(","),Nehemiah:"Nehem,Neh.".split(","),Esther:"Esth,Est.".split(","),Job:"Jb".split(","),Psalms:"Psalm,Psa,Ps.".split(","),Proverbs:"Prov.,Prov".split(","),Ecclesiastes:"Eccl.,Eccl".split(","),"Songs of Solomon":"Songs,Song".split(","),Isaiah:"Isa.,Isa,Is.".split(","),Jeremiah:"Jerem,Jer.,Jer".split(","),Lamentations:"Lament,Lam.,Lam".split(","),Ezekiel:"Ezek.,Ezek".split(","),Daniel:"Dan.".split(","),Hosea:"Hos.,Hos".split(","),Joel:"Jo".split(","),Amos:"Am".split(","),Obadiah:"Obad.,Obad".split(","),Jonah:"Jon.,Jon".split(","),Micah:"Mic.,Mic".split(","),Nahum:"Nah.,Nah".split(","),Habakkuk:"Habak.,Hab.,Hab".split(","),Zephaniah:"Zeph.,Zeph".split(","),Haggai:"Hag.,Hag".split(","),Zechariah:"Zech.,Zech".split(","),Malachi:"Malac,Mal.,Mal".split(","),Matthew:"Mathew,Matt.,Matt,Mat.,Mat".split(","),Mark:"Mrk.,Mrk".split(","),Luke:"Lk.,Lk".split(","),John:"Jhn,Jo,Jn".split(","),Acts:"Ac".split(","),Romans:"Rom.,Rom".split(","),"1 Corinthians":"1 Corin,1 Cor.,1 Cor".split(","),"2 Corinthians":"2 Corin, 2 Cor.,2 Cor".split(","),Galatians:"Galat,Gal.,Gal".split(","),Ephesians:"Ephes,Eph.,Eph".split(","),Philippians:"Phili,Phil.".split(","),Colossians:"Colos,Col.,Col".split(","),"1 Thessalonians":"1 Thess.,1 Thes".split(","),"2 Thessalonians":"2 Thess.,2 Thes".split(","),"1 Timothy":"1 Tim.,1 Tim".split(","),"2 Timothy":"2 Tim.,2 Tim".split(","),Titus:"Tts,Tit".split(","),Philemon:"Philem.,Phil".split(","),Hebrews:"Hebr,Heb.".split(","),James:"Jam,Jms".split(","),Peter:"Pete".split(","),Jude:"Ju".split(","),Revelations:"Revel,Rev.,Rev".split(",")},lineRegex=RegExp("((?:(?:\\d)\\s){0,1}(?:[a-z].)+){0,1}\\s*(\\d+){1,3}[-]{0,1}(\\d+){0,1}[:]{0,1}(\\d+){0,3}[-]{0,1}([\\d]+){0,3}","gi")