/* empty css */(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))s(i);new MutationObserver(i=>{for(const r of i)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&s(o)}).observe(document,{childList:!0,subtree:!0});function e(i){const r={};return i.integrity&&(r.integrity=i.integrity),i.referrerPolicy&&(r.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?r.credentials="include":i.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function s(i){if(i.ep)return;i.ep=!0;const r=e(i);fetch(i.href,r)}})();function Ti(){const n=document.querySelectorAll("form.needs-validation");for(let t=0;t{e.checkValidity()||(s.preventDefault(),s.stopPropagation()),e.classList.add("was-validated")})}}var I="top",R="bottom",k="right",P="left",ge="auto",Mt=[I,R,k,P],_t="start",St="end",ds="clippingParents",Ze="viewport",wt="popper",fs="reference",Ue=Mt.reduce(function(n,t){return n.concat([t+"-"+_t,t+"-"+St])},[]),tn=[].concat(Mt,[ge]).reduce(function(n,t){return n.concat([t,t+"-"+_t,t+"-"+St])},[]),hs="beforeRead",ps="read",_s="afterRead",ms="beforeMain",gs="main",Es="afterMain",vs="beforeWrite",bs="write",As="afterWrite",Ts=[hs,ps,_s,ms,gs,Es,vs,bs,As];function G(n){return n?(n.nodeName||"").toLowerCase():null}function V(n){if(n==null)return window;if(n.toString()!=="[object Window]"){var t=n.ownerDocument;return t&&t.defaultView||window}return n}function mt(n){var t=V(n).Element;return n instanceof t||n instanceof Element}function H(n){var t=V(n).HTMLElement;return n instanceof t||n instanceof HTMLElement}function en(n){if(typeof ShadowRoot>"u")return!1;var t=V(n).ShadowRoot;return n instanceof t||n instanceof ShadowRoot}function yi(n){var t=n.state;Object.keys(t.elements).forEach(function(e){var s=t.styles[e]||{},i=t.attributes[e]||{},r=t.elements[e];!H(r)||!G(r)||(Object.assign(r.style,s),Object.keys(i).forEach(function(o){var a=i[o];a===!1?r.removeAttribute(o):r.setAttribute(o,a===!0?"":a)}))})}function wi(n){var t=n.state,e={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,e.popper),t.styles=e,t.elements.arrow&&Object.assign(t.elements.arrow.style,e.arrow),function(){Object.keys(t.elements).forEach(function(s){var i=t.elements[s],r=t.attributes[s]||{},o=Object.keys(t.styles.hasOwnProperty(s)?t.styles[s]:e[s]),a=o.reduce(function(c,d){return c[d]="",c},{});!H(i)||!G(i)||(Object.assign(i.style,a),Object.keys(r).forEach(function(c){i.removeAttribute(c)}))})}}const nn={name:"applyStyles",enabled:!0,phase:"write",fn:yi,effect:wi,requires:["computeStyles"]};function U(n){return n.split("-")[0]}var pt=Math.max,fe=Math.min,Dt=Math.round;function ze(){var n=navigator.userAgentData;return n!=null&&n.brands&&Array.isArray(n.brands)?n.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function ys(){return!/^((?!chrome|android).)*safari/i.test(ze())}function Lt(n,t,e){t===void 0&&(t=!1),e===void 0&&(e=!1);var s=n.getBoundingClientRect(),i=1,r=1;t&&H(n)&&(i=n.offsetWidth>0&&Dt(s.width)/n.offsetWidth||1,r=n.offsetHeight>0&&Dt(s.height)/n.offsetHeight||1);var o=mt(n)?V(n):window,a=o.visualViewport,c=!ys()&&e,d=(s.left+(c&&a?a.offsetLeft:0))/i,u=(s.top+(c&&a?a.offsetTop:0))/r,_=s.width/i,m=s.height/r;return{width:_,height:m,top:u,right:d+_,bottom:u+m,left:d,x:d,y:u}}function sn(n){var t=Lt(n),e=n.offsetWidth,s=n.offsetHeight;return Math.abs(t.width-e)<=1&&(e=t.width),Math.abs(t.height-s)<=1&&(s=t.height),{x:n.offsetLeft,y:n.offsetTop,width:e,height:s}}function ws(n,t){var e=t.getRootNode&&t.getRootNode();if(n.contains(t))return!0;if(e&&en(e)){var s=t;do{if(s&&n.isSameNode(s))return!0;s=s.parentNode||s.host}while(s)}return!1}function Q(n){return V(n).getComputedStyle(n)}function Oi(n){return["table","td","th"].indexOf(G(n))>=0}function it(n){return((mt(n)?n.ownerDocument:n.document)||window.document).documentElement}function Ee(n){return G(n)==="html"?n:n.assignedSlot||n.parentNode||(en(n)?n.host:null)||it(n)}function Sn(n){return!H(n)||Q(n).position==="fixed"?null:n.offsetParent}function Ci(n){var t=/firefox/i.test(ze()),e=/Trident/i.test(ze());if(e&&H(n)){var s=Q(n);if(s.position==="fixed")return null}var i=Ee(n);for(en(i)&&(i=i.host);H(i)&&["html","body"].indexOf(G(i))<0;){var r=Q(i);if(r.transform!=="none"||r.perspective!=="none"||r.contain==="paint"||["transform","perspective"].indexOf(r.willChange)!==-1||t&&r.willChange==="filter"||t&&r.filter&&r.filter!=="none")return i;i=i.parentNode}return null}function Ut(n){for(var t=V(n),e=Sn(n);e&&Oi(e)&&Q(e).position==="static";)e=Sn(e);return e&&(G(e)==="html"||G(e)==="body"&&Q(e).position==="static")?t:e||Ci(n)||t}function rn(n){return["top","bottom"].indexOf(n)>=0?"x":"y"}function Ft(n,t,e){return pt(n,fe(t,e))}function Ni(n,t,e){var s=Ft(n,t,e);return s>e?e:s}function Os(){return{top:0,right:0,bottom:0,left:0}}function Cs(n){return Object.assign({},Os(),n)}function Ns(n,t){return t.reduce(function(e,s){return e[s]=n,e},{})}var Si=function(t,e){return t=typeof t=="function"?t(Object.assign({},e.rects,{placement:e.placement})):t,Cs(typeof t!="number"?t:Ns(t,Mt))};function Di(n){var t,e=n.state,s=n.name,i=n.options,r=e.elements.arrow,o=e.modifiersData.popperOffsets,a=U(e.placement),c=rn(a),d=[P,k].indexOf(a)>=0,u=d?"height":"width";if(!(!r||!o)){var _=Si(i.padding,e),m=sn(r),p=c==="y"?I:P,T=c==="y"?R:k,g=e.rects.reference[u]+e.rects.reference[c]-o[c]-e.rects.popper[u],v=o[c]-e.rects.reference[c],y=Ut(r),O=y?c==="y"?y.clientHeight||0:y.clientWidth||0:0,C=g/2-v/2,E=_[p],b=O-m[u]-_[T],A=O/2-m[u]/2+C,w=Ft(E,A,b),D=c;e.modifiersData[s]=(t={},t[D]=w,t.centerOffset=w-A,t)}}function Li(n){var t=n.state,e=n.options,s=e.element,i=s===void 0?"[data-popper-arrow]":s;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||ws(t.elements.popper,i)&&(t.elements.arrow=i))}const Ss={name:"arrow",enabled:!0,phase:"main",fn:Di,effect:Li,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function $t(n){return n.split("-")[1]}var $i={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Ii(n,t){var e=n.x,s=n.y,i=t.devicePixelRatio||1;return{x:Dt(e*i)/i||0,y:Dt(s*i)/i||0}}function Dn(n){var t,e=n.popper,s=n.popperRect,i=n.placement,r=n.variation,o=n.offsets,a=n.position,c=n.gpuAcceleration,d=n.adaptive,u=n.roundOffsets,_=n.isFixed,m=o.x,p=m===void 0?0:m,T=o.y,g=T===void 0?0:T,v=typeof u=="function"?u({x:p,y:g}):{x:p,y:g};p=v.x,g=v.y;var y=o.hasOwnProperty("x"),O=o.hasOwnProperty("y"),C=P,E=I,b=window;if(d){var A=Ut(e),w="clientHeight",D="clientWidth";if(A===V(e)&&(A=it(e),Q(A).position!=="static"&&a==="absolute"&&(w="scrollHeight",D="scrollWidth")),A=A,i===I||(i===P||i===k)&&r===St){E=R;var S=_&&A===b&&b.visualViewport?b.visualViewport.height:A[w];g-=S-s.height,g*=c?1:-1}if(i===P||(i===I||i===R)&&r===St){C=k;var N=_&&A===b&&b.visualViewport?b.visualViewport.width:A[D];p-=N-s.width,p*=c?1:-1}}var L=Object.assign({position:a},d&&$i),F=u===!0?Ii({x:p,y:g},V(e)):{x:p,y:g};if(p=F.x,g=F.y,c){var $;return Object.assign({},L,($={},$[E]=O?"0":"",$[C]=y?"0":"",$.transform=(b.devicePixelRatio||1)<=1?"translate("+p+"px, "+g+"px)":"translate3d("+p+"px, "+g+"px, 0)",$))}return Object.assign({},L,(t={},t[E]=O?g+"px":"",t[C]=y?p+"px":"",t.transform="",t))}function Pi(n){var t=n.state,e=n.options,s=e.gpuAcceleration,i=s===void 0?!0:s,r=e.adaptive,o=r===void 0?!0:r,a=e.roundOffsets,c=a===void 0?!0:a,d={placement:U(t.placement),variation:$t(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Dn(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Dn(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const on={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Pi,data:{}};var ne={passive:!0};function Mi(n){var t=n.state,e=n.instance,s=n.options,i=s.scroll,r=i===void 0?!0:i,o=s.resize,a=o===void 0?!0:o,c=V(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return r&&d.forEach(function(u){u.addEventListener("scroll",e.update,ne)}),a&&c.addEventListener("resize",e.update,ne),function(){r&&d.forEach(function(u){u.removeEventListener("scroll",e.update,ne)}),a&&c.removeEventListener("resize",e.update,ne)}}const an={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Mi,data:{}};var xi={left:"right",right:"left",bottom:"top",top:"bottom"};function le(n){return n.replace(/left|right|bottom|top/g,function(t){return xi[t]})}var Ri={start:"end",end:"start"};function Ln(n){return n.replace(/start|end/g,function(t){return Ri[t]})}function cn(n){var t=V(n),e=t.pageXOffset,s=t.pageYOffset;return{scrollLeft:e,scrollTop:s}}function ln(n){return Lt(it(n)).left+cn(n).scrollLeft}function ki(n,t){var e=V(n),s=it(n),i=e.visualViewport,r=s.clientWidth,o=s.clientHeight,a=0,c=0;if(i){r=i.width,o=i.height;var d=ys();(d||!d&&t==="fixed")&&(a=i.offsetLeft,c=i.offsetTop)}return{width:r,height:o,x:a+ln(n),y:c}}function Vi(n){var t,e=it(n),s=cn(n),i=(t=n.ownerDocument)==null?void 0:t.body,r=pt(e.scrollWidth,e.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=pt(e.scrollHeight,e.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-s.scrollLeft+ln(n),c=-s.scrollTop;return Q(i||e).direction==="rtl"&&(a+=pt(e.clientWidth,i?i.clientWidth:0)-r),{width:r,height:o,x:a,y:c}}function un(n){var t=Q(n),e=t.overflow,s=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(e+i+s)}function Ds(n){return["html","body","#document"].indexOf(G(n))>=0?n.ownerDocument.body:H(n)&&un(n)?n:Ds(Ee(n))}function Kt(n,t){var e;t===void 0&&(t=[]);var s=Ds(n),i=s===((e=n.ownerDocument)==null?void 0:e.body),r=V(s),o=i?[r].concat(r.visualViewport||[],un(s)?s:[]):s,a=t.concat(o);return i?a:a.concat(Kt(Ee(o)))}function Ge(n){return Object.assign({},n,{left:n.x,top:n.y,right:n.x+n.width,bottom:n.y+n.height})}function Hi(n,t){var e=Lt(n,!1,t==="fixed");return e.top=e.top+n.clientTop,e.left=e.left+n.clientLeft,e.bottom=e.top+n.clientHeight,e.right=e.left+n.clientWidth,e.width=n.clientWidth,e.height=n.clientHeight,e.x=e.left,e.y=e.top,e}function $n(n,t,e){return t===Ze?Ge(ki(n,e)):mt(t)?Hi(t,e):Ge(Vi(it(n)))}function Wi(n){var t=Kt(Ee(n)),e=["absolute","fixed"].indexOf(Q(n).position)>=0,s=e&&H(n)?Ut(n):n;return mt(s)?t.filter(function(i){return mt(i)&&ws(i,s)&&G(i)!=="body"}):[]}function Bi(n,t,e,s){var i=t==="clippingParents"?Wi(n):[].concat(t),r=[].concat(i,[e]),o=r[0],a=r.reduce(function(c,d){var u=$n(n,d,s);return c.top=pt(u.top,c.top),c.right=fe(u.right,c.right),c.bottom=fe(u.bottom,c.bottom),c.left=pt(u.left,c.left),c},$n(n,o,s));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function Ls(n){var t=n.reference,e=n.element,s=n.placement,i=s?U(s):null,r=s?$t(s):null,o=t.x+t.width/2-e.width/2,a=t.y+t.height/2-e.height/2,c;switch(i){case I:c={x:o,y:t.y-e.height};break;case R:c={x:o,y:t.y+t.height};break;case k:c={x:t.x+t.width,y:a};break;case P:c={x:t.x-e.width,y:a};break;default:c={x:t.x,y:t.y}}var d=i?rn(i):null;if(d!=null){var u=d==="y"?"height":"width";switch(r){case _t:c[d]=c[d]-(t[u]/2-e[u]/2);break;case St:c[d]=c[d]+(t[u]/2-e[u]/2);break}}return c}function It(n,t){t===void 0&&(t={});var e=t,s=e.placement,i=s===void 0?n.placement:s,r=e.strategy,o=r===void 0?n.strategy:r,a=e.boundary,c=a===void 0?ds:a,d=e.rootBoundary,u=d===void 0?Ze:d,_=e.elementContext,m=_===void 0?wt:_,p=e.altBoundary,T=p===void 0?!1:p,g=e.padding,v=g===void 0?0:g,y=Cs(typeof v!="number"?v:Ns(v,Mt)),O=m===wt?fs:wt,C=n.rects.popper,E=n.elements[T?O:m],b=Bi(mt(E)?E:E.contextElement||it(n.elements.popper),c,u,o),A=Lt(n.elements.reference),w=Ls({reference:A,element:C,strategy:"absolute",placement:i}),D=Ge(Object.assign({},C,w)),S=m===wt?D:A,N={top:b.top-S.top+y.top,bottom:S.bottom-b.bottom+y.bottom,left:b.left-S.left+y.left,right:S.right-b.right+y.right},L=n.modifiersData.offset;if(m===wt&&L){var F=L[i];Object.keys(N).forEach(function($){var at=[k,R].indexOf($)>=0?1:-1,ct=[I,R].indexOf($)>=0?"y":"x";N[$]+=F[ct]*at})}return N}function ji(n,t){t===void 0&&(t={});var e=t,s=e.placement,i=e.boundary,r=e.rootBoundary,o=e.padding,a=e.flipVariations,c=e.allowedAutoPlacements,d=c===void 0?tn:c,u=$t(s),_=u?a?Ue:Ue.filter(function(T){return $t(T)===u}):Mt,m=_.filter(function(T){return d.indexOf(T)>=0});m.length===0&&(m=_);var p=m.reduce(function(T,g){return T[g]=It(n,{placement:g,boundary:i,rootBoundary:r,padding:o})[U(g)],T},{});return Object.keys(p).sort(function(T,g){return p[T]-p[g]})}function Fi(n){if(U(n)===ge)return[];var t=le(n);return[Ln(n),t,Ln(t)]}function Ki(n){var t=n.state,e=n.options,s=n.name;if(!t.modifiersData[s]._skip){for(var i=e.mainAxis,r=i===void 0?!0:i,o=e.altAxis,a=o===void 0?!0:o,c=e.fallbackPlacements,d=e.padding,u=e.boundary,_=e.rootBoundary,m=e.altBoundary,p=e.flipVariations,T=p===void 0?!0:p,g=e.allowedAutoPlacements,v=t.options.placement,y=U(v),O=y===v,C=c||(O||!T?[le(v)]:Fi(v)),E=[v].concat(C).reduce(function(bt,Z){return bt.concat(U(Z)===ge?ji(t,{placement:Z,boundary:u,rootBoundary:_,padding:d,flipVariations:T,allowedAutoPlacements:g}):Z)},[]),b=t.rects.reference,A=t.rects.popper,w=new Map,D=!0,S=E[0],N=0;N=0,ct=at?"width":"height",x=It(t,{placement:L,boundary:u,rootBoundary:_,altBoundary:m,padding:d}),K=at?$?k:P:$?R:I;b[ct]>A[ct]&&(K=le(K));var Qt=le(K),lt=[];if(r&<.push(x[F]<=0),a&<.push(x[K]<=0,x[Qt]<=0),lt.every(function(bt){return bt})){S=L,D=!1;break}w.set(L,lt)}if(D)for(var Jt=T?3:1,Ce=function(Z){var Wt=E.find(function(te){var ut=w.get(te);if(ut)return ut.slice(0,Z).every(function(Ne){return Ne})});if(Wt)return S=Wt,"break"},Ht=Jt;Ht>0;Ht--){var Zt=Ce(Ht);if(Zt==="break")break}t.placement!==S&&(t.modifiersData[s]._skip=!0,t.placement=S,t.reset=!0)}}const $s={name:"flip",enabled:!0,phase:"main",fn:Ki,requiresIfExists:["offset"],data:{_skip:!1}};function In(n,t,e){return e===void 0&&(e={x:0,y:0}),{top:n.top-t.height-e.y,right:n.right-t.width+e.x,bottom:n.bottom-t.height+e.y,left:n.left-t.width-e.x}}function Pn(n){return[I,k,R,P].some(function(t){return n[t]>=0})}function Yi(n){var t=n.state,e=n.name,s=t.rects.reference,i=t.rects.popper,r=t.modifiersData.preventOverflow,o=It(t,{elementContext:"reference"}),a=It(t,{altBoundary:!0}),c=In(o,s),d=In(a,i,r),u=Pn(c),_=Pn(d);t.modifiersData[e]={referenceClippingOffsets:c,popperEscapeOffsets:d,isReferenceHidden:u,hasPopperEscaped:_},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":_})}const Is={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Yi};function Ui(n,t,e){var s=U(n),i=[P,I].indexOf(s)>=0?-1:1,r=typeof e=="function"?e(Object.assign({},t,{placement:n})):e,o=r[0],a=r[1];return o=o||0,a=(a||0)*i,[P,k].indexOf(s)>=0?{x:a,y:o}:{x:o,y:a}}function zi(n){var t=n.state,e=n.options,s=n.name,i=e.offset,r=i===void 0?[0,0]:i,o=tn.reduce(function(u,_){return u[_]=Ui(_,t.rects,r),u},{}),a=o[t.placement],c=a.x,d=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=d),t.modifiersData[s]=o}const Ps={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:zi};function Gi(n){var t=n.state,e=n.name;t.modifiersData[e]=Ls({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const dn={name:"popperOffsets",enabled:!0,phase:"read",fn:Gi,data:{}};function qi(n){return n==="x"?"y":"x"}function Xi(n){var t=n.state,e=n.options,s=n.name,i=e.mainAxis,r=i===void 0?!0:i,o=e.altAxis,a=o===void 0?!1:o,c=e.boundary,d=e.rootBoundary,u=e.altBoundary,_=e.padding,m=e.tether,p=m===void 0?!0:m,T=e.tetherOffset,g=T===void 0?0:T,v=It(t,{boundary:c,rootBoundary:d,padding:_,altBoundary:u}),y=U(t.placement),O=$t(t.placement),C=!O,E=rn(y),b=qi(E),A=t.modifiersData.popperOffsets,w=t.rects.reference,D=t.rects.popper,S=typeof g=="function"?g(Object.assign({},t.rects,{placement:t.placement})):g,N=typeof S=="number"?{mainAxis:S,altAxis:S}:Object.assign({mainAxis:0,altAxis:0},S),L=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,F={x:0,y:0};if(A){if(r){var $,at=E==="y"?I:P,ct=E==="y"?R:k,x=E==="y"?"height":"width",K=A[E],Qt=K+v[at],lt=K-v[ct],Jt=p?-D[x]/2:0,Ce=O===_t?w[x]:D[x],Ht=O===_t?-D[x]:-w[x],Zt=t.elements.arrow,bt=p&&Zt?sn(Zt):{width:0,height:0},Z=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Os(),Wt=Z[at],te=Z[ct],ut=Ft(0,w[x],bt[x]),Ne=C?w[x]/2-Jt-ut-Wt-N.mainAxis:Ce-ut-Wt-N.mainAxis,mi=C?-w[x]/2+Jt+ut+te+N.mainAxis:Ht+ut+te+N.mainAxis,Se=t.elements.arrow&&Ut(t.elements.arrow),gi=Se?E==="y"?Se.clientTop||0:Se.clientLeft||0:0,vn=($=L==null?void 0:L[E])!=null?$:0,Ei=K+Ne-vn-gi,vi=K+mi-vn,bn=Ft(p?fe(Qt,Ei):Qt,K,p?pt(lt,vi):lt);A[E]=bn,F[E]=bn-K}if(a){var An,bi=E==="x"?I:P,Ai=E==="x"?R:k,dt=A[b],ee=b==="y"?"height":"width",Tn=dt+v[bi],yn=dt-v[Ai],De=[I,P].indexOf(y)!==-1,wn=(An=L==null?void 0:L[b])!=null?An:0,On=De?Tn:dt-w[ee]-D[ee]-wn+N.altAxis,Cn=De?dt+w[ee]+D[ee]-wn-N.altAxis:yn,Nn=p&&De?Ni(On,dt,Cn):Ft(p?On:Tn,dt,p?Cn:yn);A[b]=Nn,F[b]=Nn-dt}t.modifiersData[s]=F}}const Ms={name:"preventOverflow",enabled:!0,phase:"main",fn:Xi,requiresIfExists:["offset"]};function Qi(n){return{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}}function Ji(n){return n===V(n)||!H(n)?cn(n):Qi(n)}function Zi(n){var t=n.getBoundingClientRect(),e=Dt(t.width)/n.offsetWidth||1,s=Dt(t.height)/n.offsetHeight||1;return e!==1||s!==1}function tr(n,t,e){e===void 0&&(e=!1);var s=H(t),i=H(t)&&Zi(t),r=it(t),o=Lt(n,i,e),a={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(s||!s&&!e)&&((G(t)!=="body"||un(r))&&(a=Ji(t)),H(t)?(c=Lt(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):r&&(c.x=ln(r))),{x:o.left+a.scrollLeft-c.x,y:o.top+a.scrollTop-c.y,width:o.width,height:o.height}}function er(n){var t=new Map,e=new Set,s=[];n.forEach(function(r){t.set(r.name,r)});function i(r){e.add(r.name);var o=[].concat(r.requires||[],r.requiresIfExists||[]);o.forEach(function(a){if(!e.has(a)){var c=t.get(a);c&&i(c)}}),s.push(r)}return n.forEach(function(r){e.has(r.name)||i(r)}),s}function nr(n){var t=er(n);return Ts.reduce(function(e,s){return e.concat(t.filter(function(i){return i.phase===s}))},[])}function sr(n){var t;return function(){return t||(t=new Promise(function(e){Promise.resolve().then(function(){t=void 0,e(n())})})),t}}function ir(n){var t=n.reduce(function(e,s){var i=e[s.name];return e[s.name]=i?Object.assign({},i,s,{options:Object.assign({},i.options,s.options),data:Object.assign({},i.data,s.data)}):s,e},{});return Object.keys(t).map(function(e){return t[e]})}var Mn={placement:"bottom",modifiers:[],strategy:"absolute"};function xn(){for(var n=arguments.length,t=new Array(n),e=0;e(n&&window.CSS&&window.CSS.escape&&(n=n.replace(/#([^\s"#']+)/g,(t,e)=>`#${CSS.escape(e)}`)),n),dr=n=>n==null?`${n}`:Object.prototype.toString.call(n).match(/\s([a-z]+)/i)[1].toLowerCase(),fr=n=>{do n+=Math.floor(Math.random()*lr);while(document.getElementById(n));return n},hr=n=>{if(!n)return 0;let{transitionDuration:t,transitionDelay:e}=window.getComputedStyle(n);const s=Number.parseFloat(t),i=Number.parseFloat(e);return!s&&!i?0:(t=t.split(",")[0],e=e.split(",")[0],(Number.parseFloat(t)+Number.parseFloat(e))*ur)},ks=n=>{n.dispatchEvent(new Event(qe))},q=n=>!n||typeof n!="object"?!1:(typeof n.jquery<"u"&&(n=n[0]),typeof n.nodeType<"u"),et=n=>q(n)?n.jquery?n[0]:n:typeof n=="string"&&n.length>0?document.querySelector(Rs(n)):null,xt=n=>{if(!q(n)||n.getClientRects().length===0)return!1;const t=getComputedStyle(n).getPropertyValue("visibility")==="visible",e=n.closest("details:not([open])");if(!e)return t;if(e!==n){const s=n.closest("summary");if(s&&s.parentNode!==e||s===null)return!1}return t},nt=n=>!n||n.nodeType!==Node.ELEMENT_NODE||n.classList.contains("disabled")?!0:typeof n.disabled<"u"?n.disabled:n.hasAttribute("disabled")&&n.getAttribute("disabled")!=="false",Vs=n=>{if(!document.documentElement.attachShadow)return null;if(typeof n.getRootNode=="function"){const t=n.getRootNode();return t instanceof ShadowRoot?t:null}return n instanceof ShadowRoot?n:n.parentNode?Vs(n.parentNode):null},he=()=>{},zt=n=>{n.offsetHeight},Hs=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,$e=[],pr=n=>{document.readyState==="loading"?($e.length||document.addEventListener("DOMContentLoaded",()=>{for(const t of $e)t()}),$e.push(n)):n()},W=()=>document.documentElement.dir==="rtl",j=n=>{pr(()=>{const t=Hs();if(t){const e=n.NAME,s=t.fn[e];t.fn[e]=n.jQueryInterface,t.fn[e].Constructor=n,t.fn[e].noConflict=()=>(t.fn[e]=s,n.jQueryInterface)}})},M=(n,t=[],e=n)=>typeof n=="function"?n(...t):e,Ws=(n,t,e=!0)=>{if(!e){M(n);return}const s=5,i=hr(t)+s;let r=!1;const o=({target:a})=>{a===t&&(r=!0,t.removeEventListener(qe,o),M(n))};t.addEventListener(qe,o),setTimeout(()=>{r||ks(t)},i)},hn=(n,t,e,s)=>{const i=n.length;let r=n.indexOf(t);return r===-1?!e&&s?n[i-1]:n[0]:(r+=e?1:-1,s&&(r=(r+i)%i),n[Math.max(0,Math.min(r,i-1))])},_r=/[^.]*(?=\..*)\.|.*/,mr=/\..*/,gr=/::\d+$/,Ie={};let Rn=1;const Bs={mouseenter:"mouseover",mouseleave:"mouseout"},Er=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 js(n,t){return t&&`${t}::${Rn++}`||n.uidEvent||Rn++}function Fs(n){const t=js(n);return n.uidEvent=t,Ie[t]=Ie[t]||{},Ie[t]}function vr(n,t){return function e(s){return pn(s,{delegateTarget:n}),e.oneOff&&l.off(n,s.type,t),t.apply(n,[s])}}function br(n,t,e){return function s(i){const r=n.querySelectorAll(t);for(let{target:o}=i;o&&o!==this;o=o.parentNode)for(const a of r)if(a===o)return pn(i,{delegateTarget:o}),s.oneOff&&l.off(n,i.type,t,e),e.apply(o,[i])}}function Ks(n,t,e=null){return Object.values(n).find(s=>s.callable===t&&s.delegationSelector===e)}function Ys(n,t,e){const s=typeof t=="string",i=s?e:t||e;let r=Us(n);return Er.has(r)||(r=n),[s,i,r]}function kn(n,t,e,s,i){if(typeof t!="string"||!n)return;let[r,o,a]=Ys(t,e,s);t in Bs&&(o=(T=>function(g){if(!g.relatedTarget||g.relatedTarget!==g.delegateTarget&&!g.delegateTarget.contains(g.relatedTarget))return T.call(this,g)})(o));const c=Fs(n),d=c[a]||(c[a]={}),u=Ks(d,o,r?e:null);if(u){u.oneOff=u.oneOff&&i;return}const _=js(o,t.replace(_r,"")),m=r?br(n,e,o):vr(n,o);m.delegationSelector=r?e:null,m.callable=o,m.oneOff=i,m.uidEvent=_,d[_]=m,n.addEventListener(a,m,r)}function Xe(n,t,e,s,i){const r=Ks(t[e],s,i);r&&(n.removeEventListener(e,r,!!i),delete t[e][r.uidEvent])}function Ar(n,t,e,s){const i=t[e]||{};for(const[r,o]of Object.entries(i))r.includes(s)&&Xe(n,t,e,o.callable,o.delegationSelector)}function Us(n){return n=n.replace(mr,""),Bs[n]||n}const l={on(n,t,e,s){kn(n,t,e,s,!1)},one(n,t,e,s){kn(n,t,e,s,!0)},off(n,t,e,s){if(typeof t!="string"||!n)return;const[i,r,o]=Ys(t,e,s),a=o!==t,c=Fs(n),d=c[o]||{},u=t.startsWith(".");if(typeof r<"u"){if(!Object.keys(d).length)return;Xe(n,c,o,r,i?e:null);return}if(u)for(const _ of Object.keys(c))Ar(n,c,_,t.slice(1));for(const[_,m]of Object.entries(d)){const p=_.replace(gr,"");(!a||t.includes(p))&&Xe(n,c,o,m.callable,m.delegationSelector)}},trigger(n,t,e){if(typeof t!="string"||!n)return null;const s=Hs(),i=Us(t),r=t!==i;let o=null,a=!0,c=!0,d=!1;r&&s&&(o=s.Event(t,e),s(n).trigger(o),a=!o.isPropagationStopped(),c=!o.isImmediatePropagationStopped(),d=o.isDefaultPrevented());const u=pn(new Event(t,{bubbles:a,cancelable:!0}),e);return d&&u.preventDefault(),c&&n.dispatchEvent(u),u.defaultPrevented&&o&&o.preventDefault(),u}};function pn(n,t={}){for(const[e,s]of Object.entries(t))try{n[e]=s}catch{Object.defineProperty(n,e,{configurable:!0,get(){return s}})}return n}function Vn(n){if(n==="true")return!0;if(n==="false")return!1;if(n===Number(n).toString())return Number(n);if(n===""||n==="null")return null;if(typeof n!="string")return n;try{return JSON.parse(decodeURIComponent(n))}catch{return n}}function Pe(n){return n.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}const X={setDataAttribute(n,t,e){n.setAttribute(`data-bs-${Pe(t)}`,e)},removeDataAttribute(n,t){n.removeAttribute(`data-bs-${Pe(t)}`)},getDataAttributes(n){if(!n)return{};const t={},e=Object.keys(n.dataset).filter(s=>s.startsWith("bs")&&!s.startsWith("bsConfig"));for(const s of e){let i=s.replace(/^bs/,"");i=i.charAt(0).toLowerCase()+i.slice(1,i.length),t[i]=Vn(n.dataset[s])}return t},getDataAttribute(n,t){return Vn(n.getAttribute(`data-bs-${Pe(t)}`))}};class Gt{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 s=q(e)?X.getDataAttribute(e,"config"):{};return{...this.constructor.Default,...typeof s=="object"?s:{},...q(e)?X.getDataAttributes(e):{},...typeof t=="object"?t:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const[s,i]of Object.entries(e)){const r=t[s],o=q(r)?"element":dr(r);if(!new RegExp(i).test(o))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${s}" provided type "${o}" but expected type "${i}".`)}}}const Tr="5.3.2";class Y extends Gt{constructor(t,e){super(),t=et(t),t&&(this._element=t,this._config=this._getConfig(e),Le.set(this._element,this.constructor.DATA_KEY,this))}dispose(){Le.remove(this._element,this.constructor.DATA_KEY),l.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,s=!0){Ws(t,e,s)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return Le.get(et(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,typeof e=="object"?e:null)}static get VERSION(){return Tr}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 Me=n=>{let t=n.getAttribute("data-bs-target");if(!t||t==="#"){let e=n.getAttribute("href");if(!e||!e.includes("#")&&!e.startsWith("."))return null;e.includes("#")&&!e.startsWith("#")&&(e=`#${e.split("#")[1]}`),t=e&&e!=="#"?Rs(e.trim()):null}return t},f={find(n,t=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(t,n))},findOne(n,t=document.documentElement){return Element.prototype.querySelector.call(t,n)},children(n,t){return[].concat(...n.children).filter(e=>e.matches(t))},parents(n,t){const e=[];let s=n.parentNode.closest(t);for(;s;)e.push(s),s=s.parentNode.closest(t);return e},prev(n,t){let e=n.previousElementSibling;for(;e;){if(e.matches(t))return[e];e=e.previousElementSibling}return[]},next(n,t){let e=n.nextElementSibling;for(;e;){if(e.matches(t))return[e];e=e.nextElementSibling}return[]},focusableChildren(n){const t=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(e=>`${e}:not([tabindex^="-"])`).join(",");return this.find(t,n).filter(e=>!nt(e)&&xt(e))},getSelectorFromElement(n){const t=Me(n);return t&&f.findOne(t)?t:null},getElementFromSelector(n){const t=Me(n);return t?f.findOne(t):null},getMultipleElementsFromSelector(n){const t=Me(n);return t?f.find(t):[]}},be=(n,t="hide")=>{const e=`click.dismiss${n.EVENT_KEY}`,s=n.NAME;l.on(document,e,`[data-bs-dismiss="${s}"]`,function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),nt(this))return;const r=f.getElementFromSelector(this)||this.closest(`.${s}`);n.getOrCreateInstance(r)[t]()})},yr="alert",wr="bs.alert",zs=`.${wr}`,Or=`close${zs}`,Cr=`closed${zs}`,Nr="fade",Sr="show";class Ae extends Y{static get NAME(){return yr}close(){if(l.trigger(this._element,Or).defaultPrevented)return;this._element.classList.remove(Sr);const e=this._element.classList.contains(Nr);this._queueCallback(()=>this._destroyElement(),this._element,e)}_destroyElement(){this._element.remove(),l.trigger(this._element,Cr),this.dispose()}static jQueryInterface(t){return this.each(function(){const e=Ae.getOrCreateInstance(this);if(typeof t=="string"){if(e[t]===void 0||t.startsWith("_")||t==="constructor")throw new TypeError(`No method named "${t}"`);e[t](this)}})}}be(Ae,"close");j(Ae);const Dr="button",Lr="bs.button",$r=`.${Lr}`,Ir=".data-api",Pr="active",Hn='[data-bs-toggle="button"]',Mr=`click${$r}${Ir}`;class Te extends Y{static get NAME(){return Dr}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(Pr))}static jQueryInterface(t){return this.each(function(){const e=Te.getOrCreateInstance(this);t==="toggle"&&e[t]()})}}l.on(document,Mr,Hn,n=>{n.preventDefault();const t=n.target.closest(Hn);Te.getOrCreateInstance(t).toggle()});j(Te);const xr="swipe",Rt=".bs.swipe",Rr=`touchstart${Rt}`,kr=`touchmove${Rt}`,Vr=`touchend${Rt}`,Hr=`pointerdown${Rt}`,Wr=`pointerup${Rt}`,Br="touch",jr="pen",Fr="pointer-event",Kr=40,Yr={endCallback:null,leftCallback:null,rightCallback:null},Ur={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class pe extends Gt{constructor(t,e){super(),this._element=t,!(!t||!pe.isSupported())&&(this._config=this._getConfig(e),this._deltaX=0,this._supportPointerEvents=!!window.PointerEvent,this._initEvents())}static get Default(){return Yr}static get DefaultType(){return Ur}static get NAME(){return xr}dispose(){l.off(this._element,Rt)}_start(t){if(!this._supportPointerEvents){this._deltaX=t.touches[0].clientX;return}this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX)}_end(t){this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX-this._deltaX),this._handleSwipe(),M(this._config.endCallback)}_move(t){this._deltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this._deltaX}_handleSwipe(){const t=Math.abs(this._deltaX);if(t<=Kr)return;const e=t/this._deltaX;this._deltaX=0,e&&M(e>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(l.on(this._element,Hr,t=>this._start(t)),l.on(this._element,Wr,t=>this._end(t)),this._element.classList.add(Fr)):(l.on(this._element,Rr,t=>this._start(t)),l.on(this._element,kr,t=>this._move(t)),l.on(this._element,Vr,t=>this._end(t)))}_eventIsPointerPenTouch(t){return this._supportPointerEvents&&(t.pointerType===jr||t.pointerType===Br)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const zr="carousel",Gr="bs.carousel",rt=`.${Gr}`,Gs=".data-api",qr="ArrowLeft",Xr="ArrowRight",Qr=500,Bt="next",At="prev",Ot="left",ue="right",Jr=`slide${rt}`,xe=`slid${rt}`,Zr=`keydown${rt}`,to=`mouseenter${rt}`,eo=`mouseleave${rt}`,no=`dragstart${rt}`,so=`load${rt}${Gs}`,io=`click${rt}${Gs}`,qs="carousel",se="active",ro="slide",oo="carousel-item-end",ao="carousel-item-start",co="carousel-item-next",lo="carousel-item-prev",Xs=".active",Qs=".carousel-item",uo=Xs+Qs,fo=".carousel-item img",ho=".carousel-indicators",po="[data-bs-slide], [data-bs-slide-to]",_o='[data-bs-ride="carousel"]',mo={[qr]:ue,[Xr]:Ot},go={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},Eo={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class qt extends Y{constructor(t,e){super(t,e),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=f.findOne(ho,this._element),this._addEventListeners(),this._config.ride===qs&&this.cycle()}static get Default(){return go}static get DefaultType(){return Eo}static get NAME(){return zr}next(){this._slide(Bt)}nextWhenVisible(){!document.hidden&&xt(this._element)&&this.next()}prev(){this._slide(At)}pause(){this._isSliding&&ks(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){if(this._config.ride){if(this._isSliding){l.one(this._element,xe,()=>this.cycle());return}this.cycle()}}to(t){const e=this._getItems();if(t>e.length-1||t<0)return;if(this._isSliding){l.one(this._element,xe,()=>this.to(t));return}const s=this._getItemIndex(this._getActive());if(s===t)return;const i=t>s?Bt:At;this._slide(i,e[t])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(t){return t.defaultInterval=t.interval,t}_addEventListeners(){this._config.keyboard&&l.on(this._element,Zr,t=>this._keydown(t)),this._config.pause==="hover"&&(l.on(this._element,to,()=>this.pause()),l.on(this._element,eo,()=>this._maybeEnableCycle())),this._config.touch&&pe.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const s of f.find(fo,this._element))l.on(s,no,i=>i.preventDefault());const e={leftCallback:()=>this._slide(this._directionToOrder(Ot)),rightCallback:()=>this._slide(this._directionToOrder(ue)),endCallback:()=>{this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),Qr+this._config.interval))}};this._swipeHelper=new pe(this._element,e)}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=mo[t.key];e&&(t.preventDefault(),this._slide(this._directionToOrder(e)))}_getItemIndex(t){return this._getItems().indexOf(t)}_setActiveIndicatorElement(t){if(!this._indicatorsElement)return;const e=f.findOne(Xs,this._indicatorsElement);e.classList.remove(se),e.removeAttribute("aria-current");const s=f.findOne(`[data-bs-slide-to="${t}"]`,this._indicatorsElement);s&&(s.classList.add(se),s.setAttribute("aria-current","true"))}_updateInterval(){const t=this._activeElement||this._getActive();if(!t)return;const e=Number.parseInt(t.getAttribute("data-bs-interval"),10);this._config.interval=e||this._config.defaultInterval}_slide(t,e=null){if(this._isSliding)return;const s=this._getActive(),i=t===Bt,r=e||hn(this._getItems(),s,i,this._config.wrap);if(r===s)return;const o=this._getItemIndex(r),a=p=>l.trigger(this._element,p,{relatedTarget:r,direction:this._orderToDirection(t),from:this._getItemIndex(s),to:o});if(a(Jr).defaultPrevented||!s||!r)return;const d=!!this._interval;this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=r;const u=i?ao:oo,_=i?co:lo;r.classList.add(_),zt(r),s.classList.add(u),r.classList.add(u);const m=()=>{r.classList.remove(u,_),r.classList.add(se),s.classList.remove(se,_,u),this._isSliding=!1,a(xe)};this._queueCallback(m,s,this._isAnimated()),d&&this.cycle()}_isAnimated(){return this._element.classList.contains(ro)}_getActive(){return f.findOne(uo,this._element)}_getItems(){return f.find(Qs,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(t){return W()?t===Ot?At:Bt:t===Ot?Bt:At}_orderToDirection(t){return W()?t===At?Ot:ue:t===At?ue:Ot}static jQueryInterface(t){return this.each(function(){const e=qt.getOrCreateInstance(this,t);if(typeof t=="number"){e.to(t);return}if(typeof t=="string"){if(e[t]===void 0||t.startsWith("_")||t==="constructor")throw new TypeError(`No method named "${t}"`);e[t]()}})}}l.on(document,io,po,function(n){const t=f.getElementFromSelector(this);if(!t||!t.classList.contains(qs))return;n.preventDefault();const e=qt.getOrCreateInstance(t),s=this.getAttribute("data-bs-slide-to");if(s){e.to(s),e._maybeEnableCycle();return}if(X.getDataAttribute(this,"slide")==="next"){e.next(),e._maybeEnableCycle();return}e.prev(),e._maybeEnableCycle()});l.on(window,so,()=>{const n=f.find(_o);for(const t of n)qt.getOrCreateInstance(t)});j(qt);const vo="collapse",bo="bs.collapse",Xt=`.${bo}`,Ao=".data-api",To=`show${Xt}`,yo=`shown${Xt}`,wo=`hide${Xt}`,Oo=`hidden${Xt}`,Co=`click${Xt}${Ao}`,Re="show",Nt="collapse",ie="collapsing",No="collapsed",So=`:scope .${Nt} .${Nt}`,Do="collapse-horizontal",Lo="width",$o="height",Io=".collapse.show, .collapse.collapsing",Qe='[data-bs-toggle="collapse"]',Po={parent:null,toggle:!0},Mo={parent:"(null|element)",toggle:"boolean"};class Yt extends Y{constructor(t,e){super(t,e),this._isTransitioning=!1,this._triggerArray=[];const s=f.find(Qe);for(const i of s){const r=f.getSelectorFromElement(i),o=f.find(r).filter(a=>a===this._element);r!==null&&o.length&&this._triggerArray.push(i)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return Po}static get DefaultType(){return Mo}static get NAME(){return vo}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(Io).filter(a=>a!==this._element).map(a=>Yt.getOrCreateInstance(a,{toggle:!1}))),t.length&&t[0]._isTransitioning||l.trigger(this._element,To).defaultPrevented)return;for(const a of t)a.hide();const s=this._getDimension();this._element.classList.remove(Nt),this._element.classList.add(ie),this._element.style[s]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const i=()=>{this._isTransitioning=!1,this._element.classList.remove(ie),this._element.classList.add(Nt,Re),this._element.style[s]="",l.trigger(this._element,yo)},o=`scroll${s[0].toUpperCase()+s.slice(1)}`;this._queueCallback(i,this._element,!0),this._element.style[s]=`${this._element[o]}px`}hide(){if(this._isTransitioning||!this._isShown()||l.trigger(this._element,wo).defaultPrevented)return;const e=this._getDimension();this._element.style[e]=`${this._element.getBoundingClientRect()[e]}px`,zt(this._element),this._element.classList.add(ie),this._element.classList.remove(Nt,Re);for(const i of this._triggerArray){const r=f.getElementFromSelector(i);r&&!this._isShown(r)&&this._addAriaAndCollapsedClass([i],!1)}this._isTransitioning=!0;const s=()=>{this._isTransitioning=!1,this._element.classList.remove(ie),this._element.classList.add(Nt),l.trigger(this._element,Oo)};this._element.style[e]="",this._queueCallback(s,this._element,!0)}_isShown(t=this._element){return t.classList.contains(Re)}_configAfterMerge(t){return t.toggle=!!t.toggle,t.parent=et(t.parent),t}_getDimension(){return this._element.classList.contains(Do)?Lo:$o}_initializeChildren(){if(!this._config.parent)return;const t=this._getFirstLevelChildren(Qe);for(const e of t){const s=f.getElementFromSelector(e);s&&this._addAriaAndCollapsedClass([e],this._isShown(s))}}_getFirstLevelChildren(t){const e=f.find(So,this._config.parent);return f.find(t,this._config.parent).filter(s=>!e.includes(s))}_addAriaAndCollapsedClass(t,e){if(t.length)for(const s of t)s.classList.toggle(No,!e),s.setAttribute("aria-expanded",e)}static jQueryInterface(t){const e={};return typeof t=="string"&&/show|hide/.test(t)&&(e.toggle=!1),this.each(function(){const s=Yt.getOrCreateInstance(this,e);if(typeof t=="string"){if(typeof s[t]>"u")throw new TypeError(`No method named "${t}"`);s[t]()}})}}l.on(document,Co,Qe,function(n){(n.target.tagName==="A"||n.delegateTarget&&n.delegateTarget.tagName==="A")&&n.preventDefault();for(const t of f.getMultipleElementsFromSelector(this))Yt.getOrCreateInstance(t,{toggle:!1}).toggle()});j(Yt);const Wn="dropdown",xo="bs.dropdown",Et=`.${xo}`,_n=".data-api",Ro="Escape",Bn="Tab",ko="ArrowUp",jn="ArrowDown",Vo=2,Ho=`hide${Et}`,Wo=`hidden${Et}`,Bo=`show${Et}`,jo=`shown${Et}`,Js=`click${Et}${_n}`,Zs=`keydown${Et}${_n}`,Fo=`keyup${Et}${_n}`,Ct="show",Ko="dropup",Yo="dropend",Uo="dropstart",zo="dropup-center",Go="dropdown-center",ft='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',qo=`${ft}.${Ct}`,de=".dropdown-menu",Xo=".navbar",Qo=".navbar-nav",Jo=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",Zo=W()?"top-end":"top-start",ta=W()?"top-start":"top-end",ea=W()?"bottom-end":"bottom-start",na=W()?"bottom-start":"bottom-end",sa=W()?"left-start":"right-start",ia=W()?"right-start":"left-start",ra="top",oa="bottom",aa={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},ca={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class z extends Y{constructor(t,e){super(t,e),this._popper=null,this._parent=this._element.parentNode,this._menu=f.next(this._element,de)[0]||f.prev(this._element,de)[0]||f.findOne(de,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return aa}static get DefaultType(){return ca}static get NAME(){return Wn}toggle(){return this._isShown()?this.hide():this.show()}show(){if(nt(this._element)||this._isShown())return;const t={relatedTarget:this._element};if(!l.trigger(this._element,Bo,t).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(Qo))for(const s of[].concat(...document.body.children))l.on(s,"mouseover",he);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Ct),this._element.classList.add(Ct),l.trigger(this._element,jo,t)}}hide(){if(nt(this._element)||!this._isShown())return;const t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(t){if(!l.trigger(this._element,Ho,t).defaultPrevented){if("ontouchstart"in document.documentElement)for(const s of[].concat(...document.body.children))l.off(s,"mouseover",he);this._popper&&this._popper.destroy(),this._menu.classList.remove(Ct),this._element.classList.remove(Ct),this._element.setAttribute("aria-expanded","false"),X.removeDataAttribute(this._menu,"popper"),l.trigger(this._element,Wo,t)}}_getConfig(t){if(t=super._getConfig(t),typeof t.reference=="object"&&!q(t.reference)&&typeof t.reference.getBoundingClientRect!="function")throw new TypeError(`${Wn.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(){if(typeof xs>"u")throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let t=this._element;this._config.reference==="parent"?t=this._parent:q(this._config.reference)?t=et(this._config.reference):typeof this._config.reference=="object"&&(t=this._config.reference);const e=this._getPopperConfig();this._popper=fn(t,this._menu,e)}_isShown(){return this._menu.classList.contains(Ct)}_getPlacement(){const t=this._parent;if(t.classList.contains(Yo))return sa;if(t.classList.contains(Uo))return ia;if(t.classList.contains(zo))return ra;if(t.classList.contains(Go))return oa;const e=getComputedStyle(this._menu).getPropertyValue("--bs-position").trim()==="end";return t.classList.contains(Ko)?e?ta:Zo:e?na:ea}_detectNavbar(){return this._element.closest(Xo)!==null}_getOffset(){const{offset:t}=this._config;return typeof t=="string"?t.split(",").map(e=>Number.parseInt(e,10)):typeof t=="function"?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||this._config.display==="static")&&(X.setDataAttribute(this._menu,"popper","static"),t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,...M(this._config.popperConfig,[t])}}_selectMenuItem({key:t,target:e}){const s=f.find(Jo,this._menu).filter(i=>xt(i));s.length&&hn(s,e,t===jn,!s.includes(e)).focus()}static jQueryInterface(t){return this.each(function(){const e=z.getOrCreateInstance(this,t);if(typeof t=="string"){if(typeof e[t]>"u")throw new TypeError(`No method named "${t}"`);e[t]()}})}static clearMenus(t){if(t.button===Vo||t.type==="keyup"&&t.key!==Bn)return;const e=f.find(qo);for(const s of e){const i=z.getInstance(s);if(!i||i._config.autoClose===!1)continue;const r=t.composedPath(),o=r.includes(i._menu);if(r.includes(i._element)||i._config.autoClose==="inside"&&!o||i._config.autoClose==="outside"&&o||i._menu.contains(t.target)&&(t.type==="keyup"&&t.key===Bn||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;const a={relatedTarget:i._element};t.type==="click"&&(a.clickEvent=t),i._completeHide(a)}}static dataApiKeydownHandler(t){const e=/input|textarea/i.test(t.target.tagName),s=t.key===Ro,i=[ko,jn].includes(t.key);if(!i&&!s||e&&!s)return;t.preventDefault();const r=this.matches(ft)?this:f.prev(this,ft)[0]||f.next(this,ft)[0]||f.findOne(ft,t.delegateTarget.parentNode),o=z.getOrCreateInstance(r);if(i){t.stopPropagation(),o.show(),o._selectMenuItem(t);return}o._isShown()&&(t.stopPropagation(),o.hide(),r.focus())}}l.on(document,Zs,ft,z.dataApiKeydownHandler);l.on(document,Zs,de,z.dataApiKeydownHandler);l.on(document,Js,z.clearMenus);l.on(document,Fo,z.clearMenus);l.on(document,Js,ft,function(n){n.preventDefault(),z.getOrCreateInstance(this).toggle()});j(z);const ti="backdrop",la="fade",Fn="show",Kn=`mousedown.bs.${ti}`,ua={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},da={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class ei extends Gt{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return ua}static get DefaultType(){return da}static get NAME(){return ti}show(t){if(!this._config.isVisible){M(t);return}this._append();const e=this._getElement();this._config.isAnimated&&zt(e),e.classList.add(Fn),this._emulateAnimation(()=>{M(t)})}hide(t){if(!this._config.isVisible){M(t);return}this._getElement().classList.remove(Fn),this._emulateAnimation(()=>{this.dispose(),M(t)})}dispose(){this._isAppended&&(l.off(this._element,Kn),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add(la),this._element=t}return this._element}_configAfterMerge(t){return t.rootElement=et(t.rootElement),t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),l.on(t,Kn,()=>{M(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(t){Ws(t,this._getElement(),this._config.isAnimated)}}const fa="focustrap",ha="bs.focustrap",_e=`.${ha}`,pa=`focusin${_e}`,_a=`keydown.tab${_e}`,ma="Tab",ga="forward",Yn="backward",Ea={autofocus:!0,trapElement:null},va={autofocus:"boolean",trapElement:"element"};class ni extends Gt{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return Ea}static get DefaultType(){return va}static get NAME(){return fa}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),l.off(document,_e),l.on(document,pa,t=>this._handleFocusin(t)),l.on(document,_a,t=>this._handleKeydown(t)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,l.off(document,_e))}_handleFocusin(t){const{trapElement:e}=this._config;if(t.target===document||t.target===e||e.contains(t.target))return;const s=f.focusableChildren(e);s.length===0?e.focus():this._lastTabNavDirection===Yn?s[s.length-1].focus():s[0].focus()}_handleKeydown(t){t.key===ma&&(this._lastTabNavDirection=t.shiftKey?Yn:ga)}}const Un=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",zn=".sticky-top",re="padding-right",Gn="margin-right";class Je{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,re,e=>e+t),this._setElementAttributes(Un,re,e=>e+t),this._setElementAttributes(zn,Gn,e=>e-t)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,re),this._resetElementAttributes(Un,re),this._resetElementAttributes(zn,Gn)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,s){const i=this.getWidth(),r=o=>{if(o!==this._element&&window.innerWidth>o.clientWidth+i)return;this._saveInitialAttribute(o,e);const a=window.getComputedStyle(o).getPropertyValue(e);o.style.setProperty(e,`${s(Number.parseFloat(a))}px`)};this._applyManipulationCallback(t,r)}_saveInitialAttribute(t,e){const s=t.style.getPropertyValue(e);s&&X.setDataAttribute(t,e,s)}_resetElementAttributes(t,e){const s=i=>{const r=X.getDataAttribute(i,e);if(r===null){i.style.removeProperty(e);return}X.removeDataAttribute(i,e),i.style.setProperty(e,r)};this._applyManipulationCallback(t,s)}_applyManipulationCallback(t,e){if(q(t)){e(t);return}for(const s of f.find(t,this._element))e(s)}}const ba="modal",Aa="bs.modal",B=`.${Aa}`,Ta=".data-api",ya="Escape",wa=`hide${B}`,Oa=`hidePrevented${B}`,si=`hidden${B}`,ii=`show${B}`,Ca=`shown${B}`,Na=`resize${B}`,Sa=`click.dismiss${B}`,Da=`mousedown.dismiss${B}`,La=`keydown.dismiss${B}`,$a=`click${B}${Ta}`,qn="modal-open",Ia="fade",Xn="show",ke="modal-static",Pa=".modal.show",Ma=".modal-dialog",xa=".modal-body",Ra='[data-bs-toggle="modal"]',ka={backdrop:!0,focus:!0,keyboard:!0},Va={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class gt extends Y{constructor(t,e){super(t,e),this._dialog=f.findOne(Ma,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new Je,this._addEventListeners()}static get Default(){return ka}static get DefaultType(){return Va}static get NAME(){return ba}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||l.trigger(this._element,ii,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(qn),this._adjustDialog(),this._backdrop.show(()=>this._showElement(t)))}hide(){!this._isShown||this._isTransitioning||l.trigger(this._element,wa).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(Xn),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated()))}dispose(){l.off(window,B),l.off(this._dialog,B),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new ei({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new ni({trapElement:this._element})}_showElement(t){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const e=f.findOne(xa,this._dialog);e&&(e.scrollTop=0),zt(this._element),this._element.classList.add(Xn);const s=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,l.trigger(this._element,Ca,{relatedTarget:t})};this._queueCallback(s,this._dialog,this._isAnimated())}_addEventListeners(){l.on(this._element,La,t=>{if(t.key===ya){if(this._config.keyboard){this.hide();return}this._triggerBackdropTransition()}}),l.on(window,Na,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),l.on(this._element,Da,t=>{l.one(this._element,Sa,e=>{if(!(this._element!==t.target||this._element!==e.target)){if(this._config.backdrop==="static"){this._triggerBackdropTransition();return}this._config.backdrop&&this.hide()}})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(qn),this._resetAdjustments(),this._scrollBar.reset(),l.trigger(this._element,si)})}_isAnimated(){return this._element.classList.contains(Ia)}_triggerBackdropTransition(){if(l.trigger(this._element,Oa).defaultPrevented)return;const e=this._element.scrollHeight>document.documentElement.clientHeight,s=this._element.style.overflowY;s==="hidden"||this._element.classList.contains(ke)||(e||(this._element.style.overflowY="hidden"),this._element.classList.add(ke),this._queueCallback(()=>{this._element.classList.remove(ke),this._queueCallback(()=>{this._element.style.overflowY=s},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),s=e>0;if(s&&!t){const i=W()?"paddingLeft":"paddingRight";this._element.style[i]=`${e}px`}if(!s&&t){const i=W()?"paddingRight":"paddingLeft";this._element.style[i]=`${e}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each(function(){const s=gt.getOrCreateInstance(this,t);if(typeof t=="string"){if(typeof s[t]>"u")throw new TypeError(`No method named "${t}"`);s[t](e)}})}}l.on(document,$a,Ra,function(n){const t=f.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&n.preventDefault(),l.one(t,ii,i=>{i.defaultPrevented||l.one(t,si,()=>{xt(this)&&this.focus()})});const e=f.findOne(Pa);e&>.getInstance(e).hide(),gt.getOrCreateInstance(t).toggle(this)});be(gt);j(gt);const Ha="offcanvas",Wa="bs.offcanvas",J=`.${Wa}`,ri=".data-api",Ba=`load${J}${ri}`,ja="Escape",Qn="show",Jn="showing",Zn="hiding",Fa="offcanvas-backdrop",oi=".offcanvas.show",Ka=`show${J}`,Ya=`shown${J}`,Ua=`hide${J}`,ts=`hidePrevented${J}`,ai=`hidden${J}`,za=`resize${J}`,Ga=`click${J}${ri}`,qa=`keydown.dismiss${J}`,Xa='[data-bs-toggle="offcanvas"]',Qa={backdrop:!0,keyboard:!0,scroll:!1},Ja={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class st extends Y{constructor(t,e){super(t,e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return Qa}static get DefaultType(){return Ja}static get NAME(){return Ha}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){if(this._isShown||l.trigger(this._element,Ka,{relatedTarget:t}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||new Je().hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(Jn);const s=()=>{(!this._config.scroll||this._config.backdrop)&&this._focustrap.activate(),this._element.classList.add(Qn),this._element.classList.remove(Jn),l.trigger(this._element,Ya,{relatedTarget:t})};this._queueCallback(s,this._element,!0)}hide(){if(!this._isShown||l.trigger(this._element,Ua).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(Zn),this._backdrop.hide();const e=()=>{this._element.classList.remove(Qn,Zn),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||new Je().reset(),l.trigger(this._element,ai)};this._queueCallback(e,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const t=()=>{if(this._config.backdrop==="static"){l.trigger(this._element,ts);return}this.hide()},e=!!this._config.backdrop;return new ei({className:Fa,isVisible:e,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:e?t:null})}_initializeFocusTrap(){return new ni({trapElement:this._element})}_addEventListeners(){l.on(this._element,qa,t=>{if(t.key===ja){if(this._config.keyboard){this.hide();return}l.trigger(this._element,ts)}})}static jQueryInterface(t){return this.each(function(){const e=st.getOrCreateInstance(this,t);if(typeof t=="string"){if(e[t]===void 0||t.startsWith("_")||t==="constructor")throw new TypeError(`No method named "${t}"`);e[t](this)}})}}l.on(document,Ga,Xa,function(n){const t=f.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&n.preventDefault(),nt(this))return;l.one(t,ai,()=>{xt(this)&&this.focus()});const e=f.findOne(oi);e&&e!==t&&st.getInstance(e).hide(),st.getOrCreateInstance(t).toggle(this)});l.on(window,Ba,()=>{for(const n of f.find(oi))st.getOrCreateInstance(n).show()});l.on(window,za,()=>{for(const n of f.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(n).position!=="fixed"&&st.getOrCreateInstance(n).hide()});be(st);j(st);const Za=/^aria-[\w-]*$/i,ci={"*":["class","dir","id","lang","role",Za],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},tc=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),ec=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,nc=(n,t)=>{const e=n.nodeName.toLowerCase();return t.includes(e)?tc.has(e)?!!ec.test(n.nodeValue):!0:t.filter(s=>s instanceof RegExp).some(s=>s.test(e))};function sc(n,t,e){if(!n.length)return n;if(e&&typeof e=="function")return e(n);const i=new window.DOMParser().parseFromString(n,"text/html"),r=[].concat(...i.body.querySelectorAll("*"));for(const o of r){const a=o.nodeName.toLowerCase();if(!Object.keys(t).includes(a)){o.remove();continue}const c=[].concat(...o.attributes),d=[].concat(t["*"]||[],t[a]||[]);for(const u of c)nc(u,d)||o.removeAttribute(u.nodeName)}return i.body.innerHTML}const ic="TemplateFactory",rc={allowList:ci,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},oc={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},ac={entry:"(string|element|function|null)",selector:"(string|element)"};class cc extends Gt{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return rc}static get DefaultType(){return oc}static get NAME(){return ic}getContent(){return Object.values(this._config.content).map(t=>this._resolvePossibleFunction(t)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(t){return this._checkContent(t),this._config.content={...this._config.content,...t},this}toHtml(){const t=document.createElement("div");t.innerHTML=this._maybeSanitize(this._config.template);for(const[i,r]of Object.entries(this._config.content))this._setContent(t,r,i);const e=t.children[0],s=this._resolvePossibleFunction(this._config.extraClass);return s&&e.classList.add(...s.split(" ")),e}_typeCheckConfig(t){super._typeCheckConfig(t),this._checkContent(t.content)}_checkContent(t){for(const[e,s]of Object.entries(t))super._typeCheckConfig({selector:e,entry:s},ac)}_setContent(t,e,s){const i=f.findOne(s,t);if(i){if(e=this._resolvePossibleFunction(e),!e){i.remove();return}if(q(e)){this._putElementInTemplate(et(e),i);return}if(this._config.html){i.innerHTML=this._maybeSanitize(e);return}i.textContent=e}}_maybeSanitize(t){return this._config.sanitize?sc(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return M(t,[this])}_putElementInTemplate(t,e){if(this._config.html){e.innerHTML="",e.append(t);return}e.textContent=t.textContent}}const lc="tooltip",uc=new Set(["sanitize","allowList","sanitizeFn"]),Ve="fade",dc="modal",oe="show",fc=".tooltip-inner",es=`.${dc}`,ns="hide.bs.modal",jt="hover",He="focus",hc="click",pc="manual",_c="hide",mc="hidden",gc="show",Ec="shown",vc="inserted",bc="click",Ac="focusin",Tc="focusout",yc="mouseenter",wc="mouseleave",Oc={AUTO:"auto",TOP:"top",RIGHT:W()?"left":"right",BOTTOM:"bottom",LEFT:W()?"right":"left"},Cc={allowList:ci,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},Nc={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class kt extends Y{constructor(t,e){if(typeof xs>"u")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(t,e),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return Cc}static get DefaultType(){return Nc}static get NAME(){return lc}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){if(this._isEnabled){if(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()){this._leave();return}this._enter()}}dispose(){clearTimeout(this._timeout),l.off(this._element.closest(es),ns,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!(this._isWithContent()&&this._isEnabled))return;const t=l.trigger(this._element,this.constructor.eventName(gc)),s=(Vs(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!s)return;this._disposePopper();const i=this._getTipElement();this._element.setAttribute("aria-describedby",i.getAttribute("id"));const{container:r}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(r.append(i),l.trigger(this._element,this.constructor.eventName(vc))),this._popper=this._createPopper(i),i.classList.add(oe),"ontouchstart"in document.documentElement)for(const a of[].concat(...document.body.children))l.on(a,"mouseover",he);const o=()=>{l.trigger(this._element,this.constructor.eventName(Ec)),this._isHovered===!1&&this._leave(),this._isHovered=!1};this._queueCallback(o,this.tip,this._isAnimated())}hide(){if(!this._isShown()||l.trigger(this._element,this.constructor.eventName(_c)).defaultPrevented)return;if(this._getTipElement().classList.remove(oe),"ontouchstart"in document.documentElement)for(const i of[].concat(...document.body.children))l.off(i,"mouseover",he);this._activeTrigger[hc]=!1,this._activeTrigger[He]=!1,this._activeTrigger[jt]=!1,this._isHovered=null;const s=()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),l.trigger(this._element,this.constructor.eventName(mc)))};this._queueCallback(s,this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return!!this._getTitle()}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(t){const e=this._getTemplateFactory(t).toHtml();if(!e)return null;e.classList.remove(Ve,oe),e.classList.add(`bs-${this.constructor.NAME}-auto`);const s=fr(this.constructor.NAME).toString();return e.setAttribute("id",s),this._isAnimated()&&e.classList.add(Ve),e}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new cc({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[fc]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(Ve)}_isShown(){return this.tip&&this.tip.classList.contains(oe)}_createPopper(t){const e=M(this._config.placement,[this,t,this._element]),s=Oc[e.toUpperCase()];return fn(this._element,t,this._getPopperConfig(s))}_getOffset(){const{offset:t}=this._config;return typeof t=="string"?t.split(",").map(e=>Number.parseInt(e,10)):typeof t=="function"?e=>t(e,this._element):t}_resolvePossibleFunction(t){return M(t,[this._element])}_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:s=>{this._getTipElement().setAttribute("data-popper-placement",s.state.placement)}}]};return{...e,...M(this._config.popperConfig,[e])}}_setListeners(){const t=this._config.trigger.split(" ");for(const e of t)if(e==="click")l.on(this._element,this.constructor.eventName(bc),this._config.selector,s=>{this._initializeOnDelegatedTarget(s).toggle()});else if(e!==pc){const s=e===jt?this.constructor.eventName(yc):this.constructor.eventName(Ac),i=e===jt?this.constructor.eventName(wc):this.constructor.eventName(Tc);l.on(this._element,s,this._config.selector,r=>{const o=this._initializeOnDelegatedTarget(r);o._activeTrigger[r.type==="focusin"?He:jt]=!0,o._enter()}),l.on(this._element,i,this._config.selector,r=>{const o=this._initializeOnDelegatedTarget(r);o._activeTrigger[r.type==="focusout"?He:jt]=o._element.contains(r.relatedTarget),o._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},l.on(this._element.closest(es),ns,this._hideModalHandler)}_fixTitle(){const t=this._element.getAttribute("title");t&&(!this._element.getAttribute("aria-label")&&!this._element.textContent.trim()&&this._element.setAttribute("aria-label",t),this._element.setAttribute("data-bs-original-title",t),this._element.removeAttribute("title"))}_enter(){if(this._isShown()||this._isHovered){this._isHovered=!0;return}this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show)}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(t,e){clearTimeout(this._timeout),this._timeout=setTimeout(t,e)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(t){const e=X.getDataAttributes(this._element);for(const s of Object.keys(e))uc.has(s)&&delete e[s];return t={...e,...typeof t=="object"&&t?t:{}},t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t.container=t.container===!1?document.body:et(t.container),typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),typeof t.title=="number"&&(t.title=t.title.toString()),typeof t.content=="number"&&(t.content=t.content.toString()),t}_getDelegateConfig(){const t={};for(const[e,s]of Object.entries(this._config))this.constructor.Default[e]!==s&&(t[e]=s);return t.selector=!1,t.trigger="manual",t}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(t){return this.each(function(){const e=kt.getOrCreateInstance(this,t);if(typeof t=="string"){if(typeof e[t]>"u")throw new TypeError(`No method named "${t}"`);e[t]()}})}}j(kt);const Sc="popover",Dc=".popover-header",Lc=".popover-body",$c={...kt.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},Ic={...kt.DefaultType,content:"(null|string|element|function)"};class mn extends kt{static get Default(){return $c}static get DefaultType(){return Ic}static get NAME(){return Sc}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[Dc]:this._getTitle(),[Lc]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(t){return this.each(function(){const e=mn.getOrCreateInstance(this,t);if(typeof t=="string"){if(typeof e[t]>"u")throw new TypeError(`No method named "${t}"`);e[t]()}})}}j(mn);const Pc="scrollspy",Mc="bs.scrollspy",gn=`.${Mc}`,xc=".data-api",Rc=`activate${gn}`,ss=`click${gn}`,kc=`load${gn}${xc}`,Vc="dropdown-item",Tt="active",Hc='[data-bs-spy="scroll"]',We="[href]",Wc=".nav, .list-group",is=".nav-link",Bc=".nav-item",jc=".list-group-item",Fc=`${is}, ${Bc} > ${is}, ${jc}`,Kc=".dropdown",Yc=".dropdown-toggle",Uc={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},zc={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class ye extends Y{constructor(t,e){super(t,e),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement=getComputedStyle(this._element).overflowY==="visible"?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return Uc}static get DefaultType(){return zc}static get NAME(){return Pc}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const t of this._observableSections.values())this._observer.observe(t)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(t){return t.target=et(t.target)||document.body,t.rootMargin=t.offset?`${t.offset}px 0px -30%`:t.rootMargin,typeof t.threshold=="string"&&(t.threshold=t.threshold.split(",").map(e=>Number.parseFloat(e))),t}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(l.off(this._config.target,ss),l.on(this._config.target,ss,We,t=>{const e=this._observableSections.get(t.target.hash);if(e){t.preventDefault();const s=this._rootElement||window,i=e.offsetTop-this._element.offsetTop;if(s.scrollTo){s.scrollTo({top:i,behavior:"smooth"});return}s.scrollTop=i}}))}_getNewObserver(){const t={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(e=>this._observerCallback(e),t)}_observerCallback(t){const e=o=>this._targetLinks.get(`#${o.target.id}`),s=o=>{this._previousScrollData.visibleEntryTop=o.target.offsetTop,this._process(e(o))},i=(this._rootElement||document.documentElement).scrollTop,r=i>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=i;for(const o of t){if(!o.isIntersecting){this._activeTarget=null,this._clearActiveClass(e(o));continue}const a=o.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(r&&a){if(s(o),!i)return;continue}!r&&!a&&s(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const t=f.find(We,this._config.target);for(const e of t){if(!e.hash||nt(e))continue;const s=f.findOne(decodeURI(e.hash),this._element);xt(s)&&(this._targetLinks.set(decodeURI(e.hash),e),this._observableSections.set(e.hash,s))}}_process(t){this._activeTarget!==t&&(this._clearActiveClass(this._config.target),this._activeTarget=t,t.classList.add(Tt),this._activateParents(t),l.trigger(this._element,Rc,{relatedTarget:t}))}_activateParents(t){if(t.classList.contains(Vc)){f.findOne(Yc,t.closest(Kc)).classList.add(Tt);return}for(const e of f.parents(t,Wc))for(const s of f.prev(e,Fc))s.classList.add(Tt)}_clearActiveClass(t){t.classList.remove(Tt);const e=f.find(`${We}.${Tt}`,t);for(const s of e)s.classList.remove(Tt)}static jQueryInterface(t){return this.each(function(){const e=ye.getOrCreateInstance(this,t);if(typeof t=="string"){if(e[t]===void 0||t.startsWith("_")||t==="constructor")throw new TypeError(`No method named "${t}"`);e[t]()}})}}l.on(window,kc,()=>{for(const n of f.find(Hc))ye.getOrCreateInstance(n)});j(ye);const Gc="tab",qc="bs.tab",vt=`.${qc}`,Xc=`hide${vt}`,Qc=`hidden${vt}`,Jc=`show${vt}`,Zc=`shown${vt}`,tl=`click${vt}`,el=`keydown${vt}`,nl=`load${vt}`,sl="ArrowLeft",rs="ArrowRight",il="ArrowUp",os="ArrowDown",Be="Home",as="End",ht="active",cs="fade",je="show",rl="dropdown",li=".dropdown-toggle",ol=".dropdown-menu",Fe=`:not(${li})`,al='.list-group, .nav, [role="tablist"]',cl=".nav-item, .list-group-item",ll=`.nav-link${Fe}, .list-group-item${Fe}, [role="tab"]${Fe}`,ui='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Ke=`${ll}, ${ui}`,ul=`.${ht}[data-bs-toggle="tab"], .${ht}[data-bs-toggle="pill"], .${ht}[data-bs-toggle="list"]`;class Pt extends Y{constructor(t){super(t),this._parent=this._element.closest(al),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),l.on(this._element,el,e=>this._keydown(e)))}static get NAME(){return Gc}show(){const t=this._element;if(this._elemIsActive(t))return;const e=this._getActiveElem(),s=e?l.trigger(e,Xc,{relatedTarget:t}):null;l.trigger(t,Jc,{relatedTarget:e}).defaultPrevented||s&&s.defaultPrevented||(this._deactivate(e,t),this._activate(t,e))}_activate(t,e){if(!t)return;t.classList.add(ht),this._activate(f.getElementFromSelector(t));const s=()=>{if(t.getAttribute("role")!=="tab"){t.classList.add(je);return}t.removeAttribute("tabindex"),t.setAttribute("aria-selected",!0),this._toggleDropDown(t,!0),l.trigger(t,Zc,{relatedTarget:e})};this._queueCallback(s,t,t.classList.contains(cs))}_deactivate(t,e){if(!t)return;t.classList.remove(ht),t.blur(),this._deactivate(f.getElementFromSelector(t));const s=()=>{if(t.getAttribute("role")!=="tab"){t.classList.remove(je);return}t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),l.trigger(t,Qc,{relatedTarget:e})};this._queueCallback(s,t,t.classList.contains(cs))}_keydown(t){if(![sl,rs,il,os,Be,as].includes(t.key))return;t.stopPropagation(),t.preventDefault();const e=this._getChildren().filter(i=>!nt(i));let s;if([Be,as].includes(t.key))s=e[t.key===Be?0:e.length-1];else{const i=[rs,os].includes(t.key);s=hn(e,t.target,i,!0)}s&&(s.focus({preventScroll:!0}),Pt.getOrCreateInstance(s).show())}_getChildren(){return f.find(Ke,this._parent)}_getActiveElem(){return this._getChildren().find(t=>this._elemIsActive(t))||null}_setInitialAttributes(t,e){this._setAttributeIfNotExists(t,"role","tablist");for(const s of e)this._setInitialAttributesOnChild(s)}_setInitialAttributesOnChild(t){t=this._getInnerElement(t);const e=this._elemIsActive(t),s=this._getOuterElement(t);t.setAttribute("aria-selected",e),s!==t&&this._setAttributeIfNotExists(s,"role","presentation"),e||t.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(t,"role","tab"),this._setInitialAttributesOnTargetPanel(t)}_setInitialAttributesOnTargetPanel(t){const e=f.getElementFromSelector(t);e&&(this._setAttributeIfNotExists(e,"role","tabpanel"),t.id&&this._setAttributeIfNotExists(e,"aria-labelledby",`${t.id}`))}_toggleDropDown(t,e){const s=this._getOuterElement(t);if(!s.classList.contains(rl))return;const i=(r,o)=>{const a=f.findOne(r,s);a&&a.classList.toggle(o,e)};i(li,ht),i(ol,je),s.setAttribute("aria-expanded",e)}_setAttributeIfNotExists(t,e,s){t.hasAttribute(e)||t.setAttribute(e,s)}_elemIsActive(t){return t.classList.contains(ht)}_getInnerElement(t){return t.matches(Ke)?t:f.findOne(Ke,t)}_getOuterElement(t){return t.closest(cl)||t}static jQueryInterface(t){return this.each(function(){const e=Pt.getOrCreateInstance(this);if(typeof t=="string"){if(e[t]===void 0||t.startsWith("_")||t==="constructor")throw new TypeError(`No method named "${t}"`);e[t]()}})}}l.on(document,tl,ui,function(n){["A","AREA"].includes(this.tagName)&&n.preventDefault(),!nt(this)&&Pt.getOrCreateInstance(this).show()});l.on(window,nl,()=>{for(const n of f.find(ul))Pt.getOrCreateInstance(n)});j(Pt);const dl="toast",fl="bs.toast",ot=`.${fl}`,hl=`mouseover${ot}`,pl=`mouseout${ot}`,_l=`focusin${ot}`,ml=`focusout${ot}`,gl=`hide${ot}`,El=`hidden${ot}`,vl=`show${ot}`,bl=`shown${ot}`,Al="fade",ls="hide",ae="show",ce="showing",Tl={animation:"boolean",autohide:"boolean",delay:"number"},yl={animation:!0,autohide:!0,delay:5e3};class we extends Y{constructor(t,e){super(t,e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return yl}static get DefaultType(){return Tl}static get NAME(){return dl}show(){if(l.trigger(this._element,vl).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(Al);const e=()=>{this._element.classList.remove(ce),l.trigger(this._element,bl),this._maybeScheduleHide()};this._element.classList.remove(ls),zt(this._element),this._element.classList.add(ae,ce),this._queueCallback(e,this._element,this._config.animation)}hide(){if(!this.isShown()||l.trigger(this._element,gl).defaultPrevented)return;const e=()=>{this._element.classList.add(ls),this._element.classList.remove(ce,ae),l.trigger(this._element,El)};this._element.classList.add(ce),this._queueCallback(e,this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(ae),super.dispose()}isShown(){return this._element.classList.contains(ae)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(t,e){switch(t.type){case"mouseover":case"mouseout":{this._hasMouseInteraction=e;break}case"focusin":case"focusout":{this._hasKeyboardInteraction=e;break}}if(e){this._clearTimeout();return}const s=t.relatedTarget;this._element===s||this._element.contains(s)||this._maybeScheduleHide()}_setListeners(){l.on(this._element,hl,t=>this._onInteraction(t,!0)),l.on(this._element,pl,t=>this._onInteraction(t,!1)),l.on(this._element,_l,t=>this._onInteraction(t,!0)),l.on(this._element,ml,t=>this._onInteraction(t,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each(function(){const e=we.getOrCreateInstance(this,t);if(typeof t=="string"){if(typeof e[t]>"u")throw new TypeError(`No method named "${t}"`);e[t](this)}})}}be(we);j(we);const h={button:document.getElementById("items-add"),table:document.querySelector("#items-table tbody"),form:document.getElementById("items-form"),lineId:document.getElementById("items-line-id"),itemsType:document.getElementById("item"),author:document.getElementById("author"),name:document.getElementById("name"),desc:document.getElementById("desc"),count:document.getElementById("count"),date:document.getElementById("date"),image:document.getElementById("image"),imagePreview:document.getElementById("image-preview")},En="https://via.placeholder.com/200";function me(n,t="",e=!1){const s=document.createElement("option");return s.value=t||"",s.selected=e,s.text=n,s}function Ye(n,t){const e=document.createElement("i");e.classList.add("fa-solid",n);const s=document.createElement("a");s.href="#",s.appendChild(e),s.onclick=r=>{r.preventDefault(),r.stopPropagation(),t()};const i=document.createElement("td");return i.appendChild(s),i}function yt(n){const t=document.createElement("td");return t.textContent=n,t}function wl(n,t,e,s,i){const r=document.createElement("th");r.scope="row",r.textContent=t+1;const o=document.createElement("tr");return o.id=`line-${n.id}`,o.appendChild(r),o.appendChild(yt(n.items.name)),o.appendChild(yt(n.authors.name)),o.appendChild(yt(n.name)),o.appendChild(yt(n.desc)),o.appendChild(yt(n.count)),o.appendChild(yt(n.date)),o.appendChild(Ye("fa-pencil",e)),o.appendChild(Ye("fa-pen-to-square",s)),o.appendChild(Ye("fa-trash",i)),o}const us=document.getElementById("items-update"),di=us?new gt(us,{}):null,Ol=document.getElementById("items-update-title");function fi(){h.lineId.value="",h.itemsType.value="",h.author.value="",h.name.value="",h.desc.value="",h.count.value=0,h.date.value="",h.image.value="",h.imagePreview.src=En}function hi(n){Ol.innerHTML=n===null?"Добавить":"Изменить",console.info(n),n?(h.lineId.value=n.id,h.itemsType.value=n.itemsId,h.author.value=n.authorsId,h.name.value=n.name,h.desc.value=n.desc,h.count.value=n.count,h.date.value=n.date,h.imagePreview.src=n.image?n.image:En):fi(),di.show()}function Cl(){fi(),h.form.classList.remove("was-validated"),di.hide()}const Vt="http://localhost:8081";function pi(n,t,e,s,i,r,o){return{itemsId:n,authorsId:t,name:e,desc:s,count:i,date:r,image:o}}async function Nl(){const n=await fetch(`${Vt}/items`);if(!n.ok)throw n.statusText;return n.json()}async function Sl(){const n=await fetch(`${Vt}/authors`);if(!n.ok)throw n.statusText;return n.json()}async function Dl(){const n=await fetch(`${Vt}/lines?_expand=authors`);if(!n.ok)throw n.statusText;return n.json()}async function Ll(n,t,e,s,i,r,o){const a=pi(n,t,e,s,i,r,o),c={method:"POST",body:JSON.stringify(a),headers:{Accept:"application/json","Content-Type":"application/json"}},d=await fetch(`${Vt}/lines`,c);if(!d.ok)throw d.statusText;return d.json()}async function $l(n,t,e,s,i,r,o,a){const c=pi(t,e,s,i,r,o,a),d={method:"PUT",body:JSON.stringify(c),headers:{Accept:"application/json","Content-Type":"application/json"}},u=await fetch(`${Vt}/lines/${n}`,d);if(!u.ok)throw u.statusText;return u.json()}async function Il(n){const t={method:"DELETE"},e=await fetch(`${Vt}/lines/${n}`,t);if(!e.ok)throw e.statusText;return e.json()}async function Pl(){const n=await Nl();h.itemsType.innerHTML="",h.itemsType.appendChild(me("Выберите значение","",!0)),n.forEach(t=>{h.itemsType.appendChild(me(t.name,t.id))})}async function Ml(){const n=await Sl();h.author.innerHTML="",h.author.appendChild(me("Выберите значение","",!0)),n.forEach(t=>{h.author.appendChild(me(t.name,t.id))})}async function Oe(){if(console.info("Try to load data"),!h.table)return;const n=await Dl();h.table.innerHTML="",n.forEach((t,e)=>{h.table.appendChild(wl(t,e,()=>hi(t),()=>location.assign(`page-edit.html?id=${t.id}`),()=>kl(t.id)))})}async function xl(n,t,e,s,i,r,o){console.info("Try to add item");const a=await Ll(n,t,e,s,i,r,o);console.info("Added"),console.info(a),Oe()}async function Rl(n,t,e,s,i,r,o,a){console.info("Try to update item");const c=await $l(n,t,e,s,i,r,o,a);console.info("Updated"),console.info(c),Oe()}async function kl(n){if(!confirm("Do you really want to remove this item?")){console.info("Canceled");return}console.info("Try to remove item");const t=await Il(n);console.info(t),Oe()}async function _i(n){const t=new FileReader;return new Promise((e,s)=>{t.onloadend=()=>{const i=t.result;e(i)},t.onerror=()=>{s(new Error("oops, something went wrong with the file reader."))},t.readAsDataURL(n)})}async function Vl(){const n=h.image.files[0],t=await _i(n);console.info("base64 ",t),h.imagePreview.src=t}function Hl(){console.info("linesForm"),Pl(),Ml(),Oe(),h.image.addEventListener("change",()=>Vl()),h.button.addEventListener("click",()=>hi(null)),h.form.addEventListener("submit",async n=>{if(console.info("Form onSubmit"),n.preventDefault(),n.stopPropagation(),!h.form.checkValidity())return;let t="";if(h.imagePreview.src!==En){const i=await(await fetch(h.imagePreview.src)).blob();t=await _i(i)}const e=h.lineId.value;e?await Rl(e,h.itemsType.value,h.author.value,h.name.value,h.desc.value,h.count.value,h.date.value,t):await xl(h.itemsType.value,h.author.value,h.name.value,h.desc.value,h.count.value,h.date.value,t),Cl()})}document.addEventListener("DOMContentLoaded",()=>{Ti(),Hl()}); //# sourceMappingURL=page4-6eebaf84.js.map