1var e={d:(t,n)=>{for(var i in n)e.o(n,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:n[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},t={};e.d(t,{$b:()=>listenToStepChange,DM:()=>getFieldValueFromSessionStorageByElementId,GR:()=>getFieldValue,HC:()=>getFieldValueFromSessionStorage,Hq:()=>removeDebounceTimer,P9:()=>getFormInfo,Rs:()=>getForm,Tq:()=>triggerChangeOnId,UO:()=>triggerChangeOnElement,ZO:()=>initForm,dq:()=>listenToFormSubmit,fQ:()=>createDebounceTimer,mv:()=>listenOnKeyDownWithoutSubmit,wo:()=>listenToFieldValueChange,yS:()=>initReCaptcha});const n="formsNavigationPrevStep",i="formsNavigationNextStep",o="formsNavigateToStep",r="formsSubmitted",initReCaptcha=(e,t)=>{window.jQuery&&((e,t)=>{!function revalidateCaptcha(n){setTimeout((function(){"undefined"!=typeof grecaptcha&&grecaptcha.execute(t,{action:"homepage"}).then((function(t){if(document&&document.getElementById(e)){const n=document?.getElementById(e);n&&(n.value=t)}revalidateCaptcha(119995)}))}),n)}(0)})(e,t),"undefined"!=typeof grecaptcha&&grecaptcha.ready((function(){void 0!==epi&&void 0!==epi.EPiServer&&void 0!==epi.EPiServer.Forms&&(epi.EPiServer.Forms.Validators["AniCura.Web.Features.Blocks.ElementBlocks.ReCaptchaElementBlock.ReCaptchaValidator"]=function(e,t,n){return{isValid:!0}})}))},getForm=e=>epi.EPiServer.Forms&&epi.EPiServer.Forms[e]&&epi.EPiServer.Forms[e].$workingForm&&window.jQuery?window.jQuery(epi.EPiServer.Forms[e].$workingForm[0]):null,getFormInfo=e=>epi.EPiServer.Forms&&epi.EPiServer.Forms[e]?epi.EPiServer.Forms[e]:null,initForm=e=>{if(void 0!==epi&&void 0!==epi.EPiServer&&void 0!==epi.EPiServer.Forms){epi.EPiServer.Forms.Validators["AniCura.Web.Features.Blocks.ElementBlocks.DatePickerElementBlock.DateTimeRangeValidator"]=function(e,t,n){return{isValid:!0}},epi.EPiServer.Forms.Validators["AniCura.Web.Features.Blocks.ElementBlocks.DatePickerElementBlock.DateTimeValidator"]=function(e,t,n){return t&&t.length>0?Date.parse(t)?{isValid:!0}:{isValid:!1}:{isValid:!0}};const t=getFormInfo(e);t&&setTimeout((()=>{epi.EPiServer.Forms.Dependency._initDependencyInfos(t),t.DependencyInactiveElements&&(t.DependencyInactiveElements=[...new Set(t.DependencyInactiveElements)])}),300)}},listenToStepChange=(e,t)=>
1{setTimeout((()=>{(r=>{let a=getForm(r);if(a&&null!=a||setTimeout((()=>{a=getForm(e)}),500),null!=a){a.bind(n,(e=>{e.targetStep&&t.invokeMethodAsync("OnStepChange",e.targetStep.index)})),a.bind(i,(e=>{e.targetStep&&t.invokeMethodAsync("OnStepChange",e.targetStep.index)})),a.bind(o,(e=>{e.targetStep&&t.invokeMethodAsync("OnStepChange",e.targetStep.index)}));const e=a[0];e&&e.querySelector("[data-f-navigation-next]")&&e.addEventListener("keydown",(e=>{"13"!==e.key&&"Enter"!==e.key||e.preventDefault()}))}})(e)}),500)},triggerChangeOnId=e=>{if(e&&e.length>0&&document&&document.getElementById(e)){const t=document.getElementById(e);t&&setTimeout((()=>{t.dispatchEvent(new Event("change")),t.dispatchEvent(new Event("keyup"))}),1250)}},triggerChangeOnElement=e=>{e&&setTimeout((()=>{e.dispatchEvent(new Event("change"))}),250)},listenToFormSubmit=(e,t)=>{setTimeout((()=>{(()=>{const n=getForm(e);null!=n&&n.bind(r,(e=>{if(e.workingFormInfo&&e.workingFormInfo.Id){const n={formId:e.workingFormInfo.Id,isFinalizedSubmission:e.isSuccess,isSuccess:e.isFinalizedSubmission};t.invokeMethodAsync("OnFormSubmitted",n)}}))})()}),200)},getFieldValue=(e,t=null)=>{if(e&&e.length>0&&document&&document.getElementById(e)){const n=document.getElementById(e);if(n&&n.classList.contains("c-fieldset-choice")){const e=n.querySelector("input:checked");if(e)return e.value}else{const n=document.getElementById(e);if(n){const e=n.name;if(void 0!==n.value&&0!==n.value.length||null==e||null==t)return n.value;{const n=getFieldValueFromSessionStorage(e,t);return n||""}}}}return""},listenToFieldValueChange=(e,t)=>
1{if(e&&e.length>0&&document&&document.getElementById(e)){const n=document.getElementById(e);n&&n.addEventListener("change",(n=>{n.target&&setTimeout((()=>{t.invokeMethodAsync("OnFieldValueChange",e,getFieldValue(e))}),300)}))}},listenOnKeyDownWithoutSubmit=(e,t)=>{e&&e.addEventListener("keydown",(n=>{"13"!==n.key&&"Enter"!==n.key||n.preventDefault(),t.invokeMethodAsync("OnKeyDownWithoutSubmit",{id:e.id,key:n.key,code:n.code,location:n.location,repeat:n.repeat,ctrlKey:n.ctrlKey,shiftKey:n.shiftKey,altKey:n.altKey,metaKey:n.metaKey,type:n.type})}))},getFieldValueFromSessionStorage=(e,t,n=!1)=>{if(window.sessionStorage&&window.sessionStorage.getItem(t)){const i=window.sessionStorage.getItem(t);try{if(i){const t=JSON.parse(i),o=t[e];if(o&&("string"==typeof o||n&&Array.isArray(o)))return t[e]}}catch(e){console.warn(e)}}return""},getFieldValueFromSessionStorageByElementId=(e,t)=>{if(e&&document){const n=document.getElementById(e);if(n){const e=n.closest("form"),i=e?.id;if(t&&i){const e=getFieldValueFromSessionStorage(t,i,!0);return{Value:Array.isArray(e)?e.join(","):e,ValueArray:Array.isArray(e)?e:[]}}}}return{Value:"",ValueArray:[]}},a=new Map,createDebounceTimer=(e,t,n,i)=>{n&&n.addEventListener("input",(()=>{if(a.has(t)){const e=a.get(t);clearTimeout(e)}a.set(t,setTimeout((()=>{e?e.invokeMethodAsync("OnDebounce",t):removeDebounceTimer(t)}),i))}))},removeDebounceTimer=e=>{if(a.has(e)){const t=a.get(e);clearTimeout(t),a.delete(e)}};var s=t.fQ,c=t.GR,d=t.HC,l=t.DM,u=t.Rs,m=t.P9,g=t.ZO,p=t.yS,y=t.mv,v=t.wo,f=t.dq,S=t.$b,E=t.Hq,h=t.UO,F=t.Tq;export{s as createDebounceTimer,c as getFieldValue,d as getFieldValueFromSessionStorage,l as getFieldValueFromSessionStorageByElementId,u as getForm,m as getFormInfo,g as initForm,p as initReCaptcha,y as listenOnKeyDownWithoutSubmit,v as listenToFieldValueChange,f as listenToFormSubmit,S as listenToStepChange,E as removeDebounceTimer,h as triggerChangeOnElement,F as triggerChangeOnId};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.