PageSourceSearch

https://www.baptist.org.uk/Common/Scripts/system.min.js?SV=V136BC

js baptist.org.uk collected 2026-09-24 09:13:53 UTC 70,116 bytes, 4 lines download raw bytes

1function el(e){return document.getElementById(e)}function eltn(e,i){return i?i.getElementsByTagName(e):document.getElementsByTagName(e)}function getParentWithTagName(e,i){var t=e.parentNode;if(t)return t.tagName.toUpperCase()==i.toUpperCase()?t:getParentWithTagName(t,i)}function browserIsIE(){/*@cc_on!@*/
2return!1;//Only IE renders contents of /*@cc_on @/ construct, rendering !false for IE
3}function IsHubbPage(){return document.location.pathname.toLowerCase().startsWith("/hubb/")||$e("body").hasClass("app-body")}function isPwa(){return window.matchMedia("(display-mode: fullscreen)").matches||window.matchMedia("(display-mode: standalone)").matches||window.matchMedia("(display-mode: minimal-ui)").matches}function toggleDisplay(e){toggleElemDisplay(el(e))}function toggleElemDisplay(e){setElemDisplay(e,"none"==e.style.display)}function setElemDisplay(e,i,t){e&&(e.style.display=t?i?t:"none":i?"":"none")}function getQSVal(e,i){if(""==e)return null;for(var t=e.substring(1).split("&"),o=0;o<t.length;o++){var n=t[o];if(2==n.split("=").length&&n.split("=")[0]==i)return n.split("=")[1]}return null}function setQSVal(e,i,t){var o="",n=e.indexOf(i);if(-1!==n){var a="",l=e.indexOf("&",n);if(a=-1!=l?e.substring(n,l):e.substr(n),""!==t)o=e.replace(a,i+"="+t);else{var s=1==n?-1!=l?a+"&":a:"&"+a;o=e.replace(s,"")}}else o=""!==t?-1!==e.indexOf("?")?e+"&"+i+"="+t:e+"?"+i+"="+t:e;return o.indexOf("?")===o.length-1&&(o=o.slice(0,-1)),o}function SetQSAndForm(e,i,t){var o=setQSVal(location.search,e,i||"");if(o!=location.search){t?history.replaceState(null,null,[location.protocol,"//",location.host,location.pathname].join("")+o+location.hash):history.pushState(null,null,[location.protocol,"//",location.host,location.pathname].join("")+o+location.hash);var n=$e(EndisForm()).prop("action"),a=n.indexOf("?");a>-1?$e(EndisForm()).prop("action",n.substr(0,a)+setQSVal(n.substring(a),e,i)):""!=i&&$e(EndisForm()).prop("action",n+"?"+e+"="+i)}}function TrimString(e){return e?e.replace(/^\s+|\s+$/g,""):e}function LTrimString(e){return e?e.replace(/^\s+/,""):e}function RTrimString(e){return e?e.replace(/\s+$/,""):e}function EndisForm(){var e=el("frm1");if(e&&"FORM"===e.tagName||(e=el("aspnetForm")),!e||"FORM"!==e.tagName)for(var i=0;i<document.forms.length;i++){var t=document.forms[i].action;if(""==t||t==document.URL){e=document.forms[i];break}}if(e&&"FORM"===e.tagName||(e=document.forms[0]),!e||"FORM"!==e.tagName)throw"No form found.";return e}function SubmitEndisForm(){EndisForm().submit()}function WindowIsInDialog(){for(var e=window.self;e!=window.top&&e!=e.parent;){if(e.frameElement&&"IFRAME"==e.frameElement.nodeName&&e.frameElement.id&&e.frameElement.id.indexOf("ifrDialogWindow_")>=0)return!0;e=e.parent}return!1}function FindDialogObject(){var e;if("undefined"!=typeof dlg)e=dlg;else for(var i=window.self;!e&&i!=window.top;)void 0!==(i=i.parent).dlg&&(e=i.dlg);return e}function urlEncodeCharacter(e){return"%"+e.charCodeAt(0).toString(16)}function urlEncode(e){return encodeURIComponent(e).replace(/\%20/g,"+").replace(/[!'()*~]/g,urlEncodeCharacter)}function loadURLToInnerHTML(e,i,t){setElemDisplay(el(t),!0),setElemDisplay(el(i),!1);loadXMLDocAndCall(e,function(e){setElemDisplay(el(t),!1),setElemDisplay(el(i),!0),el(i).innerHTML=e})}function EnforceTextBoxMaxLength(e,i,t){return!!{8:!0,37:!0,38:!0,39:!0,40:!0,46:!0}[e.keyCode]||i.value.length<=t}function GetMaxZIndex(){var e=0;return $e("body").find(":visible").each(function(){var i=parseInt($e(this).css("z-index"));e=i>e&&i<2e9?i:e}),e}function CalculateAge(e,i){var t=i.getFullYear()-e.getFullYear(),o=i.getMonth()-e.getMonth();return(o<0||0===o&&i.getDate()<e.getDate())&&t--,t}function PostbackWithoutWarning(e,i){"undefined"!=typeof InsightAreYouSure&&InsightAreYouSure.Enabled()&&InsightAreYouSure.SuspendForPostback(),__doPostBack(e,i)}function MakeAJAXRequest(e,i,t,o,n,a,l){InternalAJAXRequest("POST",e+"/"+i,t?JSON.stringify(t):null,"json",o,n,a,l)}function MakeAJAXRequestGET(e,i,t,o,n,a,l){InternalAJAXRequest("GET",e+"/"+i,t,"html",o,n,a,l)}function InternalAJAXRequest(e,i,t,o,n,a,l,s){l&&Insight.ShowSpinner(),$.ajax({type:e,url:i,data:t,cache:"GET"==e,contentType:"application/json; charset=utf-8",dataType:o,error:function(e,i,t){s||401!==e.status?a&&a(e,i,t):PostbackWithoutWarning()},success:n,complete:function(e,i){l&&Insight.HideSpinner()}})}function showUser(e){var i="/Address/Details.aspx?WA=true&user_id="+e;"function"==typeof EndisDialog?new EndisDialog(i,"User details",620,480):(myWin=window.open(i,"AddressWin","height=480,width=620,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes"),myWin.focus())}function linkToImageURLPopup(e){"function"==typeof EndisDialog?new EndisDialog(e,"Image",620,480):(myWin=window.open(e,"ImagePopUp","height=480,width=620,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes"),myWin.focus())}function loadXMLDocAndCall(e,i,t){var o=getXMLHttpRequest();o&&(o.onreadystatechange=processReqChange(i,t,o),o.open("GET",e,!0),o.send(""))}function loadXMLDocAndCallPost(e,i,t,o){var n=getXMLHttpRequest();n&&(n.onreadystatechange=processReqChange(i,t,n),n.open("POST",e,!0),n.setRequestHeader("Content-type","application/x-www-form-urlencoded"),n.setRequestHeader("Content-length",o.length),n.setRequestHeader("Connection","close"),n.send(o))}function showBirthday(e){var i="/Calendar/BirthdayMessage.aspx?id="+e;"function"==typeof EndisDialog?new EndisDialog(i,"Birthday Message",440,340):(myWin=window.open(i,"birthdayWin","height=340,width=440,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes"),myWin.focus())}function showUserAndStaffRoleNotes(e,i){var t="/Address/Details.aspx?user_id="+e+"&role_id="+i;"function"==typeof EndisDialog?new EndisDialog(t,"User details",620,480):(myWin=window.open(t,"AddressWin","height=480,width=620,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes"),myWin.focus())}function showOrg(e){var i="/Modules/FrontPage/Directory/OrgDetailsPopUp.aspx?org_id="+e;"function"==typeof EndisDialog?new EndisDialog(i,"Details",500,600):(myWin=window.open(i,"AddressWin","height=600,width=500,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes"),myWin.focus())}function showFamily(e){var i="/Address/Details.aspx?WA=true&family_id="+e;"function"==typeof EndisDialog?new EndisDialog(i,"Family details",620,480):(myWin=window.open(i,"AddressWin","height=480,width=620,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes"),myWin.focus())}function loadJS(e,i){if(scriptSrcPresent(e)){if(void 0!==i)return i()}else{var t=document.createElement("script");t.type="text/javascript",t.src=e,t.onload=t.onreadystatechange=function(){if(!this.readyState||"loaded"==this.readyState||"complete"==this.readyState)return t.onload=t.onreadystatechange=null,void 0!==i?i():void 0},document.getElementsByTagName("head")[0].appendChild(t)}}function scriptSrcPresent(e){var t=document.getElementsByTagName("script");for(i=0;i<t.length;i++)if(t[i].src.match(e))return!0;return!1}function loadLightBoxJS(e){if(void 0===window.myLightbox)loadJS("/Common/ThirdParty/prototype.js",function(){loadJS("/Common/ThirdParty/lightbox/js/effects.js",function(){loadJS("/Common/ThirdParty/lightbox/js/lightbox.js",e)})});else if(void 0!==e)return e()}function executeWhenObjDefined(e,i){if(void 0===window[i]){setTimeout(function(){executeWhenObjDefined(e,i)},50)}else e()}function linkToImage(e){var i="/Media/AjaxImageData.aspx?image_id="+e,t=function(e){executeWhenObjDefined(function(){var i=e.split(","),t=i[1],o=i[2],n=i[3];myLightbox.showEndisImage(t,"<i>"+o+"</i><br />"+n)},"myLightbox")};loadLightBoxJS(function(){loadXMLDocAndCall(i,t)})}function linkToImageURL(e,i){loadLightBoxJS();executeWhenObjDefined(function(){myLightbox.showEndisImage(e,i)},"myLightbox")}function linkToFile(e){document.location.href="/Publisher/File.aspx?ID="+e}function getXMLHttpRequest(){try{return new XMLHttpRequest}catch(e){}try{return new ActiveXObject("Msxml3.XMLHTTP")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}return!1}function processReqChange(e,i,t){return function(){if(4==t.readyState)if(200==t.status){var o=t.responseText;e&&e(o)}else i?i(t.statusText):alert("There was a problem retrieving the XML data:\n"+t.statusText)}}function MarkAbuseAJAXCall(e,i){loadXMLDocAndCall("/Modules/UserControls/Comments/MarkAsAbusive.aspx?"+e,i,function(e){alert("An error was encountered:\n"+e)}
3)}function MarkCommentAsAbusive(e,i,t){confirm("REPORT THIS TO A MODERATOR \n\nIf you feel this comment is inappropriate you can report it to a \nmoderator, who will then review the comment and can remove it if necessary.\nThe comment will be hidden from view until a moderator reviews it. \n\nAre you sure you want to report this comment to a moderator?")&&(MarkAbuseAJAXCall("mark=comment&cid="+e),i&&setElemDisplay(el(i),!1),t&&setElemDisplay(el(t),!1))}function MarkThreadAsAbusive(e,i){confirm("REPORT THIS TO A MODERATOR \n\nIf you feel this discussion topic is inappropriate you can report it to a \nmoderator, who will then review the message and can remove it if necessary.\nThe discussion topic will be hidden from view until a moderator reviews it. \n\nAre you sure you want to report this topic to a moderator?")&&MarkAbuseAJAXCall("mark=thread&tid="+e,function(){document.location.href="/Forums/Threads.aspx?ForumID="+i})}function SubscribeToComments(e,i,t,o,n){loadXMLDocAndCall("/Modules/UserControls/Comments/Subscribe.aspx?eid="+e+"&et="+i+"&a="+t,void 0,function(e){alert("An error was encountered:\n"+e)}),o&&setElemDisplay(el(o),!1),n&&setElemDisplay(el(n),!0)}$e=jQuery,$e.widget.bridge("uitooltip",jQuery.ui.tooltip);var leftPos=(screen.availWidth-600)/2,topPos=(screen.availHeight-450)/2;function OpenChat(){alert("This feature is no longer available")}function OpenShopTermsAndConds(){var e="/Shop/TermsAndConditions.aspx";"function"==typeof EndisDialog?new EndisDialog(e,"Terms and Conditions",780,550):window.open(e,"","width=780,height=550,resizable=yes,scrollbars=yes")}function getCssStyle(e,i){return e.currentStyle?e.currentStyle[i]:window.getComputedStyle?document.defaultView.getComputedStyle(e,null).getPropertyValue(i):void 0}function setOpenAccordion(e,i){for(var t=i.items,o=0;o<t.length;o++){var n=t[o].headerID==e,a=el(t[o].headerID);if(a){var l=el(t[o].bodyID),s="none"!=getCssStyle(l,"display");setElemDisplay(l,n&&!s,"block"),a.className=n&&!s?i.selectedHeaderClass:i.unselectedHeaderClass}}}function accordionIsOpen(e,i){for(var t=i.items,o=0;o<t.length;o++)if(t[o].headerID==e){var n=el(t[o].bodyID);return n&&"none"!=n.style.display}}function elemAbsoluteX(e){for(var i=e.offsetLeft,t=e.offsetParent;null!=t;)i+=t.offsetLeft,t=t.offsetParent;return i}function elemAbsoluteY(e){for(var i=e.offsetTop,t=e.offsetParent;null!=t;)i+=t.offsetTop,t=t.offsetParent;return i}function ClearQSTokens(){var e=location.search;e=setQSVal(e,"token_out",""),e=setQSVal(e,"token_in",""),(e=setQSVal(e,"token_logout",""))!=location.search&&history.replaceState(null,null,[location.protocol,"//",location.host,location.pathname].join("")+e+location.hash)}var bIsModified=!1;function setModified(e){e&&(window.onbeforeunload=WarnUser),bIsModified=!0}var bAllowWarning=!0;function WarnUser(){if(bAllowWarning)return"You have made changes that will be lost.";bAllowWarning=!0}function NoWarningThisClick(){browserIsIE()&&(bAllowWarning=!1)}function resetOnBeforeUnload(){window.onbeforeunload=null,bIsModified=!1}function isModified(){return bIsModified}function addModificationNotifiers(e,i){for(var t=function(i,t){i.onchange=t?function(){setModified(e),this.oldonchange=t,this.oldonchange()}:function(){setModified(e)}},o=0;o<document.forms.length;o++)for(var n=0;n<document.forms[o].elements.length;n++){var a=document.forms[o].elements[n];"fieldset"!=a.type&&t(a,a.onchange)}i&&SetModificationNotifiersForDocEditorIFrames(window,!1)}function SetModificationNotifiersForDocEditorIFrames(e,i){if(null!=e){i&&(e.document.addEventListener?(e.document.addEventListener("keydown",function(){setModified(!0)},!1),e.document.addEventListener("click",function(){setModified(!0)},!1)):e.document.attachEvent&&(e.document.attachEvent("onkeydown",function(){setModified(!0)}),e.document.attachEvent("onclick",function(){setModified(!0)})));for(var t=0;t<e.frames.length;t++)SetModificationNotifiersForDocEditorIFrames(e.frames[t],!0)}}function WaitForDialog(e){"undefined"!=typeof dlg?e():setTimeout(function(){WaitForDialog(e)},100)}function RefreshOnlyOnce(){"true"!=getQSVal(document.location.search,"insight_refresh")&&(document.location=document.location+(document.location.search?"&":"?")+"insight_refresh=true")}function openLogin(){location.href="/User/Login.aspx?ReturnTo="+encodeURIComponent(location.pathname+location.search)}function ShowLoadingOverlay(){$e("div.loading-overlay").show()}!function(){if(0==location.pathname.toLowerCase().indexOf("/admin/")){var e=!1,i=document.onclick;document.onclick=function(t){for(var o=(t||window.event).srcElement;o&&!o.href;)o=o.parentNode;if(o&&o.href){var n=o.href.toLowerCase();e=0==o.href.indexOf("#")||n.indexOf("javascript:")>=0&&!(n.indexOf("postback")>0||o.onclick&&o.onclick.toString().indexOf("postback")>=0)}i&&i(t)};var t=window.onbeforeunload;window.onbeforeunload=function(){e||(document.body.style.cursor="wait"),t&&t()}}}();var DownloadFile=function(e){var i=$e("#downloadIframe");0==i.length&&(i=$e("<iframe />",{id:"downloadIframe"}).appendTo("body")),i.attr("src",e)};function pageLoad(){$e(document).trigger("page_loaded")}jQuery.fn.velocity||(jQuery.fn.velocity=function(e,i){return i=i||{},this.animate(e,i.duration,function(){"function"==typeof i.complete&&i.complete()})}),$e(document).ready(function(){$e("body").on("click","#system_modal .modal-close",function(){$e("#system_modal").remove(),$e("#lean-overlay").remove()})});var CalendarEvents=function(e){"use strict";var i,t,o=0,n=function(){o++,setTimeout(function(){--o||(i.ResetSize(),t.trigger("height-reset-complete"),t.removeClass("dialog-loading"))},50)},a=function(i){e(i.target).hasClass("ui-resizable")||n()}
3,l=function(o,l){navigator.onLine?(i=new ModalDialog({elem:e("<div />",{class:"calendar-event-dialog dialog-loading"}),width:600,height:200,maximisable:!1,autoGrow:!0,mobilePinToBottom:!0,onClose:function(){SetQSAndForm("show_event",""),void 0!==qs&&qs.set("show_event"),e(window).off("resize",a)}}),e(window).on("resize",a),t=i.GetDialogUIObject(),e.ajax({type:"POST",url:"/Calendar/eventDetails.aspx/GetEventDetails",data:'{"intEventID":'+o+', "intTrackArticleID":'+(l||0)+', "blnFormatForApp":'+IsHubbPage()+"}",contentType:"application/json; charset=utf-8",dataType:"json",error:function(i,o,a){var l;l=403===i.status?"Sorry, that event is unavailable.":"Sorry, there was a problem fetching that event.",t.html(e("<div />",{class:"dialog-content calendar-event-content"}).html(l)),n()},success:function(a){var l=e.parseJSON(a.d);l.link_direct?l.link_new_tab?window.open(l.link,"_blank")?i.Close():(i.SetTitle("Your browser has blocked the event popup"),t.html(e("<div />",{class:"dialog-content calendar-event-content"}).html(["Click the link to open: <br />",e("<a />",{href:l.link,target:"_blank",on:{click:i.Close}}).html(l.link)])),n()):location.href=l.link:(t.html(e("<div />",{class:"dialog-content calendar-event-content"}).html([e("<div />",{class:"event-title"}).html(l.title),e("<h3 />").html(l.date),l.hasOwnProperty("summary_image")?e("<img />",{src:l.summary_image,alt:"",class:"event-summary-image",on:{load:n}}):"",l.hasOwnProperty("location")?e("<h4 />").html(l.hasOwnProperty("location_link")?[e("<div />",{class:"event-location-icon"}).html(e("<i />",{class:"mdi-communication-location-on"})),e("<a />",{href:l.location_link,class:"event-location-link",target:"_blank"}).html([l.location,e("<i />",{class:"mdi-action-open-in-new"})])]:l.location):"",e("<div />",{class:"event-details"}).html(l.details),l.hasOwnProperty("contact")?e("<div />",{class:"event-contact"}).append(["<b>Contact:</b> ",l.contact]):"",l.hasOwnProperty("link")?e("<div />",{class:"event-link"}).append(e("<a />",{href:l.link,target:l.link_new_tab||IsHubbPage()?"_blank":"_self"}).html([l.link_text,l.link_new_tab?e("<i />",{class:"mdi-action-open-in-new"}):""])):"",l.hasOwnProperty("plan")?e("<div />",{class:"event-plan"}).append(e("<a />",{href:"/Planner/EventDashboard.aspx?event_id="+o,target:IsHubbPage()?"_blank":"_self"}).html(["View event plan",IsHubbPage()?e("<i />",{class:"mdi-action-open-in-new"}):""])):""])),SetQSAndForm("show_event",o),n())}})):Insight.Alert("Sorry, you need to be online to view details for this event.")};return e(document).ready(function(){var t=getQSVal(document.location.search,"show_event");t&&l(t),e(window).on("popstate",function(){var e=getQSVal(document.location.search,"show_event");e?i&&i.IsOpen()||l(e):i&&i.IsOpen()&&i.Close()})}),{OpenEvent:l,OpenICalPopup:function(i){new ModalDialog({title:"Calendar Address",elem:e("<div />",{class:"calendar-generic-popup"}).append(e("<p />").html("Use the URL below to access your calendar from other applications. You can copy and paste this into any calendar product that supports the iCal format."),e("<a />",{href:i,target:"_blank"}).html(i)),width:600,height:200,maximisable:!1,autoShrink:!1,autoGrow:!0,mobilePinToBottom:!0})}}}($e);function CalendarModule(e,i,t,o,n,a,l,s,r,d,c,u,m){var p,f="#"+i,h=m?"_"+m:"",g=this;this.showCSVPopup=function(){var e=new ModalDialog({width:300,height:200,maximisable:!1,autoShrink:!1,autoGrow:!0,mobilePinToBottom:!0,elem:$e("<div />",{class:"calendar-generic-popup"}).append($e("<p/>").html("You can download information from the calendar in Comma Separated Value (.CSV) format to import into Outlook or another scheduling program."),$e("<p />").append(["Select period:",$e('<select id="'+i+'_SelectedPeriod" />').append([$e("<option />",{value:"1",selected:"selected"}).html("1 month"),$e("<option />",{value:"2"}).html("2 months"),$e("<option />",{value:"3"}).html("3 months"),$e("<option />",{value:"6"}).html("6 months"),$e("<option />",{value:"9"}).html("9 months"),$e("<option />",{value:"12"}).html("12 months")])]),s?$e("<p />").append([$e("<input />",{type:"checkbox",id:i+"_chkReminders",checked:"checked"}),$e("<label />",{for:i+"_chkReminders"}).append(["Create reminders for events that are on my "+c+"s, with ",$e('<select id="'+i+'_ReminderDays" />').append([$e("<option />",{value:"0"}).html("0"),$e("<option />",{value:"1",selected:"selected"}).html("1"),$e("<option />",{value:"2"}).html("2"),$e("<option />",{value:"3"}).html("3"),$e("<option />",{value:"4"}).html("4"),$e("<option />",{value:"5"}).html("5"),$e("<option />",{value:"6"}).html("6"),$e("<option />",{value:"7"}).html("7"),$e("<option />",{value:"14"}
3).html("14")])," days' notice."])]):"",$e("<input />",{type:"button",class:"button download-csv",value:"Download"}).click(function(){var n="/Calendar/Calendar.csv?Month="+t+"&Year="+o+"&SelectedPeriod="+$e("#"+i+"_SelectedPeriod").val()+"&ReminderDays="+($e("#"+i+"_chkReminders").is(":checked")?$e("#"+i+"_ReminderDays").val():"-1");window.open(n,"_blank")?e.Close():$e("input.download-csv",f).replaceWith($e("<div />").append([$e("<div />").html('<b>Your browser has blocked the CSV download. You can get it by right-clicking on the link below and choosing "Save as.."</b>'),$e("<a />",{href:n,target:"_blank"}).html("Download").click(e.Close)]))}))})},this.HideEmptyContainers=function(){$e(".calendar_day_wrapper",f).filter(function(){return 0===$e(this).find(".calendar_event:visible").length}).addClass("hide-in-list"),$e(".calendar_week",f).filter(function(){return 0===$e(this).find(".calendar_day_wrapper:visible").length}).addClass("hide-in-list"),$e(".calendar_body",f).toggleClass("no-upcoming-events",0===$e(".calendar_week:visible",f).length)},this.ResetContainers=function(){$e(".calendar_day_wrapper, .calendar_week",f).removeClass("hide-in-list")},this.ToggleOverflow=function(e){var i=$e(e.currentTarget);i.find("span.calendar_event_show_more").is(":visible")?(i.closest(".calendar_day").find(".calendar_event_overflow").removeClass("calendar_event_overflow"),i.find("span.calendar_event_show_more").hide(),i.find("span.calendar_event_show_less").show()):(g.ResetOverflowForDay(i.closest(".calendar_day")),i.find("span.calendar_event_show_less").hide(),i.find("span.calendar_event_show_more").show())},this.ResetOverflowForDay=function(i){var t=i.closest(".calendar_body").hasClass("calendar-list-view")?r:d,o=i.find(".calendar_event:visible"),n=$e(".calendar_day_more_events",i),a=o.length-t;a>0?(i.find(".calendar_event:visible").slice(t).addClass("calendar_event_overflow"),n.show(),$e("span.calendar_event_show_more",n).show().html("+"+a+" more "+(e?"booking":"event")+(a>1?"s":"")+" on this day"),$e("span.calendar_event_show_less",n).hide()):n.hide()},this.ResetAllOverflows=function(){$e(".calendar_event",f).removeClass("calendar_event_overflow"),$e("div.calendar_day_more_events",f).hide(),$e(".calendar_day",f).each(function(){g.ResetOverflowForDay($e(this))})},this.TogglePastEvents=function(){g.ResetContainers(),$e(".calendar_show_past",f).hasClass("past-events-visible")?($e(".calendar_show_past",f).removeClass("past-events-visible"),$e(".calendar_show_past a",f).html("Show past "+(e?"bookings":"events")+" in this month"),$e(".day_in_past",f).removeClass("show-in-list")):($e(".calendar_show_past",f).addClass("past-events-visible"),$e(".calendar_show_past a",f).html("Hide past "+(e?"bookings":"events")+" in this month"),$e(".day_in_past",f).addClass("show-in-list")),g.HideEmptyContainers()},this.ToggleView=function(){$e(".ui-tooltipped",f).uitooltip("close"),$e(".calendar_body",f).hasClass("calendar-list-view")?($e(".calendar_body",f).removeClass("calendar-list-view"),$e(".list-view-toggle i",f).removeClass("mdi-action-view-module").addClass("mdi-action-view-list").prop("title","List view"),$e(".day_in_past",f).removeClass("show-in-list"),g.ResetContainers(),SetQSAndForm("CalendarView"+h,"")):($e(".calendar_body",f).addClass("calendar-list-view"),$e(".list-view-toggle i",f).removeClass("mdi-action-view-list").addClass("mdi-action-view-module").prop("title","Grid view"),g.HideEmptyContainers(),SetQSAndForm("CalendarView"+h,"list")),g.ResetAllOverflows()},this.CloseExportDialog=function(){p.Close()},this.DoExport=function(e){switch($e(e).val()){case"xml":var i="https://"+document.location.host+"/Calendar/rss.xml";p=new ModalDialog({width:600,height:120,maximisable:!1,autoShrink:!1,autoGrow:!0,mobilePinToBottom:!0,elem:$e("<div />",{class:"calendar-generic-popup"}).append("Click the link to open (or right click to save): <br />",$e("<a />",{href:i,target:"_blank",on:{click:g.CloseExportDialog}}).html(i))});break;case"ical":CalendarEvents.OpenICalPopup("https://"+document.location.host+"/Calendar/Calendar.ics"+u);break;case"pdf":i="https://"+document.location.host+"/Calendar/Calendar.pdf?month="+t+"&year="+o+"&group="+$e(".group-selector",f).val()+"&filter="+($e(".include-subgroups",f).is(":checked")?"":"2");window.open(i,"_blank")||(p=new ModalDialog({width:600,height:120,maximisable:!1,autoShrink:!1,autoGrow:!0,mobilePinToBottom:!0,elem:$e("<div />",{class:"calendar-generic-popup"}).append("Click the link to open (or right click to save): <br />",$e("<a />",{href:i,target:"_blank",on:{click:this.CloseExportDialog}}).html(i))}));break;case"csv":g.showCSVPopup()}$e(e).val("")}
3,this.ApplyFilters=function(){$e(".group-selector",f).removeClass(function(e,i){return(i.match(/(^|\s)event-group-\S+/g)||[]).join(" ")}),$e(".group-selector",f).addClass($e(".group-selector option:selected",f).attr("class")),g.ResetContainers(),$e(".calendar_event",f).removeClass("group-filtered-show");var i=$e(".group-selector",f).val();void 0===i||""==i?($e(".calendar",f).removeClass("group-filtered"),$e(".group-selector .all-groups",f).text("Filter by "+(e?"resource":"group")),$e(".calendar_children_select",f).hide()):($e(".calendar",f).addClass("group-filtered"),$e(".group-selector .all-groups",f).text("ALL "+(e?"RESOURCES":"GROUPS")),$e(".calendar_children_select",f).show(),$e(".include-subgroups",f).is(":checked")?$e(".calendar_event",f).filter(function(){return $e.grep(this.className.split(" "),function(e,i){return 0===e.indexOf("event-path_")}).join().indexOf("_"+i+"_")>-1}).addClass("group-filtered-show"):$e(".calendar_event.event-group-"+i,f).addClass("group-filtered-show")),g.HideEmptyContainers(),g.ResetAllOverflows()},this.GroupExistsInCalendar=function(e){var i=!1;return $e(".group-selector option",f).each(function(){if(this.value==e)return i=!0,!1}),i},this.ConfigureFromInitialSettings=function(){var i=!1;$e(".group-selector",f).val()!=n&&(g.GroupExistsInCalendar(n)||$e(".group-selector option",f).eq(1).before($e("<option />",{value:n}).html(a+" (no "+(e?"bookings":"events")+")")),$e(".group-selector",f).val(n),i=!0);var t=$e(".include-subgroups",f).prop("checked"),o=l&&$e(".include-subgroups",f).length;(t!=o&&($e(".include-subgroups",f).prop("checked",o),i=!0),i?g.ApplyFilters():g.ResetAllOverflows(),$e(".list-view-toggle",f).is(":visible"))&&($e(".calendar_body",f).hasClass("calendar-list-view")!=("list"===getQSVal(location.search,"CalendarView"+h))&&g.ToggleView())},$e(document).ready(function(){$e(".ui-tooltipped",f).uitooltip({position:{my:"right center",at:"left-5 center"},tooltipClass:"calendar-view-toggle-tooltip"}),$e(document).one("touchstart",function(){$e(".ui-tooltipped",f).uitooltip("disable")}),$e(".group-selector",f).change(function(){var e=$e(".group-selector",f).val();SetQSAndForm("Group"+h,e),u=setQSVal(u,"group",e);var i=$e("link[id$=ctlRSSLink]");if(i.length){var t=i.prop("href"),o=t.indexOf("?");i.prop("href",t.substr(0,o)+setQSVal(t.substring(o),"group",e))}g.ApplyFilters()}),$e(".include-subgroups",f).change(function(){SetQSAndForm("ChildGroups"+h,$e(this).is(":checked")?"":"false"),g.ApplyFilters()}),g.ConfigureFromInitialSettings(),$e(".calendar",f).removeClass("calendar_loading"),$e("select.calendar-export-options",f).on("change",function(){g.DoExport(this)}),$e(".day_in_past .calendar_event",f).length||$e(".calendar_show_past",f).hide(),$e(window).resize(function(){g.ResetContainers(),g.HideEmptyContainers()}),g.ResetContainers(),g.HideEmptyContainers(),$e(".toggle-past-events",f).click(g.TogglePastEvents),$e(".toggle-overflow",f).click(g.ToggleOverflow),$e(".toggle-calendar-view",f).click(g.ToggleView)}),$e(window).on("popstate",g.ConfigureFromInitialSettings)}function showEvent(e){CalendarEvents.OpenEvent(e)}function showRemoteEvent(e,i){showEvent(e)}var Media=function($){"use strict";var objMediaFormats;$.getJSON("/Media/MediaFormatsJSON.aspx",function(e){objMediaFormats=e.media_formats});var MediaType={UNKNOWN:0,AUDIO:1,VIDEO:2,IMAGE:3,DOCUMENT:4},GetMimeType=function(e){var i="unknown";return $.each(objMediaFormats,function(t,o){if(o.format_type===e)return i=o.mime_type,!1}),i},GetFormatFromExtension=function(e){var i=e.toLowerCase();i.startsWith(".")&&(i=i.substring(1));var t=-1;return $.each(objMediaFormats,function(e,o){if(o.extension===i||o.alt_extension===i)return t=o.format_type,!1}),t},GetDefaultExtensionForFormat=function(e){var i="";return $.each(objMediaFormats,function(t,o){if(o.format_type===e)return i=o.extension,!1}),i},GetExtensionFromFilename=function(e){return e.slice(e.lastIndexOf("."))},GetFormatName=function(e,i){var t="";return $.each(objMediaFormats,function(o,n){if(n.format_type===e)return t=i?n.short_name:n.long_name,!1}),t},GetFormatForPopupDisplay=function(e){return e.hasOwnProperty("embed_uri")?IsEmbedVimeo(e.embed_uri)?"Vimeo Video":"YouTube Video":GetFormatName(e.format)},GetIconPathFromFormat=function(e){var i="blank";return $.each(objMediaFormats,function(t,o){if(o.format_type===e)return i=o.icon,!1}),"/Admin/Images/FileIcons/"+i+".png"},IsFormatOfType=function(e,i){var t=!1;return $.each(objMediaFormats,function(o,n){if(n.format_type===e)return t=n.media_type===i,!1}),t},IsVideo=function(e){return IsFormatOfType(e,MediaType.VIDEO)},IsAudio=function(e){return IsFormatOfType(e,MediaType.AUDIO)},IsEmbedVimeo=function(e){return e.includes(".vimeo.com")},dlg,$dlgUI,blnCtrlIsPressed=!1,intHeightResetPending=0,ResetHeight=function(){intHeightResetPending++,setTimeout(function(){--intHeightResetPending||(dlg.ResetSize(),$dlgUI.trigger("height-reset-complete"),$dlgUI.removeClass("dialog-loading"))},200)},tmErrorCheckTimer,ShowUnsupportedFile=function(e){clearTimeout(tmErrorCheckTimer),$("div.playing-file-"+e.file_id).addClass("unsupported active"),$("ul.media-files-list li.media-file.media-file-"+e.file_id).addClass("unsupported active"),$("div.media-player").removeClass("media-player-loading media-player-video"),$("div.media-player-region").removeClass("pe
3nding-height-reset"),ResetHeight()},ShowActiveFile=function(e){$("div.playing-file-"+e.file_id).addClass("active"),$("ul.media-files-list li.media-file.media-file-"+e.file_id).addClass("active"),$("div.media-player").removeClass("media-player-loading"),$("div.media-player-region").hasClass("pending-height-reset")&&($("div.media-player-region").removeClass("pending-height-reset"),ResetHeight())},PlayMediaFromList=function(e,i,t,o,n){!n&&SetQSAndForm(t?"show_shop_file":"show_file",i.file_id,o);var a=IsVideo(i.format),l=i.hasOwnProperty("embed_uri"),s=l?"iframe":a?"video":"audio",r=$("div.media-player-region div.playing-file-"+i.file_id),d=r.find(s);if(a&&$(".ui-dialog-content").animate({scrollTop:0},"fast"),!r.hasClass("active")){$("div.media-player-region").addClass("pending-height-reset"),$("div.media-player").addClass("media-player-loading"),$("div.media-player-region div.media-player-file.active:not(.unsupported)").find("video, audio").each(function(){this.pause()});for(var c=0;c<e.files.length;c++)e.files[c].hasOwnProperty("youtube_player")?e.files[c].youtube_player.pauseVideo():e.files[c].hasOwnProperty("vimeo_player")&&e.files[c].vimeo_player.pause();$("ul.media-files-list li").removeClass("playing").removeClass("active"),$("div.media-player-file").removeClass("active"),$("div.media-player").toggleClass("media-player-video",a),$("div.media-player").toggleClass("media-player-audio",!a)}r.length?r.hasClass("unsupported")?ShowUnsupportedFile(i):l?(ShowActiveFile(i),IsEmbedVimeo(i.embed_uri)?i.vimeo_player.play():i.youtube_player.playVideo()):d.get(0).play():(d=l?$("<"+s+"  />",{id:"ifrEmbed-"+i.file_id,src:i.embed_uri+(IsEmbedVimeo(i.embed_uri)?"":"&enablejsapi=1&origin=https://"+document.location.host),allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",frameborder:"0",webkitallowfullscreen:"",mozallowfullscreen:"",allowfullscreen:"",on:{load:function(){IsEmbedVimeo(i.embed_uri)?SetupVimeoStream(i):SetupYouTubeStream(i)}}}):$("<"+s+" />",{autoplay:"",controls:"",playsinline:"video"===s?"":null,on:{canplay:function(){ShowActiveFile(i)},play:function(){ShowActiveFile(i),$("ul.media-files-list li.media-file.media-file-"+i.file_id).addClass("playing")},pause:function(){$("ul.media-files-list li.media-file.media-file-"+i.file_id).removeClass("playing")}}}).append($("<source />",{src:"/Media/PlayMedia.aspx?file_id="+i.file_id+(t?"&source=shop":""),type:GetMimeType(parseInt(i.format)),on:{error:function(){ShowUnsupportedFile(i)}}})),$("div.media-player-region").append($("<div />",{class:"media-player-file active playing-file-"+i.file_id+(l?" media-player-module-embed-responsive aspect-ratio-16_9":"")}).append(d,$("<div />",{class:"media-player-unsupported"}).append($("<span />").append(i.external?["Sorry, this can't be displayed here. Try ",$("<a />",{href:i.uri,target:"_blank"}).html("opening it in a new tab")]:["Sorry, your browser is unable to play this type of file. You can still ",$("<a />",{href:"/Media/PlayMedia.aspx?file_id="+i.file_id+(t?"&source=shop":""),download:""}).html("download it")],".")))),tmErrorCheckTimer=setTimeout(function(){var e=d.get(0).error;e&&e.code==MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED&&ShowUnsupportedFile(i)},1e3),e.hasOwnProperty("summary_image")?ResetHeight():setTimeout(ResetHeight,1e3))},PauseMedia=function(e){e.hasOwnProperty("youtube_player")?e.youtube_player.pauseVideo():e.hasOwnProperty("vimeo_player")?e.vimeo_player.pause():$(".playing-file-"+e.file_id).find("video, audio").get(0).pause(),$("ul.media-files-list li.media-file.media-file-"+e.file_id).removeClass("playing")},SetupYouTubeStream=function(e){void 0===window.YouTubeReady?(void 0===window.YouTubeInitStarted&&(window.YouTubeInitStarted=!0,window.onYouTubeIframeAPIReady=function(){window.YouTubeReady=!0},$.getScript("https://www.youtube.com/iframe_api")),setTimeout(function(){SetupYouTubeStream(e)},100)):e.youtube_player=new YT.Player("ifrEmbed-"+e.file_id,{events:{onReady:function(i){ShowActiveFile(e),i.target.playVideo()},onStateChange:function(i){switch(i.data){case YT.PlayerState.PLAYING:$("ul.media-files-list li.media-file.media-file-"+e.file_id).addClass("playing");break;case YT.PlayerState.PAUSED:$("ul.media-files-list li.media-file.media-file-"+e.file_id).removeClass("playing")}}}})},SetupVimeoStream=function(e){void 0===window.VimeoReady?(void 0===window.VimeoInitStarted&&(window.VimeoInitStarted=!0,$.getScript("https://player.vimeo.com/api/player.js",function(){window.VimeoReady=!0})),setTimeout(function(){SetupVimeoStream(e)},100)):(e.vimeo_player=new Vimeo.Player($("#ifrEmbed-"+e.file_id).get(0)),e.vimeo_player.on("play",function(){$("ul.media-files-list li.media-file.media-file-"+e.file_id).addClass("playing")}),e.vimeo_player.on("pause",function(){$("ul.media-files-list li.media-file.media-file-"+e.file_id).removeClass("playing")}),ShowActiveFile(e),e.vimeo_player.play())},FormatDuration=function(e){if(0==e)return"";var i="";if(e>3600){var t=Math.floor(e/3600);i=t+":",e-=3600*t}if(e>60||""!==i){var o=Math.floor(e/60);i=i+(o<10?"0":"")+o+":",e-=60*o}return i=""===i?e+" secs":i+(e<10?"0":"")+e},FormatSize=function(e){var i=e/1024,t="KB";return i>=1e3&&(i/=1024,t="MB"),i>=1e3&&(i/=1024,t="GB"),Math.round(10*i)/10+t},OnResize=function(e){$(e.target).hasClass("ui-resizable")||ResetHeight()},OpenInPopout=function(e,i,t,o){window.open("/Media/Player.aspx?show_popout=true"+(e?"&show_media="+e:"")+(i?"&show_file="+i:"")+(t?"&show_shop_file="+t:"")+(o?"&show_event_plan_item_media="+o:""),"_blank")},intFileIDGlobal,blnIsShopGlobal,$offliningSpinnerGlobal,strFileURIGlobal,DownloadOrOffline=function(e,i,t,o){if(intFileIDGlobal=e,blnIsShopGlobal=i,strFileURIGlobal=o,$offliningSpinnerGlobal=t,"caches"in window&&void 0!==Insight&&"function"==typeof Insight.ConfirmOptions){var n=t.closest("li.media-file");n.hasClass("available-offline")?window.top.Insight.ConfirmOptions("This file is already available for playing when offline in this "+(isPwa()?"app":"browser")+", but you can download another copy to your device if you wish.","Download to device",[{button_text:"Download",id:"download"},{button_text:"Cancel",id:"cancel"}],"Media.DoDownloadOrOffline",!0):n.index()?window.top.Insight.ConfirmOptions("This will download the file to your device. (Onl
3y the primary file of each recording may be stored in this "+(isPwa()?"app).":"browser)."),"Download to device",[{button_text:"Download",id:"download"},{button_text:"Cancel",id:"cancel"}],"Media.DoDownloadOrOffline",!0):window.top.Insight.ConfirmOptions("You can choose to either download this file to your device's Downloads folder, or store the file in your "+(isPwa()?"app.":"browser."),"Download or Offline?",[{button_text:"Download",id:"download"},{button_text:"Offline",id:"offline"},{button_text:"Cancel",id:"cancel"}],"Media.DoDownloadOrOffline",!0)}else Media.DoDownloadOrOffline("download")},DoDownloadOrOffline=function(e){switch(e){case"download":void 0===Insight?DownloadFile("/Media/PlayMedia.aspx?file_id="+intFileIDGlobal+(blnIsShopGlobal?"&source=shop":"")):Insight.DownloadFile("/Media/PlayMedia.aspx?file_id="+intFileIDGlobal+(blnIsShopGlobal?"&source=shop":""));break;case"offline":try{MediaES6.CacheMediaFile(strFileURIGlobal,$offliningSpinnerGlobal)}catch(e){Insight.Alert("Sorry, there was a problem saving the file. This feature may not be supported by your browser.")}}},CheckOfflineStatus=function(e){"caches"in window&&(NodeList.prototype.forEach=Array.prototype.forEach,e.querySelectorAll("div.media-item, li.media-file").forEach(function(e){caches.open("media").then(function(i){i.match(e.getAttribute("data-media-file-url")).then(function(i){i&&$(e).addClass("available-offline")})})}))},OpenRecording=function(e,i,t,o,n){blnCtrlIsPressed?OpenInPopout(e,i,t,n):(dlg=new ModalDialog({elem:$("<div />",{class:"dialog-loading"}),width:600,height:200,minWidth:300,maximisable:!1,autoGrow:!0,mobilePinToBottom:!0,onClose:function(){o?window.close():(SetQSAndForm("show_media","",!0),SetQSAndForm("show_file","",!0),SetQSAndForm("show_shop_file","",!0),SetQSAndForm("show_event_plan_item_media","",!0),void 0!==qs&&(qs.set("show_media"),qs.set("show_file"),qs.set("show_shop_file"),qs.set("show_event_plan_item_media")),$(window).off("resize",OnResize))}}),e&&!o&&SetQSAndForm("show_media",e),$(window).on("resize",OnResize),$dlgUI=dlg.GetDialogUIObject(),IsHubbPage()||o||$dlgUI.prev(".ui-dialog-titlebar").find(".ui-dialog-titlebar-buttonpane").append($("<a />",{href:"javascript:void(0);",on:{click:function(){OpenInPopout(e,getQSVal(document.location.search,"show_file"),t,n),dlg.Close()}}}).html($("<i />",{class:"mdi-action-open-in-new"}))),$.ajax({type:"POST",url:"/Media/Player.aspx/GetRecordingDetails",data:'{"intMediaID":'+(e||0)+', "intShopFileID":'+(t||0)+', "intEventPlanItemID":'+(n||0)+"}",contentType:"application/json; charset=utf-8",dataType:"json",error:function(e,i,t){var o;switch(e.status){case 401:o='Sorry, you must <a href="/User/Login.aspx?ReturnTo='+encodeURIComponent(location.pathname+location.search)+'">log in</a> to view this item.';break;case 403:o="Sorry, you do not have permission to view this item.";break;case 404:o="Sorry, that item is unavailable.";break;default:o="Sorry, there was a problem fetching that item."}$dlgUI.html($("<div />",{class:"dialog-content media-player"}).html($("<div />",{class:"media-player-unsupported",style:"display:block"}).html(o))),ResetHeight()},success:function(e){var n=$.parseJSON(e.d),a=$("<div />",{class:"media-player dialog-content"}).append($("<div />",{class:"media-player-title"}).html(n.title),$("<div />",{class:"media-player-spinner"}),$("<div />",{class:"media-player-region"}),n.hasOwnProperty("summary_image")?$("<img />",{src:n.summary_image,alt:"",class:"media-summary-image"}):"",$("<h3 />").html(n.speaker),n.hasOwnProperty("recording_date")?$("<h4 />").html(n.recording_date):"",$("<div />",{class:"media-player-refs"}),$("<div />",{class:"media-recording-details"}).html(n.details));if($dlgUI.html(a),n.hasOwnProperty("bible_refs"))for(var l=0;l<n.bible_refs.length;l++){var s=n.bible_refs[l].ref_text;$("div.media-player-refs").append(l?", ":"",$("<a />",{target:"_blank",href:n.bible_refs[l].ref_url}).html(s))}if(n.files.length){var r,d=$("<ul />",{class:"media-files-list"});for(l=0;l<n.files.length;l++)(function(){var e=n.files[l];if(1===n.files.length&&(i=e.file_id),IsVideo(e.format)||IsAudio(e.format)){var a=FormatDuration(e.duration);d.append($("<li />",{class:"media-file media-file-"+e.file_id+(1===n.files.length?" single-file":""),"data-media-file-url":e.uri}).append($("<img />",{class:"media-file-type ",src:GetIconPathFromFormat(e.format),alt:GetFormatForPopupDisplay(e)}),$("<i />",{class:"media-file-type hubb-icons"}).html(IsVideo(e.format)?"video":"sound"),$("<i />",{class:"media-file-type offlined hubb-icons"}).html("downloaded_circle"),$("<span />",{class:"media-file-details"}).append($("<div />",{class:"media-file-title"}).html(e.title?e.title:GetFormatForPopupDisplay(e)),a?$("<span />",{class:"media-file-duration"}).html(a):"",$("<span />",{class:"media-file-format"}).append(e.title?GetFormatForPopupDisplay(e):"",e.size_bytes?" ("+FormatSize(e.size_bytes)+")":"")),e.embed_uri?e.custom_download_url?$("<a />",{href:e.custom_download_url,class:"media-file-download media-file-control",download:""}).html($("<i />",{class:"mdi-file-file-download"})):$("<a />",{href:e.uri,class:"media-file-open media-file-control",target:"_blank"}
3).html([$("<i />",{class:"mdi-action-open-in-new"})]):$("<a />",{class:"media-file-download media-file-control"+(e.external?" media-file-external":""),href:"javascript:void(0);",onclick:"Media.DownloadOrOffline("+e.file_id+", "+!!t+', $e(this).siblings("img.caching"), "'+e.uri+'")',download:""}).html($("<i />",{class:"mdi-file-file-download"})),e.embed_uri?null:$('<img src="/Admin/Images/Icons/loading.gif" class="caching" style="display:none;" />'),$("<a />",{href:"javascript:void(0);",class:"media-file-play media-file-control",on:{click:function(){PlayMediaFromList(n,e,!!t,o)}}}).html([$("<i />",{class:"mdi-av-play-arrow"})]),$("<a />",{href:"javascript:void(0);",class:"media-file-pause media-file-control",on:{click:function(){PauseMedia(e)}}}).html($("<i />",{class:"mdi-av-pause"})))),e.file_id==i&&(r=e)}else e.hasOwnProperty("document_file_id")?d.append($("<li />",{class:"media-file media-file-"+e.file_id+(1===n.files.length?" single-file":"")}).append($("<img />",{class:"media-file-type ",src:GetIconPathFromFormat(e.format),alt:GetFormatForPopupDisplay(e)}),$("<i />",{class:"media-file-type hubb-icons"}).html("doc_text"),$("<span />",{class:"media-file-details"}).append(e.title?$("<div />",{class:"media-file-title"}).html(e.title):"",$("<span />",{class:"media-file-format"}).html(GetFormatForPopupDisplay(e)+" ("+FormatSize(e.size_bytes)+")")),$("<a />",{class:"media-file-download media-file-control",href:"/Publisher/File.aspx?ID="+e.document_file_id,download:""}).html($("<i />",{class:"mdi-file-file-download"})),$("<a />",{href:"/Publisher/File.aspx?ID="+e.document_file_id,class:"media-file-open media-file-control",target:"_blank"}).html([$("<i />",{class:"mdi-action-open-in-new"})]))):e.hasOwnProperty("image_id")?d.append($("<li />",{class:"media-file media-file-"+e.file_id+(1===n.files.length?" single-file":"")}).append($("<img />",{class:"media-file-type ",src:GetIconPathFromFormat(e.format),alt:GetFormatForPopupDisplay(e)}),$("<i />",{class:"media-file-type hubb-icons"}).html("image"),$("<span />",{class:"media-file-details"}).append(e.title?$("<div />",{class:"media-file-title"}).html(e.title):"",$("<span />",{class:"media-file-format"}).html(GetFormatForPopupDisplay(e)+" ("+FormatSize(e.size_bytes)+")")),$("<a />",{class:"media-file-download media-file-control",href:e.url,download:""}).html($("<i />",{class:"mdi-file-file-download"})),$("<a />",{href:e.url,class:"media-file-open media-file-control",target:"_blank"}).html([$("<i />",{class:"mdi-action-open-in-new"})]))):48==e.format&&d.append($("<li />",{class:"media-file media-file-"+e.file_id+(1===n.files.length?" single-file":"")}).append($("<img />",{class:"media-file-type ",src:GetIconPathFromFormat(e.format),alt:GetFormatForPopupDisplay(e)}),$("<i />",{class:"media-file-type hubb-icons"}).html("doc"),$("<a />",{class:"whole-item-as-link media-file-details",href:e.uri,target:"_blank"}).append(e.title?$("<div />",{class:"media-file-title"}).html(e.title):"",$("<span />",{class:"media-file-format"}).html(e.uri)),$("<a />",{href:e.uri,class:"media-file-open media-file-control",target:"_blank"}).html([$("<i />",{class:"mdi-action-open-in-new"})]),$("<a />",{href:"javascript:void(0);",class:"media-file-play media-file-control media-file-external"}).html([$("<i />",{class:"mdi-av-play-arrow"})])))})();a.append(d),CheckOfflineStatus(a[0]),r?PlayMediaFromList(n,r,!!t,!0,o):ResetHeight()}else ResetHeight()}}))},OpenFromQueryString=function(){var e=getQSVal(document.location.search,"show_media"),i=getQSVal(document.location.search,"show_shop_file"),t=getQSVal(document.location.search,"show_popout");if(e||i)if(e){var o=getQSVal(document.location.search,"show_file");dlg&&dlg.IsOpen()?$("li.media-file-"+o+" a.media-file-play").click():OpenRecording(e,o||null,null,"true"===t)}else OpenRecording(null,null,i,"true"===t);else dlg&&dlg.IsOpen()&&dlg.Close()};return $(document).on("keyup keydown",function(e){blnCtrlIsPressed=e.ctrlKey}),$(document).ready(function(){try{eval("async () => {}"),jQuery.getScript("/Common/Scripts/media-es6.js")}catch(e){}OpenFromQueryString(),$(window).on("popstate",OpenFromQueryString),$(".media-player-module source").each(function(){var e=$
3(this),i=setTimeout(function(){var i=e.parent(),t=i.get(0).error;t&&t.code==MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED&&(e.closest(".media-player-module").find(".media-player-unsupported").show(),i.hide())},1e3);e.on("error",function(){clearTimeout(i),e.closest(".media-player-module").find(".media-player-unsupported").show(),e.parent().hide()})})}),{OpenRecording:OpenRecording,IsVideo:IsVideo,IsAudio:IsAudio,GetFormatName:GetFormatName,GetIconPathFromFormat:GetIconPathFromFormat,GetFormatFromExtension:GetFormatFromExtension,GetExtensionFromFilename:GetExtensionFromFilename,FormatSize:FormatSize,DownloadOrOffline:DownloadOrOffline,DoDownloadOrOffline:DoDownloadOrOffline,CheckOfflineStatus:CheckOfflineStatus}}($e);function playMedia(e,i){Media.OpenRecording(e,i)}function playShopMedia(e){Media.OpenRecording(null,null,e)}function playAppMedia(e){navigator.onLine?($e(".media-"+e+" .media-slideout").hide(),window.top.Media.OpenRecording(e)):1==$e(".media-"+e+" .media-slideout").length&&$e(".media-"+e).hasClass("available-offline")?$e(".media-"+e+" .media-slideout").slideToggle():Insight.Alert("Sorry, this file is not available while you are offline.")}var Rotas=function(e){"use strict";var i,t=function(e,t){i=new ModalDialog({url:"/Hubb/Me/RotaSignup.aspx?RotaGroupID="+e+(t?"&UsrID="+t:""),width:960,height:590,mobilePinToBottom:!0,queryStringParams:{show_signup:e},autoShrink:!1})};return e(document).ready(function(){var o=getQSVal(document.location.search,"show_signup");o&&t(o),e(window).on("popstate",function(){getQSVal(document.location.search,"show_signup")?i&&i.IsOpen()||t(t):i&&i.IsOpen()&&i.Close()})}),{OpenSignup:t}}($e);function showHubbSidebar(e){$e("body").addClass("hubb-sidebar-open"),$e(".hubb-sidebar-overlay").fadeIn(100),$e(e).addClass("open")}function hideHubbSidebar(){$e(".hubb-sidebar-overlay").fadeOut(100),$e(".hubb-sidebar.open").removeClass("open"),$e("body").removeClass("hubb-sidebar-open")}$(document).ready(function(){$e(".hubb-sidebar-overlay").on("click",function(){hideHubbSidebar()}),$e(".hubb-sidebar .sidebar-close").on("click",function(){hideHubbSidebar()})});var SessionKeepAlive=function(e){var i,t=0,o=0,n=function(){o=t,t>120&&l()},a=function(i){i.off("keydown click visibilitychange",n).on("keydown click visibilitychange",n),i.find("iframe, frame").each(function(){try{a(e(this.contentWindow.document))}catch(e){}})},l=function(){++t>12&&t-o<12&&e.ajax({type:"POST",url:"/User/ActivityMonitor.aspx/CheckSession",contentType:"application/json; charset=utf-8",dataType:"json",cache:!1,success:function(){t=0,o=0},error:function(t,o,n){401===t.status&&(clearTimeout(i),e(document).trigger("session_timeout"),!e("#divSessionTimeout").length||e("div.login-panel").length||e(".endis-jquery-ui-dialog").length||e("html").hasClass("has-open-dialog")||e("#divExitOverlay").is(":visible")||e(window.frameElement).hasClass("no-session-overlay")||e("body").hasClass("no-session-overlay")||(e(window.frameElement).hasClass("no-session-alert")?(Insight.ShowOverlay(),Insight.Overlay().click(function(){Insight.Overlay().hide().off("click")})):new ModalDialog({title:"Session Timeout",elem:e("#divSessionTimeout"),width:500,height:220,maximisable:!1,autoShrink:!1,onClose:function(){var i=function(t){t||(t=$e(document)),e("#divExitOverlay",t).hide(),t.find("iframe, frame").each(function(){try{i(e(this).contents())}catch(e){}})};i(e(window.top.document))}})))}}),i=setTimeout(l,5e3)};return e(document).ready(function(){-1==window.location.href.indexOf("/Admin/Reports/Groups/GoogleMapReportMap.aspx")&&-1==window.location.href.indexOf("/Modules/FrontPage/Map/ChooseStartPositionMap.aspx")&&(setTimeout(function(){a(e(document))},5e3),l())}),{SignalActivity:n,HandleSessionTimeout:function(i){e("#divSessionTimeout").closest(".endis-jquery-ui-dialog").find(".mdi-navigation-close").click(),i&&PostbackWithoutWarning()}}}($e);!function(e){e.fn.extend({openModal:function(i){var t=this,o={opacity:.5,in_duration:350,out_duration:250,ready:void 0,complete:void 0,dismissible:!0,appendOverlaySelector:"form",appendModalSelector:"form"};if(i=e.extend(o,i),!e("#lean-overlay").length){var n=e('<div id="lean-overlay"></div>');n.css({display:"block",opacity:0}
3),e(i.appendOverlaySelector).first().append(n)}i.appendModalSelector&&e(i.appendModalSelector).first().append(t),i.dismissible&&(e("#lean-overlay").click(function(){e(t).closeModal(i)}),e(document).on("keyup.leanModal",function(o){27===o.keyCode&&e(t).closeModal(i)})),e(t).find(".modal-close").filter(function(){return t[0]==e(this).closest(".modal")[0]}).click(function(o){e(t).closeModal(i)});var a=0;e(this).closest("body").find("div:visible").each(function(){var i=parseInt(e(this).css("z-index"));a=i>a?i:a}),"undefined"!=typeof dlg&&dlg.wndOpener.$("div:visible").each(function(){var i=parseInt(e(this).css("z-index"));a=i>a?i:a}),e(t).css({display:"block",opacity:0,"z-index":a+2}),e(t).data("old_overlay_zi",parseInt(e("#lean-overlay").css("z-index"))),e("#lean-overlay").velocity({opacity:i.opacity},{duration:i.in_duration,queue:!1,ease:"easeOutCubic"}),e("#lean-overlay").css({"z-index":a+1,display:"block"}),e(t).removeClass("modal-closed").addClass("modal-open"),e(t).hasClass("bottom-sheet")?e(t).velocity({bottom:"0",opacity:1},{duration:i.in_duration,queue:!1,ease:"easeOutCubic",complete:function(){"function"==typeof i.ready&&i.ready()}}):e(t).hasClass("right-sheet")?e(t).velocity({right:"0",opacity:1},{duration:i.in_duration,queue:!1,ease:"easeOutCubic",complete:function(){"function"==typeof i.ready&&i.ready()}}):(e(t).css({top:"4%"}),e(t).velocity({top:"10%",opacity:1},{duration:i.in_duration,queue:!1,ease:"easeOutCubic",complete:function(){"function"==typeof i.ready&&i.ready()}}))}}),e.fn.extend({closeModal:function(i){var t={out_duration:250,complete:void 0};i=e.extend(t,i);if(!e(this).hasClass("modal-closed")){if("function"==typeof i.validate)if(!i.validate())return;var o=1==e(".modal:visible").length;o?(e(".modal-close").off(),e(document).off("keyup.leanModal"),e("#lean-overlay").velocity({opacity:0},{duration:i.out_duration,queue:!1,ease:"easeOutQuart"})):e("#lean-overlay").css("z-index",e(this).data("old_overlay_zi")),e(this).removeClass("modal-open").addClass("modal-closed"),e(this).hasClass("bottom-sheet")?e(this).velocity({bottom:"-100%",opacity:0}
3,{duration:i.out_duration,queue:!1,ease:"easeOutCubic",complete:function(){o&&e("#lean-overlay").css({display:"none"}),"function"==typeof i.complete&&i.complete(),o&&e("#lean-overlay").remove()}}):e(this).hasClass("right-sheet")?e(this).velocity({right:"-100%",opacity:0},{duration:i.out_duration,queue:!1,ease:"easeOutCubic",complete:function(){o&&e("#lean-overlay").css({display:"none"}),"function"==typeof i.complete&&i.complete(),o&&e("#lean-overlay").remove()}}):e(this).fadeOut(i.out_duration,function(){e(this).css({top:0}),o&&e("#lean-overlay").css({display:"none"}),"function"==typeof i.complete&&i.complete(),o&&e("#lean-overlay").remove()})}}}),e.fn.extend({leanModal:function(i){return this.each(function(){e(this).click(function(t){var o=e(this).attr("href")||"#"+e(this).data("target");e(o).openModal(i),t.preventDefault()})})}})}(jQuery);var Insight=function(e){"use strict";var i,t,o,n=function(){var e=window.location.pathname+window.location.search;return i.home_url&&0===e.indexOf(i.home_url)},a=function(){void 0!==window.event&&window.event.preventDefault()},l=function(e,t,o,n){var a=i.home_url?i.home_url:window.location.pathname;if(a.indexOf("?")>-1){var l=a.substring(a.indexOf("?"));l=setQSVal(l,e,t),o&&"undefined"!==n&&(l=setQSVal(l,o,n)),s(a.substring(0,a.indexOf("?"))+l)}else s(a+"?"+e+"="+t+(o&&n?"&"+o+"="+n:""))},s=function(e,i){a(),i?window.open(e):window.location.href=e},r=new Array,d=function(i,t,o,n,a,l,s,c,u,m,p,f,h){if(null!=i&&"string"!=typeof i&&(i=String(i)),e("body").hasClass("open-modals-in-parent"))try{return void window.parent.Insight.SystemModal(i,t,o,n,a,l,s,c,u,m,p,f,h)}catch(e){}var g=e("#system_modal");if(0===g.length&&(g=e(' <div id="system_modal" class="modal"><div class="modal-content"></div><div class="modal-footer"><a href="javascript:void(0);" id="btn-ok" class="btn-flat modal-action modal-close">OK</a><a href="javascript:void(0);" id="btn-cancel" class="btn-flat modal-action modal-close">Cancel</a></div></div>'),e("body").append(g)),g.is(":visible"))r.push(arguments);else if(t=t?"<h5>"+t+"</h5>":"",i){if(o&&(i="<p>"+i.replace(/\n/g,"<br />")+"</p>"),p)for(var v=0;v<p.length;v++)i+='<a href="javascript:void(0);" id="btn-opt-'+v+'" class="btn modal-action modal-close insight-options-btn" onclick="'+f+"('"+p[v].id+"')\">"+p[v].button_text+"</a>";g.find(".modal-content").html(t+i);var w=g.find("#btn-ok");a?(w.show(),w.html(u||"OK"),w.unbind("click.custom"),"function"==typeof l&&w.on("click.custom",l)):w.hide();var y=g.find("#btn-cancel");s?(y.show(),y.html(m||"Cancel"),y.unbind("click.custom"),"function"==typeof c&&y.on("click.custom",c)):y.hide();var b=g.find(".modal-footer");s||a?b.show():b.hide();g.openModal({dismissible:n,complete:function(){if(r.length){var e=r.shift();d.apply(this,e)}}}),h&&(g.addClass("show-above-widget-overlay"),e("#lean-overlay").addClass("show-above-widget-overlay"))}},c=function(e){var i=!1;(console.log(e),arguments.length&&arguments[0].promise)&&(arguments[0].readyState<4&&(i=!0));i||"true"===qs.get("ajax_error")||qs.go("ajax_error",!0)},u=function(){return t||(t=e("#divExitSpinner")),t},m=function(){return o||(o=e("#divExitOverlay")),o},p=0,f=function(e,i){!i&&p++,u().css("z-index",""),e&&m().css("z-index","");var t=GetMaxZIndex();u().css("z-index",t+2),u().show(),e&&g(t+1)},h=function(){--p<=0&&(u().hide(),m().hide(),p=0)},g=function(e){e||(m().css("z-index",""),e=1+GetMaxZIndex()),m().css("z-index",e),m().show().fadeTo(1500,.7)},v="InsightLocalStorage_",w=function(i){var t=e("#"+i);return 1===t.length?t:e("[id$=_"+i+"]")};return{Init:function(e){i=e},GroupID:function(){return i.group_id},UsrID:function(){return i.usr_id},IsChurch:function(){return i.use_church},Region:function(){return i.region},IsPostback:function(){return i.is_postback},HomeURL:function(){return i.home_url},UserData:function(e,i){return e=v+e,void 0===i?JSON.parse(localStorage.getItem(e)):(localStorage.setItem(e,JSON.stringify(i)),i)},ClearUserData:function(){for(var e=0;e<localStorage.length;e++)0===localStorage.key(e).indexOf(v)&&localStorage.removeItem(localStorage.key(e))},Navigate:s,NavigateToGroup:function(e){if(n())qs.go("GroupID",e,"FolderID");else{var i=qs.get("context");l("GroupID",e,i?"context":null,i||null)}},NavigateToFolder:function(e){n()?qs.go("FolderID",e):l("FolderID",e,"GroupID",i.group_id)},NavigateToSection:function(e){l("section_id",e)},NavigateToMailingGroup:function(e){l("MailingGroupID",e||"u","GroupID",/^\d+$/.test(e)?e:i.group_id)},NavigateOrFilter:function(i,t){var o=e(i.target);return"undefined"==typeof InfiniteScroll||-1===o.prop("href").indexOf(window.location.pathname)||(InfiniteScroll.FilterToTypes(t),!1)},DownloadFile:function(i){var t=e("#downloadIframe");0==t.length&&(t=e("<iframe />",{id:"downloadIframe"}).appendTo("body")),t.attr("src",i)}
3,Alert:function(e,i,t){d(e,i,!0,!1,!0,t)},Confirm:function(e,i,t,o,n,a){d(e,i,!0,!1,!0,t,!0,o,n,a)},ConfirmOptions:function(e,i,t,o,n){d(e,i,!0,!1,!1,"",!1,"","","",t,o,n)},Modal:function(i){f(),e.ajax({url:i,error:function(){h(),c()},success:function(e){d(e,null,!1,!0,!1,null,!1,null),h()}})},SystemModal:d,ErrorHandler:c,ShowSpinner:f,HideSpinner:h,ShowOverlay:g,$El:w,El:function(e){var i=w(e);return i.length?i[0]:null},ScrollTo:function(i,t){i.length&&(t=t||e("html, body")).animate({scrollTop:i.offset().top-Math.min(t.height(),window.innerHeight)/2},50)},PreventIEDefaultClick:a,InitDropdown:function(e,i){e.dropdown({inDuration:300,outDuration:225,constrain_width:!1,hover:!1,alignment:e.hasClass("dropdown-right")?"right":"left",gutter:0,belowOrigin:!i})}}}(jQuery);window.realalert=window.alert,window.alert=Insight.Alert;var qs=function(e){"use strict";var i={};!function(){for(var e,t=/\+/g,o=/([^&=]+)=?([^&]*)/g,n=function(e){return decodeURIComponent(e.replace(t," "))},a=window.location.search.substring(1);e=o.exec(a);)i[n(e[1])]=n(e[2])}();var t=function(e,t){i[e]=t,null==t&&delete i[e]},o=function(){var t=e.param(i);return t.length&&(t="?"+t),location.origin+location.pathname+t+location.hash},n=function(){var e=o();history.replaceState(a,document.title,e)},a=history.state||{},l={};return{observable:function(e,o,s){if(l[e]){var r=l[e];return"function"==typeof s&&r.subscribe(s),r}var d=[],c=function(){if(arguments.length>0){var i=arguments[0];return a[e]!=arguments[0]&&(a[e]=i,t(e,arguments[0]),n(),u(i,arguments[1])),this}return a[e]};c.subscribe=function(e){d.push(e)},"function"==typeof s&&c.subscribe(s);var u=function(e,i){for(var t=0;t<d.length;t++)"function"==typeof d[t]&&d[t](e,i)};return c.callSubscribers=u,a[e]=o,i[e]&&c(i[e],!0),l[e]=c,c},set:function(e,i){return"function"==typeof l[e]?l[e](i):(t(e,i),n()),i},get:function(e){return i[e]},go:function(e,i,n,a){t(e,i),arguments.length>2&&t(n,a),void 0!==window.event&&window.event.preventDefault(),window.location.href=o()}}}(jQuery);function ModalDialog(e){var i={title:"",url:"",elem:null,opener:window,autoShrink:!0,autoGrow:!1,alwaysPinToBottom:IsHubbPage()&&window.innerWidth<1050,mobilePinToBottom:!1,external:!1,closable:!0,maximisable:!0,maximise:!1,onClose:null,minWidth:null,queryStringParams:null,allowPopout:null,showUnsavedChangesWarningNonIframe:null,resizable:!0,appendTo:null},t=this;t.opts=$e.extend({},i,e),t.wndOpener=t.opts.opener;var o=t.opts.url&&""!==t.opts.url;try{if(o&&window!=window.top&&void 0!==window.top.ModalDialog)return e.opener=window,new window.top.ModalDialog(e)}catch(e){}t.opts.elem&&t.opts.elem.addClass("element_dialog");var n,a,l,s=function(e){var i={width:t.opts.width,height:t.opts.height},n=e.dialog("option","width"),a=e.dialog("option","height"),l={width:IsHubbPage()&&window.top.$e("#fraContent").length?Math.min(window.top.$e("#fraContent").width(),$e(window).width()):$e(window).width(),height:$e(window).height()*(t.opts.alwaysPinToBottom||t.opts.mobilePinToBottom?.9:1)},s={width:Math.min(i.width,l.width),height:Math.min(i.height,l.height)};if(n>l.width&&e.dialog("option","width",l.width),o&&navigator.userAgent.match(/(iPod|iPhone|iPad)/)&&$e("body",e.contents()).css("width",s.width-40),t.opts.autoShrink||t.opts.autoGrow){var r=0;if(o){var d=$e(".endis_dialog_outer",e.contents()),c=$e("body",e.contents());c.length&&c.height()&&(r=Math.max(c.outerHeight(!0),50),d.length>0||$e("nav#second_nav:visible",e.contents()).length?r+=155:r+=95)}else r=100+Math.max(e.contents().prop("scrollHeight"),50);r>0&&(r<s.height||t.opts.autoGrow&&r!==s.height)&&(s.height=Math.min(r,l.height)),s={width:s.width+50>l.width?l.width:s.width,height:s.height>l.height?l.height:s.height}}((t.opts.autoShrink||t.opts.autoGrow)&&s.height!=a||s.height>a||a>l.height)&&e.dialog("option","height",s.height),((t.opts.autoShrink||t.opts.autoGrow)&&s.width!=n||s.width>n||n>l.width)&&e.dialog("option","width",s.width),navigator.userAgent.match(/(iPod|iPhone|iPad)/)&&($e("html, body",$e(t.wndOpener.document)).addClass("dialog-ios"),o&&(e.closest(".ui-dialog").css("height",s.height),$e("html",e.contents()).css("overflow","auto"),$e("body",e.contents()).css({height:s.height-70,overflow:"auto","-webkit-overflow-scrolling":"touch"})));var u=s.width>=l.width||s.height>=l.height;e.closest(".ui-dialog").toggleClass("screen-constrained",u),e.closest(".ui-dialog").toggleClass("pinned-to-bottom",u||t.opts.alwaysPinToBottom),t.opts.alwaysPinToBottom||u&&t.opts.mobilePinToBottom?(e.dialog("option","draggable",!1),e.dialog("option","resizable",!1),e.dialog("option","height",s.height),e.dialog("option","position",{my:"center bottom",at:"center bottom",of:o?window:t.wndOpener}),$e("html, body",$e(t.wndOpener.document)).addClass("pinned-to-bottom")):(e.dialog("option","position",{my:"center center",at:"center center",of:o?window:t.wndOpener}),$e("html, body",$e(t.wndOpener.document)).removeClass("pinned-to-bottom"))},r=function(e){$e(e.target).hasClass("ui-resizable")||(clearTimeout(n),n=setTimeout(function(){t.IsOpen()&&("maximized"==t.dlg.dialogExtend("state")?(t.dlg.dialogExtend("restore"),t.dlg.dialogExtend("maximize")):t.ResetSize())},250))},d=function(e){if(e||(e=$e(document)),e.find("form.dirty").length)return!0;var i=!1;return e.find("iframe, frame").each(function(){try{if(i=d($e(this).contents()))return!1}catch(e){}}),i},c=function(e){e.closest(".ui-dialog").fadeTo(400,1);var i=u();void 0!==i&&i.HideSpinner()},u=function(){return t.wndOpener.$e("body").hasClass("app-framework")?$e("#fraContent")[0].contentWindow.Insight:void 0===window.top.Insight?t.wndOpener.Insight:window.top.Insight},m=$e(t.wndOpener).scrollTop();o?(l="ifrDialogWindow_"+Math.floor(1e4*Math.random()+1),a=$e('<iframe id="'+l+'" src="about:blank" class="dialog-iframe loading"></iframe>'),$e("html",$e(t.wndOpener.document)).addClass("has-open-dialog"),t.wndOpener.document.body.addEventListener("touchmove",f,{passive:!1})):(l=t.opts.elem.attr("id"),a=t.opts.elem,$e("html").addClass("has-open-dialog"),this.wndOpener.frameElement&&$e(this.wndOpener.frameElement).prop("scrolling","no").css("display","block"));var p,f=function(e){e.preventDefault()};p=t.opts.alwaysPinToBottom?{my:"center bottom",at:"center bottom",of:o?window:t.wndOpener}:{my:"center center",at:"center center",of:o?window:t.wndOpener},this.dlg=a.dialog({title:t.opts.title,autoOpen:!0,width:Math.min(t.opts.width,IsHubbPage()?Math.min(window.top.$e("#fraContent").width(),$e(window).width()):$e(window).width()),height:Math.min(t.opts.height,$e(window).height()*(t.opts.alwaysPinToBottom||t.opts.mobilePinToBottom?.9:1)),minWidth:t.opts.minWidth?t.opts.minWidth:200,modal:!0,resizable:t.opts.resizable,appendTo:t.opts.appendTo?t.opts.appendTo:o?"body":"form",position:p,open:function(e,i){if($e(this).closest(".ui-dialog").wrap('<div class="endis-jquery-ui endis-jquery-ui-dialog" />'),o){var n=t.opts.external?"":(-1==t.opts.url.indexOf("?")?"?":"&")+"dialog=true";$e(this).attr("src",t.opts.url+n)}else!$e(this).find(".endis_dialog_outer").length&&$e(this).contents().wrapAll('<div class="endis_dialog_outer"></div>
3'),$e(".ui-dialog-titlebar-maximize",$e(window.top.document)).html('<i class="mdi-navigation-fullscreen"></i>'),$e(".ui-dialog-titlebar-close",$e(window.top.document)).html('<i class="mdi-navigation-close"></i>'),$e(".ui-dialog-titlebar-restore",$e(window.top.document)).html('<i class="mdi-navigation-fullscreen-exit"></i>'),$e(".ui-icon-gripsmall-diagonal-se",$e(window.top.document)).removeClass("ui-icon-gripsmall-diagonal-se").addClass("ui-icon-grip-diagonal-se");var a=$e(".ui-widget-overlay",o?$e(window.document):$e(t.wndOpener.document)).not(".endis-jquery-ui > .ui-widget-overlay");a.wrap('<div class="endis-jquery-ui endis-jquery-ui-dialog" />');var l=GetMaxZIndex();if(a.last().css({"z-index":l+1}),$e(this).closest(".ui-dialog").css({"z-index":l+2}),$e(window).on("resize",r),t.opts.queryStringParams&&void 0!==t.opts.opener.qs)for(var s in t.opts.queryStringParams)t.opts.opener.qs.set(s,t.opts.queryStringParams[s]);if($e(this).closest(".ui-dialog").css("opacity",0),!t.opts.external){var d=u();void 0!==d&&d.ShowSpinner()}},beforeClose:function(e,i){if(!t.opts.external&&(o||t.opts.showUnsavedChangesWarningNonIframe)&&!t.blnReallyClose&&d(t.opts.showUnsavedChangesWarningNonIframe?null:t.dlg.contents())&&void 0!==Insight){var n=function(){setTimeout(function(){$e("#system_modal").css("min-width",""),$e("#system_modal").css("max-width","")},200)};return Insight.Confirm("You have made changes in this window which will be lost.","Unsaved changes",function(){t.blnReallyClose=!0,t.Close(),n()},n,"Abandon changes","Return to page"),$e("#system_modal").css("min-width","200px"),$e("#system_modal").css("max-width","550px"),!1}},close:function(e,i){if($e(".endis-jquery-ui").filter(function(){return""==$e(this).html()}).remove(),o?0==$e(".ui-dialog:visible",$e(t.wndOpener.document)).length&&($e("html",$e(t.wndOpener.document)).removeClass("has-open-dialog"),t.wndOpener.document.body.removeEventListener("touchmove",f,{passive:!1})):(0==$e(".ui-dialog:visible").length&&($e("html").removeClass("has-open-dialog"),$e("html, body",$e(t.wndOpener.document)).removeClass("pinned-to-bottom"),navigator.userAgent.match(/(iPod|iPhone|iPad)/)&&$e(t.wndOpener).scrollTop(m)),t.wndOpener.frameElement&&$e(t.wndOpener.frameElement).prop("scrolling","yes").css("display",""),$e(".endis-jquery-ui",$e(t.wndOpener.document)).filter(function(){return""==$e(this).html()}).remove()),$e(window).off("resize",r),t.opts.onClose&&t.opts.onClose(),t.opts.queryStringParams&&void 0!==t.opts.opener.qs)for(var n in t.opts.queryStringParams)t.opts.opener.qs.set(n);a.dialogExtend("destroy"),a.dialog("destroy")},resizeStop:function(e,i){$e(this).height($e(this).parent().height()-$e(this).prev(".ui-dialog-titlebar").height()-14),$e(this).width($e(this).prev(".ui-dialog-titlebar").width()+2)}}).dialogExtend({closable:t.opts.closable,maximizable:t.opts.maximisable,minimizable:!1,collapsable:!1,dblclick:!!t.opts.maximisable&&"maximize",titlebar:!1,icons:{close:"ui-icon-closethick",maximize:"ui-icon-arrowthick-2-ne-sw",restore:"ui-icon-newwin"},beforeMaximize:function(e,i){t.opts.external||($e("i.mdi-navigation-fullscreen-exit",a.contents()).show(),$e("i.mdi-navigation-fullscreen",a.contents()).hide())},beforeRestore:function(e,i){t.opts.external||($e("i.mdi-navigation-fullscreen-exit",a.contents()).hide(),$e("i.mdi-navigation-fullscreen",a.contents()).show())},maximize:function(e,i){a.trigger("dialogresize")},restore:function(e,i){a.trigger("dialogresize"),$e(".ui-icon-gripsmall-diagonal-se",$e(window.top.document)).removeClass("ui-icon-gripsmall-diagonal-se").addClass("ui-icon-grip-diagonal-se"),$e(".ui-icon-gripsmall-diagonal-se",$e(t.wndOpener.document)).removeClass("ui-icon-gripsmall-diagonal-se").addClass("ui-icon-grip-diagonal-se")},load:function(e,i){$e(".ui-dialog-titlebar-maximize",$e(window.top.document)).html('<i class="mdi-navigation-fullscreen"></i>'),$e(".ui-dialog-titlebar-close",$e(window.top.document)).html('<i class="mdi-navigation-close"></i>'),$e(".ui-dialog-titlebar-restore",$e(window.top.document)).html('<i class="mdi-navigation-fullscreen-exit"></i>'),$e(".ui-icon-gripsmall-diagonal-se",$e(window.top.document)).removeClass("ui-icon-gripsmall-diagonal-se").addClass("ui-icon-grip-diagonal-se"),$e(".ui-dialog-titlebar-maximize",$e
3(t.wndOpener.document)).html('<i class="mdi-navigation-fullscreen"></i>'),$e(".ui-dialog-titlebar-close",$e(t.wndOpener.document)).html('<i class="mdi-navigation-close"></i>'),$e(".ui-dialog-titlebar-restore",$e(t.wndOpener.document)).html('<i class="mdi-navigation-fullscreen-exit"></i>'),$e(".ui-icon-gripsmall-diagonal-se",$e(t.wndOpener.document)).removeClass("ui-icon-gripsmall-diagonal-se").addClass("ui-icon-grip-diagonal-se"),t.opts.allowPopout&&t.opts.url&&a.prev(".ui-dialog-titlebar").find(".ui-dialog-titlebar-buttonpane").append($("<a />",{href:"javascript:void(0);",on:{click:function(){window.open(t.opts.url,"_blank")}}}).html($("<i />",{class:"mdi-action-open-in-new"}))),t.opts.closable||a.prev(".ui-dialog-titlebar").addClass("no-close-button")}}),!o||t.opts.external?(t.opts.external||s(a),a.on("height-reset-complete",function(){c($(this))}),a.hasClass("dialog-loading")||c(a)):this.dlg.bind("load",function(){var e=$e(this);try{var i=e.get(0).contentWindow;i.dlg=t,$e("html",e.contents()).find("div.login-card").length>0&&("undefined"!=typeof InsightAreYouSure&&InsightAreYouSure.SuspendForPostback(),"function"==typeof __doPostBack?__doPostBack():location.href="/User/Login.aspx?time_out=true");var o=$e("body",e.contents());o.hasClass("endis_dialog")||o.addClass("endis_dialog"),void 0!==i.Insight&&i.Insight.IsPostback()||s(e),t.opts.maximise&&t.Maximize(),"function"==typeof i.$&&i.$("body").trigger("endisdialogready")}catch(e){"undefined"!=typeof console&&console.debug&&console.debug("ModalDialog iframe load handler swallowed an error (likely cross-origin):",e)}finally{c(e),$e(document).trigger("endisdialogready"),e.removeClass("loading")}}),this.Close=function(){t.dlg.dialog("close")},this.Maximize=function(){t.dlg.dialogExtend("maximize")},this.Restore=function(){t.dlg.dialogExtend("restore")},this.Reload=function(){t.dlg.attr("src",function(e,i){return i})},this.SetConfirmCloseFn=function(e){t.dlg.on("dialogbeforeclose",function(i,t){try{return"function"!=typeof e||e()}catch(e){}})},this.SetOnCloseFn=function(e){t.dlg.on("dialogclose",function(i,t){try{return"function"!=typeof e||e()}catch(e){}})},this.SetOnEndisDialogReady=function(e){$e(document).on("endisdialogready",e)},this.SetPosition=function(e,i){t.dlg.dialog("option","position",{my:"center center",at:e+" "+i,of:o?window:t.wndOpener})},this.IsOpen=function(){return t.dlg.hasClass("ui-dialog-content")},this.GetDialogUIObject=function(){return t.dlg},this.ResetSize=function(){s(t.dlg)},this.Height=function(){return $e("body",t.dlg.contents()).height()},this.SetTitle=function(e){t.dlg.dialog("option","title",e)},this.GetTitle=function(){return t.dlg.dialog("option","title")},this.AddClass=function(e){t.dlg.dialog("option","dialogClass",e)},this.SetSize=function(e,i){t.opts.width=e,t.opts.height=i,this.ResetSize()}}function EndisDialog(e,i,t,o,n,a,l,s,r){return new ModalDialog({url:e,elem:n,title:i,width:t,height:o,opener:a||window,autoShrink:!l,external:s,maximise:r})}$e.widget("ui.dialog",$e.extend({},$e.ui.dialog.prototype,{_title:function(e){this.options.title?e.html(this.options.title):e.html("&#160;")}}));
4//# sourceMappingURL=system.min.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.