!function(n,a){var t={data:{formId:0,userJourney:{loadTime:null},formAbandonment:{formActivated:null,formSubmitted:null}},init:function(){},ready:function(){t.setTrackingId(),t.setFormId(),t.startUserJourney(),void 0!==a.track_form_abandonment&&a.track_form_abandonment&&t.startFormAbandonmentCapture()},setFormId:function(){var a=n(".user-registration form");a.length&&(t.data.formId=a.data("form-id"))},setTrackingId:function(){var n=document.cookie.split(";"),a="";if(!n.some(function(n){return!!n.trim().startsWith("ur_fa_tracking_id=")&&(a=n.split("=")[1],!0)})){var t=new Date;t.setDate(t.getDate()+100);a=Math.floor(Math.random()*Date.now()).toString(36)+Math.floor(Math.random()*Date.now()).toString(36);var e=encodeURIComponent("ur_fa_tracking_id")+"="+encodeURIComponent(a)+"; expires="+t.toUTCString()+"; path=/";document.cookie=e}},startUserJourney:function(){t.data.userJourney.loadTime=Date.now(),n(window).on("beforeunload",function(){var e=Math.floor((Date.now()-t.data.userJourney.loadTime)/1e3),o="undefined"!==t.data.formAbandonment.formSubmitted&&t.data.formAbandonment.formSubmitted,r={user_session_duration:e,form_submitted:o,form_abandoned:"undefined"!==t.data.formAbandonment.formActivated&&(t.data.formAbandonment.formActivated&&!o),form_id:t.data.formId,referer:a.referer_page};n.ajax({url:a.ajax_url,type:"POST",data:{action:"ur_save_user_post_view",data:r,_wpnonce:a.save_visited_nonce}})})},startFormAbandonmentCapture:function(){n(".ur-field-item *").on("focus change",function(){null==t.data.formAbandonment.formActivated&&(t.data.formAbandonment.formActivated=!0)}),n("form.register").on("submit",function(){t.data.formAbandonment.formSubmitted=!0}),n(window).on("user_registration_frontend_after_ajax_complete",function(n,a,e,o){t.data.formAbandonment.formSubmitted=!0}),n(window).on("beforeunload",function(){void 0!==a.save_abandoned_value&&a.save_abandoned_value&&t.processAndSendAbandonedEntry()})},processAndSendAbandonedEntry:function(){if(null===t.data.formAbandonment.formSubmitted&&t.data.formAbandonment.formActivated){var e=t.getAbandonedFormData();e.push({name:"action",value:"ur_save_abandoned_data"},{name:"_wpnonce",value:a.save_abandoned_data_nonce}),n.ajax({url:a.ajax_url,type:"POST",data:e})}},getAbandonedFormData:function(){var a=n("form.register");return!!a.length&&a.serializeArray()}};t.init(),n(document).ready(t.ready)}(jQuery,urFormAnalyticsl10n);
!function(t){"use strict";t(document).ready(function(){setTimeout(function(){!function(){var n=t("#URCR-Restriction-Modal"),e=t("#URCR-Modal-Description"),o=t(".urcr-restriction-modal__close, .urcr-restriction-modal__button--close");if(!n.length)return;function i(o){n.length?(e.length&&e.html(o),n[0].showModal(),t("body").css("overflow","hidden")):alert(o)}function c(){n.length&&(n[0].close(),t("body").css("overflow",""))}t(document).on("click","a[data-restricted]",function(n){var e=t(this).data("restricted");if(e){n.preventDefault(),n.stopPropagation();var o=t("#urcr-msg-"+e);if(o.length)i(o.html());else i(window.urcrMenuRestriction&&window.urcrMenuRestriction.i18n&&window.urcrMenuRestriction.i18n.restrictedContent||"This content is restricted.")}}),o.on("click",function(t){t.preventDefault(),c()}),n.on("click",function(t){t.target===n[0]&&c()}),t(document).on("keydown",function(t){"Escape"===t.key&&n[0].open&&c()})}()},100)})}(jQuery);
!function(t,e){"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,(function(){function t(){}let e=t.prototype;return e.on=function(t,e){if(!t||!e)return this;let i=this._events=this._events||{},s=i[t]=i[t]||[];return s.includes(e)||s.push(e),this},e.once=function(t,e){if(!t||!e)return this;this.on(t,e);let i=this._onceEvents=this._onceEvents||{};return(i[t]=i[t]||{})[e]=!0,this},e.off=function(t,e){let i=this._events&&this._events[t];if(!i||!i.length)return this;let s=i.indexOf(e);return-1!=s&&i.splice(s,1),this},e.emitEvent=function(t,e){let i=this._events&&this._events[t];if(!i||!i.length)return this;i=i.slice(0),e=e||[];let s=this._onceEvents&&this._onceEvents[t];for(let n of i){s&&s[n]&&(this.off(t,n),delete s[n]),n.apply(this,e)}return this},e.allOff=function(){return delete this._events,delete this._onceEvents,this},t})),
function(t,e){"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter")):t.imagesLoaded=e(t,t.EvEmitter)}("undefined"!=typeof window?window:this,(function(t,e){let i=t.jQuery,s=t.console;function n(t,e,o){if(!(this instanceof n))return new n(t,e,o);let r=t;var h;("string"==typeof t&&(r=document.querySelectorAll(t)),r)?(this.elements=(h=r,Array.isArray(h)?h:"object"==typeof h&&"number"==typeof h.length?[...h]:[h]),this.options={},"function"==typeof e?o=e:Object.assign(this.options,e),o&&this.on("always",o),this.getImages(),i&&(this.jqDeferred=new i.Deferred),setTimeout(this.check.bind(this))):s.error(`Bad element for imagesLoaded ${r||t}`)}n.prototype=Object.create(e.prototype),n.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)};const o=[1,9,11];n.prototype.addElementImages=function(t){"IMG"===t.nodeName&&this.addImage(t),!0===this.options.background&&this.addElementBackgroundImages(t);let{nodeType:e}=t;if(!e||!o.includes(e))return;let i=t.querySelectorAll("img");for(let t of i)this.addImage(t);if("string"==typeof this.options.background){let e=t.querySelectorAll(this.options.background);for(let t of e)this.addElementBackgroundImages(t)}};const r=/url\((['"])?(.*?)\1\)/gi;function h(t){this.img=t}function d(t,e){this.url=t,this.element=e,this.img=new Image}return n.prototype.addElementBackgroundImages=function(t){let e=getComputedStyle(t);if(!e)return;let i=r.exec(e.backgroundImage);for(;null!==i;){let s=i&&i[2];s&&this.addBackground(s,t),i=r.exec(e.backgroundImage)}},n.prototype.addImage=function(t){let e=new h(t);this.images.push(e)},n.prototype.addBackground=function(t,e){let i=new d(t,e);this.images.push(i)},n.prototype.check=function(){if(this.progressedCount=0,this.hasAnyBroken=!1,!this.images.length)return void this.complete();let t=(t,e,i)=>{setTimeout((()=>{this.progress(t,e,i)}))};this.images.forEach((function(e){e.once("progress",t),e.check()}))},n.prototype.progress=function(t,e,i){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!t.isLoaded,this.emitEvent("progress",[this,t,e]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,t),this.progressedCount===this.images.length&&this.complete(),this.options.debug&&s&&s.log(`progress: ${i}`,t,e)},n.prototype.complete=function(){let t=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(t,[this]),this.emitEvent("always",[this]),this.jqDeferred){let t=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[t](this)}},h.prototype=Object.create(e.prototype),h.prototype.check=function(){this.getIsImageComplete()?this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.img.crossOrigin&&(this.proxyImage.crossOrigin=this.img.crossOrigin),this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.proxyImage.src=this.img.currentSrc||this.img.src)},h.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},h.prototype.confirm=function(t,e){this.isLoaded=t;let{parentNode:i}=this.img,s="PICTURE"===i.nodeName?i:this.img;this.emitEvent("progress",[this,s,e])},h.prototype.handleEvent=function(t){let e="on"+t.type;this[e]&&this[e](t)},h.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},h.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},h.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},d.prototype=Object.create(h.prototype),d.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url,this.getIsImageComplete()&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},d.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},d.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.element,e])},n.makeJQueryPlugin=function(e){(e=e||t.jQuery)&&(i=e,i.fn.imagesLoaded=function(t,e){return new n(this,t,e).jqDeferred.promise(i(this))})},n.makeJQueryPlugin(),n}));