var _____WB$wombat$assign$function_____=function(name){return (globalThis._wb_wombat && globalThis._wb_wombat.local_init && globalThis._wb_wombat.local_init(name))||globalThis[name];};if(!globalThis.__WB_pmw){globalThis.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}{
let window = _____WB$wombat$assign$function_____("window");
let self = _____WB$wombat$assign$function_____("self");
let document = _____WB$wombat$assign$function_____("document");
let location = _____WB$wombat$assign$function_____("location");
let top = _____WB$wombat$assign$function_____("top");
let parent = _____WB$wombat$assign$function_____("parent");
let frames = _____WB$wombat$assign$function_____("frames");
let opener = _____WB$wombat$assign$function_____("opener");
(function(b,a){if(!window.LJ_cmtinfo){LJ_cmtinfo={}}b.widget("dw.trackbutton",{options:{},_toggleSubscriptions:function(c,e){var d=this;c.subid=Number(c.subid);var f=[];if((c.subid&&!e.newComments)||(!c.subid&&e.newComments)){f.push(d._toggleSubscription(c,"newComments"))}c.newentry_subid=Number(c.newentry_subid);if((c.newentry_subid&&!e.newEntry)||(!c.newentry_subid&&e.newEntry)){var g=new Object(c);g.subid=Number(c.newentry_subid);f.push(d._toggleSubscription(g,"newEntry"))}if(f.length){d.element.ajaxtip().ajaxtip("load",f)}},_toggleSubscription:function(e,g){var f=this;var h;var i={auth_token:g==="newEntry"?e.newentry_token:e.auth_token};if(Number(e.subid)){h="delsub";i.subid=e.subid}else{h="addsub";var c;if(g==="newEntry"){i.etypeid=e.newentry_etypeid;c=["journalid"]}else{c=["journalid","arg1","arg2","etypeid"]}b.each(c,(function(j,k){if(Number(e[k])){i[k]=parseInt(e[k],10)}}))}i.action=h;var d=f.element;return{endpoint:"esn_subs",ajax:{type:"POST",context:f,data:i,success:function(o,k,q){if(o.error){d.ajaxtip("error",o.error)}else{if(o.success){if(o.msg){d.ajaxtip("success",o.msg)}if(o.subscribed){if(o.subid){d.attr("lj_subid",o.subid)}if(o.newentry_subid){d.attr("lj_newentry_subid",o.newentry_subid)}}else{if(o.event_class=="LJ::Event::JournalNewComment"){d.attr("lj_subid",0)}if(o.event_class=="LJ::Event::JournalNewEntry"){d.attr("lj_newentry_subid",0)}}if(o.auth_token){d.attr("lj_auth_token",o.auth_token)}if(o.newentry_token){d.attr("lj_newentry_token",o.newentry_token)}var n=o.subscribed?"on":"off";if(o.event_class=="LJ::Event::JournalNewComment"){var p=d.attr("lj_dtalkid");if(p){if(!o.subscribed){var j;var l=p;var m=LJ_cmtinfo[p+""];while(j=f._getParentButton(l)){l=j.attr("lj_dtalkid");if(!l){break}if(!Number(j.attr("lj_subid"))){continue}n="parent";break}}this._updateThread(p,n)}else{this._updateButton(f.element,n)}}}}}}}},_getParentButton:function(e){var c=LJ_cmtinfo[e+""];if(!c){return null}var d=c.parent;if(!d){return null}return b("#lj_track_btn_"+d)},_updateButton:function(f,e){var d;switch(e){case"on":case"parent":d="/silk/entry/untrack.png";break;case"off":d="/silk/entry/track.png";break;default:alert("Unknown tracking state "+e);break}if(f.has("img")){f.find("img").attr("src",a.imgprefix+d)}else{var c=f.html();f.html(f.attr("js_swapname"));f.attr("js_swapname",c)}},_updateThread:function(g,f){var c=this;var e=b("#lj_track_btn_"+g);if(!e.length){return}var d=LJ_cmtinfo[g+""];if(!d){return}if(Number(e.attr("lj_subid"))&&f!="on"){return}if(d.rc&&d.rc.length){b.each(d.rc,function(h,j){window.setTimeout(function(){var i;switch(f){case"on":i="parent";break;case"off":i="off";break;case"parent":i="parent";break;default:e.ajaxtip("error","Unknown tracking state "+f);break}c._updateThread(j,i)},300)})}c._updateButton(e,f)},_create:function(){if(!a||!a.has_remote){return}var c=this;var d=c.element;if(d.attr("lj_subid")===undefined||d.attr("lj_journalid")===undefined){return}d.click(function(h){if(h.ctrlKey||h.metaKey){return}if(h.which!=1){return}h.preventDefault();h.stopPropagation();var l={};var j=["arg1","arg2","etypeid","newentry_etypeid","newentry_token","newentry_subid","journalid","subid","auth_token"];b.each(j,function(p,e){l[e]=d.attr("lj_"+e)});var g=b("<div class='trackdialog'></div>");var m=function(s,q){var r="newentrytrack"+Unique.id();var p=b("<input></input>",{type:"checkbox",id:r,checked:q});var e=b("<div></div>").append(p,b("<label></label>",{"for":r}).html(s)).appendTo(g);return p};var o=Number(l.newentry_subid)?true:false;var n=Number(l.subid)?true:false;var i;var k;if(Number(d.attr("lj_dtalkid"))){k=m("someone replies in this comment thread",true)}else{var f=LJ_cmtinfo.journal||d.attr("journal")||a.currentJournal;if(f){i=m(f+" posts a new entry",o)}k=m("someone comments on this post",n)}g.dialog({title:"Email me when",dialogClass:"track-dialog",position:{my:"center bottom",at:"right top",of:this,collision:"fit fit"},buttons:{"Save Changes":function(){b(this).dialog("close");c._toggleSubscriptions(l,{newEntry:i?i.is(":checked"):false,newComments:k.is(":checked")})},"More Options":function(){document.location=d.attr("href")}},width:500})})}})})(jQuery,window.Site||{});jQuery(function(a){a("a.TrackButton").trackbutton();a(document.body).delegate("*","updatedcontent.comment",function(b){b.stopPropagation();a("a.TrackButton",this).trackbutton()})});
jQuery(function(g){var e=g("form#qrform");if(e.length===0){e=g("form#postform")}var f=g("textarea#body");if(f.length===0){f=g("textarea#commenttext")}var d=g("#comment-text-quote");var a=Site.cmax_comment;g(".js-only").show();g(".no-js").hide();g(window).on("pageshow",function(i){if(i.originalEvent.persisted){e.find('input[type="submit"]').prop("disabled",false)}});var h=true;var c="";if(window.matchMedia("(any-hover: none)").matches){document.addEventListener("selectionchange",function(){newSelection=document.getSelection().toString();if(newSelection.length>0){c=newSelection}})}function b(){var i=document.getSelection().toString();if(i.length===0){i=c}c="";return i}d.click(function(k){var l=b();l=l.replace(/^\s+/,"").replace(/\s+$/,"");if(l.length===0&&h){alert(g(k.target).data("quoteError"))}h=false;var i=l.search(/\n/)==-1?"q":"blockquote";var j=f[0];j.focus();j.value=j.value+"<"+i+">"+l+"</"+i+">";j.caretPos=j.value;j.focus()});e.submit(function(j){var i=f.val().length;if(i>a){alert("Sorry, but your comment of "+i+" characters exceeds the maximum character length of "+a+".  Please try shortening it and then post again.");j.stopImmediatePropagation();j.preventDefault();e.find('input[type="submit"]').prop("disabled",false)}})});
(function(a){a.widget("dw.dynamicpoll",{_init:function(){this._initForm();this._initResults()},_initResults:function(){var c=this;var b=c.element.children(":not(form.LJ_PollForm)");if(b.length==0){return}b.find("a.LJ_PollAnswerLink").click(function(h){h.stopPropagation();h.preventDefault();var f=a(this);var g=f.attr("lj_pollid");var d=f.attr("lj_qid");if(!g||!d){return}f.ajaxtip().ajaxtip("load",{endpoint:"poll",ajax:{type:"POST",data:{pollid:g,pollqid:d,page:f.attr("lj_page"),pagesize:f.attr("lj_pagesize"),action:"get_answers"},success:function(l,j,o){if(l.error){f.ajaxtip("error",l.error)}else{var n=l.pollid;var i=l.pollqid;if(!n||!i){f.ajaxtip("error","Error fetching poll results.")}else{f.ajaxtip("close");var k=l.page;var m;var e;if(k){m=f.closest("div.lj_pollanswer_paging");e=m.prev("div.lj_pollanswer")}else{m=a("<div class='lj_pollanswer_paging'></div>");e=a("<div class='lj_pollanswer'></div>");f.after(e,m).hide()}m.html(l.paging_html||"");e.html(l.answer_html||"(No answers)");e.append("<div class='hideanswers'><p></p><a href='#'>Hide Answers</a></div>");a(".hideanswers").click(function(p){p.stopPropagation();p.preventDefault();a(this).closest(".lj_pollanswer").siblings(".lj_pollanswer_paging").remove().end().siblings(".LJ_PollAnswerLink").show().end().remove()});m.trigger("updatedcontent.poll");e.trigger("updatedcontent.poll")}}}}})}).end().filter(".respondents").children("a.LJ_PollRespondentsLink").click(function(g){g.stopPropagation();g.preventDefault();var d=a(this);var f=d.attr("lj_pollid");d.ajaxtip().ajaxtip("load",{endpoint:"poll",ajax:{type:"POST",data:{pollid:f,action:"get_respondents"},success:function(h,e,i){if(h.error){d.ajaxtip("error",h.error)}else{d.ajaxtip("close").hide();d.closest("div").append(h.answer_html);d.closest("div").parent().trigger("updatedcontent.poll")}}}})}).end().end().filter("a.LJ_PollChangeLink").click(function(f){f.stopPropagation();f.preventDefault();var d=a(this);d.ajaxtip().ajaxtip("load",{endpoint:"pollvote",ajax:{context:c,type:"POST",data:{action:"change",pollid:d.attr("lj_pollid")},success:function(g,e,h){if(g.error){d.ajaxtip("error",g.error)}else{d.ajaxtip("close");this.element.html(g.results_html).trigger("updatedcontent.poll")}}}})}).end();a("a.LJ_PollUserAnswerLink").click(function(h){h.stopImmediatePropagation();h.preventDefault();var d=a(this);var g=d.attr("lj_pollid");var f=d.attr("lj_userid");if(!g||!f){return}if(d.prop("innerHTML")==="[-]"){d.siblings(".useranswer").remove().end().siblings(".polluser").show();d.html("[+]")}else{d.ajaxtip().ajaxtip("load",{endpoint:"poll",ajax:{type:"POST",data:{pollid:g,userid:f,action:"get_user_answers"},success:function(j,e,l){if(j.error){d.ajaxtip("error",j.error)}else{var k=j.pollid;var i=j.userid;if(!k||!i){d.ajaxtip("error","Error fetching poll results.")}else{d.ajaxtip("close");d.html("[-]");d.siblings(".polluser").hide().closest("div").append(j.answer_html)}}}}})}})},_initForm:function(){var b=this;var c=b.element.children("form.LJ_PollForm");if(c.length==0){return}c.find("input.LJ_PollSubmit").click(function(f){f.preventDefault();f.stopPropagation();var d=new Array();d=c.serializeArray();d.push({name:"action",value:"vote"});var g=a(this);g.ajaxtip().ajaxtip("load",{endpoint:"pollvote",ajax:{context:b,type:"POST",data:d,success:function(h,e,i){if(h.error){g.ajaxtip("error",h.error)}else{g.ajaxtip("close");this.element.html(h.results_html).trigger("updatedcontent.poll")}}}})}).end().find("a.LJ_PollClearLink").click(function(d){d.stopPropagation();d.preventDefault();c.find("input").each(function(){if(this.type=="text"){this.value=""}else{if(this.type=="radio"||this.type=="checkbox"){this.checked=false}}});c.find("select").each(function(){this.selectedIndex=0})}).end().find("a.LJ_PollDisplayLink").click(function(f){f.stopPropagation();f.preventDefault();var d=a(this);d.ajaxtip().ajaxtip("load",{endpoint:"pollvote",ajax:{context:b,type:"POST",data:{action:"display",pollid:d.attr("lj_pollid")},success:function(g,e,h){if(g.error){d.ajaxtip("error",g.error)}else{d.ajaxtip("close");this.element.html(g.results_html).trigger("updatedcontent.poll")}}}})})}})})(jQuery);jQuery(document).ready(function(a){a(".poll-container").dynamicpoll();a(document.body).delegate("*","updatedcontent.entry.poll",function(b){b.stopPropagation();a(this).find(".poll-container").andSelf().dynamicpoll()})});
(function(b){function a(d){d.attr("aria-expanded","true");d.attr("alt","Hide tag navigation");d.attr("src",Site.imgprefix+"/silk/site/delete.png")}function c(d){d.attr("aria-expanded","false");d.attr("alt","Show tag navigation");d.attr("title","Tag navigation: Select this button, then a tag, then use the arrows displayed to navigate through entries with that tag.");d.attr("src",Site.imgprefix+"/silk/site/add.png")}b.fn.tagnav=function(){this.each(function(){var f=b(this);var e=b("<input class='tag-nav-trigger' type='image' />");f.after(e);c(e);var g=e.parent(".tag");var d;e.click(function(h){h.stopPropagation();h.preventDefault();if(!d){d=b("<span><input type='image' src='"+Site.imgprefix+"/silk/entry/previous.png' alt='Previous selected tag' title='Previous selected tag' data-dir='prev' /><input type='image' src='"+Site.imgprefix+"/silk/entry/next.png' alt='Next selected tag' title='Next selected tag' data-dir='next' /></span>");d.dialog({autoOpen:false,dialogClass:"tag-nav-actions tag-nav-none-selected",position:{my:"center top",at:"center bottom",of:this,collision:"flip"},width:"auto",open:function(j,i){e.next("ul").addClass("tag-nav-active")},close:function(j,i){e.next("ul").removeClass("tag-nav-active")}});d.on("click","input[data-dir]",function(j){j.stopPropagation();j.preventDefault();var k=["dir="+b(this).data("dir"),"itemid="+f.data("ditemid"),"journal="+f.data("journal"),"redir_key="+encodeURIComponent(g.find(".tag-nav-selected").text())];var i=Site.siteroot+"/go?"+k.join("&");document.location.href=i})}if(d.dialog("isOpen")){d.dialog("close");c(e)}else{d.dialog("open");a(e)}});g.on("click",".tag-nav-active a",function(h){h.stopPropagation();h.preventDefault();if(b(this).is(".tag-nav-selected")){b(this).removeClass("tag-nav-selected");d.parent().addClass("tag-nav-none-selected")}else{g.find(".tag-nav-selected").removeClass("tag-nav-selected");b(this).addClass("tag-nav-selected");d.parent().removeClass("tag-nav-none-selected")}})});return this}})(jQuery);jQuery(document).ready(function(){$(".tag-text[data-journal]").tagnav()});var hash=location.hash;if(hash.indexOf("#tagnav-")==0){$(window).load(function(){var b=decodeURIComponent(hash.slice(8));var a=$(window).scrollTop();$(".tag-nav-trigger").click();$(".tag a").filter(function(){var c=$(this).text();return c===b||c.replace(/ /g,"+")===b}).click();$(window).scrollTop(a)})};
(function(a){a.widget("dw.mediaplaceholder",{_create:function(){var d=this.element.closest(".LJ_Placeholder_Container");var b=d.find("div.LJ_Container");var c=d.find("div.LJ_Placeholder_HTML");if(d.size==0||b.size==0||c.size==0){return}this.element.click(function(f){f.stopPropagation();f.preventDefault();var g=a(unescape(c.html())).wrap("<span></span>");b.append(g);a(this).hide()})}})})(jQuery);jQuery(document).ready(function(a){a("img.LJ_Placeholder").mediaplaceholder();a(document.body).delegate("*","updatedcontent.entry",function(b){a(this).find("img.LJ_Placeholder").mediaplaceholder()})});
jQuery(function(f){f(document).on("click",".entry-content img, .comment-content img",function(j){var i=f(j.target);if(!i.is("a img, .poll-response img, .imageshrink-actualsize")){i.toggleClass("imageshrink-expanded")}});function b(j){var l=j.querySelectorAll(".journal-type-P .entry-content div[style]:not(.cuttag-open) img, .journal-type-P .entry-content table img, .journal-type-C .entry-content div[style]:not(.cuttag-open) img, .journal-type-C .entry-content table img, .comment-content div[style] img, .comment-content table img");for(var k=0;k<l.length;k++){l[k].classList.add("imageshrink-exempt")}}b(document);var d=function(i){return};if(typeof ResizeObserver==="function"){var g=new ResizeObserver(function(j,i){j.forEach(function(p){var m=p.target;if(m.tagName!=="IMG"){return}var o=m.width===m.naturalWidth&&m.height===m.naturalHeight;var n=parseInt(m.getAttribute("width"));var k=parseInt(m.getAttribute("height"));var q=((!isNaN(n)&&n===m.width)||(!isNaN(k)&&k===m.height))&&Math.abs((m.height/m.width)-(m.naturalHeight/m.naturalWidth))<0.004;var l=o||q;if(l&&!m.classList.contains("imageshrink-expanded")){m.classList.add("imageshrink-actualsize")}else{m.classList.remove("imageshrink-actualsize")}if((m.naturalHeight/m.naturalWidth)>=2){m.classList.add("imageshrink-tall")}else{m.classList.remove("imageshrink-tall")}})});d=function(i){let images=i.querySelectorAll(".entry-content img, .comment-content img");images.forEach(function(j){g.observe(j)})};d(document)}if(typeof MutationObserver==="function"){var c=new MutationObserver(function(j,i){j.forEach(function(k){if(k.addedNodes.length>0){b(k.target);d(k.target)}})});var e={childList:true,subtree:true};var a=document.getElementById("entries");var h=document.getElementById("comments");if(a){c.observe(a,e)}if(h){c.observe(h,e)}}});
jQuery(function(c){var d=c("#prop_picture_keyword");function b(){if(d.length===0){return}var e=Math.floor(Math.random()*(d.prop("length")-2))+2;d.prop("selectedIndex",e);d.change()}if(c("option#random").length===0&&d.children("option").length>2){d.children("option").first().after('<option value=",random" id="random">(random) 🔀</option>')}c("#randomicon").on("click",b);if(c.fn.iconBrowser){c("#js-icon-browser").removeClass("hide-icon-browser");d.iconBrowser({triggerSelector:"#lj_userpicselect, #js-icon-browse",modalId:"js-icon-browser",focusAfterBrowse:c("#lj_userpicselect").data("iconbrowserFocusAfterBrowse"),preferences:{keywordorder:c("#lj_userpicselect").data("iconbrowserKeywordorder"),metatext:c("#lj_userpicselect").data("iconbrowserMetatext"),smallicons:c("#lj_userpicselect").data("iconbrowserSmallicons")}})}var a=c(".block-icon");a.removeClass("no-label");d.on("change",function(g){var f=c(this).find("option:selected");if(f.attr("id")==="random"){b();c("#randomicon").show()}else{a.find("img").attr("src",f.data("url")).removeAttr("width").removeAttr("height").removeAttr("alt");if(f.attr("value")===""){a.addClass("default")}else{a.removeClass("default")}}})});
(function(e){var f;var b;var c;var a;function d(){if(f==undefined){f=(e("#parenttalkid,#replyto,#dtid,#qrdiv,#qrformdiv,#qrform,#subject").length==7)}return f}function g(k,l){var q=k.target.split("-");if(q.length===1){k.dtid=k.target}else{k.dtid=0;e("#journal").val(q[1]);e("#itemid").val(q[2]);e("#basepath").val(document.location.protocol+"//"+q[1].replace("_","-")+"."+Site.user_domain+"/"+q[2]+".html?");k.stayOnPage=true}e("#qrform").data("stayOnPage",k.stayOnPage);e("#parenttalkid, #replyto").val(k.pid);e("#dtid").val(k.dtid);var i;if(c){i=c.subject;c.widget.hide()}var m=e("#subject");var p=m.val();if(i!=undefined&&p!=i){b=true}if(!b||p==""){m.val(k.subject)}e("#prop_picture_keyword").change();e("#qrformdiv").removeAttr("style").removeClass("width-adjusted");if(k.target.match(/^\d+$/)){if(!a){a=e(".comment").first().find("[data-quickreply-container]").parent()}var j=a.width();var r=l.parent().width();var h=Math.min(750,j);if(r<h){var n;var o=e(":root").css("background-color");l.parentsUntil(".comment-thread").each(function(u,t){var s=e(t).css("background-color");if(s!==o){n=s;return false}});e("#qrformdiv").css({"min-width":h,position:"relative",right:h-r+"px","background-color":n}).addClass("width-adjusted")}}e("#qrdiv").show().css("display","inline").appendTo(l);l.show();e("#body").focus();c={subject:k.subject,widget:l}}e.widget("dw.quickreply",{options:{target:undefined,stayOnPage:false,dtid:undefined,pid:undefined,subject:undefined},_create:function(){var h=this;h.element.click(function(i){if(!d()){return}i.stopPropagation();i.preventDefault();g(h.options,h.widget())}).click();e(".qr-icon").find("img").attr("src",e(this).find("option:selected").data("url")).removeAttr("width").removeAttr("height")},widget:function(){return this.options.target?e("#ljqrt"+this.options.target):[]}});e.extend(e.dw.quickreply,{can_continue:function(){return f}})})(jQuery);jQuery(function(a){a("#qrform").submit(function(d){var b=a(this);if(b.data("stayOnPage")){d.preventDefault();d.stopPropagation();a("#submitpost").ajaxtip().ajaxtip("load",{endpoint:"addcomment",ajax:{type:"POST",data:b.serialize(),success:function(g,f,i){if(g.error){if(g.error==="Client error: Message looks like spam"){b.data("stayOnPage",false).submit()}else{a("#submitpost").ajaxtip("error",g.error)}}else{var h=a("#qrdiv").parent();var e=a("[data-quickreply-target='"+h.data("quickreply-container")+"'] .entry-readlink a");h.slideUp(function(){a("#subject").val("");a("#body").val("");var k=a("#prop_picture_keyword");if(k.length>0){k.get(0).selectedIndex=0;k.trigger("change")}e.parent().show();e.ajaxtip();if(g.extra){e.ajaxtip("sticky",g.message+" "+g.extra)}else{e.ajaxtip("success",g.message)}var j="";if(g.count==1){j=e.data("sing")}else{if(g.count==2){j=e.data("dual")}else{j=e.data("plur").replace(/\d+/,g.count)}}e.text(j)})}}}})}else{b.find('input[type="submit"]').prop("disabled",true);var c=a("#dtid");if(!Number(c.val())){c.val("0")}}});a("#submitpview").on("click",function(b){a("#qrform").data("stayOnPage",false);a("#qrform input[name='submitpreview']").val(1);a("#qrform").attr("action",Site.siteroot+"/talkpost_do")});a("#submitpost").on("click",function(b){a("#qrform").attr("action",Site.siteroot+"/talkpost_do")});a("#submitmoreopts").on("click",function(h){h.preventDefault();h.stopPropagation();var g=a("#qrform");var i=Number(a("#dtid").val());var d=Number(a("#parenttalkid").val());var c=a("#basepath").val();var b=(new URL(c)).hostname===document.location.hostname;if(i>0&&d>0){g.attr("action",c+"replyto="+i)}else{g.attr("action",c+"mode=reply")}g.data("stayOnPage",false);if(fetch&&!b){var f=new URL(c);f.pathname="/robots.txt";f.search="";fetch(Site.siteroot+"/misc/get_domain_session?return="+encodeURIComponent(f.href),{mode:"no-cors",credentials:"include"}).then(function(){g.submit()})}else{g.submit()}})});function quickreply(d,b,a,c){c=c||document;$(c).quickreply({target:d,pid:b,subject:a}).attr("onclick",null);return !$.dw.quickreply.can_continue()};
(function(d){function f(g,h){g.parent().toggleClass("full",h).toggleClass("partial",!h)}function c(g,h,j){var l=[];if(j){l.push(h)}if(g[h]&&g[h].rc){for(var k=0;k<g[h].rc.length;k++){l=l.concat(c(g,g[h].rc[k],true))}}return l}function e(g){var i=[];for(var h in g){if(g[h].hasOwnProperty("full")&&!g[h].full&&!g[h].deleted&&(!g[h].screened||g.canAdmin)){i.push(h)}}return i}function a(h,g){d(h).ajaxtip().ajaxtip("error",g)}d.fn.expandComments=function(g,i,h,k){element=this;if(element.hasClass("disabled")){return}if(!g){return false}element.addClass("disabled");element.fadeTo("fast",0.5);var j=d.ajax({url:i,datatype:"html",timeout:30000,success:function(n){var l=element.doJqExpand(g,n,h,k);if(l==0){a(element,d.threadexpander.config.text.error_nomatches);element.removeClass("disabled").fadeTo("fast",1)}else{if(k){element.unhideComments(g,h)}}var m=d(".expand_all");if(m.length>0){if(e(g).length==0){m.fadeOut("fast")}else{if(h<0){element.removeClass("disabled").fadeTo("fast",1)}}}},error:function(l,n,m){element.removeClass("disabled");element.fadeTo("fast",1);a(element,d.threadexpander.config.text.error)}});d(element).throbber(j)};d.fn.doJqExpand=function(j,l,i,r){var m=0;var o;if(i>0){o=c(j,i,true)}else{o=e(j)}if(o.length>0){var p=d(".dwexpcomment",l);var h={};p.each(function(){h[d(this).attr("id")]=d(this)});for(var q=0;q<o.length;q++){var k=o[q];if(/^\d*$/.test(k)&&(i==k||(!j[k].full))){var g=d("#cmt"+k);if(g.length>0){var n=h["cmt"+k];if(!n){n=d("#cmt"+k,l)}if(n){g.html(d(n).html()).trigger("updatedcontent.comment");d(".cmt_show_hide_default",g).show();if(n.find(".full").length>0){j[k].full=true;f(g,true)}m++}}}}}return m};function b(i){var h=[];for(var k=0;k<i.length;k++){var g=i[k];if(/^\d*$/.test(g)){var j=d("#cmt"+g);h.push(j)}}return h}d.fn.hideComments=function(g,h){var k=c(g,h,false);var l=b(k);for(var j=0;j<l.length;j++){l[j].slideUp("fast")}d("#cmt"+h+"_hide").hide();d("#cmt"+h+"_unhide").show()};d.fn.unhideComments=function(g,h){var k=c(g,h,false);var l=b(k);for(var j=0;j<l.length;j++){d(".cmt_hide",l[j]).show();d(".cmt_unhide",l[j]).hide();l[j].slideDown("fast")}d("#cmt"+h+"_hide").show();d("#cmt"+h+"_unhide").hide()};d(document).ready(function(){d(".cmt_show_hide_default").show()});d.threadexpander={config:{text:{error:"Error:  no response while expanding comments.",error_nomatches:"Error:  no comments found to expand."}}}})(jQuery);Expander={make:function(b,a,c,d){$(b).expandComments(LJ_cmtinfo,a,c,d)},hideComments:function(a,b){$(a).hideComments(LJ_cmtinfo,b)},unhideComments:function(a,b){$(a).unhideComments(LJ_cmtinfo,b)}};
(function(g,h){var f=0;var c=0;function i(){return !!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect&&!e()}function e(){return !!(jQuery.browser.mozilla&&jQuery.browser.version<"1.9.3")}if(i()){var b="/collapse.svg";var l="/expand.svg";var a="/collapseAll.svg";var m="/expandAll.svg";var d="/ajax-loader.gif";var k="/collapse-end.svg"}else{var b="/collapse.gif";var l="/expand.gif";var a="/collapseAll.gif";var m="/expandAll.gif";var d="/ajax-loader.gif";var k="/collapse-end.gif"}var j="border: 0; max-width: 100%; width: 1.0em; padding: 0.2em; box-sizing: content-box; vertical-align: text-bottom;";g.widget("dw.cuttag",{options:{journal:undefined,ditemid:undefined,cutid:undefined},config:{text:{collapse:"Collapse",expand:"Expand",loading:"Expanding"}},_create:function(){var p=this;var r=p.element.attr("id");p.options.journal=r.replace(/^span-cuttag_(.*)_[0-9]+_[0-9]+/,"$1");p.options.ditemid=r.replace(/^.*_([0-9]+)_[0-9]+/,"$1");p.options.cutid=r.replace(/^.*_([0-9]+)/,"$1");var q=p.options.journal+"_"+p.options.ditemid+"_"+p.options.cutid;p.identifier=q;p.ajaxUrl="/__rpc_cuttag?journal="+p.options.journal+"&ditemid="+p.options.ditemid+"&cutid="+p.options.cutid;var n=g("<a>",{href:"#",id:"cuttag_"+q,"class":"cuttag-action cuttag-action-before"});var o=g("<img>",{style:j,"aria-controls":"div-cuttag_"+q});n.append(o);var s=g("#div-cuttag_"+q);p.tag={a:n,img:o,div:s};p._setArrow(b,p.config.text.expand);p.element.append(n);n.click(function(t){f=0;t.stopPropagation();t.preventDefault();p.toggle()});p.element.css("display","inline");if(f){this.open()}},isOpen:function(){return this.tag.div.hasClass("cuttag-open")?1:0},toggle:function(){if(this.isOpen()){this.close()}else{this.open()}},open:function(){var n=this;if(n.isOpen()){return}c++;n._setArrow(d,n.config.text.loading);g.ajax({method:"GET",url:n.ajaxUrl,success:function(o){n.replaceCutTag(o)},error:function(p,o){n.handleError(o)}})},close:function(){if(!this.isOpen()){return}this.tag.div.removeClass("cuttag-open");this._setArrow(b,this.config.text.expand);this.tag.div.empty();this.tag.div.css("display","none");g.dw.cuttag_controls.updateAll()},_setArrow:function(o,p){var n=this.tag.img;n.attr("src",h.imgprefix+o);n.attr("alt",p);n.attr("title",p);n.attr("style",j)},handleError:function(n){this._setArrow(b,this.config.text.expand);alert(n)},replaceCutTag:function(s){var p=this;if(s.error){p._setArrow(b,p.config.text.expand)}else{var r=p.tag.div;r.html(s.text).css("display","block").addClass("cuttag-open");var q=g("<span>");var n=g("<a>",{href:"#cuttag_"+p.identifier,"class":"cuttag-action cuttag-action-after"});var o=g("<img>",{style:j,src:h.imgprefix+k,"aria-controls":"div-cuttag_"+p.identifier,alt:p.config.text.collapse,title:p.config.text.collapse});n.append(o);q.append(n);r.append(q);n.click(function(t){t.stopPropagation();t.preventDefault();g("html,body").animate({scrollTop:p.element.offset().top-10});p.toggle()});p._setArrow(l,p.config.text.collapse);r.trigger("updatedcontent.entry");g.dw.cuttag.initLinks(r);c--;if(c==0){f=0}g.dw.cuttag_controls.updateAll()}}});g.widget("dw.cuttag_controls",{config:{text:{collapse:"Collapse All Cut Tags",expand:"Expand All Cut Tags",expanding:"Expanding All Cut Tags"},image_style:{enabled:"border: 0;",disabled:"border: 0; opacity: 0.4; filter: alpha(opacity=40); zoom: 1;"}},_create:function(){var n=this;var o=g("span.cuttag[id]");if(o.size()==0){return}n.update()},update:function(){var n=this;n.element.empty();var s=g("span.cuttag[id]");var q="";var r="";s.each(function(v,w){var x=g(w).data("dw-cuttag");if(x.isOpen()){q+=" div-cuttag_"+x.identifier}else{r+=" div-cuttag_"+x.identifier}});var u=g("<img>",{alt:n.config.text.expand,title:n.config.text.expand,src:h.imgprefix+a,style:r?n.config.image_style.enabled:n.config.image_style.disabled});if(f){u.attr("src",h.imgprefix+d);u.attr("style",n.config.image_style.enabled);u.attr("title",n.config.text.expanding);u.attr("alt",n.config.text.expanding)}if(r){var t=g("<a>",{"aria-controls":r});t.append(u);u=t;t.click(function(){f=1;var v=g("span.cuttag[id]");v.each(function(w,x){g(x).data("dw-cuttag").open()})})}n.element.append(u);var p=g("<img>",{alt:n.config.text.collapse,title:n.config.text.collapse,src:h.imgprefix+m,style:q?n.config.image_style.enabled:n.config.image_style.disabled});if(q){var o=g("<a>",{"aria-controls":q});o.append(p);p=o;o.click(function(){f=0;to_do=1;s.each(function(v,w){var x=g(w).data("dw-cuttag");if(x){x.close()}})})}n.element.append(p)}});g.extend(g.dw.cuttag_controls,{initControls:function(){var n=g(".cutTagControls");n.each(function(o,p){g(p).cuttag_controls()})},updateAll:function(){var n=g(".cutTagControls");n.each(function(o,p){g(p).data("dw-cuttag_controls").update()})}});g.extend(g.dw.cuttag,{initLinks:function(n){var o=g("span.cuttag[id]",n);o.each(function(p,q){g(q).cuttag()})}})})(jQuery,Site);jQuery(document).ready(function(a){a.dw.cuttag.initLinks(document);a.dw.cuttag_controls.initControls()});
(function(a){a(document).on("submit","form#default_editor",function(d){d.preventDefault();d.stopPropagation();var b=a(this);var f=b.find('input[type="submit"]');var c=a.ajax({method:"POST",type:"POST",url:a.endpoint(b.data("rpcEndpoint")),data:b.serialize(),dataType:"json",success:function(e){if(e.success){b.replaceWith('<span class="success">'+e.message+"</span>")}else{b.replaceWith('<span class="failure">'+e.error+"</span>")}},error:function(g,e){b.after('<span class="failure">Sorry, an error occurred: '+e+". Please try again.</span>");a(document).off("submit","form#default_editor")}});f.throbber(c)})})(jQuery);
/*!
 * jQuery UI Button 1.9.0
 * http://jqueryui.com
 *
 * Copyright 2012 jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/button/
 *
 * Depends:
 *	jquery.ui.core.js
 *	jquery.ui.widget.js
 */
(function(f,b){var k,e,a,h,i="ui-button ui-widget ui-state-default ui-corner-all",c="ui-state-hover ui-state-active ",g="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",j=function(){var l=f(this).find(":ui-button");setTimeout(function(){l.button("refresh")},1)},d=function(m){var l=m.name,n=m.form,o=f([]);if(l){if(n){o=f(n).find("[name='"+l+"']")}else{o=f("[name='"+l+"']",m.ownerDocument).filter(function(){return !this.form})}}return o};f.widget("ui.button",{version:"1.9.0",defaultElement:"<button>",options:{disabled:null,text:true,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,j);if(typeof this.options.disabled!=="boolean"){this.options.disabled=!!this.element.prop("disabled")}else{this.element.prop("disabled",this.options.disabled)}this._determineButtonType();this.hasTitle=!!this.buttonElement.attr("title");var n=this,m=this.options,o=this.type==="checkbox"||this.type==="radio",p="ui-state-hover"+(!o?" ui-state-active":""),l="ui-state-focus";if(m.label===null){m.label=(this.type==="input"?this.buttonElement.val():this.buttonElement.html())}this.buttonElement.addClass(i).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){if(m.disabled){return}f(this).addClass("ui-state-hover");if(this===k){f(this).addClass("ui-state-active")}}).bind("mouseleave"+this.eventNamespace,function(){if(m.disabled){return}f(this).removeClass(p)}).bind("click"+this.eventNamespace,function(q){if(m.disabled){q.preventDefault();q.stopImmediatePropagation()}});this.element.bind("focus"+this.eventNamespace,function(){n.buttonElement.addClass(l)}).bind("blur"+this.eventNamespace,function(){n.buttonElement.removeClass(l)});if(o){this.element.bind("change"+this.eventNamespace,function(){if(h){return}n.refresh()});this.buttonElement.bind("mousedown"+this.eventNamespace,function(q){if(m.disabled){return}h=false;e=q.pageX;a=q.pageY}).bind("mouseup"+this.eventNamespace,function(q){if(m.disabled){return}if(e!==q.pageX||a!==q.pageY){h=true}})}if(this.type==="checkbox"){this.buttonElement.bind("click"+this.eventNamespace,function(){if(m.disabled||h){return false}f(this).toggleClass("ui-state-active");n.buttonElement.attr("aria-pressed",n.element[0].checked)})}else{if(this.type==="radio"){this.buttonElement.bind("click"+this.eventNamespace,function(){if(m.disabled||h){return false}f(this).addClass("ui-state-active");n.buttonElement.attr("aria-pressed","true");var q=n.element[0];d(q).not(q).map(function(){return f(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")})}else{this.buttonElement.bind("mousedown"+this.eventNamespace,function(){if(m.disabled){return false}f(this).addClass("ui-state-active");k=this;n.document.one("mouseup",function(){k=null})}).bind("mouseup"+this.eventNamespace,function(){if(m.disabled){return false}f(this).removeClass("ui-state-active")}).bind("keydown"+this.eventNamespace,function(q){if(m.disabled){return false}if(q.keyCode===f.ui.keyCode.SPACE||q.keyCode===f.ui.keyCode.ENTER){f(this).addClass("ui-state-active")}}).bind("keyup"+this.eventNamespace,function(){f(this).removeClass("ui-state-active")});if(this.buttonElement.is("a")){this.buttonElement.keyup(function(q){if(q.keyCode===f.ui.keyCode.SPACE){f(this).click()}})}}}this._setOption("disabled",m.disabled);this._resetButton()},_determineButtonType:function(){var l,n,m;if(this.element.is("[type=checkbox]")){this.type="checkbox"}else{if(this.element.is("[type=radio]")){this.type="radio"}else{if(this.element.is("input")){this.type="input"}else{this.type="button"}}}if(this.type==="checkbox"||this.type==="radio"){l=this.element.parents().last();n="label[for='"+this.element.attr("id")+"']";this.buttonElement=l.find(n);if(!this.buttonElement.length){l=l.length?l.siblings():this.element.siblings();this.buttonElement=l.filter(n);if(!this.buttonElement.length){this.buttonElement=l.find(n)}}this.element.addClass("ui-helper-hidden-accessible");m=this.element.is(":checked");if(m){this.buttonElement.addClass("ui-state-active")}this.buttonElement.prop("aria-pressed",m)}else{this.buttonElement=this.element}},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible");this.buttonElement.removeClass(i+" "+c+" "+g).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html());if(!this.hasTitle){this.buttonElement.removeAttr("title")}},_setOption:function(l,m){this._super(l,m);if(l==="disabled"){if(m){this.element.prop("disabled",true)}else{this.element.prop("disabled",false)}return}this._resetButton()},refresh:function(){var l=this.element.is(":disabled");if(l!==this.options.disabled){this._setOption("disabled",l)}if(this.type==="radio"){d(this.element[0]).each(function(){if(f(this).is(":checked")){f(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true")}else{f(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}})}else{if(this.type==="checkbox"){if(this.element.is(":checked")){this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true")}else{this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false")}}}},_resetButton:function(){if(this.type==="input"){if(this.options.label){this.element.val(this.options.label)}return}var p=this.buttonElement.removeClass(g),n=f("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(p.empty()).text(),m=this.options.icons,l=m.primary&&m.secondary,o=[];if(m.primary||m.secondary){if(this.options.text){o.push("ui-button-text-icon"+(l?"s":(m.primary?"-primary":"-secondary")))}if(m.primary){p.prepend("<span class='ui-button-icon-primary ui-icon "+m.primary+"'></span>")}if(m.secondary){p.append("<span class='ui-button-icon-secondary ui-icon "+m.secondary+"'></span>")}if(!this.options.text){o.push(l?"ui-button-icons-only":"ui-button-icon-only");if(!this.hasTitle){p.attr("title",f.trim(n))}}}else{o.push("ui-button-text-only")}p.addClass(o.join(" "))}});f.widget("ui.buttonset",{version:"1.9.0",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(l,m){if(l==="disabled"){this.buttons.button("option",l,m)}this._super(l,m)},refresh:function(){var l=this.element.css("direction")==="rtl";this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return f(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(l?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(l?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return f(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}})}(jQuery));
/*!
 * jQuery UI Dialog 1.9.0
 * http://jqueryui.com
 *
 * Copyright 2012 jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/dialog/
 *
 * Depends:
 *	jquery.ui.core.js
 *	jquery.ui.widget.js
 *  jquery.ui.button.js
 *	jquery.ui.draggable.js
 *	jquery.ui.mouse.js
 *	jquery.ui.position.js
 *	jquery.ui.resizable.js
 */
(function(d,e){var b="ui-dialog ui-widget ui-widget-content ui-corner-all ",a={buttons:true,height:true,maxHeight:true,maxWidth:true,minHeight:true,minWidth:true,width:true},c={maxHeight:true,maxWidth:true,minHeight:true,minWidth:true};d.widget("ui.dialog",{version:"1.9.0",options:{autoOpen:true,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:{my:"center",at:"center",of:window,collision:"fit",using:function(g){var f=d(this).css(g).offset().top;if(f<0){d(this).css("top",g.top-f)}}},resizable:true,show:null,stack:true,title:"",width:300,zIndex:1000},_create:function(){this.originalTitle=this.element.attr("title");if(typeof this.originalTitle!=="string"){this.originalTitle=""}this.oldPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)};this.options.title=this.options.title||this.originalTitle;var m=this,p=this.options,n=p.title||"&#160;",o=(this.uiDialog=d("<div>")).addClass(b+p.dialogClass).css({display:"none",outline:0,zIndex:p.zIndex}).attr("tabIndex",-1).keydown(function(q){if(p.closeOnEscape&&!q.isDefaultPrevented()&&q.keyCode&&q.keyCode===d.ui.keyCode.ESCAPE){m.close(q);q.preventDefault()}}).mousedown(function(q){m.moveToTop(false,q)}).appendTo("body"),i=this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(o),h=(this.uiDialogTitlebar=d("<div>")).addClass("ui-dialog-titlebar  ui-widget-header  ui-corner-all  ui-helper-clearfix").prependTo(o),l=d("<a href='#'></a>").addClass("ui-dialog-titlebar-close  ui-corner-all").attr("role","button").click(function(q){q.preventDefault();m.close(q)}).appendTo(h),j=(this.uiDialogTitlebarCloseText=d("<span>")).addClass("ui-icon ui-icon-closethick").text(p.closeText).appendTo(l),g=d("<span>").uniqueId().addClass("ui-dialog-title").html(n).prependTo(h),k=(this.uiDialogButtonPane=d("<div>")).addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),f=(this.uiButtonSet=d("<div>")).addClass("ui-dialog-buttonset").appendTo(k);o.attr({role:"dialog","aria-labelledby":g.attr("id")});h.find("*").add(h).disableSelection();this._hoverable(l);this._focusable(l);if(p.draggable&&d.fn.draggable){this._makeDraggable()}if(p.resizable&&d.fn.resizable){this._makeResizable()}this._createButtons(p.buttons);this._isOpen=false;if(d.fn.bgiframe){o.bgiframe()}this._on(o,{keydown:function(s){if(!p.modal||s.keyCode!==d.ui.keyCode.TAB){return}var r=d(":tabbable",o),t=r.filter(":first"),q=r.filter(":last");if(s.target===q[0]&&!s.shiftKey){t.focus(1);return false}else{if(s.target===t[0]&&s.shiftKey){q.focus(1);return false}}}})},_init:function(){if(this.options.autoOpen){this.open()}},_destroy:function(){var g,f=this.oldPosition;if(this.overlay){this.overlay.destroy()}this.uiDialog.hide();this.element.removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");this.uiDialog.remove();if(this.originalTitle){this.element.attr("title",this.originalTitle)}g=f.parent.children().eq(f.index);if(g.length&&g[0]!==this.element[0]){g.before(this.element)}else{f.parent.append(this.element)}},widget:function(){return this.uiDialog},close:function(i){var h=this,g,f;if(!this._isOpen){return}if(false===this._trigger("beforeClose",i)){return}this._isOpen=false;if(this.overlay){this.overlay.destroy()}if(this.options.hide){this.uiDialog.hide(this.options.hide,function(){h._trigger("close",i)})}else{this.uiDialog.hide();this._trigger("close",i)}d.ui.dialog.overlay.resize();if(this.options.modal){g=0;d(".ui-dialog").each(function(){if(this!==h.uiDialog[0]){f=d(this).css("z-index");if(!isNaN(f)){g=Math.max(g,f)}}});d.ui.dialog.maxZ=g}return this},isOpen:function(){return this._isOpen},moveToTop:function(i,h){var g=this.options,f;if((g.modal&&!i)||(!g.stack&&!g.modal)){return this._trigger("focus",h)}if(g.zIndex>d.ui.dialog.maxZ){d.ui.dialog.maxZ=g.zIndex}if(this.overlay){d.ui.dialog.maxZ+=1;d.ui.dialog.overlay.maxZ=d.ui.dialog.maxZ;this.overlay.$el.css("z-index",d.ui.dialog.overlay.maxZ)}f={scrollTop:this.element.scrollTop(),scrollLeft:this.element.scrollLeft()};d.ui.dialog.maxZ+=1;this.uiDialog.css("z-index",d.ui.dialog.maxZ);this.element.attr(f);this._trigger("focus",h);return this},open:function(){if(this._isOpen){return}var h,g=this.options,f=this.uiDialog;this._size();this._position(g.position);f.show(g.show);this.overlay=g.modal?new d.ui.dialog.overlay(this):null;this.moveToTop(true);h=this.element.find(":tabbable");if(!h.length){h=this.uiDialogButtonPane.find(":tabbable");if(!h.length){h=f}}h.eq(0).focus();this._isOpen=true;this._trigger("open");return this},_createButtons:function(i){var g,j,h=this,f=false;this.uiDialogButtonPane.remove();this.uiButtonSet.empty();if(typeof i==="object"&&i!==null){d.each(i,function(){return !(f=true)})}if(f){d.each(i,function(k,m){m=d.isFunction(m)?{click:m,text:k}:m;var l=d("<button type='button'>").attr(m,true).unbind("click").click(function(){m.click.apply(h.element[0],arguments)}).appendTo(h.uiButtonSet);if(d.fn.button){l.button()}});this.uiDialog.addClass("ui-dialog-buttons");this.uiDialogButtonPane.appendTo(this.uiDialog)}else{this.uiDialog.removeClass("ui-dialog-buttons")}},_makeDraggable:function(){var h=this,g=this.options;function f(i){return{position:i.position,offset:i.offset}}this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(i,j){d(this).addClass("ui-dialog-dragging");h._trigger("dragStart",i,f(j))},drag:function(i,j){h._trigger("drag",i,f(j))},stop:function(i,j){g.position=[j.position.left-h.document.scrollLeft(),j.position.top-h.document.scrollTop()];d(this).removeClass("ui-dialog-dragging");h._trigger("dragStop",i,f(j));d.ui.dialog.overlay.resize()}})},_makeResizable:function(j){j=(j===e?this.options.resizable:j);var k=this,i=this.options,f=this.uiDialog.css("position"),h=typeof j==="string"?j:"n,e,s,w,se,sw,ne,nw";function g(l){return{originalPosition:l.originalPosition,originalSize:l.originalSize,position:l.position,size:l.size}}this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:i.maxWidth,maxHeight:i.maxHeight,minWidth:i.minWidth,minHeight:this._minHeight(),handles:h,start:function(l,m){d(this).addClass("ui-dialog-resizing");k._trigger("resizeStart",l,g(m))},resize:function(l,m){k._trigger("resize",l,g(m))},stop:function(l,m){d(this).removeClass("ui-dialog-resizing");i.height=d(this).height();i.width=d(this).width();k._trigger("resizeStop",l,g(m));d.ui.dialog.overlay.resize()}}).css("position",f).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var f=this.options;if(f.height==="auto"){return f.minHeight}else{return Math.min(f.minHeight,f.height)}},_position:function(g){var h=[],i=[0,0],f;if(g){if(typeof g==="string"||(typeof g==="object"&&"0" in g)){h=g.split?g.split(" "):[g[0],g[1]];if(h.length===1){h[1]=h[0]}d.each(["left","top"],function(k,j){if(+h[k]===h[k]){i[k]=h[k];h[k]=j}});g={my:h.join(" "),at:h.join(" "),offset:i.join(" ")}}g=d.extend({},d.ui.dialog.prototype.options.position,g)}else{g=d.ui.dialog.prototype.options.position}f=this.uiDialog.is(":visible");if(!f){this.uiDialog.show()}this.uiDialog.position(g);if(!f){this.uiDialog.hide()}},_setOptions:function(h){var i=this,f={},g=false;d.each(h,function(j,k){i._setOption(j,k);if(j in a){g=true}if(j in c){f[j]=k}});if(g){this._size()}if(this.uiDialog.is(":data(resizable)")){this.uiDialog.resizable("option",f)}},_setOption:function(h,i){var g,j,f=this.uiDialog;switch(h){case"buttons":this._createButtons(i);break;case"closeText":this.uiDialogTitlebarCloseText.text(""+i);break;case"dialogClass":f.removeClass(this.options.dialogClass).addClass(b+i);break;case"disabled":if(i){f.addClass("ui-dialog-disabled")}else{f.removeClass("ui-dialog-disabled")}break;case"draggable":g=f.is(":data(draggable)");if(g&&!i){f.draggable("destroy")}if(!g&&i){this._makeDraggable()}break;case"position":this._position(i);break;case"resizable":j=f.is(":data(resizable)");if(j&&!i){f.resizable("destroy")}if(j&&typeof i==="string"){f.resizable("option","handles",i)}if(!j&&i!==false){this._makeResizable(i)}break;case"title":d(".ui-dialog-title",this.uiDialogTitlebar).html(""+(i||"&#160;"));break}this._super(h,i)},_size:function(){var g,j,i,h=this.options,f=this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0});if(h.minWidth>h.width){h.width=h.minWidth}g=this.uiDialog.css({height:"auto",width:h.width}).outerHeight();j=Math.max(0,h.minHeight-g);if(h.height==="auto"){if(d.support.minHeight){this.element.css({minHeight:j,height:"auto"})}else{this.uiDialog.show();i=this.element.css("height","auto").height();if(!f){this.uiDialog.hide()}this.element.height(Math.max(i,j))}}else{this.element.height(Math.max(h.height-g,0))}if(this.uiDialog.is(":data(resizable)")){this.uiDialog.resizable("option","minHeight",this._minHeight())}}});d.extend(d.ui.dialog,{uuid:0,maxZ:0,getTitleId:function(f){var g=f.attr("id");if(!g){this.uuid+=1;g=this.uuid}return"ui-dialog-title-"+g},overlay:function(f){this.$el=d.ui.dialog.overlay.create(f)}});d.extend(d.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:d.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(f){return f+".dialog-overlay"}).join(" "),create:function(g){if(this.instances.length===0){setTimeout(function(){if(d.ui.dialog.overlay.instances.length){d(document).bind(d.ui.dialog.overlay.events,function(h){if(d(h.target).zIndex()<d.ui.dialog.overlay.maxZ){return false}})}},1);d(window).bind("resize.dialog-overlay",d.ui.dialog.overlay.resize)}var f=(this.oldInstances.pop()||d("<div>").addClass("ui-widget-overlay"));d(document).bind("keydown.dialog-overlay",function(h){var i=d.ui.dialog.overlay.instances;if(i.length!==0&&i[i.length-1]===f&&g.options.closeOnEscape&&!h.isDefaultPrevented()&&h.keyCode&&h.keyCode===d.ui.keyCode.ESCAPE){g.close(h);h.preventDefault()}});f.appendTo(document.body).css({width:this.width(),height:this.height()});if(d.fn.bgiframe){f.bgiframe()}this.instances.push(f);return f},destroy:function(f){var g=d.inArray(f,this.instances),h=0;if(g!==-1){this.oldInstances.push(this.instances.splice(g,1)[0])}if(this.instances.length===0){d([document,window]).unbind(".dialog-overlay")}f.height(0).width(0).remove();d.each(this.instances,function(){h=Math.max(h,this.css("z-index"))});this.maxZ=h},height:function(){var g,f;if(d.browser.msie){g=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);f=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);if(g<f){return d(window).height()+"px"}else{return g+"px"}}else{return d(document).height()+"px"}},width:function(){var f,g;if(d.browser.msie){f=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);g=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);if(f<g){return d(window).width()+"px"}else{return f+"px"}}else{return d(document).width()+"px"}},resize:function(){var f=d([]);d.each(d.ui.dialog.overlay.instances,function(){f=f.add(this)});f.css({width:0,height:0}).css({width:d.ui.dialog.overlay.width(),height:d.ui.dialog.overlay.height()})}});d.extend(d.ui.dialog.overlay.prototype,{destroy:function(){d.ui.dialog.overlay.destroy(this.$el)}})}(jQuery));

}

/*
     FILE ARCHIVED ON 19:08:14 Jun 29, 2023 AND RETRIEVED FROM THE
     INTERNET ARCHIVE ON 22:26:55 Jul 22, 2026.
     JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE.

     ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C.
     SECTION 108(a)(3)).
*/
/*
playback timings (ms):
  capture_cache.get: 0.648
  load_resource: 1215.368 (2)
  PetaboxLoader3.resolve: 153.22 (2)
  PetaboxLoader3.datanode: 1055.732 (2)
*/