@blackbaud/auth-client
Advanced tools
Comparing version 2.17.2 to 2.18.0
@@ -1,1 +0,1 @@ | ||
window.BBAuthClient=function(e){var t={};function n(o){if(t[o])return t[o].exports;var s=t[o]={i:o,l:!1,exports:{}};return e[o].call(s.exports,s,s.exports,n),s.l=!0,s.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)n.d(o,s,function(t){return e[t]}.bind(null,s));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=6)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(1),s="https://signin.blackbaud.com/signin/",i="https://host.nxt.blackbaud.com/errors/",r=encodeURIComponent;function a(e){let t=`${s}?redirectUrl=${r(location.href)}`;return e&&(t+="&inactivity=1"),t}t.BBAuthNavigator=class{static navigate(e,t){t?location.replace(e):location.href=e}static redirectToSignin(e){let t=a();e&&(t+="&"+function(e){const t=[];for(const n in e)e.hasOwnProperty(n)&&t.push(`${r(n)}=${r(e[n])}`);return t.join("&")}(e)),this.navigate(t)}static redirectToSignoutForInactivity(){const e=a(!0),t=`${s}sign-out?redirectUrl=${r(e)}`;this.navigate(t)}static redirectToError(e){let t,n;switch(e){case o.BBAuthTokenErrorCode.InvalidEnvironment:n="invalid_env",t="security";break;default:t="broken"}let s=`${i}${t}?source=auth-client&url=${r(location.href)}`;n&&(s+=`&code=${r(n)}`),this.navigate(s)}}},function(e,t,n){"use strict";function o(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),o(n(7)),o(n(5))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o="https://s21aidntoken00blkbapp01.nxt.blackbaud.com/session/csrf",s=n(1),i=n(0);function r(e,t,n,o){return(o||void 0===o&&n)&&((e=e||{})[t]=n),e}function a(e,t,n,o,i){let a;return a=r(a,"environment_id",n),a=r(a,"legal_entity_id",i),a=r(a,"permission_scope",o,!(!n&&!i||!o)),new Promise((n,o)=>{!function(e,t,n,o,i){const r=new XMLHttpRequest;r.onreadystatechange=()=>{if(4===r.readyState)switch(r.status){case 0:i({code:s.BBAuthTokenErrorCode.Offline,message:"The user is offline."});break;case 200:o(r.responseText);break;case 401:i({code:s.BBAuthTokenErrorCode.NotLoggedIn,message:"The user is not logged in."});break;case 403:i({code:s.BBAuthTokenErrorCode.InvalidEnvironment,message:"The user is not a member of the specified environment."});break;default:r.status>=400&&i({code:s.BBAuthTokenErrorCode.Unspecified,message:"An unknown error occurred."})}},r.open("POST",e,!0),r.setRequestHeader(t.name,t.value),r.setRequestHeader("Accept","application/json"),r.setRequestHeader("Content-Type","application/json"),r.withCredentials=!0,n?r.send(JSON.stringify(n)):r.send()}(e,{name:"X-CSRF",value:t},a,e=>{const t=e?JSON.parse(e):void 0;n(t)},o)})}t.BBCsrfXhr=class{static request(e,t,n,r,c,d,u){return!c||r||d?new Promise((l,m)=>{new Promise((e,t)=>{u?e({csrf_token:"token_needed"}):a(o,"token_needed").then(e).catch(t)}).then(t=>a(e,t.csrf_token,r,c,d)).then(l).catch(e=>{if(n||e.code===s.BBAuthTokenErrorCode.Offline)m(e);else switch(e.code){case s.BBAuthTokenErrorCode.NotLoggedIn:i.BBAuthNavigator.redirectToSignin(t);break;default:i.BBAuthNavigator.redirectToError(e.code)}})}):Promise.reject({code:s.BBAuthTokenErrorCode.PermissionScopeNoEnvironment,message:"You must also specify an environment or legal entity when specifying a permission scope."})}static requestWithToken(e,t){return new Promise((n,o)=>{const s=new XMLHttpRequest;s.onreadystatechange=()=>{if(4===s.readyState)switch(s.status){case 200:n(JSON.parse(s.responseText));break;default:o()}},s.open("GET",e,!0),s.setRequestHeader("Authorization","Bearer "+t),s.setRequestHeader("Accept","application/json"),s.send()})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.BBAuthDomUtility=class{static addCss(e){const t=document.createElement("style");return t.appendChild(document.createTextNode(e)),document.head.appendChild(t),t}static addIframe(e,t,n){const o=document.createElement("iframe");return o.className=t,o.title=n,o.src=e,this.addElToBodyTop(o),o}static removeCss(e){this.removeEl(e,document.head)}static removeEl(e,t=document.body){t.contains(e)&&t.removeChild(e)}static addElToBodyTop(e){const t=document.body;t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o="https://host.nxt.blackbaud.com";t.BBAuthInterop=class{static postOmnibarMessage(e,t,n){t.source="auth-client",e.contentWindow.postMessage(t,n||o)}static messageIsFromOmnibar(e){if(e.origin===o){const t=e.data;return!!t&&"skyux-spa-omnibar"===t.source}return!1}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Unspecified=0]="Unspecified",e[e.NotLoggedIn=1]="NotLoggedIn",e[e.InvalidEnvironment=2]="InvalidEnvironment",e[e.PermissionScopeNoEnvironment=3]="PermissionScopeNoEnvironment",e[e.Offline=4]="Offline"}(t.BBAuthTokenErrorCode||(t.BBAuthTokenErrorCode={}))},function(e,t,n){"use strict";function o(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),o(n(1)),o(n(10)),o(n(12))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(8),s=/1bb:\/\/([a-z]{3})-([a-z0-9]{5})(-[a-z]{4}[0-9]{2})?\/(.*)/;class i{static getUrl(e,t){const n=s.exec(e);let o=e,i=t?t.zone:void 0;return i&&(i=i.replace("-","")),n&&(n[3]&&(i=n[3].substring(1)),o=`https://${n[1]}-${i}.app.blackbaud.net/${n[2]}/${n[4]}`),Promise.resolve(o)}static getToken(e){return i.getTokenInternal(e)}static clearTokenCache(){i.tokenCache={}}static getTokenInternal(e){e=e||{};const{forceNewToken:t,disableRedirect:n}=e;if(i.mock)return Promise.resolve("mock_access_token_auth-client@blackbaud.com");const s=function(e){const{envId:t,permissionScope:n,leId:o}=e;return"token|"+(o||"-")+"|"+(t||"-")+"|"+(n||"-")}(e),r=i.tokenCache[s]=i.tokenCache[s]||{},a=(new Date).valueOf();return!t&&r.lastToken&&r.expirationTime&&r.expirationTime-a>6e4?Promise.resolve(r.lastToken):(r.pendingLookupPromise||(r.pendingLookupPromise=o.BBAuthTokenIntegration.getToken(n,e.envId,e.permissionScope,e.leId).then(e=>(r.expirationTime=(new Date).valueOf()+1e3*e.expires_in,r.lastToken=e.access_token,r.pendingLookupPromise=null,r.lastToken)).catch(e=>{throw r.pendingLookupPromise=null,e})),r.pendingLookupPromise)}}i.mock=!1,i.tokenCache={},t.BBAuth=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(2),s=n(9);t.BBAuthTokenIntegration=class{static getToken(e,t,n,i){return this.hostNameEndsWith("blackbaud.com")?o.BBCsrfXhr.request("https://s21aidntoken00blkbapp01.nxt.blackbaud.com/oauth2/token",void 0,e,t,n,i,!0):s.BBAuthCrossDomainIframe.getToken({disableRedirect:e,envId:t,leId:i,permissionScope:n})}static hostNameEndsWith(e){return this.getLocationHostname().substr(-e.length)===e}static getLocationHostname(){return window.location.hostname}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(3),s=n(0),i=n(5),r="https://s21aidntoken00blkbapp01.nxt.blackbaud.com/Iframes/CrossDomainAuthFrame.html",a="security-token-svc",c="auth-client";class d{static reset(){this.requestCounter=0,this.tokenRequests={},this.iframeReadyPromise=new Promise(e=>this.iframeReadyResolve=e),this.listenerSetup=!1}static TARGET_ORIGIN(){return this.TARGETORIGIN}static getOrMakeIframe(){return d.iframeEl=document.getElementById("auth-cross-domain-iframe"),d.iframeEl||(d.iframeEl=o.BBAuthDomUtility.addIframe(r,"auth-cross-domain-iframe",""),d.iframeEl.id="auth-cross-domain-iframe",d.iframeEl.hidden=!0),d.iframeEl}static getToken(e){return this.setupListenersForIframe(),this.getTokenFromIframe(this.getOrMakeIframe(),e)}static setupListenersForIframe(){this.listenerSetup||(window.addEventListener("message",e=>{const t=e.data,n=t.requestId,o=this.tokenRequests[n];if(t.source===a||t.origin===this.TARGET_ORIGIN())switch(t.messageType){case"ready":this.iframeReadyResolve(!0);break;case"error":this.handleErrorMessage(t.value,o.reject,o.args.disableRedirect);break;case"getToken":const e={access_token:t.value,expires_in:0};o.resolve(e)}}),this.listenerSetup=!0)}static getTokenFromIframe(e,t){return new Promise((n,o)=>{const s=this.requestCounter++;d.tokenRequests[s]={args:t,reject:o,resolve:n},d.iframeReadyPromise.then(()=>{e.contentWindow.postMessage({messageType:"getToken",requestId:s,source:c,value:t},d.TARGET_ORIGIN())})})}static handleErrorMessage(e,t,n){if(n)t(e);else switch(e.code){case i.BBAuthTokenErrorCode.Offline:t(e);break;case i.BBAuthTokenErrorCode.NotLoggedIn:s.BBAuthNavigator.redirectToSignin(void 0);break;default:s.BBAuthNavigator.redirectToError(e.code)}}}d.listenerSetup=!1,d.iframeReadyPromise=new Promise(e=>d.iframeReadyResolve=e),d.tokenRequests={},d.requestCounter=0,d.TARGETORIGIN="https://s21aidntoken00blkbapp01.nxt.blackbaud.com",t.BBAuthCrossDomainIframe=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(11))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(1),s=n(4),i=n(2),r=n(3),a=n(0);function c(e,t,n,i){let a,c;function d(){r.BBAuthDomUtility.removeEl(c),r.BBAuthDomUtility.removeCss(a),c=a=void 0,window.removeEventListener("message",l)}function l(r){if(!s.BBAuthInterop.messageIsFromOmnibar(r))return;const a=r.data;switch(a.messageType){case"ready":s.BBAuthInterop.postOmnibarMessage(c,{messageType:"host-ready"}),s.BBAuthInterop.postOmnibarMessage(c,{contextDestinations:t,messageType:"context-provide"});break;case"get-token":u=a.tokenRequestId,l=a.disableRedirect,o.BBAuth.getToken({disableRedirect:l}).then(e=>{s.BBAuthInterop.postOmnibarMessage(c,{messageType:"token",token:e,tokenRequestId:u})},e=>{s.BBAuthInterop.postOmnibarMessage(c,{messageType:"token-fail",reason:e,tokenRequestId:u})});break;case"welcome-cancel":d(),i({reason:"canceled"});break;case"welcome-environment-selected":d(),setTimeout(()=>{e.envId=a.envId,n(e)},10)}var u,l}a=r.BBAuthDomUtility.addCss("\n.sky-omnibar-welcome-iframe {\n background-color: #fff;\n border: none;\n position: fixed;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n z-index: 10000;\n}\n"),function(){const t=u.url+"?hosted=1&svcid="+encodeURIComponent(e.svcId)+"&url="+encodeURIComponent(e.url);c=r.BBAuthDomUtility.addIframe(t,"sky-omnibar-welcome-iframe","Welcome")}(),window.addEventListener("message",l)}function d(){a.BBAuthNavigator.redirectToError(o.BBAuthTokenErrorCode.InvalidEnvironment)}class u{static ensureContext(e){const{envId:t,envIdRequired:n,leId:s,leIdRequired:r,svcId:a}=e;return!t&&n||!s&&r?new Promise((t,n)=>{a?o.BBAuth.getToken().then(o=>{let s="https://s21anavnavaf00blkbapp01.sky.blackbaud.com/user/destinations?svcid="+encodeURIComponent(a);e.url&&(s+="&referringurl="+encodeURIComponent(e.url)),i.BBCsrfXhr.requestWithToken(s,o).then(o=>{const s=o&&o.items,i=s&&s.length;1===i?(e.url=s[0].url,t(e)):i>1?c(e,o,t,n):d()})}):d()}):Promise.resolve(e)}}u.url="https://host.nxt.blackbaud.com/omnibar/welcome",t.BBContextProvider=u},function(e,t,n){"use strict";function o(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),o(n(13)),o(n(19)),o(n(21))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(1),s=n(4),i=n(14),r=n(18),a=n(0),c=n(3),d="sky-omnibar-iframe-expanded",u="sky-omnibar-loading";let l,m,p,h,f,b,v;function y(){h=c.BBAuthDomUtility.addIframe(f.url||"https://host.nxt.blackbaud.com/omnibar/",`sky-omnibar-iframe ${u}`,"Navigation")}function g(){s.BBAuthInterop.postOmnibarMessage(h,{href:document.location.href,messageType:"location-change"})}function B(){function e(e){s.BBAuthInterop.postOmnibarMessage(h,{messageType:"refresh-user",token:e})}o.BBAuth.clearTokenCache(),o.BBAuth.getToken({disableRedirect:!0,forceNewToken:!0}).then(e).catch(()=>e(void 0))}function k(){r.BBOmnibarUserActivityPrompt.show({sessionRenewCallback:()=>{i.BBOmnibarUserActivity.userRenewedSession()}})}function I(){r.BBOmnibarUserActivityPrompt.hide()}function T(){i.BBOmnibarUserActivity.startTracking(B,k,I,f.allowAnonymous,b)}function A(e){if(!s.BBAuthInterop.messageIsFromOmnibar(e))return;const t=e.data,n=f.nav;switch(t.messageType){case"ready":s.BBAuthInterop.postOmnibarMessage(h,{messageType:"host-ready"}),function(){const e=history.pushState,t=history.replaceState;history.pushState=function(){const t=e.apply(history,arguments);return g(),t},history.replaceState=function(){const e=t.apply(history,arguments);return g(),e}}(),s.BBAuthInterop.postOmnibarMessage(h,{compactNavOnly:f.compactNavOnly,enableHelp:f.enableHelp,envId:f.envId,hideResourceLinks:f.hideResourceLinks,leId:f.leId,localNavItems:n&&n.localNavItems,localNotifications:!!f.notifications,localSearch:!!f.onSearch,messageType:"nav-ready",navVersion:f.navVersion,services:n&&n.services,svcId:f.svcId,theme:f.theme}),function(){const e=f.notifications;e&&e.onReady({updateNotifications:e=>{s.BBAuthInterop.postOmnibarMessage(h,{messageType:"notifications-update",notifications:e})}})}(),g(),v();break;case"display-ready":m.classList.remove(u),h.classList.remove(u);break;case"expand":h.classList.add(d);break;case"collapse":h.classList.remove(d);break;case"navigate-url":a.BBAuthNavigator.navigate(t.url);break;case"navigate":const e=t.navItem;n&&n.beforeNavCallback&&!1===n.beforeNavCallback(e)||a.BBAuthNavigator.navigate(e.url);break;case"search":p=t.searchArgs,f.onSearch&&f.onSearch(p).then(e=>{s.BBAuthInterop.postOmnibarMessage(h,{messageType:"search-results",results:e})});break;case"get-token":r=t.tokenRequestId,c=t.disableRedirect,o.BBAuth.getToken({disableRedirect:c}).then(e=>{T(),s.BBAuthInterop.postOmnibarMessage(h,{messageType:"token",token:e,tokenRequestId:r})},e=>{T(),s.BBAuthInterop.postOmnibarMessage(h,{messageType:"token-fail",reason:e,tokenRequestId:r})});break;case"help-open":!function(){const e=window.BBHELP;e&&e.HelpWidget.open()}();break;case"notification-read":!function(e){const t=f.notifications;t&&t.onNotificationRead&&t.onNotificationRead(e)}(t.notification);break;case"session-renew":i.BBOmnibarUserActivity.userRenewedSession();break;case"environment-update":!function(e){const t="sky-omnibar-environment-visible",n=document.body.classList;e=e||"",l.innerText=e,e?n.add(t):n.remove(t)}(t.name);break;case"legacy-keep-alive-url-change":b=t.url,T()}var r,c,p}t.BBOmnibar=class{static load(e){return f=f=e,b=f.legacyKeepAliveUrl,new Promise(e=>{v=e,function(){let e="background: linear-gradient(to right, #71bf44 0, #31b986 50%, #00b2ec 100%);",t="#4d5259";const n=f.theme;if(n){const o=n.accent;t=n.backgroundColor||t,!1===o?e="display: none;":o&&o.color&&(e=`background-color: ${o.color};`)}p=c.BBAuthDomUtility.addCss(`\nbody {\n margin-top: 50px;\n}\n\n#bb-help-container {\n padding-top: 1px;\n}\n\n.sky-omnibar-iframe,\n.sky-omnibar-placeholder {\n border: none;\n height: 50px;\n width: 100%;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n z-index: 1000;\n}\n\n.sky-omnibar-placeholder {\n background-color: ${t};\n display: none;\n}\n\n.sky-omnibar-placeholder-accent {\n height: 5px;\n ${e}\n}\n\n.sky-omnibar-placeholder.sky-omnibar-loading {\n display: block;\n}\n\n.sky-omnibar-iframe.sky-omnibar-loading {\n visibility: hidden;\n}\n\n.sky-omnibar-iframe-expanded {\n height: 100%;\n}\n\n.sky-omnibar-environment {\n background-color: #e1e1e3;\n color: #282b31;\n font-family: "Blackbaud Sans", "Open Sans", "Helvetica Neue", Arial, sans-serif;\n font-size: 12px;\n font-weight: 400;\n height: 0;\n line-height: 24px;\n overflow: hidden;\n padding: 0 15px;\n text-align: right;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.sky-omnibar-environment-visible .sky-omnibar-environment {\n height: 24px;\n}\n`)}(),(m=document.createElement("div")).className=`sky-omnibar-placeholder ${u}`,m.innerHTML='<div class="sky-omnibar-placeholder-accent"></div>',document.body.appendChild(m),(l=document.createElement("div")).className="sky-omnibar-environment",c.BBAuthDomUtility.addElToBodyTop(l),y(),window.addEventListener("message",A)})}static update(e){s.BBAuthInterop.postOmnibarMessage(h,{messageType:"update",updateArgs:e})}static destroy(){c.BBAuthDomUtility.removeCss(p),c.BBAuthDomUtility.removeEl(m),c.BBAuthDomUtility.removeEl(h),c.BBAuthDomUtility.removeEl(l),window.removeEventListener("message",A),f=p=m=h=l=v=void 0}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(15),s=n(16),i=n(17),r=n(2),a=n(0);let c,d,u,l,m,p,h,f,b,v,y,g,B,k,I="";function T(){f=Date.now()}function A(e){e.clientX===d&&e.clientY===u||(d=e.clientX,u=e.clientY,T())}function E(){const e=Date.now();(!b||e-b>R.MIN_RENEWAL_RETRY)&&(b=e,r.BBCsrfXhr.request("https://s21aidntoken00blkbapp01.nxt.blackbaud.com/session/renew",{inactivity:1}).catch(()=>void 0))}function O(){h=!0,p()}function w(){h=!1,T(),l()}function _(){k?a.BBAuthNavigator.navigate(k):a.BBAuthNavigator.redirectToSignoutForInactivity()}class R{static startTracking(e,t,n,r,a){c&&r===y&&a===g||(R.stopTracking(),m=e,p=t,l=n,y=r,g=a,document.addEventListener("keypress",T),document.addEventListener("mousemove",A),y||E(),v=setInterval(()=>{s.BBOmnibarUserSessionExpiration.getSessionExpiration(I,B,y).then(e=>{o.BBOmnibarUserActivityProcessor.process({allowAnonymous:y,closeInactivityPrompt:w,expirationDate:e,inactivityPromptDuration:R.INACTIVITY_PROMPT_DURATION,isShowingInactivityPrompt:h,lastActivity:f,maxSessionAge:R.MAX_SESSION_AGE,minRenewalAge:R.MIN_RENEWAL_AGE,redirectForInactivity:_,renewSession:E,showInactivityPrompt:O})})},R.ACTIVITY_TIMER_INTERVAL),i.BBOmnibarUserSessionWatcher.start(r,a,m,e=>{B=e.legacyTtl,I=e.refreshId,k=e.legacySigninUrl}),c=!0)}static userRenewedSession(){w(),E()}static stopTracking(){i.BBOmnibarUserSessionWatcher.stop(),s.BBOmnibarUserSessionExpiration.reset(),document.removeEventListener("keypress",T),document.removeEventListener("mousemove",A),v&&(clearInterval(v),v=void 0),c=d=u=f=b=h=m=p=l=y=g=void 0}}R.ACTIVITY_TIMER_INTERVAL=1e3,R.MIN_RENEWAL_RETRY=6e4,R.INACTIVITY_PROMPT_DURATION=12e4,R.MIN_RENEWAL_AGE=3e5,R.MAX_SESSION_AGE=54e5,R.IDENTITY_SECURITY_TOKEN_SERVICE_ORIGIN="https://s21aidntoken00blkbapp01.nxt.blackbaud.com",t.BBOmnibarUserActivity=R},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.BBOmnibarUserActivityProcessor=class{static process(e){const{allowAnonymous:t,closeInactivityPrompt:n,expirationDate:o,inactivityPromptDuration:s,isShowingInactivityPrompt:i,lastActivity:r,maxSessionAge:a,minRenewalAge:c,redirectForInactivity:d,renewSession:u,showInactivityPrompt:l}=e,m=Date.now();if(null===o)return;!t&&m>o&&d();const p=o-s,h=o-a+c;i?m<p&&n():r>h?u():!t&&m>p&&l()}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(2);let s;t.BBOmnibarUserSessionExpiration=class{static getSessionExpiration(e,t,n){const i=function(e,t){if(s&&s.refreshId===e&&s.allowAnonymous===t)return s.promise;const n=new Promise((e,n)=>{o.BBCsrfXhr.request("https://s21aidntoken00blkbapp01.nxt.blackbaud.com/session/ttl",void 0,t).then(t=>{const n=null===t?null:Date.now()+1e3*t;e(n)},()=>{e(null)})});return s={allowAnonymous:t,promise:n,refreshId:e},n}(e,n);return new Promise((e,n)=>{i.then(n=>{let o;if(null===n)o=null;else if("number"==typeof t){const e=Date.now()+t;o=Math.min(n,e)}else o=n;e(o)})})}static reset(){s=void 0}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(4),s=n(0);let i,r,a,c,d,u,l,m,p={};function h(e){if(e){const t=e.split("://");return`${t[0]}://${t[1].split("/")[0]}`}}function f(e,t){const n=document.createElement("iframe");return n.className=e,n.width="0",n.height="0",n.frameBorder="0",n.src=t,n.tabIndex=-1,n.setAttribute("aria-hidden","true"),document.body.appendChild(n),n}function b(e){if("string"==typeof e.data){let t;try{t=JSON.parse(e.data)}catch(e){return}if("session_change"===t.messageType){const e=t.message,n=e&&e.sessionId,i=e&&e.refreshId;n||d||(m?s.BBAuthNavigator.navigate(m):s.BBAuthNavigator.redirectToSignin()),void 0!==p.refreshId&&i!==p.refreshId&&function(e){l&&o.BBAuthInterop.postOmnibarMessage(l,e,h(r))}({messageType:"session-refresh"}),void 0!==p.sessionId&&n!==p.sessionId&&a(),p.refreshId=i,p.sessionId=n,c(p)}}}function v(e){switch(e.origin){case y.IDENTITY_SECURITY_TOKEN_SERVICE_ORIGIN:b(e);break;case h(r):!function(e){const t=e.data;switch(t.messageType){case"ready":p.legacyTtl=t.ttl,m=t.signinUrl,c(p)}}(e)}}class y{static start(e,t,n,o){i&&e===d&&t===r||(y.stop(),d=e,a=n,r=t,c=o,function(){const e=y.IDENTITY_SECURITY_TOKEN_SERVICE_ORIGIN+"/SessionWatcher.html?origin="+encodeURIComponent(location.origin);u=f("sky-omnibar-iframe-session-watcher",e)}(),r&&(l=f("sky-omnibar-iframe-legacy-keep-alive",r)),window.addEventListener("message",v,!1),i=!0)}static stop(){window.removeEventListener("message",v,!1),u&&(document.body.removeChild(u),u=void 0),l&&(document.body.removeChild(l),l=void 0),p={},i=d=a=r=m=c=void 0}}y.IDENTITY_SECURITY_TOKEN_SERVICE_ORIGIN="https://s21aidntoken00blkbapp01.nxt.blackbaud.com",t.BBOmnibarUserSessionWatcher=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(3),s=n(4);let i,r,a;function c(e){if(!s.BBAuthInterop.messageIsFromOmnibar(e))return;switch(e.data.messageType){case"ready":s.BBAuthInterop.postOmnibarMessage(r,{messageType:"host-ready"}),r.classList.add("sky-omnibar-inactivity-iframe-ready");break;case"session-renew":a()}}class d{static show(e){this.hide(),a=e.sessionRenewCallback,i=o.BBAuthDomUtility.addCss("\n .sky-omnibar-inactivity-iframe {\n background-color: transparent;\n border: none;\n position: fixed;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n z-index: 100000;\n visibility: hidden;\n }\n\n .sky-omnibar-inactivity-iframe-ready {\n visibility: visible;\n }\n "),function(){const e=d.url;r=o.BBAuthDomUtility.addIframe(e,"sky-omnibar-inactivity-iframe","Inactivity Prompt")}(),window.addEventListener("message",c)}static hide(){r&&(o.BBAuthDomUtility.removeEl(r),o.BBAuthDomUtility.removeCss(i),r=i=a=void 0,window.removeEventListener("message",c))}}d.url="https://host.nxt.blackbaud.com/omnibar/inactivity",t.BBOmnibarUserActivityPrompt=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(20);function s(){return window.jQuery}t.BBOmnibarLegacy=class{static load(e){return new Promise(t=>{const n=s(),i=n&&n.fn&&n.fn.jquery;o.BBOmnibarScriptLoader.smartRegisterScript("https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.0/jquery.js","2.1.0",i).then(()=>o.BBOmnibarScriptLoader.registerScript("https://cdnjs.cloudflare.com/ajax/libs/easyXDM/2.4.17.1/easyXDM.min.js")).then(()=>o.BBOmnibarScriptLoader.registerScript("https://signin.blackbaud.com/Omnibar.min.js")).then(()=>{document.body.classList.add("bb-omnibar-height-padding");const n=document.createElement("div");n.setAttribute("data-omnibar-el",""),document.body.appendChild(n),(e=e||{})["z-index"]=1e3,e.afterLoad=t,e.menuEl&&(e.menuEl=s()(e.menuEl)),BBAUTH.Omnibar.load(n,e)})})}}},function(e,t,n){"use strict";function o(e){const t=e.split("."),n=[];for(const e of t){const t=parseInt(e,10)||0;n.push(t)}return n}Object.defineProperty(t,"__esModule",{value:!0});class s{static registerScript(e){return new Promise((t,n)=>{const o=document.createElement("script");o.onload=t,o.onerror=n,o.src=e,document.body.appendChild(o)})}static smartRegisterScript(e,t,n){return n&&function(e,t){const n=o(e),s=o(t);for(let e=0;e<n.length;e++)if(e<s.length){if(s[e]>n[e])return!0;if(s[e]<n[e])return!1}return!0}(t,n)?Promise.resolve():s.registerScript(e)}}t.BBOmnibarScriptLoader=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})}]); | ||
window.BBAuthClient=function(e){var t={};function n(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(o,i,function(t){return e[t]}.bind(null,i));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=7)}([function(e,t,n){"use strict";function o(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),o(n(8)),o(n(5))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(0),i="https://signin.blackbaud.com/signin/",s="https://host.nxt.blackbaud.com/errors/",r=encodeURIComponent;function a(e){let t=`${i}?redirectUrl=${r(location.href)}`;return e&&(t+="&inactivity=1"),t}t.BBAuthNavigator=class{static navigate(e,t){t?location.replace(e):location.href=e}static redirectToSignin(e){let t=a();e&&(t+="&"+function(e){const t=[];for(const n in e)e.hasOwnProperty(n)&&t.push(`${r(n)}=${r(e[n])}`);return t.join("&")}(e)),this.navigate(t)}static redirectToSignoutForInactivity(){const e=a(!0),t=`${i}sign-out?redirectUrl=${r(e)}`;this.navigate(t)}static redirectToError(e){let t,n;switch(e){case o.BBAuthTokenErrorCode.InvalidEnvironment:n="invalid_env",t="security";break;default:t="broken"}let i=`${s}${t}?source=auth-client&url=${r(location.href)}`;n&&(i+=`&code=${r(n)}`),this.navigate(i)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.BBAuthDomUtility=class{static addCss(e){const t=document.createElement("style");return t.appendChild(document.createTextNode(e)),document.head.appendChild(t),t}static addIframe(e,t,n){const o=document.createElement("iframe");return o.className=t,o.title=n,o.src=e,this.addElToBodyTop(o),o}static removeCss(e){this.removeEl(e,document.head)}static removeEl(e,t=document.body){t.contains(e)&&t.removeChild(e)}static addElToBodyTop(e){const t=document.body;t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o="https://host.nxt.blackbaud.com";t.BBAuthInterop=class{static postOmnibarMessage(e,t,n){t.source="auth-client",e.contentWindow.postMessage(t,n||o)}static messageIsFromOmnibar(e){if(e.origin===o){const t=e.data;return!!t&&"skyux-spa-omnibar"===t.source}return!1}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o="https://s21aidntoken00blkbapp01.nxt.blackbaud.com/session/csrf",i=n(0),s=n(1);function r(e,t,n,o){return(o||void 0===o&&n)&&((e=e||{})[t]=n),e}function a(e,t,n,o,s){let a;return a=r(a,"environment_id",n),a=r(a,"legal_entity_id",s),a=r(a,"permission_scope",o,!(!n&&!s||!o)),new Promise((n,o)=>{!function(e,t,n,o,s){const r=new XMLHttpRequest;r.onreadystatechange=()=>{if(4===r.readyState)switch(r.status){case 0:s({code:i.BBAuthTokenErrorCode.Offline,message:"The user is offline."});break;case 200:o(r.responseText);break;case 401:s({code:i.BBAuthTokenErrorCode.NotLoggedIn,message:"The user is not logged in."});break;case 403:s({code:i.BBAuthTokenErrorCode.InvalidEnvironment,message:"The user is not a member of the specified environment."});break;default:r.status>=400&&s({code:i.BBAuthTokenErrorCode.Unspecified,message:"An unknown error occurred."})}},r.open("POST",e,!0),r.setRequestHeader(t.name,t.value),r.setRequestHeader("Accept","application/json"),r.setRequestHeader("Content-Type","application/json"),r.withCredentials=!0,n?r.send(JSON.stringify(n)):r.send()}(e,{name:"X-CSRF",value:t},a,e=>{const t=e?JSON.parse(e):void 0;n(t)},o)})}t.BBCsrfXhr=class{static request(e,t,n,r,c,d,u){return!c||r||d?new Promise((l,m)=>{new Promise((e,t)=>{u?e({csrf_token:"token_needed"}):a(o,"token_needed").then(e).catch(t)}).then(t=>a(e,t.csrf_token,r,c,d)).then(l).catch(e=>{if(n||e.code===i.BBAuthTokenErrorCode.Offline)m(e);else switch(e.code){case i.BBAuthTokenErrorCode.NotLoggedIn:s.BBAuthNavigator.redirectToSignin(t);break;default:s.BBAuthNavigator.redirectToError(e.code)}})}):Promise.reject({code:i.BBAuthTokenErrorCode.PermissionScopeNoEnvironment,message:"You must also specify an environment or legal entity when specifying a permission scope."})}static requestWithToken(e,t){return new Promise((n,o)=>{const i=new XMLHttpRequest;i.onreadystatechange=()=>{if(4===i.readyState)switch(i.status){case 200:n(JSON.parse(i.responseText));break;default:o()}},i.open("GET",e,!0),i.setRequestHeader("Authorization","Bearer "+t),i.setRequestHeader("Accept","application/json"),i.send()})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Unspecified=0]="Unspecified",e[e.NotLoggedIn=1]="NotLoggedIn",e[e.InvalidEnvironment=2]="InvalidEnvironment",e[e.PermissionScopeNoEnvironment=3]="PermissionScopeNoEnvironment",e[e.Offline=4]="Offline"}(t.BBAuthTokenErrorCode||(t.BBAuthTokenErrorCode={}))},function(e,t,n){"use strict";function o(e){const t=e.split("."),n=[];for(const e of t){const t=parseInt(e,10)||0;n.push(t)}return n}Object.defineProperty(t,"__esModule",{value:!0});class i{static registerScript(e){return new Promise((t,n)=>{const o=document.createElement("script");o.onload=t,o.onerror=n,o.src=e,document.body.appendChild(o)})}static smartRegisterScript(e,t,n){return n&&function(e,t){const n=o(e),i=o(t);for(let e=0;e<n.length;e++)if(e<i.length){if(i[e]>n[e])return!0;if(i[e]<n[e])return!1}return!0}(t,n)?Promise.resolve():i.registerScript(e)}}t.BBOmnibarScriptLoader=i},function(e,t,n){"use strict";function o(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),o(n(0)),o(n(11)),o(n(13))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(9),i=/1bb:\/\/([a-z]{3})-([a-z0-9]{5})(-[a-z]{4}[0-9]{2})?\/(.*)/;class s{static getUrl(e,t){const n=i.exec(e);let o=e,s=t?t.zone:void 0;return s&&(s=s.replace("-","")),n&&(n[3]&&(s=n[3].substring(1)),o=`https://${n[1]}-${s}.app.blackbaud.net/${n[2]}/${n[4]}`),Promise.resolve(o)}static getToken(e){return s.getTokenInternal(e)}static clearTokenCache(){s.tokenCache={}}static getTokenInternal(e){e=e||{};const{forceNewToken:t,disableRedirect:n}=e;if(s.mock)return Promise.resolve("mock_access_token_auth-client@blackbaud.com");const i=function(e){const{envId:t,permissionScope:n,leId:o}=e;return"token|"+(o||"-")+"|"+(t||"-")+"|"+(n||"-")}(e),r=s.tokenCache[i]=s.tokenCache[i]||{},a=(new Date).valueOf();return!t&&r.lastToken&&r.expirationTime&&r.expirationTime-a>6e4?Promise.resolve(r.lastToken):(r.pendingLookupPromise||(r.pendingLookupPromise=o.BBAuthTokenIntegration.getToken(n,e.envId,e.permissionScope,e.leId).then(e=>(r.expirationTime=(new Date).valueOf()+1e3*e.expires_in,r.lastToken=e.access_token,r.pendingLookupPromise=null,r.lastToken)).catch(e=>{throw r.pendingLookupPromise=null,e})),r.pendingLookupPromise)}}s.mock=!1,s.tokenCache={},t.BBAuth=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(4),i=n(10);t.BBAuthTokenIntegration=class{static getToken(e,t,n,s){return this.hostNameEndsWith("blackbaud.com")?o.BBCsrfXhr.request("https://s21aidntoken00blkbapp01.nxt.blackbaud.com/oauth2/token",void 0,e,t,n,s,!0):i.BBAuthCrossDomainIframe.getToken({disableRedirect:e,envId:t,leId:s,permissionScope:n})}static hostNameEndsWith(e){return this.getLocationHostname().substr(-e.length)===e}static getLocationHostname(){return window.location.hostname}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(2),i=n(1),s=n(5),r="https://s21aidntoken00blkbapp01.nxt.blackbaud.com/Iframes/CrossDomainAuthFrame.html",a="security-token-svc",c="auth-client";class d{static reset(){this.requestCounter=0,this.tokenRequests={},this.iframeReadyPromise=new Promise(e=>this.iframeReadyResolve=e),this.listenerSetup=!1}static TARGET_ORIGIN(){return this.TARGETORIGIN}static getOrMakeIframe(){return d.iframeEl=document.getElementById("auth-cross-domain-iframe"),d.iframeEl||(d.iframeEl=o.BBAuthDomUtility.addIframe(r,"auth-cross-domain-iframe",""),d.iframeEl.id="auth-cross-domain-iframe",d.iframeEl.hidden=!0),d.iframeEl}static getToken(e){return this.setupListenersForIframe(),this.getTokenFromIframe(this.getOrMakeIframe(),e)}static setupListenersForIframe(){this.listenerSetup||(window.addEventListener("message",e=>{const t=e.data,n=t.requestId,o=this.tokenRequests[n];if(t.source===a||t.origin===this.TARGET_ORIGIN())switch(t.messageType){case"ready":this.iframeReadyResolve(!0);break;case"error":this.handleErrorMessage(t.value,o.reject,o.args.disableRedirect);break;case"getToken":const e={access_token:t.value,expires_in:0};o.resolve(e)}}),this.listenerSetup=!0)}static getTokenFromIframe(e,t){return new Promise((n,o)=>{const i=this.requestCounter++;d.tokenRequests[i]={args:t,reject:o,resolve:n},d.iframeReadyPromise.then(()=>{e.contentWindow.postMessage({messageType:"getToken",requestId:i,source:c,value:t},d.TARGET_ORIGIN())})})}static handleErrorMessage(e,t,n){if(n)t(e);else switch(e.code){case s.BBAuthTokenErrorCode.Offline:t(e);break;case s.BBAuthTokenErrorCode.NotLoggedIn:i.BBAuthNavigator.redirectToSignin(void 0);break;default:i.BBAuthNavigator.redirectToError(e.code)}}}d.listenerSetup=!1,d.iframeReadyPromise=new Promise(e=>d.iframeReadyResolve=e),d.tokenRequests={},d.requestCounter=0,d.TARGETORIGIN="https://s21aidntoken00blkbapp01.nxt.blackbaud.com",t.BBAuthCrossDomainIframe=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(12))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(0),i=n(3),s=n(4),r=n(2),a=n(1);function c(e,t,n,s){let a,c;function d(){r.BBAuthDomUtility.removeEl(c),r.BBAuthDomUtility.removeCss(a),c=a=void 0,window.removeEventListener("message",l)}function l(r){if(!i.BBAuthInterop.messageIsFromOmnibar(r))return;const a=r.data;switch(a.messageType){case"ready":i.BBAuthInterop.postOmnibarMessage(c,{messageType:"host-ready"}),i.BBAuthInterop.postOmnibarMessage(c,{contextDestinations:t,messageType:"context-provide"});break;case"get-token":u=a.tokenRequestId,l=a.disableRedirect,o.BBAuth.getToken({disableRedirect:l}).then(e=>{i.BBAuthInterop.postOmnibarMessage(c,{messageType:"token",token:e,tokenRequestId:u})},e=>{i.BBAuthInterop.postOmnibarMessage(c,{messageType:"token-fail",reason:e,tokenRequestId:u})});break;case"welcome-cancel":d(),s({reason:"canceled"});break;case"welcome-environment-selected":d(),setTimeout(()=>{e.envId=a.envId,n(e)},10)}var u,l}a=r.BBAuthDomUtility.addCss("\n.sky-omnibar-welcome-iframe {\n background-color: #fff;\n border: none;\n position: fixed;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n z-index: 10000;\n}\n"),function(){const t=u.url+"?hosted=1&svcid="+encodeURIComponent(e.svcId)+"&url="+encodeURIComponent(e.url);c=r.BBAuthDomUtility.addIframe(t,"sky-omnibar-welcome-iframe","Welcome")}(),window.addEventListener("message",l)}function d(){a.BBAuthNavigator.redirectToError(o.BBAuthTokenErrorCode.InvalidEnvironment)}class u{static ensureContext(e){const{envId:t,envIdRequired:n,leId:i,leIdRequired:r,svcId:a}=e;return!t&&n||!i&&r?new Promise((t,n)=>{a?o.BBAuth.getToken().then(o=>{let i="https://s21anavnavaf00blkbapp01.sky.blackbaud.com/user/destinations?svcid="+encodeURIComponent(a);e.url&&(i+="&referringurl="+encodeURIComponent(e.url)),s.BBCsrfXhr.requestWithToken(i,o).then(o=>{const i=o&&o.items,s=i&&i.length;1===s?(e.url=i[0].url,t(e)):s>1?c(e,o,t,n):d()})}):d()}):Promise.resolve(e)}}u.url="https://host.nxt.blackbaud.com/omnibar/welcome",t.BBContextProvider=u},function(e,t,n){"use strict";function o(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),o(n(14)),o(n(25)),o(n(26))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(15),i=n(0),s=n(3),r=n(1),a=n(2),c=n(18),d=n(22),u=n(23),l=n(24),m="sky-omnibar-iframe-expanded",p="sky-omnibar-loading";let h,f,b,v,B,y,g,k;function I(){v=a.BBAuthDomUtility.addIframe(B.url||"https://host.nxt.blackbaud.com/omnibar/",`sky-omnibar-iframe ${p}`,"Navigation")}function T(){s.BBAuthInterop.postOmnibarMessage(v,{href:document.location.href,messageType:"location-change"})}function w(){s.BBAuthInterop.postOmnibarMessage(v,{messageType:"push-notifications-open"})}function A(){k||(k=!0,i.BBAuth.getToken({disableRedirect:!0,envId:B.envId,leId:B.leId,permissionScope:"Notifications"}).then(e=>{!function(e){let t=o(e)["1bb.entitlements"];return!!t&&(t=Array.isArray(t)?t:[t]).indexOf("notif")>-1}(e)?k=!1:l.BBOmnibarToastContainer.init(w).then(()=>{u.BBOmnibarPushNotifications.connect(B.leId,B.envId,e=>{s.BBAuthInterop.postOmnibarMessage(v,{messageType:"push-notifications-update",pushNotifications:e}),l.BBOmnibarToastContainer.showNewNotifications(e)})})}).catch(()=>{k=!1}))}function O(){function e(e){s.BBAuthInterop.postOmnibarMessage(v,{messageType:"refresh-user",token:e}),e?A():k&&(l.BBOmnibarToastContainer.destroy(),u.BBOmnibarPushNotifications.disconnect(),k=!1)}i.BBAuth.clearTokenCache(),i.BBAuth.getToken({disableRedirect:!0,forceNewToken:!0}).then(e).catch(()=>e(void 0))}function E(){d.BBOmnibarUserActivityPrompt.show({sessionRenewCallback:()=>{c.BBOmnibarUserActivity.userRenewedSession()}})}function _(){d.BBOmnibarUserActivityPrompt.hide()}function N(){c.BBOmnibarUserActivity.startTracking(O,E,_,B.allowAnonymous,y)}function C(e){if(!s.BBAuthInterop.messageIsFromOmnibar(e))return;const t=e.data,n=B.nav;switch(t.messageType){case"ready":s.BBAuthInterop.postOmnibarMessage(v,{messageType:"host-ready"}),function(){const e=history.pushState,t=history.replaceState;history.pushState=function(){const t=e.apply(history,arguments);return T(),t},history.replaceState=function(){const e=t.apply(history,arguments);return T(),e}}(),s.BBAuthInterop.postOmnibarMessage(v,{compactNavOnly:B.compactNavOnly,enableHelp:B.enableHelp,envId:B.envId,hideResourceLinks:B.hideResourceLinks,leId:B.leId,localNavItems:n&&n.localNavItems,localNotifications:!!B.notifications,localSearch:!!B.onSearch,messageType:"nav-ready",navVersion:B.navVersion,services:n&&n.services,svcId:B.svcId,theme:B.theme}),function(){const e=B.notifications;e&&e.onReady({updateNotifications:e=>{s.BBAuthInterop.postOmnibarMessage(v,{messageType:"notifications-update",notifications:e})}})}(),A(),T(),g();break;case"display-ready":f.classList.remove(p),v.classList.remove(p);break;case"expand":v.classList.add(m);break;case"collapse":v.classList.remove(m);break;case"navigate-url":r.BBAuthNavigator.navigate(t.url);break;case"navigate":const e=t.navItem;n&&n.beforeNavCallback&&!1===n.beforeNavCallback(e)||r.BBAuthNavigator.navigate(e.url);break;case"search":l=t.searchArgs,B.onSearch&&B.onSearch(l).then(e=>{s.BBAuthInterop.postOmnibarMessage(v,{messageType:"search-results",results:e})});break;case"get-token":a=t.tokenRequestId,d=t.disableRedirect,i.BBAuth.getToken({disableRedirect:d}).then(e=>{N(),s.BBAuthInterop.postOmnibarMessage(v,{messageType:"token",token:e,tokenRequestId:a})},e=>{N(),s.BBAuthInterop.postOmnibarMessage(v,{messageType:"token-fail",reason:e,tokenRequestId:a})});break;case"help-open":!function(){const e=window.BBHELP;e&&e.HelpWidget.open()}();break;case"notification-read":!function(e){const t=B.notifications;t&&t.onNotificationRead&&t.onNotificationRead(e)}(t.notification);break;case"push-notifications-change":o=t.notifications,u.BBOmnibarPushNotifications.updateNotifications(o);break;case"session-renew":c.BBOmnibarUserActivity.userRenewedSession();break;case"environment-update":!function(e){const t="sky-omnibar-environment-visible",n=document.body.classList;e=e||"",h.innerText=e,e?n.add(t):n.remove(t)}(t.name);break;case"legacy-keep-alive-url-change":y=t.url,N()}var o,a,d,l}t.BBOmnibar=class{static load(e){return B=B=e,y=B.legacyKeepAliveUrl,new Promise(e=>{g=e,function(){let e="background: linear-gradient(to right, #71bf44 0, #31b986 50%, #00b2ec 100%);",t="#4d5259";const n=B.theme;if(n){const o=n.accent;t=n.backgroundColor||t,!1===o?e="display: none;":o&&o.color&&(e=`background-color: ${o.color};`)}b=a.BBAuthDomUtility.addCss(`\nbody {\n margin-top: 50px;\n}\n\n#bb-help-container {\n padding-top: 1px;\n}\n\n.sky-omnibar-iframe,\n.sky-omnibar-placeholder {\n border: none;\n height: 50px;\n width: 100%;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n z-index: 1000;\n}\n\n.sky-omnibar-placeholder {\n background-color: ${t};\n display: none;\n}\n\n.sky-omnibar-placeholder-accent {\n height: 5px;\n ${e}\n}\n\n.sky-omnibar-placeholder.${p} {\n display: block;\n}\n\n.sky-omnibar-iframe.${p} {\n visibility: hidden;\n}\n\n.${m} {\n height: 100%;\n}\n\n.sky-omnibar-environment {\n background-color: #e1e1e3;\n color: #282b31;\n font-family: "Blackbaud Sans", "Open Sans", "Helvetica Neue", Arial, sans-serif;\n font-size: 12px;\n font-weight: 400;\n height: 0;\n line-height: 24px;\n overflow: hidden;\n padding: 0 15px;\n text-align: right;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.sky-omnibar-environment-visible .sky-omnibar-environment {\n height: 24px;\n}\n`)}(),(f=document.createElement("div")).className=`sky-omnibar-placeholder ${p}`,f.innerHTML='<div class="sky-omnibar-placeholder-accent"></div>',document.body.appendChild(f),(h=document.createElement("div")).className="sky-omnibar-environment",a.BBAuthDomUtility.addElToBodyTop(h),I(),window.addEventListener("message",C)})}static update(e){s.BBAuthInterop.postOmnibarMessage(v,{messageType:"update",updateArgs:e})}static destroy(){l.BBOmnibarToastContainer.destroy(),u.BBOmnibarPushNotifications.disconnect(),a.BBAuthDomUtility.removeEl(f),a.BBAuthDomUtility.removeEl(v),a.BBAuthDomUtility.removeEl(h),a.BBAuthDomUtility.removeCss(b),window.removeEventListener("message",C),B=b=f=v=h=g=k=void 0}}},function(e,t,n){"use strict";var o=n(16);function i(e){this.message=e}i.prototype=new Error,i.prototype.name="InvalidTokenError",e.exports=function(e,t){if("string"!=typeof e)throw new i("Invalid token specified");var n=!0===(t=t||{}).header?0:1;try{return JSON.parse(o(e.split(".")[n]))}catch(e){throw new i("Invalid token specified: "+e.message)}},e.exports.InvalidTokenError=i},function(e,t,n){var o=n(17);e.exports=function(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(e){return decodeURIComponent(o(e).replace(/(.)/g,(function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}(t)}catch(e){return o(t)}}},function(e,t){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function o(e){this.message=e}o.prototype=new Error,o.prototype.name="InvalidCharacterError",e.exports="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new o("'atob' failed: The string to be decoded is not correctly encoded.");for(var i,s,r=0,a=0,c="";s=t.charAt(a++);~s&&(i=r%4?64*i+s:s,r++%4)?c+=String.fromCharCode(255&i>>(-2*r&6)):0)s=n.indexOf(s);return c}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(19),i=n(20),s=n(21),r=n(4),a=n(1);let c,d,u,l,m,p,h,f,b,v,B,y,g,k,I="";function T(){f=Date.now()}function w(e){e.clientX===d&&e.clientY===u||(d=e.clientX,u=e.clientY,T())}function A(){const e=Date.now();(!b||e-b>N.MIN_RENEWAL_RETRY)&&(b=e,r.BBCsrfXhr.request("https://s21aidntoken00blkbapp01.nxt.blackbaud.com/session/renew",{inactivity:1}).catch(()=>void 0))}function O(){h=!0,p()}function E(){h=!1,T(),l()}function _(){k?a.BBAuthNavigator.navigate(k):a.BBAuthNavigator.redirectToSignoutForInactivity()}class N{static startTracking(e,t,n,r,a){c&&r===B&&a===y||(N.stopTracking(),m=e,p=t,l=n,B=r,y=a,document.addEventListener("keypress",T),document.addEventListener("mousemove",w),B||A(),v=setInterval(()=>{i.BBOmnibarUserSessionExpiration.getSessionExpiration(I,g,B).then(e=>{o.BBOmnibarUserActivityProcessor.process({allowAnonymous:B,closeInactivityPrompt:E,expirationDate:e,inactivityPromptDuration:N.INACTIVITY_PROMPT_DURATION,isShowingInactivityPrompt:h,lastActivity:f,maxSessionAge:N.MAX_SESSION_AGE,minRenewalAge:N.MIN_RENEWAL_AGE,redirectForInactivity:_,renewSession:A,showInactivityPrompt:O})})},N.ACTIVITY_TIMER_INTERVAL),s.BBOmnibarUserSessionWatcher.start(r,a,m,e=>{g=e.legacyTtl,I=e.refreshId,k=e.legacySigninUrl}),c=!0)}static userRenewedSession(){E(),A()}static stopTracking(){s.BBOmnibarUserSessionWatcher.stop(),i.BBOmnibarUserSessionExpiration.reset(),document.removeEventListener("keypress",T),document.removeEventListener("mousemove",w),v&&(clearInterval(v),v=void 0),c=d=u=f=b=h=m=p=l=B=y=void 0}}N.ACTIVITY_TIMER_INTERVAL=1e3,N.MIN_RENEWAL_RETRY=6e4,N.INACTIVITY_PROMPT_DURATION=12e4,N.MIN_RENEWAL_AGE=3e5,N.MAX_SESSION_AGE=54e5,N.IDENTITY_SECURITY_TOKEN_SERVICE_ORIGIN="https://s21aidntoken00blkbapp01.nxt.blackbaud.com",t.BBOmnibarUserActivity=N},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.BBOmnibarUserActivityProcessor=class{static process(e){const{allowAnonymous:t,closeInactivityPrompt:n,expirationDate:o,inactivityPromptDuration:i,isShowingInactivityPrompt:s,lastActivity:r,maxSessionAge:a,minRenewalAge:c,redirectForInactivity:d,renewSession:u,showInactivityPrompt:l}=e,m=Date.now();if(null===o)return;!t&&m>o&&d();const p=o-i,h=o-a+c;s?m<p&&n():r>h?u():!t&&m>p&&l()}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(4);let i;t.BBOmnibarUserSessionExpiration=class{static getSessionExpiration(e,t,n){const s=function(e,t){if(i&&i.refreshId===e&&i.allowAnonymous===t)return i.promise;const n=new Promise((e,n)=>{o.BBCsrfXhr.request("https://s21aidntoken00blkbapp01.nxt.blackbaud.com/session/ttl",void 0,t).then(t=>{const n=null===t?null:Date.now()+1e3*t;e(n)},()=>{e(null)})});return i={allowAnonymous:t,promise:n,refreshId:e},n}(e,n);return new Promise((e,n)=>{s.then(n=>{let o;if(null===n)o=null;else if("number"==typeof t){const e=Date.now()+t;o=Math.min(n,e)}else o=n;e(o)})})}static reset(){i=void 0}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(3),i=n(1);let s,r,a,c,d,u,l,m,p={};function h(e){if(e){const t=e.split("://");return`${t[0]}://${t[1].split("/")[0]}`}}function f(e,t){const n=document.createElement("iframe");return n.className=e,n.width="0",n.height="0",n.frameBorder="0",n.src=t,n.tabIndex=-1,n.setAttribute("aria-hidden","true"),document.body.appendChild(n),n}function b(e){if("string"==typeof e.data){let t;try{t=JSON.parse(e.data)}catch(e){return}if("session_change"===t.messageType){const e=t.message,n=e&&e.sessionId,s=e&&e.refreshId;n||d||(m?i.BBAuthNavigator.navigate(m):i.BBAuthNavigator.redirectToSignin()),void 0!==p.refreshId&&s!==p.refreshId&&function(e){l&&o.BBAuthInterop.postOmnibarMessage(l,e,h(r))}({messageType:"session-refresh"}),void 0!==p.sessionId&&n!==p.sessionId&&a(),p.refreshId=s,p.sessionId=n,c(p)}}}function v(e){switch(e.origin){case B.IDENTITY_SECURITY_TOKEN_SERVICE_ORIGIN:b(e);break;case h(r):!function(e){const t=e.data;switch(t.messageType){case"ready":p.legacyTtl=t.ttl,m=t.signinUrl,c(p)}}(e)}}class B{static start(e,t,n,o){s&&e===d&&t===r||(B.stop(),d=e,a=n,r=t,c=o,function(){const e=B.IDENTITY_SECURITY_TOKEN_SERVICE_ORIGIN+"/SessionWatcher.html?origin="+encodeURIComponent(location.origin);u=f("sky-omnibar-iframe-session-watcher",e)}(),r&&(l=f("sky-omnibar-iframe-legacy-keep-alive",r)),window.addEventListener("message",v,!1),s=!0)}static stop(){window.removeEventListener("message",v,!1),u&&(document.body.removeChild(u),u=void 0),l&&(document.body.removeChild(l),l=void 0),p={},s=d=a=r=m=c=void 0}}B.IDENTITY_SECURITY_TOKEN_SERVICE_ORIGIN="https://s21aidntoken00blkbapp01.nxt.blackbaud.com",t.BBOmnibarUserSessionWatcher=B},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(2),i=n(3);let s,r,a;function c(e){if(!i.BBAuthInterop.messageIsFromOmnibar(e))return;switch(e.data.messageType){case"ready":i.BBAuthInterop.postOmnibarMessage(r,{messageType:"host-ready"}),r.classList.add("sky-omnibar-inactivity-iframe-ready");break;case"session-renew":a()}}class d{static show(e){this.hide(),a=e.sessionRenewCallback,s=o.BBAuthDomUtility.addCss("\n .sky-omnibar-inactivity-iframe {\n background-color: transparent;\n border: none;\n position: fixed;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n z-index: 100000;\n visibility: hidden;\n }\n\n .sky-omnibar-inactivity-iframe-ready {\n visibility: visible;\n }\n "),function(){const e=d.url;r=o.BBAuthDomUtility.addIframe(e,"sky-omnibar-inactivity-iframe","Inactivity Prompt")}(),window.addEventListener("message",c)}static hide(){r&&(o.BBAuthDomUtility.removeEl(r),o.BBAuthDomUtility.removeCss(s),r=s=a=void 0,window.removeEventListener("message",c))}}d.url="https://host.nxt.blackbaud.com/omnibar/inactivity",t.BBOmnibarUserActivityPrompt=d},function(e,t,n){"use strict";var o=this&&this.__awaiter||function(e,t,n,o){return new(n||(n=Promise))((function(i,s){function r(e){try{c(o.next(e))}catch(e){s(e)}}function a(e){try{c(o.throw(e))}catch(e){s(e)}}function c(e){e.done?i(e.value):new n((function(t){t(e.value)})).then(r,a)}c((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(0),s=n(6);let r;class a{static connect(e,t,n){return o(this,void 0,void 0,(function*(){return r||(r=window.BBNotificationsClient?Promise.resolve():s.BBOmnibarScriptLoader.registerScript(this.NOTIFICATIONS_CLIENT_URL)),r.then(()=>{BBNotificationsClient.BBNotifications.init({tokenCallback:()=>i.BBAuth.getToken({disableRedirect:!0,envId:t,leId:e})}),BBNotificationsClient.BBNotifications.addListener(n)})}))}static disconnect(){return o(this,void 0,void 0,(function*(){return r?r.then(()=>{BBNotificationsClient.BBNotifications.destroy(),r=void 0}):Promise.resolve()}))}static updateNotifications(e){BBNotificationsClient.BBNotifications.updateNotifications(e)}}a.NOTIFICATIONS_CLIENT_URL="https://sky.blackbaudcdn.net/static/notifications-client/1/notifications-client.global.min.js",t.BBOmnibarPushNotifications=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(2),i=n(3),s="sky-omnibar-toast-container",r=`${s}-ready`,a=`${s}-empty`;let c,d,u,l,m;function p(e){if(!i.BBAuthInterop.messageIsFromOmnibar(e))return;const t=e.data;switch(t.messageType){case"toast-ready":i.BBAuthInterop.postOmnibarMessage(d,{messageType:"host-ready"}),d.classList.add(r),l();break;case"toast-container-change":t.height>0?(d.style.height=t.height+"px",d.classList.remove(a)):d.classList.add(a);break;case"push-notifications-open":m()}}class h{static init(e){return m=e,u||(u=new Promise(e=>{l=e,d||(c=o.BBAuthDomUtility.addCss(`\n.${s} {\n border: none;\n display: none;\n position: fixed;\n bottom: 0px;\n right: 0px;\n height: 0px;\n width: 300px;\n}\n\n.${r} {\n display: block;\n}\n\n.${a} {\n visibility: hidden;\n}\n`),(d=document.createElement("iframe")).src=h.CONTAINER_URL,d.className=`${s} ${a}`,d.title="Toast container",document.body.appendChild(d),window.addEventListener("message",p))})),u}static showNewNotifications(e){i.BBAuthInterop.postOmnibarMessage(d,{messageType:"push-notifications-update",pushNotifications:e})}static destroy(){c&&o.BBAuthDomUtility.removeCss(c),d&&o.BBAuthDomUtility.removeEl(d),m=d=u=l=c=void 0,window.removeEventListener("message",p)}}h.CONTAINER_URL="https://host.nxt.blackbaud.com/omnibar/toast",t.BBOmnibarToastContainer=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(6);function i(){return window.jQuery}t.BBOmnibarLegacy=class{static load(e){return new Promise(t=>{const n=i(),s=n&&n.fn&&n.fn.jquery;o.BBOmnibarScriptLoader.smartRegisterScript("https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.0/jquery.js","2.1.0",s).then(()=>o.BBOmnibarScriptLoader.registerScript("https://cdnjs.cloudflare.com/ajax/libs/easyXDM/2.4.17.1/easyXDM.min.js")).then(()=>o.BBOmnibarScriptLoader.registerScript("https://signin.blackbaud.com/Omnibar.min.js")).then(()=>{document.body.classList.add("bb-omnibar-height-padding");const n=document.createElement("div");n.setAttribute("data-omnibar-el",""),document.body.appendChild(n),(e=e||{})["z-index"]=1e3,e.afterLoad=t,e.menuEl&&(e.menuEl=i()(e.menuEl)),BBAUTH.Omnibar.load(n,e)})})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})}]); |
@@ -1,1 +0,1 @@ | ||
window.BBAuthClient=function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=6)}([function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t(1),o="https://signin.blackbaud.com/signin/",i=encodeURIComponent;function a(e){var n=o+"?redirectUrl="+i(location.href);return e&&(n+="&inactivity=1"),n}var s=function(){function e(){}return e.navigate=function(e,n){n?location.replace(e):location.href=e},e.redirectToSignin=function(e){var n=a();e&&(n+="&"+function(e){var n=[];for(var t in e)e.hasOwnProperty(t)&&n.push(i(t)+"="+i(e[t]));return n.join("&")}(e)),this.navigate(n)},e.redirectToSignoutForInactivity=function(){var e=a(!0),n=o+"sign-out?redirectUrl="+i(e);this.navigate(n)},e.redirectToError=function(e){var n,t;switch(e){case r.BBAuthTokenErrorCode.InvalidEnvironment:t="invalid_env",n="security";break;default:n="broken"}var o="https://host.nxt.blackbaud.com/errors/"+n+"?source=auth-client&url="+i(location.href);t&&(o+="&code="+i(t)),this.navigate(o)},e}();n.BBAuthNavigator=s},function(e,n,t){"use strict";function r(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}Object.defineProperty(n,"__esModule",{value:!0}),r(t(7)),r(t(5))},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t(1),o=t(0);function i(e,n,t,r){return(r||void 0===r&&t)&&((e=e||{})[n]=t),e}function a(e,n,t,o,a){var s;return s=i(s,"environment_id",t),s=i(s,"legal_entity_id",a),s=i(s,"permission_scope",o,!(!t&&!a||!o)),new Promise(function(t,o){!function(e,n,t,o,i){var a=new XMLHttpRequest;a.onreadystatechange=function(){if(4===a.readyState)switch(a.status){case 0:i({code:r.BBAuthTokenErrorCode.Offline,message:"The user is offline."});break;case 200:o(a.responseText);break;case 401:i({code:r.BBAuthTokenErrorCode.NotLoggedIn,message:"The user is not logged in."});break;case 403:i({code:r.BBAuthTokenErrorCode.InvalidEnvironment,message:"The user is not a member of the specified environment."});break;default:a.status>=400&&i({code:r.BBAuthTokenErrorCode.Unspecified,message:"An unknown error occurred."})}},a.open("POST",e,!0),a.setRequestHeader(n.name,n.value),a.setRequestHeader("Accept","application/json"),a.setRequestHeader("Content-Type","application/json"),a.withCredentials=!0,t?a.send(JSON.stringify(t)):a.send()}(e,{name:"X-CSRF",value:n},s,function(e){var n=e?JSON.parse(e):void 0;t(n)},o)})}var s=function(){function e(){}return e.request=function(e,n,t,i,s,c,u){return!s||i||c?new Promise(function(d,l){new Promise(function(e,n){u?e({csrf_token:"token_needed"}):a("https://s21aidntoken00blkbapp01.nxt.blackbaud.com/session/csrf","token_needed").then(e).catch(n)}).then(function(n){return a(e,n.csrf_token,i,s,c)}).then(d).catch(function(e){if(t||e.code===r.BBAuthTokenErrorCode.Offline)l(e);else switch(e.code){case r.BBAuthTokenErrorCode.NotLoggedIn:o.BBAuthNavigator.redirectToSignin(n);break;default:o.BBAuthNavigator.redirectToError(e.code)}})}):Promise.reject({code:r.BBAuthTokenErrorCode.PermissionScopeNoEnvironment,message:"You must also specify an environment or legal entity when specifying a permission scope."})},e.requestWithToken=function(e,n){return new Promise(function(t,r){var o=new XMLHttpRequest;o.onreadystatechange=function(){if(4===o.readyState)switch(o.status){case 200:t(JSON.parse(o.responseText));break;default:r()}},o.open("GET",e,!0),o.setRequestHeader("Authorization","Bearer "+n),o.setRequestHeader("Accept","application/json"),o.send()})},e}();n.BBCsrfXhr=s},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(){}return e.addCss=function(e){var n=document.createElement("style");return n.appendChild(document.createTextNode(e)),document.head.appendChild(n),n},e.addIframe=function(e,n,t){var r=document.createElement("iframe");return r.className=n,r.title=t,r.src=e,this.addElToBodyTop(r),r},e.removeCss=function(e){this.removeEl(e,document.head)},e.removeEl=function(e,n){void 0===n&&(n=document.body),n.contains(e)&&n.removeChild(e)},e.addElToBodyTop=function(e){var n=document.body;n.firstChild?n.insertBefore(e,n.firstChild):n.appendChild(e)},e}();n.BBAuthDomUtility=r},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(){}return e.postOmnibarMessage=function(e,n,t){n.source="auth-client",e.contentWindow.postMessage(n,t||"https://host.nxt.blackbaud.com")},e.messageIsFromOmnibar=function(e){if("https://host.nxt.blackbaud.com"===e.origin){var n=e.data;return!!n&&"skyux-spa-omnibar"===n.source}return!1},e}();n.BBAuthInterop=r},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(e){e[e.Unspecified=0]="Unspecified",e[e.NotLoggedIn=1]="NotLoggedIn",e[e.InvalidEnvironment=2]="InvalidEnvironment",e[e.PermissionScopeNoEnvironment=3]="PermissionScopeNoEnvironment",e[e.Offline=4]="Offline"}(n.BBAuthTokenErrorCode||(n.BBAuthTokenErrorCode={}))},function(e,n,t){"use strict";function r(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}Object.defineProperty(n,"__esModule",{value:!0}),r(t(1)),r(t(10)),r(t(12))},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t(8),o=/1bb:\/\/([a-z]{3})-([a-z0-9]{5})(-[a-z]{4}[0-9]{2})?\/(.*)/;var i=function(){function e(){}return e.getUrl=function(e,n){var t=o.exec(e),r=e,i=n?n.zone:void 0;return i&&(i=i.replace("-","")),t&&(t[3]&&(i=t[3].substring(1)),r="https://"+t[1]+"-"+i+".app.blackbaud.net/"+t[2]+"/"+t[4]),Promise.resolve(r)},e.getToken=function(n){return e.getTokenInternal(n)},e.clearTokenCache=function(){e.tokenCache={}},e.getTokenInternal=function(n){var t=(n=n||{}).forceNewToken,o=n.disableRedirect;if(e.mock)return Promise.resolve("mock_access_token_auth-client@blackbaud.com");var i=function(e){var n=e.envId,t=e.permissionScope;return"token|"+(e.leId||"-")+"|"+(n||"-")+"|"+(t||"-")}(n),a=e.tokenCache[i]=e.tokenCache[i]||{},s=(new Date).valueOf();return!t&&a.lastToken&&a.expirationTime&&a.expirationTime-s>6e4?Promise.resolve(a.lastToken):(a.pendingLookupPromise||(a.pendingLookupPromise=r.BBAuthTokenIntegration.getToken(o,n.envId,n.permissionScope,n.leId).then(function(e){return a.expirationTime=(new Date).valueOf()+1e3*e.expires_in,a.lastToken=e.access_token,a.pendingLookupPromise=null,a.lastToken}).catch(function(e){throw a.pendingLookupPromise=null,e})),a.pendingLookupPromise)},e.mock=!1,e.tokenCache={},e}();n.BBAuth=i},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t(2),o=t(9),i=function(){function e(){}return e.getToken=function(e,n,t,i){return this.hostNameEndsWith("blackbaud.com")?r.BBCsrfXhr.request("https://s21aidntoken00blkbapp01.nxt.blackbaud.com/oauth2/token",void 0,e,n,t,i,!0):o.BBAuthCrossDomainIframe.getToken({disableRedirect:e,envId:n,leId:i,permissionScope:t})},e.hostNameEndsWith=function(e){return this.getLocationHostname().substr(-e.length)===e},e.getLocationHostname=function(){return window.location.hostname},e}();n.BBAuthTokenIntegration=i},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t(3),o=t(0),i=t(5),a=function(){function e(){}return e.reset=function(){var e=this;this.requestCounter=0,this.tokenRequests={},this.iframeReadyPromise=new Promise(function(n){return e.iframeReadyResolve=n}),this.listenerSetup=!1},e.TARGET_ORIGIN=function(){return this.TARGETORIGIN},e.getOrMakeIframe=function(){return e.iframeEl=document.getElementById("auth-cross-domain-iframe"),e.iframeEl||(e.iframeEl=r.BBAuthDomUtility.addIframe("https://s21aidntoken00blkbapp01.nxt.blackbaud.com/Iframes/CrossDomainAuthFrame.html","auth-cross-domain-iframe",""),e.iframeEl.id="auth-cross-domain-iframe",e.iframeEl.hidden=!0),e.iframeEl},e.getToken=function(e){return this.setupListenersForIframe(),this.getTokenFromIframe(this.getOrMakeIframe(),e)},e.setupListenersForIframe=function(){var e=this;this.listenerSetup||(window.addEventListener("message",function(n){var t=n.data,r=t.requestId,o=e.tokenRequests[r];if("security-token-svc"===t.source||t.origin===e.TARGET_ORIGIN())switch(t.messageType){case"ready":e.iframeReadyResolve(!0);break;case"error":e.handleErrorMessage(t.value,o.reject,o.args.disableRedirect);break;case"getToken":var i={access_token:t.value,expires_in:0};o.resolve(i)}}),this.listenerSetup=!0)},e.getTokenFromIframe=function(n,t){var r=this;return new Promise(function(o,i){var a=r.requestCounter++;e.tokenRequests[a]={args:t,reject:i,resolve:o},e.iframeReadyPromise.then(function(){n.contentWindow.postMessage({messageType:"getToken",requestId:a,source:"auth-client",value:t},e.TARGET_ORIGIN())})})},e.handleErrorMessage=function(e,n,t){if(t)n(e);else switch(e.code){case i.BBAuthTokenErrorCode.Offline:n(e);break;case i.BBAuthTokenErrorCode.NotLoggedIn:o.BBAuthNavigator.redirectToSignin(void 0);break;default:o.BBAuthNavigator.redirectToError(e.code)}},e.listenerSetup=!1,e.iframeReadyPromise=new Promise(function(n){return e.iframeReadyResolve=n}),e.tokenRequests={},e.requestCounter=0,e.TARGETORIGIN="https://s21aidntoken00blkbapp01.nxt.blackbaud.com",e}();n.BBAuthCrossDomainIframe=a},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}(t(11))},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t(1),o=t(4),i=t(2),a=t(3),s=t(0);function c(e,n,t,i){var s,c,u;function l(){a.BBAuthDomUtility.removeEl(c),a.BBAuthDomUtility.removeCss(s),c=s=void 0,window.removeEventListener("message",m)}function m(a){if(o.BBAuthInterop.messageIsFromOmnibar(a)){var s,u,d=a.data;switch(d.messageType){case"ready":o.BBAuthInterop.postOmnibarMessage(c,{messageType:"host-ready"}),o.BBAuthInterop.postOmnibarMessage(c,{contextDestinations:n,messageType:"context-provide"});break;case"get-token":s=d.tokenRequestId,u=d.disableRedirect,r.BBAuth.getToken({disableRedirect:u}).then(function(e){o.BBAuthInterop.postOmnibarMessage(c,{messageType:"token",token:e,tokenRequestId:s})},function(e){o.BBAuthInterop.postOmnibarMessage(c,{messageType:"token-fail",reason:e,tokenRequestId:s})});break;case"welcome-cancel":l(),i({reason:"canceled"});break;case"welcome-environment-selected":l(),setTimeout(function(){e.envId=d.envId,t(e)},10)}}}s=a.BBAuthDomUtility.addCss("\n.sky-omnibar-welcome-iframe {\n background-color: #fff;\n border: none;\n position: fixed;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n z-index: 10000;\n}\n"),u=d.url+"?hosted=1&svcid="+encodeURIComponent(e.svcId)+"&url="+encodeURIComponent(e.url),c=a.BBAuthDomUtility.addIframe(u,"sky-omnibar-welcome-iframe","Welcome"),window.addEventListener("message",m)}function u(){s.BBAuthNavigator.redirectToError(r.BBAuthTokenErrorCode.InvalidEnvironment)}var d=function(){function e(){}return e.ensureContext=function(e){var n=e.envId,t=e.envIdRequired,o=e.leId,a=e.leIdRequired,s=e.svcId;return!n&&t||!o&&a?new Promise(function(n,t){s?r.BBAuth.getToken().then(function(r){var o="https://s21anavnavaf00blkbapp01.sky.blackbaud.com/user/destinations?svcid="+encodeURIComponent(s);e.url&&(o+="&referringurl="+encodeURIComponent(e.url)),i.BBCsrfXhr.requestWithToken(o,r).then(function(r){var o=r&&r.items,i=o&&o.length;1===i?(e.url=o[0].url,n(e)):i>1?c(e,r,n,t):u()})}):u()}):Promise.resolve(e)},e.url="https://host.nxt.blackbaud.com/omnibar/welcome",e}();n.BBContextProvider=d},function(e,n,t){"use strict";function r(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}Object.defineProperty(n,"__esModule",{value:!0}),r(t(13)),r(t(19)),r(t(21))},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,o,i,a,s,c,u,d=t(1),l=t(4),m=t(14),f=t(18),p=t(0),v=t(3),h="sky-omnibar-iframe-expanded",b="sky-omnibar-loading";function y(){a=v.BBAuthDomUtility.addIframe(s.url||"https://host.nxt.blackbaud.com/omnibar/","sky-omnibar-iframe "+b,"Navigation")}function g(){l.BBAuthInterop.postOmnibarMessage(a,{href:document.location.href,messageType:"location-change"})}function B(){function e(e){l.BBAuthInterop.postOmnibarMessage(a,{messageType:"refresh-user",token:e})}d.BBAuth.clearTokenCache(),d.BBAuth.getToken({disableRedirect:!0,forceNewToken:!0}).then(e).catch(function(){return e(void 0)})}function k(){f.BBOmnibarUserActivityPrompt.show({sessionRenewCallback:function(){m.BBOmnibarUserActivity.userRenewedSession()}})}function I(){f.BBOmnibarUserActivityPrompt.hide()}function T(){m.BBOmnibarUserActivity.startTracking(B,k,I,s.allowAnonymous,c)}function A(e){if(l.BBAuthInterop.messageIsFromOmnibar(e)){var n,t,i,f,v,y,B,k,I,A,E=e.data,O=s.nav;switch(E.messageType){case"ready":l.BBAuthInterop.postOmnibarMessage(a,{messageType:"host-ready"}),I=history.pushState,A=history.replaceState,history.pushState=function(){var e=I.apply(history,arguments);return g(),e},history.replaceState=function(){var e=A.apply(history,arguments);return g(),e},l.BBAuthInterop.postOmnibarMessage(a,{compactNavOnly:s.compactNavOnly,enableHelp:s.enableHelp,envId:s.envId,hideResourceLinks:s.hideResourceLinks,leId:s.leId,localNavItems:O&&O.localNavItems,localNotifications:!!s.notifications,localSearch:!!s.onSearch,messageType:"nav-ready",navVersion:s.navVersion,services:O&&O.services,svcId:s.svcId,theme:s.theme}),(k=s.notifications)&&k.onReady({updateNotifications:function(e){l.BBAuthInterop.postOmnibarMessage(a,{messageType:"notifications-update",notifications:e})}}),g(),u();break;case"display-ready":o.classList.remove(b),a.classList.remove(b);break;case"expand":a.classList.add(h);break;case"collapse":a.classList.remove(h);break;case"navigate-url":p.BBAuthNavigator.navigate(E.url);break;case"navigate":var w=E.navItem;O&&O.beforeNavCallback&&!1===O.beforeNavCallback(w)||p.BBAuthNavigator.navigate(w.url);break;case"search":B=E.searchArgs,s.onSearch&&s.onSearch(B).then(function(e){l.BBAuthInterop.postOmnibarMessage(a,{messageType:"search-results",results:e})});break;case"get-token":v=E.tokenRequestId,y=E.disableRedirect,d.BBAuth.getToken({disableRedirect:y}).then(function(e){T(),l.BBAuthInterop.postOmnibarMessage(a,{messageType:"token",token:e,tokenRequestId:v})},function(e){T(),l.BBAuthInterop.postOmnibarMessage(a,{messageType:"token-fail",reason:e,tokenRequestId:v})});break;case"help-open":(f=window.BBHELP)&&f.HelpWidget.open();break;case"notification-read":!function(e){var n=s.notifications;n&&n.onNotificationRead&&n.onNotificationRead(e)}(E.notification);break;case"session-renew":m.BBOmnibarUserActivity.userRenewedSession();break;case"environment-update":n=E.name,t="sky-omnibar-environment-visible",i=document.body.classList,n=n||"",r.innerText=n,n?i.add(t):i.remove(t);break;case"legacy-keep-alive-url-change":c=E.url,T()}}}var E=function(){function e(){}return e.load=function(e){return s=s=e,c=s.legacyKeepAliveUrl,new Promise(function(e){u=e,function(){var e="background: linear-gradient(to right, #71bf44 0, #31b986 50%, #00b2ec 100%);",n="#4d5259",t=s.theme;if(t){var r=t.accent;n=t.backgroundColor||n,!1===r?e="display: none;":r&&r.color&&(e="background-color: "+r.color+";")}i=v.BBAuthDomUtility.addCss("\nbody {\n margin-top: 50px;\n}\n\n#bb-help-container {\n padding-top: 1px;\n}\n\n.sky-omnibar-iframe,\n.sky-omnibar-placeholder {\n border: none;\n height: 50px;\n width: 100%;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n z-index: 1000;\n}\n\n.sky-omnibar-placeholder {\n background-color: "+n+";\n display: none;\n}\n\n.sky-omnibar-placeholder-accent {\n height: 5px;\n "+e+'\n}\n\n.sky-omnibar-placeholder.sky-omnibar-loading {\n display: block;\n}\n\n.sky-omnibar-iframe.sky-omnibar-loading {\n visibility: hidden;\n}\n\n.sky-omnibar-iframe-expanded {\n height: 100%;\n}\n\n.sky-omnibar-environment {\n background-color: #e1e1e3;\n color: #282b31;\n font-family: "Blackbaud Sans", "Open Sans", "Helvetica Neue", Arial, sans-serif;\n font-size: 12px;\n font-weight: 400;\n height: 0;\n line-height: 24px;\n overflow: hidden;\n padding: 0 15px;\n text-align: right;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.sky-omnibar-environment-visible .sky-omnibar-environment {\n height: 24px;\n}\n')}(),(o=document.createElement("div")).className="sky-omnibar-placeholder "+b,o.innerHTML='<div class="sky-omnibar-placeholder-accent"></div>',document.body.appendChild(o),(r=document.createElement("div")).className="sky-omnibar-environment",v.BBAuthDomUtility.addElToBodyTop(r),y(),window.addEventListener("message",A)})},e.update=function(e){l.BBAuthInterop.postOmnibarMessage(a,{messageType:"update",updateArgs:e})},e.destroy=function(){v.BBAuthDomUtility.removeCss(i),v.BBAuthDomUtility.removeEl(o),v.BBAuthDomUtility.removeEl(a),v.BBAuthDomUtility.removeEl(r),window.removeEventListener("message",A),s=i=o=a=r=u=void 0},e}();n.BBOmnibar=E},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,o,i,a,s,c,u,d,l,m,f,p,v,h,b=t(15),y=t(16),g=t(17),B=t(2),k=t(0),I="";function T(){d=Date.now()}function A(e){e.clientX===o&&e.clientY===i||(o=e.clientX,i=e.clientY,T())}function E(){var e=Date.now();(!l||e-l>P.MIN_RENEWAL_RETRY)&&(l=e,B.BBCsrfXhr.request("https://s21aidntoken00blkbapp01.nxt.blackbaud.com/session/renew",{inactivity:1}).catch(function(){}))}function O(){u=!0,c()}function w(){u=!1,T(),a()}function _(){h?k.BBAuthNavigator.navigate(h):k.BBAuthNavigator.redirectToSignoutForInactivity()}function R(){f||E(),m=setInterval(function(){y.BBOmnibarUserSessionExpiration.getSessionExpiration(I,v,f).then(function(e){b.BBOmnibarUserActivityProcessor.process({allowAnonymous:f,closeInactivityPrompt:w,expirationDate:e,inactivityPromptDuration:P.INACTIVITY_PROMPT_DURATION,isShowingInactivityPrompt:u,lastActivity:d,maxSessionAge:P.MAX_SESSION_AGE,minRenewalAge:P.MIN_RENEWAL_AGE,redirectForInactivity:_,renewSession:E,showInactivityPrompt:O})})},P.ACTIVITY_TIMER_INTERVAL)}var P=function(){function e(){}return e.startTracking=function(n,t,o,i,u){r&&i===f&&u===p||(e.stopTracking(),s=n,c=t,a=o,f=i,p=u,document.addEventListener("keypress",T),document.addEventListener("mousemove",A),R(),g.BBOmnibarUserSessionWatcher.start(i,u,s,function(e){v=e.legacyTtl,I=e.refreshId,h=e.legacySigninUrl}),r=!0)},e.userRenewedSession=function(){w(),E()},e.stopTracking=function(){g.BBOmnibarUserSessionWatcher.stop(),y.BBOmnibarUserSessionExpiration.reset(),document.removeEventListener("keypress",T),document.removeEventListener("mousemove",A),m&&(clearInterval(m),m=void 0),r=o=i=d=l=u=s=c=a=f=p=void 0},e.ACTIVITY_TIMER_INTERVAL=1e3,e.MIN_RENEWAL_RETRY=6e4,e.INACTIVITY_PROMPT_DURATION=12e4,e.MIN_RENEWAL_AGE=3e5,e.MAX_SESSION_AGE=54e5,e.IDENTITY_SECURITY_TOKEN_SERVICE_ORIGIN="https://s21aidntoken00blkbapp01.nxt.blackbaud.com",e}();n.BBOmnibarUserActivity=P},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(){}return e.process=function(e){var n=e.allowAnonymous,t=e.closeInactivityPrompt,r=e.expirationDate,o=e.inactivityPromptDuration,i=e.isShowingInactivityPrompt,a=e.lastActivity,s=e.maxSessionAge,c=e.minRenewalAge,u=e.redirectForInactivity,d=e.renewSession,l=e.showInactivityPrompt,m=Date.now();if(null!==r){!n&&m>r&&u();var f=r-o,p=r-s+c;i?m<f&&t():a>p?d():!n&&m>f&&l()}},e}();n.BBOmnibarUserActivityProcessor=r},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,o=t(2);var i=function(){function e(){}return e.getSessionExpiration=function(e,n,t){var i=function(e,n){if(r&&r.refreshId===e&&r.allowAnonymous===n)return r.promise;var t=new Promise(function(e,t){o.BBCsrfXhr.request("https://s21aidntoken00blkbapp01.nxt.blackbaud.com/session/ttl",void 0,n).then(function(n){var t=null===n?null:Date.now()+1e3*n;e(t)},function(){e(null)})});return r={allowAnonymous:n,promise:t,refreshId:e},t}(e,t);return new Promise(function(e,t){i.then(function(t){var r;if(null===t)r=null;else if("number"==typeof n){var o=Date.now()+n;r=Math.min(t,o)}else r=t;e(r)})})},e.reset=function(){r=void 0},e}();n.BBOmnibarUserSessionExpiration=i},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,o,i,a,s,c,u,d,l=t(4),m=t(0),f={};function p(e){if(e){var n=e.split("://");return n[0]+"://"+n[1].split("/")[0]}}function v(e,n){var t=document.createElement("iframe");return t.className=e,t.width="0",t.height="0",t.frameBorder="0",t.src=n,t.tabIndex=-1,t.setAttribute("aria-hidden","true"),document.body.appendChild(t),t}function h(){var e=g.IDENTITY_SECURITY_TOKEN_SERVICE_ORIGIN+"/SessionWatcher.html?origin="+encodeURIComponent(location.origin);c=v("sky-omnibar-iframe-session-watcher",e)}function b(e){if("string"==typeof e.data){var n=void 0;try{n=JSON.parse(e.data)}catch(e){return}if("session_change"===n.messageType){var t=n.message,r=t&&t.sessionId,c=t&&t.refreshId;r||s||(d?m.BBAuthNavigator.navigate(d):m.BBAuthNavigator.redirectToSignin()),void 0!==f.refreshId&&c!==f.refreshId&&function(e){u&&l.BBAuthInterop.postOmnibarMessage(u,e,p(o))}({messageType:"session-refresh"}),void 0!==f.sessionId&&r!==f.sessionId&&i(),f.refreshId=c,f.sessionId=r,a(f)}}}function y(e){switch(e.origin){case g.IDENTITY_SECURITY_TOKEN_SERVICE_ORIGIN:b(e);break;case p(o):!function(e){var n=e.data;switch(n.messageType){case"ready":f.legacyTtl=n.ttl,d=n.signinUrl,a(f)}}(e)}}var g=function(){function e(){}return e.start=function(n,t,c,d){r&&n===s&&t===o||(e.stop(),s=n,i=c,o=t,a=d,h(),o&&(u=v("sky-omnibar-iframe-legacy-keep-alive",o)),window.addEventListener("message",y,!1),r=!0)},e.stop=function(){window.removeEventListener("message",y,!1),c&&(document.body.removeChild(c),c=void 0),u&&(document.body.removeChild(u),u=void 0),f={},r=s=i=o=d=a=void 0},e.IDENTITY_SECURITY_TOKEN_SERVICE_ORIGIN="https://s21aidntoken00blkbapp01.nxt.blackbaud.com",e}();n.BBOmnibarUserSessionWatcher=g},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,o,i,a=t(3),s=t(4);function c(e){if(s.BBAuthInterop.messageIsFromOmnibar(e))switch(e.data.messageType){case"ready":s.BBAuthInterop.postOmnibarMessage(o,{messageType:"host-ready"}),o.classList.add("sky-omnibar-inactivity-iframe-ready");break;case"session-renew":i()}}var u=function(){function e(){}return e.show=function(n){var t;this.hide(),i=n.sessionRenewCallback,r=a.BBAuthDomUtility.addCss("\n .sky-omnibar-inactivity-iframe {\n background-color: transparent;\n border: none;\n position: fixed;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n z-index: 100000;\n visibility: hidden;\n }\n\n .sky-omnibar-inactivity-iframe-ready {\n visibility: visible;\n }\n "),t=e.url,o=a.BBAuthDomUtility.addIframe(t,"sky-omnibar-inactivity-iframe","Inactivity Prompt"),window.addEventListener("message",c)},e.hide=function(){o&&(a.BBAuthDomUtility.removeEl(o),a.BBAuthDomUtility.removeCss(r),o=r=i=void 0,window.removeEventListener("message",c))},e.url="https://host.nxt.blackbaud.com/omnibar/inactivity",e}();n.BBOmnibarUserActivityPrompt=u},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t(20);function o(){return window.jQuery}var i=function(){function e(){}return e.load=function(e){return new Promise(function(n){var t=o(),i=t&&t.fn&&t.fn.jquery;r.BBOmnibarScriptLoader.smartRegisterScript("https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.0/jquery.js","2.1.0",i).then(function(){return r.BBOmnibarScriptLoader.registerScript("https://cdnjs.cloudflare.com/ajax/libs/easyXDM/2.4.17.1/easyXDM.min.js")}).then(function(){return r.BBOmnibarScriptLoader.registerScript("https://signin.blackbaud.com/Omnibar.min.js")}).then(function(){document.body.classList.add("bb-omnibar-height-padding");var t=document.createElement("div");t.setAttribute("data-omnibar-el",""),document.body.appendChild(t),(e=e||{})["z-index"]=1e3,e.afterLoad=n,e.menuEl&&(e.menuEl=o()(e.menuEl)),BBAUTH.Omnibar.load(t,e)})})},e}();n.BBOmnibarLegacy=i},function(e,n,t){"use strict";function r(e){for(var n=[],t=0,r=e.split(".");t<r.length;t++){var o=r[t],i=parseInt(o,10)||0;n.push(i)}return n}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function e(){}return e.registerScript=function(e){return new Promise(function(n,t){var r=document.createElement("script");r.onload=n,r.onerror=t,r.src=e,document.body.appendChild(r)})},e.smartRegisterScript=function(n,t,o){return o&&function(e,n){for(var t=r(e),o=r(n),i=0;i<t.length;i++)if(i<o.length){if(o[i]>t[i])return!0;if(o[i]<t[i])return!1}return!0}(t,o)?Promise.resolve():e.registerScript(n)},e}();n.BBOmnibarScriptLoader=o},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0})}]); | ||
window.BBAuthClient=function(e){var n={};function t(i){if(n[i])return n[i].exports;var o=n[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:i})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(t.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(i,o,function(n){return e[n]}.bind(null,o));return i},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=7)}([function(e,n,t){"use strict";function i(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}Object.defineProperty(n,"__esModule",{value:!0}),i(t(8)),i(t(5))},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t(0),o="https://signin.blackbaud.com/signin/",r=encodeURIComponent;function a(e){var n=o+"?redirectUrl="+r(location.href);return e&&(n+="&inactivity=1"),n}var s=function(){function e(){}return e.navigate=function(e,n){n?location.replace(e):location.href=e},e.redirectToSignin=function(e){var n=a();e&&(n+="&"+function(e){var n=[];for(var t in e)e.hasOwnProperty(t)&&n.push(r(t)+"="+r(e[t]));return n.join("&")}(e)),this.navigate(n)},e.redirectToSignoutForInactivity=function(){var e=a(!0),n=o+"sign-out?redirectUrl="+r(e);this.navigate(n)},e.redirectToError=function(e){var n,t;switch(e){case i.BBAuthTokenErrorCode.InvalidEnvironment:t="invalid_env",n="security";break;default:n="broken"}var o="https://host.nxt.blackbaud.com/errors/"+n+"?source=auth-client&url="+r(location.href);t&&(o+="&code="+r(t)),this.navigate(o)},e}();n.BBAuthNavigator=s},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(){}return e.addCss=function(e){var n=document.createElement("style");return n.appendChild(document.createTextNode(e)),document.head.appendChild(n),n},e.addIframe=function(e,n,t){var i=document.createElement("iframe");return i.className=n,i.title=t,i.src=e,this.addElToBodyTop(i),i},e.removeCss=function(e){this.removeEl(e,document.head)},e.removeEl=function(e,n){void 0===n&&(n=document.body),n.contains(e)&&n.removeChild(e)},e.addElToBodyTop=function(e){var n=document.body;n.firstChild?n.insertBefore(e,n.firstChild):n.appendChild(e)},e}();n.BBAuthDomUtility=i},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(){}return e.postOmnibarMessage=function(e,n,t){n.source="auth-client",e.contentWindow.postMessage(n,t||"https://host.nxt.blackbaud.com")},e.messageIsFromOmnibar=function(e){if("https://host.nxt.blackbaud.com"===e.origin){var n=e.data;return!!n&&"skyux-spa-omnibar"===n.source}return!1},e}();n.BBAuthInterop=i},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t(0),o=t(1);function r(e,n,t,i){return(i||void 0===i&&t)&&((e=e||{})[n]=t),e}function a(e,n,t,o,a){var s;return s=r(s,"environment_id",t),s=r(s,"legal_entity_id",a),s=r(s,"permission_scope",o,!(!t&&!a||!o)),new Promise((function(t,o){!function(e,n,t,o,r){var a=new XMLHttpRequest;a.onreadystatechange=function(){if(4===a.readyState)switch(a.status){case 0:r({code:i.BBAuthTokenErrorCode.Offline,message:"The user is offline."});break;case 200:o(a.responseText);break;case 401:r({code:i.BBAuthTokenErrorCode.NotLoggedIn,message:"The user is not logged in."});break;case 403:r({code:i.BBAuthTokenErrorCode.InvalidEnvironment,message:"The user is not a member of the specified environment."});break;default:a.status>=400&&r({code:i.BBAuthTokenErrorCode.Unspecified,message:"An unknown error occurred."})}},a.open("POST",e,!0),a.setRequestHeader(n.name,n.value),a.setRequestHeader("Accept","application/json"),a.setRequestHeader("Content-Type","application/json"),a.withCredentials=!0,t?a.send(JSON.stringify(t)):a.send()}(e,{name:"X-CSRF",value:n},s,(function(e){var n=e?JSON.parse(e):void 0;t(n)}),o)}))}var s=function(){function e(){}return e.request=function(e,n,t,r,s,c,u){return!s||r||c?new Promise((function(d,l){new Promise((function(e,n){u?e({csrf_token:"token_needed"}):a("https://s21aidntoken00blkbapp01.nxt.blackbaud.com/session/csrf","token_needed").then(e).catch(n)})).then((function(n){return a(e,n.csrf_token,r,s,c)})).then(d).catch((function(e){if(t||e.code===i.BBAuthTokenErrorCode.Offline)l(e);else switch(e.code){case i.BBAuthTokenErrorCode.NotLoggedIn:o.BBAuthNavigator.redirectToSignin(n);break;default:o.BBAuthNavigator.redirectToError(e.code)}}))})):Promise.reject({code:i.BBAuthTokenErrorCode.PermissionScopeNoEnvironment,message:"You must also specify an environment or legal entity when specifying a permission scope."})},e.requestWithToken=function(e,n){return new Promise((function(t,i){var o=new XMLHttpRequest;o.onreadystatechange=function(){if(4===o.readyState)switch(o.status){case 200:t(JSON.parse(o.responseText));break;default:i()}},o.open("GET",e,!0),o.setRequestHeader("Authorization","Bearer "+n),o.setRequestHeader("Accept","application/json"),o.send()}))},e}();n.BBCsrfXhr=s},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(e){e[e.Unspecified=0]="Unspecified",e[e.NotLoggedIn=1]="NotLoggedIn",e[e.InvalidEnvironment=2]="InvalidEnvironment",e[e.PermissionScopeNoEnvironment=3]="PermissionScopeNoEnvironment",e[e.Offline=4]="Offline"}(n.BBAuthTokenErrorCode||(n.BBAuthTokenErrorCode={}))},function(e,n,t){"use strict";function i(e){for(var n=[],t=0,i=e.split(".");t<i.length;t++){var o=i[t],r=parseInt(o,10)||0;n.push(r)}return n}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function e(){}return e.registerScript=function(e){return new Promise((function(n,t){var i=document.createElement("script");i.onload=n,i.onerror=t,i.src=e,document.body.appendChild(i)}))},e.smartRegisterScript=function(n,t,o){return o&&function(e,n){for(var t=i(e),o=i(n),r=0;r<t.length;r++)if(r<o.length){if(o[r]>t[r])return!0;if(o[r]<t[r])return!1}return!0}(t,o)?Promise.resolve():e.registerScript(n)},e}();n.BBOmnibarScriptLoader=o},function(e,n,t){"use strict";function i(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}Object.defineProperty(n,"__esModule",{value:!0}),i(t(0)),i(t(11)),i(t(13))},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t(9),o=/1bb:\/\/([a-z]{3})-([a-z0-9]{5})(-[a-z]{4}[0-9]{2})?\/(.*)/;var r=function(){function e(){}return e.getUrl=function(e,n){var t=o.exec(e),i=e,r=n?n.zone:void 0;return r&&(r=r.replace("-","")),t&&(t[3]&&(r=t[3].substring(1)),i="https://"+t[1]+"-"+r+".app.blackbaud.net/"+t[2]+"/"+t[4]),Promise.resolve(i)},e.getToken=function(n){return e.getTokenInternal(n)},e.clearTokenCache=function(){e.tokenCache={}},e.getTokenInternal=function(n){var t=(n=n||{}).forceNewToken,o=n.disableRedirect;if(e.mock)return Promise.resolve("mock_access_token_auth-client@blackbaud.com");var r=function(e){var n=e.envId,t=e.permissionScope;return"token|"+(e.leId||"-")+"|"+(n||"-")+"|"+(t||"-")}(n),a=e.tokenCache[r]=e.tokenCache[r]||{},s=(new Date).valueOf();return!t&&a.lastToken&&a.expirationTime&&a.expirationTime-s>6e4?Promise.resolve(a.lastToken):(a.pendingLookupPromise||(a.pendingLookupPromise=i.BBAuthTokenIntegration.getToken(o,n.envId,n.permissionScope,n.leId).then((function(e){return a.expirationTime=(new Date).valueOf()+1e3*e.expires_in,a.lastToken=e.access_token,a.pendingLookupPromise=null,a.lastToken})).catch((function(e){throw a.pendingLookupPromise=null,e}))),a.pendingLookupPromise)},e.mock=!1,e.tokenCache={},e}();n.BBAuth=r},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t(4),o=t(10),r=function(){function e(){}return e.getToken=function(e,n,t,r){return this.hostNameEndsWith("blackbaud.com")?i.BBCsrfXhr.request("https://s21aidntoken00blkbapp01.nxt.blackbaud.com/oauth2/token",void 0,e,n,t,r,!0):o.BBAuthCrossDomainIframe.getToken({disableRedirect:e,envId:n,leId:r,permissionScope:t})},e.hostNameEndsWith=function(e){return this.getLocationHostname().substr(-e.length)===e},e.getLocationHostname=function(){return window.location.hostname},e}();n.BBAuthTokenIntegration=r},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t(2),o=t(1),r=t(5),a=function(){function e(){}return e.reset=function(){var e=this;this.requestCounter=0,this.tokenRequests={},this.iframeReadyPromise=new Promise((function(n){return e.iframeReadyResolve=n})),this.listenerSetup=!1},e.TARGET_ORIGIN=function(){return this.TARGETORIGIN},e.getOrMakeIframe=function(){return e.iframeEl=document.getElementById("auth-cross-domain-iframe"),e.iframeEl||(e.iframeEl=i.BBAuthDomUtility.addIframe("https://s21aidntoken00blkbapp01.nxt.blackbaud.com/Iframes/CrossDomainAuthFrame.html","auth-cross-domain-iframe",""),e.iframeEl.id="auth-cross-domain-iframe",e.iframeEl.hidden=!0),e.iframeEl},e.getToken=function(e){return this.setupListenersForIframe(),this.getTokenFromIframe(this.getOrMakeIframe(),e)},e.setupListenersForIframe=function(){var e=this;this.listenerSetup||(window.addEventListener("message",(function(n){var t=n.data,i=t.requestId,o=e.tokenRequests[i];if("security-token-svc"===t.source||t.origin===e.TARGET_ORIGIN())switch(t.messageType){case"ready":e.iframeReadyResolve(!0);break;case"error":e.handleErrorMessage(t.value,o.reject,o.args.disableRedirect);break;case"getToken":var r={access_token:t.value,expires_in:0};o.resolve(r)}})),this.listenerSetup=!0)},e.getTokenFromIframe=function(n,t){var i=this;return new Promise((function(o,r){var a=i.requestCounter++;e.tokenRequests[a]={args:t,reject:r,resolve:o},e.iframeReadyPromise.then((function(){n.contentWindow.postMessage({messageType:"getToken",requestId:a,source:"auth-client",value:t},e.TARGET_ORIGIN())}))}))},e.handleErrorMessage=function(e,n,t){if(t)n(e);else switch(e.code){case r.BBAuthTokenErrorCode.Offline:n(e);break;case r.BBAuthTokenErrorCode.NotLoggedIn:o.BBAuthNavigator.redirectToSignin(void 0);break;default:o.BBAuthNavigator.redirectToError(e.code)}},e.listenerSetup=!1,e.iframeReadyPromise=new Promise((function(n){return e.iframeReadyResolve=n})),e.tokenRequests={},e.requestCounter=0,e.TARGETORIGIN="https://s21aidntoken00blkbapp01.nxt.blackbaud.com",e}();n.BBAuthCrossDomainIframe=a},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}(t(12))},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t(0),o=t(3),r=t(4),a=t(2),s=t(1);function c(e,n,t,r){var s,c,u;function l(){a.BBAuthDomUtility.removeEl(c),a.BBAuthDomUtility.removeCss(s),c=s=void 0,window.removeEventListener("message",f)}function f(a){if(o.BBAuthInterop.messageIsFromOmnibar(a)){var s,u,d=a.data;switch(d.messageType){case"ready":o.BBAuthInterop.postOmnibarMessage(c,{messageType:"host-ready"}),o.BBAuthInterop.postOmnibarMessage(c,{contextDestinations:n,messageType:"context-provide"});break;case"get-token":s=d.tokenRequestId,u=d.disableRedirect,i.BBAuth.getToken({disableRedirect:u}).then((function(e){o.BBAuthInterop.postOmnibarMessage(c,{messageType:"token",token:e,tokenRequestId:s})}),(function(e){o.BBAuthInterop.postOmnibarMessage(c,{messageType:"token-fail",reason:e,tokenRequestId:s})}));break;case"welcome-cancel":l(),r({reason:"canceled"});break;case"welcome-environment-selected":l(),setTimeout((function(){e.envId=d.envId,t(e)}),10)}}}s=a.BBAuthDomUtility.addCss("\n.sky-omnibar-welcome-iframe {\n background-color: #fff;\n border: none;\n position: fixed;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n z-index: 10000;\n}\n"),u=d.url+"?hosted=1&svcid="+encodeURIComponent(e.svcId)+"&url="+encodeURIComponent(e.url),c=a.BBAuthDomUtility.addIframe(u,"sky-omnibar-welcome-iframe","Welcome"),window.addEventListener("message",f)}function u(){s.BBAuthNavigator.redirectToError(i.BBAuthTokenErrorCode.InvalidEnvironment)}var d=function(){function e(){}return e.ensureContext=function(e){var n=e.envId,t=e.envIdRequired,o=e.leId,a=e.leIdRequired,s=e.svcId;return!n&&t||!o&&a?new Promise((function(n,t){s?i.BBAuth.getToken().then((function(i){var o="https://s21anavnavaf00blkbapp01.sky.blackbaud.com/user/destinations?svcid="+encodeURIComponent(s);e.url&&(o+="&referringurl="+encodeURIComponent(e.url)),r.BBCsrfXhr.requestWithToken(o,i).then((function(i){var o=i&&i.items,r=o&&o.length;1===r?(e.url=o[0].url,n(e)):r>1?c(e,i,n,t):u()}))})):u()})):Promise.resolve(e)},e.url="https://host.nxt.blackbaud.com/omnibar/welcome",e}();n.BBContextProvider=d},function(e,n,t){"use strict";function i(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}Object.defineProperty(n,"__esModule",{value:!0}),i(t(14)),i(t(25)),i(t(26))},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i,o,r,a,s,c,u,d,l=t(15),f=t(0),m=t(3),p=t(1),h=t(2),v=t(18),b=t(22),y=t(23),B=t(24),g="sky-omnibar-iframe-expanded",k="sky-omnibar-loading";function I(){a=h.BBAuthDomUtility.addIframe(s.url||"https://host.nxt.blackbaud.com/omnibar/","sky-omnibar-iframe "+k,"Navigation")}function T(){m.BBAuthInterop.postOmnibarMessage(a,{href:document.location.href,messageType:"location-change"})}function w(){m.BBAuthInterop.postOmnibarMessage(a,{messageType:"push-notifications-open"})}function A(){d||(d=!0,f.BBAuth.getToken({disableRedirect:!0,envId:s.envId,leId:s.leId,permissionScope:"Notifications"}).then((function(e){!function(e){var n=l(e)["1bb.entitlements"];return!!n&&(n=Array.isArray(n)?n:[n]).indexOf("notif")>-1}(e)?d=!1:B.BBOmnibarToastContainer.init(w).then((function(){y.BBOmnibarPushNotifications.connect(s.leId,s.envId,(function(e){m.BBAuthInterop.postOmnibarMessage(a,{messageType:"push-notifications-update",pushNotifications:e}),B.BBOmnibarToastContainer.showNewNotifications(e)}))}))})).catch((function(){d=!1})))}function O(){function e(e){m.BBAuthInterop.postOmnibarMessage(a,{messageType:"refresh-user",token:e}),e?A():d&&(B.BBOmnibarToastContainer.destroy(),y.BBOmnibarPushNotifications.disconnect(),d=!1)}f.BBAuth.clearTokenCache(),f.BBAuth.getToken({disableRedirect:!0,forceNewToken:!0}).then(e).catch((function(){return e(void 0)}))}function E(){b.BBOmnibarUserActivityPrompt.show({sessionRenewCallback:function(){v.BBOmnibarUserActivity.userRenewedSession()}})}function _(){b.BBOmnibarUserActivityPrompt.hide()}function N(){v.BBOmnibarUserActivity.startTracking(O,E,_,s.allowAnonymous,c)}function C(e){if(m.BBAuthInterop.messageIsFromOmnibar(e)){var n,t,r,d,l,h,b,B,I,w,O,E=e.data,_=s.nav;switch(E.messageType){case"ready":m.BBAuthInterop.postOmnibarMessage(a,{messageType:"host-ready"}),w=history.pushState,O=history.replaceState,history.pushState=function(){var e=w.apply(history,arguments);return T(),e},history.replaceState=function(){var e=O.apply(history,arguments);return T(),e},m.BBAuthInterop.postOmnibarMessage(a,{compactNavOnly:s.compactNavOnly,enableHelp:s.enableHelp,envId:s.envId,hideResourceLinks:s.hideResourceLinks,leId:s.leId,localNavItems:_&&_.localNavItems,localNotifications:!!s.notifications,localSearch:!!s.onSearch,messageType:"nav-ready",navVersion:s.navVersion,services:_&&_.services,svcId:s.svcId,theme:s.theme}),(I=s.notifications)&&I.onReady({updateNotifications:function(e){m.BBAuthInterop.postOmnibarMessage(a,{messageType:"notifications-update",notifications:e})}}),A(),T(),u();break;case"display-ready":o.classList.remove(k),a.classList.remove(k);break;case"expand":a.classList.add(g);break;case"collapse":a.classList.remove(g);break;case"navigate-url":p.BBAuthNavigator.navigate(E.url);break;case"navigate":var C=E.navItem;_&&_.beforeNavCallback&&!1===_.beforeNavCallback(C)||p.BBAuthNavigator.navigate(C.url);break;case"search":B=E.searchArgs,s.onSearch&&s.onSearch(B).then((function(e){m.BBAuthInterop.postOmnibarMessage(a,{messageType:"search-results",results:e})}));break;case"get-token":h=E.tokenRequestId,b=E.disableRedirect,f.BBAuth.getToken({disableRedirect:b}).then((function(e){N(),m.BBAuthInterop.postOmnibarMessage(a,{messageType:"token",token:e,tokenRequestId:h})}),(function(e){N(),m.BBAuthInterop.postOmnibarMessage(a,{messageType:"token-fail",reason:e,tokenRequestId:h})}));break;case"help-open":(l=window.BBHELP)&&l.HelpWidget.open();break;case"notification-read":!function(e){var n=s.notifications;n&&n.onNotificationRead&&n.onNotificationRead(e)}(E.notification);break;case"push-notifications-change":d=E.notifications,y.BBOmnibarPushNotifications.updateNotifications(d);break;case"session-renew":v.BBOmnibarUserActivity.userRenewedSession();break;case"environment-update":n=E.name,t="sky-omnibar-environment-visible",r=document.body.classList,n=n||"",i.innerText=n,n?r.add(t):r.remove(t);break;case"legacy-keep-alive-url-change":c=E.url,N()}}}var R=function(){function e(){}return e.load=function(e){return s=s=e,c=s.legacyKeepAliveUrl,new Promise((function(e){u=e,function(){var e="background: linear-gradient(to right, #71bf44 0, #31b986 50%, #00b2ec 100%);",n="#4d5259",t=s.theme;if(t){var i=t.accent;n=t.backgroundColor||n,!1===i?e="display: none;":i&&i.color&&(e="background-color: "+i.color+";")}r=h.BBAuthDomUtility.addCss("\nbody {\n margin-top: 50px;\n}\n\n#bb-help-container {\n padding-top: 1px;\n}\n\n.sky-omnibar-iframe,\n.sky-omnibar-placeholder {\n border: none;\n height: 50px;\n width: 100%;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n z-index: 1000;\n}\n\n.sky-omnibar-placeholder {\n background-color: "+n+";\n display: none;\n}\n\n.sky-omnibar-placeholder-accent {\n height: 5px;\n "+e+"\n}\n\n.sky-omnibar-placeholder."+k+" {\n display: block;\n}\n\n.sky-omnibar-iframe."+k+" {\n visibility: hidden;\n}\n\n."+g+' {\n height: 100%;\n}\n\n.sky-omnibar-environment {\n background-color: #e1e1e3;\n color: #282b31;\n font-family: "Blackbaud Sans", "Open Sans", "Helvetica Neue", Arial, sans-serif;\n font-size: 12px;\n font-weight: 400;\n height: 0;\n line-height: 24px;\n overflow: hidden;\n padding: 0 15px;\n text-align: right;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.sky-omnibar-environment-visible .sky-omnibar-environment {\n height: 24px;\n}\n')}(),(o=document.createElement("div")).className="sky-omnibar-placeholder "+k,o.innerHTML='<div class="sky-omnibar-placeholder-accent"></div>',document.body.appendChild(o),(i=document.createElement("div")).className="sky-omnibar-environment",h.BBAuthDomUtility.addElToBodyTop(i),I(),window.addEventListener("message",C)}))},e.update=function(e){m.BBAuthInterop.postOmnibarMessage(a,{messageType:"update",updateArgs:e})},e.destroy=function(){B.BBOmnibarToastContainer.destroy(),y.BBOmnibarPushNotifications.disconnect(),h.BBAuthDomUtility.removeEl(o),h.BBAuthDomUtility.removeEl(a),h.BBAuthDomUtility.removeEl(i),h.BBAuthDomUtility.removeCss(r),window.removeEventListener("message",C),s=r=o=a=i=u=d=void 0},e}();n.BBOmnibar=R},function(e,n,t){"use strict";var i=t(16);function o(e){this.message=e}o.prototype=new Error,o.prototype.name="InvalidTokenError",e.exports=function(e,n){if("string"!=typeof e)throw new o("Invalid token specified");var t=!0===(n=n||{}).header?0:1;try{return JSON.parse(i(e.split(".")[t]))}catch(e){throw new o("Invalid token specified: "+e.message)}},e.exports.InvalidTokenError=o},function(e,n,t){var i=t(17);e.exports=function(e){var n=e.replace(/-/g,"+").replace(/_/g,"/");switch(n.length%4){case 0:break;case 2:n+="==";break;case 3:n+="=";break;default:throw"Illegal base64url string!"}try{return function(e){return decodeURIComponent(i(e).replace(/(.)/g,(function(e,n){var t=n.charCodeAt(0).toString(16).toUpperCase();return t.length<2&&(t="0"+t),"%"+t})))}(n)}catch(e){return i(n)}}},function(e,n){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function i(e){this.message=e}i.prototype=new Error,i.prototype.name="InvalidCharacterError",e.exports="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(e){var n=String(e).replace(/=+$/,"");if(n.length%4==1)throw new i("'atob' failed: The string to be decoded is not correctly encoded.");for(var o,r,a=0,s=0,c="";r=n.charAt(s++);~r&&(o=a%4?64*o+r:r,a++%4)?c+=String.fromCharCode(255&o>>(-2*a&6)):0)r=t.indexOf(r);return c}},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i,o,r,a,s,c,u,d,l,f,m,p,h,v,b=t(19),y=t(20),B=t(21),g=t(4),k=t(1),I="";function T(){d=Date.now()}function w(e){e.clientX===o&&e.clientY===r||(o=e.clientX,r=e.clientY,T())}function A(){var e=Date.now();(!l||e-l>C.MIN_RENEWAL_RETRY)&&(l=e,g.BBCsrfXhr.request("https://s21aidntoken00blkbapp01.nxt.blackbaud.com/session/renew",{inactivity:1}).catch((function(){})))}function O(){u=!0,c()}function E(){u=!1,T(),a()}function _(){v?k.BBAuthNavigator.navigate(v):k.BBAuthNavigator.redirectToSignoutForInactivity()}function N(){m||A(),f=setInterval((function(){y.BBOmnibarUserSessionExpiration.getSessionExpiration(I,h,m).then((function(e){b.BBOmnibarUserActivityProcessor.process({allowAnonymous:m,closeInactivityPrompt:E,expirationDate:e,inactivityPromptDuration:C.INACTIVITY_PROMPT_DURATION,isShowingInactivityPrompt:u,lastActivity:d,maxSessionAge:C.MAX_SESSION_AGE,minRenewalAge:C.MIN_RENEWAL_AGE,redirectForInactivity:_,renewSession:A,showInactivityPrompt:O})}))}),C.ACTIVITY_TIMER_INTERVAL)}var C=function(){function e(){}return e.startTracking=function(n,t,o,r,u){i&&r===m&&u===p||(e.stopTracking(),s=n,c=t,a=o,m=r,p=u,document.addEventListener("keypress",T),document.addEventListener("mousemove",w),N(),B.BBOmnibarUserSessionWatcher.start(r,u,s,(function(e){h=e.legacyTtl,I=e.refreshId,v=e.legacySigninUrl})),i=!0)},e.userRenewedSession=function(){E(),A()},e.stopTracking=function(){B.BBOmnibarUserSessionWatcher.stop(),y.BBOmnibarUserSessionExpiration.reset(),document.removeEventListener("keypress",T),document.removeEventListener("mousemove",w),f&&(clearInterval(f),f=void 0),i=o=r=d=l=u=s=c=a=m=p=void 0},e.ACTIVITY_TIMER_INTERVAL=1e3,e.MIN_RENEWAL_RETRY=6e4,e.INACTIVITY_PROMPT_DURATION=12e4,e.MIN_RENEWAL_AGE=3e5,e.MAX_SESSION_AGE=54e5,e.IDENTITY_SECURITY_TOKEN_SERVICE_ORIGIN="https://s21aidntoken00blkbapp01.nxt.blackbaud.com",e}();n.BBOmnibarUserActivity=C},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(){}return e.process=function(e){var n=e.allowAnonymous,t=e.closeInactivityPrompt,i=e.expirationDate,o=e.inactivityPromptDuration,r=e.isShowingInactivityPrompt,a=e.lastActivity,s=e.maxSessionAge,c=e.minRenewalAge,u=e.redirectForInactivity,d=e.renewSession,l=e.showInactivityPrompt,f=Date.now();if(null!==i){!n&&f>i&&u();var m=i-o,p=i-s+c;r?f<m&&t():a>p?d():!n&&f>m&&l()}},e}();n.BBOmnibarUserActivityProcessor=i},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i,o=t(4);var r=function(){function e(){}return e.getSessionExpiration=function(e,n,t){var r=function(e,n){if(i&&i.refreshId===e&&i.allowAnonymous===n)return i.promise;var t=new Promise((function(e,t){o.BBCsrfXhr.request("https://s21aidntoken00blkbapp01.nxt.blackbaud.com/session/ttl",void 0,n).then((function(n){var t=null===n?null:Date.now()+1e3*n;e(t)}),(function(){e(null)}))}));return i={allowAnonymous:n,promise:t,refreshId:e},t}(e,t);return new Promise((function(e,t){r.then((function(t){var i;if(null===t)i=null;else if("number"==typeof n){var o=Date.now()+n;i=Math.min(t,o)}else i=t;e(i)}))}))},e.reset=function(){i=void 0},e}();n.BBOmnibarUserSessionExpiration=r},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i,o,r,a,s,c,u,d,l=t(3),f=t(1),m={};function p(e){if(e){var n=e.split("://");return n[0]+"://"+n[1].split("/")[0]}}function h(e,n){var t=document.createElement("iframe");return t.className=e,t.width="0",t.height="0",t.frameBorder="0",t.src=n,t.tabIndex=-1,t.setAttribute("aria-hidden","true"),document.body.appendChild(t),t}function v(){var e=B.IDENTITY_SECURITY_TOKEN_SERVICE_ORIGIN+"/SessionWatcher.html?origin="+encodeURIComponent(location.origin);c=h("sky-omnibar-iframe-session-watcher",e)}function b(e){if("string"==typeof e.data){var n=void 0;try{n=JSON.parse(e.data)}catch(e){return}if("session_change"===n.messageType){var t=n.message,i=t&&t.sessionId,c=t&&t.refreshId;i||s||(d?f.BBAuthNavigator.navigate(d):f.BBAuthNavigator.redirectToSignin()),void 0!==m.refreshId&&c!==m.refreshId&&function(e){u&&l.BBAuthInterop.postOmnibarMessage(u,e,p(o))}({messageType:"session-refresh"}),void 0!==m.sessionId&&i!==m.sessionId&&r(),m.refreshId=c,m.sessionId=i,a(m)}}}function y(e){switch(e.origin){case B.IDENTITY_SECURITY_TOKEN_SERVICE_ORIGIN:b(e);break;case p(o):!function(e){var n=e.data;switch(n.messageType){case"ready":m.legacyTtl=n.ttl,d=n.signinUrl,a(m)}}(e)}}var B=function(){function e(){}return e.start=function(n,t,c,d){i&&n===s&&t===o||(e.stop(),s=n,r=c,o=t,a=d,v(),o&&(u=h("sky-omnibar-iframe-legacy-keep-alive",o)),window.addEventListener("message",y,!1),i=!0)},e.stop=function(){window.removeEventListener("message",y,!1),c&&(document.body.removeChild(c),c=void 0),u&&(document.body.removeChild(u),u=void 0),m={},i=s=r=o=d=a=void 0},e.IDENTITY_SECURITY_TOKEN_SERVICE_ORIGIN="https://s21aidntoken00blkbapp01.nxt.blackbaud.com",e}();n.BBOmnibarUserSessionWatcher=B},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i,o,r,a=t(2),s=t(3);function c(e){if(s.BBAuthInterop.messageIsFromOmnibar(e))switch(e.data.messageType){case"ready":s.BBAuthInterop.postOmnibarMessage(o,{messageType:"host-ready"}),o.classList.add("sky-omnibar-inactivity-iframe-ready");break;case"session-renew":r()}}var u=function(){function e(){}return e.show=function(n){var t;this.hide(),r=n.sessionRenewCallback,i=a.BBAuthDomUtility.addCss("\n .sky-omnibar-inactivity-iframe {\n background-color: transparent;\n border: none;\n position: fixed;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n z-index: 100000;\n visibility: hidden;\n }\n\n .sky-omnibar-inactivity-iframe-ready {\n visibility: visible;\n }\n "),t=e.url,o=a.BBAuthDomUtility.addIframe(t,"sky-omnibar-inactivity-iframe","Inactivity Prompt"),window.addEventListener("message",c)},e.hide=function(){o&&(a.BBAuthDomUtility.removeEl(o),a.BBAuthDomUtility.removeCss(i),o=i=r=void 0,window.removeEventListener("message",c))},e.url="https://host.nxt.blackbaud.com/omnibar/inactivity",e}();n.BBOmnibarUserActivityPrompt=u},function(e,n,t){"use strict";var i=this&&this.__awaiter||function(e,n,t,i){return new(t||(t=Promise))((function(o,r){function a(e){try{c(i.next(e))}catch(e){r(e)}}function s(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){e.done?o(e.value):new t((function(n){n(e.value)})).then(a,s)}c((i=i.apply(e,n||[])).next())}))},o=this&&this.__generator||function(e,n){var t,i,o,r,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(t)throw new TypeError("Generator is already executing.");for(;a;)try{if(t=1,i&&(o=2&r[0]?i.return:r[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,i=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){a=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){a.label=r[1];break}if(6===r[0]&&a.label<o[1]){a.label=o[1],o=r;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(r);break}o[2]&&a.ops.pop(),a.trys.pop();continue}r=n.call(e,a)}catch(e){r=[6,e],i=0}finally{t=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,s])}}};Object.defineProperty(n,"__esModule",{value:!0});var r,a=t(0),s=t(6),c=function(){function e(){}return e.connect=function(e,n,t){return i(this,void 0,void 0,(function(){return o(this,(function(i){return r||(r=window.BBNotificationsClient?Promise.resolve():s.BBOmnibarScriptLoader.registerScript(this.NOTIFICATIONS_CLIENT_URL)),[2,r.then((function(){BBNotificationsClient.BBNotifications.init({tokenCallback:function(){return a.BBAuth.getToken({disableRedirect:!0,envId:n,leId:e})}}),BBNotificationsClient.BBNotifications.addListener(t)}))]}))}))},e.disconnect=function(){return i(this,void 0,void 0,(function(){return o(this,(function(e){return r?[2,r.then((function(){BBNotificationsClient.BBNotifications.destroy(),r=void 0}))]:[2,Promise.resolve()]}))}))},e.updateNotifications=function(e){BBNotificationsClient.BBNotifications.updateNotifications(e)},e.NOTIFICATIONS_CLIENT_URL="https://sky.blackbaudcdn.net/static/notifications-client/1/notifications-client.global.min.js",e}();n.BBOmnibarPushNotifications=c},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i,o,r,a,s,c=t(2),u=t(3),d="sky-omnibar-toast-container",l=d+"-ready",f=d+"-empty";function m(){return o||(i=c.BBAuthDomUtility.addCss("\n."+d+" {\n border: none;\n display: none;\n position: fixed;\n bottom: 0px;\n right: 0px;\n height: 0px;\n width: 300px;\n}\n\n."+l+" {\n display: block;\n}\n\n."+f+" {\n visibility: hidden;\n}\n"),(o=document.createElement("iframe")).src=h.CONTAINER_URL,o.className=d+" "+f,o.title="Toast container",document.body.appendChild(o),window.addEventListener("message",p)),o}function p(e){if(u.BBAuthInterop.messageIsFromOmnibar(e)){var n=e.data;switch(n.messageType){case"toast-ready":u.BBAuthInterop.postOmnibarMessage(o,{messageType:"host-ready"}),o.classList.add(l),a();break;case"toast-container-change":n.height>0?(o.style.height=n.height+"px",o.classList.remove(f)):o.classList.add(f);break;case"push-notifications-open":s()}}}var h=function(){function e(){}return e.init=function(e){return s=e,r||(r=new Promise((function(e){a=e,m()}))),r},e.showNewNotifications=function(e){u.BBAuthInterop.postOmnibarMessage(o,{messageType:"push-notifications-update",pushNotifications:e})},e.destroy=function(){i&&c.BBAuthDomUtility.removeCss(i),o&&c.BBAuthDomUtility.removeEl(o),s=o=r=a=i=void 0,window.removeEventListener("message",p)},e.CONTAINER_URL="https://host.nxt.blackbaud.com/omnibar/toast",e}();n.BBOmnibarToastContainer=h},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t(6);function o(){return window.jQuery}var r=function(){function e(){}return e.load=function(e){return new Promise((function(n){var t=o(),r=t&&t.fn&&t.fn.jquery;i.BBOmnibarScriptLoader.smartRegisterScript("https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.0/jquery.js","2.1.0",r).then((function(){return i.BBOmnibarScriptLoader.registerScript("https://cdnjs.cloudflare.com/ajax/libs/easyXDM/2.4.17.1/easyXDM.min.js")})).then((function(){return i.BBOmnibarScriptLoader.registerScript("https://signin.blackbaud.com/Omnibar.min.js")})).then((function(){document.body.classList.add("bb-omnibar-height-padding");var t=document.createElement("div");t.setAttribute("data-omnibar-el",""),document.body.appendChild(t),(e=e||{})["z-index"]=1e3,e.afterLoad=n,e.menuEl&&(e.menuEl=o()(e.menuEl)),BBAUTH.Omnibar.load(t,e)}))}))},e}();n.BBOmnibarLegacy=r},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0})}]); |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.BBAuthClient=t():e.BBAuthClient=t()}(window,function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var s=t[o]={i:o,l:!1,exports:{}};return e[o].call(s.exports,s,s.exports,n),s.l=!0,s.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)n.d(o,s,function(t){return e[t]}.bind(null,s));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=6)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(1),s="https://signin.blackbaud.com/signin/",i="https://host.nxt.blackbaud.com/errors/",r=encodeURIComponent;function a(e){let t=`${s}?redirectUrl=${r(location.href)}`;return e&&(t+="&inactivity=1"),t}t.BBAuthNavigator=class{static navigate(e,t){t?location.replace(e):location.href=e}static redirectToSignin(e){let t=a();e&&(t+="&"+function(e){const t=[];for(const n in e)e.hasOwnProperty(n)&&t.push(`${r(n)}=${r(e[n])}`);return t.join("&")}(e)),this.navigate(t)}static redirectToSignoutForInactivity(){const e=a(!0),t=`${s}sign-out?redirectUrl=${r(e)}`;this.navigate(t)}static redirectToError(e){let t,n;switch(e){case o.BBAuthTokenErrorCode.InvalidEnvironment:n="invalid_env",t="security";break;default:t="broken"}let s=`${i}${t}?source=auth-client&url=${r(location.href)}`;n&&(s+=`&code=${r(n)}`),this.navigate(s)}}},function(e,t,n){"use strict";function o(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),o(n(7)),o(n(5))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o="https://s21aidntoken00blkbapp01.nxt.blackbaud.com/session/csrf",s=n(1),i=n(0);function r(e,t,n,o){return(o||void 0===o&&n)&&((e=e||{})[t]=n),e}function a(e,t,n,o,i){let a;return a=r(a,"environment_id",n),a=r(a,"legal_entity_id",i),a=r(a,"permission_scope",o,!(!n&&!i||!o)),new Promise((n,o)=>{!function(e,t,n,o,i){const r=new XMLHttpRequest;r.onreadystatechange=()=>{if(4===r.readyState)switch(r.status){case 0:i({code:s.BBAuthTokenErrorCode.Offline,message:"The user is offline."});break;case 200:o(r.responseText);break;case 401:i({code:s.BBAuthTokenErrorCode.NotLoggedIn,message:"The user is not logged in."});break;case 403:i({code:s.BBAuthTokenErrorCode.InvalidEnvironment,message:"The user is not a member of the specified environment."});break;default:r.status>=400&&i({code:s.BBAuthTokenErrorCode.Unspecified,message:"An unknown error occurred."})}},r.open("POST",e,!0),r.setRequestHeader(t.name,t.value),r.setRequestHeader("Accept","application/json"),r.setRequestHeader("Content-Type","application/json"),r.withCredentials=!0,n?r.send(JSON.stringify(n)):r.send()}(e,{name:"X-CSRF",value:t},a,e=>{const t=e?JSON.parse(e):void 0;n(t)},o)})}t.BBCsrfXhr=class{static request(e,t,n,r,c,d,u){return!c||r||d?new Promise((l,m)=>{new Promise((e,t)=>{u?e({csrf_token:"token_needed"}):a(o,"token_needed").then(e).catch(t)}).then(t=>a(e,t.csrf_token,r,c,d)).then(l).catch(e=>{if(n||e.code===s.BBAuthTokenErrorCode.Offline)m(e);else switch(e.code){case s.BBAuthTokenErrorCode.NotLoggedIn:i.BBAuthNavigator.redirectToSignin(t);break;default:i.BBAuthNavigator.redirectToError(e.code)}})}):Promise.reject({code:s.BBAuthTokenErrorCode.PermissionScopeNoEnvironment,message:"You must also specify an environment or legal entity when specifying a permission scope."})}static requestWithToken(e,t){return new Promise((n,o)=>{const s=new XMLHttpRequest;s.onreadystatechange=()=>{if(4===s.readyState)switch(s.status){case 200:n(JSON.parse(s.responseText));break;default:o()}},s.open("GET",e,!0),s.setRequestHeader("Authorization","Bearer "+t),s.setRequestHeader("Accept","application/json"),s.send()})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.BBAuthDomUtility=class{static addCss(e){const t=document.createElement("style");return t.appendChild(document.createTextNode(e)),document.head.appendChild(t),t}static addIframe(e,t,n){const o=document.createElement("iframe");return o.className=t,o.title=n,o.src=e,this.addElToBodyTop(o),o}static removeCss(e){this.removeEl(e,document.head)}static removeEl(e,t=document.body){t.contains(e)&&t.removeChild(e)}static addElToBodyTop(e){const t=document.body;t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o="https://host.nxt.blackbaud.com";t.BBAuthInterop=class{static postOmnibarMessage(e,t,n){t.source="auth-client",e.contentWindow.postMessage(t,n||o)}static messageIsFromOmnibar(e){if(e.origin===o){const t=e.data;return!!t&&"skyux-spa-omnibar"===t.source}return!1}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Unspecified=0]="Unspecified",e[e.NotLoggedIn=1]="NotLoggedIn",e[e.InvalidEnvironment=2]="InvalidEnvironment",e[e.PermissionScopeNoEnvironment=3]="PermissionScopeNoEnvironment",e[e.Offline=4]="Offline"}(t.BBAuthTokenErrorCode||(t.BBAuthTokenErrorCode={}))},function(e,t,n){"use strict";function o(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),o(n(1)),o(n(10)),o(n(12))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(8),s=/1bb:\/\/([a-z]{3})-([a-z0-9]{5})(-[a-z]{4}[0-9]{2})?\/(.*)/;class i{static getUrl(e,t){const n=s.exec(e);let o=e,i=t?t.zone:void 0;return i&&(i=i.replace("-","")),n&&(n[3]&&(i=n[3].substring(1)),o=`https://${n[1]}-${i}.app.blackbaud.net/${n[2]}/${n[4]}`),Promise.resolve(o)}static getToken(e){return i.getTokenInternal(e)}static clearTokenCache(){i.tokenCache={}}static getTokenInternal(e){e=e||{};const{forceNewToken:t,disableRedirect:n}=e;if(i.mock)return Promise.resolve("mock_access_token_auth-client@blackbaud.com");const s=function(e){const{envId:t,permissionScope:n,leId:o}=e;return"token|"+(o||"-")+"|"+(t||"-")+"|"+(n||"-")}(e),r=i.tokenCache[s]=i.tokenCache[s]||{},a=(new Date).valueOf();return!t&&r.lastToken&&r.expirationTime&&r.expirationTime-a>6e4?Promise.resolve(r.lastToken):(r.pendingLookupPromise||(r.pendingLookupPromise=o.BBAuthTokenIntegration.getToken(n,e.envId,e.permissionScope,e.leId).then(e=>(r.expirationTime=(new Date).valueOf()+1e3*e.expires_in,r.lastToken=e.access_token,r.pendingLookupPromise=null,r.lastToken)).catch(e=>{throw r.pendingLookupPromise=null,e})),r.pendingLookupPromise)}}i.mock=!1,i.tokenCache={},t.BBAuth=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(2),s=n(9);t.BBAuthTokenIntegration=class{static getToken(e,t,n,i){return this.hostNameEndsWith("blackbaud.com")?o.BBCsrfXhr.request("https://s21aidntoken00blkbapp01.nxt.blackbaud.com/oauth2/token",void 0,e,t,n,i,!0):s.BBAuthCrossDomainIframe.getToken({disableRedirect:e,envId:t,leId:i,permissionScope:n})}static hostNameEndsWith(e){return this.getLocationHostname().substr(-e.length)===e}static getLocationHostname(){return window.location.hostname}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(3),s=n(0),i=n(5),r="https://s21aidntoken00blkbapp01.nxt.blackbaud.com/Iframes/CrossDomainAuthFrame.html",a="security-token-svc",c="auth-client";class d{static reset(){this.requestCounter=0,this.tokenRequests={},this.iframeReadyPromise=new Promise(e=>this.iframeReadyResolve=e),this.listenerSetup=!1}static TARGET_ORIGIN(){return this.TARGETORIGIN}static getOrMakeIframe(){return d.iframeEl=document.getElementById("auth-cross-domain-iframe"),d.iframeEl||(d.iframeEl=o.BBAuthDomUtility.addIframe(r,"auth-cross-domain-iframe",""),d.iframeEl.id="auth-cross-domain-iframe",d.iframeEl.hidden=!0),d.iframeEl}static getToken(e){return this.setupListenersForIframe(),this.getTokenFromIframe(this.getOrMakeIframe(),e)}static setupListenersForIframe(){this.listenerSetup||(window.addEventListener("message",e=>{const t=e.data,n=t.requestId,o=this.tokenRequests[n];if(t.source===a||t.origin===this.TARGET_ORIGIN())switch(t.messageType){case"ready":this.iframeReadyResolve(!0);break;case"error":this.handleErrorMessage(t.value,o.reject,o.args.disableRedirect);break;case"getToken":const e={access_token:t.value,expires_in:0};o.resolve(e)}}),this.listenerSetup=!0)}static getTokenFromIframe(e,t){return new Promise((n,o)=>{const s=this.requestCounter++;d.tokenRequests[s]={args:t,reject:o,resolve:n},d.iframeReadyPromise.then(()=>{e.contentWindow.postMessage({messageType:"getToken",requestId:s,source:c,value:t},d.TARGET_ORIGIN())})})}static handleErrorMessage(e,t,n){if(n)t(e);else switch(e.code){case i.BBAuthTokenErrorCode.Offline:t(e);break;case i.BBAuthTokenErrorCode.NotLoggedIn:s.BBAuthNavigator.redirectToSignin(void 0);break;default:s.BBAuthNavigator.redirectToError(e.code)}}}d.listenerSetup=!1,d.iframeReadyPromise=new Promise(e=>d.iframeReadyResolve=e),d.tokenRequests={},d.requestCounter=0,d.TARGETORIGIN="https://s21aidntoken00blkbapp01.nxt.blackbaud.com",t.BBAuthCrossDomainIframe=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(11))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(1),s=n(4),i=n(2),r=n(3),a=n(0);function c(e,t,n,i){let a,c;function d(){r.BBAuthDomUtility.removeEl(c),r.BBAuthDomUtility.removeCss(a),c=a=void 0,window.removeEventListener("message",l)}function l(r){if(!s.BBAuthInterop.messageIsFromOmnibar(r))return;const a=r.data;switch(a.messageType){case"ready":s.BBAuthInterop.postOmnibarMessage(c,{messageType:"host-ready"}),s.BBAuthInterop.postOmnibarMessage(c,{contextDestinations:t,messageType:"context-provide"});break;case"get-token":u=a.tokenRequestId,l=a.disableRedirect,o.BBAuth.getToken({disableRedirect:l}).then(e=>{s.BBAuthInterop.postOmnibarMessage(c,{messageType:"token",token:e,tokenRequestId:u})},e=>{s.BBAuthInterop.postOmnibarMessage(c,{messageType:"token-fail",reason:e,tokenRequestId:u})});break;case"welcome-cancel":d(),i({reason:"canceled"});break;case"welcome-environment-selected":d(),setTimeout(()=>{e.envId=a.envId,n(e)},10)}var u,l}a=r.BBAuthDomUtility.addCss("\n.sky-omnibar-welcome-iframe {\n background-color: #fff;\n border: none;\n position: fixed;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n z-index: 10000;\n}\n"),function(){const t=u.url+"?hosted=1&svcid="+encodeURIComponent(e.svcId)+"&url="+encodeURIComponent(e.url);c=r.BBAuthDomUtility.addIframe(t,"sky-omnibar-welcome-iframe","Welcome")}(),window.addEventListener("message",l)}function d(){a.BBAuthNavigator.redirectToError(o.BBAuthTokenErrorCode.InvalidEnvironment)}class u{static ensureContext(e){const{envId:t,envIdRequired:n,leId:s,leIdRequired:r,svcId:a}=e;return!t&&n||!s&&r?new Promise((t,n)=>{a?o.BBAuth.getToken().then(o=>{let s="https://s21anavnavaf00blkbapp01.sky.blackbaud.com/user/destinations?svcid="+encodeURIComponent(a);e.url&&(s+="&referringurl="+encodeURIComponent(e.url)),i.BBCsrfXhr.requestWithToken(s,o).then(o=>{const s=o&&o.items,i=s&&s.length;1===i?(e.url=s[0].url,t(e)):i>1?c(e,o,t,n):d()})}):d()}):Promise.resolve(e)}}u.url="https://host.nxt.blackbaud.com/omnibar/welcome",t.BBContextProvider=u},function(e,t,n){"use strict";function o(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),o(n(13)),o(n(19)),o(n(21))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(1),s=n(4),i=n(14),r=n(18),a=n(0),c=n(3),d="sky-omnibar-iframe-expanded",u="sky-omnibar-loading";let l,m,p,h,f,b,v;function y(){h=c.BBAuthDomUtility.addIframe(f.url||"https://host.nxt.blackbaud.com/omnibar/",`sky-omnibar-iframe ${u}`,"Navigation")}function g(){s.BBAuthInterop.postOmnibarMessage(h,{href:document.location.href,messageType:"location-change"})}function B(){function e(e){s.BBAuthInterop.postOmnibarMessage(h,{messageType:"refresh-user",token:e})}o.BBAuth.clearTokenCache(),o.BBAuth.getToken({disableRedirect:!0,forceNewToken:!0}).then(e).catch(()=>e(void 0))}function k(){r.BBOmnibarUserActivityPrompt.show({sessionRenewCallback:()=>{i.BBOmnibarUserActivity.userRenewedSession()}})}function I(){r.BBOmnibarUserActivityPrompt.hide()}function T(){i.BBOmnibarUserActivity.startTracking(B,k,I,f.allowAnonymous,b)}function A(e){if(!s.BBAuthInterop.messageIsFromOmnibar(e))return;const t=e.data,n=f.nav;switch(t.messageType){case"ready":s.BBAuthInterop.postOmnibarMessage(h,{messageType:"host-ready"}),function(){const e=history.pushState,t=history.replaceState;history.pushState=function(){const t=e.apply(history,arguments);return g(),t},history.replaceState=function(){const e=t.apply(history,arguments);return g(),e}}(),s.BBAuthInterop.postOmnibarMessage(h,{compactNavOnly:f.compactNavOnly,enableHelp:f.enableHelp,envId:f.envId,hideResourceLinks:f.hideResourceLinks,leId:f.leId,localNavItems:n&&n.localNavItems,localNotifications:!!f.notifications,localSearch:!!f.onSearch,messageType:"nav-ready",navVersion:f.navVersion,services:n&&n.services,svcId:f.svcId,theme:f.theme}),function(){const e=f.notifications;e&&e.onReady({updateNotifications:e=>{s.BBAuthInterop.postOmnibarMessage(h,{messageType:"notifications-update",notifications:e})}})}(),g(),v();break;case"display-ready":m.classList.remove(u),h.classList.remove(u);break;case"expand":h.classList.add(d);break;case"collapse":h.classList.remove(d);break;case"navigate-url":a.BBAuthNavigator.navigate(t.url);break;case"navigate":const e=t.navItem;n&&n.beforeNavCallback&&!1===n.beforeNavCallback(e)||a.BBAuthNavigator.navigate(e.url);break;case"search":p=t.searchArgs,f.onSearch&&f.onSearch(p).then(e=>{s.BBAuthInterop.postOmnibarMessage(h,{messageType:"search-results",results:e})});break;case"get-token":r=t.tokenRequestId,c=t.disableRedirect,o.BBAuth.getToken({disableRedirect:c}).then(e=>{T(),s.BBAuthInterop.postOmnibarMessage(h,{messageType:"token",token:e,tokenRequestId:r})},e=>{T(),s.BBAuthInterop.postOmnibarMessage(h,{messageType:"token-fail",reason:e,tokenRequestId:r})});break;case"help-open":!function(){const e=window.BBHELP;e&&e.HelpWidget.open()}();break;case"notification-read":!function(e){const t=f.notifications;t&&t.onNotificationRead&&t.onNotificationRead(e)}(t.notification);break;case"session-renew":i.BBOmnibarUserActivity.userRenewedSession();break;case"environment-update":!function(e){const t="sky-omnibar-environment-visible",n=document.body.classList;e=e||"",l.innerText=e,e?n.add(t):n.remove(t)}(t.name);break;case"legacy-keep-alive-url-change":b=t.url,T()}var r,c,p}t.BBOmnibar=class{static load(e){return f=f=e,b=f.legacyKeepAliveUrl,new Promise(e=>{v=e,function(){let e="background: linear-gradient(to right, #71bf44 0, #31b986 50%, #00b2ec 100%);",t="#4d5259";const n=f.theme;if(n){const o=n.accent;t=n.backgroundColor||t,!1===o?e="display: none;":o&&o.color&&(e=`background-color: ${o.color};`)}p=c.BBAuthDomUtility.addCss(`\nbody {\n margin-top: 50px;\n}\n\n#bb-help-container {\n padding-top: 1px;\n}\n\n.sky-omnibar-iframe,\n.sky-omnibar-placeholder {\n border: none;\n height: 50px;\n width: 100%;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n z-index: 1000;\n}\n\n.sky-omnibar-placeholder {\n background-color: ${t};\n display: none;\n}\n\n.sky-omnibar-placeholder-accent {\n height: 5px;\n ${e}\n}\n\n.sky-omnibar-placeholder.sky-omnibar-loading {\n display: block;\n}\n\n.sky-omnibar-iframe.sky-omnibar-loading {\n visibility: hidden;\n}\n\n.sky-omnibar-iframe-expanded {\n height: 100%;\n}\n\n.sky-omnibar-environment {\n background-color: #e1e1e3;\n color: #282b31;\n font-family: "Blackbaud Sans", "Open Sans", "Helvetica Neue", Arial, sans-serif;\n font-size: 12px;\n font-weight: 400;\n height: 0;\n line-height: 24px;\n overflow: hidden;\n padding: 0 15px;\n text-align: right;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.sky-omnibar-environment-visible .sky-omnibar-environment {\n height: 24px;\n}\n`)}(),(m=document.createElement("div")).className=`sky-omnibar-placeholder ${u}`,m.innerHTML='<div class="sky-omnibar-placeholder-accent"></div>',document.body.appendChild(m),(l=document.createElement("div")).className="sky-omnibar-environment",c.BBAuthDomUtility.addElToBodyTop(l),y(),window.addEventListener("message",A)})}static update(e){s.BBAuthInterop.postOmnibarMessage(h,{messageType:"update",updateArgs:e})}static destroy(){c.BBAuthDomUtility.removeCss(p),c.BBAuthDomUtility.removeEl(m),c.BBAuthDomUtility.removeEl(h),c.BBAuthDomUtility.removeEl(l),window.removeEventListener("message",A),f=p=m=h=l=v=void 0}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(15),s=n(16),i=n(17),r=n(2),a=n(0);let c,d,u,l,m,p,h,f,b,v,y,g,B,k,I="";function T(){f=Date.now()}function A(e){e.clientX===d&&e.clientY===u||(d=e.clientX,u=e.clientY,T())}function E(){const e=Date.now();(!b||e-b>R.MIN_RENEWAL_RETRY)&&(b=e,r.BBCsrfXhr.request("https://s21aidntoken00blkbapp01.nxt.blackbaud.com/session/renew",{inactivity:1}).catch(()=>void 0))}function O(){h=!0,p()}function w(){h=!1,T(),l()}function _(){k?a.BBAuthNavigator.navigate(k):a.BBAuthNavigator.redirectToSignoutForInactivity()}class R{static startTracking(e,t,n,r,a){c&&r===y&&a===g||(R.stopTracking(),m=e,p=t,l=n,y=r,g=a,document.addEventListener("keypress",T),document.addEventListener("mousemove",A),y||E(),v=setInterval(()=>{s.BBOmnibarUserSessionExpiration.getSessionExpiration(I,B,y).then(e=>{o.BBOmnibarUserActivityProcessor.process({allowAnonymous:y,closeInactivityPrompt:w,expirationDate:e,inactivityPromptDuration:R.INACTIVITY_PROMPT_DURATION,isShowingInactivityPrompt:h,lastActivity:f,maxSessionAge:R.MAX_SESSION_AGE,minRenewalAge:R.MIN_RENEWAL_AGE,redirectForInactivity:_,renewSession:E,showInactivityPrompt:O})})},R.ACTIVITY_TIMER_INTERVAL),i.BBOmnibarUserSessionWatcher.start(r,a,m,e=>{B=e.legacyTtl,I=e.refreshId,k=e.legacySigninUrl}),c=!0)}static userRenewedSession(){w(),E()}static stopTracking(){i.BBOmnibarUserSessionWatcher.stop(),s.BBOmnibarUserSessionExpiration.reset(),document.removeEventListener("keypress",T),document.removeEventListener("mousemove",A),v&&(clearInterval(v),v=void 0),c=d=u=f=b=h=m=p=l=y=g=void 0}}R.ACTIVITY_TIMER_INTERVAL=1e3,R.MIN_RENEWAL_RETRY=6e4,R.INACTIVITY_PROMPT_DURATION=12e4,R.MIN_RENEWAL_AGE=3e5,R.MAX_SESSION_AGE=54e5,R.IDENTITY_SECURITY_TOKEN_SERVICE_ORIGIN="https://s21aidntoken00blkbapp01.nxt.blackbaud.com",t.BBOmnibarUserActivity=R},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.BBOmnibarUserActivityProcessor=class{static process(e){const{allowAnonymous:t,closeInactivityPrompt:n,expirationDate:o,inactivityPromptDuration:s,isShowingInactivityPrompt:i,lastActivity:r,maxSessionAge:a,minRenewalAge:c,redirectForInactivity:d,renewSession:u,showInactivityPrompt:l}=e,m=Date.now();if(null===o)return;!t&&m>o&&d();const p=o-s,h=o-a+c;i?m<p&&n():r>h?u():!t&&m>p&&l()}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(2);let s;t.BBOmnibarUserSessionExpiration=class{static getSessionExpiration(e,t,n){const i=function(e,t){if(s&&s.refreshId===e&&s.allowAnonymous===t)return s.promise;const n=new Promise((e,n)=>{o.BBCsrfXhr.request("https://s21aidntoken00blkbapp01.nxt.blackbaud.com/session/ttl",void 0,t).then(t=>{const n=null===t?null:Date.now()+1e3*t;e(n)},()=>{e(null)})});return s={allowAnonymous:t,promise:n,refreshId:e},n}(e,n);return new Promise((e,n)=>{i.then(n=>{let o;if(null===n)o=null;else if("number"==typeof t){const e=Date.now()+t;o=Math.min(n,e)}else o=n;e(o)})})}static reset(){s=void 0}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(4),s=n(0);let i,r,a,c,d,u,l,m,p={};function h(e){if(e){const t=e.split("://");return`${t[0]}://${t[1].split("/")[0]}`}}function f(e,t){const n=document.createElement("iframe");return n.className=e,n.width="0",n.height="0",n.frameBorder="0",n.src=t,n.tabIndex=-1,n.setAttribute("aria-hidden","true"),document.body.appendChild(n),n}function b(e){if("string"==typeof e.data){let t;try{t=JSON.parse(e.data)}catch(e){return}if("session_change"===t.messageType){const e=t.message,n=e&&e.sessionId,i=e&&e.refreshId;n||d||(m?s.BBAuthNavigator.navigate(m):s.BBAuthNavigator.redirectToSignin()),void 0!==p.refreshId&&i!==p.refreshId&&function(e){l&&o.BBAuthInterop.postOmnibarMessage(l,e,h(r))}({messageType:"session-refresh"}),void 0!==p.sessionId&&n!==p.sessionId&&a(),p.refreshId=i,p.sessionId=n,c(p)}}}function v(e){switch(e.origin){case y.IDENTITY_SECURITY_TOKEN_SERVICE_ORIGIN:b(e);break;case h(r):!function(e){const t=e.data;switch(t.messageType){case"ready":p.legacyTtl=t.ttl,m=t.signinUrl,c(p)}}(e)}}class y{static start(e,t,n,o){i&&e===d&&t===r||(y.stop(),d=e,a=n,r=t,c=o,function(){const e=y.IDENTITY_SECURITY_TOKEN_SERVICE_ORIGIN+"/SessionWatcher.html?origin="+encodeURIComponent(location.origin);u=f("sky-omnibar-iframe-session-watcher",e)}(),r&&(l=f("sky-omnibar-iframe-legacy-keep-alive",r)),window.addEventListener("message",v,!1),i=!0)}static stop(){window.removeEventListener("message",v,!1),u&&(document.body.removeChild(u),u=void 0),l&&(document.body.removeChild(l),l=void 0),p={},i=d=a=r=m=c=void 0}}y.IDENTITY_SECURITY_TOKEN_SERVICE_ORIGIN="https://s21aidntoken00blkbapp01.nxt.blackbaud.com",t.BBOmnibarUserSessionWatcher=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(3),s=n(4);let i,r,a;function c(e){if(!s.BBAuthInterop.messageIsFromOmnibar(e))return;switch(e.data.messageType){case"ready":s.BBAuthInterop.postOmnibarMessage(r,{messageType:"host-ready"}),r.classList.add("sky-omnibar-inactivity-iframe-ready");break;case"session-renew":a()}}class d{static show(e){this.hide(),a=e.sessionRenewCallback,i=o.BBAuthDomUtility.addCss("\n .sky-omnibar-inactivity-iframe {\n background-color: transparent;\n border: none;\n position: fixed;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n z-index: 100000;\n visibility: hidden;\n }\n\n .sky-omnibar-inactivity-iframe-ready {\n visibility: visible;\n }\n "),function(){const e=d.url;r=o.BBAuthDomUtility.addIframe(e,"sky-omnibar-inactivity-iframe","Inactivity Prompt")}(),window.addEventListener("message",c)}static hide(){r&&(o.BBAuthDomUtility.removeEl(r),o.BBAuthDomUtility.removeCss(i),r=i=a=void 0,window.removeEventListener("message",c))}}d.url="https://host.nxt.blackbaud.com/omnibar/inactivity",t.BBOmnibarUserActivityPrompt=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(20);function s(){return window.jQuery}t.BBOmnibarLegacy=class{static load(e){return new Promise(t=>{const n=s(),i=n&&n.fn&&n.fn.jquery;o.BBOmnibarScriptLoader.smartRegisterScript("https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.0/jquery.js","2.1.0",i).then(()=>o.BBOmnibarScriptLoader.registerScript("https://cdnjs.cloudflare.com/ajax/libs/easyXDM/2.4.17.1/easyXDM.min.js")).then(()=>o.BBOmnibarScriptLoader.registerScript("https://signin.blackbaud.com/Omnibar.min.js")).then(()=>{document.body.classList.add("bb-omnibar-height-padding");const n=document.createElement("div");n.setAttribute("data-omnibar-el",""),document.body.appendChild(n),(e=e||{})["z-index"]=1e3,e.afterLoad=t,e.menuEl&&(e.menuEl=s()(e.menuEl)),BBAUTH.Omnibar.load(n,e)})})}}},function(e,t,n){"use strict";function o(e){const t=e.split("."),n=[];for(const e of t){const t=parseInt(e,10)||0;n.push(t)}return n}Object.defineProperty(t,"__esModule",{value:!0});class s{static registerScript(e){return new Promise((t,n)=>{const o=document.createElement("script");o.onload=t,o.onerror=n,o.src=e,document.body.appendChild(o)})}static smartRegisterScript(e,t,n){return n&&function(e,t){const n=o(e),s=o(t);for(let e=0;e<n.length;e++)if(e<s.length){if(s[e]>n[e])return!0;if(s[e]<n[e])return!1}return!0}(t,n)?Promise.resolve():s.registerScript(e)}}t.BBOmnibarScriptLoader=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})}])}); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.BBAuthClient=t():e.BBAuthClient=t()}(window,(function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(o,i,function(t){return e[t]}.bind(null,i));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=7)}([function(e,t,n){"use strict";function o(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),o(n(8)),o(n(5))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(0),i="https://signin.blackbaud.com/signin/",s="https://host.nxt.blackbaud.com/errors/",r=encodeURIComponent;function a(e){let t=`${i}?redirectUrl=${r(location.href)}`;return e&&(t+="&inactivity=1"),t}t.BBAuthNavigator=class{static navigate(e,t){t?location.replace(e):location.href=e}static redirectToSignin(e){let t=a();e&&(t+="&"+function(e){const t=[];for(const n in e)e.hasOwnProperty(n)&&t.push(`${r(n)}=${r(e[n])}`);return t.join("&")}(e)),this.navigate(t)}static redirectToSignoutForInactivity(){const e=a(!0),t=`${i}sign-out?redirectUrl=${r(e)}`;this.navigate(t)}static redirectToError(e){let t,n;switch(e){case o.BBAuthTokenErrorCode.InvalidEnvironment:n="invalid_env",t="security";break;default:t="broken"}let i=`${s}${t}?source=auth-client&url=${r(location.href)}`;n&&(i+=`&code=${r(n)}`),this.navigate(i)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.BBAuthDomUtility=class{static addCss(e){const t=document.createElement("style");return t.appendChild(document.createTextNode(e)),document.head.appendChild(t),t}static addIframe(e,t,n){const o=document.createElement("iframe");return o.className=t,o.title=n,o.src=e,this.addElToBodyTop(o),o}static removeCss(e){this.removeEl(e,document.head)}static removeEl(e,t=document.body){t.contains(e)&&t.removeChild(e)}static addElToBodyTop(e){const t=document.body;t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o="https://host.nxt.blackbaud.com";t.BBAuthInterop=class{static postOmnibarMessage(e,t,n){t.source="auth-client",e.contentWindow.postMessage(t,n||o)}static messageIsFromOmnibar(e){if(e.origin===o){const t=e.data;return!!t&&"skyux-spa-omnibar"===t.source}return!1}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o="https://s21aidntoken00blkbapp01.nxt.blackbaud.com/session/csrf",i=n(0),s=n(1);function r(e,t,n,o){return(o||void 0===o&&n)&&((e=e||{})[t]=n),e}function a(e,t,n,o,s){let a;return a=r(a,"environment_id",n),a=r(a,"legal_entity_id",s),a=r(a,"permission_scope",o,!(!n&&!s||!o)),new Promise((n,o)=>{!function(e,t,n,o,s){const r=new XMLHttpRequest;r.onreadystatechange=()=>{if(4===r.readyState)switch(r.status){case 0:s({code:i.BBAuthTokenErrorCode.Offline,message:"The user is offline."});break;case 200:o(r.responseText);break;case 401:s({code:i.BBAuthTokenErrorCode.NotLoggedIn,message:"The user is not logged in."});break;case 403:s({code:i.BBAuthTokenErrorCode.InvalidEnvironment,message:"The user is not a member of the specified environment."});break;default:r.status>=400&&s({code:i.BBAuthTokenErrorCode.Unspecified,message:"An unknown error occurred."})}},r.open("POST",e,!0),r.setRequestHeader(t.name,t.value),r.setRequestHeader("Accept","application/json"),r.setRequestHeader("Content-Type","application/json"),r.withCredentials=!0,n?r.send(JSON.stringify(n)):r.send()}(e,{name:"X-CSRF",value:t},a,e=>{const t=e?JSON.parse(e):void 0;n(t)},o)})}t.BBCsrfXhr=class{static request(e,t,n,r,c,d,u){return!c||r||d?new Promise((l,m)=>{new Promise((e,t)=>{u?e({csrf_token:"token_needed"}):a(o,"token_needed").then(e).catch(t)}).then(t=>a(e,t.csrf_token,r,c,d)).then(l).catch(e=>{if(n||e.code===i.BBAuthTokenErrorCode.Offline)m(e);else switch(e.code){case i.BBAuthTokenErrorCode.NotLoggedIn:s.BBAuthNavigator.redirectToSignin(t);break;default:s.BBAuthNavigator.redirectToError(e.code)}})}):Promise.reject({code:i.BBAuthTokenErrorCode.PermissionScopeNoEnvironment,message:"You must also specify an environment or legal entity when specifying a permission scope."})}static requestWithToken(e,t){return new Promise((n,o)=>{const i=new XMLHttpRequest;i.onreadystatechange=()=>{if(4===i.readyState)switch(i.status){case 200:n(JSON.parse(i.responseText));break;default:o()}},i.open("GET",e,!0),i.setRequestHeader("Authorization","Bearer "+t),i.setRequestHeader("Accept","application/json"),i.send()})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Unspecified=0]="Unspecified",e[e.NotLoggedIn=1]="NotLoggedIn",e[e.InvalidEnvironment=2]="InvalidEnvironment",e[e.PermissionScopeNoEnvironment=3]="PermissionScopeNoEnvironment",e[e.Offline=4]="Offline"}(t.BBAuthTokenErrorCode||(t.BBAuthTokenErrorCode={}))},function(e,t,n){"use strict";function o(e){const t=e.split("."),n=[];for(const e of t){const t=parseInt(e,10)||0;n.push(t)}return n}Object.defineProperty(t,"__esModule",{value:!0});class i{static registerScript(e){return new Promise((t,n)=>{const o=document.createElement("script");o.onload=t,o.onerror=n,o.src=e,document.body.appendChild(o)})}static smartRegisterScript(e,t,n){return n&&function(e,t){const n=o(e),i=o(t);for(let e=0;e<n.length;e++)if(e<i.length){if(i[e]>n[e])return!0;if(i[e]<n[e])return!1}return!0}(t,n)?Promise.resolve():i.registerScript(e)}}t.BBOmnibarScriptLoader=i},function(e,t,n){"use strict";function o(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),o(n(0)),o(n(11)),o(n(13))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(9),i=/1bb:\/\/([a-z]{3})-([a-z0-9]{5})(-[a-z]{4}[0-9]{2})?\/(.*)/;class s{static getUrl(e,t){const n=i.exec(e);let o=e,s=t?t.zone:void 0;return s&&(s=s.replace("-","")),n&&(n[3]&&(s=n[3].substring(1)),o=`https://${n[1]}-${s}.app.blackbaud.net/${n[2]}/${n[4]}`),Promise.resolve(o)}static getToken(e){return s.getTokenInternal(e)}static clearTokenCache(){s.tokenCache={}}static getTokenInternal(e){e=e||{};const{forceNewToken:t,disableRedirect:n}=e;if(s.mock)return Promise.resolve("mock_access_token_auth-client@blackbaud.com");const i=function(e){const{envId:t,permissionScope:n,leId:o}=e;return"token|"+(o||"-")+"|"+(t||"-")+"|"+(n||"-")}(e),r=s.tokenCache[i]=s.tokenCache[i]||{},a=(new Date).valueOf();return!t&&r.lastToken&&r.expirationTime&&r.expirationTime-a>6e4?Promise.resolve(r.lastToken):(r.pendingLookupPromise||(r.pendingLookupPromise=o.BBAuthTokenIntegration.getToken(n,e.envId,e.permissionScope,e.leId).then(e=>(r.expirationTime=(new Date).valueOf()+1e3*e.expires_in,r.lastToken=e.access_token,r.pendingLookupPromise=null,r.lastToken)).catch(e=>{throw r.pendingLookupPromise=null,e})),r.pendingLookupPromise)}}s.mock=!1,s.tokenCache={},t.BBAuth=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(4),i=n(10);t.BBAuthTokenIntegration=class{static getToken(e,t,n,s){return this.hostNameEndsWith("blackbaud.com")?o.BBCsrfXhr.request("https://s21aidntoken00blkbapp01.nxt.blackbaud.com/oauth2/token",void 0,e,t,n,s,!0):i.BBAuthCrossDomainIframe.getToken({disableRedirect:e,envId:t,leId:s,permissionScope:n})}static hostNameEndsWith(e){return this.getLocationHostname().substr(-e.length)===e}static getLocationHostname(){return window.location.hostname}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(2),i=n(1),s=n(5),r="https://s21aidntoken00blkbapp01.nxt.blackbaud.com/Iframes/CrossDomainAuthFrame.html",a="security-token-svc",c="auth-client";class d{static reset(){this.requestCounter=0,this.tokenRequests={},this.iframeReadyPromise=new Promise(e=>this.iframeReadyResolve=e),this.listenerSetup=!1}static TARGET_ORIGIN(){return this.TARGETORIGIN}static getOrMakeIframe(){return d.iframeEl=document.getElementById("auth-cross-domain-iframe"),d.iframeEl||(d.iframeEl=o.BBAuthDomUtility.addIframe(r,"auth-cross-domain-iframe",""),d.iframeEl.id="auth-cross-domain-iframe",d.iframeEl.hidden=!0),d.iframeEl}static getToken(e){return this.setupListenersForIframe(),this.getTokenFromIframe(this.getOrMakeIframe(),e)}static setupListenersForIframe(){this.listenerSetup||(window.addEventListener("message",e=>{const t=e.data,n=t.requestId,o=this.tokenRequests[n];if(t.source===a||t.origin===this.TARGET_ORIGIN())switch(t.messageType){case"ready":this.iframeReadyResolve(!0);break;case"error":this.handleErrorMessage(t.value,o.reject,o.args.disableRedirect);break;case"getToken":const e={access_token:t.value,expires_in:0};o.resolve(e)}}),this.listenerSetup=!0)}static getTokenFromIframe(e,t){return new Promise((n,o)=>{const i=this.requestCounter++;d.tokenRequests[i]={args:t,reject:o,resolve:n},d.iframeReadyPromise.then(()=>{e.contentWindow.postMessage({messageType:"getToken",requestId:i,source:c,value:t},d.TARGET_ORIGIN())})})}static handleErrorMessage(e,t,n){if(n)t(e);else switch(e.code){case s.BBAuthTokenErrorCode.Offline:t(e);break;case s.BBAuthTokenErrorCode.NotLoggedIn:i.BBAuthNavigator.redirectToSignin(void 0);break;default:i.BBAuthNavigator.redirectToError(e.code)}}}d.listenerSetup=!1,d.iframeReadyPromise=new Promise(e=>d.iframeReadyResolve=e),d.tokenRequests={},d.requestCounter=0,d.TARGETORIGIN="https://s21aidntoken00blkbapp01.nxt.blackbaud.com",t.BBAuthCrossDomainIframe=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(12))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(0),i=n(3),s=n(4),r=n(2),a=n(1);function c(e,t,n,s){let a,c;function d(){r.BBAuthDomUtility.removeEl(c),r.BBAuthDomUtility.removeCss(a),c=a=void 0,window.removeEventListener("message",l)}function l(r){if(!i.BBAuthInterop.messageIsFromOmnibar(r))return;const a=r.data;switch(a.messageType){case"ready":i.BBAuthInterop.postOmnibarMessage(c,{messageType:"host-ready"}),i.BBAuthInterop.postOmnibarMessage(c,{contextDestinations:t,messageType:"context-provide"});break;case"get-token":u=a.tokenRequestId,l=a.disableRedirect,o.BBAuth.getToken({disableRedirect:l}).then(e=>{i.BBAuthInterop.postOmnibarMessage(c,{messageType:"token",token:e,tokenRequestId:u})},e=>{i.BBAuthInterop.postOmnibarMessage(c,{messageType:"token-fail",reason:e,tokenRequestId:u})});break;case"welcome-cancel":d(),s({reason:"canceled"});break;case"welcome-environment-selected":d(),setTimeout(()=>{e.envId=a.envId,n(e)},10)}var u,l}a=r.BBAuthDomUtility.addCss("\n.sky-omnibar-welcome-iframe {\n background-color: #fff;\n border: none;\n position: fixed;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n z-index: 10000;\n}\n"),function(){const t=u.url+"?hosted=1&svcid="+encodeURIComponent(e.svcId)+"&url="+encodeURIComponent(e.url);c=r.BBAuthDomUtility.addIframe(t,"sky-omnibar-welcome-iframe","Welcome")}(),window.addEventListener("message",l)}function d(){a.BBAuthNavigator.redirectToError(o.BBAuthTokenErrorCode.InvalidEnvironment)}class u{static ensureContext(e){const{envId:t,envIdRequired:n,leId:i,leIdRequired:r,svcId:a}=e;return!t&&n||!i&&r?new Promise((t,n)=>{a?o.BBAuth.getToken().then(o=>{let i="https://s21anavnavaf00blkbapp01.sky.blackbaud.com/user/destinations?svcid="+encodeURIComponent(a);e.url&&(i+="&referringurl="+encodeURIComponent(e.url)),s.BBCsrfXhr.requestWithToken(i,o).then(o=>{const i=o&&o.items,s=i&&i.length;1===s?(e.url=i[0].url,t(e)):s>1?c(e,o,t,n):d()})}):d()}):Promise.resolve(e)}}u.url="https://host.nxt.blackbaud.com/omnibar/welcome",t.BBContextProvider=u},function(e,t,n){"use strict";function o(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),o(n(14)),o(n(25)),o(n(26))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(15),i=n(0),s=n(3),r=n(1),a=n(2),c=n(18),d=n(22),u=n(23),l=n(24),m="sky-omnibar-iframe-expanded",p="sky-omnibar-loading";let h,f,b,v,B,y,g,k;function I(){v=a.BBAuthDomUtility.addIframe(B.url||"https://host.nxt.blackbaud.com/omnibar/",`sky-omnibar-iframe ${p}`,"Navigation")}function T(){s.BBAuthInterop.postOmnibarMessage(v,{href:document.location.href,messageType:"location-change"})}function w(){s.BBAuthInterop.postOmnibarMessage(v,{messageType:"push-notifications-open"})}function A(){k||(k=!0,i.BBAuth.getToken({disableRedirect:!0,envId:B.envId,leId:B.leId,permissionScope:"Notifications"}).then(e=>{!function(e){let t=o(e)["1bb.entitlements"];return!!t&&(t=Array.isArray(t)?t:[t]).indexOf("notif")>-1}(e)?k=!1:l.BBOmnibarToastContainer.init(w).then(()=>{u.BBOmnibarPushNotifications.connect(B.leId,B.envId,e=>{s.BBAuthInterop.postOmnibarMessage(v,{messageType:"push-notifications-update",pushNotifications:e}),l.BBOmnibarToastContainer.showNewNotifications(e)})})}).catch(()=>{k=!1}))}function O(){function e(e){s.BBAuthInterop.postOmnibarMessage(v,{messageType:"refresh-user",token:e}),e?A():k&&(l.BBOmnibarToastContainer.destroy(),u.BBOmnibarPushNotifications.disconnect(),k=!1)}i.BBAuth.clearTokenCache(),i.BBAuth.getToken({disableRedirect:!0,forceNewToken:!0}).then(e).catch(()=>e(void 0))}function E(){d.BBOmnibarUserActivityPrompt.show({sessionRenewCallback:()=>{c.BBOmnibarUserActivity.userRenewedSession()}})}function _(){d.BBOmnibarUserActivityPrompt.hide()}function N(){c.BBOmnibarUserActivity.startTracking(O,E,_,B.allowAnonymous,y)}function C(e){if(!s.BBAuthInterop.messageIsFromOmnibar(e))return;const t=e.data,n=B.nav;switch(t.messageType){case"ready":s.BBAuthInterop.postOmnibarMessage(v,{messageType:"host-ready"}),function(){const e=history.pushState,t=history.replaceState;history.pushState=function(){const t=e.apply(history,arguments);return T(),t},history.replaceState=function(){const e=t.apply(history,arguments);return T(),e}}(),s.BBAuthInterop.postOmnibarMessage(v,{compactNavOnly:B.compactNavOnly,enableHelp:B.enableHelp,envId:B.envId,hideResourceLinks:B.hideResourceLinks,leId:B.leId,localNavItems:n&&n.localNavItems,localNotifications:!!B.notifications,localSearch:!!B.onSearch,messageType:"nav-ready",navVersion:B.navVersion,services:n&&n.services,svcId:B.svcId,theme:B.theme}),function(){const e=B.notifications;e&&e.onReady({updateNotifications:e=>{s.BBAuthInterop.postOmnibarMessage(v,{messageType:"notifications-update",notifications:e})}})}(),A(),T(),g();break;case"display-ready":f.classList.remove(p),v.classList.remove(p);break;case"expand":v.classList.add(m);break;case"collapse":v.classList.remove(m);break;case"navigate-url":r.BBAuthNavigator.navigate(t.url);break;case"navigate":const e=t.navItem;n&&n.beforeNavCallback&&!1===n.beforeNavCallback(e)||r.BBAuthNavigator.navigate(e.url);break;case"search":l=t.searchArgs,B.onSearch&&B.onSearch(l).then(e=>{s.BBAuthInterop.postOmnibarMessage(v,{messageType:"search-results",results:e})});break;case"get-token":a=t.tokenRequestId,d=t.disableRedirect,i.BBAuth.getToken({disableRedirect:d}).then(e=>{N(),s.BBAuthInterop.postOmnibarMessage(v,{messageType:"token",token:e,tokenRequestId:a})},e=>{N(),s.BBAuthInterop.postOmnibarMessage(v,{messageType:"token-fail",reason:e,tokenRequestId:a})});break;case"help-open":!function(){const e=window.BBHELP;e&&e.HelpWidget.open()}();break;case"notification-read":!function(e){const t=B.notifications;t&&t.onNotificationRead&&t.onNotificationRead(e)}(t.notification);break;case"push-notifications-change":o=t.notifications,u.BBOmnibarPushNotifications.updateNotifications(o);break;case"session-renew":c.BBOmnibarUserActivity.userRenewedSession();break;case"environment-update":!function(e){const t="sky-omnibar-environment-visible",n=document.body.classList;e=e||"",h.innerText=e,e?n.add(t):n.remove(t)}(t.name);break;case"legacy-keep-alive-url-change":y=t.url,N()}var o,a,d,l}t.BBOmnibar=class{static load(e){return B=B=e,y=B.legacyKeepAliveUrl,new Promise(e=>{g=e,function(){let e="background: linear-gradient(to right, #71bf44 0, #31b986 50%, #00b2ec 100%);",t="#4d5259";const n=B.theme;if(n){const o=n.accent;t=n.backgroundColor||t,!1===o?e="display: none;":o&&o.color&&(e=`background-color: ${o.color};`)}b=a.BBAuthDomUtility.addCss(`\nbody {\n margin-top: 50px;\n}\n\n#bb-help-container {\n padding-top: 1px;\n}\n\n.sky-omnibar-iframe,\n.sky-omnibar-placeholder {\n border: none;\n height: 50px;\n width: 100%;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n z-index: 1000;\n}\n\n.sky-omnibar-placeholder {\n background-color: ${t};\n display: none;\n}\n\n.sky-omnibar-placeholder-accent {\n height: 5px;\n ${e}\n}\n\n.sky-omnibar-placeholder.${p} {\n display: block;\n}\n\n.sky-omnibar-iframe.${p} {\n visibility: hidden;\n}\n\n.${m} {\n height: 100%;\n}\n\n.sky-omnibar-environment {\n background-color: #e1e1e3;\n color: #282b31;\n font-family: "Blackbaud Sans", "Open Sans", "Helvetica Neue", Arial, sans-serif;\n font-size: 12px;\n font-weight: 400;\n height: 0;\n line-height: 24px;\n overflow: hidden;\n padding: 0 15px;\n text-align: right;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.sky-omnibar-environment-visible .sky-omnibar-environment {\n height: 24px;\n}\n`)}(),(f=document.createElement("div")).className=`sky-omnibar-placeholder ${p}`,f.innerHTML='<div class="sky-omnibar-placeholder-accent"></div>',document.body.appendChild(f),(h=document.createElement("div")).className="sky-omnibar-environment",a.BBAuthDomUtility.addElToBodyTop(h),I(),window.addEventListener("message",C)})}static update(e){s.BBAuthInterop.postOmnibarMessage(v,{messageType:"update",updateArgs:e})}static destroy(){l.BBOmnibarToastContainer.destroy(),u.BBOmnibarPushNotifications.disconnect(),a.BBAuthDomUtility.removeEl(f),a.BBAuthDomUtility.removeEl(v),a.BBAuthDomUtility.removeEl(h),a.BBAuthDomUtility.removeCss(b),window.removeEventListener("message",C),B=b=f=v=h=g=k=void 0}}},function(e,t,n){"use strict";var o=n(16);function i(e){this.message=e}i.prototype=new Error,i.prototype.name="InvalidTokenError",e.exports=function(e,t){if("string"!=typeof e)throw new i("Invalid token specified");var n=!0===(t=t||{}).header?0:1;try{return JSON.parse(o(e.split(".")[n]))}catch(e){throw new i("Invalid token specified: "+e.message)}},e.exports.InvalidTokenError=i},function(e,t,n){var o=n(17);e.exports=function(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(e){return decodeURIComponent(o(e).replace(/(.)/g,(function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}(t)}catch(e){return o(t)}}},function(e,t){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function o(e){this.message=e}o.prototype=new Error,o.prototype.name="InvalidCharacterError",e.exports="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new o("'atob' failed: The string to be decoded is not correctly encoded.");for(var i,s,r=0,a=0,c="";s=t.charAt(a++);~s&&(i=r%4?64*i+s:s,r++%4)?c+=String.fromCharCode(255&i>>(-2*r&6)):0)s=n.indexOf(s);return c}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(19),i=n(20),s=n(21),r=n(4),a=n(1);let c,d,u,l,m,p,h,f,b,v,B,y,g,k,I="";function T(){f=Date.now()}function w(e){e.clientX===d&&e.clientY===u||(d=e.clientX,u=e.clientY,T())}function A(){const e=Date.now();(!b||e-b>N.MIN_RENEWAL_RETRY)&&(b=e,r.BBCsrfXhr.request("https://s21aidntoken00blkbapp01.nxt.blackbaud.com/session/renew",{inactivity:1}).catch(()=>void 0))}function O(){h=!0,p()}function E(){h=!1,T(),l()}function _(){k?a.BBAuthNavigator.navigate(k):a.BBAuthNavigator.redirectToSignoutForInactivity()}class N{static startTracking(e,t,n,r,a){c&&r===B&&a===y||(N.stopTracking(),m=e,p=t,l=n,B=r,y=a,document.addEventListener("keypress",T),document.addEventListener("mousemove",w),B||A(),v=setInterval(()=>{i.BBOmnibarUserSessionExpiration.getSessionExpiration(I,g,B).then(e=>{o.BBOmnibarUserActivityProcessor.process({allowAnonymous:B,closeInactivityPrompt:E,expirationDate:e,inactivityPromptDuration:N.INACTIVITY_PROMPT_DURATION,isShowingInactivityPrompt:h,lastActivity:f,maxSessionAge:N.MAX_SESSION_AGE,minRenewalAge:N.MIN_RENEWAL_AGE,redirectForInactivity:_,renewSession:A,showInactivityPrompt:O})})},N.ACTIVITY_TIMER_INTERVAL),s.BBOmnibarUserSessionWatcher.start(r,a,m,e=>{g=e.legacyTtl,I=e.refreshId,k=e.legacySigninUrl}),c=!0)}static userRenewedSession(){E(),A()}static stopTracking(){s.BBOmnibarUserSessionWatcher.stop(),i.BBOmnibarUserSessionExpiration.reset(),document.removeEventListener("keypress",T),document.removeEventListener("mousemove",w),v&&(clearInterval(v),v=void 0),c=d=u=f=b=h=m=p=l=B=y=void 0}}N.ACTIVITY_TIMER_INTERVAL=1e3,N.MIN_RENEWAL_RETRY=6e4,N.INACTIVITY_PROMPT_DURATION=12e4,N.MIN_RENEWAL_AGE=3e5,N.MAX_SESSION_AGE=54e5,N.IDENTITY_SECURITY_TOKEN_SERVICE_ORIGIN="https://s21aidntoken00blkbapp01.nxt.blackbaud.com",t.BBOmnibarUserActivity=N},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.BBOmnibarUserActivityProcessor=class{static process(e){const{allowAnonymous:t,closeInactivityPrompt:n,expirationDate:o,inactivityPromptDuration:i,isShowingInactivityPrompt:s,lastActivity:r,maxSessionAge:a,minRenewalAge:c,redirectForInactivity:d,renewSession:u,showInactivityPrompt:l}=e,m=Date.now();if(null===o)return;!t&&m>o&&d();const p=o-i,h=o-a+c;s?m<p&&n():r>h?u():!t&&m>p&&l()}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(4);let i;t.BBOmnibarUserSessionExpiration=class{static getSessionExpiration(e,t,n){const s=function(e,t){if(i&&i.refreshId===e&&i.allowAnonymous===t)return i.promise;const n=new Promise((e,n)=>{o.BBCsrfXhr.request("https://s21aidntoken00blkbapp01.nxt.blackbaud.com/session/ttl",void 0,t).then(t=>{const n=null===t?null:Date.now()+1e3*t;e(n)},()=>{e(null)})});return i={allowAnonymous:t,promise:n,refreshId:e},n}(e,n);return new Promise((e,n)=>{s.then(n=>{let o;if(null===n)o=null;else if("number"==typeof t){const e=Date.now()+t;o=Math.min(n,e)}else o=n;e(o)})})}static reset(){i=void 0}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(3),i=n(1);let s,r,a,c,d,u,l,m,p={};function h(e){if(e){const t=e.split("://");return`${t[0]}://${t[1].split("/")[0]}`}}function f(e,t){const n=document.createElement("iframe");return n.className=e,n.width="0",n.height="0",n.frameBorder="0",n.src=t,n.tabIndex=-1,n.setAttribute("aria-hidden","true"),document.body.appendChild(n),n}function b(e){if("string"==typeof e.data){let t;try{t=JSON.parse(e.data)}catch(e){return}if("session_change"===t.messageType){const e=t.message,n=e&&e.sessionId,s=e&&e.refreshId;n||d||(m?i.BBAuthNavigator.navigate(m):i.BBAuthNavigator.redirectToSignin()),void 0!==p.refreshId&&s!==p.refreshId&&function(e){l&&o.BBAuthInterop.postOmnibarMessage(l,e,h(r))}({messageType:"session-refresh"}),void 0!==p.sessionId&&n!==p.sessionId&&a(),p.refreshId=s,p.sessionId=n,c(p)}}}function v(e){switch(e.origin){case B.IDENTITY_SECURITY_TOKEN_SERVICE_ORIGIN:b(e);break;case h(r):!function(e){const t=e.data;switch(t.messageType){case"ready":p.legacyTtl=t.ttl,m=t.signinUrl,c(p)}}(e)}}class B{static start(e,t,n,o){s&&e===d&&t===r||(B.stop(),d=e,a=n,r=t,c=o,function(){const e=B.IDENTITY_SECURITY_TOKEN_SERVICE_ORIGIN+"/SessionWatcher.html?origin="+encodeURIComponent(location.origin);u=f("sky-omnibar-iframe-session-watcher",e)}(),r&&(l=f("sky-omnibar-iframe-legacy-keep-alive",r)),window.addEventListener("message",v,!1),s=!0)}static stop(){window.removeEventListener("message",v,!1),u&&(document.body.removeChild(u),u=void 0),l&&(document.body.removeChild(l),l=void 0),p={},s=d=a=r=m=c=void 0}}B.IDENTITY_SECURITY_TOKEN_SERVICE_ORIGIN="https://s21aidntoken00blkbapp01.nxt.blackbaud.com",t.BBOmnibarUserSessionWatcher=B},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(2),i=n(3);let s,r,a;function c(e){if(!i.BBAuthInterop.messageIsFromOmnibar(e))return;switch(e.data.messageType){case"ready":i.BBAuthInterop.postOmnibarMessage(r,{messageType:"host-ready"}),r.classList.add("sky-omnibar-inactivity-iframe-ready");break;case"session-renew":a()}}class d{static show(e){this.hide(),a=e.sessionRenewCallback,s=o.BBAuthDomUtility.addCss("\n .sky-omnibar-inactivity-iframe {\n background-color: transparent;\n border: none;\n position: fixed;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n z-index: 100000;\n visibility: hidden;\n }\n\n .sky-omnibar-inactivity-iframe-ready {\n visibility: visible;\n }\n "),function(){const e=d.url;r=o.BBAuthDomUtility.addIframe(e,"sky-omnibar-inactivity-iframe","Inactivity Prompt")}(),window.addEventListener("message",c)}static hide(){r&&(o.BBAuthDomUtility.removeEl(r),o.BBAuthDomUtility.removeCss(s),r=s=a=void 0,window.removeEventListener("message",c))}}d.url="https://host.nxt.blackbaud.com/omnibar/inactivity",t.BBOmnibarUserActivityPrompt=d},function(e,t,n){"use strict";var o=this&&this.__awaiter||function(e,t,n,o){return new(n||(n=Promise))((function(i,s){function r(e){try{c(o.next(e))}catch(e){s(e)}}function a(e){try{c(o.throw(e))}catch(e){s(e)}}function c(e){e.done?i(e.value):new n((function(t){t(e.value)})).then(r,a)}c((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(0),s=n(6);let r;class a{static connect(e,t,n){return o(this,void 0,void 0,(function*(){return r||(r=window.BBNotificationsClient?Promise.resolve():s.BBOmnibarScriptLoader.registerScript(this.NOTIFICATIONS_CLIENT_URL)),r.then(()=>{BBNotificationsClient.BBNotifications.init({tokenCallback:()=>i.BBAuth.getToken({disableRedirect:!0,envId:t,leId:e})}),BBNotificationsClient.BBNotifications.addListener(n)})}))}static disconnect(){return o(this,void 0,void 0,(function*(){return r?r.then(()=>{BBNotificationsClient.BBNotifications.destroy(),r=void 0}):Promise.resolve()}))}static updateNotifications(e){BBNotificationsClient.BBNotifications.updateNotifications(e)}}a.NOTIFICATIONS_CLIENT_URL="https://sky.blackbaudcdn.net/static/notifications-client/1/notifications-client.global.min.js",t.BBOmnibarPushNotifications=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(2),i=n(3),s="sky-omnibar-toast-container",r=`${s}-ready`,a=`${s}-empty`;let c,d,u,l,m;function p(e){if(!i.BBAuthInterop.messageIsFromOmnibar(e))return;const t=e.data;switch(t.messageType){case"toast-ready":i.BBAuthInterop.postOmnibarMessage(d,{messageType:"host-ready"}),d.classList.add(r),l();break;case"toast-container-change":t.height>0?(d.style.height=t.height+"px",d.classList.remove(a)):d.classList.add(a);break;case"push-notifications-open":m()}}class h{static init(e){return m=e,u||(u=new Promise(e=>{l=e,d||(c=o.BBAuthDomUtility.addCss(`\n.${s} {\n border: none;\n display: none;\n position: fixed;\n bottom: 0px;\n right: 0px;\n height: 0px;\n width: 300px;\n}\n\n.${r} {\n display: block;\n}\n\n.${a} {\n visibility: hidden;\n}\n`),(d=document.createElement("iframe")).src=h.CONTAINER_URL,d.className=`${s} ${a}`,d.title="Toast container",document.body.appendChild(d),window.addEventListener("message",p))})),u}static showNewNotifications(e){i.BBAuthInterop.postOmnibarMessage(d,{messageType:"push-notifications-update",pushNotifications:e})}static destroy(){c&&o.BBAuthDomUtility.removeCss(c),d&&o.BBAuthDomUtility.removeEl(d),m=d=u=l=c=void 0,window.removeEventListener("message",p)}}h.CONTAINER_URL="https://host.nxt.blackbaud.com/omnibar/toast",t.BBOmnibarToastContainer=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(6);function i(){return window.jQuery}t.BBOmnibarLegacy=class{static load(e){return new Promise(t=>{const n=i(),s=n&&n.fn&&n.fn.jquery;o.BBOmnibarScriptLoader.smartRegisterScript("https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.0/jquery.js","2.1.0",s).then(()=>o.BBOmnibarScriptLoader.registerScript("https://cdnjs.cloudflare.com/ajax/libs/easyXDM/2.4.17.1/easyXDM.min.js")).then(()=>o.BBOmnibarScriptLoader.registerScript("https://signin.blackbaud.com/Omnibar.min.js")).then(()=>{document.body.classList.add("bb-omnibar-height-padding");const n=document.createElement("div");n.setAttribute("data-omnibar-el",""),document.body.appendChild(n),(e=e||{})["z-index"]=1e3,e.afterLoad=t,e.menuEl&&(e.menuEl=i()(e.menuEl)),BBAUTH.Omnibar.load(n,e)})})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})}])})); |
@@ -1,1 +0,1 @@ | ||
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.BBAuthClient=n():e.BBAuthClient=n()}(window,function(){return function(e){var n={};function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}return t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:o})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(t.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var r in e)t.d(o,r,function(n){return e[n]}.bind(null,r));return o},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=6)}([function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=t(1),r="https://signin.blackbaud.com/signin/",i=encodeURIComponent;function a(e){var n=r+"?redirectUrl="+i(location.href);return e&&(n+="&inactivity=1"),n}var s=function(){function e(){}return e.navigate=function(e,n){n?location.replace(e):location.href=e},e.redirectToSignin=function(e){var n=a();e&&(n+="&"+function(e){var n=[];for(var t in e)e.hasOwnProperty(t)&&n.push(i(t)+"="+i(e[t]));return n.join("&")}(e)),this.navigate(n)},e.redirectToSignoutForInactivity=function(){var e=a(!0),n=r+"sign-out?redirectUrl="+i(e);this.navigate(n)},e.redirectToError=function(e){var n,t;switch(e){case o.BBAuthTokenErrorCode.InvalidEnvironment:t="invalid_env",n="security";break;default:n="broken"}var r="https://host.nxt.blackbaud.com/errors/"+n+"?source=auth-client&url="+i(location.href);t&&(r+="&code="+i(t)),this.navigate(r)},e}();n.BBAuthNavigator=s},function(e,n,t){"use strict";function o(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}Object.defineProperty(n,"__esModule",{value:!0}),o(t(7)),o(t(5))},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=t(1),r=t(0);function i(e,n,t,o){return(o||void 0===o&&t)&&((e=e||{})[n]=t),e}function a(e,n,t,r,a){var s;return s=i(s,"environment_id",t),s=i(s,"legal_entity_id",a),s=i(s,"permission_scope",r,!(!t&&!a||!r)),new Promise(function(t,r){!function(e,n,t,r,i){var a=new XMLHttpRequest;a.onreadystatechange=function(){if(4===a.readyState)switch(a.status){case 0:i({code:o.BBAuthTokenErrorCode.Offline,message:"The user is offline."});break;case 200:r(a.responseText);break;case 401:i({code:o.BBAuthTokenErrorCode.NotLoggedIn,message:"The user is not logged in."});break;case 403:i({code:o.BBAuthTokenErrorCode.InvalidEnvironment,message:"The user is not a member of the specified environment."});break;default:a.status>=400&&i({code:o.BBAuthTokenErrorCode.Unspecified,message:"An unknown error occurred."})}},a.open("POST",e,!0),a.setRequestHeader(n.name,n.value),a.setRequestHeader("Accept","application/json"),a.setRequestHeader("Content-Type","application/json"),a.withCredentials=!0,t?a.send(JSON.stringify(t)):a.send()}(e,{name:"X-CSRF",value:n},s,function(e){var n=e?JSON.parse(e):void 0;t(n)},r)})}var s=function(){function e(){}return e.request=function(e,n,t,i,s,c,u){return!s||i||c?new Promise(function(d,l){new Promise(function(e,n){u?e({csrf_token:"token_needed"}):a("https://s21aidntoken00blkbapp01.nxt.blackbaud.com/session/csrf","token_needed").then(e).catch(n)}).then(function(n){return a(e,n.csrf_token,i,s,c)}).then(d).catch(function(e){if(t||e.code===o.BBAuthTokenErrorCode.Offline)l(e);else switch(e.code){case o.BBAuthTokenErrorCode.NotLoggedIn:r.BBAuthNavigator.redirectToSignin(n);break;default:r.BBAuthNavigator.redirectToError(e.code)}})}):Promise.reject({code:o.BBAuthTokenErrorCode.PermissionScopeNoEnvironment,message:"You must also specify an environment or legal entity when specifying a permission scope."})},e.requestWithToken=function(e,n){return new Promise(function(t,o){var r=new XMLHttpRequest;r.onreadystatechange=function(){if(4===r.readyState)switch(r.status){case 200:t(JSON.parse(r.responseText));break;default:o()}},r.open("GET",e,!0),r.setRequestHeader("Authorization","Bearer "+n),r.setRequestHeader("Accept","application/json"),r.send()})},e}();n.BBCsrfXhr=s},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function e(){}return e.addCss=function(e){var n=document.createElement("style");return n.appendChild(document.createTextNode(e)),document.head.appendChild(n),n},e.addIframe=function(e,n,t){var o=document.createElement("iframe");return o.className=n,o.title=t,o.src=e,this.addElToBodyTop(o),o},e.removeCss=function(e){this.removeEl(e,document.head)},e.removeEl=function(e,n){void 0===n&&(n=document.body),n.contains(e)&&n.removeChild(e)},e.addElToBodyTop=function(e){var n=document.body;n.firstChild?n.insertBefore(e,n.firstChild):n.appendChild(e)},e}();n.BBAuthDomUtility=o},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function e(){}return e.postOmnibarMessage=function(e,n,t){n.source="auth-client",e.contentWindow.postMessage(n,t||"https://host.nxt.blackbaud.com")},e.messageIsFromOmnibar=function(e){if("https://host.nxt.blackbaud.com"===e.origin){var n=e.data;return!!n&&"skyux-spa-omnibar"===n.source}return!1},e}();n.BBAuthInterop=o},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(e){e[e.Unspecified=0]="Unspecified",e[e.NotLoggedIn=1]="NotLoggedIn",e[e.InvalidEnvironment=2]="InvalidEnvironment",e[e.PermissionScopeNoEnvironment=3]="PermissionScopeNoEnvironment",e[e.Offline=4]="Offline"}(n.BBAuthTokenErrorCode||(n.BBAuthTokenErrorCode={}))},function(e,n,t){"use strict";function o(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}Object.defineProperty(n,"__esModule",{value:!0}),o(t(1)),o(t(10)),o(t(12))},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=t(8),r=/1bb:\/\/([a-z]{3})-([a-z0-9]{5})(-[a-z]{4}[0-9]{2})?\/(.*)/;var i=function(){function e(){}return e.getUrl=function(e,n){var t=r.exec(e),o=e,i=n?n.zone:void 0;return i&&(i=i.replace("-","")),t&&(t[3]&&(i=t[3].substring(1)),o="https://"+t[1]+"-"+i+".app.blackbaud.net/"+t[2]+"/"+t[4]),Promise.resolve(o)},e.getToken=function(n){return e.getTokenInternal(n)},e.clearTokenCache=function(){e.tokenCache={}},e.getTokenInternal=function(n){var t=(n=n||{}).forceNewToken,r=n.disableRedirect;if(e.mock)return Promise.resolve("mock_access_token_auth-client@blackbaud.com");var i=function(e){var n=e.envId,t=e.permissionScope;return"token|"+(e.leId||"-")+"|"+(n||"-")+"|"+(t||"-")}(n),a=e.tokenCache[i]=e.tokenCache[i]||{},s=(new Date).valueOf();return!t&&a.lastToken&&a.expirationTime&&a.expirationTime-s>6e4?Promise.resolve(a.lastToken):(a.pendingLookupPromise||(a.pendingLookupPromise=o.BBAuthTokenIntegration.getToken(r,n.envId,n.permissionScope,n.leId).then(function(e){return a.expirationTime=(new Date).valueOf()+1e3*e.expires_in,a.lastToken=e.access_token,a.pendingLookupPromise=null,a.lastToken}).catch(function(e){throw a.pendingLookupPromise=null,e})),a.pendingLookupPromise)},e.mock=!1,e.tokenCache={},e}();n.BBAuth=i},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=t(2),r=t(9),i=function(){function e(){}return e.getToken=function(e,n,t,i){return this.hostNameEndsWith("blackbaud.com")?o.BBCsrfXhr.request("https://s21aidntoken00blkbapp01.nxt.blackbaud.com/oauth2/token",void 0,e,n,t,i,!0):r.BBAuthCrossDomainIframe.getToken({disableRedirect:e,envId:n,leId:i,permissionScope:t})},e.hostNameEndsWith=function(e){return this.getLocationHostname().substr(-e.length)===e},e.getLocationHostname=function(){return window.location.hostname},e}();n.BBAuthTokenIntegration=i},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=t(3),r=t(0),i=t(5),a=function(){function e(){}return e.reset=function(){var e=this;this.requestCounter=0,this.tokenRequests={},this.iframeReadyPromise=new Promise(function(n){return e.iframeReadyResolve=n}),this.listenerSetup=!1},e.TARGET_ORIGIN=function(){return this.TARGETORIGIN},e.getOrMakeIframe=function(){return e.iframeEl=document.getElementById("auth-cross-domain-iframe"),e.iframeEl||(e.iframeEl=o.BBAuthDomUtility.addIframe("https://s21aidntoken00blkbapp01.nxt.blackbaud.com/Iframes/CrossDomainAuthFrame.html","auth-cross-domain-iframe",""),e.iframeEl.id="auth-cross-domain-iframe",e.iframeEl.hidden=!0),e.iframeEl},e.getToken=function(e){return this.setupListenersForIframe(),this.getTokenFromIframe(this.getOrMakeIframe(),e)},e.setupListenersForIframe=function(){var e=this;this.listenerSetup||(window.addEventListener("message",function(n){var t=n.data,o=t.requestId,r=e.tokenRequests[o];if("security-token-svc"===t.source||t.origin===e.TARGET_ORIGIN())switch(t.messageType){case"ready":e.iframeReadyResolve(!0);break;case"error":e.handleErrorMessage(t.value,r.reject,r.args.disableRedirect);break;case"getToken":var i={access_token:t.value,expires_in:0};r.resolve(i)}}),this.listenerSetup=!0)},e.getTokenFromIframe=function(n,t){var o=this;return new Promise(function(r,i){var a=o.requestCounter++;e.tokenRequests[a]={args:t,reject:i,resolve:r},e.iframeReadyPromise.then(function(){n.contentWindow.postMessage({messageType:"getToken",requestId:a,source:"auth-client",value:t},e.TARGET_ORIGIN())})})},e.handleErrorMessage=function(e,n,t){if(t)n(e);else switch(e.code){case i.BBAuthTokenErrorCode.Offline:n(e);break;case i.BBAuthTokenErrorCode.NotLoggedIn:r.BBAuthNavigator.redirectToSignin(void 0);break;default:r.BBAuthNavigator.redirectToError(e.code)}},e.listenerSetup=!1,e.iframeReadyPromise=new Promise(function(n){return e.iframeReadyResolve=n}),e.tokenRequests={},e.requestCounter=0,e.TARGETORIGIN="https://s21aidntoken00blkbapp01.nxt.blackbaud.com",e}();n.BBAuthCrossDomainIframe=a},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}(t(11))},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=t(1),r=t(4),i=t(2),a=t(3),s=t(0);function c(e,n,t,i){var s,c,u;function l(){a.BBAuthDomUtility.removeEl(c),a.BBAuthDomUtility.removeCss(s),c=s=void 0,window.removeEventListener("message",m)}function m(a){if(r.BBAuthInterop.messageIsFromOmnibar(a)){var s,u,d=a.data;switch(d.messageType){case"ready":r.BBAuthInterop.postOmnibarMessage(c,{messageType:"host-ready"}),r.BBAuthInterop.postOmnibarMessage(c,{contextDestinations:n,messageType:"context-provide"});break;case"get-token":s=d.tokenRequestId,u=d.disableRedirect,o.BBAuth.getToken({disableRedirect:u}).then(function(e){r.BBAuthInterop.postOmnibarMessage(c,{messageType:"token",token:e,tokenRequestId:s})},function(e){r.BBAuthInterop.postOmnibarMessage(c,{messageType:"token-fail",reason:e,tokenRequestId:s})});break;case"welcome-cancel":l(),i({reason:"canceled"});break;case"welcome-environment-selected":l(),setTimeout(function(){e.envId=d.envId,t(e)},10)}}}s=a.BBAuthDomUtility.addCss("\n.sky-omnibar-welcome-iframe {\n background-color: #fff;\n border: none;\n position: fixed;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n z-index: 10000;\n}\n"),u=d.url+"?hosted=1&svcid="+encodeURIComponent(e.svcId)+"&url="+encodeURIComponent(e.url),c=a.BBAuthDomUtility.addIframe(u,"sky-omnibar-welcome-iframe","Welcome"),window.addEventListener("message",m)}function u(){s.BBAuthNavigator.redirectToError(o.BBAuthTokenErrorCode.InvalidEnvironment)}var d=function(){function e(){}return e.ensureContext=function(e){var n=e.envId,t=e.envIdRequired,r=e.leId,a=e.leIdRequired,s=e.svcId;return!n&&t||!r&&a?new Promise(function(n,t){s?o.BBAuth.getToken().then(function(o){var r="https://s21anavnavaf00blkbapp01.sky.blackbaud.com/user/destinations?svcid="+encodeURIComponent(s);e.url&&(r+="&referringurl="+encodeURIComponent(e.url)),i.BBCsrfXhr.requestWithToken(r,o).then(function(o){var r=o&&o.items,i=r&&r.length;1===i?(e.url=r[0].url,n(e)):i>1?c(e,o,n,t):u()})}):u()}):Promise.resolve(e)},e.url="https://host.nxt.blackbaud.com/omnibar/welcome",e}();n.BBContextProvider=d},function(e,n,t){"use strict";function o(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}Object.defineProperty(n,"__esModule",{value:!0}),o(t(13)),o(t(19)),o(t(21))},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o,r,i,a,s,c,u,d=t(1),l=t(4),m=t(14),f=t(18),p=t(0),v=t(3),h="sky-omnibar-iframe-expanded",b="sky-omnibar-loading";function y(){a=v.BBAuthDomUtility.addIframe(s.url||"https://host.nxt.blackbaud.com/omnibar/","sky-omnibar-iframe "+b,"Navigation")}function g(){l.BBAuthInterop.postOmnibarMessage(a,{href:document.location.href,messageType:"location-change"})}function B(){function e(e){l.BBAuthInterop.postOmnibarMessage(a,{messageType:"refresh-user",token:e})}d.BBAuth.clearTokenCache(),d.BBAuth.getToken({disableRedirect:!0,forceNewToken:!0}).then(e).catch(function(){return e(void 0)})}function k(){f.BBOmnibarUserActivityPrompt.show({sessionRenewCallback:function(){m.BBOmnibarUserActivity.userRenewedSession()}})}function I(){f.BBOmnibarUserActivityPrompt.hide()}function T(){m.BBOmnibarUserActivity.startTracking(B,k,I,s.allowAnonymous,c)}function A(e){if(l.BBAuthInterop.messageIsFromOmnibar(e)){var n,t,i,f,v,y,B,k,I,A,E=e.data,O=s.nav;switch(E.messageType){case"ready":l.BBAuthInterop.postOmnibarMessage(a,{messageType:"host-ready"}),I=history.pushState,A=history.replaceState,history.pushState=function(){var e=I.apply(history,arguments);return g(),e},history.replaceState=function(){var e=A.apply(history,arguments);return g(),e},l.BBAuthInterop.postOmnibarMessage(a,{compactNavOnly:s.compactNavOnly,enableHelp:s.enableHelp,envId:s.envId,hideResourceLinks:s.hideResourceLinks,leId:s.leId,localNavItems:O&&O.localNavItems,localNotifications:!!s.notifications,localSearch:!!s.onSearch,messageType:"nav-ready",navVersion:s.navVersion,services:O&&O.services,svcId:s.svcId,theme:s.theme}),(k=s.notifications)&&k.onReady({updateNotifications:function(e){l.BBAuthInterop.postOmnibarMessage(a,{messageType:"notifications-update",notifications:e})}}),g(),u();break;case"display-ready":r.classList.remove(b),a.classList.remove(b);break;case"expand":a.classList.add(h);break;case"collapse":a.classList.remove(h);break;case"navigate-url":p.BBAuthNavigator.navigate(E.url);break;case"navigate":var w=E.navItem;O&&O.beforeNavCallback&&!1===O.beforeNavCallback(w)||p.BBAuthNavigator.navigate(w.url);break;case"search":B=E.searchArgs,s.onSearch&&s.onSearch(B).then(function(e){l.BBAuthInterop.postOmnibarMessage(a,{messageType:"search-results",results:e})});break;case"get-token":v=E.tokenRequestId,y=E.disableRedirect,d.BBAuth.getToken({disableRedirect:y}).then(function(e){T(),l.BBAuthInterop.postOmnibarMessage(a,{messageType:"token",token:e,tokenRequestId:v})},function(e){T(),l.BBAuthInterop.postOmnibarMessage(a,{messageType:"token-fail",reason:e,tokenRequestId:v})});break;case"help-open":(f=window.BBHELP)&&f.HelpWidget.open();break;case"notification-read":!function(e){var n=s.notifications;n&&n.onNotificationRead&&n.onNotificationRead(e)}(E.notification);break;case"session-renew":m.BBOmnibarUserActivity.userRenewedSession();break;case"environment-update":n=E.name,t="sky-omnibar-environment-visible",i=document.body.classList,n=n||"",o.innerText=n,n?i.add(t):i.remove(t);break;case"legacy-keep-alive-url-change":c=E.url,T()}}}var E=function(){function e(){}return e.load=function(e){return s=s=e,c=s.legacyKeepAliveUrl,new Promise(function(e){u=e,function(){var e="background: linear-gradient(to right, #71bf44 0, #31b986 50%, #00b2ec 100%);",n="#4d5259",t=s.theme;if(t){var o=t.accent;n=t.backgroundColor||n,!1===o?e="display: none;":o&&o.color&&(e="background-color: "+o.color+";")}i=v.BBAuthDomUtility.addCss("\nbody {\n margin-top: 50px;\n}\n\n#bb-help-container {\n padding-top: 1px;\n}\n\n.sky-omnibar-iframe,\n.sky-omnibar-placeholder {\n border: none;\n height: 50px;\n width: 100%;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n z-index: 1000;\n}\n\n.sky-omnibar-placeholder {\n background-color: "+n+";\n display: none;\n}\n\n.sky-omnibar-placeholder-accent {\n height: 5px;\n "+e+'\n}\n\n.sky-omnibar-placeholder.sky-omnibar-loading {\n display: block;\n}\n\n.sky-omnibar-iframe.sky-omnibar-loading {\n visibility: hidden;\n}\n\n.sky-omnibar-iframe-expanded {\n height: 100%;\n}\n\n.sky-omnibar-environment {\n background-color: #e1e1e3;\n color: #282b31;\n font-family: "Blackbaud Sans", "Open Sans", "Helvetica Neue", Arial, sans-serif;\n font-size: 12px;\n font-weight: 400;\n height: 0;\n line-height: 24px;\n overflow: hidden;\n padding: 0 15px;\n text-align: right;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.sky-omnibar-environment-visible .sky-omnibar-environment {\n height: 24px;\n}\n')}(),(r=document.createElement("div")).className="sky-omnibar-placeholder "+b,r.innerHTML='<div class="sky-omnibar-placeholder-accent"></div>',document.body.appendChild(r),(o=document.createElement("div")).className="sky-omnibar-environment",v.BBAuthDomUtility.addElToBodyTop(o),y(),window.addEventListener("message",A)})},e.update=function(e){l.BBAuthInterop.postOmnibarMessage(a,{messageType:"update",updateArgs:e})},e.destroy=function(){v.BBAuthDomUtility.removeCss(i),v.BBAuthDomUtility.removeEl(r),v.BBAuthDomUtility.removeEl(a),v.BBAuthDomUtility.removeEl(o),window.removeEventListener("message",A),s=i=r=a=o=u=void 0},e}();n.BBOmnibar=E},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o,r,i,a,s,c,u,d,l,m,f,p,v,h,b=t(15),y=t(16),g=t(17),B=t(2),k=t(0),I="";function T(){d=Date.now()}function A(e){e.clientX===r&&e.clientY===i||(r=e.clientX,i=e.clientY,T())}function E(){var e=Date.now();(!l||e-l>P.MIN_RENEWAL_RETRY)&&(l=e,B.BBCsrfXhr.request("https://s21aidntoken00blkbapp01.nxt.blackbaud.com/session/renew",{inactivity:1}).catch(function(){}))}function O(){u=!0,c()}function w(){u=!1,T(),a()}function _(){h?k.BBAuthNavigator.navigate(h):k.BBAuthNavigator.redirectToSignoutForInactivity()}function R(){f||E(),m=setInterval(function(){y.BBOmnibarUserSessionExpiration.getSessionExpiration(I,v,f).then(function(e){b.BBOmnibarUserActivityProcessor.process({allowAnonymous:f,closeInactivityPrompt:w,expirationDate:e,inactivityPromptDuration:P.INACTIVITY_PROMPT_DURATION,isShowingInactivityPrompt:u,lastActivity:d,maxSessionAge:P.MAX_SESSION_AGE,minRenewalAge:P.MIN_RENEWAL_AGE,redirectForInactivity:_,renewSession:E,showInactivityPrompt:O})})},P.ACTIVITY_TIMER_INTERVAL)}var P=function(){function e(){}return e.startTracking=function(n,t,r,i,u){o&&i===f&&u===p||(e.stopTracking(),s=n,c=t,a=r,f=i,p=u,document.addEventListener("keypress",T),document.addEventListener("mousemove",A),R(),g.BBOmnibarUserSessionWatcher.start(i,u,s,function(e){v=e.legacyTtl,I=e.refreshId,h=e.legacySigninUrl}),o=!0)},e.userRenewedSession=function(){w(),E()},e.stopTracking=function(){g.BBOmnibarUserSessionWatcher.stop(),y.BBOmnibarUserSessionExpiration.reset(),document.removeEventListener("keypress",T),document.removeEventListener("mousemove",A),m&&(clearInterval(m),m=void 0),o=r=i=d=l=u=s=c=a=f=p=void 0},e.ACTIVITY_TIMER_INTERVAL=1e3,e.MIN_RENEWAL_RETRY=6e4,e.INACTIVITY_PROMPT_DURATION=12e4,e.MIN_RENEWAL_AGE=3e5,e.MAX_SESSION_AGE=54e5,e.IDENTITY_SECURITY_TOKEN_SERVICE_ORIGIN="https://s21aidntoken00blkbapp01.nxt.blackbaud.com",e}();n.BBOmnibarUserActivity=P},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function e(){}return e.process=function(e){var n=e.allowAnonymous,t=e.closeInactivityPrompt,o=e.expirationDate,r=e.inactivityPromptDuration,i=e.isShowingInactivityPrompt,a=e.lastActivity,s=e.maxSessionAge,c=e.minRenewalAge,u=e.redirectForInactivity,d=e.renewSession,l=e.showInactivityPrompt,m=Date.now();if(null!==o){!n&&m>o&&u();var f=o-r,p=o-s+c;i?m<f&&t():a>p?d():!n&&m>f&&l()}},e}();n.BBOmnibarUserActivityProcessor=o},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o,r=t(2);var i=function(){function e(){}return e.getSessionExpiration=function(e,n,t){var i=function(e,n){if(o&&o.refreshId===e&&o.allowAnonymous===n)return o.promise;var t=new Promise(function(e,t){r.BBCsrfXhr.request("https://s21aidntoken00blkbapp01.nxt.blackbaud.com/session/ttl",void 0,n).then(function(n){var t=null===n?null:Date.now()+1e3*n;e(t)},function(){e(null)})});return o={allowAnonymous:n,promise:t,refreshId:e},t}(e,t);return new Promise(function(e,t){i.then(function(t){var o;if(null===t)o=null;else if("number"==typeof n){var r=Date.now()+n;o=Math.min(t,r)}else o=t;e(o)})})},e.reset=function(){o=void 0},e}();n.BBOmnibarUserSessionExpiration=i},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o,r,i,a,s,c,u,d,l=t(4),m=t(0),f={};function p(e){if(e){var n=e.split("://");return n[0]+"://"+n[1].split("/")[0]}}function v(e,n){var t=document.createElement("iframe");return t.className=e,t.width="0",t.height="0",t.frameBorder="0",t.src=n,t.tabIndex=-1,t.setAttribute("aria-hidden","true"),document.body.appendChild(t),t}function h(){var e=g.IDENTITY_SECURITY_TOKEN_SERVICE_ORIGIN+"/SessionWatcher.html?origin="+encodeURIComponent(location.origin);c=v("sky-omnibar-iframe-session-watcher",e)}function b(e){if("string"==typeof e.data){var n=void 0;try{n=JSON.parse(e.data)}catch(e){return}if("session_change"===n.messageType){var t=n.message,o=t&&t.sessionId,c=t&&t.refreshId;o||s||(d?m.BBAuthNavigator.navigate(d):m.BBAuthNavigator.redirectToSignin()),void 0!==f.refreshId&&c!==f.refreshId&&function(e){u&&l.BBAuthInterop.postOmnibarMessage(u,e,p(r))}({messageType:"session-refresh"}),void 0!==f.sessionId&&o!==f.sessionId&&i(),f.refreshId=c,f.sessionId=o,a(f)}}}function y(e){switch(e.origin){case g.IDENTITY_SECURITY_TOKEN_SERVICE_ORIGIN:b(e);break;case p(r):!function(e){var n=e.data;switch(n.messageType){case"ready":f.legacyTtl=n.ttl,d=n.signinUrl,a(f)}}(e)}}var g=function(){function e(){}return e.start=function(n,t,c,d){o&&n===s&&t===r||(e.stop(),s=n,i=c,r=t,a=d,h(),r&&(u=v("sky-omnibar-iframe-legacy-keep-alive",r)),window.addEventListener("message",y,!1),o=!0)},e.stop=function(){window.removeEventListener("message",y,!1),c&&(document.body.removeChild(c),c=void 0),u&&(document.body.removeChild(u),u=void 0),f={},o=s=i=r=d=a=void 0},e.IDENTITY_SECURITY_TOKEN_SERVICE_ORIGIN="https://s21aidntoken00blkbapp01.nxt.blackbaud.com",e}();n.BBOmnibarUserSessionWatcher=g},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o,r,i,a=t(3),s=t(4);function c(e){if(s.BBAuthInterop.messageIsFromOmnibar(e))switch(e.data.messageType){case"ready":s.BBAuthInterop.postOmnibarMessage(r,{messageType:"host-ready"}),r.classList.add("sky-omnibar-inactivity-iframe-ready");break;case"session-renew":i()}}var u=function(){function e(){}return e.show=function(n){var t;this.hide(),i=n.sessionRenewCallback,o=a.BBAuthDomUtility.addCss("\n .sky-omnibar-inactivity-iframe {\n background-color: transparent;\n border: none;\n position: fixed;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n z-index: 100000;\n visibility: hidden;\n }\n\n .sky-omnibar-inactivity-iframe-ready {\n visibility: visible;\n }\n "),t=e.url,r=a.BBAuthDomUtility.addIframe(t,"sky-omnibar-inactivity-iframe","Inactivity Prompt"),window.addEventListener("message",c)},e.hide=function(){r&&(a.BBAuthDomUtility.removeEl(r),a.BBAuthDomUtility.removeCss(o),r=o=i=void 0,window.removeEventListener("message",c))},e.url="https://host.nxt.blackbaud.com/omnibar/inactivity",e}();n.BBOmnibarUserActivityPrompt=u},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=t(20);function r(){return window.jQuery}var i=function(){function e(){}return e.load=function(e){return new Promise(function(n){var t=r(),i=t&&t.fn&&t.fn.jquery;o.BBOmnibarScriptLoader.smartRegisterScript("https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.0/jquery.js","2.1.0",i).then(function(){return o.BBOmnibarScriptLoader.registerScript("https://cdnjs.cloudflare.com/ajax/libs/easyXDM/2.4.17.1/easyXDM.min.js")}).then(function(){return o.BBOmnibarScriptLoader.registerScript("https://signin.blackbaud.com/Omnibar.min.js")}).then(function(){document.body.classList.add("bb-omnibar-height-padding");var t=document.createElement("div");t.setAttribute("data-omnibar-el",""),document.body.appendChild(t),(e=e||{})["z-index"]=1e3,e.afterLoad=n,e.menuEl&&(e.menuEl=r()(e.menuEl)),BBAUTH.Omnibar.load(t,e)})})},e}();n.BBOmnibarLegacy=i},function(e,n,t){"use strict";function o(e){for(var n=[],t=0,o=e.split(".");t<o.length;t++){var r=o[t],i=parseInt(r,10)||0;n.push(i)}return n}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(){}return e.registerScript=function(e){return new Promise(function(n,t){var o=document.createElement("script");o.onload=n,o.onerror=t,o.src=e,document.body.appendChild(o)})},e.smartRegisterScript=function(n,t,r){return r&&function(e,n){for(var t=o(e),r=o(n),i=0;i<t.length;i++)if(i<r.length){if(r[i]>t[i])return!0;if(r[i]<t[i])return!1}return!0}(t,r)?Promise.resolve():e.registerScript(n)},e}();n.BBOmnibarScriptLoader=r},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0})}])}); | ||
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.BBAuthClient=n():e.BBAuthClient=n()}(window,(function(){return function(e){var n={};function t(o){if(n[o])return n[o].exports;var i=n[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,t),i.l=!0,i.exports}return t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:o})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(t.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var i in e)t.d(o,i,function(n){return e[n]}.bind(null,i));return o},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=7)}([function(e,n,t){"use strict";function o(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}Object.defineProperty(n,"__esModule",{value:!0}),o(t(8)),o(t(5))},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=t(0),i="https://signin.blackbaud.com/signin/",r=encodeURIComponent;function a(e){var n=i+"?redirectUrl="+r(location.href);return e&&(n+="&inactivity=1"),n}var s=function(){function e(){}return e.navigate=function(e,n){n?location.replace(e):location.href=e},e.redirectToSignin=function(e){var n=a();e&&(n+="&"+function(e){var n=[];for(var t in e)e.hasOwnProperty(t)&&n.push(r(t)+"="+r(e[t]));return n.join("&")}(e)),this.navigate(n)},e.redirectToSignoutForInactivity=function(){var e=a(!0),n=i+"sign-out?redirectUrl="+r(e);this.navigate(n)},e.redirectToError=function(e){var n,t;switch(e){case o.BBAuthTokenErrorCode.InvalidEnvironment:t="invalid_env",n="security";break;default:n="broken"}var i="https://host.nxt.blackbaud.com/errors/"+n+"?source=auth-client&url="+r(location.href);t&&(i+="&code="+r(t)),this.navigate(i)},e}();n.BBAuthNavigator=s},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function e(){}return e.addCss=function(e){var n=document.createElement("style");return n.appendChild(document.createTextNode(e)),document.head.appendChild(n),n},e.addIframe=function(e,n,t){var o=document.createElement("iframe");return o.className=n,o.title=t,o.src=e,this.addElToBodyTop(o),o},e.removeCss=function(e){this.removeEl(e,document.head)},e.removeEl=function(e,n){void 0===n&&(n=document.body),n.contains(e)&&n.removeChild(e)},e.addElToBodyTop=function(e){var n=document.body;n.firstChild?n.insertBefore(e,n.firstChild):n.appendChild(e)},e}();n.BBAuthDomUtility=o},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function e(){}return e.postOmnibarMessage=function(e,n,t){n.source="auth-client",e.contentWindow.postMessage(n,t||"https://host.nxt.blackbaud.com")},e.messageIsFromOmnibar=function(e){if("https://host.nxt.blackbaud.com"===e.origin){var n=e.data;return!!n&&"skyux-spa-omnibar"===n.source}return!1},e}();n.BBAuthInterop=o},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=t(0),i=t(1);function r(e,n,t,o){return(o||void 0===o&&t)&&((e=e||{})[n]=t),e}function a(e,n,t,i,a){var s;return s=r(s,"environment_id",t),s=r(s,"legal_entity_id",a),s=r(s,"permission_scope",i,!(!t&&!a||!i)),new Promise((function(t,i){!function(e,n,t,i,r){var a=new XMLHttpRequest;a.onreadystatechange=function(){if(4===a.readyState)switch(a.status){case 0:r({code:o.BBAuthTokenErrorCode.Offline,message:"The user is offline."});break;case 200:i(a.responseText);break;case 401:r({code:o.BBAuthTokenErrorCode.NotLoggedIn,message:"The user is not logged in."});break;case 403:r({code:o.BBAuthTokenErrorCode.InvalidEnvironment,message:"The user is not a member of the specified environment."});break;default:a.status>=400&&r({code:o.BBAuthTokenErrorCode.Unspecified,message:"An unknown error occurred."})}},a.open("POST",e,!0),a.setRequestHeader(n.name,n.value),a.setRequestHeader("Accept","application/json"),a.setRequestHeader("Content-Type","application/json"),a.withCredentials=!0,t?a.send(JSON.stringify(t)):a.send()}(e,{name:"X-CSRF",value:n},s,(function(e){var n=e?JSON.parse(e):void 0;t(n)}),i)}))}var s=function(){function e(){}return e.request=function(e,n,t,r,s,c,u){return!s||r||c?new Promise((function(d,l){new Promise((function(e,n){u?e({csrf_token:"token_needed"}):a("https://s21aidntoken00blkbapp01.nxt.blackbaud.com/session/csrf","token_needed").then(e).catch(n)})).then((function(n){return a(e,n.csrf_token,r,s,c)})).then(d).catch((function(e){if(t||e.code===o.BBAuthTokenErrorCode.Offline)l(e);else switch(e.code){case o.BBAuthTokenErrorCode.NotLoggedIn:i.BBAuthNavigator.redirectToSignin(n);break;default:i.BBAuthNavigator.redirectToError(e.code)}}))})):Promise.reject({code:o.BBAuthTokenErrorCode.PermissionScopeNoEnvironment,message:"You must also specify an environment or legal entity when specifying a permission scope."})},e.requestWithToken=function(e,n){return new Promise((function(t,o){var i=new XMLHttpRequest;i.onreadystatechange=function(){if(4===i.readyState)switch(i.status){case 200:t(JSON.parse(i.responseText));break;default:o()}},i.open("GET",e,!0),i.setRequestHeader("Authorization","Bearer "+n),i.setRequestHeader("Accept","application/json"),i.send()}))},e}();n.BBCsrfXhr=s},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(e){e[e.Unspecified=0]="Unspecified",e[e.NotLoggedIn=1]="NotLoggedIn",e[e.InvalidEnvironment=2]="InvalidEnvironment",e[e.PermissionScopeNoEnvironment=3]="PermissionScopeNoEnvironment",e[e.Offline=4]="Offline"}(n.BBAuthTokenErrorCode||(n.BBAuthTokenErrorCode={}))},function(e,n,t){"use strict";function o(e){for(var n=[],t=0,o=e.split(".");t<o.length;t++){var i=o[t],r=parseInt(i,10)||0;n.push(r)}return n}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(){}return e.registerScript=function(e){return new Promise((function(n,t){var o=document.createElement("script");o.onload=n,o.onerror=t,o.src=e,document.body.appendChild(o)}))},e.smartRegisterScript=function(n,t,i){return i&&function(e,n){for(var t=o(e),i=o(n),r=0;r<t.length;r++)if(r<i.length){if(i[r]>t[r])return!0;if(i[r]<t[r])return!1}return!0}(t,i)?Promise.resolve():e.registerScript(n)},e}();n.BBOmnibarScriptLoader=i},function(e,n,t){"use strict";function o(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}Object.defineProperty(n,"__esModule",{value:!0}),o(t(0)),o(t(11)),o(t(13))},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=t(9),i=/1bb:\/\/([a-z]{3})-([a-z0-9]{5})(-[a-z]{4}[0-9]{2})?\/(.*)/;var r=function(){function e(){}return e.getUrl=function(e,n){var t=i.exec(e),o=e,r=n?n.zone:void 0;return r&&(r=r.replace("-","")),t&&(t[3]&&(r=t[3].substring(1)),o="https://"+t[1]+"-"+r+".app.blackbaud.net/"+t[2]+"/"+t[4]),Promise.resolve(o)},e.getToken=function(n){return e.getTokenInternal(n)},e.clearTokenCache=function(){e.tokenCache={}},e.getTokenInternal=function(n){var t=(n=n||{}).forceNewToken,i=n.disableRedirect;if(e.mock)return Promise.resolve("mock_access_token_auth-client@blackbaud.com");var r=function(e){var n=e.envId,t=e.permissionScope;return"token|"+(e.leId||"-")+"|"+(n||"-")+"|"+(t||"-")}(n),a=e.tokenCache[r]=e.tokenCache[r]||{},s=(new Date).valueOf();return!t&&a.lastToken&&a.expirationTime&&a.expirationTime-s>6e4?Promise.resolve(a.lastToken):(a.pendingLookupPromise||(a.pendingLookupPromise=o.BBAuthTokenIntegration.getToken(i,n.envId,n.permissionScope,n.leId).then((function(e){return a.expirationTime=(new Date).valueOf()+1e3*e.expires_in,a.lastToken=e.access_token,a.pendingLookupPromise=null,a.lastToken})).catch((function(e){throw a.pendingLookupPromise=null,e}))),a.pendingLookupPromise)},e.mock=!1,e.tokenCache={},e}();n.BBAuth=r},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=t(4),i=t(10),r=function(){function e(){}return e.getToken=function(e,n,t,r){return this.hostNameEndsWith("blackbaud.com")?o.BBCsrfXhr.request("https://s21aidntoken00blkbapp01.nxt.blackbaud.com/oauth2/token",void 0,e,n,t,r,!0):i.BBAuthCrossDomainIframe.getToken({disableRedirect:e,envId:n,leId:r,permissionScope:t})},e.hostNameEndsWith=function(e){return this.getLocationHostname().substr(-e.length)===e},e.getLocationHostname=function(){return window.location.hostname},e}();n.BBAuthTokenIntegration=r},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=t(2),i=t(1),r=t(5),a=function(){function e(){}return e.reset=function(){var e=this;this.requestCounter=0,this.tokenRequests={},this.iframeReadyPromise=new Promise((function(n){return e.iframeReadyResolve=n})),this.listenerSetup=!1},e.TARGET_ORIGIN=function(){return this.TARGETORIGIN},e.getOrMakeIframe=function(){return e.iframeEl=document.getElementById("auth-cross-domain-iframe"),e.iframeEl||(e.iframeEl=o.BBAuthDomUtility.addIframe("https://s21aidntoken00blkbapp01.nxt.blackbaud.com/Iframes/CrossDomainAuthFrame.html","auth-cross-domain-iframe",""),e.iframeEl.id="auth-cross-domain-iframe",e.iframeEl.hidden=!0),e.iframeEl},e.getToken=function(e){return this.setupListenersForIframe(),this.getTokenFromIframe(this.getOrMakeIframe(),e)},e.setupListenersForIframe=function(){var e=this;this.listenerSetup||(window.addEventListener("message",(function(n){var t=n.data,o=t.requestId,i=e.tokenRequests[o];if("security-token-svc"===t.source||t.origin===e.TARGET_ORIGIN())switch(t.messageType){case"ready":e.iframeReadyResolve(!0);break;case"error":e.handleErrorMessage(t.value,i.reject,i.args.disableRedirect);break;case"getToken":var r={access_token:t.value,expires_in:0};i.resolve(r)}})),this.listenerSetup=!0)},e.getTokenFromIframe=function(n,t){var o=this;return new Promise((function(i,r){var a=o.requestCounter++;e.tokenRequests[a]={args:t,reject:r,resolve:i},e.iframeReadyPromise.then((function(){n.contentWindow.postMessage({messageType:"getToken",requestId:a,source:"auth-client",value:t},e.TARGET_ORIGIN())}))}))},e.handleErrorMessage=function(e,n,t){if(t)n(e);else switch(e.code){case r.BBAuthTokenErrorCode.Offline:n(e);break;case r.BBAuthTokenErrorCode.NotLoggedIn:i.BBAuthNavigator.redirectToSignin(void 0);break;default:i.BBAuthNavigator.redirectToError(e.code)}},e.listenerSetup=!1,e.iframeReadyPromise=new Promise((function(n){return e.iframeReadyResolve=n})),e.tokenRequests={},e.requestCounter=0,e.TARGETORIGIN="https://s21aidntoken00blkbapp01.nxt.blackbaud.com",e}();n.BBAuthCrossDomainIframe=a},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}(t(12))},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=t(0),i=t(3),r=t(4),a=t(2),s=t(1);function c(e,n,t,r){var s,c,u;function l(){a.BBAuthDomUtility.removeEl(c),a.BBAuthDomUtility.removeCss(s),c=s=void 0,window.removeEventListener("message",f)}function f(a){if(i.BBAuthInterop.messageIsFromOmnibar(a)){var s,u,d=a.data;switch(d.messageType){case"ready":i.BBAuthInterop.postOmnibarMessage(c,{messageType:"host-ready"}),i.BBAuthInterop.postOmnibarMessage(c,{contextDestinations:n,messageType:"context-provide"});break;case"get-token":s=d.tokenRequestId,u=d.disableRedirect,o.BBAuth.getToken({disableRedirect:u}).then((function(e){i.BBAuthInterop.postOmnibarMessage(c,{messageType:"token",token:e,tokenRequestId:s})}),(function(e){i.BBAuthInterop.postOmnibarMessage(c,{messageType:"token-fail",reason:e,tokenRequestId:s})}));break;case"welcome-cancel":l(),r({reason:"canceled"});break;case"welcome-environment-selected":l(),setTimeout((function(){e.envId=d.envId,t(e)}),10)}}}s=a.BBAuthDomUtility.addCss("\n.sky-omnibar-welcome-iframe {\n background-color: #fff;\n border: none;\n position: fixed;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n z-index: 10000;\n}\n"),u=d.url+"?hosted=1&svcid="+encodeURIComponent(e.svcId)+"&url="+encodeURIComponent(e.url),c=a.BBAuthDomUtility.addIframe(u,"sky-omnibar-welcome-iframe","Welcome"),window.addEventListener("message",f)}function u(){s.BBAuthNavigator.redirectToError(o.BBAuthTokenErrorCode.InvalidEnvironment)}var d=function(){function e(){}return e.ensureContext=function(e){var n=e.envId,t=e.envIdRequired,i=e.leId,a=e.leIdRequired,s=e.svcId;return!n&&t||!i&&a?new Promise((function(n,t){s?o.BBAuth.getToken().then((function(o){var i="https://s21anavnavaf00blkbapp01.sky.blackbaud.com/user/destinations?svcid="+encodeURIComponent(s);e.url&&(i+="&referringurl="+encodeURIComponent(e.url)),r.BBCsrfXhr.requestWithToken(i,o).then((function(o){var i=o&&o.items,r=i&&i.length;1===r?(e.url=i[0].url,n(e)):r>1?c(e,o,n,t):u()}))})):u()})):Promise.resolve(e)},e.url="https://host.nxt.blackbaud.com/omnibar/welcome",e}();n.BBContextProvider=d},function(e,n,t){"use strict";function o(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}Object.defineProperty(n,"__esModule",{value:!0}),o(t(14)),o(t(25)),o(t(26))},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o,i,r,a,s,c,u,d,l=t(15),f=t(0),m=t(3),p=t(1),h=t(2),v=t(18),b=t(22),y=t(23),B=t(24),g="sky-omnibar-iframe-expanded",k="sky-omnibar-loading";function I(){a=h.BBAuthDomUtility.addIframe(s.url||"https://host.nxt.blackbaud.com/omnibar/","sky-omnibar-iframe "+k,"Navigation")}function T(){m.BBAuthInterop.postOmnibarMessage(a,{href:document.location.href,messageType:"location-change"})}function w(){m.BBAuthInterop.postOmnibarMessage(a,{messageType:"push-notifications-open"})}function A(){d||(d=!0,f.BBAuth.getToken({disableRedirect:!0,envId:s.envId,leId:s.leId,permissionScope:"Notifications"}).then((function(e){!function(e){var n=l(e)["1bb.entitlements"];return!!n&&(n=Array.isArray(n)?n:[n]).indexOf("notif")>-1}(e)?d=!1:B.BBOmnibarToastContainer.init(w).then((function(){y.BBOmnibarPushNotifications.connect(s.leId,s.envId,(function(e){m.BBAuthInterop.postOmnibarMessage(a,{messageType:"push-notifications-update",pushNotifications:e}),B.BBOmnibarToastContainer.showNewNotifications(e)}))}))})).catch((function(){d=!1})))}function O(){function e(e){m.BBAuthInterop.postOmnibarMessage(a,{messageType:"refresh-user",token:e}),e?A():d&&(B.BBOmnibarToastContainer.destroy(),y.BBOmnibarPushNotifications.disconnect(),d=!1)}f.BBAuth.clearTokenCache(),f.BBAuth.getToken({disableRedirect:!0,forceNewToken:!0}).then(e).catch((function(){return e(void 0)}))}function E(){b.BBOmnibarUserActivityPrompt.show({sessionRenewCallback:function(){v.BBOmnibarUserActivity.userRenewedSession()}})}function _(){b.BBOmnibarUserActivityPrompt.hide()}function N(){v.BBOmnibarUserActivity.startTracking(O,E,_,s.allowAnonymous,c)}function C(e){if(m.BBAuthInterop.messageIsFromOmnibar(e)){var n,t,r,d,l,h,b,B,I,w,O,E=e.data,_=s.nav;switch(E.messageType){case"ready":m.BBAuthInterop.postOmnibarMessage(a,{messageType:"host-ready"}),w=history.pushState,O=history.replaceState,history.pushState=function(){var e=w.apply(history,arguments);return T(),e},history.replaceState=function(){var e=O.apply(history,arguments);return T(),e},m.BBAuthInterop.postOmnibarMessage(a,{compactNavOnly:s.compactNavOnly,enableHelp:s.enableHelp,envId:s.envId,hideResourceLinks:s.hideResourceLinks,leId:s.leId,localNavItems:_&&_.localNavItems,localNotifications:!!s.notifications,localSearch:!!s.onSearch,messageType:"nav-ready",navVersion:s.navVersion,services:_&&_.services,svcId:s.svcId,theme:s.theme}),(I=s.notifications)&&I.onReady({updateNotifications:function(e){m.BBAuthInterop.postOmnibarMessage(a,{messageType:"notifications-update",notifications:e})}}),A(),T(),u();break;case"display-ready":i.classList.remove(k),a.classList.remove(k);break;case"expand":a.classList.add(g);break;case"collapse":a.classList.remove(g);break;case"navigate-url":p.BBAuthNavigator.navigate(E.url);break;case"navigate":var C=E.navItem;_&&_.beforeNavCallback&&!1===_.beforeNavCallback(C)||p.BBAuthNavigator.navigate(C.url);break;case"search":B=E.searchArgs,s.onSearch&&s.onSearch(B).then((function(e){m.BBAuthInterop.postOmnibarMessage(a,{messageType:"search-results",results:e})}));break;case"get-token":h=E.tokenRequestId,b=E.disableRedirect,f.BBAuth.getToken({disableRedirect:b}).then((function(e){N(),m.BBAuthInterop.postOmnibarMessage(a,{messageType:"token",token:e,tokenRequestId:h})}),(function(e){N(),m.BBAuthInterop.postOmnibarMessage(a,{messageType:"token-fail",reason:e,tokenRequestId:h})}));break;case"help-open":(l=window.BBHELP)&&l.HelpWidget.open();break;case"notification-read":!function(e){var n=s.notifications;n&&n.onNotificationRead&&n.onNotificationRead(e)}(E.notification);break;case"push-notifications-change":d=E.notifications,y.BBOmnibarPushNotifications.updateNotifications(d);break;case"session-renew":v.BBOmnibarUserActivity.userRenewedSession();break;case"environment-update":n=E.name,t="sky-omnibar-environment-visible",r=document.body.classList,n=n||"",o.innerText=n,n?r.add(t):r.remove(t);break;case"legacy-keep-alive-url-change":c=E.url,N()}}}var R=function(){function e(){}return e.load=function(e){return s=s=e,c=s.legacyKeepAliveUrl,new Promise((function(e){u=e,function(){var e="background: linear-gradient(to right, #71bf44 0, #31b986 50%, #00b2ec 100%);",n="#4d5259",t=s.theme;if(t){var o=t.accent;n=t.backgroundColor||n,!1===o?e="display: none;":o&&o.color&&(e="background-color: "+o.color+";")}r=h.BBAuthDomUtility.addCss("\nbody {\n margin-top: 50px;\n}\n\n#bb-help-container {\n padding-top: 1px;\n}\n\n.sky-omnibar-iframe,\n.sky-omnibar-placeholder {\n border: none;\n height: 50px;\n width: 100%;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n z-index: 1000;\n}\n\n.sky-omnibar-placeholder {\n background-color: "+n+";\n display: none;\n}\n\n.sky-omnibar-placeholder-accent {\n height: 5px;\n "+e+"\n}\n\n.sky-omnibar-placeholder."+k+" {\n display: block;\n}\n\n.sky-omnibar-iframe."+k+" {\n visibility: hidden;\n}\n\n."+g+' {\n height: 100%;\n}\n\n.sky-omnibar-environment {\n background-color: #e1e1e3;\n color: #282b31;\n font-family: "Blackbaud Sans", "Open Sans", "Helvetica Neue", Arial, sans-serif;\n font-size: 12px;\n font-weight: 400;\n height: 0;\n line-height: 24px;\n overflow: hidden;\n padding: 0 15px;\n text-align: right;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.sky-omnibar-environment-visible .sky-omnibar-environment {\n height: 24px;\n}\n')}(),(i=document.createElement("div")).className="sky-omnibar-placeholder "+k,i.innerHTML='<div class="sky-omnibar-placeholder-accent"></div>',document.body.appendChild(i),(o=document.createElement("div")).className="sky-omnibar-environment",h.BBAuthDomUtility.addElToBodyTop(o),I(),window.addEventListener("message",C)}))},e.update=function(e){m.BBAuthInterop.postOmnibarMessage(a,{messageType:"update",updateArgs:e})},e.destroy=function(){B.BBOmnibarToastContainer.destroy(),y.BBOmnibarPushNotifications.disconnect(),h.BBAuthDomUtility.removeEl(i),h.BBAuthDomUtility.removeEl(a),h.BBAuthDomUtility.removeEl(o),h.BBAuthDomUtility.removeCss(r),window.removeEventListener("message",C),s=r=i=a=o=u=d=void 0},e}();n.BBOmnibar=R},function(e,n,t){"use strict";var o=t(16);function i(e){this.message=e}i.prototype=new Error,i.prototype.name="InvalidTokenError",e.exports=function(e,n){if("string"!=typeof e)throw new i("Invalid token specified");var t=!0===(n=n||{}).header?0:1;try{return JSON.parse(o(e.split(".")[t]))}catch(e){throw new i("Invalid token specified: "+e.message)}},e.exports.InvalidTokenError=i},function(e,n,t){var o=t(17);e.exports=function(e){var n=e.replace(/-/g,"+").replace(/_/g,"/");switch(n.length%4){case 0:break;case 2:n+="==";break;case 3:n+="=";break;default:throw"Illegal base64url string!"}try{return function(e){return decodeURIComponent(o(e).replace(/(.)/g,(function(e,n){var t=n.charCodeAt(0).toString(16).toUpperCase();return t.length<2&&(t="0"+t),"%"+t})))}(n)}catch(e){return o(n)}}},function(e,n){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function o(e){this.message=e}o.prototype=new Error,o.prototype.name="InvalidCharacterError",e.exports="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(e){var n=String(e).replace(/=+$/,"");if(n.length%4==1)throw new o("'atob' failed: The string to be decoded is not correctly encoded.");for(var i,r,a=0,s=0,c="";r=n.charAt(s++);~r&&(i=a%4?64*i+r:r,a++%4)?c+=String.fromCharCode(255&i>>(-2*a&6)):0)r=t.indexOf(r);return c}},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o,i,r,a,s,c,u,d,l,f,m,p,h,v,b=t(19),y=t(20),B=t(21),g=t(4),k=t(1),I="";function T(){d=Date.now()}function w(e){e.clientX===i&&e.clientY===r||(i=e.clientX,r=e.clientY,T())}function A(){var e=Date.now();(!l||e-l>C.MIN_RENEWAL_RETRY)&&(l=e,g.BBCsrfXhr.request("https://s21aidntoken00blkbapp01.nxt.blackbaud.com/session/renew",{inactivity:1}).catch((function(){})))}function O(){u=!0,c()}function E(){u=!1,T(),a()}function _(){v?k.BBAuthNavigator.navigate(v):k.BBAuthNavigator.redirectToSignoutForInactivity()}function N(){m||A(),f=setInterval((function(){y.BBOmnibarUserSessionExpiration.getSessionExpiration(I,h,m).then((function(e){b.BBOmnibarUserActivityProcessor.process({allowAnonymous:m,closeInactivityPrompt:E,expirationDate:e,inactivityPromptDuration:C.INACTIVITY_PROMPT_DURATION,isShowingInactivityPrompt:u,lastActivity:d,maxSessionAge:C.MAX_SESSION_AGE,minRenewalAge:C.MIN_RENEWAL_AGE,redirectForInactivity:_,renewSession:A,showInactivityPrompt:O})}))}),C.ACTIVITY_TIMER_INTERVAL)}var C=function(){function e(){}return e.startTracking=function(n,t,i,r,u){o&&r===m&&u===p||(e.stopTracking(),s=n,c=t,a=i,m=r,p=u,document.addEventListener("keypress",T),document.addEventListener("mousemove",w),N(),B.BBOmnibarUserSessionWatcher.start(r,u,s,(function(e){h=e.legacyTtl,I=e.refreshId,v=e.legacySigninUrl})),o=!0)},e.userRenewedSession=function(){E(),A()},e.stopTracking=function(){B.BBOmnibarUserSessionWatcher.stop(),y.BBOmnibarUserSessionExpiration.reset(),document.removeEventListener("keypress",T),document.removeEventListener("mousemove",w),f&&(clearInterval(f),f=void 0),o=i=r=d=l=u=s=c=a=m=p=void 0},e.ACTIVITY_TIMER_INTERVAL=1e3,e.MIN_RENEWAL_RETRY=6e4,e.INACTIVITY_PROMPT_DURATION=12e4,e.MIN_RENEWAL_AGE=3e5,e.MAX_SESSION_AGE=54e5,e.IDENTITY_SECURITY_TOKEN_SERVICE_ORIGIN="https://s21aidntoken00blkbapp01.nxt.blackbaud.com",e}();n.BBOmnibarUserActivity=C},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function e(){}return e.process=function(e){var n=e.allowAnonymous,t=e.closeInactivityPrompt,o=e.expirationDate,i=e.inactivityPromptDuration,r=e.isShowingInactivityPrompt,a=e.lastActivity,s=e.maxSessionAge,c=e.minRenewalAge,u=e.redirectForInactivity,d=e.renewSession,l=e.showInactivityPrompt,f=Date.now();if(null!==o){!n&&f>o&&u();var m=o-i,p=o-s+c;r?f<m&&t():a>p?d():!n&&f>m&&l()}},e}();n.BBOmnibarUserActivityProcessor=o},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o,i=t(4);var r=function(){function e(){}return e.getSessionExpiration=function(e,n,t){var r=function(e,n){if(o&&o.refreshId===e&&o.allowAnonymous===n)return o.promise;var t=new Promise((function(e,t){i.BBCsrfXhr.request("https://s21aidntoken00blkbapp01.nxt.blackbaud.com/session/ttl",void 0,n).then((function(n){var t=null===n?null:Date.now()+1e3*n;e(t)}),(function(){e(null)}))}));return o={allowAnonymous:n,promise:t,refreshId:e},t}(e,t);return new Promise((function(e,t){r.then((function(t){var o;if(null===t)o=null;else if("number"==typeof n){var i=Date.now()+n;o=Math.min(t,i)}else o=t;e(o)}))}))},e.reset=function(){o=void 0},e}();n.BBOmnibarUserSessionExpiration=r},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o,i,r,a,s,c,u,d,l=t(3),f=t(1),m={};function p(e){if(e){var n=e.split("://");return n[0]+"://"+n[1].split("/")[0]}}function h(e,n){var t=document.createElement("iframe");return t.className=e,t.width="0",t.height="0",t.frameBorder="0",t.src=n,t.tabIndex=-1,t.setAttribute("aria-hidden","true"),document.body.appendChild(t),t}function v(){var e=B.IDENTITY_SECURITY_TOKEN_SERVICE_ORIGIN+"/SessionWatcher.html?origin="+encodeURIComponent(location.origin);c=h("sky-omnibar-iframe-session-watcher",e)}function b(e){if("string"==typeof e.data){var n=void 0;try{n=JSON.parse(e.data)}catch(e){return}if("session_change"===n.messageType){var t=n.message,o=t&&t.sessionId,c=t&&t.refreshId;o||s||(d?f.BBAuthNavigator.navigate(d):f.BBAuthNavigator.redirectToSignin()),void 0!==m.refreshId&&c!==m.refreshId&&function(e){u&&l.BBAuthInterop.postOmnibarMessage(u,e,p(i))}({messageType:"session-refresh"}),void 0!==m.sessionId&&o!==m.sessionId&&r(),m.refreshId=c,m.sessionId=o,a(m)}}}function y(e){switch(e.origin){case B.IDENTITY_SECURITY_TOKEN_SERVICE_ORIGIN:b(e);break;case p(i):!function(e){var n=e.data;switch(n.messageType){case"ready":m.legacyTtl=n.ttl,d=n.signinUrl,a(m)}}(e)}}var B=function(){function e(){}return e.start=function(n,t,c,d){o&&n===s&&t===i||(e.stop(),s=n,r=c,i=t,a=d,v(),i&&(u=h("sky-omnibar-iframe-legacy-keep-alive",i)),window.addEventListener("message",y,!1),o=!0)},e.stop=function(){window.removeEventListener("message",y,!1),c&&(document.body.removeChild(c),c=void 0),u&&(document.body.removeChild(u),u=void 0),m={},o=s=r=i=d=a=void 0},e.IDENTITY_SECURITY_TOKEN_SERVICE_ORIGIN="https://s21aidntoken00blkbapp01.nxt.blackbaud.com",e}();n.BBOmnibarUserSessionWatcher=B},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o,i,r,a=t(2),s=t(3);function c(e){if(s.BBAuthInterop.messageIsFromOmnibar(e))switch(e.data.messageType){case"ready":s.BBAuthInterop.postOmnibarMessage(i,{messageType:"host-ready"}),i.classList.add("sky-omnibar-inactivity-iframe-ready");break;case"session-renew":r()}}var u=function(){function e(){}return e.show=function(n){var t;this.hide(),r=n.sessionRenewCallback,o=a.BBAuthDomUtility.addCss("\n .sky-omnibar-inactivity-iframe {\n background-color: transparent;\n border: none;\n position: fixed;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n z-index: 100000;\n visibility: hidden;\n }\n\n .sky-omnibar-inactivity-iframe-ready {\n visibility: visible;\n }\n "),t=e.url,i=a.BBAuthDomUtility.addIframe(t,"sky-omnibar-inactivity-iframe","Inactivity Prompt"),window.addEventListener("message",c)},e.hide=function(){i&&(a.BBAuthDomUtility.removeEl(i),a.BBAuthDomUtility.removeCss(o),i=o=r=void 0,window.removeEventListener("message",c))},e.url="https://host.nxt.blackbaud.com/omnibar/inactivity",e}();n.BBOmnibarUserActivityPrompt=u},function(e,n,t){"use strict";var o=this&&this.__awaiter||function(e,n,t,o){return new(t||(t=Promise))((function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){e.done?i(e.value):new t((function(n){n(e.value)})).then(a,s)}c((o=o.apply(e,n||[])).next())}))},i=this&&this.__generator||function(e,n){var t,o,i,r,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(t)throw new TypeError("Generator is already executing.");for(;a;)try{if(t=1,o&&(i=2&r[0]?o.return:r[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,r[1])).done)return i;switch(o=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,o=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===r[0]||2===r[0])){a=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]<i[3])){a.label=r[1];break}if(6===r[0]&&a.label<i[1]){a.label=i[1],i=r;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(r);break}i[2]&&a.ops.pop(),a.trys.pop();continue}r=n.call(e,a)}catch(e){r=[6,e],o=0}finally{t=i=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,s])}}};Object.defineProperty(n,"__esModule",{value:!0});var r,a=t(0),s=t(6),c=function(){function e(){}return e.connect=function(e,n,t){return o(this,void 0,void 0,(function(){return i(this,(function(o){return r||(r=window.BBNotificationsClient?Promise.resolve():s.BBOmnibarScriptLoader.registerScript(this.NOTIFICATIONS_CLIENT_URL)),[2,r.then((function(){BBNotificationsClient.BBNotifications.init({tokenCallback:function(){return a.BBAuth.getToken({disableRedirect:!0,envId:n,leId:e})}}),BBNotificationsClient.BBNotifications.addListener(t)}))]}))}))},e.disconnect=function(){return o(this,void 0,void 0,(function(){return i(this,(function(e){return r?[2,r.then((function(){BBNotificationsClient.BBNotifications.destroy(),r=void 0}))]:[2,Promise.resolve()]}))}))},e.updateNotifications=function(e){BBNotificationsClient.BBNotifications.updateNotifications(e)},e.NOTIFICATIONS_CLIENT_URL="https://sky.blackbaudcdn.net/static/notifications-client/1/notifications-client.global.min.js",e}();n.BBOmnibarPushNotifications=c},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o,i,r,a,s,c=t(2),u=t(3),d="sky-omnibar-toast-container",l=d+"-ready",f=d+"-empty";function m(){return i||(o=c.BBAuthDomUtility.addCss("\n."+d+" {\n border: none;\n display: none;\n position: fixed;\n bottom: 0px;\n right: 0px;\n height: 0px;\n width: 300px;\n}\n\n."+l+" {\n display: block;\n}\n\n."+f+" {\n visibility: hidden;\n}\n"),(i=document.createElement("iframe")).src=h.CONTAINER_URL,i.className=d+" "+f,i.title="Toast container",document.body.appendChild(i),window.addEventListener("message",p)),i}function p(e){if(u.BBAuthInterop.messageIsFromOmnibar(e)){var n=e.data;switch(n.messageType){case"toast-ready":u.BBAuthInterop.postOmnibarMessage(i,{messageType:"host-ready"}),i.classList.add(l),a();break;case"toast-container-change":n.height>0?(i.style.height=n.height+"px",i.classList.remove(f)):i.classList.add(f);break;case"push-notifications-open":s()}}}var h=function(){function e(){}return e.init=function(e){return s=e,r||(r=new Promise((function(e){a=e,m()}))),r},e.showNewNotifications=function(e){u.BBAuthInterop.postOmnibarMessage(i,{messageType:"push-notifications-update",pushNotifications:e})},e.destroy=function(){o&&c.BBAuthDomUtility.removeCss(o),i&&c.BBAuthDomUtility.removeEl(i),s=i=r=a=o=void 0,window.removeEventListener("message",p)},e.CONTAINER_URL="https://host.nxt.blackbaud.com/omnibar/toast",e}();n.BBOmnibarToastContainer=h},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=t(6);function i(){return window.jQuery}var r=function(){function e(){}return e.load=function(e){return new Promise((function(n){var t=i(),r=t&&t.fn&&t.fn.jquery;o.BBOmnibarScriptLoader.smartRegisterScript("https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.0/jquery.js","2.1.0",r).then((function(){return o.BBOmnibarScriptLoader.registerScript("https://cdnjs.cloudflare.com/ajax/libs/easyXDM/2.4.17.1/easyXDM.min.js")})).then((function(){return o.BBOmnibarScriptLoader.registerScript("https://signin.blackbaud.com/Omnibar.min.js")})).then((function(){document.body.classList.add("bb-omnibar-height-padding");var t=document.createElement("div");t.setAttribute("data-omnibar-el",""),document.body.appendChild(t),(e=e||{})["z-index"]=1e3,e.afterLoad=n,e.menuEl&&(e.menuEl=i()(e.menuEl)),BBAUTH.Omnibar.load(t,e)}))}))},e}();n.BBOmnibarLegacy=r},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0})}])})); |
@@ -0,1 +1,5 @@ | ||
# 2.18.0 (2019-10-05) | ||
- Added omnibar notifications for users in environments or legal entities with the required entitlement. [#108](https://github.com/blackbaud/auth-client/pull/108) | ||
# 2.17.2 (2019-08-02) | ||
@@ -2,0 +6,0 @@ |
{ | ||
"name": "@blackbaud/auth-client", | ||
"version": "2.17.2", | ||
"version": "2.18.0", | ||
"description": "Provides methods for obtaining an authentication token from the Blackbaud authentication service.", | ||
@@ -62,3 +62,7 @@ "main": "dist/bundles/auth-client.umd.js", | ||
"webpack-cli": "3.3.5" | ||
} | ||
}, | ||
"dependencies": { | ||
"@types/jwt-decode": "2.2.1", | ||
"jwt-decode": "2.2.0" | ||
} | ||
} |
"use strict"; | ||
//#region imports | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/*tslint:disable-next-line:no-var-requires*/ | ||
var jwtDecode = require("jwt-decode"); | ||
var auth_1 = require("../auth"); | ||
var interop_1 = require("../shared/interop"); | ||
var navigator_1 = require("../shared/navigator"); | ||
var dom_utility_1 = require("../shared/dom-utility"); | ||
var omnibar_user_activity_1 = require("./omnibar-user-activity"); | ||
var omnibar_user_activity_prompt_1 = require("./omnibar-user-activity-prompt"); | ||
var navigator_1 = require("../shared/navigator"); | ||
var dom_utility_1 = require("../shared/dom-utility"); | ||
var omnibar_push_notifications_1 = require("./omnibar-push-notifications"); | ||
var omnibar_toast_container_1 = require("./omnibar-toast-container"); | ||
//#endregion | ||
@@ -20,2 +24,3 @@ var CLS_EXPANDED = 'sky-omnibar-iframe-expanded'; | ||
var promiseResolve; | ||
var pushNotificationsConnected; | ||
function addIframeEl() { | ||
@@ -48,3 +53,3 @@ iframeEl = dom_utility_1.BBAuthDomUtility.addIframe(buildOmnibarUrl(), "sky-omnibar-iframe " + CLS_LOADING, 'Navigation'); | ||
} | ||
styleEl = dom_utility_1.BBAuthDomUtility.addCss("\nbody {\n margin-top: 50px;\n}\n\n#bb-help-container {\n padding-top: 1px;\n}\n\n.sky-omnibar-iframe,\n.sky-omnibar-placeholder {\n border: none;\n height: 50px;\n width: 100%;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n z-index: 1000;\n}\n\n.sky-omnibar-placeholder {\n background-color: " + backgroundColor + ";\n display: none;\n}\n\n.sky-omnibar-placeholder-accent {\n height: 5px;\n " + accentCss + "\n}\n\n.sky-omnibar-placeholder.sky-omnibar-loading {\n display: block;\n}\n\n.sky-omnibar-iframe.sky-omnibar-loading {\n visibility: hidden;\n}\n\n.sky-omnibar-iframe-expanded {\n height: 100%;\n}\n\n.sky-omnibar-environment {\n background-color: #e1e1e3;\n color: #282b31;\n font-family: \"Blackbaud Sans\", \"Open Sans\", \"Helvetica Neue\", Arial, sans-serif;\n font-size: 12px;\n font-weight: 400;\n height: 0;\n line-height: 24px;\n overflow: hidden;\n padding: 0 15px;\n text-align: right;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.sky-omnibar-environment-visible .sky-omnibar-environment {\n height: 24px;\n}\n"); | ||
styleEl = dom_utility_1.BBAuthDomUtility.addCss("\nbody {\n margin-top: 50px;\n}\n\n#bb-help-container {\n padding-top: 1px;\n}\n\n.sky-omnibar-iframe,\n.sky-omnibar-placeholder {\n border: none;\n height: 50px;\n width: 100%;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n z-index: 1000;\n}\n\n.sky-omnibar-placeholder {\n background-color: " + backgroundColor + ";\n display: none;\n}\n\n.sky-omnibar-placeholder-accent {\n height: 5px;\n " + accentCss + "\n}\n\n.sky-omnibar-placeholder." + CLS_LOADING + " {\n display: block;\n}\n\n.sky-omnibar-iframe." + CLS_LOADING + " {\n visibility: hidden;\n}\n\n." + CLS_EXPANDED + " {\n height: 100%;\n}\n\n.sky-omnibar-environment {\n background-color: #e1e1e3;\n color: #282b31;\n font-family: \"Blackbaud Sans\", \"Open Sans\", \"Helvetica Neue\", Arial, sans-serif;\n font-size: 12px;\n font-weight: 400;\n height: 0;\n line-height: 24px;\n overflow: hidden;\n padding: 0 15px;\n text-align: right;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.sky-omnibar-environment-visible .sky-omnibar-environment {\n height: 24px;\n}\n"); | ||
} | ||
@@ -78,2 +83,52 @@ function addPlaceholderEl() { | ||
} | ||
function openPushNotificationsMenu() { | ||
interop_1.BBAuthInterop.postOmnibarMessage(iframeEl, { | ||
messageType: 'push-notifications-open' | ||
}); | ||
} | ||
function hasNotificationsEntitlement(token) { | ||
var decodedToken = jwtDecode(token); | ||
var entitlements = decodedToken['1bb.entitlements']; | ||
if (entitlements) { | ||
entitlements = Array.isArray(entitlements) ? entitlements : [entitlements]; | ||
return entitlements.indexOf('notif') > -1; | ||
} | ||
return false; | ||
} | ||
function connectPushNotifications() { | ||
if (!pushNotificationsConnected) { | ||
pushNotificationsConnected = true; | ||
auth_1.BBAuth.getToken({ | ||
disableRedirect: true, | ||
envId: omnibarConfig.envId, | ||
leId: omnibarConfig.leId, | ||
permissionScope: 'Notifications' | ||
}).then(function (token) { | ||
if (hasNotificationsEntitlement(token)) { | ||
omnibar_toast_container_1.BBOmnibarToastContainer.init(openPushNotificationsMenu) | ||
.then(function () { | ||
omnibar_push_notifications_1.BBOmnibarPushNotifications.connect(omnibarConfig.leId, omnibarConfig.envId, function (notifications) { | ||
interop_1.BBAuthInterop.postOmnibarMessage(iframeEl, { | ||
messageType: 'push-notifications-update', | ||
pushNotifications: notifications | ||
}); | ||
omnibar_toast_container_1.BBOmnibarToastContainer.showNewNotifications(notifications); | ||
}); | ||
}); | ||
} | ||
else { | ||
pushNotificationsConnected = false; | ||
} | ||
}).catch(function () { | ||
pushNotificationsConnected = false; | ||
}); | ||
} | ||
} | ||
function disconnectPushNotifications() { | ||
if (pushNotificationsConnected) { | ||
omnibar_toast_container_1.BBOmnibarToastContainer.destroy(); | ||
omnibar_push_notifications_1.BBOmnibarPushNotifications.disconnect(); | ||
pushNotificationsConnected = false; | ||
} | ||
} | ||
function refreshUserCallback() { | ||
@@ -85,2 +140,8 @@ function refreshUser(token) { | ||
}); | ||
if (token) { | ||
connectPushNotifications(); | ||
} | ||
else { | ||
disconnectPushNotifications(); | ||
} | ||
} | ||
@@ -140,2 +201,5 @@ auth_1.BBAuth.clearTokenCache(); | ||
} | ||
function handlePushNotificationsChange(notifications) { | ||
omnibar_push_notifications_1.BBOmnibarPushNotifications.updateNotifications(notifications); | ||
} | ||
function handleEnvironmentUpdate(name) { | ||
@@ -169,3 +233,3 @@ var bodyCls = 'sky-omnibar-environment-visible'; | ||
} | ||
function setupNotifications() { | ||
function initLocalNotifications() { | ||
var notificationsConfig = omnibarConfig.notifications; | ||
@@ -215,3 +279,4 @@ if (notificationsConfig) { | ||
}); | ||
setupNotifications(); | ||
initLocalNotifications(); | ||
connectPushNotifications(); | ||
handleStateChange(); | ||
@@ -251,2 +316,5 @@ promiseResolve(); | ||
break; | ||
case 'push-notifications-change': | ||
handlePushNotificationsChange(message.notifications); | ||
break; | ||
case 'session-renew': | ||
@@ -296,6 +364,8 @@ omnibar_user_activity_1.BBOmnibarUserActivity.userRenewedSession(); | ||
BBOmnibar.destroy = function () { | ||
dom_utility_1.BBAuthDomUtility.removeCss(styleEl); | ||
omnibar_toast_container_1.BBOmnibarToastContainer.destroy(); | ||
omnibar_push_notifications_1.BBOmnibarPushNotifications.disconnect(); | ||
dom_utility_1.BBAuthDomUtility.removeEl(placeholderEl); | ||
dom_utility_1.BBAuthDomUtility.removeEl(iframeEl); | ||
dom_utility_1.BBAuthDomUtility.removeEl(envEl); | ||
dom_utility_1.BBAuthDomUtility.removeCss(styleEl); | ||
window.removeEventListener('message', messageHandler); | ||
@@ -308,3 +378,4 @@ omnibarConfig = | ||
promiseResolve = | ||
undefined; | ||
pushNotificationsConnected = | ||
undefined; | ||
}; | ||
@@ -311,0 +382,0 @@ return BBOmnibar; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
609638
176
10367
2
+ Added@types/jwt-decode@2.2.1
+ Addedjwt-decode@2.2.0
+ Added@types/jwt-decode@2.2.1(transitive)
+ Addedjwt-decode@2.2.0(transitive)