UNPKG

preline

Version:

Preline UI is an open-source set of prebuilt UI components based on the utility-first Tailwind CSS framework.

22 lines 432 kB
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var i=t();for(var s in i)("object"==typeof exports?exports:e)[s]=i[s]}}(self,()=>(()=>{var e={949(e,t,i){"use strict";i.r(t),i.d(t,{arrow:()=>Me,autoPlacement:()=>Te,autoUpdate:()=>Se,computePosition:()=>Pe,detectOverflow:()=>xe,flip:()=>ke,getOverflowAncestors:()=>ne,hide:()=>Ae,inline:()=>Oe,limitShift:()=>De,offset:()=>Le,platform:()=>we,shift:()=>Ee,size:()=>Ie});const s=["top","right","bottom","left"],n=["start","end"],o=s.reduce((e,t)=>e.concat(t,t+"-"+n[0],t+"-"+n[1]),[]),l=Math.min,r=Math.max,a=Math.round,d=Math.floor,c=e=>({x:e,y:e}),h={left:"right",right:"left",bottom:"top",top:"bottom"};function u(e,t,i){return r(e,l(t,i))}function p(e,t){return"function"==typeof e?e(t):e}function m(e){return e.split("-")[0]}function g(e){return e.split("-")[1]}function v(e){return"x"===e?"y":"x"}function f(e){return"y"===e?"height":"width"}function y(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function b(e){return v(y(e))}function w(e,t,i){void 0===i&&(i=!1);const s=g(e),n=b(e),o=f(n);let l="x"===n?s===(i?"end":"start")?"right":"left":"start"===s?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=k(l)),[l,k(l)]}function C(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const S=["left","right"],x=["right","left"],L=["top","bottom"],T=["bottom","top"];function E(e,t,i,s){const n=g(e);let o=function(e,t,i){switch(e){case"top":case"bottom":return i?t?x:S:t?S:x;case"left":case"right":return t?L:T;default:return[]}}(m(e),"start"===i,s);return n&&(o=o.map(e=>e+"-"+n),t&&(o=o.concat(o.map(C)))),o}function k(e){const t=m(e);return h[t]+e.slice(t.length)}function I(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function A(e){const{x:t,y:i,width:s,height:n}=e;return{width:s,height:n,top:i,left:t,right:t+s,bottom:i+n,x:t,y:i}}function M(e,t,i){let{reference:s,floating:n}=e;const o=y(t),l=b(t),r=f(l),a=m(t),d="y"===o,c=s.x+s.width/2-n.width/2,h=s.y+s.height/2-n.height/2,u=s[r]/2-n[r]/2;let p;switch(a){case"top":p={x:c,y:s.y-n.height};break;case"bottom":p={x:c,y:s.y+s.height};break;case"right":p={x:s.x+s.width,y:h};break;case"left":p={x:s.x-n.width,y:h};break;default:p={x:s.x,y:s.y}}switch(g(t)){case"start":p[l]-=u*(i&&d?-1:1);break;case"end":p[l]+=u*(i&&d?-1:1)}return p}async function O(e,t){var i;void 0===t&&(t={});const{x:s,y:n,platform:o,rects:l,elements:r,strategy:a}=e,{boundary:d="clippingAncestors",rootBoundary:c="viewport",elementContext:h="floating",altBoundary:u=!1,padding:m=0}=p(t,e),g=I(m),v=r[u?"floating"===h?"reference":"floating":h],f=A(await o.getClippingRect({element:null==(i=await(null==o.isElement?void 0:o.isElement(v)))||i?v:v.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(r.floating)),boundary:d,rootBoundary:c,strategy:a})),y="floating"===h?{x:s,y:n,width:l.floating.width,height:l.floating.height}:l.reference,b=await(null==o.getOffsetParent?void 0:o.getOffsetParent(r.floating)),w=await(null==o.isElement?void 0:o.isElement(b))&&await(null==o.getScale?void 0:o.getScale(b))||{x:1,y:1},C=A(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:r,rect:y,offsetParent:b,strategy:a}):y);return{top:(f.top-C.top+g.top)/w.y,bottom:(C.bottom-f.bottom+g.bottom)/w.y,left:(f.left-C.left+g.left)/w.x,right:(C.right-f.right+g.right)/w.x}}function D(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function P(e){return s.some(t=>e[t]>=0)}function $(e){const t=l(...e.map(e=>e.left)),i=l(...e.map(e=>e.top));return{x:t,y:i,width:r(...e.map(e=>e.right))-t,height:r(...e.map(e=>e.bottom))-i}}const H=new Set(["left","top"]);function N(){return"undefined"!=typeof window}function _(e){return q(e)?(e.nodeName||"").toLowerCase():"#document"}function B(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function F(e){var t;return null==(t=(q(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function q(e){return!!N()&&(e instanceof Node||e instanceof B(e).Node)}function R(e){return!!N()&&(e instanceof Element||e instanceof B(e).Element)}function j(e){return!!N()&&(e instanceof HTMLElement||e instanceof B(e).HTMLElement)}function V(e){return!(!N()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof B(e).ShadowRoot)}function z(e){const{overflow:t,overflowX:i,overflowY:s,display:n}=ee(e);return/auto|scroll|overlay|hidden|clip/.test(t+s+i)&&"inline"!==n&&"contents"!==n}function W(e){return/^(table|td|th)$/.test(_(e))}function U(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}const Y=/transform|translate|scale|rotate|perspective|filter/,K=/paint|layout|strict|content/,Q=e=>!!e&&"none"!==e;let J;function Z(e){const t=R(e)?ee(e):e;return Q(t.transform)||Q(t.translate)||Q(t.scale)||Q(t.rotate)||Q(t.perspective)||!G()&&(Q(t.backdropFilter)||Q(t.filter))||Y.test(t.willChange||"")||K.test(t.contain||"")}function G(){return null==J&&(J="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),J}function X(e){return/^(html|body|#document)$/.test(_(e))}function ee(e){return B(e).getComputedStyle(e)}function te(e){return R(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ie(e){if("html"===_(e))return e;const t=e.assignedSlot||e.parentNode||V(e)&&e.host||F(e);return V(t)?t.host:t}function se(e){const t=ie(e);return X(t)?e.ownerDocument?e.ownerDocument.body:e.body:j(t)&&z(t)?t:se(t)}function ne(e,t,i){var s;void 0===t&&(t=[]),void 0===i&&(i=!0);const n=se(e),o=n===(null==(s=e.ownerDocument)?void 0:s.body),l=B(n);if(o){const e=oe(l);return t.concat(l,l.visualViewport||[],z(n)?n:[],e&&i?ne(e):[])}return t.concat(n,ne(n,[],i))}function oe(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function le(e){const t=ee(e);let i=parseFloat(t.width)||0,s=parseFloat(t.height)||0;const n=j(e),o=n?e.offsetWidth:i,l=n?e.offsetHeight:s,r=a(i)!==o||a(s)!==l;return r&&(i=o,s=l),{width:i,height:s,$:r}}function re(e){return R(e)?e:e.contextElement}function ae(e){const t=re(e);if(!j(t))return c(1);const i=t.getBoundingClientRect(),{width:s,height:n,$:o}=le(t);let l=(o?a(i.width):i.width)/s,r=(o?a(i.height):i.height)/n;return l&&Number.isFinite(l)||(l=1),r&&Number.isFinite(r)||(r=1),{x:l,y:r}}const de=c(0);function ce(e){const t=B(e);return G()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:de}function he(e,t,i,s){void 0===t&&(t=!1),void 0===i&&(i=!1);const n=e.getBoundingClientRect(),o=re(e);let l=c(1);t&&(s?R(s)&&(l=ae(s)):l=ae(e));const r=function(e,t,i){return void 0===t&&(t=!1),!(!i||t&&i!==B(e))&&t}(o,i,s)?ce(o):c(0);let a=(n.left+r.x)/l.x,d=(n.top+r.y)/l.y,h=n.width/l.x,u=n.height/l.y;if(o){const e=B(o),t=s&&R(s)?B(s):s;let i=e,n=oe(i);for(;n&&s&&t!==i;){const e=ae(n),t=n.getBoundingClientRect(),s=ee(n),o=t.left+(n.clientLeft+parseFloat(s.paddingLeft))*e.x,l=t.top+(n.clientTop+parseFloat(s.paddingTop))*e.y;a*=e.x,d*=e.y,h*=e.x,u*=e.y,a+=o,d+=l,i=B(n),n=oe(i)}}return A({width:h,height:u,x:a,y:d})}function ue(e,t){const i=te(e).scrollLeft;return t?t.left+i:he(F(e)).left+i}function pe(e,t){const i=e.getBoundingClientRect();return{x:i.left+t.scrollLeft-ue(e,i),y:i.top+t.scrollTop}}function me(e,t,i){let s;if("viewport"===t)s=function(e,t){const i=B(e),s=F(e),n=i.visualViewport;let o=s.clientWidth,l=s.clientHeight,r=0,a=0;if(n){o=n.width,l=n.height;const e=G();(!e||e&&"fixed"===t)&&(r=n.offsetLeft,a=n.offsetTop)}const d=ue(s);if(d<=0){const e=s.ownerDocument,t=e.body,i=getComputedStyle(t),n="CSS1Compat"===e.compatMode&&parseFloat(i.marginLeft)+parseFloat(i.marginRight)||0,l=Math.abs(s.clientWidth-t.clientWidth-n);l<=25&&(o-=l)}else d<=25&&(o+=d);return{width:o,height:l,x:r,y:a}}(e,i);else if("document"===t)s=function(e){const t=F(e),i=te(e),s=e.ownerDocument.body,n=r(t.scrollWidth,t.clientWidth,s.scrollWidth,s.clientWidth),o=r(t.scrollHeight,t.clientHeight,s.scrollHeight,s.clientHeight);let l=-i.scrollLeft+ue(e);const a=-i.scrollTop;return"rtl"===ee(s).direction&&(l+=r(t.clientWidth,s.clientWidth)-n),{width:n,height:o,x:l,y:a}}(F(e));else if(R(t))s=function(e,t){const i=he(e,!0,"fixed"===t),s=i.top+e.clientTop,n=i.left+e.clientLeft,o=j(e)?ae(e):c(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:n*o.x,y:s*o.y}}(t,i);else{const i=ce(e);s={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return A(s)}function ge(e,t){const i=ie(e);return!(i===t||!R(i)||X(i))&&("fixed"===ee(i).position||ge(i,t))}function ve(e,t,i){const s=j(t),n=F(t),o="fixed"===i,l=he(e,!0,o,t);let r={scrollLeft:0,scrollTop:0};const a=c(0);function d(){a.x=ue(n)}if(s||!s&&!o)if(("body"!==_(t)||z(n))&&(r=te(t)),s){const e=he(t,!0,o,t);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else n&&d();o&&!s&&n&&d();const h=!n||s||o?c(0):pe(n,r);return{x:l.left+r.scrollLeft-a.x-h.x,y:l.top+r.scrollTop-a.y-h.y,width:l.width,height:l.height}}function fe(e){return"static"===ee(e).position}function ye(e,t){if(!j(e)||"fixed"===ee(e).position)return null;if(t)return t(e);let i=e.offsetParent;return F(e)===i&&(i=i.ownerDocument.body),i}function be(e,t){const i=B(e);if(U(e))return i;if(!j(e)){let t=ie(e);for(;t&&!X(t);){if(R(t)&&!fe(t))return t;t=ie(t)}return i}let s=ye(e,t);for(;s&&W(s)&&fe(s);)s=ye(s,t);return s&&X(s)&&fe(s)&&!Z(s)?i:s||function(e){let t=ie(e);for(;j(t)&&!X(t);){if(Z(t))return t;if(U(t))return null;t=ie(t)}return null}(e)||i}const we={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:i,offsetParent:s,strategy:n}=e;const o="fixed"===n,l=F(s),r=!!t&&U(t.floating);if(s===l||r&&o)return i;let a={scrollLeft:0,scrollTop:0},d=c(1);const h=c(0),u=j(s);if((u||!u&&!o)&&(("body"!==_(s)||z(l))&&(a=te(s)),u)){const e=he(s);d=ae(s),h.x=e.x+s.clientLeft,h.y=e.y+s.clientTop}const p=!l||u||o?c(0):pe(l,a);return{width:i.width*d.x,height:i.height*d.y,x:i.x*d.x-a.scrollLeft*d.x+h.x+p.x,y:i.y*d.y-a.scrollTop*d.y+h.y+p.y}},getDocumentElement:F,getClippingRect:function(e){let{element:t,boundary:i,rootBoundary:s,strategy:n}=e;const o=[..."clippingAncestors"===i?U(t)?[]:function(e,t){const i=t.get(e);if(i)return i;let s=ne(e,[],!1).filter(e=>R(e)&&"body"!==_(e)),n=null;const o="fixed"===ee(e).position;let l=o?ie(e):e;for(;R(l)&&!X(l);){const t=ee(l),i=Z(l);i||"fixed"!==t.position||(n=null),(o?!i&&!n:!i&&"static"===t.position&&n&&("absolute"===n.position||"fixed"===n.position)||z(l)&&!i&&ge(e,l))?s=s.filter(e=>e!==l):n=t,l=ie(l)}return t.set(e,s),s}(t,this._c):[].concat(i),s],a=me(t,o[0],n);let d=a.top,c=a.right,h=a.bottom,u=a.left;for(let e=1;e<o.length;e++){const i=me(t,o[e],n);d=r(i.top,d),c=l(i.right,c),h=l(i.bottom,h),u=r(i.left,u)}return{width:c-u,height:h-d,x:u,y:d}},getOffsetParent:be,getElementRects:async function(e){const t=this.getOffsetParent||be,i=this.getDimensions,s=await i(e.floating);return{reference:ve(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:i}=le(e);return{width:t,height:i}},getScale:ae,isElement:R,isRTL:function(e){return"rtl"===ee(e).direction}};function Ce(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Se(e,t,i,s){void 0===s&&(s={});const{ancestorScroll:n=!0,ancestorResize:o=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:c="function"==typeof IntersectionObserver,animationFrame:h=!1}=s,u=re(e),p=n||o?[...u?ne(u):[],...t?ne(t):[]]:[];p.forEach(e=>{n&&e.addEventListener("scroll",i,{passive:!0}),o&&e.addEventListener("resize",i)});const m=u&&c?function(e,t){let i,s=null;const n=F(e);function o(){var e;clearTimeout(i),null==(e=s)||e.disconnect(),s=null}return function a(c,h){void 0===c&&(c=!1),void 0===h&&(h=1),o();const u=e.getBoundingClientRect(),{left:p,top:m,width:g,height:v}=u;if(c||t(),!g||!v)return;const f={rootMargin:-d(m)+"px "+-d(n.clientWidth-(p+g))+"px "+-d(n.clientHeight-(m+v))+"px "+-d(p)+"px",threshold:r(0,l(1,h))||1};let y=!0;function b(t){const s=t[0].intersectionRatio;if(s!==h){if(!y)return a();s?a(!1,s):i=setTimeout(()=>{a(!1,1e-7)},1e3)}1!==s||Ce(u,e.getBoundingClientRect())||a(),y=!1}try{s=new IntersectionObserver(b,{...f,root:n.ownerDocument})}catch(e){s=new IntersectionObserver(b,f)}s.observe(e)}(!0),o}(u,i):null;let g,v=-1,f=null;a&&(f=new ResizeObserver(e=>{let[s]=e;s&&s.target===u&&f&&t&&(f.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var e;null==(e=f)||e.observe(t)})),i()}),u&&!h&&f.observe(u),t&&f.observe(t));let y=h?he(e):null;return h&&function t(){const s=he(e);y&&!Ce(y,s)&&i();y=s,g=requestAnimationFrame(t)}(),i(),()=>{var e;p.forEach(e=>{n&&e.removeEventListener("scroll",i),o&&e.removeEventListener("resize",i)}),null==m||m(),null==(e=f)||e.disconnect(),f=null,h&&cancelAnimationFrame(g)}}const xe=O,Le=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var i,s;const{x:n,y:o,placement:l,middlewareData:r}=t,a=await async function(e,t){const{placement:i,platform:s,elements:n}=e,o=await(null==s.isRTL?void 0:s.isRTL(n.floating)),l=m(i),r=g(i),a="y"===y(i),d=H.has(l)?-1:1,c=o&&a?-1:1,h=p(t,e);let{mainAxis:u,crossAxis:v,alignmentAxis:f}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return r&&"number"==typeof f&&(v="end"===r?-1*f:f),a?{x:v*c,y:u*d}:{x:u*d,y:v*c}}(t,e);return l===(null==(i=r.offset)?void 0:i.placement)&&null!=(s=r.arrow)&&s.alignmentOffset?{}:{x:n+a.x,y:o+a.y,data:{...a,placement:l}}}}},Te=function(e){return void 0===e&&(e={}),{name:"autoPlacement",options:e,async fn(t){var i,s,n;const{rects:l,middlewareData:r,placement:a,platform:d,elements:c}=t,{crossAxis:h=!1,alignment:u,allowedPlacements:v=o,autoAlignment:f=!0,...y}=p(e,t),b=void 0!==u||v===o?function(e,t,i){return(e?[...i.filter(t=>g(t)===e),...i.filter(t=>g(t)!==e)]:i.filter(e=>m(e)===e)).filter(i=>!e||g(i)===e||!!t&&C(i)!==i)}(u||null,f,v):v,S=await d.detectOverflow(t,y),x=(null==(i=r.autoPlacement)?void 0:i.index)||0,L=b[x];if(null==L)return{};const T=w(L,l,await(null==d.isRTL?void 0:d.isRTL(c.floating)));if(a!==L)return{reset:{placement:b[0]}};const E=[S[m(L)],S[T[0]],S[T[1]]],k=[...(null==(s=r.autoPlacement)?void 0:s.overflows)||[],{placement:L,overflows:E}],I=b[x+1];if(I)return{data:{index:x+1,overflows:k},reset:{placement:I}};const A=k.map(e=>{const t=g(e.placement);return[e.placement,t&&h?e.overflows.slice(0,2).reduce((e,t)=>e+t,0):e.overflows[0],e.overflows]}).sort((e,t)=>e[1]-t[1]),M=(null==(n=A.filter(e=>e[2].slice(0,g(e[0])?2:3).every(e=>e<=0))[0])?void 0:n[0])||A[0][0];return M!==a?{data:{index:x+1,overflows:k},reset:{placement:M}}:{}}}},Ee=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:i,y:s,placement:n,platform:o}=t,{mainAxis:l=!0,crossAxis:r=!1,limiter:a={fn:e=>{let{x:t,y:i}=e;return{x:t,y:i}}},...d}=p(e,t),c={x:i,y:s},h=await o.detectOverflow(t,d),g=y(m(n)),f=v(g);let b=c[f],w=c[g];if(l){const e="y"===f?"bottom":"right";b=u(b+h["y"===f?"top":"left"],b,b-h[e])}if(r){const e="y"===g?"bottom":"right";w=u(w+h["y"===g?"top":"left"],w,w-h[e])}const C=a.fn({...t,[f]:b,[g]:w});return{...C,data:{x:C.x-i,y:C.y-s,enabled:{[f]:l,[g]:r}}}}}},ke=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var i,s;const{placement:n,middlewareData:o,rects:l,initialPlacement:r,platform:a,elements:d}=t,{mainAxis:c=!0,crossAxis:h=!0,fallbackPlacements:u,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:f=!0,...b}=p(e,t);if(null!=(i=o.arrow)&&i.alignmentOffset)return{};const S=m(n),x=y(r),L=m(r)===r,T=await(null==a.isRTL?void 0:a.isRTL(d.floating)),I=u||(L||!f?[k(r)]:function(e){const t=k(e);return[C(e),t,C(t)]}(r)),A="none"!==v;!u&&A&&I.push(...E(r,f,v,T));const M=[r,...I],O=await a.detectOverflow(t,b),D=[];let P=(null==(s=o.flip)?void 0:s.overflows)||[];if(c&&D.push(O[S]),h){const e=w(n,l,T);D.push(O[e[0]],O[e[1]])}if(P=[...P,{placement:n,overflows:D}],!D.every(e=>e<=0)){var $,H;const e=((null==($=o.flip)?void 0:$.index)||0)+1,t=M[e];if(t){if(!("alignment"===h&&x!==y(t))||P.every(e=>y(e.placement)!==x||e.overflows[0]>0))return{data:{index:e,overflows:P},reset:{placement:t}}}let i=null==(H=P.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:H.placement;if(!i)switch(g){case"bestFit":{var N;const e=null==(N=P.filter(e=>{if(A){const t=y(e.placement);return t===x||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:N[0];e&&(i=e);break}case"initialPlacement":i=r}if(n!==i)return{reset:{placement:i}}}return{}}}},Ie=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var i,s;const{placement:n,rects:o,platform:a,elements:d}=t,{apply:c=()=>{},...h}=p(e,t),u=await a.detectOverflow(t,h),v=m(n),f=g(n),b="y"===y(n),{width:w,height:C}=o.floating;let S,x;"top"===v||"bottom"===v?(S=v,x=f===(await(null==a.isRTL?void 0:a.isRTL(d.floating))?"start":"end")?"left":"right"):(x=v,S="end"===f?"top":"bottom");const L=C-u.top-u.bottom,T=w-u.left-u.right,E=l(C-u[S],L),k=l(w-u[x],T),I=!t.middlewareData.shift;let A=E,M=k;if(null!=(i=t.middlewareData.shift)&&i.enabled.x&&(M=T),null!=(s=t.middlewareData.shift)&&s.enabled.y&&(A=L),I&&!f){const e=r(u.left,0),t=r(u.right,0),i=r(u.top,0),s=r(u.bottom,0);b?M=w-2*(0!==e||0!==t?e+t:r(u.left,u.right)):A=C-2*(0!==i||0!==s?i+s:r(u.top,u.bottom))}await c({...t,availableWidth:M,availableHeight:A});const O=await a.getDimensions(d.floating);return w!==O.width||C!==O.height?{reset:{rects:!0}}:{}}}},Ae=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:i,platform:s}=t,{strategy:n="referenceHidden",...o}=p(e,t);switch(n){case"referenceHidden":{const e=D(await s.detectOverflow(t,{...o,elementContext:"reference"}),i.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:P(e)}}}case"escaped":{const e=D(await s.detectOverflow(t,{...o,altBoundary:!0}),i.floating);return{data:{escapedOffsets:e,escaped:P(e)}}}default:return{}}}}},Me=e=>({name:"arrow",options:e,async fn(t){const{x:i,y:s,placement:n,rects:o,platform:r,elements:a,middlewareData:d}=t,{element:c,padding:h=0}=p(e,t)||{};if(null==c)return{};const m=I(h),v={x:i,y:s},y=b(n),w=f(y),C=await r.getDimensions(c),S="y"===y,x=S?"top":"left",L=S?"bottom":"right",T=S?"clientHeight":"clientWidth",E=o.reference[w]+o.reference[y]-v[y]-o.floating[w],k=v[y]-o.reference[y],A=await(null==r.getOffsetParent?void 0:r.getOffsetParent(c));let M=A?A[T]:0;M&&await(null==r.isElement?void 0:r.isElement(A))||(M=a.floating[T]||o.floating[w]);const O=E/2-k/2,D=M/2-C[w]/2-1,P=l(m[x],D),$=l(m[L],D),H=P,N=M-C[w]-$,_=M/2-C[w]/2+O,B=u(H,_,N),F=!d.arrow&&null!=g(n)&&_!==B&&o.reference[w]/2-(_<H?P:$)-C[w]/2<0,q=F?_<H?_-H:_-N:0;return{[y]:v[y]+q,data:{[y]:B,centerOffset:_-B-q,...F&&{alignmentOffset:q}},reset:F}}}),Oe=function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){const{placement:i,elements:s,rects:n,platform:o,strategy:a}=t,{padding:d=2,x:c,y:h}=p(e,t),u=Array.from(await(null==o.getClientRects?void 0:o.getClientRects(s.reference))||[]),g=function(e){const t=e.slice().sort((e,t)=>e.y-t.y),i=[];let s=null;for(let e=0;e<t.length;e++){const n=t[e];!s||n.y-s.y>s.height/2?i.push([n]):i[i.length-1].push(n),s=n}return i.map(e=>A($(e)))}(u),v=A($(u)),f=I(d);const b=await o.getElementRects({reference:{getBoundingClientRect:function(){if(2===g.length&&g[0].left>g[1].right&&null!=c&&null!=h)return g.find(e=>c>e.left-f.left&&c<e.right+f.right&&h>e.top-f.top&&h<e.bottom+f.bottom)||v;if(g.length>=2){if("y"===y(i)){const e=g[0],t=g[g.length-1],s="top"===m(i),n=e.top,o=t.bottom,l=s?e.left:t.left,r=s?e.right:t.right;return{top:n,bottom:o,left:l,right:r,width:r-l,height:o-n,x:l,y:n}}const e="left"===m(i),t=r(...g.map(e=>e.right)),s=l(...g.map(e=>e.left)),n=g.filter(i=>e?i.left===s:i.right===t),o=n[0].top,a=n[n.length-1].bottom;return{top:o,bottom:a,left:s,right:t,width:t-s,height:a-o,x:s,y:o}}return v}},floating:s.floating,strategy:a});return n.reference.x!==b.reference.x||n.reference.y!==b.reference.y||n.reference.width!==b.reference.width||n.reference.height!==b.reference.height?{reset:{rects:b}}:{}}}},De=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:i,y:s,placement:n,rects:o,middlewareData:l}=t,{offset:r=0,mainAxis:a=!0,crossAxis:d=!0}=p(e,t),c={x:i,y:s},h=y(n),u=v(h);let g=c[u],f=c[h];const b=p(r,t),w="number"==typeof b?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(a){const e="y"===u?"height":"width",t=o.reference[u]-o.floating[e]+w.mainAxis,i=o.reference[u]+o.reference[e]-w.mainAxis;g<t?g=t:g>i&&(g=i)}if(d){var C,S;const e="y"===u?"width":"height",t=H.has(m(n)),i=o.reference[h]-o.floating[e]+(t&&(null==(C=l.offset)?void 0:C[h])||0)+(t?0:w.crossAxis),s=o.reference[h]+o.reference[e]+(t?0:(null==(S=l.offset)?void 0:S[h])||0)-(t?w.crossAxis:0);f<i?f=i:f>s&&(f=s)}return{[u]:g,[h]:f}}}},Pe=(e,t,i)=>{const s=new Map,n={platform:we,...i},o={...n.platform,_c:s};return(async(e,t,i)=>{const{placement:s="bottom",strategy:n="absolute",middleware:o=[],platform:l}=i,r=l.detectOverflow?l:{...l,detectOverflow:O},a=await(null==l.isRTL?void 0:l.isRTL(t));let d=await l.getElementRects({reference:e,floating:t,strategy:n}),{x:c,y:h}=M(d,s,a),u=s,p=0;const m={};for(let i=0;i<o.length;i++){const g=o[i];if(!g)continue;const{name:v,fn:f}=g,{x:y,y:b,data:w,reset:C}=await f({x:c,y:h,initialPlacement:s,placement:u,strategy:n,middlewareData:m,rects:d,platform:r,elements:{reference:e,floating:t}});c=null!=y?y:c,h=null!=b?b:h,m[v]={...m[v],...w},C&&p<50&&(p++,"object"==typeof C&&(C.placement&&(u=C.placement),C.rects&&(d=!0===C.rects?await l.getElementRects({reference:e,floating:t,strategy:n}):C.rects),({x:c,y:h}=M(d,u,a))),i=-1)}return{x:c,y:h,placement:u,strategy:n,middlewareData:m}})(e,t,{...n,platform:o})}},9908(e,t,i){"use strict";var s,n=this&&this.__createBinding||(Object.create?function(e,t,i,s){void 0===s&&(s=i);var n=Object.getOwnPropertyDescriptor(t,i);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,s,n)}:function(e,t,i,s){void 0===s&&(s=i),e[s]=t[i]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),l=this&&this.__importStar||(s=function(e){return s=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[t.length]=i);return t},s(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i=s(e),l=0;l<i.length;l++)"default"!==i[l]&&n(t,e,i[l]);return o(t,e),t}),r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.HSStaticMethods=t.COLLECTIONS=t.HSTreeView=t.HSTooltip=t.HSTogglePassword=t.HSToggleCount=t.HSThemeSwitch=t.HSTextareaAutoHeight=t.HSTabs=t.HSStrongPassword=t.HSStepper=t.HSSelect=t.HSScrollspy=t.HSScrollNav=t.HSRemoveElement=t.HSRangeSlider=t.HSPinInput=t.HSOverlay=t.HSLayoutSplitter=t.HSInputNumber=t.HSFileUpload=t.HSDropdown=t.HSDatepicker=t.HSDataTable=t.HSComboBox=t.HSCollapse=t.HSCarousel=t.HSAccordion=t.HSCopyMarkup=void 0;const a=r(i(248));i(2795),i(3765),i(2069),i(7902),i(5826),i(1651),i(2801),i(3752),i(2535),i(6981),i(7645),i(2447),i(4229),i(2648),i(1988),i(6596),i(2500),i(4375),i(804),i(882),i(2763),i(537),i(7691),i(3517),i(2061),i(8490),i(1301);const d=l(i(9119));t.HSStaticMethods=d.default,Object.defineProperty(t,"COLLECTIONS",{enumerable:!0,get:function(){return d.COLLECTIONS}});var c=i(8171);Object.defineProperty(t,"HSCopyMarkup",{enumerable:!0,get:function(){return r(c).default}});var h=i(6621);Object.defineProperty(t,"HSAccordion",{enumerable:!0,get:function(){return r(h).default}});var u=i(4701);Object.defineProperty(t,"HSCarousel",{enumerable:!0,get:function(){return r(u).default}});var p=i(2470);Object.defineProperty(t,"HSCollapse",{enumerable:!0,get:function(){return r(p).default}});var m=i(7298);Object.defineProperty(t,"HSComboBox",{enumerable:!0,get:function(){return r(m).default}});var g=i(3747);Object.defineProperty(t,"HSDataTable",{enumerable:!0,get:function(){return r(g).default}});var v=i(1553);Object.defineProperty(t,"HSDatepicker",{enumerable:!0,get:function(){return r(v).default}});var f=i(9608);Object.defineProperty(t,"HSDropdown",{enumerable:!0,get:function(){return r(f).default}});var y=i(9247);Object.defineProperty(t,"HSFileUpload",{enumerable:!0,get:function(){return r(y).default}});var b=i(989);Object.defineProperty(t,"HSInputNumber",{enumerable:!0,get:function(){return r(b).default}});var w=i(69);Object.defineProperty(t,"HSLayoutSplitter",{enumerable:!0,get:function(){return r(w).default}});var C=i(4343);Object.defineProperty(t,"HSOverlay",{enumerable:!0,get:function(){return r(C).default}});var S=i(4061);Object.defineProperty(t,"HSPinInput",{enumerable:!0,get:function(){return r(S).default}});var x=i(4808);Object.defineProperty(t,"HSRangeSlider",{enumerable:!0,get:function(){return r(x).default}});var L=i(1148);Object.defineProperty(t,"HSRemoveElement",{enumerable:!0,get:function(){return r(L).default}});var T=i(5308);Object.defineProperty(t,"HSScrollNav",{enumerable:!0,get:function(){return r(T).default}});var E=i(9948);Object.defineProperty(t,"HSScrollspy",{enumerable:!0,get:function(){return r(E).default}});var k=i(591);Object.defineProperty(t,"HSSelect",{enumerable:!0,get:function(){return r(k).default}});var I=i(8572);Object.defineProperty(t,"HSStepper",{enumerable:!0,get:function(){return r(I).default}});var A=i(8962);Object.defineProperty(t,"HSStrongPassword",{enumerable:!0,get:function(){return r(A).default}});var M=i(5803);Object.defineProperty(t,"HSTabs",{enumerable:!0,get:function(){return r(M).default}});var O=i(6473);Object.defineProperty(t,"HSTextareaAutoHeight",{enumerable:!0,get:function(){return r(O).default}});var D=i(9419);Object.defineProperty(t,"HSThemeSwitch",{enumerable:!0,get:function(){return r(D).default}});var P=i(1717);Object.defineProperty(t,"HSToggleCount",{enumerable:!0,get:function(){return r(P).default}});var $=i(8549);Object.defineProperty(t,"HSTogglePassword",{enumerable:!0,get:function(){return r($).default}});var H=i(4986);Object.defineProperty(t,"HSTooltip",{enumerable:!0,get:function(){return r(H).default}});var N=i(4957);Object.defineProperty(t,"HSTreeView",{enumerable:!0,get:function(){return r(N).default}}),"undefined"!=typeof window&&(window.HSAccessibilityObserver=new a.default,window.HSStaticMethods=d.default),t.default=d.default},9119(e,t,i){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.HSStaticMethods=t.COLLECTIONS=void 0;const n=i(292),o=s(i(8171)),l=s(i(6621)),r=s(i(4701)),a=s(i(2470)),d=s(i(7298)),c=s(i(3747)),h=s(i(1553)),u=s(i(9608)),p=s(i(9247)),m=s(i(989)),g=s(i(69)),v=s(i(4343)),f=s(i(4061)),y=s(i(4808)),b=s(i(1148)),w=s(i(5308)),C=s(i(9948)),S=s(i(591)),x=s(i(8572)),L=s(i(8962)),T=s(i(5803)),E=s(i(6473)),k=s(i(9419)),I=s(i(1717)),A=s(i(8549)),M=s(i(4986)),O=s(i(4957)),D=()=>globalThis;t.COLLECTIONS=[{key:"copy-markup",fn:o.default,collection:"$hsCopyMarkupCollection"},{key:"accordion",fn:l.default,collection:"$hsAccordionCollection"},{key:"carousel",fn:r.default,collection:"$hsCarouselCollection"},{key:"collapse",fn:a.default,collection:"$hsCollapseCollection"},{key:"combobox",fn:d.default,collection:"$hsComboBoxCollection"},{key:"datatable",fn:(()=>{const e=D();return void 0!==e.DataTable&&void 0!==e.jQuery})()?c.default:null,collection:"$hsDataTableCollection"},{key:"datepicker",fn:void 0!==D().VanillaCalendarPro?h.default:null,collection:"$hsDatepickerCollection"},{key:"dropdown",fn:u.default,collection:"$hsDropdownCollection"},{key:"file-upload",fn:(()=>{const e=D();return void 0!==e._&&void 0!==e.Dropzone})()?p.default:null,collection:"$hsFileUploadCollection"},{key:"input-number",fn:m.default,collection:"$hsInputNumberCollection"},{key:"layout-splitter",fn:g.default,collection:"$hsLayoutSplitterCollection"},{key:"overlay",fn:v.default,collection:"$hsOverlayCollection"},{key:"pin-input",fn:f.default,collection:"$hsPinInputCollection"},{key:"range-slider",fn:void 0!==D().noUiSlider?y.default:null,collection:"$hsRangeSliderCollection"},{key:"remove-element",fn:b.default,collection:"$hsRemoveElementCollection"},{key:"scroll-nav",fn:w.default,collection:"$hsScrollNavCollection"},{key:"scrollspy",fn:C.default,collection:"$hsScrollspyCollection"},{key:"select",fn:S.default,collection:"$hsSelectCollection"},{key:"stepper",fn:x.default,collection:"$hsStepperCollection"},{key:"strong-password",fn:L.default,collection:"$hsStrongPasswordCollection"},{key:"tabs",fn:T.default,collection:"$hsTabsCollection"},{key:"textarea-auto-height",fn:E.default,collection:"$hsTextareaAutoHeightCollection"},{key:"theme-switch",fn:k.default,collection:"$hsThemeSwitchCollection"},{key:"toggle-count",fn:I.default,collection:"$hsToggleCountCollection"},{key:"toggle-password",fn:A.default,collection:"$hsTogglePasswordCollection"},{key:"tooltip",fn:M.default,collection:"$hsTooltipCollection"},{key:"tree-view",fn:O.default,collection:"$hsTreeViewCollection"}],t.HSStaticMethods={getClassProperty:n.getClassProperty,afterTransition:n.afterTransition,autoInit(e="all"){if("all"===e)return void t.COLLECTIONS.forEach(({fn:e})=>{var t;null===(t=null==e?void 0:e.autoInit)||void 0===t||t.call(e)});const i=Array.isArray(e)?e:[e];t.COLLECTIONS.forEach(({key:e,fn:t})=>{var s;i.includes(e)&&(null===(s=null==t?void 0:t.autoInit)||void 0===s||s.call(t))})},cleanCollection(e="all"){if("undefined"==typeof window)return;if("all"===e)return void t.COLLECTIONS.forEach(({collection:e})=>{window[e]instanceof Array&&(window[e]=[])});const i=Array.isArray(e)?e:[e];t.COLLECTIONS.forEach(({key:e,collection:t})=>{i.includes(e)&&window[t]instanceof Array&&(window[t]=[])})}},t.default=t.HSStaticMethods},8223(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BREAKPOINTS=t.COMBO_BOX_ACCESSIBILITY_KEY_SET=t.SELECT_ACCESSIBILITY_KEY_SET=t.TABS_ACCESSIBILITY_KEY_SET=t.OVERLAY_ACCESSIBILITY_KEY_SET=t.DROPDOWN_ACCESSIBILITY_KEY_SET=t.POSITIONS=void 0,t.POSITIONS={auto:"auto","auto-start":"auto-start","auto-end":"auto-end",top:"top","top-left":"top-start","top-right":"top-end",bottom:"bottom","bottom-left":"bottom-start","bottom-right":"bottom-end",right:"right","right-start":"right-start","right-end":"right-end",left:"left","left-start":"left-start","left-end":"left-end"},t.DROPDOWN_ACCESSIBILITY_KEY_SET=["Escape","ArrowUp","ArrowDown","ArrowRight","ArrowLeft","Home","End","Enter"],t.OVERLAY_ACCESSIBILITY_KEY_SET=["Escape","Tab"],t.TABS_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End"],t.SELECT_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End","Escape","Enter","Space","Tab"],t.COMBO_BOX_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End","Escape","Enter"],t.BREAKPOINTS={xs:0,sm:640,md:768,lg:1024,xl:1280,"2xl":1536}},248(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i(292);t.default=class{constructor(){this.components=[],this.currentlyOpenedComponents=[],this.activeComponent=null,this.allowedKeybindings=new Set(["Escape","Enter"," ","Space","ArrowDown","ArrowUp","ArrowLeft","ArrowRight","Tab","Home","End"]),this.initGlobalListeners()}initGlobalListeners(){document.addEventListener("keydown",e=>this.handleGlobalKeydown(e)),document.addEventListener("focusin",e=>this.handleGlobalFocusin(e))}isAllowedKeybinding(e){return!!this.allowedKeybindings.has(e.key)||!(1!==e.key.length||!/^[a-zA-Z]$/.test(e.key)||e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)}getActiveComponent(e){if(!e)return null;const t=this.components.filter(t=>t.wrapper.contains(e)||t.context&&t.context.contains(e));if(0===t.length)return null;if(1===t.length)return t[0];let i=null,s=Number.MAX_SAFE_INTEGER;for(const n of t){let t=0,o=e;for(;o&&o!==n.wrapper&&o!==n.context;)t++,o=o.parentElement;t<s&&(s=t,i=n)}return i}getActiveComponentForKey(e,t){if(!e)return null;const i=this.components.filter(t=>t.wrapper.contains(e)||t.context&&t.context.contains(e));if(0===i.length)return null;const s=i.filter(e=>{const i=e.handlers;switch(t){case"Escape":return!!i.onEsc;case"Enter":return!!i.onEnter;case" ":case"Space":return!!i.onSpace;case"ArrowDown":case"ArrowUp":case"ArrowLeft":case"ArrowRight":return!!i.onArrow;case"Tab":return!!i.onTab||!!i.onShiftTab;case"Home":return!!i.onHome;case"End":return!!i.onEnd;default:return!!i.onFirstLetter}});if(0===s.length)return this.getActiveComponent(e);if(1===s.length)return s[0];let n=null,o=Number.MAX_SAFE_INTEGER;for(const t of s){let i=0,s=e;for(;s&&s!==t.wrapper&&s!==t.context;)i++,s=s.parentElement;i<o&&(o=i,n=t)}return n}getDistanceToComponent(e,t){let i=0,s=e;for(;s&&s!==t.wrapper&&s!==t.context;)i++,s=s.parentElement;return i}getComponentsByNesting(e){if(!e)return[];const t=this.components.filter(t=>t.wrapper.contains(e)||t.context&&t.context.contains(e));return t.length<=1?t:[...t].sort((t,i)=>this.getDistanceToComponent(e,i)-this.getDistanceToComponent(e,t))}getSequentialHandlersForKey(e,t){const i=this.getComponentsByNesting(e);return 0===i.length?[]:i.map(e=>"Enter"===t?e.handlers.onEnter:e.handlers.onSpace).filter(e=>"function"==typeof e)}executeSequentialHandlers(e,t){let i=!1,s=!1;for(const n of e){i=!0;if(!1===n(t)){s=!0;break}}return{called:i,stopped:s}}handleGlobalFocusin(e){const t=e.target;this.activeComponent=this.getActiveComponent(t)}handleGlobalKeydown(e){var t;const i=e.target;this.activeComponent=this.getActiveComponentForKey(i,e.key);const n=this.activeComponent,o="Enter"===e.key||" "===e.key||"Space"===e.key;if((n||o)&&this.isAllowedKeybinding(e))switch(e.key){case"Escape":if(!n)break;if(n.isOpened){if(n.handlers.onEsc){const t=n.handlers.onEsc();if(e.preventDefault(),e.stopPropagation(),!1===t){const e=this.findClosestOpenParent(i);(null==e?void 0:e.handlers.onEsc)&&e.handlers.onEsc()}}}else{const t=this.findClosestOpenParent(i);(null==t?void 0:t.handlers.onEsc)&&(t.handlers.onEsc(),e.preventDefault(),e.stopPropagation())}break;case"Enter":{const t=this.getSequentialHandlersForKey(i,"Enter");if(0===t.length)break;const{called:n,stopped:o}=this.executeSequentialHandlers(t,e);if(n&&!(0,s.isFormElement)(i)&&(e.stopPropagation(),e.preventDefault()),o)break;break}case" ":case"Space":{if("INPUT"===i.tagName||"TEXTAREA"===i.tagName)return;const t=this.getActiveComponent(i),s=this.getSequentialHandlersForKey(i,"Space");if(0===s.length)break;const{stopped:n}=this.executeSequentialHandlers(s);(n||(null==t?void 0:t.handlers.onSpace))&&(e.preventDefault(),e.stopPropagation());break}case"ArrowDown":case"ArrowUp":case"ArrowLeft":case"ArrowRight":if(!n)break;if(n.handlers.onArrow){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;n.handlers.onArrow(e),e.preventDefault(),e.stopPropagation()}break;case"Tab":if(!n)break;if(!n.handlers.onTab)break;const o=e.shiftKey?n.handlers.onShiftTab:n.handlers.onTab;o&&o(e);break;case"Home":if(!n)break;n.handlers.onHome&&(n.handlers.onHome(),e.preventDefault(),e.stopPropagation());break;case"End":if(!n)break;n.handlers.onEnd&&(n.handlers.onEnd(),e.preventDefault(),e.stopPropagation());break;default:if(!n)break;if(n.handlers.onFirstLetter&&1===e.key.length&&/^[a-zA-Z]$/.test(e.key)){if(n.handlers.onFirstLetter(e.key),!(null===(t=n.stopPropagation)||void 0===t?void 0:t.onFirstLetter))return;e.preventDefault(),e.stopPropagation()}}}findClosestOpenParent(e){let t=e.parentElement;for(;t;){const e=this.currentlyOpenedComponents.find(e=>e.wrapper===t&&e!==this.activeComponent);if(e)return e;t=t.parentElement}return null}registerComponent(e,t,i=!0,s="",n="",o,l){const r={wrapper:e,handlers:t,isOpened:i,name:s,selector:n,context:o,isRegistered:!0,stopPropagation:l};return this.components.push(r),r}updateComponentState(e,t){e.isOpened=t,t?this.currentlyOpenedComponents.includes(e)||this.currentlyOpenedComponents.push(e):this.currentlyOpenedComponents=this.currentlyOpenedComponents.filter(t=>t!==e)}unregisterComponent(e){this.components=this.components.filter(t=>t!==e),this.currentlyOpenedComponents=this.currentlyOpenedComponents.filter(t=>t!==e)}addAllowedKeybinding(e){this.allowedKeybindings.add(e)}removeAllowedKeybinding(e){this.allowedKeybindings.delete(e)}getAllowedKeybindings(){return Array.from(this.allowedKeybindings)}}},3765(e,t,i){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=s(i(6621));window.addEventListener("load",()=>{n.default.autoInit(),document.querySelectorAll(".hs-accordion-treeview-root").length&&n.default.treeView()}),"undefined"!=typeof window&&(window.HSAccordion=n.default)},6621(e,t,i){"use strict"; /* * HSAccordion * @version: 4.2.0 * @author: Preline Labs Ltd. * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) * Copyright 2024 Preline Labs Ltd. */var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=i(292),o=s(i(2961));class l extends o.default{constructor(e,t,i){super(e,t,i),this.toggle=this.el.querySelector(".hs-accordion-toggle")||null,this.content=this.el.querySelector(".hs-accordion-content")||null,this.group=this.el.closest(".hs-accordion-group")||null,this.isAlwaysOpened=!1,this.keepOneOpen=!1,this.isToggleStopPropagated=!1,window.$hsAccordionCollection||(window.$hsAccordionCollection=[]),this.update(),this.isToggleStopPropagated=(0,n.stringToBoolean)((0,n.getClassProperty)(this.toggle,"--stop-propagation","false")||"false"),this.keepOneOpen=!!this.group&&(0,n.stringToBoolean)((0,n.getClassProperty)(this.group,"--keep-one-open","false")||"false"),this.toggle&&this.content&&this.init()}init(){this.createCollection(window.$hsAccordionCollection,this),this.onToggleClickListener=e=>this.toggleClick(e),this.toggle.addEventListener("click",this.onToggleClickListener)}toggleClick(e){if(this.el.classList.contains("active")&&this.keepOneOpen)return!1;this.isToggleStopPropagated&&e.stopPropagation(),this.el.classList.contains("active")?this.hide():this.show()}show(){var e;if(this.group&&!this.isAlwaysOpened&&this.group.querySelector(":scope > .hs-accordion.active")&&this.group.querySelector(":scope > .hs-accordion.active")!==this.el){window.$hsAccordionCollection.find(e=>e.element.el===this.group.querySelector(":scope > .hs-accordion.active")).element.hide()}if(this.el.classList.contains("active"))return!1;this.el.classList.add("active"),(null===(e=null==this?void 0:this.toggle)||void 0===e?void 0:e.ariaExpanded)&&(this.toggle.ariaExpanded="true"),this.fireEvent("beforeOpen",this.el),(0,n.dispatch)("beforeOpen.hs.accordion",this.el,this.el),this.content.style.display="block",this.content.style.height="0",setTimeout(()=>{this.content.style.height=`${this.content.scrollHeight}px`,(0,n.afterTransition)(this.content,()=>{this.content.style.display="block",this.content.style.height="",this.fireEvent("open",this.el),(0,n.dispatch)("open.hs.accordion",this.el,this.el)})})}hide(){var e;if(!this.el.classList.contains("active"))return!1;this.el.classList.remove("active"),(null===(e=null==this?void 0:this.toggle)||void 0===e?void 0:e.ariaExpanded)&&(this.toggle.ariaExpanded="false"),this.fireEvent("beforeClose",this.el),(0,n.dispatch)("beforeClose.hs.accordion",this.el,this.el),this.content.style.height=`${this.content.scrollHeight}px`,setTimeout(()=>{this.content.style.height="0"}),(0,n.afterTransition)(this.content,()=>{this.content.style.display="none",this.content.style.height="",this.fireEvent("close",this.el),(0,n.dispatch)("close.hs.accordion",this.el,this.el)})}update(){return this.group=this.el.closest(".hs-accordion-group")||null,!!this.group&&(this.isAlwaysOpened=this.group.hasAttribute("data-hs-accordion-always-open")||!1,!!window.$hsAccordionCollection&&void window.$hsAccordionCollection.map(e=>(e.id===this.el.id&&(e.element.group=this.group,e.element.isAlwaysOpened=this.isAlwaysOpened),e)))}destroy(){var e;(null===(e=null==l?void 0:l.selectable)||void 0===e?void 0:e.length)&&l.selectable.forEach(e=>{e.listeners.forEach(({el:e,listener:t})=>{e.removeEventListener("click",t)})}),this.onToggleClickListener&&this.toggle.removeEventListener("click",this.onToggleClickListener),this.toggle=null,this.content=null,this.group=null,this.onToggleClickListener=null,window.$hsAccordionCollection=window.$hsAccordionCollection.filter(({element:e})=>e.el!==this.el)}static findInCollection(e){return window.$hsAccordionCollection.find(t=>e instanceof l?t.element.el===e.el:"string"==typeof e?t.element.el===document.querySelector(e):t.element.el===e)||null}static autoInit(){window.$hsAccordionCollection||(window.$hsAccordionCollection=[]),window.$hsAccordionCollection&&(window.$hsAccordionCollection=window.$hsAccordionCollection.filter(({element:e})=>document.contains(e.el))),document.querySelectorAll(".hs-accordion:not(.--prevent-on-load-init)").forEach(e=>{window.$hsAccordionCollection.find(t=>{var i;return(null===(i=null==t?void 0:t.element)||void 0===i?void 0:i.el)===e})||new l(e)})}static getInstance(e,t){const i=window.$hsAccordionCollection.find(t=>t.element.el===("string"==typeof e?document.querySelector(e):e));return i?t?i:i.element.el:null}static show(e){const t=l.findInCollection(e);t&&"block"!==t.element.content.style.display&&t.element.show()}static hide(e){const t=l.findInCollection(e),i=t?window.getComputedStyle(t.element.content):null;t&&"none"!==i.display&&t.element.hide()}static treeView(){if(!document.querySelectorAll(".hs-accordion-treeview-root").length)return!1;this.selectable=[],document.querySelectorAll(".hs-accordion-treeview-root").forEach(e=>{const t=null==e?void 0:e.getAttribute("data-hs-accordion-options"),i=t?JSON.parse(t):{};this.selectable.push({el:e,options:Object.assign({},i),listeners:[]})}),this.selectable.length&&this.selectable.forEach(e=>{const{el:t}=e;t.querySelectorAll(".hs-accordion-selectable").forEach(t=>{const i=i=>this.onSelectableClick(i,e,t);t.addEventListener("click",i),e.listeners.push({el:t,listener:i})})})}static toggleSelected(e,t){t.classList.contains("selected")?t.classList.remove("selected"):(e.el.querySelectorAll(".hs-accordion-selectable").forEach(e=>e.classList.remove("selected")),t.classList.add("selected"))}static on(e,t,i){const s=l.findInCollection(t);s&&(s.element.events[e]=i)}}l.onSelectableClick=(e,t,i)=>{e.stopPropagation(),l.toggleSelected(t,i)},t.default=l},2961(e,t){"use strict"; /* * HSBasePlugin * @version: 4.2.0 * @author: Preline Labs Ltd. * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) * Copyright 2024 Preline Labs Ltd. */Object.defineProperty(t,"__esModule",{value:!0});t.default=class{constructor(e,t,i){this.el=e,this.options=t,this.events=i,this.el=e,this.options=t,this.events={}}createCollection(e,t){var i,s;let n=e;if(!Array.isArray(n)&&"undefined"!=typeof window){const e=null===(i=this.constructor)||void 0===i?void 0:i.name,t="string"==typeof e&&e.startsWith("HS")?`$hs${e.slice(2)}Collection`:null;t&&(Array.isArray(window[t])||(window[t]=[]),n=window[t])}Array.isArray(n)&&n.push({id:(null===(s=null==t?void 0:t.el)||void 0===s?void 0:s.id)||n.length+1,element:t})}fireEvent(e,t=null){if(this.events.hasOwnProperty(e))return this.events[e](t)}on(e,t){this.events[e]=t}}},2069(e,t,i){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=s(i(4701));window.addEventListener("load",()=>{n.default.autoInit()}),"undefined"!=typeof window&&(window.HSCarousel=n.default)},4701(e,t,i){"use strict"; /* * HSCarousel * @version: 4.2.0 * @author: Preline Labs Ltd. * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) * Copyright 2024 Preline Labs Ltd. */var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=i(292),o=s(i(2961)),l=i(8223);class r extends o.default{constructor(e,t){var i,s,n,o,l;super(e,t);const r=e.getAttribute("data-hs-carousel"),a=r?JSON.parse(r):{},d=Object.assign(Object.assign({},a),t);this.currentIndex=d.currentIndex||0,this.loadingClasses=d.loadingClasses?`${d.loadingClasses}`.split(","):null,this.dotsItemClasses=d.dotsItemClasses?d.dotsItemClasses:null,this.isAutoHeight=void 0!==d.isAutoHeight&&d.isAutoHeight,this.isAutoPlay=void 0!==d.isAutoPlay&&d.isAutoPlay,this.isCentered=void 0!==d.isCentered&&d.isCentered,this.isDraggable=void 0!==d.isDraggable&&d.isDraggable,this.isInfiniteLoop=void 0!==d.isInfiniteLoop&&d.isInfiniteLoop,this.isRTL=void 0!==d.isRTL&&d.isRTL,this.isSnap=void 0!==d.isSnap&&d.isSnap,this.hasSnapSpacers=void 0===d.hasSnapSpacers||d.hasSnapSpacers,this.speed=d.speed||4e3,this.updateDelay=d.updateDelay||0,this.slidesQty=d.slidesQty||1,this.loadingClassesRemove=(null===(i=this.loadingClasses)||void 0===i?void 0:i[0])?this.loadingClasses[0].split(" "):"opacity-0",this.loadingClassesAdd=(null===(s=this.loadingClasses)||void 0===s?void 0:s[1])?this.loadingClasses[1].split(" "):"",this.afterLoadingClassesAdd=(null===(n=this.loadingClasses)||void 0===n?void 0:n[2])?this.loadingClasses[2].split(" "):"",this.container=this.el.querySelector(".hs-carousel")||null,this.inner=this.el.querySelector(".hs-carousel-body")||null,this.slides=this.el.querySelectorAll(".hs-carousel-slide")||[],this.prev=this.el.querySelector(".hs-carousel-prev")||null,this.next=this.el.querySelector(".hs-carousel-next")||null,this.dots=this.el.querySelector(".hs-carousel-pagination")||null,this.info=this.el.querySelector(".hs-carousel-info")||null,this.infoTotal=(null===(o=null==this?void 0:this.info)||void 0===o?void 0:o.querySelector(".hs-carousel-info-total"))||null,this.infoCurrent=(null===(l=null==this?void 0:this.info)||void 0===l?void 0:l.querySelector(".hs-carousel-info-current"))||null,this.sliderWidth=this.el.getBoundingClientRect().width,this.isDragging=!1,this.dragStartX=null,this.initialTranslateX=null,this.touchX={start:0,end:0},this.touchY={start:0,end:0},this.resizeContainer=document.querySelector("body"),this.resizeContainerWidth=0,this.init()}setIsSnap(){const e=this.container.getBoundingClientRect(),t=e.left+e.width/2;let i=null,s=null,n=1/0;Array.from(this.inner.children).forEach(e=>{const s=e.getBoundingClientRect(),o=this.inner.getBoundingClientRect(),l=s.left+s.width/2-o.left,r=Math.abs(t-(o.left+l));r<n&&(n=r,i=e)}),i&&(s=Array.from(this.slides).findIndex(e=>e===i)),this.setIndex(s),this.dots&&this.setCurrentDot()}prevClick(){this.goToPrev(),this.isAutoPlay&&(this.resetTimer(),this.setTimer())}nextClick(){this.goToNext(),this.isAutoPlay&&(this.resetTimer(),this.setTimer())}containerScroll(){clearTimeout(this.isScrolling),this.isScrolling=setTimeout(()=>{this.setIsSnap()},100)}elementTouchStart(e){this.touchX.start=e.changedTouches[0].screenX,this.touchY.start=e.changedTouches[0].screenY}elementTouchEnd(e){this.touchX.end=e.changedTouches[0].screenX,this.touchY.end=e.changedTouches[0].screenY,this.detectDirection()}innerMouseDown(e){this.handleDragStart(e)}innerTouchStart(e){this.handleDragStart(e)}documentMouseMove(e){this.handleDragMove(e)}documentTouchMove(e){this.handleDragMove(e)}documentMouseUp(){this.handleDragEnd()}documentTouchEnd(){this.handleDragEnd()}dotClick(e){this.goTo(e),this.isAutoPlay&&(this.resetTimer(),this.setTimer())}init(){this.createCollection(window.$hsCarouselCollection,this),this.inner&&(this.calculateWidth(),this.isDraggable&&!this.isSnap&&this.initDragHandling()),this.prev&&(this.onPrevClickListener=()=>this.prevClick(),this.prev.addEventListener("click",this.onPrevClickListener)),this.next&&(this.onNextClickListener=()=>this.nextClick(),this.next.addEventListener("click",this.onNextClickListener)),this.dots&&this.initDots(),this.info&&this.buildInfo(),this.slides.length&&(this.addCurrentClass(),this.isInfiniteLoop||this.addDisabledClass(),this.isAutoPlay&&this.autoPlay()),setTimeout(()=>{this.isSnap&&this.setIsSnap(),this.loadingClassesRemove&&("string"==typeof this.loadingClassesRemove?this.inner.classList.remove(this.loadingClassesRemove):this.inner.classList.remove(...this.loadingClassesRemove)),this.loadingClassesAdd&&("string"==typeof this.loadingClassesAdd?this.inner.classList.add(this.loadingClassesAdd):this.inner.classList.add(...this.loadingClassesAdd)),this.inner&&this.afterLoadingClassesAdd&&setTimeout(()=>{"string"==typeof this.afterLoadingClassesAdd?this.inner.classList.add(this.afterLoadingClassesAdd):this.inner.classList.add(...this.afterLoadingClassesAdd)})},400),this.isSnap&&(this.onContainerScrollListener=()=>this.containerScroll(),this.container.addEventListener("scroll",this.onContainerScrollListener)),this.el.classList.add("init"),this.isSnap||(this.onElementTouchStartListener=e=>this.elementTouchStart(e),this.onElementTouchEndListener=e=>this.elementTouchEnd(e),this.el.addEventListener("touchstart",this.onElementTouchStartListener),this.el.addEventListener("touchend",this.onElementTouchEndListener)),this.observeResize()}initDragHandling(){const e=this.inner;this.onInnerMouseDownListener=e=>this.innerMouseDown(e),this.onInnerTouchStartListener=e=>this.innerTouchStart(e),this.onDocumentMouseMoveListener=e=>this.documentMouseMove(e),this.onDocumentTouchMoveListener=e=>this.documentTouchMove(e),this.onDocumentMouseUpListener=()=>this.documentMouseUp(),this.onDocumentTouchEndListener=()=>this