UNPKG

bootstrap-italia

Version:

Bootstrap Italia è un tema Bootstrap 5 per la creazione di applicazioni web nel pieno rispetto delle linee guida di design per i siti internet e i servizi digitali della PA

1 lines 219 kB
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@popperjs/core"),require("video.js"),require("animejs/lib/anime.es.js"),require("@splidejs/splide"),require("accessible-autocomplete")):"function"==typeof define&&define.amd?define(["@popperjs/core","video.js","animejs/lib/anime.es.js","@splidejs/splide","accessible-autocomplete"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap=e(t.Popper,t.videojs,t.anime,t.Splide,t.accessibleAutocomplete)}(this,(function(t,e,i,s,n){"use strict";function o(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t)for(const i in t)if("default"!==i){const s=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>t[i]})}return e.default=t,Object.freeze(e)}const r=o(t);!function(){const t={NODE_ENV:"production"};try{if(process)return process.env=Object.assign({},process.env),void Object.assign(process.env,t)}catch(t){}globalThis.process={env:t}}();const a="data-focus-mouse",l="focus--mouse";class c{constructor(){this._usingMouse=!1,this._bindEvents()}_bindEvents(){if("undefined"==typeof document)return;["keydown","mousedown"].forEach((t=>{document.addEventListener(t,(t=>{this._usingMouse="mousedown"===t.type}))})),document.addEventListener("focusin",(t=>{this._usingMouse&&t.target&&(t.target.classList.add(l),t.target.setAttribute(a,!0))})),document.addEventListener("focusout",(t=>{t.target&&(t.target.classList.remove(l),t.target.setAttribute(a,!1))}))}}new c;const h=()=>{"undefined"==typeof window||window.BOOTSTRAP_ITALIA_VERSION||(new c,window.BOOTSTRAP_ITALIA_VERSION="2.13.4")};h();const u={ck3:{}},d={rememberChoice:(t,e)=>{u.ck3[t]=e,localStorage.setItem("bs-ck3",JSON.stringify(u.ck3))},isChoiceRemembered:t=>(u.ck3=JSON.parse(localStorage.getItem("bs-ck3")||"{}"),u.ck3[t]||!1),clearAllRememberedChoices:()=>{localStorage.removeItem("bs-ck3")}},f=new Map,p={set(t,e,i){f.has(t)||f.set(t,new Map);const s=f.get(t);s.has(e)||0===s.size?s.set(e,i):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(s.keys())[0]}.`)},get:(t,e)=>f.has(t)&&f.get(t).get(e)||null,remove(t,e){if(!f.has(t))return;const i=f.get(t);i.delete(e),0===i.size&&f.delete(t)}},m="transitionend",g=t=>{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let i=t.getAttribute("href");if(!i||!i.includes("#")&&!i.startsWith("."))return null;i.includes("#")&&!i.startsWith("#")&&(i=`#${i.split("#")[1]}`),e=i&&"#"!==i?i.trim():null}return e},_=t=>{const e=g(t);return e&&document.querySelector(e)?e:null},b=t=>{const e=g(t);return e?document.querySelector(e):null},v=t=>{t.dispatchEvent(new Event(m))},y=t=>!(!t||"object"!=typeof t)&&void 0!==t.nodeType,w=t=>y(t)?t:"string"==typeof t&&t.length>0?document.querySelector(t):null,E=t=>{if(!y(t)||0===t.getClientRects().length)return!1;const e="visible"===getComputedStyle(t).getPropertyValue("visibility"),i=t.closest("details:not([open])");if(!i)return e;if(i!==t){const e=t.closest("summary");if(e&&e.parentNode!==i)return!1;if(null===e)return!1}return e},C=t=>!t||t.nodeType!==Node.ELEMENT_NODE||(!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled"))),S=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?S(t.parentNode):null},k=()=>{},T=t=>{t.offsetHeight},A=()=>"undefined"!=typeof window&&"undefined"!=typeof document&&"rtl"===document.documentElement.dir,L=t=>{"function"==typeof t&&t()},x=(t,e,i=!0)=>{if(!i)return void L(t);const s=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:i}=window.getComputedStyle(t);const s=Number.parseFloat(e),n=Number.parseFloat(i);return s||n?(e=e.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(i))):0})(e)+5;let n=!1;const o=({target:i})=>{i===e&&(n=!0,e.removeEventListener(m,o),L(t))};e.addEventListener(m,o),setTimeout((()=>{n||v(e)}),s)},O=(t,e,i,s)=>{const n=t.length;let o=t.indexOf(e);return-1===o?!i&&s?t[n-1]:t[0]:(o+=i?1:-1,s&&(o=(o+n)%n),t[Math.max(0,Math.min(o,n-1))])},I=/[^.]*(?=\..*)\.|.*/,P=/\..*/,M=/::\d+$/,$={};let F=1;const j={mouseenter:"mouseover",mouseleave:"mouseout"},N=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function D(t,e){return e&&`${e}::${F++}`||t.uidEvent||F++}function R(t){const e=D(t);return t.uidEvent=e,$[e]=$[e]||{},$[e]}function B(t,e,i=null){return Object.values(t).find((t=>t.callable===e&&t.delegationSelector===i))}function V(t,e,i){const s="string"==typeof e,n=s?i:e||i;let o=(r=(r=t).replace(P,""),j[r]||r);var r;return N.has(o)||(o=t),[s,n,o]}function z(t,e,i,s,n){if("string"!=typeof e||!t)return;let[o,r,a]=V(e,i,s);if(e in j){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};r=t(r)}const l=R(t),c=l[a]||(l[a]={}),h=B(c,r,o?i:null);if(h)return void(h.oneOff=h.oneOff&&n);const u=D(r,e.replace(I,"")),d=o?function(t,e,i){return function s(n){const o=t.querySelectorAll(e);for(let{target:r}=n;r&&r!==this;r=r.parentNode)for(const a of o)if(a===r)return G(n,{delegateTarget:r}),s.oneOff&&H.off(t,n.type,e,i),i.apply(r,[n])}}(t,i,r):function(t,e){return function i(s){return G(s,{delegateTarget:t}),i.oneOff&&H.off(t,s.type,e),e.apply(t,[s])}}(t,r);d.delegationSelector=o?i:null,d.callable=r,d.oneOff=n,d.uidEvent=u,c[u]=d,t.addEventListener(a,d,o)}function W(t,e,i,s,n){const o=B(e[i],s,n);o&&(t.removeEventListener(i,o,Boolean(n)),delete e[i][o.uidEvent])}function q(t,e,i,s){const n=e[i]||{};for(const o of Object.keys(n))if(o.includes(s)){const s=n[o];W(t,e,i,s.callable,s.delegationSelector)}}const H={on(t,e,i,s){z(t,e,i,s,!1)},one(t,e,i,s){z(t,e,i,s,!0)},off(t,e,i,s){if("string"!=typeof e||!t)return;const[n,o,r]=V(e,i,s),a=r!==e,l=R(t),c=l[r]||{},h=e.startsWith(".");if(void 0===o){if(h)for(const i of Object.keys(l))q(t,l,i,e.slice(1));for(const i of Object.keys(c)){const s=i.replace(M,"");if(!a||e.includes(s)){const e=c[i];W(t,l,r,e.callable,e.delegationSelector)}}}else{if(!Object.keys(c).length)return;W(t,l,r,o,n?i:null)}},trigger(t,e,i){if("string"!=typeof e||!t)return null;let s=new Event(e,{bubbles:!0,cancelable:!0});return s=G(s,i),t.dispatchEvent(s),s}};function G(t,e){for(const[i,s]of Object.entries(e||{}))try{t[i]=s}catch{Object.defineProperty(t,i,{configurable:!0,get:()=>s})}return t}function U(t){if("true"===t)return!0;if("false"===t)return!1;if(t===Number(t).toString())return Number(t);if(""===t||"null"===t)return null;if("string"!=typeof t)return t;try{return JSON.parse(decodeURIComponent(t))}catch{return t}}function Y(t){return t.replace(/[A-Z]/g,(t=>`-${t.toLowerCase()}`))}const X={setDataAttribute(t,e,i){t.setAttribute(`data-bs-${Y(e)}`,i)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${Y(e)}`)},getDataAttributes(t){if(!t)return{};const e={},i=Object.keys(t.dataset).filter((t=>t.startsWith("bs")&&!t.startsWith("bsConfig")));for(const s of i){let i=s.replace(/^bs/,"");i=i.charAt(0).toLowerCase()+i.slice(1,i.length),e[i]=U(t.dataset[s])}return e},getDataAttribute:(t,e)=>U(t.getAttribute(`data-bs-${Y(e)}`))};class K{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(t,e){const i=y(e)?X.getDataAttribute(e,"config"):{};return{...this.constructor.Default,..."object"==typeof i?i:{},...y(e)?X.getDataAttributes(e):{},..."object"==typeof t?t:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const s of Object.keys(e)){const n=e[s],o=t[s],r=y(o)?"element":null==(i=o)?`${i}`:Object.prototype.toString.call(i).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(n).test(r))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${s}" provided type "${r}" but expected type "${n}".`)}var i}}class Q extends K{constructor(t,e){super(),(t=w(t))&&(this._element=t,this._config=this._getConfig(e),p.set(this._element,this.constructor.DATA_KEY,this))}dispose(){p.remove(this._element,this.constructor.DATA_KEY),H.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,i=!0){x(t,e,i)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return p.get(w(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get VERSION(){return"5.2.3"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}const Z={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter((t=>t.matches(e))),parents(t,e){const i=[];let s=t.parentNode.closest(e);for(;s;)i.push(s),s=s.parentNode.closest(e);return i},prev(t,e){let i=t.previousElementSibling;for(;i;){if(i.matches(e))return[i];i=i.previousElementSibling}return[]},next(t,e){let i=t.nextElementSibling;for(;i;){if(i.matches(e))return[i];i=i.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((t=>`${t}:not([tabindex^="-"])`)).join(",");return this.find(e,t).filter((t=>!C(t)&&E(t)))}},J={slideFocus:!0,i18n:{prev:"Slide precedente",next:"Slide successiva",first:"Vai alla prima slide",last:"Vai all’ultima slide",slideX:"Vai alla slide %s",pageX:"Vai a pagina %s",play:"Attiva autoplay",pause:"Pausa autoplay"}},tt={"it-carousel-landscape-abstract-three-cols":{type:"slide",perPage:3,gap:24,padding:{left:0,right:0},arrows:!1,breakpoints:{768:{perPage:1,gap:24,padding:{left:0,right:0},arrows:!1},992:{perPage:2,gap:24,padding:{left:40,right:40},arrows:!1}}},"it-carousel-landscape-abstract-three-cols-arrow-visible":{type:"slide",perPage:3,gap:24,padding:{left:0,right:0},arrows:!0,breakpoints:{768:{perPage:1,gap:24,padding:{left:40,right:40},arrows:!0},992:{perPage:2,gap:24,padding:{left:40,right:40},arrows:!0}}},"it-big-img":{type:"loop",perPage:1,gap:48,padding:{left:320,right:320},arrows:!1,breakpoints:{768:{perPage:1,gap:0,padding:{left:0,right:0},arrows:!1},992:{perPage:1,gap:24,padding:{left:160,right:160},arrows:!1}}},"it-standard-image":{type:"loop",perPage:3,gap:24,padding:{left:48,right:48},arrows:!1,breakpoints:{768:{perPage:1,gap:24,padding:{left:40,right:40},arrows:!1},992:{perPage:2,gap:24,padding:{left:48,right:48},arrows:!1}}},"it-carousel-landscape-abstract":{type:"slide",perPage:1,gap:24,padding:{left:0,right:0},arrows:!1,breakpoints:{768:{perPage:1,gap:24,padding:{left:0,right:0},arrows:!1},992:{perPage:1,gap:24,padding:{left:24,right:24},arrows:!1}}},"it-calendar-wrapper":{type:"slide",perPage:4,gap:0,padding:{left:0,right:0},arrows:!1,breakpoints:{560:{perPage:1,gap:0,padding:{left:24,right:24},arrows:!1},768:{perPage:2,gap:0,padding:{left:0,right:0},arrows:!1},992:{perPage:3,gap:0,padding:{left:0,right:0},arrows:!1}}}};class et extends Q{constructor(t){super(t),this._config=this._getConfig(),this._splide=new s(this._element,this._config),this._init()}dispose(){this._splide.destroy(),super.dispose()}static get NAME(){return"carousel"}_init(){this._splide.mount()}_getConfig(){let t=Object.assign({},J);return Object.keys(tt).forEach((e=>{this._element.classList.contains(e)&&(t=Object.assign({},t,tt[e]))})),t}}"undefined"!=typeof window&&"undefined"!=typeof document&&H.on(window,"load.bs.carousel.data-api",(()=>{Z.find("[data-bs-carousel-splide]").forEach((t=>{et.getOrCreateInstance(t)}))}));const it=".bs.inputlabel",st=`focus${it}`,nt=`blur${it}`,ot=`change${it}`,rt="active";class at{constructor(t){this._element=t,this._init()}static get NAME(){return"inputlabel"}static getInputFromLabel=t=>{if("undefined"!=typeof window&&"undefined"!=typeof document)return document.querySelector("#"+CSS.escape(t.getAttribute("for")))};_init(){const t=this._getLabel();t&&!t.classList.contains(rt)&&(this._labelOut(),this._labelOver()),t&&null===t.getAttribute("it-bs-static")&&this._bindEvents()}_bindEvents(){["date","time"].includes(this._element.getAttribute("type"))||("file"===this._element.getAttribute("type")?H.on(this._element,nt,(()=>{this._labelOut()})):(H.on(this._element,st,(()=>{this._labelOut()})),H.on(this._element,nt,(()=>{this._labelOver()})),H.on(this._element,ot,(()=>{this._labelToggle()}))))}_getLabel(){return Z.findOne('label[for="'+this._element.getAttribute("id")+'"]')}_isEmpty(){return!this._element.value&&!this._element.getAttribute("placeholder")}_labelOut(){const t=this._getLabel();t&&t.classList.add(rt)}_labelOver(){if(this._isEmpty()){const t=this._getLabel();t&&t.classList.remove(rt)}}_labelToggle(){this._isEmpty()?this._labelOver():this._labelOut()}}const lt=".bs.inputnumber",ct=`click${lt}`,ht=`change${lt}`,ut=`click${lt}.data-api`,dt=".input-number",ft='input[data-bs-input][type="number"]',pt='button[class^="input-number-"]';class mt extends Q{constructor(t){super(t),this._wrapperElement=this._element.closest(dt),this._label=new at(t),this._init(),this._bindEvents()}static get NAME(){return"inputnumber"}_init(){this._wrapperElement&&this._inputResize()}_bindEvents(){this._wrapperElement&&(Z.find(pt,this._wrapperElement).forEach((t=>{H.on(t,ct,(e=>{e.preventDefault(),this._incrDecr(t.classList.contains("input-number-sub")),this._label._labelOut()}))})),H.on(this._element,ht,(()=>this._checkLimit())))}_inputResize(){if(this._wrapperElement.classList.contains("input-number-adaptive")){let t=null;t="calc(70px + "+this._element.value.length+"ch)",t&&(this._element.style.width=t)}}_incrDecr(t){var e=0;if(""!==this._element.value&&(e=parseFloat(this._element.value)),!isNaN(e)){let i=parseFloat(this._element.getAttribute("step"));i||(i=1),this._element.value=e+i*(t?-1:1),H.trigger(this._element,ht),H.trigger(this._element,"input")}}_checkLimit(){const t=parseFloat(this._element.value);if(!isNaN(t)){let e=t;const i=parseFloat(this._element.getAttribute("max")),s=parseFloat(this._element.getAttribute("min"));s&&t<s&&(e=s),i&&t>i&&(e=i),this._element.value=e}this._inputResize()}}"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("DOMContentLoaded",(function(){document.querySelectorAll(ft+", label").forEach((function(t){const e=at.getInputFromLabel(t)||t;var i;(i=e)&&i.matches(ft)&&i.parentNode.querySelector(pt)&&mt.getOrCreateInstance(i)}))})),H.on(document,ut,pt,(function(){const t=this.closest(dt);if(t){const e=Z.findOne(ft,t);e&&mt.getOrCreateInstance(e)}})));const gt="show";class _t extends Q{constructor(t){super(t),this._isShown=!t.matches("[aria-hidden=true]"),this._isTransitioning=!1}static get NAME(){return"dimmer"}show(){this._isShown||this._isTransitioning||(this._isShown=!0,this._isAnimated()&&(this._isTransitioning=!0),this._showElement())}hide(){if(!this._isShown||this._isTransitioning)return;this._isShown=!1;const t=this._isAnimated();t&&(this._isTransitioning=!0),this._element.classList.remove(gt),this._queueCallback((()=>this._hideElement()),this._element,t)}_isAnimated(){return this._element.classList.contains("fade")}_showElement(){const t=this._isAnimated();this._element.removeAttribute("aria-hidden"),t&&T(this._element),this._element.classList.add(gt);this._queueCallback((()=>{this._isTransitioning=!1}),this._element,t)}_hideElement(){this._element.setAttribute("aria-hidden",!0),this._isTransitioning=!1}}"undefined"!=typeof window&&"undefined"!=typeof document&&H.on(document,"click.bs.dimmer.data-api",'[data-bs-toggle="dimmer"]',(function(){const t=b(this),e=_t.getOrCreateInstance(t);this.checked?e.show():e.hide()}));const bt=(t,e="hide")=>{const i=`click.dismiss${t.EVENT_KEY}`,s=t.NAME;H.on(document,i,`[data-bs-dismiss="${s}"]`,(function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),C(this))return;const n=b(this)||this.closest(`.${s}`);t.getOrCreateInstance(n)[e]()}))},vt=".bs.notification",yt=`click${vt}.data-api`,wt=`hidden${vt}`,Et=`show${vt}`,Ct={timeout:0},St="show";class kt extends Q{constructor(t,e){super(t),this._config=this._getConfig(e),this._isShown=this._element.classList.contains(St),this._isTransitioning=!1,this._toId=null}static get NAME(){return"notification"}show(t,e){if(this._isShown||this._isTransitioning)return;const i=t||this._getElementTimeout(e);this._isShown=!0,this._isAnimated()&&(this._isTransitioning=!0),this._showElement(i)}hide(){if(!this._isShown||this._isTransitioning)return;this._isShown=!1;const t=this._isAnimated();t&&(this._isTransitioning=!0),this._element.classList.remove(St),this._queueCallback((()=>this._hideElement()),this._element,t)}toggle(t){this._isShown?this.hide():this.show(null,t)}_isAnimated(){return this._element.classList.contains("fade")}_showElement(t){const e=this._isAnimated();this._element.style.display="block",this._element.removeAttribute("aria-hidden"),e&&T(this._element),this._element.classList.add(St);this._queueCallback((()=>{this._isTransitioning=!1,t&&this._setTimeout(t,(()=>this.hide()))}),this._element,e)}_hideElement(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._isTransitioning=!1}_getConfig(t){return t={...Ct,...X.getDataAttributes(this._element),..."object"==typeof t?t:{}}}_getElementTimeout(t){const e=t?parseInt(t.getAttribute("data-bs-timeout")):null;return e>0?e:this._config.timeout}_setTimeout(t,e){this._clearTimeout(),setTimeout(e,t)}_clearTimeout(){this._toId&&(clearTimeout(this._toId),this._toId=null)}}"undefined"!=typeof window&&"undefined"!=typeof document&&(H.on(document,yt,'[data-bs-toggle="notification"]',(function(t){const e=b(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),H.one(e,Et,(t=>{t.defaultPrevented||H.one(e,wt,(()=>{E(this)&&this.focus()}))}));kt.getOrCreateInstance(e).toggle(this)})),bt(kt));const Tt="cookiebar",At=".bs.cookiebar",Lt=".data-api",xt="cookies_consent",Ot=`close${At}`,It=`closed${At}`,Pt=`load${At}${Lt}`,Mt=`click${At}${Lt}`,$t="show";class Ft extends Q{constructor(t){super(t),this._isShown=this._element.classList.contains($t),this._isTransitioning=!1}static get NAME(){return Tt}static get VERSION(){return"5.0.0"}show(){this._isShown||this._isTransitioning||(this._isShown=!0,this._isAnimated()&&(this._isTransitioning=!0),this._showElement())}hide(){if(!this._isShown||this._isTransitioning)return;this._isShown=!1;const t=this._isAnimated();t&&(this._isTransitioning=!0),this._element.classList.remove($t),this._queueCallback((()=>this._hideElement()),this._element,t)}accept(t){t=t||this._element;const e=this._getRootElement(t);this._triggerCloseEvent(e).defaultPrevented||(this._setCookieEU(),this.hide())}static clearCookie(){"undefined"!=typeof document&&(document.cookie=xt+"=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;")}_isAnimated(){return this._element.classList.contains("fade")}_showElement(){const t=this._isAnimated();this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-live","polite"),t&&T(this._element),this._element.classList.add($t);this._queueCallback((()=>{this._isTransitioning=!1}),this._element,t)}_hideElement(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-live"),this._isTransitioning=!1}_setCookieEU(){var t=new Date;t.setDate(t.getDate()+30);var e=escape("true")+"; expires="+t.toUTCString();"undefined"!=typeof document&&(document.cookie=xt+"="+e+"; path=/; SameSite=Strict")}_getRootElement(t){const e=b(t);let i=null;return e&&(i=e),i||(i=t.closest(".cookiebar")),i}_triggerCloseEvent(t){return H.trigger(t,Ot)}_removeElement(t){t.classList.remove($t),t.setAttribute("aria-hidden","true"),t.setAttribute("aria-live","off"),H.trigger(t,It),this.dispose()}static _handleAccept(t){return function(e){e&&e.preventDefault(),t.close(this)}}static _handleConsent(t){return function(e){e&&e.preventDefault(),t.close(this)}}static _getCookieEU(){if("undefined"!=typeof document){var t,e,i,s=document.cookie.split(";");for(t=0;t<s.length;t++)if(e=s[t].substring(0,s[t].indexOf("=")),i=s[t].substring(s[t].indexOf("=")+1),(e=e.replace(/^\s+|\s+$/g,""))==xt)return unescape(i)}}}"undefined"!=typeof window&&"undefined"!=typeof document&&(H.on(document,Mt,'[data-bs-accept="cookiebar"]',(function(t){if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),C(this))return;const e=b(this)||this.closest(`.${Tt}`);Ft.getOrCreateInstance(e).accept()})),H.on(window,Pt,(function(){if(!Ft._getCookieEU()){if("undefined"==typeof document)return;document.querySelectorAll(".cookiebar").forEach((t=>{Ft.getOrCreateInstance(t).show()}))}})));const jt=()=>{if("undefined"!=typeof window)return window.matchMedia("(max-width: 991px)").matches},Nt=(t,e)=>{let i=null;return e.forEach(((e,s)=>{e===t&&(i=s)})),i},Dt=(t,e,i)=>{i={isDirectionTop:!1,isLimit:!1,loop:!1,..."object"==typeof i?i:{}};const s=Nt(t,e);let n=null;if(i.isLimit&&i.isDirectionTop&&s>0)n=e[0];else if(i.isLimit&&s<e.length-1)n=e[e.length-1];else if(i.isDirectionTop){if(!i.loop&&0===s)return;n=e[0===s?e.length-1:s-1]}else{if(!i.loop&&s===e.length-1)return;n=e[s===e.length-1?0:s+1]}n&&n.focus()},Rt="pagescroll-scroll-disabled";let Bt=!1,Vt="undefined"==typeof document?0:document.scrollingElement.scrollTop;const zt="undefined"==typeof document?null:document.querySelector("html");"undefined"!=typeof document&&document.addEventListener("scroll",(()=>{Bt&&(document.scrollingElement.scrollTop=Vt)}));const Wt=".bs.navbarcollapsible",qt=`click${Wt}.data-api`,Ht=`click${Wt}`,Gt=`keyup${Wt}`,Ut=`keydown${Wt}`,Yt=`hide${Wt}`,Xt=`hidden${Wt}`,Kt=`show${Wt}`,Qt=`shown${Wt}`,Zt=`resize${Wt}`,Jt="show",te="expanded",ee=".close-menu",ie=".nav-link",se=".nav-item .list-item",ne=".it-heading-link",oe=".it-footer-link";class re extends Q{constructor(t){super(t),this._isShown=this._element.classList.contains(te),this._isTransitioning=!1,this._isMobile=jt(),this._isKeyShift=!1,this._currItemIdx=0,this._btnClose=Z.findOne(".close-div button",this._element),this._btnBack=Z.findOne(".it-back-button",this._element),this._menuWrapper=Z.findOne(".menu-wrapper",this._element),this._overlay=null,this._setOverlay(),this._menuItems=Z.find([ie,se,ne,oe,ee].join(","),this._element),this._bindEvents()}static get NAME(){return"navbarcollapsible"}show(t){if(this._isShown||this._isTransitioning)return;H.trigger(this._element,Kt,{relatedTarget:t}).defaultPrevented||(this._btnBack&&this._btnBack.classList.add(Jt),this._isShown=!0,"undefined"!=typeof document&&(Bt=!0,Vt=document.scrollingElement.scrollTop,zt.classList.add(Rt)),this._showElement())}hide(){if(!this._isShown||this._isTransitioning)return;if(H.trigger(this._element,Yt).defaultPrevented)return;this._isShown=!1;const t=this._isAnimated();t&&(this._isTransitioning=!0),this._btnBack&&this._btnBack.classList.remove(Jt),this._overlay&&this._overlay.classList.remove(Jt),this._element.classList.remove(te),"undefined"!=typeof document&&(Bt=!1,zt.classList.remove(Rt)),this._queueCallback((()=>this._hideElement()),this._menuWrapper,t)}toggle(t){this._isShown?this.hide():this.show(t)}dispose(){"undefined"!=typeof window&&"undefined"!=typeof document&&(H.off(window,Zt),super.dispose())}_bindEvents(){"undefined"!=typeof window&&"undefined"!=typeof document&&(H.on(window,Zt,(()=>this._onResize())),this._overlay&&H.on(this._overlay,Ht,(()=>this.hide())),H.on(this._btnClose,Ht,(t=>{t.preventDefault(),this.hide()})),H.on(this._btnBack,Ht,(t=>{t.preventDefault(),this.hide()})),this._menuItems.forEach((t=>{H.on(t,Ut,(t=>this._isMobile&&this._onMenuItemKeyDown(t))),H.on(t,Gt,(t=>this._isMobile&&this._onMenuItemKeyUp(t))),H.on(t,Ht,(t=>this._isMobile&&this._onMenuItemClick(t)))})))}_onResize(){this._isMobile=jt()}_onMenuItemKeyUp(t){"Shift"===t.key&&(this._isKeyShift=!1)}_onMenuItemKeyDown(t){"Shift"===t.key&&(this._isKeyShift=!0),"Tab"===t.key&&(t.preventDefault(),this._focusNext())}_onMenuItemClick(t){this.currItemIdx=Nt(t.currentTarget,this._menuItems)}_isAnimated(){return!0}_isElementHidden(t){return null===t.offsetParent}_showElement(){const t=this._isAnimated();this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-expanded",!0),this._overlay&&(this._overlay.style.display="block"),t&&T(this._element),this._element.classList.add(te),this._overlay&&this._overlay.classList.add(Jt);this._queueCallback((()=>{this._isTransitioning=!1;const t=this._getNextVisibleItem(0);t.item&&(t.item.focus(),this._currItemIdx=t.index),H.trigger(this._element,Qt)}),this._menuWrapper,t)}_hideElement(){this._overlay&&(this._overlay.style.display="none"),this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-expanded"),this._isTransitioning=!1,H.trigger(this._element,Xt)}_setOverlay(){this._overlay=Z.findOne(".overlay",this._element),this._isAnimated&&this._overlay.classList.add("fade")}_focusNext(){let t=this._currItemIdx+(this._isKeyShift?-1:1);t<0?t=this._menuItems.length-1:t>=this._menuItems.length&&(t=0);const e=this._getNextVisibleItem(t,this._isKeyShift);e.item&&(e.item.focus(),this._currItemIdx=e.index)}_getNextVisibleItem(t,e){let i=null,s=null,n=t,o=e?-1:1,r=!1;for(;!(i||n==t&&r);)n==t&&(r=!0),this._isElementHidden(this._menuItems[n])||(i=this._menuItems[n],s=n),n+=o,n<0?n=this._menuItems.length-1:n>=this._menuItems.length&&(n=0);return{item:i,index:s}}}"undefined"!=typeof window&&"undefined"!=typeof document&&H.on(document,qt,'[data-bs-toggle="navbarcollapsible"]',(function(t){const e=b(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),H.one(e,Kt,(t=>{t.defaultPrevented||H.one(e,Xt,(()=>{E(this)&&this.focus()}))}));re.getOrCreateInstance(e).toggle(this)}));const ae=".bs.accordion",le=`keydown${ae}`,ce=`keydown${ae}.data-api`,he='.accordion-item > .accordion-header [data-bs-toggle="collapse"]';class ue extends Q{constructor(t){super(t),this._bindEvents()}static get NAME(){return"accordion"}handleKeyDown(t,e,i){const s={ArrowDown:t=>this._focusNext(t),ArrowUp:t=>this._focusPrev(t),Home:t=>this._focusFirst(t),End:t=>this._focusLast(t)};"function"==typeof s[t]&&(i&&i.preventDefault(),s[t](e))}_bindEvents(){Z.find(he,this._element).forEach((t=>{H.on(t,le,(t=>{this.handleKeyDown(t.key,t.currentTarget,t)}))}))}_getHeadButtons(){return Z.find(":scope > "+he,this._element)}_focusNext(t){Dt(t,this._getHeadButtons(),{loop:!0})}_focusPrev(t){Dt(t,this._getHeadButtons(),{isDirectionTop:!0,loop:!0})}_focusFirst(t){Dt(t,this._getHeadButtons(),{isDirectionTop:!0,isLimit:!0})}_focusLast(t){Dt(t,this._getHeadButtons(),{isLimit:!0})}}var de;"undefined"!=typeof window&&"undefined"!=typeof document&&H.on(document,ce,he,(function(t){const e=this.closest(".accordion");if(e){ue.getOrCreateInstance(e).handleKeyDown(t.key,this,t)}}));var fe=new Uint8Array(16);function pe(){if(!de&&!(de="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return de(fe)}const me=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var ge=[],_e=0;_e<256;++_e)ge.push((_e+256).toString(16).substr(1));function be(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=(ge[t[e+0]]+ge[t[e+1]]+ge[t[e+2]]+ge[t[e+3]]+"-"+ge[t[e+4]]+ge[t[e+5]]+"-"+ge[t[e+6]]+ge[t[e+7]]+"-"+ge[t[e+8]]+ge[t[e+9]]+"-"+ge[t[e+10]]+ge[t[e+11]]+ge[t[e+12]]+ge[t[e+13]]+ge[t[e+14]]+ge[t[e+15]]).toLowerCase();if(!function(t){return"string"==typeof t&&me.test(t)}(i))throw TypeError("Stringified UUID is invalid");return i}function ve(t,e,i){var s=(t=t||{}).random||(t.rng||pe)();return s[6]=15&s[6]|64,s[8]=63&s[8]|128,be(s)}let ye=!1,we=[];class Ee{constructor(t,e){this.id=t,this._callback=e}dispose(){Ce(this.id)}_execute(t){this._callback(t)}}const Ce=t=>{we=we.filter((e=>e.id!==t))},Se=t=>{if("undefined"!=typeof document){if(we.length||"undefined"!=typeof window&&"undefined"!=typeof document&&document.addEventListener("scroll",(t=>{ye||(window.requestAnimationFrame((()=>{we.forEach((e=>e.cb._execute(t))),ye=!1})),ye=!0)})),"function"==typeof t){const e=new Ee(ve(),t);return we.push({id:e.id,cb:e}),e}return console.error("[onDocumentScroll] the provided data has to be of type function"),null}},ke={duration:800,easing:"easeInOutSine"},Te=(t,e)=>{if("undefined"==typeof window||"undefined"==typeof document)return;const s=("object"==typeof e?e:{}).complete,n=window.document.scrollingElement||window.document.body||window.document.documentElement,o=n.style.scrollBehavior;e={scrollTop:t||0,...ke,..."object"==typeof e?e:{}},n.style.scrollBehavior="auto",e.complete=t=>{n.style.scrollBehavior=o,"function"==typeof s&&s(t)},i({targets:n,...e})},Ae="active",Le="ul.link-list",xe="a.nav-link",Oe=`${xe}.${Ae}`,Ie=`${xe}[href^="#"]`,Pe={scrollPadding:10,duration:800,easing:"easeInOutSine"};class Me extends Q{constructor(t,e){super(t),this._config=this._getConfig(e),this._togglerElement=Z.findOne(".custom-navbar-toggler",this._element),this._sectionContainer=Z.findOne(".it-page-sections-container"),this._collapsible=this._getCollapsible(),this._isCollapseOpened=!1,this._callbackQueue=[],this._scrollCb=null,this._bindEvents()}static get NAME(){return"navscroll"}setScrollPadding(t){this._config.scrollPadding=t}dispose(){this._scrollCb&&this._scrollCb.dispose(),super.dispose()}_getConfig(t){return t={...Pe,...X.getDataAttributes(this._element),..."object"==typeof t?t:{}}}_bindEvents(){this._scrollCb=Se((()=>this._onScroll())),this._collapsible&&(H.on(this._collapsible._element,"shown.bs.navbarcollapsible",(()=>this._onCollapseOpened())),H.on(this._collapsible._element,"hidden.bs.navbarcollapsible",(()=>this._onCollapseClosed()))),Z.find(Ie,this._element).forEach((t=>{t.addEventListener("click",(()=>{const e=()=>this._scrollToHash(t.hash);this._isCollapseOpened?(this._callbackQueue.push(e),this._collapsible.hide()):e()}))})),"undefined"!=typeof window&&"undefined"!=typeof document&&H.on(window,"load",(()=>{setTimeout((()=>this._onScroll()),150)}))}_onCollapseOpened(){this._isCollapseOpened=!0}_onCollapseClosed(){for(;this._callbackQueue.length>0;){const t=this._callbackQueue.shift();"function"==typeof t&&t()}this._isCollapseOpened=!1}_getParentLinks(t){const e=[];let i=t.closest(Le),s=null,n=!1;for(;i&&!n;){const t=i.closest("li.nav-link, li.nav-item");if(t){const i=t.querySelector(xe);i&&e.push(i)}s=i,i=(i.parentElement||i).closest(Le),i===s&&(n=!0)}return e}_decorateToggler(t){if(this._togglerElement){const e=Z.findOne(".it-list",this._togglerElement);this._togglerElement.innerText="",this._togglerElement.textContent="",this._togglerElement.append(e),this._togglerElement.append(t)}}_scrollToHash(t){const e=Z.findOne(t,this._sectionContainer);e&&(Te(e.offsetTop-this._getScrollPadding(),{duration:this._config.duration,easing:this._config.easing}),history.pushState?history.pushState(null,null,t):location.hash=t)}_updateProgress(t){if(!t)return;const e=Z.find(".it-navscroll-progressbar");if(e){const i=Math.abs(t.getBoundingClientRect().top)/t.getBoundingClientRect().height*100,s=Math.min(100,Math.max(0,i));e.forEach((e=>{t.getBoundingClientRect().top<=0?(e.style.width=s+"%",e.setAttribute("aria-valuenow",s)):(e.style.width="0%",e.setAttribute("aria-valuenow",0))}))}}_onScroll(){const t=this._sectionContainer?this._sectionContainer.offsetTop:0;if("undefined"==typeof document)return;const e=document.scrollingElement.scrollTop-t,i=Z.find(xe,this._element),s=this._getScrollPadding();Z.find(".it-page-section").forEach(((n,o)=>{if(n.offsetTop-t<=e+s&&(Z.find(Oe,this._element).forEach((t=>{t.classList.remove(Ae)})),o<i.length)){const t=i[o];this._getParentLinks(t).forEach((t=>{t.classList.add(Ae)})),t.classList.add(Ae),this._decorateToggler(t.innerText)}})),this._updateProgress(this._sectionContainer)}_getCollapsible(){const t=Z.findOne(".navbar-collapsable",this._element);return t?re.getOrCreateInstance(t):null}_getScrollPadding(){return"function"==typeof this._config.scrollPadding?this._config.scrollPadding():this._config.scrollPadding}}if("undefined"!=typeof window&&"undefined"!=typeof document){Z.find("[data-bs-navscroll]").map((t=>{Me.getOrCreateInstance(t)}))}const $e=".bs.sticky",Fe=`resize${$e}`,je=`on${$e}`,Ne=`off${$e}`,De="bs-is-sticky",Re="bs-is-fixed",Be='[data-bs-toggle="sticky"]',Ve={positionType:"sticky",stickyClassName:"",stackable:!1,paddingTop:0};class ze extends Q{constructor(t,e){super(t),this._config=this._getConfig(e),this._isSticky=!1,this._wrapper=null,this._stickyTarget=Z.findOne(_(this._element),this._element)||this._element,this._stickyTargetMobile=Z.findOne(this._element.getAttribute("data-bs-target-mobile"),this._element)||this._stickyTarget,this._stickyLimit=0,this._stickyLimitMobile=0,this._setLimit(),this._scrollCb=null,this._isMobile=jt(),this._prevTop=0,this._onScroll(),this._bindEvents()}dispose(){"undefined"!=typeof window&&"undefined"!=typeof document&&(H.off(window,Fe),this._scrollCb.dispose(),super.dispose())}static get NAME(){return"sticky"}_getConfig(t){return t={...Ve,...X.getDataAttributes(this._element),..."object"==typeof t?t:{}}}_bindEvents(){"undefined"!=typeof window&&"undefined"!=typeof document&&(H.on(window,Fe,(()=>this._onResize())),this._scrollCb=Se((()=>this._onScroll())))}_onResize(){this._isMobile=jt(),this._setLimit()}_onScroll(){this._checkSticky()}_setLimit(){this._stickyLimit=this._cumulativeOffset(this._stickyTarget).top,this._stickyLimitMobile=this._cumulativeOffset(this._stickyTargetMobile).top}_getLimit(){let t=this._isMobile?this._stickyLimitMobile:this._stickyLimit;return this._config.stackable&&this._getStickySimblings().forEach(((e,i)=>{const s=e.getBoundingClientRect();t-=s.height+(0===i?parseFloat(e.style.top):0)})),t>0?t:0}_cumulativeOffset(t){let e=0,i=0;do{e+=t.offsetTop||0,i+=t.offsetLeft||0,t=t.offsetParent}while(t);return{top:e,left:i}}_isTypeSticky(){return"sticky"===this._config.positionType}_checkSticky(){this._isSticky||this._setLimit();const t=this._getLimit();"undefined"!=typeof window&&window.pageYOffset>t?this._setSticky():this._unsetSticky()}_setSticky(){if(!this._isSticky){this._isSticky=!0;let t=De;this._isTypeSticky()||(t=Re,this._wrapper=this._createWrapper()),this._element.classList.add(t),this._config.stickyClassName&&this._element.classList.add(this._config.stickyClassName),this._prevTop=this._element.style.top,this._element.style.top=this._getPositionTop()+"px",H.trigger(this._element,je)}}_unsetSticky(){if(this._isSticky){let t=De;this._isTypeSticky()||(t=Re,this._destroyWrapper()),this._element.classList.remove(t),this._config.stickyClassName&&this._element.classList.remove(this._config.stickyClassName),this._element.style.top=this._prevTop,this._isSticky=!1,H.trigger(this._element,Ne)}}_createWrapper(){if("undefined"==typeof document)return;const t=document.createElement("div");return t.classList.add("bs-it-sticky-wrapper"),t.style.width="100%",t.style.height=this._element.getBoundingClientRect().height+"px",t.style.overflow="hidden",this._element.parentNode.insertBefore(t,this._element),t.appendChild(this._element),t}_destroyWrapper(){this._wrapper&&(this._wrapper.parentNode.insertBefore(this._element,this._wrapper),this._wrapper.remove())}_getStickySimblings(){return Z.find(Be).filter((t=>{const e=ze.getInstance(t);return!(!e||!e._isSticky||t===this._element)}))}_getPositionTop(){let t=0;return this._config.stackable?(this._getStickySimblings().forEach(((e,i)=>{const s=e.getBoundingClientRect();t+=s.height+(0===i?parseFloat(e.style.top):0)})),t):t+this._config.paddingTop}}"undefined"!=typeof window&&"undefined"!=typeof document&&Se((()=>{Z.find(Be).map((t=>{ze.getOrCreateInstance(t)}))}));const We="cloned-element",qe=`.${We}`,He=new Map;class Ge{constructor(t){if(He.get(t))return null;this._element=t,this._elementObj=ze.getOrCreateInstance(t),He.set(t,this._elementObj),this._bindEvents(),this._toggleClonedElement(this._element.classList.contains("is-sticky"))}static getOrCreateInstance(t){return He.get(t)||new this(t)}_bindEvents(){this._element.addEventListener("on.bs.sticky",(()=>this._toggleClonedElement(!0))),this._element.addEventListener("off.bs.sticky",(()=>this._toggleClonedElement(!1)))}_toggleClonedElement(t=!0){if(!E(Z.findOne(".custom-navbar-toggler",this._element))){const e=Z.findOne(".menu-wrapper",this._element);if(t){const t=Z.findOne(".it-brand-wrapper",this._element),i=Z.findOne(".it-search-wrapper",this._element),s=Z.findOne(".it-user-wrapper",this._element),n=t?t.cloneNode(!0):null,o=i?i.cloneNode(!0):null,r=s?s.cloneNode(!0):null;n&&e.insertBefore(n,e.childNodes[0]).classList.add(We),o&&e.appendChild(o).classList.add(We),r&&(e.appendChild(r).classList.add(We),e.appendChild(r).classList.remove("show"))}else Z.find(qe,this._element).forEach((t=>{t.parentElement.removeChild(t)}))}}}Se((()=>{Z.find(".it-header-sticky").map((t=>{Ge.getOrCreateInstance(t)}))}));var Ue=Object.defineProperty,Ye=(t,e,i)=>(((t,e,i)=>{e in t?Ue(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i})(t,"symbol"!=typeof e?e+"":e,i),i);const Xe=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,Ke=/^-?[0-9]\d*$/,Qe=/^(?=.*[A-Za-z])(?=.*\d).{8,}$/,Ze=/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/,Je=t=>"string"!=typeof t||""===t;var ti=(t=>(t.Required="required",t.Email="email",t.MinLength="minLength",t.MaxLength="maxLength",t.Password="password",t.Number="number",t.Integer="integer",t.MaxNumber="maxNumber",t.MinNumber="minNumber",t.StrongPassword="strongPassword",t.CustomRegexp="customRegexp",t.MinFilesCount="minFilesCount",t.MaxFilesCount="maxFilesCount",t.Files="files",t))(ti||{}),ei=(t=>(t.Required="required",t))(ei||{}),ii=(t=>(t.Label="label",t.LabelArrow="labelArrow",t))(ii||{});const si=[{key:ti.Required,dict:{en:"The field is required"}},{key:ti.Email,dict:{en:"Email has invalid format"}},{key:ti.MaxLength,dict:{en:"The field must contain a maximum of :value characters"}},{key:ti.MinLength,dict:{en:"The field must contain a minimum of :value characters"}},{key:ti.Password,dict:{en:"Password must contain minimum eight characters, at least one letter and one number"}},{key:ti.StrongPassword,dict:{en:"Password should contain minimum eight characters, at least one uppercase letter, one lowercase letter, one number and one special character"}},{key:ti.Number,dict:{en:"Value should be a number"}},{key:ti.MaxNumber,dict:{en:"Number should be less or equal than :value"}},{key:ti.MinNumber,dict:{en:"Number should be more or equal than :value"}},{key:ti.MinFilesCount,dict:{en:"Files count should be more or equal than :value"}},{key:ti.MaxFilesCount,dict:{en:"Files count should be less or equal than :value"}},{key:ti.Files,dict:{en:"Uploaded files have one or several invalid properties (extension/size/type etc)."}}],ni=t=>"object"==typeof t&&null!==t&&"then"in t&&"function"==typeof t.then,oi=t=>Array.isArray(t)?t.filter((t=>t.length>0)):"string"==typeof t&&t.trim()?[...t.split(" ").filter((t=>t.length>0))]:[],ri=t=>t instanceof Element||t instanceof HTMLDocument,ai={errorFieldStyle:{color:"#b81111",border:"1px solid #B81111"},errorFieldCssClass:"just-validate-error-field",successFieldCssClass:"just-validate-success-field",errorLabelStyle:{color:"#b81111"},errorLabelCssClass:"just-validate-error-label",successLabelCssClass:"just-validate-success-label",focusInvalidField:!0,lockForm:!0,testingMode:!1,validateBeforeSubmitting:!1,submitFormAutomatically:!1};class li{constructor(t,e,i){Ye(this,"form",null),Ye(this,"fields",{}),Ye(this,"groupFields",{}),Ye(this,"errors",{}),Ye(this,"isValid",!1),Ye(this,"isSubmitted",!1),Ye(this,"globalConfig",ai),Ye(this,"errorLabels",{}),Ye(this,"successLabels",{}),Ye(this,"eventListeners",[]),Ye(this,"dictLocale",si),Ye(this,"currentLocale","en"),Ye(this,"customStyleTags",{}),Ye(this,"onSuccessCallback"),Ye(this,"onFailCallback"),Ye(this,"onValidateCallback"),Ye(this,"tooltips",[]),Ye(this,"lastScrollPosition"),Ye(this,"isScrollTick"),Ye(this,"fieldIds",new Map),Ye(this,"getKeyByFieldSelector",(t=>this.fieldIds.get(t))),Ye(this,"getFieldSelectorByKey",(t=>{for(const[e,i]of this.fieldIds)if(t===i)return e})),Ye(this,"getCompatibleFields",(()=>{const t={};return Object.keys(this.fields).forEach((e=>{let i=e;const s=this.getFieldSelectorByKey(e);"string"==typeof s&&(i=s),t[i]={...this.fields[e]}})),t})),Ye(this,"setKeyByFieldSelector",(t=>{if(this.fieldIds.has(t))return this.fieldIds.get(t);const e=String(this.fieldIds.size+1);return this.fieldIds.set(t,e),e})),Ye(this,"refreshAllTooltips",(()=>{this.tooltips.forEach((t=>{t.refresh()}))})),Ye(this,"handleDocumentScroll",(()=>{this.lastScrollPosition=window.scrollY,this.isScrollTick||(window.requestAnimationFrame((()=>{this.refreshAllTooltips(),this.isScrollTick=!1})),this.isScrollTick=!0)})),Ye(this,"formSubmitHandler",(t=>{t.preventDefault(),this.isSubmitted=!0,this.validateHandler(t)})),Ye(this,"handleFieldChange",(t=>{let e;for(const i in this.fields){if(this.fields[i].elem===t){e=i;break}}e&&(this.fields[e].touched=!0,this.validateField(e,!0))})),Ye(this,"handleGroupChange",(t=>{let e;for(const i in this.groupFields){if(this.groupFields[i].elems.find((e=>e===t))){e=i;break}}e&&(this.groupFields[e].touched=!0,this.validateGroup(e,!0))})),Ye(this,"handlerChange",(t=>{t.target&&(this.handleFieldChange(t.target),this.handleGroupChange(t.target),this.renderErrors())})),this.initialize(t,e,i)}initialize(t,e,i){if(this.form=null,this.errors={},this.isValid=!1,this.isSubmitted=!1,this.globalConfig=ai,this.errorLabels={},this.successLabels={},this.eventListeners=[],this.customStyleTags={},this.tooltips=[],this.currentLocale="en","string"==typeof t){const e=document.querySelector(t);if(!e)throw Error(`Form with ${t} selector not found! Please check the form selector`);this.setForm(e)}else{if(!(t instanceof HTMLFormElement))throw Error("Form selector is not valid. Please specify a string selector or a DOM element.");this.setForm(t)}if(this.globalConfig={...ai,...e},i&&(this.dictLocale=[...i,...si]),this.isTooltip()){const t=document.createElement("style");t.textContent=".just-validate-error-label[data-tooltip=true]{position:fixed;padding:4px 8px;background:#423f3f;color:#fff;white-space:nowrap;z-index:10;border-radius:4px;transform:translateY(-5px)}.just-validate-error-label[data-tooltip=true]:before{content:'';width:0;height:0;border-left:solid 5px transparent;border-right:solid 5px transparent;border-bottom:solid 5px #423f3f;position:absolute;z-index:3;display:block;bottom:-5px;transform:rotate(180deg);left:calc(50% - 5px)}.just-validate-error-label[data-tooltip=true][data-direction=left]{transform:translateX(-5px)}.just-validate-error-label[data-tooltip=true][data-direction=left]:before{right:-7px;bottom:auto;left:auto;top:calc(50% - 2px);transform:rotate(90deg)}.just-validate-error-label[data-tooltip=true][data-direction=right]{transform:translateX(5px)}.just-validate-error-label[data-tooltip=true][data-direction=right]:before{right:auto;bottom:auto;left:-7px;top:calc(50% - 2px);transform:rotate(-90deg)}.just-validate-error-label[data-tooltip=true][data-direction=bottom]{transform:translateY(5px)}.just-validate-error-label[data-tooltip=true][data-direction=bottom]:before{right:auto;bottom:auto;left:calc(50% - 5px);top:-5px;transform:rotate(0)}",this.customStyleTags[ii.Label]=document.head.appendChild(t),this.addListener("scroll",document,this.handleDocumentScroll)}}getLocalisedString(t,e,i){var s;const n=null!=i?i:t;let o=null==(s=this.dictLocale.find((t=>t.key===n)))?void 0:s.dict[this.currentLocale];if(o||i&&(o=i),o&&void 0!==e)switch(t){case ti.MaxLength:case ti.MinLength:case ti.MaxNumber:case ti.MinNumber:case ti.MinFilesCount:case ti.MaxFilesCount:o=o.replace(":value",String(e))}return o||i||"Value is incorrect"}getFieldErrorMessage(t,e){const i="function"==typeof t.errorMessage?t.errorMessage(this.getElemValue(e),this.fields):t.errorMessage;return this.getLocalisedString(t.rule,t.value,i)}getFieldSuccessMessage(t,e){const i="function"==typeof t?t(this.getElemValue(e),this.fields):t;return this.getLocalisedString(void 0,void 0,i)}getGroupErrorMessage(t){return this.getLocalisedString(t.rule,void 0,t.errorMessage)}getGroupSuccessMessage(t){if(t.successMessage)return this.getLocalisedString(void 0,void 0,t.successMessage)}setFieldInvalid(t,e){this.fields[t].isValid=!1,this.fields[t].errorMessage=this.getFieldErrorMessage(e,this.fields[t].elem)}setFieldValid(t,e){this.fields[t].isValid=!0,void 0!==e&&(this.fields[t].successMessage=this.getFieldSuccessMessage(e,this.fields[t].elem))}setGroupInvalid(t,e){this.groupFields[t].isValid=!1,this.groupFields[t].errorMessage=this.getGroupErrorMessage(e)}setGroupValid(t,e){this.groupFields[t].isValid=!0,this.groupFields[t].successMessage=this.getGroupSuccessMessage(e)}getElemValue(t){switch(t.type){case"checkbox":return t.checked;case"file":return t.files;default:return t.value}}validateGroupRule(t,e,i){if(i.rule===ei.Required)e.every((t=>!t.checked))?this.setGroupInvalid(t,i):this.setGroupValid(t,i)}validateFieldRule(t,e,i,s=!1){const n=i.value,o=this.getElemValue(e);if(i.plugin){i.plugin(o,this.getCompatibleFields())||this.setFieldInvalid(t,i)}else{switch(i.rule){case ti.Required:(t=>{let e=t;return"string"==typeof t&&(e=t.trim()),!e})(o)&&this.setFieldInvalid(t,i);break;case ti.Email:if(Je(o))break;r=o,Xe.test(r)||this.setFieldInvalid(t,i);break;case ti.MaxLength:if(void 0===n){console.error(`Value for ${i.rule} rule for [${t}] field is not defined. The field will be always invalid.`),this.setFieldInvalid(t,i);break}if("number"!=typeof n){console.error(`Value for ${i.rule} rule for [${t}] should be a number. The field will be always invalid.`),this.setFieldInvalid(t,i);break}if(Je(o))break;((t,e)=>t.length>e)(o,n)&&this.setFieldInvalid(t,i);break;case ti.MinLength:if(void 0===n){console.error(`Value for ${i.rule} rule for [${t}] field is not defined. The field will be always invalid.`),this.setFieldInvalid(t,i);break}if("number"!=typeof n){console.error(`Value for ${i.rule} rule for [${t}] should be a number. The field will be always invalid.`),this.setFieldInvalid(t,i);break}if(Je(o))break;((t,e)=>t.length<e)(o,n)&&this.setFieldInvalid(t,i);break;case ti.Password:if(Je(o))break;(t=>Qe.test(t))(o)||this.setFieldInvalid(t,i);break;case ti.StrongPassword:if(Je(o))break;(t=>Ze.test(t))(o)||this.setFieldInvalid(t,i);break;case ti.Number:if(Je(o))break;(t=>"string"==typeof t&&!isNaN(+t)&&!isNaN(parseFloat(t)))(o)||this.setFieldInvalid(t,i);break;case ti.Integer:if(Je(o))break;(t=>Ke.test(t))(o)||this.setFieldInvalid(t,i);break;case ti.MaxNumber:{if(void 0===n){console.error(`Value for ${i.rule} rule for [${t}] field is not defined. The field will be always invalid.`),this.setFieldInvalid(t,i);break}if("number"!=typeof n){console.error(`Value for ${i.rule} rule for [${t}] field should be a number. The field will be always invalid.`),this.setFieldInvalid(t,i);break}if(Je(o))break;const e=+o;(Number.isNaN(e)||((t,e)=>t>e)(e,n))&&this.setFieldInvalid(t,i);break}case ti.MinNumber:{if(void 0===n){console.error(`Value for ${i.rule} rule for [${t}] field is not defined. The field will be always invalid.`),this.setFieldInvalid(t,i);break}if("number"!=typeof n){console.error(`Value for ${i.rule} rule for [${t}] field should be a number. The field will be always invalid.`),this.setFieldInvalid(t,i);break}if(Je(o))break;const e=+o;(Number.isNaN(e)||((t,e)=>t<e)(e,n))&&this.setFieldInvalid(t,i);break}case ti.CustomRegexp:{if(void 0===n)return console.error(`Value for ${i.rule} rule for [${t}] field is not defined. This field will be always invalid.`),void this.setFieldInvalid(t,i);let e;try{e=new RegExp(n)}catch(e){console.error(`Value for ${i.rule} rule for [${t}] should be a valid regexp. This field will be always invalid.`),this.setFieldInvalid(t,i);break}const s=String(o);""===s||e.test(s)||this.setFieldInvalid(t,i);break}case ti.MinFilesCount:if(void 0===n){console.error(`Value for ${i.rule} rule for [${t}] field is not defined. This field will be always invalid.`),this.setFieldInvalid(t,i);break}if("number"!=typeof n){console.error(`Value for ${i.rule} rule for [${t}] field should be a number. The field will be always invalid.`),this.setFieldInvalid(t,i);break}if(Number.isFinite(null==o?void 0:o.length)&&o.length<n){this.setFieldInvalid(t,i);break}break;case ti.MaxFilesCount:if(void 0===n){console.error(`Value for ${i.rule} rule for [${t}] field is not defined. This field will be always invalid.`),this.setFieldInvalid(t,i);break}if("number"!=typeof n){console.error(`Value for ${i.rule} rule for [${t}] field should be a number. The field will be always invalid.`),this.setFieldInvalid(t,i);break}if(Number.isFinite(null==o?void 0:o.length)&&o.length>n){this.setFieldInvalid(t,i);break}break;case ti.Files: