var _____WB$wombat$assign$function_____=function(name){return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name))||self[name];};if(!self.__WB_pmw){self.__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 opens = _____WB$wombat$assign$function_____("opens");
!function(){function e(){function e(){c(),u.clickHandler.start()}function i(){u.clickHandler.stop()}function a(e){var n=e.replace(".churchcenteronline.com",".churchcenter.com");u.adapter=l(),u.adapter.open(n)}function r(){u.adapter&&u.adapter.close(),u.adapter=null}function l(){var e=navigator.userAgent.match(/Tablet|iPad|Mobile|Windows Phone|Lumia|Android|webOS|iPhone|iPod|Blackberry|PlayBook|BB10|Opera Mini|\bCrMo\/|Opera Mobi/i),n="https:"===window.location.protocol||"localhost"===window.location.host.slice(0,9)||window.location.host.match(/\.test$/);return n&&!e?s:(e?console.warn("ChurchCenterModal: for a better user experience we are directing this user to a new tab on a phone."):n?console.warn("ChurchCenterModal: URL not supported by modals. Falling back to a new tab."):console.warn("ChurchCenterModal: must be called from an HTTPS page. Falling back to a new tab."),d)}function c(){var e="https://js.churchcenter.com/modal/v1";document.querySelector("script[src^='"+e+"']")||console.warn("It looks like ChurchCenterModal is not being loaded from "+e+". Planning Center only supports loading ChurchCenterModal from "+e+".")}var d=new t,s=new n,u={adapter:null,clickHandler:null};u.clickHandler=new o(a),this.open=a,this.close=r,this.start=e,this.stop=i}function n(){function e(e){var n=new URL(e).origin;o(),window.addEventListener("message",u,!1),document.addEventListener("keyup",d),p.elements.iframe.src=e,a({origin:n,opening:"yes"})}function n(){document.removeEventListener("keyup",d),window.removeEventListener("message",u),p.elements.iframe.src="about:blank",a({origin:null,opening:"no"})}function t(){if(p.elements.iframe)throw"ChurchCenterModal: `createDOMElements` should only be called once!";p.elements.iframe=document.createElement("iframe"),p.elements.iframe.style.cssText="z-index: 2147483647; display: none; opacity: 0; background-color: rgba(0, 0, 0, 0.00392157); border: 0px none transparent; overflow-x: hidden; overflow-y: auto; visibility: visible; margin: 0px; padding: 0px; position: fixed; left: 0px; top: 0px; width: 100%; height: 100%; background-position: initial initial; background-repeat: initial initial;",p.elements.iframe.id=m,p.elements.background=document.createElement("div"),p.elements.background.style.cssText="z-index: 2147483646; display: none; opacity: 0; background-color: rgba(0, 0, 0, 0.6); border: 0px none transparent; overflow-x: hidden; overflow-y: auto; visibility: visible; margin: 0px; padding: 0px; position: fixed; left: 0px; top: 0px; width: 100%; height: 100%; background-position: initial initial; background-repeat: initial initial;",p.elements.loadingImage=document.createElement("img"),p.elements.loadingImage.style.cssText="position: absolute; left: -50px; margin: 140px 50% 0; width: 100px;",p.elements.background.appendChild(p.elements.loadingImage),document.addEventListener("DOMContentLoaded",o)}function o(){document.querySelector(m)||(document.body.appendChild(p.elements.background),document.body.appendChild(p.elements.iframe))}function i(e,n){var t={};for(var o in e)t[o]=e[o];for(var i in n)t[i]=n[i];return t}function a(e){p=i(p,e),r()}function r(){var e=p.opening,n=p.elements.iframe,t=p.elements.background,o=p.origin;p.elements.loadingImage.src=o+"../static/embed-loading.svg","no"===e?(l(n),l(t)):"yes"===e?(l(n),c(t)):"complete"===e&&(c(n),c(t))}function l(e){e.style.display="none",e.style.opacity=0}function c(e){e.style.display="block",e.style.opacity=1}function d(e){27===e.keyCode&&n()}function s(e){p.elements.iframe.contentWindow.postMessage({type:e},"*")}function u(e){e.origin===p.origin&&("ready"===e.data.type&&s("verified"),"show"===e.data.type&&a({opening:"complete"}),"close"===e.data.type&&n())}var p={elements:{iframe:null,background:null,loadingImage:null},origin:null,opening:"no"},m="ChurchCenterModalIframeExistsInDOM";t(),this.open=e,this.close=n}function t(){function e(e){t.window=window.open(e,"_blank")}function n(){t.window&&t.window.close()}var t={window:null};this.open=e,this.close=n}function o(e){function n(){window.addEventListener("click",o)}function t(){window.removeEventListener("click",o)}function o(n){var t=i(n.target,"a[href][data-open-in-church-center-modal='true'], a[href*='open-in-church-center-modal=true']");t&&(n.preventDefault(),e(t.href))}function i(e,n){for(;!a(e,n)&&(e=e.parentElement););return e}function a(e,n){for(var t=(e.document||e.ownerDocument).querySelectorAll(n),o=t.length;--o>=0&&t.item(o)!==e;);return o>-1}({open:null}).open=e,this.start=n,this.stop=t}window.ChurchCenterModal=new e,window.ChurchCenterModal.start()}();
}