var OGEventMapper,OG_Events,UTILITIES,APP,GIFTHISTORYLOGIN,OGGA,lookupTextBox,lookupRunningForTerm;if(function(n){function i(n,t){for(var i=window,r=(n||"").split(".");i&&r.length;)i=i[r.shift()];return typeof i=="function"?i:(t.push(n),Function.constructor.apply(null,t))}function u(n){return n==="GET"||n==="POST"}function o(n,t){u(t)||n.setRequestHeader("X-HTTP-Method-Override",t)}function s(t,i,r){var u;r.indexOf("application/x-javascript")===-1&&(u=(t.getAttribute("data-ajax-mode")||"").toUpperCase(),n(t.getAttribute("data-ajax-update")).each(function(t,r){var f;switch(u){case"BEFORE":f=r.firstChild;n("<div />").html(i).contents().each(function(){r.insertBefore(this,f)});break;case"AFTER":n("<div />").html(i).contents().each(function(){r.appendChild(this)});break;case"REPLACE-WITH":n(r).replaceWith(i);break;default:n(r).html(i)}}))}function f(t,r){var e,h,f,c;(e=t.getAttribute("data-ajax-confirm"),!e||window.confirm(e))&&(h=n(t.getAttribute("data-ajax-loading")),c=parseInt(t.getAttribute("data-ajax-loading-duration"),10)||0,n.extend(r,{type:t.getAttribute("data-ajax-method")||undefined,url:t.getAttribute("data-ajax-url")||undefined,cache:!!t.getAttribute("data-ajax-cache"),beforeSend:function(n){var r;return o(n,f),r=i(t.getAttribute("data-ajax-begin"),["xhr"]).apply(t,arguments),r!==!1&&h.show(c),r},complete:function(){h.hide(c);i(t.getAttribute("data-ajax-complete"),["xhr","status"]).apply(t,arguments)},success:function(n,r,u){s(t,n,u.getResponseHeader("Content-Type")||"text/html");i(t.getAttribute("data-ajax-success"),["data","status","xhr"]).apply(t,arguments)},error:function(){i(t.getAttribute("data-ajax-failure"),["xhr","status","error"]).apply(t,arguments)}}),r.data.push({name:"X-Requested-With",value:"XMLHttpRequest"}),f=r.type.toUpperCase(),u(f)||(r.type="POST",r.data.push({name:"X-HTTP-Method-Override",value:f})),n.ajax(r))}function h(t){var i=n(t).data(e);return!i||!i.validate||i.validate()}var t="unobtrusiveAjaxClick",r="unobtrusiveAjaxClickTarget",e="unobtrusiveValidation";n(document).on("click","a[data-ajax=true]",function(n){n.preventDefault();f(this,{url:this.href,type:"GET",data:[]})});n(document).on("click","form[data-ajax=true] input[type=image]",function(i){var r=i.target.name,u=n(i.target),f=n(u.parents("form")[0]),e=u.offset();f.data(t,[{name:r+".x",value:Math.round(i.pageX-e.left)},{name:r+".y",value:Math.round(i.pageY-e.top)}]);setTimeout(function(){f.removeData(t)},0)});n(document).on("click","form[data-ajax=true] :submit",function(i){var f=i.currentTarget.name,e=n(i.target),u=n(e.parents("form")[0]);u.data(t,f?[{name:f,value:i.currentTarget.value}]:[]);u.data(r,e);setTimeout(function(){u.removeData(t);u.removeData(r)},0)});n(document).on("submit","form[data-ajax=true]",function(i){var e=n(this).data(t)||[],u=n(this).data(r),o=u&&u.hasClass("cancel");(i.preventDefault(),o||h(this))&&f(this,{url:this.action,type:this.method||"GET",data:e.concat(n(this).serializeArray())})})}(jQuery),function(n,t){"use strict";function r(n,i){i=i||{};t.forEach(i,function(n,t){delete i[t]});for(var r in n)n.hasOwnProperty(r)&&("$"!==r.charAt(0)||"$"!==r.charAt(1))&&(i[r]=n[r]);return i}var i=t.$$minErr("$resource"),u=/^(\.[a-zA-Z_$@][0-9a-zA-Z_$@]*)+$/;t.module("ngResource",["ng"]).info({angularVersion:"1.8.2"}).provider("$resource",function(){var f=/^https?:\/\/\[[^\]]*][^/]*/,n=this;this.defaults={stripTrailingSlashes:!0,cancellable:!1,actions:{get:{method:"GET"},save:{method:"POST"},query:{method:"GET",isArray:!0},remove:{method:"DELETE"},"delete":{method:"DELETE"}}};this.$get=["$http","$log","$q","$timeout",function(e,o,s,h){function v(t,i){this.template=t;this.defaults=l({},n.defaults,i);this.urlParams={}}var y=t.noop,c=t.forEach,l=t.extend,b=t.copy,p=t.isArray,w=t.isDefined,a=t.isFunction,k=t.isNumber,d=t.$$encodeUriQuery,g=t.$$encodeUriSegment;return v.prototype={setUrlParams:function(n,t,r){var e=this,u=r||e.template,o,s,h="",l=e.urlParams=Object.create(null);c(u.split(/\W/),function(n){if("hasOwnProperty"===n)throw i("badname");!/^\d+$/.test(n)&&n&&new RegExp("(^|[^\\\\]):"+n+"(\\W|$)").test(u)&&(l[n]={isQueryParamValue:new RegExp("\\?.*=:"+n+"(?:\\W|$)").test(u)})});u=u.replace(/\\:/g,":");u=u.replace(f,function(n){return h=n,""});t=t||{};c(e.urlParams,function(n,i){o=t.hasOwnProperty(i)?t[i]:e.defaults[i];w(o)&&null!==o?(s=n.isQueryParamValue?d(o,!0):g(o),u=u.replace(new RegExp(":"+i+"(\\W|$)","g"),function(n,t){return s+t})):u=u.replace(new RegExp("(/?):"+i+"(\\W|$)","g"),function(n,t,i){return"/"===i.charAt(0)?i:t+i})});e.defaults.stripTrailingSlashes&&(u=u.replace(/\/+$/,"")||"/");u=u.replace(/\/\.(?=\w+($|\?))/,".");n.url=h+u.replace(/\/(\\|%5C)\./,"/.");c(t,function(t,i){e.urlParams[i]||(n.params=n.params||{},n.params[i]=t)})}},function(f,d,g,nt){function rt(n,r){var f={};return r=l({},d,r),c(r,function(r,e){var s,o,c;if(a(r)&&(r=r(n)),r&&r.charAt&&"@"===r.charAt(0)){if(s=n,o=r.substr(1),null==o||""===o||"hasOwnProperty"===o||!u.test("."+o))throw i("badmember",o);for(var o=o.split("."),h=0,l=o.length;h<l&&t.isDefined(s);h++)c=o[h],s=null!==s?s[c]:void 0}else s=r;f[e]=s}),f}function ut(n){return n.resource}function tt(n){r(n||{},this)}var it=new v(f,nt);return g=l({},n.defaults.actions,g),tt.prototype.toJSON=function(){var n=l({},this);return delete n.$promise,delete n.$resolved,delete n.$cancelRequest,n},c(g,function(n,t){var v=!0===n.hasBody||!1!==n.hasBody&&/^(POST|PUT|PATCH)$/i.test(n.method),u=n.timeout,f=w(n.cancellable)?n.cancellable:it.defaults.cancellable;u&&!k(u)&&(o.debug("ngResource:\n  Only numeric values are allowed as `timeout`.\n  Promises are not supported in $resource, because the same value would be used for multiple requests. If you are looking for a way to cancel requests, you should use the `cancellable` option."),delete n.timeout,u=null);tt[t]=function(o,w,k,d){function yt(n){ht.catch(y);null!==st&&st.resolve(n)}var at={},et,ft,ot,st,vt,ct;switch(arguments.length){case 4:ot=d;ft=k;case 3:case 2:if(a(w)){if(a(o)){ft=o;ot=w;break}ft=w;ot=k}else{at=o;et=w;ft=k;break}case 1:a(o)?ft=o:v?et=o:at=o;break;case 0:break;default:throw i("badargs",arguments.length);}var lt=this instanceof tt,g=lt?et:n.isArray?[]:new tt(et),nt={},pt=n.interceptor&&n.interceptor.request||void 0,wt=n.interceptor&&n.interceptor.requestError||void 0,bt=n.interceptor&&n.interceptor.response||ut,kt=n.interceptor&&n.interceptor.responseError||s.reject,dt=ft?function(n){ft(n,ct.headers,ct.status,ct.statusText)}:void 0;ot=ot||void 0;c(n,function(n,t){switch(t){default:nt[t]=b(n);case"params":case"isArray":case"interceptor":case"cancellable":}});!lt&&f&&(st=s.defer(),nt.timeout=st.promise,u&&(vt=h(st.resolve,u)));v&&(nt.data=et);it.setUrlParams(nt,l({},rt(et,n.params||{}),at),n.url);var ht=s.resolve(nt).then(pt).catch(wt).then(e),ht=ht.then(function(u){var f=u.data,e;if(f){if(p(f)!==!!n.isArray)throw i("badcfg",t,n.isArray?"array":"object",p(f)?"array":"object",nt.method,nt.url);n.isArray?(g.length=0,c(f,function(n){"object"==typeof n?g.push(new tt(n)):g.push(n)})):(e=g.$promise,r(f,g),g.$promise=e)}return u.resource=g,ct=u,bt(u)},function(n){return n.resource=g,ct=n,kt(n)}),ht=ht["finally"](function(){g.$resolved=!0;!lt&&f&&(g.$cancelRequest=y,h.cancel(vt),st=vt=nt.timeout=null)});return ht.then(dt,ot),lt?ht:(g.$promise=ht,g.$resolved=!1,f&&(g.$cancelRequest=yt),g)};tt.prototype["$"+t]=function(n,i,r){return a(n)&&(r=i,i=n,n={}),n=tt[t].call(this,n,this,i,r),n.$promise||n}}),tt}}]})}(window,window.angular),function(){"use strict";angular.module("core",[])}(),function(n,t){"use strict";angular.module("core").constant("SERVER_SETTINGS",n).constant("UTILITIES",t)}(window.SERVER_SETTINGS,window.UTILITIES),function(){"use strict";function n(n){return function(t,i){try{n(t,i)}catch(r){}}}angular.module("core").config(["$provide",function(t){t.decorator("$exceptionHandler",["$delegate",n])}])}(),function(){"use strict";angular.module("directives",[])}(),function(){"use strict";angular.module("shared",["core","dataServices","directives"])}(),function(){"use strict";angular.module("dataServices",["ngResource"])}(),function(){"use strict";function n(n){return{restrict:"E",replace:!0,templateUrl:n.applicationRoot+"Scripts/app/shared/directives/validationSummary/validationSummary.html",scope:{modelState:"=modelState",genericError:"@genericError"},link:function(n){function i(t){for(var i in t)t.hasOwnProperty(i)&&t[i].Errors.length>0&&t[i].Errors[0].ErrorMessage!==""&&n.errors.push(t[i].Errors[0].ErrorMessage);n.errors.length<=0&&(n.errorButNoErrorText=!0)}var t=!1;n.errors=[];n.errorButNoErrorText=!1;n.$watch("modelState",function(r,u){r===u&&t||(n.errorButNoErrorText=!1,n.errors=[],i(r),t=!0)})}}}angular.module("shared").directive("validationSummary",n);n.$inject=["SERVER_SETTINGS"]}(),function(){"use strict";function n(n,t){function c(t){var f=$("[data-search-results]"),o=f.length>0?parseInt(f.attr("data-search-results"),10):0,e=$("#keywordSearch").val(),s=o>0&&e!==""?!0:!1,r={theAllocationCode:t.AllocationCode,logSearchResult:!1,amount:t.theAmount,isMonthly:!t.IsOneTimeGift};return s&&(r.logSearchResult=!0,r.searchTerm=e),u.save({},r).$promise.then(function(t){return t.Validation&&t.Validation!==null?n.when(t):i()}).then(function(t){return n.when(t)})}function l(){return f.get().$promise}function i(){return e.get({}).$promise.then(function(t){return n.when(t)}).catch(function(t){return n.reject(t)})}function a(t){return o.save({},{theAllocationCode:t}).$promise.then(function(){return i()}).then(function(t){return n.when(t)})}function v(n,t,i){return s.save({DonorsCartItems:n,AdminSubmittedAppeal:t,checkboxes:i}).$promise}function y(n,t){return h.save({DonorsCartItems:n,checkboxes:t})}var r={addToCart:c,getCartVM:l,getShoppingCart:i,removeFromCart:a,submitCart:v,updateCart:y},u=t(SERVER_SETTINGS.applicationRoot+"Cart/AddItemsToCart",{},{save:{method:"POST"}}),f=t(SERVER_SETTINGS.applicationRoot+"Cart/GetCartViewModel",{},{get:{method:"GET"}}),e=t(SERVER_SETTINGS.applicationRoot+"Cart/GetShoppingCart",{},{get:{method:"GET"}}),o=t(SERVER_SETTINGS.applicationRoot+"Cart/RemoveFromCart",{},{save:{method:"POST"}}),s=t(SERVER_SETTINGS.applicationRoot+"Cart/Submit",{},{save:{method:"POST"}}),h=t(SERVER_SETTINGS.applicationRoot+"Cart/UpdateCart",{},{save:{method:"POST"}});return r}angular.module("dataServices").factory("CartDataService",n);n.$inject=["$q","$resource"]}(),function(){"use strict";function n(n,t,i,r){function h(){t.setLoading("cart");n.getShoppingCart().then(function(n){t.setLoaded("cart");u=angular.extend(u,n);u.Validators={minFundAmount:u.MinFundAmount,minGiftAmount:u.MinGiftAmount,maxGiftAmount:u.MaxGiftAmount,minGiftAmountErrorMessage:"We're sorry, our miminum donation amount is "+i("currency")(u.MinGiftAmount)+". Please add another fund, or increase your donation amount.",maxGiftAmountErrorMessage:"We're sorry, the maximum amount you can give online is: "+i("currency")(u.MaxGiftAmount)+"."}}).catch(function(n){APP.logError({ErrorType:"unknown",SubErrorType:null,ErrorMessage:n.message||JSON.stringify(n),ErrorSource:"cart.service.js > _activate()"},!0,null)})}function c(n,t){return n.theAmount+u.TotalChargedToday>u.MaxGiftAmount?{valid:!1,message:u.Validators.maxGiftAmountErrorMessage,property:"theAmount",type:"max"}:t&&n.theAmount+u.TotalChargedToday<u.MinGiftAmount?{valid:!1,message:u.Validators.minGiftAmountErrorMessage,property:"theAmount",type:"minGiftAmount"}:{valid:!0}}function l(t){return e(t),n.addToCart(t).then(function(n){return n.Validation&&n.Validation!==null?r.when(n):(u=angular.extend(u,n),r.when())})}function a(){var n={valid:!0,validationMessages:[]};return u.TotalChargedToday<u.Validators.minGiftAmount&&(n.valid=!1,n.validationMessages.push(u.Validators.minGiftAmountErrorMessage)),u.TotalChargedToday>u.Validators.maxGiftAmount&&(n.valid=!1,n.validationMessages.push(u.Validators.maxGiftAmountErrorMessage)),n}function v(){return u}function y(){return n.getCartVM().then(function(n){return r.when(n)}).catch(function(n){return r.reject(n)})}function p(){return f}function w(t){return n.removeFromCart(t).then(function(n){u=angular.extend(u,n)})}function b(n){f=n}function k(t){var i=o(t.DonorsCartItems);return n.submitCart(i,t.AdminSubmittedAppeal,t.UWAA).then(function(n){return r.when(n)}).catch(function(n){return r.reject(n)})}function d(t){var i=o(t.DonorsCartItems);return n.updateCart(i,t.UWAA).$promise.then(function(n){u=angular.extend(u,n)}).catch(function(n){APP.logError({ErrorType:"unknown",SubErrorType:null,ErrorMessage:n.message||JSON.stringify(n),ErrorSource:"cart.service.js > updateCart()"},!1,null)})}function e(n){var t=[];t.push({item_id:n.AllocationCode,item_name:n.FundName,quantity:1,price:Number(n.theAmount)});OGGA.logAddToCartEventGTAG(t)}function g(n){var t=[];t.push({item_id:n.AllocationCode,item_name:n.FundName,quantity:1,price:Number(n.theAmount)});OGGA.logRemoveFromCartEventGTAG(t)}function nt(n){for(var t,r=[],f=Number(n.TotalChargedToday),i=0,u=n.DonorsCartItems;i<u.length;i++)t=u[i],r.push({item_id:t.AllocationCode,item_name:t.FundName,quantity:1,price:Number(t.theAmount)});OGGA.logBeginCheckoutEventGTAG(f,r)}function o(n){for(var t=n,i=0;i<t.length;i++)t[i].IsOneTimeGift?t[i].RecurringGift=null:t[i].IsOneTimeGift||t[i].RecurringGift!==null||(t[i].RecurringGift={FrequencyType:"Monthly",RecurranceType:"Neverending",RecurringDuration:0});return t}var u={},f=null,s={addIsValid:c,addToCart:l,cartIsValid:a,getCart:v,getCartVM:y,getFredHutchFund:p,removeFromCart:w,setActiveFredHutchFund:b,submitCart:k,updateCart:d,logAddToCartEventInAnalytics:e,logRemoveFromCartEventInAnalytics:g,logBeginCheckoutEventInAnalytics:nt};return APP.isRedirectInProgress()||h(),s}angular.module("shared").factory("CartService",n);n.$inject=["CartDataService","LoadingService","$filter","$q"]}(),function(){"use strict";function n(n,t,i){function u(){$("#fredHutchModal").on("shown.bs.modal",function(){r.fund=n.getFredHutchFund();r.fundLink=o(r.fund.OnlineName);i.$apply()})}function f(){$("#fredHutchModal").modal("hide");t.showModal(r.fund.Code,null,null);n.setActiveFredHutchFund(null)}function e(){$("#fredHutchModal").modal("hide");n.setActiveFredHutchFund(null)}function o(n){return"https://secure.fredhutch.org/site/SPageServer?pagename=adf_uwm&experience=myuwgiving&s_src=myuwgiving&s_subsrc=ueaeo23101&utm_source=uwm&utm_campaign=myuwgiving&utm_medium=referral&creator=fh&team=philanthropy&fund="+encodeURIComponent(n)}var r=this;r.fund=null;r.addAndContinue=f;r.closeModal=e;u()}angular.module("shared").controller("FHController",n);n.$inject=["CartService","QuickAddModalService","$scope"]}(),function(){"use strict";function n(n,t,i,r){function b(){f!=="cartPage"&&v();rt()}function k(){window.location.pathname==="/"||window.location.pathname.toLowerCase()==="/home/"?$("#cartModal").modal("hide"):window.location.href=SERVER_SETTINGS.applicationRoot}function d(){u.proceedToCheckoutDisabledBySubmission=!0;o&&i.cancel(o);o=i(ut,1e3)}function g(n){for(var t in u.cartVM.UWAA)u.cartVM.UWAA.hasOwnProperty(t)&&t!==n&&t!=="MembershipOption"&&(u.cartVM.UWAA[t]=!1)}function nt(n){n.RecurringGift.RecurranceType=n.RecurringGift.RecurringDuration===0?"Neverending":"Recurring";u.autoSave()}function tt(t){u.proceedToCheckoutDisabledBySubmission=!0;n.logRemoveFromCartEventInAnalytics(t);n.removeFromCart(t.AllocationCode).then(function(){n.getCartVM().then(function(n){w(n)}).finally(function(){u.proceedToCheckoutDisabledBySubmission=!1})}).catch(function(n){u.proceedToCheckoutDisabledBySubmission=!1;APP.logError({ErrorType:"unknown",SubErrorType:null,ErrorMessage:n.message||JSON.stringify(n),ErrorSource:"cart.controller.js > removeFund()"},!1,null)})}function l(n){if(n.RecurringGift===null)n.IsOneTimeGift=!0;else{n.IsOneTimeGift=!1;switch(n.RecurringGift.FrequencyType){case"Monthly":n.RecurringGift.RecurranceType="Neverending";n.RecurringGift.RecurringDuration=0;break;case"Quarterly":n.RecurringGift.RecurranceType="Recurring";n.RecurringGift.RecurringDuration=parseInt(u.cartVM.FrequencyVM.QuarterlyDurationOptions[0].Value,10);break;case"Yearly":n.RecurringGift.RecurranceType="Recurring";n.RecurringGift.RecurringDuration=parseInt(u.cartVM.FrequencyVM.YearlyDurationOptions[0].Value,10);break;default:n.RecurringGift.FrequencyType="Monthly";n.RecurringGift.RecurranceType="Neverending";n.RecurringGift.RecurringDuration=0}}u.autoSave()}function a(){if(!u.cartModalForm||!u.cartModalForm.$valid)return u.showValidationErrors=!0,!1;if(u.proceedToCheckoutDisabledBySubmission)return!1;u.proceedToCheckoutDisabledBySubmission=!0;u.cartSubmitting=!0;u.cartSubmissionError=!1;n.submitCart(u.cartVM).then(function(n){n.Validation?(u.Validation=n.Validation,e(),u.cartSubmitting=!1,u.proceedToCheckoutDisabledBySubmission=!1):f!=="checkout"?window.location.href=SERVER_SETTINGS.applicationRoot+"Checkout":($("#cartModal").modal("hide"),u.cartSubmitting=!1,u.proceedToCheckoutDisabledBySubmission=!1)}).catch(function(n){u.cartSubmissionError=!0;u.cartSubmitting=!1;u.proceedToCheckoutDisabledBySubmission=!1;APP.logError({ErrorType:"unknown",SubErrorType:null,ErrorMessage:n.message||JSON.stringify(n),ErrorSource:"cart.controller.js > CartService.submitCart()"},!1,null)})}function it(){u.cartSubmitting=!0;n.submitCart(u.cartVM).then(function(n){n.Validation?(u.Validation=n.Validation,e(),u.cartSubmitting=!1,u.proceedToCheckoutDisabledBySubmission=!1):f!=="checkout"?window.location.href=SERVER_SETTINGS.applicationRoot+"Checkout":($("#cartModal").modal("hide"),u.cartSubmitting=!1,u.proceedToCheckoutDisabledBySubmission=!1)}).catch(function(n){u.cartSubmissionError=!0;u.cartSubmitting=!1;u.proceedToCheckoutDisabledBySubmission=!1;APP.logError({ErrorType:"unknown",SubErrorType:null,ErrorMessage:n.message||JSON.stringify(n),ErrorSource:"cart.controller.js > submitCartAdmin()"},!1,null)})}function rt(){window.addEventListener("popstate",y,!1);window.addEventListener("hashchange",y,!1);$(document).on("click","#cartModal button[class='close']",function(){f==="cartModal"?$("#cartModal").modal("hide"):(a(),i(function(){t.$apply()}))});if(f==="cartModal"||f==="checkout")$("#cartModal").on("shown.bs.modal",function(){p()});else p();$("#cartModal").on("hidden.bs.modal",function(){var n=UTILITIES.removeQueryParam(window.location.href,"showcart",window.location.hash);u.modalShown=!1;t.$apply();window.history.pushState("","",n.replace("#cart",""))});$(document).on("change",".recurringIntervalChangeBinding",function(){var n=$(this),r=n.attr("data-allocation"),t=u.cartVM.DonorsCartItems.find(function(n){return n.AllocationCode===r}),i=n.val();t.RecurringGift=i!=="null"?{FrequencyType:i}:null;l(t)})}function ut(){u.cartUpdating=!0;n.updateCart(u.cartVM).then(function(){n.getCartVM().then(function(n){w(n)}).finally(function(){u.proceedToCheckoutDisabledBySubmission=!1})}).catch(function(n){u.proceedToCheckoutDisabledBySubmission=!1;APP.logError({ErrorType:"unknown",SubErrorType:null,ErrorMessage:n.message||JSON.stringify(n),ErrorSource:"cart.controller.js > _cartItemsChange()"},!1,null)}).finally(function(){i(function(){u.cartUpdating=!1},100)})}function ft(n,t){n!==t&&n===!0&&(u.showValidationErrors=!0)}function v(){var n=$("#cartModal").hasClass("in"),t=UTILITIES.getQueryVariable("showcart")?UTILITIES.getQueryVariable("showcart").toLowerCase():"false";window.location.hash&&window.location.hash==="#cart"||c===!0||t==="true"?APP.isMobile()?(OG_STATE.redirectInProgress=!0,r.location.replace(SERVER_SETTINGS.applicationRoot+"Cart")):(n||(f==="cartModal"?MODALHELPER.showModal(null,"cartModal"):MODALHELPER.showModal({backdrop:"static",keyboard:!1},"cartModal")),window.location.hash.toLowerCase()!=="#cart"&&(window.location.hash="#cart"),c=!1):n&&$("#cartModal").modal("hide")}function et(n,t){n&&n!==t&&(s&&(u.showValidationErrors=!0,s=!1),e())}function y(){v()}function p(){u.Validation=null;u.cartSubmitting=!1;u.proceedToCheckoutDisabledBySubmission=!1;n.getCartVM().then(function(n){u.modalShown=!0;u.cartVM=n;s&&h!==""&&(u.extraCartErrors=h,h="")}).catch(function(n){APP.logError({ErrorType:"unknown",SubErrorType:null,ErrorMessage:n.message||JSON.stringify(n),ErrorSource:"cart.controller.js > _initializeCart()"},!1,null)})}function w(n){f==="checkout"&&n.DonorsCartItems.length<=0&&window.location.replace(SERVER_SETTINGS.applicationRoot+"Home#cart");n.AdminSubmittedAppeal=u.cartVM.AdminSubmittedAppeal;u.cartVM=n;e()}function e(){if(!u.cartModalForm)return!1;u.cartValidation=n.cartIsValid();u.cartValidation.valid?u.cartModalForm.$setValidity("cartTotal",!0):u.cartModalForm.$setValidity("cartTotal",!1)}var u=this,o=null,c=OG_STATE.monetaShowCart,s=OG_STATE.monetaShowCartErrorsOnLoad,h=OG_STATE.monetaExtraCartErrors,f=OG_STATE.currentController&&OG_STATE.currentController.toLowerCase()==="checkout"?"checkout":OG_STATE.currentController&&OG_STATE.currentController.toLowerCase()==="cart"?"cartPage":"cartModal";u.cart=n.getCart();u.cartVM=null;u.cartSubmissionError=!1;u.cartSubmitting=!1;u.cartUpdating=!1;u.extraCartErrors="";u.proceedToCheckoutDisabledBySubmission=!1;u.cartValidation=null;u.givingOppsLink=SERVER_SETTINGS.applicationRoot;u.modalShown=!1;u.showValidationErrors=!1;u.Validation=null;u.genericError="We're sorry, there was an unknown error submitting your cart. Please contact advsti@uw.edu if this problem persists.";u.autoSave=d;u.addAnotherGift=k;u.membershipChange=g;u.monthlyDurationChange=nt;u.removeFund=tt;u.resetDuration=l;u.submitCart=a;u.submitCartAdmin=it;t.$watch("vm.cartModalForm",et);f==="checkout"&&t.$watch("vm.cartModalForm.$invalid",ft);window.onload=function(){var t=window.location.pathname.toLowerCase(),i=t.includes("submitpaymentinformation");f!=="checkout"||i||n.logBeginCheckoutEventInAnalytics(u.cart)};b()}angular.module("shared").controller("CartController",n);n.$inject=["CartService","$scope","$timeout","$window"]}(),function(){"use strict";function n(n){function t(){return'<span ng-show="readyStatus.ready"><a href="'+SERVER_SETTINGS.applicationRoot+'GiftHistory" class="mobile-header-signin" ng-if="!loginStatus.DonorIsLoggedIn">Sign In<\/a><a href="'+SERVER_SETTINGS.applicationRoot+'GiftHistory/Logout" class="mobile-header-signin" ng-if="loginStatus.DonorIsLoggedIn">Sign Out<\/a><\/span>'}return{restrict:"E",replace:!0,link:function(t){t.loginStatus=n.getLoginSession();t.readyStatus=n.getStatus()},template:t()}}angular.module("directives").directive("mobileSignIn",n);n.$inject=["LoginService"]}(),function(){"use strict";function n(){function r(){return t}function u(){return n}function f(){return i}function e(n){t[n]=!0;i.allReady=s()?!0:!1}function o(t){n[t]=!0}function s(){var i=!1;for(var r in n)n.hasOwnProperty(r)&&typeof t[r]=="undefined"&&(i=!0);return!i}var n={},t={},i={allReady:!1};return{getStatus:f,getLoaded:r,getLoading:u,setLoaded:e,setLoading:o}}angular.module("shared").factory("LoadingService",n)}(),function(){"use strict";function n(n){function t(){return'<span class="cart-count-total" ng-class="{\'cct-mobile\': mobile}" data-count="{{cart.DonorsCartItems.length}}"><span>{{cart.DonorsCartItems.length}}<\/span><span ng-if="!cart.DonorsCartItems">&nbsp;<\/span><\/span>'}return{restrict:"E",replace:!0,scope:{mobile:"=mobile"},link:function(t){t.cart=n.getCart()},template:t()}}angular.module("directives").directive("cartCountTotal",n);n.$inject=["CartService"]}(),function(){"use strict";function n(){function n(){return'<div style="font-weight:normal;font-style:italic" ng-show="premiumTotal > 0"><span ng-if="showIcon" class="textIcon textIcon-primary" style="display:inline-block;margin-right:5px;">P<\/span>(premium total: {{premiumTotal | currency}})<\/div>'}function t(n){for(var i=0,t=0;t<n.length;t++)i+=n[t].PremiumAmount;return i}return{restrict:"E",replace:!0,scope:{cartItems:"=cartItems",showIcon:"=showIcon"},link:function(n){n.premiumTotal=t(n.cartItems)},template:n()}}angular.module("directives").directive("premiumTotal",n)}(),function(){"use strict";function n(n,t,i){function e(){return u.get({}).$promise.then(function(i){return n.setLoginStatus(i.DonorIsLoggedIn),t.when(i)})}function o(){var n=t.defer();return f.get({redirect:!1}).$promise.then(function(){$.ajax({url:SERVER_SETTINGS.applicationRoot+"GiftHistory/MyGiftHistoryPartial",dataType:"html",success:function(t){$("#ghModalContent").html(t);n.resolve()}})}),n.promise}var r={getSidebarViewModel:e,signOut:o},u=i(SERVER_SETTINGS.applicationRoot+"Layout/GetSidebarViewModel",{},{get:{method:"GET"}}),f=i(SERVER_SETTINGS.applicationRoot+"GiftHistory/LogOut",{redirect:"@redirect"},{get:{method:"GET"}});return r}angular.module("dataServices").factory("SidebarDataService",n);n.$inject=["LoginService","$q","$resource"]}(),function(){"use strict";function n(n,t,i,r,u,f,e){function s(){t.setLoading("sidebar");i.getSidebarViewModel().then(function(n){t.setLoaded("sidebar");o.sidebarVM=n}).catch(function(n){APP.logError({ErrorType:"unknown",SubErrorType:null,ErrorMessage:n.message||JSON.stringify(n),ErrorSource:"sidebar.controller.js > _activate()"},!0,null)})}function h(t){t.IsFredHutchFund?(n.setActiveFredHutchFund(t),w()):r.showModal(t.Code,null,null)}function c(){var n=$("#cartModal").hasClass("in");n||window.location.hash.toLowerCase()!=="#cart"||(window.location.hash="");window.location.hash="#cart"}function l(n){var i=!1,t;if(o.cart.DonorsCartItems)for(t=0;t<o.cart.DonorsCartItems.length;t++)if(o.cart.DonorsCartItems[t].AllocationCode===n){i=!0;break}return i}function a(){e(function(){$("#myGiftHistoryModal").modal("hide")},1e3);s()}function v(){var n=$("#myGiftHistoryModal");MODALHELPER.showModal(null,"myGiftHistoryModal");e(function(){$("#DonorID",n).trigger("focus")},500)}function y(){MODALHELPER.showModal({backdrop:"static",keyboard:!1},"tributeModal")}function p(){i.signOut().then(function(){s();u.$broadcast("sdbarLogout")})}function w(){MODALHELPER.showModal(null,"fredHutchModal")}var o=this;o.sidebarVM=null;o.cart=n.getCart();o.loadingStatus=t.getStatus();o.isEditing=!1;o.addToCartFromHistory=h;o.editCart=c;o.fundInCart=l;o.giftHistoryLogin=v;o.openTributeModal=y;o.signOut=p;u.$on("tributeUpdated",function(){s()});APP.isRedirectInProgress()||s();f.ghLoginCallback=a}angular.module("shared").controller("SidebarController",n);n.$inject=["CartService","LoadingService","SidebarDataService","QuickAddModalService","$rootScope","$scope","$timeout"]}(),function(){"use strict";function n(n,t,i){function f(n){return u.get({allocationCode:n})}var r={getQuickAddModel:f},u=i(SERVER_SETTINGS.applicationRoot+"Cart/GetQuickAddModel",{allocationCode:"@allocactionCode"},{get:{method:"GET"}});return r}angular.module("dataServices").factory("QuickAddDataService",n);n.$inject=["$q","$timeout","$resource"]}(),function(){"use strict";function n(n){function i(i,r,u){n.getQuickAddModel(i).$promise.then(function(n){n&&n.ActiveFund!==null?(t.serverModel=n,r!==null&&r>0&&(t.serverModel.ActiveFund.theAmount=r),u!==null&&u.toLowerCase()==="monthly"&&(t.serverModel.ActiveFund.IsOneTimeGift=!1),MODALHELPER.showModal(null,"quickAddModal")):APP.logError({ErrorType:"quickAddModel is null",SubErrorType:null,ErrorMessage:"quickAddModel is empty or model.ActiveFund is null for allocation code: ".concat(i,", model: ").concat(n,", model.ActiveFund: ").concat(n.ActiveFund),ErrorSource:"quickAddModal.services.js"},!1,null)})}var t={showModal:i,serverModel:null};return t}angular.module("shared").factory("QuickAddModalService",n);n.$inject=["QuickAddDataService"]}(),function(){"use strict";function n(n,t,i,r){function o(){return!angular.equals(u.quickAddModalForm.$error,{})&&!u.quickAddModalForm.$pristine}function s(t){var i=n.addIsValid(u.serverModel.ActiveFund,t);u.submitting=!0;u.unknownError=!1;i.valid?n.addToCart(u.serverModel.ActiveFund).then(function(n){n&&n.Validation&&n.Validation!==null?(u.Validation=n.Validation,u.submitting=!1):r(function(){u.submitting=!1;t?window.location.href=SERVER_SETTINGS.applicationRoot+"Checkout":$("#quickAddModal").modal("hide")},750)}).catch(function(n){u.submitting=!1;APP.logError({ErrorType:"unknown",SubErrorType:null,ErrorMessage:n.message||JSON.stringify(n),ErrorSource:"quickAdd.controller.js > submitQuickAddModalForm()"},!1,null)}):(u.submitting=!1,i.property&&i.type&&!t?(u.proceedToCheckoutError="",u.quickAddModalForm[i.property].$setValidity(i.type,!1)):t?u.proceedToCheckoutError=i.message:u.unknownError=!0)}function h(){$("#quickAddModal").on("shown.bs.modal",function(){u.Validation=null;angular.extend(u,{serverModel:t.serverModel});u.serverModel.ActiveFund.theAmount=u.serverModel.ActiveFund.theAmount>0?u.serverModel.ActiveFund.theAmount:null;u.proceedToCheckoutError="";i.$apply();var n=[];n.push({item_id:u.serverModel.ActiveFund.AllocationCode,item_name:u.serverModel.ActiveFund.FundName,quantity:1,price:Number(u.serverModel.ActiveFund.theAmount)});OGGA.logViewItemEventGTAG(n);r(function(){u.serverModel.ActiveFund.theAmount<=0&&(u.quickAddModalForm.theAmount.$setValidity("min",!1),u.ready=!0)})});$("#quickAddModal").on("hidden.bs.modal",function(){u.serverModel=null;u.submitting=!1;u.validationError="";i.$apply()})}function c(n,t){u.proceedToCheckoutError="";a(n,t)}function l(n,t){f?f=!1:n!==t&&u.serverModel&&typeof t!="undefined"&&(e=!0,u.serverModel.ActiveFund.theAmount=n)}function a(n,t){var r=!1,i;if(e)e=!1;else if(n!==t&&u.serverModel&&u.serverModel.ShowHandles&&n!==u.serverModel.SelectedHandleValue){if(typeof n!="undefined")for(i=0;i<u.serverModel.HandleList.length;i++)if(u.serverModel.HandleList[i].Value===n){r=!0;break}r?(f=!0,u.serverModel.SelectedHandleValue=n):u.serverModel.SelectedHandleValue!==0&&(f=!0,u.serverModel.SelectedHandleValue=0)}}var u=this,e,f;u.cart=n.getCart();u.serverModel=null;e=!1;f=!1;u.genericError="We're sorry, there was an unknown error adding your fund to the basket.";u.ready=!1;u.proceedToCheckoutError="";u.submitting=!1;u.unknownError=!1;u.Validation=null;u.showQAError=o;u.submitQuickAddModalForm=s;i.$watch("vm.serverModel.SelectedHandleValue",l);i.$watch("vm.serverModel.ActiveFund.theAmount",c);h()}angular.module("shared").controller("QuickAddController",n);n.$inject=["CartService","QuickAddModalService","$scope","$timeout"]}(),function(){"use strict";function n(n,t){function s(){$(document).ready(function(){u=n.getLoading();typeof u.sidebar=="undefined"?o.get({}).$promise.then(function(n){f(n.DonorIsLoggedIn);i.ready=!0}):i.ready=!0})}function h(){return r}function c(){return i}function f(n){r.DonorIsLoggedIn=n}var r={DonorIsLoggedIn:!1},i={ready:!1},u=null,e={getLoginSession:h,getStatus:c,setLoginStatus:f},o=t(SERVER_SETTINGS.applicationRoot+"Layout/GetSidebarViewModel",{},{get:{method:"GET"}});return s(),e}angular.module("shared").factory("LoginService",n);n.$inject=["LoadingService","$resource"]}(),OGEventMapper=function(){function n(){var n=this;this.CartItemDTOMapper={map:function(n){return{amount:n.amount,fundCode:n.fundCode,fundName:n.fundName}}};this.TransactionDTOMapper={map:function(t){for(var r=[],i=0;i<t.funds.length;i++)r.push(n.CartItemDTOMapper.map(t.funds[i]));return{appealCode:t.appealCode,donationID:t.donationID,funds:r,inboundChannel:t.inboundChannel,totalAmount:t.totalAmount}}};this.SearchDTOMapper={map:function(n){return{searchTerm:n.searchTerm}}}}return n.getInstance=function(){return n.instance===null&&(n.instance=new n),n.instance},n.prototype.mapEventDataToListenerDTO=function(n,t){switch(n){case"giftEvent":return this.TransactionDTOMapper.map(t);case"searchEvent":return this.SearchDTOMapper.map(t);default:return null}},n.instance=null,n}(),OG_Events=function(){function n(){this.config={inIframeOverride:!1,allowedRecipients:["https://giving.uwmedicine.org","https://washington.edu","https://myuwgiving.gifts.washington.edu"]};this.mapper=OGEventMapper.getInstance();this.config.allowedRecipients.push("https://ua-dev-secure.gifts.washington.edu");this.config.inIframeOverride&&console.error("remember to toggle config.inIframeOverride off")}return n.getInstance=function(){return n.instance===null&&(n.instance=new n),n.instance},n.prototype.addToCartEvent=function(){return null},n.prototype.giftEvent=function(n){var t=this.mapper.mapEventDataToListenerDTO("giftEvent",n);OGGA.MONETA.receiveTransactionEventData(n);this.sendToParent(t,"giftEvent")},n.prototype.pageEvent=function(){return null},n.prototype.searchEvent=function(n){var t=this.mapper.mapEventDataToListenerDTO("searchEvent",n);OGGA.MONETA.receiveSearchEventData(n);this.sendToParent(t,"searchEvent")},n.prototype.sendToParent=function(n,t){var r,i;if(this.inIframe())for(r=this.serializePostMessageData(n,t.toString()),i=0;i<this.config.allowedRecipients.length;i++)this.postMessage(this.config.allowedRecipients[i],r)},n.prototype.inIframe=function(){if(this.config.inIframeOverride)return!0;try{return window.self!==window.top}catch(n){return!0}},n.prototype.serializePostMessageData=function(n,t){n.MessageType=t;return{token:"0239jladfmgasfd",message:JSON.stringify(n)}},n.prototype.postMessage=function(n,t){window.parent.postMessage(t,n)},n.instance=null,n}(),typeof jQuery=="undefined")throw new Error("Bootstrap's JavaScript requires jQuery");+function(n){"use strict";var t=n.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||t[0]==1&&t[1]==9&&t[2]<1||t[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4");}(jQuery);+function(n){"use strict";function t(){var i=document.createElement("bootstrap"),n={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var t in n)if(i.style[t]!==undefined)return{end:n[t]};return!1}n.fn.emulateTransitionEnd=function(t){var i=!1,u=this,r;n(this).one("bsTransitionEnd",function(){i=!0});return r=function(){i||n(u).trigger(n.support.transition.end)},setTimeout(r,t),this};n(function(){(n.support.transition=t(),n.support.transition)&&(n.event.special.bsTransitionEnd={bindType:n.support.transition.end,delegateType:n.support.transition.end,handle:function(t){if(n(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}})})}(jQuery);+function(n){"use strict";function u(i){return this.each(function(){var r=n(this),u=r.data("bs.alert");u||r.data("bs.alert",u=new t(this));typeof i=="string"&&u[i].call(r)})}var i='[data-dismiss="alert"]',t=function(t){n(t).on("click",i,this.close)},r;t.VERSION="3.4.1";t.TRANSITION_DURATION=150;t.prototype.close=function(i){function e(){u.detach().trigger("closed.bs.alert").remove()}var f=n(this),r=f.attr("data-target"),u;(r||(r=f.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,"")),r=r==="#"?[]:r,u=n(document).find(r),i&&i.preventDefault(),u.length||(u=f.closest(".alert")),u.trigger(i=n.Event("close.bs.alert")),i.isDefaultPrevented())||(u.removeClass("in"),n.support.transition&&u.hasClass("fade")?u.one("bsTransitionEnd",e).emulateTransitionEnd(t.TRANSITION_DURATION):e())};r=n.fn.alert;n.fn.alert=u;n.fn.alert.Constructor=t;n.fn.alert.noConflict=function(){return n.fn.alert=r,this};n(document).on("click.bs.alert.data-api",i,t.prototype.close)}(jQuery);+function(n){"use strict";function i(i){return this.each(function(){var u=n(this),r=u.data("bs.button"),f=typeof i=="object"&&i;r||u.data("bs.button",r=new t(this,f));i=="toggle"?r.toggle():i&&r.setState(i)})}var t=function(i,r){this.$element=n(i);this.options=n.extend({},t.DEFAULTS,r);this.isLoading=!1},r;t.VERSION="3.4.1";t.DEFAULTS={loadingText:"loading..."};t.prototype.setState=function(t){var i="disabled",r=this.$element,f=r.is("input")?"val":"html",u=r.data();t+="Text";u.resetText==null&&r.data("resetText",r[f]());setTimeout(n.proxy(function(){r[f](u[t]==null?this.options[t]:u[t]);t=="loadingText"?(this.isLoading=!0,r.addClass(i).attr(i,i).prop(i,!0)):this.isLoading&&(this.isLoading=!1,r.removeClass(i).removeAttr(i).prop(i,!1))},this),0)};t.prototype.toggle=function(){var t=!0,i=this.$element.closest('[data-toggle="buttons"]'),n;i.length?(n=this.$element.find("input"),n.prop("type")=="radio"?(n.prop("checked")&&(t=!1),i.find(".active").removeClass("active"),this.$element.addClass("active")):n.prop("type")=="checkbox"&&(n.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),n.prop("checked",this.$element.hasClass("active")),t&&n.trigger("change")):(this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active"))};r=n.fn.button;n.fn.button=i;n.fn.button.Constructor=t;n.fn.button.noConflict=function(){return n.fn.button=r,this};n(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(t){var r=n(t.target).closest(".btn");i.call(r,"toggle");n(t.target).is('input[type="radio"], input[type="checkbox"]')||(t.preventDefault(),r.is("input,button")?r.trigger("focus"):r.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(t){n(t.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(t.type))})}(jQuery);+function(n){"use strict";function i(i){return this.each(function(){var u=n(this),r=u.data("bs.carousel"),f=n.extend({},t.DEFAULTS,u.data(),typeof i=="object"&&i),e=typeof i=="string"?i:f.slide;r||u.data("bs.carousel",r=new t(this,f));typeof i=="number"?r.to(i):e?r[e]():f.interval&&r.pause().cycle()})}var t=function(t,i){this.$element=n(t);this.$indicators=this.$element.find(".carousel-indicators");this.options=i;this.paused=null;this.sliding=null;this.interval=null;this.$active=null;this.$items=null;this.options.keyboard&&this.$element.on("keydown.bs.carousel",n.proxy(this.keydown,this));this.options.pause!="hover"||"ontouchstart"in document.documentElement||this.$element.on("mouseenter.bs.carousel",n.proxy(this.pause,this)).on("mouseleave.bs.carousel",n.proxy(this.cycle,this))},u,r;t.VERSION="3.4.1";t.TRANSITION_DURATION=600;t.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0};t.prototype.keydown=function(n){if(!/input|textarea/i.test(n.target.tagName)){switch(n.which){case 37:this.prev();break;case 39:this.next();break;default:return}n.preventDefault()}};t.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(n.proxy(this.next,this),this.options.interval)),this};t.prototype.getItemIndex=function(n){return this.$items=n.parent().children(".item"),this.$items.index(n||this.$active)};t.prototype.getItemForDirection=function(n,t){var i=this.getItemIndex(t),f=n=="prev"&&i===0||n=="next"&&i==this.$items.length-1,r,u;return f&&!this.options.wrap?t:(r=n=="prev"?-1:1,u=(i+r)%this.$items.length,this.$items.eq(u))};t.prototype.to=function(n){var i=this,t=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(n>this.$items.length-1)&&!(n<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){i.to(n)}):t==n?this.pause().cycle():this.slide(n>t?"next":"prev",this.$items.eq(n))};t.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&n.support.transition&&(this.$element.trigger(n.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this};t.prototype.next=function(){if(!this.sliding)return this.slide("next")};t.prototype.prev=function(){if(!this.sliding)return this.slide("prev")};t.prototype.slide=function(i,r){var e=this.$element.find(".item.active"),u=r||this.getItemForDirection(i,e),l=this.interval,f=i=="next"?"left":"right",a=this,o,s,h,c;return u.hasClass("active")?this.sliding=!1:(o=u[0],s=n.Event("slide.bs.carousel",{relatedTarget:o,direction:f}),this.$element.trigger(s),s.isDefaultPrevented())?void 0:(this.sliding=!0,l&&this.pause(),this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),h=n(this.$indicators.children()[this.getItemIndex(u)]),h&&h.addClass("active")),c=n.Event("slid.bs.carousel",{relatedTarget:o,direction:f}),n.support.transition&&this.$element.hasClass("slide")?(u.addClass(i),typeof u=="object"&&u.length&&u[0].offsetWidth,e.addClass(f),u.addClass(f),e.one("bsTransitionEnd",function(){u.removeClass([i,f].join(" ")).addClass("active");e.removeClass(["active",f].join(" "));a.sliding=!1;setTimeout(function(){a.$element.trigger(c)},0)}).emulateTransitionEnd(t.TRANSITION_DURATION)):(e.removeClass("active"),u.addClass("active"),this.sliding=!1,this.$element.trigger(c)),l&&this.cycle(),this)};u=n.fn.carousel;n.fn.carousel=i;n.fn.carousel.Constructor=t;n.fn.carousel.noConflict=function(){return n.fn.carousel=u,this};r=function(t){var u=n(this),f=u.attr("href"),s,r,o,e;(f&&(f=f.replace(/.*(?=#[^\s]+$)/,"")),s=u.attr("data-target")||f,r=n(document).find(s),r.hasClass("carousel"))&&(o=n.extend({},r.data(),u.data()),e=u.attr("data-slide-to"),e&&(o.interval=!1),i.call(r,o),e&&r.data("bs.carousel").to(e),t.preventDefault())};n(document).on("click.bs.carousel.data-api","[data-slide]",r).on("click.bs.carousel.data-api","[data-slide-to]",r);n(window).on("load",function(){n('[data-ride="carousel"]').each(function(){var t=n(this);i.call(t,t.data())})})}(jQuery);+function(n){"use strict";function r(t){var i,r=t.attr("data-target")||(i=t.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"");return n(document).find(r)}function i(i){return this.each(function(){var u=n(this),r=u.data("bs.collapse"),f=n.extend({},t.DEFAULTS,u.data(),typeof i=="object"&&i);!r&&f.toggle&&/show|hide/.test(i)&&(f.toggle=!1);r||u.data("bs.collapse",r=new t(this,f));typeof i=="string"&&r[i]()})}var t=function(i,r){this.$element=n(i);this.options=n.extend({},t.DEFAULTS,r);this.$trigger=n('[data-toggle="collapse"][href="#'+i.id+'"],[data-toggle="collapse"][data-target="#'+i.id+'"]');this.transitioning=null;this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger);this.options.toggle&&this.toggle()},u;t.VERSION="3.4.1";t.TRANSITION_DURATION=350;t.DEFAULTS={toggle:!0};t.prototype.dimension=function(){var n=this.$element.hasClass("width");return n?"width":"height"};t.prototype.show=function(){var f,r,e,u,o,s;if(!this.transitioning&&!this.$element.hasClass("in")&&(r=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing"),!r||!r.length||(f=r.data("bs.collapse"),!f||!f.transitioning))&&(e=n.Event("show.bs.collapse"),this.$element.trigger(e),!e.isDefaultPrevented())){if(r&&r.length&&(i.call(r,"hide"),f||r.data("bs.collapse",null)),u=this.dimension(),this.$element.removeClass("collapse").addClass("collapsing")[u](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1,o=function(){this.$element.removeClass("collapsing").addClass("collapse in")[u]("");this.transitioning=0;this.$element.trigger("shown.bs.collapse")},!n.support.transition)return o.call(this);s=n.camelCase(["scroll",u].join("-"));this.$element.one("bsTransitionEnd",n.proxy(o,this)).emulateTransitionEnd(t.TRANSITION_DURATION)[u](this.$element[0][s])}};t.prototype.hide=function(){var r,i,u;if(!this.transitioning&&this.$element.hasClass("in")&&(r=n.Event("hide.bs.collapse"),this.$element.trigger(r),!r.isDefaultPrevented())){if(i=this.dimension(),this.$element[i](this.$element[i]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1,u=function(){this.transitioning=0;this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")},!n.support.transition)return u.call(this);this.$element[i](0).one("bsTransitionEnd",n.proxy(u,this)).emulateTransitionEnd(t.TRANSITION_DURATION)}};t.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};t.prototype.getParent=function(){return n(document).find(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(n.proxy(function(t,i){var u=n(i);this.addAriaAndCollapsedClass(r(u),u)},this)).end()};t.prototype.addAriaAndCollapsedClass=function(n,t){var i=n.hasClass("in");n.attr("aria-expanded",i);t.toggleClass("collapsed",!i).attr("aria-expanded",i)};u=n.fn.collapse;n.fn.collapse=i;n.fn.collapse.Constructor=t;n.fn.collapse.noConflict=function(){return n.fn.collapse=u,this};n(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(t){var u=n(this);u.attr("data-target")||t.preventDefault();var f=r(u),e=f.data("bs.collapse"),o=e?"toggle":u.data();i.call(f,o)})}(jQuery);+function(n){"use strict";function r(t){var i=t.attr("data-target"),r;return i||(i=t.attr("href"),i=i&&/#[A-Za-z]/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,"")),r=i!=="#"?n(document).find(i):null,r&&r.length?r:t.parent()}function u(t){t&&t.which===3||(n(e).remove(),n(i).each(function(){var u=n(this),i=r(u),f={relatedTarget:this};i.hasClass("open")&&(t&&t.type=="click"&&/input|textarea/i.test(t.target.tagName)&&n.contains(i[0],t.target)||(i.trigger(t=n.Event("hide.bs.dropdown",f)),t.isDefaultPrevented())||(u.attr("aria-expanded","false"),i.removeClass("open").trigger(n.Event("hidden.bs.dropdown",f))))}))}function o(i){return this.each(function(){var r=n(this),u=r.data("bs.dropdown");u||r.data("bs.dropdown",u=new t(this));typeof i=="string"&&u[i].call(r)})}var e=".dropdown-backdrop",i='[data-toggle="dropdown"]',t=function(t){n(t).on("click.bs.dropdown",this.toggle)},f;t.VERSION="3.4.1";t.prototype.toggle=function(t){var f=n(this),i,o,e;if(!f.is(".disabled, :disabled")){if(i=r(f),o=i.hasClass("open"),u(),!o){if("ontouchstart"in document.documentElement&&!i.closest(".navbar-nav").length)n(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(n(this)).on("click",u);if(e={relatedTarget:this},i.trigger(t=n.Event("show.bs.dropdown",e)),t.isDefaultPrevented())return;f.trigger("focus").attr("aria-expanded","true");i.toggleClass("open").trigger(n.Event("shown.bs.dropdown",e))}return!1}};t.prototype.keydown=function(t){var e,o,s,h,f,u;if(/(38|40|27|32)/.test(t.which)&&!/input|textarea/i.test(t.target.tagName)&&(e=n(this),t.preventDefault(),t.stopPropagation(),!e.is(".disabled, :disabled"))){if(o=r(e),s=o.hasClass("open"),!s&&t.which!=27||s&&t.which==27)return t.which==27&&o.find(i).trigger("focus"),e.trigger("click");(h=" li:not(.disabled):visible a",f=o.find(".dropdown-menu"+h),f.length)&&(u=f.index(t.target),t.which==38&&u>0&&u--,t.which==40&&u<f.length-1&&u++,~u||(u=0),f.eq(u).trigger("focus"))}};f=n.fn.dropdown;n.fn.dropdown=o;n.fn.dropdown.Constructor=t;n.fn.dropdown.noConflict=function(){return n.fn.dropdown=f,this};n(document).on("click.bs.dropdown.data-api",u).on("click.bs.dropdown.data-api",".dropdown form",function(n){n.stopPropagation()}).on("click.bs.dropdown.data-api",i,t.prototype.toggle).on("keydown.bs.dropdown.data-api",i,t.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",t.prototype.keydown)}(jQuery);+function(n){"use strict";function i(i,r){return this.each(function(){var f=n(this),u=f.data("bs.modal"),e=n.extend({},t.DEFAULTS,f.data(),typeof i=="object"&&i);u||f.data("bs.modal",u=new t(this,e));typeof i=="string"?u[i](r):e.show&&u.show(r)})}var t=function(t,i){this.options=i;this.$body=n(document.body);this.$element=n(t);this.$dialog=this.$element.find(".modal-dialog");this.$backdrop=null;this.isShown=null;this.originalBodyPad=null;this.scrollbarWidth=0;this.ignoreBackdropClick=!1;this.fixedContent=".navbar-fixed-top, .navbar-fixed-bottom";this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,n.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))},r;t.VERSION="3.4.1";t.TRANSITION_DURATION=300;t.BACKDROP_TRANSITION_DURATION=150;t.DEFAULTS={backdrop:!0,keyboard:!0,show:!0};t.prototype.toggle=function(n){return this.isShown?this.hide():this.show(n)};t.prototype.show=function(i){var r=this,u=n.Event("show.bs.modal",{relatedTarget:i});if(this.$element.trigger(u),!this.isShown&&!u.isDefaultPrevented()){this.isShown=!0;this.checkScrollbar();this.setScrollbar();this.$body.addClass("modal-open");this.escape();this.resize();this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',n.proxy(this.hide,this));this.$dialog.on("mousedown.dismiss.bs.modal",function(){r.$element.one("mouseup.dismiss.bs.modal",function(t){n(t.target).is(r.$element)&&(r.ignoreBackdropClick=!0)})});this.backdrop(function(){var f=n.support.transition&&r.$element.hasClass("fade"),u;r.$element.parent().length||r.$element.appendTo(r.$body);r.$element.show().scrollTop(0);r.adjustDialog();f&&r.$element[0].offsetWidth;r.$element.addClass("in");r.enforceFocus();u=n.Event("shown.bs.modal",{relatedTarget:i});f?r.$dialog.one("bsTransitionEnd",function(){r.$element.trigger("focus").trigger(u)}).emulateTransitionEnd(t.TRANSITION_DURATION):r.$element.trigger("focus").trigger(u)})}};t.prototype.hide=function(i){(i&&i.preventDefault(),i=n.Event("hide.bs.modal"),this.$element.trigger(i),this.isShown&&!i.isDefaultPrevented())&&(this.isShown=!1,this.escape(),this.resize(),n(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),n.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",n.proxy(this.hideModal,this)).emulateTransitionEnd(t.TRANSITION_DURATION):this.hideModal())};t.prototype.enforceFocus=function(){n(document).off("focusin.bs.modal").on("focusin.bs.modal",n.proxy(function(n){document===n.target||this.$element[0]===n.target||this.$element.has(n.target).length||this.$element.trigger("focus")},this))};t.prototype.escape=function(){if(this.isShown&&this.options.keyboard)this.$element.on("keydown.dismiss.bs.modal",n.proxy(function(n){n.which==27&&this.hide()},this));else this.isShown||this.$element.off("keydown.dismiss.bs.modal")};t.prototype.resize=function(){if(this.isShown)n(window).on("resize.bs.modal",n.proxy(this.handleUpdate,this));else n(window).off("resize.bs.modal")};t.prototype.hideModal=function(){var n=this;this.$element.hide();this.backdrop(function(){n.$body.removeClass("modal-open");n.resetAdjustments();n.resetScrollbar();n.$element.trigger("hidden.bs.modal")})};t.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove();this.$backdrop=null};t.prototype.backdrop=function(i){var e=this,f=this.$element.hasClass("fade")?"fade":"",r,u;if(this.isShown&&this.options.backdrop){r=n.support.transition&&f;this.$backdrop=n(document.createElement("div")).addClass("modal-backdrop "+f).appendTo(this.$body);this.$element.on("click.dismiss.bs.modal",n.proxy(function(n){if(this.ignoreBackdropClick){this.ignoreBackdropClick=!1;return}n.target===n.currentTarget&&(this.options.backdrop=="static"?this.$element[0].focus():this.hide())},this));if(r&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!i)return;r?this.$backdrop.one("bsTransitionEnd",i).emulateTransitionEnd(t.BACKDROP_TRANSITION_DURATION):i()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),u=function(){e.removeBackdrop();i&&i()},n.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",u).emulateTransitionEnd(t.BACKDROP_TRANSITION_DURATION):u()):i&&i()};t.prototype.handleUpdate=function(){this.adjustDialog()};t.prototype.adjustDialog=function(){var n=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&n?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!n?this.scrollbarWidth:""})};t.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})};t.prototype.checkScrollbar=function(){var n=window.innerWidth,t;n||(t=document.documentElement.getBoundingClientRect(),n=t.right-Math.abs(t.left));this.bodyIsOverflowing=document.body.clientWidth<n;this.scrollbarWidth=this.measureScrollbar()};t.prototype.setScrollbar=function(){var i=parseInt(this.$body.css("padding-right")||0,10),t;this.originalBodyPad=document.body.style.paddingRight||"";t=this.scrollbarWidth;this.bodyIsOverflowing&&(this.$body.css("padding-right",i+t),n(this.fixedContent).each(function(i,r){var u=r.style.paddingRight,f=n(r).css("padding-right");n(r).data("padding-right",u).css("padding-right",parseFloat(f)+t+"px")}))};t.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad);n(this.fixedContent).each(function(t,i){var r=n(i).data("padding-right");n(i).removeData("padding-right");i.style.paddingRight=r?r:""})};t.prototype.measureScrollbar=function(){var n=document.createElement("div"),t;return n.className="modal-scrollbar-measure",this.$body.append(n),t=n.offsetWidth-n.clientWidth,this.$body[0].removeChild(n),t};r=n.fn.modal;n.fn.modal=i;n.fn.modal.Constructor=t;n.fn.modal.noConflict=function(){return n.fn.modal=r,this};n(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(t){var r=n(this),f=r.attr("href"),e=r.attr("data-target")||f&&f.replace(/.*(?=#[^\s]+$)/,""),u=n(document).find(e),o=u.data("bs.modal")?"toggle":n.extend({remote:!/#/.test(f)&&f},u.data(),r.data());r.is("a")&&t.preventDefault();u.one("show.bs.modal",function(n){if(!n.isDefaultPrevented())u.one("hidden.bs.modal",function(){r.is(":visible")&&r.trigger("focus")})});i.call(u,o,this)})}(jQuery);+function(n){"use strict";function s(t,i){var u=t.nodeName.toLowerCase(),s,r,h;if(n.inArray(u,i)!==-1)return n.inArray(u,f)!==-1?Boolean(t.nodeValue.match(e)||t.nodeValue.match(o)):!0;for(s=n(i).filter(function(n,t){return t instanceof RegExp}),r=0,h=s.length;r<h;r++)if(u.match(s[r]))return!0;return!1}function i(t,i,r){var e,a,c,o,v,u,l,h,y,f,p;if(t.length===0)return t;if(r&&typeof r=="function")return r(t);if(!document.implementation||!document.implementation.createHTMLDocument)return t;for(e=document.implementation.createHTMLDocument("sanitization"),e.body.innerHTML=t,a=n.map(i,function(n,t){return t}),c=n(e.body).find("*"),o=0,v=c.length;o<v;o++){if(u=c[o],l=u.nodeName.toLowerCase(),n.inArray(l,a)===-1){u.parentNode.removeChild(u);continue}for(h=n.map(u.attributes,function(n){return n}),y=[].concat(i["*"]||[],i[l]||[]),f=0,p=h.length;f<p;f++)s(h[f],y)||u.removeAttribute(h[f].nodeName)}return e.body.innerHTML}function h(i){return this.each(function(){var u=n(this),r=u.data("bs.tooltip"),f=typeof i=="object"&&i;(r||!/destroy|hide/.test(i))&&(r||u.data("bs.tooltip",r=new t(this,f)),typeof i=="string"&&r[i]())})}var u=["sanitize","whiteList","sanitizeFn"],f=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],e=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,o=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i,t=function(n,t){this.type=null;this.options=null;this.enabled=null;this.timeout=null;this.hoverState=null;this.$element=null;this.inState=null;this.init("tooltip",n,t)},r;t.VERSION="3.4.1";t.TRANSITION_DURATION=150;t.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"><\/div><div class="tooltip-inner"><\/div><\/div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0},sanitize:!0,sanitizeFn:null,whiteList:{"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]}};t.prototype.init=function(t,i,r){var f,e,u,o,s;if(this.enabled=!0,this.type=t,this.$element=n(i),this.options=this.getOptions(r),this.$viewport=this.options.viewport&&n(document).find(n.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(f=this.options.trigger.split(" "),e=f.length;e--;)if(u=f[e],u=="click")this.$element.on("click."+this.type,this.options.selector,n.proxy(this.toggle,this));else if(u!="manual"){o=u=="hover"?"mouseenter":"focusin";s=u=="hover"?"mouseleave":"focusout";this.$element.on(o+"."+this.type,this.options.selector,n.proxy(this.enter,this));this.$element.on(s+"."+this.type,this.options.selector,n.proxy(this.leave,this))}this.options.selector?this._options=n.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()};t.prototype.getDefaults=function(){return t.DEFAULTS};t.prototype.getOptions=function(t){var r=this.$element.data();for(var f in r)r.hasOwnProperty(f)&&n.inArray(f,u)!==-1&&delete r[f];return t=n.extend({},this.getDefaults(),r,t),t.delay&&typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),t.sanitize&&(t.template=i(t.template,t.whiteList,t.sanitizeFn)),t};t.prototype.getDelegateOptions=function(){var t={},i=this.getDefaults();return this._options&&n.each(this._options,function(n,r){i[n]!=r&&(t[n]=r)}),t};t.prototype.enter=function(t){var i=t instanceof this.constructor?t:n(t.currentTarget).data("bs."+this.type);if(i||(i=new this.constructor(t.currentTarget,this.getDelegateOptions()),n(t.currentTarget).data("bs."+this.type,i)),t instanceof n.Event&&(i.inState[t.type=="focusin"?"focus":"hover"]=!0),i.tip().hasClass("in")||i.hoverState=="in"){i.hoverState="in";return}if(clearTimeout(i.timeout),i.hoverState="in",!i.options.delay||!i.options.delay.show)return i.show();i.timeout=setTimeout(function(){i.hoverState=="in"&&i.show()},i.options.delay.show)};t.prototype.isInStateTrue=function(){for(var n in this.inState)if(this.inState[n])return!0;return!1};t.prototype.leave=function(t){var i=t instanceof this.constructor?t:n(t.currentTarget).data("bs."+this.type);if(i||(i=new this.constructor(t.currentTarget,this.getDelegateOptions()),n(t.currentTarget).data("bs."+this.type,i)),t instanceof n.Event&&(i.inState[t.type=="focusout"?"focus":"hover"]=!1),!i.isInStateTrue()){if(clearTimeout(i.timeout),i.hoverState="out",!i.options.delay||!i.options.delay.hide)return i.hide();i.timeout=setTimeout(function(){i.hoverState=="out"&&i.hide()},i.options.delay.hide)}};t.prototype.show=function(){var c=n.Event("show.bs."+this.type),l,p,e,w,h;if(this.hasContent()&&this.enabled){if(this.$element.trigger(c),l=n.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]),c.isDefaultPrevented()||!l)return;var u=this,r=this.tip(),a=this.getUID(this.type);this.setContent();r.attr("id",a);this.$element.attr("aria-describedby",a);this.options.animation&&r.addClass("fade");var i=typeof this.options.placement=="function"?this.options.placement.call(this,r[0],this.$element[0]):this.options.placement,v=/\s?auto?\s?/i,y=v.test(i);y&&(i=i.replace(v,"")||"top");r.detach().css({top:0,left:0,display:"block"}).addClass(i).data("bs."+this.type,this);this.options.container?r.appendTo(n(document).find(this.options.container)):r.insertAfter(this.$element);this.$element.trigger("inserted.bs."+this.type);var f=this.getPosition(),o=r[0].offsetWidth,s=r[0].offsetHeight;y&&(p=i,e=this.getPosition(this.$viewport),i=i=="bottom"&&f.bottom+s>e.bottom?"top":i=="top"&&f.top-s<e.top?"bottom":i=="right"&&f.right+o>e.width?"left":i=="left"&&f.left-o<e.left?"right":i,r.removeClass(p).addClass(i));w=this.getCalculatedOffset(i,f,o,s);this.applyPlacement(w,i);h=function(){var n=u.hoverState;u.$element.trigger("shown.bs."+u.type);u.hoverState=null;n=="out"&&u.leave(u)};n.support.transition&&this.$tip.hasClass("fade")?r.one("bsTransitionEnd",h).emulateTransitionEnd(t.TRANSITION_DURATION):h()}};t.prototype.applyPlacement=function(t,i){var r=this.tip(),l=r[0].offsetWidth,e=r[0].offsetHeight,o=parseInt(r.css("margin-top"),10),s=parseInt(r.css("margin-left"),10),h,f,u;isNaN(o)&&(o=0);isNaN(s)&&(s=0);t.top+=o;t.left+=s;n.offset.setOffset(r[0],n.extend({using:function(n){r.css({top:Math.round(n.top),left:Math.round(n.left)})}},t),0);r.addClass("in");h=r[0].offsetWidth;f=r[0].offsetHeight;i=="top"&&f!=e&&(t.top=t.top+e-f);u=this.getViewportAdjustedDelta(i,t,h,f);u.left?t.left+=u.left:t.top+=u.top;var c=/top|bottom/.test(i),a=c?u.left*2-l+h:u.top*2-e+f,v=c?"offsetWidth":"offsetHeight";r.offset(t);this.replaceArrow(a,r[0][v],c)};t.prototype.replaceArrow=function(n,t,i){this.arrow().css(i?"left":"top",50*(1-n/t)+"%").css(i?"top":"left","")};t.prototype.setContent=function(){var t=this.tip(),n=this.getTitle();this.options.html?(this.options.sanitize&&(n=i(n,this.options.whiteList,this.options.sanitizeFn)),t.find(".tooltip-inner").html(n)):t.find(".tooltip-inner").text(n);t.removeClass("fade in top bottom left right")};t.prototype.hide=function(i){function e(){r.hoverState!="in"&&u.detach();r.$element&&r.$element.removeAttr("aria-describedby").trigger("hidden.bs."+r.type);i&&i()}var r=this,u=n(this.$tip),f=n.Event("hide.bs."+this.type);if(this.$element.trigger(f),!f.isDefaultPrevented())return u.removeClass("in"),n.support.transition&&u.hasClass("fade")?u.one("bsTransitionEnd",e).emulateTransitionEnd(t.TRANSITION_DURATION):e(),this.hoverState=null,this};t.prototype.fixTitle=function(){var n=this.$element;(n.attr("title")||typeof n.attr("data-original-title")!="string")&&n.attr("data-original-title",n.attr("title")||"").attr("title","")};t.prototype.hasContent=function(){return this.getTitle()};t.prototype.getPosition=function(t){t=t||this.$element;var r=t[0],u=r.tagName=="BODY",i=r.getBoundingClientRect();i.width==null&&(i=n.extend({},i,{width:i.right-i.left,height:i.bottom-i.top}));var f=window.SVGElement&&r instanceof window.SVGElement,e=u?{top:0,left:0}:f?null:t.offset(),o={scroll:u?document.documentElement.scrollTop||document.body.scrollTop:t.scrollTop()},s=u?{width:n(window).width(),height:n(window).height()}:null;return n.extend({},i,o,s,e)};t.prototype.getCalculatedOffset=function(n,t,i,r){return n=="bottom"?{top:t.top+t.height,left:t.left+t.width/2-i/2}:n=="top"?{top:t.top-r,left:t.left+t.width/2-i/2}:n=="left"?{top:t.top+t.height/2-r/2,left:t.left-i}:{top:t.top+t.height/2-r/2,left:t.left+t.width}};t.prototype.getViewportAdjustedDelta=function(n,t,i,r){var f={top:0,left:0},e,u,o,s,h,c;return this.$viewport?(e=this.options.viewport&&this.options.viewport.padding||0,u=this.getPosition(this.$viewport),/right|left/.test(n)?(o=t.top-e-u.scroll,s=t.top+e-u.scroll+r,o<u.top?f.top=u.top-o:s>u.top+u.height&&(f.top=u.top+u.height-s)):(h=t.left-e,c=t.left+e+i,h<u.left?f.left=u.left-h:c>u.right&&(f.left=u.left+u.width-c)),f):f};t.prototype.getTitle=function(){var t=this.$element,n=this.options;return t.attr("data-original-title")||(typeof n.title=="function"?n.title.call(t[0]):n.title)};t.prototype.getUID=function(n){do n+=~~(Math.random()*1e6);while(document.getElementById(n));return n};t.prototype.tip=function(){if(!this.$tip&&(this.$tip=n(this.options.template),this.$tip.length!=1))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip};t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")};t.prototype.enable=function(){this.enabled=!0};t.prototype.disable=function(){this.enabled=!1};t.prototype.toggleEnabled=function(){this.enabled=!this.enabled};t.prototype.toggle=function(t){var i=this;t&&(i=n(t.currentTarget).data("bs."+this.type),i||(i=new this.constructor(t.currentTarget,this.getDelegateOptions()),n(t.currentTarget).data("bs."+this.type,i)));t?(i.inState.click=!i.inState.click,i.isInStateTrue()?i.enter(i):i.leave(i)):i.tip().hasClass("in")?i.leave(i):i.enter(i)};t.prototype.destroy=function(){var n=this;clearTimeout(this.timeout);this.hide(function(){n.$element.off("."+n.type).removeData("bs."+n.type);n.$tip&&n.$tip.detach();n.$tip=null;n.$arrow=null;n.$viewport=null;n.$element=null})};t.prototype.sanitizeHtml=function(n){return i(n,this.options.whiteList,this.options.sanitizeFn)};r=n.fn.tooltip;n.fn.tooltip=h;n.fn.tooltip.Constructor=t;n.fn.tooltip.noConflict=function(){return n.fn.tooltip=r,this}}(jQuery);+function(n){"use strict";function r(i){return this.each(function(){var u=n(this),r=u.data("bs.popover"),f=typeof i=="object"&&i;(r||!/destroy|hide/.test(i))&&(r||u.data("bs.popover",r=new t(this,f)),typeof i=="string"&&r[i]())})}var t=function(n,t){this.init("popover",n,t)},i;if(!n.fn.tooltip)throw new Error("Popover requires tooltip.js");t.VERSION="3.4.1";t.DEFAULTS=n.extend({},n.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"><\/div><h3 class="popover-title"><\/h3><div class="popover-content"><\/div><\/div>'});t.prototype=n.extend({},n.fn.tooltip.Constructor.prototype);t.prototype.constructor=t;t.prototype.getDefaults=function(){return t.DEFAULTS};t.prototype.setContent=function(){var n=this.tip(),i=this.getTitle(),t=this.getContent(),r;this.options.html?(r=typeof t,this.options.sanitize&&(i=this.sanitizeHtml(i),r==="string"&&(t=this.sanitizeHtml(t))),n.find(".popover-title").html(i),n.find(".popover-content").children().detach().end()[r==="string"?"html":"append"](t)):(n.find(".popover-title").text(i),n.find(".popover-content").children().detach().end().text(t));n.removeClass("fade top bottom left right in");n.find(".popover-title").html()||n.find(".popover-title").hide()};t.prototype.hasContent=function(){return this.getTitle()||this.getContent()};t.prototype.getContent=function(){var t=this.$element,n=this.options;return t.attr("data-content")||(typeof n.content=="function"?n.content.call(t[0]):n.content)};t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};i=n.fn.popover;n.fn.popover=r;n.fn.popover.Constructor=t;n.fn.popover.noConflict=function(){return n.fn.popover=i,this}}(jQuery);+function(n){"use strict";function t(i,r){this.$body=n(document.body);this.$scrollElement=n(i).is(document.body)?n(window):n(i);this.options=n.extend({},t.DEFAULTS,r);this.selector=(this.options.target||"")+" .nav li > a";this.offsets=[];this.targets=[];this.activeTarget=null;this.scrollHeight=0;this.$scrollElement.on("scroll.bs.scrollspy",n.proxy(this.process,this));this.refresh();this.process()}function i(i){return this.each(function(){var u=n(this),r=u.data("bs.scrollspy"),f=typeof i=="object"&&i;r||u.data("bs.scrollspy",r=new t(this,f));typeof i=="string"&&r[i]()})}t.VERSION="3.4.1";t.DEFAULTS={offset:10};t.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)};t.prototype.refresh=function(){var t=this,i="offset",r=0;this.offsets=[];this.targets=[];this.scrollHeight=this.getScrollHeight();n.isWindow(this.$scrollElement[0])||(i="position",r=this.$scrollElement.scrollTop());this.$body.find(this.selector).map(function(){var f=n(this),u=f.data("target")||f.attr("href"),t=/^#./.test(u)&&n(u);return t&&t.length&&t.is(":visible")&&[[t[i]().top+r,u]]||null}).sort(function(n,t){return n[0]-t[0]}).each(function(){t.offsets.push(this[0]);t.targets.push(this[1])})};t.prototype.process=function(){var i=this.$scrollElement.scrollTop()+this.options.offset,f=this.getScrollHeight(),e=this.options.offset+f-this.$scrollElement.height(),t=this.offsets,r=this.targets,u=this.activeTarget,n;if(this.scrollHeight!=f&&this.refresh(),i>=e)return u!=(n=r[r.length-1])&&this.activate(n);if(u&&i<t[0])return this.activeTarget=null,this.clear();for(n=t.length;n--;)u!=r[n]&&i>=t[n]&&(t[n+1]===undefined||i<t[n+1])&&this.activate(r[n])};t.prototype.activate=function(t){this.activeTarget=t;this.clear();var r=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',i=n(r).parents("li").addClass("active");i.parent(".dropdown-menu").length&&(i=i.closest("li.dropdown").addClass("active"));i.trigger("activate.bs.scrollspy")};t.prototype.clear=function(){n(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var r=n.fn.scrollspy;n.fn.scrollspy=i;n.fn.scrollspy.Constructor=t;n.fn.scrollspy.noConflict=function(){return n.fn.scrollspy=r,this};n(window).on("load.bs.scrollspy.data-api",function(){n('[data-spy="scroll"]').each(function(){var t=n(this);i.call(t,t.data())})})}(jQuery);+function(n){"use strict";function r(i){return this.each(function(){var u=n(this),r=u.data("bs.tab");r||u.data("bs.tab",r=new t(this));typeof i=="string"&&r[i]()})}var t=function(t){this.element=n(t)},u,i;t.VERSION="3.4.1";t.TRANSITION_DURATION=150;t.prototype.show=function(){var t=this.element,f=t.closest("ul:not(.dropdown-menu)"),i=t.data("target"),u;if(i||(i=t.attr("href"),i=i&&i.replace(/.*(?=#[^\s]*$)/,"")),!t.parent("li").hasClass("active")){var r=f.find(".active:last a"),e=n.Event("hide.bs.tab",{relatedTarget:t[0]}),o=n.Event("show.bs.tab",{relatedTarget:r[0]});(r.trigger(e),t.trigger(o),o.isDefaultPrevented()||e.isDefaultPrevented())||(u=n(document).find(i),this.activate(t.closest("li"),f),this.activate(u,u.parent(),function(){r.trigger({type:"hidden.bs.tab",relatedTarget:t[0]});t.trigger({type:"shown.bs.tab",relatedTarget:r[0]})}))}};t.prototype.activate=function(i,r,u){function o(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1);i.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0);e?(i[0].offsetWidth,i.addClass("in")):i.removeClass("fade");i.parent(".dropdown-menu").length&&i.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0);u&&u()}var f=r.find("> .active"),e=u&&n.support.transition&&(f.length&&f.hasClass("fade")||!!r.find("> .fade").length);f.length&&e?f.one("bsTransitionEnd",o).emulateTransitionEnd(t.TRANSITION_DURATION):o();f.removeClass("in")};u=n.fn.tab;n.fn.tab=r;n.fn.tab.Constructor=t;n.fn.tab.noConflict=function(){return n.fn.tab=u,this};i=function(t){t.preventDefault();r.call(n(this),"show")};n(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',i).on("click.bs.tab.data-api",'[data-toggle="pill"]',i)}(jQuery);+function(n){"use strict";function i(i){return this.each(function(){var u=n(this),r=u.data("bs.affix"),f=typeof i=="object"&&i;r||u.data("bs.affix",r=new t(this,f));typeof i=="string"&&r[i]()})}var t=function(i,r){this.options=n.extend({},t.DEFAULTS,r);var u=this.options.target===t.DEFAULTS.target?n(this.options.target):n(document).find(this.options.target);this.$target=u.on("scroll.bs.affix.data-api",n.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",n.proxy(this.checkPositionWithEventLoop,this));this.$element=n(i);this.affixed=null;this.unpin=null;this.pinnedOffset=null;this.checkPosition()},r;t.VERSION="3.4.1";t.RESET="affix affix-top affix-bottom";t.DEFAULTS={offset:0,target:window};t.prototype.getState=function(n,t,i,r){var u=this.$target.scrollTop(),f=this.$element.offset(),e=this.$target.height();if(i!=null&&this.affixed=="top")return u<i?"top":!1;if(this.affixed=="bottom")return i!=null?u+this.unpin<=f.top?!1:"bottom":u+e<=n-r?!1:"bottom";var o=this.affixed==null,s=o?u:f.top,h=o?e:t;return i!=null&&u<=i?"top":r!=null&&s+h>=n-r?"bottom":!1};t.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(t.RESET).addClass("affix");var n=this.$target.scrollTop(),i=this.$element.offset();return this.pinnedOffset=i.top-n};t.prototype.checkPositionWithEventLoop=function(){setTimeout(n.proxy(this.checkPosition,this),1)};t.prototype.checkPosition=function(){var i,e,o;if(this.$element.is(":visible")){var s=this.$element.height(),r=this.options.offset,f=r.top,u=r.bottom,h=Math.max(n(document).height(),n(document.body).height());if(typeof r!="object"&&(u=f=r),typeof f=="function"&&(f=r.top(this.$element)),typeof u=="function"&&(u=r.bottom(this.$element)),i=this.getState(h,s,f,u),this.affixed!=i){if(this.unpin!=null&&this.$element.css("top",""),e="affix"+(i?"-"+i:""),o=n.Event(e+".bs.affix"),this.$element.trigger(o),o.isDefaultPrevented())return;this.affixed=i;this.unpin=i=="bottom"?this.getPinnedOffset():null;this.$element.removeClass(t.RESET).addClass(e).trigger(e.replace("affix","affixed")+".bs.affix")}i=="bottom"&&this.$element.offset({top:h-s-u})}};r=n.fn.affix;n.fn.affix=i;n.fn.affix.Constructor=t;n.fn.affix.noConflict=function(){return n.fn.affix=r,this};n(window).on("load",function(){n('[data-spy="affix"]').each(function(){var r=n(this),t=r.data();t.offset=t.offset||{};t.offsetBottom!=null&&(t.offset.bottom=t.offsetBottom);t.offsetTop!=null&&(t.offset.top=t.offsetTop);i.call(r,t)})})}(jQuery),function(n){n.extend({showBsModal:function(t){var i=n.extend({title:"Alert",content:"",noHeader:!1,noFooter:!1,bootstrapOptions:null,buttons:null,width:null,size:null,marginTop:null,onClose:null,id:"myModalID"+n(".modal").length,insertAfterElementID:null,className:null,ajaxLoadingMessage:"",ajaxContent:null,ajaxCallBack:null,usingModalHelper:!1},t),r="",f=i.noHeader===!0&&i.noFooter===!0?".modal-content":".modal-body",u,e;i.ajaxContent!==null&&(i.content="<div class='modal-loading-msg'>"+(i.ajaxLoadingMessage?i.ajaxLoadingMessage:"")+"<div class='modal-loading-img'><\/div><\/div>"),function(){r+='<div class="modal fade" id="'+i.id+'" tabindex="-1" role="dialog" aria-labelledby="'+i.title.replace(/ /g,"")+'ModalLabel" aria-hidden="true"><div class="modal-dialog';i.className&&(r+=" "+i.className);i.size&&(r+=" "+i.size);r+='"';(i.width||i.marginTop)&&(r+=' style="',i.width&&(r+="width:"+i.width+";"),i.marginTop&&(r+="margin-top:"+i.marginTop+";"),r+='"');r+=' role="dc"><div class="modal-content';i.ajaxContent!==null&&(r+=" ab-modal-loading",i.noFooter===!1&&(r+=" loading-with-footer"),i.noHeader===!1&&(r+=" loading-with-header"));r+='"';r+=' id="'+i.id+'-content"';r+=">";i.noHeader!==!0&&(r+='<div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;<\/button><h4 class="modal-title" id="'+i.title.replace(/ /g,"")+'ModalLabel">'+i.title+"<\/h4><\/div>");r+=i.noHeader===!0&&i.noFooter===!0?i.content:'<div class="modal-body">'+i.content+"<\/div>";i.noFooter!==!0&&(r+='<div class="modal-footer">',i.buttons?n.each(i.buttons,function(n,t){r+='<button type="button" class="';r+=t.className?t.className:"btn btn-default";r+='" id="';r+=t.id?t.id:i.id+t.text+"button";t.onClick&&(r+='" onClick="',r+=t.onClick);r+='"';t.data&&(r+=" "+t.data);r+=">"+t.text+"<\/button>"}):r+='<button type="button" id="'+i.id+'closeButton" class="btn btn-default" data-dismiss="modal">Close<\/button>',r+="<\/div>");r+="<\/div><\/div><\/div>"}();i.insertAfterElementID?n("#"+i.insertAfterElementID).after(r):n("body").append(r);typeof MODALHELPER!="undefined"&&i.usingModalHelper?i.usingModalHelper&&MODALHELPER.showModal(i.bootstrapOptions&&i.bootstrapOptions,i.id):n("#"+i.id).modal(i.bootstrapOptions&&i.bootstrapOptions);i.ajaxContent!==null&&(u=i.ajaxContent instanceof Array?!0:!1,e=u?i.ajaxContent[0]:i.ajaxContent,n("#"+i.id+" "+f).load(e,u?i.ajaxContent[1]:null,function(t,r){r==="error"?(n("#"+i.id+" "+f).html("<div class='modal-loading-msg'><span class='text-danger'>Error loading content. Please refresh the page and try again. If this problem persists, please contact <a href='mailto:advsti@uw.edu'>advsti@uw.edu<\/a><\/span><\/div>"),console.error("error loading ajax content into modal")):(n("#"+i.id+" .modal-content").removeClass("ab-modal-loading").removeClass("loading-with-footer").removeClass("loading-with-header"),i.ajaxCallBack!==null&&i.ajaxCallBack())}));n("#"+i.id).on("hidden.bs.modal",function(){i.onClose&&i.onClose();n(this).remove()})}})}(jQuery),function(n){n.event.special.destroyed={remove:function(n){n.handler&&n.handler()}}}(jQuery);$(document).ready(function(){function u(n,u){var c=$(window).width(),f=$(window).scrollTop()+$(window).height(),e=n.outerHeight()+i,o=n.outerWidth()+i,s=0,h=0;return h=u.pageY+e<f?u.pageY-r:f-e-r,s=u.pageX+o+t<c?u.pageX+t:u.pageX-(o-i+t),{top:h+"px",left:s+"px"}}function f(t){var i=$.grep(n,function(n){return n.id===t}),r=n.indexOf(i[0]);n.splice(r,1)}var t=10,r=10,i=10,n=[];Array.prototype.indexOf||(Array.prototype.indexOf=function(n,t){for(var i=t||0,r=this.length;i<r;i++)if(this[i]===n)return i;return-1}),function(){var i=!1,t;$("body").on("mouseenter","[data-tooltip]",function(r){if(!$(this).hasClass("prevent-tooltip")){this.tooltipData=this.getAttribute("data-tooltip");this.tempTitle=this.title;this.title="";this.timestamp=(new Date).getTime();i=!0;$("body").append("<div id='tooltip"+this.timestamp+"' class='tooltipBox'>"+this.tooltipData+"<\/div>");t=$("#tooltip"+this.timestamp);n.push({id:this.timestamp,parent:$(this),tooltip:t});t.css(u(t,r)).fadeIn(100);$(this).on("mousemove",function(n){i&&!$(this).hasClass("prevent-tooltip")&&t.css(u(t,n))}).on("mouseleave",function(){$(this).hasClass("prevent-tooltip")||(t.fadeOut(100,function(){$(this).remove()}),f(this.timestamp),this.title=this.tempTitle)})}}).on("destroyed",function(){if(!$(this).hasClass("prevent-tooltip"))for(var t=0;t<n.length;t++)n[t].parent.closest("body").length>0&&(n[t].tooltip.fadeOut(100,function(){$(this).remove()}),f(n[t].parent.timestamp))})}()});UTILITIES=function(){return{consoleSupport:function(){typeof console=="undefined"&&(console={log:function(){},info:function(){},warn:function(){},error:function(){}})},elementsArePresent:function(n){var t,i,r=!0;if(Array.isArray(n)){for(t=0;t<n.length;t++)if(typeof n[t]=="undefined"||n[t]===null||n[t].length<=0){r=!1;break}}else i=n,(typeof i=="undefined"||i===null||i.length<=0)&&(r=!1);return r},formatMoney:function(n){for(var t=parseFloat(n).toFixed(2).split("."),i=/(\d+)(\d{3})/;i.test(t[0]);)t[0]=t[0].replace(i,"$1,$2");return"$"+t[0]+"."+t[1]},getQueryVariable:function(n){for(var u=window.location.search.substring(1),r=u.split("&"),i="",t=0,t=0;t<r.length;t++)if(i=r[t].split("="),i[0].toLowerCase()===n.toLowerCase())return i[1]},inIframe:function(){try{return window.self!==window.top}catch(n){return!0}},isSafari:function(){var n=navigator.userAgent.toLowerCase();return n.indexOf("safari")!==-1?n.indexOf("chrome")>-1?!1:!0:!1},parseQueryString:function(n){var e=decodeURIComponent(n.toLowerCase()),u={},i,r,t,f;for(i=e.split(/&(?:amp;)?/gi),t=0,f=i.length;t<f;t++)r=i[t].split("="),u[r[0]]=r[1];return u},removeQueryParam:function(n,t,i){var e,r,u=n.split("?"),f;if(u.length>=2){for(i!==""&&(u[1]=u[1].replace(i,"")),e=encodeURIComponent(t)+"=",r=u[1].split(/[&;]/g),f=r.length;f-->0;)r[f].toLowerCase().lastIndexOf(e,0)!==-1&&r.splice(f,1);return u[0]+(r.length>0?"?"+r.join("&"):"")+(i!==""?i:"")}return n},scrubQueryParams:function(n,t){function u(){for(var n="",r=0;r<t.length;r++)t[r]in i&&(n!==""&&(n+="&"),n+=t[r]+"="+i[t[r]]);return n!==""?"?"+n:""}var i=this.parseQueryString(n.search.substring(1)),r=typeof t!="undefined"&&typeof i!="undefined"?u():"";return[n.protocol,"//",n.host,n.pathname,r].join("")},serializeObjectAsQueryString:function(n){var i=[];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&i.push(encodeURIComponent(t)+"="+encodeURIComponent(n[t]).replace(/\(/g,"%28").replace(/\)/g,"%29"));return i.join("&")},testCookieSupport:function(){var u;document.cookie="uwTestCookie=true;";for(var i=!1,t,r=document.cookie.split("; "),n=0,n=0;n<r.length;n++)if(r[n].indexOf("UWFFormHostDomain")>=0){i=!0;break}else if(r[n].indexOf("uwTestCookie=")>=0){i=!0;document.cookie="uwTestCookie=; expires=Sat, 01 Jan 2000 00:00:00 UTC;";break}i||(u="",t=document.createElement("h2"),u=UTILITIES.isSafari()?"Online Giving is currently experiencing issues running in the Safari Browser. Please try another browser. We are sorry for any inconvenience.":"Please enable cookies. You will not be able to complete your gift without them.",t.appendChild(document.createTextNode(u)),t.className="text-center cookie-warning",document.body.insertBefore(t,document.body.childNodes[0]))},toBool:function(n){return n.toLowerCase()==="true"?!0:!1}}}();APP=function(){function n(){var n=window.navigator.userAgent;return n.toLowerCase().indexOf("googlebot")>=0?!0:n.toLowerCase().indexOf("applebot")>=0?!0:!1}function t(){var u;document.cookie="uwTestCookie=true;";for(var i=!1,t,f,r=document.cookie.split("; "),n=0,n=0;n<r.length;n++)if(r[n].indexOf("UWFFormHostDomain")>=0){i=!0;break}else if(r[n].indexOf("uwTestCookie=")>=0){i=!0;document.cookie="uwTestCookie=; expires=Sat, 01 Jan 2000 00:00:00 UTC;";break}i||(u="",t=document.createElement("h2"),f=document.getElementById("parentContainer"),u=UTILITIES.isSafari()?"Online Giving is currently experiencing issues running in the Safari Browser. Please try another browser. We are sorry for any inconvenience.":"Please enable cookies. You will not be able to complete your gift without them.",t.appendChild(document.createTextNode(u)),t.className="text-center cookie-warning",f.insertBefore(t,document.getElementById("mainRow")))}return{init:function(n){this.context.currentController=n.currentController;this.context.currentAction=n.currentAction;this.context.siteMode=SERVER_SETTINGS.site_mode;t();UTILITIES.consoleSupport()},context:{currentController:null,currentAction:null},config:{appRoot:SERVER_SETTINGS.applicationRoot,devHostNames:["ua-dev-online.gifts.washington.edu","ua-dev-online.gifts.uw.edu"],myUWGivingURL:SERVER_SETTINGS.myUWGivingURL},isMobile:function(){return(window.innerWidth>0?window.innerWidth:screen.width)<SERVER_SETTINGS.mobileShowMax?!0:!1},isRedirectInProgress:function(){var n=typeof UTILITIES.getQueryVariable("showcart")!="undefined"?!0:!1,t=n&&UTILITIES.getQueryVariable("showcart").toLowerCase()==="true"?!0:!1;return OG_STATE.redirectInProgress?!0:APP.isMobile()&&(t||window.location.hash&&window.location.hash==="#cart"||OG_STATE.monetaShowCart===!0)?!0:!1},hostIsDev:function(n){for(var i=!1,t=0;t<APP.config.devHostNames.length;t++)if(n===APP.config.devHostNames[t]){i=!0;break}return i},logError:function(t,i,r){var e,u,f;if(n())return!1;e=typeof r!="undefined"?!0:!1;u={Error:t};f="";e&&(f+="?"+r);u.Error.Location=window.location.pathname;u.Error.Referrer=document.referrer;APP.context.siteMode.toLowerCase()!=="debug"&&$.ajax({type:"POST",data:u,url:SERVER_SETTINGS.applicationRoot+"Layout/LogError",success:function(){i===!0&&window.location.replace(SERVER_SETTINGS.applicationRoot+"Error/"+f)},error:function(){i===!0&&window.location.replace(SERVER_SETTINGS.applicationRoot+"Error/"+f)}})}}}();APP.init(OG_STATE);GIFTHISTORYLOGIN=function(){function t(){$(document).ready(function(){$(document).on("click","#submitLOGIN",r)})}function i(n){var t=n.indexOf("successfulGiftHistoryLogin")>=0?!0:!1,i=$("#myGiftHistoryModal").hasClass("in");t?(i||angular.element(document.getElementById("GiftHistoryContent")).scope().ghLoginCallback(),angular.element(document.getElementById("checkoutSidebar")).scope().ghLoginCallback(),OGGA.logLoginEventGTAG()):u();i&&!t&&$("#ghModalContent").html(n)}function r(n){var t=$(this);t.hasClass("disabled")?n.preventDefault():($("span.spinner-purple",this).show(),$(this).addClass("disabled"))}function u(){var n=$("#submitLOGIN");n.removeClass("disabled");$("span.spinner-purple",this).hide()}var n={GHLoginSuccess:i};return t(),n}();OGGA=function(){return{errorHandler:function(n){if(SERVER_SETTINGS.site_mode!=="PROD"&&SERVER_SETTINGS.site_mode!==""&&SERVER_SETTINGS.site_mode!==null)console.error(n);else{var t={message:n,filename:"null",lineno:"null"};this.logExceptionGTAG(t,"customError")}},initExperiments:function(){var n=cxApi.chooseVariation(),t=[function(){},function(){$("#secure-payment-message").show()}];$(document).ready(function(){t[n]();console.log("test")})},logExceptionGTAG:function(n){gtag("event","exception",{description:"JS Error - "+n.message+" / "+n.filename+": "+n.lineno+" / "+window.location.pathname,fatal:!1})},logTransactionGTAG:function(n,t,i){gtag("event","purchase",{transaction_id:n,currency:"USD",value:t,items:i})},logAddToCartEventGTAG:function(n){gtag("event","add_to_cart",{currency:"USD",value:n[0].price,items:n})},logRemoveFromCartEventGTAG:function(n){gtag("event","remove_from_cart",{currency:"USD",value:n[0].price,items:n})},logBeginCheckoutEventGTAG:function(n,t){gtag("event","begin_checkout",{currency:"USD",value:n,items:t})},logViewItemEventGTAG:function(n){gtag("event","view_item",{currency:"USD",value:n[0].price,items:n})},logShareEventGTAG:function(n,t,i){gtag("event","share",{method:n,content_type:t,item_id:i})},logLoginEventGTAG:function(){gtag("event","login")},logSearchEventGTAG:function(n){var t=decodeURIComponent(n);gtag("event","search",{search_term:t})}}}();OGGA.MONETA=function(){function n(n){for(var i=[],t=0;t<n.funds.length;t++)i.push({item_id:n.funds[t].fundCode,item_name:n.funds[t].fundName,quantity:1,price:n.funds[t].amount,affiliation:n.appealCode===""?"N/A":n.appealCode,item_brand:n.inboundChannel});OGGA.logTransactionGTAG(n.donationID,n.totalAmount,i)}function t(n){OGGA.logSearchEventGTAG(n.searchTerm)}return{receiveTransactionEventData:n,receiveSearchEventData:t}}();lookupTextBox=lookupTextBox||{};lookupRunningForTerm="";lookupTextBox.controlObject={};lookupTextBox.controlObject.searchTimeout;lookupTextBox.controlObject.liveSearch=function(n){var t=this,u=t.options.controlName,o=t.options.listName,s=t.options.rowFilterText,r=t.cache,f=t.clearSearch;if(n.val().length>0?f.show():f.hide(),n.val().length>=3){var i=n.val(),e=t.busyIcon;lookupTextBox.controlObject.searchTimeout!==0&&clearTimeout(lookupTextBox.controlObject.searchTimeout);lookupTextBox.controlObject.searchTimeout=setTimeout(function(){var n;i in r?t.searchUpdate(r[i]):(lookupRunningForTerm=i,$.ajax({type:"get",url:baseUrl+"LookupTextBox/SearchEntity",dataType:"json",data:{term:i,list:o,filter:encodeURIComponent(s)},cache:"false",beforeSend:function(){e.show()},success:function(n){r[i]=n;lookupRunningForTerm===i&&($("#"+u+"searchResults").show(),t.searchUpdate(n))},error:function(){n=$("#"+u+"searchResults");n.show();n.html("<li class='message-error alert alert-danger'>Oh no! We're having some trouble at the moment. Please try your search again later.<li>")},complete:function(){lookupRunningForTerm===i&&e.hide()}}))},1e3)}};lookupTextBox.controlObject.searchUpdate=function(n){var u=this.options.controlName,e=this.options.buttonLabel,r=100,f=$("#"+u+"searchResults"),i="",t;if(n.length>0)for(n.length>r&&(i+="<li class='message-warning alert alert-warning'>Your search returned over "+r+" results. Please narrow your criteria.<\/li>"),t=0;t<n.length&&t<r;t++)this.selectedCodeArray.indexOf(n[t].Code)<0&&(i+="<li class='rounded gradientGrey border paddingSmall clearFix alert ab-alert-muted clearfix' style='margin-bottom: .5em;'><div class='small button green btn btn-xs btn-success "+u+"addToListButton right pull-right' style='margin: 0;' data-id='"+n[t].Code+"' data-displayText='"+n[t].Text+" ("+n[t].Code+")'>"+e+"<\/div> "+n[t].Text+" ("+n[t].Code+")<\/li>");else i+="<li class='message-warning alert alert-warning'>Your search returned no results<\/li>";f.html(i);f.show()};lookupTextBox.controlObject.prefillIDs=function(n){function f(){$.ajax({type:"get",url:baseUrl+"LookupTextBox/SearchEntity",data:{term:t[0],list:e,filter:encodeURIComponent(o)},cache:"false",success:function(n){var u=$("#"+r+"searchResults"),e;$("#"+r+"searchResults").show();s[t[0]]=n;i.searchUpdate(n);e=u.find("[data-id='"+t[0]+"']").length>0?$(u.find("[data-id='"+t[0]+"']")[0]):u.children("li").first().children("."+r+"addToListButton").first();e.trigger("click");$("#"+r+"idLookup").val("");t.shift();t.length>0&&f()}})}for(var i=this,r=i.options.controlName,e=i.options.listName,o=i.options.rowFilterText,s=i.cache,t=[],u=0;u<n.length;u++)t.push(n[u]);f()};lookupTextBox.controlObject.addToList=function(controlName){var clickedButton=$(this),thisBox=lookupTextBox[controlName],allowMultipleSelects=thisBox.options.allowMultipleSelects,postAfterSelection=thisBox.options.postAfterSelection,onSelectJS=thisBox.options.OnSelectJS,selectedCodeArray=thisBox.selectedCodeArray,li=clickedButton.closest("li").clone(),$selected=$("#"+controlName+"selectedItems");li.children("div").removeClass("green btn-success "+controlName+"addToListButton").addClass("red btn-danger icon-remove "+controlName+"removeFromListButton").text("");allowMultipleSelects.toLowerCase()==="true"?($selected.append(li),selectedCodeArray.push(clickedButton.attr("data-id"))):(selectedCodeArray[0]=clickedButton.attr("data-id"),$selected.children().remove(),$selected.append(li));thisBox.updateHiddenIDField();allowMultipleSelects.toLowerCase()!=="true"?$("#"+controlName+"searchResults").hide():$("#"+controlName+"searchResults [data-id='"+clickedButton.attr("data-id")+"']").parent().remove();postAfterSelection.toLowerCase()==="true"&&clickedButton.closest("form").trigger("submit");onSelectJS!==""&&eval(onSelectJS)};lookupTextBox.controlObject.removeFromList=function(n){var i=$(this),t=lookupTextBox[n];t.selectedCodeArray.splice(t.selectedCodeArray.indexOf(i.attr("data-id")),1);i.parent().remove();t.updateHiddenIDField()};lookupTextBox.controlObject.updateHiddenIDField=function(){var n=this;n.hidden.val(n.selectedCodeArray.toString())};lookupTextBox.controlObject.setRowFilterOption=function(n,t){var i=lookupTextBox[n];i.options.rowFilterText=t;i.cache={}};lookupTextBox.init=function(n){var t=n.controlName,i=n.prefilledID,r;lookupTextBox[t]=Object.create(lookupTextBox.controlObject);lookupTextBox[t].options=n;lookupTextBox[t].searchTimeout=0;lookupTextBox[t].cache={};lookupTextBox[t].keywordSearchField=$("#"+t+"idLookup");lookupTextBox[t].hidden=$("#"+t);lookupTextBox[t].selectedCodeArray=[];lookupTextBox[t].busyIcon=$("#"+t+"spinner");lookupTextBox[t].clearSearch=$("#"+t+"clearSearch");$("#"+t+"selectedItems").empty();i!==""&&(r=i.split(","),lookupTextBox[t].prefillIDs(r));lookupTextBox[t].keywordSearchField.on("keydown",function(n){var t=n.keyCode||n.which;if(t===13)return!1}).on("keyup",function(n){var i=n.keyCode||n.which;if((i<16||i>45)&&(i<112||i>145)||i===32)lookupTextBox[t].liveSearch($(this));else return!1});$("#"+t+"searchResults").off("click","."+t+"addToListButton").on("click","."+t+"addToListButton",function(){lookupTextBox[t].addToList.call($(this),t)});$("#"+t+"selectedItems").on("click","."+t+"removeFromListButton",function(){lookupTextBox[t].removeFromList.call($(this),t)});lookupTextBox[t].clearSearch.on("click",function(){lookupTextBox[t].clearSearch.hide();$("#"+t+"searchResults").empty();lookupTextBox[t].keywordSearchField.val("");lookupTextBox[t].keywordSearchField.trigger("focus")})},function(){"use strict";angular.module("home",["shared"])}(),function(){"use strict";function n(n,t){function e(){return u.get()}function o(t,i,u){return i==="UserInput"?f.get({text:u}).$promise.then(function(t){var i=t.Funds.length;return n.when({results:t,fundCount:i,resultType:"none"})}):r.get({code:t,type:i,text:u}).$promise.then(function(t){var i=t.DisplayType?t.DisplayType:"none",r=i==="FundsAndMoreFunds"?t.FundCategory.PriorityFunds.length+t.FundCategory.MoreFunds.length:t.Funds.length;return n.when({results:t,fundCount:r,resultType:i})})}var i={GetFiltersForDropDowns:e,Search:o},r=t(SERVER_SETTINGS.applicationRoot+"Home/DisplaySuggestedFunds",{code:"@code",type:"@type",text:"@text"},{get:{method:"GET"}}),u=t(SERVER_SETTINGS.applicationRoot+"Home/GetFiltersForDropDowns",{},{get:{method:"GET"}}),f=t(SERVER_SETTINGS.applicationRoot+"Home/Search",{text:"@text"},{get:{method:"GET"}});return i}angular.module("dataServices").factory("SearchFundsDataService",n);n.$inject=["$q","$resource"]}(),function(){"use strict";function n(){return{restrict:"E",controller:"ListFundsController",controllerAs:"vm",bindToController:!0,scope:{funds:"=funds",pledgeFunds:"=pledgeFunds"},templateUrl:SERVER_SETTINGS.applicationRoot+"Layout/ListFunds"}}angular.module("directives").directive("listFunds",n)}(),function(){"use strict";function n(n,t,i){function u(i){i.IsFredHutchFund?(n.setActiveFredHutchFund(i),o()):t.showModal(i.Code,null,null)}function f(n){var t=i("filter")(r.cart.DonorsCartItems,{AllocationCode:n});return t&&t.length>0?!0:!1}function e(t){n.removeFromCart(t)}function o(){MODALHELPER.showModal(null,"fredHutchModal")}var r=this;r.cart=n.getCart();r.fredHutchFund=null;r.addToCart=u;r.isInCart=f;r.removeFromCart=e}angular.module("directives").controller("ListFundsController",n);n.$inject=["CartService","QuickAddModalService","$filter"]}(),function(){"use strict";function n(){return{restrict:"E",controller:"SearchFundsFormController",controllerAs:"vm",bindToController:!0,templateUrl:SERVER_SETTINGS.applicationRoot+"Scripts/app/shared/directives/searchFundsForm/searchFundsForm.html",scope:{resultsCallback:"=resultsCallback"}}}angular.module("directives").directive("searchFunds",n)}(),function(){"use strict";function n(n){function e(){c();h()}function o(){$("#keywordSearch").val("");t.fundCount=null;t.resultsCallback(null,null,!0)}function s(){var n=$("#keywordSearch").val();t.searching=!0;t.searchError=!1;i.autocomplete("close");u(null,"UserInput",encodeURIComponent(n.toString()))}function h(){n.GetFiltersForDropDowns().$promise.then(function(n){t.filtersForDropDowns=n}).catch(function(n){APP.logError({ErrorType:"filtersForDropdowns",SubErrorType:null,ErrorMessage:n.message||JSON.stringify(n),ErrorSource:"searchFundsForm.controller.js > _getFiltersForDropdowns()"},!1,null)})}function c(){i.autocomplete({delay:150,minLength:0,source:function(n,t){var u=n.term;u.length>=1?u in r?t(r[u]):$.getJSON(SERVER_SETTINGS.applicationRoot+"Home/AutoSuggest",n,function(n){r[u]=n;t(n)}).always(function(){i.removeClass("ui-autocomplete-loading")}):t()},response:function(){i.removeClass("ui-autocomplete-loading")},select:function(n,t){return i.val(t.item.Allocation.OnlineName),u(t.item.Allocation.Code,t.item.Type,t.item.Allocation.OnlineName),!1}});i.data("ui-autocomplete")._renderItem=function(n,t){return t.Type==="UserInput"?$("<li data-code='"+t.Allocation.Code+"' data-type='"+t.Type+"' class='main-search-item'>").data("item.autocomplete",t).append("<a><span class='icon-search text-muted' style='margin-right: 5px;'><\/span>'"+t.Allocation.OnlineName+"' <span class='text-muted'>&ndash; Search Funds<\/span><\/a>").appendTo(n):t.Type==="Allocation"?$("<li data-code='"+t.Allocation.Code+"' data-type='"+t.Type+"' class='main-search-item'>").data("item.autocomplete",t).append("<a><strong>"+t.Allocation.OnlineName+"<\/strong><\/a>").appendTo(n):t.Type==="School"||t.Type==="Department"?$("<li data-code='"+t.Allocation.Code+"' data-type='"+t.Type+"' class='main-search-item'>").data("item.autocomplete",t).append("<a>"+t.Allocation.OnlineName+"<span class='text-muted'> &ndash; Priority Funds<\/span><\/a>").appendTo(n):$("<li data-code='"+t.Allocation.Code+"' data-type='"+t.Type+"' class='main-search-item'>").data("item.autocomplete",t).append("<a>"+t.Allocation.OnlineName+"<\/a>").appendTo(n)}}function u(i,r,u){n.Search(i,r,u).then(function(n){f.searchEvent({searchTerm:u});t.fundCount=n.fundCount;t.resultsCallback(n.results,n.resultType,!1)}).catch(function(n){t.searchError=!0;APP.logError({ErrorType:"unknown",SubErrorType:null,ErrorMessage:n.message||JSON.stringify(n),ErrorSource:"searchFundsForm.controller.js > _search()"},!1,null)}).finally(function(){t.searching=!1})}var t=this,r={},i=$("#keywordSearch"),f=OG_Events.getInstance();t.filtersForDropDowns=null;t.fundCount=null;t.searching=!1;t.searchError=!1;t.selectedCampus=null;t.selectedDiscipline=null;t.showFilters=!1;t.removeSearch=o;t.searchInputSubmit=s;APP.isRedirectInProgress()||e()}angular.module("directives").controller("SearchFundsFormController",n);n.$inject=["SearchFundsDataService"]}(),function(){"use strict";function n(n){function r(){return i.get({})}var t={getViewModel:r},i=n(SERVER_SETTINGS.applicationRoot+"Home/GetViewModel",{allocationCode:"@allocactionCode"},{get:{method:"GET"}});return t}angular.module("dataServices").factory("HomeDataService",n);n.$inject=["$resource"]}(),function(){"use strict";function n(n,t,i,r){function f(){i.setLoading("home");t.getViewModel().$promise.then(function(n){var t=null;i.setLoaded("home");angular.extend(u,{serverModel:n});OG_STATE.quickAddAllocation!==null&&OG_STATE.quickAddAllocation!==""&&(t=!isNaN(OG_STATE.quickAddAmount)&&OG_STATE.quickAddAmount>0?OG_STATE.quickAddAmount:null,r.showModal(OG_STATE.quickAddAllocation,t,OG_STATE.quickAddFrequency),OG_STATE.quickAddAllocation=null,OG_STATE.quickAddAmount=0,OG_STATE.quickAddFrequency=null);u.serverModel.GreatestNeeds.FundCategory===null?APP.logError({ErrorType:"unknown",SubErrorType:null,ErrorMessage:"FundCategory returned null",ErrorSource:"home.controller.js > activate()"},!1,null):u.searchCache.GreatestNeeds=u.serverModel.GreatestNeeds}).catch(function(n){APP.logError({ErrorType:"unknown",SubErrorType:null,ErrorMessage:n.message||JSON.stringify(n),ErrorSource:"home.controller.js > activate()"},!0,null)})}function e(n,t,i){i?(u.fundDisplayType=null,u.searchResults=null,u.serverModel.GreatestNeeds=u.searchCache.GreatestNeeds):(u.fundDisplayType=t,u.searchResults=null,t==="FundsAndMoreFunds"?u.serverModel.GreatestNeeds=n:u.searchResults=n)}var u=this;u.cart=n.getCart();u.fundDisplayType=null;u.isRedirectInProgress=APP.isRedirectInProgress();u.searchResults=null;u.loadingStatus=i.getStatus();u.searchCache={GreatestNeeds:null};u.searchResultsCallback=e;APP.isRedirectInProgress()||f()}angular.module("home").controller("HomeController",n);n.$inject=["CartService","HomeDataService","LoadingService","QuickAddModalService"]}()